burne-ui 2.1.2 → 2.1.4

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 (599) hide show
  1. package/README.md +8 -4
  2. package/cli/burne-ui.js +4 -3
  3. package/cli/init.js +83 -19
  4. package/cli/skin-live-slots.json +1 -1
  5. package/cli/skin-slots.json +2 -0
  6. package/cli/skin-validate.mjs +83 -2
  7. package/cli/tailwind.css +20 -0
  8. package/cli/theme-bridge.css +6 -0
  9. package/dist/authoring.d.ts +2 -0
  10. package/dist/authoring.js +8 -0
  11. package/dist/components/composite/Accordion/accordionStyles.js +1 -1
  12. package/dist/components/composite/Accordion/useAccordionRootState.js +6 -2
  13. package/dist/components/composite/AlertDialog/AlertDialog.d.ts +1 -1
  14. package/dist/components/composite/AlertDialog/AlertDialog.js +1 -0
  15. package/dist/components/composite/AlertDialog/alertDialogAnimations.d.ts +1 -0
  16. package/dist/components/composite/AlertDialog/alertDialogAnimations.js +1 -0
  17. package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +5 -7
  18. package/dist/components/composite/AlertDialog/alertDialogParts.js +92 -37
  19. package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +3 -2
  20. package/dist/components/composite/AlertDialog/alertDialogStyles.js +5 -3
  21. package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +8 -8
  22. package/dist/components/composite/AlertDialog/index.d.ts +4 -6
  23. package/dist/components/composite/AlertDialog/useAlertDialogRootState.d.ts +1 -1
  24. package/dist/components/composite/AlertDialog/useAlertDialogRootState.js +13 -1
  25. package/dist/components/composite/ButtonGroup/ButtonGroup.d.ts +1 -0
  26. package/dist/components/composite/ButtonGroup/ButtonGroup.js +59 -25
  27. package/dist/components/composite/ButtonGroup/buttonGroupAPI.d.ts +1 -0
  28. package/dist/components/composite/ButtonGroup/buttonGroupAPI.js +7 -1
  29. package/dist/components/composite/ButtonGroup/buttonGroupContext.d.ts +3 -2
  30. package/dist/components/composite/ButtonGroup/buttonGroupContext.js +4 -3
  31. package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +1 -1
  32. package/dist/components/composite/ButtonGroup/buttonGroupTypes.d.ts +3 -1
  33. package/dist/components/composite/ButtonGroup/index.d.ts +1 -0
  34. package/dist/components/composite/CheckboxGroup/CheckboxGroup.js +25 -7
  35. package/dist/components/composite/CheckboxGroup/useCheckboxGroupRootState.d.ts +5 -1
  36. package/dist/components/composite/CheckboxGroup/useCheckboxGroupRootState.js +74 -23
  37. package/dist/components/composite/Form/Form.js +6 -0
  38. package/dist/components/composite/Form/formAPI.d.ts +2 -0
  39. package/dist/components/composite/Form/formAPI.js +29 -2
  40. package/dist/components/composite/Form/formContext.js +4 -0
  41. package/dist/components/composite/Form/formParts.js +20 -6
  42. package/dist/components/composite/Form/formStyles.js +4 -4
  43. package/dist/components/composite/Form/useFormControlProps.js +25 -15
  44. package/dist/components/composite/Form/useFormFieldBinding.js +22 -14
  45. package/dist/components/composite/Form/useFormRootState.d.ts +2 -1
  46. package/dist/components/composite/Form/useFormRootState.js +151 -89
  47. package/dist/components/composite/RadioGroup/RadioGroup.js +30 -10
  48. package/dist/components/composite/RadioGroup/radioGroupA11y.d.ts +10 -0
  49. package/dist/components/composite/RadioGroup/radioGroupA11y.js +75 -0
  50. package/dist/components/composite/RadioGroup/radioGroupTypes.d.ts +2 -2
  51. package/dist/components/composite/RadioGroup/useRadioGroupRootState.d.ts +7 -1
  52. package/dist/components/composite/RadioGroup/useRadioGroupRootState.js +105 -34
  53. package/dist/components/composite/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
  54. package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupA11y.d.ts +1 -1
  55. package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupA11y.js +13 -7
  56. package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupAPI.d.ts +2 -0
  57. package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupAPI.js +19 -4
  58. package/dist/components/composite/ToggleButtonGroup/useToggleButtonGroupRootState.js +20 -7
  59. package/dist/components/composite/utils/optionGroupFieldset.d.ts +1 -1
  60. package/dist/components/core/Alert/Alert.js +3 -1
  61. package/dist/components/core/Alert/alertAnimations.js +14 -3
  62. package/dist/components/core/Alert/alertStyles.d.ts +1 -1
  63. package/dist/components/core/Alert/alertStyles.js +1 -1
  64. package/dist/components/core/AppShell/AppShell.js +16 -4
  65. package/dist/components/core/AppShell/appShellAnimations.js +1 -1
  66. package/dist/components/core/AppShell/appShellStyles.d.ts +3 -2
  67. package/dist/components/core/AppShell/appShellStyles.js +8 -2
  68. package/dist/components/core/AspectRatio/AspectRatio.js +6 -3
  69. package/dist/components/core/AspectRatio/aspectRatioAnimations.js +1 -1
  70. package/dist/components/core/AspectRatio/aspectRatioStyles.d.ts +5 -2
  71. package/dist/components/core/AspectRatio/aspectRatioStyles.js +27 -3
  72. package/dist/components/core/Avatar/avatarParts.js +26 -6
  73. package/dist/components/core/Avatar/avatarTypes.d.ts +1 -0
  74. package/dist/components/core/Avatar/useAvatarRootState.d.ts +1 -0
  75. package/dist/components/core/Avatar/useAvatarRootState.js +6 -2
  76. package/dist/components/core/Badge/Badge.js +9 -3
  77. package/dist/components/core/Badge/badgeA11y.js +6 -0
  78. package/dist/components/core/Badge/badgeAPI.js +4 -4
  79. package/dist/components/core/Badge/badgeAnimations.js +18 -3
  80. package/dist/components/core/Badge/badgeParts.d.ts +1 -1
  81. package/dist/components/core/Badge/badgeParts.js +6 -3
  82. package/dist/components/core/Badge/badgeStyles.d.ts +1 -0
  83. package/dist/components/core/Badge/badgeStyles.js +2 -0
  84. package/dist/components/core/Badge/badgeTypes.d.ts +2 -0
  85. package/dist/components/core/Badge/useBadgeRootState.d.ts +1 -0
  86. package/dist/components/core/Badge/useBadgeRootState.js +2 -1
  87. package/dist/components/core/Breadcrumbs/breadcrumbsAPI.js +11 -5
  88. package/dist/components/core/Breadcrumbs/breadcrumbsParts.js +21 -6
  89. package/dist/components/core/Breadcrumbs/breadcrumbsStyles.js +4 -4
  90. package/dist/components/core/Button/Button.js +34 -18
  91. package/dist/components/core/Button/buttonAnimations.d.ts +1 -1
  92. package/dist/components/core/Button/buttonAnimations.js +18 -7
  93. package/dist/components/core/Button/buttonParts.js +2 -2
  94. package/dist/components/core/Button/buttonStyles.d.ts +4 -3
  95. package/dist/components/core/Button/buttonStyles.js +11 -10
  96. package/dist/components/core/Button/buttonTypes.d.ts +2 -1
  97. package/dist/components/core/Button/useButtonRootState.d.ts +2 -1
  98. package/dist/components/core/Button/useButtonRootState.js +10 -4
  99. package/dist/components/core/Calendar/Calendar.js +15 -4
  100. package/dist/components/core/Calendar/calendarAPI.d.ts +10 -6
  101. package/dist/components/core/Calendar/calendarAPI.js +110 -30
  102. package/dist/components/core/Calendar/calendarParts.js +173 -72
  103. package/dist/components/core/Calendar/calendarStyles.d.ts +5 -5
  104. package/dist/components/core/Calendar/calendarStyles.js +8 -8
  105. package/dist/components/core/Calendar/calendarTypes.d.ts +8 -0
  106. package/dist/components/core/Calendar/useCalendarRootState.js +60 -19
  107. package/dist/components/core/Calendar/useCalendarViewModels.js +6 -6
  108. package/dist/components/core/Card/Card.d.ts +1 -0
  109. package/dist/components/core/Card/Card.js +17 -7
  110. package/dist/components/core/Card/cardAPI.d.ts +1 -0
  111. package/dist/components/core/Card/cardAPI.js +23 -1
  112. package/dist/components/core/Card/cardAnimations.d.ts +1 -1
  113. package/dist/components/core/Card/cardAnimations.js +41 -10
  114. package/dist/components/core/Card/cardParts.d.ts +1 -1
  115. package/dist/components/core/Card/cardParts.js +26 -6
  116. package/dist/components/core/Card/cardStyles.d.ts +5 -4
  117. package/dist/components/core/Card/cardStyles.js +9 -6
  118. package/dist/components/core/Card/cardTypes.d.ts +4 -0
  119. package/dist/components/core/Card/index.d.ts +1 -0
  120. package/dist/components/core/Checkbox/Checkbox.js +9 -1
  121. package/dist/components/core/Checkbox/checkboxAPI.d.ts +2 -0
  122. package/dist/components/core/Checkbox/checkboxAPI.js +36 -0
  123. package/dist/components/core/Checkbox/checkboxParts.d.ts +5 -4
  124. package/dist/components/core/Checkbox/checkboxParts.js +74 -48
  125. package/dist/components/core/Checkbox/checkboxStyles.d.ts +4 -3
  126. package/dist/components/core/Checkbox/checkboxStyles.js +5 -3
  127. package/dist/components/core/Checkbox/checkboxTypes.d.ts +2 -0
  128. package/dist/components/core/Checkbox/index.d.ts +1 -1
  129. package/dist/components/core/Checkbox/useCheckboxRootState.d.ts +4 -1
  130. package/dist/components/core/Checkbox/useCheckboxRootState.js +43 -30
  131. package/dist/components/core/CloseButton/CloseButton.js +2 -1
  132. package/dist/components/core/CloseButton/closeButtonAnimations.js +38 -9
  133. package/dist/components/core/CloseButton/closeButtonParts.js +3 -4
  134. package/dist/components/core/ColorPicker/ColorPicker.js +27 -8
  135. package/dist/components/core/ColorPicker/ColorSlider.d.ts +2 -0
  136. package/dist/components/core/ColorPicker/ColorSlider.js +131 -53
  137. package/dist/components/core/ColorPicker/ColorSwatch.js +22 -4
  138. package/dist/components/core/ColorPicker/colorPickerAnimations.d.ts +1 -1
  139. package/dist/components/core/ColorPicker/colorPickerAnimations.js +33 -8
  140. package/dist/components/core/ColorPicker/colorPickerParts.js +125 -32
  141. package/dist/components/core/ColorPicker/colorPickerStyles.d.ts +11 -3
  142. package/dist/components/core/ColorPicker/colorPickerStyles.js +13 -3
  143. package/dist/components/core/ColorPicker/colorPickerTypes.d.ts +4 -0
  144. package/dist/components/core/ColorPicker/colorSliderStyles.d.ts +2 -2
  145. package/dist/components/core/ColorPicker/colorSliderStyles.js +4 -4
  146. package/dist/components/core/ColorPicker/colorSliderTypes.d.ts +2 -0
  147. package/dist/components/core/ColorPicker/colorSwatchStyles.d.ts +1 -0
  148. package/dist/components/core/ColorPicker/colorSwatchStyles.js +4 -0
  149. package/dist/components/core/ColorPicker/colorUtils.d.ts +2 -1
  150. package/dist/components/core/ColorPicker/colorUtils.js +33 -10
  151. package/dist/components/core/ColorPicker/index.d.ts +2 -0
  152. package/dist/components/core/ColorPicker/useColorPickerRootState.d.ts +3 -1
  153. package/dist/components/core/ColorPicker/useColorPickerRootState.js +65 -30
  154. package/dist/components/core/ComboBox/ComboBox.js +13 -1
  155. package/dist/components/core/ComboBox/comboBoxAnimations.d.ts +3 -2
  156. package/dist/components/core/ComboBox/comboBoxAnimations.js +5 -2
  157. package/dist/components/core/ComboBox/comboBoxFieldParts.js +1 -1
  158. package/dist/components/core/ComboBox/comboBoxParts.d.ts +3 -1
  159. package/dist/components/core/ComboBox/comboBoxParts.js +114 -28
  160. package/dist/components/core/ComboBox/comboBoxStyles.d.ts +4 -4
  161. package/dist/components/core/ComboBox/comboBoxStyles.js +4 -4
  162. package/dist/components/core/ComboBox/comboBoxTypes.d.ts +5 -0
  163. package/dist/components/core/ComboBox/useComboBoxInputState.d.ts +3 -2
  164. package/dist/components/core/ComboBox/useComboBoxInputState.js +130 -62
  165. package/dist/components/core/ComboBox/useComboBoxRootState.js +44 -18
  166. package/dist/components/core/Container/Container.js +3 -0
  167. package/dist/components/core/Container/containerStyles.d.ts +2 -1
  168. package/dist/components/core/Container/containerStyles.js +2 -1
  169. package/dist/components/core/ContextMenu/ContextMenu.d.ts +3 -1
  170. package/dist/components/core/ContextMenu/ContextMenu.js +177 -19
  171. package/dist/components/core/ContextMenu/contextMenuStyles.d.ts +1 -1
  172. package/dist/components/core/ContextMenu/contextMenuStyles.js +1 -1
  173. package/dist/components/core/ContextMenu/index.d.ts +3 -1
  174. package/dist/components/core/DatePicker/DatePicker.js +8 -3
  175. package/dist/components/core/DatePicker/datePickerAPI.d.ts +2 -0
  176. package/dist/components/core/DatePicker/datePickerAPI.js +43 -0
  177. package/dist/components/core/DatePicker/datePickerAnimations.d.ts +2 -1
  178. package/dist/components/core/DatePicker/datePickerAnimations.js +9 -5
  179. package/dist/components/core/DatePicker/datePickerParts.js +29 -5
  180. package/dist/components/core/DatePicker/datePickerStyles.d.ts +2 -2
  181. package/dist/components/core/DatePicker/datePickerStyles.js +2 -2
  182. package/dist/components/core/DatePicker/datePickerTypes.d.ts +2 -0
  183. package/dist/components/core/DatePicker/useDatePickerRootState.d.ts +2 -0
  184. package/dist/components/core/DatePicker/useDatePickerRootState.js +63 -24
  185. package/dist/components/core/Dialog/Dialog.d.ts +1 -1
  186. package/dist/components/core/Dialog/Dialog.js +2 -0
  187. package/dist/components/core/Dialog/dialogAnimations.d.ts +1 -0
  188. package/dist/components/core/Dialog/dialogAnimations.js +1 -0
  189. package/dist/components/core/Dialog/dialogParts.d.ts +1 -1
  190. package/dist/components/core/Dialog/dialogParts.js +8 -3
  191. package/dist/components/core/Dialog/dialogStyles.d.ts +1 -1
  192. package/dist/components/core/Dialog/dialogStyles.js +2 -2
  193. package/dist/components/core/Dialog/dialogTypes.d.ts +4 -1
  194. package/dist/components/core/Dialog/useDialogRootState.d.ts +1 -1
  195. package/dist/components/core/Dialog/useDialogRootState.js +2 -0
  196. package/dist/components/core/Disclosure/Disclosure.js +10 -4
  197. package/dist/components/core/Disclosure/disclosureAnimations.js +7 -5
  198. package/dist/components/core/Disclosure/disclosureContentPart.js +3 -0
  199. package/dist/components/core/Disclosure/disclosureParts.js +29 -20
  200. package/dist/components/core/Disclosure/disclosureStyles.d.ts +1 -1
  201. package/dist/components/core/Disclosure/disclosureStyles.js +3 -3
  202. package/dist/components/core/Disclosure/useDisclosureContentDrag.js +3 -1
  203. package/dist/components/core/Disclosure/useDisclosureGroupRootState.js +17 -7
  204. package/dist/components/core/Disclosure/useDisclosureRootState.js +12 -12
  205. package/dist/components/core/Drawer/Drawer.d.ts +1 -1
  206. package/dist/components/core/Drawer/Drawer.js +2 -0
  207. package/dist/components/core/Drawer/drawerAnimations.d.ts +1 -0
  208. package/dist/components/core/Drawer/drawerAnimations.js +1 -0
  209. package/dist/components/core/Drawer/drawerParts.js +14 -9
  210. package/dist/components/core/Drawer/drawerStyles.d.ts +1 -1
  211. package/dist/components/core/Drawer/drawerStyles.js +2 -2
  212. package/dist/components/core/Drawer/drawerTypes.d.ts +4 -1
  213. package/dist/components/core/Drawer/useDrawerHandleDrag.d.ts +2 -0
  214. package/dist/components/core/Drawer/useDrawerHandleDrag.js +117 -35
  215. package/dist/components/core/Drawer/useDrawerRootState.d.ts +1 -1
  216. package/dist/components/core/Drawer/useDrawerRootState.js +3 -0
  217. package/dist/components/core/Dropdown/dropdownA11y.js +4 -1
  218. package/dist/components/core/Dropdown/dropdownAnimations.d.ts +3 -2
  219. package/dist/components/core/Dropdown/dropdownAnimations.js +79 -29
  220. package/dist/components/core/Dropdown/dropdownItemParts.d.ts +3 -1
  221. package/dist/components/core/Dropdown/dropdownItemParts.js +25 -5
  222. package/dist/components/core/Dropdown/dropdownParts.js +40 -11
  223. package/dist/components/core/Dropdown/dropdownStyles.d.ts +3 -3
  224. package/dist/components/core/Dropdown/dropdownStyles.js +3 -3
  225. package/dist/components/core/Dropdown/dropdownSubParts.js +47 -16
  226. package/dist/components/core/Dropdown/dropdownTypes.d.ts +13 -2
  227. package/dist/components/core/Dropdown/index.d.ts +3 -1
  228. package/dist/components/core/Dropdown/useDropdownItemState.d.ts +5 -1
  229. package/dist/components/core/Dropdown/useDropdownItemState.js +3 -1
  230. package/dist/components/core/Dropdown/useDropdownRootState.js +16 -5
  231. package/dist/components/core/Expandable/expandableA11y.d.ts +1 -0
  232. package/dist/components/core/Expandable/expandableA11y.js +5 -0
  233. package/dist/components/core/Expandable/expandableAPI.d.ts +1 -0
  234. package/dist/components/core/Expandable/expandableAPI.js +19 -11
  235. package/dist/components/core/Expandable/expandableAnimations.d.ts +1 -1
  236. package/dist/components/core/Expandable/expandableAnimations.js +9 -9
  237. package/dist/components/core/Expandable/expandableParts.js +31 -23
  238. package/dist/components/core/Expandable/expandableStyles.d.ts +1 -1
  239. package/dist/components/core/Expandable/expandableStyles.js +1 -1
  240. package/dist/components/core/Expandable/useExpandableRootState.js +5 -3
  241. package/dist/components/core/Field/fieldParts.d.ts +2 -2
  242. package/dist/components/core/Field/fieldParts.js +2 -1
  243. package/dist/components/core/Field/fieldStyles.js +1 -1
  244. package/dist/components/core/Grid/Grid.js +3 -0
  245. package/dist/components/core/Grid/gridStyles.d.ts +2 -1
  246. package/dist/components/core/Grid/gridStyles.js +2 -1
  247. package/dist/components/core/Header/Header.js +3 -1
  248. package/dist/components/core/Header/headerStyles.d.ts +3 -2
  249. package/dist/components/core/Header/headerStyles.js +9 -2
  250. package/dist/components/core/HoverCard/hoverCardParts.js +23 -11
  251. package/dist/components/core/Input/inputAffixParts.js +6 -0
  252. package/dist/components/core/Input/inputAnimations.js +3 -1
  253. package/dist/components/core/Input/inputControlParts.js +48 -14
  254. package/dist/components/core/Input/inputFieldParts.js +1 -1
  255. package/dist/components/core/Input/inputStyles.d.ts +5 -5
  256. package/dist/components/core/Input/inputStyles.js +5 -5
  257. package/dist/components/core/Input/inputTypes.d.ts +1 -0
  258. package/dist/components/core/Input/useInputRootState.js +2 -1
  259. package/dist/components/core/Kbd/Kbd.js +3 -1
  260. package/dist/components/core/Kbd/kbdAnimations.js +16 -4
  261. package/dist/components/core/Kbd/kbdParts.js +6 -4
  262. package/dist/components/core/Kbd/kbdStyles.d.ts +1 -1
  263. package/dist/components/core/Kbd/kbdStyles.js +1 -1
  264. package/dist/components/core/Kbd/kbdTextPart.js +5 -2
  265. package/dist/components/core/Kbd/useKbdRootState.js +6 -2
  266. package/dist/components/core/Label/Label.d.ts +2 -1
  267. package/dist/components/core/Label/Label.js +8 -1
  268. package/dist/components/core/Label/labelParts.d.ts +1 -0
  269. package/dist/components/core/Label/labelTypes.d.ts +3 -1
  270. package/dist/components/core/Label/useLabelRootState.d.ts +2 -1
  271. package/dist/components/core/Label/useLabelRootState.js +3 -1
  272. package/dist/components/core/Link/Link.d.ts +1 -1
  273. package/dist/components/core/Link/Link.js +38 -25
  274. package/dist/components/core/Link/linkAPI.d.ts +3 -1
  275. package/dist/components/core/Link/linkAPI.js +8 -4
  276. package/dist/components/core/Link/linkAnchorBodyPart.d.ts +2 -2
  277. package/dist/components/core/Link/linkAnchorBodyPart.js +48 -8
  278. package/dist/components/core/Link/linkAnimations.d.ts +1 -1
  279. package/dist/components/core/Link/linkAnimations.js +29 -14
  280. package/dist/components/core/Link/linkIconSlotPart.d.ts +1 -1
  281. package/dist/components/core/Link/linkIconSlotPart.js +3 -3
  282. package/dist/components/core/Link/linkStyles.d.ts +5 -3
  283. package/dist/components/core/Link/linkStyles.js +6 -3
  284. package/dist/components/core/Link/linkTypes.d.ts +14 -1
  285. package/dist/components/core/Link/useLinkRootState.d.ts +2 -0
  286. package/dist/components/core/ListBox/ListBox.d.ts +1 -0
  287. package/dist/components/core/ListBox/ListBox.js +2 -0
  288. package/dist/components/core/ListBox/index.d.ts +1 -0
  289. package/dist/components/core/ListBox/listBoxAnimations.d.ts +5 -2
  290. package/dist/components/core/ListBox/listBoxAnimations.js +15 -3
  291. package/dist/components/core/ListBox/listBoxParts.js +21 -5
  292. package/dist/components/core/ListBox/listBoxStyles.d.ts +3 -3
  293. package/dist/components/core/ListBox/listBoxStyles.js +3 -3
  294. package/dist/components/core/ListBox/listBoxTypes.d.ts +5 -1
  295. package/dist/components/core/ListBox/useListBoxItemState.d.ts +1 -1
  296. package/dist/components/core/ListBox/useListBoxRootState.d.ts +1 -1
  297. package/dist/components/core/ListBox/useListBoxRootState.js +31 -6
  298. package/dist/components/core/ListBox/useListBoxVirtualWindow.d.ts +1 -0
  299. package/dist/components/core/ListBox/useListBoxVirtualWindow.js +11 -4
  300. package/dist/components/core/Loading/Loading.js +1 -1
  301. package/dist/components/core/Loading/loadingAnimations.d.ts +2 -2
  302. package/dist/components/core/Loading/loadingAnimations.js +12 -5
  303. package/dist/components/core/Loading/loadingParts.js +1 -1
  304. package/dist/components/core/Loading/loadingStyles.js +1 -1
  305. package/dist/components/core/Meter/Meter.js +21 -3
  306. package/dist/components/core/Meter/meterAPI.d.ts +4 -0
  307. package/dist/components/core/Meter/meterAPI.js +13 -2
  308. package/dist/components/core/Meter/meterParts.js +6 -2
  309. package/dist/components/core/Meter/meterStyles.d.ts +1 -1
  310. package/dist/components/core/Meter/meterStyles.js +1 -1
  311. package/dist/components/core/Meter/meterTypes.d.ts +1 -0
  312. package/dist/components/core/Meter/useMeterRootState.js +3 -2
  313. package/dist/components/core/Meter/useMeterTrackState.d.ts +1 -1
  314. package/dist/components/core/Meter/useMeterTrackState.js +15 -10
  315. package/dist/components/core/NumberInput/NumberInput.js +13 -2
  316. package/dist/components/core/NumberInput/numberInputParts.d.ts +4 -1
  317. package/dist/components/core/NumberInput/numberInputParts.js +30 -4
  318. package/dist/components/core/NumberInput/numberInputStyles.js +2 -2
  319. package/dist/components/core/NumberInput/useNumberInputRootState.js +47 -33
  320. package/dist/components/core/Pagination/paginationAPI.d.ts +4 -1
  321. package/dist/components/core/Pagination/paginationAPI.js +60 -17
  322. package/dist/components/core/Pagination/paginationAnimations.js +6 -0
  323. package/dist/components/core/Pagination/paginationParts.d.ts +1 -1
  324. package/dist/components/core/Pagination/paginationParts.js +82 -22
  325. package/dist/components/core/Pagination/paginationStyles.d.ts +7 -6
  326. package/dist/components/core/Pagination/paginationStyles.js +7 -6
  327. package/dist/components/core/Pagination/paginationTypes.d.ts +1 -0
  328. package/dist/components/core/Pagination/usePaginationRootState.js +12 -6
  329. package/dist/components/core/PinInput/pinInputAnimations.d.ts +6 -1
  330. package/dist/components/core/PinInput/pinInputAnimations.js +13 -4
  331. package/dist/components/core/PinInput/pinInputParts.js +84 -20
  332. package/dist/components/core/PinInput/pinInputStyles.d.ts +1 -1
  333. package/dist/components/core/PinInput/pinInputStyles.js +2 -2
  334. package/dist/components/core/PinInput/pinInputTypes.d.ts +4 -0
  335. package/dist/components/core/PinInput/usePinInputRootState.js +71 -33
  336. package/dist/components/core/Popover/popoverAnimations.d.ts +1 -0
  337. package/dist/components/core/Popover/popoverAnimations.js +33 -7
  338. package/dist/components/core/Popover/popoverParts.js +62 -14
  339. package/dist/components/core/Popover/popoverStyles.d.ts +1 -1
  340. package/dist/components/core/Popover/popoverStyles.js +1 -1
  341. package/dist/components/core/Popover/popoverTypes.d.ts +1 -0
  342. package/dist/components/core/Popover/usePopoverRootState.js +46 -14
  343. package/dist/components/core/ProgressBar/ProgressBar.js +21 -3
  344. package/dist/components/core/ProgressBar/progressBarA11y.d.ts +1 -1
  345. package/dist/components/core/ProgressBar/progressBarA11y.js +4 -2
  346. package/dist/components/core/ProgressBar/progressBarAPI.d.ts +4 -0
  347. package/dist/components/core/ProgressBar/progressBarAPI.js +13 -2
  348. package/dist/components/core/ProgressBar/progressBarParts.js +6 -2
  349. package/dist/components/core/ProgressBar/progressBarStyles.d.ts +1 -1
  350. package/dist/components/core/ProgressBar/progressBarStyles.js +1 -1
  351. package/dist/components/core/ProgressBar/progressBarTypes.d.ts +3 -0
  352. package/dist/components/core/ProgressBar/useProgressBarRootState.js +6 -3
  353. package/dist/components/core/ProgressBar/useProgressBarTrackState.d.ts +1 -1
  354. package/dist/components/core/ProgressBar/useProgressBarTrackState.js +18 -11
  355. package/dist/components/core/Radio/Radio.js +6 -1
  356. package/dist/components/core/Radio/radioParts.js +6 -3
  357. package/dist/components/core/Radio/radioStyles.d.ts +3 -3
  358. package/dist/components/core/Radio/radioStyles.js +3 -3
  359. package/dist/components/core/Radio/radioTypes.d.ts +1 -0
  360. package/dist/components/core/Radio/useRadioRootState.d.ts +5 -2
  361. package/dist/components/core/Radio/useRadioRootState.js +80 -36
  362. package/dist/components/core/Resizable/Resizable.js +185 -20
  363. package/dist/components/core/Resizable/index.d.ts +1 -0
  364. package/dist/components/core/Resizable/resizableAnimations.js +1 -1
  365. package/dist/components/core/Resizable/resizableParts.d.ts +1 -0
  366. package/dist/components/core/Resizable/resizableParts.js +96 -42
  367. package/dist/components/core/Resizable/resizableStyles.d.ts +3 -2
  368. package/dist/components/core/Resizable/resizableStyles.js +3 -2
  369. package/dist/components/core/Resizable/resizableTypes.d.ts +10 -2
  370. package/dist/components/core/Ripple/Ripple.js +3 -2
  371. package/dist/components/core/Ripple/rippleAPI.d.ts +1 -0
  372. package/dist/components/core/Ripple/rippleAPI.js +7 -0
  373. package/dist/components/core/Ripple/rippleStyles.d.ts +1 -1
  374. package/dist/components/core/Ripple/rippleStyles.js +1 -1
  375. package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
  376. package/dist/components/core/ScrollArea/scrollAreaAPI.d.ts +11 -2
  377. package/dist/components/core/ScrollArea/scrollAreaAPI.js +65 -9
  378. package/dist/components/core/ScrollArea/scrollAreaParts.js +31 -10
  379. package/dist/components/core/ScrollArea/scrollAreaStyles.d.ts +1 -1
  380. package/dist/components/core/ScrollArea/scrollAreaStyles.js +1 -1
  381. package/dist/components/core/ScrollArea/scrollAreaTypes.d.ts +4 -0
  382. package/dist/components/core/ScrollArea/useScrollAreaRootState.d.ts +1 -1
  383. package/dist/components/core/ScrollArea/useScrollAreaRootState.js +49 -10
  384. package/dist/components/core/SearchInput/SearchInput.js +24 -9
  385. package/dist/components/core/SearchInput/searchInputAnimations.d.ts +7 -6
  386. package/dist/components/core/SearchInput/searchInputAnimations.js +23 -18
  387. package/dist/components/core/SearchInput/searchInputParts.d.ts +2 -2
  388. package/dist/components/core/SearchInput/searchInputParts.js +22 -10
  389. package/dist/components/core/SearchInput/searchInputStyles.d.ts +5 -3
  390. package/dist/components/core/SearchInput/searchInputStyles.js +6 -5
  391. package/dist/components/core/SearchInput/searchInputTypes.d.ts +1 -0
  392. package/dist/components/core/SearchInput/useSearchInputRootState.d.ts +3 -3
  393. package/dist/components/core/SearchInput/useSearchInputRootState.js +52 -34
  394. package/dist/components/core/Select/Select.js +13 -1
  395. package/dist/components/core/Select/selectAnimations.d.ts +3 -2
  396. package/dist/components/core/Select/selectAnimations.js +5 -2
  397. package/dist/components/core/Select/selectParts.d.ts +3 -1
  398. package/dist/components/core/Select/selectParts.js +2 -1
  399. package/dist/components/core/Select/selectStyles.d.ts +3 -3
  400. package/dist/components/core/Select/selectStyles.js +3 -3
  401. package/dist/components/core/Select/selectTriggerParts.js +79 -28
  402. package/dist/components/core/Select/selectTypes.d.ts +1 -0
  403. package/dist/components/core/Select/useSelectRootState.js +33 -16
  404. package/dist/components/core/SelectionIndicator/selectionIndicatorAnimations.js +23 -3
  405. package/dist/components/core/SelectionThumb/SelectionThumb.js +1 -1
  406. package/dist/components/core/Separator/Separator.d.ts +2 -1
  407. package/dist/components/core/Separator/Separator.js +3 -1
  408. package/dist/components/core/Separator/index.d.ts +1 -1
  409. package/dist/components/core/Separator/separatorStyles.d.ts +2 -2
  410. package/dist/components/core/Separator/separatorStyles.js +2 -2
  411. package/dist/components/core/Separator/separatorTypes.d.ts +4 -0
  412. package/dist/components/core/Sidebar/Sidebar.js +15 -2
  413. package/dist/components/core/Sidebar/sidebarAnimations.d.ts +2 -2
  414. package/dist/components/core/Sidebar/sidebarAnimations.js +4 -3
  415. package/dist/components/core/Sidebar/sidebarStyles.d.ts +2 -1
  416. package/dist/components/core/Sidebar/sidebarStyles.js +2 -1
  417. package/dist/components/core/Skeleton/skeletonParts.js +8 -5
  418. package/dist/components/core/Skeleton/skeletonStyles.d.ts +10 -0
  419. package/dist/components/core/Skeleton/skeletonStyles.js +20 -0
  420. package/dist/components/core/Slider/Slider.js +9 -3
  421. package/dist/components/core/Slider/sliderAPI.d.ts +5 -4
  422. package/dist/components/core/Slider/sliderAPI.js +86 -42
  423. package/dist/components/core/Slider/sliderAnimations.d.ts +1 -1
  424. package/dist/components/core/Slider/sliderAnimations.js +2 -2
  425. package/dist/components/core/Slider/sliderParts.js +11 -2
  426. package/dist/components/core/Slider/sliderStyles.d.ts +4 -4
  427. package/dist/components/core/Slider/sliderStyles.js +18 -6
  428. package/dist/components/core/Slider/sliderThumbParts.d.ts +2 -0
  429. package/dist/components/core/Slider/sliderThumbParts.js +16 -4
  430. package/dist/components/core/Slider/sliderTrackParts.js +10 -4
  431. package/dist/components/core/Slider/sliderTypes.d.ts +9 -1
  432. package/dist/components/core/Slider/useSliderRootState.d.ts +3 -2
  433. package/dist/components/core/Slider/useSliderRootState.js +104 -49
  434. package/dist/components/core/Slider/useSliderTrackState.js +198 -39
  435. package/dist/components/core/Stack/Stack.js +3 -0
  436. package/dist/components/core/Stack/stackStyles.d.ts +2 -1
  437. package/dist/components/core/Stack/stackStyles.js +2 -1
  438. package/dist/components/core/Stepper/index.d.ts +10 -1
  439. package/dist/components/core/Stepper/stepperAPI.d.ts +2 -2
  440. package/dist/components/core/Stepper/stepperAPI.js +4 -3
  441. package/dist/components/core/Stepper/stepperAnimations.d.ts +1 -0
  442. package/dist/components/core/Stepper/stepperAnimations.js +28 -2
  443. package/dist/components/core/Stepper/stepperParts.d.ts +11 -2
  444. package/dist/components/core/Stepper/stepperParts.js +38 -9
  445. package/dist/components/core/Stepper/stepperStyles.js +3 -1
  446. package/dist/components/core/Stepper/stepperTypes.d.ts +3 -2
  447. package/dist/components/core/Stepper/useStepperRootState.js +10 -3
  448. package/dist/components/core/Surface/Surface.js +3 -1
  449. package/dist/components/core/Switch/Switch.js +12 -1
  450. package/dist/components/core/Switch/switchAPI.d.ts +2 -0
  451. package/dist/components/core/Switch/switchAPI.js +18 -1
  452. package/dist/components/core/Switch/switchAnimations.js +29 -9
  453. package/dist/components/core/Switch/switchControlParts.js +93 -30
  454. package/dist/components/core/Switch/switchGeometry.js +2 -2
  455. package/dist/components/core/Switch/switchSimpleParts.d.ts +2 -1
  456. package/dist/components/core/Switch/switchSimpleParts.js +3 -1
  457. package/dist/components/core/Switch/switchStyles.d.ts +3 -3
  458. package/dist/components/core/Switch/switchStyles.js +3 -3
  459. package/dist/components/core/Switch/switchTypes.d.ts +8 -0
  460. package/dist/components/core/Switch/useSwitchRootState.js +54 -17
  461. package/dist/components/core/Table/Table.d.ts +1 -0
  462. package/dist/components/core/Table/Table.js +2 -0
  463. package/dist/components/core/Table/index.d.ts +1 -0
  464. package/dist/components/core/Table/tableAPI.d.ts +6 -1
  465. package/dist/components/core/Table/tableAPI.js +73 -5
  466. package/dist/components/core/Table/tableContext.js +6 -1
  467. package/dist/components/core/Table/tableParts.js +77 -34
  468. package/dist/components/core/Table/tableStyles.d.ts +13 -2
  469. package/dist/components/core/Table/tableStyles.js +26 -3
  470. package/dist/components/core/Table/tableTypes.d.ts +4 -0
  471. package/dist/components/core/Table/tableVirtualRows.js +140 -27
  472. package/dist/components/core/Table/useTableContentState.d.ts +2 -1
  473. package/dist/components/core/Table/useTableContentState.js +32 -6
  474. package/dist/components/core/Tabs/tabsA11y.d.ts +4 -3
  475. package/dist/components/core/Tabs/tabsA11y.js +5 -4
  476. package/dist/components/core/Tabs/tabsContext.d.ts +5 -0
  477. package/dist/components/core/Tabs/tabsContext.js +12 -0
  478. package/dist/components/core/Tabs/tabsPanelPart.js +11 -1
  479. package/dist/components/core/Tabs/tabsParts.js +70 -32
  480. package/dist/components/core/Tabs/tabsStyles.d.ts +5 -2
  481. package/dist/components/core/Tabs/tabsStyles.js +13 -4
  482. package/dist/components/core/Tabs/tabsTabPart.js +55 -50
  483. package/dist/components/core/Tabs/tabsTypes.d.ts +2 -2
  484. package/dist/components/core/Tabs/useSlidingTabIndicator.d.ts +1 -1
  485. package/dist/components/core/Tabs/useSlidingTabIndicator.js +25 -10
  486. package/dist/components/core/Tabs/useTabsRootState.js +13 -5
  487. package/dist/components/core/TagsInput/TagsInput.js +13 -2
  488. package/dist/components/core/TagsInput/index.d.ts +2 -0
  489. package/dist/components/core/TagsInput/tagsInputParts.d.ts +6 -2
  490. package/dist/components/core/TagsInput/tagsInputParts.js +81 -14
  491. package/dist/components/core/TagsInput/tagsInputStyles.js +2 -2
  492. package/dist/components/core/TagsInput/tagsInputTypes.d.ts +3 -0
  493. package/dist/components/core/TagsInput/useTagsInputRootState.js +78 -33
  494. package/dist/components/core/Text/Text.d.ts +2 -1
  495. package/dist/components/core/Text/Text.js +3 -1
  496. package/dist/components/core/Text/index.d.ts +1 -1
  497. package/dist/components/core/Text/textTypes.d.ts +4 -0
  498. package/dist/components/core/TextArea/textAreaAnimations.js +5 -3
  499. package/dist/components/core/TextArea/textAreaParts.js +94 -12
  500. package/dist/components/core/TextArea/textAreaStyles.d.ts +3 -3
  501. package/dist/components/core/TextArea/textAreaStyles.js +2 -2
  502. package/dist/components/core/TextArea/textAreaTypes.d.ts +1 -0
  503. package/dist/components/core/TextArea/useTextAreaRootState.js +2 -1
  504. package/dist/components/core/TimeField/TimeField.js +6 -1
  505. package/dist/components/core/TimeField/timeFieldAnimations.d.ts +3 -2
  506. package/dist/components/core/TimeField/timeFieldAnimations.js +13 -4
  507. package/dist/components/core/TimeField/timeFieldParts.js +50 -30
  508. package/dist/components/core/TimeField/timeFieldStyles.d.ts +1 -1
  509. package/dist/components/core/TimeField/timeFieldStyles.js +1 -1
  510. package/dist/components/core/TimeField/timeFieldTypes.d.ts +2 -0
  511. package/dist/components/core/TimeField/useTimeFieldControlState.d.ts +4 -1
  512. package/dist/components/core/TimeField/useTimeFieldControlState.js +141 -39
  513. package/dist/components/core/TimeField/useTimeFieldRootState.js +3 -1
  514. package/dist/components/core/Toast/toastA11y.js +17 -7
  515. package/dist/components/core/Toast/toastAPI.d.ts +17 -1
  516. package/dist/components/core/Toast/toastAPI.js +82 -0
  517. package/dist/components/core/Toast/toastAnimations.d.ts +1 -1
  518. package/dist/components/core/Toast/toastAnimations.js +106 -98
  519. package/dist/components/core/Toast/toastProvider.js +25 -3
  520. package/dist/components/core/Toast/toastStyles.d.ts +5 -3
  521. package/dist/components/core/Toast/toastStyles.js +5 -3
  522. package/dist/components/core/Toast/toastTypes.d.ts +9 -0
  523. package/dist/components/core/Toast/useToastProviderState.js +61 -6
  524. package/dist/components/core/ToggleButton/ToggleButton.js +23 -7
  525. package/dist/components/core/ToggleButton/toggleButtonAnimations.d.ts +4 -2
  526. package/dist/components/core/ToggleButton/toggleButtonAnimations.js +64 -41
  527. package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +2 -1
  528. package/dist/components/core/ToggleButton/toggleButtonStyles.js +21 -2
  529. package/dist/components/core/ToggleButton/toggleButtonTypes.d.ts +3 -0
  530. package/dist/components/core/ToggleButton/useToggleButtonRootState.d.ts +1 -1
  531. package/dist/components/core/ToggleButton/useToggleButtonRootState.js +4 -7
  532. package/dist/components/core/Tooltip/tooltipAnimations.js +17 -1
  533. package/dist/components/core/Tooltip/tooltipParts.js +83 -26
  534. package/dist/components/core/Tooltip/tooltipPosition.js +57 -32
  535. package/dist/components/core/Tooltip/tooltipStyles.d.ts +2 -2
  536. package/dist/components/core/Tooltip/tooltipStyles.js +2 -2
  537. package/dist/components/core/Tooltip/tooltipTypes.d.ts +5 -0
  538. package/dist/components/core/Tooltip/useTooltipRootState.js +59 -10
  539. package/dist/components/core/utils/bodyScrollLock.js +12 -3
  540. package/dist/components/core/utils/clampNumber.d.ts +1 -1
  541. package/dist/components/core/utils/clampNumber.js +4 -1
  542. package/dist/components/core/utils/containedEscape.js +12 -0
  543. package/dist/components/core/utils/fieldFormDom.d.ts +24 -0
  544. package/dist/components/core/utils/fieldFormDom.js +37 -2
  545. package/dist/components/core/utils/focusElement.js +2 -2
  546. package/dist/components/core/utils/hoverInteractiveLift.d.ts +12 -0
  547. package/dist/components/core/utils/hoverInteractiveLift.js +43 -2
  548. package/dist/components/core/utils/inputAffixStyles.js +1 -1
  549. package/dist/components/core/utils/mergeAsChildProps.d.ts +7 -0
  550. package/dist/components/core/utils/mergeAsChildProps.js +23 -2
  551. package/dist/components/core/utils/optionListItemStyles.d.ts +2 -2
  552. package/dist/components/core/utils/optionListItemStyles.js +2 -2
  553. package/dist/components/core/utils/overlayLayer.d.ts +39 -0
  554. package/dist/components/core/utils/overlayLayer.js +164 -2
  555. package/dist/components/core/utils/overlayTriggerSqueeze.js +5 -4
  556. package/dist/components/core/utils/portalContainer.d.ts +27 -5
  557. package/dist/components/core/utils/portalContainer.js +38 -4
  558. package/dist/components/core/utils/pressRipple.js +2 -1
  559. package/dist/components/core/utils/readingDirection.js +8 -0
  560. package/dist/components/core/utils/runOpenAfterSqueeze.d.ts +7 -0
  561. package/dist/components/core/utils/runOpenAfterSqueeze.js +10 -3
  562. package/dist/components/core/utils/semanticStatusSurface.js +4 -4
  563. package/dist/components/core/utils/sizeLayout/panel.js +4 -4
  564. package/dist/components/core/utils/slotMotion/recipes/loadKitRecipe.js +2 -0
  565. package/dist/components/core/utils/slotMotion/recipes/switchThumb.js +3 -0
  566. package/dist/components/core/utils/slotMotion/resolveMotionValue.js +1 -1
  567. package/dist/components/core/utils/slotMotion/slotMount.js +1 -1
  568. package/dist/components/core/utils/slotMotion/useBarFillMotion.js +8 -3
  569. package/dist/components/core/utils/useCollapsibleHeight.js +2 -1
  570. package/dist/components/core/utils/useConvergeRipples.js +4 -1
  571. package/dist/components/core/utils/useModalMotion.d.ts +2 -0
  572. package/dist/components/core/utils/useModalMotion.js +19 -3
  573. package/dist/components/core/utils/usePressableElementTextMotion.js +4 -5
  574. package/dist/components/core/utils/useShadowMotion.js +28 -7
  575. package/dist/index.d.ts +3 -3
  576. package/dist/skins/resolveVariantVisual.d.ts +1 -1
  577. package/dist/skins/resolveVariantVisual.js +2 -2
  578. package/dist/skins/skinContext.js +6 -5
  579. package/dist/skins/skinLiveSlots.generated.d.ts +1 -1
  580. package/dist/skins/skinLiveSlots.generated.js +1 -1
  581. package/dist/skins/skinShell.js +9 -4
  582. package/dist/skins/skinSlots.generated.d.ts +1 -1
  583. package/dist/skins/skinSlots.generated.js +2 -0
  584. package/dist/studio/colorPresets.d.ts +1 -1
  585. package/dist/studio/colorPresets.js +8 -1
  586. package/dist/studio.d.ts +1 -1
  587. package/dist/studio.js +13 -1
  588. package/dist/theme/namedPalettes.d.ts +12 -0
  589. package/dist/theme/namedPalettes.js +697 -1
  590. package/dist/theme/themeDefaults.js +6 -3
  591. package/dist/tokens/config.d.ts +8 -2
  592. package/dist/tokens/config.js +15 -2
  593. package/dist/tokens/index.d.ts +1 -1
  594. package/dist/tokens/index.js +9 -0
  595. package/dist/ui.css +499 -55
  596. package/dist/utils/cn.js +89 -2
  597. package/package.json +1 -1
  598. package/dist/components/composite/utils/useOptionGroupRequiredAnchor.js +0 -17
  599. package/dist/components/composite/utils/useOptionGroupSingleValue.js +0 -24
@@ -2,6 +2,7 @@
2
2
  import { Children, isValidElement } from "react";
3
3
  import { selectionIndicatorFallbackPx } from "../SelectionIndicator/selectionIndicatorStyles.js";
4
4
  import { formatLocaleNumber } from "../utils/intlFormat.js";
5
+ import { isRtlElement } from "../utils/readingDirection.js";
5
6
  const SLIDER_THUMB_PX = {
6
7
  small: selectionIndicatorFallbackPx("small"),
7
8
  base: selectionIndicatorFallbackPx("base"),
@@ -45,15 +46,36 @@ function sliderExplicitNames(ariaLabel, ariaLabelledBy) {
45
46
  };
46
47
  }
47
48
  function clampSliderValue(n, lo, hi) {
48
- return Math.min(hi, Math.max(lo, n));
49
+ const safeLo = Number.isFinite(lo) ? lo : 0;
50
+ const safeHi = Number.isFinite(hi) ? hi : safeLo;
51
+ if (safeLo >= safeHi) return safeLo;
52
+ if (!Number.isFinite(n)) return safeLo;
53
+ return Math.min(safeHi, Math.max(safeLo, n));
54
+ }
55
+ function sliderDecimalPlaces(n) {
56
+ if (!Number.isFinite(n)) return 0;
57
+ const text = String(n);
58
+ const expMatch = /[eE]-(\d+)$/.exec(text);
59
+ if (expMatch) {
60
+ const basePart = text.split(/[eE]/)[0] ?? "";
61
+ const dotIdx2 = basePart.indexOf(".");
62
+ const fracLen = dotIdx2 >= 0 ? basePart.length - dotIdx2 - 1 : 0;
63
+ return fracLen + Number(expMatch[1]);
64
+ }
65
+ const dotIdx = text.indexOf(".");
66
+ return dotIdx >= 0 ? text.length - dotIdx - 1 : 0;
67
+ }
68
+ function roundSliderFloat(n, decimals) {
69
+ if (!Number.isFinite(n) || decimals <= 0) return n;
70
+ return Number(n.toFixed(Math.min(decimals, 20)));
49
71
  }
50
72
  function sliderValueToPercent(value, min, max) {
51
- if (max <= min) return 0;
52
- return (value - min) / (max - min) * 100;
73
+ if (!Number.isFinite(min) || !Number.isFinite(max) || max <= min) return 0;
74
+ return (clampSliderValue(value, min, max) - min) / (max - min) * 100;
53
75
  }
54
76
  function sliderValueToRatio(value, min, max) {
55
- if (max <= min) return 0;
56
- return (value - min) / (max - min);
77
+ if (!Number.isFinite(min) || !Number.isFinite(max) || max <= min) return 0;
78
+ return (clampSliderValue(value, min, max) - min) / (max - min);
57
79
  }
58
80
  function sliderThumbCenterPercent(value, min, max, trackPx, thumbPx) {
59
81
  if (trackPx <= 0) return sliderValueToPercent(value, min, max);
@@ -85,16 +107,27 @@ function sliderFillSpanForValues(trackPx, thumbPx, min, max, range, singleValue,
85
107
  return { start: 0, end: Math.min(trackPx, centerPx + half) / trackPx * 100 };
86
108
  }
87
109
  function sliderFillStyleFromSpan(span, orientation) {
88
- const size = span.end - span.start;
110
+ const size = Math.max(0, span.end - span.start);
89
111
  if (orientation === "horizontal") {
90
- return { left: `${span.start}%`, width: `${size}%` };
112
+ return { insetInlineStart: `${span.start}%`, width: `${size}%` };
91
113
  }
92
114
  return { bottom: `${span.start}%`, height: `${size}%` };
93
115
  }
94
116
  function snapSliderToStep(value, min, max, step) {
95
- if (step <= 0) return clampSliderValue(value, min, max);
117
+ if (!Number.isFinite(min) || !Number.isFinite(max) || min >= max) {
118
+ return Number.isFinite(min) ? min : 0;
119
+ }
120
+ if (!Number.isFinite(value)) return min;
121
+ if (!Number.isFinite(step) || step <= 0) return clampSliderValue(value, min, max);
122
+ const decimals = Math.max(
123
+ sliderDecimalPlaces(step),
124
+ sliderDecimalPlaces(min),
125
+ sliderDecimalPlaces(max)
126
+ );
96
127
  const steps = Math.round((value - min) / step);
97
- return clampSliderValue(min + steps * step, min, max);
128
+ const raw = min + steps * step;
129
+ const rounded = decimals > 0 ? roundSliderFloat(raw, decimals) : raw;
130
+ return clampSliderValue(rounded, min, max);
98
131
  }
99
132
  function snapSliderToMarks(value, marks) {
100
133
  if (marks.length === 0) return value;
@@ -115,12 +148,20 @@ function normalizeSliderMarks(marks, min, max) {
115
148
  (a, b) => a - b
116
149
  );
117
150
  }
118
- function sliderPointerToValue(clientX, clientY, rect, orientation, min, max, thumbPx) {
151
+ function sliderPointerToValue(clientX, clientY, rect, orientation, min, max, thumbPx, rtl = false) {
152
+ if (!Number.isFinite(min) || !Number.isFinite(max) || max <= min) {
153
+ return Number.isFinite(min) ? min : 0;
154
+ }
119
155
  const span = orientation === "horizontal" ? rect.width : rect.height;
120
- const half = thumbPx / 2;
121
- const travel = span - thumbPx;
156
+ const safeThumb = span > thumbPx && thumbPx > 0 ? thumbPx : 0;
157
+ const half = safeThumb / 2;
158
+ const travel = span - safeThumb;
122
159
  if (travel <= 0) return min;
123
- const ratio = orientation === "horizontal" ? clampSliderValue((clientX - rect.left - half) / travel, 0, 1) : clampSliderValue(1 - (clientY - rect.top - half) / travel, 0, 1);
160
+ const ratio = orientation === "horizontal" ? clampSliderValue(
161
+ rtl ? (rect.right - clientX - half) / travel : (clientX - rect.left - half) / travel,
162
+ 0,
163
+ 1
164
+ ) : clampSliderValue(1 - (clientY - rect.top - half) / travel, 0, 1);
124
165
  return min + ratio * (max - min);
125
166
  }
126
167
  function sliderAdjacentMark(value, marks, direction) {
@@ -135,9 +176,12 @@ function sliderAdjacentMark(value, marks, direction) {
135
176
  }
136
177
  return [...marks].reverse().find((mark) => mark < value) ?? marks[0];
137
178
  }
138
- function sliderStepDelta(marks, step, key, orientation) {
139
- const increaseKeys = /* @__PURE__ */ new Set(["ArrowRight", "ArrowUp", "PageUp"]);
140
- const decreaseKeys = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowDown", "PageDown"]);
179
+ function sliderStepDelta(marks, step, key, orientation, rtl = false) {
180
+ const flipHoriz = orientation === "horizontal" && rtl;
181
+ const arrowInc = flipHoriz ? "ArrowLeft" : "ArrowRight";
182
+ const arrowDec = flipHoriz ? "ArrowRight" : "ArrowLeft";
183
+ const increaseKeys = /* @__PURE__ */ new Set([arrowInc, "ArrowUp", "PageUp"]);
184
+ const decreaseKeys = /* @__PURE__ */ new Set([arrowDec, "ArrowDown", "PageDown"]);
141
185
  if (marks?.length) {
142
186
  if (key === "Home") return "home";
143
187
  if (key === "End") return "end";
@@ -145,13 +189,14 @@ function sliderStepDelta(marks, step, key, orientation) {
145
189
  if (decreaseKeys.has(key)) return "mark-prev";
146
190
  return 0;
147
191
  }
148
- const big = step > 0 ? step * 10 : 10;
192
+ const safeStep = Number.isFinite(step) && step > 0 ? step : 1;
193
+ const big = safeStep * 10;
149
194
  if (key === "Home") return "home";
150
195
  if (key === "End") return "end";
151
196
  if (key === "PageUp") return big;
152
197
  if (key === "PageDown") return -big;
153
- if (key === "ArrowRight" || key === "ArrowUp") return step;
154
- if (key === "ArrowLeft" || key === "ArrowDown") return -step;
198
+ if (key === arrowInc || key === "ArrowUp") return safeStep;
199
+ if (key === arrowDec || key === "ArrowDown") return -safeStep;
155
200
  return 0;
156
201
  }
157
202
  function commitSliderSingle(next, current, snap, set, onChange, remember) {
@@ -180,15 +225,13 @@ function applySliderPointer(args) {
180
225
  readOnly,
181
226
  range,
182
227
  rangeValue,
183
- singleValue,
184
228
  min,
185
229
  max,
186
230
  orientation,
187
231
  fallbackThumbPx,
188
232
  snap,
189
233
  emitRange,
190
- emitSingle,
191
- syncFill
234
+ emitSingle
192
235
  } = args;
193
236
  if (disabled || readOnly) return;
194
237
  const rect = track.getBoundingClientRect();
@@ -200,55 +243,54 @@ function applySliderPointer(args) {
200
243
  orientation,
201
244
  min,
202
245
  max,
203
- thumbPx > 0 ? thumbPx : fallbackThumbPx
246
+ thumbPx > 0 ? thumbPx : fallbackThumbPx,
247
+ isRtlElement(track)
204
248
  );
205
249
  if (range) {
206
250
  const [lo, hi] = rangeValue;
207
251
  if (thumb === "start") {
208
252
  const nextLo = snap(Math.min(raw, hi));
209
253
  emitRange([nextLo, hi]);
210
- syncFill(singleValue, [nextLo, hi]);
211
254
  } else if (thumb === "end") {
212
255
  const nextHi = snap(Math.max(raw, lo));
213
256
  emitRange([lo, nextHi]);
214
- syncFill(singleValue, [lo, nextHi]);
215
257
  }
216
258
  return;
217
259
  }
218
- const next = snap(raw);
219
260
  emitSingle(raw);
220
- syncFill(next, rangeValue);
221
261
  }
222
262
  function applySliderThumbKey(args) {
223
263
  const { action, thumb, range, rangeValue, singleValue, min, max, marks, emitRange, emitSingle, commit } = args;
224
- const current = thumb === "start" ? rangeValue[0] : thumb === "end" ? rangeValue[1] : singleValue;
225
- const emitEnd = (value, atStart) => {
226
- if (range) emitRange(atStart ? [value, rangeValue[1]] : [rangeValue[0], value]);
227
- else emitSingle(value);
264
+ const [lo, hi] = rangeValue;
265
+ const current = thumb === "start" ? lo : thumb === "end" ? hi : singleValue;
266
+ const clampForThumb = (candidate) => {
267
+ if (!range) return clampSliderValue(candidate, min, max);
268
+ return thumb === "start" ? clampSliderValue(candidate, min, hi) : clampSliderValue(candidate, lo, max);
269
+ };
270
+ const emitClamped = (candidate) => {
271
+ const bounded = clampForThumb(candidate);
272
+ if (range) {
273
+ emitRange(thumb === "start" ? [bounded, hi] : [lo, bounded]);
274
+ } else {
275
+ emitSingle(bounded);
276
+ }
228
277
  commit();
229
278
  };
230
279
  if (action === "home") {
231
- emitEnd(min, thumb === "start");
280
+ emitClamped(range && thumb === "end" ? lo : min);
232
281
  return;
233
282
  }
234
283
  if (action === "end") {
235
- emitEnd(max, thumb === "start");
284
+ emitClamped(range && thumb === "start" ? hi : max);
236
285
  return;
237
286
  }
238
287
  if (action === "mark-next" || action === "mark-prev") {
239
288
  if (!marks?.length) return;
240
- emitEnd(sliderAdjacentMark(current, marks, action === "mark-next" ? 1 : -1), thumb === "start");
289
+ emitClamped(sliderAdjacentMark(current, marks, action === "mark-next" ? 1 : -1));
241
290
  return;
242
291
  }
243
292
  if (typeof action === "number" && action !== 0) {
244
- if (range) {
245
- const [lo, hi] = rangeValue;
246
- if (thumb === "start") emitRange([lo + action, hi]);
247
- else emitRange([lo, hi + action]);
248
- } else {
249
- emitSingle(singleValue + action);
250
- }
251
- commit();
293
+ emitClamped(current + action);
252
294
  }
253
295
  }
254
296
  function defaultSliderFormatValue(value) {
@@ -332,7 +374,9 @@ export {
332
374
  readSliderValueBinding,
333
375
  resolveSliderFallbackThumbPx,
334
376
  resolveSliderThumbIcon,
377
+ roundSliderFloat,
335
378
  sliderAdjacentMark,
379
+ sliderDecimalPlaces,
336
380
  sliderDisplayEqual,
337
381
  sliderDisplayFromProps,
338
382
  sliderExplicitNames,
@@ -28,7 +28,7 @@ export declare function useSliderChromeSlot(slot: SliderChromeSlot, { motion, fo
28
28
  export declare function useSliderThumbShellAnimation(disabled?: boolean): import('react').RefObject<HTMLSpanElement | null>;
29
29
  export declare function useSliderFillCleanup(fillRef: React.RefObject<HTMLSpanElement | null>): void;
30
30
  export declare function applySliderFillStyle(fill: HTMLSpanElement, style: {
31
- left?: string;
31
+ insetInlineStart?: string;
32
32
  width?: string;
33
33
  bottom?: string;
34
34
  height?: string;
@@ -80,7 +80,7 @@ function useSliderFillCleanup(fillRef) {
80
80
  }
81
81
  function applySliderFillStyle(fill, style, orientation) {
82
82
  killMotion(fill);
83
- fill.style.left = style.left ?? "";
83
+ fill.style.insetInlineStart = style.insetInlineStart ?? "";
84
84
  fill.style.width = style.width ?? "";
85
85
  fill.style.bottom = style.bottom ?? "";
86
86
  fill.style.height = style.height ?? "";
@@ -88,7 +88,7 @@ function applySliderFillStyle(fill, style, orientation) {
88
88
  fill.style.bottom = "";
89
89
  fill.style.height = "";
90
90
  } else {
91
- fill.style.left = "";
91
+ fill.style.insetInlineStart = "";
92
92
  fill.style.width = "";
93
93
  }
94
94
  }
@@ -231,17 +231,26 @@ function SliderTrackHost({
231
231
  const state = useSliderTrackState(props, forwardedRef ?? null);
232
232
  const scope = useOptionalSliderMotionScope();
233
233
  useSliderTrackSlotMotion(scope, state.valueIdentity, state.disabled);
234
+ const {
235
+ onPointerOver,
236
+ onPointerOut,
237
+ onPointerUp,
238
+ ...domTrackRest
239
+ } = state.trackRest;
234
240
  const { setRef, pointerHandlers } = useMotionPart({
235
241
  scope,
236
242
  slot: "track",
237
243
  forwardedRef: state.setTrackRef,
238
244
  pointerPhases: true,
239
- onPointerDown: state.handleTrackPointerDown
245
+ onPointerOver,
246
+ onPointerOut,
247
+ onPointerDown: state.handleTrackPointerDown,
248
+ onPointerUp
240
249
  });
241
250
  return /* @__PURE__ */ jsx(
242
251
  "div",
243
252
  {
244
- ...state.trackRest,
253
+ ...domTrackRest,
245
254
  ref: setRef,
246
255
  role: "presentation",
247
256
  className: state.trackHitClass,
@@ -4,7 +4,7 @@ export declare function sliderThicknessToCss(thickness: number | string): string
4
4
  export declare const SLIDER_SCALE_HEADER_BASE_CLASS = "flex items-baseline justify-between gap-xsmall";
5
5
  export declare const SLIDER_SCALE_HEADER_HORIZONTAL_CLASS = "w-full";
6
6
  export declare const SLIDER_SCALE_HEADER_VERTICAL_CLASS = "min-w-[8rem]";
7
- export declare const SLIDER_SCALE_VALUE_CLASS = "tabular-nums text-muted";
7
+ export declare const SLIDER_SCALE_VALUE_CLASS = "tabular-nums text-muted-foreground";
8
8
  export declare const SLIDER_RAIL_HEIGHT: Record<SliderSize, string>;
9
9
  export declare const SLIDER_RAIL_WIDTH: Record<SliderSize, string>;
10
10
  export declare const SLIDER_RAIL_LAYOUT_CLASS = "pointer-events-none absolute inset-0 overflow-hidden";
@@ -21,7 +21,7 @@ export declare const SLIDER_TRACK_HIT_HORIZONTAL_CLASS = "w-full";
21
21
  export declare const SLIDER_TRACK_HIT_VERTICAL_CLASS = "h-48";
22
22
  export declare const SLIDER_MARK_CLASS = "pointer-events-none absolute z-[1] size-1 rounded-[var(--selection-indicator-radius-xsmall)] bg-primary/30";
23
23
  export declare const SLIDER_THUMB_BUTTON_BASE_CLASS = "absolute box-border flex shrink-0 origin-center items-center justify-center m-0 appearance-none border-0 bg-transparent p-0 focus-ring";
24
- export declare const SLIDER_THUMB_BUTTON_HORIZONTAL_CLASS = "top-0 h-full w-auto -translate-x-1/2 aspect-square";
24
+ export declare const SLIDER_THUMB_BUTTON_HORIZONTAL_CLASS = "top-0 h-full w-auto -translate-x-1/2 rtl:translate-x-1/2 aspect-square";
25
25
  export declare const SLIDER_THUMB_BUTTON_VERTICAL_CLASS = "start-0 w-full h-auto -translate-y-1/2 aspect-square";
26
26
  export declare const SLIDER_THUMB_BUTTON_DISABLED_CLASS = "cursor-not-allowed";
27
27
  export declare const SLIDER_THUMB_BUTTON_ENABLED_CLASS = "cursor-grab active:cursor-grabbing";
@@ -62,8 +62,8 @@ export declare function sliderThumbButtonClass({ size, orientation, disabled, ac
62
62
  slotClass?: string;
63
63
  className?: string;
64
64
  }): string;
65
- export declare function sliderThumbPositionStyle(percent: number, orientation: SliderOrientation): CSSProperties;
66
- export declare function sliderMarkStyle(percent: number, orientation: SliderOrientation): CSSProperties;
65
+ export declare function sliderThumbPositionStyle(percent: number, orientation: SliderOrientation, isRtl?: boolean): CSSProperties;
66
+ export declare function sliderMarkStyle(percent: number, orientation: SliderOrientation, isRtl?: boolean): CSSProperties;
67
67
  export declare function sliderTrackCrossStyle({ isHorizontal, thickness, }: {
68
68
  isHorizontal: boolean;
69
69
  thickness?: number | string;
@@ -9,7 +9,7 @@ function sliderThicknessToCss(thickness) {
9
9
  const SLIDER_SCALE_HEADER_BASE_CLASS = "flex items-baseline justify-between gap-xsmall";
10
10
  const SLIDER_SCALE_HEADER_HORIZONTAL_CLASS = "w-full";
11
11
  const SLIDER_SCALE_HEADER_VERTICAL_CLASS = "min-w-[8rem]";
12
- const SLIDER_SCALE_VALUE_CLASS = "tabular-nums text-muted";
12
+ const SLIDER_SCALE_VALUE_CLASS = "tabular-nums text-muted-foreground";
13
13
  const SLIDER_RAIL_HEIGHT = {
14
14
  small: "h-[var(--selection-indicator-small)] min-h-[var(--selection-indicator-small)]",
15
15
  base: "h-[var(--selection-indicator-base)] min-h-[var(--selection-indicator-base)]",
@@ -35,7 +35,7 @@ const SLIDER_TRACK_HIT_HORIZONTAL_CLASS = "w-full";
35
35
  const SLIDER_TRACK_HIT_VERTICAL_CLASS = "h-48";
36
36
  const SLIDER_MARK_CLASS = "pointer-events-none absolute z-[1] size-1 rounded-[var(--selection-indicator-radius-xsmall)] bg-primary/30";
37
37
  const SLIDER_THUMB_BUTTON_BASE_CLASS = "absolute box-border flex shrink-0 origin-center items-center justify-center m-0 appearance-none border-0 bg-transparent p-0 focus-ring";
38
- const SLIDER_THUMB_BUTTON_HORIZONTAL_CLASS = "top-0 h-full w-auto -translate-x-1/2 aspect-square";
38
+ const SLIDER_THUMB_BUTTON_HORIZONTAL_CLASS = "top-0 h-full w-auto -translate-x-1/2 rtl:translate-x-1/2 aspect-square";
39
39
  const SLIDER_THUMB_BUTTON_VERTICAL_CLASS = "start-0 w-full h-auto -translate-y-1/2 aspect-square";
40
40
  const SLIDER_THUMB_BUTTON_DISABLED_CLASS = "cursor-not-allowed";
41
41
  const SLIDER_THUMB_BUTTON_ENABLED_CLASS = "cursor-grab active:cursor-grabbing";
@@ -125,11 +125,23 @@ function sliderThumbButtonClass({
125
125
  className
126
126
  );
127
127
  }
128
- function sliderThumbPositionStyle(percent, orientation) {
129
- return orientation === "horizontal" ? { left: `${percent}%` } : { top: `${100 - percent}%` };
128
+ function sliderThumbPositionStyle(percent, orientation, isRtl = false) {
129
+ if (orientation === "horizontal") {
130
+ return isRtl ? { insetInlineStart: `${percent}%`, translate: "50% 0" } : { insetInlineStart: `${percent}%` };
131
+ }
132
+ return { top: `${100 - percent}%` };
130
133
  }
131
- function sliderMarkStyle(percent, orientation) {
132
- return orientation === "horizontal" ? { left: `${percent}%`, top: "50%", transform: "translate(-50%, -50%)" } : { bottom: `${percent}%`, left: "50%", top: "auto", transform: "translate(-50%, 50%)" };
134
+ function sliderMarkStyle(percent, orientation, isRtl = false) {
135
+ return orientation === "horizontal" ? {
136
+ insetInlineStart: `${percent}%`,
137
+ top: "50%",
138
+ transform: isRtl ? "translate(50%, -50%)" : "translate(-50%, -50%)"
139
+ } : {
140
+ bottom: `${percent}%`,
141
+ insetInlineStart: "50%",
142
+ top: "auto",
143
+ transform: isRtl ? "translate(50%, 50%)" : "translate(-50%, 50%)"
144
+ };
133
145
  }
134
146
  function sliderTrackCrossStyle({
135
147
  isHorizontal,
@@ -7,6 +7,8 @@ export declare const SliderThumbButton: import('react').ForwardRefExoticComponen
7
7
  percent: number;
8
8
  orientation: import('./sliderTypes.js').SliderOrientation;
9
9
  disabled?: boolean;
10
+ readOnly?: boolean;
11
+ isRtl?: boolean;
10
12
  active: boolean;
11
13
  ariaValueNow: number;
12
14
  ariaValueMin: number;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { SelectionThumb } from "../SelectionThumb/index.js";
4
+ import { dataFlag } from "../utils/dataContract.js";
4
5
  import { useSkinVariant } from "../../../skins/skinContext.js";
5
6
  import { forwardRef } from "react";
6
7
  import { useSliderThumbShellAnimation } from "./sliderAnimations.js";
@@ -18,6 +19,8 @@ const SliderThumbButton = forwardRef(
18
19
  percent,
19
20
  orientation,
20
21
  disabled,
22
+ readOnly,
23
+ isRtl,
21
24
  active,
22
25
  ariaValueNow,
23
26
  ariaValueMin,
@@ -32,6 +35,7 @@ const SliderThumbButton = forwardRef(
32
35
  onPointerDown,
33
36
  onPointerUp,
34
37
  onKeyDown,
38
+ onBlur,
35
39
  ...rest
36
40
  }, forwardedRef) {
37
41
  const variant = useSkinVariant(variantProp);
@@ -44,12 +48,13 @@ const SliderThumbButton = forwardRef(
44
48
  motion,
45
49
  forwardedRef,
46
50
  pointerPhases: true,
47
- pressPhases: !disabled,
51
+ pressPhases: !disabled && !readOnly,
48
52
  onPointerOver,
49
53
  onPointerOut,
50
54
  onPointerDown,
51
55
  onPointerUp
52
56
  });
57
+ const isInvalid = Boolean(fieldCtx?.isInvalid);
53
58
  return /* @__PURE__ */ jsx(
54
59
  "button",
55
60
  {
@@ -63,7 +68,8 @@ const SliderThumbButton = forwardRef(
63
68
  "aria-valuenow": ariaValueNow,
64
69
  "aria-valuetext": ariaValueText,
65
70
  "aria-orientation": orientation,
66
- "aria-invalid": fieldCtx?.isInvalid ? true : void 0,
71
+ "aria-invalid": isInvalid ? true : void 0,
72
+ "aria-readonly": readOnly || void 0,
67
73
  disabled,
68
74
  tabIndex: disabled ? -1 : 0,
69
75
  className: sliderThumbButtonClass({
@@ -73,11 +79,17 @@ const SliderThumbButton = forwardRef(
73
79
  active,
74
80
  slotClass: cn(slotClassNames.thumb, className)
75
81
  }),
76
- style: { ...sliderThumbPositionStyle(percent, orientation), ...style },
82
+ style: { ...sliderThumbPositionStyle(percent, orientation, isRtl), ...style },
77
83
  onKeyDown,
84
+ onBlur: (event) => {
85
+ onBlur?.(event);
86
+ fieldCtx?.onControlBlur?.();
87
+ },
78
88
  ...rest,
79
89
  ...pointerHandlers,
80
- "data-invalid": fieldCtx?.isInvalid ? "" : void 0,
90
+ "data-disabled": dataFlag(disabled),
91
+ "data-readonly": dataFlag(readOnly),
92
+ "data-invalid": dataFlag(isInvalid),
81
93
  children: /* @__PURE__ */ jsx(
82
94
  SelectionThumb,
83
95
  {
@@ -16,7 +16,7 @@ function SliderTrackMarks() {
16
16
  {
17
17
  "aria-hidden": true,
18
18
  className: cn(SLIDER_MARK_CLASS, ctx.markSlotClass, slotClassNames.mark),
19
- style: sliderMarkStyle(item.percent, ctx.orientation)
19
+ style: sliderMarkStyle(item.percent, ctx.orientation, ctx.isRtl)
20
20
  },
21
21
  item.value
22
22
  )) });
@@ -104,7 +104,7 @@ function SliderTrackThumb({
104
104
  return /* @__PURE__ */ jsx(
105
105
  SliderThumbButton,
106
106
  {
107
- ref: forwardedRef,
107
+ ref: mergeRefs(ctx.getThumbRef("start"), forwardedRef),
108
108
  size: ctx.size,
109
109
  icon,
110
110
  variant: ctx.variant,
@@ -113,6 +113,8 @@ function SliderTrackThumb({
113
113
  percent: ctx.thumbPercent("start"),
114
114
  orientation: ctx.orientation,
115
115
  disabled: ctx.disabled,
116
+ readOnly: ctx.readOnly,
117
+ isRtl: ctx.isRtl,
116
118
  active: ctx.activeThumb === "start",
117
119
  ariaValueNow: ctx.rangeValue[0],
118
120
  ariaValueMin: ctx.min,
@@ -130,7 +132,7 @@ function SliderTrackThumb({
130
132
  return /* @__PURE__ */ jsx(
131
133
  SliderThumbButton,
132
134
  {
133
- ref: forwardedRef,
135
+ ref: mergeRefs(ctx.getThumbRef("end"), forwardedRef),
134
136
  size: ctx.size,
135
137
  icon,
136
138
  variant: ctx.variant,
@@ -139,6 +141,8 @@ function SliderTrackThumb({
139
141
  percent: ctx.thumbPercent("end"),
140
142
  orientation: ctx.orientation,
141
143
  disabled: ctx.disabled,
144
+ readOnly: ctx.readOnly,
145
+ isRtl: ctx.isRtl,
142
146
  active: ctx.activeThumb === "end",
143
147
  ariaValueNow: ctx.rangeValue[1],
144
148
  ariaValueMin: ctx.rangeValue[0],
@@ -155,7 +159,7 @@ function SliderTrackThumb({
155
159
  return /* @__PURE__ */ jsx(
156
160
  SliderThumbButton,
157
161
  {
158
- ref: forwardedRef,
162
+ ref: mergeRefs(ctx.getThumbRef("single"), forwardedRef),
159
163
  size: ctx.size,
160
164
  icon,
161
165
  variant: ctx.variant,
@@ -164,6 +168,8 @@ function SliderTrackThumb({
164
168
  percent: ctx.thumbPercent("single"),
165
169
  orientation: ctx.orientation,
166
170
  disabled: ctx.disabled,
171
+ readOnly: ctx.readOnly,
172
+ isRtl: ctx.isRtl,
167
173
  active: ctx.activeThumb === "single",
168
174
  ariaValueNow: ctx.singleValue,
169
175
  ariaValueMin: ctx.min,
@@ -1,4 +1,4 @@
1
- import { CSSProperties, HTMLAttributes, KeyboardEvent, PointerEvent, ReactNode, RefObject } from 'react';
1
+ import { CSSProperties, HTMLAttributes, KeyboardEvent, PointerEvent, ReactNode, Ref, RefObject } from 'react';
2
2
  import { Prettify } from '../../../utils/prettify.js';
3
3
  import { LabelProps } from '../Label/index.js';
4
4
  import { MotionController, MotionMapWithEvents, MotionValue, MotionStateHostProps } from '../utils/slotMotion/index.js';
@@ -69,6 +69,9 @@ export type SliderFieldContextValue = {
69
69
  orientation: SliderOrientation;
70
70
  display: SliderDisplayState | null;
71
71
  setDisplay: (next: SliderDisplayState | null) => void;
72
+ trackProps?: SliderTrackProps;
73
+ registerControlRef?: (node: HTMLElement | null) => void;
74
+ onControlBlur?: () => void;
72
75
  };
73
76
  export type SliderThumbA11y = {
74
77
  ariaLabel?: string;
@@ -88,6 +91,8 @@ export type SliderTrackContextValue = {
88
91
  size: SliderSize;
89
92
  orientation: SliderOrientation;
90
93
  disabled?: boolean;
94
+ readOnly?: boolean;
95
+ isRtl?: boolean;
91
96
  icon?: ReactNode;
92
97
  range: boolean;
93
98
  variant: SliderVariant;
@@ -98,6 +103,7 @@ export type SliderTrackContextValue = {
98
103
  max: number;
99
104
  formatValue: (value: number) => string;
100
105
  thumbPercent: (kind: SliderThumbKind) => number;
106
+ getThumbRef: (kind: SliderThumbKind) => Ref<HTMLButtonElement>;
101
107
  resolveThumbIcon: (children?: ReactNode) => ReactNode;
102
108
  resolveThumbA11y: (kind: SliderThumbKind) => SliderThumbA11y;
103
109
  onThumbPointerDown: (thumb: SliderThumbKind) => (e: PointerEvent<HTMLButtonElement>) => void;
@@ -214,6 +220,8 @@ export type SliderThumbButtonProps = {
214
220
  percent: number;
215
221
  orientation: SliderOrientation;
216
222
  disabled?: boolean;
223
+ readOnly?: boolean;
224
+ isRtl?: boolean;
217
225
  active: boolean;
218
226
  ariaValueNow: number;
219
227
  ariaValueMin: number;
@@ -1,5 +1,5 @@
1
1
  import { SliderFieldContextValue, SliderTrackProps, UseSliderRootStateProps } from './sliderTypes.js';
2
- export declare function useSliderRootState({ children, id: idProp, name, orientation, label, showValue, valueText, hint, error, invalid, range, value, defaultValue, onValueChange, onValueCommit, min, max, step, marks, size, thickness, formatValue, icon, disabled, readOnly, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, variant, }: UseSliderRootStateProps): {
2
+ export declare function useSliderRootState({ children, id: idProp, name, orientation, label, showValue, valueText, hint, error, invalid, range, value, defaultValue, onValueChange, onValueCommit, min, max, step, marks, size, thickness, formatValue, icon, disabled: disabledProp, readOnly: readOnlyProp, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, variant, }: UseSliderRootStateProps): {
3
3
  sliderId: string;
4
4
  isCompound: boolean;
5
5
  fieldCtx: SliderFieldContextValue;
@@ -8,13 +8,14 @@ export declare function useSliderRootState({ children, id: idProp, name, orienta
8
8
  required: false;
9
9
  };
10
10
  trackProps: SliderTrackProps;
11
+ disabled: boolean;
11
12
  readOnly: boolean;
12
13
  name: string | undefined;
13
14
  label: import('react').ReactNode;
14
15
  showValue: boolean | undefined;
15
16
  valueText: import('react').ReactNode;
16
17
  hint: import('react').ReactNode;
17
- error: import('react').ReactNode;
18
+ error: string | number | bigint | boolean | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | undefined;
18
19
  hasHint: boolean;
19
20
  hasError: boolean;
20
21
  hintId: string;