@arshad-shah/cynosure 0.3.0 → 0.5.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 (687) hide show
  1. package/README.md +6 -6
  2. package/dist/_virtual/_rolldown/runtime.js +12 -0
  3. package/dist/adapters/astro/index.d.ts +53 -0
  4. package/dist/adapters/astro/index.js +27 -0
  5. package/dist/adapters/astro/index.js.map +1 -0
  6. package/dist/adapters/vite/index.d.ts +11 -0
  7. package/dist/adapters/vite/index.js +33 -12
  8. package/dist/adapters/vite/index.js.map +1 -1
  9. package/dist/brands/googleplay.d.ts +2 -0
  10. package/dist/brands/googleplay.js +17 -0
  11. package/dist/brands/googleplay.js.map +1 -0
  12. package/dist/brands/index.d.ts +1 -0
  13. package/dist/brands/index.js +132 -130
  14. package/dist/components/Accordion/Accordion.d.ts +1 -1
  15. package/dist/components/Accordion/Accordion.js +26 -26
  16. package/dist/components/Accordion/Accordion.js.map +1 -1
  17. package/dist/components/Announcer/Announcer.d.ts +2 -1
  18. package/dist/components/Announcer/Announcer.js +32 -34
  19. package/dist/components/Announcer/Announcer.js.map +1 -1
  20. package/dist/components/AppShell/AppShell.js +41 -41
  21. package/dist/components/AppShell/AppShell.js.map +1 -1
  22. package/dist/components/Avatar/Avatar.js +20 -20
  23. package/dist/components/Avatar/Avatar.js.map +1 -1
  24. package/dist/components/Badge/Badge.d.ts +19 -5
  25. package/dist/components/Badge/Badge.js +19 -13
  26. package/dist/components/Badge/Badge.js.map +1 -1
  27. package/dist/components/Button/Button.d.ts +30 -6
  28. package/dist/components/Button/Button.js +50 -42
  29. package/dist/components/Button/Button.js.map +1 -1
  30. package/dist/components/Calendar/Calendar.js +158 -161
  31. package/dist/components/Calendar/Calendar.js.map +1 -1
  32. package/dist/components/Calendar/dates.js +42 -38
  33. package/dist/components/Calendar/dates.js.map +1 -1
  34. package/dist/components/Card/Card.d.ts +22 -2
  35. package/dist/components/Card/Card.js +60 -52
  36. package/dist/components/Card/Card.js.map +1 -1
  37. package/dist/components/ChatMessage/ChatMessage.d.ts +55 -0
  38. package/dist/components/ChatMessage/ChatMessage.js +50 -0
  39. package/dist/components/ChatMessage/ChatMessage.js.map +1 -0
  40. package/dist/components/ChatMessage/index.d.ts +1 -0
  41. package/dist/components/Checkbox/Checkbox.d.ts +4 -4
  42. package/dist/components/Checkbox/Checkbox.js +33 -8
  43. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  44. package/dist/components/Checklist/Checklist.js +21 -21
  45. package/dist/components/Checklist/Checklist.js.map +1 -1
  46. package/dist/components/Choice/Choice.d.ts +73 -0
  47. package/dist/components/Choice/Choice.js +41 -0
  48. package/dist/components/Choice/Choice.js.map +1 -0
  49. package/dist/components/Choice/index.d.ts +1 -0
  50. package/dist/components/CodeBlock/CodeBlock.d.ts +6 -1
  51. package/dist/components/CodeBlock/CodeBlock.js +40 -37
  52. package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
  53. package/dist/components/ColorField/ColorField.d.ts +3 -2
  54. package/dist/components/ColorField/ColorField.js +202 -212
  55. package/dist/components/ColorField/ColorField.js.map +1 -1
  56. package/dist/components/ColorField/read-color.js +5 -6
  57. package/dist/components/ColorField/read-color.js.map +1 -1
  58. package/dist/components/ColorSwatches/ColorSwatches.js +42 -33
  59. package/dist/components/ColorSwatches/ColorSwatches.js.map +1 -1
  60. package/dist/components/Combobox/Combobox.d.ts +13 -2
  61. package/dist/components/Combobox/Combobox.js +118 -129
  62. package/dist/components/Combobox/Combobox.js.map +1 -1
  63. package/dist/components/CommandPalette/CommandPalette.d.ts +14 -1
  64. package/dist/components/CommandPalette/CommandPalette.js +153 -109
  65. package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
  66. package/dist/components/CommandPalette/index.d.ts +1 -1
  67. package/dist/components/CompareSlider/CompareSlider.js +14 -14
  68. package/dist/components/CompareSlider/CompareSlider.js.map +1 -1
  69. package/dist/components/Container/Container.d.ts +2 -2
  70. package/dist/components/Container/Container.js +17 -13
  71. package/dist/components/Container/Container.js.map +1 -1
  72. package/dist/components/ContextMenu/ContextMenu.d.ts +27 -13
  73. package/dist/components/ContextMenu/ContextMenu.js +64 -46
  74. package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
  75. package/dist/components/CopyButton/CopyButton.js +41 -41
  76. package/dist/components/CopyButton/CopyButton.js.map +1 -1
  77. package/dist/components/DataGrid/DataGrid.d.ts +135 -0
  78. package/dist/components/DataGrid/DataGrid.js +385 -0
  79. package/dist/components/DataGrid/DataGrid.js.map +1 -0
  80. package/dist/components/DataGrid/index.d.ts +1 -0
  81. package/dist/components/DateField/DateField.d.ts +4 -3
  82. package/dist/components/DateField/DateField.js +70 -59
  83. package/dist/components/DateField/DateField.js.map +1 -1
  84. package/dist/components/DeviceFrame/DeviceFrame.d.ts +63 -0
  85. package/dist/components/DeviceFrame/DeviceFrame.js +54 -0
  86. package/dist/components/DeviceFrame/DeviceFrame.js.map +1 -0
  87. package/dist/components/DeviceFrame/index.d.ts +1 -0
  88. package/dist/components/Dialog/Dialog.d.ts +10 -1
  89. package/dist/components/Dialog/Dialog.js +82 -81
  90. package/dist/components/Dialog/Dialog.js.map +1 -1
  91. package/dist/components/Disclosure/Disclosure.d.ts +15 -1
  92. package/dist/components/Disclosure/Disclosure.js +37 -30
  93. package/dist/components/Disclosure/Disclosure.js.map +1 -1
  94. package/dist/components/DocumentViewport/DocumentViewport.js +54 -57
  95. package/dist/components/DocumentViewport/DocumentViewport.js.map +1 -1
  96. package/dist/components/EmptyState/EmptyState.d.ts +5 -2
  97. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  98. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +59 -0
  99. package/dist/components/ErrorBoundary/ErrorBoundary.js +53 -0
  100. package/dist/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
  101. package/dist/components/ErrorBoundary/index.d.ts +1 -0
  102. package/dist/components/Field/Field.d.ts +38 -5
  103. package/dist/components/Field/Field.js +48 -42
  104. package/dist/components/Field/Field.js.map +1 -1
  105. package/dist/components/Field/index.d.ts +1 -1
  106. package/dist/components/FileDrop/FileDrop.d.ts +26 -1
  107. package/dist/components/FileDrop/FileDrop.js +150 -99
  108. package/dist/components/FileDrop/FileDrop.js.map +1 -1
  109. package/dist/components/FloatingToolbar/FloatingToolbar.js +80 -77
  110. package/dist/components/FloatingToolbar/FloatingToolbar.js.map +1 -1
  111. package/dist/components/Grid/Grid.d.ts +32 -11
  112. package/dist/components/Grid/Grid.js +78 -48
  113. package/dist/components/Grid/Grid.js.map +1 -1
  114. package/dist/components/Grid/index.d.ts +1 -1
  115. package/dist/components/Heading/Heading.d.ts +4 -2
  116. package/dist/components/Heading/Heading.js.map +1 -1
  117. package/dist/components/HighlightedText/HighlightedText.d.ts +40 -0
  118. package/dist/components/HighlightedText/HighlightedText.js +36 -0
  119. package/dist/components/HighlightedText/HighlightedText.js.map +1 -0
  120. package/dist/components/HighlightedText/index.d.ts +2 -0
  121. package/dist/components/HotkeyField/HotkeyField.d.ts +84 -0
  122. package/dist/components/HotkeyField/HotkeyField.js +161 -0
  123. package/dist/components/HotkeyField/HotkeyField.js.map +1 -0
  124. package/dist/components/HotkeyField/index.d.ts +1 -0
  125. package/dist/components/HoverCard/HoverCard.js +6 -6
  126. package/dist/components/HoverCard/HoverCard.js.map +1 -1
  127. package/dist/components/IconButton/IconButton.d.ts +16 -1
  128. package/dist/components/IconButton/IconButton.js +20 -15
  129. package/dist/components/IconButton/IconButton.js.map +1 -1
  130. package/dist/components/IconTile/IconTile.d.ts +45 -0
  131. package/dist/components/IconTile/IconTile.js +25 -0
  132. package/dist/components/IconTile/IconTile.js.map +1 -0
  133. package/dist/components/IconTile/index.d.ts +1 -0
  134. package/dist/components/Image/Image.js.map +1 -1
  135. package/dist/components/Inline/Inline.d.ts +3 -3
  136. package/dist/components/Inline/Inline.js +12 -22
  137. package/dist/components/Inline/Inline.js.map +1 -1
  138. package/dist/components/Kbd/Kbd.d.ts +0 -2
  139. package/dist/components/Kbd/Kbd.js +16 -22
  140. package/dist/components/Kbd/Kbd.js.map +1 -1
  141. package/dist/components/KeyValueEditor/KeyValueEditor.js +37 -36
  142. package/dist/components/KeyValueEditor/KeyValueEditor.js.map +1 -1
  143. package/dist/components/KeyValueEditor/bulk.js +3 -4
  144. package/dist/components/KeyValueEditor/bulk.js.map +1 -1
  145. package/dist/components/Link/Link.d.ts +9 -1
  146. package/dist/components/Link/Link.js +20 -18
  147. package/dist/components/Link/Link.js.map +1 -1
  148. package/dist/components/List/List.d.ts +73 -0
  149. package/dist/components/List/List.js +64 -0
  150. package/dist/components/List/List.js.map +1 -0
  151. package/dist/components/List/index.d.ts +1 -0
  152. package/dist/components/ListRow/ListRow.d.ts +105 -0
  153. package/dist/components/ListRow/ListRow.js +164 -0
  154. package/dist/components/ListRow/ListRow.js.map +1 -0
  155. package/dist/components/ListRow/index.d.ts +1 -0
  156. package/dist/components/LoadingDots/LoadingDots.d.ts +7 -2
  157. package/dist/components/LoadingDots/LoadingDots.js +28 -18
  158. package/dist/components/LoadingDots/LoadingDots.js.map +1 -1
  159. package/dist/components/Menu/Menu.d.ts +29 -11
  160. package/dist/components/Menu/Menu.js +204 -111
  161. package/dist/components/Menu/Menu.js.map +1 -1
  162. package/dist/components/Menubar/Menubar.d.ts +40 -0
  163. package/dist/components/Menubar/Menubar.js +82 -0
  164. package/dist/components/Menubar/Menubar.js.map +1 -0
  165. package/dist/components/Menubar/index.d.ts +1 -0
  166. package/dist/components/Notice/Notice.d.ts +11 -2
  167. package/dist/components/Notice/Notice.js +31 -27
  168. package/dist/components/Notice/Notice.js.map +1 -1
  169. package/dist/components/NumberField/NumberField.d.ts +8 -3
  170. package/dist/components/NumberField/NumberField.js +151 -100
  171. package/dist/components/NumberField/NumberField.js.map +1 -1
  172. package/dist/components/OptionList/OptionList.d.ts +102 -0
  173. package/dist/components/OptionList/OptionList.js +98 -0
  174. package/dist/components/OptionList/OptionList.js.map +1 -0
  175. package/dist/components/OptionList/index.d.ts +1 -0
  176. package/dist/components/OverlayFrame/OverlayFrame.d.ts +33 -0
  177. package/dist/components/OverlayFrame/OverlayFrame.js +20 -0
  178. package/dist/components/OverlayFrame/OverlayFrame.js.map +1 -0
  179. package/dist/components/OverlayFrame/index.d.ts +1 -0
  180. package/dist/components/PageHeader/PageHeader.d.ts +6 -0
  181. package/dist/components/PageHeader/PageHeader.js +27 -27
  182. package/dist/components/PageHeader/PageHeader.js.map +1 -1
  183. package/dist/components/Pagination/Pagination.js +31 -30
  184. package/dist/components/Pagination/Pagination.js.map +1 -1
  185. package/dist/components/PanZoomCanvas/PanZoomCanvas.d.ts +71 -4
  186. package/dist/components/PanZoomCanvas/PanZoomCanvas.js +197 -141
  187. package/dist/components/PanZoomCanvas/PanZoomCanvas.js.map +1 -1
  188. package/dist/components/PanZoomCanvas/index.d.ts +1 -1
  189. package/dist/components/PathField/PathField.d.ts +68 -0
  190. package/dist/components/PathField/PathField.js +67 -0
  191. package/dist/components/PathField/PathField.js.map +1 -0
  192. package/dist/components/PathField/index.d.ts +1 -0
  193. package/dist/components/Popover/Popover.d.ts +16 -3
  194. package/dist/components/Popover/Popover.js +51 -42
  195. package/dist/components/Popover/Popover.js.map +1 -1
  196. package/dist/components/ProgressBar/ProgressBar.d.ts +4 -3
  197. package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
  198. package/dist/components/QRCode/QRCode.d.ts +56 -0
  199. package/dist/components/QRCode/QRCode.js +48 -0
  200. package/dist/components/QRCode/QRCode.js.map +1 -0
  201. package/dist/components/QRCode/index.d.ts +1 -0
  202. package/dist/components/RadioGroup/RadioGroup.js +32 -24
  203. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  204. package/dist/components/RowActions/RowActions.d.ts +35 -0
  205. package/dist/components/RowActions/RowActions.js +38 -0
  206. package/dist/components/RowActions/RowActions.js.map +1 -0
  207. package/dist/components/RowActions/index.d.ts +1 -0
  208. package/dist/components/ScrollArea/ScrollArea.d.ts +55 -0
  209. package/dist/components/ScrollArea/ScrollArea.js +55 -0
  210. package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
  211. package/dist/components/ScrollArea/index.d.ts +1 -0
  212. package/dist/components/SearchField/SearchField.d.ts +17 -0
  213. package/dist/components/SearchField/SearchField.js +31 -17
  214. package/dist/components/SearchField/SearchField.js.map +1 -1
  215. package/dist/components/SearchField/index.d.ts +1 -1
  216. package/dist/components/Section/Section.d.ts +57 -0
  217. package/dist/components/Section/Section.js +27 -0
  218. package/dist/components/Section/Section.js.map +1 -0
  219. package/dist/components/Section/index.d.ts +1 -0
  220. package/dist/components/SegmentedControl/SegmentedControl.d.ts +6 -3
  221. package/dist/components/SegmentedControl/SegmentedControl.js +24 -20
  222. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  223. package/dist/components/Select/Select.d.ts +22 -6
  224. package/dist/components/Select/Select.js +155 -156
  225. package/dist/components/Select/Select.js.map +1 -1
  226. package/dist/components/SelectionFrame/frame-math.js +19 -20
  227. package/dist/components/SelectionFrame/frame-math.js.map +1 -1
  228. package/dist/components/Sheet/Sheet.js +12 -7
  229. package/dist/components/Sheet/Sheet.js.map +1 -1
  230. package/dist/components/SideNav/SideNav.d.ts +13 -1
  231. package/dist/components/SideNav/SideNav.js +100 -91
  232. package/dist/components/SideNav/SideNav.js.map +1 -1
  233. package/dist/components/SignaturePad/SignaturePad.js +63 -62
  234. package/dist/components/SignaturePad/SignaturePad.js.map +1 -1
  235. package/dist/components/SignaturePad/ink.js +0 -1
  236. package/dist/components/SignaturePad/ink.js.map +1 -1
  237. package/dist/components/SiteFooter/SiteFooter.d.ts +66 -0
  238. package/dist/components/SiteFooter/SiteFooter.js +80 -0
  239. package/dist/components/SiteFooter/SiteFooter.js.map +1 -0
  240. package/dist/components/SiteFooter/index.d.ts +1 -0
  241. package/dist/components/SiteHeader/SiteHeader.d.ts +78 -0
  242. package/dist/components/SiteHeader/SiteHeader.js +114 -0
  243. package/dist/components/SiteHeader/SiteHeader.js.map +1 -0
  244. package/dist/components/SiteHeader/index.d.ts +1 -0
  245. package/dist/components/SkipLink/SkipLink.d.ts +42 -0
  246. package/dist/components/SkipLink/SkipLink.js +43 -0
  247. package/dist/components/SkipLink/SkipLink.js.map +1 -0
  248. package/dist/components/SkipLink/index.d.ts +1 -0
  249. package/dist/components/Slider/Slider.js +88 -91
  250. package/dist/components/Slider/Slider.js.map +1 -1
  251. package/dist/components/SortButton/SortButton.d.ts +36 -0
  252. package/dist/components/SortButton/SortButton.js +35 -0
  253. package/dist/components/SortButton/SortButton.js.map +1 -0
  254. package/dist/components/SortButton/index.d.ts +1 -0
  255. package/dist/components/SortableList/SortableList.js +146 -120
  256. package/dist/components/SortableList/SortableList.js.map +1 -1
  257. package/dist/components/SplitPane/SplitPane.d.ts +32 -12
  258. package/dist/components/SplitPane/SplitPane.js +105 -59
  259. package/dist/components/SplitPane/SplitPane.js.map +1 -1
  260. package/dist/components/Stack/Stack.d.ts +16 -7
  261. package/dist/components/Stack/Stack.js +32 -18
  262. package/dist/components/Stack/Stack.js.map +1 -1
  263. package/dist/components/Stack/index.d.ts +1 -1
  264. package/dist/components/Stat/Stat.d.ts +88 -0
  265. package/dist/components/Stat/Stat.js +105 -0
  266. package/dist/components/Stat/Stat.js.map +1 -0
  267. package/dist/components/Stat/index.d.ts +1 -0
  268. package/dist/components/StatusBar/StatusBar.d.ts +95 -0
  269. package/dist/components/StatusBar/StatusBar.js +110 -0
  270. package/dist/components/StatusBar/StatusBar.js.map +1 -0
  271. package/dist/components/StatusBar/index.d.ts +1 -0
  272. package/dist/components/Steps/Steps.d.ts +10 -4
  273. package/dist/components/Steps/Steps.js +31 -30
  274. package/dist/components/Steps/Steps.js.map +1 -1
  275. package/dist/components/Switch/Switch.d.ts +4 -4
  276. package/dist/components/Switch/Switch.js +18 -7
  277. package/dist/components/Switch/Switch.js.map +1 -1
  278. package/dist/components/Table/Table.d.ts +6 -6
  279. package/dist/components/Table/Table.js +73 -102
  280. package/dist/components/Table/Table.js.map +1 -1
  281. package/dist/components/Tabs/Tabs.d.ts +55 -6
  282. package/dist/components/Tabs/Tabs.js +288 -169
  283. package/dist/components/Tabs/Tabs.js.map +1 -1
  284. package/dist/components/TagInput/TagInput.d.ts +10 -2
  285. package/dist/components/TagInput/TagInput.js +137 -148
  286. package/dist/components/TagInput/TagInput.js.map +1 -1
  287. package/dist/components/Text/Text.d.ts +6 -0
  288. package/dist/components/Text/Text.js +18 -17
  289. package/dist/components/Text/Text.js.map +1 -1
  290. package/dist/components/TextArea/TextArea.d.ts +37 -6
  291. package/dist/components/TextArea/TextArea.js +200 -72
  292. package/dist/components/TextArea/TextArea.js.map +1 -1
  293. package/dist/components/TextArea/index.d.ts +1 -1
  294. package/dist/components/TextField/TextField.d.ts +22 -6
  295. package/dist/components/TextField/TextField.js +59 -53
  296. package/dist/components/TextField/TextField.js.map +1 -1
  297. package/dist/components/ThemeToggle/ThemeToggle.d.ts +7 -1
  298. package/dist/components/ThemeToggle/ThemeToggle.js +33 -30
  299. package/dist/components/ThemeToggle/ThemeToggle.js.map +1 -1
  300. package/dist/components/TimeField/TimeField.d.ts +4 -3
  301. package/dist/components/TimeField/TimeField.js +197 -183
  302. package/dist/components/TimeField/TimeField.js.map +1 -1
  303. package/dist/components/TitleBar/TitleBar.d.ts +91 -0
  304. package/dist/components/TitleBar/TitleBar.js +80 -0
  305. package/dist/components/TitleBar/TitleBar.js.map +1 -0
  306. package/dist/components/TitleBar/index.d.ts +1 -0
  307. package/dist/components/Toast/Toast.d.ts +17 -2
  308. package/dist/components/Toast/Toast.js +166 -147
  309. package/dist/components/Toast/Toast.js.map +1 -1
  310. package/dist/components/Toast/index.d.ts +1 -1
  311. package/dist/components/Toolbar/Toolbar.js +11 -12
  312. package/dist/components/Toolbar/Toolbar.js.map +1 -1
  313. package/dist/components/Tooltip/Tooltip.d.ts +23 -1
  314. package/dist/components/Tooltip/Tooltip.js +50 -31
  315. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  316. package/dist/components/Tree/Tree.d.ts +92 -11
  317. package/dist/components/Tree/Tree.js +332 -164
  318. package/dist/components/Tree/Tree.js.map +1 -1
  319. package/dist/components/VirtualList/VirtualList.d.ts +27 -4
  320. package/dist/components/VirtualList/VirtualList.js +179 -145
  321. package/dist/components/VirtualList/VirtualList.js.map +1 -1
  322. package/dist/components/VirtualList/index.d.ts +1 -1
  323. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +24 -0
  324. package/dist/components/VisuallyHidden/VisuallyHidden.js +17 -0
  325. package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
  326. package/dist/components/VisuallyHidden/index.d.ts +1 -0
  327. package/dist/components/ZoomControls/ZoomControls.d.ts +6 -2
  328. package/dist/components/ZoomControls/ZoomControls.js +37 -37
  329. package/dist/components/ZoomControls/ZoomControls.js.map +1 -1
  330. package/dist/entries/tokens.js +22 -16
  331. package/dist/foundations/ChoiceBase/ChoiceBase.js +15 -13
  332. package/dist/foundations/ChoiceBase/ChoiceBase.js.map +1 -1
  333. package/dist/foundations/HiddenValue/HiddenValue.js +5 -5
  334. package/dist/foundations/HiddenValue/HiddenValue.js.map +1 -1
  335. package/dist/foundations/Icon/Icon.d.ts +6 -1
  336. package/dist/foundations/Icon/Icon.js +15 -14
  337. package/dist/foundations/Icon/Icon.js.map +1 -1
  338. package/dist/foundations/LiveRegion/LiveRegion.d.ts +33 -0
  339. package/dist/foundations/LiveRegion/LiveRegion.js +29 -0
  340. package/dist/foundations/LiveRegion/LiveRegion.js.map +1 -0
  341. package/dist/foundations/LiveRegion/index.d.ts +1 -0
  342. package/dist/foundations/canvas-size.d.ts +14 -0
  343. package/dist/foundations/canvas-size.js +32 -0
  344. package/dist/foundations/canvas-size.js.map +1 -0
  345. package/dist/foundations/dir.js +0 -1
  346. package/dist/foundations/dir.js.map +1 -1
  347. package/dist/foundations/draft.d.ts +14 -0
  348. package/dist/foundations/draft.js +22 -0
  349. package/dist/foundations/draft.js.map +1 -0
  350. package/dist/foundations/edge.d.ts +20 -0
  351. package/dist/foundations/edge.js +26 -0
  352. package/dist/foundations/edge.js.map +1 -0
  353. package/dist/foundations/focus.d.ts +5 -0
  354. package/dist/foundations/focus.js +10 -0
  355. package/dist/foundations/focus.js.map +1 -0
  356. package/dist/foundations/hotkey.d.ts +23 -1
  357. package/dist/foundations/hotkey.js +48 -26
  358. package/dist/foundations/hotkey.js.map +1 -1
  359. package/dist/foundations/icon-size.d.ts +7 -0
  360. package/dist/foundations/icon-size.js +6 -0
  361. package/dist/foundations/icon-size.js.map +1 -0
  362. package/dist/foundations/image-outcome.d.ts +8 -3
  363. package/dist/foundations/image-outcome.js +12 -8
  364. package/dist/foundations/image-outcome.js.map +1 -1
  365. package/dist/foundations/keys.js +12 -13
  366. package/dist/foundations/keys.js.map +1 -1
  367. package/dist/foundations/layout.d.ts +81 -0
  368. package/dist/foundations/layout.js +29 -0
  369. package/dist/foundations/layout.js.map +1 -0
  370. package/dist/foundations/listbox.d.ts +47 -2
  371. package/dist/foundations/listbox.js +56 -25
  372. package/dist/foundations/listbox.js.map +1 -1
  373. package/dist/foundations/math.d.ts +25 -0
  374. package/dist/foundations/math.js +14 -3
  375. package/dist/foundations/math.js.map +1 -1
  376. package/dist/foundations/media-query.d.ts +5 -0
  377. package/dist/foundations/media-query.js +14 -0
  378. package/dist/foundations/media-query.js.map +1 -0
  379. package/dist/foundations/motion.d.ts +12 -0
  380. package/dist/foundations/motion.js +21 -0
  381. package/dist/foundations/motion.js.map +1 -0
  382. package/dist/foundations/option-icon.d.ts +3 -1
  383. package/dist/foundations/option-icon.js +6 -6
  384. package/dist/foundations/option-icon.js.map +1 -1
  385. package/dist/foundations/printing.d.ts +6 -0
  386. package/dist/foundations/printing.js +17 -0
  387. package/dist/foundations/printing.js.map +1 -0
  388. package/dist/foundations/qr.d.ts +42 -0
  389. package/dist/foundations/qr.js +245 -0
  390. package/dist/foundations/qr.js.map +1 -0
  391. package/dist/foundations/refs.d.ts +8 -0
  392. package/dist/foundations/refs.js +14 -0
  393. package/dist/foundations/refs.js.map +1 -0
  394. package/dist/foundations/reorder.js +5 -6
  395. package/dist/foundations/reorder.js.map +1 -1
  396. package/dist/foundations/roving-focus.d.ts +10 -0
  397. package/dist/foundations/roving-focus.js +34 -31
  398. package/dist/foundations/roving-focus.js.map +1 -1
  399. package/dist/foundations/scroll-align.d.ts +11 -0
  400. package/dist/foundations/scroll-align.js +8 -0
  401. package/dist/foundations/scroll-align.js.map +1 -0
  402. package/dist/foundations/sort.d.ts +13 -0
  403. package/dist/foundations/sort.js +26 -0
  404. package/dist/foundations/sort.js.map +1 -0
  405. package/dist/foundations/text-match.d.ts +11 -0
  406. package/dist/foundations/text-match.js +20 -0
  407. package/dist/foundations/text-match.js.map +1 -0
  408. package/dist/foundations/tone-icons.js +4 -5
  409. package/dist/foundations/tone-icons.js.map +1 -1
  410. package/dist/foundations/use-follow.d.ts +29 -0
  411. package/dist/foundations/use-follow.js +51 -0
  412. package/dist/foundations/use-follow.js.map +1 -0
  413. package/dist/foundations/virtual-window.d.ts +22 -5
  414. package/dist/foundations/virtual-window.js +58 -54
  415. package/dist/foundations/virtual-window.js.map +1 -1
  416. package/dist/foundations/zoom-gestures.d.ts +23 -1
  417. package/dist/foundations/zoom-gestures.js +123 -84
  418. package/dist/foundations/zoom-gestures.js.map +1 -1
  419. package/dist/foundations/zoom.d.ts +10 -4
  420. package/dist/foundations/zoom.js +16 -17
  421. package/dist/foundations/zoom.js.map +1 -1
  422. package/dist/icons/book-marked.d.ts +2 -0
  423. package/dist/icons/book-marked.js +14 -0
  424. package/dist/icons/book-marked.js.map +1 -0
  425. package/dist/icons/boxes.d.ts +2 -0
  426. package/dist/icons/boxes.js +34 -0
  427. package/dist/icons/boxes.js.map +1 -0
  428. package/dist/icons/by-name.d.ts +11 -0
  429. package/dist/icons/by-name.js +11 -0
  430. package/dist/icons/by-name.js.map +1 -0
  431. package/dist/icons/cable.d.ts +2 -0
  432. package/dist/icons/cable.js +14 -0
  433. package/dist/icons/cable.js.map +1 -0
  434. package/dist/icons/calendar-days.d.ts +2 -0
  435. package/dist/icons/calendar-days.js +24 -0
  436. package/dist/icons/calendar-days.js.map +1 -0
  437. package/dist/icons/check-check.d.ts +2 -0
  438. package/dist/icons/check-check.js +17 -0
  439. package/dist/icons/check-check.js.map +1 -0
  440. package/dist/icons/check-square.d.ts +2 -0
  441. package/dist/icons/check-square.js +14 -0
  442. package/dist/icons/check-square.js.map +1 -0
  443. package/dist/icons/clipboard-paste.d.ts +2 -0
  444. package/dist/icons/clipboard-paste.js +30 -0
  445. package/dist/icons/clipboard-paste.js.map +1 -0
  446. package/dist/icons/crescent.d.ts +2 -0
  447. package/dist/icons/crescent.js +14 -0
  448. package/dist/icons/crescent.js.map +1 -0
  449. package/dist/icons/facet.d.ts +274 -0
  450. package/dist/icons/facet.js +830 -0
  451. package/dist/icons/facet.js.map +1 -0
  452. package/dist/icons/file-plus.d.ts +2 -0
  453. package/dist/icons/file-plus.js +14 -0
  454. package/dist/icons/file-plus.js.map +1 -0
  455. package/dist/icons/file-question.d.ts +2 -0
  456. package/dist/icons/file-question.js +14 -0
  457. package/dist/icons/file-question.js.map +1 -0
  458. package/dist/icons/file-search.d.ts +2 -0
  459. package/dist/icons/file-search.js +24 -0
  460. package/dist/icons/file-search.js.map +1 -0
  461. package/dist/icons/function.d.ts +2 -0
  462. package/dist/icons/function.js +20 -0
  463. package/dist/icons/function.js.map +1 -0
  464. package/dist/icons/gauge.d.ts +2 -0
  465. package/dist/icons/gauge.js +14 -0
  466. package/dist/icons/gauge.js.map +1 -0
  467. package/dist/icons/hourglass.d.ts +2 -0
  468. package/dist/icons/hourglass.js +14 -0
  469. package/dist/icons/hourglass.js.map +1 -0
  470. package/dist/icons/index.d.ts +1 -240
  471. package/dist/icons/index.js +546 -478
  472. package/dist/icons/kaaba.d.ts +2 -0
  473. package/dist/icons/kaaba.js +14 -0
  474. package/dist/icons/kaaba.js.map +1 -0
  475. package/dist/icons/keywords.d.ts +35 -1
  476. package/dist/icons/keywords.js +274 -1
  477. package/dist/icons/keywords.js.map +1 -1
  478. package/dist/icons/languages.d.ts +2 -0
  479. package/dist/icons/languages.js +14 -0
  480. package/dist/icons/languages.js.map +1 -0
  481. package/dist/icons/list-tree.d.ts +2 -0
  482. package/dist/icons/list-tree.js +14 -0
  483. package/dist/icons/list-tree.js.map +1 -0
  484. package/dist/icons/loader.d.ts +2 -0
  485. package/dist/icons/loader.js +14 -0
  486. package/dist/icons/loader.js.map +1 -0
  487. package/dist/icons/monitor-down.d.ts +2 -0
  488. package/dist/icons/monitor-down.js +24 -0
  489. package/dist/icons/monitor-down.js.map +1 -0
  490. package/dist/icons/mosque.d.ts +2 -0
  491. package/dist/icons/mosque.js +14 -0
  492. package/dist/icons/mosque.js.map +1 -0
  493. package/dist/icons/panel-right.d.ts +2 -0
  494. package/dist/icons/panel-right.js +20 -0
  495. package/dist/icons/panel-right.js.map +1 -0
  496. package/dist/icons/party-popper.d.ts +2 -0
  497. package/dist/icons/party-popper.js +14 -0
  498. package/dist/icons/party-popper.js.map +1 -0
  499. package/dist/icons/power-off.d.ts +2 -0
  500. package/dist/icons/power-off.js +14 -0
  501. package/dist/icons/power-off.js.map +1 -0
  502. package/dist/icons/prayer-beads.d.ts +2 -0
  503. package/dist/icons/prayer-beads.js +67 -0
  504. package/dist/icons/prayer-beads.js.map +1 -0
  505. package/dist/icons/qr-code.d.ts +2 -0
  506. package/dist/icons/qr-code.js +38 -0
  507. package/dist/icons/qr-code.js.map +1 -0
  508. package/dist/icons/refresh-cw.d.ts +2 -0
  509. package/dist/icons/refresh-cw.js +14 -0
  510. package/dist/icons/refresh-cw.js.map +1 -0
  511. package/dist/icons/rocket.d.ts +2 -0
  512. package/dist/icons/rocket.js +21 -0
  513. package/dist/icons/rocket.js.map +1 -0
  514. package/dist/icons/rows.d.ts +2 -0
  515. package/dist/icons/rows.js +20 -0
  516. package/dist/icons/rows.js.map +1 -0
  517. package/dist/icons/scissors.d.ts +2 -0
  518. package/dist/icons/scissors.js +26 -0
  519. package/dist/icons/scissors.js.map +1 -0
  520. package/dist/icons/shield-question.d.ts +2 -0
  521. package/dist/icons/shield-question.js +14 -0
  522. package/dist/icons/shield-question.js.map +1 -0
  523. package/dist/icons/square-plus.d.ts +2 -0
  524. package/dist/icons/square-plus.js +20 -0
  525. package/dist/icons/square-plus.js.map +1 -0
  526. package/dist/icons/text-select.d.ts +2 -0
  527. package/dist/icons/text-select.js +14 -0
  528. package/dist/icons/text-select.js.map +1 -0
  529. package/dist/icons/types.d.ts +1 -1
  530. package/dist/icons/types.js +2 -1
  531. package/dist/icons/types.js.map +1 -1
  532. package/dist/icons/window-maximize.d.ts +2 -0
  533. package/dist/icons/window-maximize.js +14 -0
  534. package/dist/icons/window-maximize.js.map +1 -0
  535. package/dist/icons/window-restore.d.ts +2 -0
  536. package/dist/icons/window-restore.js +20 -0
  537. package/dist/icons/window-restore.js.map +1 -0
  538. package/dist/index.d.ts +38 -9
  539. package/dist/index.js +326 -249
  540. package/dist/overlay/dismiss.js +15 -13
  541. package/dist/overlay/dismiss.js.map +1 -1
  542. package/dist/overlay/floating.d.ts +7 -2
  543. package/dist/overlay/floating.js +29 -21
  544. package/dist/overlay/floating.js.map +1 -1
  545. package/dist/overlay/listbox-layer.d.ts +3 -2
  546. package/dist/overlay/listbox-layer.js.map +1 -1
  547. package/dist/overlay/position.d.ts +5 -2
  548. package/dist/overlay/position.js +19 -19
  549. package/dist/overlay/position.js.map +1 -1
  550. package/dist/overlay/toast-host.js +3 -2
  551. package/dist/overlay/toast-host.js.map +1 -1
  552. package/dist/overlay/use-anchored-position.d.ts +2 -2
  553. package/dist/overlay/use-anchored-position.js +25 -25
  554. package/dist/overlay/use-anchored-position.js.map +1 -1
  555. package/dist/styles/announcer.css +1 -1
  556. package/dist/styles/app-shell.css +1 -1
  557. package/dist/styles/avatar.css +1 -1
  558. package/dist/styles/badge.css +1 -1
  559. package/dist/styles/base.css +1 -1
  560. package/dist/styles/button.css +1 -1
  561. package/dist/styles/calendar.css +1 -1
  562. package/dist/styles/card.css +1 -1
  563. package/dist/styles/chat-message.css +1 -0
  564. package/dist/styles/checkbox.css +1 -1
  565. package/dist/styles/choice-base.css +1 -0
  566. package/dist/styles/choice.css +1 -1
  567. package/dist/styles/code-block.css +1 -1
  568. package/dist/styles/color-field.css +1 -1
  569. package/dist/styles/combobox.css +1 -1
  570. package/dist/styles/command-palette.css +1 -1
  571. package/dist/styles/copy-button.css +1 -1
  572. package/dist/styles/data-grid.css +1 -0
  573. package/dist/styles/date-field.css +1 -1
  574. package/dist/styles/device-frame.css +1 -0
  575. package/dist/styles/dialog.css +1 -1
  576. package/dist/styles/disclosure.css +1 -1
  577. package/dist/styles/error-boundary.css +1 -0
  578. package/dist/styles/field.css +1 -1
  579. package/dist/styles/file-drop.css +1 -1
  580. package/dist/styles/floating-toolbar.css +1 -1
  581. package/dist/styles/generated-css.d.ts +1 -1
  582. package/dist/styles/generated-css.js +3 -3
  583. package/dist/styles/generated-css.js.map +1 -1
  584. package/dist/styles/grid.css +1 -1
  585. package/dist/styles/heading.css +1 -1
  586. package/dist/styles/highlighted-text.css +1 -0
  587. package/dist/styles/hotkey-field.css +1 -0
  588. package/dist/styles/icon-tile.css +1 -0
  589. package/dist/styles/icon.css +1 -1
  590. package/dist/styles/inline.css +1 -0
  591. package/dist/styles/key-value-editor.css +1 -1
  592. package/dist/styles/link.css +1 -1
  593. package/dist/styles/list-row.css +1 -0
  594. package/dist/styles/list.css +1 -0
  595. package/dist/styles/loading-dots.css +1 -1
  596. package/dist/styles/manifest.json +852 -0
  597. package/dist/styles/menu.css +1 -1
  598. package/dist/styles/menubar.css +1 -0
  599. package/dist/styles/notice.css +1 -1
  600. package/dist/styles/number-field.css +1 -1
  601. package/dist/styles/option-list.css +1 -0
  602. package/dist/styles/overlay-frame.css +1 -0
  603. package/dist/styles/pagination.css +1 -1
  604. package/dist/styles/pan-zoom-canvas.css +1 -1
  605. package/dist/styles/path-field.css +1 -0
  606. package/dist/styles/popover.css +1 -1
  607. package/dist/styles/progress-bar.css +1 -1
  608. package/dist/styles/qr-code.css +1 -0
  609. package/dist/styles/radio-group.css +1 -1
  610. package/dist/styles/row-actions.css +1 -0
  611. package/dist/styles/scroll-area.css +1 -0
  612. package/dist/styles/search-field.css +1 -1
  613. package/dist/styles/section.css +1 -0
  614. package/dist/styles/segmented-control.css +1 -1
  615. package/dist/styles/select.css +1 -1
  616. package/dist/styles/sheet.css +1 -1
  617. package/dist/styles/side-nav.css +1 -1
  618. package/dist/styles/site-footer.css +1 -0
  619. package/dist/styles/site-header.css +1 -0
  620. package/dist/styles/skip-link.css +1 -0
  621. package/dist/styles/sort-button.css +1 -0
  622. package/dist/styles/sortable-list.css +1 -1
  623. package/dist/styles/split-pane.css +1 -1
  624. package/dist/styles/stack.css +1 -1
  625. package/dist/styles/stat.css +1 -0
  626. package/dist/styles/status-bar.css +1 -0
  627. package/dist/styles/steps.css +1 -1
  628. package/dist/styles/switch.css +1 -0
  629. package/dist/styles/table.css +1 -1
  630. package/dist/styles/tabs.css +1 -1
  631. package/dist/styles/tag-input.css +1 -1
  632. package/dist/styles/text-area.css +1 -1
  633. package/dist/styles/text-field.css +1 -1
  634. package/dist/styles/text.css +1 -1
  635. package/dist/styles/time-field.css +1 -1
  636. package/dist/styles/title-bar.css +1 -0
  637. package/dist/styles/toast.css +1 -1
  638. package/dist/styles/tokens.css +3 -3
  639. package/dist/styles/tree.css +1 -1
  640. package/dist/styles/virtual-list.css +1 -1
  641. package/dist/styles/visually-hidden.css +1 -0
  642. package/dist/styles.css +3 -3
  643. package/dist/theme/CynosureTheme.d.ts +7 -3
  644. package/dist/theme/CynosureTheme.js +47 -31
  645. package/dist/theme/CynosureTheme.js.map +1 -1
  646. package/dist/theme/index.d.ts +1 -0
  647. package/dist/theme/theme-context.d.ts +9 -0
  648. package/dist/theme/theme-context.js +8 -0
  649. package/dist/theme/theme-context.js.map +1 -0
  650. package/dist/theme/theme-init-script.js +0 -1
  651. package/dist/theme/theme-init-script.js.map +1 -1
  652. package/dist/theme/use-color-mode.d.ts +3 -2
  653. package/dist/theme/use-color-mode.js +35 -38
  654. package/dist/theme/use-color-mode.js.map +1 -1
  655. package/dist/theme/use-cynosure-theme.d.ts +18 -0
  656. package/dist/theme/use-cynosure-theme.js +23 -0
  657. package/dist/theme/use-cynosure-theme.js.map +1 -0
  658. package/dist/tokens/chart-themes.d.ts +38 -0
  659. package/dist/tokens/chart-themes.js +35 -0
  660. package/dist/tokens/chart-themes.js.map +1 -0
  661. package/dist/tokens/create-theme.d.ts +11 -1
  662. package/dist/tokens/create-theme.js +194 -125
  663. package/dist/tokens/create-theme.js.map +1 -1
  664. package/dist/tokens/defaults.d.ts +3 -3
  665. package/dist/tokens/defaults.js +1 -0
  666. package/dist/tokens/defaults.js.map +1 -1
  667. package/dist/tokens/editor-themes.d.ts +9 -2
  668. package/dist/tokens/editor-themes.js +43 -42
  669. package/dist/tokens/editor-themes.js.map +1 -1
  670. package/dist/tokens/index.d.ts +3 -1
  671. package/dist/tokens/named-themes.d.ts +41 -0
  672. package/dist/tokens/named-themes.js +118 -0
  673. package/dist/tokens/named-themes.js.map +1 -0
  674. package/dist/tokens/schema.d.ts +24 -1
  675. package/dist/tokens/schema.js +13 -0
  676. package/dist/tokens/schema.js.map +1 -0
  677. package/dist/tokens/to-css.js +34 -31
  678. package/dist/tokens/to-css.js.map +1 -1
  679. package/package.json +15 -6
  680. package/dist/components/Checkbox/ChoiceRow.d.ts +0 -39
  681. package/dist/components/Checkbox/ChoiceRow.js +0 -58
  682. package/dist/components/Checkbox/ChoiceRow.js.map +0 -1
  683. package/dist/components/Stack/space.d.ts +0 -18
  684. package/dist/components/Stack/space.js +0 -12
  685. package/dist/components/Stack/space.js.map +0 -1
  686. package/dist/styles/hidden-value.css +0 -1
  687. package/dist/styles/iconbutton.css +0 -1
@@ -0,0 +1,40 @@
1
+ import { type CSSProperties } from "react";
2
+ import type { Size } from "../../tokens/schema.js";
3
+ import { type MenuEntry } from "../Menu/Menu.js";
4
+ export interface MenubarTokens {
5
+ activeBg: string;
6
+ radius: string;
7
+ paddingInline: string;
8
+ height: string;
9
+ gap: string;
10
+ }
11
+ declare module "../../tokens/schema.js" {
12
+ interface ComponentTokens {
13
+ menubar: MenubarTokens;
14
+ }
15
+ }
16
+ export interface MenubarMenu {
17
+ /** The menu's title in the bar, and the accessible name of its list. */
18
+ label: string;
19
+ /** Its commands, exactly as Menu takes them: items (icons, shortcuts, checkable kinds) or labelled sections. */
20
+ items: MenuEntry[];
21
+ }
22
+ export interface MenubarProps {
23
+ /** Accessible name of the bar (required: a menubar must be named). */
24
+ label: string;
25
+ /** The top-level menus, in reading order. */
26
+ menus: MenubarMenu[];
27
+ /** Called with the chosen item's `value`, from whichever menu. */
28
+ onSelect: (value: string) => void;
29
+ /** Size of the menu titles (shared vocabulary: docs/conventions.md). Default "md". */
30
+ size?: Size;
31
+ /** Added to the bar, for layout. */
32
+ className?: string;
33
+ /** Layout only. Restyle through --cy-menubar-* tokens. */
34
+ style?: CSSProperties;
35
+ }
36
+ /**
37
+ * APG menubar: a row of menu titles (File, Edit, View) each opening a Menu. One Tab stop; Left/Right move between
38
+ * titles, or between menus while one is open; hovering a title while a menu is open switches to it.
39
+ */
40
+ export declare function Menubar({ label, menus, onSelect, size, className, style }: MenubarProps): import("react").JSX.Element;
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { ButtonBase as R } from "../../foundations/ButtonBase/ButtonBase.js";
3
+ import { isRtl as C } from "../../foundations/dir.js";
4
+ import { useRovingFocus as F } from "../../foundations/roving-focus.js";
5
+ import { MenuPanel as K } from "../Menu/Menu.js";
6
+ import { Fragment as z, useCallback as b, useId as B, useRef as h, useState as y } from "react";
7
+ import { jsx as i, jsxs as O } from "react/jsx-runtime";
8
+ var P = "[data-menubar-title]";
9
+ function N({ label: w, menus: s, onSelect: g, size: k = "md", className: f, style: x }) {
10
+ const D = B(), m = h(null), o = h([]), [e, p] = y(null), [T, A] = y("first");
11
+ F(m, {
12
+ orientation: "horizontal",
13
+ selector: P
14
+ });
15
+ for (let r = o.current.length; r < s.length; r++) o.current.push({ current: null });
16
+ const c = b((r, t = "first") => {
17
+ A(t), p(r);
18
+ }, []), d = b(() => p(null), []), $ = (r) => (t) => {
19
+ (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), c(r, t.key === "ArrowUp" ? "last" : "first"));
20
+ }, I = (r) => {
21
+ if (e === null || !r.target.closest('[role="menu"]')) return;
22
+ if (r.key === "Tab") {
23
+ const l = o.current[e]?.current;
24
+ l?.focus();
25
+ const u = o.current.map((a) => a.current).filter((a) => !!a);
26
+ for (const a of u) a.tabIndex = -1;
27
+ setTimeout(() => {
28
+ l?.isConnected && (l.tabIndex = 0);
29
+ });
30
+ return;
31
+ }
32
+ if (r.key !== "ArrowLeft" && r.key !== "ArrowRight" || r.defaultPrevented) return;
33
+ r.preventDefault();
34
+ const t = r.key === "ArrowRight" !== C(r.currentTarget), n = (e + (t ? 1 : -1) + s.length) % s.length;
35
+ c(n), o.current[n]?.current?.focus({ preventScroll: !0 });
36
+ };
37
+ return /* @__PURE__ */ i("div", {
38
+ ref: m,
39
+ role: "menubar",
40
+ "aria-label": w,
41
+ "aria-orientation": "horizontal",
42
+ className: f ? `cy-menubar ${f}` : "cy-menubar",
43
+ "data-size": k,
44
+ style: x,
45
+ onKeyDown: I,
46
+ children: s.map((r, t) => {
47
+ const n = o.current[t], l = `${D}-${t}`;
48
+ return /* @__PURE__ */ O(z, { children: [/* @__PURE__ */ i(R, {
49
+ ref: n,
50
+ role: "menuitem",
51
+ "aria-haspopup": "menu",
52
+ "aria-expanded": e === t,
53
+ "aria-controls": `${l}-menu`,
54
+ "data-menubar-title": "",
55
+ className: "cy-menubar-item",
56
+ onClick: () => e === t ? d() : c(t),
57
+ onKeyDown: $(t),
58
+ onPointerEnter: (u) => {
59
+ u.pointerType !== "touch" && e !== null && e !== t && c(t);
60
+ },
61
+ children: r.label
62
+ }), /* @__PURE__ */ i(K, {
63
+ id: l,
64
+ label: r.label,
65
+ items: r.items,
66
+ onSelect: g,
67
+ open: e === t,
68
+ onClose: d,
69
+ focusOn: T,
70
+ anchor: n,
71
+ placement: "bottom",
72
+ inside: [n],
73
+ returnFocus: n
74
+ })] }, `${t}-${r.label}`);
75
+ })
76
+ });
77
+ }
78
+ export {
79
+ N as Menubar
80
+ };
81
+
82
+ //# sourceMappingURL=Menubar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menubar.js","names":["ButtonBase","isRtl","useRovingFocus","MenuPanel","Fragment","useCallback","useId","useRef","useState","jsx","jsxs","TITLE","Menubar","label","menus","onSelect","size","className","style","id","bar","titles","open","setOpen","focusOn","setFocusOn","i","show","index","at","close","onTitleKeyDown","event","onBarKeyDown","title","all","t","forward","next","menu","menuId"],"sources":["../../../src/components/Menubar/Menubar.tsx"],"sourcesContent":["import {\n type CSSProperties,\n Fragment,\n type KeyboardEvent,\n type RefObject,\n useCallback,\n useId,\n useRef,\n useState,\n} from \"react\";\nimport { ButtonBase } from \"../../foundations/ButtonBase/ButtonBase.js\";\nimport { isRtl } from \"../../foundations/dir.js\";\nimport { useRovingFocus } from \"../../foundations/roving-focus.js\";\nimport type { Size } from \"../../tokens/schema.js\";\nimport { type MenuEntry, MenuPanel } from \"../Menu/Menu.js\";\n\nexport interface MenubarTokens {\n activeBg: string;\n radius: string;\n paddingInline: string;\n height: string;\n gap: string;\n}\n\ndeclare module \"../../tokens/schema.js\" {\n interface ComponentTokens {\n menubar: MenubarTokens;\n }\n}\n\nexport interface MenubarMenu {\n /** The menu's title in the bar, and the accessible name of its list. */\n label: string;\n /** Its commands, exactly as Menu takes them: items (icons, shortcuts, checkable kinds) or labelled sections. */\n items: MenuEntry[];\n}\n\nexport interface MenubarProps {\n /** Accessible name of the bar (required: a menubar must be named). */\n label: string;\n /** The top-level menus, in reading order. */\n menus: MenubarMenu[];\n /** Called with the chosen item's `value`, from whichever menu. */\n onSelect: (value: string) => void;\n /** Size of the menu titles (shared vocabulary: docs/conventions.md). Default \"md\". */\n size?: Size;\n /** Added to the bar, for layout. */\n className?: string;\n /** Layout only. Restyle through --cy-menubar-* tokens. */\n style?: CSSProperties;\n}\n\nconst TITLE = \"[data-menubar-title]\";\n\n/**\n * APG menubar: a row of menu titles (File, Edit, View) each opening a Menu. One Tab stop; Left/Right move between\n * titles, or between menus while one is open; hovering a title while a menu is open switches to it.\n */\nexport function Menubar({ label, menus, onSelect, size = \"md\", className, style }: MenubarProps) {\n const id = useId();\n const bar = useRef<HTMLDivElement>(null);\n const titles = useRef<RefObject<HTMLButtonElement | null>[]>([]);\n const [open, setOpen] = useState<number | null>(null);\n const [focusOn, setFocusOn] = useState<\"first\" | \"last\">(\"first\");\n useRovingFocus(bar, { orientation: \"horizontal\", selector: TITLE });\n\n for (let i = titles.current.length; i < menus.length; i++) titles.current.push({ current: null });\n\n const show = useCallback((index: number, at: \"first\" | \"last\" = \"first\") => {\n setFocusOn(at);\n setOpen(index);\n }, []);\n const close = useCallback(() => setOpen(null), []);\n\n const onTitleKeyDown = (index: number) => (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n show(index, event.key === \"ArrowUp\" ? \"last\" : \"first\");\n }\n // Enter and Space open on the first item through the click they cause.\n };\n\n // Keys inside an open menu bubble here: Left/Right move to the neighbouring menu, Tab leaves the bar.\n const onBarKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (open === null || !(event.target as HTMLElement).closest('[role=\"menu\"]')) return;\n if (event.key === \"Tab\") {\n // The menu closes itself. Tab and Shift+Tab leave the whole bar: focus its title (the bar's tab stop from now\n // on) and take every title out of the tab order until the browser has moved focus on.\n const title = titles.current[open]?.current;\n title?.focus();\n const all = titles.current.map((t) => t.current).filter((t): t is HTMLButtonElement => !!t);\n for (const t of all) t.tabIndex = -1;\n setTimeout(() => {\n if (title?.isConnected) title.tabIndex = 0;\n });\n return;\n }\n if ((event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") || event.defaultPrevented) return;\n event.preventDefault();\n const forward = (event.key === \"ArrowRight\") !== isRtl(event.currentTarget);\n const next = (open + (forward ? 1 : -1) + menus.length) % menus.length;\n show(next);\n titles.current[next]?.current?.focus({ preventScroll: true });\n };\n\n return (\n <div\n ref={bar}\n role=\"menubar\"\n aria-label={label}\n aria-orientation=\"horizontal\"\n className={className ? `cy-menubar ${className}` : \"cy-menubar\"}\n data-size={size}\n style={style}\n onKeyDown={onBarKeyDown}\n >\n {menus.map((menu, i) => {\n const title = titles.current[i] as RefObject<HTMLButtonElement | null>;\n const menuId = `${id}-${i}`;\n return (\n <Fragment key={`${i}-${menu.label}`}>\n <ButtonBase\n ref={title}\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n aria-expanded={open === i}\n aria-controls={`${menuId}-menu`}\n data-menubar-title=\"\"\n className=\"cy-menubar-item\"\n onClick={() => (open === i ? close() : show(i))}\n onKeyDown={onTitleKeyDown(i)}\n onPointerEnter={(event) => {\n // Hovering switches menus only while one is open; at rest it opens nothing.\n if (event.pointerType !== \"touch\" && open !== null && open !== i) show(i);\n }}\n >\n {menu.label}\n </ButtonBase>\n <MenuPanel\n id={menuId}\n label={menu.label}\n items={menu.items}\n onSelect={onSelect}\n open={open === i}\n onClose={close}\n focusOn={focusOn}\n anchor={title}\n placement=\"bottom\"\n inside={[title]}\n returnFocus={title}\n />\n </Fragment>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAoDA,IAAMW,IAAQ;AAMd,SAAgBC,EAAQ,EAAE,OAAAC,GAAO,OAAAC,GAAO,UAAAC,GAAU,MAAAC,IAAO,MAAM,WAAAC,GAAW,OAAAC,EAAA,GAAuB;AAC/F,QAAMC,IAAKb,EAAM,GACXc,IAAMb,EAAuB,IAAI,GACjCc,IAASd,EAA8C,CAAC,CAAC,GACzD,CAACe,GAAMC,CAAA,IAAWf,EAAwB,IAAI,GAC9C,CAACgB,GAASC,CAAA,IAAcjB,EAA2B,OAAO;AAChE,EAAAN,EAAekB,GAAK;AAAA,IAAE,aAAa;AAAA,IAAc,UAAUT;AAAA,EAAM,CAAC;AAElE,WAASe,IAAIL,EAAO,QAAQ,QAAQK,IAAIZ,EAAM,QAAQY,IAAK,CAAAL,EAAO,QAAQ,KAAK,EAAE,SAAS,KAAK,CAAC;AAEhG,QAAMM,IAAOtB,EAAA,CAAauB,GAAeC,IAAuB,YAAY;AAC1E,IAAAJ,EAAWI,CAAE,GACbN,EAAQK,CAAK;AAAA,EACf,GAAG,CAAC,CAAC,GACCE,IAAQzB,EAAA,MAAkBkB,EAAQ,IAAI,GAAG,CAAC,CAAC,GAE3CQ,IAAA,CAAkBH,MAAA,CAAmBI,MAA4C;AACrF,KAAIA,EAAM,QAAQ,eAAeA,EAAM,QAAQ,eAC7CA,EAAM,eAAe,GACrBL,EAAKC,GAAOI,EAAM,QAAQ,YAAY,SAAS,OAAO;AAAA,EAG1D,GAGMC,IAAA,CAAgBD,MAAyC;AAC7D,QAAIV,MAAS,QAAQ,CAAEU,EAAM,OAAuB,QAAQ,eAAe,EAAG;AAC9E,QAAIA,EAAM,QAAQ,OAAO;AAGvB,YAAME,IAAQb,EAAO,QAAQC,CAAA,GAAO;AACpC,MAAAY,GAAO,MAAM;AACb,YAAMC,IAAMd,EAAO,QAAQ,IAAA,CAAKe,MAAMA,EAAE,OAAO,EAAE,OAAA,CAAQA,MAA8B,CAAC,CAACA,CAAC;AAC1F,iBAAWA,KAAKD,EAAK,CAAAC,EAAE,WAAW;AAClC,iBAAA,MAAiB;AACf,QAAIF,GAAO,gBAAaA,EAAM,WAAW;AAAA,MAC3C,CAAC;AACD;AAAA,IACF;AACA,QAAKF,EAAM,QAAQ,eAAeA,EAAM,QAAQ,gBAAiBA,EAAM,iBAAkB;AACzF,IAAAA,EAAM,eAAe;AACrB,UAAMK,IAAWL,EAAM,QAAQ,iBAAkB/B,EAAM+B,EAAM,aAAa,GACpEM,KAAQhB,KAAQe,IAAU,IAAI,MAAMvB,EAAM,UAAUA,EAAM;AAChE,IAAAa,EAAKW,CAAI,GACTjB,EAAO,QAAQiB,CAAA,GAAO,SAAS,MAAM,EAAE,eAAe,GAAK,CAAC;AAAA,EAC9D;AAEA,SACE,gBAAA7B,EAAC,OAAD;AAAA,IACE,KAAKW;AAAA,IACL,MAAK;AAAA,IACL,cAAYP;AAAA,IACZ,oBAAiB;AAAA,IACjB,WAAWI,IAAY,cAAcA,CAAA,KAAc;AAAA,IACnD,aAAWD;AAAA,IACJ,OAAAE;AAAA,IACP,WAAWe;AAAA,IAEV,UAAAnB,EAAM,IAAA,CAAKyB,GAAMb,MAAM;AACtB,YAAMQ,IAAQb,EAAO,QAAQK,CAAA,GACvBc,IAAS,GAAGrB,CAAA,IAAMO,CAAA;AACxB,aACE,gBAAAhB,EAACN,GAAD,EAAA,UAAA,CACE,gBAAAK,EAACT,GAAD;AAAA,QACE,KAAKkC;AAAA,QACL,MAAK;AAAA,QACL,iBAAc;AAAA,QACd,iBAAeZ,MAASI;AAAA,QACxB,iBAAe,GAAGc,CAAA;AAAA,QAClB,sBAAmB;AAAA,QACnB,WAAU;AAAA,QACV,SAAA,MAAgBlB,MAASI,IAAII,EAAM,IAAIH,EAAKD,CAAC;AAAA,QAC7C,WAAWK,EAAeL,CAAC;AAAA,QAC3B,gBAAA,CAAiBM,MAAU;AAEzB,UAAIA,EAAM,gBAAgB,WAAWV,MAAS,QAAQA,MAASI,KAAGC,EAAKD,CAAC;AAAA,QAC1E;AAAA,QAEC,UAAAa,EAAK;AAAA,MACI,CAAA,GACZ,gBAAA9B,EAACN,GAAD;AAAA,QACE,IAAIqC;AAAA,QACJ,OAAOD,EAAK;AAAA,QACZ,OAAOA,EAAK;AAAA,QACF,UAAAxB;AAAA,QACV,MAAMO,MAASI;AAAA,QACf,SAASI;AAAA,QACA,SAAAN;AAAA,QACT,QAAQU;AAAA,QACR,WAAU;AAAA,QACV,QAAQ,CAACA,CAAK;AAAA,QACd,aAAaA;AAAA,MACd,CAAA,CACO,EAAA,GA/BK,GAAGR,CAAA,IAAKa,EAAK,KAAA,EA+BlB;AAAA,IAEd,CAAC;AAAA,EACE,CAAA;AAET"}
@@ -0,0 +1 @@
1
+ export { Menubar, type MenubarMenu, type MenubarProps, type MenubarTokens } from "./Menubar.js";
@@ -1,9 +1,11 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
2
  import type { IconData } from "../../icons/types.js";
3
- import type { Tone } from "../../tokens/schema.js";
3
+ import type { Size, Tone } from "../../tokens/schema.js";
4
4
  export interface NoticeTokens {
5
5
  radius: string;
6
6
  padding: string;
7
+ /** Padding of a small Notice (`size="sm"`). */
8
+ paddingSm: string;
7
9
  softMix: string;
8
10
  }
9
11
  declare module "../../tokens/schema.js" {
@@ -21,6 +23,13 @@ export interface NoticeProps {
21
23
  * whose content changes are announced politely.
22
24
  */
23
25
  tone?: Tone;
26
+ /**
27
+ * `soft` is a tinted panel with a tone edge; `solid` is the tone's solid colour with the readable text that goes on
28
+ * it, for a message that must stand out (an editor's error banner). Default "soft".
29
+ */
30
+ variant?: "soft" | "solid";
31
+ /** `sm`: less padding, and the title and message share one line when they fit (a status strip). Default "md". */
32
+ size?: Extract<Size, "sm" | "md">;
24
33
  /** Short heading above the message. */
25
34
  title?: ReactNode;
26
35
  /** One or two Buttons; they move under the text in narrow containers. */
@@ -41,4 +50,4 @@ export interface NoticeProps {
41
50
  children?: ReactNode;
42
51
  }
43
52
  /** An inline message about part of the page: a status, a warning or an error that stays until it is resolved. */
44
- export declare function Notice({ tone, title, action, dismissible, onDismiss, icon, labels, className, style, children, }: NoticeProps): import("react").JSX.Element | null;
53
+ export declare function Notice({ tone, variant, size, title, action, dismissible, onDismiss, icon, labels, className, style, children, }: NoticeProps): import("react").JSX.Element | null;
@@ -1,47 +1,51 @@
1
1
  "use client";
2
- import { Icon as u } from "../../foundations/Icon/Icon.js";
3
- import { IconButton as N } from "../IconButton/IconButton.js";
4
- import { close as h } from "../../icons/close.js";
5
- import { TONE_ICONS as v } from "../../foundations/tone-icons.js";
6
- import { useState as x } from "react";
7
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
8
- function S({ tone: c = "info", title: i, action: t, dismissible: m = !1, onDismiss: s, icon: o, labels: d, className: n, style: y, children: r }) {
9
- const [f, p] = x(!1);
10
- if (f) return null;
11
- const a = o === void 0 ? v[c] : o;
2
+ import { Icon as v } from "../../foundations/Icon/Icon.js";
3
+ import { IconButton as h } from "../IconButton/IconButton.js";
4
+ import { close as x } from "../../icons/close.js";
5
+ import { TONE_ICONS as C } from "../../foundations/tone-icons.js";
6
+ import { useState as g } from "react";
7
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
8
+ function _({ tone: i = "info", variant: c = "soft", size: d = "md", title: s, action: t, dismissible: y = !1, onDismiss: o, icon: n, labels: f, className: r, style: p, children: a }) {
9
+ const [N, u] = g(!1);
10
+ if (N) return null;
11
+ const l = n === void 0 ? C[i] : n;
12
12
  return /* @__PURE__ */ e("div", {
13
- role: c === "danger" ? "alert" : "status",
14
- className: n ? `cy-notice ${n}` : "cy-notice",
15
- "data-tone": c,
16
- style: y,
17
- children: /* @__PURE__ */ l("div", {
13
+ role: i === "danger" ? "alert" : "status",
14
+ className: r ? `cy-notice ${r}` : "cy-notice",
15
+ "data-tone": i,
16
+ "data-variant": c,
17
+ "data-size": d,
18
+ style: p,
19
+ children: /* @__PURE__ */ m("div", {
18
20
  className: "cy-notice-main cy-reset",
19
21
  children: [
20
- a && /* @__PURE__ */ e(u, {
21
- icon: a,
22
+ l && /* @__PURE__ */ e(v, {
23
+ icon: l,
22
24
  className: "cy-notice-icon"
23
25
  }),
24
- /* @__PURE__ */ l("div", {
26
+ /* @__PURE__ */ m("div", {
25
27
  className: "cy-notice-text cy-reset",
26
- children: [i && /* @__PURE__ */ e("span", {
28
+ children: [s && /* @__PURE__ */ e("span", {
27
29
  className: "cy-notice-title cy-reset",
28
- children: i
29
- }), r && /* @__PURE__ */ e("div", {
30
+ children: s
31
+ }), a && /* @__PURE__ */ e("div", {
30
32
  className: "cy-notice-body cy-reset",
31
- children: r
33
+ children: a
32
34
  })]
33
35
  }),
34
36
  t && /* @__PURE__ */ e("div", {
35
37
  className: "cy-notice-action cy-reset",
36
38
  children: t
37
39
  }),
38
- m && /* @__PURE__ */ e(N, {
39
- icon: h,
40
- label: d?.dismiss ?? "Dismiss",
40
+ y && /* @__PURE__ */ e(h, {
41
+ icon: x,
42
+ label: f?.dismiss ?? "Dismiss",
41
43
  variant: "ghost",
42
44
  size: "sm",
45
+ ...c === "solid" && { iconColor: "var(--_notice-on)" },
46
+ wrapperClassName: "cy-notice-dismiss",
43
47
  onClick: () => {
44
- s?.(), s || p(!0);
48
+ o?.(), o || u(!0);
45
49
  }
46
50
  })
47
51
  ]
@@ -49,7 +53,7 @@ function S({ tone: c = "info", title: i, action: t, dismissible: m = !1, onDismi
49
53
  });
50
54
  }
51
55
  export {
52
- S as Notice
56
+ _ as Notice
53
57
  };
54
58
 
55
59
  //# sourceMappingURL=Notice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notice.js","names":["closeIcon","Icon","IconButton","close","TONE_ICONS","useState","jsx","jsxs","Notice","tone","title","action","dismissible","onDismiss","icon","labels","className","style","children","hidden","setHidden","glyph"],"sources":["../../../src/components/Notice/Notice.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, useState } from \"react\";\nimport { Icon } from \"../../foundations/Icon/Icon.js\";\nimport { TONE_ICONS } from \"../../foundations/tone-icons.js\";\nimport { close as closeIcon } from \"../../icons/close.js\";\nimport type { IconData } from \"../../icons/types.js\";\nimport type { Tone } from \"../../tokens/schema.js\";\nimport { IconButton } from \"../IconButton/IconButton.js\";\n\nexport interface NoticeTokens {\n radius: string;\n padding: string;\n softMix: string;\n}\n\ndeclare module \"../../tokens/schema.js\" {\n interface ComponentTokens {\n notice: NoticeTokens;\n }\n}\n\nexport interface NoticeLabels {\n /** Accessible name of the dismiss button. */\n dismiss: string;\n}\n\nexport interface NoticeProps {\n /**\n * Colour and icon. `danger` is `role=\"alert\"` (announced even when it mounts filled); the others are `role=\"status\"`,\n * whose content changes are announced politely.\n */\n tone?: Tone;\n /** Short heading above the message. */\n title?: ReactNode;\n /** One or two Buttons; they move under the text in narrow containers. */\n action?: ReactNode;\n /** Shows a close button. The Notice hides itself unless you control it with `onDismiss` and unmount it. */\n dismissible?: boolean;\n /** Called when the close button is pressed. With it, hiding the Notice is up to you. */\n onDismiss?: () => void;\n /** Replace the tone's icon, or `null` for none. */\n icon?: IconData | null;\n /** Replace the built-in English text: the dismiss button's name. */\n labels?: Partial<NoticeLabels>;\n /** Added to the root element, for layout. */\n className?: string;\n /** Layout only. Restyle through --cy-notice-* tokens. */\n style?: CSSProperties;\n /** The message. */\n children?: ReactNode;\n}\n\n/** An inline message about part of the page: a status, a warning or an error that stays until it is resolved. */\nexport function Notice({\n tone = \"info\",\n title,\n action,\n dismissible = false,\n onDismiss,\n icon,\n labels,\n className,\n style,\n children,\n}: NoticeProps) {\n const [hidden, setHidden] = useState(false);\n if (hidden) return null;\n const glyph = icon === undefined ? TONE_ICONS[tone] : icon;\n return (\n <div\n role={tone === \"danger\" ? \"alert\" : \"status\"}\n className={className ? `cy-notice ${className}` : \"cy-notice\"}\n data-tone={tone}\n style={style}\n >\n <div className=\"cy-notice-main cy-reset\">\n {glyph && <Icon icon={glyph} className=\"cy-notice-icon\" />}\n <div className=\"cy-notice-text cy-reset\">\n {title && <span className=\"cy-notice-title cy-reset\">{title}</span>}\n {children && <div className=\"cy-notice-body cy-reset\">{children}</div>}\n </div>\n {action && <div className=\"cy-notice-action cy-reset\">{action}</div>}\n {dismissible && (\n <IconButton\n icon={closeIcon}\n label={labels?.dismiss ?? \"Dismiss\"}\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => {\n onDismiss?.();\n if (!onDismiss) setHidden(true);\n }}\n />\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAoDA,SAAgBQ,EAAO,EACrB,MAAAC,IAAO,QACP,OAAAC,GACA,QAAAC,GACA,aAAAC,IAAc,IACd,WAAAC,GACA,MAAAC,GACA,QAAAC,GACA,WAAAC,GACA,OAAAC,GACA,UAAAC,EAAA,GACc;AACd,QAAM,CAACC,GAAQC,CAAA,IAAaf,EAAS,EAAK;AAC1C,MAAIc,EAAQ,QAAO;AACnB,QAAME,IAAQP,MAAS,SAAYV,EAAWK,CAAA,IAAQK;AACtD,SACE,gBAAAR,EAAC,OAAD;AAAA,IACE,MAAMG,MAAS,WAAW,UAAU;AAAA,IACpC,WAAWO,IAAY,aAAaA,CAAA,KAAc;AAAA,IAClD,aAAWP;AAAA,IACJ,OAAAQ;AAAA,IAEP,UAAA,gBAAAV,EAAC,OAAD;AAAA,MAAK,WAAU;AAAA,MAAf,UAAA;AAAA,QACGc,KAAS,gBAAAf,EAACL,GAAD;AAAA,UAAM,MAAMoB;AAAA,UAAO,WAAU;AAAA,QAAkB,CAAA;AAAA,QACzD,gBAAAd,EAAC,OAAD;AAAA,UAAK,WAAU;AAAA,UAAf,UAAA,CACGG,KAAS,gBAAAJ,EAAC,QAAD;AAAA,YAAM,WAAU;AAAA,YAA4B,UAAAI;AAAA,UAAY,CAAA,GACjEQ,KAAY,gBAAAZ,EAAC,OAAD;AAAA,YAAK,WAAU;AAAA,YAA2B,UAAAY;AAAA,UAAc,CAAA,CAClE;AAAA,Q;A,QACJP,KAAU,gBAAAL,EAAC,OAAD;AAAA,UAAK,WAAU;AAAA,UAA6B,UAAAK;AAAA,QAAY,CAAA;AAAA,QAClEC,KACC,gBAAAN,EAACJ,GAAD;AAAA,UACE,MAAMF;AAAAA,UACN,OAAOe,GAAQ,WAAW;AAAA,UAC1B,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,SAAA,MAAe;AACb,YAAAF,IAAY,GACPA,KAAWO,EAAU,EAAI;AAAA,UAChC;AAAA,QACD,CAAA;AAAA,MAEA;AAAA,I;A,EACF,CAAA;AAET"}
1
+ {"version":3,"file":"Notice.js","names":["closeIcon","Icon","IconButton","close","TONE_ICONS","useState","jsx","jsxs","Notice","tone","variant","size","title","action","dismissible","onDismiss","icon","labels","className","style","children","hidden","setHidden","glyph"],"sources":["../../../src/components/Notice/Notice.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, useState } from \"react\";\nimport { Icon } from \"../../foundations/Icon/Icon.js\";\nimport { TONE_ICONS } from \"../../foundations/tone-icons.js\";\nimport { close as closeIcon } from \"../../icons/close.js\";\nimport type { IconData } from \"../../icons/types.js\";\nimport type { Size, Tone } from \"../../tokens/schema.js\";\nimport { IconButton } from \"../IconButton/IconButton.js\";\n\nexport interface NoticeTokens {\n radius: string;\n padding: string;\n /** Padding of a small Notice (`size=\"sm\"`). */\n paddingSm: string;\n softMix: string;\n}\n\ndeclare module \"../../tokens/schema.js\" {\n interface ComponentTokens {\n notice: NoticeTokens;\n }\n}\n\nexport interface NoticeLabels {\n /** Accessible name of the dismiss button. */\n dismiss: string;\n}\n\nexport interface NoticeProps {\n /**\n * Colour and icon. `danger` is `role=\"alert\"` (announced even when it mounts filled); the others are `role=\"status\"`,\n * whose content changes are announced politely.\n */\n tone?: Tone;\n /**\n * `soft` is a tinted panel with a tone edge; `solid` is the tone's solid colour with the readable text that goes on\n * it, for a message that must stand out (an editor's error banner). Default \"soft\".\n */\n variant?: \"soft\" | \"solid\";\n /** `sm`: less padding, and the title and message share one line when they fit (a status strip). Default \"md\". */\n size?: Extract<Size, \"sm\" | \"md\">;\n /** Short heading above the message. */\n title?: ReactNode;\n /** One or two Buttons; they move under the text in narrow containers. */\n action?: ReactNode;\n /** Shows a close button. The Notice hides itself unless you control it with `onDismiss` and unmount it. */\n dismissible?: boolean;\n /** Called when the close button is pressed. With it, hiding the Notice is up to you. */\n onDismiss?: () => void;\n /** Replace the tone's icon, or `null` for none. */\n icon?: IconData | null;\n /** Replace the built-in English text: the dismiss button's name. */\n labels?: Partial<NoticeLabels>;\n /** Added to the root element, for layout. */\n className?: string;\n /** Layout only. Restyle through --cy-notice-* tokens. */\n style?: CSSProperties;\n /** The message. */\n children?: ReactNode;\n}\n\n/** An inline message about part of the page: a status, a warning or an error that stays until it is resolved. */\nexport function Notice({\n tone = \"info\",\n variant = \"soft\",\n size = \"md\",\n title,\n action,\n dismissible = false,\n onDismiss,\n icon,\n labels,\n className,\n style,\n children,\n}: NoticeProps) {\n const [hidden, setHidden] = useState(false);\n if (hidden) return null;\n const glyph = icon === undefined ? TONE_ICONS[tone] : icon;\n return (\n <div\n role={tone === \"danger\" ? \"alert\" : \"status\"}\n className={className ? `cy-notice ${className}` : \"cy-notice\"}\n data-tone={tone}\n data-variant={variant}\n data-size={size}\n style={style}\n >\n <div className=\"cy-notice-main cy-reset\">\n {glyph && <Icon icon={glyph} className=\"cy-notice-icon\" />}\n <div className=\"cy-notice-text cy-reset\">\n {title && <span className=\"cy-notice-title cy-reset\">{title}</span>}\n {children && <div className=\"cy-notice-body cy-reset\">{children}</div>}\n </div>\n {action && <div className=\"cy-notice-action cy-reset\">{action}</div>}\n {dismissible && (\n <IconButton\n icon={closeIcon}\n label={labels?.dismiss ?? \"Dismiss\"}\n variant=\"ghost\"\n size=\"sm\"\n // On a fill the close icon takes the fill's text colour; on the soft panel, the button's own.\n {...(variant === \"solid\" && { iconColor: \"var(--_notice-on)\" })}\n wrapperClassName=\"cy-notice-dismiss\"\n onClick={() => {\n onDismiss?.();\n if (!onDismiss) setHidden(true);\n }}\n />\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AA6DA,SAAgBQ,EAAO,EACrB,MAAAC,IAAO,QACP,SAAAC,IAAU,QACV,MAAAC,IAAO,MACP,OAAAC,GACA,QAAAC,GACA,aAAAC,IAAc,IACd,WAAAC,GACA,MAAAC,GACA,QAAAC,GACA,WAAAC,GACA,OAAAC,GACA,UAAAC,EAAA,GACc;AACd,QAAM,CAACC,GAAQC,CAAA,IAAajB,EAAS,EAAK;AAC1C,MAAIgB,EAAQ,QAAO;AACnB,QAAME,IAAQP,MAAS,SAAYZ,EAAWK,CAAA,IAAQO;AACtD,SACE,gBAAAV,EAAC,OAAD;AAAA,IACE,MAAMG,MAAS,WAAW,UAAU;AAAA,IACpC,WAAWS,IAAY,aAAaA,CAAA,KAAc;AAAA,IAClD,aAAWT;AAAA,IACX,gBAAcC;AAAA,IACd,aAAWC;AAAA,IACJ,OAAAQ;AAAA,IAEP,UAAA,gBAAAZ,EAAC,OAAD;AAAA,MAAK,WAAU;AAAA,MAAf,UAAA;AAAA,QACGgB,KAAS,gBAAAjB,EAACL,GAAD;AAAA,UAAM,MAAMsB;AAAA,UAAO,WAAU;AAAA,QAAkB,CAAA;AAAA,QACzD,gBAAAhB,EAAC,OAAD;AAAA,UAAK,WAAU;AAAA,UAAf,UAAA,CACGK,KAAS,gBAAAN,EAAC,QAAD;AAAA,YAAM,WAAU;AAAA,YAA4B,UAAAM;AAAA,UAAY,CAAA,GACjEQ,KAAY,gBAAAd,EAAC,OAAD;AAAA,YAAK,WAAU;AAAA,YAA2B,UAAAc;AAAA,UAAc,CAAA,CAClE;AAAA,Q;A,QACJP,KAAU,gBAAAP,EAAC,OAAD;AAAA,UAAK,WAAU;AAAA,UAA6B,UAAAO;AAAA,QAAY,CAAA;AAAA,QAClEC,KACC,gBAAAR,EAACJ,GAAD;AAAA,UACE,MAAMF;AAAAA,UACN,OAAOiB,GAAQ,WAAW;AAAA,UAC1B,SAAQ;AAAA,UACR,MAAK;AAAA,UAEL,GAAKP,MAAY,WAAW,EAAE,WAAW,oBAAoB;AAAA,UAC7D,kBAAiB;AAAA,UACjB,SAAA,MAAe;AACb,YAAAK,IAAY,GACPA,KAAWO,EAAU,EAAI;AAAA,UAChC;AAAA,QACD,CAAA;AAAA,MAEA;AAAA,I;A,EACF,CAAA;AAET"}
@@ -1,11 +1,12 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
2
  import type { Size } from "../../tokens/schema.js";
3
+ import type { FieldLayoutProps } from "../Field/Field.js";
3
4
  export interface NumberFieldLabels {
4
5
  /** Stepper button names. Defaults: "Decrease", "Increase". */
5
6
  decrement: string;
6
7
  increment: string;
7
8
  }
8
- export interface NumberFieldProps {
9
+ export interface NumberFieldProps extends FieldLayoutProps {
9
10
  /** Visible label; it names the field. */
10
11
  label: ReactNode;
11
12
  /** Visually hide the label (it still names the field). Prefer visible labels. */
@@ -62,10 +63,14 @@ export interface NumberFieldProps {
62
63
  /** Layout only. */
63
64
  style?: CSSProperties;
64
65
  }
65
- /** Reads what a person typed in `locale`: group separators, the local decimal mark, a typographic minus, a % or a currency. */
66
+ /**
67
+ * Reads what a person typed, or what the field wrote, in `locale` and `options`: the locale's digits (Arabic-Indic,
68
+ * Devanagari…), group separators, decimal mark and minus, a typographic minus, currency, percent and unit text, and
69
+ * accounting brackets.
70
+ */
66
71
  export declare function parseNumber(text: string, locale?: string, options?: Intl.NumberFormatOptions): number | null;
67
72
  /**
68
73
  * A number input: type it in your own format, or step it with the arrow keys, Page Up/Down, Home/End or the − and +
69
74
  * buttons. APG spinbutton; locale-aware; takes part in forms with the plain number.
70
75
  */
71
- export declare function NumberField({ label, labelHidden, description, error, value, defaultValue, onChange, min, max, step, largeStep, locale, formatOptions, hideSteppers, name, form, required, disabled, readOnly, placeholder, size, variant, labels, scrub, className, style, }: NumberFieldProps): import("react").JSX.Element;
76
+ export declare function NumberField({ label, labelHidden, layout, width, description, error, value, defaultValue, onChange, min, max, step, largeStep, locale, formatOptions, hideSteppers, name, form, required, disabled, readOnly, placeholder, size, variant, labels, scrub, className, style, }: NumberFieldProps): import("react").JSX.Element;
@@ -1,140 +1,191 @@
1
1
  "use client";
2
- import { useControllableState as nt } from "../../foundations/controllable.js";
3
- import { useClientLayoutEffect as ot } from "../../foundations/client-layout-effect.js";
4
- import { clamp as ut } from "../../foundations/math.js";
5
- import { IconButton as _ } from "../IconButton/IconButton.js";
6
- import { minus as ct } from "../../icons/minus.js";
7
- import { plus as st } from "../../icons/plus.js";
8
- import { TextField as lt } from "../TextField/TextField.js";
9
- import { useDrag as it } from "../../foundations/drag.js";
10
- import { HiddenValue as at } from "../../foundations/HiddenValue/HiddenValue.js";
11
- import { useMemo as mt, useRef as y, useState as ft } from "react";
12
- import { Fragment as dt, jsx as E, jsxs as $ } from "react/jsx-runtime";
13
- var pt = {
2
+ import { useControllableState as ut } from "../../foundations/controllable.js";
3
+ import { useClientLayoutEffect as st } from "../../foundations/client-layout-effect.js";
4
+ import { ariaNumber as T, clamp as ct, plainNumber as lt, roundLike as z, snapToStep as at } from "../../foundations/math.js";
5
+ import { IconButton as G } from "../IconButton/IconButton.js";
6
+ import { minus as mt } from "../../icons/minus.js";
7
+ import { plus as ft } from "../../icons/plus.js";
8
+ import { TextField as pt } from "../TextField/TextField.js";
9
+ import { useDrag as gt } from "../../foundations/drag.js";
10
+ import { HiddenValue as dt } from "../../foundations/HiddenValue/HiddenValue.js";
11
+ import { useMemo as bt, useRef as A, useState as vt } from "react";
12
+ import { Fragment as Nt, jsx as E, jsxs as H } from "react/jsx-runtime";
13
+ var It = {
14
14
  decrement: "Decrease",
15
15
  increment: "Increase"
16
- }, C = (d) => (String(d).split(".")[1] ?? "").length;
17
- function U(d, D, w) {
18
- const N = new Intl.NumberFormat(D).formatToParts(-12345.6), p = N.find((n) => n.type === "group")?.value ?? ",", I = N.find((n) => n.type === "decimal")?.value ?? ".", h = d.replace(/[−‒–]/g, "-").split(p).join(p.trim() ? "" : p).replace(/\s/g, "").split(I).join(".").replace(/[^\d.-]/g, "");
19
- if (!/^-?\d*\.?\d+$|^-?\d+\.?$/.test(h)) return null;
20
- const e = Number(h);
21
- return Number.isFinite(e) ? w?.style === "percent" ? e / 100 : e : null;
16
+ }, K = /* @__PURE__ */ new Map(), St = [
17
+ -12345675e-1,
18
+ 12345675e-1,
19
+ 1,
20
+ 2
21
+ ];
22
+ function Ft(c, m) {
23
+ const d = JSON.stringify([c ?? "", m ?? {}]), l = K.get(d);
24
+ if (l) return l;
25
+ const b = new Intl.NumberFormat(c), F = (m?.numberingSystem ? new Intl.NumberFormat(c, m) : b).resolvedOptions().numberingSystem;
26
+ let v = [];
27
+ try {
28
+ v = St.flatMap((r) => new Intl.NumberFormat(c, {
29
+ ...m,
30
+ minimumFractionDigits: 1,
31
+ maximumFractionDigits: 1,
32
+ minimumSignificantDigits: void 0,
33
+ maximumSignificantDigits: void 0
34
+ }).formatToParts(r));
35
+ } catch {
36
+ }
37
+ const h = [...v, ...b.formatToParts(-12345.6)], e = (r, u) => h.find((s) => s.type === r)?.value ?? u, n = new Intl.NumberFormat(c, {
38
+ numberingSystem: F,
39
+ useGrouping: !1
40
+ }), o = {
41
+ group: e("group", ","),
42
+ decimal: e("decimal", "."),
43
+ minus: e("minusSign", "-"),
44
+ digits: Array.from({ length: 10 }, (r, u) => n.format(u)),
45
+ affixes: [...new Set(v.filter((r) => [
46
+ "currency",
47
+ "percentSign",
48
+ "unit",
49
+ "literal",
50
+ "compact"
51
+ ].includes(r.type)).map((r) => r.value.trim()).filter(Boolean))].sort((r, u) => u.length - r.length)
52
+ };
53
+ return K.set(d, o), o;
22
54
  }
23
- function xt({ label: d, labelHidden: D, description: w, error: N, value: p, defaultValue: I = null, onChange: h, min: e, max: n, step: o = 1, largeStep: z, locale: F, formatOptions: g, hideSteppers: H = !1, name: K, form: A, required: R, disabled: c, readOnly: l, placeholder: V, size: Y = "md", variant: G = "outline", labels: q, scrub: J = !1, className: k, style: j }) {
24
- const B = {
25
- ...pt,
26
- ...q
27
- }, [r, Q, W] = nt(p, I, h), [m, x] = ft(null), b = y(null), X = mt(() => new Intl.NumberFormat(F, {
55
+ var j = /[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/g;
56
+ function R(c, m, d) {
57
+ const { group: l, decimal: b, minus: F, digits: v, affixes: h } = Ft(m, d);
58
+ let e = c.replace(j, "");
59
+ const n = /\(.*\)/.test(e);
60
+ for (const s of h) s !== l.trim() && s !== b && s !== F.replace(j, "") && (e = e.split(s).join(" "));
61
+ e = e.replace(/\p{Nd}/gu, (s) => {
62
+ const f = v.indexOf(s);
63
+ return f >= 0 ? String(f) : s;
64
+ }), e = e.replace(/[()]/g, "");
65
+ const o = F.replace(j, "");
66
+ o && o !== "-" && (e = e.split(o).join("-")), e = e.replace(/[−‒–]/g, "-"), l.trim() ? (e = e.split(l).join(""), l === "’" && (e = e.split("'").join(""))) : e = e.replace(/\s/g, "");
67
+ const r = e.replace(/\s/g, "").split(b).join(".").replace(/[^\d.-]/g, "");
68
+ if (!/^-?\d*\.?\d+$|^-?\d+\.?$/.test(r)) return null;
69
+ let u = Number(r);
70
+ return Number.isFinite(u) ? (n && u > 0 && (u = -u), d?.style === "percent" ? Number((u / 100).toPrecision(15)) : u) : null;
71
+ }
72
+ function jt({ label: c, labelHidden: m, layout: d, width: l, description: b, error: F, value: v, defaultValue: h = null, onChange: e, min: n, max: o, step: r = 1, largeStep: u, locale: s, formatOptions: f, hideSteppers: V = !1, name: Y, form: P, required: J, disabled: p, readOnly: N, placeholder: q, size: Q = "md", variant: W = "outline", labels: X, scrub: Z = !1, className: B, style: L }) {
73
+ const _ = {
74
+ ...It,
75
+ ...X
76
+ }, [i, O, tt] = ut(v, h, e), [w, x] = vt(null), y = A(null), et = bt(() => new Intl.NumberFormat(s, {
28
77
  maximumFractionDigits: 20,
29
- ...g
30
- }), [F, g]), L = (t) => t === null ? "" : X.format(t), M = (t) => ut(t, e ?? Number.NEGATIVE_INFINITY, n ?? Number.POSITIVE_INFINITY), i = (t) => {
31
- x(null), t !== r && Q(t);
32
- }, f = (t) => {
33
- if (c || l) return;
34
- const u = e ?? 0, s = m !== null ? U(m, F, g) ?? r : r, a = s ?? (t > 0 ? e ?? 0 : n ?? 0), T = s === null ? a : Math.round((a - u + t) / o) * o + u, rt = Math.max(C(o), C(u));
35
- i(M(Number(T.toFixed(rt))));
36
- }, P = () => {
37
- if (m === null) return;
38
- if (m.trim() === "") return i(null);
39
- const t = U(m, F, g);
40
- i(t === null ? r : M(t));
41
- }, Z = (t) => {
42
- const u = z ?? o * 10, s = {
43
- ArrowUp: () => f(o),
44
- ArrowDown: () => f(-o),
45
- PageUp: () => f(u),
46
- PageDown: () => f(-u),
47
- Enter: P
78
+ ...f
79
+ }), [s, f]), $ = (t) => t === null ? "" : et.format(t), C = (t) => ct(t, n ?? Number.NEGATIVE_INFINITY, o ?? Number.POSITIVE_INFINITY), I = (t) => {
80
+ x(null), t !== i && O(t);
81
+ }, D = (t) => {
82
+ if (p || N) return;
83
+ const a = n ?? 0, g = w !== null ? R(w, s, f) ?? i : i, S = g ?? (t > 0 ? n ?? 0 : o ?? 0);
84
+ I(C(g === null ? z(S, r, a) : at(S + t, r, a)));
85
+ }, U = () => {
86
+ if (w === null) return;
87
+ if (w.trim() === "") return I(null);
88
+ const t = R(w, s, f);
89
+ I(t === null ? i : C(t));
90
+ }, rt = (t) => {
91
+ const a = u ?? r * 10, g = {
92
+ ArrowUp: () => D(r),
93
+ ArrowDown: () => D(-r),
94
+ PageUp: () => D(a),
95
+ PageDown: () => D(-a),
96
+ Enter: U
48
97
  };
49
- e !== void 0 && (s.Home = () => !c && !l && i(e)), n !== void 0 && (s.End = () => !c && !l && i(n));
50
- const a = s[t.key];
51
- a && (t.key !== "Enter" && t.preventDefault(), a());
52
- }, v = y(null);
53
- ot(() => {
54
- const t = J && !c && !l ? b.current?.labels?.[0] ?? null : null;
55
- v.current && v.current !== t && delete v.current.dataset.scrub, t && (t.dataset.scrub = ""), v.current = t;
98
+ n !== void 0 && (g.Home = () => !p && !N && I(n)), o !== void 0 && (g.End = () => !p && !N && I(o));
99
+ const S = g[t.key];
100
+ S && (t.key !== "Enter" && t.preventDefault(), S());
101
+ }, k = A(null);
102
+ st(() => {
103
+ const t = Z && !p && !N ? y.current?.labels?.[0] ?? null : null;
104
+ k.current && k.current !== t && delete k.current.dataset.scrub, t && (t.dataset.scrub = ""), k.current = t;
56
105
  });
57
- const S = y(null);
58
- it(v, {
106
+ const M = A(null);
107
+ gt(k, {
59
108
  distance: 3,
60
109
  touchAction: "css",
61
110
  onStart: () => {
62
- S.current = r;
111
+ M.current = i;
63
112
  },
64
- onMove: ({ delta: t, event: u }) => {
65
- const s = Math.round(t.x / 4) * (u.shiftKey ? 10 : 1), a = S.current ?? e ?? 0, T = Math.max(C(o), C(e ?? 0));
66
- i(M(Number((a + s * o).toFixed(T))));
113
+ onMove: ({ delta: t, event: a }) => {
114
+ const g = Math.round(t.x / 4) * (a.shiftKey ? 10 : 1), S = M.current ?? n ?? 0;
115
+ I(C(z(S + g * r, r, n ?? 0)));
67
116
  },
68
- onEnd: (t, u) => {
69
- u && i(S.current), b.current?.focus({ preventScroll: !0 });
117
+ onEnd: (t, a) => {
118
+ a && I(M.current), y.current?.focus({ preventScroll: !0 });
70
119
  }
71
120
  });
72
- const O = r !== null && e !== void 0 && r <= e, tt = r !== null && n !== void 0 && r >= n, et = Number.isInteger(o) && (e ?? 0) >= 0 && g?.style !== "percent";
73
- return /* @__PURE__ */ $(dt, { children: [/* @__PURE__ */ E(lt, {
74
- ref: b,
75
- label: d,
76
- labelHidden: D,
77
- description: w,
78
- error: N,
79
- size: Y,
80
- variant: G,
81
- className: k ? `cy-number-field ${k}` : "cy-number-field",
82
- ...j ? { style: j } : {},
121
+ const nt = i !== null && n !== void 0 && i <= n, it = i !== null && o !== void 0 && i >= o, ot = Number.isInteger(r) && (n ?? 0) >= 0 && f?.style !== "percent";
122
+ return /* @__PURE__ */ H(Nt, { children: [/* @__PURE__ */ E(pt, {
123
+ ref: y,
124
+ label: c,
125
+ labelHidden: m,
126
+ layout: d,
127
+ width: l,
128
+ description: b,
129
+ error: F,
130
+ size: Q,
131
+ variant: W,
132
+ className: B ? `cy-number-field ${B}` : "cy-number-field",
133
+ ...L ? { style: L } : {},
83
134
  role: "spinbutton",
84
- inputMode: et ? "numeric" : "decimal",
135
+ inputMode: ot ? "numeric" : "decimal",
85
136
  autoComplete: "off",
86
137
  autoCorrect: "off",
87
138
  spellCheck: !1,
88
- "aria-valuenow": r ?? void 0,
89
- "aria-valuemin": e,
90
- "aria-valuemax": n,
91
- "aria-valuetext": r === null ? void 0 : L(r),
92
- required: R,
93
- disabled: c,
94
- readOnly: l,
95
- placeholder: V,
96
- form: A,
97
- value: m ?? L(r),
139
+ "aria-valuenow": T(i),
140
+ "aria-valuemin": T(n),
141
+ "aria-valuemax": T(o),
142
+ "aria-valuetext": i === null ? void 0 : $(i),
143
+ required: J,
144
+ disabled: p,
145
+ readOnly: N,
146
+ placeholder: q,
147
+ form: P,
148
+ value: w ?? $(i),
98
149
  onChange: x,
99
- onKeyDown: Z,
100
- onBlur: P,
101
- addonEnd: !H && /* @__PURE__ */ $("span", {
150
+ onKeyDown: rt,
151
+ onBlur: U,
152
+ addonEnd: !V && /* @__PURE__ */ H("span", {
102
153
  className: "cy-number-field-steppers",
103
- children: [/* @__PURE__ */ E(_, {
104
- icon: ct,
105
- label: B.decrement,
154
+ children: [/* @__PURE__ */ E(G, {
155
+ icon: mt,
156
+ label: _.decrement,
106
157
  variant: "ghost",
107
158
  size: "sm",
108
159
  tabIndex: -1,
109
- disabled: c || l || O,
160
+ disabled: p || N || nt,
110
161
  onClick: () => {
111
- f(-o), b.current?.focus();
162
+ D(-r), y.current?.focus();
112
163
  }
113
- }), /* @__PURE__ */ E(_, {
114
- icon: st,
115
- label: B.increment,
164
+ }), /* @__PURE__ */ E(G, {
165
+ icon: ft,
166
+ label: _.increment,
116
167
  variant: "ghost",
117
168
  size: "sm",
118
169
  tabIndex: -1,
119
- disabled: c || l || tt,
170
+ disabled: p || N || it,
120
171
  onClick: () => {
121
- f(o), b.current?.focus();
172
+ D(r), y.current?.focus();
122
173
  }
123
174
  })]
124
175
  })
125
- }), /* @__PURE__ */ E(at, {
126
- name: K,
127
- form: A,
128
- value: r === null ? "" : String(r),
129
- disabled: c,
176
+ }), /* @__PURE__ */ E(dt, {
177
+ name: Y,
178
+ form: P,
179
+ value: i === null ? "" : lt(i),
180
+ disabled: p,
130
181
  onReset: () => {
131
- x(null), W(I);
182
+ x(null), tt(h);
132
183
  }
133
184
  })] });
134
185
  }
135
186
  export {
136
- xt as NumberField,
137
- U as parseNumber
187
+ jt as NumberField,
188
+ R as parseNumber
138
189
  };
139
190
 
140
191
  //# sourceMappingURL=NumberField.js.map