@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,12 +2,10 @@ import { Box, chakra, useMultiStyleConfig } from "@chakra-ui/react";
2
2
  import React, { useState } from "react";
3
3
 
4
4
  import Button from "../Button/Button";
5
- import { ButtonTypes } from "../Button/ButtonTypes";
6
5
  import Heading from "../Heading/Heading";
7
- import { HeadingLevels } from "../Heading/HeadingTypes";
8
- import Icon from "../Icons/Icon";
9
- import { IconColors, IconNames, IconSizes } from "../Icons/IconTypes";
10
- import { NotificationTypes } from "./NotificationTypes";
6
+ import Icon, { IconColors, IconNames, IconSizes } from "../Icons/Icon";
7
+
8
+ export type NotificationTypes = "standard" | "announcement" | "warning";
11
9
  interface BaseProps {
12
10
  /** Optional prop to control text alignment in `NotificationContent` */
13
11
  alignText?: boolean;
@@ -61,11 +59,7 @@ export const NotificationHeading = chakra(
61
59
  return (
62
60
  <Box as="header" __css={styles} {...rest}>
63
61
  {icon}
64
- <Heading
65
- additionalStyles={styles.heading}
66
- id={`${id}-heading`}
67
- level={HeadingLevels.Four}
68
- >
62
+ <Heading id={`${id}-heading`} level="four" __css={styles.heading}>
69
63
  {children}
70
64
  </Heading>
71
65
  </Box>
@@ -108,7 +102,7 @@ export const Notification = chakra((props: NotificationProps) => {
108
102
  noMargin = false,
109
103
  notificationContent,
110
104
  notificationHeading,
111
- notificationType = NotificationTypes.Standard,
105
+ notificationType = "standard",
112
106
  showIcon = true,
113
107
  ...rest
114
108
  } = props;
@@ -122,12 +116,12 @@ export const Notification = chakra((props: NotificationProps) => {
122
116
  });
123
117
  const iconElement = () => {
124
118
  const baseIconProps = {
125
- additionalStyles: styles.icon,
126
- size: IconSizes.Large,
119
+ size: "large" as IconSizes,
120
+ __css: styles.icon,
127
121
  };
128
- // If the icon should not display, return null.
122
+ // If the icon should not display, return undefined.
129
123
  if (!showIcon) {
130
- return null;
124
+ return undefined;
131
125
  }
132
126
  // If a custom icon is passed, add specific `Notification` styles.
133
127
  if (icon)
@@ -135,45 +129,48 @@ export const Notification = chakra((props: NotificationProps) => {
135
129
  id: `${id}-custom-notification-icon`,
136
130
  ...baseIconProps,
137
131
  });
132
+ interface IconProps {
133
+ color: IconColors;
134
+ name: IconNames;
135
+ title: string;
136
+ }
138
137
  const iconProps = {
139
- [NotificationTypes.Announcement]: {
140
- color: IconColors.SectionResearchSecondary,
141
- name: IconNames.SpeakerNotes,
138
+ announcement: {
139
+ color: "section.research.secondary",
140
+ name: "speakerNotes",
142
141
  title: "Notification announcement icon",
143
- },
144
- [NotificationTypes.Standard]: {
145
- color: IconColors.UiBlack,
146
- name: IconNames.AlertNotificationImportant,
142
+ } as IconProps,
143
+ standard: {
144
+ color: "ui.black",
145
+ name: "alertNotificationImportant",
147
146
  title: "Notification standard icon",
148
- },
149
- [NotificationTypes.Warning]: {
150
- color: IconColors.BrandPrimary,
151
- name: IconNames.ErrorFilled,
147
+ } as IconProps,
148
+ warning: {
149
+ color: "brand.primary",
150
+ name: "errorFilled",
152
151
  title: "Notification warning icon",
153
- },
152
+ } as IconProps,
154
153
  };
155
154
  return (
156
155
  <Icon
157
156
  id={`${id}-notification-icon`}
158
- {...baseIconProps}
159
157
  {...iconProps[notificationType]}
158
+ {...baseIconProps}
160
159
  />
161
160
  );
162
161
  };
163
162
  const dismissibleButton = dismissible && (
164
163
  <Button
165
- additionalStyles={styles.dismissibleButton}
166
- attributes={{
167
- "aria-label": "Close the notification",
168
- }}
169
- buttonType={ButtonTypes.Link}
164
+ aria-label="Close the notification"
165
+ buttonType="link"
170
166
  id={`${id}-notification-dismissible-button`}
171
167
  onClick={handleClose}
168
+ __css={styles.dismissibleButton}
172
169
  >
173
170
  <Icon
174
171
  id={`${id}-dismissible-notification-icon`}
175
- name={IconNames.Close}
176
- size={IconSizes.Large}
172
+ name="close"
173
+ size="large"
177
174
  title="Notification close icon"
178
175
  />
179
176
  </Button>
@@ -190,11 +187,11 @@ export const Notification = chakra((props: NotificationProps) => {
190
187
  </NotificationHeading>
191
188
  );
192
189
  // Specific alignment styles for the content.
193
- const alignText = childHeading && showIcon && (!!icon || !isCentered);
190
+ const alignText = !!(childHeading && showIcon && (!!icon || !isCentered));
194
191
  const childContent = (
195
192
  <NotificationContent
196
193
  alignText={alignText}
197
- icon={!childHeading ? iconElem : null}
194
+ icon={!childHeading ? iconElem : undefined}
198
195
  notificationType={notificationType}
199
196
  >
200
197
  {notificationContent}
@@ -8,7 +8,6 @@ import {
8
8
  Story,
9
9
  } from "@storybook/addon-docs";
10
10
  import { withDesign } from "storybook-addon-designs";
11
- import { withQuery } from "@storybook/addon-queryparams";
12
11
 
13
12
  import Button from "../Button/Button";
14
13
  import DSProvider from "../../theme/provider";
@@ -21,7 +20,7 @@ export const hrefProps = getStorybookHrefProps(10);
21
20
  <Meta
22
21
  title={getCategory("Pagination")}
23
22
  component={Pagination}
24
- decorators={[withDesign, withQuery]}
23
+ decorators={[withDesign]}
25
24
  parameters={{
26
25
  design: {
27
26
  type: "figma",
@@ -44,7 +43,7 @@ export const hrefProps = getStorybookHrefProps(10);
44
43
  | Component Version | DS Version |
45
44
  | ----------------- | ---------- |
46
45
  | Added | `0.0.10` |
47
- | Latest | `0.26.0` |
46
+ | Latest | `0.28.0` |
48
47
 
49
48
  ## Table of Contents
50
49
 
@@ -171,7 +170,7 @@ export function CurrentPagePaginationExample() {
171
170
  currentPage={page}
172
171
  onPageChange={(selectedPage) => handleSelection(selectedPage)}
173
172
  />
174
- <Button type="button" buttonType="primary" onClick={handleClick}>
173
+ <Button type="button" onClick={handleClick}>
175
174
  Go to Page 1
176
175
  </Button>
177
176
  </VStack>
@@ -3,8 +3,8 @@ import React, { useState, useRef } from "react";
3
3
 
4
4
  import Link from "../Link/Link";
5
5
  import List from "../List/List";
6
- import { ListTypes } from "../List/ListTypes";
7
6
  import { range } from "../../utils/utils";
7
+
8
8
  export interface PaginationProps {
9
9
  /** Additional className. */
10
10
  className?: string;
@@ -51,7 +51,7 @@ export const Pagination = chakra((props: PaginationProps) => {
51
51
  // function exists, then set the internal state – selectedPage –
52
52
  // to the new currentPage and update the refCurrentPage with that value.
53
53
  React.useEffect(() => {
54
- if (onPageChange && currentPage !== refCurrentPage.current) {
54
+ if (onPageChange && currentPage && currentPage !== refCurrentPage.current) {
55
55
  setSelectedPage(currentPage);
56
56
  refCurrentPage.current = currentPage;
57
57
  }
@@ -110,7 +110,10 @@ export const Pagination = chakra((props: PaginationProps) => {
110
110
  * 2. Otherwise, we stay on the same page by setting the `href` attribute to
111
111
  * "#" and call the `onPageChange` prop through the `onClick` callback.
112
112
  */
113
- const getLinkElement = (type: string, item?: number) => {
113
+ const getLinkElement = (
114
+ type: "items" | "previous" | "next",
115
+ item?: number
116
+ ) => {
114
117
  const isSelectedPage = selectedPage === item;
115
118
  // The current page link has different styles.
116
119
  const currentStyles = isSelectedPage
@@ -121,11 +124,13 @@ export const Pagination = chakra((props: PaginationProps) => {
121
124
  : {};
122
125
  const allAttrs = {
123
126
  items: {
124
- href: changeUrls ? getPageHref(item) : "#",
127
+ href: changeUrls ? getPageHref(item as number) : "#",
125
128
  attributes: {
126
129
  "aria-label": `Page ${item}`,
127
130
  "aria-current": isSelectedPage ? "page" : null,
128
- onClick: changeUrls ? undefined : (e) => handlePageClick(e, item),
131
+ onClick: changeUrls
132
+ ? undefined
133
+ : (e: Event) => handlePageClick(e, item as number),
129
134
  },
130
135
  text: item,
131
136
  },
@@ -149,13 +154,13 @@ export const Pagination = chakra((props: PaginationProps) => {
149
154
  const linkAttrs = allAttrs[type];
150
155
  return (
151
156
  <Link
152
- additionalStyles={{
157
+ href={linkAttrs.href}
158
+ id={`${id}-${linkAttrs.text}`}
159
+ {...linkAttrs.attributes}
160
+ __css={{
153
161
  ...styles.link,
154
162
  ...currentStyles,
155
163
  }}
156
- attributes={linkAttrs.attributes}
157
- href={linkAttrs.href}
158
- id={`${id}-${linkAttrs.text}`}
159
164
  >
160
165
  {linkAttrs.text}
161
166
  </Link>
@@ -252,7 +257,7 @@ export const Pagination = chakra((props: PaginationProps) => {
252
257
  __css={styles}
253
258
  {...rest}
254
259
  >
255
- <List type={ListTypes.Unordered} inline noStyling id={`${id}-list`}>
260
+ <List type="ul" inline noStyling id={`${id}-list`}>
256
261
  {previousLiLink}
257
262
  {getPaginationNumbers(selectedPage)}
258
263
  {nextLiLink}
@@ -8,25 +8,10 @@ import {
8
8
  } from "@storybook/addon-docs";
9
9
  import { withDesign } from "storybook-addon-designs";
10
10
 
11
- import { GridGaps } from "../Grid/GridTypes";
12
11
  import ProgressIndicator from "./ProgressIndicator";
13
- import {
14
- ProgressIndicatorSizes,
15
- ProgressIndicatorTypes,
16
- } from "./ProgressIndicatorTypes";
17
12
  import SimpleGrid from "../Grid/SimpleGrid";
18
13
  import { getCategory } from "../../utils/componentCategories";
19
14
  import DSProvider from "../../theme/provider";
20
- import { getStorybookEnumValues } from "../../utils/utils";
21
-
22
- export const sizesEnumValues = getStorybookEnumValues(
23
- ProgressIndicatorSizes,
24
- "ProgressIndicatorSizes"
25
- );
26
- export const typesEnumValues = getStorybookEnumValues(
27
- ProgressIndicatorTypes,
28
- "ProgressIndicatorTypes"
29
- );
30
15
 
31
16
  <Meta
32
17
  title={getCategory("ProgressIndicator")}
@@ -45,9 +30,7 @@ export const typesEnumValues = getStorybookEnumValues(
45
30
  },
46
31
  id: { control: false },
47
32
  indicatorType: {
48
- control: { type: "radio" },
49
- table: { defaultValue: { summary: "ProgressIndicatorTypes.Linear" } },
50
- options: typesEnumValues.options,
33
+ table: { defaultValue: { summary: "linear" } },
51
34
  },
52
35
  isIndeterminate: {
53
36
  table: { defaultValue: { summary: false } },
@@ -56,9 +39,7 @@ export const typesEnumValues = getStorybookEnumValues(
56
39
  table: { defaultValue: { summary: true } },
57
40
  },
58
41
  size: {
59
- control: { type: "radio" },
60
- table: { defaultValue: { summary: "ProgressIndicatorSizes.Default" } },
61
- options: sizesEnumValues.options,
42
+ table: { defaultValue: { summary: "default" } },
62
43
  },
63
44
  value: {
64
45
  table: { defaultValue: { summary: 0 } },
@@ -71,7 +52,7 @@ export const typesEnumValues = getStorybookEnumValues(
71
52
  | Component Version | DS Version |
72
53
  | ----------------- | ---------- |
73
54
  | Added | `0.25.4` |
74
- | Latest | `0.26.0` |
55
+ | Latest | `0.28.0` |
75
56
 
76
57
  ## Table of Contents
77
58
 
@@ -98,21 +79,15 @@ export const typesEnumValues = getStorybookEnumValues(
98
79
  args={{
99
80
  darkMode: false,
100
81
  id: "progressIndicator-id",
101
- indicatorType: "ProgressIndicatorTypes.Linear",
82
+ indicatorType: "linear",
102
83
  isIndeterminate: false,
103
84
  labelText: "Progress",
104
85
  showLabel: true,
105
- size: "ProgressIndicatorSizes.Default",
86
+ size: "default",
106
87
  value: 50,
107
88
  }}
108
89
  >
109
- {(args) => (
110
- <ProgressIndicator
111
- {...args}
112
- indicatorType={typesEnumValues.getValue(args.indicatorType)}
113
- size={sizesEnumValues.getValue(args.size)}
114
- />
115
- )}
90
+ {(args) => <ProgressIndicator {...args} />}
116
91
  </Story>
117
92
  </Canvas>
118
93
 
@@ -152,7 +127,7 @@ dialogs, etc.
152
127
  >
153
128
  <ProgressIndicator
154
129
  id="linear"
155
- indicatorType={ProgressIndicatorTypes.Linear}
130
+ indicatorType="linear"
156
131
  labelText="Linear Progress Type"
157
132
  value={50}
158
133
  />
@@ -162,8 +137,7 @@ dialogs, etc.
162
137
  ## Circular Type
163
138
 
164
139
  The circular progress type is preferred for large content areas and for
165
- full-screen loading. Set the `indicatorType` prop to
166
- `ProgressIndicatorTypes.Circular` for this type.
140
+ full-screen loading. Set the `indicatorType` prop to `"circular"` for this type.
167
141
 
168
142
  <Canvas>
169
143
  <Story
@@ -174,7 +148,7 @@ full-screen loading. Set the `indicatorType` prop to
174
148
  >
175
149
  <ProgressIndicator
176
150
  id="circular"
177
- indicatorType={ProgressIndicatorTypes.Circular}
151
+ indicatorType="circular"
178
152
  labelText="Linear Progress Type"
179
153
  value={50}
180
154
  />
@@ -187,11 +161,11 @@ The starting height for the progress bar is 4px on mobile and 8px for desktop.
187
161
  The `size` prop can be used to optionally set the height to 4px for desktop
188
162
  through the `ProgressIndicatorSizes.Small` value.
189
163
 
190
- `size={ProgressIndicatorSizes.Small}`
164
+ `size="small"`
191
165
 
192
166
  <Canvas>
193
167
  <DSProvider>
194
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
168
+ <SimpleGrid columns={1} gap="grid.m">
195
169
  <ProgressIndicator
196
170
  id="default-size"
197
171
  labelText="Default 8px size"
@@ -200,7 +174,7 @@ through the `ProgressIndicatorSizes.Small` value.
200
174
  <ProgressIndicator
201
175
  id="small-size"
202
176
  labelText="Small 4px size"
203
- size={ProgressIndicatorSizes.Small}
177
+ size="small"
204
178
  value={50}
205
179
  />
206
180
  </SimpleGrid>
@@ -212,22 +186,22 @@ The starting size for the circular progress is 48px and can be made smaller to
212
186
  changes in content. Note that in the small size, the label text and the
213
187
  percentage will not displayed.
214
188
 
215
- `size={ProgressIndicatorSizes.Small}`
189
+ `size="small"`
216
190
 
217
191
  <Canvas>
218
192
  <DSProvider>
219
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
193
+ <SimpleGrid columns={1} gap="grid.m">
220
194
  <ProgressIndicator
221
195
  id="default-size"
222
- indicatorType={ProgressIndicatorTypes.Circular}
196
+ indicatorType="circular"
223
197
  labelText="Default 48px size"
224
198
  value={50}
225
199
  />
226
200
  <ProgressIndicator
227
201
  id="small-size"
228
- indicatorType={ProgressIndicatorTypes.Circular}
202
+ indicatorType="circular"
229
203
  labelText="Small 24px size"
230
- size={ProgressIndicatorSizes.Small}
204
+ size="small"
231
205
  value={50}
232
206
  />
233
207
  </SimpleGrid>
@@ -246,7 +220,7 @@ the progress element to provide a description of the progress for screen readers
246
220
 
247
221
  <Canvas>
248
222
  <DSProvider>
249
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
223
+ <SimpleGrid columns={1} gap="grid.m">
250
224
  <ProgressIndicator
251
225
  id="label"
252
226
  labelText="This label will be added through aria-label"
@@ -255,7 +229,7 @@ the progress element to provide a description of the progress for screen readers
255
229
  />
256
230
  <ProgressIndicator
257
231
  id="label-hidden"
258
- indicatorType={ProgressIndicatorTypes.Circular}
232
+ indicatorType="circular"
259
233
  labelText="This label will be added through aria-label"
260
234
  showLabel={false}
261
235
  value={50}
@@ -272,7 +246,7 @@ exact value or progress of the task is unknown.
272
246
 
273
247
  <Canvas>
274
248
  <DSProvider>
275
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
249
+ <SimpleGrid columns={1} gap="grid.m">
276
250
  <ProgressIndicator
277
251
  id="indeterminate"
278
252
  isIndeterminate
@@ -281,7 +255,7 @@ exact value or progress of the task is unknown.
281
255
  />
282
256
  <ProgressIndicator
283
257
  id="indeterminate-circular"
284
- indicatorType={ProgressIndicatorTypes.Circular}
258
+ indicatorType="circular"
285
259
  isIndeterminate
286
260
  labelText="Indeterminate state"
287
261
  value={50}
@@ -300,7 +274,7 @@ Note: the background is manually set to better showcase the `darkMode` prop.
300
274
  <Canvas>
301
275
  <DSProvider>
302
276
  <Box bg="black" w="100%" h="200px" p="20px">
303
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
277
+ <SimpleGrid columns={1} gap="grid.m">
304
278
  <ProgressIndicator
305
279
  darkMode
306
280
  id="darkmode"
@@ -310,7 +284,7 @@ Note: the background is manually set to better showcase the `darkMode` prop.
310
284
  <ProgressIndicator
311
285
  darkMode
312
286
  id="darkmode-circular"
313
- indicatorType={ProgressIndicatorTypes.Circular}
287
+ indicatorType="circular"
314
288
  labelText="Dark Mode"
315
289
  value={50}
316
290
  />
@@ -337,7 +311,7 @@ function ProgressIndicatorExample() {
337
311
  return () => clearInterval(interval);
338
312
  }, []);
339
313
  return (
340
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
314
+ <SimpleGrid columns={1} gap="grid.m">
341
315
  <ProgressIndicator
342
316
  id="example"
343
317
  labelText="Progress example"
@@ -345,7 +319,7 @@ function ProgressIndicatorExample() {
345
319
  />
346
320
  <ProgressIndicator
347
321
  id="example-circular"
348
- indicatorType={ProgressIndicatorTypes.Circular}
322
+ indicatorType="circular"
349
323
  labelText="Progress example"
350
324
  value={value}
351
325
  />
@@ -363,7 +337,7 @@ export function ProgressIndicatorExample() {
363
337
  return () => clearInterval(interval);
364
338
  }, []);
365
339
  return (
366
- <SimpleGrid columns={1} gap={GridGaps.Medium}>
340
+ <SimpleGrid columns={1} gap="grid.m">
367
341
  <ProgressIndicator
368
342
  id="example"
369
343
  labelText="Progress example"
@@ -371,7 +345,7 @@ export function ProgressIndicatorExample() {
371
345
  />
372
346
  <ProgressIndicator
373
347
  id="example-circular"
374
- indicatorType={ProgressIndicatorTypes.Circular}
348
+ indicatorType="circular"
375
349
  labelText="Progress example"
376
350
  value={value}
377
351
  />
@@ -4,7 +4,6 @@ import { axe } from "jest-axe";
4
4
  import renderer from "react-test-renderer";
5
5
 
6
6
  import ProgressIndicator from "./ProgressIndicator";
7
- import { ProgressIndicatorTypes } from "./ProgressIndicatorTypes";
8
7
 
9
8
  describe("ProgressIndicator Accessibility", () => {
10
9
  it("passes axe accessibility for linear and circular types", async () => {
@@ -20,7 +19,7 @@ describe("ProgressIndicator Accessibility", () => {
20
19
  id="progressIndicatorCircular"
21
20
  labelText="Circular"
22
21
  value={50}
23
- indicatorType={ProgressIndicatorTypes.Circular}
22
+ indicatorType="circular"
24
23
  />
25
24
  );
26
25
  expect(await axe(linearUtils.container)).toHaveNoViolations();
@@ -41,7 +40,7 @@ describe("ProgressIndicator Accessibility", () => {
41
40
  id="progressIndicatorCircular"
42
41
  labelText="Circular"
43
42
  value={50}
44
- indicatorType={ProgressIndicatorTypes.Circular}
43
+ indicatorType="circular"
45
44
  showLabel={false}
46
45
  />
47
46
  );
@@ -63,7 +62,7 @@ describe("ProgressIndicator Accessibility", () => {
63
62
  id="progressIndicatorCircular"
64
63
  labelText="Circular"
65
64
  value={50}
66
- indicatorType={ProgressIndicatorTypes.Circular}
65
+ indicatorType="circular"
67
66
  isIndeterminate
68
67
  />
69
68
  );
@@ -85,7 +84,7 @@ describe("ProgressIndicator Accessibility", () => {
85
84
  id="progressIndicatorCircular"
86
85
  labelText="Circular"
87
86
  value={50}
88
- indicatorType={ProgressIndicatorTypes.Circular}
87
+ indicatorType="circular"
89
88
  darkMode
90
89
  />
91
90
  );
@@ -108,7 +107,7 @@ describe("ProgressIndicator", () => {
108
107
  <ProgressIndicator
109
108
  id="progressIndicator"
110
109
  labelText="Circular"
111
- indicatorType={ProgressIndicatorTypes.Circular}
110
+ indicatorType="circular"
112
111
  value={50}
113
112
  />
114
113
  );
@@ -196,7 +195,7 @@ describe("ProgressIndicator", () => {
196
195
  id="circularBasic"
197
196
  labelText="Circular"
198
197
  value={50}
199
- indicatorType={ProgressIndicatorTypes.Circular}
198
+ indicatorType="circular"
200
199
  />
201
200
  )
202
201
  .toJSON();
@@ -216,7 +215,7 @@ describe("ProgressIndicator", () => {
216
215
  id="circularNoLabel"
217
216
  labelText="Circular"
218
217
  value={50}
219
- indicatorType={ProgressIndicatorTypes.Circular}
218
+ indicatorType="circular"
220
219
  showLabel={false}
221
220
  />
222
221
  )
@@ -237,7 +236,7 @@ describe("ProgressIndicator", () => {
237
236
  id="circularIndeterminate"
238
237
  labelText="Circular"
239
238
  value={50}
240
- indicatorType={ProgressIndicatorTypes.Circular}
239
+ indicatorType="circular"
241
240
  isIndeterminate
242
241
  />
243
242
  )
@@ -258,7 +257,7 @@ describe("ProgressIndicator", () => {
258
257
  id="circularDarkMode"
259
258
  labelText="Circular"
260
259
  value={50}
261
- indicatorType={ProgressIndicatorTypes.Circular}
260
+ indicatorType="circular"
262
261
  darkMode
263
262
  />
264
263
  )
@@ -8,12 +8,10 @@ import {
8
8
  } from "@chakra-ui/react";
9
9
  import React from "react";
10
10
 
11
- import {
12
- ProgressIndicatorSizes,
13
- ProgressIndicatorTypes,
14
- } from "./ProgressIndicatorTypes";
15
11
  import Label from "../Label/Label";
16
12
 
13
+ export type ProgressIndicatorSizes = "default" | "small";
14
+ export type ProgressIndicatorTypes = "circular" | "linear";
17
15
  export interface ProgressIndicatorProps {
18
16
  /** Flag to render the component in a dark background. */
19
17
  darkMode?: boolean;
@@ -44,11 +42,11 @@ export const ProgressIndicator = chakra((props: ProgressIndicatorProps) => {
44
42
  const {
45
43
  darkMode = false,
46
44
  id,
47
- indicatorType = ProgressIndicatorTypes.Linear,
45
+ indicatorType = "linear",
48
46
  isIndeterminate = false,
49
47
  labelText,
50
48
  showLabel = true,
51
- size = ProgressIndicatorSizes.Default,
49
+ size = "default",
52
50
  value = 0,
53
51
  ...rest
54
52
  } = props;
@@ -74,33 +72,31 @@ export const ProgressIndicator = chakra((props: ProgressIndicatorProps) => {
74
72
  id,
75
73
  // If the label is visually shown, associate it with the progress indicator.
76
74
  // Otherwise, the `aria-label` will be added.
77
- "aria-label": showLabel ? null : labelText,
78
- "aria-labelledby": showLabel ? `${id}-label` : null,
75
+ "aria-label": showLabel ? undefined : labelText,
76
+ "aria-labelledby": showLabel ? `${id}-label` : undefined,
79
77
  // If `isIndeterminate` is true, then it overrides the `value` prop.
80
- isIndeterminate: isIndeterminate || null,
81
- value: isIndeterminate ? null : finalValue,
78
+ isIndeterminate: isIndeterminate || undefined,
79
+ value: isIndeterminate ? undefined : finalValue,
82
80
  };
83
- const progressComponent = (indicatorType) => {
81
+ const progressComponent = (indicatorType: ProgressIndicatorTypes) => {
84
82
  // Only display the percentage text for the default size, not in the
85
83
  // indeterminate state, and when `showLabel` is true.
86
- if (indicatorType === ProgressIndicatorTypes.Circular) {
84
+ if (indicatorType === "circular") {
87
85
  // For the small size, since the label won't be visible, we need to add
88
86
  // it to the parent component's `aria-label` attribute.
89
- if (size === ProgressIndicatorSizes.Small) {
87
+ if (size === "small") {
90
88
  progressProps["aria-label"] = labelText;
91
89
  }
92
90
  return (
93
91
  <Box __css={styles.circularContainer}>
94
92
  <ChakraCircularProgress {...progressProps} sx={styles.circular}>
95
- {showLabel &&
96
- !isIndeterminate &&
97
- size !== ProgressIndicatorSizes.Small && (
98
- <ChakraCircularProgressLabel>
99
- {finalValue}%
100
- </ChakraCircularProgressLabel>
101
- )}
93
+ {showLabel && !isIndeterminate && size !== "small" && (
94
+ <ChakraCircularProgressLabel>
95
+ {finalValue}%
96
+ </ChakraCircularProgressLabel>
97
+ )}
102
98
  </ChakraCircularProgress>
103
- {showLabel && size !== ProgressIndicatorSizes.Small && (
99
+ {showLabel && size !== "small" && (
104
100
  <Label id={`${id}-label`} htmlFor={id}>
105
101
  {labelText}
106
102
  </Label>