@cimpress-ui/react 1.13.5 → 1.14.1

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 (257) hide show
  1. package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  2. package/dist/commonjs/components/breadcrumbs/breadcrumbs.js.map +1 -1
  3. package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -1
  4. package/dist/commonjs/components/button/icon-link-button.js.map +1 -1
  5. package/dist/commonjs/components/button/link-button.d.ts.map +1 -1
  6. package/dist/commonjs/components/button/link-button.js.map +1 -1
  7. package/dist/commonjs/components/button/types.d.ts.map +1 -1
  8. package/dist/commonjs/components/button/types.js.map +1 -1
  9. package/dist/commonjs/components/checkbox/checkbox-group.d.ts.map +1 -1
  10. package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -1
  11. package/dist/commonjs/components/checkbox/checkbox.d.ts.map +1 -1
  12. package/dist/commonjs/components/checkbox/checkbox.js.map +1 -1
  13. package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -1
  14. package/dist/commonjs/components/combo-box/combo-box.js +2 -2
  15. package/dist/commonjs/components/combo-box/combo-box.js.map +1 -1
  16. package/dist/commonjs/components/copy/copy-button.d.ts.map +1 -1
  17. package/dist/commonjs/components/copy/copy-button.js.map +1 -1
  18. package/dist/commonjs/components/copy/copy-inline.d.ts.map +1 -1
  19. package/dist/commonjs/components/copy/copy-inline.js.map +1 -1
  20. package/dist/commonjs/components/date-picker/date-picker-calendar.js.map +1 -1
  21. package/dist/commonjs/components/date-picker/date-picker.d.ts.map +1 -1
  22. package/dist/commonjs/components/date-picker/date-picker.js.map +1 -1
  23. package/dist/commonjs/components/disclosure/disclosure-group.d.ts.map +1 -1
  24. package/dist/commonjs/components/disclosure/disclosure-group.js.map +1 -1
  25. package/dist/commonjs/components/disclosure/disclosure.d.ts.map +1 -1
  26. package/dist/commonjs/components/disclosure/disclosure.js.map +1 -1
  27. package/dist/commonjs/components/file-picker/file-picker.d.ts.map +1 -1
  28. package/dist/commonjs/components/file-picker/file-picker.js.map +1 -1
  29. package/dist/commonjs/components/file-trigger.d.ts.map +1 -1
  30. package/dist/commonjs/components/file-trigger.js.map +1 -1
  31. package/dist/commonjs/components/form/form.d.ts.map +1 -1
  32. package/dist/commonjs/components/form/form.js.map +1 -1
  33. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js.map +1 -1
  34. package/dist/commonjs/components/internal/x-button/x-button.js.map +1 -1
  35. package/dist/commonjs/components/link-tabs/link-tabs.d.ts.map +1 -1
  36. package/dist/commonjs/components/link-tabs/link-tabs.js.map +1 -1
  37. package/dist/commonjs/components/menu/menu.d.ts.map +1 -1
  38. package/dist/commonjs/components/menu/menu.js.map +1 -1
  39. package/dist/commonjs/components/number-field/number-field.d.ts.map +1 -1
  40. package/dist/commonjs/components/number-field/number-field.js.map +1 -1
  41. package/dist/commonjs/components/radio/radio-group.d.ts.map +1 -1
  42. package/dist/commonjs/components/radio/radio-group.js.map +1 -1
  43. package/dist/commonjs/components/radio/radio.d.ts.map +1 -1
  44. package/dist/commonjs/components/radio/radio.js.map +1 -1
  45. package/dist/commonjs/components/select/select.d.ts.map +1 -1
  46. package/dist/commonjs/components/select/select.js +2 -2
  47. package/dist/commonjs/components/select/select.js.map +1 -1
  48. package/dist/commonjs/components/slider/slider.d.ts.map +1 -1
  49. package/dist/commonjs/components/slider/slider.js +0 -2
  50. package/dist/commonjs/components/slider/slider.js.map +1 -1
  51. package/dist/commonjs/components/stepper/stepper-item.js +0 -2
  52. package/dist/commonjs/components/stepper/stepper-item.js.map +1 -1
  53. package/dist/commonjs/components/tabs/tabs.d.ts.map +1 -1
  54. package/dist/commonjs/components/tabs/tabs.js.map +1 -1
  55. package/dist/commonjs/components/tag/tag-group.d.ts.map +1 -1
  56. package/dist/commonjs/components/tag/tag-group.js.map +1 -1
  57. package/dist/commonjs/components/tag-field/tag-field-list-box.js +2 -2
  58. package/dist/commonjs/components/tag-field/tag-field-list-box.js.map +1 -1
  59. package/dist/commonjs/components/tag-field/tag-field.d.ts.map +1 -1
  60. package/dist/commonjs/components/tag-field/tag-field.js.map +1 -1
  61. package/dist/commonjs/components/text-inputs/search-field.d.ts.map +1 -1
  62. package/dist/commonjs/components/text-inputs/search-field.js.map +1 -1
  63. package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -1
  64. package/dist/commonjs/components/text-inputs/text-area.js.map +1 -1
  65. package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -1
  66. package/dist/commonjs/components/text-inputs/text-field.js.map +1 -1
  67. package/dist/commonjs/components/toggle/toggle.d.ts.map +1 -1
  68. package/dist/commonjs/components/toggle/toggle.js.map +1 -1
  69. package/dist/commonjs/components/toggle-button/internal-toggle-button.d.ts.map +1 -1
  70. package/dist/commonjs/components/toggle-button/internal-toggle-button.js.map +1 -1
  71. package/dist/commonjs/components/toggle-button/toggle-button-group.d.ts.map +1 -1
  72. package/dist/commonjs/components/toggle-button/toggle-button-group.js.map +1 -1
  73. package/dist/commonjs/components/toggle-button/toggle-icon-button.d.ts.map +1 -1
  74. package/dist/commonjs/components/toggle-button/toggle-icon-button.js.map +1 -1
  75. package/dist/commonjs/components/tooltip/tooltip.d.ts.map +1 -1
  76. package/dist/commonjs/components/tooltip/tooltip.js.map +1 -1
  77. package/dist/commonjs/components/types.d.ts.map +1 -1
  78. package/dist/commonjs/components/types.js.map +1 -1
  79. package/dist/commonjs/components/typography/link.d.ts.map +1 -1
  80. package/dist/commonjs/components/typography/link.js.map +1 -1
  81. package/dist/commonjs/i18n/localization-provider.d.ts.map +1 -1
  82. package/dist/commonjs/i18n/localization-provider.js +2 -0
  83. package/dist/commonjs/i18n/localization-provider.js.map +1 -1
  84. package/dist/commonjs/icons/cart.d.ts +8 -0
  85. package/dist/commonjs/icons/cart.d.ts.map +1 -0
  86. package/dist/commonjs/icons/cart.js +24 -0
  87. package/dist/commonjs/icons/cart.js.map +1 -0
  88. package/dist/commonjs/icons/globe.d.ts +8 -0
  89. package/dist/commonjs/icons/globe.d.ts.map +1 -0
  90. package/dist/commonjs/icons/globe.js +24 -0
  91. package/dist/commonjs/icons/globe.js.map +1 -0
  92. package/dist/commonjs/icons/image-broken.d.ts +8 -0
  93. package/dist/commonjs/icons/image-broken.d.ts.map +1 -0
  94. package/dist/commonjs/icons/image-broken.js +24 -0
  95. package/dist/commonjs/icons/image-broken.js.map +1 -0
  96. package/dist/commonjs/icons/index.d.ts +10 -0
  97. package/dist/commonjs/icons/index.d.ts.map +1 -1
  98. package/dist/commonjs/icons/index.js +24 -4
  99. package/dist/commonjs/icons/index.js.map +1 -1
  100. package/dist/commonjs/icons/loudspeaker.d.ts +8 -0
  101. package/dist/commonjs/icons/loudspeaker.d.ts.map +1 -0
  102. package/dist/commonjs/icons/loudspeaker.js +24 -0
  103. package/dist/commonjs/icons/loudspeaker.js.map +1 -0
  104. package/dist/commonjs/icons/opacity.d.ts +8 -0
  105. package/dist/commonjs/icons/opacity.d.ts.map +1 -0
  106. package/dist/commonjs/icons/opacity.js +24 -0
  107. package/dist/commonjs/icons/opacity.js.map +1 -0
  108. package/dist/commonjs/icons/pin-map.d.ts +8 -0
  109. package/dist/commonjs/icons/pin-map.d.ts.map +1 -0
  110. package/dist/commonjs/icons/pin-map.js +24 -0
  111. package/dist/commonjs/icons/pin-map.js.map +1 -0
  112. package/dist/commonjs/icons/shop.d.ts +8 -0
  113. package/dist/commonjs/icons/shop.d.ts.map +1 -0
  114. package/dist/commonjs/icons/shop.js +24 -0
  115. package/dist/commonjs/icons/shop.js.map +1 -0
  116. package/dist/commonjs/icons/translate.d.ts +8 -0
  117. package/dist/commonjs/icons/translate.d.ts.map +1 -0
  118. package/dist/commonjs/icons/translate.js +24 -0
  119. package/dist/commonjs/icons/translate.js.map +1 -0
  120. package/dist/commonjs/icons/wallet-refund.d.ts +8 -0
  121. package/dist/commonjs/icons/wallet-refund.d.ts.map +1 -0
  122. package/dist/commonjs/icons/wallet-refund.js +24 -0
  123. package/dist/commonjs/icons/wallet-refund.js.map +1 -0
  124. package/dist/commonjs/icons/wallet.d.ts +8 -0
  125. package/dist/commonjs/icons/wallet.d.ts.map +1 -0
  126. package/dist/commonjs/icons/wallet.js +24 -0
  127. package/dist/commonjs/icons/wallet.js.map +1 -0
  128. package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  129. package/dist/esm/components/breadcrumbs/breadcrumbs.js.map +1 -1
  130. package/dist/esm/components/button/icon-link-button.d.ts.map +1 -1
  131. package/dist/esm/components/button/icon-link-button.js.map +1 -1
  132. package/dist/esm/components/button/link-button.d.ts.map +1 -1
  133. package/dist/esm/components/button/link-button.js.map +1 -1
  134. package/dist/esm/components/button/types.d.ts.map +1 -1
  135. package/dist/esm/components/button/types.js.map +1 -1
  136. package/dist/esm/components/checkbox/checkbox-group.d.ts.map +1 -1
  137. package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
  138. package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -1
  139. package/dist/esm/components/checkbox/checkbox.js.map +1 -1
  140. package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -1
  141. package/dist/esm/components/combo-box/combo-box.js +2 -2
  142. package/dist/esm/components/combo-box/combo-box.js.map +1 -1
  143. package/dist/esm/components/copy/copy-button.d.ts.map +1 -1
  144. package/dist/esm/components/copy/copy-button.js.map +1 -1
  145. package/dist/esm/components/copy/copy-inline.d.ts.map +1 -1
  146. package/dist/esm/components/copy/copy-inline.js.map +1 -1
  147. package/dist/esm/components/date-picker/date-picker-calendar.js.map +1 -1
  148. package/dist/esm/components/date-picker/date-picker.d.ts.map +1 -1
  149. package/dist/esm/components/date-picker/date-picker.js.map +1 -1
  150. package/dist/esm/components/disclosure/disclosure-group.d.ts.map +1 -1
  151. package/dist/esm/components/disclosure/disclosure-group.js.map +1 -1
  152. package/dist/esm/components/disclosure/disclosure.d.ts.map +1 -1
  153. package/dist/esm/components/disclosure/disclosure.js.map +1 -1
  154. package/dist/esm/components/file-picker/file-picker.d.ts.map +1 -1
  155. package/dist/esm/components/file-picker/file-picker.js.map +1 -1
  156. package/dist/esm/components/file-trigger.d.ts.map +1 -1
  157. package/dist/esm/components/file-trigger.js.map +1 -1
  158. package/dist/esm/components/form/form.d.ts.map +1 -1
  159. package/dist/esm/components/form/form.js.map +1 -1
  160. package/dist/esm/components/internal/collapsible-list/collapsible-list.js.map +1 -1
  161. package/dist/esm/components/internal/x-button/x-button.js.map +1 -1
  162. package/dist/esm/components/link-tabs/link-tabs.d.ts.map +1 -1
  163. package/dist/esm/components/link-tabs/link-tabs.js.map +1 -1
  164. package/dist/esm/components/menu/menu.d.ts.map +1 -1
  165. package/dist/esm/components/menu/menu.js.map +1 -1
  166. package/dist/esm/components/number-field/number-field.d.ts.map +1 -1
  167. package/dist/esm/components/number-field/number-field.js.map +1 -1
  168. package/dist/esm/components/radio/radio-group.d.ts.map +1 -1
  169. package/dist/esm/components/radio/radio-group.js.map +1 -1
  170. package/dist/esm/components/radio/radio.d.ts.map +1 -1
  171. package/dist/esm/components/radio/radio.js.map +1 -1
  172. package/dist/esm/components/select/select.d.ts.map +1 -1
  173. package/dist/esm/components/select/select.js +2 -2
  174. package/dist/esm/components/select/select.js.map +1 -1
  175. package/dist/esm/components/slider/slider.d.ts.map +1 -1
  176. package/dist/esm/components/slider/slider.js +0 -2
  177. package/dist/esm/components/slider/slider.js.map +1 -1
  178. package/dist/esm/components/stepper/stepper-item.js +0 -2
  179. package/dist/esm/components/stepper/stepper-item.js.map +1 -1
  180. package/dist/esm/components/tabs/tabs.d.ts.map +1 -1
  181. package/dist/esm/components/tabs/tabs.js.map +1 -1
  182. package/dist/esm/components/tag/tag-group.d.ts.map +1 -1
  183. package/dist/esm/components/tag/tag-group.js.map +1 -1
  184. package/dist/esm/components/tag-field/tag-field-list-box.js +2 -2
  185. package/dist/esm/components/tag-field/tag-field-list-box.js.map +1 -1
  186. package/dist/esm/components/tag-field/tag-field.d.ts.map +1 -1
  187. package/dist/esm/components/tag-field/tag-field.js.map +1 -1
  188. package/dist/esm/components/text-inputs/search-field.d.ts.map +1 -1
  189. package/dist/esm/components/text-inputs/search-field.js.map +1 -1
  190. package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -1
  191. package/dist/esm/components/text-inputs/text-area.js.map +1 -1
  192. package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -1
  193. package/dist/esm/components/text-inputs/text-field.js.map +1 -1
  194. package/dist/esm/components/toggle/toggle.d.ts.map +1 -1
  195. package/dist/esm/components/toggle/toggle.js.map +1 -1
  196. package/dist/esm/components/toggle-button/internal-toggle-button.d.ts.map +1 -1
  197. package/dist/esm/components/toggle-button/internal-toggle-button.js.map +1 -1
  198. package/dist/esm/components/toggle-button/toggle-button-group.d.ts.map +1 -1
  199. package/dist/esm/components/toggle-button/toggle-button-group.js.map +1 -1
  200. package/dist/esm/components/toggle-button/toggle-icon-button.d.ts.map +1 -1
  201. package/dist/esm/components/toggle-button/toggle-icon-button.js.map +1 -1
  202. package/dist/esm/components/tooltip/tooltip.d.ts.map +1 -1
  203. package/dist/esm/components/tooltip/tooltip.js.map +1 -1
  204. package/dist/esm/components/types.d.ts.map +1 -1
  205. package/dist/esm/components/types.js.map +1 -1
  206. package/dist/esm/components/typography/link.d.ts.map +1 -1
  207. package/dist/esm/components/typography/link.js.map +1 -1
  208. package/dist/esm/i18n/localization-provider.d.ts.map +1 -1
  209. package/dist/esm/i18n/localization-provider.js +2 -0
  210. package/dist/esm/i18n/localization-provider.js.map +1 -1
  211. package/dist/esm/icons/cart.d.ts +8 -0
  212. package/dist/esm/icons/cart.d.ts.map +1 -0
  213. package/dist/esm/icons/cart.js +19 -0
  214. package/dist/esm/icons/cart.js.map +1 -0
  215. package/dist/esm/icons/globe.d.ts +8 -0
  216. package/dist/esm/icons/globe.d.ts.map +1 -0
  217. package/dist/esm/icons/globe.js +19 -0
  218. package/dist/esm/icons/globe.js.map +1 -0
  219. package/dist/esm/icons/image-broken.d.ts +8 -0
  220. package/dist/esm/icons/image-broken.d.ts.map +1 -0
  221. package/dist/esm/icons/image-broken.js +19 -0
  222. package/dist/esm/icons/image-broken.js.map +1 -0
  223. package/dist/esm/icons/index.d.ts +10 -0
  224. package/dist/esm/icons/index.d.ts.map +1 -1
  225. package/dist/esm/icons/index.js +10 -0
  226. package/dist/esm/icons/index.js.map +1 -1
  227. package/dist/esm/icons/loudspeaker.d.ts +8 -0
  228. package/dist/esm/icons/loudspeaker.d.ts.map +1 -0
  229. package/dist/esm/icons/loudspeaker.js +19 -0
  230. package/dist/esm/icons/loudspeaker.js.map +1 -0
  231. package/dist/esm/icons/opacity.d.ts +8 -0
  232. package/dist/esm/icons/opacity.d.ts.map +1 -0
  233. package/dist/esm/icons/opacity.js +19 -0
  234. package/dist/esm/icons/opacity.js.map +1 -0
  235. package/dist/esm/icons/pin-map.d.ts +8 -0
  236. package/dist/esm/icons/pin-map.d.ts.map +1 -0
  237. package/dist/esm/icons/pin-map.js +19 -0
  238. package/dist/esm/icons/pin-map.js.map +1 -0
  239. package/dist/esm/icons/shop.d.ts +8 -0
  240. package/dist/esm/icons/shop.d.ts.map +1 -0
  241. package/dist/esm/icons/shop.js +19 -0
  242. package/dist/esm/icons/shop.js.map +1 -0
  243. package/dist/esm/icons/translate.d.ts +8 -0
  244. package/dist/esm/icons/translate.d.ts.map +1 -0
  245. package/dist/esm/icons/translate.js +19 -0
  246. package/dist/esm/icons/translate.js.map +1 -0
  247. package/dist/esm/icons/wallet-refund.d.ts +8 -0
  248. package/dist/esm/icons/wallet-refund.d.ts.map +1 -0
  249. package/dist/esm/icons/wallet-refund.js +19 -0
  250. package/dist/esm/icons/wallet-refund.js.map +1 -0
  251. package/dist/esm/icons/wallet.d.ts +8 -0
  252. package/dist/esm/icons/wallet.d.ts.map +1 -0
  253. package/dist/esm/icons/wallet.js +19 -0
  254. package/dist/esm/icons/wallet.js.map +1 -0
  255. package/dist-styles/core.css +1 -1
  256. package/dist-styles/styles.css +1 -1
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G,IACrC,GACF,EACL,QAAQ,IAAI,CACX,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,YAC7B,QAAQ,GACJ,CACR,IACS,CACb,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,cAAc,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC,CAAC;AAE/E,OAAO,EAAE,gBAAgB,IAAI,eAAe,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Switch as RACSwitch, type SwitchProps as RACSwitchProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckBold, IconCloseBold } from '../../icons/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface UNSTABLE_ToggleProps\n extends CommonProps,\n AriaLabelingProps,\n Pick<\n RACSwitchProps,\n | 'onChange'\n | 'isSelected'\n | 'isDisabled'\n | 'isReadOnly'\n | 'defaultSelected'\n | 'autoFocus'\n | 'form'\n | 'name'\n | 'value'\n > {\n /** The label rendered next to the toggle. */\n children?: StringLikeChildren;\n}\n\nfunction UNSTABLE_Toggle(\n { children, UNSAFE_className, UNSAFE_style, ...props }: UNSTABLE_ToggleProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Toggle requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACSwitch {...props} ref={ref} className={clsx('cim-toggle', UNSAFE_className)} style={UNSAFE_style}>\n <div className=\"cim-toggle-track-wrapper\" aria-hidden>\n <div className=\"cim-toggle-track\">\n <IconCheckBold />\n <IconCloseBold />\n <div className=\"cim-toggle-track-head\" />\n </div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"medium\">\n {children}\n </Text>\n )}\n </RACSwitch>\n );\n}\n\n/**\n * Allows users to turn a setting on or off.\n *\n * See [toggle usage guidelines](https://ui.cimpress.io/components/toggle/).\n */\nconst _UNSTABLE_Toggle = withStyleProps(forwardRef(UNSTABLE_Toggle), 'Toggle');\n\nexport { _UNSTABLE_Toggle as UNSTABLE_Toggle };\n"]}
1
+ {"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../../src/components/toggle/toggle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,IAAI,SAAS,EAAsC,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAsB7C,SAAS,eAAe,CACtB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAwB,EAC5E,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,oBAAoB,CAAC,GAAG,EAAE;QACxB,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;QACnG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,MAAC,SAAS,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAClG,cAAK,SAAS,EAAC,0BAA0B,iCACvC,eAAK,SAAS,EAAC,kBAAkB,aAC/B,KAAC,aAAa,KAAG,EACjB,KAAC,aAAa,KAAG,EACjB,cAAK,SAAS,EAAC,uBAAuB,GAAG,IACrC,GACF,EACL,QAAQ,IAAI,CACX,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,YAC7B,QAAQ,GACJ,CACR,IACS,CACb,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,cAAc,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC,CAAC;AAE/E,OAAO,EAAE,gBAAgB,IAAI,eAAe,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Switch as RACSwitch, type SwitchProps as RACSwitchProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckBold, IconCloseBold } from '../../icons/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface UNSTABLE_ToggleProps\n extends\n CommonProps,\n AriaLabelingProps,\n Pick<\n RACSwitchProps,\n | 'onChange'\n | 'isSelected'\n | 'isDisabled'\n | 'isReadOnly'\n | 'defaultSelected'\n | 'autoFocus'\n | 'form'\n | 'name'\n | 'value'\n > {\n /** The label rendered next to the toggle. */\n children?: StringLikeChildren;\n}\n\nfunction UNSTABLE_Toggle(\n { children, UNSAFE_className, UNSAFE_style, ...props }: UNSTABLE_ToggleProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Toggle requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACSwitch {...props} ref={ref} className={clsx('cim-toggle', UNSAFE_className)} style={UNSAFE_style}>\n <div className=\"cim-toggle-track-wrapper\" aria-hidden>\n <div className=\"cim-toggle-track\">\n <IconCheckBold />\n <IconCloseBold />\n <div className=\"cim-toggle-track-head\" />\n </div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"medium\">\n {children}\n </Text>\n )}\n </RACSwitch>\n );\n}\n\n/**\n * Allows users to turn a setting on or off.\n *\n * See [toggle usage guidelines](https://ui.cimpress.io/components/toggle/).\n */\nconst _UNSTABLE_Toggle = withStyleProps(forwardRef(UNSTABLE_Toggle), 'Toggle');\n\nexport { _UNSTABLE_Toggle as UNSTABLE_Toggle };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal-toggle-button.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle-button/internal-toggle-button.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,iBAAiB,IAAI,oBAAoB,EAG/C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGlE,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAC7B,iBAAiB,EACjB,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,WAAW,CAAC,EAC3C,IAAI,CACF,oBAAoB,EAClB,iBAAiB,GACjB,YAAY,GACZ,SAAS,GACT,cAAc,GACd,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,WAAW,CACd;IACH;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"internal-toggle-button.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle-button/internal-toggle-button.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,iBAAiB,IAAI,oBAAoB,EAG/C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGlE,MAAM,WAAW,qBACf,SACE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EACvB,iBAAiB,EACjB,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,WAAW,CAAC,EAC3C,IAAI,CACF,oBAAoB,EAClB,iBAAiB,GACjB,YAAY,GACZ,SAAS,GACT,cAAc,GACd,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,WAAW,CACd;IACH;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"internal-toggle-button.js","sourceRoot":"","sources":["../../../../src/components/toggle-button/internal-toggle-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,IAAI,MAAM,MAAM,CA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AAE,EAAE;iBACrB;qBACE,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,kBAEd,WAAW,eACd,MAAM,eACL,IAAI,qBACE,SAAS,IAAI,SAAS,YAEtC,QAAQ,GACO,EAEjB,aAAa,IAAI,CAChB,gBACE,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,wBAAwB,EAAE,IAAI,IAAI,IAAI,EAC5C,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,wBAAwB,EAAE,UAAU,kBAE5C,wBAAwB,EAAE,eAAe,CAAC,iBAAiB,CAAC,SAAS;oBACrE,eAAe,CAAC,iBAAiB,CAAC,SAAS;oBAC3C,SAAS,EAEX,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAClB,CACH,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useFormValidation } from '@react-aria/form';\nimport { useFormReset, useObjectRef } from '@react-aria/utils';\nimport { privateValidationStateProp, useFormValidationState } from '@react-stately/form';\nimport { useControlledState } from '@react-stately/utils';\nimport clsx from 'clsx';\nimport { type ReactNode, useContext, useRef, useState, type Ref } from 'react';\nimport {\n TextContext as RACTextContext,\n ToggleButton as RACToggleButton,\n type ToggleButtonProps as RACToggleButtonProps,\n ToggleGroupStateContext as RACToggleGroupStateContext,\n useSlottedContext,\n} from 'react-aria-components';\nimport type { BaseButtonProps } from '../button/types.js';\nimport type { AriaLabelingProps, CommonProps } from '../types.js';\nimport { ToggleButtonGroupContext } from './context.js';\n\nexport interface BaseToggleButtonProps\n extends Omit<CommonProps, 'id'>,\n AriaLabelingProps,\n Pick<BaseButtonProps, 'size' | 'fullWidth'>,\n Pick<\n RACToggleButtonProps,\n | 'defaultSelected'\n | 'isSelected'\n | 'onPress'\n | 'onHoverStart'\n | 'onHoverEnd'\n | 'onChange'\n | 'isDisabled'\n | 'autoFocus'\n > {\n /**\n * The `<form>` element to associate the input with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).\n */\n form?: string;\n /**\n * The name of the input element, used when submitting an HTML form.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name).\n */\n name?: string;\n /**\n * The value of the input element, used when submitting an HTML form.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#value).\n *\n * When used in a `ToggleButtonGroup`, `value` serves as an identifier for this button, and has to be unique across all buttons in the group.\n */\n value?: string;\n}\n\ninterface InternalToggleButtonProps extends BaseToggleButtonProps {\n children?: ReactNode;\n buttonRef?: Ref<HTMLButtonElement>;\n}\n\n/** @internal */\nexport function InternalToggleButton({\n buttonRef: ref,\n children,\n size = 'medium',\n isDisabled,\n fullWidth,\n UNSAFE_className,\n UNSAFE_style,\n form,\n name,\n value,\n isSelected: consumerIsSelected,\n defaultSelected: consumerDefaultSelected,\n onChange,\n ...props\n}: InternalToggleButtonProps) {\n // State\n\n const toggleButtonGroupContext = useContext(ToggleButtonGroupContext);\n const toggleGroupState = useContext(RACToggleGroupStateContext);\n const descriptionProps = useSlottedContext(RACTextContext, 'description');\n const errorMessageProps = useSlottedContext(RACTextContext, 'errorMessage');\n\n const validationState = useFormValidationState({\n // If part of a group, validation is handled at group level\n name: toggleButtonGroupContext ? undefined : name,\n value,\n validationBehavior: 'native',\n [privateValidationStateProp]: toggleButtonGroupContext?.validationState ?? undefined,\n });\n\n const [isSelected, setIsSelected] = useControlledState(\n toggleGroupState && value ? toggleGroupState.selectedKeys.has(value) : consumerIsSelected,\n consumerDefaultSelected ?? false,\n (newIsSelected) => {\n onChange?.(newIsSelected);\n\n if (toggleGroupState && value) {\n toggleGroupState.setSelected(value, newIsSelected);\n }\n\n validationState.commitValidation();\n },\n );\n\n // Validation\n\n const buttonRef = useObjectRef(ref);\n const formInputRef = useRef<HTMLInputElement>(null);\n const formInputName = toggleButtonGroupContext?.name ?? name;\n\n const [initialSelected] = useState(isSelected);\n useFormReset(formInputRef, consumerDefaultSelected ?? initialSelected, setIsSelected);\n\n useFormValidation(\n {\n focus: () => buttonRef.current?.focus(),\n validationBehavior: 'native',\n },\n validationState,\n formInputRef,\n );\n\n return (\n <>\n <RACToggleButton\n {...props}\n ref={buttonRef}\n className={clsx('cim-toggle-button', UNSAFE_className)}\n style={UNSAFE_style}\n id={toggleButtonGroupContext ? value : undefined}\n isDisabled={isDisabled}\n isSelected={isSelected}\n onChange={setIsSelected}\n aria-describedby={\n [\n props['aria-describedby'],\n toggleButtonGroupContext?.isInvalid ? errorMessageProps?.id : null,\n descriptionProps?.id,\n ]\n .filter(Boolean)\n .join(' ') || undefined\n }\n data-variant=\"secondary\"\n data-tone=\"base\"\n data-size={size}\n data-full-width={fullWidth || undefined}\n >\n {children}\n </RACToggleButton>\n\n {formInputName && (\n <input\n ref={formInputRef}\n style={{ display: 'none' }}\n type=\"checkbox\"\n form={toggleButtonGroupContext?.form ?? form}\n name={formInputName}\n checked={isSelected}\n value={value}\n required={toggleButtonGroupContext?.isRequired}\n aria-invalid={\n toggleButtonGroupContext?.validationState.displayValidation.isInvalid ??\n validationState.displayValidation.isInvalid ??\n undefined\n }\n onChange={() => {}}\n />\n )}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"internal-toggle-button.js","sourceRoot":"","sources":["../../../../src/components/toggle-button/internal-toggle-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OA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,IAAI;oBAClE,gBAAgB,EAAE,EAAE;iBACrB;qBACE,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,kBAEd,WAAW,eACd,MAAM,eACL,IAAI,qBACE,SAAS,IAAI,SAAS,YAEtC,QAAQ,GACO,EAEjB,aAAa,IAAI,CAChB,gBACE,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,wBAAwB,EAAE,IAAI,IAAI,IAAI,EAC5C,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,wBAAwB,EAAE,UAAU,kBAE5C,wBAAwB,EAAE,eAAe,CAAC,iBAAiB,CAAC,SAAS;oBACrE,eAAe,CAAC,iBAAiB,CAAC,SAAS;oBAC3C,SAAS,EAEX,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAClB,CACH,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useFormValidation } from '@react-aria/form';\nimport { useFormReset, useObjectRef } from '@react-aria/utils';\nimport { privateValidationStateProp, useFormValidationState } from '@react-stately/form';\nimport { useControlledState } from '@react-stately/utils';\nimport clsx from 'clsx';\nimport { type ReactNode, useContext, useRef, useState, type Ref } from 'react';\nimport {\n TextContext as RACTextContext,\n ToggleButton as RACToggleButton,\n type ToggleButtonProps as RACToggleButtonProps,\n ToggleGroupStateContext as RACToggleGroupStateContext,\n useSlottedContext,\n} from 'react-aria-components';\nimport type { BaseButtonProps } from '../button/types.js';\nimport type { AriaLabelingProps, CommonProps } from '../types.js';\nimport { ToggleButtonGroupContext } from './context.js';\n\nexport interface BaseToggleButtonProps\n extends\n Omit<CommonProps, 'id'>,\n AriaLabelingProps,\n Pick<BaseButtonProps, 'size' | 'fullWidth'>,\n Pick<\n RACToggleButtonProps,\n | 'defaultSelected'\n | 'isSelected'\n | 'onPress'\n | 'onHoverStart'\n | 'onHoverEnd'\n | 'onChange'\n | 'isDisabled'\n | 'autoFocus'\n > {\n /**\n * The `<form>` element to associate the input with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).\n */\n form?: string;\n /**\n * The name of the input element, used when submitting an HTML form.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name).\n */\n name?: string;\n /**\n * The value of the input element, used when submitting an HTML form.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#value).\n *\n * When used in a `ToggleButtonGroup`, `value` serves as an identifier for this button, and has to be unique across all buttons in the group.\n */\n value?: string;\n}\n\ninterface InternalToggleButtonProps extends BaseToggleButtonProps {\n children?: ReactNode;\n buttonRef?: Ref<HTMLButtonElement>;\n}\n\n/** @internal */\nexport function InternalToggleButton({\n buttonRef: ref,\n children,\n size = 'medium',\n isDisabled,\n fullWidth,\n UNSAFE_className,\n UNSAFE_style,\n form,\n name,\n value,\n isSelected: consumerIsSelected,\n defaultSelected: consumerDefaultSelected,\n onChange,\n ...props\n}: InternalToggleButtonProps) {\n // State\n\n const toggleButtonGroupContext = useContext(ToggleButtonGroupContext);\n const toggleGroupState = useContext(RACToggleGroupStateContext);\n const descriptionProps = useSlottedContext(RACTextContext, 'description');\n const errorMessageProps = useSlottedContext(RACTextContext, 'errorMessage');\n\n const validationState = useFormValidationState({\n // If part of a group, validation is handled at group level\n name: toggleButtonGroupContext ? undefined : name,\n value,\n validationBehavior: 'native',\n [privateValidationStateProp]: toggleButtonGroupContext?.validationState ?? undefined,\n });\n\n const [isSelected, setIsSelected] = useControlledState(\n toggleGroupState && value ? toggleGroupState.selectedKeys.has(value) : consumerIsSelected,\n consumerDefaultSelected ?? false,\n (newIsSelected) => {\n onChange?.(newIsSelected);\n\n if (toggleGroupState && value) {\n toggleGroupState.setSelected(value, newIsSelected);\n }\n\n validationState.commitValidation();\n },\n );\n\n // Validation\n\n const buttonRef = useObjectRef(ref);\n const formInputRef = useRef<HTMLInputElement>(null);\n const formInputName = toggleButtonGroupContext?.name ?? name;\n\n const [initialSelected] = useState(isSelected);\n useFormReset(formInputRef, consumerDefaultSelected ?? initialSelected, setIsSelected);\n\n useFormValidation(\n {\n focus: () => buttonRef.current?.focus(),\n validationBehavior: 'native',\n },\n validationState,\n formInputRef,\n );\n\n return (\n <>\n <RACToggleButton\n {...props}\n ref={buttonRef}\n className={clsx('cim-toggle-button', UNSAFE_className)}\n style={UNSAFE_style}\n id={toggleButtonGroupContext ? value : undefined}\n isDisabled={isDisabled}\n isSelected={isSelected}\n onChange={setIsSelected}\n aria-describedby={\n [\n props['aria-describedby'],\n toggleButtonGroupContext?.isInvalid ? errorMessageProps?.id : null,\n descriptionProps?.id,\n ]\n .filter(Boolean)\n .join(' ') || undefined\n }\n data-variant=\"secondary\"\n data-tone=\"base\"\n data-size={size}\n data-full-width={fullWidth || undefined}\n >\n {children}\n </RACToggleButton>\n\n {formInputName && (\n <input\n ref={formInputRef}\n style={{ display: 'none' }}\n type=\"checkbox\"\n form={toggleButtonGroupContext?.form ?? form}\n name={formInputName}\n checked={isSelected}\n value={value}\n required={toggleButtonGroupContext?.isRequired}\n aria-invalid={\n toggleButtonGroupContext?.validationState.displayValidation.isInvalid ??\n validationState.displayValidation.isInvalid ??\n undefined\n }\n onChange={() => {}}\n />\n )}\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button-group.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-button-group.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAML,KAAK,sBAAsB,IAAI,yBAAyB,EACzD,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAIhE,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAC7B,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EACpB,IAAI,CACF,yBAAyB,EACzB,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,eAAe,GAAG,YAAY,CAC9F;IACH,2FAA2F;IAC3F,QAAQ,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA2HD;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,wKAAqE,CAAC;AAE9F,OAAO,EAAE,kBAAkB,IAAI,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"toggle-button-group.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-button-group.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAML,KAAK,sBAAsB,IAAI,yBAAyB,EACzD,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAIhE,MAAM,WAAW,sBACf,SACE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EACvB,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EACpB,IAAI,CACF,yBAAyB,EACzB,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,eAAe,GAAG,YAAY,CAC9F;IACH,2FAA2F;IAC3F,QAAQ,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA2HD;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,wKAAqE,CAAC;AAE9F,OAAO,EAAE,kBAAkB,IAAI,iBAAiB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button-group.js","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-button-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EACL,YAAY,IAAI,eAAe,EAC/B,iBAAiB,IAAI,oBAAoB,EACzC,QAAQ,IAAI,WAAW,EACvB,WAAW,IAAI,cAAc,EAC7B,iBAAiB,IAAI,oBAAoB,GAE1C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAE,uBAAuB,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAsC,MAAM,cAAc,CAAC;AAiB5F,SAAS,iBAAiB,CACxB,EACE,QAAQ,EACR,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,UAAU,EACV,YAAY,EAAE,oBAAoB,EAClC,mBAAmB,EAAE,2B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AwB,EAAE,wBAAwB,CAAC;aACrD,aAEA,KAAK,IAAI,CACR,MAAC,cAAc,IAAC,UAAU,EAAE,UAAU,aACnC,KAAK,EAKL,UAAU,IAAI,KAAC,cAAc,cAAE,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,GAAkB,IACnE,CAClB,EACD,KAAC,KAAK,IAAC,GAAG,EAAE,CAAC,EAAE,SAAS,EAAC,YAAY,EAAC,IAAI,kBACvC,QAAQ,GACH,EACR,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC9C,GACO,CACxB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,cAAc,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAE9F,OAAO,EAAE,kBAAkB,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport { useFormValidationState } from '@react-stately/form';\nimport { useControlledState } from '@react-stately/utils';\nimport clsx from 'clsx';\nimport { useMemo, type ReactNode } from 'react';\nimport type { ForwardedRef } from 'react';\nimport { mergeProps, useField } from 'react-aria';\nimport {\n LabelContext as RACLabelContext,\n FieldErrorContext as RACFieldErrorContext,\n Provider as RACProvider,\n TextContext as RACTextContext,\n ToggleButtonGroup as RACToggleButtonGroup,\n type ToggleButtonGroupProps as RACToggleButtonGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { Stack } from '../spacing/stack/stack.js';\nimport type { CommonProps, FieldProps, Key } from '../types.js';\nimport { UNSTABLE_VisuallyHidden as VisuallyHidden } from '../visually-hidden/visually-hidden.js';\nimport { ToggleButtonGroupContext, type ToggleButtonGroupContextValue } from './context.js';\n\nexport interface ToggleButtonGroupProps\n extends Omit<CommonProps, 'id'>,\n FieldProps<Set<Key>>,\n Pick<\n RACToggleButtonGroupProps,\n 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'selectionMode' | 'isDisabled'\n > {\n /** Toggle buttons belonging to the group. Each button must have a `value` prop defined. */\n children: ReactNode;\n /** Whether the current selection is invalid. */\n isInvalid?: boolean;\n /** Whether a selection is required before form submission. */\n isRequired?: boolean;\n}\n\nfunction ToggleButtonGroup(\n {\n children,\n label,\n description,\n error: errorMessage,\n validate,\n form,\n name,\n isInvalid,\n isRequired,\n selectedKeys: consumerSelectedKeys,\n defaultSelectedKeys: consumerDefaultSelectedKeys,\n onSelectionChange,\n UNSAFE_className,\n UNSAFE_style,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'aria-details': ariaDetails,\n ...props\n }: ToggleButtonGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('ToggleButtonGroup requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const labelMessages = useLocalizedMessages('label');\n\n // State\n\n const [selectedKeys, setSelectedKeys] = useControlledState(\n consumerSelectedKeys,\n consumerDefaultSelectedKeys ?? [],\n (newSelectedKeys) => {\n onSelectionChange?.(new Set(newSelectedKeys));\n // `validationState` is technically accessed before its declaration, but there's no way to write this in a different order,\n // and this is a callback anyway so it won't be called immediately\n // eslint-disable-next-line react-hooks/immutability\n validationState.commitValidation();\n },\n );\n\n const selectedSet = useMemo(() => new Set<Key>(selectedKeys), [selectedKeys]);\n\n // Validation\n\n const validationState = useFormValidationState({\n value: selectedSet,\n isInvalid,\n isRequired,\n name,\n validate,\n validationBehavior: 'native',\n });\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField({\n 'aria-label': isRequired && ariaLabel != null ? `${ariaLabel} ${labelMessages.format('required')}` : ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'aria-details': ariaDetails,\n description,\n errorMessage: errorMessage || validationState.displayValidation.validationErrors,\n isInvalid: isInvalid || validationState.displayValidation.isInvalid,\n label,\n labelElementType: 'span',\n validate,\n validationBehavior: 'native',\n });\n\n // Remove props that we don't want from fieldProps\n const { id, ...filteredFieldProps } = fieldProps;\n\n const toggleButtonGroupContext: ToggleButtonGroupContextValue = {\n form,\n name,\n isInvalid: isInvalid || validationState.displayValidation.isInvalid,\n isRequired: isRequired && selectedSet.size === 0,\n validationState,\n };\n\n return (\n <RACToggleButtonGroup\n {...mergeProps(props, filteredFieldProps)}\n ref={ref}\n className={clsx('cim-toggle-button-group', UNSAFE_className)}\n style={UNSAFE_style}\n selectedKeys={selectedKeys}\n onSelectionChange={setSelectedKeys}\n >\n <RACProvider\n values={[\n [RACLabelContext, { ...labelProps, elementType: 'span' }],\n [RACTextContext, { slots: { description: descriptionProps, errorMessage: errorMessageProps } }],\n [RACFieldErrorContext, validationState.displayValidation],\n [ToggleButtonGroupContext, toggleButtonGroupContext],\n ]}\n >\n {label && (\n <FormFieldLabel isRequired={isRequired}>\n {label}\n {/*\n * Button elements don't support `aria-required`, so we need to add visually hidden text to indicate that the field is required.\n * See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-required#examples:~:text=Note%3A%20If%20the%20field%27s%20label%20already%20contains%20the%20word%20%22required%22%2C%20it%20is%20recommended%20to%20leave%20out%20the%20aria%2Drequired%20attribute.%20This%20avoids%20that%20screen%20readers%20read%20out%20the%20term%20%22required%22%20twice.\n */}\n {isRequired && <VisuallyHidden>{labelMessages.format('required')}</VisuallyHidden>}\n </FormFieldLabel>\n )}\n <Stack gap={8} direction=\"horizontal\" wrap>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACProvider>\n </RACToggleButtonGroup>\n );\n}\n\n/**\n * Allows users to toggle multiple options, with single or multiple selection.\n *\n * See [toggle button usage guidelines](https://ui.cimpress.io/components/toggle-button/).\n */\nconst _ToggleButtonGroup = withStyleProps(forwardRef(ToggleButtonGroup), 'ToggleButtonGroup');\n\nexport { _ToggleButtonGroup as ToggleButtonGroup };\n"]}
1
+ {"version":3,"file":"toggle-button-group.js","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-button-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EACL,YAAY,IAAI,eAAe,EAC/B,iBAAiB,IAAI,oBAAoB,EACzC,QAAQ,IAAI,WAAW,EACvB,WAAW,IAAI,cAAc,EAC7B,iBAAiB,IAAI,oBAAoB,GAE1C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAE,uBAAuB,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAsC,MAAM,cAAc,CA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AE,CAAC;gBACzD,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAE,EAAE,CAAC;gBAC/F,CAAC,oBAAoB,EAAE,eAAe,CAAC,iBAAiB,CAAC;gBACzD,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;aACrD,aAEA,KAAK,IAAI,CACR,MAAC,cAAc,IAAC,UAAU,EAAE,UAAU,aACnC,KAAK,EAKL,UAAU,IAAI,KAAC,cAAc,cAAE,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,GAAkB,IACnE,CAClB,EACD,KAAC,KAAK,IAAC,GAAG,EAAE,CAAC,EAAE,SAAS,EAAC,YAAY,EAAC,IAAI,kBACvC,QAAQ,GACH,EACR,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC9C,GACO,CACxB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,cAAc,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAE9F,OAAO,EAAE,kBAAkB,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport { useFormValidationState } from '@react-stately/form';\nimport { useControlledState } from '@react-stately/utils';\nimport clsx from 'clsx';\nimport { useMemo, type ReactNode } from 'react';\nimport type { ForwardedRef } from 'react';\nimport { mergeProps, useField } from 'react-aria';\nimport {\n LabelContext as RACLabelContext,\n FieldErrorContext as RACFieldErrorContext,\n Provider as RACProvider,\n TextContext as RACTextContext,\n ToggleButtonGroup as RACToggleButtonGroup,\n type ToggleButtonGroupProps as RACToggleButtonGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { Stack } from '../spacing/stack/stack.js';\nimport type { CommonProps, FieldProps, Key } from '../types.js';\nimport { UNSTABLE_VisuallyHidden as VisuallyHidden } from '../visually-hidden/visually-hidden.js';\nimport { ToggleButtonGroupContext, type ToggleButtonGroupContextValue } from './context.js';\n\nexport interface ToggleButtonGroupProps\n extends\n Omit<CommonProps, 'id'>,\n FieldProps<Set<Key>>,\n Pick<\n RACToggleButtonGroupProps,\n 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'selectionMode' | 'isDisabled'\n > {\n /** Toggle buttons belonging to the group. Each button must have a `value` prop defined. */\n children: ReactNode;\n /** Whether the current selection is invalid. */\n isInvalid?: boolean;\n /** Whether a selection is required before form submission. */\n isRequired?: boolean;\n}\n\nfunction ToggleButtonGroup(\n {\n children,\n label,\n description,\n error: errorMessage,\n validate,\n form,\n name,\n isInvalid,\n isRequired,\n selectedKeys: consumerSelectedKeys,\n defaultSelectedKeys: consumerDefaultSelectedKeys,\n onSelectionChange,\n UNSAFE_className,\n UNSAFE_style,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'aria-details': ariaDetails,\n ...props\n }: ToggleButtonGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('ToggleButtonGroup requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const labelMessages = useLocalizedMessages('label');\n\n // State\n\n const [selectedKeys, setSelectedKeys] = useControlledState(\n consumerSelectedKeys,\n consumerDefaultSelectedKeys ?? [],\n (newSelectedKeys) => {\n onSelectionChange?.(new Set(newSelectedKeys));\n // `validationState` is technically accessed before its declaration, but there's no way to write this in a different order,\n // and this is a callback anyway so it won't be called immediately\n // eslint-disable-next-line react-hooks/immutability\n validationState.commitValidation();\n },\n );\n\n const selectedSet = useMemo(() => new Set<Key>(selectedKeys), [selectedKeys]);\n\n // Validation\n\n const validationState = useFormValidationState({\n value: selectedSet,\n isInvalid,\n isRequired,\n name,\n validate,\n validationBehavior: 'native',\n });\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField({\n 'aria-label': isRequired && ariaLabel != null ? `${ariaLabel} ${labelMessages.format('required')}` : ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'aria-details': ariaDetails,\n description,\n errorMessage: errorMessage || validationState.displayValidation.validationErrors,\n isInvalid: isInvalid || validationState.displayValidation.isInvalid,\n label,\n labelElementType: 'span',\n validate,\n validationBehavior: 'native',\n });\n\n // Remove props that we don't want from fieldProps\n const { id, ...filteredFieldProps } = fieldProps;\n\n const toggleButtonGroupContext: ToggleButtonGroupContextValue = {\n form,\n name,\n isInvalid: isInvalid || validationState.displayValidation.isInvalid,\n isRequired: isRequired && selectedSet.size === 0,\n validationState,\n };\n\n return (\n <RACToggleButtonGroup\n {...mergeProps(props, filteredFieldProps)}\n ref={ref}\n className={clsx('cim-toggle-button-group', UNSAFE_className)}\n style={UNSAFE_style}\n selectedKeys={selectedKeys}\n onSelectionChange={setSelectedKeys}\n >\n <RACProvider\n values={[\n [RACLabelContext, { ...labelProps, elementType: 'span' }],\n [RACTextContext, { slots: { description: descriptionProps, errorMessage: errorMessageProps } }],\n [RACFieldErrorContext, validationState.displayValidation],\n [ToggleButtonGroupContext, toggleButtonGroupContext],\n ]}\n >\n {label && (\n <FormFieldLabel isRequired={isRequired}>\n {label}\n {/*\n * Button elements don't support `aria-required`, so we need to add visually hidden text to indicate that the field is required.\n * See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-required#examples:~:text=Note%3A%20If%20the%20field%27s%20label%20already%20contains%20the%20word%20%22required%22%2C%20it%20is%20recommended%20to%20leave%20out%20the%20aria%2Drequired%20attribute.%20This%20avoids%20that%20screen%20readers%20read%20out%20the%20term%20%22required%22%20twice.\n */}\n {isRequired && <VisuallyHidden>{labelMessages.format('required')}</VisuallyHidden>}\n </FormFieldLabel>\n )}\n <Stack gap={8} direction=\"horizontal\" wrap>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACProvider>\n </RACToggleButtonGroup>\n );\n}\n\n/**\n * Allows users to toggle multiple options, with single or multiple selection.\n *\n * See [toggle button usage guidelines](https://ui.cimpress.io/components/toggle-button/).\n */\nconst _ToggleButtonGroup = withStyleProps(forwardRef(ToggleButtonGroup), 'ToggleButtonGroup');\n\nexport { _ToggleButtonGroup as ToggleButtonGroup };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-icon-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE/F,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,EAC/C,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC;IAC3C,uIAAuI;IACvI,YAAY,EAAE,MAAM,CAAC;CACtB;AAaD;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,0KAAmE,CAAC;AAE3F,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"toggle-icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-icon-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE/F,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC;IAC5F,uIAAuI;IACvI,YAAY,EAAE,MAAM,CAAC;CACtB;AAaD;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,0KAAmE,CAAC;AAE3F,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-icon-button.js","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-icon-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAA8B,MAAM,6BAA6B,CAAC;AAS/F,SAAS,gBAAgB,CACvB,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAyB,EAC3D,GAAoC;IAEpC,OAAO,CACL,KAAC,oBAAoB,OAAK,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,YACzG,IAAI,GACgB,CACxB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAE3F,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { SingleIconButtonProps } from '../button/types.js';\nimport { InternalToggleButton, type BaseToggleButtonProps } from './internal-toggle-button.js';\n\nexport interface ToggleIconButtonProps\n extends Omit<BaseToggleButtonProps, 'aria-label'>,\n Omit<SingleIconButtonProps, 'aria-label'> {\n /** The label describing the function of this button for assistive technologies. Must remain the same regardless of selection state. */\n 'aria-label': string;\n}\n\nfunction ToggleIconButton(\n { icon, UNSAFE_className, ...props }: ToggleIconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <InternalToggleButton {...props} buttonRef={ref} UNSAFE_className={clsx('cim-icon-button', UNSAFE_className)}>\n {icon}\n </InternalToggleButton>\n );\n}\n\n/**\n * Displays an icon-only button that allows users to toggle between two states.\n * Can be used standalone, or as part of `ToggleButtonGroup`.\n *\n * See [toggle button usage guidelines](https://ui.cimpress.io/components/toggle-button/).\n */\nconst _ToggleIconButton = withStyleProps(forwardRef(ToggleIconButton), 'ToggleIconButton');\n\nexport { _ToggleIconButton as ToggleIconButton };\n"]}
1
+ {"version":3,"file":"toggle-icon-button.js","sourceRoot":"","sources":["../../../../src/components/toggle-button/toggle-icon-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAA8B,MAAM,6BAA6B,CAAC;AAQ/F,SAAS,gBAAgB,CACvB,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAyB,EAC3D,GAAoC;IAEpC,OAAO,CACL,KAAC,oBAAoB,OAAK,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,YACzG,IAAI,GACgB,CACxB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAE3F,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { SingleIconButtonProps } from '../button/types.js';\nimport { InternalToggleButton, type BaseToggleButtonProps } from './internal-toggle-button.js';\n\nexport interface ToggleIconButtonProps\n extends Omit<BaseToggleButtonProps, 'aria-label'>, Omit<SingleIconButtonProps, 'aria-label'> {\n /** The label describing the function of this button for assistive technologies. Must remain the same regardless of selection state. */\n 'aria-label': string;\n}\n\nfunction ToggleIconButton(\n { icon, UNSAFE_className, ...props }: ToggleIconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <InternalToggleButton {...props} buttonRef={ref} UNSAFE_className={clsx('cim-icon-button', UNSAFE_className)}>\n {icon}\n </InternalToggleButton>\n );\n}\n\n/**\n * Displays an icon-only button that allows users to toggle between two states.\n * Can be used standalone, or as part of `ToggleButtonGroup`.\n *\n * See [toggle button usage guidelines](https://ui.cimpress.io/components/toggle-button/).\n */\nconst _ToggleIconButton = withStyleProps(forwardRef(ToggleIconButton), 'ToggleIconButton');\n\nexport { _ToggleIconButton as ToggleIconButton };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAGL,KAAK,YAAY,IAAI,eAAe,EAErC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAC7B,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAC;IAChE,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;IACpB,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,UAAU,CAAC,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACvC,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CAOtB;AAiDD;;;;GAIG;AACH,QAAA,MAAM,QAAQ,6GAAiC,CAAC;AAEhD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAGL,KAAK,YAAY,IAAI,eAAe,EAErC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAC;IAC/F,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;IACpB,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,UAAU,CAAC,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACvC,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CAOtB;AAiDD;;;;GAIG;AACH,QAAA,MAAM,QAAQ,6GAAiC,CAAC;AAEhD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,YAAY,IA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, ReactNode, RefObject } from 'react';\nimport {\n Tooltip as RACTooltip,\n OverlayArrow as RACOverlayArrow,\n type TooltipProps as RACTooltipProps,\n TooltipTrigger as RACTooltipTrigger,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport type { CommonProps } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface TooltipProps\n extends Omit<CommonProps, 'id'>,\n Pick<RACTooltipProps, 'placement' | 'isOpen' | 'onOpenChange'> {\n /** The element that this tooltip describes. Must be focusable and hoverable. */\n children: ReactNode;\n /** The contents of the tooltip. */\n label: string;\n /** The ref for the element which the tooltip positions itself with respect to. */\n triggerRef?: RefObject<Element | null>;\n /** Whether the tooltip is disabled. */\n isDisabled?: boolean;\n /**\n * Whether the tooltip should close when the trigger is pressed.\n * @default true\n * @internal\n */\n shouldCloseOnPress?: boolean;\n}\n\nfunction Tooltip(\n {\n children,\n label,\n isOpen,\n onOpenChange,\n UNSAFE_className,\n UNSAFE_style,\n isDisabled,\n shouldCloseOnPress = true,\n ...props\n }: TooltipProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACTooltipTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n delay={300}\n closeDelay={300}\n isDisabled={isDisabled}\n shouldCloseOnPress={shouldCloseOnPress}\n >\n {children}\n <RACTooltip\n {...props}\n ref={ref}\n className={clsx('cim-tooltip', UNSAFE_className)}\n style={UNSAFE_style}\n containerPadding={16}\n offset={5} // 1px border + 4px actual offset\n arrowBoundaryOffset={4} // offset by border radius so that the arrow is never positioned over the rounded corner\n data-cim-style-root\n >\n <RACOverlayArrow className=\"cim-tooltip-arrow\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"10\" viewBox=\"0 0 16 10\">\n <path d=\"M0 0H16L8.78087 9.02391C8.38054 9.52432 7.61946 9.52432 7.21913 9.02391L0 0Z\" />\n </svg>\n </RACOverlayArrow>\n <Text as=\"p\" variant=\"small\">\n {label}\n </Text>\n </RACTooltip>\n </RACTooltipTrigger>\n );\n}\n\n/**\n * Provides additional information about an element that is hovered or focused.\n *\n * See [tooltip usage guidelines](https://ui.cimpress.io/components/tooltip/).\n */\nconst _Tooltip = forwardRef(Tooltip, 'Tooltip');\n\nexport { _Tooltip as Tooltip };\n"]}
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,YAAY,IAAI,eAAe,EAE/B,cAAc,IAAI,iBAAiB,GACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAoB7C,SAAS,OAAO,CACd,EACE,QAAQ,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,kBAAkB,GAAG,IAAI,EACzB,GAAG,KAAK,EACK,EACf,GAAiC;IAEjC,OAAO,CACL,MAAC,iBAAiB,IAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,GAAG,EACf,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,kBAAkB,aAErC,QAAQ,EACT,MAAC,UAAU,OACL,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAChD,KAAK,EAAE,YAAY,EACnB,gBAAgB,EAAE,EAAE,EACpB,MAAM,EAAE,CAAC,EACT,mBAAmB,EAAE,CAAC,0CAGtB,KAAC,eAAe,IAAC,SAAS,EAAC,mBAAmB,YAC5C,cAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,YAChF,eAAM,CAAC,EAAC,8EAA8E,GAAG,GACrF,GACU,EAClB,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,OAAO,EAAC,OAAO,YACzB,KAAK,GACD,IACI,IACK,CACrB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAEhD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode, RefObject } from 'react';\nimport {\n Tooltip as RACTooltip,\n OverlayArrow as RACOverlayArrow,\n type TooltipProps as RACTooltipProps,\n TooltipTrigger as RACTooltipTrigger,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport type { CommonProps } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface TooltipProps\n extends Omit<CommonProps, 'id'>, Pick<RACTooltipProps, 'placement' | 'isOpen' | 'onOpenChange'> {\n /** The element that this tooltip describes. Must be focusable and hoverable. */\n children: ReactNode;\n /** The contents of the tooltip. */\n label: string;\n /** The ref for the element which the tooltip positions itself with respect to. */\n triggerRef?: RefObject<Element | null>;\n /** Whether the tooltip is disabled. */\n isDisabled?: boolean;\n /**\n * Whether the tooltip should close when the trigger is pressed.\n * @default true\n * @internal\n */\n shouldCloseOnPress?: boolean;\n}\n\nfunction Tooltip(\n {\n children,\n label,\n isOpen,\n onOpenChange,\n UNSAFE_className,\n UNSAFE_style,\n isDisabled,\n shouldCloseOnPress = true,\n ...props\n }: TooltipProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACTooltipTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n delay={300}\n closeDelay={300}\n isDisabled={isDisabled}\n shouldCloseOnPress={shouldCloseOnPress}\n >\n {children}\n <RACTooltip\n {...props}\n ref={ref}\n className={clsx('cim-tooltip', UNSAFE_className)}\n style={UNSAFE_style}\n containerPadding={16}\n offset={5} // 1px border + 4px actual offset\n arrowBoundaryOffset={4} // offset by border radius so that the arrow is never positioned over the rounded corner\n data-cim-style-root\n >\n <RACOverlayArrow className=\"cim-tooltip-arrow\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"10\" viewBox=\"0 0 16 10\">\n <path d=\"M0 0H16L8.78087 9.02391C8.38054 9.52432 7.61946 9.52432 7.21913 9.02391L0 0Z\" />\n </svg>\n </RACOverlayArrow>\n <Text as=\"p\" variant=\"small\">\n {label}\n </Text>\n </RACTooltip>\n </RACTooltipTrigger>\n );\n}\n\n/**\n * Provides additional information about an element that is hovered or focused.\n *\n * See [tooltip usage guidelines](https://ui.cimpress.io/components/tooltip/).\n */\nconst _Tooltip = forwardRef(Tooltip, 'Tooltip');\n\nexport { _Tooltip as Tooltip };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EACV,WAAW,IAAI,cAAc,EAC7B,SAAS,IAAI,YAAY,EACzB,UAAU,IAAI,aAAa,EAC3B,gBAAgB,IAAI,mBAAmB,EACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,sDAAsD;AACtD,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAElC,uDAAuD;AACvD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;AAEzC,uDAAuD;AACvD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;AAElD;;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CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,gCAAgC;AAChC,MAAM,WAAW,SAAU,SAAQ,WAAW,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,iBAAiB,CAAC;IACvG;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sCAAsC;IACtC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACpB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAClF,CAAC,QAAQ,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACrE;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qGAAqG;IACrG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mGAAmG;IACnG,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,MAAM;IACxC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { focusSafely } from '@react-aria/focus';\nimport type { CSSProperties, HTMLAttributes, ReactNode, RefObject } from 'react';\nimport type {\n ButtonProps as RACButtonProps,\n LinkProps as RACLinkProps,\n PressEvent as RACPressEvent,\n ValidationResult as RACValidationResult,\n} from 'react-aria-components';\nimport type { ForegroundTone } from '../utils/style/types.js';\n\n/** Represents an identifier for a collection item. */\nexport type Key = string | number;\n\n/** Represents a selection of items in a collection. */\nexport type Selection = 'all' | Set<Key>;\n\n/** Represents a direction (vertical or horizontal). */\nexport type Direction = 'vertical' | 'horizontal';\n\n/**\n * Use this type when you want to restrict `children` to a string,\n * but also want to allow expressions that resolve to strings.\n */\nexport type StringLikeChildren = string | number | (string | number)[];\n\n// `FocusableElement` is not exported from any React Aria package\n/** Any focusable element, including both HTML and SVG elements. */\nexport type FocusableElement = Parameters<typeof focusSafely>[0];\n\n/**\n * A set of common props that are allowed on every component\n */\nexport interface CommonProps {\n /**\n * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).\n */\n id?: string;\n /**\n * Use this attribute to \"claim\" the component tree for exclusive Cimpress UI usage.\n */\n 'data-cim-style-root'?: boolean;\n /**\n * Sets the CSS className for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_className?: string;\n /**\n * Sets the CSS style for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_style?: CSSProperties;\n}\n\n/**\n * An event fired when a component is pressed.\n *\n * By default, press events stop propagation to parent elements.\n * In cases where a handler decides not to handle a specific event,\n * it can call `continuePropagation()` to allow a parent to handle it.\n */\nexport type PressEvent = RACPressEvent;\n\n// HoverEvent is not exported from react-aria-components\n/** An event fired when a component is hovered. */\nexport type HoverEvent = Parameters<NonNullable<RACButtonProps['onHoverStart']>>[0];\n\n/**\n * Props for components that require a label, which can be hidden if necessary.\n */\nexport interface LabellableProps extends AriaLabelingProps {\n /** The content to display as the label. */\n label?: string;\n}\n\n// Copied from AriaLabelingProps from @react-types/shared\nexport interface AriaLabelingProps {\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string;\n\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string;\n\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string;\n}\n\n/** Provides details about the validation state of a form field. */\nexport type ValidationResult = RACValidationResult;\n\n/** Represents the error message(s) for a form field. */\nexport type FieldError =\n | string\n | string[]\n | undefined\n | ((validation: ValidationResult) => string | string[] | undefined);\n\n/** Props available on form field components. */\nexport interface FieldProps<T> extends LabellableProps {\n /**\n * The `<form>` element to associate the input with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).\n */\n form?: string;\n /**\n * The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name).\n */\n name?: string;\n /** A description for the field. Provides a hint such as specific requirements for what to choose. */\n description?: string;\n /** An error message for the field. */\n error?: FieldError;\n /**\n * A function that returns an error message (or `true`) if a given value is invalid.\n * Validation errors are displayed to the user when the form is submitted.\n * For real-time validation, use the `error` prop instead.\n */\n validate?: (value: T) => string | string[] | true | undefined;\n}\n\n/** Props available on form field components with text inputs. */\nexport interface FieldWithPlaceholderProps<T> extends FieldProps<T> {\n /** The placeholder text displayed in the input field. */\n placeholder?: string;\n}\n\n/** Changes specified optional properties within the provided type to be required. */\nexport type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n/**\n * This interface allows configuring navigation props with router options and type-safe URLs via TypeScript module augmentation.\n * By default, this is an empty interface. Extend with `href` and `routerOptions` properties to configure your router.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RouterConfig {}\n\n/**\n * Represents a URL for navigation components.\n * This type can be configured by augmenting `RouterConfig` with an `href` property.\n */\nexport type Href = RouterConfig extends { href: infer H } ? H : string;\n\n/**\n * Represents router options for navigation components.\n * This type can be configured by augmenting `RouterConfig` with a `routerOptions` property.\n */\nexport type RouterOptions = RouterConfig extends { routerOptions: infer O } ? O : never;\n\n/**\n * Props available on components that perform navigation.\n */\nexport interface NavigationProps\n extends Pick<RACLinkProps, 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy'> {\n /** A URL to link to. */\n href?: Href;\n /** Options for the configured client side router. */\n routerOptions?: RouterOptions;\n}\n\n/** Represents a minimal data shape of a dynamic item in collection components. */\nexport interface CollectionItem {\n /** Unique identifier for the item or group. */\n id: Key;\n}\n\n/** Props available on components that render collections. */\nexport interface CollectionProps<T extends CollectionItem> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode);\n /** The items to display in the collection. */\n items?: Iterable<T>;\n}\n\n/** Props available on components that support asynchronous loading of items. */\nexport interface AsyncItemLoadingProps {\n /** Whether items are currently being loaded. */\n UNSTABLE_isLoading?: boolean;\n /** A callback function that is called when more items should be loaded. */\n UNSTABLE_onLoadMore?: () => void;\n}\n\n/** Props available on icons. */\nexport interface IconProps extends CommonProps, Pick<AriaLabelingProps, 'aria-label' | 'aria-labelledby'> {\n /**\n * Whether the icon is hidden from assistive technologies.\n * @default true\n */\n 'aria-hidden'?: boolean;\n /** The size of the icon in pixels. */\n size?: 16 | 24 | 32;\n /** The tone of the icon. */\n tone?: ForegroundTone;\n}\n\n/** Props available on native HTML elements. */\nexport interface NativeElementProps<T extends HTMLElement> extends HTMLAttributes<T> {\n [dataProp: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * Props available on components that support affixes.\n */\nexport interface AffixProps {\n /** The content displayed at the start of the component. Can be either an icon or a piece of text. */\n prefix?: ReactNode;\n /** The content displayed at the end of the component. Can be either an icon or a piece of text. */\n suffix?: ReactNode;\n}\n\n/** Props available on components that expose an imperative API. */\nexport interface ApiProps<T extends object> {\n /** A React ref that allows access to the imperative API of this component. */\n apiRef?: RefObject<T | null>;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { focusSafely } from '@react-aria/focus';\nimport type { CSSProperties, HTMLAttributes, ReactNode, RefObject } from 'react';\nimport type {\n ButtonProps as RACButtonProps,\n LinkProps as RACLinkProps,\n PressEvent as RACPressEvent,\n ValidationResult as RACValidationResult,\n} from 'react-aria-components';\nimport type { ForegroundTone } from '../utils/style/types.js';\n\n/** Represents an identifier for a collection item. */\nexport type Key = string | number;\n\n/** Represents a selection of items in a collection. */\nexport type Selection = 'all' | Set<Key>;\n\n/** Represents a direction (vertical or horizontal). */\nexport type Direction = 'vertical' | 'horizontal';\n\n/**\n * Use this type when you want to restrict `children` to a string,\n * but also want to allow expressions that resolve to strings.\n */\nexport type StringLikeChildren = string | number | (string | number)[];\n\n// `FocusableElement` is not exported from any React Aria package\n/** Any focusable element, including both HTML and SVG elements. */\nexport type FocusableElement = Parameters<typeof focusSafely>[0];\n\n/**\n * A set of common props that are allowed on every component\n */\nexport interface CommonProps {\n /**\n * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).\n */\n id?: string;\n /**\n * Use this attribute to \"claim\" the component tree for exclusive Cimpress UI usage.\n */\n 'data-cim-style-root'?: boolean;\n /**\n * Sets the CSS className for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_className?: string;\n /**\n * Sets the CSS style for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_style?: CSSProperties;\n}\n\n/**\n * An event fired when a component is pressed.\n *\n * By default, press events stop propagation to parent elements.\n * In cases where a handler decides not to handle a specific event,\n * it can call `continuePropagation()` to allow a parent to handle it.\n */\nexport type PressEvent = RACPressEvent;\n\n// HoverEvent is not exported from react-aria-components\n/** An event fired when a component is hovered. */\nexport type HoverEvent = Parameters<NonNullable<RACButtonProps['onHoverStart']>>[0];\n\n/**\n * Props for components that require a label, which can be hidden if necessary.\n */\nexport interface LabellableProps extends AriaLabelingProps {\n /** The content to display as the label. */\n label?: string;\n}\n\n// Copied from AriaLabelingProps from @react-types/shared\nexport interface AriaLabelingProps {\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string;\n\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string;\n\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string;\n}\n\n/** Provides details about the validation state of a form field. */\nexport type ValidationResult = RACValidationResult;\n\n/** Represents the error message(s) for a form field. */\nexport type FieldError =\n | string\n | string[]\n | undefined\n | ((validation: ValidationResult) => string | string[] | undefined);\n\n/** Props available on form field components. */\nexport interface FieldProps<T> extends LabellableProps {\n /**\n * The `<form>` element to associate the input with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).\n */\n form?: string;\n /**\n * The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name).\n */\n name?: string;\n /** A description for the field. Provides a hint such as specific requirements for what to choose. */\n description?: string;\n /** An error message for the field. */\n error?: FieldError;\n /**\n * A function that returns an error message (or `true`) if a given value is invalid.\n * Validation errors are displayed to the user when the form is submitted.\n * For real-time validation, use the `error` prop instead.\n */\n validate?: (value: T) => string | string[] | true | undefined;\n}\n\n/** Props available on form field components with text inputs. */\nexport interface FieldWithPlaceholderProps<T> extends FieldProps<T> {\n /** The placeholder text displayed in the input field. */\n placeholder?: string;\n}\n\n/** Changes specified optional properties within the provided type to be required. */\nexport type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n/**\n * This interface allows configuring navigation props with router options and type-safe URLs via TypeScript module augmentation.\n * By default, this is an empty interface. Extend with `href` and `routerOptions` properties to configure your router.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RouterConfig {}\n\n/**\n * Represents a URL for navigation components.\n * This type can be configured by augmenting `RouterConfig` with an `href` property.\n */\nexport type Href = RouterConfig extends { href: infer H } ? H : string;\n\n/**\n * Represents router options for navigation components.\n * This type can be configured by augmenting `RouterConfig` with a `routerOptions` property.\n */\nexport type RouterOptions = RouterConfig extends { routerOptions: infer O } ? O : never;\n\n/**\n * Props available on components that perform navigation.\n */\nexport interface NavigationProps extends Pick<\n RACLinkProps,\n 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy'\n> {\n /** A URL to link to. */\n href?: Href;\n /** Options for the configured client side router. */\n routerOptions?: RouterOptions;\n}\n\n/** Represents a minimal data shape of a dynamic item in collection components. */\nexport interface CollectionItem {\n /** Unique identifier for the item or group. */\n id: Key;\n}\n\n/** Props available on components that render collections. */\nexport interface CollectionProps<T extends CollectionItem> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode);\n /** The items to display in the collection. */\n items?: Iterable<T>;\n}\n\n/** Props available on components that support asynchronous loading of items. */\nexport interface AsyncItemLoadingProps {\n /** Whether items are currently being loaded. */\n UNSTABLE_isLoading?: boolean;\n /** A callback function that is called when more items should be loaded. */\n UNSTABLE_onLoadMore?: () => void;\n}\n\n/** Props available on icons. */\nexport interface IconProps extends CommonProps, Pick<AriaLabelingProps, 'aria-label' | 'aria-labelledby'> {\n /**\n * Whether the icon is hidden from assistive technologies.\n * @default true\n */\n 'aria-hidden'?: boolean;\n /** The size of the icon in pixels. */\n size?: 16 | 24 | 32;\n /** The tone of the icon. */\n tone?: ForegroundTone;\n}\n\n/** Props available on native HTML elements. */\nexport interface NativeElementProps<T extends HTMLElement> extends HTMLAttributes<T> {\n [dataProp: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * Props available on components that support affixes.\n */\nexport interface AffixProps {\n /** The content displayed at the start of the component. Can be either an icon or a piece of text. */\n prefix?: ReactNode;\n /** The content displayed at the end of the component. Can be either an icon or a piece of text. */\n suffix?: ReactNode;\n}\n\n/** Props available on components that expose an imperative API. */\nexport interface ApiProps<T extends object> {\n /** A React ref that allows access to the imperative API of this component. */\n apiRef?: RefObject<T | null>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMxE,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,EACrC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC,EAC7D,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IAClE,8CAA8C;IAC9C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AA8BD;;;;GAIG;AACH,QAAA,MAAM,KAAK,8JAA2C,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMxE,MAAM,WAAW,SACf,SACE,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAC/B,Y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,EAAC,eAAe,YAAE,SAAS,GAAQ,EACjD,WAAW,IACX,CACJ,EACD,eAAM,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAQ,EAChD,OAAO,IAAI,CACV,8BACG,WAAW,EACZ,eAAM,SAAS,EAAC,eAAe,YAAE,OAAO,GAAQ,IAC/C,CACJ,IACO,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseTypographyProps, TextStyleOptions } from './types.js';\nimport { textStyle } from './utils.js';\n\n// Used to prevent word wrap between icons and text\nconst WORD_JOINER = '\\u2060';\n\nexport interface LinkProps\n extends Omit<BaseTypographyProps, 'id'>,\n WithRequired<NavigationProps, 'href'>,\n Pick<TextStyleOptions, 'variant' | 'fontStyle' | 'alignment'>,\n Pick<RACLinkProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n /** An icon displayed before the link text. */\n iconStart?: ReactNode;\n /** An icon displayed after the link text. */\n iconEnd?: ReactNode;\n}\n\nfunction Link(\n { children, iconStart, iconEnd, UNSAFE_className, UNSAFE_style, variant, fontStyle, alignment, ...props }: LinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-link', textStyle({ tone: 'accent', variant, fontStyle, alignment }), UNSAFE_className)}\n style={UNSAFE_style}\n >\n {iconStart && (\n <>\n <span className=\"cim-link-icon\">{iconStart}</span>\n {WORD_JOINER}\n </>\n )}\n <span className=\"cim-link-text\">{children}</span>\n {iconEnd && (\n <>\n {WORD_JOINER}\n <span className=\"cim-link-icon\">{iconEnd}</span>\n </>\n )}\n </RACLink>\n );\n}\n\n/**\n * Displays a textual link that allows users to navigate to another page or resource.\n *\n * See [link usage guidelines](https://ui.cimpress.io/components/link/).\n */\nconst _Link = withStyleProps(forwardRef(Link), 'Link');\n\nexport { _Link as Link };\n"]}
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,IAAI,IAAI,OAAO,EAAkC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,mDAAmD;AACnD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAc7B,SAAS,IAAI,CACX,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa,EACpH,GAAoC;IAEpC,OAAO,CACL,MAAC,OAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,gBAAgB,CAAC,EAC3G,KAAK,EAAE,YAAY,aAElB,SAAS,IAAI,CACZ,8BACE,eAAM,SAAS,EAAC,eAAe,YAAE,SAAS,GAAQ,EACjD,WAAW,IACX,CACJ,EACD,eAAM,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAQ,EAChD,OAAO,IAAI,CACV,8BACG,WAAW,EACZ,eAAM,SAAS,EAAC,eAAe,YAAE,OAAO,GAAQ,IAC/C,CACJ,IACO,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseTypographyProps, TextStyleOptions } from './types.js';\nimport { textStyle } from './utils.js';\n\n// Used to prevent word wrap between icons and text\nconst WORD_JOINER = '\\u2060';\n\nexport interface LinkProps\n extends\n Omit<BaseTypographyProps, 'id'>,\n WithRequired<NavigationProps, 'href'>,\n Pick<TextStyleOptions, 'variant' | 'fontStyle' | 'alignment'>,\n Pick<RACLinkProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n /** An icon displayed before the link text. */\n iconStart?: ReactNode;\n /** An icon displayed after the link text. */\n iconEnd?: ReactNode;\n}\n\nfunction Link(\n { children, iconStart, iconEnd, UNSAFE_className, UNSAFE_style, variant, fontStyle, alignment, ...props }: LinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-link', textStyle({ tone: 'accent', variant, fontStyle, alignment }), UNSAFE_className)}\n style={UNSAFE_style}\n >\n {iconStart && (\n <>\n <span className=\"cim-link-icon\">{iconStart}</span>\n {WORD_JOINER}\n </>\n )}\n <span className=\"cim-link-text\">{children}</span>\n {iconEnd && (\n <>\n {WORD_JOINER}\n <span className=\"cim-link-icon\">{iconEnd}</span>\n </>\n )}\n </RACLink>\n );\n}\n\n/**\n * Displays a textual link that allows users to navigate to another page or resource.\n *\n * See [link usage guidelines](https://ui.cimpress.io/components/link/).\n */\nconst _Link = withStyleProps(forwardRef(Link), 'Link');\n\nexport { _Link as Link };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"localization-provider.d.ts","sourceRoot":"","sources":["../../../src/i18n/localization-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,KAAK,wBAAwB,EAA+B,MAAM,YAAY,CAAC;AACxF,OAAO,EAAmC,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAQ,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEzF,mEAAmE;AACnE,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;AACvE,uGAAuG;AACvG,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,QAAQ,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAIrF,qDAAqD;AACrD,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,CAAC,SAAS,QAAQ,GAAG,iBAAiB;IAoDnF;;;;OAIG;;kEAnDF;YACD,kFAAkF;YAClF,QAAQ,EAAE,SAAS,CAAC;YACpB,sHAAsH;YACtH,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,mFAAmF;YACnF,QAAQ,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;SAC/B;;;IA8CC;;;;OAIG;2BAnCyB,CAAC,SAAS,MAAM,CAAC,OAExC,CAAC,KACL,wBAA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AC,CAAC,CAAC,CAAC;SAC/B;;;IA8CC;;;;OAIG;2BAnCyB,CAAC,SAAS,MAAM,CAAC,OAExC,CAAC,KACL,wBAAwB,CAEzB,MAAM,CAAC,CAAC,CAAC,CAAC,EACV,MAAM,CACP;EA+BF;AAGD,eAAO,MAAQ,oBAAoB;;QA9D/B,kFAAkF;kBACxE,SAAS;QACnB,sHAAsH;iBAC7G,MAAM;QACf,mFAAmF;;;;GA0DlD,oBAAoB,GAzCzB,CAAC,yGAyC+D,CAAC"}
@@ -10,6 +10,7 @@ const LocalizedMessagesContext = createContext(enUS);
10
10
  *
11
11
  * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).
12
12
  */
13
+ // eslint-disable-next-line react-refresh/only-export-components
13
14
  export function useLocaleInfo() {
14
15
  return useRACLocale();
15
16
  }
@@ -51,6 +52,7 @@ export function UNSTABLE_createLocalizationTools() {
51
52
  useLocalizedMessages,
52
53
  };
53
54
  }
55
+ // eslint-disable-next-line react-refresh/only-export-components
54
56
  export const { LocalizationProvider, useLocalizedMessages } = UNSTABLE_createLocalizationTools();
55
57
  /** Patch object `a` with properties from object `b` while ignoring undefined values. */
56
58
  function patchMessages(a, b) {
@@ -1 +1 @@
1
- {"version":3,"file":"localization-provider.js","sourceRoot":"","sources":["../../../src/i18n/localization-provider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAiC,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,IAAI,EAAgD,MAAM,qBAAqB,CAAC;AAOzF,MAAM,wBAAwB,GAAG,aAAa,CAAW,IAAI,CAAC,CAAC;AAK/D;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,YAAY,E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,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,MAAM,GAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAE3B,KAAK,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,IAAI,CAAC,iBAAiB,IAAI,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE,CAAC;YACjG,SAAS;QACX,CAAC;QAED,MAAM,gBAAgB,GAAG,YAAuB,CAAC;QAEjD,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAE3D,KAAK,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACtE,IAAI,OAAO,EAAE,CAAC;gBACZ,8DAA8D;gBAC7D,MAAM,CAAC,gBAAgB,CAAS,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;YAC1D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["'use client';\n\nimport { createContext, useContext, useMemo, type ReactNode } from 'react';\nimport { type LocalizedStringFormatter, useLocalizedStringFormatter } from 'react-aria';\nimport { I18nProvider as RACI18nProvider, useLocale as useRACLocale } from 'react-aria-components';\nimport { enUS, type LocalizedMessages, type LocalizedString } from './messages/index.js';\n\n/** Defines the shape of an object containing localized strings. */\nexport type Messages = Record<string, Record<string, LocalizedString>>;\n/** A utility type that makes every property optional within an object containing localized strings. */\nexport type PartialMessages<T extends Messages> = { [P in keyof T]?: Partial<T[P]> };\n\nconst LocalizedMessagesContext = createContext<Messages>(enUS);\n\n/** Contains information about the current locale. */\nexport type LocaleInfo = ReturnType<typeof useRACLocale>;\n\n/**\n * Returns the current locale and layout direction.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\nexport function useLocaleInfo(): LocaleInfo {\n return useRACLocale();\n}\n\n/**\n * Creates type-safe tools for localizing custom components.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\nexport function UNSTABLE_createLocalizationTools<T extends Messages = LocalizedMessages>() {\n function LocalizationProvider({\n children,\n locale: newLocale,\n messages: newMessages,\n }: {\n /** The component tree that will be localized (usually the entire application). */\n children: ReactNode;\n /** The locale to apply to the children. Should be a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. */\n locale?: string;\n /** The localized messages for use by the components within this component tree. */\n messages?: PartialMessages<T>;\n }) {\n const messages = useContext(LocalizedMessagesContext) as T;\n const { locale } = useLocaleInfo();\n\n const patchedMessages: T = useMemo(() => patchMessages(messages, newMessages), [messages, newMessages]);\n\n return (\n <LocalizedMessagesContext.Provider value={patchedMessages}>\n <RACI18nProvider locale={newLocale ?? locale}>{children}</RACI18nProvider>\n </LocalizedMessagesContext.Provider>\n );\n }\n\n LocalizationProvider.displayName = 'LocalizationProvider';\n\n function useLocalizedMessages<R extends keyof T>(\n /** The key under which the messages are grouped, usually the component name. */\n key: R,\n ): LocalizedStringFormatter<\n // @ts-expect-error `keyof` infers `string | number | symbol` even though this interface only has string keys\n keyof T[R],\n string\n > {\n const { locale } = useLocaleInfo();\n const messages = useContext(LocalizedMessagesContext) as T;\n\n return useLocalizedStringFormatter<\n // @ts-expect-error `keyof` infers `string | number | symbol` even though this interface only has string keys\n keyof T[R],\n string\n >(\n {\n // `useLocalizedStringFormatter` expects its argument to contain messages for a single component, grouped by locale\n [locale]: messages[key],\n },\n key as string,\n );\n }\n\n return {\n /**\n * Provides localization data to Cimpress UI components.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\n LocalizationProvider,\n /**\n * Returns a localized message formatter for a specific component.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\n useLocalizedMessages,\n };\n}\n\nexport const { LocalizationProvider, useLocalizedMessages } = UNSTABLE_createLocalizationTools();\n\n/** Patch object `a` with properties from object `b` while ignoring undefined values. */\nfunction patchMessages<T extends Messages>(a: T, b?: PartialMessages<T>): T {\n if (!b || Object.values(b).every((value) => value === undefined)) {\n return a;\n }\n\n const result: T = { ...a };\n\n for (const [componentKey, componentMessages] of Object.entries(b)) {\n if (!componentMessages || Object.values(componentMessages).every((value) => value === undefined)) {\n continue;\n }\n\n const castComponentKey = componentKey as keyof T;\n\n result[castComponentKey] = { ...result[castComponentKey] };\n\n for (const [messageKey, message] of Object.entries(componentMessages)) {\n if (message) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (result[castComponentKey] as any)[messageKey] = message;\n }\n }\n }\n\n return result;\n}\n"]}
1
+ {"version":3,"file":"localization-provider.js","sourceRoot":"","sources":["../../../src/i18n/localization-provider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAiC,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,IAAI,EAAgD,MAAM,qBAAqB,CAAC;AAOzF,MAAM,wBAAwB,GAAG,aAAa,CAAW,IAAI,CAAC,CAAC;AAK/D;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,aAAa;IAC3B,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gCAAgC;IAC9C,SAAS,oBAAoB,CAAC,EAC5B,QAAQ,EACR,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,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AAM,GAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAE3B,KAAK,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,IAAI,CAAC,iBAAiB,IAAI,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE,CAAC;YACjG,SAAS;QACX,CAAC;QAED,MAAM,gBAAgB,GAAG,YAAuB,CAAC;QAEjD,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAE3D,KAAK,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACtE,IAAI,OAAO,EAAE,CAAC;gBACZ,8DAA8D;gBAC7D,MAAM,CAAC,gBAAgB,CAAS,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;YAC1D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["'use client';\n\nimport { createContext, useContext, useMemo, type ReactNode } from 'react';\nimport { type LocalizedStringFormatter, useLocalizedStringFormatter } from 'react-aria';\nimport { I18nProvider as RACI18nProvider, useLocale as useRACLocale } from 'react-aria-components';\nimport { enUS, type LocalizedMessages, type LocalizedString } from './messages/index.js';\n\n/** Defines the shape of an object containing localized strings. */\nexport type Messages = Record<string, Record<string, LocalizedString>>;\n/** A utility type that makes every property optional within an object containing localized strings. */\nexport type PartialMessages<T extends Messages> = { [P in keyof T]?: Partial<T[P]> };\n\nconst LocalizedMessagesContext = createContext<Messages>(enUS);\n\n/** Contains information about the current locale. */\nexport type LocaleInfo = ReturnType<typeof useRACLocale>;\n\n/**\n * Returns the current locale and layout direction.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useLocaleInfo(): LocaleInfo {\n return useRACLocale();\n}\n\n/**\n * Creates type-safe tools for localizing custom components.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\nexport function UNSTABLE_createLocalizationTools<T extends Messages = LocalizedMessages>() {\n function LocalizationProvider({\n children,\n locale: newLocale,\n messages: newMessages,\n }: {\n /** The component tree that will be localized (usually the entire application). */\n children: ReactNode;\n /** The locale to apply to the children. Should be a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. */\n locale?: string;\n /** The localized messages for use by the components within this component tree. */\n messages?: PartialMessages<T>;\n }) {\n const messages = useContext(LocalizedMessagesContext) as T;\n const { locale } = useLocaleInfo();\n\n const patchedMessages: T = useMemo(() => patchMessages(messages, newMessages), [messages, newMessages]);\n\n return (\n <LocalizedMessagesContext.Provider value={patchedMessages}>\n <RACI18nProvider locale={newLocale ?? locale}>{children}</RACI18nProvider>\n </LocalizedMessagesContext.Provider>\n );\n }\n\n LocalizationProvider.displayName = 'LocalizationProvider';\n\n function useLocalizedMessages<R extends keyof T>(\n /** The key under which the messages are grouped, usually the component name. */\n key: R,\n ): LocalizedStringFormatter<\n // @ts-expect-error `keyof` infers `string | number | symbol` even though this interface only has string keys\n keyof T[R],\n string\n > {\n const { locale } = useLocaleInfo();\n const messages = useContext(LocalizedMessagesContext) as T;\n\n return useLocalizedStringFormatter<\n // @ts-expect-error `keyof` infers `string | number | symbol` even though this interface only has string keys\n keyof T[R],\n string\n >(\n {\n // `useLocalizedStringFormatter` expects its argument to contain messages for a single component, grouped by locale\n [locale]: messages[key],\n },\n key as string,\n );\n }\n\n return {\n /**\n * Provides localization data to Cimpress UI components.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\n LocalizationProvider,\n /**\n * Returns a localized message formatter for a specific component.\n *\n * See [localization guide](https://ui.cimpress.io/dev-guides/localization/).\n */\n useLocalizedMessages,\n };\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport const { LocalizationProvider, useLocalizedMessages } = UNSTABLE_createLocalizationTools();\n\n/** Patch object `a` with properties from object `b` while ignoring undefined values. */\nfunction patchMessages<T extends Messages>(a: T, b?: PartialMessages<T>): T {\n if (!b || Object.values(b).every((value) => value === undefined)) {\n return a;\n }\n\n const result: T = { ...a };\n\n for (const [componentKey, componentMessages] of Object.entries(b)) {\n if (!componentMessages || Object.values(componentMessages).every((value) => value === undefined)) {\n continue;\n }\n\n const castComponentKey = componentKey as keyof T;\n\n result[castComponentKey] = { ...result[castComponentKey] };\n\n for (const [messageKey, message] of Object.entries(componentMessages)) {\n if (message) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (result[castComponentKey] as any)[messageKey] = message;\n }\n }\n }\n\n return result;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import type { IconProps } from '../components/types.js';
2
+ /** Renders an SVG icon. */
3
+ declare const SvgCart: {
4
+ ({ size, "aria-hidden": ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export default SvgCart;
8
+ //# sourceMappingURL=cart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../../src/icons/cart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,2BAA2B;AAC3B,QAAA,MAAM,OAAO;yFAAwF,SAAS;;CAqB7G,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { fgTone } from '../utils/style/tone.js';
4
+ const displayName = 'IconCart';
5
+ /** Renders an SVG icon. */
6
+ const SvgCart = ({ size, 'aria-hidden': ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }) => {
7
+ const props = {
8
+ ...rest,
9
+ 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),
10
+ className: clsx('cim-icon', tone && fgTone(tone), UNSAFE_className),
11
+ style: UNSAFE_style,
12
+ width: size != null ? size + 'px' : '1em',
13
+ height: size != null ? size + 'px' : '1em',
14
+ };
15
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", "data-icon": "true", fill: "currentColor", ...props, children: [_jsx("path", { fill: "currentColor", d: "M24 25a1 1 0 1 0-2 0 1 1 0 0 0 2 0m2 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m-16 0a1 1 0 1 0-2 0 1 1 0 0 0 2 0m2 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0" }), _jsx("path", { fill: "currentColor", d: "M6.133 4a2 2 0 0 1 1.98 1.717L8.437 8h15.457a2 2 0 0 1 1.99 2.2l-.8 8a2 2 0 0 1-1.99 1.8H10v2h13v2H8v-4.928L6.133 6H4a1 1 0 0 1 0-2zm3.734 14h13.228l.8-8H8.725z" })] }));
16
+ };
17
+ SvgCart.displayName = displayName;
18
+ export default SvgCart;
19
+ //# sourceMappingURL=cart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cart.js","sourceRoot":"","sources":["../../../src/icons/cart.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,MAAM,WAAW,GAAG,UAAU,CAAC;AAC/B,2BAA2B;AAC3B,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAa,EAAE,EAAE;IAChH,MAAM,KAAK,GAAG;QACZ,GAAG,IAAI;QACP,aAAa,EAAE,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC;QAC5F,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACnE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;QACzC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;KAC3C,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,eAAW,MAAM,EAAC,IAAI,EAAC,cAAc,KAAK,KAAK,aACxG,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,sIAAsI,GACxI,EACF,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,kKAAkK,GACpK,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AACF,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC,eAAe,OAAO,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { IconProps } from '../components/types.js';\nimport { fgTone } from '../utils/style/tone.js';\nconst displayName = 'IconCart';\n/** Renders an SVG icon. */\nconst SvgCart = ({ size, 'aria-hidden': ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }: IconProps) => {\n const props = {\n ...rest,\n 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),\n className: clsx('cim-icon', tone && fgTone(tone), UNSAFE_className),\n style: UNSAFE_style,\n width: size != null ? size + 'px' : '1em',\n height: size != null ? size + 'px' : '1em',\n };\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" data-icon=\"true\" fill=\"currentColor\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M24 25a1 1 0 1 0-2 0 1 1 0 0 0 2 0m2 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m-16 0a1 1 0 1 0-2 0 1 1 0 0 0 2 0m2 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0\"\n />\n <path\n fill=\"currentColor\"\n d=\"M6.133 4a2 2 0 0 1 1.98 1.717L8.437 8h15.457a2 2 0 0 1 1.99 2.2l-.8 8a2 2 0 0 1-1.99 1.8H10v2h13v2H8v-4.928L6.133 6H4a1 1 0 0 1 0-2zm3.734 14h13.228l.8-8H8.725z\"\n />\n </svg>\n );\n};\nSvgCart.displayName = displayName;\nexport default SvgCart;\n"]}
@@ -0,0 +1,8 @@
1
+ import type { IconProps } from '../components/types.js';
2
+ /** Renders an SVG icon. */
3
+ declare const SvgGlobe: {
4
+ ({ size, "aria-hidden": ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export default SvgGlobe;
8
+ //# sourceMappingURL=globe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globe.d.ts","sourceRoot":"","sources":["../../../src/icons/globe.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,2BAA2B;AAC3B,QAAA,MAAM,QAAQ;yFAAwF,SAAS;;CAyB9G,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { fgTone } from '../utils/style/tone.js';
4
+ const displayName = 'IconGlobe';
5
+ /** Renders an SVG icon. */
6
+ const SvgGlobe = ({ size, 'aria-hidden': ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }) => {
7
+ const props = {
8
+ ...rest,
9
+ 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),
10
+ className: clsx('cim-icon', tone && fgTone(tone), UNSAFE_className),
11
+ style: UNSAFE_style,
12
+ width: size != null ? size + 'px' : '1em',
13
+ height: size != null ? size + 'px' : '1em',
14
+ };
15
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", "data-icon": "true", fill: "currentColor", ...props, children: [_jsx("path", { fill: "currentColor", d: "M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16s5.373 12 12 12 12-5.373 12-12m2 0c0 7.732-6.268 14-14 14S2 23.732 2 16 8.268 2 16 2s14 6.268 14 14" }), _jsx("path", { fill: "currentColor", d: "M20 16c0-4.367-1.273-8.264-4-11.501-2.727 3.237-4 7.134-4 11.5 0 4.367 1.273 8.264 4 11.5 2.727-3.236 4-7.132 4-11.5Zm2 0c0 5.192-1.656 9.888-5.276 13.69a1 1 0 0 1-1.448 0C11.656 25.887 10 21.191 10 16s1.656-9.889 5.276-13.69l.074-.07a1 1 0 0 1 1.374.07C20.344 6.111 22 10.808 22 16" }), _jsx("path", { fill: "currentColor", d: "M29 15a1 1 0 1 1 0 2H3a1 1 0 0 1 0-2zm-2.618-6.638C24.118 9.694 20.695 11 16 11S7.882 9.694 5.618 8.362l1.014-1.724C8.618 7.806 11.695 9 16 9s7.382-1.194 9.368-2.362zm0 15.276C24.118 22.306 20.695 21 16 21s-8.118 1.306-10.382 2.638l1.014 1.724C8.618 24.194 11.695 23 16 23s7.382 1.194 9.368 2.362z" })] }));
16
+ };
17
+ SvgGlobe.displayName = displayName;
18
+ export default SvgGlobe;
19
+ //# sourceMappingURL=globe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globe.js","sourceRoot":"","sources":["../../../src/icons/globe.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,MAAM,WAAW,GAAG,WAAW,CAAC;AAChC,2BAA2B;AAC3B,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAa,EAAE,EAAE;IACjH,MAAM,KAAK,GAAG;QACZ,GAAG,IAAI;QACP,aAAa,EAAE,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC;QAC5F,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACnE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;QACzC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;KAC3C,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,eAAW,MAAM,EAAC,IAAI,EAAC,cAAc,KAAK,KAAK,aACxG,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,+IAA+I,GACjJ,EACF,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,4RAA4R,GAC9R,EACF,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,2SAA2S,GAC7S,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;AACnC,eAAe,QAAQ,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { IconProps } from '../components/types.js';\nimport { fgTone } from '../utils/style/tone.js';\nconst displayName = 'IconGlobe';\n/** Renders an SVG icon. */\nconst SvgGlobe = ({ size, 'aria-hidden': ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }: IconProps) => {\n const props = {\n ...rest,\n 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),\n className: clsx('cim-icon', tone && fgTone(tone), UNSAFE_className),\n style: UNSAFE_style,\n width: size != null ? size + 'px' : '1em',\n height: size != null ? size + 'px' : '1em',\n };\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" data-icon=\"true\" fill=\"currentColor\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16s5.373 12 12 12 12-5.373 12-12m2 0c0 7.732-6.268 14-14 14S2 23.732 2 16 8.268 2 16 2s14 6.268 14 14\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20 16c0-4.367-1.273-8.264-4-11.501-2.727 3.237-4 7.134-4 11.5 0 4.367 1.273 8.264 4 11.5 2.727-3.236 4-7.132 4-11.5Zm2 0c0 5.192-1.656 9.888-5.276 13.69a1 1 0 0 1-1.448 0C11.656 25.887 10 21.191 10 16s1.656-9.889 5.276-13.69l.074-.07a1 1 0 0 1 1.374.07C20.344 6.111 22 10.808 22 16\"\n />\n <path\n fill=\"currentColor\"\n d=\"M29 15a1 1 0 1 1 0 2H3a1 1 0 0 1 0-2zm-2.618-6.638C24.118 9.694 20.695 11 16 11S7.882 9.694 5.618 8.362l1.014-1.724C8.618 7.806 11.695 9 16 9s7.382-1.194 9.368-2.362zm0 15.276C24.118 22.306 20.695 21 16 21s-8.118 1.306-10.382 2.638l1.014 1.724C8.618 24.194 11.695 23 16 23s7.382 1.194 9.368 2.362z\"\n />\n </svg>\n );\n};\nSvgGlobe.displayName = displayName;\nexport default SvgGlobe;\n"]}
@@ -0,0 +1,8 @@
1
+ import type { IconProps } from '../components/types.js';
2
+ /** Renders an SVG icon. */
3
+ declare const SvgImageBroken: {
4
+ ({ size, "aria-hidden": ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export default SvgImageBroken;
8
+ //# sourceMappingURL=image-broken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-broken.d.ts","sourceRoot":"","sources":["../../../src/icons/image-broken.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,2BAA2B;AAC3B,QAAA,MAAM,cAAc;yFAOjB,SAAS;;CAiBX,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { fgTone } from '../utils/style/tone.js';
4
+ const displayName = 'IconImageBroken';
5
+ /** Renders an SVG icon. */
6
+ const SvgImageBroken = ({ size, 'aria-hidden': ariaHidden, tone, UNSAFE_className, UNSAFE_style, ...rest }) => {
7
+ const props = {
8
+ ...rest,
9
+ 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),
10
+ className: clsx('cim-icon', tone && fgTone(tone), UNSAFE_className),
11
+ style: UNSAFE_style,
12
+ width: size != null ? size + 'px' : '1em',
13
+ height: size != null ? size + 'px' : '1em',
14
+ };
15
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", "data-icon": "true", fill: "currentColor", ...props, children: _jsx("path", { fill: "currentColor", d: "M26 11h-2a1 1 0 0 0-.895.553l-1.782 3.563-4.52.904a1 1 0 0 0-.784.784l-.904 4.52-.303.153-4.198-3.266a1 1 0 0 0-1.357.12L6 21.951V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2zm-13 .5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M26 24a2 2 0 0 1-2 2h-5.001l1.6-1.2.077-.064a1 1 0 0 0 .314-.594l.394-2.757 2.758-.395.096-.02a1 1 0 0 0 .562-.37L26 19zM8 26a2 2 0 0 1-1.85-1.241 1 1 0 0 0 .093-.09l3.877-4.308 2.71 2.107-1.277.637A1 1 0 0 0 11 24v2zM28 8a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h4a1 1 0 0 0 1-1v-2.382l3.447-1.723.1-.058a1 1 0 0 0 .433-.64l.87-4.346 4.346-.87.112-.03a1 1 0 0 0 .587-.504L24.617 13H27a1 1 0 0 0 1-1zm-13 3.5a3.5 3.5 0 1 0-7 0 3.5 3.5 0 0 0 7 0M28 16a1 1 0 0 0-1.8-.6l-2.75 3.668-3.092.442a1 1 0 0 0-.848.848l-.443 3.092L15.4 26.2A1 1 0 0 0 16 28h8a4 4 0 0 0 4-4z" }) }));
16
+ };
17
+ SvgImageBroken.displayName = displayName;
18
+ export default SvgImageBroken;
19
+ //# sourceMappingURL=image-broken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-broken.js","sourceRoot":"","sources":["../../../src/icons/image-broken.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,MAAM,WAAW,GAAG,iBAAiB,CAAC;AACtC,2BAA2B;AAC3B,MAAM,cAAc,GAAG,CAAC,EACtB,IAAI,EACJ,aAAa,EAAE,UAAU,EACzB,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,GAAG,IAAI,EACG,EAAE,EAAE;IACd,MAAM,KAAK,GAAG;QACZ,GAAG,IAAI;QACP,aAAa,EAAE,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC;QAC5F,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACnE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;QACzC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;KAC3C,CAAC;IACF,OAAO,CACL,cAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,eAAW,MAAM,EAAC,IAAI,EAAC,cAAc,KAAK,KAAK,YACxG,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,ywBAAywB,GAC3wB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,WAAW,CAAC;AACzC,eAAe,cAAc,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { IconProps } from '../components/types.js';\nimport { fgTone } from '../utils/style/tone.js';\nconst displayName = 'IconImageBroken';\n/** Renders an SVG icon. */\nconst SvgImageBroken = ({\n size,\n 'aria-hidden': ariaHidden,\n tone,\n UNSAFE_className,\n UNSAFE_style,\n ...rest\n}: IconProps) => {\n const props = {\n ...rest,\n 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),\n className: clsx('cim-icon', tone && fgTone(tone), UNSAFE_className),\n style: UNSAFE_style,\n width: size != null ? size + 'px' : '1em',\n height: size != null ? size + 'px' : '1em',\n };\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" data-icon=\"true\" fill=\"currentColor\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M26 11h-2a1 1 0 0 0-.895.553l-1.782 3.563-4.52.904a1 1 0 0 0-.784.784l-.904 4.52-.303.153-4.198-3.266a1 1 0 0 0-1.357.12L6 21.951V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2zm-13 .5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M26 24a2 2 0 0 1-2 2h-5.001l1.6-1.2.077-.064a1 1 0 0 0 .314-.594l.394-2.757 2.758-.395.096-.02a1 1 0 0 0 .562-.37L26 19zM8 26a2 2 0 0 1-1.85-1.241 1 1 0 0 0 .093-.09l3.877-4.308 2.71 2.107-1.277.637A1 1 0 0 0 11 24v2zM28 8a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h4a1 1 0 0 0 1-1v-2.382l3.447-1.723.1-.058a1 1 0 0 0 .433-.64l.87-4.346 4.346-.87.112-.03a1 1 0 0 0 .587-.504L24.617 13H27a1 1 0 0 0 1-1zm-13 3.5a3.5 3.5 0 1 0-7 0 3.5 3.5 0 0 0 7 0M28 16a1 1 0 0 0-1.8-.6l-2.75 3.668-3.092.442a1 1 0 0 0-.848.848l-.443 3.092L15.4 26.2A1 1 0 0 0 16 28h8a4 4 0 0 0 4-4z\"\n />\n </svg>\n );\n};\nSvgImageBroken.displayName = displayName;\nexport default SvgImageBroken;\n"]}
@@ -42,6 +42,7 @@ export { default as IconCalculator } from './calculator.js';
42
42
  export { default as IconCalendarEmpty } from './calendar-empty.js';
43
43
  export { default as IconCalendarFill } from './calendar-fill.js';
44
44
  export { default as IconCalendar } from './calendar.js';
45
+ export { default as IconCart } from './cart.js';
45
46
  export { default as IconCategoryApparel } from './category-apparel.js';
46
47
  export { default as IconCategoryBag } from './category-bag.js';
47
48
  export { default as IconCategoryBook } from './category-book.js';
@@ -100,7 +101,9 @@ export { default as IconFileFinances } from './file-finances.js';
100
101
  export { default as IconFilter } from './filter.js';
101
102
  export { default as IconFlipHorizontal } from './flip-horizontal.js';
102
103
  export { default as IconFlipVertical } from './flip-vertical.js';
104
+ export { default as IconGlobe } from './globe.js';
103
105
  export { default as IconHome } from './home.js';
106
+ export { default as IconImageBroken } from './image-broken.js';
104
107
  export { default as IconImageFill } from './image-fill.js';
105
108
  export { default as IconImage } from './image.js';
106
109
  export { default as IconInfoCircleFill } from './info-circle-fill.js';
@@ -117,13 +120,16 @@ export { default as IconLockFill } from './lock-fill.js';
117
120
  export { default as IconLockOpenFill } from './lock-open-fill.js';
118
121
  export { default as IconLockOpen } from './lock-open.js';
119
122
  export { default as IconLock } from './lock.js';
123
+ export { default as IconLoudspeaker } from './loudspeaker.js';
120
124
  export { default as IconMenuBold } from './menu-bold.js';
121
125
  export { default as IconMenuGrid } from './menu-grid.js';
122
126
  export { default as IconMenuMoreHorizontal } from './menu-more-horizontal.js';
123
127
  export { default as IconMenuMoreVertical } from './menu-more-vertical.js';
124
128
  export { default as IconMenu } from './menu.js';
129
+ export { default as IconOpacity } from './opacity.js';
125
130
  export { default as IconPencilFill } from './pencil-fill.js';
126
131
  export { default as IconPencil } from './pencil.js';
132
+ export { default as IconPinMap } from './pin-map.js';
127
133
  export { default as IconPlaceholder } from './placeholder.js';
128
134
  export { default as IconPlay } from './play.js';
129
135
  export { default as IconPointer } from './pointer.js';
@@ -153,6 +159,7 @@ export { default as IconShapes } from './shapes.js';
153
159
  export { default as IconShareAlt } from './share-alt.js';
154
160
  export { default as IconShare } from './share.js';
155
161
  export { default as IconShirtAdd } from './shirt-add.js';
162
+ export { default as IconShop } from './shop.js';
156
163
  export { default as IconSortAscendingAlt } from './sort-ascending-alt.js';
157
164
  export { default as IconSortAscending } from './sort-ascending.js';
158
165
  export { default as IconSortDescendingAlt } from './sort-descending-alt.js';
@@ -173,6 +180,7 @@ export { default as IconTextItalic } from './text-italic.js';
173
180
  export { default as IconTextStrikethrough } from './text-strikethrough.js';
174
181
  export { default as IconTextUnderline } from './text-underline.js';
175
182
  export { default as IconText } from './text.js';
183
+ export { default as IconTranslate } from './translate.js';
176
184
  export { default as IconTrashFill } from './trash-fill.js';
177
185
  export { default as IconTrash } from './trash.js';
178
186
  export { default as UNSTABLE_IconExpand } from './unstable-expand.js';
@@ -181,6 +189,8 @@ export { default as IconUser } from './user.js';
181
189
  export { default as IconUsers } from './users.js';
182
190
  export { default as IconViewOff } from './view-off.js';
183
191
  export { default as IconView } from './view.js';
192
+ export { default as IconWalletRefund } from './wallet-refund.js';
193
+ export { default as IconWallet } from './wallet.js';
184
194
  export { default as IconWarningCircleFill } from './warning-circle-fill.js';
185
195
  export { default as IconWarningFill } from './warning-fill.js';
186
196
  export { default as IconWarning } from './warning.js';