@spaced-out/ui-design-system 0.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitlintrc.json +3 -0
- package/.cspell/custom-words.txt +22 -0
- package/.editorconfig +9 -0
- package/.eslintignore +1 -0
- package/.eslintrc.yml +122 -0
- package/.flowconfig +45 -0
- package/.github/workflows/pages.yml +52 -0
- package/.prettierrc +11 -0
- package/.storybook/SenseTheme.js +12 -0
- package/.storybook/main.js +73 -0
- package/.storybook/manager-head.html +41 -0
- package/.storybook/manager.js +14 -0
- package/.storybook/preview-head.html +130 -0
- package/.storybook/preview.js +128 -0
- package/.storybook/public/favicon.ico +0 -0
- package/.storybook/public/favicon.svg +6 -0
- package/.storybook/public/fonts/CentraNo2-Book.woff +0 -0
- package/.storybook/public/fonts/CentraNo2-Book.woff2 +0 -0
- package/.storybook/public/fonts/CentraNo2-BookItalic.woff +0 -0
- package/.storybook/public/fonts/CentraNo2-BookItalic.woff2 +0 -0
- package/.storybook/public/fonts/CentraNo2-Medium.woff +0 -0
- package/.storybook/public/fonts/CentraNo2-Medium.woff2 +0 -0
- package/.vscode/extensions.json +3 -0
- package/CHANGELOG.md +73 -0
- package/README.md +178 -0
- package/babel.config.js +24 -0
- package/config.js +58 -0
- package/cspell.json +26 -0
- package/design-tokens/border/app-border.json +41 -0
- package/design-tokens/border/base-border.json +41 -0
- package/design-tokens/color/app-color.json +226 -0
- package/design-tokens/color/base-color.json +265 -0
- package/design-tokens/elevation/app-elevation.json +22 -0
- package/design-tokens/elevation/base-elevation.json +19 -0
- package/design-tokens/font/base-font.json +98 -0
- package/design-tokens/index.js +5 -0
- package/design-tokens/motion/app.motion.json +24 -0
- package/design-tokens/motion/base-motion.json +40 -0
- package/design-tokens/opacity/base-opacity.json +49 -0
- package/design-tokens/shadow/base-shadow.json +86 -0
- package/design-tokens/size/base-size.json +94 -0
- package/design-tokens/space/app-space.json +40 -0
- package/design-tokens/space/base-space.json +40 -0
- package/flow-typed/npm/lodash_v4.x.x.js +6407 -0
- package/git-conventional-commits.json +43 -0
- package/gulpfile.js +48 -0
- package/jest.config.js +9 -0
- package/lib/assets/fontawesome/LICENSE.txt +18 -0
- package/lib/assets/fontawesome/css/all.min.css +27184 -0
- package/lib/assets/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- package/lib/assets/fontawesome/webfonts/fa-duotone-900.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-duotone-900.woff2 +0 -0
- package/lib/assets/fontawesome/webfonts/fa-light-300.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-light-300.woff2 +0 -0
- package/lib/assets/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- package/lib/assets/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- package/lib/assets/fontawesome/webfonts/fa-thin-100.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-thin-100.woff2 +0 -0
- package/lib/assets/fontawesome/webfonts/fa-v4compatibility.ttf +0 -0
- package/lib/assets/fontawesome/webfonts/fa-v4compatibility.woff2 +0 -0
- package/lib/components/Button/Button.js +120 -0
- package/lib/components/Button/Button.js.flow +166 -0
- package/lib/components/Button/Button.module.css +226 -0
- package/lib/components/Button/index.js +24 -0
- package/lib/components/Button/index.js.flow +4 -0
- package/lib/components/ButtonDropdown/ButtonDropdown.js +89 -0
- package/lib/components/ButtonDropdown/ButtonDropdown.js.flow +119 -0
- package/lib/components/ButtonDropdown/ButtonDropdown.module.css +4 -0
- package/lib/components/ButtonDropdown/index.js +12 -0
- package/lib/components/ButtonDropdown/index.js.flow +4 -0
- package/lib/components/Checkbox/Checkbox.js +99 -0
- package/lib/components/Checkbox/Checkbox.js.flow +133 -0
- package/lib/components/Checkbox/Checkbox.module.css +160 -0
- package/lib/components/Checkbox/CheckboxGroup.js +85 -0
- package/lib/components/Checkbox/CheckboxGroup.js.flow +105 -0
- package/lib/components/Checkbox/CheckboxGroup.module.css +47 -0
- package/lib/components/Checkbox/index.js +19 -0
- package/lib/components/Checkbox/index.js.flow +3 -0
- package/lib/components/CircularLoader/CircularLoader.js +44 -0
- package/lib/components/CircularLoader/CircularLoader.js.flow +44 -0
- package/lib/components/CircularLoader/CircularLoader.module.css +81 -0
- package/lib/components/CircularLoader/index.js +12 -0
- package/lib/components/CircularLoader/index.js.flow +3 -0
- package/lib/components/CodeBlock.js +26 -0
- package/lib/components/CodeBlock.js.flow +19 -0
- package/lib/components/Dialog/Dialog.js +148 -0
- package/lib/components/Dialog/Dialog.js.flow +165 -0
- package/lib/components/Dialog/Dialog.module.css +87 -0
- package/lib/components/Dialog/index.js +36 -0
- package/lib/components/Dialog/index.js.flow +14 -0
- package/lib/components/Dropdown/Dropdown.js +108 -0
- package/lib/components/Dropdown/Dropdown.js.flow +129 -0
- package/lib/components/Dropdown/Dropdown.module.css +14 -0
- package/lib/components/Dropdown/index.js +18 -0
- package/lib/components/Dropdown/index.js.flow +4 -0
- package/lib/components/Grid/Grid.js +82 -0
- package/lib/components/Grid/Grid.js.flow +88 -0
- package/lib/components/Grid/Grid.module.css +30 -0
- package/lib/components/Grid/index.js +16 -0
- package/lib/components/Grid/index.js.flow +3 -0
- package/lib/components/Icon/ClickableIcon.js +51 -0
- package/lib/components/Icon/ClickableIcon.js.flow +51 -0
- package/lib/components/Icon/ClickableIcon.module.css +50 -0
- package/lib/components/Icon/FontAwesomeLibrary.js +3 -0
- package/lib/components/Icon/FontAwesomeLibrary.js.flow +3 -0
- package/lib/components/Icon/Icon.js +38 -0
- package/lib/components/Icon/Icon.js.flow +51 -0
- package/lib/components/Icon/index.js +25 -0
- package/lib/components/Icon/index.js.flow +6 -0
- package/lib/components/InContextAlert/InContextAlert.js +121 -0
- package/lib/components/InContextAlert/InContextAlert.js.flow +173 -0
- package/lib/components/InContextAlert/InContextAlert.module.css +54 -0
- package/lib/components/InContextAlert/index.js +18 -0
- package/lib/components/InContextAlert/index.js.flow +3 -0
- package/lib/components/Input/Input.js +172 -0
- package/lib/components/Input/Input.js.flow +246 -0
- package/lib/components/Input/Input.module.css +122 -0
- package/lib/components/Input/index.js +12 -0
- package/lib/components/Input/index.js.flow +4 -0
- package/lib/components/LinearLoader/LinearLoader.js +35 -0
- package/lib/components/LinearLoader/LinearLoader.js.flow +34 -0
- package/lib/components/LinearLoader/LinearLoader.module.css +43 -0
- package/lib/components/LinearLoader/index.js +12 -0
- package/lib/components/LinearLoader/index.js.flow +3 -0
- package/lib/components/Menu/Menu.js +76 -0
- package/lib/components/Menu/Menu.js.flow +85 -0
- package/lib/components/Menu/Menu.module.css +124 -0
- package/lib/components/Menu/index.js +12 -0
- package/lib/components/Menu/index.js.flow +4 -0
- package/lib/components/Modal/Modal.js +121 -0
- package/lib/components/Modal/Modal.js.flow +157 -0
- package/lib/components/Modal/Modal.module.css +62 -0
- package/lib/components/Modal/index.js +12 -0
- package/lib/components/Modal/index.js.flow +3 -0
- package/lib/components/Notification/Notification.js +89 -0
- package/lib/components/Notification/Notification.js.flow +136 -0
- package/lib/components/Notification/Notification.module.css +54 -0
- package/lib/components/Notification/index.js +18 -0
- package/lib/components/Notification/index.js.flow +3 -0
- package/lib/components/Panel/Panel.js +96 -0
- package/lib/components/Panel/Panel.js.flow +109 -0
- package/lib/components/Panel/Panel.module.css +77 -0
- package/lib/components/Panel/index.js +30 -0
- package/lib/components/Panel/index.js.flow +10 -0
- package/lib/components/RadioButton/RadioButton.js +76 -0
- package/lib/components/RadioButton/RadioButton.js.flow +102 -0
- package/lib/components/RadioButton/RadioButton.module.css +122 -0
- package/lib/components/RadioButton/RadioGroup.js +60 -0
- package/lib/components/RadioButton/RadioGroup.js.flow +85 -0
- package/lib/components/RadioButton/RadioGroup.module.css +47 -0
- package/lib/components/RadioButton/index.js +19 -0
- package/lib/components/RadioButton/index.js.flow +3 -0
- package/lib/components/SearchInput/SearchInput.js +47 -0
- package/lib/components/SearchInput/SearchInput.js.flow +73 -0
- package/lib/components/SearchInput/SearchInput.module.css +11 -0
- package/lib/components/SearchInput/index.js +12 -0
- package/lib/components/SearchInput/index.js.flow +4 -0
- package/lib/components/Text/Text.js +195 -0
- package/lib/components/Text/Text.js.flow +160 -0
- package/lib/components/Text/index.js +103 -0
- package/lib/components/Text/index.js.flow +21 -0
- package/lib/components/Textarea/Textarea.js +95 -0
- package/lib/components/Textarea/Textarea.js.flow +133 -0
- package/lib/components/Textarea/Textarea.module.css +110 -0
- package/lib/components/Textarea/index.js +12 -0
- package/lib/components/Textarea/index.js.flow +4 -0
- package/lib/components/Toast/Toast.js +187 -0
- package/lib/components/Toast/Toast.js.flow +210 -0
- package/lib/components/Toast/Toast.module.css +52 -0
- package/lib/components/Toast/ToastContainer.js +129 -0
- package/lib/components/Toast/ToastContainer.js.flow +125 -0
- package/lib/components/Toast/ToastContainer.module.css +41 -0
- package/lib/components/Toast/ToastManager.js +62 -0
- package/lib/components/Toast/ToastManager.js.flow +67 -0
- package/lib/components/Toast/index.js +56 -0
- package/lib/components/Toast/index.js.flow +12 -0
- package/lib/components/Toggle/Toggle.js +69 -0
- package/lib/components/Toggle/Toggle.js.flow +94 -0
- package/lib/components/Toggle/Toggle.module.css +144 -0
- package/lib/components/Toggle/index.js +12 -0
- package/lib/components/Toggle/index.js.flow +2 -0
- package/lib/components/Tooltip/Tooltip.js +81 -0
- package/lib/components/Tooltip/Tooltip.js.flow +110 -0
- package/lib/components/Tooltip/Tooltip.module.css +16 -0
- package/lib/components/Tooltip/index.js +12 -0
- package/lib/components/Tooltip/index.js.flow +4 -0
- package/lib/components/Truncate/Truncate.js +28 -0
- package/lib/components/Truncate/Truncate.js.flow +22 -0
- package/lib/components/Truncate/Truncate.module.css +6 -0
- package/lib/components/Truncate/index.js +12 -0
- package/lib/components/Truncate/index.js.flow +4 -0
- package/lib/components/Typeahead/Typeahead.js +124 -0
- package/lib/components/Typeahead/Typeahead.js.flow +153 -0
- package/lib/components/Typeahead/Typeahead.module.css +10 -0
- package/lib/components/Typeahead/index.js +12 -0
- package/lib/components/Typeahead/index.js.flow +4 -0
- package/lib/hooks/index.js +27 -0
- package/lib/hooks/index.js.flow +4 -0
- package/lib/hooks/useMountTransition.js +25 -0
- package/lib/hooks/useMountTransition.js.flow +27 -0
- package/lib/hooks/useToastPortal.js +32 -0
- package/lib/hooks/useToastPortal.js.flow +30 -0
- package/lib/styles/animation.module.css +9 -0
- package/lib/styles/border.module.css +27 -0
- package/lib/styles/shadow.module.css +42 -0
- package/lib/styles/typography.module.css +227 -0
- package/lib/styles/variables/_border.css +21 -0
- package/lib/styles/variables/_border.js +29 -0
- package/lib/styles/variables/_border.js.flow +23 -0
- package/lib/styles/variables/_color.css +131 -0
- package/lib/styles/variables/_color.js +139 -0
- package/lib/styles/variables/_color.js.flow +133 -0
- package/lib/styles/variables/_elevation.css +11 -0
- package/lib/styles/variables/_elevation.js +19 -0
- package/lib/styles/variables/_elevation.js.flow +13 -0
- package/lib/styles/variables/_font.css +51 -0
- package/lib/styles/variables/_font.js +59 -0
- package/lib/styles/variables/_font.js.flow +53 -0
- package/lib/styles/variables/_motion.css +11 -0
- package/lib/styles/variables/_motion.js +19 -0
- package/lib/styles/variables/_motion.js.flow +13 -0
- package/lib/styles/variables/_opacity.css +29 -0
- package/lib/styles/variables/_opacity.js +37 -0
- package/lib/styles/variables/_opacity.js.flow +31 -0
- package/lib/styles/variables/_shadow.css +47 -0
- package/lib/styles/variables/_shadow.js +55 -0
- package/lib/styles/variables/_shadow.js.flow +49 -0
- package/lib/styles/variables/_size.css +59 -0
- package/lib/styles/variables/_size.js +67 -0
- package/lib/styles/variables/_size.js.flow +61 -0
- package/lib/styles/variables/_space.css +23 -0
- package/lib/styles/variables/_space.js +31 -0
- package/lib/styles/variables/_space.js.flow +25 -0
- package/lib/types/common.js +1 -0
- package/lib/types/common.js.flow +3 -0
- package/lib/types/toast.js +24 -0
- package/lib/types/toast.js.flow +41 -0
- package/lib/types/typography.js +22 -0
- package/lib/types/typography.js.flow +18 -0
- package/lib/utils/classify.js +33 -0
- package/lib/utils/classify.js.flow +29 -0
- package/lib/utils/click-away.js +110 -0
- package/lib/utils/click-away.js.flow +134 -0
- package/lib/utils/dom.js +202 -0
- package/lib/utils/dom.js.flow +238 -0
- package/lib/utils/helpers.js +16 -0
- package/lib/utils/helpers.js.flow +11 -0
- package/lib/utils/makeClassNameComponent.js +58 -0
- package/lib/utils/makeClassNameComponent.js.flow +71 -0
- package/lib/utils/merge-refs.js +17 -0
- package/lib/utils/merge-refs.js.flow +14 -0
- package/lint-staged.config.js +5 -0
- package/package.json +114 -0
- package/postcss.config.js +3 -0
- package/pull_request_template.md +48 -0
- package/settings.json +3 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [0.0.1-alpha.0](https://github.com/Spaced-Out/ui-design-system/compare/v0.0.0...v0.0.1-alpha.0) (2022-11-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* action and enter press ([359e652](https://github.com/Spaced-Out/ui-design-system/commit/359e65243e68885c43bb8fe9cf58ba34c8ab2998))
|
|
11
|
+
* added Commitlint ([017a1ad](https://github.com/Spaced-Out/ui-design-system/commit/017a1adfd4a78ff1d41f55b697f73d68395f8954))
|
|
12
|
+
* added font-awesome css ([8adad02](https://github.com/Spaced-Out/ui-design-system/commit/8adad023b27394196c9db1b43963eb9e6a26ce16))
|
|
13
|
+
* Added standard version ([29ee01c](https://github.com/Spaced-Out/ui-design-system/commit/29ee01c795d84ba86f50b63d1927f00d91585735))
|
|
14
|
+
* added tokens and used css vars ([12f5767](https://github.com/Spaced-Out/ui-design-system/commit/12f5767a4d1088dab09981da04e174a900ceacc1))
|
|
15
|
+
* **checkbox:** [GDS-34] Checkbox and checkbox group ([#12](https://github.com/Spaced-Out/ui-design-system/issues/12)) ([5c4604a](https://github.com/Spaced-Out/ui-design-system/commit/5c4604a5585ee31ce5200fef8cac0ea4548c4848))
|
|
16
|
+
* **docs:** [GDS-113] docs for form components and grid ([#32](https://github.com/Spaced-Out/ui-design-system/issues/32)) ([2337fd1](https://github.com/Spaced-Out/ui-design-system/commit/2337fd13a08f1a6754a25c382eab89bfe55768b7))
|
|
17
|
+
* **docs:** tokens doc ([#33](https://github.com/Spaced-Out/ui-design-system/issues/33)) ([7df345c](https://github.com/Spaced-Out/ui-design-system/commit/7df345c64690940730d36d15c92a880c61508a30))
|
|
18
|
+
* dropdown component ([#19](https://github.com/Spaced-Out/ui-design-system/issues/19)) ([8c8cf59](https://github.com/Spaced-Out/ui-design-system/commit/8c8cf59363034a568d45e7b98eaf8962462f82e0))
|
|
19
|
+
* error case for radio and group ([88afa2b](https://github.com/Spaced-Out/ui-design-system/commit/88afa2b4750a62521ef6319ee3bf8d5711354663))
|
|
20
|
+
* **grid:** [GDS-26] grid row and col + Import order lint rule ([#26](https://github.com/Spaced-Out/ui-design-system/issues/26)) ([02b988e](https://github.com/Spaced-Out/ui-design-system/commit/02b988e0f85de6a42022729c65cda09ade02cedb))
|
|
21
|
+
* icon Menu ([#9](https://github.com/Spaced-Out/ui-design-system/issues/9)) ([6819536](https://github.com/Spaced-Out/ui-design-system/commit/68195362130e7cb587a7316611575baed2244dd2))
|
|
22
|
+
* **icon:** added default values ([#5](https://github.com/Spaced-Out/ui-design-system/issues/5)) ([b4a4401](https://github.com/Spaced-Out/ui-design-system/commit/b4a440122b7f975cde3ed24ca984204832dac71a))
|
|
23
|
+
* **icon:** iconName prop changed to name ([#10](https://github.com/Spaced-Out/ui-design-system/issues/10)) ([42dc229](https://github.com/Spaced-Out/ui-design-system/commit/42dc22940b7a585a1245a9d75fde54c51a3cd329))
|
|
24
|
+
* **InContextAlert:** [GDS-58] In-Context Alert and Truncate component ([#27](https://github.com/Spaced-Out/ui-design-system/issues/27)) ([bd9827c](https://github.com/Spaced-Out/ui-design-system/commit/bd9827c093dc39ae76f2dd5d59a11feda5ea9d20))
|
|
25
|
+
* input component ([#15](https://github.com/Spaced-Out/ui-design-system/issues/15)) ([c78842e](https://github.com/Spaced-Out/ui-design-system/commit/c78842e5ce73613fac4eb3cc9f290537c5573e90))
|
|
26
|
+
* **loader:** [GDS-78] linear loader and circular loader ([#21](https://github.com/Spaced-Out/ui-design-system/issues/21)) ([44fe9dc](https://github.com/Spaced-Out/ui-design-system/commit/44fe9dc76920b7c6eadf70ee320fa2a08121e8c1))
|
|
27
|
+
* master merged ([6927f37](https://github.com/Spaced-Out/ui-design-system/commit/6927f372106250474fe3b660783dfd633767fc8d))
|
|
28
|
+
* notification and semantic color changes ([#30](https://github.com/Spaced-Out/ui-design-system/issues/30)) ([1dd6814](https://github.com/Spaced-Out/ui-design-system/commit/1dd68143deccbc401caad44e989de8981bef6686))
|
|
29
|
+
* radio group ([adae899](https://github.com/Spaced-Out/ui-design-system/commit/adae899d567463bacd7ad1857b0e25b596acec16))
|
|
30
|
+
* **RadioButton:** radio button component and story done ([cb0f64e](https://github.com/Spaced-Out/ui-design-system/commit/cb0f64e95c35ec22d8f7e438a788aa228d31c253))
|
|
31
|
+
* search component ([#20](https://github.com/Spaced-Out/ui-design-system/issues/20)) ([39c6560](https://github.com/Spaced-Out/ui-design-system/commit/39c65606508682a5aa448915295d7b7b99ace8c4))
|
|
32
|
+
* storybook test ([#14](https://github.com/Spaced-Out/ui-design-system/issues/14)) ([08feede](https://github.com/Spaced-Out/ui-design-system/commit/08feede4f43b9cac046e49a5fff6f6929aab03c9))
|
|
33
|
+
* **storybook:** [GDS-54] build and publish storybook to Github Pages ([#13](https://github.com/Spaced-Out/ui-design-system/issues/13)) ([93a4072](https://github.com/Spaced-Out/ui-design-system/commit/93a4072255f08ffd164b6076dd7f9edccf1a73ea))
|
|
34
|
+
* textarea component ([#16](https://github.com/Spaced-Out/ui-design-system/issues/16)) ([d4f2d43](https://github.com/Spaced-Out/ui-design-system/commit/d4f2d434f54983adaad3686da869357f9a45c69a))
|
|
35
|
+
* **toast:** [GDS-37] Toast and toast portal ([#29](https://github.com/Spaced-Out/ui-design-system/issues/29)) ([91e938b](https://github.com/Spaced-Out/ui-design-system/commit/91e938b9aa68845f5e806852dafd3d23260ddb8d))
|
|
36
|
+
* **toggle:** [GDS-35] toggle component ([#18](https://github.com/Spaced-Out/ui-design-system/issues/18)) ([8434d96](https://github.com/Spaced-Out/ui-design-system/commit/8434d96142f8f1cad1d04d2b8b82784c5c5c4522))
|
|
37
|
+
* tooltip and token stories ([#25](https://github.com/Spaced-Out/ui-design-system/issues/25)) ([8152db7](https://github.com/Spaced-Out/ui-design-system/commit/8152db76f6f284b0e8ad6acf70fea4f68993af07))
|
|
38
|
+
* truncate type export ([#28](https://github.com/Spaced-Out/ui-design-system/issues/28)) ([9b6ff39](https://github.com/Spaced-Out/ui-design-system/commit/9b6ff39b7c648f083c2e0c4a9c50cc76928a4ebe))
|
|
39
|
+
* typeahead component ([#23](https://github.com/Spaced-Out/ui-design-system/issues/23)) ([d7693bb](https://github.com/Spaced-Out/ui-design-system/commit/d7693bb832cb24e6eb01dbc109d4d2afb1b3d2e9))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* added changelog in cspell ignore paths ([723f0d4](https://github.com/Spaced-Out/ui-design-system/commit/723f0d4c874c6558f96a5d78e464d3099e90c30d))
|
|
45
|
+
* added chromatic ([1685380](https://github.com/Spaced-Out/ui-design-system/commit/16853800d7e7ce8610f94b937a4e61bc26537018))
|
|
46
|
+
* added dislog ([e2967c1](https://github.com/Spaced-Out/ui-design-system/commit/e2967c1cf58778e1d6b492f5db9c4be9aaa0d0fc))
|
|
47
|
+
* added Elevation stories ([f0d5a0d](https://github.com/Spaced-Out/ui-design-system/commit/f0d5a0d2723ab60abaeb9a7dc33b7fe4d1f9695e))
|
|
48
|
+
* Added introduction page ([36eb7fd](https://github.com/Spaced-Out/ui-design-system/commit/36eb7fd4006c1a4ed7e0a440b9b1ef6216e09a7c))
|
|
49
|
+
* added more stories ([234b4c9](https://github.com/Spaced-Out/ui-design-system/commit/234b4c95df349db07864a20c10e632c4388cba48))
|
|
50
|
+
* added more text colors ([3ff7117](https://github.com/Spaced-Out/ui-design-system/commit/3ff7117bc0d9f1948765b1af1022a355a3cdbf7f))
|
|
51
|
+
* added spell check ([1fa6f08](https://github.com/Spaced-Out/ui-design-system/commit/1fa6f0890f17ff288d66abcf63e7480ac5fd1730))
|
|
52
|
+
* added spellcheck for storybook ([0c29edd](https://github.com/Spaced-Out/ui-design-system/commit/0c29edd6ca0f54e23bcafb79556b1af0bb486896))
|
|
53
|
+
* added standard version ([5146c63](https://github.com/Spaced-Out/ui-design-system/commit/5146c632fcc7cb499697b0968d4b8a0e51594fec))
|
|
54
|
+
* added test suite ([7676ca7](https://github.com/Spaced-Out/ui-design-system/commit/7676ca7c81efc942b8cbab4bead1fcf0bbdd715c))
|
|
55
|
+
* added text counter for input ([#17](https://github.com/Spaced-Out/ui-design-system/issues/17)) ([09544d2](https://github.com/Spaced-Out/ui-design-system/commit/09544d212547c6574a39b762345fc2eb0eaddf11))
|
|
56
|
+
* added yarn lock ([4052517](https://github.com/Spaced-Out/ui-design-system/commit/405251755d70d140c28fffbd138b2744f7ccb0cd))
|
|
57
|
+
* backdrop fix ([e680a6a](https://github.com/Spaced-Out/ui-design-system/commit/e680a6ae18e598196fd3e5518294ea1e2fba2ccc))
|
|
58
|
+
* color fix for panel ([5b9a9be](https://github.com/Spaced-Out/ui-design-system/commit/5b9a9be55d416129262f3f71a8fb805cbcfb288d))
|
|
59
|
+
* Deleted publish script ([a11cb77](https://github.com/Spaced-Out/ui-design-system/commit/a11cb77cf9b93e248187ca9e6b2eccd73de1aecd))
|
|
60
|
+
* design comments ([9718754](https://github.com/Spaced-Out/ui-design-system/commit/9718754b9a9293d5523f70bdc700e50503589866))
|
|
61
|
+
* design qa fixes ([052058b](https://github.com/Spaced-Out/ui-design-system/commit/052058baf72206f2c04e551f8d1e538c74bb571e))
|
|
62
|
+
* docs fix ([b001ed9](https://github.com/Spaced-Out/ui-design-system/commit/b001ed9613a2e5cd93dde72e81f4112114e30eff))
|
|
63
|
+
* Fixed indentation for Design Tokens ([417934b](https://github.com/Spaced-Out/ui-design-system/commit/417934b5105a4377449870d95152392068fa49d8))
|
|
64
|
+
* **icon:** icon center align ([#6](https://github.com/Spaced-Out/ui-design-system/issues/6)) ([f22ce7d](https://github.com/Spaced-Out/ui-design-system/commit/f22ce7d9eda9dfeaad7b15afd19c19f5e52a4d7e))
|
|
65
|
+
* linear loader fluid width ([#24](https://github.com/Spaced-Out/ui-design-system/issues/24)) ([e943d5f](https://github.com/Spaced-Out/ui-design-system/commit/e943d5fcd56a3bf9a4edaf29ed624c8bce931fb1))
|
|
66
|
+
* modal arch init ([71d8ce1](https://github.com/Spaced-Out/ui-design-system/commit/71d8ce1c42697cf3a3ba039d826db6fb672b5074))
|
|
67
|
+
* panel footer fixes ([11be4d9](https://github.com/Spaced-Out/ui-design-system/commit/11be4d99f11fec1acb67fffebcb59ea128593530))
|
|
68
|
+
* panel init ([5438d93](https://github.com/Spaced-Out/ui-design-system/commit/5438d9340f5796d5cc64902321ef9ee020738400))
|
|
69
|
+
* renamed folder ([931f139](https://github.com/Spaced-Out/ui-design-system/commit/931f13928337cda26db94d21bb5c15c0e57669a6))
|
|
70
|
+
* Selected option fix ([fac75f7](https://github.com/Spaced-Out/ui-design-system/commit/fac75f75588919903d85cfbe4f8df63f8826cb95))
|
|
71
|
+
* spell checks everywhere ([f81b8d4](https://github.com/Spaced-Out/ui-design-system/commit/f81b8d4cdbe7eccdb8b9a626edf057f66cdfe3b4))
|
|
72
|
+
* storybook upgrade ([78f0d84](https://github.com/Spaced-Out/ui-design-system/commit/78f0d84fd3ed73c0424f86c10c6b9100fbe7e18b))
|
|
73
|
+
* tooltip fixes ([b8b0bd0](https://github.com/Spaced-Out/ui-design-system/commit/b8b0bd0514af32c4f31dab1dbea99e70d221d5b5))
|
package/README.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Sense UI Component Library
|
|
2
|
+
|
|
3
|
+
This Genesis design system is created using:
|
|
4
|
+
|
|
5
|
+
- [Gulp](https://gulpjs.com/)
|
|
6
|
+
- [CSS Modules](https://github.com/css-modules/css-modules)
|
|
7
|
+
- [React](https://reactjs.org/)
|
|
8
|
+
|
|
9
|
+
It also features:
|
|
10
|
+
|
|
11
|
+
- [Style-Dictionary](https://www.style-dictionary-play.dev/) to help you create and style variables
|
|
12
|
+
- [Storybook](https://storybook.js.org/) to help you create and show off your components
|
|
13
|
+
- [Standard Version](https://github.com/conventional-changelog/standard-version) to manage changelog across releases
|
|
14
|
+
|
|
15
|
+
### Commits
|
|
16
|
+
|
|
17
|
+
Each commit should follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) guidelines
|
|
18
|
+
|
|
19
|
+
Most commonly used commit prefixes:
|
|
20
|
+
|
|
21
|
+
`fix:` a commit of the type fix patches a bug in your codebase (this correlates with [PATCH](https://semver.org/#summary) in Semantic Versioning)
|
|
22
|
+
|
|
23
|
+
`feat:` a commit of the type feat introduces a new feature to the codebase (this correlates with [MINOR](https://semver.org/#summary) in Semantic Versioning)
|
|
24
|
+
|
|
25
|
+
`refactor:` Commits, that rewrite/restructure your code, however does not change any behavior
|
|
26
|
+
|
|
27
|
+
`style:` Commits, that do not affect the meaning (white-space, formatting, missing semi-colons, etc)
|
|
28
|
+
|
|
29
|
+
`docs:` Commits, that affect documentation only
|
|
30
|
+
|
|
31
|
+
`build:` Commits, that affect build components like build tool, ci pipeline, dependencies, project version, etc.
|
|
32
|
+
|
|
33
|
+
### Building
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
yarn build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To Build the style variables using style-dictionary run
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
yarn build:style-variables
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
It would put all the style variables created inside the styles folder. Our yarn build hook would essentially copy these variables to the build output target.
|
|
46
|
+
|
|
47
|
+
### Storybook
|
|
48
|
+
|
|
49
|
+
To run a live-reload Storybook server on your local machine:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
yarn storybook
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
To export your Storybook as static files:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
yarn storybook:export
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
After merging PR in master, storybook gets updated at https://spaced-out.github.io/ui-design-system/
|
|
62
|
+
|
|
63
|
+
### Generating New Components
|
|
64
|
+
|
|
65
|
+
We've included a handy NodeJS util file under `scripts` called `create-component.js`. Instead of copy pasting components to create a new component, you can instead run this command to generate all the files you need to start building out a new component. To use it:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
yarn generate YourComponentName
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This will generate:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/src
|
|
75
|
+
/components
|
|
76
|
+
/YourComponentName
|
|
77
|
+
YourComponentName.jsx
|
|
78
|
+
YourComponentName.stories.jsx
|
|
79
|
+
YourComponentName.module.css
|
|
80
|
+
YourComponentName.stories.module.css
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The default templates for each file can be modified under `scripts/templates`.
|
|
84
|
+
|
|
85
|
+
### Installing Sense UI Component Library in ui_server Locally
|
|
86
|
+
|
|
87
|
+
In the `ui_design_system` directory's run:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
yarn build
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
In the `consumer's` directory's run:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
yarn add @spaced-out/ui-design-system@file:../../ui-design-system
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This would copy the design system package to node modules locally and create an entry in the `consumer's` package.json
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
...
|
|
103
|
+
"dependencies": {
|
|
104
|
+
...
|
|
105
|
+
"@spaced-out/ui-design-system": "file:../../ui_design_system",
|
|
106
|
+
...
|
|
107
|
+
},
|
|
108
|
+
...
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
which will install the local component library as a dependency in `consumer`.
|
|
112
|
+
|
|
113
|
+
For every change in `ui_design_system` that you want to propagate to `consumer` run:
|
|
114
|
+
|
|
115
|
+
in `ui_design_system`
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
yarn build
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
in `consumer`
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
yarn upgrade @spaced-out/ui-design-system@file:../../ui-design-system
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Publishing
|
|
128
|
+
|
|
129
|
+
### Hosting via NPM
|
|
130
|
+
|
|
131
|
+
First, make sure you have an NPM account and are [logged into NPM using the `npm login` command.](https://docs.npmjs.com/creating-a-new-npm-user-account)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
yarn prepublishOnly
|
|
135
|
+
yarn publish
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Usage
|
|
139
|
+
|
|
140
|
+
Let's say you created a public NPM package called `@spaced-out/ui-design-system` with the `Button` component created in this repository.
|
|
141
|
+
|
|
142
|
+
Usage of the component (after the library installed as a dependency into another project) will be:
|
|
143
|
+
|
|
144
|
+
```JSX
|
|
145
|
+
import React from "react";
|
|
146
|
+
import { Button } from "@spaced-out/ui-design-system/lib/components/Button";
|
|
147
|
+
|
|
148
|
+
const App = () => (
|
|
149
|
+
<div className="app-container">
|
|
150
|
+
<h1>Hello I'm consuming the component library</h1>
|
|
151
|
+
<Button>Hello world</Button>
|
|
152
|
+
</div>
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
export default App;
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Using Component Library Design Tokens
|
|
159
|
+
|
|
160
|
+
Design tokens are exported `.css` and `.js`. You can consume them easily by
|
|
161
|
+
|
|
162
|
+
CSS use:
|
|
163
|
+
|
|
164
|
+
```CSS
|
|
165
|
+
@value (size2) from '@spaced-out/ui-design-system/lib/styles/variables/_size.css';
|
|
166
|
+
|
|
167
|
+
.example-container {
|
|
168
|
+
height: size2
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
JS use:
|
|
173
|
+
|
|
174
|
+
```JSX
|
|
175
|
+
import size2 from "@spaced-out/ui-design-system/lib/styles/variables/_size.js";
|
|
176
|
+
import * as SIZES from "@spaced-out/ui-design-system/lib/styles/variables/_size.js";
|
|
177
|
+
|
|
178
|
+
```
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: [
|
|
3
|
+
[
|
|
4
|
+
'@babel/preset-env',
|
|
5
|
+
{
|
|
6
|
+
targets: [
|
|
7
|
+
'last 2 Chrome versions',
|
|
8
|
+
'last 2 Safari versions',
|
|
9
|
+
'last 2 Firefox versions',
|
|
10
|
+
'last 2 Edge versions',
|
|
11
|
+
'last 3 iOS Major versions',
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
'@babel/preset-react',
|
|
17
|
+
{
|
|
18
|
+
runtime: 'automatic',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
'@babel/preset-flow',
|
|
22
|
+
],
|
|
23
|
+
plugins: ['macros'],
|
|
24
|
+
};
|
package/config.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const StyleDictionary = require('style-dictionary');
|
|
2
|
+
const tokens = require('./design-tokens');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const customCssFormat = ({dictionary, file}) =>
|
|
6
|
+
`${dictionary.allTokens
|
|
7
|
+
.map((token) => `@value ${token.name}: ${token.value};\n`)
|
|
8
|
+
.join(`\n`)}`;
|
|
9
|
+
|
|
10
|
+
const customJsFormat = ({dictionary, file}) =>
|
|
11
|
+
`${dictionary.allTokens
|
|
12
|
+
.map((token, idx) => {
|
|
13
|
+
let str = `export const ${token.name} = '${token.value}';\n`;
|
|
14
|
+
if (!idx) {
|
|
15
|
+
const addStr = `// @flow strict\n\n`;
|
|
16
|
+
str = addStr + str;
|
|
17
|
+
}
|
|
18
|
+
return str;
|
|
19
|
+
})
|
|
20
|
+
.join(`\n`)}`;
|
|
21
|
+
|
|
22
|
+
module.exports = {
|
|
23
|
+
source: ['design-tokens/**/*.json'],
|
|
24
|
+
format: {
|
|
25
|
+
customCssFormat,
|
|
26
|
+
customJsFormat,
|
|
27
|
+
},
|
|
28
|
+
platforms: {
|
|
29
|
+
// Web output in css partialformat
|
|
30
|
+
'css/category': {
|
|
31
|
+
transforms: ['attribute/cti', 'name/cti/camel'],
|
|
32
|
+
buildPath: `src/styles/variables/`,
|
|
33
|
+
files: tokens.map((tokenCategory) => ({
|
|
34
|
+
destination: `_${tokenCategory}.css`,
|
|
35
|
+
format: `customCssFormat`,
|
|
36
|
+
filter: {
|
|
37
|
+
attributes: {
|
|
38
|
+
category: tokenCategory,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
})),
|
|
42
|
+
},
|
|
43
|
+
js: {
|
|
44
|
+
transforms: ['attribute/cti', 'name/cti/camel'],
|
|
45
|
+
transformGroup: 'js',
|
|
46
|
+
buildPath: `src/styles/variables/`,
|
|
47
|
+
files: tokens.map((tokenCategory) => ({
|
|
48
|
+
destination: `_${tokenCategory}.js`,
|
|
49
|
+
format: `customJsFormat`,
|
|
50
|
+
filter: {
|
|
51
|
+
attributes: {
|
|
52
|
+
category: tokenCategory,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
})),
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
package/cspell.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ignorePaths": [
|
|
3
|
+
"node_modules",
|
|
4
|
+
"src/assets",
|
|
5
|
+
"flow-typed",
|
|
6
|
+
"lib",
|
|
7
|
+
"storybook-static",
|
|
8
|
+
".vscode",
|
|
9
|
+
"CHANGELOG.md"
|
|
10
|
+
],
|
|
11
|
+
// Enable your dictionary by adding it to the list of `dictionaries`
|
|
12
|
+
"dictionaries": ["custom-words"],
|
|
13
|
+
|
|
14
|
+
// Tell CSpell about your dictionary
|
|
15
|
+
"dictionaryDefinitions": [
|
|
16
|
+
{
|
|
17
|
+
// The name of the dictionary is used to look it up.
|
|
18
|
+
"name": "custom-words",
|
|
19
|
+
// Path to the custom word file. Relative to this `cspell.json` file.
|
|
20
|
+
"path": "./.cspell/custom-words.txt",
|
|
21
|
+
// Some editor extensions will use `addWords` for adding words to your
|
|
22
|
+
// personal dictionary.
|
|
23
|
+
"addWords": true
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"border": {
|
|
3
|
+
"width": {
|
|
4
|
+
"none": {
|
|
5
|
+
"value": "{baseBorder.width.0.value}"
|
|
6
|
+
},
|
|
7
|
+
"primary": {
|
|
8
|
+
"value": "{baseBorder.width.1.value}"
|
|
9
|
+
},
|
|
10
|
+
"secondary": {
|
|
11
|
+
"value": "{baseBorder.width.1_5.value}"
|
|
12
|
+
},
|
|
13
|
+
"tertiary": {
|
|
14
|
+
"value": "{baseBorder.width.2.value}"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"radius": {
|
|
18
|
+
"none": {
|
|
19
|
+
"value": "{baseBorder.radius.0.value}"
|
|
20
|
+
},
|
|
21
|
+
"x-small": {
|
|
22
|
+
"value": "{baseBorder.radius.4.value}"
|
|
23
|
+
},
|
|
24
|
+
"radio-button": {
|
|
25
|
+
"value": "{baseBorder.radius.6.value}"
|
|
26
|
+
},
|
|
27
|
+
"small": {
|
|
28
|
+
"value": "{baseBorder.radius.8.value}"
|
|
29
|
+
},
|
|
30
|
+
"medium": {
|
|
31
|
+
"value": "{baseBorder.radius.12.value}"
|
|
32
|
+
},
|
|
33
|
+
"large": {
|
|
34
|
+
"value": "{baseBorder.radius.20.value}"
|
|
35
|
+
},
|
|
36
|
+
"circle": {
|
|
37
|
+
"value": "{baseBorder.radius.50%.value}"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"baseBorder": {
|
|
3
|
+
"radius": {
|
|
4
|
+
"0": {
|
|
5
|
+
"value": "0px"
|
|
6
|
+
},
|
|
7
|
+
"4": {
|
|
8
|
+
"value": "4px"
|
|
9
|
+
},
|
|
10
|
+
"6": {
|
|
11
|
+
"value": "6px"
|
|
12
|
+
},
|
|
13
|
+
"8": {
|
|
14
|
+
"value": "8px"
|
|
15
|
+
},
|
|
16
|
+
"12": {
|
|
17
|
+
"value": "12px"
|
|
18
|
+
},
|
|
19
|
+
"20": {
|
|
20
|
+
"value": "20px"
|
|
21
|
+
},
|
|
22
|
+
"50%": {
|
|
23
|
+
"value": "50%"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"width": {
|
|
27
|
+
"0": {
|
|
28
|
+
"value": "0px"
|
|
29
|
+
},
|
|
30
|
+
"1": {
|
|
31
|
+
"value": "1px"
|
|
32
|
+
},
|
|
33
|
+
"1_5": {
|
|
34
|
+
"value": "1.5px"
|
|
35
|
+
},
|
|
36
|
+
"2": {
|
|
37
|
+
"value": "2px"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|