0.0.102 • Published 4 years ago

@aptible/design-kit v0.0.102

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

aptible-design-kit

Basic presentational react components for the Aptible Design System.

Using aptible-design-kit

Current storybook

You can also use Chromatic and the "View Storybook" link there to explore the design kit

yarn add @aptible/design-kit

Building aptible-design-kit

Developing locally

yarn
yarn run storybook

Linking to comply-ui (or any other repo) locally

Install yalc globally:

yarn global add yalc

In this repo:

yalc publish

In the consuming repo:

yalc add @aptible/design-kit
yarn

Note: This will change the consuming repo's package.json (replacing @aptible/design-kit's version number with a local path). Make sure you revert that before committing!

Generating a new component

This project uses Plop to make it easy to generate new components.

  1. Run yarn generate or yarn generate <component name>
  2. Follow the prompt and give the component a name; the plopfile will convert the name to Pascal case
  3. The component will be created in packages/components/

Adding a new component

  1. Add the component's export to the root index.ts
  2. If the component has its own stylesheet, add it to packages/css/components.

Writing CSS

Aptible Design Kit uses tailwindcss to compose styles for components.

In many cases, each component should have their own index.css file. The naming convention follows SUIT CSS using the adk prefix.

adk-ComponentName
adk-ComponentName--modifierName
adk-ComponentName-descendentName
adk-ComponentName.is-stateOfComponent

Writing documentation

Documentation is written in MDX which is a combination of Markdown + JSX.

Each MDX file must end with .story.mdx for it to be picked up by storybook.

All documentation exists within the src directory of this repo. If it applies to the design system as a whole, it should live in the src/docs directory. Component documentation is included inside each component directory.

Each MDX file should start with importing the Meta component and passing a title to it:

import { Meta } from "@storybook/addon-docs/blocks";

<Meta title="Arrow DS/Intro" />

### [ write markdown here ]

In this example, we're creating a new page called "Intro" that will be organized into the "Arrow DS" section in the storybook sidebar.

Check out MDX files in src/docs or component directories for more examples.

For designers (or anyone else who isn't super familiar with git)

The easiest way to make changes to documentation is through the GitHub interface. Just navigate to the MDX file you'd like to change and click the pencil icon in the top right. After making your changes, you'll be prompted to open a pull request that will be reviewed by UXE. To create a brand new MDX file, just navigate (again, in GitHub) to the directory you want it to live and click the "Create new file" button in the top right.

If you'd prefer to create a fork and run Storybook locally, there are instructions on the wiki.

Publishing @aptible/design-kit (npm)

Pre-requisites:

Increment the version number

  1. Create a new branch in your fork with the updated version number.
  2. Open a PR to master and merge it.

Automatic:

  1. In Github, go to Releases and click the Draft New Release button.
  2. Tag the release "vX.X.X" and add release notes (links to Github pull-requests and issues are helpful).
  3. Click Publish.
  4. Travis CI will publish via npm automatically.

Manual:

  1. Navigate to the tip of the master branch
  2. Verify the version has been incremented:
    • Check that package.json that reflects an incremented version number. Compare against the current package in npm
    • If the version is NOT incremented, please introduce a standalone commit to master with the increment before proceeding. (See pre-requisites)
  3. Verify that the commit has been tagged with the new version number
    • Check that the version number in package.json matches the latest tag in this list. The commit shown with the tag should be the same commit you are currently at.
    • If the correct tag is NOT applied, fix that before proceeding
  4. Run npm publish
0.0.102

4 years ago

0.0.101

4 years ago

0.0.100

4 years ago

0.0.99

4 years ago

0.0.98

4 years ago

0.0.97

4 years ago

0.0.96

4 years ago

0.0.95

4 years ago

0.0.93

4 years ago

0.0.92

4 years ago

0.0.91

4 years ago

0.0.90

4 years ago

0.0.89

4 years ago

0.0.88

4 years ago

0.0.87

4 years ago

0.0.86

4 years ago

0.0.85

4 years ago

0.0.84

4 years ago

0.0.83

4 years ago

0.0.82

4 years ago

0.0.81

4 years ago

0.0.80

4 years ago

0.0.79

4 years ago

0.0.78

4 years ago

0.0.76

4 years ago

0.0.77

4 years ago

0.0.74

4 years ago

0.0.75

4 years ago

0.0.73

4 years ago

0.0.72

4 years ago

0.0.71

4 years ago

0.0.70

4 years ago

0.0.69

4 years ago

0.0.68

4 years ago

0.0.67

4 years ago

0.0.66

4 years ago

0.0.65

4 years ago

0.0.64

4 years ago

0.0.63

4 years ago

0.0.62

4 years ago

0.0.61

4 years ago

0.0.60

4 years ago

0.0.59

4 years ago

0.0.58

4 years ago

0.0.57

4 years ago

0.0.55

4 years ago

0.0.56

4 years ago

0.0.54

4 years ago

0.0.52

4 years ago

0.0.53

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.49

4 years ago

0.0.48

4 years ago

0.0.46

4 years ago

0.0.47

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.38

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago