@moda/om 16.1.1 → 16.3.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 (331) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/index.cjs.js +344 -297
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +343 -296
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/{__mocks__ → src/__mocks__}/Icon.d.ts +0 -0
  7. package/dist/{components → src/components}/AspectRatioBox/AspectRatioBox.d.ts +0 -0
  8. package/dist/{components → src/components}/AspectRatioBox/AspectRatioBox.stories.d.ts +0 -0
  9. package/dist/{components → src/components}/AspectRatioBox/AspectRatioBox.test.d.ts +0 -0
  10. package/dist/{components → src/components}/AspectRatioBox/index.d.ts +0 -0
  11. package/dist/{components → src/components}/Badge/Badge.d.ts +0 -0
  12. package/dist/{components → src/components}/Badge/Badge.stories.d.ts +0 -0
  13. package/dist/{components → src/components}/Badge/Badge.test.d.ts +0 -0
  14. package/dist/{components → src/components}/Badge/index.d.ts +0 -0
  15. package/dist/{components → src/components}/Breadcrumbs/Breadcrumb/Breadcrumb.d.ts +0 -0
  16. package/dist/{components → src/components}/Breadcrumbs/Breadcrumb/index.d.ts +0 -0
  17. package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +0 -0
  18. package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -0
  19. package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.test.d.ts +0 -0
  20. package/dist/{components → src/components}/Breadcrumbs/index.d.ts +0 -0
  21. package/dist/{components → src/components}/Breakpoint/Breakpoint.d.ts +0 -0
  22. package/dist/{components → src/components}/Breakpoint/Breakpoint.stories.d.ts +0 -0
  23. package/dist/{components → src/components}/Breakpoint/Breakpoint.test.d.ts +0 -0
  24. package/dist/{components → src/components}/Breakpoint/BreakpointProvider.d.ts +0 -0
  25. package/dist/{components → src/components}/Breakpoint/generateMediaQuery.d.ts +0 -0
  26. package/dist/{components → src/components}/Breakpoint/generateMediaQuery.test.d.ts +0 -0
  27. package/dist/{components → src/components}/Breakpoint/index.d.ts +0 -0
  28. package/dist/{components → src/components}/Button/Button.d.ts +0 -0
  29. package/dist/{components → src/components}/Button/Button.stories.d.ts +0 -0
  30. package/dist/{components → src/components}/Button/Button.test.d.ts +0 -0
  31. package/dist/{components → src/components}/Button/index.d.ts +0 -0
  32. package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +0 -0
  33. package/dist/{components → src/components}/Checkbox/Checkbox.stories.d.ts +0 -0
  34. package/dist/{components → src/components}/Checkbox/Checkbox.test.d.ts +0 -0
  35. package/dist/{components → src/components}/Checkbox/index.d.ts +0 -0
  36. package/dist/{components → src/components}/Clickable/Clickable.d.ts +0 -0
  37. package/dist/{components → src/components}/Clickable/Clickable.stories.d.ts +0 -0
  38. package/dist/{components → src/components}/Clickable/Clickable.test.d.ts +0 -0
  39. package/dist/{components → src/components}/Clickable/index.d.ts +0 -0
  40. package/dist/{components → src/components}/ColorSwatch/ColorSwatch.d.ts +0 -0
  41. package/dist/{components → src/components}/ColorSwatch/ColorSwatch.stories.d.ts +0 -0
  42. package/dist/{components → src/components}/ColorSwatch/ColorSwatch.test.d.ts +0 -0
  43. package/dist/{components → src/components}/ColorSwatch/index.d.ts +0 -0
  44. package/dist/{components → src/components}/ColorSwatch/skuColors.d.ts +0 -0
  45. package/dist/{components → src/components}/Constrain/Constrain.d.ts +0 -0
  46. package/dist/{components → src/components}/Constrain/Constrain.stories.d.ts +0 -0
  47. package/dist/{components → src/components}/Constrain/Constrain.test.d.ts +0 -0
  48. package/dist/{components → src/components}/Constrain/ExceedConstrain.d.ts +0 -0
  49. package/dist/{components → src/components}/Constrain/ExceedConstrain.stories.d.ts +0 -0
  50. package/dist/{components → src/components}/Constrain/index.d.ts +0 -0
  51. package/dist/{components → src/components}/ControlLink/ControlLink.d.ts +0 -0
  52. package/dist/{components → src/components}/ControlLink/ControlLink.stories.d.ts +0 -0
  53. package/dist/{components → src/components}/ControlLink/ControlLink.test.d.ts +0 -0
  54. package/dist/{components → src/components}/ControlLink/index.d.ts +0 -0
  55. package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInput.d.ts +0 -0
  56. package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInput.stories.d.ts +0 -0
  57. package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInput.test.d.ts +0 -0
  58. package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInputField.d.ts +0 -0
  59. package/dist/{components → src/components}/CreditCardNumberInput/index.d.ts +0 -0
  60. package/dist/{components → src/components}/DefinitionList/DefinitionList.d.ts +0 -0
  61. package/dist/{components → src/components}/DefinitionList/DefinitionList.stories.d.ts +0 -0
  62. package/dist/{components → src/components}/DefinitionList/DefinitionList.test.d.ts +0 -0
  63. package/dist/{components → src/components}/DefinitionList/index.d.ts +0 -0
  64. package/dist/{components → src/components}/Divider/Divider.d.ts +0 -0
  65. package/dist/{components → src/components}/Divider/Divider.stories.d.ts +0 -0
  66. package/dist/{components → src/components}/Divider/Divider.test.d.ts +0 -0
  67. package/dist/{components → src/components}/Divider/NoLineDivider.d.ts +0 -0
  68. package/dist/{components → src/components}/Divider/TwoLineDivider.d.ts +0 -0
  69. package/dist/{components → src/components}/Divider/index.d.ts +0 -0
  70. package/dist/{components → src/components}/Expandable/Expandable.d.ts +0 -0
  71. package/dist/{components → src/components}/Expandable/Expandable.stories.d.ts +0 -0
  72. package/dist/{components → src/components}/Expandable/Expandable.test.d.ts +0 -0
  73. package/dist/{components → src/components}/Expandable/index.d.ts +0 -0
  74. package/dist/{components → src/components}/Field/Field.d.ts +0 -0
  75. package/dist/{components → src/components}/Field/Field.stories.d.ts +0 -0
  76. package/dist/{components → src/components}/Field/Field.test.d.ts +0 -0
  77. package/dist/{components → src/components}/Field/index.d.ts +0 -0
  78. package/dist/{components → src/components}/Label/Label.d.ts +0 -0
  79. package/dist/{components → src/components}/Label/Label.stories.d.ts +0 -0
  80. package/dist/{components → src/components}/Label/Label.test.d.ts +0 -0
  81. package/dist/{components → src/components}/Label/index.d.ts +0 -0
  82. package/dist/{components → src/components}/Loading/Loading.d.ts +0 -0
  83. package/dist/{components → src/components}/Loading/Loading.stories.d.ts +0 -0
  84. package/dist/{components → src/components}/Loading/Loading.test.d.ts +0 -0
  85. package/dist/{components → src/components}/Loading/index.d.ts +0 -0
  86. package/dist/{components → src/components}/LoadingBalls/LoadingBalls.d.ts +0 -0
  87. package/dist/{components → src/components}/LoadingBalls/LoadingBalls.stories.d.ts +0 -0
  88. package/dist/{components → src/components}/LoadingBalls/index.d.ts +0 -0
  89. package/dist/{components → src/components}/Modal/Modal.d.ts +0 -0
  90. package/dist/{components → src/components}/Modal/Modal.stories.d.ts +0 -0
  91. package/dist/{components → src/components}/Modal/Modal.test.d.ts +0 -0
  92. package/dist/{components → src/components}/Modal/index.d.ts +0 -0
  93. package/dist/{components → src/components}/ModalOverlay/ModalOverlay.d.ts +0 -0
  94. package/dist/{components → src/components}/ModalOverlay/ModalOverlay.stories.d.ts +0 -0
  95. package/dist/{components → src/components}/ModalOverlay/ModalOverlay.test.d.ts +0 -0
  96. package/dist/{components → src/components}/ModalOverlay/index.d.ts +0 -0
  97. package/dist/{components → src/components}/Overlay/Overlay.d.ts +0 -0
  98. package/dist/{components → src/components}/Overlay/Overlay.stories.d.ts +0 -0
  99. package/dist/{components → src/components}/Overlay/Overlay.test.d.ts +0 -0
  100. package/dist/{components → src/components}/Overlay/index.d.ts +0 -0
  101. package/dist/{components → src/components}/Paginator/Paginator.d.ts +0 -0
  102. package/dist/{components → src/components}/Paginator/Paginator.stories.d.ts +0 -0
  103. package/dist/{components → src/components}/Paginator/index.d.ts +0 -0
  104. package/dist/{components → src/components}/PasswordInput/PasswordInput.d.ts +0 -0
  105. package/dist/{components → src/components}/PasswordInput/PasswordInput.stories.d.ts +0 -0
  106. package/dist/{components → src/components}/PasswordInput/index.d.ts +0 -0
  107. package/dist/{components → src/components}/Popover/Popover.d.ts +0 -0
  108. package/dist/{components → src/components}/Popover/Popover.stories.d.ts +0 -0
  109. package/dist/{components → src/components}/Popover/Popover.test.d.ts +0 -0
  110. package/dist/{components → src/components}/Popover/index.d.ts +0 -0
  111. package/dist/{components → src/components}/PromoBanner/PromoBanner.d.ts +0 -0
  112. package/dist/{components → src/components}/PromoBanner/PromoBanner.stories.d.ts +0 -0
  113. package/dist/{components → src/components}/PromoBanner/PromoBanner.test.d.ts +0 -0
  114. package/dist/{components → src/components}/PromoBanner/index.d.ts +0 -0
  115. package/dist/{components → src/components}/RadioButton/RadioButton.d.ts +0 -0
  116. package/dist/{components → src/components}/RadioButton/RadioButton.stories.d.ts +0 -0
  117. package/dist/{components → src/components}/RadioButton/RadioButton.test.d.ts +0 -0
  118. package/dist/{components → src/components}/RadioButton/index.d.ts +0 -0
  119. package/dist/{components → src/components}/SearchInput/SearchInput.d.ts +0 -0
  120. package/dist/{components → src/components}/SearchInput/SearchInput.stories.d.ts +0 -0
  121. package/dist/{components → src/components}/SearchInput/SearchInput.test.d.ts +0 -0
  122. package/dist/{components → src/components}/SearchInput/index.d.ts +0 -0
  123. package/dist/{components → src/components}/Select/MultiSelect.d.ts +0 -0
  124. package/dist/{components → src/components}/Select/Select.d.ts +1 -0
  125. package/dist/{components → src/components}/Select/Select.stories.d.ts +0 -0
  126. package/dist/{components → src/components}/Select/Select.test.d.ts +0 -0
  127. package/dist/{components → src/components}/Select/SelectLabel.d.ts +0 -0
  128. package/dist/{components → src/components}/Select/SelectOption.d.ts +1 -0
  129. package/dist/{components → src/components}/Select/SelectOptions.d.ts +1 -0
  130. package/dist/{components → src/components}/Select/index.d.ts +0 -0
  131. package/dist/{components → src/components}/Select/useSelect.d.ts +0 -0
  132. package/dist/{components → src/components}/SelectableButton/SelectableButton.d.ts +0 -0
  133. package/dist/{components → src/components}/SelectableButton/SelectableButton.stories.d.ts +0 -0
  134. package/dist/{components → src/components}/SelectableButton/SelectableButton.test.d.ts +0 -0
  135. package/dist/{components → src/components}/SelectableButton/index.d.ts +0 -0
  136. package/dist/{components → src/components}/Shape/ArcWindow.d.ts +0 -0
  137. package/dist/{components → src/components}/Shape/Bradley.d.ts +0 -0
  138. package/dist/{components → src/components}/Shape/Brancusi.d.ts +0 -0
  139. package/dist/{components → src/components}/Shape/Circle.d.ts +0 -0
  140. package/dist/{components → src/components}/Shape/Diamond.d.ts +0 -0
  141. package/dist/{components → src/components}/Shape/Keyhole.d.ts +0 -0
  142. package/dist/{components → src/components}/Shape/Mirror.d.ts +0 -0
  143. package/dist/{components → src/components}/Shape/Oval.d.ts +0 -0
  144. package/dist/{components → src/components}/Shape/Shape.d.ts +0 -0
  145. package/dist/{components → src/components}/Shape/Shape.stories.d.ts +0 -0
  146. package/dist/{components → src/components}/Shape/Triangle.d.ts +0 -0
  147. package/dist/{components → src/components}/Shape/Window.d.ts +0 -0
  148. package/dist/{components → src/components}/Shape/index.d.ts +0 -0
  149. package/dist/{components → src/components}/Stack/Stack.d.ts +0 -0
  150. package/dist/{components → src/components}/Stack/Stack.stories.d.ts +0 -0
  151. package/dist/{components → src/components}/Stack/Stack.test.d.ts +0 -0
  152. package/dist/{components → src/components}/Stack/index.d.ts +0 -0
  153. package/dist/{components → src/components}/Tabs/Tab.d.ts +0 -0
  154. package/dist/{components → src/components}/Tabs/TabList.d.ts +0 -0
  155. package/dist/{components → src/components}/Tabs/TabPanel.d.ts +0 -0
  156. package/dist/{components → src/components}/Tabs/TabPanels.d.ts +0 -0
  157. package/dist/{components → src/components}/Tabs/Tabs.d.ts +0 -0
  158. package/dist/{components → src/components}/Tabs/Tabs.stories.d.ts +0 -0
  159. package/dist/{components → src/components}/Tabs/Tabs.test.d.ts +0 -0
  160. package/dist/{components → src/components}/Tabs/index.d.ts +0 -0
  161. package/dist/{components → src/components}/Tag/Tag.d.ts +0 -0
  162. package/dist/{components → src/components}/Tag/Tag.stories.d.ts +0 -0
  163. package/dist/{components → src/components}/Tag/Tag.test.d.ts +0 -0
  164. package/dist/{components → src/components}/Tag/index.d.ts +0 -0
  165. package/dist/{components → src/components}/Text/Text.d.ts +0 -0
  166. package/dist/{components → src/components}/Text/Text.stories.d.ts +0 -0
  167. package/dist/{components → src/components}/Text/Text.test.d.ts +0 -0
  168. package/dist/{components → src/components}/Text/index.d.ts +0 -0
  169. package/dist/{components → src/components}/TextInput/TextInput.d.ts +0 -0
  170. package/dist/{components → src/components}/TextInput/TextInput.stories.d.ts +0 -0
  171. package/dist/{components → src/components}/TextInput/TextInput.test.d.ts +0 -0
  172. package/dist/{components → src/components}/TextInput/index.d.ts +0 -0
  173. package/dist/{components → src/components}/Textarea/Textarea.d.ts +0 -0
  174. package/dist/{components → src/components}/Textarea/Textarea.stories.d.ts +0 -0
  175. package/dist/{components → src/components}/Textarea/Textarea.test.d.ts +0 -0
  176. package/dist/{components → src/components}/Textarea/index.d.ts +0 -0
  177. package/dist/{components → src/components}/Toast/Toast.d.ts +0 -0
  178. package/dist/{components → src/components}/Toast/Toast.stories.d.ts +0 -0
  179. package/dist/{components → src/components}/Toast/Toast.test.d.ts +0 -0
  180. package/dist/{components → src/components}/Toast/index.d.ts +0 -0
  181. package/dist/{components → src/components}/VerticalDivider/VerticalDivider.d.ts +0 -0
  182. package/dist/{components → src/components}/VerticalDivider/VerticalDivider.stories.d.ts +0 -0
  183. package/dist/{components → src/components}/VerticalDivider/VerticalDivider.test.d.ts +0 -0
  184. package/dist/{components → src/components}/VerticalDivider/index.d.ts +0 -0
  185. package/dist/{components → src/components}/index.d.ts +0 -0
  186. package/dist/{hooks → src/hooks}/index.d.ts +0 -0
  187. package/dist/{hooks → src/hooks}/useBreakpoint.d.ts +0 -0
  188. package/dist/{hooks → src/hooks}/useClickOutside.d.ts +0 -0
  189. package/dist/{hooks → src/hooks}/useKeyboardListNavigation.d.ts +0 -0
  190. package/dist/{hooks → src/hooks}/useKeyboardListNavigation.spec.d.ts +0 -0
  191. package/dist/{hooks → src/hooks}/useUpdateEffect.d.ts +0 -0
  192. package/dist/{index.d.ts → src/index.d.ts} +0 -0
  193. package/dist/{mixins → src/mixins}/font-smoothing/font-smoothing.stories.d.ts +0 -0
  194. package/dist/{mixins → src/mixins}/overflow-scroll/overflow-scroll.stories.d.ts +0 -0
  195. package/dist/{mixins → src/mixins}/stack/stack.stories.d.ts +0 -0
  196. package/dist/{mixins → src/mixins}/thin-underline/thin-underline.stories.d.ts +0 -0
  197. package/dist/{mixins → src/mixins}/visually-hidden/visually-hidden.stories.d.ts +0 -0
  198. package/dist/{utilities → src/utilities}/States/State.d.ts +0 -0
  199. package/dist/{utilities → src/utilities}/States/States.d.ts +0 -0
  200. package/dist/{utilities → src/utilities}/States/StatesProps.d.ts +0 -0
  201. package/dist/{utilities → src/utilities}/States/index.d.ts +0 -0
  202. package/dist/{utilities → src/utilities}/States/isRenderProps.d.ts +0 -0
  203. package/dist/{utilities → src/utilities}/States/stringifyProps.d.ts +0 -0
  204. package/dist/{utilities → src/utilities}/index.d.ts +0 -0
  205. package/dist/{utilities → src/utilities}/omit.d.ts +0 -0
  206. package/dist/{utilities → src/utilities}/sample.d.ts +0 -0
  207. package/dist/styles.css +1 -1
  208. package/dist/test/mocks/matchMedia.d.ts +1 -0
  209. package/dist/test/setupTests.d.ts +3 -0
  210. package/package.json +30 -19
  211. package/src/components/AspectRatioBox/AspectRatioBox.test.tsx +3 -3
  212. package/src/components/AspectRatioBox/AspectRatioBox.tsx +4 -4
  213. package/src/components/AspectRatioBox/index.ts +1 -1
  214. package/src/components/Badge/Badge.stories.tsx +5 -5
  215. package/src/components/Badge/Badge.test.tsx +5 -12
  216. package/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.tsx +6 -6
  217. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +6 -6
  218. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +7 -7
  219. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  220. package/src/components/Breakpoint/Breakpoint.stories.tsx +10 -9
  221. package/src/components/Breakpoint/Breakpoint.test.tsx +7 -8
  222. package/src/components/Breakpoint/generateMediaQuery.ts +5 -4
  223. package/src/components/Button/Button.stories.tsx +4 -4
  224. package/src/components/Button/Button.test.tsx +14 -3
  225. package/src/components/Checkbox/Checkbox.stories.tsx +5 -5
  226. package/src/components/Checkbox/Checkbox.test.tsx +12 -14
  227. package/src/components/Checkbox/Checkbox.tsx +4 -4
  228. package/src/components/Clickable/Clickable.stories.tsx +3 -3
  229. package/src/components/Clickable/Clickable.test.tsx +3 -3
  230. package/src/components/ColorSwatch/ColorSwatch.stories.tsx +11 -11
  231. package/src/components/ColorSwatch/ColorSwatch.test.tsx +3 -5
  232. package/src/components/ColorSwatch/ColorSwatch.tsx +1 -1
  233. package/src/components/Constrain/Constrain.stories.tsx +1 -1
  234. package/src/components/Constrain/Constrain.test.tsx +4 -4
  235. package/src/components/Constrain/ExceedConstrain.stories.tsx +2 -2
  236. package/src/components/ControlLink/ControlLink.stories.tsx +1 -1
  237. package/src/components/ControlLink/ControlLink.test.tsx +10 -12
  238. package/src/components/ControlLink/index.ts +1 -1
  239. package/src/components/CreditCardNumberInput/CreditCardNumberInput.stories.tsx +1 -1
  240. package/src/components/CreditCardNumberInput/CreditCardNumberInput.test.tsx +16 -16
  241. package/src/components/CreditCardNumberInput/CreditCardNumberInput.tsx +1 -0
  242. package/src/components/DefinitionList/DefinitionList.stories.tsx +3 -3
  243. package/src/components/DefinitionList/DefinitionList.test.tsx +4 -3
  244. package/src/components/Divider/Divider.stories.tsx +4 -4
  245. package/src/components/Divider/Divider.test.tsx +5 -4
  246. package/src/components/Divider/Divider.tsx +1 -1
  247. package/src/components/Divider/NoLineDivider.tsx +1 -1
  248. package/src/components/Divider/TwoLineDivider.tsx +1 -1
  249. package/src/components/Expandable/Expandable.stories.tsx +8 -8
  250. package/src/components/Expandable/Expandable.test.tsx +17 -6
  251. package/src/components/Expandable/Expandable.tsx +3 -2
  252. package/src/components/Field/Field.stories.tsx +4 -4
  253. package/src/components/Field/Field.test.tsx +25 -34
  254. package/src/components/Field/Field.tsx +5 -5
  255. package/src/components/Field/index.ts +1 -0
  256. package/src/components/Label/Label.test.tsx +3 -3
  257. package/src/components/Loading/Loading.test.tsx +3 -5
  258. package/src/components/Loading/Loading.tsx +2 -1
  259. package/src/components/Modal/Modal.test.tsx +8 -9
  260. package/src/components/ModalOverlay/ModalOverlay.test.tsx +11 -11
  261. package/src/components/ModalOverlay/ModalOverlay.tsx +2 -2
  262. package/src/components/Overlay/Overlay.stories.tsx +1 -1
  263. package/src/components/Overlay/Overlay.test.tsx +3 -3
  264. package/src/components/Paginator/Paginator.tsx +3 -3
  265. package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
  266. package/src/components/PasswordInput/PasswordInput.tsx +6 -6
  267. package/src/components/Popover/Popover.stories.tsx +1 -1
  268. package/src/components/Popover/Popover.test.tsx +9 -6
  269. package/src/components/Popover/Popover.tsx +10 -7
  270. package/src/components/PromoBanner/PromoBanner.stories.tsx +9 -9
  271. package/src/components/PromoBanner/PromoBanner.test.tsx +3 -3
  272. package/src/components/PromoBanner/PromoBanner.tsx +1 -1
  273. package/src/components/RadioButton/RadioButton.stories.tsx +2 -2
  274. package/src/components/RadioButton/RadioButton.test.tsx +6 -10
  275. package/src/components/RadioButton/RadioButton.tsx +4 -4
  276. package/src/components/SearchInput/SearchInput.stories.tsx +2 -2
  277. package/src/components/SearchInput/SearchInput.test.tsx +10 -6
  278. package/src/components/SearchInput/SearchInput.tsx +3 -3
  279. package/src/components/Select/MultiSelect.tsx +7 -7
  280. package/src/components/Select/Select.stories.tsx +17 -15
  281. package/src/components/Select/Select.test.tsx +21 -21
  282. package/src/components/Select/Select.tsx +17 -8
  283. package/src/components/Select/SelectOption.tsx +5 -2
  284. package/src/components/Select/SelectOptions.tsx +8 -5
  285. package/src/components/SelectableButton/SelectableButton.stories.tsx +1 -1
  286. package/src/components/SelectableButton/SelectableButton.test.tsx +3 -3
  287. package/src/components/Shape/ArcWindow.tsx +10 -10
  288. package/src/components/Shape/Bradley.tsx +4 -4
  289. package/src/components/Shape/Brancusi.tsx +4 -4
  290. package/src/components/Shape/Circle.tsx +10 -10
  291. package/src/components/Shape/Diamond.tsx +10 -10
  292. package/src/components/Shape/Keyhole.tsx +4 -4
  293. package/src/components/Shape/Mirror.tsx +4 -4
  294. package/src/components/Shape/Oval.tsx +4 -4
  295. package/src/components/Shape/Triangle.tsx +7 -7
  296. package/src/components/Shape/Window.tsx +4 -4
  297. package/src/components/Stack/Stack.stories.tsx +3 -3
  298. package/src/components/Stack/Stack.test.tsx +7 -5
  299. package/src/components/Tabs/TabList.tsx +1 -1
  300. package/src/components/Tabs/TabPanel.tsx +1 -1
  301. package/src/components/Tabs/TabPanels.tsx +1 -1
  302. package/src/components/Tabs/Tabs.stories.tsx +2 -2
  303. package/src/components/Tabs/Tabs.test.tsx +6 -7
  304. package/src/components/Tabs/Tabs.tsx +7 -1
  305. package/src/components/Tag/Tag.test.tsx +1 -1
  306. package/src/components/Tag/Tag.tsx +6 -5
  307. package/src/components/Text/Text.stories.tsx +5 -5
  308. package/src/components/Text/Text.test.tsx +4 -6
  309. package/src/components/TextInput/TextInput.stories.tsx +1 -1
  310. package/src/components/TextInput/TextInput.test.tsx +4 -5
  311. package/src/components/Textarea/Textarea.stories.tsx +1 -1
  312. package/src/components/Textarea/Textarea.test.tsx +11 -16
  313. package/src/components/Toast/Toast.stories.tsx +1 -1
  314. package/src/components/Toast/Toast.test.tsx +2 -2
  315. package/src/components/Toast/Toast.tsx +6 -6
  316. package/src/components/VerticalDivider/VerticalDivider.stories.tsx +3 -3
  317. package/src/components/VerticalDivider/VerticalDivider.test.tsx +6 -7
  318. package/src/hooks/useKeyboardListNavigation.spec.ts +26 -64
  319. package/src/hooks/useKeyboardListNavigation.ts +2 -0
  320. package/src/hooks/useUpdateEffect.ts +1 -0
  321. package/src/index.ts +2 -2
  322. package/src/mixins/font-smoothing/font-smoothing.stories.tsx +8 -8
  323. package/src/mixins/overflow-scroll/overflow-scroll.stories.tsx +2 -2
  324. package/src/mixins/stack/stack.stories.tsx +5 -6
  325. package/src/mixins/thin-underline/thin-underline.stories.tsx +1 -1
  326. package/src/mixins/visually-hidden/visually-hidden.stories.tsx +1 -1
  327. package/src/utilities/States/State.tsx +3 -2
  328. package/src/utilities/States/States.tsx +4 -3
  329. package/src/utilities/States/StatesProps.tsx +5 -2
  330. package/src/utilities/States/isRenderProps.ts +1 -0
  331. package/src/utilities/States/stringifyProps.tsx +1 -0
package/dist/index.cjs.js CHANGED
@@ -26,8 +26,8 @@ function _interopNamespace(e) {
26
26
  return Object.freeze(n);
27
27
  }
28
28
 
29
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
29
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
31
  var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
32
32
 
33
33
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -1000,20 +1000,20 @@ var typography_1 = typography;
1000
1000
 
1001
1001
  var text = function text(name, font) {
1002
1002
  if (font === void 0) {
1003
- font = "sans";
1003
+ font = 'sans';
1004
1004
  }
1005
1005
 
1006
- var treatment = typography_1.typography["text-treatments"][name];
1006
+ var treatment = typography_1.typography['text-treatments'][name];
1007
1007
  return __assign$b(__assign$b({}, treatment), {
1008
- "font-family": typography_1.typography.fonts[font].join(","),
1009
- "line-height": "" + treatment["line-height"]
1008
+ 'font-family': typography_1.typography.fonts[font].join(','),
1009
+ 'line-height': "".concat(treatment['line-height'])
1010
1010
  });
1011
1011
  };
1012
1012
 
1013
1013
  helpers.text = text;
1014
1014
 
1015
1015
  var remToUnitlessPx = function remToUnitlessPx(value) {
1016
- return parseFloat(value) * parseInt(typography_1.typography["root-font-size"], 0);
1016
+ return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
1017
1017
  };
1018
1018
 
1019
1019
  helpers.remToUnitlessPx = remToUnitlessPx;
@@ -1022,18 +1022,19 @@ var color = function color(name, alpha) {
1022
1022
  var _a;
1023
1023
 
1024
1024
  var color = colors_1.colors.all[name];
1025
- return alpha != null ? colorString.to.rgb(__spreadArray$1(__spreadArray$1([], ((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || [], true), [alpha], false)) : color;
1025
+ return alpha != null ? // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1026
+ colorString.to.rgb(__spreadArray$1(__spreadArray$1([], ((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || [], true), [alpha], false)) : color;
1026
1027
  };
1027
1028
 
1028
1029
  helpers.color = color;
1029
1030
 
1030
- var spacing = function spacing(ty, rx, b, l) {
1031
- return [ty, rx, b, l].reduce(function (acc, v) {
1031
+ var spacing = function spacing(topY, rightX, bottom, left) {
1032
+ return [topY, rightX, bottom, left].reduce(function (acc, value) {
1032
1033
  var _a;
1033
1034
 
1034
- if (v === undefined) return acc;
1035
- return [acc, (_a = space_1.space.scale[v]) !== null && _a !== void 0 ? _a : v].join(" ");
1036
- }, "");
1035
+ if (value === undefined) return acc;
1036
+ return [acc, (_a = space_1.space.scale[value]) !== null && _a !== void 0 ? _a : value].join(' ');
1037
+ }, '');
1037
1038
  };
1038
1039
 
1039
1040
  helpers.spacing = spacing;
@@ -1042,12 +1043,18 @@ helpers.spacing = spacing;
1042
1043
 
1043
1044
  var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function (o, m, k, k2) {
1044
1045
  if (k2 === undefined) k2 = k;
1045
- Object.defineProperty(o, k2, {
1046
- enumerable: true,
1047
- get: function get() {
1048
- return m[k];
1049
- }
1050
- });
1046
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1047
+
1048
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1049
+ desc = {
1050
+ enumerable: true,
1051
+ get: function get() {
1052
+ return m[k];
1053
+ }
1054
+ };
1055
+ }
1056
+
1057
+ Object.defineProperty(o, k2, desc);
1051
1058
  } : function (o, m, k, k2) {
1052
1059
  if (k2 === undefined) k2 = k;
1053
1060
  o[k2] = m[k];
@@ -1274,6 +1281,182 @@ function _nonIterableRest() {
1274
1281
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1275
1282
  }
1276
1283
 
1284
+ var isRenderProps = function isRenderProps(children) {
1285
+ return typeof children === 'function';
1286
+ };
1287
+
1288
+ var classnames = {exports: {}};
1289
+
1290
+ (function (module) {
1291
+ /* global define */
1292
+ (function () {
1293
+
1294
+ var hasOwn = {}.hasOwnProperty;
1295
+
1296
+ function classNames() {
1297
+ var classes = [];
1298
+
1299
+ for (var i = 0; i < arguments.length; i++) {
1300
+ var arg = arguments[i];
1301
+ if (!arg) continue;
1302
+
1303
+ var argType = _typeof(arg);
1304
+
1305
+ if (argType === 'string' || argType === 'number') {
1306
+ classes.push(arg);
1307
+ } else if (Array.isArray(arg)) {
1308
+ if (arg.length) {
1309
+ var inner = classNames.apply(null, arg);
1310
+
1311
+ if (inner) {
1312
+ classes.push(inner);
1313
+ }
1314
+ }
1315
+ } else if (argType === 'object') {
1316
+ if (arg.toString === Object.prototype.toString) {
1317
+ for (var key in arg) {
1318
+ if (hasOwn.call(arg, key) && arg[key]) {
1319
+ classes.push(key);
1320
+ }
1321
+ }
1322
+ } else {
1323
+ classes.push(arg.toString());
1324
+ }
1325
+ }
1326
+ }
1327
+
1328
+ return classes.join(' ');
1329
+ }
1330
+
1331
+ if (module.exports) {
1332
+ classNames["default"] = classNames;
1333
+ module.exports = classNames;
1334
+ } else {
1335
+ window.classNames = classNames;
1336
+ }
1337
+ })();
1338
+ })(classnames);
1339
+
1340
+ var classNames = classnames.exports;
1341
+
1342
+ var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
1343
+ var Stack = function Stack(_ref) {
1344
+ var className = _ref.className,
1345
+ children = _ref.children,
1346
+ space = _ref.space,
1347
+ _ref$direction = _ref.direction,
1348
+ direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
1349
+ alignItems = _ref.alignItems,
1350
+ justifyContent = _ref.justifyContent,
1351
+ style = _ref.style,
1352
+ rest = _objectWithoutProperties(_ref, _excluded$E);
1353
+
1354
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
1355
+ className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
1356
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1357
+ alignItems: alignItems,
1358
+ justifyContent: justifyContent
1359
+ })
1360
+ }, rest), children);
1361
+ };
1362
+
1363
+ var omit = function omit(obj) {
1364
+ for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1365
+ keys[_key - 1] = arguments[_key];
1366
+ }
1367
+
1368
+ return Object.entries(obj).filter(function (_ref) {
1369
+ var _ref2 = _slicedToArray(_ref, 1),
1370
+ key = _ref2[0];
1371
+
1372
+ return !keys.includes(key);
1373
+ }).reduce(function (obj, _ref3) {
1374
+ var _ref4 = _slicedToArray(_ref3, 2),
1375
+ key = _ref4[0],
1376
+ val = _ref4[1];
1377
+
1378
+ return Object.assign(obj, _defineProperty$1({}, key, val));
1379
+ }, {});
1380
+ };
1381
+
1382
+ var truncate = function truncate(string) {
1383
+ var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
1384
+ if (!string) return null;
1385
+ var ellipsis = string.length > maxLength;
1386
+ return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
1387
+ }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
1388
+
1389
+
1390
+ var stringifyProps = function stringifyProps(props) {
1391
+ var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
1392
+ var _ref2 = _slicedToArray(_ref, 2),
1393
+ key = _ref2[0],
1394
+ value = _ref2[1];
1395
+
1396
+ if (key === 'children') return "".concat(memo, " children={...}");
1397
+ if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
1398
+ if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
1399
+ if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
1400
+ if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
1401
+ if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
1402
+ return "".concat(memo, " ").concat(key, "=").concat(value);
1403
+ }, '');
1404
+ return stringifiedProps.trim();
1405
+ };
1406
+
1407
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1408
+
1409
+ /* eslint-enable @typescript-eslint/no-explicit-any */
1410
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1411
+ var isEmpty = function isEmpty(obj) {
1412
+ return Object.entries(obj || {}).length === 0;
1413
+ };
1414
+
1415
+ var StatesProps = function StatesProps(_ref) {
1416
+ var props = _ref.props,
1417
+ children = _ref.children;
1418
+ var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
1419
+ return /*#__PURE__*/React__default["default"].createElement(Stack, {
1420
+ className: "StatesProps",
1421
+ space: 2,
1422
+ direction: "horizontal"
1423
+ }, /*#__PURE__*/React__default["default"].createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default["default"].createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default["default"].createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default["default"].createElement("span", null, " "));
1424
+ };
1425
+
1426
+ var _excluded$D = ["props", "children"];
1427
+ var State = function State(_ref) {
1428
+ var props = _ref.props,
1429
+ children = _ref.children,
1430
+ rest = _objectWithoutProperties(_ref, _excluded$D);
1431
+
1432
+ var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
1433
+ var innerChildren = isRenderProps(children) ? children(props) : children;
1434
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
1435
+ className: "State"
1436
+ }, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
1437
+ className: "State__props"
1438
+ }, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
1439
+ props: props
1440
+ }, innerChildren)));
1441
+ };
1442
+
1443
+ var _excluded$C = ["states", "children"];
1444
+ var States = function States(_ref) {
1445
+ var _ref$states = _ref.states,
1446
+ states = _ref$states === void 0 ? [{}] : _ref$states,
1447
+ children = _ref.children,
1448
+ rest = _objectWithoutProperties(_ref, _excluded$C);
1449
+
1450
+ return /*#__PURE__*/React__default["default"].createElement("div", {
1451
+ className: "States"
1452
+ }, states.map(function (props, index) {
1453
+ return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
1454
+ key: index,
1455
+ props: props
1456
+ }, rest), children);
1457
+ }));
1458
+ };
1459
+
1277
1460
  var _assign = function __assign() {
1278
1461
  _assign = Object.assign || function __assign(t) {
1279
1462
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -1628,7 +1811,7 @@ RemoveScroll.classNames = {
1628
1811
  };
1629
1812
 
1630
1813
  function _extends() {
1631
- _extends = Object.assign || function (target) {
1814
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
1632
1815
  for (var i = 1; i < arguments.length; i++) {
1633
1816
  var source = arguments[i];
1634
1817
 
@@ -1641,7 +1824,6 @@ function _extends() {
1641
1824
 
1642
1825
  return target;
1643
1826
  };
1644
-
1645
1827
  return _extends.apply(this, arguments);
1646
1828
  }
1647
1829
 
@@ -3327,11 +3509,10 @@ var FocusOn$1 = /*#__PURE__*/React__namespace.forwardRef(function (props, parent
3327
3509
  });
3328
3510
 
3329
3511
  function _setPrototypeOf(o, p) {
3330
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
3512
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
3331
3513
  o.__proto__ = p;
3332
3514
  return o;
3333
3515
  };
3334
-
3335
3516
  return _setPrototypeOf(o, p);
3336
3517
  }
3337
3518
 
@@ -4451,24 +4632,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
4451
4632
  };
4452
4633
  };
4453
4634
 
4635
+ /**
4636
+ * creates a hook to control style singleton
4637
+ * @see {@link styleSingleton} for a safer component version
4638
+ * @example
4639
+ * ```tsx
4640
+ * const useStyle = styleHookSingleton();
4641
+ * ///
4642
+ * useStyle('body { overflow: hidden}');
4643
+ */
4644
+
4454
4645
  var styleHookSingleton = function styleHookSingleton() {
4455
4646
  var sheet = stylesheetSingleton();
4456
- return function (styles) {
4647
+ return function (styles, isDynamic) {
4457
4648
  React__namespace.useEffect(function () {
4458
4649
  sheet.add(styles);
4459
4650
  return function () {
4460
4651
  sheet.remove();
4461
4652
  };
4462
- }, [styles]);
4653
+ }, [styles && isDynamic]);
4463
4654
  };
4464
4655
  };
4465
4656
 
4657
+ /**
4658
+ * create a Component to add styles on demand
4659
+ * - styles are added when first instance is mounted
4660
+ * - styles are removed when the last instance is unmounted
4661
+ * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
4662
+ */
4663
+
4466
4664
  var styleSingleton = function styleSingleton() {
4467
4665
  var useStyle = styleHookSingleton();
4468
4666
 
4469
4667
  var Sheet = function Sheet(_a) {
4470
- var styles = _a.styles;
4471
- useStyle(styles);
4668
+ var styles = _a.styles,
4669
+ dynamic = _a.dynamic;
4670
+ useStyle(styles, dynamic);
4472
4671
  return null;
4473
4672
  };
4474
4673
 
@@ -4488,6 +4687,13 @@ var parse = function parse(x) {
4488
4687
 
4489
4688
  var getOffset = function getOffset(gapMode) {
4490
4689
  var cs = window.getComputedStyle(document.body);
4690
+
4691
+ if (process.env.NODE_ENV !== 'production') {
4692
+ if (cs.overflowY === 'hidden') {
4693
+ console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
4694
+ }
4695
+ }
4696
+
4491
4697
  var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
4492
4698
  var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
4493
4699
  var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
@@ -4536,17 +4742,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
4536
4742
 
4537
4743
 
4538
4744
  var RemoveScrollBar = function RemoveScrollBar(props) {
4539
- var _a = React__namespace.useState(getGapWidth(props.gapMode)),
4540
- gap = _a[0],
4541
- setGap = _a[1];
4542
-
4543
- React__namespace.useEffect(function () {
4544
- setGap(getGapWidth(props.gapMode));
4545
- }, [props.gapMode]);
4546
4745
  var noRelative = props.noRelative,
4547
4746
  noImportant = props.noImportant,
4548
- _b = props.gapMode,
4549
- gapMode = _b === void 0 ? 'margin' : _b;
4747
+ _a = props.gapMode,
4748
+ gapMode = _a === void 0 ? 'margin' : _a;
4749
+ var gap = React__namespace.useMemo(function () {
4750
+ return getGapWidth(gapMode);
4751
+ }, [gapMode]);
4550
4752
  return /*#__PURE__*/React__namespace.createElement(Style$1, {
4551
4753
  styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
4552
4754
  });
@@ -5119,60 +5321,6 @@ var FocusOn = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
5119
5321
  }));
5120
5322
  });
5121
5323
 
5122
- var classnames = {exports: {}};
5123
-
5124
- (function (module) {
5125
- /* global define */
5126
- (function () {
5127
-
5128
- var hasOwn = {}.hasOwnProperty;
5129
-
5130
- function classNames() {
5131
- var classes = [];
5132
-
5133
- for (var i = 0; i < arguments.length; i++) {
5134
- var arg = arguments[i];
5135
- if (!arg) continue;
5136
-
5137
- var argType = _typeof(arg);
5138
-
5139
- if (argType === 'string' || argType === 'number') {
5140
- classes.push(arg);
5141
- } else if (Array.isArray(arg)) {
5142
- if (arg.length) {
5143
- var inner = classNames.apply(null, arg);
5144
-
5145
- if (inner) {
5146
- classes.push(inner);
5147
- }
5148
- }
5149
- } else if (argType === 'object') {
5150
- if (arg.toString === Object.prototype.toString) {
5151
- for (var key in arg) {
5152
- if (hasOwn.call(arg, key) && arg[key]) {
5153
- classes.push(key);
5154
- }
5155
- }
5156
- } else {
5157
- classes.push(arg.toString());
5158
- }
5159
- }
5160
- }
5161
-
5162
- return classes.join(' ');
5163
- }
5164
-
5165
- if (module.exports) {
5166
- classNames["default"] = classNames;
5167
- module.exports = classNames;
5168
- } else {
5169
- window.classNames = classNames;
5170
- }
5171
- })();
5172
- })(classnames);
5173
-
5174
- var classNames = classnames.exports;
5175
-
5176
5324
  var dist$3 = {};
5177
5325
 
5178
5326
  var scale = {};
@@ -5280,7 +5428,7 @@ var scale = {};
5280
5428
  __exportStar(scale, exports);
5281
5429
  })(dist$3);
5282
5430
 
5283
- var _excluded$E = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
5431
+ var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
5284
5432
  var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
5285
5433
  var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
5286
5434
  var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
@@ -5295,7 +5443,7 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
5295
5443
  outlined = _ref$outlined === void 0 ? false : _ref$outlined,
5296
5444
  children = _ref.children,
5297
5445
  className = _ref.className,
5298
- rest = _objectWithoutProperties(_ref, _excluded$E);
5446
+ rest = _objectWithoutProperties(_ref, _excluded$B);
5299
5447
 
5300
5448
  var _scale = dist$3.scale({
5301
5449
  width: aspectWidth,
@@ -5325,23 +5473,23 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
5325
5473
  });
5326
5474
  AspectRatioBox.displayName = 'AspectRatioBox';
5327
5475
 
5328
- var _excluded$D = ["className", "theme", "children"];
5476
+ var _excluded$A = ["className", "theme", "children"];
5329
5477
  var Badge = function Badge(_ref) {
5330
5478
  var className = _ref.className,
5331
5479
  theme = _ref.theme,
5332
5480
  children = _ref.children,
5333
- rest = _objectWithoutProperties(_ref, _excluded$D);
5481
+ rest = _objectWithoutProperties(_ref, _excluded$A);
5334
5482
 
5335
5483
  return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
5336
5484
  className: classNames('Badge', theme && "Badge--".concat(theme), className)
5337
5485
  }, rest), children);
5338
5486
  };
5339
5487
 
5340
- var _excluded$C = ["children", "className"];
5488
+ var _excluded$z = ["children", "className"];
5341
5489
  var Breadcrumbs = function Breadcrumbs(_ref) {
5342
5490
  var children = _ref.children,
5343
5491
  className = _ref.className,
5344
- rest = _objectWithoutProperties(_ref, _excluded$C);
5492
+ rest = _objectWithoutProperties(_ref, _excluded$z);
5345
5493
 
5346
5494
  var position = 0;
5347
5495
  return /*#__PURE__*/React__default["default"].createElement("ol", _extends$1({
@@ -5361,7 +5509,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
5361
5509
  }));
5362
5510
  };
5363
5511
 
5364
- var _excluded$B = ["className", "styleless", "disabled"];
5512
+ var _excluded$y = ["className", "styleless", "disabled"];
5365
5513
 
5366
5514
  var isLink = function isLink(props) {
5367
5515
  return 'to' in props;
@@ -5380,7 +5528,7 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
5380
5528
  _ref$styleless = _ref.styleless,
5381
5529
  styleless = _ref$styleless === void 0 ? false : _ref$styleless,
5382
5530
  disabled = _ref.disabled,
5383
- rest = _objectWithoutProperties(_ref, _excluded$B);
5531
+ rest = _objectWithoutProperties(_ref, _excluded$y);
5384
5532
 
5385
5533
  var props = _objectSpread2(_objectSpread2({}, rest), {}, {
5386
5534
  className: classNames({
@@ -5403,14 +5551,14 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
5403
5551
  });
5404
5552
  Clickable.displayName = 'Clickable';
5405
5553
 
5406
- var _excluded$A = ["className", "disabled", "children", "underlined"];
5554
+ var _excluded$x = ["className", "disabled", "children", "underlined"];
5407
5555
  var ControlLink = function ControlLink(_ref) {
5408
5556
  var className = _ref.className,
5409
5557
  disabled = _ref.disabled,
5410
5558
  children = _ref.children,
5411
5559
  _ref$underlined = _ref.underlined,
5412
5560
  underlined = _ref$underlined === void 0 ? true : _ref$underlined,
5413
- rest = _objectWithoutProperties(_ref, _excluded$A);
5561
+ rest = _objectWithoutProperties(_ref, _excluded$x);
5414
5562
 
5415
5563
  return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({}, rest, {
5416
5564
  className: classNames('ControlLink', {
@@ -5422,12 +5570,12 @@ var ControlLink = function ControlLink(_ref) {
5422
5570
  }), children);
5423
5571
  };
5424
5572
 
5425
- var _excluded$z = ["children", "position", "className"];
5573
+ var _excluded$w = ["children", "position", "className"];
5426
5574
  var Breadcrumb = function Breadcrumb(_ref) {
5427
5575
  var children = _ref.children,
5428
5576
  position = _ref.position,
5429
5577
  className = _ref.className,
5430
- rest = _objectWithoutProperties(_ref, _excluded$z);
5578
+ rest = _objectWithoutProperties(_ref, _excluded$w);
5431
5579
 
5432
5580
  return /*#__PURE__*/React__default["default"].createElement("li", {
5433
5581
  className: classNames('Breadcrumb', className),
@@ -5446,7 +5594,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
5446
5594
  }));
5447
5595
  };
5448
5596
 
5449
- var breakpointKeys = Object.keys(dist$4.breakpoints);
5597
+ var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
5598
+
5450
5599
  var ONE_PIXEL = 1 / 16;
5451
5600
  var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
5452
5601
  var mode = _ref.mode,
@@ -5456,21 +5605,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
5456
5605
  case 'at':
5457
5606
  {
5458
5607
  var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
5459
- var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
5608
+ var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
5460
5609
  return {
5461
5610
  min: prevWidth,
5462
- max: parseInt(dist$4.breakpoints[breakpoint])
5611
+ max: parseInt(dist$4.breakpoints[breakpoint], 10)
5463
5612
  };
5464
5613
  }
5465
5614
 
5466
5615
  case 'gt':
5467
5616
  return {
5468
- min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
5617
+ min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
5469
5618
  };
5470
5619
 
5471
5620
  case 'lt':
5472
5621
  return {
5473
- max: parseInt(dist$4.breakpoints[breakpoint])
5622
+ max: parseInt(dist$4.breakpoints[breakpoint], 10)
5474
5623
  };
5475
5624
  }
5476
5625
  };
@@ -5560,10 +5709,10 @@ var useBreakpoint = function useBreakpoint(props) {
5560
5709
  };
5561
5710
  };
5562
5711
 
5563
- var _excluded$y = ["children"];
5712
+ var _excluded$v = ["children"];
5564
5713
  var Breakpoint = function Breakpoint(_ref) {
5565
5714
  var children = _ref.children,
5566
- rest = _objectWithoutProperties(_ref, _excluded$y);
5715
+ rest = _objectWithoutProperties(_ref, _excluded$v);
5567
5716
 
5568
5717
  var _discriminate = discriminate(rest),
5569
5718
  mode = _discriminate.mode,
@@ -5577,7 +5726,7 @@ var Breakpoint = function Breakpoint(_ref) {
5577
5726
  }, children) : null;
5578
5727
  };
5579
5728
 
5580
- var _excluded$x = ["secondary", "chip", "hover", "focus", "disabled", "className"];
5729
+ var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
5581
5730
  var Button = function Button(_ref) {
5582
5731
  var secondary = _ref.secondary,
5583
5732
  chip = _ref.chip,
@@ -5585,7 +5734,7 @@ var Button = function Button(_ref) {
5585
5734
  focus = _ref.focus,
5586
5735
  disabled = _ref.disabled,
5587
5736
  className = _ref.className,
5588
- rest = _objectWithoutProperties(_ref, _excluded$x);
5737
+ rest = _objectWithoutProperties(_ref, _excluded$u);
5589
5738
 
5590
5739
  return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
5591
5740
  className: classNames('Button', {
@@ -5736,7 +5885,7 @@ var Circle12 = function Circle12(_a) {
5736
5885
 
5737
5886
  Circle12.displayName = 'Circle12';
5738
5887
 
5739
- var _excluded$w = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
5888
+ var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
5740
5889
  var CHECKED_ITEM_PROPS = {
5741
5890
  className: 'Checkbox__check-mark',
5742
5891
  height: '85%',
@@ -5754,7 +5903,7 @@ var Checkbox = function Checkbox(_ref) {
5754
5903
  disabled = _ref.disabled,
5755
5904
  _ref$checkIcon = _ref.checkIcon,
5756
5905
  checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
5757
- rest = _objectWithoutProperties(_ref, _excluded$w);
5906
+ rest = _objectWithoutProperties(_ref, _excluded$t);
5758
5907
 
5759
5908
  var _useState = React.useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
5760
5909
  _useState2 = _slicedToArray(_useState, 2),
@@ -5842,7 +5991,7 @@ var SKU_COLORS = {
5842
5991
  yellow: '#ffca44'
5843
5992
  };
5844
5993
 
5845
- var _excluded$v = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
5994
+ var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
5846
5995
  var ColorSwatch = function ColorSwatch(_ref) {
5847
5996
  var className = _ref.className,
5848
5997
  size = _ref.size,
@@ -5856,7 +6005,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
5856
6005
  onClick = _ref.onClick,
5857
6006
  onMouseEnter = _ref.onMouseEnter,
5858
6007
  disabled = _ref.disabled,
5859
- rest = _objectWithoutProperties(_ref, _excluded$v);
6008
+ rest = _objectWithoutProperties(_ref, _excluded$s);
5860
6009
 
5861
6010
  var handleClick = React.useCallback(function (_event) {
5862
6011
  onClick && onClick(color);
@@ -5892,22 +6041,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
5892
6041
  }));
5893
6042
  };
5894
6043
 
5895
- var _excluded$u = ["className", "children"];
6044
+ var _excluded$r = ["className", "children"];
5896
6045
  var Constrain = function Constrain(_ref) {
5897
6046
  var className = _ref.className,
5898
6047
  children = _ref.children,
5899
- rest = _objectWithoutProperties(_ref, _excluded$u);
6048
+ rest = _objectWithoutProperties(_ref, _excluded$r);
5900
6049
 
5901
6050
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
5902
6051
  className: classNames('Constrain', className)
5903
6052
  }, rest), children);
5904
6053
  };
5905
6054
 
5906
- var _excluded$t = ["className", "children"];
6055
+ var _excluded$q = ["className", "children"];
5907
6056
  var ExceedConstrain = function ExceedConstrain(_ref) {
5908
6057
  var className = _ref.className,
5909
6058
  children = _ref.children,
5910
- rest = _objectWithoutProperties(_ref, _excluded$t);
6059
+ rest = _objectWithoutProperties(_ref, _excluded$q);
5911
6060
 
5912
6061
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
5913
6062
  className: classNames('ExceedConstrain', className)
@@ -8319,7 +8468,7 @@ var Warning16 = function Warning16(_a) {
8319
8468
 
8320
8469
  Warning16.displayName = 'Warning16';
8321
8470
 
8322
- var _excluded$s = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
8471
+ var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
8323
8472
  var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
8324
8473
  var className = _ref.className,
8325
8474
  disabled = _ref.disabled,
@@ -8329,7 +8478,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
8329
8478
  label = _ref.label,
8330
8479
  _onChange = _ref.onChange,
8331
8480
  onChangeEvent = _ref.onChangeEvent,
8332
- rest = _objectWithoutProperties(_ref, _excluded$s);
8481
+ rest = _objectWithoutProperties(_ref, _excluded$p);
8333
8482
 
8334
8483
  return /*#__PURE__*/React__default["default"].createElement("input", _extends$1({
8335
8484
  className: classNames('TextInput', className, {
@@ -8668,7 +8817,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
8668
8817
  return function () {
8669
8818
  el.removeEventListener('keydown', handleKeyDown);
8670
8819
  };
8671
- }, [handleKeyDown, ref, idleTimeout]);
8820
+ }, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
8821
+
8672
8822
  React.useEffect(function () {
8673
8823
  return dispatch({
8674
8824
  type: 'RESET',
@@ -8684,6 +8834,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
8684
8834
  });
8685
8835
  };
8686
8836
 
8837
+ /* eslint-disable react-hooks/exhaustive-deps */
8687
8838
  var useUpdateEffect = function useUpdateEffect(effect, deps) {
8688
8839
  var didMountRef = React.useRef(false);
8689
8840
  React.useEffect(function () {
@@ -8695,7 +8846,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
8695
8846
  }, deps);
8696
8847
  };
8697
8848
 
8698
- var _excluded$r = ["className", "treatment", "color", "family", "children", "style"];
8849
+ var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
8699
8850
  var Text = function Text(_ref) {
8700
8851
  var className = _ref.className,
8701
8852
  _ref$treatment = _ref.treatment,
@@ -8705,7 +8856,7 @@ var Text = function Text(_ref) {
8705
8856
  family = _ref.family,
8706
8857
  children = _ref.children,
8707
8858
  style = _ref.style,
8708
- rest = _objectWithoutProperties(_ref, _excluded$r);
8859
+ rest = _objectWithoutProperties(_ref, _excluded$o);
8709
8860
 
8710
8861
  return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
8711
8862
  className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
@@ -8862,7 +9013,7 @@ var Search20 = function Search20(_a) {
8862
9013
 
8863
9014
  Search20.displayName = 'Search20';
8864
9015
 
8865
- var _excluded$q = ["className", "onChange", "onChangeValue", "onClear", "value"];
9016
+ var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
8866
9017
  var DEFAULT_INPUT_VALUE = '';
8867
9018
  var SearchInput = function SearchInput(_ref) {
8868
9019
  var className = _ref.className,
@@ -8871,7 +9022,7 @@ var SearchInput = function SearchInput(_ref) {
8871
9022
  onClear = _ref.onClear,
8872
9023
  _ref$value = _ref.value,
8873
9024
  value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
8874
- rest = _objectWithoutProperties(_ref, _excluded$q);
9025
+ rest = _objectWithoutProperties(_ref, _excluded$n);
8875
9026
 
8876
9027
  var ref = React.useRef(null);
8877
9028
 
@@ -9069,7 +9220,8 @@ var SelectOption = function SelectOption(_ref) {
9069
9220
  selected = _ref.selected,
9070
9221
  option = _ref.option,
9071
9222
  onClick = _ref.onClick,
9072
- className = _ref.className;
9223
+ className = _ref.className,
9224
+ dataTestId = _ref.dataTestId;
9073
9225
  var ref = React.useRef(null);
9074
9226
  var handleClick = React.useCallback(function (event) {
9075
9227
  event.preventDefault();
@@ -9091,13 +9243,14 @@ var SelectOption = function SelectOption(_ref) {
9091
9243
  'SelectOption--disabled': option.disabled
9092
9244
  }),
9093
9245
  onClick: handleClick,
9246
+ "data-test-id": dataTestId ? "".concat(dataTestId, "--").concat(option.label.replace(' ', '-')) : undefined,
9094
9247
  "aria-label": option.label,
9095
9248
  "aria-selected": selected,
9096
9249
  role: "option"
9097
9250
  }, option.label);
9098
9251
  };
9099
9252
 
9100
- var _excluded$p = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className"];
9253
+ var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className", "dataTestId"];
9101
9254
  var SelectOptions = function SelectOptions(_ref) {
9102
9255
  var idRef = _ref.idRef,
9103
9256
  searchable = _ref.searchable,
@@ -9108,7 +9261,8 @@ var SelectOptions = function SelectOptions(_ref) {
9108
9261
  onSelect = _ref.onSelect,
9109
9262
  onFocus = _ref.onFocus,
9110
9263
  className = _ref.className,
9111
- rest = _objectWithoutProperties(_ref, _excluded$p);
9264
+ dataTestId = _ref.dataTestId,
9265
+ rest = _objectWithoutProperties(_ref, _excluded$m);
9112
9266
 
9113
9267
  var _useState = React.useState(''),
9114
9268
  _useState2 = _slicedToArray(_useState, 2),
@@ -9165,6 +9319,7 @@ var SelectOptions = function SelectOptions(_ref) {
9165
9319
  id: "SelectOption--".concat(option.value, "-").concat(idRef),
9166
9320
  key: option.value,
9167
9321
  option: option,
9322
+ dataTestId: dataTestId,
9168
9323
  active: (activeOption === null || activeOption === void 0 ? void 0 : activeOption.value) === option.value,
9169
9324
  selected: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value,
9170
9325
  onClick: onSelect
@@ -9286,7 +9441,7 @@ var useSelect = function useSelect(_ref) {
9286
9441
  };
9287
9442
  };
9288
9443
 
9289
- var _excluded$o = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
9444
+ var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId"];
9290
9445
  var Select = function Select(_ref) {
9291
9446
  var _ref2;
9292
9447
 
@@ -9307,11 +9462,13 @@ var Select = function Select(_ref) {
9307
9462
  name = _ref.name,
9308
9463
  onChange = _ref.onChange,
9309
9464
  options = _ref.options,
9465
+ placeholder = _ref.placeholder,
9310
9466
  searchable = _ref.searchable,
9311
9467
  _ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
9312
9468
  shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
9313
9469
  value = _ref.value,
9314
- rest = _objectWithoutProperties(_ref, _excluded$o);
9470
+ dataTestId = _ref.dataTestId,
9471
+ rest = _objectWithoutProperties(_ref, _excluded$l);
9315
9472
 
9316
9473
  var _useSelect = useSelect({
9317
9474
  value: value,
@@ -9379,6 +9536,7 @@ var Select = function Select(_ref) {
9379
9536
  className: "Select__value",
9380
9537
  disabled: disabled,
9381
9538
  onClick: handleToggle,
9539
+ "data-test-id": dataTestId,
9382
9540
  "aria-haspopup": "listbox",
9383
9541
  "aria-expanded": state.mode === Mode.Open,
9384
9542
  "aria-labelledby": "Select__label--".concat(idRef, " Select__value--").concat(idRef),
@@ -9386,7 +9544,7 @@ var Select = function Select(_ref) {
9386
9544
  title: "Select"
9387
9545
  }, /*#__PURE__*/React__default["default"].createElement(SelectLabel, {
9388
9546
  idRef: idRef,
9389
- label: label,
9547
+ label: label || (selected === undefined ? placeholder : undefined),
9390
9548
  hasValue: focused != null || selected != null
9391
9549
  }), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, /*#__PURE__*/React__default["default"].createElement("span", {
9392
9550
  className: classNames('Select__icon', {
@@ -9398,6 +9556,7 @@ var Select = function Select(_ref) {
9398
9556
  'Select__options--up': dropDirection === 'up',
9399
9557
  'Select__options--down': dropDirection === 'down'
9400
9558
  }),
9559
+ dataTestId: dataTestId,
9401
9560
  searchable: searchable,
9402
9561
  options: options,
9403
9562
  onSelect: handleSelect,
@@ -10977,7 +11136,7 @@ var Exit16 = function Exit16(_a) {
10977
11136
 
10978
11137
  Exit16.displayName = 'Exit16';
10979
11138
 
10980
- var _excluded$n = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
11139
+ var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
10981
11140
  var MultiSelect = function MultiSelect(_ref) {
10982
11141
  var className = _ref.className,
10983
11142
  defaultValue = _ref.defaultValue,
@@ -10992,7 +11151,7 @@ var MultiSelect = function MultiSelect(_ref) {
10992
11151
  searchable = _ref.searchable,
10993
11152
  shiftIconLeftwards = _ref.shiftIconLeftwards,
10994
11153
  value = _ref.value,
10995
- rest = _objectWithoutProperties(_ref, _excluded$n);
11154
+ rest = _objectWithoutProperties(_ref, _excluded$k);
10996
11155
 
10997
11156
  var _useSelect = useSelect({
10998
11157
  value: value,
@@ -11092,14 +11251,14 @@ var MultiSelect = function MultiSelect(_ref) {
11092
11251
  }));
11093
11252
  };
11094
11253
 
11095
- var _excluded$m = ["className", "children", "error", "label", "placeholder"];
11254
+ var _excluded$j = ["className", "children", "error", "label", "placeholder"];
11096
11255
  var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
11097
11256
  var className = _ref.className,
11098
11257
  children = _ref.children,
11099
11258
  error = _ref.error,
11100
11259
  label = _ref.label,
11101
11260
  placeholder = _ref.placeholder,
11102
- rest = _objectWithoutProperties(_ref, _excluded$m);
11261
+ rest = _objectWithoutProperties(_ref, _excluded$j);
11103
11262
 
11104
11263
  return /*#__PURE__*/React__default["default"].createElement("label", {
11105
11264
  className: classNames('Field', className)
@@ -11128,17 +11287,17 @@ var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
11128
11287
  });
11129
11288
  Field.displayName = 'Field';
11130
11289
 
11131
- var _excluded$l = ["onChange"];
11290
+ var _excluded$i = ["onChange"];
11132
11291
  var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
11133
11292
  var onChange = _ref.onChange,
11134
- rest = _objectWithoutProperties(_ref, _excluded$l);
11293
+ rest = _objectWithoutProperties(_ref, _excluded$i);
11135
11294
 
11136
11295
  return /*#__PURE__*/React__default["default"].createElement(Field, _extends$1({}, rest, {
11137
11296
  onChangeEvent: onChange
11138
11297
  }));
11139
11298
  };
11140
11299
 
11141
- var _excluded$k = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
11300
+ var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
11142
11301
  var DEFAULT_MASK = '9999 9999 9999 9999';
11143
11302
  var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11144
11303
  var _ref2;
@@ -11153,7 +11312,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11153
11312
  onFocus = _ref.onFocus,
11154
11313
  onBlur = _ref.onBlur,
11155
11314
  onChange = _ref.onChange,
11156
- rest = _objectWithoutProperties(_ref, _excluded$k);
11315
+ rest = _objectWithoutProperties(_ref, _excluded$h);
11157
11316
 
11158
11317
  var _useState = React.useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
11159
11318
  _useState2 = _slicedToArray(_useState, 2),
@@ -11179,6 +11338,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11179
11338
  setValue(event.target.value);
11180
11339
  onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
11181
11340
  }, [setValue, onChange]); // TODO: get rid of the any, the types of react-input-mask are incorrect here, it should expect a function as a child, but it expects a ReactNode
11341
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11182
11342
 
11183
11343
  var renderInputField = function renderInputField(inputProps) {
11184
11344
  return /*#__PURE__*/React__default["default"].createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
@@ -11198,19 +11358,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11198
11358
  }, renderInputField);
11199
11359
  };
11200
11360
 
11201
- var _excluded$j = ["term", "children", "className"];
11361
+ var _excluded$g = ["term", "children", "className"];
11202
11362
  var DefinitionList = function DefinitionList(_ref) {
11203
11363
  var term = _ref.term,
11204
11364
  children = _ref.children,
11205
11365
  className = _ref.className,
11206
- rest = _objectWithoutProperties(_ref, _excluded$j);
11366
+ rest = _objectWithoutProperties(_ref, _excluded$g);
11207
11367
 
11208
11368
  return /*#__PURE__*/React__default["default"].createElement("dl", _extends$1({
11209
11369
  className: classNames('DefinitionList', className)
11210
11370
  }, rest), /*#__PURE__*/React__default["default"].createElement("dt", null, term), /*#__PURE__*/React__default["default"].createElement("dd", null, children));
11211
11371
  };
11212
11372
 
11213
- var _excluded$i = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
11373
+ var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
11214
11374
  var Expandable = function Expandable(_ref) {
11215
11375
  var name = _ref.name,
11216
11376
  children = _ref.children,
@@ -11222,7 +11382,7 @@ var Expandable = function Expandable(_ref) {
11222
11382
  dataTestId = _ref['data-testid'],
11223
11383
  _ref$expanded = _ref.expanded,
11224
11384
  __expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
11225
- rest = _objectWithoutProperties(_ref, _excluded$i);
11385
+ rest = _objectWithoutProperties(_ref, _excluded$f);
11226
11386
 
11227
11387
  var _useState = React.useState(__expanded__),
11228
11388
  _useState2 = _slicedToArray(_useState, 2),
@@ -11251,7 +11411,7 @@ var Expandable = function Expandable(_ref) {
11251
11411
  }, expanded || !virtual ? children : null));
11252
11412
  };
11253
11413
 
11254
- var _excluded$h = ["text", "treatment", "color", "family", "type", "className"];
11414
+ var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
11255
11415
  var Divider = function Divider(_ref) {
11256
11416
  var text = _ref.text,
11257
11417
  treatment = _ref.treatment,
@@ -11259,7 +11419,7 @@ var Divider = function Divider(_ref) {
11259
11419
  family = _ref.family,
11260
11420
  type = _ref.type,
11261
11421
  className = _ref.className,
11262
- rest = _objectWithoutProperties(_ref, _excluded$h);
11422
+ rest = _objectWithoutProperties(_ref, _excluded$e);
11263
11423
 
11264
11424
  var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
11265
11425
  var defaultFamily = type === 'two-line' ? undefined : 'serif';
@@ -11275,21 +11435,21 @@ var Divider = function Divider(_ref) {
11275
11435
 
11276
11436
  var TwoLineDivider = function TwoLineDivider(props) {
11277
11437
  return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
11278
- type: 'two-line'
11438
+ type: "two-line"
11279
11439
  }));
11280
11440
  };
11281
11441
 
11282
11442
  var NoLineDivider = function NoLineDivider(props) {
11283
11443
  return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
11284
- type: 'no-line'
11444
+ type: "no-line"
11285
11445
  }));
11286
11446
  };
11287
11447
 
11288
- var _excluded$g = ["className", "hidden"];
11448
+ var _excluded$d = ["className", "hidden"];
11289
11449
  var Label = function Label(_ref) {
11290
11450
  var className = _ref.className,
11291
11451
  hidden = _ref.hidden,
11292
- rest = _objectWithoutProperties(_ref, _excluded$g);
11452
+ rest = _objectWithoutProperties(_ref, _excluded$d);
11293
11453
 
11294
11454
  return /*#__PURE__*/React__default["default"].createElement("label", _extends$1({
11295
11455
  className: classNames('Label', className, {
@@ -11421,11 +11581,11 @@ var ArcWindow = function ArcWindow() {
11421
11581
  }));
11422
11582
  };
11423
11583
 
11424
- var _excluded$f = ["className"];
11584
+ var _excluded$c = ["className"];
11425
11585
  var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
11426
11586
  var Loading = function Loading(_ref) {
11427
11587
  var className = _ref.className,
11428
- rest = _objectWithoutProperties(_ref, _excluded$f);
11588
+ rest = _objectWithoutProperties(_ref, _excluded$c);
11429
11589
 
11430
11590
  var _useCursor = dist.useCursor({
11431
11591
  max: FRAMES.length
@@ -11433,8 +11593,9 @@ var Loading = function Loading(_ref) {
11433
11593
  index = _useCursor.index,
11434
11594
  handleNext = _useCursor.handleNext;
11435
11595
 
11596
+ var ONE_SECOND_INTERVAL = 1000;
11436
11597
  React.useEffect(function () {
11437
- var interval = setInterval(handleNext, 1000);
11598
+ var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
11438
11599
  return function () {
11439
11600
  return clearInterval(interval);
11440
11601
  };
@@ -11500,13 +11661,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
11500
11661
  })));
11501
11662
  };
11502
11663
 
11503
- var _excluded$e = ["className", "children", "onClose", "shards"];
11664
+ var _excluded$b = ["className", "children", "onClose", "shards"];
11504
11665
  var Modal = function Modal(_ref) {
11505
11666
  var className = _ref.className,
11506
11667
  children = _ref.children,
11507
11668
  onClose = _ref.onClose,
11508
11669
  shards = _ref.shards,
11509
- rest = _objectWithoutProperties(_ref, _excluded$e);
11670
+ rest = _objectWithoutProperties(_ref, _excluded$b);
11510
11671
 
11511
11672
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
11512
11673
  className: classNames('Modal', className)
@@ -11517,14 +11678,14 @@ var Modal = function Modal(_ref) {
11517
11678
  }, children));
11518
11679
  };
11519
11680
 
11520
- var _excluded$d = ["className", "children", "show"];
11681
+ var _excluded$a = ["className", "children", "show"];
11521
11682
  var UNMOUNT_DELAY_MS = 500;
11522
11683
  var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
11523
11684
  var className = _ref.className,
11524
11685
  children = _ref.children,
11525
11686
  _ref$show = _ref.show,
11526
11687
  show = _ref$show === void 0 ? true : _ref$show,
11527
- rest = _objectWithoutProperties(_ref, _excluded$d);
11688
+ rest = _objectWithoutProperties(_ref, _excluded$a);
11528
11689
 
11529
11690
  var _useState = React.useState(show),
11530
11691
  _useState2 = _slicedToArray(_useState, 2),
@@ -11554,7 +11715,7 @@ var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
11554
11715
  });
11555
11716
  Overlay.displayName = 'Overlay';
11556
11717
 
11557
- var _excluded$c = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
11718
+ var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
11558
11719
  var ModalOverlay = function ModalOverlay(_ref) {
11559
11720
  var children = _ref.children,
11560
11721
  className = _ref.className,
@@ -11564,7 +11725,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
11564
11725
  _ref$show = _ref.show,
11565
11726
  show = _ref$show === void 0 ? true : _ref$show,
11566
11727
  shards = _ref.shards,
11567
- rest = _objectWithoutProperties(_ref, _excluded$c);
11728
+ rest = _objectWithoutProperties(_ref, _excluded$9);
11568
11729
 
11569
11730
  var element = React.useMemo(function () {
11570
11731
  return typeof document !== 'undefined' ? document.createElement('div') : null;
@@ -11835,8 +11996,11 @@ var Paginator = function Paginator(_ref) {
11835
11996
  })));
11836
11997
  };
11837
11998
 
11838
- var _excluded$b = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
11999
+ var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
11839
12000
  var POPOVER_MOUSEOUT_DELAY_MS = 200;
12001
+ var THREE_QUARTER_SECOND_DELAY = 750;
12002
+ var ONE_SECOND_DELAY = 1000;
12003
+ var FIVE_SECOND_DELAY = 5000;
11840
12004
  var Mode;
11841
12005
 
11842
12006
  (function (Mode) {
@@ -11860,7 +12024,7 @@ var Popover = function Popover(_ref) {
11860
12024
  autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
11861
12025
  _ref$smoothTransition = _ref.smoothTransitioning,
11862
12026
  smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
11863
- rest = _objectWithoutProperties(_ref, _excluded$b);
12027
+ rest = _objectWithoutProperties(_ref, _excluded$8);
11864
12028
 
11865
12029
  var _useState = React.useState(function () {
11866
12030
  if (open && smoothTransitioning) {
@@ -11904,7 +12068,7 @@ var Popover = function Popover(_ref) {
11904
12068
  if (mode !== Mode.Closing) return;
11905
12069
  var closingTimeout = setTimeout(function () {
11906
12070
  return setMode(Mode.Closed);
11907
- }, 750);
12071
+ }, THREE_QUARTER_SECOND_DELAY);
11908
12072
  return function () {
11909
12073
  return clearTimeout(closingTimeout);
11910
12074
  };
@@ -11913,7 +12077,7 @@ var Popover = function Popover(_ref) {
11913
12077
  if (mode !== Mode.AutoOpening) return;
11914
12078
  var openingTimeout = setTimeout(function () {
11915
12079
  return setMode(Mode.AutoOpen);
11916
- }, 1000);
12080
+ }, ONE_SECOND_DELAY);
11917
12081
  return function () {
11918
12082
  return clearTimeout(openingTimeout);
11919
12083
  };
@@ -11922,14 +12086,14 @@ var Popover = function Popover(_ref) {
11922
12086
  if (mode !== Mode.Opening) return;
11923
12087
  var openingTimeout = setTimeout(function () {
11924
12088
  return setMode(Mode.Open);
11925
- }, 750);
12089
+ }, THREE_QUARTER_SECOND_DELAY);
11926
12090
  return function () {
11927
12091
  return clearTimeout(openingTimeout);
11928
12092
  };
11929
12093
  }, [mode]);
11930
12094
  React.useEffect(function () {
11931
12095
  if (mode !== Mode.AutoOpen) return;
11932
- var stayingTimeout = setTimeout(handleClose, 5000);
12096
+ var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
11933
12097
  return function () {
11934
12098
  return clearTimeout(stayingTimeout);
11935
12099
  };
@@ -11963,11 +12127,11 @@ var Popover = function Popover(_ref) {
11963
12127
  }, content)), children));
11964
12128
  };
11965
12129
 
11966
- var _excluded$a = ["className", "children"];
12130
+ var _excluded$7 = ["className", "children"];
11967
12131
  var PromoBanner = function PromoBanner(_ref) {
11968
12132
  var className = _ref.className,
11969
12133
  children = _ref.children,
11970
- rest = _objectWithoutProperties(_ref, _excluded$a);
12134
+ rest = _objectWithoutProperties(_ref, _excluded$7);
11971
12135
 
11972
12136
  var length = React.Children.count(children);
11973
12137
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
@@ -11986,7 +12150,7 @@ var PromoBanner = function PromoBanner(_ref) {
11986
12150
  })));
11987
12151
  };
11988
12152
 
11989
- var _excluded$9 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
12153
+ var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
11990
12154
  var RadioButton = function RadioButton(_ref) {
11991
12155
  var className = _ref.className,
11992
12156
  checked = _ref.checked,
@@ -11994,7 +12158,7 @@ var RadioButton = function RadioButton(_ref) {
11994
12158
  value = _ref.value,
11995
12159
  tabIndex = _ref.tabIndex,
11996
12160
  disabled = _ref.disabled,
11997
- rest = _objectWithoutProperties(_ref, _excluded$9);
12161
+ rest = _objectWithoutProperties(_ref, _excluded$6);
11998
12162
 
11999
12163
  var inputRef = React.useRef(null);
12000
12164
  return /*#__PURE__*/React__default["default"].createElement("label", {
@@ -12031,14 +12195,14 @@ var RadioButton = function RadioButton(_ref) {
12031
12195
  }, children));
12032
12196
  };
12033
12197
 
12034
- var _excluded$8 = ["className", "hover", "selected", "unavailable", "children"];
12198
+ var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
12035
12199
  var SelectableButton = function SelectableButton(_ref) {
12036
12200
  var className = _ref.className,
12037
12201
  hover = _ref.hover,
12038
12202
  selected = _ref.selected,
12039
12203
  unavailable = _ref.unavailable,
12040
12204
  children = _ref.children,
12041
- rest = _objectWithoutProperties(_ref, _excluded$8);
12205
+ rest = _objectWithoutProperties(_ref, _excluded$5);
12042
12206
 
12043
12207
  return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
12044
12208
  className: classNames('SelectableButton', {
@@ -12049,34 +12213,13 @@ var SelectableButton = function SelectableButton(_ref) {
12049
12213
  }, rest), /*#__PURE__*/React__default["default"].createElement("span", null, children));
12050
12214
  };
12051
12215
 
12052
- var _excluded$7 = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
12053
- var Stack = function Stack(_ref) {
12054
- var className = _ref.className,
12055
- children = _ref.children,
12056
- space = _ref.space,
12057
- _ref$direction = _ref.direction,
12058
- direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
12059
- alignItems = _ref.alignItems,
12060
- justifyContent = _ref.justifyContent,
12061
- style = _ref.style,
12062
- rest = _objectWithoutProperties(_ref, _excluded$7);
12063
-
12064
- return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12065
- className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
12066
- style: _objectSpread2(_objectSpread2({}, style), {}, {
12067
- alignItems: alignItems,
12068
- justifyContent: justifyContent
12069
- })
12070
- }, rest), children);
12071
- };
12072
-
12073
- var _excluded$6 = ["className", "disabled", "onRemove", "children"];
12216
+ var _excluded$4 = ["className", "disabled", "onRemove", "children"];
12074
12217
  var Tag = function Tag(_ref) {
12075
12218
  var className = _ref.className,
12076
12219
  disabled = _ref.disabled,
12077
12220
  onRemove = _ref.onRemove,
12078
12221
  children = _ref.children,
12079
- rest = _objectWithoutProperties(_ref, _excluded$6);
12222
+ rest = _objectWithoutProperties(_ref, _excluded$4);
12080
12223
 
12081
12224
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12082
12225
  className: classNames('Tag', className, {
@@ -12089,13 +12232,13 @@ var Tag = function Tag(_ref) {
12089
12232
  }, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
12090
12233
  };
12091
12234
 
12092
- var _excluded$5 = ["tabs", "onTabClicked", "activeTab", "className"];
12235
+ var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
12093
12236
  var Tabs = function Tabs(_ref) {
12094
12237
  var tabs = _ref.tabs,
12095
12238
  onTabClicked = _ref.onTabClicked,
12096
12239
  activeTab = _ref.activeTab,
12097
12240
  className = _ref.className,
12098
- rest = _objectWithoutProperties(_ref, _excluded$5);
12241
+ rest = _objectWithoutProperties(_ref, _excluded$3);
12099
12242
 
12100
12243
  var _useState = React.useState(activeTab || tabs[0].name),
12101
12244
  _useState2 = _slicedToArray(_useState, 2),
@@ -12175,7 +12318,7 @@ var TabPanel = function TabPanel(_ref) {
12175
12318
  }, children);
12176
12319
  };
12177
12320
 
12178
- var _excluded$4 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
12321
+ var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
12179
12322
  var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
12180
12323
  var className = _ref.className,
12181
12324
  disabled = _ref.disabled,
@@ -12184,7 +12327,7 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
12184
12327
  placeholder = _ref.placeholder,
12185
12328
  label = _ref.label,
12186
12329
  _onChange = _ref.onChange,
12187
- rest = _objectWithoutProperties(_ref, _excluded$4);
12330
+ rest = _objectWithoutProperties(_ref, _excluded$2);
12188
12331
 
12189
12332
  return /*#__PURE__*/React__default["default"].createElement("textarea", _extends$1({
12190
12333
  className: classNames('Textarea', className, {
@@ -12203,13 +12346,13 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
12203
12346
  });
12204
12347
  Textarea.displayName = 'Textarea';
12205
12348
 
12206
- var _excluded$3 = ["theme", "className", "onRemove", "children"];
12349
+ var _excluded$1 = ["theme", "className", "onRemove", "children"];
12207
12350
  var Toast = function Toast(_ref) {
12208
12351
  var theme = _ref.theme,
12209
12352
  className = _ref.className,
12210
12353
  onRemove = _ref.onRemove,
12211
12354
  children = _ref.children,
12212
- rest = _objectWithoutProperties(_ref, _excluded$3);
12355
+ rest = _objectWithoutProperties(_ref, _excluded$1);
12213
12356
 
12214
12357
  return /*#__PURE__*/React__default["default"].createElement(Stack, _extends$1({
12215
12358
  className: classNames('Toast', "Toast--".concat(theme), className),
@@ -12226,11 +12369,11 @@ var Toast = function Toast(_ref) {
12226
12369
  }, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
12227
12370
  };
12228
12371
 
12229
- var _excluded$2 = ["className", "double"];
12372
+ var _excluded = ["className", "double"];
12230
12373
  var VerticalDivider = function VerticalDivider(_ref) {
12231
12374
  var className = _ref.className,
12232
12375
  _double = _ref["double"],
12233
- rest = _objectWithoutProperties(_ref, _excluded$2);
12376
+ rest = _objectWithoutProperties(_ref, _excluded);
12234
12377
 
12235
12378
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12236
12379
  className: classNames('VerticalDivider', {
@@ -12269,102 +12412,6 @@ var PasswordInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
12269
12412
  });
12270
12413
  PasswordInput.displayName = 'PasswordInput';
12271
12414
 
12272
- var isRenderProps = function isRenderProps(children) {
12273
- return typeof children === 'function';
12274
- };
12275
-
12276
- var truncate = function truncate(string) {
12277
- var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
12278
- if (!string) return null;
12279
- var ellipsis = string.length > maxLength;
12280
- return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
12281
- };
12282
-
12283
- var stringifyProps = function stringifyProps(props) {
12284
- var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
12285
- var _ref2 = _slicedToArray(_ref, 2),
12286
- key = _ref2[0],
12287
- value = _ref2[1];
12288
-
12289
- if (key === 'children') return "".concat(memo, " children={...}");
12290
- if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
12291
- if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
12292
- if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
12293
- if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
12294
- if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
12295
- return "".concat(memo, " ").concat(key, "=").concat(value);
12296
- }, '');
12297
- return stringifiedProps.trim();
12298
- };
12299
-
12300
- var omit = function omit(obj) {
12301
- for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12302
- keys[_key - 1] = arguments[_key];
12303
- }
12304
-
12305
- return Object.entries(obj).filter(function (_ref) {
12306
- var _ref2 = _slicedToArray(_ref, 1),
12307
- key = _ref2[0];
12308
-
12309
- return !keys.includes(key);
12310
- }).reduce(function (obj, _ref3) {
12311
- var _ref4 = _slicedToArray(_ref3, 2),
12312
- key = _ref4[0],
12313
- val = _ref4[1];
12314
-
12315
- return Object.assign(obj, _defineProperty$1({}, key, val));
12316
- }, {});
12317
- };
12318
-
12319
- var isEmpty = function isEmpty(obj) {
12320
- return Object.entries(obj || {}).length === 0;
12321
- };
12322
-
12323
- var StatesProps = function StatesProps(_ref) {
12324
- var props = _ref.props,
12325
- children = _ref.children;
12326
- var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
12327
- return /*#__PURE__*/React__default["default"].createElement(Stack, {
12328
- className: "StatesProps",
12329
- space: 2,
12330
- direction: "horizontal"
12331
- }, /*#__PURE__*/React__default["default"].createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default["default"].createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default["default"].createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default["default"].createElement("span", null, " "));
12332
- };
12333
-
12334
- var _excluded$1 = ["props", "children"];
12335
- var State = function State(_ref) {
12336
- var props = _ref.props,
12337
- children = _ref.children,
12338
- rest = _objectWithoutProperties(_ref, _excluded$1);
12339
-
12340
- var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
12341
- var innerChildren = isRenderProps(children) ? children(props) : children;
12342
- return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12343
- className: "State"
12344
- }, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
12345
- className: "State__props"
12346
- }, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
12347
- props: props
12348
- }, innerChildren)));
12349
- };
12350
-
12351
- var _excluded = ["states", "children"];
12352
- var States = function States(_ref) {
12353
- var _ref$states = _ref.states,
12354
- states = _ref$states === void 0 ? [{}] : _ref$states,
12355
- children = _ref.children,
12356
- rest = _objectWithoutProperties(_ref, _excluded);
12357
-
12358
- return /*#__PURE__*/React__default["default"].createElement("div", {
12359
- className: "States"
12360
- }, states.map(function (props, i) {
12361
- return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
12362
- key: i,
12363
- props: props
12364
- }, rest), children);
12365
- }));
12366
- };
12367
-
12368
12415
  var tokens = {
12369
12416
  colors: dist$4.colors,
12370
12417
  typography: dist$4.typography,