@nypl/design-system-react-components 0.26.0 → 0.28.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 (306) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  4. package/dist/components/Button/Button.d.ts +2 -10
  5. package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
  6. package/dist/components/Card/Card.d.ts +2 -2
  7. package/dist/components/Checkbox/Checkbox.d.ts +10 -8
  8. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  9. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  10. package/dist/components/Form/Form.d.ts +2 -2
  11. package/dist/components/Grid/SimpleGrid.d.ts +6 -3
  12. package/dist/components/Heading/Heading.d.ts +2 -5
  13. package/dist/components/HelperErrorText/HelperErrorText.d.ts +1 -5
  14. package/dist/components/Hero/Hero.d.ts +13 -9
  15. package/dist/components/Icons/Icon.d.ts +6 -5
  16. package/dist/components/Icons/IconSvgs.d.ts +21 -21
  17. package/dist/components/Image/Image.d.ts +8 -5
  18. package/dist/components/Link/Link.d.ts +1 -9
  19. package/dist/components/List/List.d.ts +7 -11
  20. package/dist/components/Logo/Logo.d.ts +2 -5
  21. package/dist/components/Logo/LogoSvgs.d.ts +39 -39
  22. package/dist/components/Modal/Modal.d.ts +28 -8
  23. package/dist/components/Notification/Notification.d.ts +1 -1
  24. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  25. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  26. package/dist/components/SearchBar/SearchBar.d.ts +3 -2
  27. package/dist/components/Select/Select.d.ts +2 -5
  28. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -4
  29. package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
  30. package/dist/components/StatusBadge/StatusBadge.d.ts +2 -3
  31. package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
  32. package/dist/components/Table/Table.d.ts +1 -1
  33. package/dist/components/Template/Template.d.ts +2 -0
  34. package/dist/components/Text/Text.d.ts +1 -1
  35. package/dist/components/TextInput/TextInput.d.ts +21 -9
  36. package/dist/components/Toggle/Toggle.d.ts +1 -5
  37. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  38. package/dist/design-system-react-components.cjs.development.js +977 -1213
  39. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  40. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  41. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  42. package/dist/design-system-react-components.esm.js +976 -1276
  43. package/dist/design-system-react-components.esm.js.map +1 -1
  44. package/dist/helpers/types.d.ts +1 -0
  45. package/dist/index.d.ts +27 -48
  46. package/dist/styles.css +1 -1
  47. package/dist/theme/components/buttonGroup.d.ts +11 -0
  48. package/dist/theme/components/card.d.ts +104 -8
  49. package/dist/theme/components/componentWrapper.d.ts +4 -3
  50. package/dist/theme/components/customTable.d.ts +11 -14
  51. package/dist/theme/components/fieldset.d.ts +4 -3
  52. package/dist/theme/components/helperErrorText.d.ts +4 -3
  53. package/dist/theme/components/hero.d.ts +1 -1
  54. package/dist/theme/components/horizontalRule.d.ts +4 -3
  55. package/dist/theme/components/icon.d.ts +47743 -1
  56. package/dist/theme/components/image.d.ts +563 -10
  57. package/dist/theme/components/label.d.ts +4 -3
  58. package/dist/theme/components/list.d.ts +6 -7
  59. package/dist/theme/components/logo.d.ts +474 -1
  60. package/dist/theme/components/notification.d.ts +20 -16
  61. package/dist/theme/components/progressIndicator.d.ts +6 -4
  62. package/dist/theme/components/select.d.ts +4 -10
  63. package/dist/theme/components/skeletonLoader.d.ts +14 -10
  64. package/dist/theme/components/skipNavigation.d.ts +22 -0
  65. package/dist/theme/components/slider.d.ts +7 -6
  66. package/dist/theme/components/structuredContent.d.ts +10 -9
  67. package/dist/theme/components/text.d.ts +7 -1
  68. package/dist/theme/components/toggle.d.ts +6 -4
  69. package/dist/theme/provider.d.ts +2 -4
  70. package/dist/utils/componentCategories.d.ts +1 -1
  71. package/dist/utils/interfaces.d.ts +5 -0
  72. package/dist/utils/utils.d.ts +2 -18
  73. package/package.json +15 -16
  74. package/src/__tests__/setup.ts +3 -3
  75. package/src/__tests__/utils/utils.test.ts +1 -23
  76. package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +22 -14
  77. package/src/components/Accordion/Accordion.stories.mdx +43 -44
  78. package/src/components/Accordion/Accordion.test.tsx +5 -13
  79. package/src/components/Accordion/Accordion.tsx +14 -18
  80. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +6 -6
  81. package/src/components/Autosuggest/Autosuggest.stories.mdx +1 -1
  82. package/src/components/Autosuggest/Autosuggest.stories.tsx +23 -25
  83. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -37
  84. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +4 -17
  85. package/src/components/Breadcrumbs/Breadcrumbs.tsx +18 -21
  86. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +1 -100
  87. package/src/components/Button/Button.stories.mdx +89 -126
  88. package/src/components/Button/Button.test.tsx +16 -30
  89. package/src/components/Button/Button.tsx +14 -20
  90. package/src/components/ButtonGroup/ButtonGroup.stories.mdx +147 -0
  91. package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
  92. package/src/components/ButtonGroup/ButtonGroup.tsx +99 -0
  93. package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
  94. package/src/components/Card/Card.stories.mdx +143 -177
  95. package/src/components/Card/Card.test.tsx +36 -97
  96. package/src/components/Card/Card.tsx +78 -74
  97. package/src/components/Card/__snapshots__/Card.test.tsx.snap +1 -1
  98. package/src/components/Chakra/Box.stories.mdx +2 -6
  99. package/src/components/Chakra/Center.stories.mdx +5 -23
  100. package/src/components/Chakra/Flex.stories.mdx +4 -6
  101. package/src/components/Chakra/Stack.stories.mdx +9 -10
  102. package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
  103. package/src/components/Checkbox/Checkbox.test.tsx +2 -2
  104. package/src/components/Checkbox/Checkbox.tsx +20 -13
  105. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +9 -9
  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 +24 -35
  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 +1 -1
  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 +62 -62
  193. package/src/components/StyleGuide/ColorCard.tsx +2 -4
  194. package/src/components/StyleGuide/Colors.stories.mdx +7 -8
  195. package/src/components/StyleGuide/DesignTokens.stories.mdx +5 -7
  196. package/src/components/StyleGuide/Forms.stories.mdx +0 -1
  197. package/src/components/StyleGuide/Iconography.stories.mdx +59 -77
  198. package/src/components/StyleGuide/Spacing.stories.mdx +0 -1
  199. package/src/components/StyleGuide/Typography.stories.mdx +15 -18
  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/index.ts +4 -0
  252. package/src/theme/provider.tsx +1 -1
  253. package/src/utils/componentCategories.ts +13 -5
  254. package/src/utils/interfaces.ts +5 -0
  255. package/src/utils/utils.ts +2 -32
  256. package/dist/components/Accordion/AccordionTypes.d.ts +0 -5
  257. package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +0 -8
  258. package/dist/components/Button/ButtonTypes.d.ts +0 -8
  259. package/dist/components/DatePicker/DatePickerTypes.d.ts +0 -5
  260. package/dist/components/Form/FormTypes.d.ts +0 -2
  261. package/dist/components/Grid/GridTypes.d.ts +0 -9
  262. package/dist/components/Heading/HeadingTypes.d.ts +0 -14
  263. package/dist/components/Hero/HeroTypes.d.ts +0 -12
  264. package/dist/components/Icons/IconTypes.d.ts +0 -77
  265. package/dist/components/Image/ImageTypes.d.ts +0 -22
  266. package/dist/components/Link/LinkTypes.d.ts +0 -8
  267. package/dist/components/List/ListTypes.d.ts +0 -5
  268. package/dist/components/Logo/LogoTypes.d.ts +0 -54
  269. package/dist/components/Notification/NotificationTypes.d.ts +0 -5
  270. package/dist/components/ProgressIndicator/ProgressIndicatorTypes.d.ts +0 -8
  271. package/dist/components/Select/SelectTypes.d.ts +0 -8
  272. package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -5
  273. package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +0 -5
  274. package/dist/components/StructuredContent/StructuredContentTypes.d.ts +0 -5
  275. package/dist/components/Text/TextTypes.d.ts +0 -6
  276. package/dist/components/TextInput/TextInputTypes.d.ts +0 -25
  277. package/dist/components/Toggle/ToggleTypes.d.ts +0 -4
  278. package/dist/components/VideoPlayer/VideoPlayerTypes.d.ts +0 -9
  279. package/dist/helpers/enums.d.ts +0 -4
  280. package/dist/utils/siteSections.d.ts +0 -2
  281. package/src/components/Accordion/AccordionTypes.tsx +0 -5
  282. package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +0 -8
  283. package/src/components/Button/ButtonTypes.tsx +0 -8
  284. package/src/components/DatePicker/DatePickerTypes.tsx +0 -5
  285. package/src/components/Form/FormTypes.tsx +0 -3
  286. package/src/components/Grid/GridTypes.tsx +0 -9
  287. package/src/components/Heading/HeadingTypes.tsx +0 -15
  288. package/src/components/Hero/HeroTypes.tsx +0 -20
  289. package/src/components/Icons/IconTypes.tsx +0 -83
  290. package/src/components/Image/ImageTypes.ts +0 -24
  291. package/src/components/Link/LinkTypes.tsx +0 -8
  292. package/src/components/List/ListTypes.tsx +0 -5
  293. package/src/components/Logo/LogoTypes.tsx +0 -56
  294. package/src/components/Modal/_Modal.scss +0 -18
  295. package/src/components/Notification/NotificationTypes.tsx +0 -5
  296. package/src/components/ProgressIndicator/ProgressIndicatorTypes.ts +0 -8
  297. package/src/components/Select/SelectTypes.tsx +0 -10
  298. package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
  299. package/src/components/StatusBadge/StatusBadgeTypes.tsx +0 -5
  300. package/src/components/StructuredContent/StructuredContentTypes.tsx +0 -5
  301. package/src/components/Text/TextTypes.tsx +0 -6
  302. package/src/components/TextInput/TextInputTypes.tsx +0 -48
  303. package/src/components/Toggle/ToggleTypes.tsx +0 -4
  304. package/src/components/VideoPlayer/VideoPlayerTypes.tsx +0 -10
  305. package/src/helpers/enums.ts +0 -4
  306. package/src/utils/siteSections.ts +0 -10
@@ -2,27 +2,13 @@ import { Meta } from "@storybook/addon-docs";
2
2
 
3
3
  import { Box, Center, Circle, VStack, Square } from "@chakra-ui/react";
4
4
  import Card, { CardHeading, CardContent } from "../components/Card/Card";
5
- import Hero from "../components/Hero/Hero";
6
- import { HeroTypes } from "../components/Hero/HeroTypes";
7
5
  import Heading from "../components/Heading/Heading";
8
- import {
9
- HeadingLevels,
10
- HeadingSizes,
11
- } from "../components/Heading/HeadingTypes";
12
6
  import Icon from "../components/Icons/Icon";
13
- import {
14
- IconColors,
15
- IconNames,
16
- IconSizes,
17
- } from "../components/Icons/IconTypes";
18
7
  import Image from "../components/Image/Image";
19
8
  import Link from "../components/Link/Link";
20
- import { LinkTypes } from "../components/Link/LinkTypes";
21
9
  import Logo from "../components/Logo/Logo";
22
- import { LogoNames, LogoSizes } from "../components/Logo/LogoTypes";
23
10
  import SimpleGrid from "../components/Grid/SimpleGrid";
24
11
  import Text from "../components/Text/Text";
25
- import { TextSizes } from "../components/Text/TextTypes";
26
12
  import DSProvider from "../theme/provider";
27
13
 
28
14
  <Meta title="Welcome" />
@@ -30,11 +16,11 @@ import DSProvider from "../theme/provider";
30
16
  <DSProvider>
31
17
  <VStack spacing="s">
32
18
  <Center>
33
- <Logo name={LogoNames.ReservoirVerticalColor} size={LogoSizes.Small} />
19
+ <Logo name="reservoirVerticalColor" size="small" />
34
20
  </Center>
35
21
  <Box>
36
22
  <Center>
37
- <Heading level={HeadingLevels.One} size={HeadingSizes.Tertiary}>
23
+ <Heading level="one" size="tertiary">
38
24
  The React Component Library of the New York Public Library
39
25
  </Heading>
40
26
  </Center>
@@ -57,31 +43,29 @@ import DSProvider from "../theme/provider";
57
43
  }}
58
44
  >
59
45
  <Icon
60
- name={IconNames.ActionCheckCircle}
61
- size={IconSizes.ExtraExtraLarge}
62
- color={IconColors.SectionEducationSecondary}
63
- additionalStyles={{
64
- marginBottom: "s",
65
- }}
46
+ name="actionCheckCircle"
47
+ size="xxlarge"
48
+ color="section.education.secondary"
49
+ marginBottom="s"
66
50
  />
67
51
  <Card isCentered>
68
- <CardHeading id="main-heading1" level={HeadingLevels.Three}>
52
+ <CardHeading id="main-heading1" level="three">
69
53
  Get Started
70
54
  </CardHeading>
71
55
  <CardContent>
72
- <Text size={TextSizes.Caption}>
56
+ <Text size="caption">
73
57
  To start using Reservoir Design System, refer to Reservoir's
74
58
  Github{" "}
75
59
  <Link
76
60
  href="https://github.com/NYPL/nypl-design-system/wiki"
77
- type={LinkTypes.External}
61
+ type="external"
78
62
  >
79
63
  Wiki
80
64
  </Link>{" "}
81
65
  and{" "}
82
66
  <Link
83
67
  href="https://github.com/NYPL/nypl-design-system/blob/development/README.md"
84
- type={LinkTypes.External}
68
+ type="external"
85
69
  >
86
70
  ReadMe
87
71
  </Link>{" "}
@@ -101,19 +85,17 @@ import DSProvider from "../theme/provider";
101
85
  }}
102
86
  >
103
87
  <Icon
104
- name={IconNames.Search}
105
- size={IconSizes.ExtraExtraLarge}
106
- color={IconColors.SectionEducationSecondary}
107
- additionalStyles={{
108
- marginBottom: "s",
109
- }}
88
+ name="search"
89
+ size="xxlarge"
90
+ color="section.education.secondary"
91
+ marginBottom="s"
110
92
  />
111
93
  <Card isCentered>
112
- <CardHeading id="main-heading1" level={HeadingLevels.Three}>
94
+ <CardHeading id="main-heading1" level="three">
113
95
  Find Components
114
96
  </CardHeading>
115
97
  <CardContent>
116
- <Text size={TextSizes.Caption}>
98
+ <Text size="caption">
117
99
  For your convenience, the Reservoir Design System components have
118
100
  been organized into logical categories based on both form and
119
101
  function. Please refer to the <b>COMPONENTS</b> section in the
@@ -132,15 +114,13 @@ import DSProvider from "../theme/provider";
132
114
  }}
133
115
  >
134
116
  <Icon
135
- name={IconNames.FileTypeSpreadsheet}
136
- size={IconSizes.ExtraExtraLarge}
137
- color={IconColors.SectionEducationSecondary}
138
- additionalStyles={{
139
- marginBottom: "s",
140
- }}
117
+ name="fileTypeSpreadsheet"
118
+ size="xxlarge"
119
+ color="section.education.secondary"
120
+ marginBottom="s"
141
121
  />
142
122
  <Card isCentered>
143
- <CardHeading id="main-heading1" level={HeadingLevels.Three}>
123
+ <CardHeading id="main-heading1" level="three">
144
124
  View the Code
145
125
  </CardHeading>
146
126
  <CardContent>
@@ -149,13 +129,13 @@ import DSProvider from "../theme/provider";
149
129
  published on{" "}
150
130
  <Link
151
131
  href="https://www.npmjs.com/package/@nypl/design-system-react-components"
152
- type={LinkTypes.External}
132
+ type="external"
153
133
  >
154
134
  npm
155
135
  </Link>
156
136
  . If you're looking to contribute to this project, checkout the <Link
157
137
  href="https://github.com/NYPL/nypl-design-system"
158
- type={LinkTypes.External}
138
+ type="external"
159
139
  >
160
140
  nypl-design-system
161
141
  </Link> repo on Github for more information.
@@ -0,0 +1 @@
1
+ export type LayoutTypes = "column" | "row";
@@ -20,7 +20,7 @@ describe("useNYPLTheme", () => {
20
20
  wrapper: ({ children }) => <DSProvider>{children}</DSProvider>,
21
21
  });
22
22
  const allKeys = Object.keys(result.current);
23
- const colorsKeys = Object.keys(result.current.colors);
23
+ const colorsKeys = Object.keys((result.current as any).colors);
24
24
 
25
25
  expect(allKeys).toEqual([
26
26
  "breakpoints",
@@ -55,8 +55,7 @@ This will allow you to use NYPL-specific styles in your components through CSS-i
55
55
  All DS components _should_ be used with their current styles. If a DS component
56
56
  needs an updated style, first contact the Design System and UX teams about this
57
57
  update. If you really _need_ to update a style and there is no available
58
- variant, then you can add styles directly to the `additionalStyles` prop. At the
59
- moment, not all DS components have this prop or feature.
58
+ variant, then you can add styles directly as style prop.
60
59
 
61
60
  For example, if the `Heading` component should render the text in NYPL's green
62
61
  color used for "success primary" and add a bold font weight, then you can do
@@ -70,10 +69,8 @@ return (
70
69
  <div>
71
70
  <Heading
72
71
  level={2}
73
- additionalStyles={{
74
- color: theme.colors.ui.sucess.primary,
75
- fontWeight: theme.fontWeights.bold,
76
- }}
72
+ color={theme.colors.ui.success.primary}
73
+ fontWeight={theme.fontWeights.bold}
77
74
  >
78
75
  Get a Digital Library Card Today in a Few Easy Steps
79
76
  </Heading>
package/src/index.ts CHANGED
@@ -4,7 +4,6 @@ import "./styles.scss";
4
4
  // components for usage in consuming applications.
5
5
  export {
6
6
  Box,
7
- ButtonGroup,
8
7
  Center,
9
8
  Circle,
10
9
  Flex,
@@ -16,12 +15,16 @@ export {
16
15
  Stack,
17
16
  VStack,
18
17
  } from "@chakra-ui/react";
19
- export { default as Accordion } from "./components/Accordion/Accordion";
20
- export { AccordionTypes } from "./components/Accordion/AccordionTypes";
21
- export { default as Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs";
22
- export { BreadcrumbsTypes } from "./components/Breadcrumbs/BreadcrumbsTypes";
23
- export { default as Button } from "./components/Button/Button";
24
- export { ButtonTypes } from "./components/Button/ButtonTypes";
18
+ export {
19
+ default as Accordion,
20
+ AccordionTypes,
21
+ } from "./components/Accordion/Accordion";
22
+ export {
23
+ default as Breadcrumbs,
24
+ BreadcrumbsTypes,
25
+ } from "./components/Breadcrumbs/Breadcrumbs";
26
+ export { default as Button, ButtonTypes } from "./components/Button/Button";
27
+ export { default as ButtonGroup } from "./components/ButtonGroup/ButtonGroup";
25
28
  export {
26
29
  default as Card,
27
30
  CardActions,
@@ -32,65 +35,70 @@ export { default as Checkbox } from "./components/Checkbox/Checkbox";
32
35
  export { default as CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup";
33
36
  export {
34
37
  default as DatePicker,
38
+ DatePickerTypes,
35
39
  FullDateType,
36
40
  } from "./components/DatePicker/DatePicker";
37
- export { DatePickerTypes } from "./components/DatePicker/DatePickerTypes";
38
41
  export { default as DSProvider } from "./theme/provider";
39
42
  export { default as Fieldset } from "./components/Fieldset/Fieldset";
40
43
  export { default as Form, FormField, FormRow } from "./components/Form/Form";
41
- export { FormGaps } from "./components/Form/FormTypes";
42
- export { GridGaps } from "./components/Grid/GridTypes";
43
- export { default as Heading } from "./components/Heading/Heading";
44
- export { HeadingSizes, HeadingLevels } from "./components/Heading/HeadingTypes";
44
+ export {
45
+ default as Heading,
46
+ HeadingSizes,
47
+ HeadingLevels,
48
+ } from "./components/Heading/Heading";
45
49
  export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
46
- export { default as Hero } from "./components/Hero/Hero";
47
- export { HeroTypes } from "./components/Hero/HeroTypes";
50
+ export { default as Hero, HeroTypes } from "./components/Hero/Hero";
48
51
  export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
49
- export { default as Icon } from "./components/Icons/Icon";
50
52
  export {
53
+ default as Icon,
51
54
  IconAlign,
52
55
  IconColors,
53
56
  IconNames,
54
57
  IconRotationTypes,
55
58
  IconSizes,
56
59
  IconTypes,
57
- } from "./components/Icons/IconTypes";
58
- export { default as Image } from "./components/Image/Image";
60
+ } from "./components/Icons/Icon";
59
61
  export {
62
+ default as Image,
60
63
  ImageRatios,
61
64
  ImageSizes,
62
65
  ImageTypes,
63
- } from "./components/Image/ImageTypes";
66
+ } from "./components/Image/Image";
64
67
  export { default as Label } from "./components/Label/Label";
65
- export { LayoutTypes } from "./helpers/enums";
66
- export { default as Link } from "./components/Link/Link";
67
- export { LinkTypes } from "./components/Link/LinkTypes";
68
- export { default as List } from "./components/List/List";
69
- export { ListTypes } from "./components/List/ListTypes";
70
- export { default as Logo } from "./components/Logo/Logo";
71
- export { LogoColors, LogoNames, LogoSizes } from "./components/Logo/LogoTypes";
72
- export { default as Modal } from "./components/Modal/Modal";
73
- export { default as Notification } from "./components/Notification/Notification";
74
- export { NotificationTypes } from "./components/Notification/NotificationTypes";
68
+ export { LayoutTypes } from "./helpers/types";
69
+ export { default as Link, LinkTypes } from "./components/Link/Link";
70
+ export { default as List, ListTypes } from "./components/List/List";
71
+ export { default as Logo, LogoNames, LogoSizes } from "./components/Logo/Logo";
72
+ export { ModalTrigger, useModal } from "./components/Modal/Modal";
73
+ export {
74
+ default as Notification,
75
+ NotificationTypes,
76
+ } from "./components/Notification/Notification";
75
77
  export { default as Pagination } from "./components/Pagination/Pagination";
76
- export { default as ProgressIndicator } from "./components/ProgressIndicator/ProgressIndicator";
77
78
  export {
79
+ default as ProgressIndicator,
78
80
  ProgressIndicatorSizes,
79
81
  ProgressIndicatorTypes,
80
- } from "./components/ProgressIndicator/ProgressIndicatorTypes";
82
+ } from "./components/ProgressIndicator/ProgressIndicator";
81
83
  export { default as Radio } from "./components/Radio/Radio";
82
84
  export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
83
85
  export { default as SearchBar } from "./components/SearchBar/SearchBar";
84
- export { default as Select } from "./components/Select/Select";
85
- export { LabelPositions } from "./components/Select/SelectTypes";
86
- export { default as SimpleGrid } from "./components/Grid/SimpleGrid";
87
- export { default as SkeletonLoader } from "./components/SkeletonLoader/SkeletonLoader";
88
- export { SkeletonLoaderImageRatios } from "./components/SkeletonLoader/SkeletonLoaderTypes";
86
+ export { default as Select, LabelPositions } from "./components/Select/Select";
87
+ export { default as SimpleGrid, GridGaps } from "./components/Grid/SimpleGrid";
88
+ export {
89
+ default as SkeletonLoader,
90
+ SkeletonLoaderImageRatios,
91
+ } from "./components/SkeletonLoader/SkeletonLoader";
92
+ export { default as SkipNavigation } from "./components/SkipNavigation/SkipNavigation";
89
93
  export { default as Slider } from "./components/Slider/Slider";
90
- export { default as StatusBadge } from "./components/StatusBadge/StatusBadge";
91
- export { StatusBadgeTypes } from "./components/StatusBadge/StatusBadgeTypes";
92
- export { default as StructuredContent } from "./components/StructuredContent/StructuredContent";
93
- export { StructuredContentImagePosition } from "./components/StructuredContent/StructuredContentTypes";
94
+ export {
95
+ default as StatusBadge,
96
+ StatusBadgeTypes,
97
+ } from "./components/StatusBadge/StatusBadge";
98
+ export {
99
+ default as StructuredContent,
100
+ StructuredContentImagePosition,
101
+ } from "./components/StructuredContent/StructuredContent";
94
102
  export {
95
103
  default as Tabs,
96
104
  TabList,
@@ -110,21 +118,19 @@ export {
110
118
  TemplateContentSidebar,
111
119
  TemplateFooter,
112
120
  } from "./components/Template/Template";
113
- export { default as Text } from "./components/Text/Text";
114
- export { TextSizes } from "./components/Text/TextTypes";
121
+ export { default as Text, TextSizes } from "./components/Text/Text";
115
122
  export {
116
123
  default as TextInput,
117
124
  TextInputRefType,
125
+ TextInputTypes,
118
126
  } from "./components/TextInput/TextInput";
119
- export { TextInputTypes } from "./components/TextInput/TextInputTypes";
120
- export { default as Toggle } from "./components/Toggle/Toggle";
121
- export { ToggleSizes } from "./components/Toggle/ToggleTypes";
127
+ export { default as Toggle, ToggleSizes } from "./components/Toggle/Toggle";
122
128
  export { default as useCarouselStyles } from "./hooks/useCarouselStyles";
123
129
  export { default as useNYPLTheme } from "./hooks/useNYPLTheme";
124
130
  export { default as useWindowSize } from "./hooks/useWindowSize";
125
- export { default as VideoPlayer } from "./components/VideoPlayer/VideoPlayer";
126
131
  export {
132
+ default as VideoPlayer,
127
133
  VideoPlayerAspectRatios,
128
134
  VideoPlayerTypes,
129
- } from "./components/VideoPlayer/VideoPlayerTypes";
135
+ } from "./components/VideoPlayer/VideoPlayer";
130
136
  export { default as Table } from "./components/Table/Table";
package/src/styles.scss CHANGED
@@ -21,4 +21,3 @@
21
21
  // Components.
22
22
  @import "./components/Autosuggest/_Autosuggest.scss";
23
23
  @import "./components/DatePicker/_DatePicker.scss";
24
- @import "./components/Modal/_Modal.scss";
@@ -0,0 +1,10 @@
1
+ const ButtonGroup = {
2
+ baseStyle: ({ buttonWidth }) => ({
3
+ width: buttonWidth === "default" ? "fit-content" : "100%",
4
+ button: {
5
+ flexGrow: buttonWidth === "default" ? undefined : "1",
6
+ },
7
+ }),
8
+ };
9
+
10
+ export default ButtonGroup;
@@ -1,3 +1,30 @@
1
+ interface CardBaseStyleProps {
2
+ hasImage: boolean;
3
+ imageIsAtEnd: boolean;
4
+ isBordered: boolean;
5
+ isCentered: boolean;
6
+ layout: string;
7
+ mainActionLink: boolean;
8
+ }
9
+ interface BodyPaddingProps {
10
+ hasImage: boolean;
11
+ imageIsAtEnd: boolean;
12
+ isBordered: boolean;
13
+ isRow: boolean;
14
+ }
15
+ interface CardImageBaseStyleProps {
16
+ imageIsAtEnd: boolean;
17
+ isCentered: boolean;
18
+ size: keyof typeof imageSizes;
19
+ layout: string;
20
+ }
21
+ interface CardActionsBaseStyleProps {
22
+ bottomBorder: boolean;
23
+ isCentered: boolean;
24
+ layout: string;
25
+ topBorder: boolean;
26
+ }
27
+
1
28
  const imageSizes = {
2
29
  xxsmall: { flex: { base: "0 0 100%", md: "0 0 64px" }, width: "100%" },
3
30
  xsmall: { flex: { md: "0 0 96px" } },
@@ -8,10 +35,10 @@ const imageSizes = {
8
35
  // This is complicated and can be refactored later...
9
36
  const getBodyPaddingStyles = ({
10
37
  hasImage,
11
- isBordered,
12
38
  imageIsAtEnd,
39
+ isBordered,
13
40
  isRow,
14
- }) => {
41
+ }: BodyPaddingProps) => {
15
42
  let bodyPadding = null;
16
43
  if (isBordered) {
17
44
  bodyPadding = "inset.default";
@@ -39,15 +66,14 @@ const getBodyPaddingStyles = ({
39
66
  };
40
67
  const Card = {
41
68
  parts: ["actions", "body", "heading"],
42
- baseStyle: (props) => {
43
- const {
44
- hasImage,
45
- imageIsAtEnd,
46
- isBordered,
47
- isCentered,
48
- layout,
49
- mainActionLink,
50
- } = props;
69
+ baseStyle: ({
70
+ hasImage,
71
+ imageIsAtEnd,
72
+ isBordered,
73
+ isCentered,
74
+ layout,
75
+ mainActionLink,
76
+ }: CardBaseStyleProps) => {
51
77
  const isRow = layout === "row";
52
78
  const layoutStyles = isRow
53
79
  ? {
@@ -107,8 +133,12 @@ const Card = {
107
133
  };
108
134
 
109
135
  const CardActions = {
110
- baseStyle: (props) => {
111
- const { bottomBorder, isCentered, layout, topBorder } = props;
136
+ baseStyle: ({
137
+ bottomBorder,
138
+ isCentered,
139
+ layout,
140
+ topBorder,
141
+ }: CardActionsBaseStyleProps) => {
112
142
  let justifyContent = null;
113
143
  // Only center in the column layout.
114
144
  if (layout === "row") {
@@ -154,9 +184,14 @@ const CardContent = {
154
184
  };
155
185
 
156
186
  const CardImage = {
157
- baseStyle: ({ imageIsAtEnd, isCentered, layout, size }) => {
187
+ baseStyle: ({
188
+ imageIsAtEnd,
189
+ isCentered,
190
+ layout,
191
+ size,
192
+ }: CardImageBaseStyleProps) => {
158
193
  // These sizes are only for the "row" layout.
159
- const imageSize = imageSizes[size] || {};
194
+ const imageSize = size ? imageSizes[size] : {};
160
195
  const layoutStyles =
161
196
  layout === "row"
162
197
  ? {
@@ -1,6 +1,10 @@
1
+ interface ComponentWrapperProps {
2
+ hasChildren: boolean;
3
+ }
4
+
1
5
  const ComponentWrapper = {
2
6
  parts: ["helperErrorText"],
3
- baseStyle: ({ hasChildren }) => ({
7
+ baseStyle: ({ hasChildren }: ComponentWrapperProps) => ({
4
8
  helperErrorText: {
5
9
  marginTop: hasChildren ? "xs" : "0",
6
10
  },
@@ -1,6 +1,12 @@
1
+ interface BaseStyleProps {
2
+ columnHeadersTextColor?: string;
3
+ showRowDividers?: boolean;
4
+ useRowHeaders?: boolean;
5
+ }
6
+
1
7
  export const baseTHStyles = (
2
8
  showRowDividers = false,
3
- columnHeadersTextColor = false
9
+ columnHeadersTextColor = ""
4
10
  ) => ({
5
11
  border: showRowDividers ? undefined : "none",
6
12
  borderBottom: showRowDividers ? undefined : "0px",
@@ -38,7 +44,7 @@ export const baseStyle = ({
38
44
  columnHeadersTextColor,
39
45
  showRowDividers,
40
46
  useRowHeaders,
41
- }) => ({
47
+ }: BaseStyleProps) => ({
42
48
  // Headers `th` can be rendered as the first cell in every row through the
43
49
  // `useRowHeaders`. Whereas the header `th` in the `thead` can be rendered
44
50
  // with a custom color, the row header `th` in the `tbody` should always
@@ -1,8 +1,12 @@
1
1
  import { labelLegendText } from "./global";
2
2
  import { screenreaderOnly } from "./globalMixins";
3
3
 
4
+ interface FieldSetProps {
5
+ isLegendHidden?: boolean;
6
+ }
7
+
4
8
  const Fieldset = {
5
- baseStyle: ({ isLegendHidden }) => {
9
+ baseStyle: ({ isLegendHidden }: FieldSetProps) => {
6
10
  const screenreaderStyles = isLegendHidden ? screenreaderOnly : {};
7
11
 
8
12
  return {
@@ -1,5 +1,9 @@
1
+ interface HelperErrorTextBaseStyle {
2
+ isInvalid: boolean;
3
+ }
4
+
1
5
  const helperErrorText = {
2
- baseStyle: ({ isInvalid }) => ({
6
+ baseStyle: ({ isInvalid }: HelperErrorTextBaseStyle) => ({
3
7
  marginTop: "xxs",
4
8
  marginBottom: "0",
5
9
  fontSize: "helper.default",
@@ -187,7 +187,7 @@ const campaign = {
187
187
  maxWidth: { md: "960px" },
188
188
  },
189
189
  };
190
- const fiftyfifty = {
190
+ const fiftyFifty = {
191
191
  content: {
192
192
  ...wrapperStyles,
193
193
  alignItems: "center",
@@ -231,7 +231,7 @@ const Hero = {
231
231
  secondaryWhatsOn,
232
232
  tertiary,
233
233
  campaign,
234
- fiftyfifty,
234
+ fiftyFifty,
235
235
  },
236
236
  };
237
237
 
@@ -1,5 +1,9 @@
1
+ interface HorizontalRuleBaseStyle {
2
+ align: string;
3
+ }
4
+
1
5
  const HorizontalRule = {
2
- baseStyle: ({ align }) => ({
6
+ baseStyle: ({ align }: HorizontalRuleBaseStyle) => ({
3
7
  bg: "ui.gray.light-cool",
4
8
  border: "0",
5
9
  height: "2px",
@@ -52,8 +52,14 @@ const size = {
52
52
  width: "0.875rem",
53
53
  },
54
54
  };
55
+ interface IconBaseStyle {
56
+ align: keyof typeof align;
57
+ color: string;
58
+ iconRotation: keyof typeof iconRotation;
59
+ size: keyof typeof size;
60
+ }
55
61
  const Icon = {
56
- baseStyle: (props) => {
62
+ baseStyle: (props: IconBaseStyle) => {
57
63
  const allStyles = {
58
64
  ...svgBase,
59
65
  ...align[props.align],
@@ -1,3 +1,11 @@
1
+ interface CustomImageBaseStyle {
2
+ size: keyof typeof imageSizes;
3
+ }
4
+ interface CustomImageWrapperBaseStyle {
5
+ ratio: keyof typeof imageRatios;
6
+ size: keyof typeof imageSizes;
7
+ }
8
+
1
9
  const imageWrap = {
2
10
  position: "relative",
3
11
  width: "100%",
@@ -75,7 +83,7 @@ const CustomImage = {
75
83
  },
76
84
  },
77
85
  },
78
- baseStyle: ({ size = "default" }) => ({
86
+ baseStyle: ({ size = "default" }: CustomImageBaseStyle) => ({
79
87
  figure: {
80
88
  margin: "auto",
81
89
  ...imageSizes[size],
@@ -96,13 +104,16 @@ const CustomImage = {
96
104
  ...imageSizes[size],
97
105
  },
98
106
  captionWrappers: {
99
- marginBottom: "xxs",
107
+ marginTop: "xxs",
100
108
  },
101
109
  }),
102
110
  };
103
111
  const CustomImageWrapper = {
104
112
  parts: ["crop"],
105
- baseStyle: ({ ratio = "original", size = "default" }) => ({
113
+ baseStyle: ({
114
+ ratio = "original",
115
+ size = "default",
116
+ }: CustomImageWrapperBaseStyle) => ({
106
117
  marginLeft: "auto",
107
118
  marginRight: "auto",
108
119
  width: "100%",
@@ -1,7 +1,11 @@
1
1
  import { labelLegendText } from "./global";
2
2
 
3
+ interface LabelBaseStyle {
4
+ isInlined: boolean;
5
+ }
6
+
3
7
  const Label = {
4
- baseStyle: ({ isInlined }) => ({
8
+ baseStyle: ({ isInlined }: LabelBaseStyle) => ({
5
9
  ...labelLegendText,
6
10
  flex: isInlined ? "1" : null,
7
11
  whiteSpace: isInlined ? "nowrap" : null,
@@ -1,5 +1,10 @@
1
1
  import { textMargin } from "./global";
2
2
 
3
+ interface ListBaseStyle {
4
+ inline?: boolean;
5
+ noStyling: boolean;
6
+ }
7
+
3
8
  export const baseListStyles = (inline = false, noStyling = false) => ({
4
9
  // Browser automatically applies margin, so by default we unset it.
5
10
  margin: noStyling ? "0" : "unset",
@@ -71,9 +76,10 @@ export const baseDefinitionStyles = {
71
76
  };
72
77
 
73
78
  const List = {
74
- baseStyle: ({ inline, noStyling }) => baseListStyles(inline, noStyling),
79
+ baseStyle: ({ inline, noStyling }: ListBaseStyle) =>
80
+ baseListStyles(inline, noStyling),
75
81
  variants: {
76
- ul: ({ noStyling }) => baseUnorderedStyles(noStyling),
82
+ ul: ({ noStyling }: ListBaseStyle) => baseUnorderedStyles(noStyling),
77
83
  ol: textMargin,
78
84
  dl: baseDefinitionStyles,
79
85
  },
@@ -1,3 +1,7 @@
1
+ interface LogoBaseStyle {
2
+ size: keyof typeof size;
3
+ }
4
+
1
5
  const svgBase = {
2
6
  display: "inline-block",
3
7
  height: "auto",
@@ -35,7 +39,7 @@ const size = {
35
39
  },
36
40
  };
37
41
  const Logo = {
38
- baseStyle: (props) => {
42
+ baseStyle: (props: LogoBaseStyle) => {
39
43
  const allStyles = {
40
44
  ...svgBase,
41
45
  ...size[props.size],