@nypl/design-system-react-components 0.23.4 → 0.25.1

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 (307) hide show
  1. package/CHANGELOG.md +98 -1
  2. package/README.md +46 -11
  3. package/dist/components/Accordion/Accordion.d.ts +14 -14
  4. package/dist/components/Autosuggest/Autosuggest.stories.d.ts +1 -0
  5. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +11 -14
  6. package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +6 -0
  7. package/dist/components/Button/Button.d.ts +6 -13
  8. package/dist/components/Button/ButtonTypes.d.ts +5 -3
  9. package/dist/components/Card/Card.d.ts +59 -10
  10. package/dist/components/Card/CardTypes.d.ts +19 -0
  11. package/dist/components/CardEdition/CardEdition.d.ts +21 -0
  12. package/dist/components/{StyleGuide/Colors.stories.d.ts → CardEdition/CardEdition.stories.d.ts} +5 -2
  13. package/dist/components/Checkbox/Checkbox.d.ts +21 -16
  14. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +43 -0
  15. package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +4 -0
  16. package/dist/components/DatePicker/DatePicker.d.ts +79 -0
  17. package/dist/components/DatePicker/DatePickerTypes.d.ts +5 -0
  18. package/dist/components/Form/Form.d.ts +16 -8
  19. package/dist/components/Form/FormTypes.d.ts +2 -0
  20. package/dist/components/Grid/GridTypes.d.ts +9 -0
  21. package/dist/components/Grid/SimpleGrid.d.ts +14 -0
  22. package/dist/components/Heading/Heading.d.ts +9 -11
  23. package/dist/components/Heading/{HeadingDisplaySizes.d.ts → HeadingTypes.d.ts} +8 -0
  24. package/dist/components/HelperErrorText/HelperErrorText.stories.d.ts +2 -1
  25. package/dist/components/Hero/Hero.d.ts +19 -14
  26. package/dist/components/Hero/HeroTypes.d.ts +10 -5
  27. package/dist/components/Icons/Icon.d.ts +13 -16
  28. package/dist/components/Icons/IconSvgs.d.ts +4 -0
  29. package/dist/components/Icons/IconTypes.d.ts +78 -60
  30. package/dist/components/Image/Image.stories.d.ts +2 -1
  31. package/dist/components/Label/Label.d.ts +10 -26
  32. package/dist/components/Link/Link.d.ts +8 -12
  33. package/dist/components/List/List.stories.d.ts +1 -0
  34. package/dist/components/Radio/Radio.d.ts +30 -24
  35. package/dist/components/RadioGroup/RadioGroup.d.ts +40 -0
  36. package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +4 -0
  37. package/dist/components/SearchBar/SearchBar.d.ts +45 -27
  38. package/dist/components/Select/Select.d.ts +34 -35
  39. package/dist/components/Select/SelectTypes.d.ts +4 -0
  40. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +1 -1
  41. package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +2 -2
  42. package/dist/components/StatusBadge/StatusBadge.d.ts +8 -6
  43. package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +5 -0
  44. package/dist/components/Tabs/Tabs.d.ts +25 -0
  45. package/dist/components/Template/Template.d.ts +91 -0
  46. package/dist/components/Text/Text.d.ts +16 -0
  47. package/dist/components/Text/TextTypes.d.ts +6 -0
  48. package/dist/components/TextInput/TextInput.d.ts +37 -30
  49. package/dist/components/TextInput/TextInputTypes.d.ts +5 -0
  50. package/dist/design-system-react-components.cjs.development.js +4102 -917
  51. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  52. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  53. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  54. package/dist/design-system-react-components.esm.js +4023 -920
  55. package/dist/design-system-react-components.esm.js.map +1 -1
  56. package/dist/index.d.ts +23 -5
  57. package/dist/resources.scss +133 -24
  58. package/dist/styles.css +1 -1
  59. package/dist/theme/components/accordion.d.ts +25 -0
  60. package/dist/theme/components/breadcrumb.d.ts +90 -0
  61. package/dist/theme/components/button.d.ts +109 -0
  62. package/dist/theme/components/checkbox.d.ts +91 -0
  63. package/dist/theme/components/customCheckboxGroup.d.ts +18 -0
  64. package/dist/theme/components/customRadioGroup.d.ts +18 -0
  65. package/dist/theme/components/global.d.ts +55 -0
  66. package/dist/theme/components/globalMixins.d.ts +15 -0
  67. package/dist/theme/components/heading.d.ts +110 -0
  68. package/dist/theme/components/hero.d.ts +492 -0
  69. package/dist/theme/components/icon.d.ts +13 -0
  70. package/dist/theme/components/label.d.ts +16 -0
  71. package/dist/theme/components/link.d.ts +45 -0
  72. package/dist/theme/components/radio.d.ts +95 -0
  73. package/dist/theme/components/searchBar.d.ts +20 -0
  74. package/dist/theme/components/select.d.ts +58 -0
  75. package/dist/theme/components/statusBadge.d.ts +25 -0
  76. package/dist/theme/components/tabs.d.ts +85 -0
  77. package/dist/theme/components/template.d.ts +105 -0
  78. package/dist/theme/components/text.d.ts +20 -0
  79. package/dist/theme/components/textInput.d.ts +105 -0
  80. package/dist/theme/foundations/breakpoints.d.ts +23 -0
  81. package/dist/theme/foundations/colors.d.ts +3 -0
  82. package/dist/theme/foundations/global.d.ts +23 -0
  83. package/dist/theme/foundations/shadows.d.ts +4 -0
  84. package/dist/theme/foundations/spacing.d.ts +77 -0
  85. package/dist/theme/foundations/typography.d.ts +8 -0
  86. package/dist/theme/index.d.ts +20 -0
  87. package/dist/theme/provider.d.ts +5 -0
  88. package/dist/theme/types.d.ts +1 -0
  89. package/dist/utils/utils.d.ts +6 -0
  90. package/package.json +9 -2
  91. package/src/components/Accordion/Accordion.stories.mdx +233 -33
  92. package/src/components/Accordion/Accordion.test.tsx +135 -19
  93. package/src/components/Accordion/Accordion.tsx +81 -56
  94. package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
  95. package/src/components/Autosuggest/Autosuggest.stories.tsx +1 -1
  96. package/src/components/Autosuggest/_Autosuggest.scss +2 -2
  97. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +57 -56
  98. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +31 -25
  99. package/src/components/Breadcrumbs/Breadcrumbs.tsx +71 -73
  100. package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +6 -0
  101. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +100 -0
  102. package/src/components/Button/Button.stories.mdx +125 -138
  103. package/src/components/Button/Button.test.tsx +65 -11
  104. package/src/components/Button/Button.tsx +72 -68
  105. package/src/components/Button/ButtonTypes.tsx +4 -2
  106. package/src/components/Button/_Button.scss +7 -92
  107. package/src/components/Button/__snapshots__/Button.test.tsx.snap +58 -3
  108. package/src/components/Card/Card.stories.mdx +694 -0
  109. package/src/components/Card/Card.test.tsx +97 -102
  110. package/src/components/Card/Card.tsx +182 -31
  111. package/src/components/Card/CardTypes.tsx +21 -0
  112. package/src/components/Card/_Card.scss +234 -49
  113. package/src/components/{Card/Card.stories.tsx → CardEdition/CardEdition.stories.tsx} +32 -22
  114. package/src/components/CardEdition/CardEdition.test.tsx +395 -0
  115. package/src/components/CardEdition/CardEdition.tsx +60 -0
  116. package/src/components/CardEdition/_CardEdition.scss +138 -0
  117. package/src/components/Chakra/Box.stories.mdx +57 -0
  118. package/src/components/Chakra/Center.stories.mdx +99 -0
  119. package/src/components/Chakra/Grid.stories.mdx +79 -0
  120. package/src/components/Chakra/Stack.stories.mdx +93 -0
  121. package/src/components/Checkbox/Checkbox.stories.mdx +57 -35
  122. package/src/components/Checkbox/Checkbox.test.tsx +117 -147
  123. package/src/components/Checkbox/Checkbox.tsx +76 -50
  124. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +325 -0
  125. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +249 -0
  126. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +345 -0
  127. package/src/components/CheckboxGroup/CheckboxGroup.tsx +148 -0
  128. package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +4 -0
  129. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +1360 -0
  130. package/src/components/DatePicker/DatePicker.stories.mdx +284 -0
  131. package/src/components/DatePicker/DatePicker.test.tsx +657 -0
  132. package/src/components/DatePicker/DatePicker.tsx +396 -0
  133. package/src/components/DatePicker/DatePickerTypes.tsx +5 -0
  134. package/src/components/DatePicker/_DatePicker.scss +76 -0
  135. package/src/components/Form/Form.stories.mdx +130 -27
  136. package/src/components/Form/Form.test.tsx +78 -36
  137. package/src/components/Form/Form.tsx +53 -19
  138. package/src/components/Form/FormTypes.tsx +3 -0
  139. package/src/components/Form/__snapshots__/Form.test.tsx.snap +38 -0
  140. package/src/components/Grid/GridTypes.tsx +9 -0
  141. package/src/components/Grid/SimpleGrid.stories.mdx +275 -0
  142. package/src/components/Grid/SimpleGrid.test.tsx +66 -0
  143. package/src/components/Grid/SimpleGrid.tsx +37 -0
  144. package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +8 -0
  145. package/src/components/Heading/Heading.stories.mdx +63 -33
  146. package/src/components/Heading/Heading.test.tsx +24 -16
  147. package/src/components/Heading/Heading.tsx +54 -38
  148. package/src/components/Heading/{HeadingDisplaySizes.tsx → HeadingTypes.tsx} +9 -0
  149. package/src/components/HelperErrorText/HelperErrorText.stories.tsx +2 -1
  150. package/src/components/HelperErrorText/_HelperErrorText.scss +1 -1
  151. package/src/components/Hero/Hero.stories.mdx +195 -85
  152. package/src/components/Hero/Hero.test.tsx +544 -113
  153. package/src/components/Hero/Hero.tsx +80 -93
  154. package/src/components/Hero/HeroTypes.tsx +17 -5
  155. package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +307 -0
  156. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +6 -1
  157. package/src/components/HorizontalRule/_HorizontalRule.scss +1 -1
  158. package/src/components/Icons/Icon.stories.mdx +89 -74
  159. package/src/components/Icons/Icon.test.tsx +30 -22
  160. package/src/components/Icons/Icon.tsx +63 -61
  161. package/src/components/Icons/IconSvgs.tsx +8 -0
  162. package/src/components/Icons/IconTypes.tsx +80 -60
  163. package/src/components/Image/Image.stories.tsx +2 -1
  164. package/src/components/Input/_Input.scss +2 -2
  165. package/src/components/Label/Label.stories.mdx +77 -0
  166. package/src/components/Label/Label.test.tsx +43 -12
  167. package/src/components/Label/Label.tsx +28 -45
  168. package/src/components/Label/__snapshots__/Label.test.tsx.snap +41 -0
  169. package/src/components/Link/Link.stories.mdx +47 -41
  170. package/src/components/Link/Link.test.tsx +33 -44
  171. package/src/components/Link/Link.tsx +114 -100
  172. package/src/components/List/List.stories.mdx +7 -3
  173. package/src/components/List/List.stories.tsx +14 -9
  174. package/src/components/List/List.test.tsx +12 -8
  175. package/src/components/List/List.tsx +9 -7
  176. package/src/components/List/_List.scss +3 -3
  177. package/src/components/Modal/Modal.stories.mdx +7 -3
  178. package/src/components/Modal/_Modal.scss +1 -1
  179. package/src/components/Notification/Notification.stories.mdx +99 -65
  180. package/src/components/Notification/Notification.test.tsx +3 -16
  181. package/src/components/Notification/Notification.tsx +12 -12
  182. package/src/components/Notification/_Notification.scss +5 -4
  183. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +1 -1
  184. package/src/components/Pagination/Pagination.stories.mdx +7 -1
  185. package/src/components/Pagination/Pagination.test.tsx +16 -10
  186. package/src/components/Radio/Radio.stories.mdx +57 -46
  187. package/src/components/Radio/Radio.test.tsx +92 -138
  188. package/src/components/Radio/Radio.tsx +70 -69
  189. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +250 -0
  190. package/src/components/RadioGroup/RadioGroup.stories.mdx +247 -0
  191. package/src/components/RadioGroup/RadioGroup.test.tsx +327 -0
  192. package/src/components/RadioGroup/RadioGroup.tsx +154 -0
  193. package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +4 -0
  194. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1101 -0
  195. package/src/components/SearchBar/SearchBar.Test.tsx +151 -16
  196. package/src/components/SearchBar/SearchBar.stories.mdx +196 -224
  197. package/src/components/SearchBar/SearchBar.tsx +151 -46
  198. package/src/components/Select/Select.stories.mdx +193 -168
  199. package/src/components/Select/Select.test.tsx +129 -324
  200. package/src/components/Select/Select.tsx +120 -160
  201. package/src/components/Select/SelectTypes.tsx +4 -0
  202. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +18 -29
  203. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -7
  204. package/src/components/SkeletonLoader/SkeletonLoader.tsx +4 -2
  205. package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +2 -2
  206. package/src/components/SkeletonLoader/_SkeletonLoader.scss +3 -3
  207. package/src/components/StatusBadge/StatusBadge.stories.mdx +91 -0
  208. package/src/components/StatusBadge/StatusBadge.test.tsx +35 -7
  209. package/src/components/StatusBadge/StatusBadge.tsx +24 -25
  210. package/src/components/StatusBadge/StatusBadgeTypes.tsx +5 -0
  211. package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +28 -0
  212. package/src/components/StyleGuide/Bidirectionality.stories.mdx +112 -90
  213. package/src/components/StyleGuide/Buttons.stories.mdx +98 -100
  214. package/src/components/StyleGuide/Colors.stories.mdx +336 -0
  215. package/src/components/StyleGuide/Forms.stories.mdx +85 -0
  216. package/src/components/StyleGuide/Iconography.stories.mdx +86 -93
  217. package/src/components/StyleGuide/Spacing.stories.mdx +0 -1
  218. package/src/components/StyleGuide/Typography.stories.mdx +164 -166
  219. package/src/components/StyleGuide/UIDocCard.tsx +4 -4
  220. package/src/components/Tabs/Tabs.stories.mdx +221 -0
  221. package/src/components/Tabs/Tabs.test.tsx +264 -0
  222. package/src/components/Tabs/Tabs.tsx +220 -0
  223. package/src/components/Template/Template.stories.mdx +574 -0
  224. package/src/components/Template/Template.test.tsx +124 -0
  225. package/src/components/Template/Template.tsx +226 -0
  226. package/src/components/Text/Text.stories.mdx +70 -0
  227. package/src/components/Text/Text.test.tsx +63 -0
  228. package/src/components/Text/Text.tsx +55 -0
  229. package/src/components/Text/TextTypes.tsx +6 -0
  230. package/src/components/Text/__snapshots__/Text.test.tsx.snap +33 -0
  231. package/src/components/TextInput/TextInput.stories.mdx +90 -90
  232. package/src/components/TextInput/TextInput.test.tsx +103 -83
  233. package/src/components/TextInput/TextInput.tsx +108 -91
  234. package/src/components/TextInput/TextInputTypes.tsx +6 -0
  235. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +2 -1
  236. package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
  237. package/src/components/VideoPlayer/_VideoPlayer.scss +1 -1
  238. package/src/docs/Chakra.stories.mdx +341 -0
  239. package/src/docs/Intro.stories.mdx +31 -24
  240. package/src/index.ts +70 -5
  241. package/src/styles/01-colors/_colors-brand.scss +6 -4
  242. package/src/styles/01-colors/_colors-utility.scss +14 -15
  243. package/src/styles/03-space/_space-inline.scss +47 -7
  244. package/src/styles/03-space/_space-inset.scss +33 -5
  245. package/src/styles/03-space/_space-stack.scss +48 -8
  246. package/src/styles/base/_02-breakpoints.scss +5 -4
  247. package/src/styles/base/_04-base.scss +2 -1
  248. package/src/styles/base/_place-holder.scss +1 -1
  249. package/src/styles/base/_typography.scss +1 -29
  250. package/src/styles.scss +22 -25
  251. package/src/theme/components/accordion.ts +30 -0
  252. package/src/theme/components/breadcrumb.ts +77 -0
  253. package/src/theme/components/button.ts +125 -0
  254. package/src/theme/components/checkbox.ts +107 -0
  255. package/src/theme/components/customCheckboxGroup.ts +12 -0
  256. package/src/theme/components/customRadioGroup.ts +12 -0
  257. package/src/theme/components/global.ts +71 -0
  258. package/src/theme/components/globalMixins.ts +16 -0
  259. package/src/theme/components/heading.ts +72 -0
  260. package/src/theme/components/hero.ts +239 -0
  261. package/src/theme/components/icon.ts +79 -0
  262. package/src/theme/components/label.ts +17 -0
  263. package/src/theme/components/link.ts +47 -0
  264. package/src/theme/components/radio.ts +106 -0
  265. package/src/theme/components/searchBar.ts +21 -0
  266. package/src/theme/components/select.ts +50 -0
  267. package/src/theme/components/statusBadge.ts +27 -0
  268. package/src/theme/components/tabs.ts +79 -0
  269. package/src/theme/components/template.ts +114 -0
  270. package/src/theme/components/text.ts +31 -0
  271. package/src/theme/components/textInput.ts +61 -0
  272. package/src/theme/foundations/breakpoints.ts +24 -0
  273. package/src/theme/foundations/colors.ts +208 -0
  274. package/src/theme/foundations/global.ts +26 -0
  275. package/src/theme/foundations/shadows.ts +5 -0
  276. package/src/theme/foundations/spacing.ts +85 -0
  277. package/src/theme/foundations/typography.ts +35 -0
  278. package/src/theme/index.ts +88 -0
  279. package/src/theme/provider.tsx +9 -0
  280. package/src/theme/types.ts +1 -0
  281. package/src/utils/componentCategories.ts +56 -21
  282. package/src/utils/utils.ts +13 -0
  283. package/dist/components/Accordion/Accordion.stories.d.ts +0 -5
  284. package/dist/components/Card/Card.stories.d.ts +0 -27
  285. package/dist/components/Label/Label.stories.d.ts +0 -12
  286. package/dist/components/StatusBadge/StatusBadge.stories.d.ts +0 -8
  287. package/dist/components/Template/Template.stories.d.ts +0 -29
  288. package/src/components/Accordion/Accordion.stories.tsx +0 -65
  289. package/src/components/Accordion/_Accordion.scss +0 -81
  290. package/src/components/Breadcrumbs/_Breadcrumbs.scss +0 -97
  291. package/src/components/Checkbox/_Checkbox.scss +0 -97
  292. package/src/components/Form/_Form.scss +0 -28
  293. package/src/components/Heading/_Heading.scss +0 -163
  294. package/src/components/Hero/_Hero.scss +0 -256
  295. package/src/components/Icons/_Icons.scss +0 -116
  296. package/src/components/Label/Label.stories.tsx +0 -30
  297. package/src/components/Label/_Label.scss +0 -22
  298. package/src/components/Link/_Link.scss +0 -73
  299. package/src/components/Radio/_Radio.scss +0 -84
  300. package/src/components/SearchBar/_SearchBar.scss +0 -16
  301. package/src/components/Select/_Select.scss +0 -82
  302. package/src/components/StatusBadge/StatusBadge.stories.tsx +0 -33
  303. package/src/components/StatusBadge/_StatusBadge.scss +0 -23
  304. package/src/components/StyleGuide/Colors.stories.tsx +0 -288
  305. package/src/components/Template/Template.stories.tsx +0 -85
  306. package/src/components/Template/_Template.scss +0 -63
  307. package/src/components/TextInput/_TextInput.scss +0 -59
@@ -0,0 +1,58 @@
1
+ declare const Select: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ marginBottom: string;
5
+ helper: {
6
+ marginTop: string;
7
+ marginBottom: string;
8
+ };
9
+ select: {
10
+ borderRadius: string;
11
+ borderColor: string;
12
+ paddingTop: string;
13
+ paddingRight: string;
14
+ paddingBottom: string;
15
+ paddingLeft: string;
16
+ _hover: {
17
+ borderColor: string;
18
+ };
19
+ _active: {
20
+ border: string;
21
+ borderColor: string;
22
+ zIndex: string;
23
+ outline: string;
24
+ outlineColor: string;
25
+ };
26
+ _focus: {
27
+ border: string;
28
+ borderColor: string;
29
+ zIndex: string;
30
+ outline: string;
31
+ outlineColor: string;
32
+ };
33
+ _disabled: {
34
+ color: string;
35
+ bg: string;
36
+ opacity: string;
37
+ };
38
+ _invalid: {
39
+ border: string;
40
+ borderColor: string;
41
+ boxShadow: string;
42
+ };
43
+ };
44
+ };
45
+ variants: {
46
+ searchbar: {
47
+ select: {
48
+ flex: string;
49
+ borderRight: string;
50
+ borderRightRadius: string;
51
+ };
52
+ };
53
+ };
54
+ defaultProps: {
55
+ size: string;
56
+ };
57
+ };
58
+ export default Select;
@@ -0,0 +1,25 @@
1
+ declare const StatusBadge: {
2
+ baseStyle: {
3
+ borderRadius: string;
4
+ color: string;
5
+ display: string;
6
+ fontSize: string;
7
+ fontStyle: string;
8
+ py: string;
9
+ px: string;
10
+ textAlign: string;
11
+ width: string;
12
+ };
13
+ variants: {
14
+ low: {
15
+ bg: string;
16
+ };
17
+ medium: {
18
+ bg: string;
19
+ };
20
+ high: {
21
+ bg: string;
22
+ };
23
+ };
24
+ };
25
+ export default StatusBadge;
@@ -0,0 +1,85 @@
1
+ declare const CustomTabs: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ tab: {
5
+ color: string;
6
+ paddingInlineStart: string;
7
+ paddingLeft: string;
8
+ background: string;
9
+ border: string;
10
+ borderBottom: string;
11
+ borderColor: string;
12
+ marginRight: {
13
+ base: string;
14
+ md: string;
15
+ };
16
+ paddingRight: {
17
+ base: string;
18
+ md: string;
19
+ lg: string;
20
+ };
21
+ whiteSpace: string;
22
+ _hover: {
23
+ bg: string;
24
+ borderTopRadius: string;
25
+ borderBottom: string;
26
+ borderBottomColor: string;
27
+ };
28
+ _selected: {
29
+ fontWeight: string;
30
+ bg: string;
31
+ border: string;
32
+ borderTopRadius: string;
33
+ borderBottom: string;
34
+ borderBottomColor: string;
35
+ paddingBottom: string;
36
+ };
37
+ _focus: {
38
+ boxShadow: string;
39
+ };
40
+ };
41
+ buttonArrows: {
42
+ border: string;
43
+ display: {
44
+ base: string;
45
+ md: string;
46
+ };
47
+ height: string;
48
+ width: string;
49
+ };
50
+ tablistWrapper: {
51
+ display: string;
52
+ alignItems: string;
53
+ borderBottom: {
54
+ base: string;
55
+ md: string;
56
+ };
57
+ margin: {
58
+ base: string;
59
+ md: string;
60
+ };
61
+ overflowX: {
62
+ base: string;
63
+ md: string;
64
+ };
65
+ paddingBottom: {
66
+ base: string;
67
+ md: string;
68
+ };
69
+ paddingLeft: {
70
+ base: string;
71
+ md: string;
72
+ };
73
+ paddingRight: {
74
+ base: string;
75
+ md: string;
76
+ };
77
+ paddingTop: {
78
+ base: string;
79
+ md: string;
80
+ };
81
+ };
82
+ };
83
+ defaultProps: {};
84
+ };
85
+ export default CustomTabs;
@@ -0,0 +1,105 @@
1
+ declare const _default: {
2
+ Template: {
3
+ baseStyle: {
4
+ boxSizing: string;
5
+ color: string;
6
+ overflowX: string;
7
+ "*": {
8
+ boxSizing: string;
9
+ };
10
+ "*::after": {
11
+ boxSizing: string;
12
+ };
13
+ "*::before": {
14
+ boxSizing: string;
15
+ };
16
+ };
17
+ sizes: {};
18
+ defaultProps: {};
19
+ };
20
+ TemplateHeader: {
21
+ baseStyle: {
22
+ marginBottom: number;
23
+ };
24
+ };
25
+ TemplateBreakout: {
26
+ baseStyle: {
27
+ width: string;
28
+ marginBottom: number;
29
+ marginLeft: string;
30
+ marginRight: string;
31
+ };
32
+ };
33
+ TemplateContent: {
34
+ baseStyle: {
35
+ display: string;
36
+ marginBottom: number;
37
+ marginY: number;
38
+ marginX: string;
39
+ maxWidth: string;
40
+ paddingTop: number;
41
+ paddingBottom: number;
42
+ paddingRight: number;
43
+ paddingLeft: number;
44
+ width: string;
45
+ };
46
+ variants: {
47
+ sidebar: {
48
+ display: string;
49
+ flexFlow: {
50
+ base: string;
51
+ md: string;
52
+ };
53
+ };
54
+ };
55
+ };
56
+ TemplateContentTop: {
57
+ baseStyle: {
58
+ flex: string;
59
+ marginBottom: number;
60
+ };
61
+ };
62
+ TemplateContentPrimary: {
63
+ baseStyle: {
64
+ flex: string;
65
+ marginBottom: number;
66
+ };
67
+ variants: {
68
+ left: {
69
+ display: string;
70
+ flexFlow: string;
71
+ order: string;
72
+ marginRight: {
73
+ md: number;
74
+ };
75
+ minWidth: {
76
+ md: number;
77
+ };
78
+ };
79
+ };
80
+ };
81
+ TemplateContentSidebar: {
82
+ baseStyle: {
83
+ flex: string;
84
+ order: {
85
+ md: string;
86
+ };
87
+ marginBottom: number;
88
+ };
89
+ variants: {
90
+ left: {
91
+ marginRight: {
92
+ base: number;
93
+ md: number;
94
+ };
95
+ };
96
+ right: {
97
+ marginLeft: {
98
+ base: number;
99
+ md: number;
100
+ };
101
+ };
102
+ };
103
+ };
104
+ };
105
+ export default _default;
@@ -0,0 +1,20 @@
1
+ declare const Text: {
2
+ baseStyle: (props: any) => {
3
+ fontStyle: string;
4
+ fontWeight: string;
5
+ marginBottom: string;
6
+ };
7
+ variants: {
8
+ default: {};
9
+ caption: {
10
+ fontSize: string;
11
+ };
12
+ tag: {
13
+ fontSize: string;
14
+ };
15
+ mini: {
16
+ fontSize: string;
17
+ };
18
+ };
19
+ };
20
+ export default Text;
@@ -0,0 +1,105 @@
1
+ declare const TextInput: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ marginBottom: string;
5
+ helper: {
6
+ marginTop: string;
7
+ marginBottom: string;
8
+ };
9
+ input: {
10
+ border: string;
11
+ borderColor: string;
12
+ borderRadius: string;
13
+ py: string;
14
+ px: string;
15
+ _hover: {
16
+ borderColor: string;
17
+ };
18
+ _disabled: {
19
+ bgColor: string;
20
+ color: string;
21
+ opacity: string;
22
+ };
23
+ _active: {
24
+ border: string;
25
+ borderColor: string;
26
+ zIndex: string;
27
+ outline: string;
28
+ outlineColor: string;
29
+ };
30
+ _focus: {
31
+ border: string;
32
+ borderColor: string;
33
+ zIndex: string;
34
+ outline: string;
35
+ outlineColor: string;
36
+ };
37
+ _placeholder: {
38
+ color: string;
39
+ fontStyle: string;
40
+ lineHeight: string;
41
+ };
42
+ _invalid: {
43
+ border: string;
44
+ borderColor: string;
45
+ boxShadow: string;
46
+ };
47
+ };
48
+ textarea: {
49
+ lineheight: string;
50
+ minHeight: string;
51
+ border: string;
52
+ borderColor: string;
53
+ borderRadius: string;
54
+ py: string;
55
+ px: string;
56
+ _hover: {
57
+ borderColor: string;
58
+ };
59
+ _disabled: {
60
+ bgColor: string;
61
+ color: string;
62
+ opacity: string;
63
+ };
64
+ _active: {
65
+ border: string;
66
+ borderColor: string;
67
+ zIndex: string;
68
+ outline: string;
69
+ outlineColor: string;
70
+ };
71
+ _focus: {
72
+ border: string;
73
+ borderColor: string;
74
+ zIndex: string;
75
+ outline: string;
76
+ outlineColor: string;
77
+ };
78
+ _placeholder: {
79
+ color: string;
80
+ fontStyle: string;
81
+ lineHeight: string;
82
+ };
83
+ _invalid: {
84
+ border: string;
85
+ borderColor: string;
86
+ boxShadow: string;
87
+ };
88
+ };
89
+ };
90
+ variants: {
91
+ searchBar: {
92
+ flex: string;
93
+ input: {
94
+ borderRightRadius: string;
95
+ };
96
+ };
97
+ searchBarSelect: {
98
+ flex: string;
99
+ input: {
100
+ borderRadius: string;
101
+ };
102
+ };
103
+ };
104
+ };
105
+ export default TextInput;
@@ -0,0 +1,23 @@
1
+ declare const _default: import("@chakra-ui/theme-tools").Breakpoints<{
2
+ sm: string;
3
+ md: string;
4
+ lg: string;
5
+ xl: string;
6
+ "2xl": string;
7
+ }>;
8
+ /**
9
+ * Breakpoints from "src/styles/base/_02-breakpoints.scss"
10
+ * How to use Chakra responsive styles: https://chakra-ui.com/docs/features/responsive-styles
11
+ *
12
+ * Chakra Value | DS Variable | EM/PX value
13
+ * --------------------------------------------------
14
+ * sm | --breakpoint-small | 20em/320px
15
+ * md | --breakpoint-medium | 38em/600px
16
+ * lg | --breakpoint-large | 60em/960px
17
+ * xl | --breakpoint-xl | 80em/1280px
18
+ * 2xl | N/A | 96em/1536px
19
+ *
20
+ * @Note Chakra provides a 2xl option while the DS does not. We don't
21
+ * recommend using this value until further notice.
22
+ */
23
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { Colors } from "@chakra-ui/react";
2
+ declare const colors: Colors;
3
+ export default colors;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * These rules affect all the global elements on the `body` element of the
3
+ * page when the `DSProvider` component is used. This means that even if the
4
+ * `nypl-ds` CSS class name is not used in a consuming application, these
5
+ * rules will still take effect.
6
+ */
7
+ declare const global: {
8
+ body: {
9
+ bg: string;
10
+ color: string;
11
+ fontFamily: string;
12
+ fontSize: number;
13
+ fontWeight: string;
14
+ lineHeight: string;
15
+ };
16
+ a: {
17
+ color: string;
18
+ };
19
+ svg: {
20
+ display: string;
21
+ };
22
+ };
23
+ export default global;
@@ -0,0 +1,4 @@
1
+ declare const shadows: {
2
+ outline: string;
3
+ };
4
+ export default shadows;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * This is based on:
3
+ * root size of 16px or 1rem
4
+ * 1 spacing unit is 4px or 0.25rem
5
+ *
6
+ * Chakra's mental model: If you need a spacing of 40px, divide it by 4.
7
+ * That'll give you 10. Then use it in your component.
8
+ *
9
+ * The DS uses eight CSS variables/values found in "src/styles/03-space/_space.css":
10
+ * --space-xxs = 4px or 0.25rem
11
+ * --space-xs = 8px or 0.5rem
12
+ * --space-s = 16px or 1rem
13
+ * --space-m = 24px or 1.5rem
14
+ * --space-l = 32px or 2rem
15
+ * --space-xl = 48px or 3rem
16
+ * --space-xxl = 64px or 4rem
17
+ * --space-xxxl = 96px or 6rem
18
+ *
19
+ * @note Even though all the following values are available through Chakra,
20
+ * we recommend to only use the spacing values that map to the DS values
21
+ * declared above.
22
+ *
23
+ * Chakra Number Value | Chakra Name value | DS Variable
24
+ * ------------------- | ----------------- | -----------------
25
+ * 1 | xxs | --space-xxs
26
+ * 2 | xs | --space-xs
27
+ * 4 | s | --space-s
28
+ * 6 | m | --space-m
29
+ * 8 | l | --space-l
30
+ * 12 | xl | --space-xl
31
+ * 16 | xxl | --space-xxl
32
+ * 24 | xxxl | --space-xxxl
33
+ */
34
+ export declare const spacing: {
35
+ px: string;
36
+ 0: string;
37
+ 0.5: string;
38
+ xxs: string;
39
+ 1: string;
40
+ 1.5: string;
41
+ xs: string;
42
+ 2: string;
43
+ 2.5: string;
44
+ 3: string;
45
+ 3.5: string;
46
+ s: string;
47
+ 4: string;
48
+ 5: string;
49
+ m: string;
50
+ 6: string;
51
+ 7: string;
52
+ l: string;
53
+ 8: string;
54
+ 9: string;
55
+ 10: string;
56
+ xl: string;
57
+ 12: string;
58
+ 14: string;
59
+ xxl: string;
60
+ 16: string;
61
+ 20: string;
62
+ xxxl: string;
63
+ 24: string;
64
+ 28: string;
65
+ 32: string;
66
+ 36: string;
67
+ 40: string;
68
+ 44: string;
69
+ 48: string;
70
+ 52: string;
71
+ 56: string;
72
+ 60: string;
73
+ 64: string;
74
+ 72: string;
75
+ 80: string;
76
+ 96: string;
77
+ };
@@ -0,0 +1,8 @@
1
+ import { Dict } from "../types";
2
+ declare type Typography = {
3
+ fonts: Dict;
4
+ fontSizes: Dict;
5
+ fontWeights: Dict;
6
+ };
7
+ declare const typography: Typography;
8
+ export default typography;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * See Chakra default theme for shape of theme object:
3
+ * https://github.com/chakra-ui/chakra-ui/tree/main/packages/theme
4
+ *
5
+ * The following are using the default configuration from Chakra:
6
+ * - z-indices
7
+ * - radii
8
+ * - blur
9
+ * - shadows
10
+ * - borders
11
+ * - transitions
12
+ *
13
+ * Theme extensions exist for:
14
+ * - breakpoints
15
+ * - colors
16
+ * - typography (font, font size, font weight)
17
+ * - spacing
18
+ */
19
+ declare const theme: Record<string, any>;
20
+ export default theme;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const DSProvider: ({ children }: {
3
+ children: any;
4
+ }) => JSX.Element;
5
+ export default DSProvider;
@@ -0,0 +1 @@
1
+ export declare type Dict<T = any> = Record<string, T>;
@@ -4,3 +4,9 @@
4
4
  * `step` between values.
5
5
  */
6
6
  export declare const range: (start: number, stop: number, step?: number) => number[];
7
+ /**
8
+ * Map an enum value to a component's Chakra theme variant object. If a wrong
9
+ * value is passed (typically in non-Typescript scenarios), then the "fallback"
10
+ * value, if provided, will be used.
11
+ */
12
+ export declare const getVariant: (variant: any, collection: any, fallback?: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nypl/design-system-react-components",
3
- "version": "0.23.4",
3
+ "version": "0.25.1",
4
4
  "description": "Design System React Components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,9 +38,15 @@
38
38
  "stylelint": "stylelint \"**/*.scss\""
39
39
  },
40
40
  "dependencies": {
41
+ "@chakra-ui/react": "1.6.8",
42
+ "@chakra-ui/system": "1.7.3",
43
+ "@emotion/react": "^11.4.1",
44
+ "@emotion/styled": "^11.3.0",
41
45
  "@mdx-js/react": "^1.6.22",
42
46
  "cpy-cli": "^3.1.1",
47
+ "framer-motion": "^4.1.17",
43
48
  "he": "^1.2.0",
49
+ "react-datepicker": "4.1.1",
44
50
  "react-uid": "^2.3.0",
45
51
  "system-font-css": "^2.0.2",
46
52
  "typescript": "^4.3.5",
@@ -82,7 +88,7 @@
82
88
  "@storybook/addon-jest": "^6.3.6",
83
89
  "@storybook/addon-knobs": "^6.2.9",
84
90
  "@storybook/addon-links": "^6.2.9",
85
- "@storybook/addon-queryparams": "^6.2.9",
91
+ "@storybook/addon-queryparams": "6.2.9",
86
92
  "@storybook/addons": "^6.3.2",
87
93
  "@storybook/react": "^6.3.2",
88
94
  "@svgr/rollup": "^5.5.0",
@@ -117,6 +123,7 @@
117
123
  "node-sass": "^4.14.1",
118
124
  "node-sass-glob-importer": "^5.3.2",
119
125
  "normalize.css": "^8.0.1",
126
+ "postcss": "8.3.6",
120
127
  "prettier": "2.1.1",
121
128
  "pretty-quick": "^3.1.1",
122
129
  "react": "16.14.0",