akar 2.0.23 → 2.0.25

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 (606) hide show
  1. package/README.md +8 -6
  2. package/dist/Autocomplete/AutocompleteInput.cjs +2 -0
  3. package/dist/Autocomplete/AutocompleteInput.cjs.map +1 -1
  4. package/dist/Autocomplete/AutocompleteInput.js +2 -0
  5. package/dist/Autocomplete/AutocompleteInput.js.map +1 -1
  6. package/dist/Avatar/utils.cjs.map +1 -1
  7. package/dist/Avatar/utils.js.map +1 -1
  8. package/dist/Calendar/CalendarCellTrigger.cjs.map +1 -1
  9. package/dist/Calendar/CalendarCellTrigger.js.map +1 -1
  10. package/dist/Calendar/CalendarRoot.cjs.map +1 -1
  11. package/dist/Calendar/CalendarRoot.js.map +1 -1
  12. package/dist/Calendar/useCalendar.cjs.map +1 -1
  13. package/dist/Calendar/useCalendar.js.map +1 -1
  14. package/dist/Checkbox/CheckboxGroupRoot.cjs.map +1 -1
  15. package/dist/Checkbox/CheckboxGroupRoot.js.map +1 -1
  16. package/dist/Checkbox/CheckboxRoot.cjs.map +1 -1
  17. package/dist/Checkbox/CheckboxRoot.js.map +1 -1
  18. package/dist/Checkbox/utils.cjs.map +1 -1
  19. package/dist/Checkbox/utils.js.map +1 -1
  20. package/dist/Collection/Collection.cjs.map +1 -1
  21. package/dist/Collection/Collection.js.map +1 -1
  22. package/dist/ColorArea/ColorAreaArea.cjs +1 -1
  23. package/dist/ColorArea/ColorAreaArea.cjs.map +1 -1
  24. package/dist/ColorArea/ColorAreaArea.js +1 -1
  25. package/dist/ColorArea/ColorAreaArea.js.map +1 -1
  26. package/dist/ColorArea/ColorAreaRoot.cjs.map +1 -1
  27. package/dist/ColorArea/ColorAreaRoot.js.map +1 -1
  28. package/dist/ColorArea/utils.cjs +1 -0
  29. package/dist/ColorArea/utils.cjs.map +1 -1
  30. package/dist/ColorArea/utils.js +1 -0
  31. package/dist/ColorArea/utils.js.map +1 -1
  32. package/dist/ColorSlider/ColorSliderRoot.cjs.map +1 -1
  33. package/dist/ColorSlider/ColorSliderRoot.js.map +1 -1
  34. package/dist/ColorSwatchPicker/ColorSwatchPickerRoot.cjs.map +1 -1
  35. package/dist/ColorSwatchPicker/ColorSwatchPickerRoot.js.map +1 -1
  36. package/dist/Combobox/ComboboxCancel.cjs.map +1 -1
  37. package/dist/Combobox/ComboboxCancel.js.map +1 -1
  38. package/dist/Combobox/ComboboxContentImpl.cjs.map +1 -1
  39. package/dist/Combobox/ComboboxContentImpl.js.map +1 -1
  40. package/dist/Combobox/ComboboxGroup.cjs.map +1 -1
  41. package/dist/Combobox/ComboboxGroup.js.map +1 -1
  42. package/dist/Combobox/ComboboxInput.cjs +2 -0
  43. package/dist/Combobox/ComboboxInput.cjs.map +1 -1
  44. package/dist/Combobox/ComboboxInput.js +2 -0
  45. package/dist/Combobox/ComboboxInput.js.map +1 -1
  46. package/dist/Combobox/ComboboxRoot.cjs.map +1 -1
  47. package/dist/Combobox/ComboboxRoot.js.map +1 -1
  48. package/dist/ContextMenu/ContextMenuContent.cjs +1 -1
  49. package/dist/ContextMenu/ContextMenuContent.cjs.map +1 -1
  50. package/dist/ContextMenu/ContextMenuContent.js +1 -1
  51. package/dist/ContextMenu/ContextMenuContent.js.map +1 -1
  52. package/dist/ContextMenu/ContextMenuTrigger.cjs +3 -2
  53. package/dist/ContextMenu/ContextMenuTrigger.cjs.map +1 -1
  54. package/dist/ContextMenu/ContextMenuTrigger.js +3 -2
  55. package/dist/ContextMenu/ContextMenuTrigger.js.map +1 -1
  56. package/dist/DateField/DateFieldRoot.cjs +3 -1
  57. package/dist/DateField/DateFieldRoot.cjs.map +1 -1
  58. package/dist/DateField/DateFieldRoot.js +3 -1
  59. package/dist/DateField/DateFieldRoot.js.map +1 -1
  60. package/dist/DatePicker/DatePickerRoot.cjs.map +1 -1
  61. package/dist/DatePicker/DatePickerRoot.js.map +1 -1
  62. package/dist/DateRangeField/DateRangeFieldInput.cjs.map +1 -1
  63. package/dist/DateRangeField/DateRangeFieldInput.js.map +1 -1
  64. package/dist/DateRangeField/DateRangeFieldRoot.cjs.map +1 -1
  65. package/dist/DateRangeField/DateRangeFieldRoot.js.map +1 -1
  66. package/dist/DateRangePicker/DateRangePickerRoot.cjs.map +1 -1
  67. package/dist/DateRangePicker/DateRangePickerRoot.js.map +1 -1
  68. package/dist/Dialog/DialogContent.cjs.map +1 -1
  69. package/dist/Dialog/DialogContent.js.map +1 -1
  70. package/dist/Dialog/utils.cjs +1 -1
  71. package/dist/Dialog/utils.cjs.map +1 -1
  72. package/dist/Dialog/utils.js +1 -1
  73. package/dist/Dialog/utils.js.map +1 -1
  74. package/dist/DismissableLayer/DismissableLayer.cjs.map +1 -1
  75. package/dist/DismissableLayer/DismissableLayer.js.map +1 -1
  76. package/dist/DismissableLayer/context.cjs +1 -0
  77. package/dist/DismissableLayer/context.cjs.map +1 -1
  78. package/dist/DismissableLayer/context.js +1 -0
  79. package/dist/DismissableLayer/context.js.map +1 -1
  80. package/dist/DismissableLayer/utils.cjs.map +1 -1
  81. package/dist/DismissableLayer/utils.js.map +1 -1
  82. package/dist/Drawer/DrawerContent.cjs.map +1 -1
  83. package/dist/Drawer/DrawerContent.js.map +1 -1
  84. package/dist/Drawer/DrawerContentImpl.cjs.map +1 -1
  85. package/dist/Drawer/DrawerContentImpl.js.map +1 -1
  86. package/dist/Drawer/DrawerIndent.cjs.map +1 -1
  87. package/dist/Drawer/DrawerIndent.js.map +1 -1
  88. package/dist/Drawer/DrawerProvider.cjs.map +1 -1
  89. package/dist/Drawer/DrawerProvider.js.map +1 -1
  90. package/dist/Drawer/utils.cjs.map +1 -1
  91. package/dist/Drawer/utils.js.map +1 -1
  92. package/dist/Editable/EditableRoot.cjs.map +1 -1
  93. package/dist/Editable/EditableRoot.js.map +1 -1
  94. package/dist/Field/FieldControl.cjs.map +1 -1
  95. package/dist/Field/FieldControl.js.map +1 -1
  96. package/dist/Field/FieldRoot.cjs.map +1 -1
  97. package/dist/Field/FieldRoot.js.map +1 -1
  98. package/dist/Field/useFieldValidation.cjs.map +1 -1
  99. package/dist/Field/useFieldValidation.js.map +1 -1
  100. package/dist/FocusScope/FocusScope.cjs.map +1 -1
  101. package/dist/FocusScope/FocusScope.js.map +1 -1
  102. package/dist/HoverCard/HoverCardContentImpl.cjs +3 -1
  103. package/dist/HoverCard/HoverCardContentImpl.cjs.map +1 -1
  104. package/dist/HoverCard/HoverCardContentImpl.js +3 -1
  105. package/dist/HoverCard/HoverCardContentImpl.js.map +1 -1
  106. package/dist/HoverCard/utils.cjs.map +1 -1
  107. package/dist/HoverCard/utils.js.map +1 -1
  108. package/dist/Listbox/ListboxRoot.cjs.map +1 -1
  109. package/dist/Listbox/ListboxRoot.js.map +1 -1
  110. package/dist/Listbox/ListboxVirtualizer.cjs.map +1 -1
  111. package/dist/Listbox/ListboxVirtualizer.js.map +1 -1
  112. package/dist/Menu/MenuContentImpl.cjs +1 -1
  113. package/dist/Menu/MenuContentImpl.cjs.map +1 -1
  114. package/dist/Menu/MenuContentImpl.js +2 -2
  115. package/dist/Menu/MenuContentImpl.js.map +1 -1
  116. package/dist/Menu/MenuSub.cjs +3 -1
  117. package/dist/Menu/MenuSub.cjs.map +1 -1
  118. package/dist/Menu/MenuSub.js +3 -1
  119. package/dist/Menu/MenuSub.js.map +1 -1
  120. package/dist/Menu/MenuSubTrigger.cjs.map +1 -1
  121. package/dist/Menu/MenuSubTrigger.js.map +1 -1
  122. package/dist/Menu/utils.cjs +4 -0
  123. package/dist/Menu/utils.cjs.map +1 -1
  124. package/dist/Menu/utils.js +4 -0
  125. package/dist/Menu/utils.js.map +1 -1
  126. package/dist/Menubar/MenubarContent.cjs.map +1 -1
  127. package/dist/Menubar/MenubarContent.js.map +1 -1
  128. package/dist/MonthPicker/MonthPickerCellTrigger.cjs.map +1 -1
  129. package/dist/MonthPicker/MonthPickerCellTrigger.js.map +1 -1
  130. package/dist/MonthPicker/MonthPickerRoot.cjs.map +1 -1
  131. package/dist/MonthPicker/MonthPickerRoot.js.map +1 -1
  132. package/dist/MonthPicker/useMonthPicker.cjs.map +1 -1
  133. package/dist/MonthPicker/useMonthPicker.js.map +1 -1
  134. package/dist/MonthRangePicker/MonthRangePickerCellTrigger.cjs.map +1 -1
  135. package/dist/MonthRangePicker/MonthRangePickerCellTrigger.js.map +1 -1
  136. package/dist/MonthRangePicker/MonthRangePickerRoot.cjs.map +1 -1
  137. package/dist/MonthRangePicker/MonthRangePickerRoot.js.map +1 -1
  138. package/dist/MonthRangePicker/useRangeMonthPicker.cjs.map +1 -1
  139. package/dist/MonthRangePicker/useRangeMonthPicker.js.map +1 -1
  140. package/dist/NavigationMenu/NavigationMenuContentImpl.cjs.map +1 -1
  141. package/dist/NavigationMenu/NavigationMenuContentImpl.js.map +1 -1
  142. package/dist/NavigationMenu/NavigationMenuItem.cjs +17 -10
  143. package/dist/NavigationMenu/NavigationMenuItem.cjs.map +1 -1
  144. package/dist/NavigationMenu/NavigationMenuItem.js +17 -10
  145. package/dist/NavigationMenu/NavigationMenuItem.js.map +1 -1
  146. package/dist/NavigationMenu/NavigationMenuTrigger.cjs +1 -1
  147. package/dist/NavigationMenu/NavigationMenuTrigger.cjs.map +1 -1
  148. package/dist/NavigationMenu/NavigationMenuTrigger.js +1 -1
  149. package/dist/NavigationMenu/NavigationMenuTrigger.js.map +1 -1
  150. package/dist/NavigationMenu/utils.cjs.map +1 -1
  151. package/dist/NavigationMenu/utils.js.map +1 -1
  152. package/dist/NumberField/NumberFieldInput.cjs.map +1 -1
  153. package/dist/NumberField/NumberFieldInput.js.map +1 -1
  154. package/dist/NumberField/NumberFieldRoot.cjs.map +1 -1
  155. package/dist/NumberField/NumberFieldRoot.js.map +1 -1
  156. package/dist/NumberField/utils.cjs.map +1 -1
  157. package/dist/NumberField/utils.js.map +1 -1
  158. package/dist/Pagination/utils.cjs.map +1 -1
  159. package/dist/Pagination/utils.js.map +1 -1
  160. package/dist/PinInput/PinInputInput.cjs.map +1 -1
  161. package/dist/PinInput/PinInputInput.js.map +1 -1
  162. package/dist/PinInput/PinInputRoot.cjs.map +1 -1
  163. package/dist/PinInput/PinInputRoot.js.map +1 -1
  164. package/dist/Popover/PopoverContent.cjs.map +1 -1
  165. package/dist/Popper/PopperContent.cjs.map +1 -1
  166. package/dist/Popper/PopperContent.js.map +1 -1
  167. package/dist/Popper/PopperRoot.cjs +3 -1
  168. package/dist/Popper/PopperRoot.cjs.map +1 -1
  169. package/dist/Popper/PopperRoot.js +3 -1
  170. package/dist/Popper/PopperRoot.js.map +1 -1
  171. package/dist/Popper/utils.cjs.map +1 -1
  172. package/dist/Popper/utils.js.map +1 -1
  173. package/dist/Presence/usePresence.cjs.map +1 -1
  174. package/dist/Presence/usePresence.js.map +1 -1
  175. package/dist/Primitive/usePrimitiveElement.cjs.map +1 -1
  176. package/dist/Primitive/usePrimitiveElement.js.map +1 -1
  177. package/dist/Progress/ProgressRoot.cjs.map +1 -1
  178. package/dist/Progress/ProgressRoot.js.map +1 -1
  179. package/dist/RadioGroup/Radio.cjs.map +1 -1
  180. package/dist/RadioGroup/Radio.js.map +1 -1
  181. package/dist/RadioGroup/RadioGroupItem.cjs.map +1 -1
  182. package/dist/RadioGroup/RadioGroupItem.js.map +1 -1
  183. package/dist/RangeCalendar/RangeCalendarCellTrigger.cjs.map +1 -1
  184. package/dist/RangeCalendar/RangeCalendarCellTrigger.js.map +1 -1
  185. package/dist/RangeCalendar/RangeCalendarRoot.cjs.map +1 -1
  186. package/dist/RangeCalendar/RangeCalendarRoot.js.map +1 -1
  187. package/dist/RangeCalendar/useRangeCalendar.cjs.map +1 -1
  188. package/dist/RangeCalendar/useRangeCalendar.js.map +1 -1
  189. package/dist/RovingFocus/RovingFocusGroup.cjs.map +1 -1
  190. package/dist/RovingFocus/RovingFocusGroup.js.map +1 -1
  191. package/dist/RovingFocus/RovingFocusItem.cjs.map +1 -1
  192. package/dist/RovingFocus/RovingFocusItem.js.map +1 -1
  193. package/dist/RovingFocus/utils.cjs.map +1 -1
  194. package/dist/RovingFocus/utils.js.map +1 -1
  195. package/dist/ScrollArea/ScrollAreaThumb.cjs +1 -1
  196. package/dist/ScrollArea/ScrollAreaThumb.cjs.map +1 -1
  197. package/dist/ScrollArea/ScrollAreaThumb.js +1 -1
  198. package/dist/ScrollArea/ScrollAreaThumb.js.map +1 -1
  199. package/dist/ScrollArea/utils.cjs +4 -0
  200. package/dist/ScrollArea/utils.cjs.map +1 -1
  201. package/dist/ScrollArea/utils.js +4 -0
  202. package/dist/ScrollArea/utils.js.map +1 -1
  203. package/dist/Select/SelectItemAlignedPosition.cjs.map +1 -1
  204. package/dist/Select/SelectItemAlignedPosition.js.map +1 -1
  205. package/dist/Select/SelectRoot.cjs.map +1 -1
  206. package/dist/Select/SelectRoot.js.map +1 -1
  207. package/dist/Select/SelectValue.cjs.map +1 -1
  208. package/dist/Select/SelectValue.js.map +1 -1
  209. package/dist/Select/SelectViewport.cjs.map +1 -1
  210. package/dist/Select/SelectViewport.js.map +1 -1
  211. package/dist/Slider/SliderHorizontal.cjs.map +1 -1
  212. package/dist/Slider/SliderHorizontal.js.map +1 -1
  213. package/dist/Slider/SliderRange.cjs.map +1 -1
  214. package/dist/Slider/SliderRange.js.map +1 -1
  215. package/dist/Slider/SliderRoot.cjs.map +1 -1
  216. package/dist/Slider/SliderRoot.js.map +1 -1
  217. package/dist/Slider/SliderThumb.cjs.map +1 -1
  218. package/dist/Slider/SliderThumb.js.map +1 -1
  219. package/dist/Slider/SliderThumbImpl.cjs.map +1 -1
  220. package/dist/Slider/SliderThumbImpl.js.map +1 -1
  221. package/dist/Slider/SliderVertical.cjs.map +1 -1
  222. package/dist/Slider/SliderVertical.js.map +1 -1
  223. package/dist/Slider/utils.cjs +1 -0
  224. package/dist/Slider/utils.cjs.map +1 -1
  225. package/dist/Slider/utils.js +1 -0
  226. package/dist/Slider/utils.js.map +1 -1
  227. package/dist/Splitter/SplitterGroup.cjs.map +1 -1
  228. package/dist/Splitter/SplitterGroup.js.map +1 -1
  229. package/dist/Stepper/StepperRoot.cjs.map +1 -1
  230. package/dist/Stepper/StepperRoot.js.map +1 -1
  231. package/dist/Stepper/StepperTrigger.cjs.map +1 -1
  232. package/dist/Stepper/StepperTrigger.js.map +1 -1
  233. package/dist/Switch/SwitchRoot.cjs.map +1 -1
  234. package/dist/Switch/SwitchRoot.js.map +1 -1
  235. package/dist/Tabs/TabsTrigger.cjs +3 -3
  236. package/dist/Tabs/TabsTrigger.cjs.map +1 -1
  237. package/dist/Tabs/TabsTrigger.js +4 -4
  238. package/dist/Tabs/TabsTrigger.js.map +1 -1
  239. package/dist/TagGroup/TagGroupItemDelete.cjs.map +1 -1
  240. package/dist/TagGroup/TagGroupItemDelete.js.map +1 -1
  241. package/dist/TagGroup/TagGroupRoot.cjs.map +1 -1
  242. package/dist/TagGroup/TagGroupRoot.js.map +1 -1
  243. package/dist/TagsInput/TagsInputRoot.cjs.map +1 -1
  244. package/dist/TagsInput/TagsInputRoot.js.map +1 -1
  245. package/dist/TimeField/TimeFieldRoot.cjs.map +1 -1
  246. package/dist/TimeField/TimeFieldRoot.js.map +1 -1
  247. package/dist/TimeRangeField/TimeRangeFieldInput.cjs.map +1 -1
  248. package/dist/TimeRangeField/TimeRangeFieldInput.js.map +1 -1
  249. package/dist/TimeRangeField/TimeRangeFieldRoot.cjs.map +1 -1
  250. package/dist/TimeRangeField/TimeRangeFieldRoot.js.map +1 -1
  251. package/dist/Toast/ToastAnnounce.cjs +1 -4
  252. package/dist/Toast/ToastAnnounce.cjs.map +1 -1
  253. package/dist/Toast/ToastAnnounce.js +1 -4
  254. package/dist/Toast/ToastAnnounce.js.map +1 -1
  255. package/dist/Toast/ToastRoot.cjs.map +1 -1
  256. package/dist/Toast/ToastRoot.js.map +1 -1
  257. package/dist/Toast/ToastRootImpl.cjs.map +1 -1
  258. package/dist/Toast/ToastRootImpl.js.map +1 -1
  259. package/dist/Toast/ToastViewport.cjs.map +1 -1
  260. package/dist/Toast/ToastViewport.js.map +1 -1
  261. package/dist/Toast/createToastManager.cjs.map +1 -1
  262. package/dist/Toast/createToastManager.js.map +1 -1
  263. package/dist/Toast/useToastStore.cjs +3 -1
  264. package/dist/Toast/useToastStore.cjs.map +1 -1
  265. package/dist/Toast/useToastStore.js +3 -1
  266. package/dist/Toast/useToastStore.js.map +1 -1
  267. package/dist/Tree/TreeItem.cjs.map +1 -1
  268. package/dist/Tree/TreeItem.js.map +1 -1
  269. package/dist/Tree/TreeRoot.cjs.map +1 -1
  270. package/dist/Tree/TreeRoot.js.map +1 -1
  271. package/dist/Tree/TreeVirtualizer.cjs.map +1 -1
  272. package/dist/Tree/TreeVirtualizer.js.map +1 -1
  273. package/dist/VisuallyHidden/VisuallyHiddenInput.cjs.map +1 -1
  274. package/dist/VisuallyHidden/VisuallyHiddenInput.js.map +1 -1
  275. package/dist/YearPicker/YearPickerCellTrigger.cjs.map +1 -1
  276. package/dist/YearPicker/YearPickerCellTrigger.js.map +1 -1
  277. package/dist/YearPicker/YearPickerRoot.cjs.map +1 -1
  278. package/dist/YearPicker/YearPickerRoot.js.map +1 -1
  279. package/dist/YearPicker/useYearPicker.cjs.map +1 -1
  280. package/dist/YearPicker/useYearPicker.js.map +1 -1
  281. package/dist/YearRangePicker/YearRangePickerCellTrigger.cjs.map +1 -1
  282. package/dist/YearRangePicker/YearRangePickerCellTrigger.js.map +1 -1
  283. package/dist/YearRangePicker/YearRangePickerRoot.cjs.map +1 -1
  284. package/dist/YearRangePicker/YearRangePickerRoot.js.map +1 -1
  285. package/dist/YearRangePicker/useRangeYearPicker.cjs.map +1 -1
  286. package/dist/YearRangePicker/useRangeYearPicker.js.map +1 -1
  287. package/dist/color/channel.cjs.map +1 -1
  288. package/dist/color/channel.js.map +1 -1
  289. package/dist/color/convert.cjs.map +1 -1
  290. package/dist/color/convert.js.map +1 -1
  291. package/dist/color/gradient.cjs +2 -2
  292. package/dist/color/gradient.cjs.map +1 -1
  293. package/dist/color/gradient.js +2 -2
  294. package/dist/color/gradient.js.map +1 -1
  295. package/dist/color/parse.cjs.map +1 -1
  296. package/dist/color/parse.js.map +1 -1
  297. package/dist/color/utils.cjs.map +1 -1
  298. package/dist/color/utils.js.map +1 -1
  299. package/dist/component/BaseSeparator.cjs.map +1 -1
  300. package/dist/component/BaseSeparator.js.map +1 -1
  301. package/dist/composables/useDrawerSnapPoints.cjs.map +1 -1
  302. package/dist/composables/useDrawerSnapPoints.js.map +1 -1
  303. package/dist/composables/useDrawerVirtualKeyboard.cjs.map +1 -1
  304. package/dist/composables/useDrawerVirtualKeyboard.js.map +1 -1
  305. package/dist/composables/useSwipeDismiss.cjs.map +1 -1
  306. package/dist/composables/useSwipeDismiss.js.map +1 -1
  307. package/dist/composables/useWindowSplitterBehavior.cjs +1 -0
  308. package/dist/composables/useWindowSplitterBehavior.cjs.map +1 -1
  309. package/dist/composables/useWindowSplitterBehavior.js +1 -0
  310. package/dist/composables/useWindowSplitterBehavior.js.map +1 -1
  311. package/dist/composables/useWindowSplitterPanelGroupBehavior.cjs +7 -4
  312. package/dist/composables/useWindowSplitterPanelGroupBehavior.cjs.map +1 -1
  313. package/dist/composables/useWindowSplitterPanelGroupBehavior.js +7 -4
  314. package/dist/composables/useWindowSplitterPanelGroupBehavior.js.map +1 -1
  315. package/dist/constant.d.cts.map +1 -1
  316. package/dist/constant.d.ts.map +1 -1
  317. package/dist/date/calendar.cjs.map +1 -1
  318. package/dist/date/calendar.js.map +1 -1
  319. package/dist/date/comparators.cjs.map +1 -1
  320. package/dist/date/comparators.js.map +1 -1
  321. package/dist/date/parser.cjs.map +1 -1
  322. package/dist/date/parser.js.map +1 -1
  323. package/dist/date/parts.cjs.map +1 -1
  324. package/dist/date/parts.js.map +1 -1
  325. package/dist/date/useDateField.cjs.map +1 -1
  326. package/dist/date/useDateField.js.map +1 -1
  327. package/dist/date/useSegmentNavigation.cjs.map +1 -1
  328. package/dist/date/useSegmentNavigation.js.map +1 -1
  329. package/dist/date/utils.cjs.map +1 -1
  330. package/dist/date/utils.js.map +1 -1
  331. package/dist/index.d.cts +2 -2
  332. package/dist/index.d.ts +2 -2
  333. package/dist/index2.d.cts +2 -0
  334. package/dist/index2.d.cts.map +1 -1
  335. package/dist/index2.d.ts +2 -0
  336. package/dist/index2.d.ts.map +1 -1
  337. package/dist/index3.d.cts +725 -723
  338. package/dist/index3.d.cts.map +1 -1
  339. package/dist/index3.d.ts +697 -695
  340. package/dist/index3.d.ts.map +1 -1
  341. package/dist/internal.d.cts +2 -2
  342. package/dist/internal.d.cts.map +1 -1
  343. package/dist/internal.d.ts +2 -2
  344. package/dist/shared/bodyPointerEvents.cjs.map +1 -1
  345. package/dist/shared/bodyPointerEvents.js.map +1 -1
  346. package/dist/shared/clamp.cjs.map +1 -1
  347. package/dist/shared/clamp.js.map +1 -1
  348. package/dist/shared/useArrowNavigation.cjs.map +1 -1
  349. package/dist/shared/useArrowNavigation.js.map +1 -1
  350. package/dist/shared/useBodyScrollLock.cjs +27 -3
  351. package/dist/shared/useBodyScrollLock.cjs.map +1 -1
  352. package/dist/shared/useBodyScrollLock.js +27 -3
  353. package/dist/shared/useBodyScrollLock.js.map +1 -1
  354. package/dist/shared/useCalendarKeyboardNavigation.cjs.map +1 -1
  355. package/dist/shared/useCalendarKeyboardNavigation.js.map +1 -1
  356. package/dist/shared/useComposing.cjs.map +1 -1
  357. package/dist/shared/useComposing.js.map +1 -1
  358. package/dist/shared/useDateFormatter.cjs.map +1 -1
  359. package/dist/shared/useDateFormatter.js.map +1 -1
  360. package/dist/shared/useFocusGuards.cjs +3 -1
  361. package/dist/shared/useFocusGuards.cjs.map +1 -1
  362. package/dist/shared/useFocusGuards.js +3 -1
  363. package/dist/shared/useFocusGuards.js.map +1 -1
  364. package/dist/shared/useFormControl.cjs.map +1 -1
  365. package/dist/shared/useFormControl.js.map +1 -1
  366. package/dist/shared/useForwardExpose.cjs.map +1 -1
  367. package/dist/shared/useForwardExpose.js.map +1 -1
  368. package/dist/shared/useForwardProps.cjs.map +1 -1
  369. package/dist/shared/useForwardProps.js.map +1 -1
  370. package/dist/shared/useForwardPropsEmits.cjs.map +1 -1
  371. package/dist/shared/useForwardPropsEmits.js.map +1 -1
  372. package/dist/shared/useForwardScopeId.cjs.map +1 -1
  373. package/dist/shared/useForwardScopeId.js.map +1 -1
  374. package/dist/shared/useGraceArea.cjs.map +1 -1
  375. package/dist/shared/useGraceArea.js.map +1 -1
  376. package/dist/shared/useId.cjs.map +1 -1
  377. package/dist/shared/useId.js.map +1 -1
  378. package/dist/shared/useSelectionBehavior.cjs.map +1 -1
  379. package/dist/shared/useSelectionBehavior.js.map +1 -1
  380. package/dist/shared/useSingleOrMultipleValue.cjs.map +1 -1
  381. package/dist/shared/useSingleOrMultipleValue.js.map +1 -1
  382. package/dist/shared/useTypeahead.cjs.map +1 -1
  383. package/dist/shared/useTypeahead.js.map +1 -1
  384. package/dist/shared/withDefault.cjs.map +1 -1
  385. package/dist/shared/withDefault.js.map +1 -1
  386. package/dist/utils/calculate.cjs +1 -0
  387. package/dist/utils/calculate.cjs.map +1 -1
  388. package/dist/utils/calculate.js +1 -0
  389. package/dist/utils/calculate.js.map +1 -1
  390. package/dist/utils/callPanelCallbacks.cjs +1 -0
  391. package/dist/utils/callPanelCallbacks.cjs.map +1 -1
  392. package/dist/utils/callPanelCallbacks.js +1 -0
  393. package/dist/utils/callPanelCallbacks.js.map +1 -1
  394. package/dist/utils/compare.cjs.map +1 -1
  395. package/dist/utils/compare.js.map +1 -1
  396. package/dist/utils/dom.cjs.map +1 -1
  397. package/dist/utils/dom.js.map +1 -1
  398. package/dist/utils/layout.cjs +1 -0
  399. package/dist/utils/layout.cjs.map +1 -1
  400. package/dist/utils/layout.js +1 -0
  401. package/dist/utils/layout.js.map +1 -1
  402. package/dist/utils/pivot.cjs.map +1 -1
  403. package/dist/utils/pivot.js.map +1 -1
  404. package/dist/utils/registry.cjs.map +1 -1
  405. package/dist/utils/registry.js.map +1 -1
  406. package/dist/utils/resizePanel.cjs +1 -0
  407. package/dist/utils/resizePanel.cjs.map +1 -1
  408. package/dist/utils/resizePanel.js +1 -0
  409. package/dist/utils/resizePanel.js.map +1 -1
  410. package/dist/utils/stackingOrder.cjs +10 -10
  411. package/dist/utils/stackingOrder.cjs.map +1 -1
  412. package/dist/utils/stackingOrder.js +10 -10
  413. package/dist/utils/stackingOrder.js.map +1 -1
  414. package/dist/utils/storage.cjs +7 -1
  415. package/dist/utils/storage.cjs.map +1 -1
  416. package/dist/utils/storage.js +7 -1
  417. package/dist/utils/storage.js.map +1 -1
  418. package/dist/utils/style.cjs +1 -0
  419. package/dist/utils/style.cjs.map +1 -1
  420. package/dist/utils/style.js +1 -0
  421. package/dist/utils/style.js.map +1 -1
  422. package/dist/utils/units.cjs +0 -1
  423. package/dist/utils/units.cjs.map +1 -1
  424. package/dist/utils/units.js +0 -1
  425. package/dist/utils/units.js.map +1 -1
  426. package/dist/utils/validation.cjs +1 -0
  427. package/dist/utils/validation.cjs.map +1 -1
  428. package/dist/utils/validation.js +1 -0
  429. package/dist/utils/validation.js.map +1 -1
  430. package/package.json +11 -11
  431. package/src/Autocomplete/AutocompleteInput.vue +1 -0
  432. package/src/Avatar/utils.ts +3 -1
  433. package/src/Calendar/CalendarCellTrigger.vue +3 -1
  434. package/src/Calendar/CalendarRoot.vue +3 -1
  435. package/src/Calendar/useCalendar.ts +18 -5
  436. package/src/Checkbox/CheckboxGroupRoot.vue +3 -1
  437. package/src/Checkbox/CheckboxRoot.test-d.ts +91 -0
  438. package/src/Checkbox/CheckboxRoot.vue +19 -15
  439. package/src/Checkbox/utils.ts +3 -1
  440. package/src/Collection/Collection.ts +11 -2
  441. package/src/ColorArea/ColorAreaArea.vue +1 -1
  442. package/src/ColorArea/ColorAreaRoot.vue +14 -2
  443. package/src/ColorArea/utils.ts +1 -1
  444. package/src/ColorSlider/ColorSliderRoot.vue +3 -1
  445. package/src/ColorSlider/utils.ts +31 -6
  446. package/src/ColorSwatchPicker/ColorSwatchPickerRoot.vue +3 -1
  447. package/src/Combobox/ComboboxCancel.vue +3 -1
  448. package/src/Combobox/ComboboxContentImpl.vue +7 -2
  449. package/src/Combobox/ComboboxGroup.vue +5 -1
  450. package/src/Combobox/ComboboxInput.vue +1 -0
  451. package/src/Combobox/ComboboxRoot.vue +3 -1
  452. package/src/ContextMenu/ContextMenuContent.vue +2 -2
  453. package/src/ContextMenu/ContextMenuTrigger.vue +3 -1
  454. package/src/DateField/DateFieldRoot.vue +24 -7
  455. package/src/DatePicker/DatePickerRoot.vue +6 -1
  456. package/src/DateRangeField/DateRangeFieldInput.vue +3 -1
  457. package/src/DateRangeField/DateRangeFieldRoot.vue +30 -8
  458. package/src/DateRangePicker/DateRangePickerRoot.vue +4 -1
  459. package/src/Dialog/utils.ts +1 -1
  460. package/src/DismissableLayer/DismissableLayer.vue +9 -2
  461. package/src/DismissableLayer/context.ts +1 -1
  462. package/src/DismissableLayer/utils.ts +1 -0
  463. package/src/Drawer/DrawerContentImpl.vue +18 -5
  464. package/src/Drawer/DrawerIndent.vue +3 -1
  465. package/src/Drawer/DrawerProvider.vue +6 -2
  466. package/src/Drawer/composables/useDrawerSnapPoints.ts +23 -7
  467. package/src/Drawer/composables/useDrawerVirtualKeyboard.ts +37 -12
  468. package/src/Drawer/composables/useSwipeDismiss.ts +30 -10
  469. package/src/Drawer/utils.ts +18 -4
  470. package/src/Editable/EditableRoot.vue +3 -1
  471. package/src/Field/FieldControl.vue +3 -1
  472. package/src/Field/FieldRoot.vue +23 -7
  473. package/src/Field/useFieldValidation.ts +31 -9
  474. package/src/FocusScope/FocusScope.vue +3 -1
  475. package/src/HoverCard/HoverCardContentImpl.vue +3 -1
  476. package/src/HoverCard/index.ts +1 -0
  477. package/src/HoverCard/utils.ts +6 -2
  478. package/src/Listbox/ListboxRoot.vue +24 -8
  479. package/src/Listbox/ListboxVirtualizer.vue +9 -3
  480. package/src/Menu/MenuContentImpl.vue +9 -3
  481. package/src/Menu/MenuSub.vue +3 -1
  482. package/src/Menu/MenuSubTrigger.vue +3 -1
  483. package/src/Menu/utils.ts +8 -3
  484. package/src/Menubar/MenubarContent.vue +3 -1
  485. package/src/MonthPicker/MonthPickerCellTrigger.vue +3 -1
  486. package/src/MonthPicker/MonthPickerRoot.vue +7 -2
  487. package/src/MonthPicker/useMonthPicker.ts +3 -1
  488. package/src/MonthRangePicker/MonthRangePickerCellTrigger.vue +6 -2
  489. package/src/MonthRangePicker/MonthRangePickerRoot.vue +20 -5
  490. package/src/MonthRangePicker/useRangeMonthPicker.ts +12 -4
  491. package/src/NavigationMenu/NavigationMenuContentImpl.vue +6 -2
  492. package/src/NavigationMenu/NavigationMenuItem.vue +15 -4
  493. package/src/NavigationMenu/NavigationMenuTrigger.vue +4 -2
  494. package/src/NavigationMenu/utils.ts +3 -1
  495. package/src/NumberField/NumberFieldInput.vue +6 -2
  496. package/src/NumberField/NumberFieldRoot.vue +15 -5
  497. package/src/NumberField/utils.ts +6 -2
  498. package/src/Pagination/utils.ts +7 -1
  499. package/src/PinInput/PinInputInput.vue +3 -1
  500. package/src/PinInput/PinInputRoot.vue +3 -1
  501. package/src/Popper/PopperContent.vue +13 -3
  502. package/src/Popper/PopperRoot.vue +3 -1
  503. package/src/Popper/utils.ts +21 -7
  504. package/src/Presence/usePresence.ts +9 -3
  505. package/src/Primitive/Primitive.ts +1 -1
  506. package/src/Primitive/usePrimitiveElement.ts +3 -1
  507. package/src/Progress/ProgressRoot.vue +3 -1
  508. package/src/RadioGroup/Radio.vue +3 -1
  509. package/src/RadioGroup/RadioGroupItem.vue +6 -1
  510. package/src/RangeCalendar/RangeCalendarCellTrigger.vue +3 -1
  511. package/src/RangeCalendar/RangeCalendarRoot.vue +20 -5
  512. package/src/RangeCalendar/useRangeCalendar.ts +11 -3
  513. package/src/RovingFocus/RovingFocusGroup.vue +6 -1
  514. package/src/RovingFocus/RovingFocusItem.vue +3 -1
  515. package/src/RovingFocus/utils.ts +1 -0
  516. package/src/ScrollArea/ScrollAreaThumb.vue +1 -1
  517. package/src/ScrollArea/utils.ts +16 -6
  518. package/src/Select/SelectItemAlignedPosition.vue +8 -2
  519. package/src/Select/SelectRoot.vue +12 -4
  520. package/src/Select/SelectValue.vue +3 -1
  521. package/src/Select/SelectViewport.vue +3 -1
  522. package/src/Slider/SliderHorizontal.vue +9 -3
  523. package/src/Slider/SliderRange.vue +3 -1
  524. package/src/Slider/SliderRoot.vue +3 -1
  525. package/src/Slider/SliderThumb.vue +3 -1
  526. package/src/Slider/SliderThumbImpl.vue +3 -1
  527. package/src/Slider/SliderVertical.vue +9 -3
  528. package/src/Slider/utils.ts +31 -6
  529. package/src/Splitter/SplitterGroup.vue +18 -6
  530. package/src/Splitter/utils/calculate.ts +7 -3
  531. package/src/Splitter/utils/callPanelCallbacks.ts +1 -1
  532. package/src/Splitter/utils/compare.ts +3 -1
  533. package/src/Splitter/utils/composables/useWindowSplitterBehavior.ts +2 -2
  534. package/src/Splitter/utils/composables/useWindowSplitterPanelGroupBehavior.ts +7 -5
  535. package/src/Splitter/utils/dom.ts +3 -1
  536. package/src/Splitter/utils/layout.ts +32 -11
  537. package/src/Splitter/utils/pivot.ts +3 -1
  538. package/src/Splitter/utils/registry.ts +3 -1
  539. package/src/Splitter/utils/resizePanel.ts +1 -1
  540. package/src/Splitter/utils/stackingOrder.ts +10 -10
  541. package/src/Splitter/utils/storage.ts +7 -5
  542. package/src/Splitter/utils/style.ts +7 -3
  543. package/src/Splitter/utils/units.ts +0 -2
  544. package/src/Splitter/utils/validation.ts +4 -2
  545. package/src/Stepper/StepperRoot.vue +18 -6
  546. package/src/Stepper/StepperTrigger.vue +6 -1
  547. package/src/Switch/SwitchRoot.test-d.ts +87 -0
  548. package/src/Switch/SwitchRoot.vue +15 -13
  549. package/src/Tabs/TabsTrigger.vue +5 -3
  550. package/src/TagGroup/TagGroupItemDelete.vue +3 -1
  551. package/src/TagGroup/TagGroupRoot.vue +25 -7
  552. package/src/TagsInput/TagsInputRoot.vue +12 -4
  553. package/src/TimeField/TimeFieldRoot.vue +29 -8
  554. package/src/TimeRangeField/TimeRangeFieldInput.vue +3 -1
  555. package/src/TimeRangeField/TimeRangeFieldRoot.vue +39 -11
  556. package/src/Toast/ToastAnnounce.vue +1 -4
  557. package/src/Toast/ToastRoot.vue +4 -1
  558. package/src/Toast/ToastRootImpl.vue +19 -5
  559. package/src/Toast/ToastViewport.vue +7 -2
  560. package/src/Toast/createToastManager.ts +21 -6
  561. package/src/Toast/useToastStore.ts +36 -8
  562. package/src/Tree/TreeItem.vue +12 -2
  563. package/src/Tree/TreeRoot.vue +16 -5
  564. package/src/Tree/TreeVirtualizer.vue +15 -5
  565. package/src/VisuallyHidden/VisuallyHiddenInput.vue +3 -1
  566. package/src/YearPicker/YearPickerCellTrigger.vue +6 -2
  567. package/src/YearPicker/YearPickerRoot.vue +7 -2
  568. package/src/YearPicker/useYearPicker.ts +3 -1
  569. package/src/YearRangePicker/YearRangePickerCellTrigger.vue +6 -2
  570. package/src/YearRangePicker/YearRangePickerRoot.vue +20 -5
  571. package/src/YearRangePicker/useRangeYearPicker.ts +12 -4
  572. package/src/date/calendar.ts +13 -3
  573. package/src/date/comparators.ts +6 -2
  574. package/src/shared/bodyPointerEvents.ts +4 -1
  575. package/src/shared/clamp.ts +6 -2
  576. package/src/shared/color/channel.ts +57 -16
  577. package/src/shared/color/convert.ts +27 -9
  578. package/src/shared/color/gradient.ts +166 -33
  579. package/src/shared/color/parse.ts +10 -4
  580. package/src/shared/color/utils.ts +9 -3
  581. package/src/shared/component/BaseSeparator.vue +6 -2
  582. package/src/shared/date/parser.ts +15 -4
  583. package/src/shared/date/parts.ts +10 -2
  584. package/src/shared/date/segment.ts +1 -1
  585. package/src/shared/date/types.ts +2 -2
  586. package/src/shared/date/useDateField.ts +113 -28
  587. package/src/shared/date/useSegmentNavigation.ts +12 -4
  588. package/src/shared/date/utils.ts +12 -4
  589. package/src/shared/useArrowNavigation.ts +15 -4
  590. package/src/shared/useBodyScrollLock.ts +47 -8
  591. package/src/shared/useCalendarKeyboardNavigation.ts +30 -8
  592. package/src/shared/useComposing.ts +7 -1
  593. package/src/shared/useDateFormatter.ts +38 -9
  594. package/src/shared/useEmitAsProps.test-d.ts +0 -1
  595. package/src/shared/useFocusGuards.ts +3 -1
  596. package/src/shared/useFormControl.ts +3 -1
  597. package/src/shared/useForwardExpose.ts +4 -1
  598. package/src/shared/useForwardProps.ts +4 -1
  599. package/src/shared/useForwardPropsEmits.ts +3 -1
  600. package/src/shared/useForwardScopeId.ts +3 -1
  601. package/src/shared/useGraceArea.ts +4 -1
  602. package/src/shared/useId.ts +3 -1
  603. package/src/shared/useSelectionBehavior.ts +2 -3
  604. package/src/shared/useSingleOrMultipleValue.ts +14 -4
  605. package/src/shared/useTypeahead.ts +6 -2
  606. package/src/shared/withDefault.ts +5 -3
@@ -132,7 +132,9 @@ const dir = useDirection(propDir);
132
132
  const fieldContext = injectFieldRootContext(null);
133
133
  const disabled = computed(() => Boolean(propDisabled.value || fieldContext?.disabled.value));
134
134
  const resolvedName = computed(() => props.name ?? fieldContext?.name.value);
135
- const resolvedRequired = computed(() => (fieldContext ? (props.required || fieldContext.required.value) : props.required));
135
+ const resolvedRequired = computed(() => (fieldContext
136
+ ? (props.required || fieldContext.required.value)
137
+ : props.required));
136
138
 
137
139
  const formatter = useDateFormatter(locale.value, {
138
140
  hourCycle: normalizeHourCycle(props.hourCycle),
@@ -168,10 +170,14 @@ const step = computed(() => normalizeDateStep(props));
168
170
 
169
171
  const inferredGranularity = computed(() => {
170
172
  if (props.granularity) {
171
- return !hasTime(placeholder.value) ? 'day' : props.granularity;
173
+ return !hasTime(placeholder.value)
174
+ ? 'day'
175
+ : props.granularity;
172
176
  }
173
177
 
174
- return hasTime(placeholder.value) ? 'minute' : 'day';
178
+ return hasTime(placeholder.value)
179
+ ? 'minute'
180
+ : 'day';
175
181
  });
176
182
 
177
183
  const isInvalid = computed(() => {
@@ -196,7 +202,11 @@ const isInvalid = computed(() => {
196
202
 
197
203
  const initialSegments = initializeSegmentValues(inferredGranularity.value);
198
204
 
199
- const segmentValues = ref<SegmentValueObj>(modelValue.value ? { ...syncSegmentValues({ value: modelValue.value, formatter }) } : { ...initialSegments });
205
+ const segmentValues = ref<SegmentValueObj>(modelValue.value
206
+ ? {
207
+ ...syncSegmentValues({ value: modelValue.value, formatter }),
208
+ }
209
+ : { ...initialSegments });
200
210
 
201
211
  const allSegmentContent = computed(() => createContent({
202
212
  granularity: inferredGranularity.value,
@@ -238,7 +248,9 @@ watch(modelValue, (value, previous) => {
238
248
 
239
249
  watch([modelValue, locale], ([_modelValue]) => {
240
250
  if (!isNullish(_modelValue)) {
241
- segmentValues.value = { ...syncSegmentValues({ value: _modelValue, formatter }) };
251
+ segmentValues.value = {
252
+ ...syncSegmentValues({ value: _modelValue, formatter }),
253
+ };
242
254
  } else if (Object.values(segmentValues.value).every((value) => value !== null) && isNullish(_modelValue)) {
243
255
  // If segment has null value, means that user modified it, thus do not reset the segmentValues
244
256
  segmentValues.value = { ...initialSegments };
@@ -256,8 +268,12 @@ const { nextFocusableSegment, prevFocusableSegment, focusNext } = useSegmentNavi
256
268
 
257
269
  const inputType = computed(() => getInputType(inferredGranularity.value));
258
270
  const inputValue = computed(() => normalizeInputValue(modelValue.value, inferredGranularity.value));
259
- const inputMaxValue = computed(() => props.maxValue ? normalizeInputValue(props.maxValue, inferredGranularity.value) : undefined);
260
- const inputMinValue = computed(() => props.minValue ? normalizeInputValue(props.minValue, inferredGranularity.value) : undefined);
271
+ const inputMaxValue = computed(() => props.maxValue
272
+ ? normalizeInputValue(props.maxValue, inferredGranularity.value)
273
+ : undefined);
274
+ const inputMinValue = computed(() => props.minValue
275
+ ? normalizeInputValue(props.minValue, inferredGranularity.value)
276
+ : undefined);
261
277
 
262
278
  function handleKeydown(e: KeyboardEvent) {
263
279
  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation
@@ -408,6 +424,7 @@ defineExpose({
408
424
  :required="resolvedRequired"
409
425
  :max="inputMaxValue"
410
426
  :min="inputMinValue"
427
+ :step="inferredGranularity === 'second' ? 1 : undefined"
411
428
  @focus="Array.from(segmentElements)?.[0]?.focus()"
412
429
  />
413
430
  </Primitive>
@@ -148,7 +148,12 @@ function resetTime(date: DateValue) {
148
148
  return date;
149
149
  }
150
150
 
151
- return date.set({ hour: 0, minute: 0, second: 0, millisecond: 0 });
151
+ return date.set({
152
+ hour: 0,
153
+ minute: 0,
154
+ second: 0,
155
+ millisecond: 0,
156
+ });
152
157
  }
153
158
 
154
159
  watch(modelValue, (value, previous) => {
@@ -42,7 +42,9 @@ const {
42
42
  disabled: rootContext.disabled,
43
43
  readonly: rootContext.readonly,
44
44
  focusNext: rootContext.focusNext,
45
- modelValue: props.type === 'start' ? rootContext.startValue : rootContext.endValue,
45
+ modelValue: props.type === 'start'
46
+ ? rootContext.startValue
47
+ : rootContext.endValue,
46
48
  });
47
49
 
48
50
  const disabled = computed(() => rootContext.disabled.value);
@@ -159,10 +159,14 @@ const step = computed(() => normalizeDateStep(props));
159
159
 
160
160
  const inferredGranularity = computed(() => {
161
161
  if (props.granularity) {
162
- return !hasTime(placeholder.value) ? 'day' : props.granularity;
162
+ return !hasTime(placeholder.value)
163
+ ? 'day'
164
+ : props.granularity;
163
165
  }
164
166
 
165
- return hasTime(placeholder.value) ? 'minute' : 'day';
167
+ return hasTime(placeholder.value)
168
+ ? 'minute'
169
+ : 'day';
166
170
  });
167
171
 
168
172
  const isStartInvalid = computed(() => {
@@ -234,8 +238,16 @@ const isInvalid = computed(() => {
234
238
 
235
239
  const initialSegments = initializeSegmentValues(inferredGranularity.value);
236
240
 
237
- const startSegmentValues = ref<SegmentValueObj>(modelValue.value?.start ? { ...syncSegmentValues({ value: modelValue.value.start, formatter }) } : { ...initialSegments });
238
- const endSegmentValues = ref<SegmentValueObj>(modelValue.value?.end ? { ...syncSegmentValues({ value: modelValue.value.end, formatter }) } : { ...initialSegments });
241
+ const startSegmentValues = ref<SegmentValueObj>(modelValue.value?.start
242
+ ? {
243
+ ...syncSegmentValues({ value: modelValue.value.start, formatter }),
244
+ }
245
+ : { ...initialSegments });
246
+ const endSegmentValues = ref<SegmentValueObj>(modelValue.value?.end
247
+ ? {
248
+ ...syncSegmentValues({ value: modelValue.value.end, formatter }),
249
+ }
250
+ : { ...initialSegments });
239
251
 
240
252
  const startSegmentContent = computed(() => createContent({
241
253
  granularity: inferredGranularity.value,
@@ -262,13 +274,19 @@ const segmentContents = computed(() => ({
262
274
  end: endSegmentContent.value.arr,
263
275
  }));
264
276
 
265
- const editableSegmentContents = computed(() => ({ start: segmentContents.value.start.filter(({ part }) => part !== 'literal'), end: segmentContents.value.end.filter(({ part }) => part !== 'literal') }));
277
+ const editableSegmentContents = computed(() => ({
278
+ start: segmentContents.value.start.filter(({ part }) => part !== 'literal'),
279
+ end: segmentContents.value.end.filter(({ part }) => part !== 'literal'),
280
+ }));
266
281
 
267
282
  const startValue = ref(modelValue.value?.start?.copy()) as Ref<DateValue | undefined>;
268
283
  const endValue = ref(modelValue.value?.end?.copy()) as Ref<DateValue | undefined>;
269
284
 
270
285
  watch([startValue, endValue], ([_startValue, _endValue]) => {
271
- modelValue.value = { start: _startValue?.copy(), end: _endValue?.copy() };
286
+ modelValue.value = {
287
+ start: _startValue?.copy(),
288
+ end: _endValue?.copy(),
289
+ };
272
290
  });
273
291
 
274
292
  watch(modelValue, (_modelValue) => {
@@ -289,7 +307,9 @@ watch(modelValue, (_modelValue) => {
289
307
 
290
308
  watch([startValue, locale], ([_startValue]) => {
291
309
  if (_startValue !== undefined) {
292
- startSegmentValues.value = { ...syncSegmentValues({ value: _startValue, formatter }) };
310
+ startSegmentValues.value = {
311
+ ...syncSegmentValues({ value: _startValue, formatter }),
312
+ };
293
313
  } else if (Object.values(startSegmentValues.value).every((value) => value !== null) && _startValue === undefined) {
294
314
  // If segment has null value, means that user modified it, thus do not reset the segmentValues
295
315
  startSegmentValues.value = { ...initialSegments };
@@ -318,7 +338,9 @@ watch(modelValue, (_modelValue) => {
318
338
 
319
339
  watch([endValue, locale], ([_endValue]) => {
320
340
  if (_endValue !== undefined) {
321
- endSegmentValues.value = { ...syncSegmentValues({ value: _endValue, formatter }) };
341
+ endSegmentValues.value = {
342
+ ...syncSegmentValues({ value: _endValue, formatter }),
343
+ };
322
344
  } else if (Object.values(endSegmentValues.value).every((value) => value !== null) && _endValue === undefined) {
323
345
  // If segment has null value, means that user modified it, thus do not reset the segmentValues
324
346
  endSegmentValues.value = { ...initialSegments };
@@ -200,7 +200,10 @@ provideDateRangePickerRootContext({
200
200
  emits('update:startValue', date);
201
201
  },
202
202
  onDateChange(date: DateRange) {
203
- modelValue.value = { start: date.start?.copy(), end: date.end?.copy() };
203
+ modelValue.value = {
204
+ start: date.start?.copy(),
205
+ end: date.end?.copy(),
206
+ };
204
207
  },
205
208
  onPlaceholderChange(date: DateValue) {
206
209
  placeholder.value = date.copy();
@@ -25,7 +25,7 @@ export function useWarning({
25
25
 
26
26
  If you want to hide the \`${titleName}\`, you can wrap it with our VisuallyHidden component.
27
27
 
28
- For more information, see https://akar.vinicunca.dev/docs/components/${componentLink}`;
28
+ For more information, see https://vinicunca.dev/akar/components/${componentLink}`;
29
29
 
30
30
  const DESCRIPTION_MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${contentName}.`;
31
31
 
@@ -175,7 +175,11 @@ onKeyStroke('Escape', (event) => {
175
175
  // layer would re-run this effect and its cleanup could prematurely restore the
176
176
  // body's `pointer-events` while an ancestor layer is still open (#2674).
177
177
  watch(
178
- [layerElement, () => props.disableOutsidePointerEvents, () => props.present],
178
+ [
179
+ layerElement,
180
+ () => props.disableOutsidePointerEvents,
181
+ () => props.present,
182
+ ],
179
183
  ([element, disableOutsidePointerEvents, present], _, onCleanup) => {
180
184
  if (!element || !present) {
181
185
  return;
@@ -207,7 +211,10 @@ watch(
207
211
  // Kept separate from the pointer-events watch above so a
208
212
  // `disableOutsidePointerEvents` toggle alone never re-orders the stack.
209
213
  watch(
210
- [layerElement, () => props.present],
214
+ [
215
+ layerElement,
216
+ () => props.present,
217
+ ],
211
218
  ([element, present], _, onCleanup) => {
212
219
  if (!element || !present) {
213
220
  return;
@@ -1,6 +1,6 @@
1
1
  import { reactive } from 'vue';
2
2
 
3
- // Module-level registry shared by every `DismissableLayer` in the app.
3
+ /** Module-level registry shared by every `DismissableLayer` in the app. */
4
4
  export const context = reactive({
5
5
  layersRoot: new Set<HTMLElement>(),
6
6
  layersWithOutsidePointerEventsDisabled: new Set<HTMLElement>(),
@@ -54,6 +54,7 @@ export function isLayerExist(layerElement: HTMLElement, targetElement: HTMLEleme
54
54
  layerElement.ownerDocument.querySelectorAll('[data-dismissable-layer]'),
55
55
  );
56
56
 
57
+ // eslint-disable-next-line sonarjs/prefer-single-boolean-return
57
58
  if (targetLayer && (mainLayer === targetLayer || nodeList.indexOf(mainLayer) < nodeList.indexOf(targetLayer))) {
58
59
  return true;
59
60
  } else {
@@ -88,7 +88,9 @@ function writeSnapPointOffset() {
88
88
  const offset = activeSnapPointOffset.value;
89
89
  if (offset != null) {
90
90
  const dir = rootContext.swipeDirection.value;
91
- const signedOffset = (dir === 'up' || dir === 'left') ? -offset : offset;
91
+ const signedOffset = (dir === 'up' || dir === 'left')
92
+ ? -offset
93
+ : offset;
92
94
  el.style.setProperty(DRAWER_CSS_VARS.snapPointOffset, `${signedOffset}px`);
93
95
  } else {
94
96
  el.style.setProperty(DRAWER_CSS_VARS.snapPointOffset, '0px');
@@ -125,7 +127,12 @@ const swipeDirections = computed<Array<SwipeDirection>>(() => {
125
127
  return [dismiss];
126
128
  }
127
129
  // Allow swiping in both directions for snap point navigation
128
- const opposite: Record<string, SwipeDirection> = { up: 'down', down: 'up', left: 'right', right: 'left' };
130
+ const opposite: Record<string, SwipeDirection> = {
131
+ up: 'down',
132
+ down: 'up',
133
+ left: 'right',
134
+ right: 'left',
135
+ };
129
136
  return [dismiss, opposite[dismiss]];
130
137
  });
131
138
 
@@ -168,9 +175,15 @@ const { isSwiping, restore: restoreSwipe } = useSwipeDismiss({
168
175
  const el = currentElement.value;
169
176
  if (el) {
170
177
  const dir = rootContext.swipeDirection.value;
171
- const size = (dir === 'left' || dir === 'right') ? el.offsetWidth : el.offsetHeight;
172
- const axisDelta = (dir === 'left' || dir === 'right') ? lastRawDelta.x : lastRawDelta.y;
173
- const releaseVelocity = (dir === 'left' || dir === 'right') ? velocity.x : velocity.y;
178
+ const size = (dir === 'left' || dir === 'right')
179
+ ? el.offsetWidth
180
+ : el.offsetHeight;
181
+ const axisDelta = (dir === 'left' || dir === 'right')
182
+ ? lastRawDelta.x
183
+ : lastRawDelta.y;
184
+ const releaseVelocity = (dir === 'left' || dir === 'right')
185
+ ? velocity.x
186
+ : velocity.y;
174
187
  const scalar = computeSwipeReleaseScalar({
175
188
  direction: dir,
176
189
  size,
@@ -29,7 +29,9 @@ onMounted(() => {
29
29
 
30
30
  const sync = () => {
31
31
  const { swipeProgress, frontmostHeight } = store.getSnapshot();
32
- el.style.setProperty(DRAWER_CSS_VARS.swipeProgress, swipeProgress > 0 ? `${swipeProgress}` : '0');
32
+ el.style.setProperty(DRAWER_CSS_VARS.swipeProgress, swipeProgress > 0
33
+ ? `${swipeProgress}`
34
+ : '0');
33
35
  if (frontmostHeight > 0) {
34
36
  el.style.setProperty(DRAWER_CSS_VARS.height, `${frontmostHeight}px`);
35
37
  } else {
@@ -34,11 +34,15 @@ function createVisualStateStore(): DrawerVisualStateStore {
34
34
  set(next) {
35
35
  // eslint-disable-next-line no-nested-ternary
36
36
  const nextProgress = next.swipeProgress !== undefined
37
- ? (Number.isFinite(next.swipeProgress) ? next.swipeProgress : 0)
37
+ ? (Number.isFinite(next.swipeProgress)
38
+ ? next.swipeProgress
39
+ : 0)
38
40
  : state.swipeProgress;
39
41
  // eslint-disable-next-line no-nested-ternary
40
42
  const nextHeight = next.frontmostHeight !== undefined
41
- ? (Number.isFinite(next.frontmostHeight) ? next.frontmostHeight : 0)
43
+ ? (Number.isFinite(next.frontmostHeight)
44
+ ? next.frontmostHeight
45
+ : 0)
42
46
  : state.frontmostHeight;
43
47
  if (nextProgress === state.swipeProgress && nextHeight === state.frontmostHeight) {
44
48
  return;
@@ -18,7 +18,9 @@ export interface ResolvedSnapPoint {
18
18
  function parseSnapPoint(value: DrawerSnapPoint, viewportHeight: number, rootFontSize: number): number | null {
19
19
  let result: number | null = null;
20
20
  if (typeof value === 'number') {
21
- result = (value >= 0 && value <= 1) ? value * viewportHeight : value;
21
+ result = (value >= 0 && value <= 1)
22
+ ? value * viewportHeight
23
+ : value;
22
24
  } else if (value.endsWith('rem')) {
23
25
  result = Number.parseFloat(value) * rootFontSize;
24
26
  } else if (value.endsWith('px')) {
@@ -42,7 +44,9 @@ export function useDrawerSnapPoints(options: {
42
44
  }) {
43
45
  const { snapPoints, activeSnapPoint, popupHeight, onSnapPointChange } = options;
44
46
 
45
- const viewportHeight = ref(typeof window !== 'undefined' ? window.innerHeight : 0);
47
+ const viewportHeight = ref(typeof window !== 'undefined'
48
+ ? window.innerHeight
49
+ : 0);
46
50
  const rootFontSize = ref(
47
51
  typeof document !== 'undefined'
48
52
  ? Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16
@@ -74,7 +78,11 @@ export function useDrawerSnapPoints(options: {
74
78
  continue;
75
79
  }
76
80
  const clampedHeight = Math.min(height, Math.min(ph, vh));
77
- resolved.push({ value: pt, height: clampedHeight, offset: Math.max(0, ph - clampedHeight) });
81
+ resolved.push({
82
+ value: pt,
83
+ height: clampedHeight,
84
+ offset: Math.max(0, ph - clampedHeight),
85
+ });
78
86
  }
79
87
  return resolved.sort((a, b) => a.height - b.height);
80
88
  });
@@ -128,8 +136,12 @@ export function useDrawerSnapPoints(options: {
128
136
  // Convert raw velocity into a dismiss-signed scalar:
129
137
  // positive = moving in dismiss direction (collapsing)
130
138
  // negative = moving in open direction (expanding)
131
- const axisVel = (direction === 'up' || direction === 'down') ? velocity.y : velocity.x;
132
- const velSigned = (direction === 'up' || direction === 'left') ? -axisVel : axisVel;
139
+ const axisVel = (direction === 'up' || direction === 'down')
140
+ ? velocity.y
141
+ : velocity.x;
142
+ const velSigned = (direction === 'up' || direction === 'left')
143
+ ? -axisVel
144
+ : axisVel;
133
145
 
134
146
  // Current offset (from fully open): 0 = fully open, `ph` = fully closed.
135
147
  // Match by value OR parsed-height equivalence so equivalent representations
@@ -171,7 +183,9 @@ export function useDrawerSnapPoints(options: {
171
183
  // if (a) velocity direction matches drag direction and is fast enough, OR
172
184
  // (b) the projected target has physically crossed the adjacent snap.
173
185
  const sorted = [...points].sort((a, b) => a.offset - b.offset);
174
- const currentIdx = activePoint ? sorted.indexOf(activePoint) : -1;
186
+ const currentIdx = activePoint
187
+ ? sorted.indexOf(activePoint)
188
+ : -1;
175
189
  if (currentIdx < 0) {
176
190
  onSnapPointChange(closest.value);
177
191
  return;
@@ -191,7 +205,9 @@ export function useDrawerSnapPoints(options: {
191
205
  const crossed = dragDir > 0
192
206
  ? targetOffset > adjacent.offset
193
207
  : targetOffset < adjacent.offset;
194
- onSnapPointChange(crossed ? adjacent.value : (activeSnapPoint.value ?? closest.value));
208
+ onSnapPointChange(crossed
209
+ ? adjacent.value
210
+ : (activeSnapPoint.value ?? closest.value));
195
211
  return;
196
212
  }
197
213
 
@@ -87,21 +87,29 @@ export function resolveKeyboardInputTarget(target: EventTarget | null): HTMLElem
87
87
  }
88
88
 
89
89
  if (isKeyboardInputElement(target)) {
90
- return target.isContentEditable ? getContentEditableHost(target) : target;
90
+ return target.isContentEditable
91
+ ? getContentEditableHost(target)
92
+ : target;
91
93
  }
92
94
 
93
95
  const control = (target.closest('label') as HTMLLabelElement | null)?.control;
94
- return control instanceof HTMLElement && isKeyboardInputElement(control) ? control : null;
96
+ return control instanceof HTMLElement && isKeyboardInputElement(control)
97
+ ? control
98
+ : null;
95
99
  }
96
100
 
97
101
  function resolveKeyboardTouchTarget(target: EventTarget | null): KeyboardTouchTarget | null {
98
102
  const focusTarget = resolveKeyboardInputTarget(target);
99
- return focusTarget ? { focusTarget, clickTarget: target as HTMLElement } : null;
103
+ return focusTarget
104
+ ? { focusTarget, clickTarget: target as HTMLElement }
105
+ : null;
100
106
  }
101
107
 
102
108
  function getElementAtPoint(root: Node, x: number, y: number): Element | null {
103
109
  const elementFromPoint = (root as Partial<Document>).elementFromPoint;
104
- return typeof elementFromPoint === 'function' ? elementFromPoint.call(root, x, y) : null;
110
+ return typeof elementFromPoint === 'function'
111
+ ? elementFromPoint.call(root, x, y)
112
+ : null;
105
113
  }
106
114
 
107
115
  /**
@@ -206,7 +214,9 @@ function isVerticallyScrollable(element: HTMLElement, allowOverflowIntent: boole
206
214
  return false;
207
215
  }
208
216
  // With intent, a container that overflows only once slack is added counts too.
209
- return allowOverflowIntent ? element.clientHeight > 0 : element.scrollHeight > element.clientHeight;
217
+ return allowOverflowIntent
218
+ ? element.clientHeight > 0
219
+ : element.scrollHeight > element.clientHeight;
210
220
  }
211
221
 
212
222
  /** The parent in the flat tree: crosses slots and shadow roots. */
@@ -215,7 +225,9 @@ function getParentNode(node: Node): Node | null {
215
225
  return node.assignedSlot;
216
226
  }
217
227
  const parent = node.parentNode;
218
- return parent instanceof ShadowRoot ? parent.host : parent;
228
+ return parent instanceof ShadowRoot
229
+ ? parent.host
230
+ : parent;
219
231
  }
220
232
 
221
233
  function findScrollableAncestor(
@@ -230,7 +242,9 @@ function findScrollableAncestor(
230
242
  }
231
243
  node = getParentNode(node);
232
244
  }
233
- return isVerticallyScrollable(root, allowOverflowIntent) ? root : null;
245
+ return isVerticallyScrollable(root, allowOverflowIntent)
246
+ ? root
247
+ : null;
234
248
  }
235
249
 
236
250
  /**
@@ -331,7 +345,10 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
331
345
  function animateScroll(element: HTMLElement, scrollTop: number) {
332
346
  const win = element.ownerDocument.defaultView ?? window;
333
347
  const reducedMotion = win.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches;
334
- element.scrollTo?.({ top: scrollTop, behavior: reducedMotion ? 'auto' : 'smooth' });
348
+ element.scrollTo?.({
349
+ top: scrollTop,
350
+ behavior: reducedMotion ? 'auto' : 'smooth',
351
+ });
335
352
  }
336
353
 
337
354
  function cancelPendingAlignment() {
@@ -403,7 +420,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
403
420
  return {
404
421
  top,
405
422
  // Fixed content already sits above the keyboard, so an inset would lift it twice.
406
- bottom: layoutFollowsKeyboard ? layoutHeight : Math.min(layoutHeight, top + visualHeight),
423
+ bottom: layoutFollowsKeyboard
424
+ ? layoutHeight
425
+ : Math.min(layoutHeight, top + visualHeight),
407
426
  resizing: layoutFollowsKeyboard && Math.abs(layoutHeight - visualHeight) >= 1,
408
427
  };
409
428
  }
@@ -541,7 +560,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
541
560
  if (!settled) {
542
561
  // Commit only once the destination holds across two checks — layout may
543
562
  // still be transitioning, and a mid-transition destination overshoots.
544
- const checks = scrollElement === scrollTarget ? scrollChecks + 1 : 1;
563
+ const checks = scrollElement === scrollTarget
564
+ ? scrollChecks + 1
565
+ : 1;
545
566
  scrollElement = scrollTarget;
546
567
  scrollDestination = destination;
547
568
  scrollChecks = checks;
@@ -590,7 +611,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
590
611
  const pass = () => {
591
612
  align();
592
613
  remaining -= 1;
593
- realignTimer = remaining > 0 ? setTimeout(pass, KEYBOARD_REALIGN_INTERVAL) : undefined;
614
+ realignTimer = remaining > 0
615
+ ? setTimeout(pass, KEYBOARD_REALIGN_INTERVAL)
616
+ : undefined;
594
617
  };
595
618
  realignTimer = setTimeout(pass, KEYBOARD_REALIGN_INTERVAL);
596
619
  }
@@ -671,7 +694,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
671
694
  function onTouchStart(event: TouchEvent) {
672
695
  const touch = event.touches[0];
673
696
  touchMoved = false;
674
- touchStart = touch ? { x: touch.clientX, y: touch.clientY } : null;
697
+ touchStart = touch
698
+ ? { x: touch.clientX, y: touch.clientY }
699
+ : null;
675
700
  }
676
701
 
677
702
  function onTouchMove(event: TouchEvent) {
@@ -190,7 +190,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
190
190
  if (typeof swipeThresholdProp === 'function') {
191
191
  return Math.max(0, swipeThresholdProp({ element: el, direction: dir }));
192
192
  }
193
- return typeof swipeThresholdProp === 'number' ? swipeThresholdProp : DEFAULT_SWIPE_THRESHOLD;
193
+ return typeof swipeThresholdProp === 'number'
194
+ ? swipeThresholdProp
195
+ : DEFAULT_SWIPE_THRESHOLD;
194
196
  }
195
197
 
196
198
  function setSwiping(next: boolean) {
@@ -277,7 +279,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
277
279
  * Ported from BaseUI `useSwipeDismiss.ts:applyDirectionalDamping`.
278
280
  */
279
281
  function applyDirectionalDamping(deltaX: number, deltaY: number) {
280
- const exponent = (value: number) => (value >= 0 ? value ** 0.5 : -((Math.abs(value)) ** 0.5));
282
+ const exponent = (value: number) => (value >= 0
283
+ ? value ** 0.5
284
+ : -((Math.abs(value)) ** 0.5));
281
285
  const dampAxis = (delta: number, allowNegative: boolean, allowPositive: boolean) => {
282
286
  if (!allowNegative && delta < 0) {
283
287
  return exponent(delta);
@@ -320,8 +324,12 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
320
324
  }
321
325
 
322
326
  const isVerticalDrawerAxis = drawerAxis.value === 'vertical';
323
- const drawerAxisDelta = isVerticalDrawerAxis ? pos.y - dragStartPos.y : pos.x - dragStartPos.x;
324
- const crossAxisDelta = isVerticalDrawerAxis ? pos.x - dragStartPos.x : pos.y - dragStartPos.y;
327
+ const drawerAxisDelta = isVerticalDrawerAxis
328
+ ? pos.y - dragStartPos.y
329
+ : pos.x - dragStartPos.x;
330
+ const crossAxisDelta = isVerticalDrawerAxis
331
+ ? pos.x - dragStartPos.x
332
+ : pos.y - dragStartPos.y;
325
333
  const absDrawerAxisDelta = Math.abs(drawerAxisDelta);
326
334
  const absCrossAxisDelta = Math.abs(crossAxisDelta);
327
335
 
@@ -354,7 +362,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
354
362
  const absX = Math.abs(rawDx);
355
363
  const absY = Math.abs(rawDy);
356
364
  if (hasVertical.value && hasHorizontal.value) {
357
- lockedAxis = absX > absY ? 'horizontal' : 'vertical';
365
+ lockedAxis = absX > absY
366
+ ? 'horizontal'
367
+ : 'vertical';
358
368
  } else if (hasVertical.value) {
359
369
  lockedAxis = 'vertical';
360
370
  } else {
@@ -363,8 +373,12 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
363
373
  }
364
374
 
365
375
  // Axis-locked deltas for direction detection
366
- const dx = lockedAxis === 'vertical' ? 0 : rawDx;
367
- const dy = lockedAxis === 'horizontal' ? 0 : rawDy;
376
+ const dx = lockedAxis === 'vertical'
377
+ ? 0
378
+ : rawDx;
379
+ const dy = lockedAxis === 'horizontal'
380
+ ? 0
381
+ : rawDy;
368
382
 
369
383
  const dir: SwipeDirection | undefined = toValue(directions).find((d) => getDisplacement(d, dx, dy) > 0);
370
384
 
@@ -456,8 +470,12 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
456
470
  const threshold = getThreshold(el, intendedDirection ?? toValue(directions)[0]);
457
471
 
458
472
  const now = performance.now();
459
- const velAge = lastDragSample ? now - lastDragSample.time : Infinity;
460
- const velocity = velAge > MAX_RELEASE_VELOCITY_AGE_MS ? { x: 0, y: 0 } : lastVelocity;
473
+ const velAge = lastDragSample
474
+ ? now - lastDragSample.time
475
+ : Infinity;
476
+ const velocity = velAge > MAX_RELEASE_VELOCITY_AGE_MS
477
+ ? { x: 0, y: 0 }
478
+ : lastVelocity;
461
479
 
462
480
  // When onRelease returns true (snap-point release), it owns the open/close
463
481
  // and transform outcome — don't run the dismiss-vs-cancel branch, which
@@ -631,7 +649,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
631
649
  // on `ignoreScrollableAncestors`: that option is about starting a swipe from
632
650
  // inside a scroller on the dismiss axis.
633
651
  if (drawerAxis.value) {
634
- const crossAxis = drawerAxis.value === 'vertical' ? 'horizontal' : 'vertical';
652
+ const crossAxis = drawerAxis.value === 'vertical'
653
+ ? 'horizontal'
654
+ : 'vertical';
635
655
  crossAxisScrollable = findScrollableAncestor(target, crossAxis);
636
656
  }
637
657
 
@@ -104,14 +104,18 @@ export function computeSwipeReleaseScalar(params: {
104
104
 
105
105
  const translation = baseOffset + axisDelta;
106
106
  const translationAlongDirection
107
- = (direction === 'left' || direction === 'up') ? -translation : translation;
107
+ = (direction === 'left' || direction === 'up')
108
+ ? -translation
109
+ : translation;
108
110
  const remainingDistance = Math.max(0, size - translationAlongDirection);
109
111
  if (!Number.isFinite(remainingDistance) || remainingDistance <= 0) {
110
112
  return null;
111
113
  }
112
114
 
113
115
  const directionalVelocity
114
- = (direction === 'left' || direction === 'up') ? -releaseVelocity : releaseVelocity;
116
+ = (direction === 'left' || direction === 'up')
117
+ ? -releaseVelocity
118
+ : releaseVelocity;
115
119
  if (!Number.isFinite(directionalVelocity) || directionalVelocity <= MIN_SWIPE_RELEASE_VELOCITY) {
116
120
  return null;
117
121
  }
@@ -194,7 +198,12 @@ export function registerDrawerCssProperties() {
194
198
  ];
195
199
  for (const name of lengthVars) {
196
200
  try {
197
- CSS.registerProperty({ name, syntax: '<length>', inherits: false, initialValue: '0px' });
201
+ CSS.registerProperty({
202
+ name,
203
+ syntax: '<length>',
204
+ inherits: false,
205
+ initialValue: '0px',
206
+ });
198
207
  } catch {}
199
208
  }
200
209
 
@@ -204,7 +213,12 @@ export function registerDrawerCssProperties() {
204
213
  ];
205
214
  for (const { name, initialValue } of numberVars) {
206
215
  try {
207
- CSS.registerProperty({ name, syntax: '<number>', inherits: false, initialValue });
216
+ CSS.registerProperty({
217
+ name,
218
+ syntax: '<number>',
219
+ inherits: false,
220
+ initialValue,
221
+ });
208
222
  } catch {}
209
223
  }
210
224
 
@@ -143,7 +143,9 @@ const { primitiveElement, currentElement } = usePrimitiveElement();
143
143
  const isFormControl = useFormControl(currentElement);
144
144
 
145
145
  const placeholder = computed(() => {
146
- return isString(propPlaceholder.value) ? { edit: propPlaceholder.value, preview: propPlaceholder.value } : propPlaceholder.value;
146
+ return isString(propPlaceholder.value)
147
+ ? { edit: propPlaceholder.value, preview: propPlaceholder.value }
148
+ : propPlaceholder.value;
147
149
  });
148
150
 
149
151
  const inputValue = ref(modelValue.value);