@nypl/design-system-react-components 0.25.7 → 0.25.10

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 (293) hide show
  1. package/CHANGELOG.md +119 -1
  2. package/README.md +1 -1
  3. package/dist/components/Button/Button.d.ts +6 -6
  4. package/dist/components/Button/ButtonTypes.d.ts +0 -1
  5. package/dist/components/Card/Card.d.ts +6 -4
  6. package/dist/components/Checkbox/Checkbox.d.ts +3 -2
  7. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +3 -2
  8. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +8 -2
  9. package/dist/components/DatePicker/DatePicker.d.ts +4 -3
  10. package/dist/components/Fieldset/Fieldset.d.ts +1 -3
  11. package/dist/components/Form/Form.d.ts +15 -14
  12. package/dist/components/Form/FormTypes.d.ts +2 -2
  13. package/dist/components/Heading/Heading.d.ts +7 -3
  14. package/dist/components/Heading/HeadingTypes.d.ts +6 -6
  15. package/dist/components/HelperErrorText/HelperErrorText.d.ts +5 -2
  16. package/dist/components/HorizontalRule/HorizontalRule.d.ts +3 -3
  17. package/dist/components/Icons/Icon.d.ts +4 -4
  18. package/dist/components/Icons/IconSvgs.d.ts +1 -21
  19. package/dist/components/Icons/IconTypes.d.ts +1 -23
  20. package/dist/components/Image/Image.d.ts +11 -3
  21. package/dist/components/Image/ImageTypes.d.ts +3 -1
  22. package/dist/components/Link/LinkTypes.d.ts +1 -0
  23. package/dist/components/Logo/Logo.d.ts +28 -0
  24. package/dist/components/Logo/LogoSvgs.d.ts +18 -0
  25. package/dist/components/Logo/LogoTypes.d.ts +30 -0
  26. package/dist/components/Modal/Modal.d.ts +0 -4
  27. package/dist/components/Notification/Notification.d.ts +4 -2
  28. package/dist/components/Placeholder/Placeholder.d.ts +3 -5
  29. package/dist/components/Radio/Radio.d.ts +6 -5
  30. package/dist/components/RadioGroup/RadioGroup.d.ts +6 -5
  31. package/dist/components/SearchBar/SearchBar.d.ts +15 -7
  32. package/dist/components/Select/Select.d.ts +5 -2
  33. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +8 -4
  34. package/dist/components/Slider/Slider.d.ts +3 -2
  35. package/dist/components/StatusBadge/StatusBadge.d.ts +2 -1
  36. package/dist/components/StructuredContent/StructuredContent.d.ts +41 -0
  37. package/dist/components/StructuredContent/StructuredContentTypes.d.ts +5 -0
  38. package/dist/components/Table/Table.d.ts +29 -0
  39. package/dist/components/Template/Template.d.ts +30 -6
  40. package/dist/components/Text/Text.d.ts +2 -2
  41. package/dist/components/TextInput/TextInput.d.ts +4 -3
  42. package/dist/components/Toggle/Toggle.d.ts +48 -0
  43. package/dist/components/Toggle/ToggleSizes.d.ts +4 -0
  44. package/dist/components/VideoPlayer/VideoPlayer.d.ts +17 -6
  45. package/dist/design-system-react-components.cjs.development.js +4698 -4405
  46. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  47. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  48. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  49. package/dist/design-system-react-components.esm.js +5862 -5573
  50. package/dist/design-system-react-components.esm.js.map +1 -1
  51. package/dist/index.d.ts +13 -8
  52. package/dist/resources.scss +0 -2
  53. package/dist/styles.css +2 -2
  54. package/dist/theme/components/breadcrumb.d.ts +1 -1
  55. package/dist/theme/components/button.d.ts +0 -12
  56. package/dist/theme/components/card.d.ts +14 -2
  57. package/dist/theme/components/customTable.d.ts +56 -0
  58. package/dist/theme/components/fieldset.d.ts +2 -2
  59. package/dist/theme/components/global.d.ts +1 -1
  60. package/dist/theme/components/heading.d.ts +4 -0
  61. package/dist/theme/components/label.d.ts +1 -1
  62. package/dist/theme/components/link.d.ts +14 -1
  63. package/dist/theme/components/list.d.ts +0 -2
  64. package/dist/theme/components/logo.d.ts +4 -0
  65. package/dist/theme/components/notification.d.ts +8 -4
  66. package/dist/theme/components/searchBar.d.ts +7 -13
  67. package/dist/theme/components/select.d.ts +1 -0
  68. package/dist/theme/components/structuredContent.d.ts +33 -0
  69. package/dist/theme/components/template.d.ts +10 -10
  70. package/dist/theme/components/textInput.d.ts +2 -0
  71. package/dist/theme/components/toggle.d.ts +71 -0
  72. package/dist/theme/foundations/spacing.d.ts +2 -0
  73. package/dist/utils/utils.d.ts +10 -0
  74. package/package.json +40 -37
  75. package/src/__tests__/utils/utils.test.ts +23 -1
  76. package/src/components/Accordion/Accordion.stories.mdx +16 -15
  77. package/src/components/Accordion/Accordion.test.tsx +45 -1
  78. package/src/components/Accordion/Accordion.tsx +20 -8
  79. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +243 -0
  80. package/src/components/Autosuggest/Autosuggest.stories.mdx +2 -1
  81. package/src/components/Autosuggest/Autosuggest.stories.tsx +24 -48
  82. package/src/components/Autosuggest/_Autosuggest.scss +2 -6
  83. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +43 -13
  84. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +25 -0
  85. package/src/components/Breadcrumbs/Breadcrumbs.tsx +9 -3
  86. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +103 -4
  87. package/src/components/Button/Button.stories.mdx +93 -48
  88. package/src/components/Button/Button.test.tsx +0 -12
  89. package/src/components/Button/Button.tsx +7 -8
  90. package/src/components/Button/ButtonTypes.tsx +0 -1
  91. package/src/components/Button/__snapshots__/Button.test.tsx.snap +0 -12
  92. package/src/components/Card/Card.stories.mdx +246 -64
  93. package/src/components/Card/Card.test.tsx +45 -22
  94. package/src/components/Card/Card.tsx +30 -14
  95. package/src/components/Card/__snapshots__/Card.test.tsx.snap +75 -37
  96. package/src/components/Chakra/Box.stories.mdx +3 -3
  97. package/src/components/Chakra/Center.stories.mdx +5 -5
  98. package/src/components/Chakra/Flex.stories.mdx +113 -0
  99. package/src/components/Chakra/Grid.stories.mdx +14 -17
  100. package/src/components/Chakra/Stack.stories.mdx +2 -2
  101. package/src/components/Checkbox/Checkbox.stories.mdx +37 -15
  102. package/src/components/Checkbox/Checkbox.tsx +13 -8
  103. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +48 -16
  104. package/src/components/CheckboxGroup/CheckboxGroup.tsx +14 -10
  105. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +6 -3
  106. package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +151 -0
  107. package/src/components/ComponentWrapper/ComponentWrapper.tsx +36 -23
  108. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +85 -0
  109. package/src/components/DatePicker/DatePicker.stories.mdx +63 -18
  110. package/src/components/DatePicker/DatePicker.test.tsx +14 -12
  111. package/src/components/DatePicker/DatePicker.tsx +13 -10
  112. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +41 -22
  113. package/src/components/Fieldset/Fieldset.stories.mdx +20 -9
  114. package/src/components/Fieldset/Fieldset.tsx +2 -4
  115. package/src/components/Form/Form.stories.mdx +75 -49
  116. package/src/components/Form/Form.test.tsx +92 -3
  117. package/src/components/Form/Form.tsx +28 -23
  118. package/src/components/Form/FormTypes.tsx +2 -2
  119. package/src/components/Form/__snapshots__/Form.test.tsx.snap +0 -1
  120. package/src/components/Grid/SimpleGrid.stories.mdx +26 -26
  121. package/src/components/Heading/Heading.stories.mdx +59 -23
  122. package/src/components/Heading/Heading.test.tsx +82 -18
  123. package/src/components/Heading/Heading.tsx +31 -31
  124. package/src/components/Heading/HeadingTypes.tsx +6 -6
  125. package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +71 -0
  126. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +55 -27
  127. package/src/components/HelperErrorText/HelperErrorText.test.tsx +42 -15
  128. package/src/components/HelperErrorText/HelperErrorText.tsx +24 -24
  129. package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +41 -4
  130. package/src/components/Hero/Hero.stories.mdx +72 -53
  131. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +11 -9
  132. package/src/components/HorizontalRule/HorizontalRule.tsx +4 -6
  133. package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +4 -4
  134. package/src/components/Icons/Icon.stories.mdx +77 -75
  135. package/src/components/Icons/Icon.tsx +4 -5
  136. package/src/components/Icons/IconSvgs.tsx +2 -42
  137. package/src/components/Icons/IconTypes.tsx +1 -24
  138. package/src/components/Image/Image.stories.mdx +214 -104
  139. package/src/components/Image/Image.test.tsx +10 -0
  140. package/src/components/Image/Image.tsx +21 -10
  141. package/src/components/Image/ImageTypes.ts +2 -0
  142. package/src/components/Image/__snapshots__/Image.test.tsx.snap +24 -8
  143. package/src/components/Label/Label.stories.mdx +21 -20
  144. package/src/components/Link/Link.stories.mdx +103 -53
  145. package/src/components/Link/Link.test.tsx +108 -7
  146. package/src/components/Link/Link.tsx +58 -19
  147. package/src/components/Link/LinkTypes.tsx +1 -0
  148. package/src/components/Link/__snapshots__/Link.test.tsx.snap +261 -0
  149. package/src/components/List/List.stories.mdx +37 -25
  150. package/src/components/List/List.tsx +1 -1
  151. package/src/components/Logo/Logo.stories.mdx +220 -0
  152. package/src/components/Logo/Logo.test.tsx +98 -0
  153. package/src/components/Logo/Logo.tsx +97 -0
  154. package/src/components/Logo/LogoSvgs.tsx +34 -0
  155. package/src/components/Logo/LogoTypes.tsx +32 -0
  156. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +71 -0
  157. package/src/components/Modal/Modal.stories.mdx +20 -5
  158. package/src/components/Modal/Modal.tsx +2 -8
  159. package/src/components/Notification/Notification.stories.mdx +96 -40
  160. package/src/components/Notification/Notification.test.tsx +62 -16
  161. package/src/components/Notification/Notification.tsx +26 -9
  162. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +121 -0
  163. package/src/components/Pagination/Pagination.stories.mdx +19 -9
  164. package/src/components/Pagination/Pagination.tsx +3 -3
  165. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +42 -0
  166. package/src/components/Placeholder/Placeholder.tsx +7 -14
  167. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +74 -46
  168. package/src/components/Radio/Radio.stories.mdx +39 -19
  169. package/src/components/Radio/Radio.tsx +13 -9
  170. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +5 -5
  171. package/src/components/RadioGroup/RadioGroup.stories.mdx +50 -16
  172. package/src/components/RadioGroup/RadioGroup.test.tsx +13 -11
  173. package/src/components/RadioGroup/RadioGroup.tsx +97 -94
  174. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +24 -21
  175. package/src/components/SearchBar/SearchBar.Test.tsx +160 -34
  176. package/src/components/SearchBar/SearchBar.stories.mdx +116 -34
  177. package/src/components/SearchBar/SearchBar.tsx +70 -50
  178. package/src/components/Select/Select.stories.mdx +177 -66
  179. package/src/components/Select/Select.test.tsx +91 -2
  180. package/src/components/Select/Select.tsx +29 -13
  181. package/src/components/Select/__snapshots__/Select.test.tsx.snap +545 -0
  182. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +50 -16
  183. package/src/components/SkeletonLoader/SkeletonLoader.tsx +8 -4
  184. package/src/components/Slider/Slider.stories.mdx +74 -23
  185. package/src/components/Slider/Slider.test.tsx +35 -0
  186. package/src/components/Slider/Slider.tsx +22 -11
  187. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +67 -30
  188. package/src/components/StatusBadge/StatusBadge.stories.mdx +33 -18
  189. package/src/components/StatusBadge/StatusBadge.tsx +2 -1
  190. package/src/components/StructuredContent/StructuredContent.stories.mdx +427 -0
  191. package/src/components/StructuredContent/StructuredContent.test.tsx +376 -0
  192. package/src/components/StructuredContent/StructuredContent.tsx +153 -0
  193. package/src/components/StructuredContent/StructuredContentTypes.tsx +5 -0
  194. package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +283 -0
  195. package/src/components/StyleGuide/Bidirectionality.stories.mdx +32 -83
  196. package/src/components/StyleGuide/Breakpoints.stories.mdx +1 -11
  197. package/src/components/StyleGuide/Buttons.stories.mdx +3 -18
  198. package/src/components/StyleGuide/ColorCard.tsx +1 -2
  199. package/src/components/StyleGuide/Colors.stories.mdx +3 -11
  200. package/src/components/StyleGuide/DesignTokens.stories.mdx +3 -8
  201. package/src/components/StyleGuide/Forms.stories.mdx +2 -10
  202. package/src/components/StyleGuide/Iconography.stories.mdx +8 -34
  203. package/src/components/StyleGuide/Spacing.stories.mdx +3 -14
  204. package/src/components/StyleGuide/Typography.stories.mdx +64 -76
  205. package/src/components/Table/Table.stories.mdx +165 -0
  206. package/src/components/Table/Table.test.tsx +137 -0
  207. package/src/components/Table/Table.tsx +126 -0
  208. package/src/components/Table/__snapshots__/Table.test.tsx.snap +1179 -0
  209. package/src/components/Tabs/Tabs.stories.mdx +20 -14
  210. package/src/components/Tabs/Tabs.test.tsx +21 -5
  211. package/src/components/Tabs/Tabs.tsx +33 -18
  212. package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +195 -0
  213. package/src/components/Template/Template.stories.mdx +132 -49
  214. package/src/components/Template/Template.test.tsx +128 -6
  215. package/src/components/Template/Template.tsx +93 -13
  216. package/src/components/Template/__snapshots__/Template.test.tsx.snap +169 -0
  217. package/src/components/Text/Text.stories.mdx +33 -11
  218. package/src/components/Text/Text.tsx +2 -2
  219. package/src/components/TextInput/TextInput.stories.mdx +84 -17
  220. package/src/components/TextInput/TextInput.test.tsx +96 -0
  221. package/src/components/TextInput/TextInput.tsx +12 -8
  222. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +240 -0
  223. package/src/components/Toggle/Toggle.stories.mdx +200 -0
  224. package/src/components/Toggle/Toggle.test.tsx +140 -0
  225. package/src/components/Toggle/Toggle.tsx +123 -0
  226. package/src/components/Toggle/ToggleSizes.tsx +4 -0
  227. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +255 -0
  228. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +96 -25
  229. package/src/components/VideoPlayer/VideoPlayer.test.tsx +103 -1
  230. package/src/components/VideoPlayer/VideoPlayer.tsx +72 -22
  231. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +57 -3
  232. package/src/docs/Chakra.stories.mdx +5 -8
  233. package/src/docs/Intro.stories.mdx +2 -2
  234. package/src/index.ts +19 -6
  235. package/src/styles/base/_03-base.scss +1 -1
  236. package/src/styles/base/_place-holder.scss +7 -7
  237. package/src/styles.scss +1 -5
  238. package/src/theme/components/breadcrumb.ts +5 -5
  239. package/src/theme/components/button.ts +5 -12
  240. package/src/theme/components/card.ts +9 -7
  241. package/src/theme/components/checkbox.ts +1 -1
  242. package/src/theme/components/customTable.ts +63 -0
  243. package/src/theme/components/datePicker.ts +1 -1
  244. package/src/theme/components/global.ts +7 -7
  245. package/src/theme/components/heading.ts +13 -11
  246. package/src/theme/components/helperErrorText.ts +1 -1
  247. package/src/theme/components/icon.ts +2 -2
  248. package/src/theme/components/image.ts +9 -1
  249. package/src/theme/components/link.ts +17 -5
  250. package/src/theme/components/list.ts +1 -3
  251. package/src/theme/components/logo.ts +54 -0
  252. package/src/theme/components/notification.ts +9 -7
  253. package/src/theme/components/searchBar.ts +7 -13
  254. package/src/theme/components/select.ts +1 -0
  255. package/src/theme/components/statusBadge.ts +1 -1
  256. package/src/theme/components/structuredContent.ts +54 -0
  257. package/src/theme/components/template.ts +10 -10
  258. package/src/theme/components/text.ts +6 -6
  259. package/src/theme/components/textInput.ts +1 -0
  260. package/src/theme/components/toggle.ts +69 -0
  261. package/src/theme/components/videoPlayer.ts +0 -2
  262. package/src/theme/foundations/global.ts +2 -2
  263. package/src/theme/foundations/spacing.ts +3 -0
  264. package/src/theme/foundations/typography.ts +84 -12
  265. package/src/theme/index.ts +8 -0
  266. package/src/utils/componentCategories.ts +5 -2
  267. package/src/utils/utils.ts +17 -0
  268. package/dist/__tests__/utils/bem.test.d.ts +0 -1
  269. package/dist/components/CardEdition/CardEdition.d.ts +0 -21
  270. package/dist/components/CardEdition/CardEdition.stories.d.ts +0 -27
  271. package/dist/components/Input/Input.d.ts +0 -36
  272. package/dist/components/Input/Input.stories.d.ts +0 -29
  273. package/dist/components/Input/InputTypes.d.ts +0 -6
  274. package/dist/components/StyleGuide/UIDocCard.d.ts +0 -11
  275. package/dist/helpers/CSSVariablesHelper.d.ts +0 -3
  276. package/dist/helpers/getCSSVariable.d.ts +0 -1
  277. package/dist/interfaces.d.ts +0 -3
  278. package/dist/utils/bem.d.ts +0 -1
  279. package/src/__tests__/utils/bem.test.ts +0 -37
  280. package/src/components/CardEdition/CardEdition.stories.tsx +0 -122
  281. package/src/components/CardEdition/CardEdition.test.tsx +0 -395
  282. package/src/components/CardEdition/CardEdition.tsx +0 -60
  283. package/src/components/CardEdition/_CardEdition.scss +0 -137
  284. package/src/components/Input/Input.stories.tsx +0 -133
  285. package/src/components/Input/Input.test.tsx +0 -266
  286. package/src/components/Input/Input.tsx +0 -81
  287. package/src/components/Input/InputTypes.tsx +0 -8
  288. package/src/components/Input/_Input.scss +0 -78
  289. package/src/components/StyleGuide/UIDocCard.tsx +0 -36
  290. package/src/helpers/CSSVariablesHelper.tsx +0 -34
  291. package/src/helpers/getCSSVariable.tsx +0 -5
  292. package/src/interfaces.ts +0 -3
  293. package/src/utils/bem.ts +0 -44
package/CHANGELOG.md CHANGED
@@ -8,6 +8,123 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
8
8
 
9
9
  ## Prerelease
10
10
 
11
+ ## 0.25.10 (February 22, 2022)
12
+
13
+ ### Adds
14
+
15
+ - Exports Chakra's `Flex` and `Spacer` components.
16
+ - Adds `TemplateAboveHeader` component in the set of "template" components.
17
+ - Adds the `aboveHeader` prop to the `TemplateAppContainer` component to render a `TemplateAboveHeader` component immediately before the `TemplateHeader` component.
18
+
19
+ ### Breaking Changes
20
+
21
+ - Renames the `Form` component's `"spacing"` prop to `"gap"` to be consistent with the `FormRow` and `FormField` components.
22
+ - Renames the `FormSpacing` enum to `FormGaps`.
23
+
24
+ ### Changes
25
+
26
+ - Passes an `onChange` prop to the `Select` component inside the `SearchBar` through its `selectProps` prop.
27
+ - Adds snapshot tests for the `Tabs` component and better checks to warn the user that the `Tabs` is missing data if data wasn't passed as props or children.
28
+ - Updates the `Form` component to warn developers when a child component in the `FormRow` component _is not_ a `FormField`.
29
+ - Adds an `onSubmit` prop to the `Form` component.
30
+ - Adds the `renderHeaderElement` prop to the `TemplateAppContainer` component. This prop is used to control whether the `TemplateAppContainer` component should render its own `<header>` HTML element through its `header` prop, or let the user pass in their own component that renders the `<header>` HTML element.
31
+ - Updates the `Fieldset` and `RadioGroup` so the `children` prop is declared through `React.PropsWithChildren` rather than in their respective prop interfaces.
32
+ - Adds snapshot tests for the `Accordion` component, as well as `id` props to the components within the `Accordion` so snapshot tests pass.
33
+ - Passes an `id` to the `Icon` in the `Select` component.
34
+ - Adds snapshot tests for the `Select` componnet.
35
+
36
+ ### Fixes
37
+
38
+ - Fixes `id` propagation issues in the `SearchBar` component and its children DS components.
39
+ - Fixing `Breadcrumbs` related logging issue with a CSS pseudo-selector and setting the `aria-label` to "Breadcrumbs". Adding an accessibility test that should fail when more than one `Breadcrumbs` component is rendered on a page since that landmark should only be rendered once on a web page.
40
+ - Exports the `FullDateType` interface related to the `DatePicker` component.
41
+ - Fixes and removes bad console logs from the `Pagination` and `List` components.
42
+ - Fixes auto-generated `id`s in the `Tabs` component.
43
+ - Fixes the Figma link for the `Hero` component.
44
+ - Fixes `Card` component bug for passing styles to the `CardHeading` correctly.
45
+ - Fixes the `Table` component so that a custom header text color of white does not visually hide row headers on a white background.
46
+
47
+ ### Updates
48
+
49
+ - Updates the following packages: multiple `@storybook/...` packages, `autoprefixer`, `eslint-plugin-storybook`, `husky`, `lint-staged`, `semantic-release-slack-bot`, `storybook-addon-designs`.
50
+ - Removed the following packages: `postcss`, `pretty-quick`.
51
+ - Added `@chakra-ui/react`, `@chakra-ui/system`, `@emotion/react`, `@emotion/styled`, and `framer-motion` as "peerDependencies".
52
+ - Updates the node version in Github Action workflows from Node v12 to Node v14.
53
+ - Updates how `/dist/resources.scss` is created through gulp.
54
+
55
+ ## 0.25.9 (February 3, 2022)
56
+
57
+ ### Adds
58
+
59
+ - Adds the `Logo` component.
60
+ - Adds the `noBrandButtonType` boolean prop to the `SearchBar` component to render the `NoBrand` `Button` variant style.
61
+ - Adds element-specific design tokens for `fontSizes` and `fontWeights`.
62
+ - Adds the `StructuredContent` component.
63
+ - Adds the `additionalImageStyles` and `additionalFigureStyles` props to the `Image` component to specifically target the `img` element's style and the `figure` HTML elements.
64
+ - Adds the `Table` component.
65
+
66
+ ### Breaking Changes
67
+
68
+ - Completely removes the `CardEdition` and `Input` components and related files and references.
69
+ - Removes all references of the `BEM` CSS pattern.
70
+ - Removes all references to logos from the `Icon` component.
71
+ - Removes passing in text to the `HelperErrorText` component as children. Now, the `text` prop is used to render its text.
72
+ - Renames the `SearchBar`'s `helperErrorText` prop to `helperText` to be consistent with other components.
73
+
74
+ ### Changes
75
+
76
+ - Updates the `Form`, `HorizontalRule`, `Image` component by removing the native HTML attributes as props. This sets the props allowed to the list of props declared in their own files.
77
+ - Minor change to the `Notification`'s heading component so it adds a proper id to `NotificationHeading`.
78
+ - Updates the `Heading` component to use the DS `Link` component rather than Chakra's `Link` component.
79
+ - Updates the style of links rendered in the `Heading` component so they are styled as standard links. The only exception is for links used in the `Card` component for the _full-click functionality_ feature. Otherwise, links in `Card` headings are styled as standard links.
80
+ - Updates the `SearchBar` component to now be implemented with the `ComponentWrapper` component.
81
+ - Removes the `ButtonTypes.SearchBar` variant style for the `Button` component. The style object is now set and passed directly to the `Button` component in the `SearchBar` component through the `additionalStyles` prop.
82
+ - Renames `additionalStyles` prop to `additionalWrapperStyles` in the `Image` Component.
83
+ - Updates the label text style in the disabled state of the `Toggle` component.
84
+ - Updates the `Card` component so it gives a bottom margin to the `Image` component when the `imageAspectRatio` prop is set to `ImageRatios.Original`.
85
+ - Updates the `TextInput` component to use a white background for `static`, `error` and `focus` states.
86
+ - Updates `Select` component to use a white background for `static`, `error` and `focus` states.
87
+ - Updates the `Template` component to use `s` (16px) spacing on the left and right sides of the main content area.
88
+ - Updates the `HelperErrorText` component to allow HTML to be passed in as a string or HTML.
89
+ - Updates how the `HelperErrorText` component renders text in the following components: `Checkbox`, `CheckboxGroup`, `ComponentWrapper`, `DatePicker`, `Radio`, `RadioGroup`, `SearchBar`, `Select`, `Slider`, `TextInput`, `Toggle`, `VideoPlayer`.
90
+ - Updates the `HorizontalRule` component to use "100%" as the default value for the `width` prop.
91
+
92
+ ### Fixes
93
+
94
+ - Fixes the styling of custom anchor elements when passed as a child in the `Link` component.
95
+ - Allows the `TemplateAppContainer` and `TemplateFooter` components to use the `renderFooterElement` prop. This is `true` by default so it renders an HTML `footer` element. If a custom footer component that renders its own HTML `<footer>` must be used, then setting `renderFooterElement` to false will not render two nested `footer` elements.
96
+ - Fixes the Storybook `level` prop value for the `Heading` component so it updates the component.
97
+ - Removes wrapper divs around custom image elements used in the `Card` component. Also passes the aspect ratio as `ImageRatios.Original` when the custom image element is passed to the `Card` component.
98
+
99
+ ## 0.25.8 (January 6, 2022)
100
+
101
+ ### Adds
102
+
103
+ - Adds `embedCode` prop to `VideoPlayer` component.
104
+ - Adds export statements for `ProgressIndicatorSizes` and `ProgressIndicatorTypes` enums to `index.ts`.
105
+ - Adds `ExtraSmall` and `ExtraExtraSmall` size variants to the `Image` component.
106
+ - Adds `ExtraSmall` and `ExtraExtraSmall` size variants for `CardImage` in the `Card` component.
107
+ - Adds `AlertNotificationImportant` icon to `Icon` component.
108
+ - Adds `Toggle` component.
109
+ - Adds `xxxs` (2px) spacing option to DS design tokens.
110
+ - Adds `external` variant to `Link` component.
111
+
112
+ ### Changes
113
+
114
+ - Changes category for `Table` component from `Basic Elements` to `Page Layout`.
115
+ - Updates the background color for the `Locations` variant in the `Breadcrumbs` component from `section.locations.secondary` to `section.locations.primary`.
116
+ - Updates the `Notification` component to show the `AlertNotificationImportant` icon for the `Standard` variant.
117
+ - Reduces the bottom margin on labels and legends for form components from "16px" to "8px", or "s" to "sx" in Chakra-theme variables.
118
+ - Updates docs for Chakra `Grid` component to use theme object values rather than CSS variables.
119
+ - Updates the spacing in the `Notification` component to improve the alignment of the icon and text elements.
120
+ - Updates the `Notification` component to optionally display/hide the `Icon` in the heading or content area.
121
+ - Updates the `ComponentWrapper` component to allow the internal `HelperErrorText` component to get set in the invalid state. Also added tests for this component.
122
+
123
+ ### Fixes
124
+
125
+ - Fixes two bugs in the `Slider`: (1) unable to call the `onChange` function when it is not passed, and (2) fixing the default array value for the range slider so it mounts properly.
126
+ - Updates the `Select` component's controlled state so that an initial empty `value` prop is acceptable.
127
+
11
128
  ## 0.25.7 (December 20, 2021)
12
129
 
13
130
  ### Fixes
@@ -20,6 +137,7 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
20
137
 
21
138
  - Adds export statements for `ProgressIndicator` and `Slider` components to `index.ts`.
22
139
  - Adds `Blogs` variant to `Breadcrumbs` component.
140
+ - Adds the `placeholder` prop to the `Select` component.
23
141
 
24
142
  ### Changes
25
143
 
@@ -70,7 +188,7 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
70
188
  ### Deprecates
71
189
 
72
190
  - Deprecates the `Input` component. The `Input` component will be removed from the NYPL Design System React Library in the first release of January 2022.
73
- - Deprecates the `CardEdition` component. The `CardEdition` component will be removed from the NYPL Design System React Library in the first release of January 2022.
191
+ - Deprecates the `CardEdition` component. The `CardEdition` component will be removed from the NYPL Design System React Library in the first release of January 2022.
74
192
 
75
193
  ## 0.25.3 (November 18, 2021)
76
194
 
package/README.md CHANGED
@@ -250,7 +250,7 @@ Preview Storybook documentation sites are deployed to Tugboat QA for every pull
250
250
 
251
251
  ### React Component Documentation
252
252
 
253
- When actively developing components or fixing bugs, make sure that the related stories are created or updated. This means updating the respective `[component-name].stories.tsx` or `[component-name].stories.mdx` files. For more information on writing stories, check out the [Anatomy of a Story](https://github.com/NYPL/nypl-design-system/wiki/Anatomy-of-a-Story) wiki page.
253
+ When actively developing components or fixing bugs, make sure that the related stories are created or updated. This means updating the respective `[component-name].stories.mdx` file. For information on how to write stories, check out the [Anatomy of a Story](https://github.com/NYPL/nypl-design-system/wiki/Anatomy-of-a-Story) wiki page.
254
254
 
255
255
  For stand-alone document pages in Storybook, you need to:
256
256
 
@@ -1,27 +1,27 @@
1
1
  import * as React from "react";
2
2
  import { ButtonTypes } from "./ButtonTypes";
3
- declare type ButtonElementType = "submit" | "button" | "reset";
3
+ export declare type ButtonElementType = "submit" | "button" | "reset";
4
4
  interface ButtonProps {
5
5
  /** Optionally pass in additional Chakra-based styles. */
6
6
  additionalStyles?: {
7
7
  [key: string]: any;
8
8
  };
9
- /** Additional attributes passed to the button */
9
+ /** Additional attributes passed to the button. */
10
10
  attributes?: {
11
11
  [key: string]: any;
12
12
  };
13
- /** The kind of button assigned through the `ButtonTypes` enum */
13
+ /** The kind of button assigned through the `ButtonTypes` enum. */
14
14
  buttonType?: ButtonTypes;
15
15
  /** Additional className to use. */
16
16
  className?: string;
17
- /** ID that other components can cross reference for accessibility purposes */
17
+ /** ID that other components can cross reference for accessibility purposes. */
18
18
  id?: string;
19
- /** Adds 'disabled' property to the button */
19
+ /** Adds 'disabled' property to the button. */
20
20
  isDisabled?: boolean;
21
21
  /** Trigger the Button's action through the `mouseDown` event handler instead
22
22
  * of `onClick`. `false` by default. */
23
23
  mouseDown?: boolean;
24
- /** The action to perform on the `<button>`'s onClick function */
24
+ /** The action to perform on the `<button>`'s onClick function. */
25
25
  onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
26
26
  /** The HTML button type attribute. */
27
27
  type?: ButtonElementType;
@@ -4,6 +4,5 @@ export declare enum ButtonTypes {
4
4
  Callout = "callout",
5
5
  Pill = "pill",
6
6
  Link = "link",
7
- SearchBar = "searchBar",
8
7
  NoBrand = "noBrand"
9
8
  }
@@ -5,7 +5,8 @@ import { ImageRatios, ImageSizes } from "../Image/ImageTypes";
5
5
  interface CardBaseProps {
6
6
  /** Optional value to control the alignment of the text and elements. */
7
7
  center?: boolean;
8
- /** Optional value to render the layout in a row or column (default). */
8
+ /** Optional value to render the layout in a row or column.
9
+ * Default is `CardLayouts.Column`. */
9
10
  layout?: CardLayouts;
10
11
  }
11
12
  interface CardLinkBoxProps {
@@ -35,14 +36,15 @@ export interface CardProps extends CardBaseProps, CardLinkBoxProps {
35
36
  /** Text description of the image; to follow best practices for accessibility,
36
37
  * this prop should not be left blank if `imageSrc` is passed. */
37
38
  imageAlt?: string;
38
- /** Optional value to control the aspect ratio of the `CardIage`; default
39
- * value is `square`. */
39
+ /** Optional value to control the aspect ratio of the `CardImage`; default
40
+ * value is `ImageRatios.Square`. */
40
41
  imageAspectRatio?: ImageRatios;
41
42
  /** Optional boolean value to control the position of the `CardImage`. */
42
43
  imageAtEnd?: boolean;
43
44
  /** Custom image component used in place of DS `Image` component. */
44
45
  imageComponent?: JSX.Element;
45
- /** Optional value to control the size of the `CardImage`. */
46
+ /** Optional value to control the size of the `CardImage`. Default value is
47
+ * `ImageSizes.Default`. */
46
48
  imageSize?: ImageSizes;
47
49
  /** The path to the image displayed within the `Card` component. */
48
50
  imageSrc?: string;
@@ -1,14 +1,15 @@
1
1
  import * as React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
2
3
  export interface CheckboxProps {
3
4
  /** className you can add in addition to 'input' */
4
5
  className?: string;
5
6
  /** Optional string to populate the HelperErrorText for standard state */
6
- helperText?: string;
7
+ helperText?: HelperErrorTextType;
7
8
  /** ID that other components can cross reference for accessibility purposes */
8
9
  id?: string;
9
10
  /** Optional string to populate the HelperErrorText for the error state
10
11
  * when `isInvalid` is true. */
11
- invalidText?: string;
12
+ invalidText?: HelperErrorTextType;
12
13
  /** When using the Checkbox as a "controlled" form element, you can specify
13
14
  * the Checkbox's checked state using this prop.
14
15
  * Learn more about controlled and uncontrolled form fields:
@@ -1,16 +1,17 @@
1
1
  import * as React from "react";
2
2
  import { CheckboxGroupLayoutTypes } from "./CheckboxGroupLayoutTypes";
3
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  export interface CheckboxGroupProps {
4
5
  /** Any child node passed to the component. */
5
6
  children: React.ReactNode;
6
7
  /** Populates the initial value of the input */
7
8
  defaultValue?: string[];
8
9
  /** Optional string to populate the HelperErrorText for standard state */
9
- helperText?: string;
10
+ helperText?: HelperErrorTextType;
10
11
  /** ID that other components can cross reference for accessibility purposes */
11
12
  id?: string;
12
13
  /** Optional string to populate the HelperErrorText for error state */
13
- invalidText?: string;
14
+ invalidText?: HelperErrorTextType;
14
15
  /** Adds the 'disabled' prop to the input when true. */
15
16
  isDisabled?: boolean;
16
17
  /** A`dds the 'aria-invalid' attribute to the input and
@@ -1,15 +1,21 @@
1
1
  import * as React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
2
3
  export interface ComponentWrapperProps {
3
4
  /** The UI elements that will be wrapped by this component */
4
5
  children: React.ReactNode;
5
- /** Optional string to set the text for a video description */
6
+ /** Optional string to set the text for the component's description */
6
7
  descriptionText?: string;
7
8
  /** Optional string to set the text for a `Heading` component */
8
9
  headingText?: string;
9
10
  /** Optional string to set the text for a `HelperErrorText` component */
10
- helperText?: string;
11
+ helperText?: HelperErrorTextType;
11
12
  /** ID that other components can cross reference for accessibility purposes */
12
13
  id?: string;
14
+ /** Optional string to populate the `HelperErrorText` for the error state
15
+ * when `isInvalid` is true. */
16
+ invalidText?: HelperErrorTextType;
17
+ /** Sets invalid text in the error state. */
18
+ isInvalid?: boolean;
13
19
  }
14
20
  declare function ComponentWrapper(props: React.PropsWithChildren<ComponentWrapperProps>): JSX.Element;
15
21
  export default ComponentWrapper;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { DatePickerTypes } from "./DatePickerTypes";
3
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  import { TextInputRefType } from "../TextInput/TextInput";
4
- interface FullDateType {
5
+ export interface FullDateType {
5
6
  /** Date object that gets returned for the onChange
6
7
  * function only for date ranges. */
7
8
  endDate?: Date;
@@ -33,7 +34,7 @@ export interface DatePickerProps extends DatePickerWrapperProps {
33
34
  /** DatePicker date types that can be rendered. */
34
35
  dateType?: DatePickerTypes;
35
36
  /** Populates the `HelperErrorText` component in this component. */
36
- helperText?: string;
37
+ helperText?: HelperErrorTextType;
37
38
  /** Populates the `HelperErrorText` component in the "From" `TextInput` component. */
38
39
  helperTextFrom?: string;
39
40
  /** Populates the `HelperErrorText` component in the "To" `TextInput` component. */
@@ -45,7 +46,7 @@ export interface DatePickerProps extends DatePickerWrapperProps {
45
46
  initialDateTo?: string;
46
47
  /** Populates the `HelperErrorText` error state for both "From"
47
48
  * and "To" input components. */
48
- invalidText?: string;
49
+ invalidText?: HelperErrorTextType;
49
50
  /** Adds the 'disabled' property to the input element(s). */
50
51
  isDisabled?: boolean;
51
52
  /** Adds 'isInvalid' styling. */
@@ -1,7 +1,5 @@
1
1
  import React from "react";
2
2
  interface FieldsetProps {
3
- /** Children to render. Typically form-related components are used. */
4
- children: React.ReactNode;
5
3
  /** Additional class name to add. */
6
4
  className?: string;
7
5
  /** ID that other components can cross reference for accessibility purposes */
@@ -21,5 +19,5 @@ interface FieldsetProps {
21
19
  * A wrapper component that renders a `fieldset` element along with a `legend`
22
20
  * element as its first child. Commonly used to wrap form components.
23
21
  */
24
- declare const Fieldset: React.FC<FieldsetProps>;
22
+ declare const Fieldset: ({ children, className, id, isLegendHidden, isRequired, legendText, optReqFlag, }: React.PropsWithChildren<FieldsetProps>) => JSX.Element;
25
23
  export default Fieldset;
@@ -1,28 +1,29 @@
1
1
  import * as React from "react";
2
- import { FormSpacing } from "./FormTypes";
3
- export interface FormChildProps {
4
- /** className to be applied to FormRow */
2
+ import { FormGaps } from "./FormTypes";
3
+ interface FormBaseProps {
4
+ /** className to be applied to FormRow, FormField, and Form */
5
5
  className?: string;
6
- /** Spacing size (internal use) */
7
- gap?: FormSpacing;
6
+ /** Optional spacing size; if omitted, the default `large` (2rem / 32px)
7
+ * spacing will be used; ```IMPORTANT: for general form layout, this prop
8
+ * should not be used``` */
9
+ gap?: FormGaps;
8
10
  /** ID that other components can cross reference (internal use) */
9
11
  id?: string;
10
12
  }
11
- export interface FormProps {
13
+ export interface FormChildProps extends FormBaseProps {
14
+ }
15
+ export interface FormProps extends FormBaseProps {
12
16
  /** Optional form `action` attribute */
13
17
  action?: string;
14
- /** Optional className you can add in addition to `form` */
15
- className?: string;
16
- /** Optional ID that other components can cross reference */
17
- id?: string;
18
18
  /** Optional form `method` attribute */
19
19
  method?: "get" | "post";
20
- /** Optional spacing size; if omitted, the default `large` (2rem / 32px) spacing will be used; ```IMPORTANT: for general form layout, this prop should not be used``` */
21
- spacing?: FormSpacing;
20
+ /** Function to call for the `onSubmit` form event. */
21
+ onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
22
22
  }
23
23
  /** FormRow child-component */
24
24
  export declare function FormRow(props: React.PropsWithChildren<FormChildProps>): JSX.Element;
25
25
  /** FormField child-component */
26
26
  export declare function FormField(props: React.PropsWithChildren<FormChildProps>): JSX.Element;
27
- /** main Form component */
28
- export default function Form(props: React.ComponentProps<"form"> & FormProps): JSX.Element;
27
+ /** Main Form component */
28
+ export default function Form(props: React.PropsWithChildren<FormProps>): JSX.Element;
29
+ export {};
@@ -1,2 +1,2 @@
1
- import { GridGaps as FormSpacing } from "../Grid/GridTypes";
2
- export { FormSpacing };
1
+ import { GridGaps as FormGaps } from "../Grid/GridTypes";
2
+ export { FormGaps };
@@ -7,15 +7,19 @@ export interface HeadingProps {
7
7
  };
8
8
  /** Optional className that appears in addition to `heading` */
9
9
  className?: string;
10
- /** Optional size used to override the default styles of the semantic HTML `<h>` elements */
10
+ /** Optional size used to override the default styles of the semantic HTM
11
+ * `<h>` elements */
11
12
  displaySize?: HeadingDisplaySizes;
12
13
  /** Optional ID that other components can cross reference for accessibility purposes */
13
14
  id?: string;
14
- /** Optional number 1-6 used to create the `<h*>` tag; if prop is not passed, `Heading` will default to `<h2>` */
15
+ /** Optional number 1-6 used to create the `<h*>` tag; if prop is not passed,
16
+ * `Heading` will default to `<h2>` */
15
17
  level?: HeadingLevels;
16
18
  /** Inner text of the `<h*>` element */
17
19
  text?: string;
18
- /** Optional URL that header points to; when `url` prop is passed to `Heading`, a child `<a>` element is created and the heading text becomes an active link */
20
+ /** Optional URL that header points to; when `url` prop is passed to
21
+ * `Heading`, a child `<a>` element is created and the heading text becomes
22
+ * an active link */
19
23
  url?: string;
20
24
  /** Optional className for the URL when the `url` prop is passed */
21
25
  urlClass?: string;
@@ -5,10 +5,10 @@ export declare enum HeadingDisplaySizes {
5
5
  Callout = "callout"
6
6
  }
7
7
  export declare enum HeadingLevels {
8
- One = 1,
9
- Two = 2,
10
- Three = 3,
11
- Four = 4,
12
- Five = 5,
13
- Six = 6
8
+ One = "one",
9
+ Two = "two",
10
+ Three = "three",
11
+ Four = "four",
12
+ Five = "five",
13
+ Six = "six"
14
14
  }
@@ -1,5 +1,6 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  export declare type AriaLiveValues = "assertive" | "off" | "polite";
3
+ export declare type HelperErrorTextType = string | JSX.Element;
3
4
  interface HelperErrorTextProps {
4
5
  /** Optionally pass in additional Chakra-based styles. */
5
6
  additionalStyles?: {
@@ -21,9 +22,11 @@ interface HelperErrorTextProps {
21
22
  id?: string;
22
23
  /** Toggles between helper and invalid styling. */
23
24
  isInvalid?: boolean;
25
+ /** The text to display. */
26
+ text: HelperErrorTextType;
24
27
  }
25
28
  /**
26
29
  * Helper or Error text for forms
27
30
  */
28
- export default function HelperErrorText(props: React.PropsWithChildren<HelperErrorTextProps>): JSX.Element;
31
+ export default function HelperErrorText({ additionalStyles, ariaAtomic, ariaLive, className, id, isInvalid, text, }: HelperErrorTextProps): JSX.Element;
29
32
  export {};
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  export interface HorizontalRuleProps {
3
3
  /** Optional alignment value to align the horizontal rule to one side or the
4
4
  * other when the width is less than 100%. If omitted, the horizontal rule
@@ -13,7 +13,7 @@ export interface HorizontalRuleProps {
13
13
  height?: string;
14
14
  /** Optional width value. This value should be entered with the same
15
15
  * formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`). If
16
- * omitted, the horizontal rule will have a default width of "auto". */
16
+ * omitted, the horizontal rule will have a default width of "100%". */
17
17
  width?: string;
18
18
  }
19
- export default function HorizontalRule(props: React.ComponentProps<"hr"> & HorizontalRuleProps): JSX.Element;
19
+ export default function HorizontalRule(props: HorizontalRuleProps): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTypes, LogoNames } from "./IconTypes";
2
+ import { IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTypes } from "./IconTypes";
3
3
  export interface IconProps {
4
4
  /** Optionally pass in additional Chakra-based styles. */
5
5
  additionalStyles?: {
@@ -7,7 +7,7 @@ export interface IconProps {
7
7
  };
8
8
  /** Aligns the icon. */
9
9
  align?: IconAlign;
10
- /** className that appears in addition to "icon" */
10
+ /** Optional className that will be added to the parent element */
11
11
  className?: string;
12
12
  /** Overrides default icon color (black). */
13
13
  color?: IconColors;
@@ -19,14 +19,14 @@ export interface IconProps {
19
19
  /** ID that other components can cross reference for accessibility purposes */
20
20
  id?: string;
21
21
  /** The name of the icon you want to use. */
22
- name?: IconNames | LogoNames;
22
+ name?: IconNames;
23
23
  /** Sets the icon size. */
24
24
  size?: IconSizes;
25
25
  /** For accessibility purposes, the text passed in the `title` prop gets
26
26
  * rendered in a `title` element in the SVG. This descriptive text is not
27
27
  * visible but is needed for screenreaders to describe the graphic. */
28
28
  title?: string;
29
- /** Sets the icon variant type. */
29
+ /** FOR INTERNAL DS USE ONLY: the icon variant to display. */
30
30
  type?: IconTypes;
31
31
  }
32
32
  /**
@@ -5,8 +5,8 @@ declare const _default: {
5
5
  action_help_default: string;
6
6
  action_help_outline: string;
7
7
  action_launch: string;
8
+ alert_notification_important: string;
8
9
  arrow: string;
9
- brooklyn: string;
10
10
  check: string;
11
11
  clock: string;
12
12
  close: string;
@@ -21,29 +21,9 @@ declare const _default: {
21
21
  file_type_spreadsheet: string;
22
22
  file_type_video: string;
23
23
  headset: string;
24
- logo_brooklyn: string;
25
- logo_nypl: string;
26
- logo_nypl_negative: string;
27
- logo_queens: string;
28
- lpa_negative: string;
29
- lpa_positive: string;
30
24
  minus: string;
31
- nypl_circle_negative: string;
32
- nypl_circle_positive: string;
33
- nypl_full_lock_up_negative: string;
34
- nypl_full_lock_up: string;
35
- nypl_no_lion_negative: string;
36
- nypl_no_lion_positive: string;
37
25
  plus: string;
38
- queens_long: string;
39
- queens_stacked: string;
40
- schomburg_circle: string;
41
- schomburg_positive: string;
42
26
  search: string;
43
- simplye_black: string;
44
- simplye_color: string;
45
- snfl_negative: string;
46
- snfl_positive: string;
47
27
  speaker_notes: string;
48
28
  utility_account_filled: string;
49
29
  utility_account_unfilled: string;
@@ -46,6 +46,7 @@ export declare enum IconNames {
46
46
  ActionCheckCircle = "action_check_circle",
47
47
  ActionHelpDefault = "action_help_default",
48
48
  ActionHelpOutline = "action_help_outline",
49
+ AlertNotificationImportant = "alert_notification_important",
49
50
  ActionLaunch = "action_launch",
50
51
  Arrow = "arrow",
51
52
  Check = "check",
@@ -71,26 +72,3 @@ export declare enum IconNames {
71
72
  UtilityHamburger = "utility_hamburger",
72
73
  UtilitySearch = "utility_search"
73
74
  }
74
- export declare enum LogoNames {
75
- Brooklyn = "brooklyn",
76
- LogoBrooklyn = "logo_brooklyn",
77
- LogoNypl = "logo_nypl",
78
- LogoNyplNegative = "logo_nypl_negative",
79
- LogoQueens = "logo_queens",
80
- LpaNegative = "lpa_negative",
81
- LpaPositive = "lpa_positive",
82
- NyplCircleNegative = "nypl_circle_negative",
83
- NyplCirclePositive = "nypl_circle_positive",
84
- NyplFullLockUpNegative = "nypl_full_lock_up_negative",
85
- NyplFullLockUp = "nypl_full_lock_up",
86
- NyplNoLionNegative = "nypl_no_lion_negative",
87
- NyplNoLionPositive = "nypl_no_lion_positive",
88
- QueensLong = "queens_long",
89
- QueensStacked = "queens_stacked",
90
- SchomburgCircle = "schomburg_circle",
91
- SchomburgPositive = "schomburg_positive",
92
- SimplyeBlack = "simplye_black",
93
- SimplyeColor = "simplye_color",
94
- SnflNegative = "snfl_negative",
95
- SnflPositive = "snfl_positive"
96
- }
@@ -1,8 +1,8 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import { ImageRatios, ImageSizes, ImageTypes } from "./ImageTypes";
3
3
  interface ImageWrapperProps {
4
4
  /** Optionally pass in additional Chakra-based styles. */
5
- additionalStyles?: {
5
+ additionalWrapperStyles?: {
6
6
  [key: string]: any;
7
7
  };
8
8
  /** ClassName you can add in addition to 'image' */
@@ -13,6 +13,14 @@ interface ImageWrapperProps {
13
13
  imageSize?: ImageSizes;
14
14
  }
15
15
  export interface ImageProps extends ImageWrapperProps {
16
+ /** Optionally pass in additional Chakra-based styles only for the figure. */
17
+ additionalFigureStyles?: {
18
+ [key: string]: any;
19
+ };
20
+ /** Optionally pass in additional Chakra-based styles only for the image. */
21
+ additionalImageStyles?: {
22
+ [key: string]: any;
23
+ };
16
24
  /** Alternate text description of the image */
17
25
  alt: string;
18
26
  /** Custom image component */
@@ -28,5 +36,5 @@ export interface ImageProps extends ImageWrapperProps {
28
36
  /** The src attribute is required, and contains the path to the image you want to embed. */
29
37
  src: string;
30
38
  }
31
- export default function Image(props: React.ComponentProps<"img"> & ImageProps): JSX.Element;
39
+ export default function Image(props: ImageProps): JSX.Element;
32
40
  export {};
@@ -12,7 +12,9 @@ export declare enum ImageSizes {
12
12
  Default = "default",
13
13
  Large = "large",
14
14
  Medium = "medium",
15
- Small = "small"
15
+ Small = "small",
16
+ ExtraSmall = "xsmall",
17
+ ExtraExtraSmall = "xxsmall"
16
18
  }
17
19
  export declare enum ImageTypes {
18
20
  Default = "default",
@@ -3,5 +3,6 @@ export declare enum LinkTypes {
3
3
  Backwards = "backwards",
4
4
  Button = "button",
5
5
  Default = "default",
6
+ External = "external",
6
7
  Forwards = "forwards"
7
8
  }