@nypl/design-system-react-components 0.26.1 → 1.0.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 (307) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +7 -7
  3. package/dist/components/Accordion/Accordion.d.ts +1 -1
  4. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  5. package/dist/components/Button/Button.d.ts +2 -10
  6. package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
  7. package/dist/components/Card/Card.d.ts +2 -2
  8. package/dist/components/Checkbox/Checkbox.d.ts +10 -8
  9. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  10. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  11. package/dist/components/Form/Form.d.ts +2 -2
  12. package/dist/components/Grid/SimpleGrid.d.ts +6 -3
  13. package/dist/components/Heading/Heading.d.ts +2 -5
  14. package/dist/components/HelperErrorText/HelperErrorText.d.ts +1 -5
  15. package/dist/components/Hero/Hero.d.ts +13 -9
  16. package/dist/components/Icons/Icon.d.ts +6 -5
  17. package/dist/components/Icons/IconSvgs.d.ts +21 -21
  18. package/dist/components/Image/Image.d.ts +8 -5
  19. package/dist/components/Link/Link.d.ts +1 -9
  20. package/dist/components/List/List.d.ts +7 -11
  21. package/dist/components/Logo/Logo.d.ts +2 -5
  22. package/dist/components/Logo/LogoSvgs.d.ts +39 -39
  23. package/dist/components/Modal/Modal.d.ts +28 -8
  24. package/dist/components/Notification/Notification.d.ts +1 -1
  25. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  26. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  27. package/dist/components/SearchBar/SearchBar.d.ts +3 -2
  28. package/dist/components/Select/Select.d.ts +2 -5
  29. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -4
  30. package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
  31. package/dist/components/StatusBadge/StatusBadge.d.ts +2 -3
  32. package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
  33. package/dist/components/Table/Table.d.ts +1 -1
  34. package/dist/components/Template/Template.d.ts +2 -0
  35. package/dist/components/Text/Text.d.ts +1 -1
  36. package/dist/components/TextInput/TextInput.d.ts +21 -9
  37. package/dist/components/Toggle/Toggle.d.ts +1 -5
  38. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  39. package/dist/design-system-react-components.cjs.development.js +983 -1222
  40. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  41. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  42. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  43. package/dist/design-system-react-components.esm.js +982 -1285
  44. package/dist/design-system-react-components.esm.js.map +1 -1
  45. package/dist/helpers/types.d.ts +1 -0
  46. package/dist/index.d.ts +27 -48
  47. package/dist/styles.css +1 -1
  48. package/dist/theme/components/buttonGroup.d.ts +11 -0
  49. package/dist/theme/components/card.d.ts +104 -8
  50. package/dist/theme/components/componentWrapper.d.ts +4 -3
  51. package/dist/theme/components/customTable.d.ts +11 -14
  52. package/dist/theme/components/fieldset.d.ts +4 -3
  53. package/dist/theme/components/helperErrorText.d.ts +4 -3
  54. package/dist/theme/components/hero.d.ts +1 -1
  55. package/dist/theme/components/horizontalRule.d.ts +4 -3
  56. package/dist/theme/components/icon.d.ts +47743 -1
  57. package/dist/theme/components/image.d.ts +563 -10
  58. package/dist/theme/components/label.d.ts +4 -3
  59. package/dist/theme/components/list.d.ts +6 -7
  60. package/dist/theme/components/logo.d.ts +474 -1
  61. package/dist/theme/components/notification.d.ts +20 -16
  62. package/dist/theme/components/progressIndicator.d.ts +6 -4
  63. package/dist/theme/components/select.d.ts +4 -10
  64. package/dist/theme/components/skeletonLoader.d.ts +14 -10
  65. package/dist/theme/components/skipNavigation.d.ts +22 -0
  66. package/dist/theme/components/slider.d.ts +7 -6
  67. package/dist/theme/components/structuredContent.d.ts +10 -9
  68. package/dist/theme/components/text.d.ts +7 -1
  69. package/dist/theme/components/toggle.d.ts +6 -4
  70. package/dist/theme/provider.d.ts +2 -4
  71. package/dist/utils/componentCategories.d.ts +1 -1
  72. package/dist/utils/interfaces.d.ts +5 -0
  73. package/dist/utils/utils.d.ts +2 -18
  74. package/package.json +15 -16
  75. package/src/__tests__/setup.ts +3 -3
  76. package/src/__tests__/utils/utils.test.ts +1 -23
  77. package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +22 -14
  78. package/src/components/Accordion/Accordion.stories.mdx +43 -44
  79. package/src/components/Accordion/Accordion.test.tsx +5 -13
  80. package/src/components/Accordion/Accordion.tsx +14 -18
  81. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +6 -6
  82. package/src/components/Autosuggest/Autosuggest.stories.mdx +1 -1
  83. package/src/components/Autosuggest/Autosuggest.stories.tsx +23 -25
  84. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -37
  85. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +4 -17
  86. package/src/components/Breadcrumbs/Breadcrumbs.tsx +18 -21
  87. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +1 -100
  88. package/src/components/Button/Button.stories.mdx +89 -126
  89. package/src/components/Button/Button.test.tsx +16 -30
  90. package/src/components/Button/Button.tsx +14 -20
  91. package/src/components/ButtonGroup/ButtonGroup.stories.mdx +147 -0
  92. package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
  93. package/src/components/ButtonGroup/ButtonGroup.tsx +99 -0
  94. package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
  95. package/src/components/Card/Card.stories.mdx +144 -178
  96. package/src/components/Card/Card.test.tsx +36 -97
  97. package/src/components/Card/Card.tsx +78 -74
  98. package/src/components/Chakra/Box.stories.mdx +3 -7
  99. package/src/components/Chakra/Center.stories.mdx +6 -24
  100. package/src/components/Chakra/Flex.stories.mdx +5 -7
  101. package/src/components/Chakra/Grid.stories.mdx +1 -1
  102. package/src/components/Chakra/Stack.stories.mdx +10 -11
  103. package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
  104. package/src/components/Checkbox/Checkbox.test.tsx +2 -2
  105. package/src/components/Checkbox/Checkbox.tsx +20 -13
  106. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +6 -17
  107. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +1 -7
  108. package/src/components/CheckboxGroup/CheckboxGroup.tsx +33 -29
  109. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +0 -11
  110. package/src/components/ComponentWrapper/ComponentWrapper.tsx +3 -10
  111. package/src/components/DatePicker/DatePicker.stories.mdx +23 -37
  112. package/src/components/DatePicker/DatePicker.test.tsx +21 -19
  113. package/src/components/DatePicker/DatePicker.tsx +57 -49
  114. package/src/components/Form/Form.stories.mdx +46 -31
  115. package/src/components/Form/Form.test.tsx +1 -18
  116. package/src/components/Form/Form.tsx +7 -7
  117. package/src/components/Grid/SimpleGrid.stories.mdx +73 -49
  118. package/src/components/Grid/SimpleGrid.test.tsx +7 -9
  119. package/src/components/Grid/SimpleGrid.tsx +14 -11
  120. package/src/components/Heading/Heading.stories.mdx +27 -72
  121. package/src/components/Heading/Heading.test.tsx +18 -44
  122. package/src/components/Heading/Heading.tsx +7 -10
  123. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +1 -3
  124. package/src/components/HelperErrorText/HelperErrorText.tsx +1 -5
  125. package/src/components/Hero/Hero.stories.mdx +219 -216
  126. package/src/components/Hero/Hero.test.tsx +107 -223
  127. package/src/components/Hero/Hero.tsx +63 -61
  128. package/src/components/Icons/Icon.stories.mdx +172 -118
  129. package/src/components/Icons/Icon.test.tsx +8 -16
  130. package/src/components/Icons/Icon.tsx +75 -29
  131. package/src/components/Icons/IconSvgs.tsx +42 -42
  132. package/src/components/Image/Image.stories.mdx +45 -132
  133. package/src/components/Image/Image.test.tsx +16 -31
  134. package/src/components/Image/Image.tsx +28 -12
  135. package/src/components/Link/Link.stories.mdx +30 -94
  136. package/src/components/Link/Link.test.tsx +25 -75
  137. package/src/components/Link/Link.tsx +43 -56
  138. package/src/components/Link/__snapshots__/Link.test.tsx.snap +1 -2
  139. package/src/components/List/List.stories.mdx +20 -31
  140. package/src/components/List/List.test.tsx +24 -43
  141. package/src/components/List/List.tsx +25 -36
  142. package/src/components/Logo/Logo.stories.mdx +94 -50
  143. package/src/components/Logo/Logo.test.tsx +10 -19
  144. package/src/components/Logo/Logo.tsx +50 -17
  145. package/src/components/Logo/LogoSvgs.tsx +78 -78
  146. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +4 -4
  147. package/src/components/Modal/Modal.stories.mdx +245 -139
  148. package/src/components/Modal/Modal.test.tsx +147 -10
  149. package/src/components/Modal/Modal.tsx +140 -20
  150. package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +25 -0
  151. package/src/components/Notification/Notification.stories.mdx +10 -28
  152. package/src/components/Notification/Notification.test.tsx +9 -12
  153. package/src/components/Notification/Notification.tsx +34 -37
  154. package/src/components/Pagination/Pagination.stories.mdx +3 -4
  155. package/src/components/Pagination/Pagination.tsx +15 -10
  156. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +27 -53
  157. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +9 -10
  158. package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -21
  159. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -10
  160. package/src/components/Radio/Radio.stories.mdx +1 -1
  161. package/src/components/Radio/Radio.tsx +9 -6
  162. package/src/components/RadioGroup/RadioGroup.stories.mdx +15 -16
  163. package/src/components/RadioGroup/RadioGroup.test.tsx +2 -8
  164. package/src/components/RadioGroup/RadioGroup.tsx +28 -24
  165. package/src/components/SearchBar/SearchBar.stories.mdx +4 -4
  166. package/src/components/SearchBar/SearchBar.test.tsx +1 -1
  167. package/src/components/SearchBar/SearchBar.tsx +14 -22
  168. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1 -13
  169. package/src/components/Select/Select.stories.mdx +10 -25
  170. package/src/components/Select/Select.test.tsx +6 -7
  171. package/src/components/Select/Select.tsx +28 -35
  172. package/src/components/Select/__snapshots__/Select.test.tsx.snap +24 -24
  173. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +17 -56
  174. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -21
  175. package/src/components/SkeletonLoader/SkeletonLoader.tsx +9 -8
  176. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +33 -33
  177. package/src/components/SkipNavigation/SkipNavigation.stories.mdx +90 -0
  178. package/src/components/SkipNavigation/SkipNavigation.test.tsx +63 -0
  179. package/src/components/SkipNavigation/SkipNavigation.tsx +51 -0
  180. package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +130 -0
  181. package/src/components/Slider/Slider.stories.mdx +19 -53
  182. package/src/components/Slider/Slider.test.tsx +2 -2
  183. package/src/components/Slider/Slider.tsx +10 -12
  184. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +2 -9
  185. package/src/components/StatusBadge/StatusBadge.stories.mdx +6 -21
  186. package/src/components/StatusBadge/StatusBadge.test.tsx +2 -3
  187. package/src/components/StatusBadge/StatusBadge.tsx +3 -10
  188. package/src/components/StructuredContent/StructuredContent.stories.mdx +30 -58
  189. package/src/components/StructuredContent/StructuredContent.test.tsx +42 -44
  190. package/src/components/StructuredContent/StructuredContent.tsx +9 -18
  191. package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -23
  192. package/src/components/StyleGuide/Buttons.stories.mdx +63 -63
  193. package/src/components/StyleGuide/ColorCard.tsx +2 -4
  194. package/src/components/StyleGuide/Colors.stories.mdx +9 -10
  195. package/src/components/StyleGuide/DesignTokens.stories.mdx +5 -7
  196. package/src/components/StyleGuide/Forms.stories.mdx +2 -2
  197. package/src/components/StyleGuide/Iconography.stories.mdx +60 -78
  198. package/src/components/StyleGuide/Spacing.stories.mdx +1 -2
  199. package/src/components/StyleGuide/Typography.stories.mdx +16 -19
  200. package/src/components/Table/Table.stories.mdx +85 -1
  201. package/src/components/Table/Table.test.tsx +57 -1
  202. package/src/components/Table/Table.tsx +7 -4
  203. package/src/components/Table/__snapshots__/Table.test.tsx.snap +121 -0
  204. package/src/components/Tabs/Tabs.stories.mdx +1 -1
  205. package/src/components/Tabs/Tabs.test.tsx +2 -2
  206. package/src/components/Tabs/Tabs.tsx +26 -27
  207. package/src/components/Template/Template.stories.mdx +49 -54
  208. package/src/components/Template/Template.tsx +9 -3
  209. package/src/components/Text/Text.stories.mdx +5 -11
  210. package/src/components/Text/Text.test.tsx +3 -6
  211. package/src/components/Text/Text.tsx +3 -5
  212. package/src/components/TextInput/TextInput.stories.mdx +10 -22
  213. package/src/components/TextInput/TextInput.test.tsx +32 -62
  214. package/src/components/TextInput/TextInput.tsx +61 -30
  215. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +1 -0
  216. package/src/components/Toggle/Toggle.stories.mdx +5 -16
  217. package/src/components/Toggle/Toggle.test.tsx +2 -3
  218. package/src/components/Toggle/Toggle.tsx +9 -10
  219. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +13 -29
  220. package/src/components/VideoPlayer/VideoPlayer.test.tsx +18 -23
  221. package/src/components/VideoPlayer/VideoPlayer.tsx +13 -10
  222. package/src/docs/Chakra.stories.mdx +14 -11
  223. package/src/docs/Welcome.stories.mdx +23 -43
  224. package/src/helpers/types.ts +1 -0
  225. package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
  226. package/src/hooks/useNYPLTheme.stories.mdx +3 -6
  227. package/src/index.ts +52 -46
  228. package/src/styles.scss +0 -1
  229. package/src/theme/components/buttonGroup.ts +10 -0
  230. package/src/theme/components/card.ts +50 -15
  231. package/src/theme/components/componentWrapper.ts +5 -1
  232. package/src/theme/components/customTable.ts +8 -2
  233. package/src/theme/components/fieldset.ts +5 -1
  234. package/src/theme/components/helperErrorText.ts +5 -1
  235. package/src/theme/components/hero.ts +2 -2
  236. package/src/theme/components/horizontalRule.ts +5 -1
  237. package/src/theme/components/icon.ts +7 -1
  238. package/src/theme/components/image.ts +14 -3
  239. package/src/theme/components/label.ts +5 -1
  240. package/src/theme/components/list.ts +8 -2
  241. package/src/theme/components/logo.ts +5 -1
  242. package/src/theme/components/notification.ts +38 -14
  243. package/src/theme/components/progressIndicator.ts +10 -5
  244. package/src/theme/components/select.ts +5 -6
  245. package/src/theme/components/skeletonLoader.ts +8 -2
  246. package/src/theme/components/skipNavigation.ts +26 -0
  247. package/src/theme/components/slider.ts +13 -1
  248. package/src/theme/components/structuredContent.ts +11 -1
  249. package/src/theme/components/text.ts +12 -5
  250. package/src/theme/components/toggle.ts +9 -3
  251. package/src/theme/foundations/colors.ts +6 -9
  252. package/src/theme/index.ts +4 -0
  253. package/src/theme/provider.tsx +1 -1
  254. package/src/utils/componentCategories.ts +13 -5
  255. package/src/utils/interfaces.ts +5 -0
  256. package/src/utils/utils.ts +2 -32
  257. package/dist/components/Accordion/AccordionTypes.d.ts +0 -5
  258. package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +0 -8
  259. package/dist/components/Button/ButtonTypes.d.ts +0 -8
  260. package/dist/components/DatePicker/DatePickerTypes.d.ts +0 -5
  261. package/dist/components/Form/FormTypes.d.ts +0 -2
  262. package/dist/components/Grid/GridTypes.d.ts +0 -9
  263. package/dist/components/Heading/HeadingTypes.d.ts +0 -14
  264. package/dist/components/Hero/HeroTypes.d.ts +0 -12
  265. package/dist/components/Icons/IconTypes.d.ts +0 -77
  266. package/dist/components/Image/ImageTypes.d.ts +0 -22
  267. package/dist/components/Link/LinkTypes.d.ts +0 -8
  268. package/dist/components/List/ListTypes.d.ts +0 -5
  269. package/dist/components/Logo/LogoTypes.d.ts +0 -54
  270. package/dist/components/Notification/NotificationTypes.d.ts +0 -5
  271. package/dist/components/ProgressIndicator/ProgressIndicatorTypes.d.ts +0 -8
  272. package/dist/components/Select/SelectTypes.d.ts +0 -8
  273. package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -5
  274. package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +0 -5
  275. package/dist/components/StructuredContent/StructuredContentTypes.d.ts +0 -5
  276. package/dist/components/Text/TextTypes.d.ts +0 -6
  277. package/dist/components/TextInput/TextInputTypes.d.ts +0 -25
  278. package/dist/components/Toggle/ToggleTypes.d.ts +0 -4
  279. package/dist/components/VideoPlayer/VideoPlayerTypes.d.ts +0 -9
  280. package/dist/helpers/enums.d.ts +0 -4
  281. package/dist/utils/siteSections.d.ts +0 -2
  282. package/src/components/Accordion/AccordionTypes.tsx +0 -5
  283. package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +0 -8
  284. package/src/components/Button/ButtonTypes.tsx +0 -8
  285. package/src/components/DatePicker/DatePickerTypes.tsx +0 -5
  286. package/src/components/Form/FormTypes.tsx +0 -3
  287. package/src/components/Grid/GridTypes.tsx +0 -9
  288. package/src/components/Heading/HeadingTypes.tsx +0 -15
  289. package/src/components/Hero/HeroTypes.tsx +0 -20
  290. package/src/components/Icons/IconTypes.tsx +0 -83
  291. package/src/components/Image/ImageTypes.ts +0 -24
  292. package/src/components/Link/LinkTypes.tsx +0 -8
  293. package/src/components/List/ListTypes.tsx +0 -5
  294. package/src/components/Logo/LogoTypes.tsx +0 -56
  295. package/src/components/Modal/_Modal.scss +0 -18
  296. package/src/components/Notification/NotificationTypes.tsx +0 -5
  297. package/src/components/ProgressIndicator/ProgressIndicatorTypes.ts +0 -8
  298. package/src/components/Select/SelectTypes.tsx +0 -10
  299. package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
  300. package/src/components/StatusBadge/StatusBadgeTypes.tsx +0 -5
  301. package/src/components/StructuredContent/StructuredContentTypes.tsx +0 -5
  302. package/src/components/Text/TextTypes.tsx +0 -6
  303. package/src/components/TextInput/TextInputTypes.tsx +0 -48
  304. package/src/components/Toggle/ToggleTypes.tsx +0 -4
  305. package/src/components/VideoPlayer/VideoPlayerTypes.tsx +0 -10
  306. package/src/helpers/enums.ts +0 -4
  307. package/src/utils/siteSections.ts +0 -10
@@ -1,4 +1,4 @@
1
- import { ButtonGroup, Flex, Spacer } from "@chakra-ui/react";
1
+ import { Flex, Spacer } from "@chakra-ui/react";
2
2
  import { action } from "@storybook/addon-actions";
3
3
  import {
4
4
  ArgsTable,
@@ -10,25 +10,20 @@ import {
10
10
  import { withDesign } from "storybook-addon-designs";
11
11
 
12
12
  import Button from "../Button/Button";
13
+ import ButtonGroup from "../ButtonGroup/ButtonGroup";
13
14
  import Checkbox from "../Checkbox/Checkbox";
14
15
  import CheckboxGroup from "../CheckboxGroup/CheckboxGroup";
15
16
  import DatePicker from "../DatePicker/DatePicker";
16
- import { DatePickerTypes } from "../DatePicker/DatePickerTypes";
17
17
  import Form, { FormRow, FormField } from "./Form";
18
- import { FormGaps } from "./FormTypes";
19
18
  import Heading from "../Heading/Heading";
20
- import { HeadingLevels } from "../Heading/HeadingTypes";
21
19
  import HorizontalRule from "../HorizontalRule/HorizontalRule";
22
20
  import Label from "../Label/Label";
23
21
  import Radio from "../Radio/Radio";
24
22
  import RadioGroup from "../RadioGroup/RadioGroup";
25
23
  import Select from "../Select/Select";
24
+ import SimpleGrid from "../Grid/SimpleGrid";
26
25
  import TextInput from "../TextInput/TextInput";
27
26
  import { getCategory } from "../../utils/componentCategories";
28
- import SimpleGrid from "../Grid/SimpleGrid";
29
- import { getStorybookEnumValues } from "../../utils/utils";
30
-
31
- export const enumValues = getStorybookEnumValues(FormGaps, "FormGaps");
32
27
 
33
28
  <Meta
34
29
  title={getCategory("Form")}
@@ -50,8 +45,16 @@ export const enumValues = getStorybookEnumValues(FormGaps, "FormGaps");
50
45
  },
51
46
  gap: {
52
47
  control: { type: "select" },
53
- table: { defaultValue: { summary: "FormGaps.Large" } },
54
- options: enumValues.options,
48
+ table: { defaultValue: { summary: "grid.l" } },
49
+ options: [
50
+ "grid.xxs",
51
+ "grid.xs",
52
+ "grid.s",
53
+ "grid.m",
54
+ "grid.l",
55
+ "grid.xl",
56
+ "grid.xxl",
57
+ ],
55
58
  },
56
59
  }}
57
60
  />
@@ -61,7 +64,7 @@ export const enumValues = getStorybookEnumValues(FormGaps, "FormGaps");
61
64
  | Component Version | DS Version |
62
65
  | ----------------- | ---------- |
63
66
  | Added | `0.23.2` |
64
- | Latest | `0.26.0` |
67
+ | Latest | `0.28.0` |
65
68
 
66
69
  ## Table of Contents
67
70
 
@@ -91,10 +94,10 @@ fields as needed.
91
94
  </Form>
92
95
  ```
93
96
 
94
- `FormField` should be used as a parent for all input components from the
97
+ `FormField` should be used as a parent for all input components from the
95
98
  Reservoir Design System (DS) (`Button`, `Select`, `TextInput`, etc.).
96
99
 
97
- `FormRow` should be used as a parent of multiple `FormField` components when
100
+ `FormRow` should be used as a parent of multiple `FormField` components when
98
101
  you need to render multiple input components in a horizontal row.
99
102
 
100
103
  ## Component Props
@@ -107,11 +110,11 @@ you need to render multiple input components in a horizontal row.
107
110
  className: undefined,
108
111
  id: "form-id",
109
112
  method: "get",
110
- gap: "FormGaps.Large",
113
+ gap: "grid.l",
111
114
  }}
112
115
  >
113
116
  {(args) => (
114
- <Form {...args} gap={enumValues.getValue(args.gap)} id="form-id">
117
+ <Form {...args} id="form-id">
115
118
  <FormRow>
116
119
  <FormField>
117
120
  <TextInput
@@ -131,7 +134,7 @@ you need to render multiple input components in a horizontal row.
131
134
  </FormField>
132
135
  <FormField>
133
136
  <DatePicker
134
- dateType={DatePickerTypes.Full}
137
+ dateType="full"
135
138
  dateFormat="yyyy-MM-dd"
136
139
  helperTextFrom="From this date."
137
140
  helperTextTo="To this date."
@@ -293,17 +296,17 @@ Resources:
293
296
 
294
297
  ## Spacing Variants
295
298
 
296
- export const formRow = (nameString, size) => {
297
- const labelText = `Size: ${nameString} (${size})`;
299
+ export const formRow = (gapValue) => {
300
+ const labelText = `Size: ${gapValue}`;
298
301
  return (
299
- <li key={size}>
300
- <Heading level={HeadingLevels.Three}>{labelText}</Heading>
301
- <Form gap={size} id={`form-spacing-${size}`}>
302
+ <li key={gapValue}>
303
+ <Heading level="three">{labelText}</Heading>
304
+ <Form gap={gapValue} id={`form-spacing-${gapValue}`}>
302
305
  <FormRow>
303
306
  <FormField>
304
307
  <Select
305
308
  helperText="The select field helper text."
306
- id={`select-spacing-${size}-1`}
309
+ id={`select-spacing-${gapValue}-1`}
307
310
  labelText="Select Field"
308
311
  showLabel={true}
309
312
  >
@@ -316,7 +319,7 @@ export const formRow = (nameString, size) => {
316
319
  <FormField>
317
320
  <Select
318
321
  helperText="The select field helper text."
319
- id={`select-spacing-${size}-2`}
322
+ id={`select-spacing-${gapValue}-2`}
320
323
  labelText="Select Field"
321
324
  showLabel={true}
322
325
  >
@@ -329,7 +332,7 @@ export const formRow = (nameString, size) => {
329
332
  <FormField>
330
333
  <Select
331
334
  helperText="The select field helper text."
332
- id={`select-spacing-${size}-3`}
335
+ id={`select-spacing-${gapValue}-3`}
333
336
  labelText="Select Field"
334
337
  showLabel={true}
335
338
  >
@@ -346,18 +349,30 @@ export const formRow = (nameString, size) => {
346
349
  );
347
350
  };
348
351
  export const sizes = [];
349
- for (const formGap in FormGaps) {
350
- sizes.push(formRow(`FormGaps.${formGap}`, FormGaps[formGap]));
352
+ export const gapValues = [
353
+ "grid.xxs",
354
+ "grid.xs",
355
+ "grid.s",
356
+ "grid.m",
357
+ "grid.l",
358
+ "grid.xl",
359
+ "grid.xxl",
360
+ ];
361
+ for (const gap in gapValues) {
362
+ sizes.push(formRow(gapValues[gap]));
351
363
  }
352
364
  export const getForms = (list) => <ul style={{ listStyle: "none" }}>{list}</ul>;
353
365
 
354
366
  By default, the `Form` component will handle the NYPL spacing around form input
355
- elements. The default spacing value is `large`, which corresponds to the CSS
356
- variable `--nypl-space-l` (2rem / 32px).
367
+ elements. The default spacing value is large `grid.l`, which corresponds to the
368
+ CSS variable `--nypl-space-l` (2rem / 32px).
357
369
 
358
- **IMPORTANT:** The default spacing should not be overwritten without a very good reason.
370
+ **IMPORTANT:** The default spacing should not be overwritten without a very
371
+ good reason.
359
372
 
360
- Below are the spacing variants available with the `FormGaps` enum.
373
+ Below are examples of the spacing values available to use in the `gap` prop of
374
+ the `Form` component: `"grid.xxs"`, `"grid.xs"`, `"grid.s"`, `"grid.m"`,
375
+ `"grid.l"`, `"grid.xl"`, `"grid.xxl"`.
361
376
 
362
377
  <Canvas>
363
378
  <Story name="Spacing Variants">{getForms(sizes)}</Story>
@@ -366,7 +381,7 @@ Below are the spacing variants available with the `FormGaps` enum.
366
381
  ## Example Code
367
382
 
368
383
  ```jsx
369
- <Form action="/end/point" method="get" gap={FormGaps.Large} id="example-form">
384
+ <Form action="/end/point" method="get" gap="grid.l" id="example-form">
370
385
  <FormField>
371
386
  <TextInput
372
387
  labelText="Username"
@@ -4,7 +4,6 @@ import { axe } from "jest-axe";
4
4
  import renderer from "react-test-renderer";
5
5
 
6
6
  import Form, { FormRow, FormField } from "./Form";
7
- // import { FormGaps } from "./FormTypes";
8
7
  import TextInput from "../TextInput/TextInput";
9
8
 
10
9
  describe("Form Accessibility", () => {
@@ -117,7 +116,7 @@ describe("Form", () => {
117
116
  );
118
117
  const form = screen.getByRole("form");
119
118
  const formRow = form.firstChild;
120
- const formField = formRow.firstChild;
119
+ const formField = formRow?.firstChild;
121
120
  const textInput = screen.getByRole("textbox");
122
121
  expect(form).toBeInTheDocument();
123
122
  expect(formRow).toBeInTheDocument();
@@ -232,20 +231,4 @@ describe("Form", () => {
232
231
  "NYPL Reservoir Form: This component's required `id` prop was not passed."
233
232
  );
234
233
  });
235
-
236
- // TO DO: There's somethign weird about checking for the "grid-gap" style.
237
- // Other styles can be validated, but "grid-gap" is being ellusive.
238
- // it("Renders a <form> element with spacing variant applied", () => {
239
- // render(
240
- // <Form gap={FormGaps.ExtraSmall}>
241
- // <FormRow />
242
- // </Form>
243
- // );
244
- // const form = screen.getByRole("form");
245
- // const formRow = form.firstChild;
246
- // expect(form).toBeInTheDocument();
247
- // expect(formRow).toHaveStyle({
248
- // "grid-gap": "var(--nypl-space-xs)",
249
- // });
250
- // });
251
234
  });
@@ -1,8 +1,7 @@
1
1
  import { chakra } from "@chakra-ui/react";
2
2
  import * as React from "react";
3
3
 
4
- import { FormGaps } from "./FormTypes";
5
- import SimpleGrid from "../Grid/SimpleGrid";
4
+ import SimpleGrid, { GridGaps } from "../Grid/SimpleGrid";
6
5
 
7
6
  interface FormBaseProps {
8
7
  /** className to be applied to FormRow, FormField, and Form */
@@ -10,7 +9,7 @@ interface FormBaseProps {
10
9
  /** Optional spacing size; if omitted, the default `large` (2rem / 32px)
11
10
  * spacing will be used; ```IMPORTANT: for general form layout, this prop
12
11
  * should not be used``` */
13
- gap?: FormGaps;
12
+ gap?: GridGaps;
14
13
  /** ID that other components can cross reference (internal use) */
15
14
  id: string;
16
15
  }
@@ -32,7 +31,7 @@ export const FormRow = chakra(
32
31
  const { children, className, gap, id, ...rest } = props;
33
32
  const count = React.Children.count(children);
34
33
  const alteredChildren = React.Children.map(
35
- children,
34
+ children as JSX.Element,
36
35
  (child: React.ReactElement, i) => {
37
36
  if (!child) return null;
38
37
  if (child.type === FormField || child.props.mdxType === "FormField") {
@@ -77,7 +76,7 @@ export const Form = chakra(
77
76
  action,
78
77
  children,
79
78
  className,
80
- gap = FormGaps.Large,
79
+ gap = "grid.l",
81
80
  id,
82
81
  method,
83
82
  onSubmit,
@@ -89,7 +88,8 @@ export const Form = chakra(
89
88
  "NYPL Reservoir Form: This component's required `id` prop was not passed."
90
89
  );
91
90
  }
92
- let attributes = {};
91
+
92
+ const attributes: Partial<FormProps> = {};
93
93
  action && (attributes["action"] = action);
94
94
 
95
95
  method &&
@@ -97,7 +97,7 @@ export const Form = chakra(
97
97
  (attributes["method"] = method);
98
98
 
99
99
  const alteredChildren = React.Children.map(
100
- children,
100
+ children as JSX.Element,
101
101
  (child: React.ReactElement, i) => {
102
102
  return React.cloneElement(child, { gap, id: `${id}-child${i}` });
103
103
  }
@@ -8,24 +8,11 @@ import {
8
8
  import { withDesign } from "storybook-addon-designs";
9
9
 
10
10
  import SimpleGrid from "./SimpleGrid";
11
- import { GridGaps } from "./GridTypes";
12
11
  import Card, { CardHeading, CardContent, CardActions } from "../Card/Card";
13
- import { HeadingSizes, HeadingLevels } from "../Heading/HeadingTypes";
14
12
  import Icon from "../Icons/Icon";
15
- import {
16
- IconNames,
17
- LogoNames,
18
- IconSizes,
19
- IconRotationTypes,
20
- } from "../Icons/IconTypes";
21
13
  import Image from "../Image/Image";
22
- import { ImageRatios } from "../Image/ImageTypes";
23
- import { LayoutTypes } from "../../helpers/enums";
24
14
  import { getCategory } from "../../utils/componentCategories";
25
15
  import DSProvider from "../../theme/provider";
26
- import { getStorybookEnumValues } from "../../utils/utils";
27
-
28
- export const enumValues = getStorybookEnumValues(GridGaps, "GridGaps");
29
16
 
30
17
  <Meta
31
18
  title={getCategory("SimpleGrid")}
@@ -45,8 +32,16 @@ export const enumValues = getStorybookEnumValues(GridGaps, "GridGaps");
45
32
  },
46
33
  gap: {
47
34
  control: { type: "select" },
48
- options: enumValues.options,
49
- table: { defaultValue: { summary: "GridGaps.Large" } },
35
+ table: { defaultValue: { summary: "grid.l" } },
36
+ options: [
37
+ "grid.xxs",
38
+ "grid.xs",
39
+ "grid.s",
40
+ "grid.m",
41
+ "grid.l",
42
+ "grid.xl",
43
+ "grid.xxl",
44
+ ],
50
45
  },
51
46
  id: { control: false },
52
47
  }}
@@ -57,7 +52,7 @@ export const enumValues = getStorybookEnumValues(GridGaps, "GridGaps");
57
52
  | Component Version | DS Version |
58
53
  | ----------------- | ---------- |
59
54
  | Added | `0.25.1` |
60
- | Latest | `0.26.0` |
55
+ | Latest | `0.28.0` |
61
56
 
62
57
  ## Table of Contents
63
58
 
@@ -87,20 +82,20 @@ will be triggered.
87
82
  args={{
88
83
  className: undefined,
89
84
  columns: undefined,
90
- gap: "GridGaps.Large",
85
+ gap: "grid.l",
91
86
  id: "simpleGrid-id",
92
87
  }}
93
88
  >
94
89
  {(args) => (
95
- <SimpleGrid {...args} gap={enumValues.getValue(args.gap)}>
90
+ <SimpleGrid {...args}>
96
91
  <Card
97
92
  imageProps={{
98
93
  alt: "Alt text",
99
- aspectRatio: ImageRatios.TwoByOne,
94
+ aspectRatio: "twoByOne",
100
95
  src: "https://placeimg.com/400/220/animals",
101
96
  }}
102
97
  >
103
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
98
+ <CardHeading level="three">Card Heading</CardHeading>
104
99
  <CardContent>
105
100
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
106
101
  libero, a pharetra augue.
@@ -109,11 +104,11 @@ will be triggered.
109
104
  <Card
110
105
  imageProps={{
111
106
  alt: "Alt text",
112
- aspectRatio: ImageRatios.TwoByOne,
107
+ aspectRatio: "twoByOne",
113
108
  src: "https://placeimg.com/400/220/animals",
114
109
  }}
115
110
  >
116
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
111
+ <CardHeading level="three">Card Heading</CardHeading>
117
112
  <CardContent>
118
113
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
119
114
  libero, a pharetra augue.
@@ -122,11 +117,11 @@ will be triggered.
122
117
  <Card
123
118
  imageProps={{
124
119
  alt: "Alt text",
125
- aspectRatio: ImageRatios.TwoByOne,
120
+ aspectRatio: "twoByOne",
126
121
  src: "https://placeimg.com/400/240/animals",
127
122
  }}
128
123
  >
129
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
124
+ <CardHeading level="three">Card Heading</CardHeading>
130
125
  <CardContent>
131
126
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
132
127
  libero, a pharetra augue.
@@ -135,11 +130,11 @@ will be triggered.
135
130
  <Card
136
131
  imageProps={{
137
132
  alt: "Alt text",
138
- aspectRatio: ImageRatios.TwoByOne,
133
+ aspectRatio: "twoByOne",
139
134
  src: "https://placeimg.com/400/260/animals",
140
135
  }}
141
136
  >
142
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
137
+ <CardHeading level="three">Card Heading</CardHeading>
143
138
  <CardContent>
144
139
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
145
140
  libero, a pharetra augue.
@@ -148,11 +143,11 @@ will be triggered.
148
143
  <Card
149
144
  imageProps={{
150
145
  alt: "Alt text",
151
- aspectRatio: ImageRatios.TwoByOne,
146
+ aspectRatio: "twoByOne",
152
147
  src: "https://placeimg.com/400/320/animals",
153
148
  }}
154
149
  >
155
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
150
+ <CardHeading level="three">Card Heading</CardHeading>
156
151
  <CardContent>
157
152
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
158
153
  libero, a pharetra augue.
@@ -161,11 +156,11 @@ will be triggered.
161
156
  <Card
162
157
  imageProps={{
163
158
  alt: "Alt text",
164
- aspectRatio: ImageRatios.TwoByOne,
159
+ aspectRatio: "twoByOne",
165
160
  src: "https://placeimg.com/400/300/animals",
166
161
  }}
167
162
  >
168
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
163
+ <CardHeading level="three">Card Heading</CardHeading>
169
164
  <CardContent>
170
165
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
171
166
  libero, a pharetra augue.
@@ -197,15 +192,42 @@ Resources:
197
192
  This example is rendering `Icon` components with the `columns` prop set to `5`.
198
193
 
199
194
  export const icons = [];
200
- for (const icon in IconNames) {
201
- const iname = `Example icon: ${IconNames[icon]}`;
195
+ export const iconNames = [
196
+ "accessibilityFull",
197
+ "accessibilityPartial",
198
+ "actionCheckCircle",
199
+ "actionHelpDefault",
200
+ "actionHelpOutline",
201
+ "alertNotificationImportant",
202
+ "actionLaunch",
203
+ "arrow",
204
+ "check",
205
+ "clock",
206
+ "close",
207
+ "download",
208
+ "errorFilled",
209
+ "errorOutline",
210
+ "fileTypeAudio",
211
+ "fileTypeDoc",
212
+ "fileTypeGenericDoc",
213
+ "fileTypeImage",
214
+ "fileTypePdf",
215
+ "fileTypeSpreadsheet",
216
+ "fileTypeVideo",
217
+ "headset",
218
+ "minus",
219
+ "plus",
220
+ "search",
221
+ "speakerNotes",
222
+ "utilityAccountFilled",
223
+ "utilityAccountUnfilled",
224
+ "utilityHamburger",
225
+ "utilitySearch",
226
+ ];
227
+ for (const name in iconNames) {
228
+ const iname = `Example icon: ${iconNames[name]}`;
202
229
  const iconRender = (
203
- <Icon
204
- key={icon}
205
- name={IconNames[icon]}
206
- size={IconSizes.ExtraExtraExtraLarge}
207
- titleText={iname}
208
- />
230
+ <Icon key={name} name={iconNames[name]} size="xxxlarge" title={iname} />
209
231
  );
210
232
  icons.push(iconRender);
211
233
  }
@@ -218,7 +240,8 @@ for (const icon in IconNames) {
218
240
 
219
241
  ### Images
220
242
 
221
- This example is rendering square `Image` components with the `columns` prop set to `6`.
243
+ This example is rendering square `Image` components with the `columns` prop set
244
+ to `6`.
222
245
 
223
246
  <Canvas>
224
247
  <DSProvider>
@@ -247,7 +270,8 @@ This example is rendering square `Image` components with the `columns` prop set
247
270
 
248
271
  ### Horizontal Cards
249
272
 
250
- This example is rendering horizontal `Card` components with the `columns` prop set to `1`.
273
+ This example is rendering horizontal `Card` components with the `columns` prop
274
+ set to `1`.
251
275
 
252
276
  <Canvas>
253
277
  <DSProvider>
@@ -255,14 +279,14 @@ This example is rendering horizontal `Card` components with the `columns` prop s
255
279
  <Card
256
280
  imageProps={{
257
281
  alt: "Alt text",
258
- aspectRatio: ImageRatios.FourByThree,
282
+ aspectRatio: "fourByThree",
259
283
  src: "https://placeimg.com/400/200/animals",
260
284
  }}
261
285
  isBordered
262
286
  isCentered
263
- layout={LayoutTypes.Row}
287
+ layout="row"
264
288
  >
265
- <CardHeading level={HeadingLevels.Four} id="heading1">
289
+ <CardHeading level="four" id="heading1">
266
290
  Card Heading
267
291
  </CardHeading>
268
292
  <CardContent>
@@ -274,14 +298,14 @@ This example is rendering horizontal `Card` components with the `columns` prop s
274
298
  <Card
275
299
  imageProps={{
276
300
  alt: "Alt text",
277
- aspectRatio: ImageRatios.FourByThree,
301
+ aspectRatio: "fourByThree",
278
302
  src: "https://placeimg.com/410/210/animals",
279
303
  }}
280
304
  isBordered
281
305
  isCentered
282
- layout={LayoutTypes.Row}
306
+ layout="row"
283
307
  >
284
- <CardHeading level={HeadingLevels.Four} id="heading2">
308
+ <CardHeading level="four" id="heading2">
285
309
  Card Heading
286
310
  </CardHeading>
287
311
  <CardContent>
@@ -293,14 +317,14 @@ This example is rendering horizontal `Card` components with the `columns` prop s
293
317
  <Card
294
318
  imageProps={{
295
319
  alt: "Alt text",
296
- aspectRatio: ImageRatios.FourByThree,
320
+ aspectRatio: "fourByThree",
297
321
  src: "https://placeimg.com/320/320/animals",
298
322
  }}
299
323
  isBordered
300
324
  isCentered
301
- layout={LayoutTypes.Row}
325
+ layout="row"
302
326
  >
303
- <CardHeading level={HeadingLevels.Four} id="heading3">
327
+ <CardHeading level="four" id="heading3">
304
328
  Card Heading
305
329
  </CardHeading>
306
330
  <CardContent>
@@ -3,10 +3,8 @@ import { render } from "@testing-library/react";
3
3
  import { axe } from "jest-axe";
4
4
  import renderer from "react-test-renderer";
5
5
 
6
- import SimpleGrid from "./SimpleGrid";
7
6
  import Card, { CardHeading, CardContent } from "../Card/Card";
8
- import { ImageRatios } from "../Image/ImageTypes";
9
- import { HeadingLevels } from "../Heading/HeadingTypes";
7
+ import SimpleGrid from "./SimpleGrid";
10
8
 
11
9
  describe("Grid Accessibility", () => {
12
10
  it("passes axe accessibility test with children components", async () => {
@@ -15,11 +13,11 @@ describe("Grid Accessibility", () => {
15
13
  <Card
16
14
  imageProps={{
17
15
  alt: "Alt text",
18
- aspectRatio: ImageRatios.TwoByOne,
16
+ aspectRatio: "twoByOne",
19
17
  src: "https://placeimg.com/500/200/animals",
20
18
  }}
21
19
  >
22
- <CardHeading level={HeadingLevels.Two}>Card Heading</CardHeading>
20
+ <CardHeading level="two">Card Heading</CardHeading>
23
21
  <CardContent>
24
22
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
25
23
  libero, a pharetra augue.
@@ -28,11 +26,11 @@ describe("Grid Accessibility", () => {
28
26
  <Card
29
27
  imageProps={{
30
28
  alt: "Alt text",
31
- aspectRatio: ImageRatios.TwoByOne,
29
+ aspectRatio: "twoByOne",
32
30
  src: "https://placeimg.com/400/220/animals",
33
31
  }}
34
32
  >
35
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
33
+ <CardHeading level="three">Card Heading</CardHeading>
36
34
  <CardContent>
37
35
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
38
36
  libero, a pharetra augue.
@@ -41,11 +39,11 @@ describe("Grid Accessibility", () => {
41
39
  <Card
42
40
  imageProps={{
43
41
  alt: "Alt text",
44
- aspectRatio: ImageRatios.TwoByOne,
42
+ aspectRatio: "twoByOne",
45
43
  src: "https://placeimg.com/400/240/animals",
46
44
  }}
47
45
  >
48
- <CardHeading level={HeadingLevels.Three}>Card Heading</CardHeading>
46
+ <CardHeading level="three">Card Heading</CardHeading>
49
47
  <CardContent>
50
48
  Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
51
49
  libero, a pharetra augue.
@@ -1,13 +1,23 @@
1
1
  import { chakra, SimpleGrid as ChakraSimpleGrid } from "@chakra-ui/react";
2
2
  import * as React from "react";
3
3
 
4
- import { GridGaps } from "./GridTypes";
4
+ export type GridGaps =
5
+ | "grid.xxs"
6
+ | "grid.xs"
7
+ | "grid.s"
8
+ | "grid.m"
9
+ | "grid.l"
10
+ | "grid.xl"
11
+ | "grid.xxl";
5
12
  export interface SimpleGridProps {
6
13
  /** Additional class name. */
7
14
  className?: string;
8
- /** Optional numeric value to override the default column count; the default column count is 3 */
15
+ /** Optional numeric value to override the default column count; the default
16
+ * column count is 3. */
9
17
  columns?: number;
10
- /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing will be used; ```IMPORTANT: for standard grid layouts, this prop should not be used``` */
18
+ /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing
19
+ * will be used; `IMPORTANT: for standard grid layouts, this prop should
20
+ * not be used.` */
11
21
  gap?: GridGaps;
12
22
  /** ID that other components can cross reference for accessibility purposes */
13
23
  id?: string;
@@ -15,14 +25,7 @@ export interface SimpleGridProps {
15
25
 
16
26
  export const SimpleGrid = chakra(
17
27
  (props: React.PropsWithChildren<SimpleGridProps>) => {
18
- const {
19
- children,
20
- columns,
21
- className,
22
- gap = GridGaps.Large,
23
- id,
24
- ...rest
25
- } = props;
28
+ const { children, columns, className, gap = "grid.l", id, ...rest } = props;
26
29
 
27
30
  const responsiveCols = columns
28
31
  ? { base: 1, md: columns }