@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.
Files changed (259) hide show
  1. package/.commitlintrc.json +3 -0
  2. package/.cspell/custom-words.txt +22 -0
  3. package/.editorconfig +9 -0
  4. package/.eslintignore +1 -0
  5. package/.eslintrc.yml +122 -0
  6. package/.flowconfig +45 -0
  7. package/.github/workflows/pages.yml +52 -0
  8. package/.prettierrc +11 -0
  9. package/.storybook/SenseTheme.js +12 -0
  10. package/.storybook/main.js +73 -0
  11. package/.storybook/manager-head.html +41 -0
  12. package/.storybook/manager.js +14 -0
  13. package/.storybook/preview-head.html +130 -0
  14. package/.storybook/preview.js +128 -0
  15. package/.storybook/public/favicon.ico +0 -0
  16. package/.storybook/public/favicon.svg +6 -0
  17. package/.storybook/public/fonts/CentraNo2-Book.woff +0 -0
  18. package/.storybook/public/fonts/CentraNo2-Book.woff2 +0 -0
  19. package/.storybook/public/fonts/CentraNo2-BookItalic.woff +0 -0
  20. package/.storybook/public/fonts/CentraNo2-BookItalic.woff2 +0 -0
  21. package/.storybook/public/fonts/CentraNo2-Medium.woff +0 -0
  22. package/.storybook/public/fonts/CentraNo2-Medium.woff2 +0 -0
  23. package/.vscode/extensions.json +3 -0
  24. package/CHANGELOG.md +73 -0
  25. package/README.md +178 -0
  26. package/babel.config.js +24 -0
  27. package/config.js +58 -0
  28. package/cspell.json +26 -0
  29. package/design-tokens/border/app-border.json +41 -0
  30. package/design-tokens/border/base-border.json +41 -0
  31. package/design-tokens/color/app-color.json +226 -0
  32. package/design-tokens/color/base-color.json +265 -0
  33. package/design-tokens/elevation/app-elevation.json +22 -0
  34. package/design-tokens/elevation/base-elevation.json +19 -0
  35. package/design-tokens/font/base-font.json +98 -0
  36. package/design-tokens/index.js +5 -0
  37. package/design-tokens/motion/app.motion.json +24 -0
  38. package/design-tokens/motion/base-motion.json +40 -0
  39. package/design-tokens/opacity/base-opacity.json +49 -0
  40. package/design-tokens/shadow/base-shadow.json +86 -0
  41. package/design-tokens/size/base-size.json +94 -0
  42. package/design-tokens/space/app-space.json +40 -0
  43. package/design-tokens/space/base-space.json +40 -0
  44. package/flow-typed/npm/lodash_v4.x.x.js +6407 -0
  45. package/git-conventional-commits.json +43 -0
  46. package/gulpfile.js +48 -0
  47. package/jest.config.js +9 -0
  48. package/lib/assets/fontawesome/LICENSE.txt +18 -0
  49. package/lib/assets/fontawesome/css/all.min.css +27184 -0
  50. package/lib/assets/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  51. package/lib/assets/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  52. package/lib/assets/fontawesome/webfonts/fa-duotone-900.ttf +0 -0
  53. package/lib/assets/fontawesome/webfonts/fa-duotone-900.woff2 +0 -0
  54. package/lib/assets/fontawesome/webfonts/fa-light-300.ttf +0 -0
  55. package/lib/assets/fontawesome/webfonts/fa-light-300.woff2 +0 -0
  56. package/lib/assets/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  57. package/lib/assets/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  58. package/lib/assets/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  59. package/lib/assets/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  60. package/lib/assets/fontawesome/webfonts/fa-thin-100.ttf +0 -0
  61. package/lib/assets/fontawesome/webfonts/fa-thin-100.woff2 +0 -0
  62. package/lib/assets/fontawesome/webfonts/fa-v4compatibility.ttf +0 -0
  63. package/lib/assets/fontawesome/webfonts/fa-v4compatibility.woff2 +0 -0
  64. package/lib/components/Button/Button.js +120 -0
  65. package/lib/components/Button/Button.js.flow +166 -0
  66. package/lib/components/Button/Button.module.css +226 -0
  67. package/lib/components/Button/index.js +24 -0
  68. package/lib/components/Button/index.js.flow +4 -0
  69. package/lib/components/ButtonDropdown/ButtonDropdown.js +89 -0
  70. package/lib/components/ButtonDropdown/ButtonDropdown.js.flow +119 -0
  71. package/lib/components/ButtonDropdown/ButtonDropdown.module.css +4 -0
  72. package/lib/components/ButtonDropdown/index.js +12 -0
  73. package/lib/components/ButtonDropdown/index.js.flow +4 -0
  74. package/lib/components/Checkbox/Checkbox.js +99 -0
  75. package/lib/components/Checkbox/Checkbox.js.flow +133 -0
  76. package/lib/components/Checkbox/Checkbox.module.css +160 -0
  77. package/lib/components/Checkbox/CheckboxGroup.js +85 -0
  78. package/lib/components/Checkbox/CheckboxGroup.js.flow +105 -0
  79. package/lib/components/Checkbox/CheckboxGroup.module.css +47 -0
  80. package/lib/components/Checkbox/index.js +19 -0
  81. package/lib/components/Checkbox/index.js.flow +3 -0
  82. package/lib/components/CircularLoader/CircularLoader.js +44 -0
  83. package/lib/components/CircularLoader/CircularLoader.js.flow +44 -0
  84. package/lib/components/CircularLoader/CircularLoader.module.css +81 -0
  85. package/lib/components/CircularLoader/index.js +12 -0
  86. package/lib/components/CircularLoader/index.js.flow +3 -0
  87. package/lib/components/CodeBlock.js +26 -0
  88. package/lib/components/CodeBlock.js.flow +19 -0
  89. package/lib/components/Dialog/Dialog.js +148 -0
  90. package/lib/components/Dialog/Dialog.js.flow +165 -0
  91. package/lib/components/Dialog/Dialog.module.css +87 -0
  92. package/lib/components/Dialog/index.js +36 -0
  93. package/lib/components/Dialog/index.js.flow +14 -0
  94. package/lib/components/Dropdown/Dropdown.js +108 -0
  95. package/lib/components/Dropdown/Dropdown.js.flow +129 -0
  96. package/lib/components/Dropdown/Dropdown.module.css +14 -0
  97. package/lib/components/Dropdown/index.js +18 -0
  98. package/lib/components/Dropdown/index.js.flow +4 -0
  99. package/lib/components/Grid/Grid.js +82 -0
  100. package/lib/components/Grid/Grid.js.flow +88 -0
  101. package/lib/components/Grid/Grid.module.css +30 -0
  102. package/lib/components/Grid/index.js +16 -0
  103. package/lib/components/Grid/index.js.flow +3 -0
  104. package/lib/components/Icon/ClickableIcon.js +51 -0
  105. package/lib/components/Icon/ClickableIcon.js.flow +51 -0
  106. package/lib/components/Icon/ClickableIcon.module.css +50 -0
  107. package/lib/components/Icon/FontAwesomeLibrary.js +3 -0
  108. package/lib/components/Icon/FontAwesomeLibrary.js.flow +3 -0
  109. package/lib/components/Icon/Icon.js +38 -0
  110. package/lib/components/Icon/Icon.js.flow +51 -0
  111. package/lib/components/Icon/index.js +25 -0
  112. package/lib/components/Icon/index.js.flow +6 -0
  113. package/lib/components/InContextAlert/InContextAlert.js +121 -0
  114. package/lib/components/InContextAlert/InContextAlert.js.flow +173 -0
  115. package/lib/components/InContextAlert/InContextAlert.module.css +54 -0
  116. package/lib/components/InContextAlert/index.js +18 -0
  117. package/lib/components/InContextAlert/index.js.flow +3 -0
  118. package/lib/components/Input/Input.js +172 -0
  119. package/lib/components/Input/Input.js.flow +246 -0
  120. package/lib/components/Input/Input.module.css +122 -0
  121. package/lib/components/Input/index.js +12 -0
  122. package/lib/components/Input/index.js.flow +4 -0
  123. package/lib/components/LinearLoader/LinearLoader.js +35 -0
  124. package/lib/components/LinearLoader/LinearLoader.js.flow +34 -0
  125. package/lib/components/LinearLoader/LinearLoader.module.css +43 -0
  126. package/lib/components/LinearLoader/index.js +12 -0
  127. package/lib/components/LinearLoader/index.js.flow +3 -0
  128. package/lib/components/Menu/Menu.js +76 -0
  129. package/lib/components/Menu/Menu.js.flow +85 -0
  130. package/lib/components/Menu/Menu.module.css +124 -0
  131. package/lib/components/Menu/index.js +12 -0
  132. package/lib/components/Menu/index.js.flow +4 -0
  133. package/lib/components/Modal/Modal.js +121 -0
  134. package/lib/components/Modal/Modal.js.flow +157 -0
  135. package/lib/components/Modal/Modal.module.css +62 -0
  136. package/lib/components/Modal/index.js +12 -0
  137. package/lib/components/Modal/index.js.flow +3 -0
  138. package/lib/components/Notification/Notification.js +89 -0
  139. package/lib/components/Notification/Notification.js.flow +136 -0
  140. package/lib/components/Notification/Notification.module.css +54 -0
  141. package/lib/components/Notification/index.js +18 -0
  142. package/lib/components/Notification/index.js.flow +3 -0
  143. package/lib/components/Panel/Panel.js +96 -0
  144. package/lib/components/Panel/Panel.js.flow +109 -0
  145. package/lib/components/Panel/Panel.module.css +77 -0
  146. package/lib/components/Panel/index.js +30 -0
  147. package/lib/components/Panel/index.js.flow +10 -0
  148. package/lib/components/RadioButton/RadioButton.js +76 -0
  149. package/lib/components/RadioButton/RadioButton.js.flow +102 -0
  150. package/lib/components/RadioButton/RadioButton.module.css +122 -0
  151. package/lib/components/RadioButton/RadioGroup.js +60 -0
  152. package/lib/components/RadioButton/RadioGroup.js.flow +85 -0
  153. package/lib/components/RadioButton/RadioGroup.module.css +47 -0
  154. package/lib/components/RadioButton/index.js +19 -0
  155. package/lib/components/RadioButton/index.js.flow +3 -0
  156. package/lib/components/SearchInput/SearchInput.js +47 -0
  157. package/lib/components/SearchInput/SearchInput.js.flow +73 -0
  158. package/lib/components/SearchInput/SearchInput.module.css +11 -0
  159. package/lib/components/SearchInput/index.js +12 -0
  160. package/lib/components/SearchInput/index.js.flow +4 -0
  161. package/lib/components/Text/Text.js +195 -0
  162. package/lib/components/Text/Text.js.flow +160 -0
  163. package/lib/components/Text/index.js +103 -0
  164. package/lib/components/Text/index.js.flow +21 -0
  165. package/lib/components/Textarea/Textarea.js +95 -0
  166. package/lib/components/Textarea/Textarea.js.flow +133 -0
  167. package/lib/components/Textarea/Textarea.module.css +110 -0
  168. package/lib/components/Textarea/index.js +12 -0
  169. package/lib/components/Textarea/index.js.flow +4 -0
  170. package/lib/components/Toast/Toast.js +187 -0
  171. package/lib/components/Toast/Toast.js.flow +210 -0
  172. package/lib/components/Toast/Toast.module.css +52 -0
  173. package/lib/components/Toast/ToastContainer.js +129 -0
  174. package/lib/components/Toast/ToastContainer.js.flow +125 -0
  175. package/lib/components/Toast/ToastContainer.module.css +41 -0
  176. package/lib/components/Toast/ToastManager.js +62 -0
  177. package/lib/components/Toast/ToastManager.js.flow +67 -0
  178. package/lib/components/Toast/index.js +56 -0
  179. package/lib/components/Toast/index.js.flow +12 -0
  180. package/lib/components/Toggle/Toggle.js +69 -0
  181. package/lib/components/Toggle/Toggle.js.flow +94 -0
  182. package/lib/components/Toggle/Toggle.module.css +144 -0
  183. package/lib/components/Toggle/index.js +12 -0
  184. package/lib/components/Toggle/index.js.flow +2 -0
  185. package/lib/components/Tooltip/Tooltip.js +81 -0
  186. package/lib/components/Tooltip/Tooltip.js.flow +110 -0
  187. package/lib/components/Tooltip/Tooltip.module.css +16 -0
  188. package/lib/components/Tooltip/index.js +12 -0
  189. package/lib/components/Tooltip/index.js.flow +4 -0
  190. package/lib/components/Truncate/Truncate.js +28 -0
  191. package/lib/components/Truncate/Truncate.js.flow +22 -0
  192. package/lib/components/Truncate/Truncate.module.css +6 -0
  193. package/lib/components/Truncate/index.js +12 -0
  194. package/lib/components/Truncate/index.js.flow +4 -0
  195. package/lib/components/Typeahead/Typeahead.js +124 -0
  196. package/lib/components/Typeahead/Typeahead.js.flow +153 -0
  197. package/lib/components/Typeahead/Typeahead.module.css +10 -0
  198. package/lib/components/Typeahead/index.js +12 -0
  199. package/lib/components/Typeahead/index.js.flow +4 -0
  200. package/lib/hooks/index.js +27 -0
  201. package/lib/hooks/index.js.flow +4 -0
  202. package/lib/hooks/useMountTransition.js +25 -0
  203. package/lib/hooks/useMountTransition.js.flow +27 -0
  204. package/lib/hooks/useToastPortal.js +32 -0
  205. package/lib/hooks/useToastPortal.js.flow +30 -0
  206. package/lib/styles/animation.module.css +9 -0
  207. package/lib/styles/border.module.css +27 -0
  208. package/lib/styles/shadow.module.css +42 -0
  209. package/lib/styles/typography.module.css +227 -0
  210. package/lib/styles/variables/_border.css +21 -0
  211. package/lib/styles/variables/_border.js +29 -0
  212. package/lib/styles/variables/_border.js.flow +23 -0
  213. package/lib/styles/variables/_color.css +131 -0
  214. package/lib/styles/variables/_color.js +139 -0
  215. package/lib/styles/variables/_color.js.flow +133 -0
  216. package/lib/styles/variables/_elevation.css +11 -0
  217. package/lib/styles/variables/_elevation.js +19 -0
  218. package/lib/styles/variables/_elevation.js.flow +13 -0
  219. package/lib/styles/variables/_font.css +51 -0
  220. package/lib/styles/variables/_font.js +59 -0
  221. package/lib/styles/variables/_font.js.flow +53 -0
  222. package/lib/styles/variables/_motion.css +11 -0
  223. package/lib/styles/variables/_motion.js +19 -0
  224. package/lib/styles/variables/_motion.js.flow +13 -0
  225. package/lib/styles/variables/_opacity.css +29 -0
  226. package/lib/styles/variables/_opacity.js +37 -0
  227. package/lib/styles/variables/_opacity.js.flow +31 -0
  228. package/lib/styles/variables/_shadow.css +47 -0
  229. package/lib/styles/variables/_shadow.js +55 -0
  230. package/lib/styles/variables/_shadow.js.flow +49 -0
  231. package/lib/styles/variables/_size.css +59 -0
  232. package/lib/styles/variables/_size.js +67 -0
  233. package/lib/styles/variables/_size.js.flow +61 -0
  234. package/lib/styles/variables/_space.css +23 -0
  235. package/lib/styles/variables/_space.js +31 -0
  236. package/lib/styles/variables/_space.js.flow +25 -0
  237. package/lib/types/common.js +1 -0
  238. package/lib/types/common.js.flow +3 -0
  239. package/lib/types/toast.js +24 -0
  240. package/lib/types/toast.js.flow +41 -0
  241. package/lib/types/typography.js +22 -0
  242. package/lib/types/typography.js.flow +18 -0
  243. package/lib/utils/classify.js +33 -0
  244. package/lib/utils/classify.js.flow +29 -0
  245. package/lib/utils/click-away.js +110 -0
  246. package/lib/utils/click-away.js.flow +134 -0
  247. package/lib/utils/dom.js +202 -0
  248. package/lib/utils/dom.js.flow +238 -0
  249. package/lib/utils/helpers.js +16 -0
  250. package/lib/utils/helpers.js.flow +11 -0
  251. package/lib/utils/makeClassNameComponent.js +58 -0
  252. package/lib/utils/makeClassNameComponent.js.flow +71 -0
  253. package/lib/utils/merge-refs.js +17 -0
  254. package/lib/utils/merge-refs.js.flow +14 -0
  255. package/lint-staged.config.js +5 -0
  256. package/package.json +114 -0
  257. package/postcss.config.js +3 -0
  258. package/pull_request_template.md +48 -0
  259. package/settings.json +3 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": ["@commitlint/config-conventional"]
3
+ }
@@ -0,0 +1,22 @@
1
+ atleast
2
+ circlehollow
3
+ commitlint
4
+ DEFAULTTEXT
5
+ dismissable
6
+ Fennimore
7
+ flowtype
8
+ fontawesome
9
+ Lipsey
10
+ Neue
11
+ Nishant
12
+ OPACITYS
13
+ partialformat
14
+ rgba
15
+ sbdocs
16
+ testid
17
+ tnum
18
+ transclude
19
+ Typeahead
20
+ Verda
21
+ xmark
22
+ yxxx
package/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
package/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ /src/assets/fontawesome/
package/.eslintrc.yml ADDED
@@ -0,0 +1,122 @@
1
+ {
2
+ 'root': true,
3
+ 'env': {'browser': true, 'node': true, 'es2020': true},
4
+ 'parser': '@babel/eslint-parser',
5
+ 'plugins':
6
+ ['flowtype', '@babel', 'react', 'import', 'unused-imports', 'react-hooks','simple-import-sort'],
7
+ 'settings': {'react': {'version': 'detect'}},
8
+ 'globals': {'Iterator': 'readonly'},
9
+ 'rules':
10
+ {
11
+ 'arrow-body-style': ['warn', 'as-needed'],
12
+ 'curly': ['warn', 'all'],
13
+ comma-spacing: ["warn", { "before": false, "after": true }],
14
+ 'eol-last': 'warn',
15
+ 'eqeqeq': ['error', 'always', {'null': 'ignore'}],
16
+ indent: ["error", 2],
17
+ 'max-params': ['warn', {'max': 4}],
18
+ 'no-alert': 'warn',
19
+ 'no-console': ['error', {allow: ['warn', 'error']}],
20
+
21
+ 'no-const-assign': 'error',
22
+ 'no-dupe-args': 'error',
23
+ 'no-dupe-keys': 'error',
24
+ 'no-duplicate-case': 'error',
25
+ 'no-dupe-class-members': 'error',
26
+ 'no-empty-function': 'warn',
27
+ 'no-empty-pattern': 'error',
28
+ 'no-eval': 'error',
29
+ 'no-extend-native': 'error',
30
+ 'no-extra-boolean-cast': 'error',
31
+ 'no-fallthrough': 'error',
32
+ 'no-floating-decimal': 'error',
33
+ 'no-inner-declarations': 'error',
34
+ 'no-loop-func': 'error',
35
+ 'no-mixed-requires': 'off',
36
+ 'no-nested-ternary': 'off',
37
+ 'no-new-symbol': 'error',
38
+ 'no-redeclare': 'error',
39
+ 'no-restricted-globals': ['error', 'event', 'location'],
40
+ 'no-sparse-arrays': 'error',
41
+ 'no-tabs': 'warn',
42
+ 'no-this-before-super': 'error',
43
+ 'no-trailing-spaces': 'warn',
44
+ 'no-underscore-dangle': 'off',
45
+ 'no-unmodified-loop-condition': 'warn',
46
+ 'no-undef': ['error', {'typeof': true}],
47
+ 'no-unreachable': 'warn',
48
+ 'unused-imports/no-unused-imports': 'error',
49
+ 'unused-imports/no-unused-vars':
50
+ [
51
+ 'warn',
52
+ {
53
+ 'vars': 'all',
54
+ 'varsIgnorePattern': '^_',
55
+ 'args': 'after-used',
56
+ 'argsIgnorePattern': '^_',
57
+ },
58
+ ],
59
+ 'no-useless-constructor': 'error',
60
+ 'no-var': 'error',
61
+ 'no-with': 'error',
62
+ 'object-shorthand': 'error',
63
+ 'prefer-arrow-callback': 'error',
64
+ 'prefer-const': 'warn',
65
+ 'prefer-spread': 'warn',
66
+ 'quotes': ['warn', 'single', {'allowTemplateLiterals': true}],
67
+ 'require-yield': 'error',
68
+ 'rest-spread-spacing': 'error',
69
+ 'strict': ['warn', 'never'],
70
+
71
+ 'import/newline-after-import': ['warn', {'count': 2}],
72
+ 'import/no-duplicates': 'error',
73
+
74
+ 'react/jsx-no-undef': 'error',
75
+ 'react/jsx-pascal-case': 'warn',
76
+ 'react/jsx-uses-react': 'error',
77
+ 'react/jsx-uses-vars': 'error',
78
+ 'react/no-array-index-key': 'warn',
79
+ 'react/no-deprecated': 'error',
80
+ 'react/no-direct-mutation-state': 'error',
81
+ 'react/no-string-refs': 'warn',
82
+ 'react/prop-types': 'off',
83
+ 'react/react-in-jsx-scope': 'error',
84
+
85
+ 'flowtype/define-flow-type': 'error',
86
+ 'flowtype/delimiter-dangle': ['warn', 'always-multiline'],
87
+ 'flowtype/no-existential-type': 'warn',
88
+ 'flowtype/no-weak-types': 'warn',
89
+ 'flowtype/semi': ['warn', 'always'],
90
+
91
+ 'react-hooks/rules-of-hooks': 'error',
92
+ "simple-import-sort/imports": "error",
93
+ "simple-import-sort/exports": "error"
94
+ },
95
+ 'overrides':
96
+ [
97
+ {
98
+ 'files': ['**/__tests__/*.js', '**/__tests__/*.jsx'],
99
+ 'env': {'jest': true},
100
+ 'plugins': ['jest'],
101
+ },
102
+ {'files': ['**/*.stories.jsx'], 'rules': {'semi': ['warn', 'always']}},
103
+ {
104
+ "files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
105
+ "rules": {
106
+ "simple-import-sort/imports": [
107
+ "error",
108
+ {
109
+ "groups": [
110
+ ["^react", "^@?\\w"],
111
+ ["^(@|components)(/.*|$)"],
112
+ ["^\\u0000"],
113
+ ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
114
+ ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
115
+ ["^.+\\.?(css)$"]
116
+ ]
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ ],
122
+ }
package/.flowconfig ADDED
@@ -0,0 +1,45 @@
1
+ [include]
2
+ ./node_modules/react
3
+
4
+ [ignore]
5
+ ./node_modules/react/node_modules/.*
6
+ .*/**/malformed_package_json/package.json
7
+ ./node_modules/systemjs-builder/.*
8
+ ./build/.*
9
+ ./lib/.*
10
+
11
+ [declarations]
12
+
13
+ [libs]
14
+ ./node_modules/fbjs/flow/lib
15
+
16
+ [options]
17
+ sharedmemory.hash_table_pow=21
18
+
19
+ module.system.node.resolve_dirname=node_modules
20
+ module.system.node.allow_root_relative=true
21
+
22
+ module.name_mapper='^\(.*\)\.\(png\|jpg\|gif\|mp3\|wav\)$' -> '<PROJECT_ROOT>/flow/FileFlowStub.js.flow'
23
+ module.name_mapper='^\(.*\)\.css$' -> '<PROJECT_ROOT>/flow/CSSFlowStub.js.flow'
24
+ module.name_mapper='^\(.*\)\.svg$' -> '<PROJECT_ROOT>/flow/SVGFlowStub.js.flow'
25
+ module.name_mapper='^\(.*\)\.svg\?noDimensions$' -> '<PROJECT_ROOT>/flow/SVGFlowStub.js.flow'
26
+ module.name_mapper='^\(.*\)\.svg\?noAttrs$' -> '<PROJECT_ROOT>/flow/SVGFlowStub.js.flow'
27
+
28
+ exact_by_default=true
29
+
30
+ [strict]
31
+ nonstrict-import
32
+ unclear-type
33
+ unsafe-getters-setters
34
+ untyped-import
35
+ untyped-type-import
36
+ deprecated-type
37
+ unnecessary-invariant
38
+ unnecessary-optional-chain
39
+
40
+ [lints]
41
+ deprecated-type=warn
42
+ sketchy-number=error
43
+ unclear-type=warn
44
+ unnecessary-invariant=warn
45
+ unnecessary-optional-chain=warn
@@ -0,0 +1,52 @@
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name: Publish Genesis Design System Storybook to Github Pages
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches: ["master"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch:
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions:
14
+ contents: read
15
+ pages: write
16
+ id-token: write
17
+
18
+ # Allow one concurrent deployment
19
+ concurrency:
20
+ group: "pages"
21
+ cancel-in-progress: true
22
+
23
+ jobs:
24
+ # Single deploy job since we're just deploying
25
+ deploy:
26
+ environment:
27
+ name: github-pages
28
+ url: ${{ steps.deployment.outputs.page_url }}
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - name: Checkout
32
+ uses: actions/checkout@v3
33
+ - name: Install and Build 🔧
34
+ # Install npm packages and build the Storybook files
35
+ run: |
36
+ echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
37
+ yarn
38
+ yarn storybook:export
39
+ - name: List files in the repository after build
40
+ run: |
41
+ ls ${{ github.workspace }}
42
+ echo "🍏 This job's status is ${{ job.status }}."
43
+ - name: Setup Pages
44
+ uses: actions/configure-pages@v2
45
+ - name: Upload artifact
46
+ uses: actions/upload-pages-artifact@v1
47
+ with:
48
+ # Upload storybook-static folder's content
49
+ path: './storybook-static/'
50
+ - name: Deploy to GitHub Pages
51
+ id: deployment
52
+ uses: actions/deploy-pages@v1
package/.prettierrc ADDED
@@ -0,0 +1,11 @@
1
+ trailingComma: 'all'
2
+ bracketSpacing: false
3
+ singleQuote: true
4
+ endOfLine: lf
5
+ overrides:
6
+ - files: ['*.js', '*.jsx']
7
+ options:
8
+ parser: 'babel-flow'
9
+ - files: ['*.css']
10
+ options:
11
+ parser: 'css'
@@ -0,0 +1,12 @@
1
+ import {create} from '@storybook/theming';
2
+
3
+ export default create({
4
+ base: 'light',
5
+ brandTitle: 'Genesis',
6
+ brandImage:
7
+ 'https://assets-global.website-files.com/613f2494a7d5cd1817022b81/618cffd78219af09f95a7446_Group%204.svg',
8
+
9
+ fontBase: '"Centra No 2", "proxima-nova", "Helvetica Neue"',
10
+ textColor: '#17172A',
11
+ textInverseColor: '#ffffff',
12
+ });
@@ -0,0 +1,73 @@
1
+ const path = require('path');
2
+
3
+ module.exports = {
4
+ stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.jsx'],
5
+ // Add any Storybook addons you want here: https://storybook.js.org/addons/
6
+ addons: [
7
+ {
8
+ name: '@storybook/addon-postcss',
9
+ options: {
10
+ postcssLoaderOptions: {
11
+ implementation: require('postcss'),
12
+ },
13
+ },
14
+ },
15
+ {
16
+ name: '@storybook/addon-docs',
17
+ options: {
18
+ configureJSX: true,
19
+ babelOptions: {},
20
+ sourceLoaderOptions: null,
21
+ transcludeMarkdown: true,
22
+ },
23
+ },
24
+ 'storybook-css-modules',
25
+ '@storybook/addon-a11y',
26
+ '@storybook/addon-essentials',
27
+ '@storybook/testing-react',
28
+ 'storybook-vscode-component/register',
29
+ ],
30
+ webpackFinal: async (config) => {
31
+ config.module.rules = config.module.rules.map((rule) => {
32
+ if (rule.test && rule.test.toString().includes('woff')) {
33
+ return {
34
+ ...rule,
35
+ test: /\.(svg|ico|jpg|jpeg|png|gif|webp|cur|ani|pdf)(\?.*)?$/,
36
+ };
37
+ }
38
+ return rule;
39
+ });
40
+
41
+ config.module.rules.push({
42
+ test: /\.scss$/,
43
+ use: ['style-loader', 'css-loader?modules=true', 'sass-loader'],
44
+ include: path.resolve(__dirname, '../'),
45
+ });
46
+
47
+ config.module.rules.push({
48
+ test: /\.(js|jsx)$/,
49
+ loader: require.resolve('babel-loader'),
50
+ options: {
51
+ presets: [['react-app', {flow: true, typescript: false}]],
52
+ },
53
+ });
54
+
55
+ // fonts
56
+ config.module.rules.push({
57
+ test: /\.(png|woff|woff2|eot|ttf|svg)$/,
58
+ use: [
59
+ {
60
+ loader: 'file-loader',
61
+ query: {
62
+ name: '[name].[ext]',
63
+ },
64
+ },
65
+ ],
66
+ include: path.resolve(__dirname, '../'),
67
+ });
68
+ config.resolve.extensions.push('.js', '.jsx');
69
+
70
+ return config;
71
+ },
72
+ staticDirs: ['public'],
73
+ };
@@ -0,0 +1,41 @@
1
+ <!--
2
+ Override the default favicon used in the Storybook in the browser tab.
3
+ -->
4
+ <link
5
+ rel="icon"
6
+ sizes="any"
7
+ href="https://spaced-out.github.io/ui-design-system/favicon.ico?"
8
+ />
9
+
10
+ <style>
11
+ @font-face {
12
+ font-family: 'Centra No 2';
13
+ src: url('fonts/CentraNo2-Book.woff2') format('woff2'),
14
+ url('fonts/CentraNo2-Book.woff') format('woff');
15
+ font-weight: 300 400;
16
+ font-style: normal;
17
+ font-display: auto;
18
+ }
19
+
20
+ @font-face {
21
+ font-family: 'Centra No 2';
22
+ src: url('fonts/CentraNo2-BookItalic.woff2') format('woff2'),
23
+ url('fonts/CentraNo2-BookItalic.woff') format('woff');
24
+ font-weight: 300 400;
25
+ font-style: italic;
26
+ font-display: auto;
27
+ }
28
+
29
+ @font-face {
30
+ font-family: 'Centra No 2';
31
+ src: url('fonts/CentraNo2-Medium.woff2') format('woff2'),
32
+ url('fonts/CentraNo2-Medium.woff') format('woff');
33
+ font-weight: 500;
34
+ font-style: normal;
35
+ font-display: auto;
36
+ }
37
+ body {
38
+ /* This will target all of the children */
39
+ font-family: 'Centra No 2' !important;
40
+ }
41
+ </style>
@@ -0,0 +1,14 @@
1
+ // .storybook/manager.js
2
+
3
+ import {addons} from '@storybook/addons';
4
+ import {themes} from '@storybook/theming';
5
+
6
+ import senseTheme from './SenseTheme';
7
+
8
+ addons.setConfig({
9
+ theme: senseTheme,
10
+ previewTabs: {
11
+ canvas: {title: 'Playground'},
12
+ 'storybook/docs/panel': {title: 'Documentation', index: -1},
13
+ },
14
+ });
@@ -0,0 +1,130 @@
1
+ <style type="text/css">
2
+ @font-face {
3
+ font-family: 'Centra No 2';
4
+ src: url('fonts/CentraNo2-Book.woff2') format('woff2'),
5
+ url('fonts/CentraNo2-Book.woff') format('woff');
6
+ font-weight: 300 400;
7
+ font-style: normal;
8
+ font-display: auto;
9
+ }
10
+
11
+ @font-face {
12
+ font-family: 'Centra No 2';
13
+ src: url('fonts/CentraNo2-BookItalic.woff2') format('woff2'),
14
+ url('fonts/CentraNo2-BookItalic.woff') format('woff');
15
+ font-weight: 300 400;
16
+ font-style: italic;
17
+ font-display: auto;
18
+ }
19
+
20
+ @font-face {
21
+ font-family: 'Centra No 2';
22
+ src: url('fonts/CentraNo2-Medium.woff2') format('woff2'),
23
+ url('fonts/CentraNo2-Medium.woff') format('woff');
24
+ font-weight: 500;
25
+ font-style: normal;
26
+ font-display: auto;
27
+ }
28
+
29
+ html,
30
+ body {
31
+ display: flex;
32
+ width: 100%;
33
+ height: 100%;
34
+ margin: 0px;
35
+ padding: 0px;
36
+ background: white;
37
+ color: #606060;
38
+ font-size: 16px;
39
+ text-size-adjust: none;
40
+ font-feature-settings: 'tnum';
41
+ }
42
+
43
+ html.fixed,
44
+ body.fixed {
45
+ overflow: hidden;
46
+ }
47
+
48
+ /* standard resets */
49
+ a {
50
+ text-decoration: none;
51
+ font-weight: inherit;
52
+ color: inherit;
53
+ }
54
+
55
+ button {
56
+ padding: 0;
57
+ }
58
+ input,
59
+ textarea,
60
+ button {
61
+ font: inherit;
62
+ font-size: inherit;
63
+ text-transform: inherit;
64
+ color: inherit;
65
+ outline: none;
66
+ background: transparent;
67
+ border: none;
68
+ margin: 0;
69
+ }
70
+
71
+ *,
72
+ ::after,
73
+ ::before {
74
+ box-sizing: border-box;
75
+ }
76
+ div,
77
+ nav,
78
+ header,
79
+ footer,
80
+ section,
81
+ h1,
82
+ h2,
83
+ h3,
84
+ h4,
85
+ h5,
86
+ ul,
87
+ ol,
88
+ figure,
89
+ figcaption,
90
+ form,
91
+ label,
92
+ ::before,
93
+ ::after {
94
+ margin: 0;
95
+ }
96
+
97
+ body {
98
+ font-family: 'Centra No 2';
99
+ background: #fafafa;
100
+ }
101
+
102
+ #root {
103
+ font-family: initial;
104
+ }
105
+
106
+ #docs-root {
107
+ font-family: 'Centra No 2';
108
+ }
109
+
110
+ [class*='sbdocs'] {
111
+ font-family: 'Centra No 2' !important;
112
+ }
113
+
114
+ [class*='docblock'] {
115
+ font-family: 'Centra No 2' !important;
116
+ }
117
+
118
+ #docs-root .sbdocs {
119
+ background: #fafafa !important;
120
+ }
121
+
122
+ #docs-root .sbdocs .docs-story {
123
+ font-family: initial !important;
124
+ }
125
+
126
+ #root,
127
+ #root div {
128
+ display: flex;
129
+ }
130
+ </style>
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Read https://storybook.js.org/docs/react/configure/overview#configure-story-rendering
3
+ * for more information about the purpose of this file.
4
+ *
5
+ * Use preview.js for global code (such as CSS imports or JavaScript mocks)
6
+ * that applies to all stories. For example, `import thirdPartyCss.css`.
7
+ *
8
+ * This file can have three exports:
9
+ * - decorators - an array of global decorators
10
+ * - parameters - an object of global parameters
11
+ * - globalTypes - definition of globalTypes
12
+ */
13
+
14
+ /**
15
+ * Decorators
16
+ *
17
+ * A decorator is a way to wrap a story in extra “rendering” functionality.
18
+ *
19
+ * Example:
20
+ *
21
+ * import React from 'react';
22
+ * export const decorators = [(Story) => <div style={{ margin: '3em' }}><Story/></div>];
23
+ *
24
+ * Each story throughout the library will be wrapped in a div with a margin of 3
25
+ */
26
+
27
+ /**
28
+ * Parameters
29
+ *
30
+ * Most Storybook addons are configured via a parameter-based API.
31
+ * You can set global parameters in this file
32
+ **/
33
+
34
+ import {themes} from '@storybook/theming';
35
+ import {wd} from 'paths.macro';
36
+ import {addParameters} from '@storybook/react';
37
+
38
+ addParameters({
39
+ viewMode: 'docs',
40
+ });
41
+
42
+ export const parameters = {
43
+ backgrounds: {
44
+ values: [
45
+ {name: 'Dark', value: '#000'},
46
+ {name: 'Light', value: '#fff'},
47
+ ],
48
+ },
49
+ docs: {
50
+ theme: themes.light,
51
+ },
52
+ Canvas: {
53
+ theme: themes.light,
54
+ },
55
+ storySource: {
56
+ repository: 'https://github.com/Spaced-Out/ui-design-system',
57
+ workingDir: wd,
58
+ branch: 'master',
59
+ },
60
+ options: {
61
+ storySort: {
62
+ method: 'alphabetical',
63
+ order: [
64
+ 'Introduction',
65
+ 'Changelog',
66
+ 'Design Tokens',
67
+ 'Tokens',
68
+ 'Components',
69
+ [
70
+ 'Button',
71
+ 'Icon',
72
+ 'Search Input',
73
+ 'Menu',
74
+ 'Button Dropdown',
75
+ 'Modal',
76
+ 'Dialog',
77
+ 'Panel',
78
+ 'Tooltip',
79
+ 'Linear Loader',
80
+ 'Circular Loader',
81
+ ],
82
+ 'Form Components',
83
+ [
84
+ 'Input',
85
+ 'Textarea',
86
+ 'Checkbox',
87
+ 'Checkbox Group',
88
+ 'Radio Button',
89
+ 'Radio Group',
90
+ 'Toggle',
91
+ 'Dropdown',
92
+ 'Typeahead',
93
+ ],
94
+
95
+ '*',
96
+ ],
97
+ locales: 'en-US',
98
+ },
99
+ },
100
+ };
101
+ /**
102
+ * With backgrounds, you configure the list of backgrounds that every story can render in.
103
+ */
104
+
105
+ /**
106
+ * Global Types
107
+ *
108
+ * Global Types allow you to add your own toolbars by creating
109
+ * globalTypes with a toolbar annotation:
110
+ *
111
+ * For example:
112
+ **/
113
+ export const globalTypes = {
114
+ theme: {
115
+ name: 'Theme',
116
+ description: 'Global theme for components',
117
+ defaultValue: 'dark',
118
+ toolbar: {
119
+ icon: 'circlehollow',
120
+ // array of plain string values or MenuItem shape
121
+ items: ['light', 'dark'],
122
+ },
123
+ },
124
+ };
125
+ /**
126
+ *
127
+ * Will add a new dropdown in your toolbar with options light and dark.
128
+ **/
Binary file
@@ -0,0 +1,6 @@
1
+ <svg width="137" height="137" viewBox="0 0 137 137" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M46.5 76C56.7173 76 65 67.7173 65 57.5C65 47.2827 56.7173 39 46.5 39C36.2827 39 28 47.2827 28 57.5C28 67.7173 36.2827 76 46.5 76Z" fill="#FFD252"/>
3
+ <path d="M90.5 47C100.717 47 109 38.4934 109 28C109 17.5066 100.717 9 90.5 9C80.2827 9 72 17.5066 72 28C72 38.4934 80.2827 47 90.5 47Z" fill="#F05A28"/>
4
+ <path d="M46.5 128C56.7173 128 65 119.717 65 109.5C65 99.2827 56.7173 91 46.5 91C36.2827 91 28 99.2827 28 109.5C28 119.717 36.2827 128 46.5 128Z" fill="#7461E5"/>
5
+ <path d="M90.5 98C100.717 98 109 89.9411 109 80C109 70.0589 100.717 62 90.5 62C80.2827 62 72 70.0589 72 80C72 89.9411 80.2827 98 90.5 98Z" fill="#33A30F"/>
6
+ </svg>