@nordhealth/components 4.26.1 → 5.0.0-alpha.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 (553) hide show
  1. package/custom-elements.json +54613 -21826
  2. package/lib/Accordion.js +2 -0
  3. package/lib/Accordion.js.map +1 -0
  4. package/lib/AccordionHeader.js +2 -0
  5. package/lib/AccordionHeader.js.map +1 -0
  6. package/lib/AccordionItem.js +2 -0
  7. package/lib/AccordionItem.js.map +1 -0
  8. package/lib/AccordionPanel.js +2 -0
  9. package/lib/AccordionPanel.js.map +1 -0
  10. package/lib/AccordionTrigger.js +2 -0
  11. package/lib/AccordionTrigger.js.map +1 -0
  12. package/lib/ActiveDescendantController-BnMqM79O.js +2 -0
  13. package/lib/ActiveDescendantController-BnMqM79O.js.map +1 -0
  14. package/lib/Aside.js +5 -7
  15. package/lib/Aside.js.map +1 -1
  16. package/lib/AsideDrawer.js +7 -11
  17. package/lib/AsideDrawer.js.map +1 -1
  18. package/lib/AsideTrigger.js +3 -4
  19. package/lib/AsideTrigger.js.map +1 -1
  20. package/lib/Autocomplete.js +2 -0
  21. package/lib/Autocomplete.js.map +1 -0
  22. package/lib/Avatar.js +1 -1
  23. package/lib/Avatar.js.map +1 -1
  24. package/lib/Badge.js +1 -1
  25. package/lib/Badge.js.map +1 -1
  26. package/lib/Banner.js +1 -1
  27. package/lib/Banner.js.map +1 -1
  28. package/lib/Button.js +7 -12
  29. package/lib/Button.js.map +1 -1
  30. package/lib/ButtonGroup.js +1 -1
  31. package/lib/ButtonGroup.js.map +1 -1
  32. package/lib/Calendar-C1SxrlzN.js +2 -0
  33. package/lib/Calendar-C1SxrlzN.js.map +1 -0
  34. package/lib/Calendar.js +1 -1
  35. package/lib/Card.js +1 -1
  36. package/lib/Card.js.map +1 -1
  37. package/lib/Checkbox.js +1 -1
  38. package/lib/Checkbox.js.map +1 -1
  39. package/lib/CollapseController-BtKNFNyJ.js +2 -0
  40. package/lib/CollapseController-BtKNFNyJ.js.map +1 -0
  41. package/lib/Collapsible.js +2 -0
  42. package/lib/Collapsible.js.map +1 -0
  43. package/lib/CollapsiblePanel.js +2 -0
  44. package/lib/CollapsiblePanel.js.map +1 -0
  45. package/lib/CollapsibleTrigger.js +2 -0
  46. package/lib/CollapsibleTrigger.js.map +1 -0
  47. package/lib/Combobox-By4h1Sp-.js +2 -0
  48. package/lib/Combobox-By4h1Sp-.js.map +1 -0
  49. package/lib/Combobox.js +2 -0
  50. package/lib/Combobox.js.map +1 -0
  51. package/lib/ComboboxBase.js +2 -0
  52. package/lib/ComboboxBase.js.map +1 -0
  53. package/lib/ComboboxEvents.js +2 -0
  54. package/lib/ComboboxEvents.js.map +1 -0
  55. package/lib/ComboboxGroup.js +2 -0
  56. package/lib/ComboboxGroup.js.map +1 -0
  57. package/lib/ComboboxOption.js +2 -0
  58. package/lib/ComboboxOption.js.map +1 -0
  59. package/lib/CommandMenu.js +1 -1
  60. package/lib/CommandMenu.js.map +1 -1
  61. package/lib/CommandMenuAction.js +1 -1
  62. package/lib/CommandMenuAction.js.map +1 -1
  63. package/lib/Component-BJ5O5n8k.js +2 -0
  64. package/lib/Component-BJ5O5n8k.js.map +1 -0
  65. package/lib/DatePicker.js +1 -1
  66. package/lib/DatePicker.js.map +1 -1
  67. package/lib/DateRangeChangeEvent.js +2 -0
  68. package/lib/DateRangeChangeEvent.js.map +1 -0
  69. package/lib/DateRangePicker.js +2 -0
  70. package/lib/DateRangePicker.js.map +1 -0
  71. package/lib/DateRangeSelectEvent.js +2 -0
  72. package/lib/DateRangeSelectEvent.js.map +1 -0
  73. package/lib/Divider.js +1 -1
  74. package/lib/Divider.js.map +1 -1
  75. package/lib/DraftComponentMixin-4qug5Rky.js +2 -0
  76. package/lib/DraftComponentMixin-4qug5Rky.js.map +1 -0
  77. package/lib/Drawer.js +1 -1
  78. package/lib/Drawer.js.map +1 -1
  79. package/lib/Dropdown.js +1 -1
  80. package/lib/Dropdown.js.map +1 -1
  81. package/lib/DropdownGroup.js +1 -1
  82. package/lib/DropdownGroup.js.map +1 -1
  83. package/lib/DropdownItem-BYbOLth6.js +2 -0
  84. package/lib/DropdownItem-BYbOLth6.js.map +1 -0
  85. package/lib/DropdownItem.js +1 -1
  86. package/lib/DropdownItem.js.map +1 -1
  87. package/lib/DropdownSubmenu.js +1 -1
  88. package/lib/DropdownSubmenu.js.map +1 -1
  89. package/lib/EmptyState.js +1 -1
  90. package/lib/EmptyState.js.map +1 -1
  91. package/lib/Field.js +2 -0
  92. package/lib/Field.js.map +1 -0
  93. package/lib/FieldContent.js +2 -0
  94. package/lib/FieldContent.js.map +1 -0
  95. package/lib/FieldControlMixin-BXNZJXu9.js +2 -0
  96. package/lib/FieldControlMixin-BXNZJXu9.js.map +1 -0
  97. package/lib/FieldDescription.js +2 -0
  98. package/lib/FieldDescription.js.map +1 -0
  99. package/lib/FieldError.js +2 -0
  100. package/lib/FieldError.js.map +1 -0
  101. package/lib/FieldGroup.js +2 -0
  102. package/lib/FieldGroup.js.map +1 -0
  103. package/lib/FieldLabel.js +2 -0
  104. package/lib/FieldLabel.js.map +1 -0
  105. package/lib/FieldLegend.js +2 -0
  106. package/lib/FieldLegend.js.map +1 -0
  107. package/lib/FieldSeparator.js +2 -0
  108. package/lib/FieldSeparator.js.map +1 -0
  109. package/lib/FieldSet.js +2 -0
  110. package/lib/FieldSet.js.map +1 -0
  111. package/lib/FieldTitle.js +2 -0
  112. package/lib/FieldTitle.js.map +1 -0
  113. package/lib/Fieldset2.js +2 -0
  114. package/lib/Fieldset2.js.map +1 -0
  115. package/lib/FilterAddButton.js +2 -0
  116. package/lib/FilterAddButton.js.map +1 -0
  117. package/lib/FilterAddButtonEvents.js +2 -0
  118. package/lib/FilterAddButtonEvents.js.map +1 -0
  119. package/lib/FilterBar.js +2 -0
  120. package/lib/FilterBar.js.map +1 -0
  121. package/lib/FilterDateRange.js +2 -0
  122. package/lib/FilterDateRange.js.map +1 -0
  123. package/lib/FilterDateRangeEvents.js +2 -0
  124. package/lib/FilterDateRangeEvents.js.map +1 -0
  125. package/lib/FilterDropdown.js +2 -0
  126. package/lib/FilterDropdown.js.map +1 -0
  127. package/lib/FilterDropdownEvents.js +2 -0
  128. package/lib/FilterDropdownEvents.js.map +1 -0
  129. package/lib/FilterField.js +2 -0
  130. package/lib/FilterField.js.map +1 -0
  131. package/lib/FilterFieldEvents.js +2 -0
  132. package/lib/FilterFieldEvents.js.map +1 -0
  133. package/lib/FilterInput.js +2 -0
  134. package/lib/FilterInput.js.map +1 -0
  135. package/lib/FilterResetButton.js +2 -0
  136. package/lib/FilterResetButton.js.map +1 -0
  137. package/lib/FocusableWhenDisabledController-C_Mn1mfN.js +2 -0
  138. package/lib/FocusableWhenDisabledController-C_Mn1mfN.js.map +1 -0
  139. package/lib/Footer.js +1 -1
  140. package/lib/Footer.js.map +1 -1
  141. package/lib/FormAssociatedMixin-D9aPREgv.js +2 -0
  142. package/lib/FormAssociatedMixin-D9aPREgv.js.map +1 -0
  143. package/lib/FormField-CMgEFZCK.js +2 -0
  144. package/lib/FormField-CMgEFZCK.js.map +1 -0
  145. package/lib/Header.js +1 -1
  146. package/lib/Header.js.map +1 -1
  147. package/lib/Icon.js +1 -1
  148. package/lib/Icon.js.map +1 -1
  149. package/lib/Input.js +1 -1
  150. package/lib/Input.js.map +1 -1
  151. package/lib/Item.js +2 -0
  152. package/lib/Item.js.map +1 -0
  153. package/lib/ItemActions.js +2 -0
  154. package/lib/ItemActions.js.map +1 -0
  155. package/lib/ItemContent.js +2 -0
  156. package/lib/ItemContent.js.map +1 -0
  157. package/lib/ItemDescription.js +2 -0
  158. package/lib/ItemDescription.js.map +1 -0
  159. package/lib/ItemFooter.js +2 -0
  160. package/lib/ItemFooter.js.map +1 -0
  161. package/lib/ItemGroup.js +2 -0
  162. package/lib/ItemGroup.js.map +1 -0
  163. package/lib/ItemHeader.js +2 -0
  164. package/lib/ItemHeader.js.map +1 -0
  165. package/lib/ItemMedia.js +2 -0
  166. package/lib/ItemMedia.js.map +1 -0
  167. package/lib/ItemSeparator.js +2 -0
  168. package/lib/ItemSeparator.js.map +1 -0
  169. package/lib/ItemTitle.js +2 -0
  170. package/lib/ItemTitle.js.map +1 -0
  171. package/lib/Kbd.js +2 -0
  172. package/lib/Kbd.js.map +1 -0
  173. package/lib/KbdGroup.js +2 -0
  174. package/lib/KbdGroup.js.map +1 -0
  175. package/lib/KeyboardController.js +1 -1
  176. package/lib/KeyboardController.js.map +1 -1
  177. package/lib/Layout.js +1 -3
  178. package/lib/Layout.js.map +1 -1
  179. package/lib/LocalizeController.js +1 -1
  180. package/lib/LocalizeController.js.map +1 -1
  181. package/lib/Message.js +1 -1
  182. package/lib/Message.js.map +1 -1
  183. package/lib/Meter.js +2 -0
  184. package/lib/Meter.js.map +1 -0
  185. package/lib/Modal.js +1 -1
  186. package/lib/Modal.js.map +1 -1
  187. package/lib/ModalController.js +1 -1
  188. package/lib/ModalController.js.map +1 -1
  189. package/lib/NavGroup.js +1 -1
  190. package/lib/NavGroup.js.map +1 -1
  191. package/lib/NavItem.js +1 -1
  192. package/lib/NavItem.js.map +1 -1
  193. package/lib/NavToggle-BY83xpx0.js +2 -0
  194. package/lib/NavToggle-BY83xpx0.js.map +1 -0
  195. package/lib/NavToggle.js +1 -1
  196. package/lib/Navigation.js +1 -1
  197. package/lib/Navigation.js.map +1 -1
  198. package/lib/Notification.js +1 -1
  199. package/lib/Notification.js.map +1 -1
  200. package/lib/NotificationGroup.js +1 -1
  201. package/lib/NotificationGroup.js.map +1 -1
  202. package/lib/NumberField.js +2 -0
  203. package/lib/NumberField.js.map +1 -0
  204. package/lib/NumberFieldEvents.js +2 -0
  205. package/lib/NumberFieldEvents.js.map +1 -0
  206. package/lib/OpenStateController-CCnZ7up6.js +2 -0
  207. package/lib/OpenStateController-CCnZ7up6.js.map +1 -0
  208. package/lib/OtpField.js +2 -0
  209. package/lib/OtpField.js.map +1 -0
  210. package/lib/OtpFieldEvents.js +2 -0
  211. package/lib/OtpFieldEvents.js.map +1 -0
  212. package/lib/Pagination.js +2 -0
  213. package/lib/Pagination.js.map +1 -0
  214. package/lib/PaginationContent.js +2 -0
  215. package/lib/PaginationContent.js.map +1 -0
  216. package/lib/PaginationEllipsis.js +2 -0
  217. package/lib/PaginationEllipsis.js.map +1 -0
  218. package/lib/PaginationItem.js +2 -0
  219. package/lib/PaginationItem.js.map +1 -0
  220. package/lib/PaginationLink.js +2 -0
  221. package/lib/PaginationLink.js.map +1 -0
  222. package/lib/PaginationNext.js +2 -0
  223. package/lib/PaginationNext.js.map +1 -0
  224. package/lib/PaginationPrevious.js +2 -0
  225. package/lib/PaginationPrevious.js.map +1 -0
  226. package/lib/Popout-DpN7PP9h.js +2 -0
  227. package/lib/Popout-DpN7PP9h.js.map +1 -0
  228. package/lib/Popout.js +1 -1
  229. package/lib/Progress.js +1 -1
  230. package/lib/Progress.js.map +1 -1
  231. package/lib/ProgressBar.js +1 -1
  232. package/lib/ProgressBar.js.map +1 -1
  233. package/lib/Qrcode.js +2 -2
  234. package/lib/Radio.js +1 -1
  235. package/lib/Radio.js.map +1 -1
  236. package/lib/Range.js +1 -1
  237. package/lib/Range.js.map +1 -1
  238. package/lib/ReadonlyMixin-BdJPGtQ3.js +2 -0
  239. package/lib/ReadonlyMixin-BdJPGtQ3.js.map +1 -0
  240. package/lib/ResizeController-14PUwRQy.js +2 -0
  241. package/lib/ResizeController-14PUwRQy.js.map +1 -0
  242. package/lib/ScrollArea.js +2 -0
  243. package/lib/ScrollArea.js.map +1 -0
  244. package/lib/SegmentedControl.js +1 -1
  245. package/lib/SegmentedControl.js.map +1 -1
  246. package/lib/SegmentedControlItem.js +23 -40
  247. package/lib/SegmentedControlItem.js.map +1 -1
  248. package/lib/Select.js +1 -1
  249. package/lib/Select.js.map +1 -1
  250. package/lib/Skeleton.js +1 -1
  251. package/lib/Skeleton.js.map +1 -1
  252. package/lib/Spinner.js +1 -1
  253. package/lib/Spinner.js.map +1 -1
  254. package/lib/Stack.js +1 -1
  255. package/lib/Stack.js.map +1 -1
  256. package/lib/StateAttributesController-BIh96sXZ.js +2 -0
  257. package/lib/StateAttributesController-BIh96sXZ.js.map +1 -0
  258. package/lib/Sticky-CZImMrGj.js +2 -0
  259. package/lib/Sticky-CZImMrGj.js.map +1 -0
  260. package/lib/Tab.js +1 -1
  261. package/lib/Tab.js.map +1 -1
  262. package/lib/TabGroup.js +1 -1
  263. package/lib/TabGroup.js.map +1 -1
  264. package/lib/TabPanel.js +1 -1
  265. package/lib/TabPanel.js.map +1 -1
  266. package/lib/Table.js +1 -1
  267. package/lib/Table.js.map +1 -1
  268. package/lib/Tag.js +1 -1
  269. package/lib/Tag.js.map +1 -1
  270. package/lib/TagGroup.js +1 -1
  271. package/lib/TagGroup.js.map +1 -1
  272. package/lib/TextField-CSKvieoG.js +2 -0
  273. package/lib/TextField-CSKvieoG.js.map +1 -0
  274. package/lib/TextSelectableMixin-Cfv__lHS.js.map +1 -1
  275. package/lib/Textarea.js +1 -1
  276. package/lib/Textarea.js.map +1 -1
  277. package/lib/TimePicker.js +2 -0
  278. package/lib/TimePicker.js.map +1 -0
  279. package/lib/Toast.js +1 -1
  280. package/lib/Toast.js.map +1 -1
  281. package/lib/ToastGroup.js +1 -1
  282. package/lib/ToastGroup.js.map +1 -1
  283. package/lib/Toggle.js +1 -1
  284. package/lib/Toggle.js.map +1 -1
  285. package/lib/Tooltip.js +1 -1
  286. package/lib/Tooltip.js.map +1 -1
  287. package/lib/TopBar.js +1 -1
  288. package/lib/TopBar.js.map +1 -1
  289. package/lib/Truncate.js +1 -1
  290. package/lib/Truncate.js.map +1 -1
  291. package/lib/VisuallyHidden.js +1 -1
  292. package/lib/bundle.js +91 -91
  293. package/lib/bundle.js.map +1 -1
  294. package/lib/combobox-context.js +2 -0
  295. package/lib/combobox-context.js.map +1 -0
  296. package/lib/context-consumer-BJVUulGf.js +7 -0
  297. package/lib/context-consumer-BJVUulGf.js.map +1 -0
  298. package/lib/context-provider-D8lrPLVi.js +12 -0
  299. package/lib/context-provider-D8lrPLVi.js.map +1 -0
  300. package/lib/context-request-event-CCRlXoeR.js +7 -0
  301. package/lib/context-request-event-CCRlXoeR.js.map +1 -0
  302. package/lib/create-context-CJ69ntlY.js +7 -0
  303. package/lib/create-context-CJ69ntlY.js.map +1 -0
  304. package/lib/currency.js +2 -0
  305. package/lib/currency.js.map +1 -0
  306. package/lib/date-adapter.js +1 -1
  307. package/lib/dates-C-ZvzXaC.js +2 -0
  308. package/lib/dates-C-ZvzXaC.js.map +1 -0
  309. package/lib/dates.js +2 -0
  310. package/lib/dates.js.map +1 -0
  311. package/lib/dismiss.js +2 -0
  312. package/lib/dismiss.js.map +1 -0
  313. package/lib/en-us.js +1 -1
  314. package/lib/en-us.js.map +1 -1
  315. package/lib/fi-fi.js +1 -1
  316. package/lib/fi-fi.js.map +1 -1
  317. package/lib/field-context.js +2 -0
  318. package/lib/field-context.js.map +1 -0
  319. package/lib/filter-chip-C97zd4PT.js +2 -0
  320. package/lib/filter-chip-C97zd4PT.js.map +1 -0
  321. package/lib/format.js +2 -0
  322. package/lib/format.js.map +1 -0
  323. package/lib/index.js +1 -1
  324. package/lib/interface-add-small-B-hv2v9J.js +2 -0
  325. package/lib/interface-add-small-B-hv2v9J.js.map +1 -0
  326. package/lib/interface-calendar-Cw2bJfbS.js +2 -0
  327. package/lib/interface-calendar-Cw2bJfbS.js.map +1 -0
  328. package/lib/interface-close-BvKnv9eh.js +2 -0
  329. package/lib/interface-close-BvKnv9eh.js.map +1 -0
  330. package/lib/interface-dropdown-small-CYvgxudU.js +2 -0
  331. package/lib/interface-dropdown-small-CYvgxudU.js.map +1 -0
  332. package/lib/interface-filter-CCsx9-u6.js +2 -0
  333. package/lib/interface-filter-CCsx9-u6.js.map +1 -0
  334. package/lib/interface-remove-small-DUaWSs90.js +2 -0
  335. package/lib/interface-remove-small-DUaWSs90.js.map +1 -0
  336. package/lib/light-dom-styles-DXsbiKU9.js +2 -0
  337. package/lib/light-dom-styles-DXsbiKU9.js.map +1 -0
  338. package/lib/localization.js +1 -1
  339. package/lib/localization.js.map +1 -1
  340. package/lib/localization10.js +2 -0
  341. package/lib/localization10.js.map +1 -0
  342. package/lib/localization11.js +2 -0
  343. package/lib/localization11.js.map +1 -0
  344. package/lib/localization12.js +2 -0
  345. package/lib/localization12.js.map +1 -0
  346. package/lib/localization13.js +2 -0
  347. package/lib/localization13.js.map +1 -0
  348. package/lib/localization14.js +2 -0
  349. package/lib/localization14.js.map +1 -0
  350. package/lib/localization15.js +2 -0
  351. package/lib/localization15.js.map +1 -0
  352. package/lib/localization16.js +2 -0
  353. package/lib/localization16.js.map +1 -0
  354. package/lib/localization17.js +2 -0
  355. package/lib/localization17.js.map +1 -0
  356. package/lib/localization18.js +2 -0
  357. package/lib/localization18.js.map +1 -0
  358. package/lib/localization19.js +2 -0
  359. package/lib/localization19.js.map +1 -0
  360. package/lib/localization2.js +1 -1
  361. package/lib/localization2.js.map +1 -1
  362. package/lib/localization20.js +2 -0
  363. package/lib/localization20.js.map +1 -0
  364. package/lib/localization21.js +2 -0
  365. package/lib/localization21.js.map +1 -0
  366. package/lib/localization22.js +2 -0
  367. package/lib/localization22.js.map +1 -0
  368. package/lib/localization3.js +1 -1
  369. package/lib/localization3.js.map +1 -1
  370. package/lib/localization4.js +1 -1
  371. package/lib/localization4.js.map +1 -1
  372. package/lib/localization5.js +1 -1
  373. package/lib/localization5.js.map +1 -1
  374. package/lib/localization6.js +1 -1
  375. package/lib/localization6.js.map +1 -1
  376. package/lib/localization7.js +1 -1
  377. package/lib/localization7.js.map +1 -1
  378. package/lib/localization8.js +1 -1
  379. package/lib/localization8.js.map +1 -1
  380. package/lib/localization9.js +1 -1
  381. package/lib/localization9.js.map +1 -1
  382. package/lib/navigation-search-CBbIGzo2.js +2 -0
  383. package/lib/navigation-search-CBbIGzo2.js.map +1 -0
  384. package/lib/paginate.js +2 -0
  385. package/lib/paginate.js.map +1 -0
  386. package/lib/parse.js +2 -0
  387. package/lib/parse.js.map +1 -0
  388. package/lib/primitives-Dj0vyf1-.js +2 -0
  389. package/lib/primitives-Dj0vyf1-.js.map +1 -0
  390. package/lib/react.d.ts +505 -0
  391. package/lib/src/accordion/Accordion.d.ts +121 -0
  392. package/lib/src/accordion/AccordionHeader.d.ts +28 -0
  393. package/lib/src/accordion/AccordionItem.d.ts +68 -0
  394. package/lib/src/accordion/AccordionPanel.d.ts +35 -0
  395. package/lib/src/accordion/AccordionTrigger.d.ts +47 -0
  396. package/lib/src/aside-drawer/AsideDrawer.d.ts +2 -0
  397. package/lib/src/aside-trigger/AsideTrigger.d.ts +2 -0
  398. package/lib/src/autocomplete/Autocomplete.d.ts +190 -0
  399. package/lib/src/autocomplete/localization.d.ts +5 -0
  400. package/lib/src/badge/Badge.d.ts +1 -1
  401. package/lib/src/banner/Banner.d.ts +3 -0
  402. package/lib/src/button-group/ButtonGroup.d.ts +2 -1
  403. package/lib/src/calendar/Calendar.d.ts +44 -0
  404. package/lib/src/calendar/DateRangeSelectEvent.d.ts +16 -0
  405. package/lib/src/collapsible/Collapsible.d.ts +69 -0
  406. package/lib/src/collapsible/CollapsiblePanel.d.ts +35 -0
  407. package/lib/src/collapsible/CollapsibleTrigger.d.ts +38 -0
  408. package/lib/src/combobox/Combobox.d.ts +131 -0
  409. package/lib/src/combobox/ComboboxBase.d.ts +421 -0
  410. package/lib/src/combobox/ComboboxEvents.d.ts +25 -0
  411. package/lib/src/combobox/ComboboxGroup.d.ts +34 -0
  412. package/lib/src/combobox/ComboboxOption.d.ts +47 -0
  413. package/lib/src/combobox/combobox-context.d.ts +18 -0
  414. package/lib/src/combobox/localization.d.ts +6 -0
  415. package/lib/src/command-menu/ICommandMenuAction.d.ts +11 -0
  416. package/lib/src/common/controllers/ActiveDescendantController.d.ts +45 -0
  417. package/lib/src/common/controllers/CollapseController.d.ts +50 -0
  418. package/lib/src/common/controllers/FocusableWhenDisabledController.d.ts +29 -0
  419. package/lib/src/common/controllers/OpenStateController.d.ts +58 -0
  420. package/lib/src/common/controllers/RovingFocusController.d.ts +40 -0
  421. package/lib/src/common/controllers/StateAttributesController.d.ts +47 -0
  422. package/lib/src/common/controllers/TransitionStatusController.d.ts +48 -0
  423. package/lib/src/common/dates.d.ts +13 -0
  424. package/lib/src/common/light-dom-styles.d.ts +17 -0
  425. package/lib/src/common/mixins/FieldControlMixin.d.ts +60 -0
  426. package/lib/src/common/mixins/FloatingComponentMixin.d.ts +2 -0
  427. package/lib/src/common/mixins/FormAssociatedMixin.d.ts +8 -25
  428. package/lib/src/common/mixins/TextSelectableMixin.d.ts +1 -0
  429. package/lib/src/common/prefers-reduced-motion.d.ts +7 -0
  430. package/lib/src/date-picker/DatePicker.d.ts +2 -0
  431. package/lib/src/date-range-picker/DateRangeChangeEvent.d.ts +27 -0
  432. package/lib/src/date-range-picker/DateRangePicker.d.ts +307 -0
  433. package/lib/src/date-range-picker/localization.d.ts +42 -0
  434. package/lib/src/drawer/Drawer.d.ts +7 -0
  435. package/lib/src/dropdown/Dropdown.d.ts +1 -1
  436. package/lib/src/dropdown-group/DropdownGroup.d.ts +3 -1
  437. package/lib/src/dropdown-item/DropdownItem.d.ts +3 -1
  438. package/lib/src/dropdown-submenu/DropdownSubmenu.d.ts +2 -0
  439. package/lib/src/field/Field.d.ts +102 -0
  440. package/lib/src/field/FieldContent.d.ts +22 -0
  441. package/lib/src/field/FieldDescription.d.ts +21 -0
  442. package/lib/src/field/FieldError.d.ts +25 -0
  443. package/lib/src/field/FieldGroup.d.ts +25 -0
  444. package/lib/src/field/FieldLabel.d.ts +41 -0
  445. package/lib/src/field/FieldLegend.d.ts +20 -0
  446. package/lib/src/field/FieldSeparator.d.ts +21 -0
  447. package/lib/src/field/FieldSet.d.ts +28 -0
  448. package/lib/src/field/FieldTitle.d.ts +21 -0
  449. package/lib/src/field/field-context.d.ts +47 -0
  450. package/lib/src/fieldset/Fieldset.d.ts +12 -4
  451. package/lib/src/filter-add-button/FilterAddButton.d.ts +91 -0
  452. package/lib/src/filter-add-button/FilterAddButtonEvents.d.ts +17 -0
  453. package/lib/src/filter-add-button/localization.d.ts +4 -0
  454. package/lib/src/filter-bar/FilterBar.d.ts +37 -0
  455. package/lib/src/filter-date-range/FilterDateRange.d.ts +96 -0
  456. package/lib/src/filter-date-range/FilterDateRangeEvents.d.ts +37 -0
  457. package/lib/src/filter-date-range/localization.d.ts +11 -0
  458. package/lib/src/filter-dropdown/FilterDropdown.d.ts +247 -0
  459. package/lib/src/filter-dropdown/FilterDropdownEvents.d.ts +57 -0
  460. package/lib/src/filter-dropdown/localization.d.ts +14 -0
  461. package/lib/src/filter-field/FilterField.d.ts +89 -0
  462. package/lib/src/filter-field/FilterFieldEvents.d.ts +18 -0
  463. package/lib/src/filter-field/localization.d.ts +8 -0
  464. package/lib/src/filter-input/FilterInput.d.ts +102 -0
  465. package/lib/src/filter-input/localization.d.ts +5 -0
  466. package/lib/src/filter-reset-button/FilterResetButton.d.ts +50 -0
  467. package/lib/src/filter-reset-button/localization.d.ts +4 -0
  468. package/lib/src/index.d.ts +59 -0
  469. package/lib/src/input/Input.d.ts +2 -1
  470. package/lib/src/item/Item.d.ts +44 -0
  471. package/lib/src/item/ItemActions.d.ts +20 -0
  472. package/lib/src/item/ItemContent.d.ts +22 -0
  473. package/lib/src/item/ItemDescription.d.ts +20 -0
  474. package/lib/src/item/ItemFooter.d.ts +20 -0
  475. package/lib/src/item/ItemGroup.d.ts +22 -0
  476. package/lib/src/item/ItemHeader.d.ts +20 -0
  477. package/lib/src/item/ItemMedia.d.ts +28 -0
  478. package/lib/src/item/ItemSeparator.d.ts +21 -0
  479. package/lib/src/item/ItemTitle.d.ts +19 -0
  480. package/lib/src/kbd/Kbd.d.ts +54 -0
  481. package/lib/src/kbd/KbdGroup.d.ts +22 -0
  482. package/lib/src/layout/Layout.d.ts +2 -2
  483. package/lib/src/localization/en-us.d.ts +85 -0
  484. package/lib/src/localization/translation.d.ts +85 -0
  485. package/lib/src/meter/Meter.d.ts +76 -0
  486. package/lib/src/nav-group/NavGroup.d.ts +2 -0
  487. package/lib/src/nav-item/NavItem.d.ts +2 -0
  488. package/lib/src/nav-toggle/NavToggle.d.ts +3 -1
  489. package/lib/src/notification-group/NotificationGroup.d.ts +2 -0
  490. package/lib/src/number-field/NumberField.d.ts +377 -0
  491. package/lib/src/number-field/NumberFieldEvents.d.ts +37 -0
  492. package/lib/src/number-field/currency.d.ts +24 -0
  493. package/lib/src/number-field/format.d.ts +8 -0
  494. package/lib/src/number-field/localization.d.ts +6 -0
  495. package/lib/src/number-field/parse.d.ts +44 -0
  496. package/lib/src/number-field/validate.d.ts +24 -0
  497. package/lib/src/otp-field/OtpField.d.ts +177 -0
  498. package/lib/src/otp-field/OtpFieldEvents.d.ts +38 -0
  499. package/lib/src/otp-field/localization.d.ts +4 -0
  500. package/lib/src/pagination/Pagination.d.ts +51 -0
  501. package/lib/src/pagination/PaginationContent.d.ts +27 -0
  502. package/lib/src/pagination/PaginationEllipsis.d.ts +27 -0
  503. package/lib/src/pagination/PaginationItem.d.ts +24 -0
  504. package/lib/src/pagination/PaginationLink.d.ts +30 -0
  505. package/lib/src/pagination/PaginationNext.d.ts +24 -0
  506. package/lib/src/pagination/PaginationPrevious.d.ts +24 -0
  507. package/lib/src/pagination/localization.d.ts +4 -0
  508. package/lib/src/pagination/paginate.d.ts +20 -0
  509. package/lib/src/popout/Popout.d.ts +11 -2
  510. package/lib/src/scroll-area/ScrollArea.d.ts +101 -0
  511. package/lib/src/segmented-control-item/SegmentedControlItem.d.ts +2 -0
  512. package/lib/src/storybook-utils/dates.d.ts +2 -0
  513. package/lib/src/storybook-utils/dismiss.d.ts +1 -0
  514. package/lib/src/storybook-utils/story-descriptions.d.ts +2 -0
  515. package/lib/src/tab-group/TabGroup.d.ts +2 -0
  516. package/lib/src/tab-panel/TabPanel.d.ts +2 -0
  517. package/lib/src/tag-group/TagGroup.d.ts +2 -0
  518. package/lib/src/textarea/Textarea.d.ts +2 -1
  519. package/lib/src/time-picker/TimePicker.d.ts +105 -0
  520. package/lib/src/time-picker/localization.d.ts +4 -0
  521. package/lib/src/toast-group/ToastGroup.d.ts +11 -0
  522. package/lib/src/tooltip/Tooltip.d.ts +12 -0
  523. package/lib/src/truncate/Truncate.d.ts +12 -0
  524. package/lib/story-descriptions.js +2 -0
  525. package/lib/story-descriptions.js.map +1 -0
  526. package/lib/translation.js +1 -1
  527. package/lib/translation.js.map +1 -1
  528. package/lib/validate.js +2 -0
  529. package/lib/validate.js.map +1 -0
  530. package/lib/vue.d.ts +407 -0
  531. package/package.json +9 -12
  532. package/lib/Calendar-ChNZdVRO.js +0 -2
  533. package/lib/Calendar-ChNZdVRO.js.map +0 -1
  534. package/lib/Component-DSU3Qp0O.js +0 -2
  535. package/lib/Component-DSU3Qp0O.js.map +0 -1
  536. package/lib/DropdownItem-Cb-7cHMg.js +0 -2
  537. package/lib/DropdownItem-Cb-7cHMg.js.map +0 -1
  538. package/lib/Fieldset.js +0 -2
  539. package/lib/Fieldset.js.map +0 -1
  540. package/lib/FormAssociatedMixin-B4Qj-CQN.js +0 -2
  541. package/lib/FormAssociatedMixin-B4Qj-CQN.js.map +0 -1
  542. package/lib/FormField-BFaVzUjk.js +0 -2
  543. package/lib/FormField-BFaVzUjk.js.map +0 -1
  544. package/lib/NavToggle-DzKbd-El.js +0 -2
  545. package/lib/NavToggle-DzKbd-El.js.map +0 -1
  546. package/lib/Popout-DtEL0HZ0.js +0 -2
  547. package/lib/Popout-DtEL0HZ0.js.map +0 -1
  548. package/lib/Sticky-DqnqENYN.js +0 -2
  549. package/lib/Sticky-DqnqENYN.js.map +0 -1
  550. package/lib/TextField-B955GOhe.js +0 -2
  551. package/lib/TextField-B955GOhe.js.map +0 -1
  552. package/lib/dates-CAAlPKZi.js +0 -2
  553. package/lib/dates-CAAlPKZi.js.map +0 -1
@@ -0,0 +1,101 @@
1
+ import { LitElement } from 'lit';
2
+ declare const ScrollArea_base: typeof LitElement;
3
+ /**
4
+ * Scroll Area is a container that wraps overflowing content in a custom scroll
5
+ * viewport with consistently-styled scrollbars. Native scrollbars are hidden and
6
+ * replaced with a thin overlay thumb that appears on hover or while scrolling.
7
+ *
8
+ * It also exposes the distance from each edge as CSS custom properties
9
+ * (`--scroll-area-overflow-*`), which can drive an edge-fade mask on
10
+ * `::part(viewport)` — see the docs example.
11
+ *
12
+ * The scroll machinery lives in shadow DOM; slot your content directly inside.
13
+ *
14
+ * @status draft
15
+ * @category structure
16
+ *
17
+ * @slot - The scrollable content.
18
+ *
19
+ * @csspart viewport - The scrolling container that holds the slotted content.
20
+ * @csspart scrollbar-block - The scrollbar track for the block (vertical) axis.
21
+ * @csspart scrollbar-inline - The scrollbar track for the inline (horizontal) axis.
22
+ * @csspart thumb-block - The draggable thumb of the block-axis scrollbar.
23
+ * @csspart thumb-inline - The draggable thumb of the inline-axis scrollbar.
24
+ * @csspart corner - The square where the two scrollbars meet (when `axis="both"`).
25
+ *
26
+ * @cssprop [--n-scroll-area-fade-size=24px] - Depth of the edge fade (when `fade` is set).
27
+ * @cssprop [--n-scroll-area-scrollbar-size=10px] - Thickness of the scrollbar track and thumb.
28
+ * @cssprop [--n-scroll-area-scrollbar-inset=2px] - Inset of the scrollbar from the viewport edge.
29
+ * @cssprop [--n-scroll-area-thumb-color] - Thumb fill (defaults to the border token).
30
+ * @cssprop [--n-scroll-area-thumb-color-hover] - Thumb fill on hover (defaults to the strong border token).
31
+ * @cssprop [--scroll-area-overflow-y-start] - Read-only: pixels scrolled past the block start edge.
32
+ * @cssprop [--scroll-area-overflow-y-end] - Read-only: pixels remaining to the block end edge.
33
+ * @cssprop [--scroll-area-overflow-x-start] - Read-only: pixels scrolled past the inline start edge.
34
+ * @cssprop [--scroll-area-overflow-x-end] - Read-only: pixels remaining to the inline end edge.
35
+ */
36
+ export default class ScrollArea extends ScrollArea_base {
37
+ static styles: import("lit").CSSResult[];
38
+ /**
39
+ * Which scrollbars to render. `block` is vertical, `inline` is horizontal.
40
+ * @default "block"
41
+ */
42
+ axis: 'block' | 'inline' | 'both';
43
+ /**
44
+ * Distance in pixels past an edge before the matching `data-overflow-*` state
45
+ * (and edge-fade variable) is considered active.
46
+ * @default 0
47
+ */
48
+ overflowEdgeThreshold: number;
49
+ /**
50
+ * Fades the content in and out at the scroll edges with a mask, signalling
51
+ * there is more content beyond the edge.
52
+ * @default false
53
+ */
54
+ fade: boolean;
55
+ /** Always display the scrollbar instead of hiding it when idle. */
56
+ alwaysShowScrollbar: boolean;
57
+ private viewport;
58
+ private scrollbarBlock?;
59
+ private thumbBlock?;
60
+ private scrollbarInline?;
61
+ private thumbInline?;
62
+ private hasBlockOverflow;
63
+ private hasInlineOverflow;
64
+ private resizeObserver?;
65
+ private coarsePointer?;
66
+ private scrollTimeout?;
67
+ private dragOrientation;
68
+ private dragStart;
69
+ private dragStartScroll;
70
+ private get hasBlock();
71
+ private get hasInline();
72
+ connectedCallback(): void;
73
+ disconnectedCallback(): void;
74
+ firstUpdated(): void;
75
+ protected updated(): void;
76
+ private handleSlotChange;
77
+ private handleCoarseChange;
78
+ private handlePointerOver;
79
+ private handlePointerLeave;
80
+ /** Marks the area as actively scrolling, clearing the flag after a quiet period. */
81
+ private flagScrolling;
82
+ private handleScroll;
83
+ /**
84
+ * Measures overflow and positions/sizes the thumbs. Ported from Base UI's
85
+ * `ScrollAreaViewport#computeThumbPosition`.
86
+ */
87
+ private measure;
88
+ private handleThumbPointerDown;
89
+ private handleThumbPointerMove;
90
+ private handleThumbPointerUp;
91
+ private handleTrackPointerDown;
92
+ /** Scrolling over a scrollbar track scrolls the viewport. */
93
+ private handleScrollbarWheel;
94
+ render(): import("lit").TemplateResult<1>;
95
+ }
96
+ declare global {
97
+ interface HTMLElementTagNameMap {
98
+ 'nord-scroll-area': ScrollArea;
99
+ }
100
+ }
101
+ export {};
@@ -21,6 +21,8 @@ declare const SegmentedControlItem_base: (new (...args: any[]) => import("../com
21
21
  * @cssprop [--n-segmented-control-item-font-weight=var(--n-font-weight)] - Controls the weight of the text within the item, using our [font tokens](/tokens/#font).
22
22
  * @cssprop [--n-segmented-control-item-min-block-size=calc(var(--n-space-xl) - 2px)] - Controls the minimum block size, or height, of the item using our [spacing tokens](/tokens/#space).
23
23
  * @cssprop [--n-segmented-control-item-inline-size=auto] - Controls the inline size of the item.
24
+ *
25
+ * @parent SegmentedControl
24
26
  */
25
27
  export default class SegmentedControlItem extends SegmentedControlItem_base {
26
28
  static styles: import("lit").CSSResult[];
@@ -0,0 +1,2 @@
1
+ export declare function isWeekend(date: Date): boolean;
2
+ export declare function highlightEverySixthDay(date: Date): string | false;
@@ -0,0 +1 @@
1
+ export declare function removeDismissedElement(event: Event): void;
@@ -0,0 +1,2 @@
1
+ export declare const STANDALONE_STORY_DESCRIPTION = "Used on its own, providing its own label and hint via attributes. The Field story shows the same control composed inside a `nord-field` instead.";
2
+ export declare const FIELD_STORY_DESCRIPTION = "Composed inside a `nord-field` with separate label and description elements, for layout the built-in label cannot give \u2014 horizontal orientation, custom label markup, or grouping. The Standalone story shows the same control providing its own label instead.";
@@ -9,6 +9,8 @@ import { LitElement } from 'lit';
9
9
  * @slot tab - The element which contains all tabs to reveal tabbed content.
10
10
  *
11
11
  * @cssprop [--n-tab-group-padding=0] - Controls the padding around the tab group (including the tab list), using our [spacing tokens](/tokens/#space).
12
+ *
13
+ * @parent Tab
12
14
  */
13
15
  export default class TabGroup extends LitElement {
14
16
  static styles: import("lit").CSSResult[];
@@ -6,6 +6,8 @@ import { LitElement } from 'lit';
6
6
  * @status ready
7
7
  * @category navigation
8
8
  * @slot - The tab panel content.
9
+ *
10
+ * @parent Tab
9
11
  */
10
12
  export default class TabPanel extends LitElement {
11
13
  static styles: import("lit").CSSResult[];
@@ -11,6 +11,8 @@ import { LitElement } from 'lit';
11
11
  *
12
12
  * @cssprop [--n-tag-group-border-radius=var(--n-border-radius-s)] - Controls the rounded corners of the tag group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.
13
13
  * @cssprop [--n-tag-group-box-shadow=var(--n-box-shadow)] - Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.
14
+ *
15
+ * @parent Tag
14
16
  */
15
17
  export default class TagGroup extends LitElement {
16
18
  static styles: import("lit").CSSResult[];
@@ -12,7 +12,8 @@ declare const Textarea_base: (new (...args: any[]) => import("../common/mixins/S
12
12
  * @slot error - Optional slot that holds error text for the textarea.
13
13
  *
14
14
  * @cssprop [--n-textarea-inline-size=240px] - Controls the inline size, or width, of the textarea.
15
- * @cssprop [--n-textarea-block-size=76px] - Controls the block size, or height, of the textarea.
15
+ * @cssprop [--n-textarea-block-size=76px] - Controls the minimum block size, or height, of the textarea. When `resize="auto"`, the textarea grows from this height as content is added.
16
+ * @cssprop [--n-textarea-max-block-size=500px] - Controls the maximum block size, or height, of the textarea. When `resize="auto"`, the textarea stops growing at this height and a scrollbar appears.
16
17
  * @cssprop [--n-textarea-background=var(--n-color-active)] - Controls the background of the textarea, using our [color tokens](/tokens/#color).
17
18
  * @cssprop [--n-textarea-color=var(--n-color-text)] - Controls the text color of the textarea, using our [color tokens](/tokens/#color).
18
19
  * @cssprop [--n-textarea-border-color=var(--n-color-border-strong)] - Controls the border color of the textarea, using our [color tokens](/tokens/#color).
@@ -0,0 +1,105 @@
1
+ import { LitElement } from 'lit';
2
+ import '../input/Input.js';
3
+ import '../dropdown/Dropdown.js';
4
+ import '../dropdown-item/DropdownItem.js';
5
+ import '../button/Button.js';
6
+ import '../icon/Icon.js';
7
+ declare const TimePicker_base: typeof LitElement;
8
+ /**
9
+ * Time Picker pairs the browser's native time field with a dropdown of quick
10
+ * options, generated at a configurable `interval` between `start` and `end`.
11
+ * The native field handles typing, locale-aware display and validation; the
12
+ * dropdown is a shortcut for common times.
13
+ *
14
+ * The value is held in ISO `HH:mm` format.
15
+ *
16
+ * Like a native input, Time Picker is a control only — it has no built-in
17
+ * label, hint or error. Compose it inside a [Field](/components/field/) (with a
18
+ * [Field Label](/components/field-label/), [Field Description](/components/field-description/)
19
+ * and [Field Error](/components/field-error/)) to label it and add help or error text.
20
+ *
21
+ * @status draft
22
+ * @category form
23
+ *
24
+ * @fires change - Fired when the selected time changes.
25
+ *
26
+ * @localization chooseTime - Accessible label for the dropdown toggle button.
27
+ */
28
+ export default class TimePicker extends TimePicker_base {
29
+ static styles: import("lit").CSSResult[];
30
+ private localize;
31
+ private ariaObserver?;
32
+ /** The selected time, in ISO `HH:mm` format. */
33
+ value?: string;
34
+ /** Name submitted with the form. */
35
+ name?: string;
36
+ /** Earliest time offered in the dropdown, ISO `HH:mm`. @default "09:00" */
37
+ start: string;
38
+ /** Latest time offered in the dropdown, ISO `HH:mm`. @default "17:00" */
39
+ end: string;
40
+ /** Minutes between each option in the dropdown. @default 30 */
41
+ interval: number;
42
+ /** When set, a typed time is rounded to the nearest interval option; otherwise any time is accepted. */
43
+ roundToInterval: boolean;
44
+ /** Display dropdown times in 12-hour (AM/PM) or 24-hour format; omit to use the locale default. */
45
+ hourFormat?: '12h' | '24h';
46
+ /** Earliest time the field will accept, ISO `HH:mm`. */
47
+ min?: string;
48
+ /** Latest time the field will accept, ISO `HH:mm`. */
49
+ max?: string;
50
+ /** Size of the field. @default "m" */
51
+ size: 's' | 'm' | 'l';
52
+ /** Whether the field expands to fill its container. */
53
+ expand: boolean;
54
+ /** Whether the field is disabled. */
55
+ disabled: boolean;
56
+ /** Whether the field is read-only. */
57
+ readonly: boolean;
58
+ /** Whether a value is required when submitting a form. */
59
+ required: boolean;
60
+ /**
61
+ * Label for the control. Rendered by the inner input when used standalone;
62
+ * ignored when wrapped in a `<nord-field>` (the Field provides the label).
63
+ */
64
+ label?: string;
65
+ /** Optional hint text. Ignored inside a `<nord-field>`. */
66
+ hint?: string;
67
+ /** Optional error text. Ignored inside a `<nord-field>`. */
68
+ error?: string;
69
+ /** Visually hide the label, but keep it for assistive technology. */
70
+ hideLabel: boolean;
71
+ /** Render the hint below the control instead of below the label. */
72
+ hintBelow: boolean;
73
+ /** Visually hide the required indicator, but keep the required state for AT. */
74
+ hideRequired: boolean;
75
+ private input?;
76
+ private dropdown?;
77
+ connectedCallback(): void;
78
+ disconnectedCallback(): void;
79
+ /** Move focus to the field, so a Field Label's click-to-focus works. */
80
+ focus(): void;
81
+ private get clampedInterval();
82
+ /**
83
+ * Accessible name from a consumer-set host `aria-label` / `aria-labelledby`,
84
+ * forwarded to the inner input as `aria-label` (an external `aria-labelledby`
85
+ * can't cross the shadow boundary). Inside a `<nord-field>` the inner input
86
+ * takes its name from the field context instead.
87
+ */
88
+ private get hostAccessibleName();
89
+ /** Locale-aware label for a `HH:mm` value (matches how the native field reads). */
90
+ private formatLabel;
91
+ /** Generated dropdown options between `start` and `end`. */
92
+ private get options();
93
+ /** Round a `HH:mm` value to the nearest interval option, clamped within `start`/`end`. */
94
+ private roundToNearestInterval;
95
+ private setValue;
96
+ private handleFieldChange;
97
+ private handleSelect;
98
+ render(): import("lit").TemplateResult<1>;
99
+ }
100
+ declare global {
101
+ interface HTMLElementTagNameMap {
102
+ 'nord-time-picker': TimePicker;
103
+ }
104
+ }
105
+ export {};
@@ -0,0 +1,4 @@
1
+ declare const timePickerLocalization: {
2
+ chooseTime: string;
3
+ };
4
+ export default timePickerLocalization;
@@ -9,10 +9,21 @@ type ToastOptions = Partial<Pick<Toast, 'variant' | 'autoDismiss'>>;
9
9
  * @slot - Default slot in which to place toasts.
10
10
  *
11
11
  * @fires {NordEvent} dismiss - Fired when a toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM.
12
+ *
13
+ * @parent Toast
12
14
  */
13
15
  export default class ToastGroup extends LitElement {
14
16
  static styles: import("lit").CSSResult[];
17
+ disconnectedCallback(): void;
15
18
  render(): import("lit").TemplateResult<1>;
19
+ private handleSlotChange;
20
+ /**
21
+ * Place the group in the top layer via the Popover API so that toasts render
22
+ * above modals, drawers and other content regardless of stacking contexts
23
+ * created by container queries, transforms or other containing block ancestors.
24
+ */
25
+ private enterTopLayer;
26
+ private leaveTopLayer;
16
27
  /**
17
28
  * Convenience method for creating and adding a toast to the group.
18
29
  * @param {string} text - The text/message of the toast.
@@ -52,6 +52,18 @@ export default class Tooltip extends LitElement {
52
52
  * Indicates whether the tooltip is currently open.
53
53
  */
54
54
  open: boolean;
55
+ /**
56
+ * Distance in pixels from the trigger along the main axis — the gap between
57
+ * the tooltip and the side it opens against. Fed into Floating UI's `offset`
58
+ * middleware as `mainAxis`. Defaults to `8`.
59
+ */
60
+ sideOffset: number;
61
+ /**
62
+ * Offset in pixels along the alignment axis — skids the tooltip along the
63
+ * trigger's edge. Fed into Floating UI's `offset` middleware as
64
+ * `alignmentAxis`. Defaults to `0`.
65
+ */
66
+ alignOffset: number;
55
67
  /**
56
68
  * Apply all event listeners
57
69
  */
@@ -27,6 +27,18 @@ export default class Truncate extends LitElement {
27
27
  * Delay in milliseconds before the tooltip opens.
28
28
  */
29
29
  delay: number;
30
+ /**
31
+ * Distance in pixels between the tooltip and the trigger along the main axis.
32
+ * Mirrors `nord-tooltip`'s `side-offset` and is forwarded to the portaled
33
+ * tooltip. Defaults to `8`.
34
+ */
35
+ sideOffset: number;
36
+ /**
37
+ * Offset in pixels along the tooltip's alignment axis. Mirrors
38
+ * `nord-tooltip`'s `align-offset` and is forwarded to the portaled tooltip.
39
+ * Defaults to `0`.
40
+ */
41
+ alignOffset: number;
30
42
  /**
31
43
  * Maximum number of lines before truncating. Defaults to `1` (single line).
32
44
  * Values `>= 2` allow the text to wrap up to that many lines before the
@@ -0,0 +1,2 @@
1
+ const o="Used on its own, providing its own label and hint via attributes. The Field story shows the same control composed inside a `nord-field` instead.",e="Composed inside a `nord-field` with separate label and description elements, for layout the built-in label cannot give — horizontal orientation, custom label markup, or grouping. The Standalone story shows the same control providing its own label instead.";export{e as FIELD_STORY_DESCRIPTION,o as STANDALONE_STORY_DESCRIPTION};
2
+ //# sourceMappingURL=story-descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-descriptions.js","sources":["../src/storybook-utils/story-descriptions.ts"],"sourcesContent":["// Shared docs descriptions for the paired \"Standalone\" and \"Field\" stories that\n// most form controls provide. Both stories render the same control; only the\n// labelling approach differs, so the copy is identical across components.\n\nexport const STANDALONE_STORY_DESCRIPTION\n = 'Used on its own, providing its own label and hint via attributes. The Field story shows the same control composed inside a `nord-field` instead.'\n\nexport const FIELD_STORY_DESCRIPTION\n = 'Composed inside a `nord-field` with separate label and description elements, for layout the built-in label cannot give — horizontal orientation, custom label markup, or grouping. The Standalone story shows the same control providing its own label instead.'\n"],"names":["STANDALONE_STORY_DESCRIPTION","FIELD_STORY_DESCRIPTION"],"mappings":"AAIO,MAAMA,EACT,mJAESC,EACT"}
@@ -1,2 +1,2 @@
1
- import{isServer as t}from"lit";import o from"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";import"./localization6.js";import"./localization7.js";import"./localization8.js";import"./localization9.js";const n=new Set,i=new Set,r=new Map;function e(t,o){if(!a(o))return o;if(!a(t))return o;const n={...t};for(const t in o){const i=o[t],r=n[t];a(i)&&a(r)?n[t]=e(r,i):n[t]=i}return n}function a(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}if(!t){new MutationObserver((function(){for(const t of n)t()})).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]})}function c(){r.clear()}function l(...t){t.forEach((t=>{const o=t.$lang.toLowerCase(),n=r.get(o),i=n?e(n,t):t;r.set(o,i)})),function(){for(const t of i)t()}()}function s(t){return n.add(t),()=>n.delete(t)}function u(t){return i.add(t),()=>i.delete(t)}function f(t){return r.has(t)}function m(t){const n=t.toLowerCase(),[i]=n.split("-");return r.get(n)||r.get(i)||o}export{c as clearTranslations,o as fallback,f as isTranslationRegistered,l as registerTranslation,m as resolveTranslation,s as subscribeToDocumentLang,u as subscribeToTranslationRegistration};
1
+ import{isServer as o}from"lit";import t from"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";import"./localization6.js";import"./localization7.js";import"./localization8.js";import"./localization9.js";import"./localization10.js";import"./localization11.js";import"./localization12.js";import"./localization13.js";import"./localization14.js";import"./localization15.js";import"./localization16.js";import"./localization17.js";import"./localization18.js";import"./localization19.js";import"./localization20.js";import"./localization21.js";import"./localization22.js";const i=new Set,n=new Set,a=new Map;function r(o,t){if(!l(t))return t;if(!l(o))return t;const i={...o};for(const o in t){const n=t[o],a=i[o];l(n)&&l(a)?i[o]=r(a,n):i[o]=n}return i}function l(o){return null!==o&&"object"==typeof o&&!Array.isArray(o)}if(!o){new MutationObserver((function(){for(const o of i)o()})).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]})}function c(){a.clear()}function e(...o){o.forEach((o=>{const t=o.$lang.toLowerCase(),i=a.get(t),n=i?r(i,o):o;a.set(t,n)})),function(){for(const o of n)o()}()}function s(o){return i.add(o),()=>i.delete(o)}function m(o){return n.add(o),()=>n.delete(o)}function p(o){return a.has(o)}function u(o){const i=o.toLowerCase(),[n]=i.split("-");return a.get(i)||a.get(n)||t}export{c as clearTranslations,t as fallback,p as isTranslationRegistered,e as registerTranslation,u as resolveTranslation,s as subscribeToDocumentLang,m as subscribeToTranslationRegistration};
2
2
  //# sourceMappingURL=translation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"translation.js","sources":["../src/localization/translation.ts"],"sourcesContent":["import { isServer } from 'lit'\nimport en from './en-us.js'\n\n// gets list of properties beginning prefix\ntype PickStartsWith<T, Prefix extends string> = T extends `${Prefix}${string}` ? T : never\n\n// Recursively make all properties optional\ntype DeepPartial<T> = T extends object\n ? {\n [P in keyof T]?: DeepPartial<T[P]>\n }\n : T\n\nexport type Translation = typeof en\nexport type PartialTranslation = {\n $lang: string\n $name?: string\n $dir?: 'ltr' | 'rtl'\n} & DeepPartial<Omit<Translation, '$lang' | '$name' | '$dir'>>\nexport type WellKnownKeys = PickStartsWith<keyof Translation, '$'>\n\nconst documentLangSubscribers = new Set<() => void>()\nconst translationRegistrationSubscribers = new Set<() => void>()\nconst translations = new Map<string, Translation>()\n\nfunction notifyDocumentLangChange() {\n for (const subscriber of documentLangSubscribers) {\n subscriber()\n }\n}\n\nfunction notifyTranslationRegistration() {\n for (const subscriber of translationRegistrationSubscribers) {\n subscriber()\n }\n}\n\nfunction deepMerge(target: unknown, source: unknown): unknown {\n if (!isObject(source))\n return source\n\n if (!isObject(target))\n return source\n\n const result = { ...target }\n\n for (const key in source) {\n const sourceValue = (source as Record<string, unknown>)[key]\n const targetValue = result[key]\n\n if (isObject(sourceValue) && isObject(targetValue)) {\n result[key] = deepMerge(targetValue, sourceValue)\n }\n else {\n result[key] = sourceValue\n }\n }\n\n return result\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\n// observe changes to the document's lang\nif (!isServer) {\n const observer = new MutationObserver(notifyDocumentLangChange)\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['lang'],\n })\n}\n\n/**\n * Removes all registered translations\n */\nexport function clearTranslations() {\n translations.clear()\n}\n\n/**\n * Registers one or more translations. If a translation for the same language\n * already exists, the new translation will be deep-merged with the existing one.\n * Translations can be partial — only the fields you provide will override existing values.\n */\nexport function registerTranslation(...translation: (Translation | PartialTranslation)[]) {\n translation.forEach((t) => {\n const lang = t.$lang.toLowerCase()\n const existing = translations.get(lang)\n\n // Deep merge: keep existing keys, override with new ones\n const merged = existing ? (deepMerge(existing, t) as Translation) : (t as Translation)\n translations.set(lang, merged)\n })\n\n notifyTranslationRegistration()\n}\n\n/**\n * subscribe to document language changes\n * @param onChange callback for when document `lang` attr changes\n * @returns cleanup function\n */\nexport function subscribeToDocumentLang(onChange: () => void): () => void {\n documentLangSubscribers.add(onChange)\n return () => documentLangSubscribers.delete(onChange)\n}\n\n/**\n * subscribe to translation registration changes\n * @param onChange callback for when new translations are registered\n * @returns cleanup function\n */\nexport function subscribeToTranslationRegistration(onChange: () => void): () => void {\n translationRegistrationSubscribers.add(onChange)\n return () => translationRegistrationSubscribers.delete(onChange)\n}\n\n/**\n * Check whether there is a translation registered for the given lang\n * @param lang the lang code e.g. \"en\" or \"en-GB\"\n */\nexport function isTranslationRegistered(lang: string) {\n return translations.has(lang)\n}\n\n/**\n * Picks the most appropriate translation for the given language, from most specific to least specific.\n * First tries lang + region, then lang only, then fallback.\n */\nexport function resolveTranslation(langCode: string) {\n const lang = langCode.toLowerCase()\n const [langOnly] = lang.split('-')\n\n return translations.get(lang) || translations.get(langOnly) || en\n}\n\nexport { en as fallback }\n"],"names":["documentLangSubscribers","Set","translationRegistrationSubscribers","translations","Map","deepMerge","target","source","isObject","result","key","sourceValue","targetValue","value","Array","isArray","isServer","MutationObserver","subscriber","observe","document","documentElement","attributes","attributeFilter","clearTranslations","clear","registerTranslation","translation","forEach","t","lang","$lang","toLowerCase","existing","get","merged","set","notifyTranslationRegistration","subscribeToDocumentLang","onChange","add","delete","subscribeToTranslationRegistration","isTranslationRegistered","has","resolveTranslation","langCode","langOnly","split","en"],"mappings":"2SAqBA,MAAMA,EAA0B,IAAIC,IAC9BC,EAAqC,IAAID,IACzCE,EAAe,IAAIC,IAczB,SAASC,EAAUC,EAAiBC,GAClC,IAAKC,EAASD,GACZ,OAAOA,EAET,IAAKC,EAASF,GACZ,OAAOC,EAET,MAAME,EAAS,IAAKH,GAEpB,IAAK,MAAMI,KAAOH,EAAQ,CACxB,MAAMI,EAAeJ,EAAmCG,GAClDE,EAAcH,EAAOC,GAEvBF,EAASG,IAAgBH,EAASI,GACpCH,EAAOC,GAAOL,EAAUO,EAAaD,GAGrCF,EAAOC,GAAOC,CAEjB,CAED,OAAOF,CACT,CAEA,SAASD,EAASK,GAChB,OAAiB,OAAVA,GAAmC,iBAAVA,IAAuBC,MAAMC,QAAQF,EACvE,CAGA,IAAKG,EAAU,CACI,IAAIC,kBA1CvB,WACE,IAAK,MAAMC,KAAclB,EACvBkB,GAEJ,IAwCWC,QAAQC,SAASC,gBAAiB,CACzCC,YAAY,EACZC,gBAAiB,CAAC,SAEtB,UAKgBC,IACdrB,EAAasB,OACf,CAOgB,SAAAC,KAAuBC,GACrCA,EAAYC,SAASC,IACnB,MAAMC,EAAOD,EAAEE,MAAMC,cACfC,EAAW9B,EAAa+B,IAAIJ,GAG5BK,EAASF,EAAY5B,EAAU4B,EAAUJ,GAAsBA,EACrE1B,EAAaiC,IAAIN,EAAMK,EAAO,IA/DlC,WACE,IAAK,MAAMjB,KAAchB,EACvBgB,GAEJ,CA8DEmB,EACF,CAOM,SAAUC,EAAwBC,GAEtC,OADAvC,EAAwBwC,IAAID,GACrB,IAAMvC,EAAwByC,OAAOF,EAC9C,CAOM,SAAUG,EAAmCH,GAEjD,OADArC,EAAmCsC,IAAID,GAChC,IAAMrC,EAAmCuC,OAAOF,EACzD,CAMM,SAAUI,EAAwBb,GACtC,OAAO3B,EAAayC,IAAId,EAC1B,CAMM,SAAUe,EAAmBC,GACjC,MAAMhB,EAAOgB,EAASd,eACfe,GAAYjB,EAAKkB,MAAM,KAE9B,OAAO7C,EAAa+B,IAAIJ,IAAS3B,EAAa+B,IAAIa,IAAaE,CACjE"}
1
+ {"version":3,"file":"translation.js","sources":["../src/localization/translation.ts"],"sourcesContent":["import { isServer } from 'lit'\nimport en from './en-us.js'\n\n// gets list of properties beginning prefix\ntype PickStartsWith<T, Prefix extends string> = T extends `${Prefix}${string}` ? T : never\n\n// Recursively make all properties optional\ntype DeepPartial<T> = T extends object\n ? {\n [P in keyof T]?: DeepPartial<T[P]>\n }\n : T\n\nexport type Translation = typeof en\nexport type PartialTranslation = {\n $lang: string\n $name?: string\n $dir?: 'ltr' | 'rtl'\n} & DeepPartial<Omit<Translation, '$lang' | '$name' | '$dir'>>\nexport type WellKnownKeys = PickStartsWith<keyof Translation, '$'>\n\nconst documentLangSubscribers = new Set<() => void>()\nconst translationRegistrationSubscribers = new Set<() => void>()\nconst translations = new Map<string, Translation>()\n\nfunction notifyDocumentLangChange() {\n for (const subscriber of documentLangSubscribers) {\n subscriber()\n }\n}\n\nfunction notifyTranslationRegistration() {\n for (const subscriber of translationRegistrationSubscribers) {\n subscriber()\n }\n}\n\nfunction deepMerge(target: unknown, source: unknown): unknown {\n if (!isObject(source))\n return source\n\n if (!isObject(target))\n return source\n\n const result = { ...target }\n\n for (const key in source) {\n const sourceValue = (source as Record<string, unknown>)[key]\n const targetValue = result[key]\n\n if (isObject(sourceValue) && isObject(targetValue)) {\n result[key] = deepMerge(targetValue, sourceValue)\n }\n else {\n result[key] = sourceValue\n }\n }\n\n return result\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\n// observe changes to the document's lang\nif (!isServer) {\n const observer = new MutationObserver(notifyDocumentLangChange)\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['lang'],\n })\n}\n\n/**\n * Removes all registered translations\n */\nexport function clearTranslations() {\n translations.clear()\n}\n\n/**\n * Registers one or more translations. If a translation for the same language\n * already exists, the new translation will be deep-merged with the existing one.\n * Translations can be partial — only the fields you provide will override existing values.\n */\nexport function registerTranslation(...translation: (Translation | PartialTranslation)[]) {\n translation.forEach((t) => {\n const lang = t.$lang.toLowerCase()\n const existing = translations.get(lang)\n\n // Deep merge: keep existing keys, override with new ones\n const merged = existing ? (deepMerge(existing, t) as Translation) : (t as Translation)\n translations.set(lang, merged)\n })\n\n notifyTranslationRegistration()\n}\n\n/**\n * subscribe to document language changes\n * @param onChange callback for when document `lang` attr changes\n * @returns cleanup function\n */\nexport function subscribeToDocumentLang(onChange: () => void): () => void {\n documentLangSubscribers.add(onChange)\n return () => documentLangSubscribers.delete(onChange)\n}\n\n/**\n * subscribe to translation registration changes\n * @param onChange callback for when new translations are registered\n * @returns cleanup function\n */\nexport function subscribeToTranslationRegistration(onChange: () => void): () => void {\n translationRegistrationSubscribers.add(onChange)\n return () => translationRegistrationSubscribers.delete(onChange)\n}\n\n/**\n * Check whether there is a translation registered for the given lang\n * @param lang the lang code e.g. \"en\" or \"en-GB\"\n */\nexport function isTranslationRegistered(lang: string) {\n return translations.has(lang)\n}\n\n/**\n * Picks the most appropriate translation for the given language, from most specific to least specific.\n * First tries lang + region, then lang only, then fallback.\n */\nexport function resolveTranslation(langCode: string) {\n const lang = langCode.toLowerCase()\n const [langOnly] = lang.split('-')\n\n return translations.get(lang) || translations.get(langOnly) || en\n}\n\nexport { en as fallback }\n"],"names":["documentLangSubscribers","Set","translationRegistrationSubscribers","translations","Map","deepMerge","target","source","isObject","result","key","sourceValue","targetValue","value","Array","isArray","isServer","MutationObserver","subscriber","observe","document","documentElement","attributes","attributeFilter","clearTranslations","clear","registerTranslation","translation","forEach","t","lang","$lang","toLowerCase","existing","get","merged","set","notifyTranslationRegistration","subscribeToDocumentLang","onChange","add","delete","subscribeToTranslationRegistration","isTranslationRegistered","has","resolveTranslation","langCode","langOnly","split","en"],"mappings":"upBAqBA,MAAMA,EAA0B,IAAIC,IAC9BC,EAAqC,IAAID,IACzCE,EAAe,IAAIC,IAczB,SAASC,EAAUC,EAAiBC,GAClC,IAAKC,EAASD,GACZ,OAAOA,EAET,IAAKC,EAASF,GACZ,OAAOC,EAET,MAAME,EAAS,IAAKH,GAEpB,IAAK,MAAMI,KAAOH,EAAQ,CACxB,MAAMI,EAAeJ,EAAmCG,GAClDE,EAAcH,EAAOC,GAEvBF,EAASG,IAAgBH,EAASI,GACpCH,EAAOC,GAAOL,EAAUO,EAAaD,GAGrCF,EAAOC,GAAOC,CAEjB,CAED,OAAOF,CACT,CAEA,SAASD,EAASK,GAChB,OAAiB,OAAVA,GAAmC,iBAAVA,IAAuBC,MAAMC,QAAQF,EACvE,CAGA,IAAKG,EAAU,CACI,IAAIC,kBA1CvB,WACE,IAAK,MAAMC,KAAclB,EACvBkB,GAEJ,IAwCWC,QAAQC,SAASC,gBAAiB,CACzCC,YAAY,EACZC,gBAAiB,CAAC,SAEtB,UAKgBC,IACdrB,EAAasB,OACf,CAOgB,SAAAC,KAAuBC,GACrCA,EAAYC,SAASC,IACnB,MAAMC,EAAOD,EAAEE,MAAMC,cACfC,EAAW9B,EAAa+B,IAAIJ,GAG5BK,EAASF,EAAY5B,EAAU4B,EAAUJ,GAAsBA,EACrE1B,EAAaiC,IAAIN,EAAMK,EAAO,IA/DlC,WACE,IAAK,MAAMjB,KAAchB,EACvBgB,GAEJ,CA8DEmB,EACF,CAOM,SAAUC,EAAwBC,GAEtC,OADAvC,EAAwBwC,IAAID,GACrB,IAAMvC,EAAwByC,OAAOF,EAC9C,CAOM,SAAUG,EAAmCH,GAEjD,OADArC,EAAmCsC,IAAID,GAChC,IAAMrC,EAAmCuC,OAAOF,EACzD,CAMM,SAAUI,EAAwBb,GACtC,OAAO3B,EAAayC,IAAId,EAC1B,CAMM,SAAUe,EAAmBC,GACjC,MAAMhB,EAAOgB,EAASd,eACfe,GAAYjB,EAAKkB,MAAM,KAE9B,OAAO7C,EAAa+B,IAAIJ,IAAS3B,EAAa+B,IAAIa,IAAaE,CACjE"}
@@ -0,0 +1,2 @@
1
+ import{getFormatter as n}from"./format.js";import{parseNumber as i}from"./parse.js";const t=1e-10,r=3;function u(n,i=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(i,Math.min(n,t))}function o(n){return null!=(null==n?void 0:n.maximumFractionDigits)||null!=(null==n?void 0:n.minimumFractionDigits)||null!=(null==n?void 0:n.maximumSignificantDigits)||null!=(null==n?void 0:n.minimumSignificantDigits)||null!=(null==n?void 0:n.roundingIncrement)||null!=(null==n?void 0:n.roundingMode)||null!=(null==n?void 0:n.roundingPriority)}function l(t,u){if(!Number.isFinite(t))return t;if(!o(u))return Number(t.toFixed(r));const l=n("en-US",{...u,signDisplay:"auto",currencySign:"standard",notation:"compact"===u.notation?"standard":u.notation,useGrouping:!1}),a=l.format(t),e=i(a,"en-US",u);return null===e?t:l.format(e)===a?e:t}function a(n,{step:i,minWithDefault:r,maxWithDefault:o,minWithZeroDefault:a,format:e,snapOnStep:m,small:s,clamp:c}){if(null===n)return n;let f=n;if(null!=i&&m&&0!==i){f=function(n,i,r,u="directional"){const o=Math.abs(r),l=Math.sign(r),a=n-i+o*t*l;return"nearest"===u?i+Math.round(a/r)*r:i+(l>0?Math.floor(a/o):Math.ceil(a/o))*o}(f,s||r===Number.MIN_SAFE_INTEGER?a:r,i,s?"nearest":"directional")}c&&(f=u(f,r,o));const d=l(f,e);return c?u(d,r,o):d}export{u as clamp,o as hasNumberFormatRoundingOptions,l as removeFloatingPointErrors,a as toValidatedNumber};
2
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sources":["../src/number-field/validate.ts"],"sourcesContent":["/**\n * Numeric validation/clamping/snapping, ported from Base UI's\n * `number-field/utils/validate.ts`. Snapping happens BEFORE clamping so\n * non-step-aligned boundaries stay reachable.\n */\n\nimport { getFormatter } from './format.js'\nimport { parseNumber } from './parse.js'\n\nconst STEP_EPSILON_FACTOR = 1e-10\n// Matches Intl.NumberFormat's decimal maximumFractionDigits default.\nconst DEFAULT_DIGITS = 3\n\n// Model NumberFormat v3 rounding options locally (es2022 Intl types omit them).\ntype NumberFormatOptionsWithRounding = Intl.NumberFormatOptions & {\n roundingIncrement?: number | undefined\n roundingMode?: string | undefined\n roundingPriority?: string | undefined\n}\n\nexport function clamp(\n val: number,\n min: number = Number.MIN_SAFE_INTEGER,\n max: number = Number.MAX_SAFE_INTEGER,\n): number {\n return Math.max(min, Math.min(val, max))\n}\n\nexport function hasNumberFormatRoundingOptions(\n format?: NumberFormatOptionsWithRounding,\n): format is NumberFormatOptionsWithRounding {\n return (\n format?.maximumFractionDigits != null\n || format?.minimumFractionDigits != null\n || format?.maximumSignificantDigits != null\n || format?.minimumSignificantDigits != null\n || format?.roundingIncrement != null\n || format?.roundingMode != null\n || format?.roundingPriority != null\n )\n}\n\nexport function removeFloatingPointErrors(value: number, format?: NumberFormatOptionsWithRounding) {\n if (!Number.isFinite(value)) {\n return value\n }\n\n if (!hasNumberFormatRoundingOptions(format)) {\n return Number(value.toFixed(DEFAULT_DIGITS))\n }\n\n const formatter = getFormatter('en-US', {\n ...format,\n // These options alter only display decoration, not numeric rounding.\n signDisplay: 'auto',\n currencySign: 'standard',\n notation: format.notation === 'compact' ? 'standard' : format.notation,\n useGrouping: false,\n } as NumberFormatOptionsWithRounding)\n const roundedText = formatter.format(value)\n const roundedValue = parseNumber(roundedText, 'en-US', format)\n\n if (roundedValue === null) {\n return value\n }\n\n return formatter.format(roundedValue) === roundedText ? roundedValue : value\n}\n\nfunction snapToStep(\n value: number,\n base: number,\n step: number,\n mode: 'directional' | 'nearest' = 'directional',\n) {\n const stepSize = Math.abs(step)\n const direction = Math.sign(step)\n const tolerance = stepSize * STEP_EPSILON_FACTOR * direction\n const rawSteps = value - base + tolerance\n\n if (mode === 'nearest') {\n return base + Math.round(rawSteps / step) * step\n }\n\n const snappedSteps\n = direction > 0 ? Math.floor(rawSteps / stepSize) : Math.ceil(rawSteps / stepSize)\n return base + snappedSteps * stepSize\n}\n\nexport function toValidatedNumber(\n value: number | null,\n {\n step,\n minWithDefault,\n maxWithDefault,\n minWithZeroDefault,\n format,\n snapOnStep,\n small,\n clamp: shouldClamp,\n }: {\n step: number | undefined\n minWithDefault: number\n maxWithDefault: number\n minWithZeroDefault: number\n format: NumberFormatOptionsWithRounding | undefined\n snapOnStep: boolean\n small: boolean\n clamp: boolean\n },\n): number | null {\n if (value === null) {\n return value\n }\n\n let nextValue = value\n\n if (step != null && snapOnStep && step !== 0) {\n const base\n = small || minWithDefault === Number.MIN_SAFE_INTEGER ? minWithZeroDefault : minWithDefault\n\n // Snap before clamping so non-step-aligned boundaries stay reachable.\n nextValue = snapToStep(nextValue, base, step, small ? 'nearest' : 'directional')\n }\n\n if (shouldClamp) {\n nextValue = clamp(nextValue, minWithDefault, maxWithDefault)\n }\n\n const roundedValue = removeFloatingPointErrors(nextValue, format)\n return shouldClamp ? clamp(roundedValue, minWithDefault, maxWithDefault) : roundedValue\n}\n"],"names":["STEP_EPSILON_FACTOR","DEFAULT_DIGITS","clamp","val","min","Number","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","Math","hasNumberFormatRoundingOptions","format","maximumFractionDigits","minimumFractionDigits","maximumSignificantDigits","minimumSignificantDigits","roundingIncrement","roundingMode","roundingPriority","removeFloatingPointErrors","value","isFinite","toFixed","formatter","getFormatter","signDisplay","currencySign","notation","useGrouping","roundedText","roundedValue","parseNumber","toValidatedNumber","step","minWithDefault","maxWithDefault","minWithZeroDefault","snapOnStep","small","shouldClamp","nextValue","base","mode","stepSize","abs","direction","sign","rawSteps","round","floor","ceil","snapToStep"],"mappings":"oFASA,MAAMA,EAAsB,MAEtBC,EAAiB,EASP,SAAAC,EACdC,EACAC,EAAcC,OAAOC,iBACrBC,EAAcF,OAAOG,kBAErB,OAAOC,KAAKF,IAAIH,EAAKK,KAAKL,IAAID,EAAKI,GACrC,CAEM,SAAUG,EACdC,GAEA,OACmC,OAAjCA,eAAAA,EAAQC,wBAC4B,OAAjCD,aAAM,EAANA,EAAQE,wBAC4B,OAApCF,aAAM,EAANA,EAAQG,2BAC4B,OAApCH,aAAM,EAANA,EAAQI,2BACqB,OAA7BJ,aAAM,EAANA,EAAQK,oBACgB,OAAxBL,aAAM,EAANA,EAAQM,eACoB,OAA5BN,aAAA,EAAAA,EAAQO,iBAEf,CAEgB,SAAAC,EAA0BC,EAAeT,GACvD,IAAKN,OAAOgB,SAASD,GACnB,OAAOA,EAGT,IAAKV,EAA+BC,GAClC,OAAON,OAAOe,EAAME,QAAQrB,IAG9B,MAAMsB,EAAYC,EAAa,QAAS,IACnCb,EAEHc,YAAa,OACbC,aAAc,WACdC,SAA8B,YAApBhB,EAAOgB,SAAyB,WAAahB,EAAOgB,SAC9DC,aAAa,IAETC,EAAcN,EAAUZ,OAAOS,GAC/BU,EAAeC,EAAYF,EAAa,QAASlB,GAEvD,OAAqB,OAAjBmB,EACKV,EAGFG,EAAUZ,OAAOmB,KAAkBD,EAAcC,EAAeV,CACzE,CAsBM,SAAUY,EACdZ,GACAa,KACEA,EAAIC,eACJA,EAAcC,eACdA,EAAcC,mBACdA,EAAkBzB,OAClBA,EAAM0B,WACNA,EAAUC,MACVA,EACApC,MAAOqC,IAYT,GAAc,OAAVnB,EACF,OAAOA,EAGT,IAAIoB,EAAYpB,EAEhB,GAAY,MAARa,GAAgBI,GAAuB,IAATJ,EAAY,CAK5CO,EArDJ,SACEpB,EACAqB,EACAR,EACAS,EAAkC,eAElC,MAAMC,EAAWlC,KAAKmC,IAAIX,GACpBY,EAAYpC,KAAKqC,KAAKb,GAEtBc,EAAW3B,EAAQqB,EADPE,EAAW3C,EAAsB6C,EAGnD,MAAa,YAATH,EACKD,EAAOhC,KAAKuC,MAAMD,EAAWd,GAAQA,EAKvCQ,GADHI,EAAY,EAAIpC,KAAKwC,MAAMF,EAAWJ,GAAYlC,KAAKyC,KAAKH,EAAWJ,IAC9CA,CAC/B,CAmCgBQ,CAAWX,EAHnBF,GAASJ,IAAmB7B,OAAOC,iBAAmB8B,EAAqBF,EAGvCD,EAAMK,EAAQ,UAAY,cACnE,CAEGC,IACFC,EAAYtC,EAAMsC,EAAWN,EAAgBC,IAG/C,MAAML,EAAeX,EAA0BqB,EAAW7B,GAC1D,OAAO4B,EAAcrC,EAAM4B,EAAcI,EAAgBC,GAAkBL,CAC7E"}