@arshad-shah/cynosure 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/README.md +5 -5
  2. package/dist/adapters/astro/index.d.ts +52 -0
  3. package/dist/adapters/astro/index.js +27 -0
  4. package/dist/adapters/astro/index.js.map +1 -0
  5. package/dist/adapters/vite/index.d.ts +11 -0
  6. package/dist/adapters/vite/index.js +33 -12
  7. package/dist/adapters/vite/index.js.map +1 -1
  8. package/dist/brands/googleplay.d.ts +2 -0
  9. package/dist/brands/googleplay.js +17 -0
  10. package/dist/brands/googleplay.js.map +1 -0
  11. package/dist/brands/index.d.ts +1 -0
  12. package/dist/brands/index.js +132 -130
  13. package/dist/components/Accordion/Accordion.d.ts +14 -0
  14. package/dist/components/Accordion/Accordion.js.map +1 -1
  15. package/dist/components/Announcer/Announcer.d.ts +1 -0
  16. package/dist/components/Announcer/Announcer.js +5 -5
  17. package/dist/components/Announcer/Announcer.js.map +1 -1
  18. package/dist/components/AppShell/AppShell.d.ts +22 -1
  19. package/dist/components/AppShell/AppShell.js +92 -83
  20. package/dist/components/AppShell/AppShell.js.map +1 -1
  21. package/dist/components/AppShell/index.d.ts +1 -1
  22. package/dist/components/AspectRatio/AspectRatio.d.ts +29 -0
  23. package/dist/components/AspectRatio/AspectRatio.js +21 -0
  24. package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
  25. package/dist/components/AspectRatio/index.d.ts +1 -0
  26. package/dist/components/Avatar/Avatar.d.ts +96 -0
  27. package/dist/components/Avatar/Avatar.js +90 -0
  28. package/dist/components/Avatar/Avatar.js.map +1 -0
  29. package/dist/components/Avatar/index.d.ts +1 -0
  30. package/dist/components/Badge/Badge.d.ts +6 -0
  31. package/dist/components/Badge/Badge.js.map +1 -1
  32. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +55 -0
  33. package/dist/components/Breadcrumbs/Breadcrumbs.js +85 -0
  34. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
  35. package/dist/components/Breadcrumbs/index.d.ts +1 -0
  36. package/dist/components/Button/Button.d.ts +27 -2
  37. package/dist/components/Button/Button.js +62 -53
  38. package/dist/components/Button/Button.js.map +1 -1
  39. package/dist/components/Calendar/Calendar.d.ts +65 -7
  40. package/dist/components/Calendar/Calendar.js +209 -97
  41. package/dist/components/Calendar/Calendar.js.map +1 -1
  42. package/dist/components/Calendar/dates.d.ts +4 -0
  43. package/dist/components/Calendar/dates.js +41 -27
  44. package/dist/components/Calendar/dates.js.map +1 -1
  45. package/dist/components/Calendar/index.d.ts +1 -1
  46. package/dist/components/Card/Card.d.ts +35 -1
  47. package/dist/components/Card/Card.js +48 -36
  48. package/dist/components/Card/Card.js.map +1 -1
  49. package/dist/components/Card/index.d.ts +1 -1
  50. package/dist/components/Checkbox/Checkbox.d.ts +11 -4
  51. package/dist/components/Checkbox/Checkbox.js +33 -7
  52. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  53. package/dist/components/Checklist/Checklist.d.ts +65 -0
  54. package/dist/components/Checklist/Checklist.js +163 -0
  55. package/dist/components/Checklist/Checklist.js.map +1 -0
  56. package/dist/components/Checklist/index.d.ts +1 -0
  57. package/dist/components/Choice/Choice.d.ts +73 -0
  58. package/dist/components/Choice/Choice.js +41 -0
  59. package/dist/components/Choice/Choice.js.map +1 -0
  60. package/dist/components/Choice/index.d.ts +1 -0
  61. package/dist/components/CodeBlock/CodeBlock.d.ts +5 -0
  62. package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
  63. package/dist/components/ColorField/ColorField.d.ts +12 -0
  64. package/dist/components/ColorField/ColorField.js +199 -208
  65. package/dist/components/ColorField/ColorField.js.map +1 -1
  66. package/dist/components/ColorSwatches/ColorSwatches.d.ts +5 -0
  67. package/dist/components/ColorSwatches/ColorSwatches.js +6 -6
  68. package/dist/components/ColorSwatches/ColorSwatches.js.map +1 -1
  69. package/dist/components/Combobox/Combobox.d.ts +20 -1
  70. package/dist/components/Combobox/Combobox.js +86 -111
  71. package/dist/components/Combobox/Combobox.js.map +1 -1
  72. package/dist/components/CommandPalette/CommandPalette.d.ts +9 -0
  73. package/dist/components/CommandPalette/CommandPalette.js +10 -10
  74. package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
  75. package/dist/components/CompareSlider/CompareSlider.d.ts +4 -0
  76. package/dist/components/CompareSlider/CompareSlider.js +4 -4
  77. package/dist/components/CompareSlider/CompareSlider.js.map +1 -1
  78. package/dist/components/Container/Container.d.ts +44 -0
  79. package/dist/components/Container/Container.js +28 -0
  80. package/dist/components/Container/Container.js.map +1 -0
  81. package/dist/components/Container/index.d.ts +1 -0
  82. package/dist/components/ContextMenu/ContextMenu.d.ts +11 -0
  83. package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
  84. package/dist/components/CopyButton/CopyButton.d.ts +8 -0
  85. package/dist/components/CopyButton/CopyButton.js +29 -28
  86. package/dist/components/CopyButton/CopyButton.js.map +1 -1
  87. package/dist/components/DateField/DateField.d.ts +17 -0
  88. package/dist/components/DateField/DateField.js +6 -6
  89. package/dist/components/DateField/DateField.js.map +1 -1
  90. package/dist/components/DescriptionList/DescriptionList.d.ts +3 -0
  91. package/dist/components/DescriptionList/DescriptionList.js.map +1 -1
  92. package/dist/components/DeviceFrame/DeviceFrame.d.ts +63 -0
  93. package/dist/components/DeviceFrame/DeviceFrame.js +54 -0
  94. package/dist/components/DeviceFrame/DeviceFrame.js.map +1 -0
  95. package/dist/components/DeviceFrame/index.d.ts +1 -0
  96. package/dist/components/Dialog/Dialog.d.ts +25 -2
  97. package/dist/components/Dialog/Dialog.js +89 -72
  98. package/dist/components/Dialog/Dialog.js.map +1 -1
  99. package/dist/components/Disclosure/Disclosure.d.ts +7 -0
  100. package/dist/components/Disclosure/Disclosure.js.map +1 -1
  101. package/dist/components/Divider/Divider.d.ts +59 -0
  102. package/dist/components/Divider/Divider.js +32 -0
  103. package/dist/components/Divider/Divider.js.map +1 -0
  104. package/dist/components/Divider/index.d.ts +1 -0
  105. package/dist/components/DocumentViewport/DocumentViewport.d.ts +8 -0
  106. package/dist/components/DocumentViewport/DocumentViewport.js.map +1 -1
  107. package/dist/components/EmptyState/EmptyState.d.ts +8 -2
  108. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  109. package/dist/components/Field/Field.d.ts +6 -0
  110. package/dist/components/Field/Field.js +31 -33
  111. package/dist/components/Field/Field.js.map +1 -1
  112. package/dist/components/FileDrop/FileDrop.d.ts +8 -0
  113. package/dist/components/FileDrop/FileDrop.js +14 -14
  114. package/dist/components/FileDrop/FileDrop.js.map +1 -1
  115. package/dist/components/FloatingToolbar/FloatingToolbar.d.ts +4 -0
  116. package/dist/components/FloatingToolbar/FloatingToolbar.js +11 -10
  117. package/dist/components/FloatingToolbar/FloatingToolbar.js.map +1 -1
  118. package/dist/components/Grid/Grid.d.ts +57 -10
  119. package/dist/components/Grid/Grid.js +71 -28
  120. package/dist/components/Grid/Grid.js.map +1 -1
  121. package/dist/components/Grid/index.d.ts +1 -1
  122. package/dist/components/Heading/Heading.d.ts +59 -0
  123. package/dist/components/Heading/Heading.js +33 -0
  124. package/dist/components/Heading/Heading.js.map +1 -0
  125. package/dist/components/Heading/index.d.ts +1 -0
  126. package/dist/components/HoverCard/HoverCard.d.ts +1 -0
  127. package/dist/components/HoverCard/HoverCard.js.map +1 -1
  128. package/dist/components/IconButton/IconButton.d.ts +17 -1
  129. package/dist/components/IconButton/IconButton.js +14 -10
  130. package/dist/components/IconButton/IconButton.js.map +1 -1
  131. package/dist/components/IconTile/IconTile.d.ts +45 -0
  132. package/dist/components/IconTile/IconTile.js +25 -0
  133. package/dist/components/IconTile/IconTile.js.map +1 -0
  134. package/dist/components/IconTile/index.d.ts +1 -0
  135. package/dist/components/Image/Image.d.ts +62 -0
  136. package/dist/components/Image/Image.js +75 -0
  137. package/dist/components/Image/Image.js.map +1 -0
  138. package/dist/components/Image/index.d.ts +1 -0
  139. package/dist/components/Inline/Inline.d.ts +8 -4
  140. package/dist/components/Inline/Inline.js +12 -16
  141. package/dist/components/Inline/Inline.js.map +1 -1
  142. package/dist/components/Kbd/Kbd.d.ts +2 -0
  143. package/dist/components/Kbd/Kbd.js.map +1 -1
  144. package/dist/components/KeyValueEditor/KeyValueEditor.d.ts +7 -0
  145. package/dist/components/KeyValueEditor/KeyValueEditor.js +43 -42
  146. package/dist/components/KeyValueEditor/KeyValueEditor.js.map +1 -1
  147. package/dist/components/Link/Link.d.ts +16 -1
  148. package/dist/components/Link/Link.js +20 -18
  149. package/dist/components/Link/Link.js.map +1 -1
  150. package/dist/components/List/List.d.ts +73 -0
  151. package/dist/components/List/List.js +64 -0
  152. package/dist/components/List/List.js.map +1 -0
  153. package/dist/components/List/index.d.ts +1 -0
  154. package/dist/components/LoadingDots/LoadingDots.d.ts +2 -0
  155. package/dist/components/LoadingDots/LoadingDots.js.map +1 -1
  156. package/dist/components/Menu/Menu.d.ts +13 -1
  157. package/dist/components/Menu/Menu.js +37 -35
  158. package/dist/components/Menu/Menu.js.map +1 -1
  159. package/dist/components/Notice/Notice.d.ts +5 -0
  160. package/dist/components/Notice/Notice.js +12 -11
  161. package/dist/components/Notice/Notice.js.map +1 -1
  162. package/dist/components/NumberField/NumberField.d.ts +17 -0
  163. package/dist/components/NumberField/NumberField.js +8 -8
  164. package/dist/components/NumberField/NumberField.js.map +1 -1
  165. package/dist/components/OptionList/OptionList.d.ts +69 -0
  166. package/dist/components/OptionList/OptionList.js +75 -0
  167. package/dist/components/OptionList/OptionList.js.map +1 -0
  168. package/dist/components/OptionList/index.d.ts +1 -0
  169. package/dist/components/PageHeader/PageHeader.d.ts +67 -0
  170. package/dist/components/PageHeader/PageHeader.js +63 -0
  171. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  172. package/dist/components/PageHeader/index.d.ts +1 -0
  173. package/dist/components/Pagination/Pagination.d.ts +77 -0
  174. package/dist/components/Pagination/Pagination.js +121 -0
  175. package/dist/components/Pagination/Pagination.js.map +1 -0
  176. package/dist/components/Pagination/index.d.ts +1 -0
  177. package/dist/components/PanZoomCanvas/PanZoomCanvas.d.ts +4 -0
  178. package/dist/components/PanZoomCanvas/PanZoomCanvas.js.map +1 -1
  179. package/dist/components/Popover/Popover.d.ts +10 -0
  180. package/dist/components/Popover/Popover.js.map +1 -1
  181. package/dist/components/ProgressBar/ProgressBar.d.ts +5 -0
  182. package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
  183. package/dist/components/ProgressOverlay/ProgressOverlay.d.ts +3 -0
  184. package/dist/components/ProgressOverlay/ProgressOverlay.js.map +1 -1
  185. package/dist/components/Prose/Prose.d.ts +1 -0
  186. package/dist/components/Prose/Prose.js.map +1 -1
  187. package/dist/components/QRCode/QRCode.d.ts +56 -0
  188. package/dist/components/QRCode/QRCode.js +48 -0
  189. package/dist/components/QRCode/QRCode.js.map +1 -0
  190. package/dist/components/QRCode/index.d.ts +1 -0
  191. package/dist/components/RadioGroup/RadioGroup.d.ts +13 -0
  192. package/dist/components/RadioGroup/RadioGroup.js +32 -24
  193. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  194. package/dist/components/Section/Section.d.ts +57 -0
  195. package/dist/components/Section/Section.js +27 -0
  196. package/dist/components/Section/Section.js.map +1 -0
  197. package/dist/components/Section/index.d.ts +1 -0
  198. package/dist/components/SegmentedControl/SegmentedControl.d.ts +9 -0
  199. package/dist/components/SegmentedControl/SegmentedControl.js +12 -12
  200. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  201. package/dist/components/Select/Select.d.ts +18 -1
  202. package/dist/components/Select/Select.js +107 -125
  203. package/dist/components/Select/Select.js.map +1 -1
  204. package/dist/components/Select/index.d.ts +1 -0
  205. package/dist/components/SelectionFrame/SelectionFrame.d.ts +6 -0
  206. package/dist/components/SelectionFrame/SelectionFrame.js.map +1 -1
  207. package/dist/components/Sheet/Sheet.js +12 -7
  208. package/dist/components/Sheet/Sheet.js.map +1 -1
  209. package/dist/components/SideNav/SideNav.d.ts +37 -1
  210. package/dist/components/SideNav/SideNav.js +103 -74
  211. package/dist/components/SideNav/SideNav.js.map +1 -1
  212. package/dist/components/SideNav/index.d.ts +1 -1
  213. package/dist/components/SignaturePad/SignaturePad.d.ts +3 -0
  214. package/dist/components/SignaturePad/SignaturePad.js.map +1 -1
  215. package/dist/components/SiteFooter/SiteFooter.d.ts +66 -0
  216. package/dist/components/SiteFooter/SiteFooter.js +80 -0
  217. package/dist/components/SiteFooter/SiteFooter.js.map +1 -0
  218. package/dist/components/SiteFooter/index.d.ts +1 -0
  219. package/dist/components/SiteHeader/SiteHeader.d.ts +78 -0
  220. package/dist/components/SiteHeader/SiteHeader.js +114 -0
  221. package/dist/components/SiteHeader/SiteHeader.js.map +1 -0
  222. package/dist/components/SiteHeader/index.d.ts +1 -0
  223. package/dist/components/Skeleton/Skeleton.d.ts +1 -0
  224. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  225. package/dist/components/SkipLink/SkipLink.d.ts +42 -0
  226. package/dist/components/SkipLink/SkipLink.js +43 -0
  227. package/dist/components/SkipLink/SkipLink.js.map +1 -0
  228. package/dist/components/SkipLink/index.d.ts +1 -0
  229. package/dist/components/Slider/Slider.d.ts +11 -0
  230. package/dist/components/Slider/Slider.js +6 -6
  231. package/dist/components/Slider/Slider.js.map +1 -1
  232. package/dist/components/SortableList/SortableList.d.ts +6 -0
  233. package/dist/components/SortableList/SortableList.js +13 -13
  234. package/dist/components/SortableList/SortableList.js.map +1 -1
  235. package/dist/components/SplitPane/SplitPane.d.ts +5 -0
  236. package/dist/components/SplitPane/SplitPane.js +4 -4
  237. package/dist/components/SplitPane/SplitPane.js.map +1 -1
  238. package/dist/components/Stack/Stack.d.ts +19 -6
  239. package/dist/components/Stack/Stack.js +26 -13
  240. package/dist/components/Stack/Stack.js.map +1 -1
  241. package/dist/components/Stack/index.d.ts +1 -0
  242. package/dist/components/Stack/space.d.ts +47 -0
  243. package/dist/components/Stack/space.js +23 -0
  244. package/dist/components/Stack/space.js.map +1 -0
  245. package/dist/components/Stat/Stat.d.ts +88 -0
  246. package/dist/components/Stat/Stat.js +105 -0
  247. package/dist/components/Stat/Stat.js.map +1 -0
  248. package/dist/components/Stat/index.d.ts +1 -0
  249. package/dist/components/Steps/Steps.d.ts +14 -4
  250. package/dist/components/Steps/Steps.js +31 -30
  251. package/dist/components/Steps/Steps.js.map +1 -1
  252. package/dist/components/Switch/Switch.d.ts +4 -4
  253. package/dist/components/Switch/Switch.js +18 -7
  254. package/dist/components/Switch/Switch.js.map +1 -1
  255. package/dist/components/Table/Table.d.ts +12 -0
  256. package/dist/components/Table/Table.js +11 -12
  257. package/dist/components/Table/Table.js.map +1 -1
  258. package/dist/components/Tabs/Tabs.d.ts +18 -1
  259. package/dist/components/Tabs/Tabs.js +74 -73
  260. package/dist/components/Tabs/Tabs.js.map +1 -1
  261. package/dist/components/TagInput/TagInput.d.ts +18 -0
  262. package/dist/components/TagInput/TagInput.js +79 -100
  263. package/dist/components/TagInput/TagInput.js.map +1 -1
  264. package/dist/components/Text/Text.d.ts +72 -0
  265. package/dist/components/Text/Text.js +30 -0
  266. package/dist/components/Text/Text.js.map +1 -0
  267. package/dist/components/Text/index.d.ts +1 -0
  268. package/dist/components/TextArea/TextArea.d.ts +10 -0
  269. package/dist/components/TextArea/TextArea.js +4 -4
  270. package/dist/components/TextArea/TextArea.js.map +1 -1
  271. package/dist/components/TextField/TextField.d.ts +17 -0
  272. package/dist/components/TextField/TextField.js +28 -27
  273. package/dist/components/TextField/TextField.js.map +1 -1
  274. package/dist/components/ThemeToggle/ThemeToggle.d.ts +11 -1
  275. package/dist/components/ThemeToggle/ThemeToggle.js +33 -30
  276. package/dist/components/ThemeToggle/ThemeToggle.js.map +1 -1
  277. package/dist/components/TimeField/TimeField.d.ts +62 -8
  278. package/dist/components/TimeField/TimeField.js +308 -72
  279. package/dist/components/TimeField/TimeField.js.map +1 -1
  280. package/dist/components/Toast/Toast.d.ts +25 -1
  281. package/dist/components/Toast/Toast.js +137 -126
  282. package/dist/components/Toast/Toast.js.map +1 -1
  283. package/dist/components/Toast/index.d.ts +1 -1
  284. package/dist/components/Toolbar/Toolbar.d.ts +3 -0
  285. package/dist/components/Toolbar/Toolbar.js.map +1 -1
  286. package/dist/components/Tooltip/Tooltip.d.ts +7 -1
  287. package/dist/components/Tooltip/Tooltip.js +19 -19
  288. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  289. package/dist/components/Tree/Tree.d.ts +8 -0
  290. package/dist/components/Tree/Tree.js.map +1 -1
  291. package/dist/components/VirtualList/VirtualList.d.ts +8 -0
  292. package/dist/components/VirtualList/VirtualList.js +4 -4
  293. package/dist/components/VirtualList/VirtualList.js.map +1 -1
  294. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +24 -0
  295. package/dist/components/VisuallyHidden/VisuallyHidden.js +17 -0
  296. package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
  297. package/dist/components/VisuallyHidden/index.d.ts +1 -0
  298. package/dist/components/ZoomControls/ZoomControls.d.ts +4 -0
  299. package/dist/components/ZoomControls/ZoomControls.js.map +1 -1
  300. package/dist/foundations/ChoiceBase/ChoiceBase.d.ts +1 -0
  301. package/dist/foundations/ChoiceBase/ChoiceBase.js +8 -8
  302. package/dist/foundations/ChoiceBase/ChoiceBase.js.map +1 -1
  303. package/dist/foundations/HiddenValue/HiddenValue.d.ts +3 -0
  304. package/dist/foundations/HiddenValue/HiddenValue.js +5 -5
  305. package/dist/foundations/HiddenValue/HiddenValue.js.map +1 -1
  306. package/dist/foundations/Icon/Icon.d.ts +9 -1
  307. package/dist/foundations/Icon/Icon.js +15 -14
  308. package/dist/foundations/Icon/Icon.js.map +1 -1
  309. package/dist/foundations/image-outcome.d.ts +20 -0
  310. package/dist/foundations/image-outcome.js +43 -0
  311. package/dist/foundations/image-outcome.js.map +1 -0
  312. package/dist/foundations/option-icon.d.ts +26 -0
  313. package/dist/foundations/option-icon.js +16 -0
  314. package/dist/foundations/option-icon.js.map +1 -0
  315. package/dist/foundations/printing.d.ts +6 -0
  316. package/dist/foundations/printing.js +17 -0
  317. package/dist/foundations/printing.js.map +1 -0
  318. package/dist/foundations/qr.d.ts +42 -0
  319. package/dist/foundations/qr.js +246 -0
  320. package/dist/foundations/qr.js.map +1 -0
  321. package/dist/icons/book-marked.d.ts +2 -0
  322. package/dist/icons/book-marked.js +14 -0
  323. package/dist/icons/book-marked.js.map +1 -0
  324. package/dist/icons/calendar-days.d.ts +2 -0
  325. package/dist/icons/calendar-days.js +24 -0
  326. package/dist/icons/calendar-days.js.map +1 -0
  327. package/dist/icons/check-square.d.ts +2 -0
  328. package/dist/icons/check-square.js +14 -0
  329. package/dist/icons/check-square.js.map +1 -0
  330. package/dist/icons/crescent.d.ts +2 -0
  331. package/dist/icons/crescent.js +14 -0
  332. package/dist/icons/crescent.js.map +1 -0
  333. package/dist/icons/index.d.ts +11 -0
  334. package/dist/icons/index.js +502 -480
  335. package/dist/icons/kaaba.d.ts +2 -0
  336. package/dist/icons/kaaba.js +14 -0
  337. package/dist/icons/kaaba.js.map +1 -0
  338. package/dist/icons/keywords.d.ts +259 -0
  339. package/dist/icons/keywords.js +1816 -0
  340. package/dist/icons/keywords.js.map +1 -0
  341. package/dist/icons/list-tree.d.ts +2 -0
  342. package/dist/icons/list-tree.js +14 -0
  343. package/dist/icons/list-tree.js.map +1 -0
  344. package/dist/icons/mosque.d.ts +2 -0
  345. package/dist/icons/mosque.js +14 -0
  346. package/dist/icons/mosque.js.map +1 -0
  347. package/dist/icons/prayer-beads.d.ts +2 -0
  348. package/dist/icons/prayer-beads.js +67 -0
  349. package/dist/icons/prayer-beads.js.map +1 -0
  350. package/dist/icons/qr-code.d.ts +2 -0
  351. package/dist/icons/qr-code.js +38 -0
  352. package/dist/icons/qr-code.js.map +1 -0
  353. package/dist/icons/refresh-cw.d.ts +2 -0
  354. package/dist/icons/refresh-cw.js +14 -0
  355. package/dist/icons/refresh-cw.js.map +1 -0
  356. package/dist/icons/types.d.ts +1 -1
  357. package/dist/icons/types.js +2 -1
  358. package/dist/icons/types.js.map +1 -1
  359. package/dist/index.d.ts +35 -10
  360. package/dist/index.js +280 -220
  361. package/dist/styles/announcer.css +1 -1
  362. package/dist/styles/app-shell.css +1 -1
  363. package/dist/styles/aspect-ratio.css +1 -0
  364. package/dist/styles/avatar.css +1 -0
  365. package/dist/styles/base.css +1 -1
  366. package/dist/styles/breadcrumbs.css +1 -0
  367. package/dist/styles/button.css +1 -1
  368. package/dist/styles/calendar.css +1 -1
  369. package/dist/styles/card.css +1 -1
  370. package/dist/styles/checkbox.css +1 -1
  371. package/dist/styles/checklist.css +1 -0
  372. package/dist/styles/choice-base.css +1 -0
  373. package/dist/styles/choice.css +1 -1
  374. package/dist/styles/color-field.css +1 -1
  375. package/dist/styles/combobox.css +1 -1
  376. package/dist/styles/container.css +1 -0
  377. package/dist/styles/copy-button.css +1 -1
  378. package/dist/styles/date-field.css +1 -1
  379. package/dist/styles/device-frame.css +1 -0
  380. package/dist/styles/dialog.css +1 -1
  381. package/dist/styles/disclosure.css +1 -1
  382. package/dist/styles/divider.css +1 -0
  383. package/dist/styles/field.css +1 -1
  384. package/dist/styles/file-drop.css +1 -1
  385. package/dist/styles/floating-toolbar.css +1 -1
  386. package/dist/styles/generated-css.d.ts +1 -1
  387. package/dist/styles/generated-css.js +1 -1
  388. package/dist/styles/generated-css.js.map +1 -1
  389. package/dist/styles/grid.css +1 -1
  390. package/dist/styles/heading.css +1 -0
  391. package/dist/styles/icon-tile.css +1 -0
  392. package/dist/styles/icon.css +1 -1
  393. package/dist/styles/image.css +1 -0
  394. package/dist/styles/inline.css +1 -0
  395. package/dist/styles/key-value-editor.css +1 -1
  396. package/dist/styles/link.css +1 -1
  397. package/dist/styles/list.css +1 -0
  398. package/dist/styles/manifest.json +715 -0
  399. package/dist/styles/menu.css +1 -1
  400. package/dist/styles/notice.css +1 -1
  401. package/dist/styles/number-field.css +1 -1
  402. package/dist/styles/option-list.css +1 -0
  403. package/dist/styles/page-header.css +1 -0
  404. package/dist/styles/pagination.css +1 -0
  405. package/dist/styles/qr-code.css +1 -0
  406. package/dist/styles/radio-group.css +1 -1
  407. package/dist/styles/section.css +1 -0
  408. package/dist/styles/segmented-control.css +1 -1
  409. package/dist/styles/select.css +1 -1
  410. package/dist/styles/sheet.css +1 -1
  411. package/dist/styles/side-nav.css +1 -1
  412. package/dist/styles/site-footer.css +1 -0
  413. package/dist/styles/site-header.css +1 -0
  414. package/dist/styles/skip-link.css +1 -0
  415. package/dist/styles/sortable-list.css +1 -1
  416. package/dist/styles/stack.css +1 -1
  417. package/dist/styles/stat.css +1 -0
  418. package/dist/styles/steps.css +1 -1
  419. package/dist/styles/switch.css +1 -0
  420. package/dist/styles/table.css +1 -1
  421. package/dist/styles/tabs.css +1 -1
  422. package/dist/styles/tag-input.css +1 -1
  423. package/dist/styles/text-field.css +1 -1
  424. package/dist/styles/text.css +1 -0
  425. package/dist/styles/time-field.css +1 -1
  426. package/dist/styles/toast.css +1 -1
  427. package/dist/styles/visually-hidden.css +1 -0
  428. package/dist/styles.css +1 -1
  429. package/dist/theme/CynosureTheme.d.ts +4 -0
  430. package/dist/theme/CynosureTheme.js.map +1 -1
  431. package/dist/tokens/create-theme.js +137 -108
  432. package/dist/tokens/create-theme.js.map +1 -1
  433. package/dist/tokens/to-css.js +12 -12
  434. package/dist/tokens/to-css.js.map +1 -1
  435. package/package.json +8 -3
  436. package/dist/components/Checkbox/ChoiceRow.d.ts +0 -23
  437. package/dist/components/Checkbox/ChoiceRow.js +0 -57
  438. package/dist/components/Checkbox/ChoiceRow.js.map +0 -1
  439. package/dist/styles/hidden-value.css +0 -1
  440. package/dist/styles/iconbutton.css +0 -1
  441. package/dist/styles/search-field.css +0 -1
@@ -0,0 +1,57 @@
1
+ import { type AriaRole, type CSSProperties, type ReactNode } from "react";
2
+ import { type ContainerProps } from "../Container/Container.js";
3
+ import { type Space } from "../Stack/space.js";
4
+ export interface SectionTokens {
5
+ /** Space above and below the content when the `paddingBlock` prop is not set. */
6
+ paddingBlock: string;
7
+ /** Background of `variant="surface"`. */
8
+ surface: string;
9
+ /** Background of `variant="soft"`. */
10
+ soft: string;
11
+ /** Background of `variant="accent"`. */
12
+ accent: string;
13
+ }
14
+ declare module "../../tokens/schema.js" {
15
+ interface ComponentTokens {
16
+ section: SectionTokens;
17
+ }
18
+ }
19
+ export interface SectionProps {
20
+ /**
21
+ * The band's background: `plain` (none, the page shows through), `surface`, `soft` (a quiet tint) or `accent` (a
22
+ * soft tint of the accent colour). Text colours stay readable on each. Default "plain".
23
+ */
24
+ variant?: "plain" | "surface" | "soft" | "accent";
25
+ /** Space token for the padding above and below the content. Default: the `--cy-section-padding-block` token. */
26
+ paddingBlock?: Space | undefined;
27
+ /** Put the content in a centred Container (the page column). `false` lets it fill the band. Default true. */
28
+ contained?: boolean;
29
+ /** Widest the inner Container gets (its `size`). Ignored when `contained` is false. Default "lg". */
30
+ size?: ContainerProps["size"];
31
+ /**
32
+ * The element rendered. A `section` is a region landmark only when it has a name (`aria-labelledby` or
33
+ * `aria-label`). Default "section".
34
+ */
35
+ as?: "section" | "div" | "header" | "footer" | "aside" | "article";
36
+ /** Set on the root element: the target of in-page links such as `#pricing`. */
37
+ id?: string | undefined;
38
+ /** Names the section, usually the id of its heading. */
39
+ "aria-labelledby"?: string | undefined;
40
+ /** Names the section when it has no visible heading. */
41
+ "aria-label"?: string | undefined;
42
+ /** An ARIA role for the root, when the element's own role is not the right one. */
43
+ role?: AriaRole | undefined;
44
+ /** Added to the root element, for layout. */
45
+ className?: string | undefined;
46
+ /** Layout only. Restyle through --cy-section-* tokens. */
47
+ style?: CSSProperties;
48
+ /** The section's content. */
49
+ children?: ReactNode;
50
+ /** Set on the root element, for tests. */
51
+ "data-testid"?: string;
52
+ }
53
+ /**
54
+ * A full-width band of a page: a background, space above and below, and the content in the page column. Stack
55
+ * Sections to build a landing or documentation page.
56
+ */
57
+ export declare const Section: import("react").ForwardRefExoticComponent<SectionProps & import("react").RefAttributes<HTMLElement>>;
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { space as u } from "../Stack/space.js";
3
+ import { Container as v } from "../Container/Container.js";
4
+ import { forwardRef as x } from "react";
5
+ import { jsx as e } from "react/jsx-runtime";
6
+ var g = x(function({ variant: n = "plain", paddingBlock: t, contained: i = !0, size: a = "lg", as: c = "section", className: o, style: s, children: r, ...m }, f) {
7
+ const p = c, l = t ? { "--_pad-block": u(t) } : {};
8
+ return /* @__PURE__ */ e(p, {
9
+ ref: f,
10
+ ...m,
11
+ className: `cy-section${o ? ` ${o}` : ""}`,
12
+ "data-variant": n,
13
+ style: {
14
+ ...l,
15
+ ...s
16
+ },
17
+ children: i ? /* @__PURE__ */ e(v, {
18
+ size: a,
19
+ children: r
20
+ }) : r
21
+ });
22
+ });
23
+ export {
24
+ g as Section
25
+ };
26
+
27
+ //# sourceMappingURL=Section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.js","names":["space","Container","forwardRef","jsx","Section","variant","paddingBlock","contained","size","as","className","style","children","rest","ref","Tag","vars"],"sources":["../../../src/components/Section/Section.tsx"],"sourcesContent":["import { type AriaRole, type CSSProperties, forwardRef, type ReactNode } from \"react\";\nimport { Container, type ContainerProps } from \"../Container/Container.js\";\nimport { type Space, space } from \"../Stack/space.js\";\n\nexport interface SectionTokens {\n /** Space above and below the content when the `paddingBlock` prop is not set. */\n paddingBlock: string;\n /** Background of `variant=\"surface\"`. */\n surface: string;\n /** Background of `variant=\"soft\"`. */\n soft: string;\n /** Background of `variant=\"accent\"`. */\n accent: string;\n}\n\ndeclare module \"../../tokens/schema.js\" {\n interface ComponentTokens {\n section: SectionTokens;\n }\n}\n\nexport interface SectionProps {\n /**\n * The band's background: `plain` (none, the page shows through), `surface`, `soft` (a quiet tint) or `accent` (a\n * soft tint of the accent colour). Text colours stay readable on each. Default \"plain\".\n */\n variant?: \"plain\" | \"surface\" | \"soft\" | \"accent\";\n /** Space token for the padding above and below the content. Default: the `--cy-section-padding-block` token. */\n paddingBlock?: Space | undefined;\n /** Put the content in a centred Container (the page column). `false` lets it fill the band. Default true. */\n contained?: boolean;\n /** Widest the inner Container gets (its `size`). Ignored when `contained` is false. Default \"lg\". */\n size?: ContainerProps[\"size\"];\n /**\n * The element rendered. A `section` is a region landmark only when it has a name (`aria-labelledby` or\n * `aria-label`). Default \"section\".\n */\n as?: \"section\" | \"div\" | \"header\" | \"footer\" | \"aside\" | \"article\";\n /** Set on the root element: the target of in-page links such as `#pricing`. */\n id?: string | undefined;\n /** Names the section, usually the id of its heading. */\n \"aria-labelledby\"?: string | undefined;\n /** Names the section when it has no visible heading. */\n \"aria-label\"?: string | undefined;\n /** An ARIA role for the root, when the element's own role is not the right one. */\n role?: AriaRole | undefined;\n /** Added to the root element, for layout. */\n className?: string | undefined;\n /** Layout only. Restyle through --cy-section-* tokens. */\n style?: CSSProperties;\n /** The section's content. */\n children?: ReactNode;\n /** Set on the root element, for tests. */\n \"data-testid\"?: string;\n}\n\n/**\n * A full-width band of a page: a background, space above and below, and the content in the page column. Stack\n * Sections to build a landing or documentation page.\n */\nexport const Section = forwardRef<HTMLElement, SectionProps>(function Section(\n {\n variant = \"plain\",\n paddingBlock,\n contained = true,\n size = \"lg\",\n as = \"section\",\n className,\n style,\n children,\n ...rest\n },\n ref,\n) {\n const Tag = as;\n const vars = paddingBlock ? { \"--_pad-block\": space(paddingBlock) } : {};\n return (\n <Tag\n // One component, several elements: the ref is the element's own, typed as the common HTMLElement.\n ref={ref as never}\n {...rest}\n className={`cy-section${className ? ` ${className}` : \"\"}`}\n data-variant={variant}\n style={{ ...vars, ...style } as CSSProperties}\n >\n {contained ? <Container size={size}>{children}</Container> : children}\n </Tag>\n );\n});\n"],"mappings":";;;;;AA4DA,IAAaI,IAAUF,EAAsC,SAC3D,EACE,SAAAG,IAAU,SACV,cAAAC,GACA,WAAAC,IAAY,IACZ,MAAAC,IAAO,MACP,IAAAC,IAAK,WACL,WAAAC,GACA,OAAAC,GACA,UAAAC,GACA,GAAGC,EAAA,GAELC,GACA;AACA,QAAMC,IAAMN,GACNO,IAAOV,IAAe,EAAE,gBAAgBN,EAAMM,CAAY,EAAE,IAAI,CAAC;AACvE,SACE,gBAAAH,EAACY,GAAD;AAAA,IAEO,KAAAD;AAAA,IACL,GAAID;AAAA,IACJ,WAAW,aAAaH,IAAY,IAAIA,CAAA,KAAc,EAAA;AAAA,IACtD,gBAAcL;AAAA,IACd,OAAO;AAAA,MAAE,GAAGW;AAAA,MAAM,GAAGL;AAAA,IAAM;AAAA,IAE1B,UAAAJ,IAAY,gBAAAJ,EAACF,GAAD;AAAA,MAAiB,MAAAO;AAAA,MAAO,UAAAI;AAAA,IAAoB,CAAA,IAAIA;AAAA,EAC1D,CAAA;AAET,CAAC"}
@@ -0,0 +1 @@
1
+ export { Section, type SectionProps, type SectionTokens } from "./Section.js";
@@ -22,18 +22,27 @@ export interface SegmentOption {
22
22
  export interface SegmentedControlProps {
23
23
  /** Accessible name of the group. */
24
24
  label: string;
25
+ /** The segments: `{ value, label, icon?, disabled? }`. */
25
26
  options: SegmentOption[];
27
+ /** Submits the value with its form under this name. Two controls may share a name and stay independent. */
26
28
  name?: string;
29
+ /** Controlled selected value. */
27
30
  value?: string;
31
+ /** Selected value at first, when uncontrolled. */
28
32
  defaultValue?: string;
33
+ /** Called with the segment's value when it is chosen. */
29
34
  onChange?: (value: string) => void;
30
35
  /** Show icons only; labels stay as accessible names. */
31
36
  iconOnly?: boolean;
37
+ /** Stretch to the full width of the container. */
32
38
  fullWidth?: boolean;
39
+ /** Disables every segment; the value is not submitted. */
33
40
  disabled?: boolean;
41
+ /** Height and text size of the segments. Default "md". */
34
42
  size?: Size;
35
43
  /** Colour of the active segment's content. */
36
44
  tone?: Tone;
45
+ /** Added to the root element, for layout. */
37
46
  className?: string | undefined;
38
47
  /** Layout only. */
39
48
  style?: CSSProperties | undefined;
@@ -4,26 +4,26 @@ import { Icon as N } from "../../foundations/Icon/Icon.js";
4
4
  import { ChoiceBase as j } from "../../foundations/ChoiceBase/ChoiceBase.js";
5
5
  import { HiddenValue as k } from "../../foundations/HiddenValue/HiddenValue.js";
6
6
  import { useId as I } from "react";
7
- import { jsx as a, jsxs as t } from "react/jsx-runtime";
8
- function R({ label: i, options: n, name: u, value: o, defaultValue: s, onChange: v, iconOnly: c = !1, fullWidth: b = !1, disabled: l, size: f = "md", tone: g = "neutral", className: m, style: h }) {
9
- const r = `cy-seg-${I()}`, [d, $, y] = x(o, s, v);
10
- return /* @__PURE__ */ t("div", {
7
+ import { jsx as a, jsxs as m } from "react/jsx-runtime";
8
+ function R({ label: o, options: n, name: i, value: u, defaultValue: s, onChange: v, iconOnly: t = !1, fullWidth: b = !1, disabled: l, size: f = "md", tone: g = "neutral", className: c, style: h }) {
9
+ const r = `cy-seg-${I()}`, [d, $, y] = x(u, s, v);
10
+ return /* @__PURE__ */ m("div", {
11
11
  role: "radiogroup",
12
- "aria-label": i,
13
- className: `cy-segmented${m ? ` ${m}` : ""}`,
12
+ "aria-label": o,
13
+ className: `cy-segmented-control${c ? ` ${c}` : ""}`,
14
14
  "data-size": f,
15
15
  "data-tone": g,
16
16
  "data-full": b ? "" : void 0,
17
- "data-icon-only": c ? "" : void 0,
17
+ "data-icon-only": t ? "" : void 0,
18
18
  style: h,
19
19
  children: [/* @__PURE__ */ a(k, {
20
- name: u,
20
+ name: i,
21
21
  value: d ?? "",
22
22
  disabled: l || d === void 0,
23
23
  onReset: () => y(s)
24
- }), n.map((e) => /* @__PURE__ */ t("label", {
24
+ }), n.map((e) => /* @__PURE__ */ m("label", {
25
25
  htmlFor: `${r}-${e.value}`,
26
- className: "cy-segment",
26
+ className: "cy-segmented-control-segment",
27
27
  "data-disabled": l || e.disabled ? "" : void 0,
28
28
  children: [
29
29
  /* @__PURE__ */ a(j, {
@@ -38,8 +38,8 @@ function R({ label: i, options: n, name: u, value: o, defaultValue: s, onChange:
38
38
  onChange: (C) => C.currentTarget.checked && $(e.value)
39
39
  }),
40
40
  e.icon && /* @__PURE__ */ a(N, { icon: e.icon }),
41
- !c && /* @__PURE__ */ a("span", {
42
- className: "cy-segment-label",
41
+ !t && /* @__PURE__ */ a("span", {
42
+ className: "cy-segmented-control-label",
43
43
  children: e.label
44
44
  })
45
45
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.js","names":["useControllableState","Icon","ChoiceBase","HiddenValue","useId","jsx","jsxs","SegmentedControl","label","options","name","value","defaultValue","onChange","iconOnly","fullWidth","disabled","size","tone","className","style","groupName","current","setCurrent","reset","option","e"],"sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import { type CSSProperties, useId } from \"react\";\nimport { ChoiceBase } from \"../../foundations/ChoiceBase/ChoiceBase.js\";\nimport { useControllableState } from \"../../foundations/controllable.js\";\nimport { HiddenValue } from \"../../foundations/HiddenValue/HiddenValue.js\";\nimport { Icon } from \"../../foundations/Icon/Icon.js\";\nimport type { IconData } from \"../../icons/types.js\";\nimport type { Size, Tone } from \"../../tokens/schema.js\";\n\nexport interface SegmentedControlTokens {\n radius: string;\n trackBg: string;\n activeBg: string;\n padding: string;\n}\n\ndeclare module \"../../tokens/schema.js\" {\n interface ComponentTokens {\n segmentedControl: SegmentedControlTokens;\n }\n}\n\nexport interface SegmentOption {\n value: string;\n /** Visible text, and always the accessible name (also for icon-only segments). */\n label: string;\n icon?: IconData;\n disabled?: boolean;\n}\n\nexport interface SegmentedControlProps {\n /** Accessible name of the group. */\n label: string;\n options: SegmentOption[];\n name?: string;\n value?: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n /** Show icons only; labels stay as accessible names. */\n iconOnly?: boolean;\n fullWidth?: boolean;\n disabled?: boolean;\n size?: Size;\n /** Colour of the active segment's content. */\n tone?: Tone;\n className?: string | undefined;\n /** Layout only. */\n style?: CSSProperties | undefined;\n}\n\n/** A compact single choice (view switchers, modes) on native radios. */\nexport function SegmentedControl({\n label,\n options,\n name,\n value,\n defaultValue,\n onChange,\n iconOnly = false,\n fullWidth = false,\n disabled,\n size = \"md\",\n tone = \"neutral\",\n className,\n style,\n}: SegmentedControlProps) {\n // The radios are grouped under a name of the control's own, never the caller's: two controls given the same\n // `name` (rows of a list, two panels) would otherwise be one native radio group with clashing ids, and choosing in\n // one would clear the other. The caller's `name` submits the value through a hidden field instead.\n const groupName = `cy-seg-${useId()}`;\n const [current, setCurrent, reset] = useControllableState<string, string | undefined>(\n value,\n defaultValue,\n onChange,\n );\n return (\n <div\n role=\"radiogroup\"\n aria-label={label}\n className={`cy-segmented${className ? ` ${className}` : \"\"}`}\n data-size={size}\n data-tone={tone}\n data-full={fullWidth ? \"\" : undefined}\n data-icon-only={iconOnly ? \"\" : undefined}\n style={style}\n >\n {/* Always present, so a form's reset restores the default; it submits only when there is a name and a value. */}\n <HiddenValue\n name={name}\n value={current ?? \"\"}\n disabled={disabled || current === undefined}\n onReset={() => reset(defaultValue)}\n />\n {options.map((option) => (\n <label\n key={option.value}\n htmlFor={`${groupName}-${option.value}`}\n className=\"cy-segment\"\n data-disabled={disabled || option.disabled ? \"\" : undefined}\n >\n <ChoiceBase\n id={`${groupName}-${option.value}`}\n type=\"radio\"\n name={groupName}\n // Belongs to no form: the hidden field above submits the value under the caller's name.\n form=\"\"\n value={option.value}\n disabled={disabled || option.disabled}\n aria-label={option.label}\n checked={current === option.value}\n onChange={(e) => e.currentTarget.checked && setCurrent(option.value)}\n />\n {option.icon && <Icon icon={option.icon} />}\n {!iconOnly && <span className=\"cy-segment-label\">{option.label}</span>}\n </label>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAkDA,SAAgBO,EAAiB,EAC/B,OAAAC,GACA,SAAAC,GACA,MAAAC,GACA,OAAAC,GACA,cAAAC,GACA,UAAAC,GACA,UAAAC,IAAW,IACX,WAAAC,IAAY,IACZ,UAAAC,GACA,MAAAC,IAAO,MACP,MAAAC,IAAO,WACP,WAAAC,GACA,OAAAC,EAAA,GACwB;AAIxB,QAAMC,IAAY,UAAUjB,EAAM,CAAA,IAC5B,CAACkB,GAASC,GAAYC,CAAA,IAASxB,EACnCW,GACAC,GACAC,CACF;AACA,SACE,gBAAAP,EAAC,OAAD;AAAA,IACE,MAAK;AAAA,IACL,cAAYE;AAAA,IACZ,WAAW,eAAeW,IAAY,IAAIA,CAAA,KAAc,EAAA;AAAA,IACxD,aAAWF;AAAA,IACX,aAAWC;AAAA,IACX,aAAWH,IAAY,KAAK;AAAA,IAC5B,kBAAgBD,IAAW,KAAK;AAAA,IACzB,OAAAM;AAAA,IART,UAAA,CAWE,gBAAAf,EAACF,GAAD;AAAA,MACQ,MAAAO;AAAA,MACN,OAAOY,KAAW;AAAA,MAClB,UAAUN,KAAYM,MAAY;AAAA,MAClC,SAAA,MAAeE,EAAMZ,CAAY;AAAA,IAClC,CAAA,GACAH,EAAQ,IAAA,CAAKgB,MACZ,gBAAAnB,EAAC,SAAD;AAAA,MAEE,SAAS,GAAGe,CAAA,IAAaI,EAAO,KAAA;AAAA,MAChC,WAAU;AAAA,MACV,iBAAeT,KAAYS,EAAO,WAAW,KAAK;AAAA,MAJpD,UAAA;AAAA,QAME,gBAAApB,EAACH,GAAD;AAAA,UACE,IAAI,GAAGmB,CAAA,IAAaI,EAAO,KAAA;AAAA,UAC3B,MAAK;AAAA,UACL,MAAMJ;AAAA,UAEN,MAAK;AAAA,UACL,OAAOI,EAAO;AAAA,UACd,UAAUT,KAAYS,EAAO;AAAA,UAC7B,cAAYA,EAAO;AAAA,UACnB,SAASH,MAAYG,EAAO;AAAA,UAC5B,UAAA,CAAWC,MAAMA,EAAE,cAAc,WAAWH,EAAWE,EAAO,KAAK;AAAA,QACpE,CAAA;AAAA,QACAA,EAAO,QAAQ,gBAAApB,EAACJ,GAAD,EAAM,MAAMwB,EAAO,KAAO,CAAA;AAAA,QACzC,CAACX,KAAY,gBAAAT,EAAC,QAAD;AAAA,UAAM,WAAU;AAAA,UAAoB,UAAAoB,EAAO;AAAA,QAAY,CAAA;AAAA,MAChE;AAAA,IAnBA,GAAAA,EAAO,KAmBP,CACR,CACE;AAAA,E;AAET"}
1
+ {"version":3,"file":"SegmentedControl.js","names":["useControllableState","Icon","ChoiceBase","HiddenValue","useId","jsx","jsxs","SegmentedControl","label","options","name","value","defaultValue","onChange","iconOnly","fullWidth","disabled","size","tone","className","style","groupName","current","setCurrent","reset","option","e"],"sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import { type CSSProperties, useId } from \"react\";\nimport { ChoiceBase } from \"../../foundations/ChoiceBase/ChoiceBase.js\";\nimport { useControllableState } from \"../../foundations/controllable.js\";\nimport { HiddenValue } from \"../../foundations/HiddenValue/HiddenValue.js\";\nimport { Icon } from \"../../foundations/Icon/Icon.js\";\nimport type { IconData } from \"../../icons/types.js\";\nimport type { Size, Tone } from \"../../tokens/schema.js\";\n\nexport interface SegmentedControlTokens {\n radius: string;\n trackBg: string;\n activeBg: string;\n padding: string;\n}\n\ndeclare module \"../../tokens/schema.js\" {\n interface ComponentTokens {\n segmentedControl: SegmentedControlTokens;\n }\n}\n\nexport interface SegmentOption {\n value: string;\n /** Visible text, and always the accessible name (also for icon-only segments). */\n label: string;\n icon?: IconData;\n disabled?: boolean;\n}\n\nexport interface SegmentedControlProps {\n /** Accessible name of the group. */\n label: string;\n /** The segments: `{ value, label, icon?, disabled? }`. */\n options: SegmentOption[];\n /** Submits the value with its form under this name. Two controls may share a name and stay independent. */\n name?: string;\n /** Controlled selected value. */\n value?: string;\n /** Selected value at first, when uncontrolled. */\n defaultValue?: string;\n /** Called with the segment's value when it is chosen. */\n onChange?: (value: string) => void;\n /** Show icons only; labels stay as accessible names. */\n iconOnly?: boolean;\n /** Stretch to the full width of the container. */\n fullWidth?: boolean;\n /** Disables every segment; the value is not submitted. */\n disabled?: boolean;\n /** Height and text size of the segments. Default \"md\". */\n size?: Size;\n /** Colour of the active segment's content. */\n tone?: Tone;\n /** Added to the root element, for layout. */\n className?: string | undefined;\n /** Layout only. */\n style?: CSSProperties | undefined;\n}\n\n/** A compact single choice (view switchers, modes) on native radios. */\nexport function SegmentedControl({\n label,\n options,\n name,\n value,\n defaultValue,\n onChange,\n iconOnly = false,\n fullWidth = false,\n disabled,\n size = \"md\",\n tone = \"neutral\",\n className,\n style,\n}: SegmentedControlProps) {\n // The radios are grouped under a name of the control's own, never the caller's: two controls given the same\n // `name` (rows of a list, two panels) would otherwise be one native radio group with clashing ids, and choosing in\n // one would clear the other. The caller's `name` submits the value through a hidden field instead.\n const groupName = `cy-seg-${useId()}`;\n const [current, setCurrent, reset] = useControllableState<string, string | undefined>(\n value,\n defaultValue,\n onChange,\n );\n return (\n <div\n role=\"radiogroup\"\n aria-label={label}\n className={`cy-segmented-control${className ? ` ${className}` : \"\"}`}\n data-size={size}\n data-tone={tone}\n data-full={fullWidth ? \"\" : undefined}\n data-icon-only={iconOnly ? \"\" : undefined}\n style={style}\n >\n {/* Always present, so a form's reset restores the default; it submits only when there is a name and a value. */}\n <HiddenValue\n name={name}\n value={current ?? \"\"}\n disabled={disabled || current === undefined}\n onReset={() => reset(defaultValue)}\n />\n {options.map((option) => (\n <label\n key={option.value}\n htmlFor={`${groupName}-${option.value}`}\n className=\"cy-segmented-control-segment\"\n data-disabled={disabled || option.disabled ? \"\" : undefined}\n >\n <ChoiceBase\n id={`${groupName}-${option.value}`}\n type=\"radio\"\n name={groupName}\n // Belongs to no form: the hidden field above submits the value under the caller's name.\n form=\"\"\n value={option.value}\n disabled={disabled || option.disabled}\n aria-label={option.label}\n checked={current === option.value}\n onChange={(e) => e.currentTarget.checked && setCurrent(option.value)}\n />\n {option.icon && <Icon icon={option.icon} />}\n {!iconOnly && <span className=\"cy-segmented-control-label\">{option.label}</span>}\n </label>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA2DA,SAAgBO,EAAiB,EAC/B,OAAAC,GACA,SAAAC,GACA,MAAAC,GACA,OAAAC,GACA,cAAAC,GACA,UAAAC,GACA,UAAAC,IAAW,IACX,WAAAC,IAAY,IACZ,UAAAC,GACA,MAAAC,IAAO,MACP,MAAAC,IAAO,WACP,WAAAC,GACA,OAAAC,EAAA,GACwB;AAIxB,QAAMC,IAAY,UAAUjB,EAAM,CAAA,IAC5B,CAACkB,GAASC,GAAYC,CAAA,IAASxB,EACnCW,GACAC,GACAC,CACF;AACA,SACE,gBAAAP,EAAC,OAAD;AAAA,IACE,MAAK;AAAA,IACL,cAAYE;AAAA,IACZ,WAAW,uBAAuBW,IAAY,IAAIA,CAAA,KAAc,EAAA;AAAA,IAChE,aAAWF;AAAA,IACX,aAAWC;AAAA,IACX,aAAWH,IAAY,KAAK;AAAA,IAC5B,kBAAgBD,IAAW,KAAK;AAAA,IACzB,OAAAM;AAAA,IART,UAAA,CAWE,gBAAAf,EAACF,GAAD;AAAA,MACQ,MAAAO;AAAA,MACN,OAAOY,KAAW;AAAA,MAClB,UAAUN,KAAYM,MAAY;AAAA,MAClC,SAAA,MAAeE,EAAMZ,CAAY;AAAA,IAClC,CAAA,GACAH,EAAQ,IAAA,CAAKgB,MACZ,gBAAAnB,EAAC,SAAD;AAAA,MAEE,SAAS,GAAGe,CAAA,IAAaI,EAAO,KAAA;AAAA,MAChC,WAAU;AAAA,MACV,iBAAeT,KAAYS,EAAO,WAAW,KAAK;AAAA,MAJpD,UAAA;AAAA,QAME,gBAAApB,EAACH,GAAD;AAAA,UACE,IAAI,GAAGmB,CAAA,IAAaI,EAAO,KAAA;AAAA,UAC3B,MAAK;AAAA,UACL,MAAMJ;AAAA,UAEN,MAAK;AAAA,UACL,OAAOI,EAAO;AAAA,UACd,UAAUT,KAAYS,EAAO;AAAA,UAC7B,cAAYA,EAAO;AAAA,UACnB,SAASH,MAAYG,EAAO;AAAA,UAC5B,UAAA,CAAWC,MAAMA,EAAE,cAAc,WAAWH,EAAWE,EAAO,KAAK;AAAA,QACpE,CAAA;AAAA,QACAA,EAAO,QAAQ,gBAAApB,EAACJ,GAAD,EAAM,MAAMwB,EAAO,KAAO,CAAA;AAAA,QACzC,CAACX,KAAY,gBAAAT,EAAC,QAAD;AAAA,UAAM,WAAU;AAAA,UAA8B,UAAAoB,EAAO;AAAA,QAAY,CAAA;AAAA,MAC1E;AAAA,IAnBA,GAAAA,EAAO,KAmBP,CACR,CACE;AAAA,E;AAET"}
@@ -1,4 +1,5 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
+ import { type OptionIconColor } from "../../foundations/option-icon.js";
2
3
  import type { IconData } from "../../icons/types.js";
3
4
  import type { Size } from "../../tokens/schema.js";
4
5
  export interface SelectTokens {
@@ -15,36 +16,52 @@ declare module "../../tokens/schema.js" {
15
16
  select: SelectTokens;
16
17
  }
17
18
  }
18
- export interface SelectOption {
19
+ export interface SelectOption extends OptionIconColor {
19
20
  value: string;
20
21
  label: string;
21
22
  description?: string;
23
+ /** Icon before the label, in the list and in the trigger when chosen. Colour it with `iconTone` or `iconColor`. */
22
24
  icon?: IconData;
23
25
  disabled?: boolean;
24
26
  /** Options next to each other with the same `group` are listed under that heading. */
25
27
  group?: string;
26
28
  }
27
29
  export interface SelectProps {
30
+ /** Names the control, shown above it. */
28
31
  label: ReactNode;
29
32
  /** Visually hide the label (it still names the control). Prefer visible labels. */
30
33
  labelHidden?: boolean | undefined;
34
+ /** Help text shown below the control. */
31
35
  description?: ReactNode;
36
+ /** Your own error; it replaces the built-in required message. */
32
37
  error?: ReactNode;
38
+ /** The choices: `{ value, label, description?, icon?, iconTone?, iconColor?, disabled?, group? }`. */
33
39
  options: SelectOption[];
40
+ /** Controlled selected value. */
34
41
  value?: string;
42
+ /** Selected value at first, when uncontrolled. */
35
43
  defaultValue?: string;
44
+ /** Called with the chosen option's value when it changes. */
36
45
  onChange?: (value: string) => void;
46
+ /** Shown while nothing is chosen. Default "Select…". */
37
47
  placeholder?: string;
48
+ /** Submits the value with its form under this name. */
38
49
  name?: string;
50
+ /** The form will not submit until a value is chosen; also draws the required marker. */
39
51
  required?: boolean;
52
+ /** Cannot be opened or changed, and is not submitted. */
40
53
  disabled?: boolean;
54
+ /** Height and text size of the control. Default "md". */
41
55
  size?: Size;
56
+ /** `outline`, or `soft` (tinted, no border). Default "outline". */
42
57
  variant?: "outline" | "soft";
58
+ /** Replace the built-in English text: the placeholder, the empty list and the required message. */
43
59
  labels?: {
44
60
  placeholder?: string;
45
61
  empty?: string;
46
62
  required?: string;
47
63
  };
64
+ /** Added to the root element, for layout. */
48
65
  className?: string;
49
66
  /** Layout only. */
50
67
  style?: CSSProperties;
@@ -1,61 +1,63 @@
1
1
  "use client";
2
- import { useControllableState as ee } from "../../foundations/controllable.js";
3
- import { ButtonBase as te } from "../../foundations/ButtonBase/ButtonBase.js";
4
- import { Icon as A } from "../../foundations/Icon/Icon.js";
5
- import { chevronDown as ae } from "../../icons/chevron-down.js";
6
- import { HiddenValue as re } from "../../foundations/HiddenValue/HiddenValue.js";
7
- import { isComposing as se } from "../../foundations/keys.js";
8
- import { Field as le } from "../Field/Field.js";
9
- import { useListboxLayer as oe } from "../../overlay/listbox-layer.js";
10
- import { isTypeaheadKey as L, seekEnabled as ce, useTypeahead as ne } from "../../foundations/listbox.js";
11
- import { Fragment as ie, useCallback as de, useEffect as ue, useId as pe, useRef as j, useState as P } from "react";
12
- import { jsx as s, jsxs as v } from "react/jsx-runtime";
2
+ import { useControllableState as _ } from "../../foundations/controllable.js";
3
+ import { ButtonBase as ee } from "../../foundations/ButtonBase/ButtonBase.js";
4
+ import { Icon as te } from "../../foundations/Icon/Icon.js";
5
+ import { chevronDown as re } from "../../icons/chevron-down.js";
6
+ import { isTypeaheadKey as q, seekEnabled as ae, useTypeahead as se } from "../../foundations/listbox.js";
7
+ import { OptionIcon as B } from "../../foundations/option-icon.js";
8
+ import { isComposing as le } from "../../foundations/keys.js";
9
+ import { Field as oe } from "../Field/Field.js";
10
+ import { HiddenValue as ce } from "../../foundations/HiddenValue/HiddenValue.js";
11
+ import { useListboxLayer as ne } from "../../overlay/listbox-layer.js";
12
+ import { OptionList as ie, OptionListGroup as de, OptionListItem as ue, OptionListNote as fe } from "../OptionList/OptionList.js";
13
+ import { Fragment as pe, useCallback as me, useEffect as ve, useId as he, useRef as j, useState as L } from "react";
14
+ import { jsx as s, jsxs as O } from "react/jsx-runtime";
13
15
  var F = 10;
14
- function fe(N) {
16
+ function ge(D) {
15
17
  const d = [];
16
- return N.forEach((u, h) => {
17
- const a = d[d.length - 1];
18
- a && a.group === u.group ? a.items.push({
18
+ return D.forEach((u, m) => {
19
+ const r = d[d.length - 1];
20
+ r && r.group === u.group ? r.items.push({
19
21
  option: u,
20
- index: h
22
+ index: m
21
23
  }) : d.push({
22
24
  group: u.group,
23
- start: h,
25
+ start: m,
24
26
  items: [{
25
27
  option: u,
26
- index: h
28
+ index: m
27
29
  }]
28
30
  });
29
31
  }), d;
30
32
  }
31
- function xe({ label: N, labelHidden: d, description: u, error: h, options: a, value: H, defaultValue: k = "", onChange: O, placeholder: R, name: G, required: $, disabled: M, size: S = "md", variant: V = "outline", labels: b, className: W, style: z }) {
32
- const p = `cy-select-${pe().replace(/:/g, "")}`, y = j(null), I = j(null), [n, T, J] = ee(H, k, O), [c, U] = P(!1), [r, w] = P(-1), Q = ne(), [X, x] = P(!1), g = (t) => t >= 0 && t < a.length && !a[t]?.disabled, f = (t, e) => ce(a.length, t, e, g), q = () => f(-1, 1), B = () => f(a.length, -1), C = de((t) => {
33
- const e = a[t];
34
- !e || e.disabled || (x(!1), e.value !== n && T(e.value));
33
+ function Pe({ label: D, labelHidden: d, description: u, error: m, options: r, value: G, defaultValue: k = "", onChange: H, placeholder: K, name: R, required: I, disabled: $, size: P = "md", variant: V = "outline", labels: g, className: W, style: z }) {
34
+ const v = `cy-select-${he().replace(/:/g, "")}`, b = j(null), C = j(null), [n, M, J] = _(G, k, H), [c, S] = L(!1), [a, y] = L(-1), Q = se(), [X, E] = L(!1), h = (t) => t >= 0 && t < r.length && !r[t]?.disabled, f = (t, e) => ae(r.length, t, e, h), T = () => f(-1, 1), x = () => f(r.length, -1), N = me((t) => {
35
+ const e = r[t];
36
+ !e || e.disabled || (E(!1), e.value !== n && M(e.value));
35
37
  }, [
36
- a,
38
+ r,
37
39
  n,
38
- T
39
- ]), m = (t = !0) => {
40
- U(!1), t && y.current?.focus();
41
- }, E = (t) => {
42
- const e = a.findIndex((o) => o.value === n);
43
- w(t ?? (g(e) ? e : q())), U(!0);
40
+ M
41
+ ]), p = (t = !0) => {
42
+ S(!1), t && b.current?.focus();
43
+ }, A = (t) => {
44
+ const e = r.findIndex((l) => l.value === n);
45
+ y(t ?? (h(e) ? e : T())), S(!0);
44
46
  };
45
- oe({
46
- anchor: y,
47
- list: I,
47
+ ne({
48
+ anchor: b,
49
+ list: C,
48
50
  open: c,
49
- onClose: () => m(!1),
51
+ onClose: () => p(!1),
50
52
  capWidth: !0
51
- }), ue(() => {
52
- !c || r < 0 || I.current?.querySelector(`[data-index="${r}"]`)?.scrollIntoView({ block: "nearest" });
53
- }, [c, r]);
54
- const K = (t) => {
55
- const e = Q(t, a.map((o, l) => g(l) ? o.label : null), r);
56
- e >= 0 && (c ? w(e) : E(e));
53
+ }), ve(() => {
54
+ !c || a < 0 || C.current?.querySelector(`[data-index="${a}"]`)?.scrollIntoView({ block: "nearest" });
55
+ }, [c, a]);
56
+ const U = (t) => {
57
+ const e = Q(t, r.map((l, o) => h(o) ? l.label : null), a);
58
+ e >= 0 && (c ? y(e) : A(e));
57
59
  }, Y = (t) => {
58
- if (se(t)) return;
60
+ if (le(t)) return;
59
61
  const { key: e } = t;
60
62
  if (!c) {
61
63
  [
@@ -63,127 +65,107 @@ function xe({ label: N, labelHidden: d, description: u, error: h, options: a, va
63
65
  "ArrowUp",
64
66
  "Enter",
65
67
  " "
66
- ].includes(e) ? (t.preventDefault(), E(e === "ArrowUp" ? B() : void 0)) : L(t) && K(e);
68
+ ].includes(e) ? (t.preventDefault(), A(e === "ArrowUp" ? x() : void 0)) : q(t) && U(e);
67
69
  return;
68
70
  }
69
- const o = {
70
- ArrowDown: () => f(r, 1),
71
- ArrowUp: () => f(r, -1),
72
- Home: q,
73
- End: B,
74
- PageDown: () => f(Math.min(r + F - 1, a.length - 1), 1),
75
- PageUp: () => f(Math.max(r - F + 1, 0), -1)
71
+ const l = {
72
+ ArrowDown: () => f(a, 1),
73
+ ArrowUp: () => f(a, -1),
74
+ Home: T,
75
+ End: x,
76
+ PageDown: () => f(Math.min(a + F - 1, r.length - 1), 1),
77
+ PageUp: () => f(Math.max(a - F + 1, 0), -1)
76
78
  };
77
- o[e] ? (t.preventDefault(), w(o[e]())) : e === "Enter" || e === " " ? (t.preventDefault(), C(r), m()) : e === "Escape" ? (t.preventDefault(), m()) : e === "Tab" ? (C(r), m(!1)) : L(t) && K(e);
78
- }, D = a.find((t) => t.value === n), Z = R ?? b?.placeholder ?? "Select…";
79
- return /* @__PURE__ */ s(le, {
80
- label: N,
79
+ l[e] ? (t.preventDefault(), y(l[e]())) : e === "Enter" || e === " " ? (t.preventDefault(), N(a), p()) : e === "Escape" ? (t.preventDefault(), p()) : e === "Tab" ? (N(a), p(!1)) : q(t) && U(e);
80
+ }, w = r.find((t) => t.value === n), Z = K ?? g?.placeholder ?? "Select…";
81
+ return /* @__PURE__ */ s(oe, {
82
+ label: D,
81
83
  labelHidden: d,
82
84
  description: u,
83
- error: h ?? (X && !n ? b?.required ?? "Please choose a value." : void 0),
84
- required: $,
85
- size: S,
85
+ error: m ?? (X && !n ? g?.required ?? "Please choose a value." : void 0),
86
+ required: I,
87
+ size: P,
86
88
  className: W,
87
89
  style: z,
88
- children: (t) => /* @__PURE__ */ v("div", {
90
+ children: (t) => /* @__PURE__ */ O("div", {
89
91
  className: "cy-select",
90
- "data-size": S,
92
+ "data-size": P,
91
93
  "data-variant": V,
92
94
  children: [
93
- /* @__PURE__ */ v(te, {
94
- ref: y,
95
+ /* @__PURE__ */ O(ee, {
96
+ ref: b,
95
97
  id: t.id,
96
98
  role: "combobox",
97
99
  className: "cy-select-trigger",
98
100
  "aria-labelledby": t.labelId,
99
101
  "aria-describedby": t.describedBy,
100
102
  "aria-invalid": t.invalid || void 0,
101
- "aria-required": $ || void 0,
103
+ "aria-required": I || void 0,
102
104
  "aria-haspopup": "listbox",
103
105
  "aria-expanded": c,
104
- "aria-controls": p,
105
- "aria-activedescendant": c && r >= 0 ? `${p}-${r}` : void 0,
106
- disabled: M,
107
- onClick: () => c ? m() : E(),
106
+ "aria-controls": v,
107
+ "aria-activedescendant": c && a >= 0 ? `${v}-${a}` : void 0,
108
+ disabled: $,
109
+ onClick: () => c ? p() : A(),
108
110
  onKeyDown: Y,
109
111
  children: [
110
- D?.icon && /* @__PURE__ */ s(A, { icon: D.icon }),
112
+ w && /* @__PURE__ */ s(B, {
113
+ option: w,
114
+ plain: $,
115
+ className: "cy-select-icon"
116
+ }),
111
117
  /* @__PURE__ */ s("span", {
112
118
  className: "cy-select-value",
113
- "data-placeholder": D ? void 0 : "",
114
- children: D?.label ?? Z
119
+ "data-placeholder": w ? void 0 : "",
120
+ children: w?.label ?? Z
115
121
  }),
116
- /* @__PURE__ */ s(A, {
117
- icon: ae,
122
+ /* @__PURE__ */ s(te, {
123
+ icon: re,
118
124
  className: "cy-select-chevron"
119
125
  })
120
126
  ]
121
127
  }),
122
- /* @__PURE__ */ v("div", {
123
- ref: I,
124
- id: p,
125
- role: "listbox",
128
+ /* @__PURE__ */ O(ie, {
129
+ ref: C,
130
+ id: v,
126
131
  "aria-labelledby": t.labelId,
127
- className: "cy-select-list",
128
- popover: "manual",
129
- children: [a.length === 0 && /* @__PURE__ */ s("div", {
130
- role: "option",
131
- "aria-disabled": "true",
132
- "aria-selected": "false",
133
- tabIndex: -1,
134
- className: "cy-select-empty",
135
- children: b?.empty ?? "No options"
136
- }), fe(a).map((e) => {
137
- const o = e.items.map(({ option: l, index: i }) => /* @__PURE__ */ v("div", {
138
- id: `${p}-${i}`,
139
- role: "option",
132
+ children: [r.length === 0 && /* @__PURE__ */ s(fe, { children: g?.empty ?? "No options" }), ge(r).map((e) => {
133
+ const l = e.items.map(({ option: o, index: i }) => /* @__PURE__ */ s(ue, {
134
+ id: `${v}-${i}`,
140
135
  "data-index": i,
141
- "aria-selected": l.value === n,
142
- "aria-disabled": l.disabled || void 0,
143
- "data-active": i === r ? "" : void 0,
144
- className: "cy-select-option",
145
- tabIndex: -1,
146
- onPointerMove: () => g(i) && w(i),
147
- onPointerDown: (_) => _.preventDefault(),
136
+ label: o.label,
137
+ description: o.description,
138
+ icon: /* @__PURE__ */ s(B, {
139
+ option: o,
140
+ plain: o.disabled,
141
+ className: "cy-select-icon"
142
+ }),
143
+ selected: o.value === n,
144
+ disabled: o.disabled,
145
+ active: i === a,
146
+ onPointerMove: () => h(i) && y(i),
148
147
  onClick: () => {
149
- g(i) && (C(i), m());
150
- },
151
- onKeyDown: () => {
152
- },
153
- children: [l.icon && /* @__PURE__ */ s(A, { icon: l.icon }), /* @__PURE__ */ v("span", {
154
- className: "cy-select-option-text",
155
- children: [/* @__PURE__ */ s("span", {
156
- className: "cy-select-option-label",
157
- children: l.label
158
- }), l.description && /* @__PURE__ */ s("span", {
159
- className: "cy-select-option-description",
160
- children: l.description
161
- })]
162
- })]
163
- }, l.value));
164
- return e.group === void 0 ? /* @__PURE__ */ s(ie, { children: o }, `run-${e.start}`) : /* @__PURE__ */ v("div", {
165
- role: "group",
166
- "aria-labelledby": `${p}-g${e.start}`,
167
- children: [/* @__PURE__ */ s("div", {
168
- id: `${p}-g${e.start}`,
169
- className: "cy-select-group",
170
- role: "presentation",
171
- children: e.group
172
- }), o]
148
+ h(i) && (N(i), p());
149
+ }
150
+ }, o.value));
151
+ return e.group === void 0 ? /* @__PURE__ */ s(pe, { children: l }, `run-${e.start}`) : /* @__PURE__ */ s(de, {
152
+ id: `${v}-g${e.start}`,
153
+ label: e.group,
154
+ children: l
173
155
  }, `group-${e.start}`);
174
156
  })]
175
157
  }),
176
- /* @__PURE__ */ s(re, {
177
- name: G,
158
+ /* @__PURE__ */ s(ce, {
159
+ name: R,
178
160
  value: n,
179
- required: $,
180
- disabled: M,
181
- requiredMessage: b?.required ?? "Please choose a value.",
161
+ required: I,
162
+ disabled: $,
163
+ requiredMessage: g?.required ?? "Please choose a value.",
182
164
  onReset: () => {
183
- J(k), x(!1);
165
+ J(k), E(!1);
184
166
  },
185
167
  onInvalid: (e) => {
186
- e.preventDefault(), x(!0), y.current?.focus();
168
+ e.preventDefault(), E(!0), b.current?.focus();
187
169
  }
188
170
  })
189
171
  ]
@@ -191,7 +173,7 @@ function xe({ label: N, labelHidden: d, description: u, error: h, options: a, va
191
173
  });
192
174
  }
193
175
  export {
194
- xe as Select
176
+ Pe as Select
195
177
  };
196
178
 
197
179
  //# sourceMappingURL=Select.js.map