2.1.0 • Published 5 months ago

@sikaeducation/ui v2.1.0

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
5 months ago

Sika UI

CI

Sika's UI library

Usage

npm i @sikaeducation/ui

Requires React and React DOM.

JS/TS:

// Import these once per app
import "@sikaeducation/ui/components.css"; // Static CSS styles for included components
import "@sikaeducation/ui/reset"; // App reset SCSS
import "@sikaeducation/ui/styles"; // SCSS style library

// Import these in any component
import { Markdown, Button, TextInput } from "@sikaeducation/ui"; // Component library

SCSS:

/* Use this in any component */
@use "@sikaeducation/ui/styles" as *;

button {
  padding: $sizes-s4;
  @include shadows-small;
}

SCSS Style Modules

  • @sikaeducation/reset: SCSS reset
  • @sikaeducation/styles: Base SCSS styles, including these namespaces:
    • sizes-*
    • colors-*
    • typography-*
    • shadows-*
    • borders-*
    • forms-*

Sika fonts are in /dist/fonts of the compiled package and should be copied into a public fonts directory on the client.

Component Library

  • @sikaeducation: The Sika component library
  • @sikaeducation/components.css: CSS for all components
  • @sikaeducation/types: TypeScript types for components

Documentation

Development

Requires npm i -D eslint prettier.

Scripts:

  • dev, d - Launch a local server on 6006
  • lint, l - Lint and fix
  • build - Build the component library and copy the static files
  • build:watch, bw - Continuously build (for npm linked projects)
  • build:storybook - Build static storybook site
  • test:ci - Run all tests statically
  • test, test:watch, tw - Run tests through Storybook (Server must be running)

Run npm link while inside this repo to create a global symlink for that folder. Run npm link @sikaeducation/stylelint-config in a client repo to link to locally installed version (this will be overwritten on the next npm install). Then run npm run build:watch in this repo to auto-build server for real-time style updates in clients.

Aliases:

  • @: ./src
  • $: ./style-library

Deployment

Set NPM_TOKEN on GitHub Actions to publish. Generate it on Sika's npm page then add it to the secrets page.

Set NETLIFY_SITE_ID and NETLIFY_AUTH_TOKEN on GitHub Actions to deploy to Netlify. Get these on the Netlify apps page and add them to the secrets page.

Publish updates by incrementing the version with npm version patch|minor|major and pushing.

Static documentation deploys to Netflify, library deploys to npm as @sikaeducation/ui.

2.1.0

5 months ago

2.0.5

5 months ago

2.0.4

5 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.1

6 months ago

1.3.2

6 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.2.8

7 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.0.0

7 months ago

0.17.0

7 months ago

0.16.4

7 months ago

0.16.3

7 months ago

0.16.2

7 months ago

0.15.13

7 months ago

0.15.11

7 months ago

0.15.12

7 months ago

0.15.10

7 months ago

0.15.9

7 months ago

0.15.8

7 months ago

0.15.7

7 months ago

0.15.6

7 months ago

0.15.5

7 months ago

0.15.4

7 months ago

0.15.3

7 months ago

0.15.2

7 months ago

0.15.1

7 months ago

0.15.0

7 months ago

0.14.3

7 months ago

0.14.0

7 months ago

0.13.20

7 months ago

0.13.19

7 months ago

0.13.17

7 months ago

0.13.16

7 months ago

0.13.13

7 months ago

0.13.12

7 months ago

0.13.11

7 months ago

0.13.10

7 months ago

0.13.9

7 months ago

0.13.8

7 months ago

0.13.7

7 months ago

0.13.6

7 months ago

0.13.5

7 months ago

0.13.4

7 months ago

0.13.3

7 months ago

0.13.2

7 months ago

0.13.1

7 months ago

0.12.12

7 months ago

0.12.10

7 months ago

0.12.9

7 months ago

0.12.7

8 months ago

0.12.6

8 months ago

0.12.5

8 months ago

0.11.0

8 months ago

0.10.0

8 months ago

0.9.5

8 months ago

0.9.4

8 months ago

0.9.3

8 months ago

0.8.0

9 months ago

0.7.46

9 months ago

0.7.43

9 months ago

0.7.42

9 months ago

0.7.41

9 months ago

0.7.40

9 months ago

0.7.38

9 months ago

0.7.35

9 months ago

0.7.32

9 months ago

0.7.31

9 months ago

0.7.30

9 months ago

0.7.29

9 months ago

0.7.22

9 months ago

0.7.21

9 months ago

0.7.20

9 months ago

0.7.17

9 months ago

0.7.15

9 months ago

0.7.14

9 months ago

0.7.13

9 months ago

0.7.10

9 months ago

0.7.12

9 months ago

0.7.9

9 months ago

0.7.8

9 months ago

0.7.5

9 months ago

0.7.4

9 months ago

0.7.3

9 months ago

0.7.2

9 months ago

0.7.1

9 months ago

0.7.0

9 months ago

0.6.0

9 months ago

0.5.2

9 months ago

0.5.1

9 months ago

0.4.3

9 months ago

0.4.2

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.3.17

9 months ago

0.3.16

9 months ago

0.3.15

9 months ago

0.3.14

9 months ago

0.3.12

9 months ago

0.3.11

9 months ago

0.3.10

9 months ago

0.3.9

9 months ago

0.3.8

9 months ago

0.3.7

9 months ago

0.3.5

9 months ago

0.3.4

9 months ago

0.3.3

9 months ago

0.3.2

9 months ago

0.3.1

9 months ago

0.3.0

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.22

10 months ago

0.1.18

10 months ago