@astryx-vue/core 0.33.2 → 0.33.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 (320) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-BwW3jdTg.js → AlertDialog-CwyMvZEI.js} +9 -9
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-BURF50V8.js → AppShell-4hWTPKSD.js} +5 -5
  5. package/dist/Avatar/index.js +1 -1
  6. package/dist/{Avatar-CcmhCa5q.js → Avatar-C6E6TYbe.js} +1 -1
  7. package/dist/AvatarGroup/index.d.ts +1 -1
  8. package/dist/AvatarGroup/index.js +1 -1
  9. package/dist/{AvatarGroup-DJKoExQk.js → AvatarGroup-BIPixZOb.js} +1 -1
  10. package/dist/Banner/index.d.ts +1 -1
  11. package/dist/Banner/index.js +1 -1
  12. package/dist/{Banner-DSSXXFU9.js → Banner-CMXebR4Y.js} +1 -1
  13. package/dist/BottomSheet/index.js +2 -2
  14. package/dist/{BottomSheet-KUGb-GPw.js → BottomSheet-BmmGemH5.js} +1 -1
  15. package/dist/{BottomSheet-Jq7g0EWd.js → BottomSheet-DKEUVLe5.js} +9 -9
  16. package/dist/Breadcrumbs/index.js +2 -2
  17. package/dist/{Breadcrumbs-BEx7_LpB.js → Breadcrumbs-BPxPAEHQ.js} +1 -1
  18. package/dist/Button/index.d.ts +1 -1
  19. package/dist/Button/index.js +1 -1
  20. package/dist/{Button-BlWhnkeM.js → Button-B7PvGVt6.js} +4 -4
  21. package/dist/ButtonGroup/index.d.ts +1 -1
  22. package/dist/ButtonGroup/index.js +1 -1
  23. package/dist/{ButtonGroup-D3pGXH3t.js → ButtonGroup-BkwQ0h97.js} +2 -2
  24. package/dist/Calendar/index.d.ts +1 -1
  25. package/dist/Card/index.d.ts +1 -1
  26. package/dist/Carousel/index.d.ts +1 -1
  27. package/dist/Carousel/index.js +1 -1
  28. package/dist/{Carousel-XHo3AGQj.js → Carousel-BmfKiv69.js} +1 -1
  29. package/dist/Chat/index.d.ts +1 -1
  30. package/dist/Chat/index.js +1 -1
  31. package/dist/{Chat-B0c_CxBk.js → Chat-2AG37D51.js} +5 -5
  32. package/dist/CheckboxInput/index.d.ts +1 -1
  33. package/dist/CheckboxInput/index.js +1 -1
  34. package/dist/{CheckboxInput-DCeCsNvg.js → CheckboxInput-rbMgS8ZL.js} +79 -74
  35. package/dist/CheckboxList/index.d.ts +1 -1
  36. package/dist/CheckboxList/index.js +1 -1
  37. package/dist/{CheckboxListItem-CGC_EBYs.js → CheckboxListItem-Ckt1Cwt_.js} +5 -5
  38. package/dist/ClickableCard/index.d.ts +1 -1
  39. package/dist/ClickableCard/index.js +1 -1
  40. package/dist/{ClickableCard-aU0QED8P.js → ClickableCard-Dh0tOQv-.js} +1 -1
  41. package/dist/Code/index.js +1 -1
  42. package/dist/{CodeBlock-ClZvd61o.js → CodeBlock-ZluDuBT7.js} +1 -1
  43. package/dist/Collapsible/index.js +1 -1
  44. package/dist/{Collapsible-BAup__Sy.js → Collapsible-B_9H2wV_.js} +3 -3
  45. package/dist/CommandPalette/index.js +1 -1
  46. package/dist/{CommandPalette-CvalZZHH.js → CommandPalette-Cbr-WWC8.js} +2 -2
  47. package/dist/ComplexSelector/index.d.ts +1 -1
  48. package/dist/ComplexSelector/index.js +1 -1
  49. package/dist/{ComplexSelector-DIwWcWwi.js → ComplexSelector-BPvBCUJk.js} +2 -2
  50. package/dist/ContextMenu/index.d.ts +1 -1
  51. package/dist/ContextMenu/index.js +2 -2
  52. package/dist/{ContextMenu-BnX93m0D.js → ContextMenu-BF4ALBZn.js} +6 -6
  53. package/dist/DateInput/index.d.ts +1 -1
  54. package/dist/DateInput/index.js +1 -1
  55. package/dist/{DateInput-BFjeik3X.js → DateInput-C7PICKR2.js} +4 -4
  56. package/dist/DateRangeInput/index.d.ts +1 -1
  57. package/dist/DateRangeInput/index.js +1 -1
  58. package/dist/{DateRangeInput-Cnrp5SDW.js → DateRangeInput-Dt-BA7AA.js} +3 -3
  59. package/dist/DateTimeInput/index.d.ts +1 -1
  60. package/dist/DateTimeInput/index.js +1 -1
  61. package/dist/{DateTimeInput-Zsf86rSO.js → DateTimeInput-XEESzGJf.js} +5 -5
  62. package/dist/Dialog/index.d.ts +1 -1
  63. package/dist/Dialog/index.js +3 -3
  64. package/dist/{Dialog-Bl5CCsoX.js → Dialog-B1xC9xMC.js} +2 -2
  65. package/dist/{Dialog-DIWIrzgk.js → Dialog-BmdNX3NC.js} +1 -1
  66. package/dist/{DialogHeader-DbWkeIrf.js → DialogHeader-DcP4xAk3.js} +2 -2
  67. package/dist/Divider/index.d.ts +1 -1
  68. package/dist/Drawer/index.d.ts +1 -1
  69. package/dist/Drawer/index.js +1 -1
  70. package/dist/{Drawer-MdC2BxbG.js → Drawer-CdHbZffI.js} +2 -2
  71. package/dist/DropdownMenu/index.js +2 -2
  72. package/dist/{DropdownMenu-4o8qS78m.js → DropdownMenu-C1494BkC.js} +9 -9
  73. package/dist/EmptyState/index.js +1 -1
  74. package/dist/{EmptyState-CeZXvaPU.js → EmptyState-BAP8BpDj.js} +2 -2
  75. package/dist/Field/index.js +3 -3
  76. package/dist/{Field-CrTrfcXB.js → Field-KszpxUdx.js} +1 -1
  77. package/dist/{FieldInfoTip-C3Ztw-wI.js → FieldInfoTip-CY9BTVtK.js} +1 -1
  78. package/dist/{FieldLabel-CFE2WC_i.js → FieldLabel-KPCTcJpO.js} +1 -1
  79. package/dist/FileInput/index.js +1 -1
  80. package/dist/{FileInput-BhO1SCw-.js → FileInput-BTIn6OoY.js} +3 -3
  81. package/dist/Heading/index.d.ts +1 -1
  82. package/dist/Heading/index.js +1 -1
  83. package/dist/{Heading-AZCa8gid.js → Heading-D94VFJtm.js} +1 -1
  84. package/dist/HoverCard/index.d.ts +1 -1
  85. package/dist/HoverCard/index.js +1 -1
  86. package/dist/{HoverCard-C4VR_GZ0.js → HoverCard-rwpyd6nt.js} +4 -4
  87. package/dist/IconButton/index.js +1 -1
  88. package/dist/{IconButton-CqWEkha9.js → IconButton-e5xeGow-.js} +1 -1
  89. package/dist/InfoTip/index.d.ts +1 -1
  90. package/dist/InfoTip/index.js +1 -1
  91. package/dist/{InfoTip-Dps1Aaem.js → InfoTip-DpvV8zrm.js} +2 -2
  92. package/dist/{InputClearButton-Xjvkkq7B.js → InputClearButton-BzxJH6mk.js} +1 -1
  93. package/dist/InputGroup/index.d.ts +1 -1
  94. package/dist/InputGroup/index.js +1 -1
  95. package/dist/{InputGroup-gYIGs7VH.js → InputGroup-Bj4hksiI.js} +1 -1
  96. package/dist/{Item-FxMSEuU3.js → Item-D62Cibn1.js} +2 -2
  97. package/dist/{LayerContentBoundary-C7VZOgMs.js → LayerContentBoundary-CTjEpdM4.js} +1 -1
  98. package/dist/Layout/index.js +2 -2
  99. package/dist/{Layout-D6UhyoVb.js → Layout-SJoCw8NC.js} +1 -1
  100. package/dist/{LayoutPanel-DfS5TvSP.js → LayoutPanel-DZN4RxX6.js} +1 -1
  101. package/dist/Lightbox/index.js +1 -1
  102. package/dist/{Lightbox-76vHqGA0.js → Lightbox-FWtAn7X5.js} +1 -1
  103. package/dist/Link/index.d.ts +1 -1
  104. package/dist/Link/index.js +1 -1
  105. package/dist/{Link-QPBGLcTk.js → Link-BxK3lbA-.js} +2 -2
  106. package/dist/List/index.d.ts +1 -1
  107. package/dist/List/index.js +2 -2
  108. package/dist/{ListItem-Ss6Kw90l.js → ListItem-B4jt3EXr.js} +4 -4
  109. package/dist/Markdown/index.js +1 -1
  110. package/dist/{Markdown-Cz6wbx9z.js → Markdown-CsoseOGe.js} +3 -3
  111. package/dist/MobileNav/index.js +1 -1
  112. package/dist/{MobileNavToggle-CCJBX2fq.js → MobileNavToggle-AgT6hzTg.js} +2 -2
  113. package/dist/MoreMenu/index.d.ts +1 -1
  114. package/dist/MoreMenu/index.js +1 -1
  115. package/dist/{MoreMenu-OOQAeJT9.js → MoreMenu-4zcxptan.js} +8 -8
  116. package/dist/MultiSelector/index.d.ts +1 -1
  117. package/dist/MultiSelector/index.js +1 -1
  118. package/dist/{MultiSelector-9HGDsMQE.js → MultiSelector-LuAE71wE.js} +6 -6
  119. package/dist/{NavDisclosure-BTeZLyLq.js → NavDisclosure-CSnUZY3k.js} +1 -1
  120. package/dist/{NavHeadingSurface-DPmolgVb.js → NavHeadingSurface-C3fTf5--.js} +1 -1
  121. package/dist/NavItem/index.d.ts +1 -1
  122. package/dist/NavItem/index.js +1 -1
  123. package/dist/{NavItem-BL3g0YUf.js → NavItem-mcmzIshL.js} +1 -1
  124. package/dist/NavMenu/index.js +3 -3
  125. package/dist/{NavMenu-DcTh1DCM.js → NavMenu-Bp35Bk7_.js} +2 -2
  126. package/dist/{NavMenuItem-Dmsno5s3.js → NavMenuItem-DviXkleh.js} +3 -3
  127. package/dist/NumberInput/index.d.ts +1 -1
  128. package/dist/NumberInput/index.js +1 -1
  129. package/dist/{NumberInput-DWYCcrUw.js → NumberInput-CxzhFPQw.js} +3 -3
  130. package/dist/Outline/index.js +1 -1
  131. package/dist/{Outline-DGtPcD0U.js → Outline-KpA-ffCT.js} +3 -3
  132. package/dist/OverflowList/index.d.ts +1 -1
  133. package/dist/OverflowList/index.js +1 -1
  134. package/dist/{OverflowList-EIr4jQjY.js → OverflowList-DRZxrAYq.js} +2 -2
  135. package/dist/Overlay/index.d.ts +1 -1
  136. package/dist/Pagination/index.d.ts +1 -1
  137. package/dist/Pagination/index.js +1 -1
  138. package/dist/{Pagination-Ch7-xIFe.js → Pagination-B3JMAlnl.js} +2 -2
  139. package/dist/PanGestureRecognizer-R5y8LZ9h.js +681 -0
  140. package/dist/Popover/index.d.ts +1 -1
  141. package/dist/Popover/index.js +1 -1
  142. package/dist/{Popover-LSIKv1zS.js → Popover-CQr95J2s.js} +10 -10
  143. package/dist/PowerSearch/index.d.ts +1 -1
  144. package/dist/PowerSearch/index.js +1 -1
  145. package/dist/{PowerSearch-Cjkv0qON.js → PowerSearch-BEaqgsZa.js} +26 -26
  146. package/dist/PressTracker-Dze87pxw.js +190 -0
  147. package/dist/ProgressBar/index.d.ts +1 -1
  148. package/dist/ProgressBar/index.js +1 -1
  149. package/dist/{ProgressBar-nPERcjvJ.js → ProgressBar-ChgsiVRR.js} +3 -3
  150. package/dist/Radio/index.d.ts +1 -1
  151. package/dist/Radio/index.js +1 -1
  152. package/dist/{RadioGroup-BWFVn7Gd.js → RadioGroup-CpMYh9eL.js} +9 -6
  153. package/dist/RadioList/index.d.ts +1 -1
  154. package/dist/RadioList/index.js +1 -1
  155. package/dist/{RadioListItem-D1rnSZeL.js → RadioListItem-n-h5r1GO.js} +1 -1
  156. package/dist/Resizable/index.d.ts +1 -1
  157. package/dist/Resizable/index.js +1 -1
  158. package/dist/{ResizeHandle-DyjQfxxG.js → ResizeHandle-J9-dAMuo.js} +2 -2
  159. package/dist/ScrollableArea/index.d.ts +1 -1
  160. package/dist/SegmentedControl/index.js +1 -1
  161. package/dist/SegmentedControl-nz9d6e0y.js +1465 -0
  162. package/dist/SelectableCard/index.d.ts +1 -1
  163. package/dist/SelectableCard/index.js +1 -1
  164. package/dist/{SelectableCard-uDblNb5T.js → SelectableCard-C018jluo.js} +1 -1
  165. package/dist/Selector/index.d.ts +1 -1
  166. package/dist/Selector/index.js +1 -1
  167. package/dist/{Selector-BiLcyM3Y.js → Selector-CW1jaM4F.js} +4 -4
  168. package/dist/SideNav/index.d.ts +1 -1
  169. package/dist/SideNav/index.js +2 -2
  170. package/dist/{SideNav-d0A9mlEW.js → SideNav-DgRpBPuP.js} +9 -9
  171. package/dist/Slider/index.js +1 -1
  172. package/dist/Slider-Bz72itTP.js +1786 -0
  173. package/dist/Stack/index.d.ts +1 -1
  174. package/dist/StatusDot/index.js +1 -1
  175. package/dist/{StatusDot-D3z-WEGn.js → StatusDot-D7nVuPg7.js} +1 -1
  176. package/dist/Stepper/index.d.ts +1 -1
  177. package/dist/Stepper/index.js +1 -1
  178. package/dist/{Stepper-CePOs80C.js → Stepper-Af_rH8C4.js} +1 -1
  179. package/dist/Switch/index.d.ts +1 -1
  180. package/dist/Switch/index.js +1 -1
  181. package/dist/Switch-BYsb1gKn.js +1397 -0
  182. package/dist/TabList/index.d.ts +1 -1
  183. package/dist/TabList/index.js +1 -1
  184. package/dist/{TabList-CthDI2i1.js → TabList-Cgw2IuL-.js} +3 -3
  185. package/dist/Table/index.d.ts +1 -1
  186. package/dist/Table/index.js +1 -1
  187. package/dist/{Table-egoY0slV.js → Table-DzE-4_og.js} +12 -12
  188. package/dist/Text/index.d.ts +1 -1
  189. package/dist/Text/index.js +1 -1
  190. package/dist/{Text-CGb1rxyK.js → Text-kwsIut3C.js} +1 -1
  191. package/dist/TextArea/index.d.ts +1 -1
  192. package/dist/TextArea/index.js +1 -1
  193. package/dist/{TextArea-B3WlT4sr.js → TextArea-DrYMTaZm.js} +4 -4
  194. package/dist/TextInput/index.d.ts +1 -1
  195. package/dist/TextInput/index.js +1 -1
  196. package/dist/{TextInput-C4CqgE0E.js → TextInput-B-1cuwcB.js} +4 -4
  197. package/dist/Thumbnail/index.js +1 -1
  198. package/dist/{Thumbnail-6YWZ9a2A.js → Thumbnail-DeMaRkDU.js} +3 -3
  199. package/dist/{TimeField-CvBKO_Ew.js → TimeField-C1Nv-fz3.js} +3 -3
  200. package/dist/TimeInput/index.d.ts +1 -1
  201. package/dist/TimeInput/index.js +1 -1
  202. package/dist/{TimeInput-Cl9HIZrP.js → TimeInput-Dvh6qqHI.js} +2 -2
  203. package/dist/Timer/index.d.ts +1 -1
  204. package/dist/Timer/index.js +1 -1
  205. package/dist/{Timer-BNa_W8zr.js → Timer-B-9sSJWK.js} +1 -1
  206. package/dist/Timestamp/index.d.ts +1 -1
  207. package/dist/Timestamp/index.js +1 -1
  208. package/dist/{Timestamp-D_NTXtxz.js → Timestamp-wFkl39dn.js} +3 -3
  209. package/dist/Toast/index.js +1 -1
  210. package/dist/{Toast-E6NqFf3W.js → Toast-CO6Z1r1s.js} +5 -3
  211. package/dist/ToggleButton/index.d.ts +1 -1
  212. package/dist/ToggleButton/index.js +1 -1
  213. package/dist/{ToggleButton-ih92QX-K.js → ToggleButton-DPpjDYxP.js} +3 -3
  214. package/dist/Token/index.js +1 -1
  215. package/dist/{Token-DE1udaRF.js → Token-DZkUAIYA.js} +1 -1
  216. package/dist/Tokenizer/index.js +1 -1
  217. package/dist/{Tokenizer-DbD2ZBuh.js → Tokenizer-CX7D4klL.js} +13 -13
  218. package/dist/Toolbar/index.d.ts +1 -1
  219. package/dist/Tooltip/index.d.ts +1 -1
  220. package/dist/Tooltip/index.js +2 -2
  221. package/dist/{Tooltip-sXtW5dTD.js → Tooltip-DyGaJUbl.js} +1 -1
  222. package/dist/TopNav/index.d.ts +1 -1
  223. package/dist/TopNav/index.js +1 -1
  224. package/dist/{TopNav-D688LaUK.js → TopNav-D8Hc_kQ-.js} +5 -5
  225. package/dist/TreeList/index.d.ts +1 -1
  226. package/dist/TreeList/index.js +1 -1
  227. package/dist/{TreeList-BFKPBFKu.js → TreeList-lNyuRBOk.js} +4 -4
  228. package/dist/Typeahead/index.js +2 -2
  229. package/dist/{Typeahead-BwjzOjT4.js → Typeahead-BiosTaFo.js} +5 -5
  230. package/dist/{VelocityTracker-bns4TzMt.js → VelocityTracker-CPFBHDpy.js} +1 -1
  231. package/dist/{accessibleName-nYUMoSTW.js → accessibleName-f5xApbXG.js} +2 -2
  232. package/dist/{animator-DnLs_cbV.js → animator-ozeBZ_zC.js} +3 -3
  233. package/dist/{assertOptions-BdLvkG6M.js → assertOptions-Byu4Yqfg.js} +1 -1
  234. package/dist/boxHold-YML2o6iP.js +170 -0
  235. package/dist/browserClickWait-DIj9tkLa.js +77 -0
  236. package/dist/{clickGuard-C3VmOLhI.js → clickGuard-CxqcfBCJ.js} +2 -2
  237. package/dist/{coarsePointer-BfMx3H23.js → coarsePointer-BWNSUIY8.js} +2 -32
  238. package/dist/composables/index.js +10 -10
  239. package/dist/{composables-B9tgZEzP.js → composables-CPDafrux.js} +12 -9
  240. package/dist/{context-Dktfy1fh.js → context-C1MPE6J5.js} +1 -1
  241. package/dist/{useAttachment-CALrXA-t.js → geometry-CGa3nNzZ.js} +14 -837
  242. package/dist/{gestures-CppaWqif.js → gestures-yKyyMqeQ.js} +225 -1
  243. package/dist/{holdEntranceInput-DgimbgGm.js → holdEntranceInput-C8B_DYYs.js} +2 -2
  244. package/dist/{index-MOtVbTwK.d.ts → index-B6GTqpW-.d.ts} +4 -4
  245. package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
  246. package/dist/{index-D7ShT2c-.d.ts → index-BB9acgK8.d.ts} +2 -2
  247. package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
  248. package/dist/{index-D65x5ny5.d.ts → index-BdICULsZ.d.ts} +78 -78
  249. package/dist/{index-maTGrWjF.d.ts → index-BenG-F5d.d.ts} +1 -1
  250. package/dist/{index-3LdpzxQZ.d.ts → index-BfFpUr1B.d.ts} +1 -1
  251. package/dist/{index-CTjkJP4x.d.ts → index-Bgk1Rj2A.d.ts} +1 -1
  252. package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
  253. package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
  254. package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
  255. package/dist/{index-Cm36VS1A.d.ts → index-C9uW39Mj.d.ts} +1 -1
  256. package/dist/{index-AgTJRqUY.d.ts → index-CQi9WGWE.d.ts} +2 -2
  257. package/dist/{index-Bwh8O-v8.d.ts → index-CZ29Xu_E.d.ts} +1 -1
  258. package/dist/{index-85y5NZP-.d.ts → index-CpkQlo1t.d.ts} +2 -2
  259. package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
  260. package/dist/{index-DWVhyvVu.d.ts → index-CukA-J8A.d.ts} +6 -6
  261. package/dist/{index-eCp-ElSp.d.ts → index-DYabo8TI.d.ts} +1 -1
  262. package/dist/{index-CM00rrgg.d.ts → index-DhrnMYVh.d.ts} +3 -3
  263. package/dist/{index-BOiwoyXq.d.ts → index-DlsrR4Gm.d.ts} +8 -8
  264. package/dist/{index-Otl047R1.d.ts → index-DofC9Rll.d.ts} +1 -1
  265. package/dist/{index-CArP_6wv.d.ts → index-ZXrvTM3A.d.ts} +1 -1
  266. package/dist/{index-CbA8rR_b.d.ts → index-a_FOKJMw.d.ts} +2 -2
  267. package/dist/{index-CdvmnNMH.d.ts → index-jz9GfvS0.d.ts} +1 -1
  268. package/dist/{index-Ak1b0V24.d.ts → index-tdOyqA_U.d.ts} +1 -1
  269. package/dist/index.d.ts +25 -25
  270. package/dist/index.js +101 -101
  271. package/dist/{inputHold-DW2LYHb5.js → inputHold-BJtjc9iI.js} +4 -4
  272. package/dist/{inputHoldState-xntIqr5W.js → inputHoldState-BYi5FKZl.js} +2 -2
  273. package/dist/{inputStream-bPd9eB2b.js → inputStream-HXw2lZ-3.js} +1 -1
  274. package/dist/{landing-9mjHGn26.js → landing-BW6qLvC8.js} +1 -1
  275. package/dist/{layerDepth-c3jUndA2.js → layerDepth-SGFJ5L6X.js} +1 -1
  276. package/dist/{lazyBottomSheet-Ca7Mdou2.js → lazyBottomSheet-Bg5E8lr3.js} +1 -1
  277. package/dist/{linearEasing-CBwOorE7.js → linearEasing-VHwy6xl_.js} +1 -1
  278. package/dist/{presentation-Cy_yf56y.js → presentation-twEOzzJq.js} +1 -1
  279. package/dist/{presentationHold-B4tK68sd.js → presentationHold-ZKixVLcz.js} +1 -1
  280. package/dist/pressClaim-DvdlIn4w.js +24 -0
  281. package/dist/{pressFeedback-BlOSZew9.js → pressFeedback--_INTed0.js} +49 -9
  282. package/dist/{pressGesture-yntcDLXo.js → pressGesture-B3Efxs_z.js} +1 -1
  283. package/dist/{rubberBand-DDapO54w.js → projection-qPcLQcwK.js} +2 -50
  284. package/dist/{reportChange-DPFCmyOB.js → reportChange-DwOfucSf.js} +4 -4
  285. package/dist/{resizableChannel-DOmBYh4V.js → resizableChannel-BnwrR5tr.js} +5 -5
  286. package/dist/{resolveMotion-CF9fXX0t.js → resolveMotion-DftkGFw6.js} +1 -1
  287. package/dist/{resolveSnapPoint-mZzJRIC2.js → resolveSnapPoint-A4dhS5jj.js} +1 -1
  288. package/dist/rubberBand-DDd5ElTe.js +65 -0
  289. package/dist/selectionLock-BrUpRS0E.js +130 -0
  290. package/dist/{sharedRealm-H1OrlP0V.js → sharedRealm-DBtNH73I.js} +9 -1
  291. package/dist/{springs-B2jqskKJ.js → springs-DjAn_oV5.js} +1 -1
  292. package/dist/{stillPointerGate-Htiy6uKa.js → stillPointerGate-BvCX7ddI.js} +1 -1
  293. package/dist/{themeTiming-ClYaZxGf.js → themeTiming-BJziEh4O.js} +1 -1
  294. package/dist/{tooltipFocusRules-BHJUQprJ.js → tooltipFocusRules-CxIlSnHw.js} +2 -2
  295. package/dist/{tooltipTriggerRules-Dremu4W9.js → tooltipTriggerRules-CHNpQ6RL.js} +1 -1
  296. package/dist/{touchHold-DXtx7npm.js → touchHold-CjNjGH7O.js} +1 -1
  297. package/dist/touchQueries-xy5IeZfe.js +32 -0
  298. package/dist/{useActionGroupTracking-DDhfTUOK.js → useActionGroupTracking-BTjuGF9J.js} +3 -3
  299. package/dist/{useAnimatedLayout-B6Xj_kTo.js → useAnimatedLayout-CRAuCwTZ.js} +1 -1
  300. package/dist/useAttachment-CGiD9rt6.js +24 -0
  301. package/dist/{useChatStreamScroll-CuMzkXgD.js → useChatStreamScroll-DcNKcNTj.js} +1 -1
  302. package/dist/{useDismiss-BvDK4xBe.js → useDismiss-6SGAlkB_.js} +1 -1
  303. package/dist/{useHeldPresentation-BF5vGVUn.js → useHeldPresentation-CaIKTwUh.js} +1 -1
  304. package/dist/{useInputStatusIcon-MyCpVp3g.js → useInputStatusIcon-Bl2JFlc3.js} +1 -1
  305. package/dist/{useMenuEntranceHold-HznOwIry.js → useMenuEntranceHold-C-kHicUN.js} +1 -1
  306. package/dist/{useMenuPress-BJVQF7ml.js → useMenuPress-CF1GHP_7.js} +6 -4
  307. package/dist/{usePressFeedback-cxyksfAD.js → usePressFeedback-B_NavJu0.js} +1 -1
  308. package/dist/{useResizable-C-9ff2ZK.js → useResizable-I0APFcMz.js} +6 -5
  309. package/dist/{useTooltip-w57yzB7h.js → useTooltip-owvVSn_m.js} +4 -4
  310. package/dist/{useTouchHitArea-CgUvnuTz.js → useTouchHitArea-BpEJXuu-.js} +2 -2
  311. package/dist/{useTouchTriggerInternal-DSA228_-.js → useTouchTriggerInternal-5ExaYYSy.js} +1 -1
  312. package/dist/{useTruncationTooltip--w8vh7M-.js → useTruncationTooltip-DHI6q_EV.js} +3 -3
  313. package/dist/{useTypeaheadMenuConfig-C-EOaLF-.js → useTypeaheadMenuConfig-COiZ4isy.js} +1 -1
  314. package/package.json +1 -1
  315. package/styles/segmented-control.css +20 -11
  316. package/styles/slider.css +59 -12
  317. package/styles/switch.css +101 -34
  318. package/dist/SegmentedControl-CkR8ur3h.js +0 -416
  319. package/dist/Slider-BdIrYmul.js +0 -735
  320. package/dist/Switch-6tQbDX9A.js +0 -355
@@ -0,0 +1,1786 @@
1
+ import { i as sharedSequence } from "./sharedRealm-DBtNH73I.js";
2
+ import { d as toSpring } from "./roles-DWH31Bn3.js";
3
+ import { c as solveSpring } from "./linearEasing-VHwy6xl_.js";
4
+ import { a as UIKIT_PAN, n as UIKIT_CONTROL, s as UIKIT_TAP, t as HAPTIC_VIBRATION_PATTERNS } from "./gestures-yKyyMqeQ.js";
5
+ import { t as usePressFeedback } from "./usePressFeedback-B_NavJu0.js";
6
+ import { a as trackInteractionModality, t as getInteractionModality } from "./interactionModality-4Km2ibsq.js";
7
+ import { t as _sfc_main$2 } from "./VisuallyHidden-cpmsV-0M.js";
8
+ import { t as _sfc_main$3 } from "./ButtonTooltip-ZpQP-aQg.js";
9
+ import { t as useButtonTooltip } from "./useButtonTooltip-DjCaZMp_.js";
10
+ import { n as createMotionEngine } from "./animator-ozeBZ_zC.js";
11
+ import { t as resolveMotion } from "./resolveMotion-DftkGFw6.js";
12
+ import { a as registerSpringsTable, n as SLIDER_LIFT_SPRING, r as SLIDER_RELEASE_SPRING, t as SLIDER_DROP_SPRING } from "./springs-DjAn_oV5.js";
13
+ import { i as getGestureHost, n as distance, r as travel, s as MANIPULATION } from "./geometry-CGa3nNzZ.js";
14
+ import { n as GestureRecognizer, t as PanGestureRecognizer } from "./PanGestureRecognizer-R5y8LZ9h.js";
15
+ import { n as lockSelection } from "./selectionLock-BrUpRS0E.js";
16
+ import { t as isRtlElement } from "./isRtlElement-NHuH48AA.js";
17
+ import { n as projectDistance } from "./projection-qPcLQcwK.js";
18
+ import { o as useComponentMessages } from "./context-B8IEFCDR.js";
19
+ import { n as observeResize } from "./sharedResizeObserver-BekhnB3E.js";
20
+ import { r as withholdCallerHandlers } from "./disabledInteraction-Bqoyhoss.js";
21
+ import { a as useAriaRequired } from "./context-CrVCeUUK.js";
22
+ import { t as _sfc_main$4 } from "./Field-KszpxUdx.js";
23
+ import { t as useFieldPartStyling } from "./fieldParts-CuE5V12i.js";
24
+ import { t as sliderMessages } from "./slider-6ZlGhyPD.js";
25
+ import { n as createPressTracker, t as PRESS_PROFILES } from "./PressTracker-Dze87pxw.js";
26
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, renderList, renderSlot, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx, withKeys } from "vue";
27
+ import "../styles/button.css";
28
+ import "../styles/slider.css";
29
+ //#region src/motion/uikit/slider.ts
30
+ /**
31
+ * @file slider.ts
32
+ * @input Nothing: data only
33
+ * @output Exports `slider`: UISlider's hit target, tracking rule, release
34
+ * coast, lift, drop and end haptic, measured on the iOS 26.2 simulator
35
+ * @position The slider domain of the UIKit constants table (motion/uikit).
36
+ * Lengths are in pt (CSS px). Tests check each leaf's `@source`.
37
+ */
38
+ /**
39
+ * UISlider's touch values: hit target, tracking, release coast, lift, drop
40
+ * and the end-of-track haptic.
41
+ */
42
+ const slider = {
43
+ /**
44
+ * The thumb's touch target, a square in pt centered on the thumb. It is
45
+ * the 37 × 24 pt thumb grown by its hit edge insets: 12 pt above and
46
+ * below, 5.5 pt left and right. UIKit hit-tests inside the control's frame
47
+ * first, so the lab's 40 pt frame clipped it to 48 × 40.
48
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro.
49
+ * `_thumbHitEdgeInsets` reads {−12, −5.5, −12, −5.5}. Touch-downs on a
50
+ * 4 pt grid take the thumb from −24 to +20 pt in x. A track tap away
51
+ * from the thumb moves nothing. Oct 23 2026
52
+ */
53
+ thumbHitTarget: 48,
54
+ /**
55
+ * Value range per track length of finger travel. The value moves by
56
+ * (max − min) × translation ÷ the track's full length. The translation
57
+ * counts from the pan's threshold: the touch-down point plus 10 pt along
58
+ * the track. 1 means one full range per track length.
59
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. In
60
+ * drags at 120 to 2000 pt/s, each event's value is v0 plus the
61
+ * translation past 10 pt ÷ 300. Past the max end, the value leaves 1
62
+ * only once the finger comes back past where it reached 1. Oct 23 2026
63
+ */
64
+ trackingGain: 1,
65
+ /**
66
+ * The coast after the lift. The thumb and the value spring from where the
67
+ * finger left them to the projected target, with the release velocity.
68
+ * Critically damped, it never overshoots a target ahead of it.
69
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
70
+ * `UIViewSpringAnimationBehavior` at the lift reads response 0.4 and
71
+ * damping ratio 1. Four releases fit it per frame, at rms 0.11 pt or
72
+ * less. Oct 23 2026
73
+ */
74
+ releaseSpring: SLIDER_RELEASE_SPRING,
75
+ /**
76
+ * The deceleration rate of the coast's momentum projection, per ms
77
+ * (WWDC18's `project`). It is not UIScrollView's normal rate (0.998), so
78
+ * pass it to the projection explicitly.
79
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
80
+ * release behavior's projection deceleration reads 0.996. Oct 23 2026
81
+ */
82
+ releaseProjectionRate: .996,
83
+ /**
84
+ * How much of the projection the coast travels. The target is the lift
85
+ * value plus this share of the projected distance. A finger lifted outside
86
+ * the control's tracking bounds coasts back to the lift value instead.
87
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
88
+ * release behavior's target smoothing reads 0.4. A 126.9 pt/s release
89
+ * travels 12.56 pt, against 12.64 predicted. Oct 23 2026
90
+ */
91
+ releaseProjectionShare: .4,
92
+ /**
93
+ * The thumb's growth under a finger, uniform about its center (37 × 24 to
94
+ * 57.35 × 37.2 pt).
95
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The lens
96
+ * frame settled during an 800 ms hold. Oct 23 2026
97
+ */
98
+ liftScale: 1.55,
99
+ /**
100
+ * The lift: the thumb grows to `liftScale` when the finger lands.
101
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The lens
102
+ * width per frame in an 800 ms hold fits one spring at rms 0.31 pt.
103
+ * Oct 23 2026
104
+ */
105
+ liftSpring: {
106
+ response: .215,
107
+ dampingRatio: .6
108
+ },
109
+ /**
110
+ * The drop: the thumb shrinks back to its rest size when the finger lifts,
111
+ * while the coast runs.
112
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
113
+ * lens's spring at the lift of an 800 ms hold reads response 0.5 s and
114
+ * damping ratio 0.7. The width per frame fits it at rms 0.10 pt.
115
+ * Oct 23 2026
116
+ */
117
+ dropSpring: {
118
+ response: .5,
119
+ dampingRatio: .7
120
+ },
121
+ /**
122
+ * The feedback each time the value reaches an end, once per entry. It
123
+ * re-arms when the value leaves the end, in the drag and the coast. UIKit
124
+ * plays "Micro Tap Medium", and the web stand-in is the closest kind.
125
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
126
+ * haptics log of drags into both ends shows the fluid slider generator's
127
+ * "Micro Tap Medium" once per entry. Oct 23 2026
128
+ */
129
+ endHaptic: "impactMedium"
130
+ };
131
+ /** How far a thumb's touch target reaches past the thumb on each side (UISlider's 48 pt square). */
132
+ const HIT_GROWTH = (slider.thumbHitTarget - 20) / 2;
133
+ /**
134
+ * A thumb's touch-target insets, which its `::before` draws under a finger.
135
+ * A range's two targets never reach into each other: on the side facing the
136
+ * other thumb the growth stops at half the gap, so a finger takes the nearer
137
+ * thumb. Container units measure the travel, so the gap needs no layout read.
138
+ */
139
+ function thumbHitInsets(index, values, min, max, isHorizontal) {
140
+ const full = `${-HIT_GROWTH}px`;
141
+ const isRange = values.length === 2;
142
+ let facing = full;
143
+ if (isRange && max > min) facing = `calc(-1 * clamp(0px, (${(values[1] - values[0]) / (max - min)} * (${isHorizontal ? "100cqi" : "100cqb"} - 20px) - 20px) / 2, ${HIT_GROWTH}px))`;
144
+ const towardLower = isRange && index === 1 ? facing : full;
145
+ const towardUpper = isRange && index === 0 ? facing : full;
146
+ const [top, bottom, start, end] = isHorizontal ? [
147
+ full,
148
+ full,
149
+ towardLower,
150
+ towardUpper
151
+ ] : [
152
+ towardUpper,
153
+ towardLower,
154
+ full,
155
+ full
156
+ ];
157
+ return {
158
+ "--_slider-hit-top": top,
159
+ "--_slider-hit-bottom": bottom,
160
+ "--_slider-hit-start": start,
161
+ "--_slider-hit-end": end
162
+ };
163
+ }
164
+ function clamp(value, min, max) {
165
+ return Math.min(max, Math.max(min, Number.isFinite(value) ? value : min));
166
+ }
167
+ function precision(value) {
168
+ const [coefficient = "", exponent = "0"] = String(value).split("e");
169
+ return Math.max(0, (coefficient.split(".")[1]?.length ?? 0) - Number(exponent));
170
+ }
171
+ function snap(value, min, step) {
172
+ const snapped = min + Math.round((value - min) / step) * step;
173
+ return Number(snapped.toFixed(Math.min(20, Math.max(precision(min), precision(step)))));
174
+ }
175
+ function percent(value, min, max) {
176
+ return max === min ? 0 : (value - min) / (max - min) * 100;
177
+ }
178
+ function position(value) {
179
+ return `calc(${value}% + 10px - ${value / 100 * 20}px)`;
180
+ }
181
+ function add(first, second) {
182
+ return Number((first + second).toFixed(Math.min(20, Math.max(precision(first), precision(second)))));
183
+ }
184
+ function multiply(first, second) {
185
+ return Number((first * second).toFixed(Math.min(20, precision(first) + precision(second))));
186
+ }
187
+ //#endregion
188
+ //#region src/Slider/SliderThumb.vue
189
+ const _hoisted_1$1 = [
190
+ "id",
191
+ "tabindex",
192
+ "data-thumb-index",
193
+ "data-dragging",
194
+ "data-keyboard-focus",
195
+ "aria-valuemin",
196
+ "aria-valuemax",
197
+ "aria-valuenow",
198
+ "aria-valuetext",
199
+ "aria-orientation",
200
+ "aria-labelledby",
201
+ "aria-describedby",
202
+ "aria-disabled",
203
+ "aria-invalid"
204
+ ];
205
+ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
206
+ __name: "SliderThumb",
207
+ props: {
208
+ id: {},
209
+ index: {},
210
+ value: {},
211
+ min: {},
212
+ max: {},
213
+ percentage: {},
214
+ hitInsets: {},
215
+ orientation: {},
216
+ labelledBy: {},
217
+ describedBy: {},
218
+ valueText: {},
219
+ isInvalid: { type: Boolean },
220
+ isDisabled: { type: Boolean },
221
+ isFocusable: { type: Boolean },
222
+ tooltipText: {},
223
+ dragging: { type: Boolean },
224
+ dragActive: { type: Boolean },
225
+ keyboardFocus: { type: Boolean },
226
+ extraAttrs: {}
227
+ },
228
+ emits: [
229
+ "keydown",
230
+ "focus",
231
+ "blur"
232
+ ],
233
+ setup(__props, { emit: __emit }) {
234
+ const props = __props;
235
+ const emit = __emit;
236
+ const thumb = useTemplateRef("thumb");
237
+ const tooltip = useTemplateRef("tooltip");
238
+ const tabIndex = computed(() => props.isFocusable ? 0 : -1);
239
+ const focused = shallowRef(false);
240
+ const hovered = shallowRef(false);
241
+ const dismissed = shallowRef(false);
242
+ const open = computed(() => !!props.tooltipText && !props.isDisabled && !dismissed.value && (props.dragActive ? props.dragging : focused.value || hovered.value));
243
+ const style = computed(() => ({
244
+ "--_slider-progress": props.percentage / 100,
245
+ ...props.hitInsets
246
+ }));
247
+ watch(() => props.dragging, () => {
248
+ dismissed.value = false;
249
+ });
250
+ watch(() => [props.percentage, props.tooltipText], () => {
251
+ tooltip.value?.updatePosition();
252
+ }, { flush: "post" });
253
+ function keydown(event) {
254
+ if (event.key === "Escape") dismissed.value = true;
255
+ emit("keydown", event);
256
+ }
257
+ function focus() {
258
+ focused.value = true;
259
+ dismissed.value = false;
260
+ emit("focus");
261
+ }
262
+ function blur() {
263
+ focused.value = false;
264
+ emit("blur");
265
+ }
266
+ function enter() {
267
+ hovered.value = true;
268
+ dismissed.value = false;
269
+ }
270
+ return (_ctx, _cache) => {
271
+ return openBlock(), createElementBlock(Fragment, null, [
272
+ createCommentVNode(" eslint-disable-next-line vue-a11y/interactive-supports-focus -- The tested dynamic tabindex is always 0 or -1. "),
273
+ createElementVNode("div", mergeProps(__props.extraAttrs, {
274
+ id: __props.id,
275
+ ref_key: "thumb",
276
+ ref: thumb,
277
+ class: "astryx-slider-thumb",
278
+ role: "slider",
279
+ style: style.value,
280
+ tabindex: tabIndex.value,
281
+ "data-thumb-index": __props.index,
282
+ "data-dragging": __props.dragging || void 0,
283
+ "data-keyboard-focus": __props.keyboardFocus || void 0,
284
+ "aria-valuemin": __props.min,
285
+ "aria-valuemax": __props.max,
286
+ "aria-valuenow": __props.value,
287
+ "aria-valuetext": __props.valueText,
288
+ "aria-orientation": __props.orientation,
289
+ "aria-labelledby": __props.labelledBy,
290
+ "aria-describedby": __props.describedBy,
291
+ "aria-disabled": __props.isDisabled || void 0,
292
+ "aria-invalid": __props.isInvalid || void 0,
293
+ onKeydown: keydown,
294
+ onFocus: focus,
295
+ onBlur: blur,
296
+ onPointerenter: enter,
297
+ onPointerleave: _cache[0] || (_cache[0] = ($event) => hovered.value = false)
298
+ }), null, 16, _hoisted_1$1),
299
+ __props.tooltipText ? (openBlock(), createBlock(_sfc_main$3, {
300
+ key: 0,
301
+ id: `${__props.id}-tooltip`,
302
+ ref_key: "tooltip",
303
+ ref: tooltip,
304
+ anchor: thumb.value,
305
+ open: open.value,
306
+ text: __props.tooltipText,
307
+ onPointerEnter: _cache[1] || (_cache[1] = ($event) => hovered.value = true),
308
+ onPointerLeave: _cache[2] || (_cache[2] = ($event) => hovered.value = false)
309
+ }, null, 8, [
310
+ "id",
311
+ "anchor",
312
+ "open",
313
+ "text"
314
+ ])) : createCommentVNode("v-if", true)
315
+ ], 64);
316
+ };
317
+ }
318
+ });
319
+ //#endregion
320
+ //#region src/Slider/useSlider.ts
321
+ function useSlider(options) {
322
+ const p = options.props;
323
+ const min = computed(() => Number.isFinite(p.min) ? p.min : 0);
324
+ const max = computed(() => Math.max(min.value, Number.isFinite(p.max) ? p.max : 100));
325
+ const step = computed(() => Number.isFinite(p.step) && p.step > 0 ? p.step : 1);
326
+ const gap = computed(() => Math.min(max.value - min.value, multiply(Math.max(0, Number.isFinite(p.minStepsBetweenThumbs) ? p.minStepsBetweenThumbs : 0), step.value)));
327
+ const values = computed(() => {
328
+ const model = options.model();
329
+ if (!Array.isArray(model)) return [clamp(model, min.value, max.value)];
330
+ const [low, high] = model.map((value) => clamp(value, min.value, max.value)).sort((a, b) => a - b);
331
+ const upper = Math.max(high, add(min.value, gap.value));
332
+ return [Math.min(low, add(upper, -gap.value)), upper];
333
+ });
334
+ const dragging = shallowRef(null);
335
+ const keyboardFocus = shallowRef(null);
336
+ if (typeof document !== "undefined") trackInteractionModality();
337
+ let pointerId = null;
338
+ let latest;
339
+ let coincidentPress = null;
340
+ let coincidentOrigin = false;
341
+ function resetDrag() {
342
+ dragging.value = null;
343
+ pointerId = null;
344
+ latest = void 0;
345
+ coincidentPress = null;
346
+ coincidentOrigin = false;
347
+ }
348
+ watch([
349
+ () => p.isDisabled,
350
+ () => p.orientation,
351
+ () => Array.isArray(options.model())
352
+ ], resetDrag);
353
+ watch(values, () => {
354
+ latest = void 0;
355
+ });
356
+ function boundsFor(index, base) {
357
+ return [index === 1 ? add(base[0], gap.value) : min.value, base.length === 2 && index === 0 ? add(base[1], -gap.value) : max.value];
358
+ }
359
+ function bounds(index) {
360
+ return boundsFor(index, values.value);
361
+ }
362
+ function update(index, raw, shouldSnap = true, base = values.value) {
363
+ const next = [...base];
364
+ const [lower, upper] = boundsFor(index, base);
365
+ next[index] = clamp(shouldSnap ? snap(raw, min.value, step.value) : raw, lower, upper);
366
+ const value = next.length === 2 ? [next[0], next[1]] : next[0];
367
+ latest = value;
368
+ if (next.some((v, i) => v !== values.value[i])) options.change(value);
369
+ return value;
370
+ }
371
+ function current() {
372
+ if (latest === void 0) return values.value;
373
+ return Array.isArray(latest) ? [...latest] : [latest];
374
+ }
375
+ function constrain(index, raw) {
376
+ const [lower, upper] = boundsFor(index, current());
377
+ return clamp(snap(raw, min.value, step.value), lower, upper);
378
+ }
379
+ function thumbFor(value) {
380
+ const [low, high] = values.value;
381
+ if (low === void 0 || high === void 0) return 0;
382
+ if (low === high) return value > low ? 1 : 0;
383
+ return Math.abs(value - high) < Math.abs(value - low) ? 1 : 0;
384
+ }
385
+ function focusThumb(index) {
386
+ options.track.value?.querySelectorAll("[role=\"slider\"]")[index]?.focus({ preventScroll: true });
387
+ keyboardFocus.value = null;
388
+ }
389
+ function hold(index) {
390
+ const active = options.track.value?.ownerDocument.activeElement;
391
+ if (index !== null && index !== dragging.value && active != null && options.track.value?.contains(active)) focusThumb(index);
392
+ dragging.value = index;
393
+ }
394
+ function valueAt(x, y) {
395
+ const mark = options.track.value?.ownerDocument.elementFromPoint?.(x, y)?.closest("[data-mark-value]");
396
+ return mark ? Number(mark.dataset.markValue) : pointerValue(x, y);
397
+ }
398
+ function pointerValue(clientX, clientY) {
399
+ const track = options.track.value;
400
+ const rect = track.getBoundingClientRect();
401
+ const vertical = p.orientation === "vertical";
402
+ const size = vertical ? rect.height : rect.width;
403
+ const offset = vertical ? rect.bottom - clientY : getComputedStyle(track).direction === "rtl" ? rect.right - clientX : clientX - rect.left;
404
+ const fraction = size > 20 ? (offset - 10) / (size - 20) : size > 0 ? offset / size : 0;
405
+ return min.value + clamp(fraction, 0, 1) * (max.value - min.value);
406
+ }
407
+ function pointerDown(event) {
408
+ if (p.isDisabled || event.defaultPrevented || event.button !== 0 || pointerId !== null || !options.track.value) return;
409
+ const target = event.target;
410
+ const thumb = target.closest("[data-thumb-index]");
411
+ if (thumb) {
412
+ thumb.focus({ preventScroll: true });
413
+ keyboardFocus.value = null;
414
+ return;
415
+ }
416
+ if (event.pointerType === "touch" || event.pointerType === "pen") return;
417
+ const mark = target.closest("[data-mark-value]");
418
+ const raw = mark ? Number(mark.dataset.markValue) : pointerValue(event.clientX, event.clientY);
419
+ const parks = values.value.length === 2 && values.value[0] === values.value[1] && raw === values.value[0];
420
+ const index = parks ? 1 : thumbFor(raw);
421
+ event.preventDefault();
422
+ dragging.value = index;
423
+ pointerId = event.pointerId;
424
+ coincidentPress = parks ? pointerValue(event.clientX, event.clientY) : null;
425
+ coincidentOrigin = parks;
426
+ focusThumb(index);
427
+ update(index, parks ? values.value[index] : raw);
428
+ options.track.value.setPointerCapture?.(event.pointerId);
429
+ }
430
+ function handTo(index) {
431
+ if (index === dragging.value) return;
432
+ dragging.value = index;
433
+ focusThumb(index);
434
+ }
435
+ function pointerMove(event) {
436
+ if (p.isDisabled || pointerId !== event.pointerId || dragging.value === null) return;
437
+ const value = pointerValue(event.clientX, event.clientY);
438
+ if (coincidentPress !== null) {
439
+ if (value === coincidentPress) return;
440
+ const origin = coincidentPress;
441
+ coincidentPress = null;
442
+ handTo(value > origin ? 1 : 0);
443
+ } else if (coincidentOrigin) {
444
+ const current = values.value;
445
+ const held = dragging.value;
446
+ const other = held === 0 ? 1 : 0;
447
+ if (held === 0 && value > current[1] || held === 1 && value < current[0]) {
448
+ const base = [...current];
449
+ base[held] = current[other];
450
+ handTo(other);
451
+ update(other, value, true, base);
452
+ return;
453
+ }
454
+ }
455
+ update(dragging.value, value);
456
+ }
457
+ function pointerEnd(event) {
458
+ if (pointerId !== event.pointerId || dragging.value === null) return;
459
+ const value = shown();
460
+ resetDrag();
461
+ if (options.track.value?.hasPointerCapture?.(event.pointerId)) options.track.value.releasePointerCapture(event.pointerId);
462
+ if (!p.isDisabled) options.end(value);
463
+ }
464
+ function shown() {
465
+ const now = current();
466
+ return now.length === 2 ? [now[0], now[1]] : now[0];
467
+ }
468
+ function thumbFocus(index) {
469
+ keyboardFocus.value = !p.isDisabled && getInteractionModality() === "keyboard" ? index : null;
470
+ }
471
+ function thumbBlur() {
472
+ keyboardFocus.value = null;
473
+ }
474
+ function keydown(index, event) {
475
+ if (p.isDisabled || event.defaultPrevented) return;
476
+ if (event.key !== "Shift" && !event.altKey && !event.ctrlKey && !event.metaKey && getInteractionModality() === "keyboard") keyboardFocus.value = index;
477
+ if (event.altKey || event.ctrlKey || event.metaKey) return;
478
+ const current = values.value[index];
479
+ const rtl = p.orientation !== "vertical" && options.track.value && getComputedStyle(options.track.value).direction === "rtl";
480
+ const offsets = {
481
+ ArrowRight: rtl ? -1 : 1,
482
+ ArrowLeft: rtl ? 1 : -1,
483
+ ArrowUp: 1,
484
+ ArrowDown: -1,
485
+ PageUp: 10,
486
+ PageDown: -10
487
+ };
488
+ let value;
489
+ if (event.key === "Home") value = min.value;
490
+ else if (event.key === "End") value = max.value;
491
+ else if (event.key in offsets) value = current + offsets[event.key] * step.value;
492
+ else return;
493
+ event.preventDefault();
494
+ const toBound = event.key === "Home" || event.key === "End";
495
+ options.end(update(index, value, !toBound));
496
+ }
497
+ return {
498
+ min,
499
+ max,
500
+ gap,
501
+ values,
502
+ bounds,
503
+ dragging,
504
+ keyboardFocus,
505
+ pointerDown,
506
+ pointerMove,
507
+ pointerEnd,
508
+ keydown,
509
+ thumbFocus,
510
+ thumbBlur,
511
+ current,
512
+ constrain,
513
+ currentBounds: (index) => boundsFor(index, current()),
514
+ setValue: (index, value, base = current()) => {
515
+ update(index, value, true, base);
516
+ },
517
+ hold,
518
+ reportEnd: () => options.end(shown()),
519
+ valueAt,
520
+ thumbFor
521
+ };
522
+ }
523
+ //#endregion
524
+ //#region src/gestures/haptics.ts
525
+ /** Whether this browser vibrates at all. */
526
+ function canVibrate() {
527
+ return typeof navigator !== "undefined" && typeof navigator.vibrate === "function";
528
+ }
529
+ /**
530
+ * Vibrate for a feedback kind where `navigator.vibrate` exists. Returns
531
+ * whether anything was played. Never plays on iOS, which has no vibration
532
+ * API; use `attachTapHaptic` for the tap moment there.
533
+ */
534
+ function playHaptic(kind) {
535
+ if (!canVibrate()) return false;
536
+ return navigator.vibrate([...HAPTIC_VIBRATION_PATTERNS[kind].value]);
537
+ }
538
+ sharedSequence("gestures/haptics/label-id", 1);
539
+ //#endregion
540
+ //#region src/gestures/TapGestureRecognizer.ts
541
+ const TAP = UIKIT_TAP;
542
+ var TapGestureRecognizer = class extends GestureRecognizer {
543
+ get kind() {
544
+ return "tap";
545
+ }
546
+ /** Internal. The host's brand: a tap decides at the lift, so it never claims mid-move (recognizerInternals). */
547
+ get family() {
548
+ return "tap";
549
+ }
550
+ numberOfTapsRequired;
551
+ numberOfTouchesRequired;
552
+ allowableMovement;
553
+ maximumIntervalBetweenTaps;
554
+ allowableSeparation;
555
+ maximumTapDuration;
556
+ tapCount = 0;
557
+ isTapInProgress = false;
558
+ maxTouchesThisTap = 0;
559
+ /** Where the first tap's fingers lifted: their centroid. */
560
+ firstTapLocation = null;
561
+ /** The current tap's fingers: where each landed and where each lifted. */
562
+ tapStarts = /* @__PURE__ */ new Map();
563
+ tapLifts = /* @__PURE__ */ new Map();
564
+ constructor(options = {}) {
565
+ super(options);
566
+ this.numberOfTapsRequired = options.numberOfTapsRequired ?? 1;
567
+ this.numberOfTouchesRequired = options.numberOfTouchesRequired ?? 1;
568
+ this.allowableMovement = options.allowableMovement ?? TAP.allowableMovement.value;
569
+ this.maximumIntervalBetweenTaps = options.maximumIntervalBetweenTaps ?? TAP.maximumIntervalBetweenTaps.value;
570
+ this.allowableSeparation = options.allowableSeparation ?? TAP.allowableSeparation.value;
571
+ this.maximumTapDuration = options.maximumTapDuration ?? TAP.maximumTapDuration.value;
572
+ }
573
+ get isDiscrete() {
574
+ return true;
575
+ }
576
+ get nativeTouchBehavior() {
577
+ return MANIPULATION;
578
+ }
579
+ /** Taps completed so far in the current sequence. */
580
+ get completedTaps() {
581
+ return this.tapCount;
582
+ }
583
+ isInvolved() {
584
+ return super.isInvolved() || this.tapCount > 0;
585
+ }
586
+ touchesBegan(touches, event) {
587
+ if (!this.isTapInProgress) {
588
+ this.isTapInProgress = true;
589
+ this.tapStarts.clear();
590
+ this.tapLifts.clear();
591
+ this.maxTouchesThisTap = 0;
592
+ this.clearTimer();
593
+ if (Number.isFinite(this.maximumTapDuration)) this.setTimer(event.time + this.maximumTapDuration, () => {
594
+ this.setState("failed");
595
+ });
596
+ }
597
+ for (const touch of touches) this.tapStarts.set(touch.id, {
598
+ x: touch.startX,
599
+ y: touch.startY
600
+ });
601
+ this.maxTouchesThisTap = Math.max(this.maxTouchesThisTap, this.numberOfTouches);
602
+ if (this.numberOfTouches > this.numberOfTouchesRequired) {
603
+ this.setState("failed");
604
+ return;
605
+ }
606
+ if (this.firstTapLocation != null && this.tapStarts.size === this.numberOfTouchesRequired && distance(centerOf(this.tapStarts.values()), this.firstTapLocation) > this.allowableSeparation) this.setState("failed");
607
+ }
608
+ touchesMoved(touches) {
609
+ if (touches.some((touch) => travel(touch) > this.allowableMovement)) this.setState("failed");
610
+ }
611
+ touchesEnded(touches, event) {
612
+ if (touches.some((touch) => travel(touch) > this.allowableMovement)) {
613
+ this.setState("failed");
614
+ return;
615
+ }
616
+ for (const touch of touches) this.tapLifts.set(touch.id, {
617
+ x: touch.x,
618
+ y: touch.y
619
+ });
620
+ if (this.numberOfTouches - touches.length > 0) return;
621
+ this.isTapInProgress = false;
622
+ this.clearTimer();
623
+ if (this.maxTouchesThisTap !== this.numberOfTouchesRequired) {
624
+ this.setState("failed");
625
+ return;
626
+ }
627
+ this.tapCount += 1;
628
+ this.firstTapLocation ??= centerOf(this.tapLifts.values());
629
+ if (this.tapCount >= this.numberOfTapsRequired) {
630
+ this.setState("ended");
631
+ return;
632
+ }
633
+ this.setTimer(event.time + this.maximumIntervalBetweenTaps, () => {
634
+ this.setState("failed");
635
+ });
636
+ }
637
+ reset() {
638
+ this.tapCount = 0;
639
+ this.isTapInProgress = false;
640
+ this.maxTouchesThisTap = 0;
641
+ this.firstTapLocation = null;
642
+ this.tapStarts.clear();
643
+ this.tapLifts.clear();
644
+ }
645
+ };
646
+ /** The centroid of some points. */
647
+ function centerOf(points) {
648
+ let x = 0;
649
+ let y = 0;
650
+ let count = 0;
651
+ for (const point of points) {
652
+ x += point.x;
653
+ y += point.y;
654
+ count += 1;
655
+ }
656
+ return count === 0 ? {
657
+ x: 0,
658
+ y: 0
659
+ } : {
660
+ x: x / count,
661
+ y: y / count
662
+ };
663
+ }
664
+ //#endregion
665
+ //#region src/Slider/sliderTravel.ts
666
+ /**
667
+ * The release coast as a curve in the thumb's own px, clamped to the
668
+ * thumb's range. It is a spring from `from` to `to` with `velocity` (px/s).
669
+ * Its value stops at an end instead of passing it, as UISlider clamps its
670
+ * value and the thumb follows it.
671
+ */
672
+ function sliderCoastCurve({ from, to, velocity, lower, upper, spring: description = SLIDER_RELEASE_SPRING }) {
673
+ const spring = solveSpring(toSpring(description), {
674
+ from,
675
+ to,
676
+ velocity
677
+ });
678
+ const lo = Math.min(lower, upper);
679
+ const hi = Math.max(lower, upper);
680
+ const duration = Math.min(Math.max(spring.settleTime(.05), 1 / 120), 3);
681
+ return {
682
+ duration,
683
+ at: (t) => t >= duration ? to : Math.min(Math.max(spring.value(t), lo), hi),
684
+ velocity: (t) => {
685
+ if (t >= duration) return 0;
686
+ const value = spring.value(t);
687
+ return value <= lo || value >= hi ? 0 : spring.velocity(t);
688
+ }
689
+ };
690
+ }
691
+ /**
692
+ * Where the browser draws an element's translate on one axis in this frame,
693
+ * px: its computed style, which follows the running animation. Null when it
694
+ * draws none.
695
+ */
696
+ function drawnTranslate(element, axis) {
697
+ const translate = element.ownerDocument.defaultView?.getComputedStyle(element).translate ?? "";
698
+ if (translate === "" || translate === "none") return null;
699
+ const [x = "0", y = "0"] = translate.split(" ");
700
+ const px = Number.parseFloat(axis === "x" ? x : y);
701
+ return Number.isFinite(px) ? px : null;
702
+ }
703
+ /** The travel's geometry: the control's layout size along the axis, less one thumb. */
704
+ function measureTravel(control, isHorizontal, thumbSize) {
705
+ const style = control.ownerDocument.defaultView?.getComputedStyle(control);
706
+ const rect = control.getBoundingClientRect();
707
+ const used = (isHorizontal ? style?.width : style?.height) ?? "";
708
+ const length = used.endsWith("px") ? Number.parseFloat(used) : isHorizontal ? rect.width : rect.height;
709
+ return {
710
+ length,
711
+ travel: Math.max(0, length - thumbSize),
712
+ axis: isHorizontal ? "x" : "y",
713
+ sign: isHorizontal ? isRtlElement(control) ? -1 : 1 : -1,
714
+ rect
715
+ };
716
+ }
717
+ /**
718
+ * The parts that move with thumb `index`. Each has its translate as a
719
+ * function of the thumb's px along the travel (`p`), and that function's
720
+ * slope. `otherPx` is the other range thumb's px.
721
+ */
722
+ function travelParts(parts, { index, isRange, length, thumbSize, otherPx }) {
723
+ const inset = thumbSize / 2;
724
+ const maps = [];
725
+ const add = (element, at, slope) => {
726
+ if (element != null) maps.push({
727
+ element,
728
+ at,
729
+ slope
730
+ });
731
+ };
732
+ add(parts.thumbs[index], (p) => p, 1);
733
+ if (isRange) {
734
+ if (index === 0) {
735
+ add(parts.fillMover, (p) => inset + p, 1);
736
+ add(parts.fill, (p) => otherPx - p - length, -1);
737
+ } else add(parts.fill, (p) => p - otherPx - length, 1);
738
+ } else add(parts.fill, (p) => inset + p - length, 1);
739
+ return maps;
740
+ }
741
+ //#endregion
742
+ //#region src/Slider/sliderTouchMotion.ts
743
+ /** Frames of a coast before it reports values (the touch hand-off limit). */
744
+ const HAND_OFF_FRAMES = 3;
745
+ /** A coast shorter than this (px) and slower than 1 px/s is not played. */
746
+ const MIN_COAST_PX = .5;
747
+ var SliderTouchMotion = class {
748
+ model;
749
+ getParts;
750
+ interactions = /* @__PURE__ */ new Map();
751
+ animators = /* @__PURE__ */ new Map();
752
+ constructor(model, getParts) {
753
+ this.model = model;
754
+ this.getParts = getParts;
755
+ }
756
+ disposeAnimators() {
757
+ for (const animator of this.animators.values()) animator.dispose();
758
+ this.animators.clear();
759
+ }
760
+ animatorFor(element) {
761
+ let animator = this.animators.get(element);
762
+ if (animator == null) {
763
+ animator = createMotionEngine(element);
764
+ this.animators.set(element, animator);
765
+ }
766
+ return animator;
767
+ }
768
+ measure(parts) {
769
+ return measureTravel(parts.control, this.model.isHorizontal, this.model.thumbSize);
770
+ }
771
+ endOf(value) {
772
+ if (value <= this.model.min) return "min";
773
+ if (value >= this.model.max) return "max";
774
+ return null;
775
+ }
776
+ pxPerValue(geometry) {
777
+ const range = this.model.max - this.model.min;
778
+ return range > 0 ? geometry.travel / range : 0;
779
+ }
780
+ /** The parts that move with the interaction's thumb (see travelParts). */
781
+ partMaps(interaction) {
782
+ const parts = this.getParts();
783
+ if (parts == null) return [];
784
+ const { geometry, index } = interaction;
785
+ const { min, isRange, thumbSize } = this.model;
786
+ const other = this.model.values()[index === 0 ? 1 : 0] ?? min;
787
+ return travelParts(parts, {
788
+ index,
789
+ isRange,
790
+ length: geometry.length,
791
+ thumbSize,
792
+ otherPx: (other - min) * this.pxPerValue(geometry)
793
+ });
794
+ }
795
+ /**
796
+ * Writes the moving thumb's and the fill's positions for the
797
+ * interaction's value straight to their translates: one visual update per
798
+ * move. The parts go back to the stylesheet when the interaction ends
799
+ * (`handBack`).
800
+ */
801
+ place(interaction) {
802
+ const { geometry } = interaction;
803
+ const px = (interaction.value - this.model.min) * this.pxPerValue(geometry);
804
+ for (const { element, at } of this.partMaps(interaction)) this.animatorFor(element).set({ [geometry.axis]: geometry.sign * at(px) });
805
+ }
806
+ /**
807
+ * After the slider shows an ended interaction's final value, the thumb and
808
+ * the fill go back to the positions slider.css gives them. Parts that a
809
+ * coast of another thumb still drives stay with it.
810
+ */
811
+ handBack() {
812
+ for (const [element, animator] of this.animators) {
813
+ if ([...this.interactions.values()].some((interaction) => (interaction.coast != null || !interaction.released) && this.partsOf(interaction).has(element))) continue;
814
+ animator.set({
815
+ x: 0,
816
+ y: 0
817
+ });
818
+ element.style.removeProperty("translate");
819
+ if (element.style.getPropertyValue("opacity") !== "") {
820
+ animator.set({ opacity: 1 });
821
+ element.style.removeProperty("opacity");
822
+ }
823
+ }
824
+ }
825
+ partsOf(interaction) {
826
+ const parts = this.getParts();
827
+ const set = /* @__PURE__ */ new Set();
828
+ if (parts == null) return set;
829
+ for (const element of [
830
+ parts.thumbs[interaction.index],
831
+ parts.fillMover,
832
+ parts.fill
833
+ ]) if (element != null) set.add(element);
834
+ return set;
835
+ }
836
+ /**
837
+ * Plays the coast on the thumb and the fill parts, on one clock that
838
+ * started at `at`. A re-mapped coast plays on from where its curve is.
839
+ */
840
+ playCoast(interaction, curve, touchRelease, at) {
841
+ const { axis, sign } = interaction.geometry;
842
+ const handles = [];
843
+ for (const { element, at: position, slope } of this.partMaps(interaction)) {
844
+ const partCurve = {
845
+ duration: curve.duration,
846
+ at: (t) => sign * position(curve.at(t)),
847
+ velocity: (t) => sign * slope * curve.velocity(t)
848
+ };
849
+ const animator = this.animatorFor(element);
850
+ animator.set({ [axis]: partCurve.at(0) });
851
+ handles.push(touchRelease ? animator.decay({ [axis]: partCurve }, {
852
+ at,
853
+ touchRelease
854
+ }) : animator.play({ [axis]: partCurve }, { at }));
855
+ }
856
+ return handles;
857
+ }
858
+ /**
859
+ * Stops a coast where the browser draws the thumb in this frame. Returns
860
+ * the value there, or null when the travel has no length. The animator's
861
+ * own reading can run a frame ahead of or behind what is drawn, and a
862
+ * finger stops what it sees.
863
+ */
864
+ stopCoast(interaction) {
865
+ const coast = interaction.coast;
866
+ if (coast == null) return null;
867
+ interaction.coast = null;
868
+ this.getParts()?.control.ownerDocument.defaultView?.cancelAnimationFrame(coast.raf);
869
+ const { geometry, index } = interaction;
870
+ const { min, max } = this.model;
871
+ const thumb = this.getParts()?.thumbs[index];
872
+ const drawn = thumb == null ? null : drawnTranslate(thumb, geometry.axis);
873
+ const px = Math.abs(drawn ?? coast.handles[0]?.value(geometry.axis) ?? 0);
874
+ for (const handle of coast.handles) handle.stop();
875
+ const range = max - min;
876
+ return range > 0 && geometry.travel > 0 ? this.model.constrain(index, min + px / geometry.travel * range) : null;
877
+ }
878
+ /**
879
+ * Springs the interaction's thumb from its value to `target`, on the
880
+ * compositor and clamped, starting at `velocityPx` (px/s along the
881
+ * travel). Values report from the coast's fourth frame, and the
882
+ * interaction ends on its last. `touchRelease`: a finger's release
883
+ * started it, so the coast continues the throw under Reduce Motion too.
884
+ */
885
+ coastTo(interaction, target, velocityPx, touchRelease) {
886
+ const { geometry, index } = interaction;
887
+ const { min, max } = this.model;
888
+ const pxPerValue = this.pxPerValue(geometry);
889
+ const fromPx = (interaction.value - min) * pxPerValue;
890
+ const toPx = (target - min) * pxPerValue;
891
+ const [lowerValue, upperValue] = this.model.bounds(index);
892
+ const curve = sliderCoastCurve({
893
+ from: fromPx,
894
+ to: toPx,
895
+ velocity: velocityPx,
896
+ lower: (lowerValue - min) * pxPerValue,
897
+ upper: (upperValue - min) * pxPerValue,
898
+ spring: resolveMotion(this.getParts()?.control, SLIDER_RELEASE_SPRING)
899
+ });
900
+ const moves = Math.abs(toPx - fromPx) >= MIN_COAST_PX || Math.abs(curve.at(.05) - fromPx) >= MIN_COAST_PX;
901
+ const at = performance.now();
902
+ const handles = moves ? this.playCoast(interaction, curve, touchRelease, at) : [];
903
+ if (handles.length === 0) {
904
+ this.finish(interaction, true, target);
905
+ return;
906
+ }
907
+ const coast = {
908
+ handles,
909
+ target,
910
+ frames: 0,
911
+ raf: 0,
912
+ curve,
913
+ travel: geometry.travel,
914
+ at,
915
+ touchRelease
916
+ };
917
+ interaction.coast = coast;
918
+ const view = this.getParts()?.control.ownerDocument.defaultView;
919
+ const range = max - min;
920
+ const step = () => {
921
+ if (interaction.coast !== coast) return;
922
+ coast.frames += 1;
923
+ if (coast.frames > HAND_OFF_FRAMES) {
924
+ const { axis, travel } = interaction.geometry;
925
+ const px = Math.abs(coast.handles[0]?.value(axis) ?? 0);
926
+ const value = range > 0 && travel > 0 ? min + px / travel * range : interaction.value;
927
+ this.record(interaction, this.model.constrain(index, value));
928
+ }
929
+ coast.raf = view?.requestAnimationFrame(step) ?? 0;
930
+ };
931
+ coast.raf = view?.requestAnimationFrame(step) ?? 0;
932
+ this.endCoastWithThumb(interaction, coast);
933
+ }
934
+ /** Ends the coast when its thumb's motion finishes, not when it stops. */
935
+ endCoastWithThumb(interaction, coast) {
936
+ const thumbHandle = coast.handles[0];
937
+ thumbHandle?.finished.then((finished) => {
938
+ if (interaction.coast !== coast || coast.handles[0] !== thumbHandle || !finished) return;
939
+ this.getParts()?.control.ownerDocument.defaultView?.cancelAnimationFrame(coast.raf);
940
+ interaction.coast = null;
941
+ this.finish(interaction, true, coast.target);
942
+ });
943
+ }
944
+ /**
945
+ * After the track's length changed, every live interaction measures it
946
+ * again. A drag writes its parts for the new length, and a coast plays on
947
+ * from where its curve is now, scaled to the new travel.
948
+ */
949
+ followTrackLength() {
950
+ const parts = this.getParts();
951
+ if (parts == null || this.interactions.size === 0) return;
952
+ for (const interaction of this.interactions.values()) {
953
+ const geometry = this.measure(parts);
954
+ if (geometry.length === interaction.geometry.length) continue;
955
+ interaction.geometry = geometry;
956
+ const { coast } = interaction;
957
+ if (coast != null) {
958
+ const scale = coast.travel > 0 ? geometry.travel / coast.travel : 1;
959
+ const { curve } = coast;
960
+ coast.curve = {
961
+ duration: curve.duration,
962
+ at: (t) => curve.at(t) * scale,
963
+ velocity: (t) => curve.velocity(t) * scale
964
+ };
965
+ coast.travel = geometry.travel;
966
+ coast.handles = this.playCoast(interaction, coast.curve, coast.touchRelease, coast.at);
967
+ this.endCoastWithThumb(interaction, coast);
968
+ } else if (!interaction.released) this.place(interaction);
969
+ }
970
+ }
971
+ /** The held thumb grows to UISlider's lens. */
972
+ lift(index) {
973
+ const thumb = this.getParts()?.thumbs[index];
974
+ if (thumb == null) return;
975
+ const animator = this.animatorFor(thumb);
976
+ if (animator.reducedMotion() !== "off") return;
977
+ animator.animate({ scale: slider.liftScale }, { spring: resolveMotion(this.getParts()?.control, SLIDER_LIFT_SPRING) });
978
+ }
979
+ drop(index) {
980
+ const thumb = this.getParts()?.thumbs[index];
981
+ if (thumb == null) return;
982
+ const animator = this.animators.get(thumb);
983
+ if (animator == null || animator.get("scale") === 1) return;
984
+ animator.animate({ scale: 1 }, { spring: resolveMotion(this.getParts()?.control, SLIDER_DROP_SPRING) });
985
+ }
986
+ };
987
+ //#endregion
988
+ //#region src/Slider/sliderTouchController.ts
989
+ var SliderTouchController = class extends SliderTouchMotion {
990
+ /** The slider unmounted: a cancel reports nothing then. */
991
+ disposed = false;
992
+ /** Thumbs whose current touch is a mouse: its highlight never lifts them. */
993
+ mouseOwners = /* @__PURE__ */ new Set();
994
+ /** The track's tap (see handleTrackTap). Null while detached. */
995
+ trackTap = null;
996
+ /**
997
+ * Attaches the recognizers to the thumbs for every pointer. Under a
998
+ * coarse primary pointer each thumb's `::before` is its touch target.
999
+ */
1000
+ attach() {
1001
+ this.disposed = false;
1002
+ const parts = this.getParts();
1003
+ const targets = parts?.thumbs ?? [];
1004
+ if (parts == null || targets.length === 0) return () => {};
1005
+ registerSpringsTable();
1006
+ const host = getGestureHost(parts.control.ownerDocument);
1007
+ const detachers = [];
1008
+ targets.forEach((hit, owner) => {
1009
+ const tracker = createPressTracker({
1010
+ getBounds: () => this.getParts()?.control.getBoundingClientRect() ?? null,
1011
+ view: hit,
1012
+ highlightDelay: PRESS_PROFILES.control.highlightDelay,
1013
+ quickTapFlash: PRESS_PROFILES.control.quickTapFlash,
1014
+ onControlEvent: (event, touch) => this.handleControlEvent(owner, event, touch.pointerType),
1015
+ onHighlightChange: (isHighlighted) => this.handleHighlight(owner, isHighlighted),
1016
+ vetoesAncestorRecognizer: (recognizer) => this.vetoes(recognizer),
1017
+ isEnabled: () => !this.model.isDisabled
1018
+ });
1019
+ const pan = new PanGestureRecognizer({
1020
+ name: `slider-thumb-${owner}`,
1021
+ direction: this.model.isHorizontal ? "horizontal" : "vertical",
1022
+ maximumNumberOfTouches: 1,
1023
+ cancelsTouchesInView: false,
1024
+ allowedPointerTypes: ["touch", "pen"],
1025
+ selectionLock: lockSelection
1026
+ });
1027
+ const mousePan = new PanGestureRecognizer({
1028
+ name: `slider-thumb-${owner}-mouse`,
1029
+ maximumNumberOfTouches: 1,
1030
+ cancelsTouchesInView: false,
1031
+ allowedPointerTypes: ["mouse"]
1032
+ });
1033
+ detachers.push(host.attachConsumer(hit, tracker), host.attach(hit, pan), host.attach(hit, mousePan), pan.addListener((current) => this.handlePan(owner, current)), mousePan.addListener((current) => this.handlePan(owner, current)), () => tracker.dispose());
1034
+ });
1035
+ const tap = new TapGestureRecognizer({
1036
+ name: "slider-track-tap",
1037
+ allowedPointerTypes: ["touch", "pen"],
1038
+ cancelsTouchesInView: false,
1039
+ allowableMovement: UIKIT_PAN.hysteresis.value
1040
+ });
1041
+ this.trackTap = tap;
1042
+ detachers.push(host.attach(parts.control, tap), tap.addListener((current) => {
1043
+ if (current.state === "ended") this.handleTrackTap(current);
1044
+ }), () => {
1045
+ this.trackTap = null;
1046
+ }, observeResize(parts.control, () => this.followTrackLength()));
1047
+ return () => {
1048
+ const ended = this.endSilently();
1049
+ for (const detach of detachers) detach();
1050
+ this.cancelLater(ended);
1051
+ };
1052
+ }
1053
+ /** Stops every interaction and animation without reporting (unmount). */
1054
+ dispose() {
1055
+ this.disposed = true;
1056
+ this.endSilently();
1057
+ this.disposeAnimators();
1058
+ }
1059
+ /**
1060
+ * Ends every live interaction without a word to the owner, and returns
1061
+ * them. A coast stops where it is drawn, and the parts return to the
1062
+ * stylesheet at the value the slider last showed.
1063
+ */
1064
+ endSilently() {
1065
+ if (this.interactions.size === 0) return [];
1066
+ const ended = [...this.interactions.values()];
1067
+ const view = this.getParts()?.control.ownerDocument.defaultView;
1068
+ for (const interaction of ended) {
1069
+ const coast = interaction.coast;
1070
+ if (coast != null) {
1071
+ interaction.coast = null;
1072
+ view?.cancelAnimationFrame(coast.raf);
1073
+ for (const handle of coast.handles) handle.stop();
1074
+ }
1075
+ interaction.released = true;
1076
+ }
1077
+ this.interactions.clear();
1078
+ this.mouseOwners.clear();
1079
+ this.handBack();
1080
+ return ended;
1081
+ }
1082
+ /**
1083
+ * Ends the interactions a detach cancelled while the slider stays mounted,
1084
+ * as when it is disabled mid-drag. Each releases its pressed paint; if any
1085
+ * changed the value, `changeEnd` reports once. An unmount in the same tick
1086
+ * drops it.
1087
+ */
1088
+ cancelLater(ended) {
1089
+ if (ended.length === 0) return;
1090
+ queueMicrotask(() => {
1091
+ if (this.disposed) return;
1092
+ for (const interaction of ended) this.model.commit(interaction.index, null);
1093
+ if (ended.some((interaction) => interaction.changed)) this.model.reportEnd();
1094
+ });
1095
+ }
1096
+ handleControlEvent(owner, event, pointerType) {
1097
+ if (event === "touchDown") {
1098
+ const isMouse = pointerType === "mouse";
1099
+ if (isMouse) this.mouseOwners.add(owner);
1100
+ else this.mouseOwners.delete(owner);
1101
+ this.begin(owner, isMouse, pointerType === "touch");
1102
+ return;
1103
+ }
1104
+ const interaction = this.interactions.get(owner);
1105
+ if (interaction == null) return;
1106
+ switch (event) {
1107
+ case "touchDragInside":
1108
+ case "touchDragEnter":
1109
+ interaction.isInside = true;
1110
+ return;
1111
+ case "touchDragOutside":
1112
+ case "touchDragExit":
1113
+ interaction.isInside = false;
1114
+ return;
1115
+ case "touchUpInside":
1116
+ case "touchUpOutside":
1117
+ interaction.isInside = event === "touchUpInside";
1118
+ if (interaction.startValue == null) this.finish(interaction, true);
1119
+ return;
1120
+ case "touchCancel": if (interaction.startValue == null) this.finish(interaction, false);
1121
+ }
1122
+ }
1123
+ handleHighlight(owner, isHighlighted) {
1124
+ if (this.mouseOwners.has(owner)) return;
1125
+ const interaction = this.interactions.get(owner);
1126
+ const index = interaction?.index ?? owner;
1127
+ if (isHighlighted && interaction != null && !interaction.released) this.lift(index);
1128
+ else if (!isHighlighted && interaction == null) this.drop(index);
1129
+ }
1130
+ handlePan(owner, pan) {
1131
+ const interaction = this.interactions.get(owner);
1132
+ if (interaction == null || interaction.released) return;
1133
+ switch (pan.state) {
1134
+ case "began": {
1135
+ interaction.startValue = interaction.value;
1136
+ const total = pan.totalTranslation();
1137
+ const along = total[interaction.geometry.axis];
1138
+ const distance = Math.hypot(total.x, total.y);
1139
+ interaction.beganOffset = interaction.isMouse ? distance > 0 ? pan.hysteresis * along / distance : 0 : (along < 0 ? -1 : 1) * pan.hysteresis;
1140
+ if (!interaction.isMouse) this.lift(interaction.index);
1141
+ this.track(interaction, pan);
1142
+ return;
1143
+ }
1144
+ case "changed":
1145
+ this.track(interaction, pan);
1146
+ return;
1147
+ case "ended":
1148
+ interaction.released = true;
1149
+ this.release(interaction, pan);
1150
+ return;
1151
+ case "cancelled":
1152
+ interaction.released = true;
1153
+ this.finish(interaction, true);
1154
+ }
1155
+ }
1156
+ /** UISlider's veto: an ancestor's pan or swipe along the travel. */
1157
+ vetoes(recognizer) {
1158
+ if (recognizer === this.trackTap) return true;
1159
+ const horizontal = this.model.isHorizontal;
1160
+ if (recognizer.kind === "swipe") return recognizer.directions.some((direction) => horizontal ? direction === "left" || direction === "right" : direction === "up" || direction === "down");
1161
+ if (recognizer.kind === "pan" || recognizer.kind === "screenEdgePan") {
1162
+ const { x, y } = recognizer.translation();
1163
+ return horizontal ? Math.abs(x) >= Math.abs(y) : Math.abs(y) >= Math.abs(x);
1164
+ }
1165
+ return false;
1166
+ }
1167
+ begin(owner, isMouse, coasts) {
1168
+ const parts = this.getParts();
1169
+ if (parts == null || this.model.isDisabled) return;
1170
+ for (const other of [...this.interactions.values()]) if (other.coast != null) this.finish(other, true, this.stopCoast(other));
1171
+ const values = this.model.values();
1172
+ const value = values[owner] ?? this.model.min;
1173
+ this.interactions.set(owner, this.interaction(owner, value, {
1174
+ geometry: this.measure(parts),
1175
+ isMouse,
1176
+ coasts,
1177
+ beganCoincident: this.model.isRange && values[0] === values[1]
1178
+ }));
1179
+ this.model.press(owner);
1180
+ }
1181
+ interaction(index, value, rest) {
1182
+ return {
1183
+ owner: index,
1184
+ index,
1185
+ startValue: null,
1186
+ beganOffset: 0,
1187
+ value,
1188
+ isInside: true,
1189
+ atEnd: this.endOf(value),
1190
+ changed: false,
1191
+ coast: null,
1192
+ released: false,
1193
+ ...rest
1194
+ };
1195
+ }
1196
+ track(interaction, pan) {
1197
+ const { geometry } = interaction;
1198
+ const { min, max, isRange } = this.model;
1199
+ if (geometry.length <= 0) return;
1200
+ const translation = (pan.totalTranslation()[geometry.axis] - interaction.beganOffset) * geometry.sign;
1201
+ const startValue = interaction.startValue ?? interaction.value;
1202
+ const raw = startValue + translation / geometry.length * (max - min) * slider.trackingGain;
1203
+ let from;
1204
+ if (isRange && interaction.beganCoincident && raw !== startValue) {
1205
+ const values = this.model.values();
1206
+ const current = interaction.index;
1207
+ const index = values[0] === values[1] && !interaction.changed ? raw < startValue ? 0 : 1 : current === 1 && raw < (values[0] ?? raw) ? 0 : current === 0 && raw > (values[1] ?? raw) ? 1 : current;
1208
+ if (index !== current) {
1209
+ if (interaction.changed) {
1210
+ const against = this.model.constrain(current, values[index] ?? raw);
1211
+ interaction.value = against;
1212
+ this.place(interaction);
1213
+ const next = [...values];
1214
+ next[current] = against;
1215
+ from = next;
1216
+ }
1217
+ this.drop(current);
1218
+ interaction.index = index;
1219
+ interaction.value = values[index] ?? interaction.value;
1220
+ if (!interaction.isMouse) this.lift(index);
1221
+ this.model.press(index);
1222
+ }
1223
+ }
1224
+ this.record(interaction, this.model.constrain(interaction.index, raw), { from });
1225
+ this.place(interaction);
1226
+ }
1227
+ /**
1228
+ * Records a new value and plays the end haptic on entering an end. Reports
1229
+ * it unless the interaction's end commits it. Returns whether it changed.
1230
+ */
1231
+ record(interaction, value, { commits = false, from } = {}) {
1232
+ if (value === interaction.value) return false;
1233
+ interaction.value = value;
1234
+ interaction.changed = true;
1235
+ if (!commits) this.model.change(interaction.index, value, from);
1236
+ const end = this.endOf(value);
1237
+ if (end != null && end !== interaction.atEnd && !interaction.isMouse && interaction.startValue != null) playHaptic(slider.endHaptic);
1238
+ interaction.atEnd = end;
1239
+ return true;
1240
+ }
1241
+ release(interaction, pan) {
1242
+ if (!interaction.coasts) {
1243
+ if (!interaction.isMouse) this.drop(interaction.index);
1244
+ this.model.press(null);
1245
+ this.finish(interaction, true);
1246
+ return;
1247
+ }
1248
+ const { geometry, index } = interaction;
1249
+ const range = this.model.max - this.model.min;
1250
+ this.drop(index);
1251
+ this.model.press(null);
1252
+ const location = pan.location();
1253
+ const expansion = UIKIT_CONTROL.trackingExpansion.value;
1254
+ const { rect } = geometry;
1255
+ const inside = location.x >= rect.left - expansion && location.x <= rect.right + expansion && location.y >= rect.top - expansion && location.y <= rect.bottom + expansion;
1256
+ interaction.isInside = inside;
1257
+ const velocity = pan.velocity()[geometry.axis] * geometry.sign;
1258
+ const projected = inside ? slider.releaseProjectionShare * projectDistance(velocity, slider.releaseProjectionRate) : 0;
1259
+ const valuePerPx = geometry.length > 0 ? range * slider.trackingGain / geometry.length : 0;
1260
+ const target = this.model.constrain(index, interaction.value + projected * valuePerPx);
1261
+ this.coastTo(interaction, target, velocity * valuePerPx * this.pxPerValue(geometry), true);
1262
+ }
1263
+ /**
1264
+ * A tap on the track: the thumb the tap's value picks springs there, on
1265
+ * the release spring from rest. It reports as a coast does, and
1266
+ * `changeEnd` follows. A tap on the thumb's own value changes nothing.
1267
+ */
1268
+ handleTrackTap(tap) {
1269
+ const parts = this.getParts();
1270
+ if (parts == null || this.model.isDisabled || this.interactions.size > 0) return;
1271
+ const { x, y } = tap.location();
1272
+ const raw = this.model.valueAt(x, y);
1273
+ const index = this.model.thumbFor(raw);
1274
+ const target = this.model.constrain(index, raw);
1275
+ const value = this.model.values()[index] ?? this.model.min;
1276
+ if (target === value) return;
1277
+ const interaction = this.interaction(index, value, {
1278
+ geometry: this.measure(parts),
1279
+ isMouse: false,
1280
+ coasts: false,
1281
+ beganCoincident: false,
1282
+ released: true
1283
+ });
1284
+ this.interactions.set(index, interaction);
1285
+ const thumb = parts.thumbs[index];
1286
+ if (thumb != null && this.animatorFor(thumb).reducedMotion() !== "off") {
1287
+ this.finish(interaction, true, target);
1288
+ return;
1289
+ }
1290
+ this.coastTo(interaction, target, 0, false);
1291
+ }
1292
+ /**
1293
+ * Ends an interaction from the handler that ends it: the lift, the cancel
1294
+ * or the coast's last frame. The slider shows the last value, and the
1295
+ * parts return to the stylesheet. `changeEnd` then reports, unless the
1296
+ * browser took the touch before any drag (`report` false).
1297
+ */
1298
+ finish(interaction, report, finalValue = null) {
1299
+ if (this.interactions.get(interaction.owner) !== interaction) return;
1300
+ this.interactions.delete(interaction.owner);
1301
+ if (!interaction.released) this.drop(interaction.index);
1302
+ interaction.released = true;
1303
+ if (finalValue != null) this.record(interaction, finalValue, { commits: true });
1304
+ this.model.commit(interaction.index, finalValue);
1305
+ this.handBack();
1306
+ if (report) this.model.reportEnd();
1307
+ }
1308
+ };
1309
+ //#endregion
1310
+ //#region src/Slider/useSliderTouch.ts
1311
+ /** The controller's view of the slider: every read is fresh. */
1312
+ function touchModel({ props, control }) {
1313
+ return {
1314
+ get min() {
1315
+ return control.min.value;
1316
+ },
1317
+ get max() {
1318
+ return control.max.value;
1319
+ },
1320
+ get isRange() {
1321
+ return control.values.value.length === 2;
1322
+ },
1323
+ get isHorizontal() {
1324
+ return props.orientation !== "vertical";
1325
+ },
1326
+ get isDisabled() {
1327
+ return !!props.isDisabled;
1328
+ },
1329
+ thumbSize: 20,
1330
+ values: control.current,
1331
+ constrain: control.constrain,
1332
+ bounds: control.currentBounds,
1333
+ change: (index, value, from) => control.setValue(index, value, from),
1334
+ press: control.hold,
1335
+ commit: (index, value) => {
1336
+ if (value !== null) control.setValue(index, value);
1337
+ control.hold(null);
1338
+ },
1339
+ reportEnd: control.reportEnd,
1340
+ valueAt: control.valueAt,
1341
+ thumbFor: control.thumbFor
1342
+ };
1343
+ }
1344
+ function useSliderTouch(options) {
1345
+ const controller = new SliderTouchController(touchModel(options), options.getParts);
1346
+ const { props, control } = options;
1347
+ onMounted(() => {
1348
+ watch([
1349
+ () => !props.isDisabled,
1350
+ () => control.values.value.length,
1351
+ () => props.orientation
1352
+ ], ([isEnabled], _, onCleanup) => {
1353
+ if (isEnabled) onCleanup(controller.attach());
1354
+ }, {
1355
+ immediate: true,
1356
+ flush: "post"
1357
+ });
1358
+ });
1359
+ onBeforeUnmount(() => controller.dispose());
1360
+ }
1361
+ //#endregion
1362
+ //#region src/Slider/Slider.vue
1363
+ const _hoisted_1 = { class: "astryx-slider-row" };
1364
+ const _hoisted_2 = [
1365
+ "name",
1366
+ "value",
1367
+ "disabled",
1368
+ "form"
1369
+ ];
1370
+ const _hoisted_3 = [
1371
+ "data-orientation",
1372
+ "data-disabled",
1373
+ "data-range",
1374
+ "role",
1375
+ "aria-labelledby"
1376
+ ];
1377
+ const _hoisted_4 = { class: "astryx-slider-travel" };
1378
+ const _hoisted_5 = ["data-mark-value", "data-filled"];
1379
+ const _hoisted_6 = ["data-mark-value"];
1380
+ const _hoisted_7 = {
1381
+ key: 0,
1382
+ class: "astryx-slider-value",
1383
+ "aria-hidden": "true"
1384
+ };
1385
+ const _sfc_main = /*@__PURE__*/ defineComponent({
1386
+ name: "AstryxSlider",
1387
+ inheritAttrs: false,
1388
+ __name: "Slider",
1389
+ props: /*@__PURE__*/ mergeModels({
1390
+ id: {},
1391
+ min: { default: 0 },
1392
+ max: { default: 100 },
1393
+ step: { default: 1 },
1394
+ minStepsBetweenThumbs: {},
1395
+ orientation: { default: "horizontal" },
1396
+ valueDisplay: { default: "tooltip" },
1397
+ formatValue: {},
1398
+ marks: {},
1399
+ width: {},
1400
+ htmlName: {},
1401
+ form: {},
1402
+ status: {},
1403
+ disabledMessage: {},
1404
+ minLabel: {},
1405
+ maxLabel: {},
1406
+ label: {},
1407
+ isLabelHidden: { type: Boolean },
1408
+ isDisabled: { type: Boolean },
1409
+ isOptional: { type: Boolean },
1410
+ isRequired: { type: Boolean },
1411
+ description: {},
1412
+ labelIcon: {},
1413
+ labelTooltip: {},
1414
+ optionalLabel: {},
1415
+ requiredLabel: {},
1416
+ targetClass: {},
1417
+ containerClass: { type: [
1418
+ Boolean,
1419
+ null,
1420
+ String,
1421
+ Object,
1422
+ Array
1423
+ ] },
1424
+ containerStyle: { type: [
1425
+ Boolean,
1426
+ null,
1427
+ String,
1428
+ Object,
1429
+ Array
1430
+ ] },
1431
+ controlClass: { type: [
1432
+ Boolean,
1433
+ null,
1434
+ String,
1435
+ Object,
1436
+ Array
1437
+ ] },
1438
+ controlStyle: { type: [
1439
+ Boolean,
1440
+ null,
1441
+ String,
1442
+ Object,
1443
+ Array
1444
+ ] }
1445
+ }, {
1446
+ "modelValue": { required: true },
1447
+ "modelModifiers": {}
1448
+ }),
1449
+ emits: /*@__PURE__*/ mergeModels(["change", "changeEnd"], ["update:modelValue"]),
1450
+ setup(__props, { expose: __expose, emit: __emit }) {
1451
+ const props = __props;
1452
+ const emit = __emit;
1453
+ const model = useModel(__props, "modelValue");
1454
+ const attrs = useAttrs();
1455
+ const messages = useComponentMessages({ slider: sliderMessages });
1456
+ const minName = computed(() => props.minLabel ?? messages.value.slider.minimumThumb);
1457
+ const maxName = computed(() => props.maxLabel ?? messages.value.slider.maximumThumb);
1458
+ const requiredName = computed(() => props.requiredLabel ?? messages.value.slider.required);
1459
+ const press = usePressFeedback({ hasOverlay: false });
1460
+ const parts = useFieldPartStyling({
1461
+ component: "Slider",
1462
+ props,
1463
+ attrs,
1464
+ reservedAttrs: [
1465
+ "aria-labelledby",
1466
+ "aria-describedby",
1467
+ "onPointerdown",
1468
+ "onPointermove",
1469
+ "onPointerup",
1470
+ "onPointercancel",
1471
+ "onPointerDown",
1472
+ "onPointerMove",
1473
+ "onPointerUp",
1474
+ "onPointerCancel"
1475
+ ]
1476
+ });
1477
+ const track = useTemplateRef("track");
1478
+ const fillMover = useTemplateRef("fillMover");
1479
+ const fill = useTemplateRef("fill");
1480
+ const generatedId = `astryx-slider-${useId()}`;
1481
+ const inputId = computed(() => props.id ?? generatedId);
1482
+ const control = useSlider({
1483
+ props,
1484
+ model: () => model.value,
1485
+ track,
1486
+ change: (value) => {
1487
+ model.value = value;
1488
+ emit("change", value);
1489
+ },
1490
+ end: (value) => emit("changeEnd", value)
1491
+ });
1492
+ useSliderTouch({
1493
+ props,
1494
+ control,
1495
+ getParts: () => track.value == null ? null : {
1496
+ control: track.value,
1497
+ thumbs: [...track.value.querySelectorAll("[role=\"slider\"]")],
1498
+ fillMover: fillMover.value,
1499
+ fill: fill.value
1500
+ }
1501
+ });
1502
+ const { min, max, values, dragging } = control;
1503
+ const isRange = computed(() => values.value.length === 2);
1504
+ const showsDisabledMessage = computed(() => !!props.isDisabled && !!props.disabledMessage?.trim());
1505
+ const tooltip = useButtonTooltip(showsDisabledMessage);
1506
+ const ariaRequired = useAriaRequired(props);
1507
+ const required = computed(() => ariaRequired.value === true);
1508
+ const marks = computed(() => props.marks?.filter((mark) => Number.isFinite(mark.value) && mark.value >= min.value && mark.value <= max.value) ?? []);
1509
+ const hasMarkLabels = computed(() => marks.value.some((mark) => mark.label));
1510
+ const format = (value) => props.formatValue?.(value) ?? String(value);
1511
+ const displayText = computed(() => values.value.map(format).join(" – "));
1512
+ const fillStyle = computed(() => ({
1513
+ "--_slider-fill-start": isRange.value ? percent(values.value[0], min.value, max.value) / 100 : 0,
1514
+ "--_slider-fill-end": percent(values.value.at(-1), min.value, max.value) / 100
1515
+ }));
1516
+ function describedBy(fieldIds) {
1517
+ return [
1518
+ attrs["aria-describedby"],
1519
+ fieldIds,
1520
+ required.value ? `${inputId.value}-required` : void 0,
1521
+ showsDisabledMessage.value ? `${inputId.value}-disabled` : void 0
1522
+ ].filter(Boolean).join(" ") || void 0;
1523
+ }
1524
+ function markStyle(value) {
1525
+ const offset = position(percent(value, min.value, max.value));
1526
+ return props.orientation === "horizontal" ? { insetInlineStart: offset } : { bottom: offset };
1527
+ }
1528
+ function isFilled(value) {
1529
+ return value <= values.value.at(-1) && (!isRange.value || value >= values.value[0]);
1530
+ }
1531
+ function callConsumerPointer(event) {
1532
+ if (props.isDisabled) return;
1533
+ for (const name of {
1534
+ pointerdown: ["onPointerdown", "onPointerDown"],
1535
+ pointermove: ["onPointermove", "onPointerMove"],
1536
+ pointerup: ["onPointerup", "onPointerUp"],
1537
+ pointercancel: ["onPointercancel", "onPointerCancel"]
1538
+ }[event.type] ?? []) {
1539
+ const handler = attrs[name];
1540
+ if (typeof handler === "function") handler(event);
1541
+ }
1542
+ }
1543
+ function onPointerDown(event) {
1544
+ control.pointerDown(event);
1545
+ callConsumerPointer(event);
1546
+ }
1547
+ function onPointerMove(event) {
1548
+ control.pointerMove(event);
1549
+ callConsumerPointer(event);
1550
+ }
1551
+ function onPointerEnd(event) {
1552
+ control.pointerEnd(event);
1553
+ callConsumerPointer(event);
1554
+ }
1555
+ const shellStyle = computed(() => [attrs.style, parts.containerStyle.value]);
1556
+ const thumbAttrs = computed(() => isRange.value ? {} : withholdCallerHandlers(parts.forwardedAttrs(), !!props.isDisabled));
1557
+ const trackAttrs = computed(() => ({
1558
+ ...isRange.value ? withholdCallerHandlers(parts.forwardedAttrs(), !!props.isDisabled) : {},
1559
+ ...props.isDisabled ? {} : press.pressableProps
1560
+ }));
1561
+ function focus(index = 0, options) {
1562
+ track.value?.querySelectorAll("[role=\"slider\"]")[index]?.focus(options);
1563
+ }
1564
+ function blur() {
1565
+ const active = track.value?.ownerDocument.activeElement;
1566
+ if (active instanceof HTMLElement && track.value?.contains(active)) active.blur();
1567
+ }
1568
+ __expose({
1569
+ element: computed(() => {
1570
+ if (isRange.value) return track.value;
1571
+ return track.value?.querySelector("[role=\"slider\"]") ?? null;
1572
+ }),
1573
+ focus,
1574
+ blur
1575
+ });
1576
+ return (_ctx, _cache) => {
1577
+ return openBlock(), createElementBlock(Fragment, null, [createVNode(_sfc_main$4, {
1578
+ class: normalizeClass(["astryx-slider", [unref(attrs).class, unref(parts).containerClass.value]]),
1579
+ style: normalizeStyle(shellStyle.value),
1580
+ "data-orientation": __props.orientation,
1581
+ "data-disabled": __props.isDisabled || void 0,
1582
+ "data-mark-labels": hasMarkLabels.value || void 0,
1583
+ label: __props.label,
1584
+ "input-id": inputId.value,
1585
+ "is-group-label": "",
1586
+ description: __props.description,
1587
+ width: __props.width,
1588
+ "is-label-hidden": __props.isLabelHidden,
1589
+ "is-disabled": __props.isDisabled,
1590
+ "is-optional": __props.isOptional,
1591
+ "is-required": __props.isRequired,
1592
+ "label-icon": __props.labelIcon,
1593
+ "label-tooltip": __props.labelTooltip,
1594
+ "optional-label": __props.optionalLabel,
1595
+ "required-label": __props.requiredLabel,
1596
+ status: __props.status,
1597
+ "status-variant": "detached"
1598
+ }, createSlots({
1599
+ default: withCtx((field) => [
1600
+ createElementVNode("div", _hoisted_1, [
1601
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(values), (value, index) => {
1602
+ return openBlock(), createElementBlock("input", {
1603
+ key: index,
1604
+ type: "hidden",
1605
+ name: __props.htmlName,
1606
+ value,
1607
+ disabled: __props.isDisabled,
1608
+ form: __props.form
1609
+ }, null, 8, _hoisted_2);
1610
+ }), 128)),
1611
+ createElementVNode("div", mergeProps({
1612
+ ref_key: "track",
1613
+ ref: track
1614
+ }, trackAttrs.value, {
1615
+ class: ["astryx-slider-control", __props.controlClass],
1616
+ style: __props.controlStyle,
1617
+ "data-orientation": __props.orientation,
1618
+ "data-disabled": __props.isDisabled || void 0,
1619
+ "data-range": isRange.value || void 0,
1620
+ role: isRange.value ? "group" : void 0,
1621
+ "aria-labelledby": isRange.value ? [field.labelId, unref(attrs)["aria-labelledby"]].filter(Boolean).join(" ") : void 0,
1622
+ onPointerdown: onPointerDown,
1623
+ onPointermove: onPointerMove,
1624
+ onPointerup: onPointerEnd,
1625
+ onPointercancel: onPointerEnd,
1626
+ onLostpointercapture: onPointerEnd,
1627
+ onPointerenter: _cache[1] || (_cache[1] = (...args) => unref(tooltip).onPointerEnter && unref(tooltip).onPointerEnter(...args)),
1628
+ onPointerleave: _cache[2] || (_cache[2] = (...args) => unref(tooltip).onPointerLeave && unref(tooltip).onPointerLeave(...args)),
1629
+ onFocusin: _cache[3] || (_cache[3] = (...args) => unref(tooltip).onTooltipPointerEnter && unref(tooltip).onTooltipPointerEnter(...args)),
1630
+ onFocusout: _cache[4] || (_cache[4] = (...args) => unref(tooltip).onBlur && unref(tooltip).onBlur(...args)),
1631
+ onKeydown: _cache[5] || (_cache[5] = withKeys((...args) => unref(tooltip).hideImmediately && unref(tooltip).hideImmediately(...args), ["esc"]))
1632
+ }), [createElementVNode("div", _hoisted_4, [
1633
+ _cache[6] || (_cache[6] = createElementVNode("div", {
1634
+ class: "astryx-slider-track",
1635
+ "aria-hidden": "true"
1636
+ }, null, -1)),
1637
+ createElementVNode("div", {
1638
+ class: "astryx-slider-fill-clip",
1639
+ style: normalizeStyle(fillStyle.value),
1640
+ "aria-hidden": "true"
1641
+ }, [createElementVNode("div", {
1642
+ ref_key: "fillMover",
1643
+ ref: fillMover,
1644
+ class: "astryx-slider-fill-mover"
1645
+ }, [createElementVNode("div", {
1646
+ ref_key: "fill",
1647
+ ref: fill,
1648
+ class: "astryx-slider-fill"
1649
+ }, null, 512)], 512)], 4),
1650
+ (openBlock(true), createElementBlock(Fragment, null, renderList(marks.value, (mark) => {
1651
+ return openBlock(), createElementBlock("span", {
1652
+ key: mark.value,
1653
+ class: "astryx-slider-mark",
1654
+ "data-mark-value": mark.value,
1655
+ "data-filled": isFilled(mark.value) || void 0,
1656
+ style: normalizeStyle(markStyle(mark.value)),
1657
+ "aria-hidden": "true"
1658
+ }, [mark.label ? (openBlock(), createElementBlock("span", {
1659
+ key: 0,
1660
+ class: "astryx-slider-mark-label",
1661
+ "data-mark-value": mark.value
1662
+ }, toDisplayString(mark.label), 9, _hoisted_6)) : createCommentVNode("v-if", true)], 12, _hoisted_5);
1663
+ }), 128)),
1664
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(values), (value, index) => {
1665
+ return openBlock(), createBlock(_sfc_main$1, {
1666
+ id: `${inputId.value}-${index}`,
1667
+ key: index,
1668
+ index,
1669
+ value,
1670
+ percentage: unref(percent)(value, unref(min), unref(max)),
1671
+ "hit-insets": unref(thumbHitInsets)(index, unref(values), unref(min), unref(max), __props.orientation !== "vertical"),
1672
+ min: unref(control).bounds(index)[0],
1673
+ max: unref(control).bounds(index)[1],
1674
+ orientation: __props.orientation,
1675
+ "labelled-by": [
1676
+ field.labelId,
1677
+ isRange.value ? `${inputId.value}-label-${index}` : void 0,
1678
+ isRange.value ? void 0 : unref(attrs)["aria-labelledby"]
1679
+ ].filter(Boolean).join(" "),
1680
+ "described-by": describedBy(field.describedBy),
1681
+ "value-text": __props.formatValue ? format(value) : void 0,
1682
+ "is-invalid": __props.status?.type === "error",
1683
+ "is-disabled": __props.isDisabled,
1684
+ "is-focusable": !__props.isDisabled || showsDisabledMessage.value,
1685
+ dragging: unref(dragging) === index,
1686
+ "drag-active": unref(dragging) !== null,
1687
+ "keyboard-focus": unref(control).keyboardFocus.value === index,
1688
+ "extra-attrs": thumbAttrs.value,
1689
+ "tooltip-text": __props.valueDisplay === "tooltip" ? format(value) : void 0,
1690
+ onKeydown: ($event) => unref(control).keydown(index, $event),
1691
+ onFocus: ($event) => unref(control).thumbFocus(index),
1692
+ onBlur: _cache[0] || (_cache[0] = ($event) => unref(control).thumbBlur())
1693
+ }, null, 8, [
1694
+ "id",
1695
+ "index",
1696
+ "value",
1697
+ "percentage",
1698
+ "hit-insets",
1699
+ "min",
1700
+ "max",
1701
+ "orientation",
1702
+ "labelled-by",
1703
+ "described-by",
1704
+ "value-text",
1705
+ "is-invalid",
1706
+ "is-disabled",
1707
+ "is-focusable",
1708
+ "dragging",
1709
+ "drag-active",
1710
+ "keyboard-focus",
1711
+ "extra-attrs",
1712
+ "tooltip-text",
1713
+ "onKeydown",
1714
+ "onFocus"
1715
+ ]);
1716
+ }), 128))
1717
+ ])], 16, _hoisted_3),
1718
+ __props.valueDisplay === "text" ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(displayText.value), 1)) : createCommentVNode("v-if", true)
1719
+ ]),
1720
+ isRange.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(_sfc_main$2, { id: `${inputId.value}-label-0` }, {
1721
+ default: withCtx(() => [createTextVNode(toDisplayString(minName.value), 1)]),
1722
+ _: 1
1723
+ }, 8, ["id"]), createVNode(_sfc_main$2, { id: `${inputId.value}-label-1` }, {
1724
+ default: withCtx(() => [createTextVNode(toDisplayString(maxName.value), 1)]),
1725
+ _: 1
1726
+ }, 8, ["id"])], 64)) : createCommentVNode("v-if", true),
1727
+ required.value ? (openBlock(), createBlock(_sfc_main$2, {
1728
+ key: 1,
1729
+ id: `${inputId.value}-required`
1730
+ }, {
1731
+ default: withCtx(() => [createTextVNode(toDisplayString(requiredName.value), 1)]),
1732
+ _: 1
1733
+ }, 8, ["id"])) : createCommentVNode("v-if", true),
1734
+ showsDisabledMessage.value ? (openBlock(), createBlock(_sfc_main$2, {
1735
+ key: 2,
1736
+ id: `${inputId.value}-disabled`
1737
+ }, {
1738
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.disabledMessage), 1)]),
1739
+ _: 1
1740
+ }, 8, ["id"])) : createCommentVNode("v-if", true)
1741
+ ]),
1742
+ _: 2
1743
+ }, [_ctx.$slots.labelIcon ? {
1744
+ name: "labelIcon",
1745
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "labelIcon")]),
1746
+ key: "0"
1747
+ } : void 0]), 1032, [
1748
+ "class",
1749
+ "style",
1750
+ "data-orientation",
1751
+ "data-disabled",
1752
+ "data-mark-labels",
1753
+ "label",
1754
+ "input-id",
1755
+ "description",
1756
+ "width",
1757
+ "is-label-hidden",
1758
+ "is-disabled",
1759
+ "is-optional",
1760
+ "is-required",
1761
+ "label-icon",
1762
+ "label-tooltip",
1763
+ "optional-label",
1764
+ "required-label",
1765
+ "status"
1766
+ ]), showsDisabledMessage.value ? (openBlock(), createBlock(_sfc_main$3, {
1767
+ key: 0,
1768
+ id: `${inputId.value}-disabled-tooltip`,
1769
+ anchor: track.value,
1770
+ open: unref(tooltip).isOpen.value,
1771
+ text: __props.disabledMessage ?? "",
1772
+ onPointerEnter: unref(tooltip).onTooltipPointerEnter,
1773
+ onPointerLeave: unref(tooltip).onTooltipPointerLeave
1774
+ }, null, 8, [
1775
+ "id",
1776
+ "anchor",
1777
+ "open",
1778
+ "text",
1779
+ "onPointerEnter",
1780
+ "onPointerLeave"
1781
+ ])) : createCommentVNode("v-if", true)], 64);
1782
+ };
1783
+ }
1784
+ });
1785
+ //#endregion
1786
+ export { _sfc_main as t };