@rupe/v-datepicker 1.0.0-alpha.0 → 1.0.0-alpha.1

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 (513) hide show
  1. package/dist/components/Calendar/CalendarCell.vue.d.ts +18 -0
  2. package/dist/components/Calendar/{CalendarCellTrigger.d.ts → CalendarCellTrigger.vue.d.ts} +15 -14
  3. package/dist/components/Calendar/CalendarGrid.vue.d.ts +14 -0
  4. package/dist/components/Calendar/CalendarGridBody.vue.d.ts +14 -0
  5. package/dist/components/Calendar/CalendarGridHead.vue.d.ts +14 -0
  6. package/dist/components/Calendar/CalendarGridRow.vue.d.ts +14 -0
  7. package/dist/components/Calendar/CalendarHeadCell.vue.d.ts +14 -0
  8. package/dist/components/Calendar/CalendarHeader.vue.d.ts +14 -0
  9. package/dist/components/Calendar/CalendarHeading.vue.d.ts +22 -0
  10. package/dist/components/Calendar/CalendarMonthHeading.vue.d.ts +23 -0
  11. package/dist/components/Calendar/{CalendarMonthYearOverlay.d.ts → CalendarMonthYearOverlay.vue.d.ts} +5 -3
  12. package/dist/components/Calendar/{CalendarNext.d.ts → CalendarNext.vue.d.ts} +5 -4
  13. package/dist/components/Calendar/{CalendarOverlayItem.d.ts → CalendarOverlayItem.vue.d.ts} +5 -4
  14. package/dist/components/Calendar/{CalendarPrev.d.ts → CalendarPrev.vue.d.ts} +5 -4
  15. package/dist/components/Calendar/{CalendarRoot.d.ts → CalendarRoot.vue.d.ts} +16 -16
  16. package/dist/components/Calendar/CalendarYearHeading.vue.d.ts +23 -0
  17. package/dist/components/Calendar/index.d.ts +15 -15
  18. package/dist/components/Calendar/useCalendar.d.ts +12 -11
  19. package/dist/components/ConfigProvider/{ConfigProvider.d.ts → ConfigProvider.vue.d.ts} +3 -3
  20. package/dist/components/ConfigProvider/index.d.ts +1 -1
  21. package/dist/components/DateField/DateFieldInput.vue.d.ts +16 -0
  22. package/dist/components/DateField/{DateFieldRoot.d.ts → DateFieldRoot.vue.d.ts} +16 -16
  23. package/dist/components/DateField/index.d.ts +2 -2
  24. package/dist/components/DatePicker/DatePickerAnchor.vue.d.ts +13 -0
  25. package/dist/components/DatePicker/DatePickerArrow.vue.d.ts +13 -0
  26. package/dist/components/DatePicker/DatePickerCalendar.vue.d.ts +19 -0
  27. package/dist/components/DatePicker/DatePickerCell.vue.d.ts +12 -0
  28. package/dist/components/DatePicker/DatePickerCellTrigger.vue.d.ts +11 -0
  29. package/dist/components/DatePicker/DatePickerClose.vue.d.ts +13 -0
  30. package/dist/components/DatePicker/DatePickerContent.vue.d.ts +33 -0
  31. package/dist/components/DatePicker/DatePickerField.vue.d.ts +18 -0
  32. package/dist/components/DatePicker/DatePickerGrid.vue.d.ts +13 -0
  33. package/dist/components/DatePicker/DatePickerGridBody.vue.d.ts +13 -0
  34. package/dist/components/DatePicker/DatePickerGridHead.vue.d.ts +13 -0
  35. package/dist/components/DatePicker/DatePickerGridRow.vue.d.ts +13 -0
  36. package/dist/components/DatePicker/DatePickerHeadCell.vue.d.ts +13 -0
  37. package/dist/components/DatePicker/DatePickerHeader.vue.d.ts +13 -0
  38. package/dist/components/DatePicker/{DatePickerHeading.d.ts → DatePickerHeading.vue.d.ts} +3 -1
  39. package/dist/components/DatePicker/DatePickerInput.vue.d.ts +12 -0
  40. package/dist/components/DatePicker/DatePickerMonthHeading.vue.d.ts +14 -0
  41. package/dist/components/DatePicker/{DatePickerMonthYearOverlay.d.ts → DatePickerMonthYearOverlay.vue.d.ts} +4 -2
  42. package/dist/components/DatePicker/DatePickerNext.vue.d.ts +11 -0
  43. package/dist/components/DatePicker/{DatePickerOverlayItem.d.ts → DatePickerOverlayItem.vue.d.ts} +3 -2
  44. package/dist/components/DatePicker/DatePickerPrev.vue.d.ts +11 -0
  45. package/dist/components/DatePicker/{DatePickerRoot.d.ts → DatePickerRoot.vue.d.ts} +4 -4
  46. package/dist/components/DatePicker/DatePickerTrigger.vue.d.ts +13 -0
  47. package/dist/components/DatePicker/DatePickerYearHeading.vue.d.ts +14 -0
  48. package/dist/components/DatePicker/index.d.ts +24 -24
  49. package/dist/components/DismissableLayer/{DismissableLayer.d.ts → DismissableLayer.vue.d.ts} +4 -3
  50. package/dist/components/DismissableLayer/DismissableLayerBranch.vue.d.ts +12 -0
  51. package/dist/components/DismissableLayer/index.d.ts +2 -2
  52. package/dist/components/FocusScope/{FocusScope.d.ts → FocusScope.vue.d.ts} +15 -14
  53. package/dist/components/FocusScope/index.d.ts +1 -1
  54. package/dist/components/Popover/PopoverAnchor.vue.d.ts +12 -0
  55. package/dist/components/Popover/PopoverArrow.vue.d.ts +17 -0
  56. package/dist/components/Popover/PopoverClose.vue.d.ts +14 -0
  57. package/dist/components/Popover/PopoverContent.vue.d.ts +34 -0
  58. package/dist/components/Popover/{PopoverContentImpl.d.ts → PopoverContentImpl.vue.d.ts} +11 -10
  59. package/dist/components/Popover/PopoverContentNonModal.vue.d.ts +34 -0
  60. package/dist/components/Popover/PopoverPortal.vue.d.ts +12 -0
  61. package/dist/components/Popover/{PopoverRoot.d.ts → PopoverRoot.vue.d.ts} +4 -4
  62. package/dist/components/Popover/PopoverTrigger.vue.d.ts +14 -0
  63. package/dist/components/Popover/index.d.ts +7 -7
  64. package/dist/components/Popper/{PopperAnchor.d.ts → PopperAnchor.vue.d.ts} +2 -1
  65. package/dist/components/Popper/PopperArrow.vue.d.ts +16 -0
  66. package/dist/components/Popper/{PopperContent.d.ts → PopperContent.vue.d.ts} +4 -4
  67. package/dist/components/Popper/{PopperRoot.d.ts → PopperRoot.vue.d.ts} +2 -2
  68. package/dist/components/Popper/index.d.ts +4 -4
  69. package/dist/components/Presence/Presence.d.ts +5 -5
  70. package/dist/components/Presence/usePresence.d.ts +2 -2
  71. package/dist/components/Primitive/Primitive.d.ts +5 -5
  72. package/dist/components/Primitive/Slot.d.ts +4 -3
  73. package/dist/components/Primitive/usePrimitiveElement.d.ts +3 -3
  74. package/dist/components/Teleport/{Teleport.d.ts → Teleport.vue.d.ts} +3 -2
  75. package/dist/components/Teleport/index.d.ts +1 -1
  76. package/dist/components/VisuallyHidden/VisuallyHidden.vue.d.ts +17 -0
  77. package/dist/components/VisuallyHidden/{VisuallyHiddenInput.d.ts → VisuallyHiddenInput.vue.d.ts} +5 -4
  78. package/dist/components/VisuallyHidden/{VisuallyHiddenInputBubble.d.ts → VisuallyHiddenInputBubble.vue.d.ts} +5 -4
  79. package/dist/components/VisuallyHidden/index.d.ts +2 -2
  80. package/dist/index.cjs +1662 -5525
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.ts +553 -25
  83. package/dist/index.mjs +5218 -0
  84. package/dist/index.mjs.map +1 -0
  85. package/dist/shared/component/{Arrow.d.ts → Arrow.vue.d.ts} +5 -4
  86. package/dist/shared/component/{BaseSeparator.d.ts → BaseSeparator.vue.d.ts} +3 -2
  87. package/dist/shared/component/index.d.ts +2 -2
  88. package/dist/shared/date/useDateField.d.ts +2 -2
  89. package/dist/shared/useDirection.d.ts +2 -2
  90. package/dist/shared/useForwardExpose.d.ts +3 -3
  91. package/dist/shared/useForwardProps.d.ts +2 -2
  92. package/dist/shared/useForwardPropsEmits.d.ts +2 -2
  93. package/dist/shared/useIsUsingKeyboard.d.ts +2 -1
  94. package/dist/shared/useLocale.d.ts +2 -2
  95. package/dist/shared/useNonce.d.ts +2 -2
  96. package/dist/shared/useSize.d.ts +3 -2
  97. package/package.json +10 -5
  98. package/src/index.ts +3 -26
  99. package/dist/components/Calendar/CalendarCell.d.ts +0 -17
  100. package/dist/components/Calendar/CalendarCell.vue.js +0 -34
  101. package/dist/components/Calendar/CalendarCell.vue.js.map +0 -1
  102. package/dist/components/Calendar/CalendarCell.vue2.js +0 -5
  103. package/dist/components/Calendar/CalendarCell.vue2.js.map +0 -1
  104. package/dist/components/Calendar/CalendarCellTrigger.vue.js +0 -159
  105. package/dist/components/Calendar/CalendarCellTrigger.vue.js.map +0 -1
  106. package/dist/components/Calendar/CalendarCellTrigger.vue2.js +0 -5
  107. package/dist/components/Calendar/CalendarCellTrigger.vue2.js.map +0 -1
  108. package/dist/components/Calendar/CalendarGrid.d.ts +0 -13
  109. package/dist/components/Calendar/CalendarGrid.vue.js +0 -40
  110. package/dist/components/Calendar/CalendarGrid.vue.js.map +0 -1
  111. package/dist/components/Calendar/CalendarGrid.vue2.js +0 -5
  112. package/dist/components/Calendar/CalendarGrid.vue2.js.map +0 -1
  113. package/dist/components/Calendar/CalendarGridBody.d.ts +0 -13
  114. package/dist/components/Calendar/CalendarGridBody.vue.js +0 -25
  115. package/dist/components/Calendar/CalendarGridBody.vue.js.map +0 -1
  116. package/dist/components/Calendar/CalendarGridBody.vue2.js +0 -5
  117. package/dist/components/Calendar/CalendarGridBody.vue2.js.map +0 -1
  118. package/dist/components/Calendar/CalendarGridHead.d.ts +0 -13
  119. package/dist/components/Calendar/CalendarGridHead.vue.js +0 -25
  120. package/dist/components/Calendar/CalendarGridHead.vue.js.map +0 -1
  121. package/dist/components/Calendar/CalendarGridHead.vue2.js +0 -5
  122. package/dist/components/Calendar/CalendarGridHead.vue2.js.map +0 -1
  123. package/dist/components/Calendar/CalendarGridRow.d.ts +0 -13
  124. package/dist/components/Calendar/CalendarGridRow.vue.js +0 -25
  125. package/dist/components/Calendar/CalendarGridRow.vue.js.map +0 -1
  126. package/dist/components/Calendar/CalendarGridRow.vue2.js +0 -5
  127. package/dist/components/Calendar/CalendarGridRow.vue2.js.map +0 -1
  128. package/dist/components/Calendar/CalendarHeadCell.d.ts +0 -13
  129. package/dist/components/Calendar/CalendarHeadCell.vue.js +0 -25
  130. package/dist/components/Calendar/CalendarHeadCell.vue.js.map +0 -1
  131. package/dist/components/Calendar/CalendarHeadCell.vue2.js +0 -5
  132. package/dist/components/Calendar/CalendarHeadCell.vue2.js.map +0 -1
  133. package/dist/components/Calendar/CalendarHeader.d.ts +0 -13
  134. package/dist/components/Calendar/CalendarHeader.vue.js +0 -25
  135. package/dist/components/Calendar/CalendarHeader.vue.js.map +0 -1
  136. package/dist/components/Calendar/CalendarHeader.vue2.js +0 -5
  137. package/dist/components/Calendar/CalendarHeader.vue2.js.map +0 -1
  138. package/dist/components/Calendar/CalendarHeading.d.ts +0 -21
  139. package/dist/components/Calendar/CalendarHeading.vue.js +0 -33
  140. package/dist/components/Calendar/CalendarHeading.vue.js.map +0 -1
  141. package/dist/components/Calendar/CalendarHeading.vue2.js +0 -5
  142. package/dist/components/Calendar/CalendarHeading.vue2.js.map +0 -1
  143. package/dist/components/Calendar/CalendarMonthHeading.d.ts +0 -22
  144. package/dist/components/Calendar/CalendarMonthHeading.vue.js +0 -49
  145. package/dist/components/Calendar/CalendarMonthHeading.vue.js.map +0 -1
  146. package/dist/components/Calendar/CalendarMonthHeading.vue2.js +0 -5
  147. package/dist/components/Calendar/CalendarMonthHeading.vue2.js.map +0 -1
  148. package/dist/components/Calendar/CalendarMonthYearOverlay.vue.js +0 -61
  149. package/dist/components/Calendar/CalendarMonthYearOverlay.vue.js.map +0 -1
  150. package/dist/components/Calendar/CalendarMonthYearOverlay.vue2.js +0 -5
  151. package/dist/components/Calendar/CalendarMonthYearOverlay.vue2.js.map +0 -1
  152. package/dist/components/Calendar/CalendarNext.vue.js +0 -42
  153. package/dist/components/Calendar/CalendarNext.vue.js.map +0 -1
  154. package/dist/components/Calendar/CalendarNext.vue2.js +0 -5
  155. package/dist/components/Calendar/CalendarNext.vue2.js.map +0 -1
  156. package/dist/components/Calendar/CalendarOverlayItem.vue.js +0 -34
  157. package/dist/components/Calendar/CalendarOverlayItem.vue.js.map +0 -1
  158. package/dist/components/Calendar/CalendarOverlayItem.vue2.js +0 -5
  159. package/dist/components/Calendar/CalendarOverlayItem.vue2.js.map +0 -1
  160. package/dist/components/Calendar/CalendarPrev.vue.js +0 -42
  161. package/dist/components/Calendar/CalendarPrev.vue.js.map +0 -1
  162. package/dist/components/Calendar/CalendarPrev.vue2.js +0 -5
  163. package/dist/components/Calendar/CalendarPrev.vue2.js.map +0 -1
  164. package/dist/components/Calendar/CalendarRoot.vue.js +0 -253
  165. package/dist/components/Calendar/CalendarRoot.vue.js.map +0 -1
  166. package/dist/components/Calendar/CalendarRoot.vue2.js +0 -8
  167. package/dist/components/Calendar/CalendarRoot.vue2.js.map +0 -1
  168. package/dist/components/Calendar/CalendarYearHeading.d.ts +0 -22
  169. package/dist/components/Calendar/CalendarYearHeading.vue.js +0 -49
  170. package/dist/components/Calendar/CalendarYearHeading.vue.js.map +0 -1
  171. package/dist/components/Calendar/CalendarYearHeading.vue2.js +0 -5
  172. package/dist/components/Calendar/CalendarYearHeading.vue2.js.map +0 -1
  173. package/dist/components/Calendar/useCalendar.js +0 -317
  174. package/dist/components/Calendar/useCalendar.js.map +0 -1
  175. package/dist/components/ConfigProvider/ConfigProvider.vue.js +0 -7
  176. package/dist/components/ConfigProvider/ConfigProvider.vue.js.map +0 -1
  177. package/dist/components/DateField/DateFieldInput.d.ts +0 -15
  178. package/dist/components/DateField/DateFieldInput.vue.js +0 -70
  179. package/dist/components/DateField/DateFieldInput.vue.js.map +0 -1
  180. package/dist/components/DateField/DateFieldInput.vue2.js +0 -5
  181. package/dist/components/DateField/DateFieldInput.vue2.js.map +0 -1
  182. package/dist/components/DateField/DateFieldRoot.vue.js +0 -237
  183. package/dist/components/DateField/DateFieldRoot.vue.js.map +0 -1
  184. package/dist/components/DateField/DateFieldRoot.vue2.js +0 -8
  185. package/dist/components/DateField/DateFieldRoot.vue2.js.map +0 -1
  186. package/dist/components/DatePicker/DatePickerAnchor.d.ts +0 -11
  187. package/dist/components/DatePicker/DatePickerAnchor.vue.js +0 -29
  188. package/dist/components/DatePicker/DatePickerAnchor.vue.js.map +0 -1
  189. package/dist/components/DatePicker/DatePickerAnchor.vue2.js +0 -5
  190. package/dist/components/DatePicker/DatePickerAnchor.vue2.js.map +0 -1
  191. package/dist/components/DatePicker/DatePickerArrow.d.ts +0 -11
  192. package/dist/components/DatePicker/DatePickerArrow.vue.js +0 -31
  193. package/dist/components/DatePicker/DatePickerArrow.vue.js.map +0 -1
  194. package/dist/components/DatePicker/DatePickerArrow.vue2.js +0 -5
  195. package/dist/components/DatePicker/DatePickerArrow.vue2.js.map +0 -1
  196. package/dist/components/DatePicker/DatePickerCalendar.d.ts +0 -17
  197. package/dist/components/DatePicker/DatePickerCalendar.vue.js +0 -60
  198. package/dist/components/DatePicker/DatePickerCalendar.vue.js.map +0 -1
  199. package/dist/components/DatePicker/DatePickerCalendar.vue2.js +0 -5
  200. package/dist/components/DatePicker/DatePickerCalendar.vue2.js.map +0 -1
  201. package/dist/components/DatePicker/DatePickerCell.d.ts +0 -11
  202. package/dist/components/DatePicker/DatePickerCell.vue.js +0 -28
  203. package/dist/components/DatePicker/DatePickerCell.vue.js.map +0 -1
  204. package/dist/components/DatePicker/DatePickerCell.vue2.js +0 -5
  205. package/dist/components/DatePicker/DatePickerCell.vue2.js.map +0 -1
  206. package/dist/components/DatePicker/DatePickerCellTrigger.d.ts +0 -10
  207. package/dist/components/DatePicker/DatePickerCellTrigger.vue.js +0 -29
  208. package/dist/components/DatePicker/DatePickerCellTrigger.vue.js.map +0 -1
  209. package/dist/components/DatePicker/DatePickerCellTrigger.vue2.js +0 -5
  210. package/dist/components/DatePicker/DatePickerCellTrigger.vue2.js.map +0 -1
  211. package/dist/components/DatePicker/DatePickerClose.d.ts +0 -11
  212. package/dist/components/DatePicker/DatePickerClose.vue.js +0 -28
  213. package/dist/components/DatePicker/DatePickerClose.vue.js.map +0 -1
  214. package/dist/components/DatePicker/DatePickerClose.vue2.js +0 -5
  215. package/dist/components/DatePicker/DatePickerClose.vue2.js.map +0 -1
  216. package/dist/components/DatePicker/DatePickerContent.d.ts +0 -31
  217. package/dist/components/DatePicker/DatePickerContent.vue.js +0 -69
  218. package/dist/components/DatePicker/DatePickerContent.vue.js.map +0 -1
  219. package/dist/components/DatePicker/DatePickerContent.vue2.js +0 -5
  220. package/dist/components/DatePicker/DatePickerContent.vue2.js.map +0 -1
  221. package/dist/components/DatePicker/DatePickerField.d.ts +0 -16
  222. package/dist/components/DatePicker/DatePickerField.vue.js +0 -55
  223. package/dist/components/DatePicker/DatePickerField.vue.js.map +0 -1
  224. package/dist/components/DatePicker/DatePickerField.vue2.js +0 -5
  225. package/dist/components/DatePicker/DatePickerField.vue2.js.map +0 -1
  226. package/dist/components/DatePicker/DatePickerGrid.d.ts +0 -11
  227. package/dist/components/DatePicker/DatePickerGrid.vue.js +0 -27
  228. package/dist/components/DatePicker/DatePickerGrid.vue.js.map +0 -1
  229. package/dist/components/DatePicker/DatePickerGrid.vue2.js +0 -5
  230. package/dist/components/DatePicker/DatePickerGrid.vue2.js.map +0 -1
  231. package/dist/components/DatePicker/DatePickerGridBody.d.ts +0 -11
  232. package/dist/components/DatePicker/DatePickerGridBody.vue.js +0 -27
  233. package/dist/components/DatePicker/DatePickerGridBody.vue.js.map +0 -1
  234. package/dist/components/DatePicker/DatePickerGridBody.vue2.js +0 -5
  235. package/dist/components/DatePicker/DatePickerGridBody.vue2.js.map +0 -1
  236. package/dist/components/DatePicker/DatePickerGridHead.d.ts +0 -11
  237. package/dist/components/DatePicker/DatePickerGridHead.vue.js +0 -27
  238. package/dist/components/DatePicker/DatePickerGridHead.vue.js.map +0 -1
  239. package/dist/components/DatePicker/DatePickerGridHead.vue2.js +0 -5
  240. package/dist/components/DatePicker/DatePickerGridHead.vue2.js.map +0 -1
  241. package/dist/components/DatePicker/DatePickerGridRow.d.ts +0 -11
  242. package/dist/components/DatePicker/DatePickerGridRow.vue.js +0 -27
  243. package/dist/components/DatePicker/DatePickerGridRow.vue.js.map +0 -1
  244. package/dist/components/DatePicker/DatePickerGridRow.vue2.js +0 -5
  245. package/dist/components/DatePicker/DatePickerGridRow.vue2.js.map +0 -1
  246. package/dist/components/DatePicker/DatePickerHeadCell.d.ts +0 -11
  247. package/dist/components/DatePicker/DatePickerHeadCell.vue.js +0 -27
  248. package/dist/components/DatePicker/DatePickerHeadCell.vue.js.map +0 -1
  249. package/dist/components/DatePicker/DatePickerHeadCell.vue2.js +0 -5
  250. package/dist/components/DatePicker/DatePickerHeadCell.vue2.js.map +0 -1
  251. package/dist/components/DatePicker/DatePickerHeader.d.ts +0 -11
  252. package/dist/components/DatePicker/DatePickerHeader.vue.js +0 -27
  253. package/dist/components/DatePicker/DatePickerHeader.vue.js.map +0 -1
  254. package/dist/components/DatePicker/DatePickerHeader.vue2.js +0 -5
  255. package/dist/components/DatePicker/DatePickerHeader.vue2.js.map +0 -1
  256. package/dist/components/DatePicker/DatePickerHeading.vue.js +0 -29
  257. package/dist/components/DatePicker/DatePickerHeading.vue.js.map +0 -1
  258. package/dist/components/DatePicker/DatePickerHeading.vue2.js +0 -5
  259. package/dist/components/DatePicker/DatePickerHeading.vue2.js.map +0 -1
  260. package/dist/components/DatePicker/DatePickerInput.d.ts +0 -11
  261. package/dist/components/DatePicker/DatePickerInput.vue.js +0 -27
  262. package/dist/components/DatePicker/DatePickerInput.vue.js.map +0 -1
  263. package/dist/components/DatePicker/DatePickerInput.vue2.js +0 -5
  264. package/dist/components/DatePicker/DatePickerInput.vue2.js.map +0 -1
  265. package/dist/components/DatePicker/DatePickerMonthHeading.d.ts +0 -13
  266. package/dist/components/DatePicker/DatePickerMonthHeading.vue.js +0 -27
  267. package/dist/components/DatePicker/DatePickerMonthHeading.vue.js.map +0 -1
  268. package/dist/components/DatePicker/DatePickerMonthHeading.vue2.js +0 -5
  269. package/dist/components/DatePicker/DatePickerMonthHeading.vue2.js.map +0 -1
  270. package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue.js +0 -30
  271. package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue.js.map +0 -1
  272. package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue2.js +0 -5
  273. package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue2.js.map +0 -1
  274. package/dist/components/DatePicker/DatePickerNext.d.ts +0 -10
  275. package/dist/components/DatePicker/DatePickerNext.vue.js +0 -28
  276. package/dist/components/DatePicker/DatePickerNext.vue.js.map +0 -1
  277. package/dist/components/DatePicker/DatePickerNext.vue2.js +0 -5
  278. package/dist/components/DatePicker/DatePickerNext.vue2.js.map +0 -1
  279. package/dist/components/DatePicker/DatePickerOverlayItem.vue.js +0 -25
  280. package/dist/components/DatePicker/DatePickerOverlayItem.vue.js.map +0 -1
  281. package/dist/components/DatePicker/DatePickerOverlayItem.vue2.js +0 -5
  282. package/dist/components/DatePicker/DatePickerOverlayItem.vue2.js.map +0 -1
  283. package/dist/components/DatePicker/DatePickerPrev.d.ts +0 -10
  284. package/dist/components/DatePicker/DatePickerPrev.vue.js +0 -28
  285. package/dist/components/DatePicker/DatePickerPrev.vue.js.map +0 -1
  286. package/dist/components/DatePicker/DatePickerPrev.vue2.js +0 -5
  287. package/dist/components/DatePicker/DatePickerPrev.vue2.js.map +0 -1
  288. package/dist/components/DatePicker/DatePickerRoot.vue.js +0 -169
  289. package/dist/components/DatePicker/DatePickerRoot.vue.js.map +0 -1
  290. package/dist/components/DatePicker/DatePickerRoot.vue2.js +0 -8
  291. package/dist/components/DatePicker/DatePickerRoot.vue2.js.map +0 -1
  292. package/dist/components/DatePicker/DatePickerTrigger.d.ts +0 -11
  293. package/dist/components/DatePicker/DatePickerTrigger.vue.js +0 -37
  294. package/dist/components/DatePicker/DatePickerTrigger.vue.js.map +0 -1
  295. package/dist/components/DatePicker/DatePickerTrigger.vue2.js +0 -5
  296. package/dist/components/DatePicker/DatePickerTrigger.vue2.js.map +0 -1
  297. package/dist/components/DatePicker/DatePickerYearHeading.d.ts +0 -13
  298. package/dist/components/DatePicker/DatePickerYearHeading.vue.js +0 -27
  299. package/dist/components/DatePicker/DatePickerYearHeading.vue.js.map +0 -1
  300. package/dist/components/DatePicker/DatePickerYearHeading.vue2.js +0 -5
  301. package/dist/components/DatePicker/DatePickerYearHeading.vue2.js.map +0 -1
  302. package/dist/components/DismissableLayer/DismissableLayer.vue.js +0 -118
  303. package/dist/components/DismissableLayer/DismissableLayer.vue.js.map +0 -1
  304. package/dist/components/DismissableLayer/DismissableLayer.vue2.js +0 -7
  305. package/dist/components/DismissableLayer/DismissableLayer.vue2.js.map +0 -1
  306. package/dist/components/DismissableLayer/DismissableLayerBranch.d.ts +0 -11
  307. package/dist/components/DismissableLayer/utils.js +0 -112
  308. package/dist/components/DismissableLayer/utils.js.map +0 -1
  309. package/dist/components/FocusScope/FocusScope.vue.js +0 -149
  310. package/dist/components/FocusScope/FocusScope.vue.js.map +0 -1
  311. package/dist/components/FocusScope/FocusScope.vue2.js +0 -5
  312. package/dist/components/FocusScope/FocusScope.vue2.js.map +0 -1
  313. package/dist/components/FocusScope/stack.js +0 -38
  314. package/dist/components/FocusScope/stack.js.map +0 -1
  315. package/dist/components/FocusScope/utils.js +0 -70
  316. package/dist/components/FocusScope/utils.js.map +0 -1
  317. package/dist/components/Popover/PopoverAnchor.d.ts +0 -11
  318. package/dist/components/Popover/PopoverAnchor.vue.js +0 -37
  319. package/dist/components/Popover/PopoverAnchor.vue.js.map +0 -1
  320. package/dist/components/Popover/PopoverAnchor.vue2.js +0 -5
  321. package/dist/components/Popover/PopoverAnchor.vue2.js.map +0 -1
  322. package/dist/components/Popover/PopoverArrow.d.ts +0 -15
  323. package/dist/components/Popover/PopoverArrow.vue.js +0 -31
  324. package/dist/components/Popover/PopoverArrow.vue.js.map +0 -1
  325. package/dist/components/Popover/PopoverArrow.vue2.js +0 -5
  326. package/dist/components/Popover/PopoverArrow.vue2.js.map +0 -1
  327. package/dist/components/Popover/PopoverClose.d.ts +0 -13
  328. package/dist/components/Popover/PopoverClose.vue.js +0 -34
  329. package/dist/components/Popover/PopoverClose.vue.js.map +0 -1
  330. package/dist/components/Popover/PopoverClose.vue2.js +0 -5
  331. package/dist/components/Popover/PopoverClose.vue2.js.map +0 -1
  332. package/dist/components/Popover/PopoverContent.d.ts +0 -32
  333. package/dist/components/Popover/PopoverContent.vue.js +0 -61
  334. package/dist/components/Popover/PopoverContent.vue.js.map +0 -1
  335. package/dist/components/Popover/PopoverContent.vue2.js +0 -5
  336. package/dist/components/Popover/PopoverContent.vue2.js.map +0 -1
  337. package/dist/components/Popover/PopoverContentImpl.vue.js +0 -97
  338. package/dist/components/Popover/PopoverContentImpl.vue.js.map +0 -1
  339. package/dist/components/Popover/PopoverContentImpl.vue2.js +0 -5
  340. package/dist/components/Popover/PopoverContentImpl.vue2.js.map +0 -1
  341. package/dist/components/Popover/PopoverContentNonModal.d.ts +0 -32
  342. package/dist/components/Popover/PopoverContentNonModal.vue.js +0 -78
  343. package/dist/components/Popover/PopoverContentNonModal.vue.js.map +0 -1
  344. package/dist/components/Popover/PopoverContentNonModal.vue2.js +0 -5
  345. package/dist/components/Popover/PopoverContentNonModal.vue2.js.map +0 -1
  346. package/dist/components/Popover/PopoverPortal.d.ts +0 -11
  347. package/dist/components/Popover/PopoverPortal.vue.js +0 -26
  348. package/dist/components/Popover/PopoverPortal.vue.js.map +0 -1
  349. package/dist/components/Popover/PopoverPortal.vue2.js +0 -5
  350. package/dist/components/Popover/PopoverPortal.vue2.js.map +0 -1
  351. package/dist/components/Popover/PopoverRoot.vue.js +0 -55
  352. package/dist/components/Popover/PopoverRoot.vue.js.map +0 -1
  353. package/dist/components/Popover/PopoverRoot.vue2.js +0 -8
  354. package/dist/components/Popover/PopoverRoot.vue2.js.map +0 -1
  355. package/dist/components/Popover/PopoverTrigger.d.ts +0 -13
  356. package/dist/components/Popover/PopoverTrigger.vue.js +0 -51
  357. package/dist/components/Popover/PopoverTrigger.vue.js.map +0 -1
  358. package/dist/components/Popover/PopoverTrigger.vue2.js +0 -5
  359. package/dist/components/Popover/PopoverTrigger.vue2.js.map +0 -1
  360. package/dist/components/Popper/PopperAnchor.vue.js +0 -37
  361. package/dist/components/Popper/PopperAnchor.vue.js.map +0 -1
  362. package/dist/components/Popper/PopperAnchor.vue2.js +0 -5
  363. package/dist/components/Popper/PopperAnchor.vue2.js.map +0 -1
  364. package/dist/components/Popper/PopperArrow.d.ts +0 -15
  365. package/dist/components/Popper/PopperArrow.vue.js +0 -76
  366. package/dist/components/Popper/PopperArrow.vue.js.map +0 -1
  367. package/dist/components/Popper/PopperArrow.vue2.js +0 -5
  368. package/dist/components/Popper/PopperArrow.vue2.js.map +0 -1
  369. package/dist/components/Popper/PopperContent.vue.js +0 -9
  370. package/dist/components/Popper/PopperContent.vue.js.map +0 -1
  371. package/dist/components/Popper/PopperContent.vue2.js +0 -230
  372. package/dist/components/Popper/PopperContent.vue2.js.map +0 -1
  373. package/dist/components/Popper/PopperRoot.vue.js +0 -25
  374. package/dist/components/Popper/PopperRoot.vue.js.map +0 -1
  375. package/dist/components/Popper/PopperRoot.vue2.js +0 -8
  376. package/dist/components/Popper/PopperRoot.vue2.js.map +0 -1
  377. package/dist/components/Popper/utils.js +0 -46
  378. package/dist/components/Popper/utils.js.map +0 -1
  379. package/dist/components/Presence/Presence.js +0 -61
  380. package/dist/components/Presence/Presence.js.map +0 -1
  381. package/dist/components/Presence/usePresence.js +0 -131
  382. package/dist/components/Presence/usePresence.js.map +0 -1
  383. package/dist/components/Primitive/Primitive.js +0 -29
  384. package/dist/components/Primitive/Primitive.js.map +0 -1
  385. package/dist/components/Primitive/Slot.js +0 -30
  386. package/dist/components/Primitive/Slot.js.map +0 -1
  387. package/dist/components/Primitive/usePrimitiveElement.js +0 -14
  388. package/dist/components/Primitive/usePrimitiveElement.js.map +0 -1
  389. package/dist/components/Teleport/Teleport.vue.js +0 -28
  390. package/dist/components/Teleport/Teleport.vue.js.map +0 -1
  391. package/dist/components/Teleport/Teleport.vue2.js +0 -5
  392. package/dist/components/Teleport/Teleport.vue2.js.map +0 -1
  393. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +0 -16
  394. package/dist/components/VisuallyHidden/VisuallyHidden.vue.js +0 -49
  395. package/dist/components/VisuallyHidden/VisuallyHidden.vue.js.map +0 -1
  396. package/dist/components/VisuallyHidden/VisuallyHidden.vue2.js +0 -5
  397. package/dist/components/VisuallyHidden/VisuallyHidden.vue2.js.map +0 -1
  398. package/dist/date/calendar.js +0 -90
  399. package/dist/date/calendar.js.map +0 -1
  400. package/dist/date/comparators.js +0 -61
  401. package/dist/date/comparators.js.map +0 -1
  402. package/dist/date/utils.js +0 -10
  403. package/dist/date/utils.js.map +0 -1
  404. package/dist/index.js +0 -54
  405. package/dist/index.js.map +0 -1
  406. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -722
  407. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  408. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -626
  409. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  410. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -174
  411. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  412. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -155
  413. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
  414. package/dist/node_modules/.pnpm/@floating-ui_vue@1.1.9_vue@3.5.26_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.js +0 -180
  415. package/dist/node_modules/.pnpm/@floating-ui_vue@1.1.9_vue@3.5.26_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.js.map +0 -1
  416. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/BuddhistCalendar.js +0 -34
  417. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/BuddhistCalendar.js.map +0 -1
  418. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/CalendarDate.js +0 -213
  419. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/CalendarDate.js.map +0 -1
  420. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/DateFormatter.js +0 -116
  421. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/DateFormatter.js.map +0 -1
  422. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/EthiopicCalendar.js +0 -129
  423. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/EthiopicCalendar.js.map +0 -1
  424. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/GregorianCalendar.js +0 -123
  425. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/GregorianCalendar.js.map +0 -1
  426. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/HebrewCalendar.js +0 -114
  427. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/HebrewCalendar.js.map +0 -1
  428. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IndianCalendar.js +0 -77
  429. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IndianCalendar.js.map +0 -1
  430. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IslamicCalendar.js +0 -141
  431. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IslamicCalendar.js.map +0 -1
  432. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/JapaneseCalendar.js +0 -155
  433. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/JapaneseCalendar.js.map +0 -1
  434. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/PersianCalendar.js +0 -59
  435. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/PersianCalendar.js.map +0 -1
  436. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/TaiwanCalendar.js +0 -59
  437. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/TaiwanCalendar.js.map +0 -1
  438. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/conversion.js +0 -170
  439. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/conversion.js.map +0 -1
  440. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/createCalendar.js +0 -44
  441. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/createCalendar.js.map +0 -1
  442. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/manipulation.js +0 -301
  443. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/manipulation.js.map +0 -1
  444. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/queries.js +0 -141
  445. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/queries.js.map +0 -1
  446. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/string.js +0 -35
  447. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/string.js.map +0 -1
  448. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/utils.js +0 -7
  449. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/utils.js.map +0 -1
  450. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/weekStartData.js +0 -101
  451. package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/weekStartData.js.map +0 -1
  452. package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +0 -9
  453. package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_check_private_redeclaration.js.map +0 -1
  454. package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_class_private_field_init.js +0 -9
  455. package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_class_private_field_init.js.map +0 -1
  456. package/dist/node_modules/.pnpm/@vueuse_core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js +0 -140
  457. package/dist/node_modules/.pnpm/@vueuse_core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js.map +0 -1
  458. package/dist/node_modules/.pnpm/@vueuse_shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js +0 -88
  459. package/dist/node_modules/.pnpm/@vueuse_shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js.map +0 -1
  460. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +0 -60
  461. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js.map +0 -1
  462. package/dist/shared/component/Arrow.vue.js +0 -45
  463. package/dist/shared/component/Arrow.vue.js.map +0 -1
  464. package/dist/shared/component/Arrow.vue2.js +0 -5
  465. package/dist/shared/component/Arrow.vue2.js.map +0 -1
  466. package/dist/shared/createContext.js +0 -26
  467. package/dist/shared/createContext.js.map +0 -1
  468. package/dist/shared/date/comparators.js +0 -27
  469. package/dist/shared/date/comparators.js.map +0 -1
  470. package/dist/shared/date/parser.js +0 -161
  471. package/dist/shared/date/parser.js.map +0 -1
  472. package/dist/shared/date/parts.js +0 -17
  473. package/dist/shared/date/parts.js.map +0 -1
  474. package/dist/shared/date/placeholders.js +0 -196
  475. package/dist/shared/date/placeholders.js.map +0 -1
  476. package/dist/shared/date/segment.js +0 -44
  477. package/dist/shared/date/segment.js.map +0 -1
  478. package/dist/shared/date/useDateField.js +0 -618
  479. package/dist/shared/date/useDateField.js.map +0 -1
  480. package/dist/shared/date/utils.js +0 -76
  481. package/dist/shared/date/utils.js.map +0 -1
  482. package/dist/shared/getActiveElement.js +0 -14
  483. package/dist/shared/getActiveElement.js.map +0 -1
  484. package/dist/shared/handleAndDispatchCustomEvent.js +0 -15
  485. package/dist/shared/handleAndDispatchCustomEvent.js.map +0 -1
  486. package/dist/shared/nullish.js +0 -7
  487. package/dist/shared/nullish.js.map +0 -1
  488. package/dist/shared/renderSlotFragments.js +0 -14
  489. package/dist/shared/renderSlotFragments.js.map +0 -1
  490. package/dist/shared/useDateFormatter.js +0 -121
  491. package/dist/shared/useDateFormatter.js.map +0 -1
  492. package/dist/shared/useDirection.js +0 -12
  493. package/dist/shared/useDirection.js.map +0 -1
  494. package/dist/shared/useEmitAsProps.js +0 -19
  495. package/dist/shared/useEmitAsProps.js.map +0 -1
  496. package/dist/shared/useFocusGuards.js +0 -39
  497. package/dist/shared/useFocusGuards.js.map +0 -1
  498. package/dist/shared/useForwardExpose.js +0 -49
  499. package/dist/shared/useForwardExpose.js.map +0 -1
  500. package/dist/shared/useForwardProps.js +0 -27
  501. package/dist/shared/useForwardProps.js.map +0 -1
  502. package/dist/shared/useForwardPropsEmits.js +0 -15
  503. package/dist/shared/useForwardPropsEmits.js.map +0 -1
  504. package/dist/shared/useId.js +0 -19
  505. package/dist/shared/useId.js.map +0 -1
  506. package/dist/shared/useKbd.js +0 -42
  507. package/dist/shared/useKbd.js.map +0 -1
  508. package/dist/shared/useLocale.js +0 -12
  509. package/dist/shared/useLocale.js.map +0 -1
  510. package/dist/shared/useSize.js +0 -44
  511. package/dist/shared/useSize.js.map +0 -1
  512. package/dist/shared/useStateMachine.js +0 -19
  513. package/dist/shared/useStateMachine.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../src/shared/createContext.ts","../src/shared/date/comparators.ts","../src/date/comparators.ts","../src/date/utils.ts","../src/date/calendar.ts","../src/shared/date/parser.ts","../src/shared/date/parts.ts","../src/shared/date/placeholders.ts","../src/shared/date/segment.ts","../src/shared/useKbd.ts","../src/shared/date/useDateField.ts","../src/shared/date/utils.ts","../src/shared/getActiveElement.ts","../src/shared/handleAndDispatchCustomEvent.ts","../src/shared/nullish.ts","../src/shared/renderSlotFragments.ts","../src/shared/useDateFormatter.ts","../src/components/ConfigProvider/ConfigProvider.vue","../src/shared/useDirection.ts","../src/shared/useEmitAsProps.ts","../src/shared/useFocusGuards.ts","../src/shared/useForwardExpose.ts","../src/shared/useForwardProps.ts","../src/shared/useForwardPropsEmits.ts","../src/shared/useId.ts","../src/shared/useLocale.ts","../src/shared/useSize.ts","../src/shared/useStateMachine.ts","../src/components/Primitive/Slot.ts","../src/components/Primitive/Primitive.ts","../src/components/Primitive/usePrimitiveElement.ts","../src/components/Popper/PopperRoot.vue","../src/components/Popper/PopperAnchor.vue","../src/shared/component/Arrow.vue","../src/components/Popper/utils.ts","../src/components/Popper/PopperContent.vue","../src/components/Popper/PopperArrow.vue","../src/components/Popover/PopoverRoot.vue","../src/components/Popover/PopoverAnchor.vue","../src/components/Popover/PopoverArrow.vue","../src/components/Popover/PopoverClose.vue","../src/components/Presence/usePresence.ts","../src/components/Presence/Presence.ts","../src/components/DismissableLayer/utils.ts","../src/components/DismissableLayer/DismissableLayer.vue","../src/components/FocusScope/stack.ts","../src/components/FocusScope/utils.ts","../src/components/FocusScope/FocusScope.vue","../src/components/Popover/PopoverContentImpl.vue","../src/components/Popover/PopoverContentNonModal.vue","../src/components/Popover/PopoverContent.vue","../src/components/Teleport/Teleport.vue","../src/components/Popover/PopoverPortal.vue","../src/components/Popover/PopoverTrigger.vue","../src/components/DatePicker/DatePickerAnchor.vue","../src/components/DatePicker/DatePickerArrow.vue","../src/components/Calendar/useCalendar.ts","../src/components/Calendar/CalendarRoot.vue","../src/components/Calendar/CalendarCell.vue","../src/components/Calendar/CalendarCellTrigger.vue","../src/components/Calendar/CalendarGrid.vue","../src/components/Calendar/CalendarGridBody.vue","../src/components/Calendar/CalendarGridHead.vue","../src/components/Calendar/CalendarGridRow.vue","../src/components/Calendar/CalendarHeadCell.vue","../src/components/Calendar/CalendarHeader.vue","../src/components/Calendar/CalendarHeading.vue","../src/components/Calendar/CalendarNext.vue","../src/components/Calendar/CalendarPrev.vue","../src/components/Calendar/CalendarMonthHeading.vue","../src/components/Calendar/CalendarYearHeading.vue","../src/components/Calendar/CalendarMonthYearOverlay.vue","../src/components/DatePicker/DatePickerRoot.vue","../src/components/DatePicker/DatePickerCalendar.vue","../src/components/DatePicker/DatePickerCell.vue","../src/components/DatePicker/DatePickerCellTrigger.vue","../src/components/DatePicker/DatePickerClose.vue","../src/components/DatePicker/DatePickerContent.vue","../src/components/VisuallyHidden/VisuallyHidden.vue","../src/components/DateField/DateFieldRoot.vue","../src/components/DateField/DateFieldInput.vue","../src/components/DatePicker/DatePickerField.vue","../src/components/DatePicker/DatePickerGrid.vue","../src/components/DatePicker/DatePickerGridBody.vue","../src/components/DatePicker/DatePickerGridHead.vue","../src/components/DatePicker/DatePickerGridRow.vue","../src/components/DatePicker/DatePickerHeadCell.vue","../src/components/DatePicker/DatePickerHeader.vue","../src/components/DatePicker/DatePickerHeading.vue","../src/components/DatePicker/DatePickerInput.vue","../src/components/DatePicker/DatePickerNext.vue","../src/components/DatePicker/DatePickerPrev.vue","../src/components/DatePicker/DatePickerTrigger.vue","../src/components/DatePicker/DatePickerMonthHeading.vue","../src/components/DatePicker/DatePickerYearHeading.vue","../src/components/DatePicker/DatePickerMonthYearOverlay.vue","../src/components/Calendar/CalendarOverlayItem.vue","../src/components/DatePicker/DatePickerOverlayItem.vue","../src/index.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport { inject, provide } from 'vue'\n\n/**\n * @param providerComponentName - The name(s) of the component(s) providing the context.\n *\n * There are situations where context can come from multiple components. In such cases, you might need to give an array of component names to provide your context, instead of just a single string.\n *\n * @param contextName The description for injection key symbol.\n */\nexport function createContext<ContextValue>(\n providerComponentName: string | string[],\n contextName?: string,\n) {\n const symbolDescription\n = typeof providerComponentName === 'string' && !contextName\n ? `${providerComponentName}Context`\n : contextName\n\n const injectionKey: InjectionKey<ContextValue | null> = Symbol(symbolDescription)\n\n /**\n * @param fallback The context value to return if the injection fails.\n *\n * @throws When context injection failed and no fallback is specified.\n * This happens when the component injecting the context is not a child of the root component providing the context.\n */\n const injectContext = <\n T extends ContextValue | null | undefined = ContextValue,\n >(\n fallback?: T,\n ): T extends null ? ContextValue | null : ContextValue => {\n const context = inject(injectionKey, fallback)\n if (context)\n return context\n\n if (context === null)\n return context as any\n\n throw new Error(\n `Injection \\`${injectionKey.toString()}\\` not found. Component must be used within ${\n Array.isArray(providerComponentName)\n ? `one of the following components: ${providerComponentName.join(\n ', ',\n )}`\n : `\\`${providerComponentName}\\``\n }`,\n )\n }\n\n const provideContext = (contextValue: ContextValue) => {\n provide(injectionKey, contextValue)\n return contextValue\n }\n\n return [injectContext, provideContext] as const\n}\n","/*\n * Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/utils.ts\n*/\n\nimport type { DateValue, ZonedDateTime } from '@internationalized/date'\nimport { CalendarDate, CalendarDateTime, createCalendar, DateFormatter, Time, toCalendar } from '@internationalized/date'\n\nexport type TimeValue = Time | CalendarDateTime | ZonedDateTime\n\nexport type Granularity = 'day' | 'hour' | 'minute' | 'second'\nexport type TimeGranularity = 'hour' | 'minute' | 'second'\n\ntype GetDefaultDateProps = {\n defaultValue?: DateValue | DateValue[] | undefined\n defaultPlaceholder?: DateValue | undefined\n granularity?: Granularity\n locale?: string\n}\n\n/**\n * A helper function used throughout the various date builders\n * to generate a default `DateValue` using the `defaultValue`,\n * `defaultPlaceholder`, and `granularity` props.\n *\n * It's important to match the `DateValue` type being used\n * elsewhere in the builder, so they behave according to the\n * behavior the user expects based on the props they've provided.\n *\n */\nexport function getDefaultDate(props: GetDefaultDateProps): DateValue {\n const { defaultValue, defaultPlaceholder, granularity = 'day', locale = 'en' } = props\n\n if (Array.isArray(defaultValue) && defaultValue.length)\n return defaultValue.at(-1)!.copy()\n\n if (defaultValue && !Array.isArray(defaultValue))\n return defaultValue.copy()\n\n if (defaultPlaceholder)\n return defaultPlaceholder.copy()\n\n const date = new Date()\n const year = date.getFullYear()\n const month = date.getMonth() + 1\n const day = date.getDate()\n const calendarDateTimeGranularities = ['hour', 'minute', 'second']\n\n const defaultFormatter = new DateFormatter(locale)\n const calendar = createCalendar(defaultFormatter.resolvedOptions().calendar)\n\n if (calendarDateTimeGranularities.includes(granularity ?? 'day'))\n return toCalendar(new CalendarDateTime(year, month, day, 0, 0, 0), calendar)\n\n return toCalendar(new CalendarDate(year, month, day), calendar)\n}\n\ntype GetDefaultTimeProps = {\n defaultValue?: TimeValue | undefined\n defaultPlaceholder?: TimeValue | undefined\n}\n\nexport function getDefaultTime(props: GetDefaultTimeProps): TimeValue {\n const { defaultValue, defaultPlaceholder } = props\n\n if (defaultValue) {\n return defaultValue.copy()\n }\n\n if (defaultPlaceholder) {\n return defaultPlaceholder.copy()\n }\n\n return new Time(0, 0, 0)\n}\n","import type { DateValue } from '@internationalized/date'\nimport type { Matcher } from './types'\nimport { CalendarDateTime, getDayOfWeek, getLocalTimeZone, parseDate, parseDateTime, parseZonedDateTime, toCalendar, ZonedDateTime } from '@internationalized/date'\n\n/**\n * Given a date string and a reference `DateValue` object, parse the\n * string to the same type as the reference object.\n *\n * Useful for parsing strings from data attributes, which are always\n * strings, to the same type being used by the date component.\n */\nexport function parseStringToDateValue(dateStr: string, referenceVal: DateValue): DateValue {\n let dateValue: DateValue\n if (isZonedDateTime(referenceVal))\n dateValue = parseZonedDateTime(dateStr)\n\n else if (isCalendarDateTime(referenceVal))\n dateValue = parseDateTime(dateStr)\n\n else\n dateValue = parseDate(dateStr)\n\n return dateValue.calendar !== referenceVal.calendar ? toCalendar(dateValue, referenceVal.calendar) : dateValue\n}\n\n/**\n * Given a `DateValue` object, convert it to a native `Date` object.\n * If a timezone is provided, the date will be converted to that timezone.\n * If no timezone is provided, the date will be converted to the local timezone.\n */\nexport function toDate(dateValue: DateValue, tz: string = getLocalTimeZone()) {\n if (isZonedDateTime(dateValue))\n return dateValue.toDate()\n else\n return dateValue.toDate(tz)\n}\n\nexport function isCalendarDateTime(dateValue: DateValue): dateValue is CalendarDateTime {\n return dateValue instanceof CalendarDateTime\n}\n\nexport function isZonedDateTime(dateValue: DateValue): dateValue is ZonedDateTime {\n return dateValue instanceof ZonedDateTime\n}\n\nexport function hasTime(dateValue: DateValue) {\n return isCalendarDateTime(dateValue) || isZonedDateTime(dateValue)\n}\n\n/**\n * Given a date, return the number of days in the month.\n */\nexport function getDaysInMonth(date: Date | DateValue) {\n if (date instanceof Date) {\n const year = date.getFullYear()\n const month = date.getMonth() + 1\n /**\n * By using zero as the day, we get the\n * last day of the previous month, which\n * is the month we originally passed in.\n */\n return new Date(year, month, 0).getDate()\n }\n else {\n return date.set({ day: 100 }).day\n }\n}\n\n/**\n * Determine if a date is before the reference date.\n * @param dateToCompare - is this date before the `referenceDate`\n * @param referenceDate - is the `dateToCompare` before this date\n *\n * @see {@link isBeforeOrSame} for inclusive\n */\nexport function isBefore(dateToCompare: DateValue, referenceDate: DateValue) {\n return dateToCompare.compare(referenceDate) < 0\n}\n\n/**\n * Determine if a date is after the reference date.\n * @param dateToCompare - is this date after the `referenceDate`\n * @param referenceDate - is the `dateToCompare` after this date\n *\n * @see {@link isAfterOrSame} for inclusive\n */\nexport function isAfter(dateToCompare: DateValue, referenceDate: DateValue) {\n return dateToCompare.compare(referenceDate) > 0\n}\n\n/**\n * Determine if a date is before or the same as the reference date.\n *\n * @param dateToCompare - the date to compare\n * @param referenceDate - the reference date to make the comparison against\n *\n * @see {@link isBefore} for non-inclusive\n */\nexport function isBeforeOrSame(dateToCompare: DateValue, referenceDate: DateValue) {\n return dateToCompare.compare(referenceDate) <= 0\n}\n\n/**\n * Determine if a date is after or the same as the reference date.\n *\n * @param dateToCompare - is this date after or the same as the `referenceDate`\n * @param referenceDate - is the `dateToCompare` after or the same as this date\n *\n * @see {@link isAfter} for non-inclusive\n */\nexport function isAfterOrSame(dateToCompare: DateValue, referenceDate: DateValue) {\n return dateToCompare.compare(referenceDate) >= 0\n}\n\n/**\n * Determine if a date is inclusively between a start and end reference date.\n *\n * @param date - is this date inclusively between the `start` and `end` dates\n * @param start - the start reference date to make the comparison against\n * @param end - the end reference date to make the comparison against\n *\n * @see {@link isBetween} for non-inclusive\n */\nexport function isBetweenInclusive(date: DateValue, start: DateValue, end: DateValue) {\n return isAfterOrSame(date, start) && isBeforeOrSame(date, end)\n}\n\n/**\n * Determine if a date is between a start and end reference date.\n *\n * @param date - is this date between the `start` and `end` dates\n * @param start - the start reference date to make the comparison against\n * @param end - the end reference date to make the comparison against\n *\n * @see {@link isBetweenInclusive} for inclusive\n */\nexport function isBetween(date: DateValue, start: DateValue, end: DateValue) {\n return isAfter(date, start) && isBefore(date, end)\n}\n\nexport function getLastFirstDayOfWeek<T extends DateValue = DateValue>(\n date: T,\n firstDayOfWeek: number,\n locale: string,\n): T {\n const day = getDayOfWeek(date, locale)\n\n if (firstDayOfWeek > day)\n return date.subtract({ days: day + 7 - firstDayOfWeek }) as T\n\n if (firstDayOfWeek === day)\n return date as T\n\n return date.subtract({ days: day - firstDayOfWeek }) as T\n}\n\nexport function getNextLastDayOfWeek<T extends DateValue = DateValue>(\n date: T,\n firstDayOfWeek: number,\n locale: string,\n): T {\n const day = getDayOfWeek(date, locale)\n const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1\n\n if (day === lastDayOfWeek)\n return date as T\n\n if (day > lastDayOfWeek)\n return date.add({ days: 7 - day + lastDayOfWeek }) as T\n\n return date.add({ days: lastDayOfWeek - day }) as T\n}\n\nexport function areAllDaysBetweenValid(\n start: DateValue,\n end: DateValue,\n isUnavailable: Matcher | undefined,\n isDisabled: Matcher | undefined,\n isHighlightable?: Matcher | undefined,\n) {\n if (isUnavailable === undefined && isDisabled === undefined && isHighlightable === undefined)\n return true\n\n let dCurrent = start.add({ days: 1 })\n if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent))\n && !isHighlightable?.(dCurrent)) {\n return false\n }\n\n const dEnd = end\n while (dCurrent.compare(dEnd) < 0) {\n dCurrent = dCurrent.add({ days: 1 })\n if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent))\n && !isHighlightable?.(dCurrent)) {\n return false\n }\n }\n return true\n}\n","/**\n * Splits an array into chunks of a given size.\n * @param arr The array to split.\n * @param size The size of each chunk.\n * @returns An array of arrays, where each sub-array has `size` elements from the original array.\n * @example ```ts\n * const arr = [1, 2, 3, 4, 5, 6, 7, 8];\n * const chunks = chunk(arr, 3);\n * // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]\n * ```\n */\nexport function chunk<T>(arr: T[], size: number): T[][] {\n const result = []\n for (let i = 0; i < arr.length; i += size)\n result.push(arr.slice(i, i + size))\n\n return result\n}\n","/*\n * Implementation ported from from from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/calendar/create.ts\n*/\n\nimport type { DateValue, DayOfWeek } from '@internationalized/date'\nimport type { Grid } from './types'\nimport type { DateRange } from '@/shared'\nimport { CalendarDate, endOfMonth, endOfYear, getDayOfWeek, startOfMonth, startOfYear } from '@internationalized/date'\nimport { getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek } from './comparators'\nimport { chunk } from './utils'\n\nexport type WeekDayFormat = 'narrow' | 'short' | 'long'\n\nexport type CreateSelectProps = {\n /**\n * The date object representing the date (usually the first day of the month/year).\n */\n dateObj: DateValue\n}\n\nexport type CreateMonthProps = {\n /**\n * The date object representing the month's date (usually the first day of the month).\n */\n dateObj: DateValue\n\n /**\n * The day of the week to start the calendar on (0 for Sunday, 1 for Monday, etc.).\n */\n weekStartsOn: number\n\n /**\n * Whether to always render 6 weeks in the calendar, even if the month doesn't\n * span 6 weeks.\n */\n fixedWeeks: boolean\n\n /**\n * The locale to use when creating the calendar month.\n */\n locale: string\n}\n\n/**\n * Retrieves an array of date values representing the days between\n * the provided start and end dates.\n */\nexport function getDaysBetween(start: DateValue, end: DateValue) {\n const days: DateValue[] = []\n let dCurrent = start.add({ days: 1 })\n const dEnd = end\n while (dCurrent.compare(dEnd) < 0) {\n days.push(dCurrent)\n dCurrent = dCurrent.add({ days: 1 })\n }\n return days\n}\n\nexport function createMonth(props: CreateMonthProps): Grid<DateValue> {\n const { dateObj, weekStartsOn, fixedWeeks, locale } = props\n const daysInMonth = getDaysInMonth(dateObj)\n\n const datesArray = Array.from({ length: daysInMonth }, (_, i) => dateObj.set({ day: i + 1 }))\n\n const firstDayOfMonth = startOfMonth(dateObj)\n const lastDayOfMonth = endOfMonth(dateObj)\n\n const lastSunday = getLastFirstDayOfWeek(firstDayOfMonth, weekStartsOn, locale)\n const nextSaturday = getNextLastDayOfWeek(lastDayOfMonth, weekStartsOn, locale)\n\n const lastMonthDays = getDaysBetween(lastSunday.subtract({ days: 1 }), firstDayOfMonth)\n const nextMonthDays = getDaysBetween(lastDayOfMonth, nextSaturday.add({ days: 1 }))\n\n const totalDays = lastMonthDays.length + datesArray.length + nextMonthDays.length\n\n if (fixedWeeks && totalDays < 42) {\n const extraDays = 42 - totalDays\n\n let startFrom = nextMonthDays[nextMonthDays.length - 1]\n\n if (!startFrom)\n startFrom = endOfMonth(dateObj)\n\n const extraDaysArray = Array.from({ length: extraDays }, (_, i) => {\n const incr = i + 1\n return startFrom.add({ days: incr })\n })\n nextMonthDays.push(...extraDaysArray)\n }\n\n const allDays = lastMonthDays.concat(datesArray, nextMonthDays)\n\n const weeks = chunk(allDays, 7)\n\n return {\n value: dateObj,\n cells: allDays,\n rows: weeks,\n }\n}\n\ntype SetMonthProps = CreateMonthProps & {\n numberOfMonths: number | undefined\n currentMonths?: Grid<DateValue>[]\n}\n\ntype SetYearProps = CreateSelectProps & {\n numberOfMonths?: number\n pagedNavigation?: boolean\n}\n\ntype SetDecadeProps = CreateSelectProps & {\n startIndex?: number\n endIndex: number\n}\n\nexport function startOfDecade(dateObj: DateValue) {\n // round to the lowest nearest 10 when building the decade\n return startOfYear(dateObj.subtract({ years: dateObj.year - Math.floor(dateObj.year / 10) * 10 }).set({ day: 1, month: 1 }))\n}\n\nexport function endOfDecade(dateObj: DateValue) {\n // round to the lowest nearest 10 when building the decade\n return endOfYear(dateObj.add({ years: Math.ceil((dateObj.year + 1) / 10) * 10 - dateObj.year - 1 }).set({ day: 35, month: 12 }))\n}\n\nexport function createDecade(props: SetDecadeProps): DateValue[] {\n const { dateObj, startIndex, endIndex } = props\n\n const decadeArray = Array.from({ length: Math.abs(startIndex ?? 0) + endIndex }, (_, i) =>\n i <= Math.abs((startIndex ?? 0))\n ? dateObj.subtract({ years: i }).set({ day: 1, month: 1 })\n : dateObj.add({ years: i - endIndex }).set({ day: 1, month: 1 }))\n\n decadeArray.sort((a: DateValue, b: DateValue) => a.year - b.year)\n\n return decadeArray\n}\n\nexport function createYear(props: SetYearProps): DateValue[] {\n const { dateObj, numberOfMonths = 1, pagedNavigation = false } = props\n\n if (numberOfMonths && pagedNavigation) {\n const monthsArray = Array.from({ length: Math.floor(12 / numberOfMonths) }, (_, i) => startOfMonth(dateObj.set({ month: i * numberOfMonths + 1 })))\n\n return monthsArray\n }\n\n const monthsArray = Array.from({ length: 12 }, (_, i) => startOfMonth(dateObj.set({ month: i + 1 })))\n return monthsArray\n}\n\nexport function createMonths(props: SetMonthProps) {\n const { numberOfMonths, dateObj, ...monthProps } = props\n\n const months: Grid<DateValue>[] = []\n\n if (!numberOfMonths || numberOfMonths === 1) {\n months.push(\n createMonth({\n ...monthProps,\n dateObj,\n }),\n )\n return months\n }\n\n months.push(\n createMonth({\n ...monthProps,\n dateObj,\n }),\n )\n\n // Create all the months, starting with the current month\n for (let i = 1; i < numberOfMonths; i++) {\n const nextMonth = dateObj.add({ months: i })\n months.push(\n createMonth({\n ...monthProps,\n dateObj: nextMonth,\n }),\n )\n }\n\n return months\n}\n\nexport function createYearRange({ start, end }: DateRange): DateValue[] {\n const years: DateValue[] = []\n\n if (!start || !end)\n return years\n\n let current = start\n\n while (current.compare(end) <= 0) {\n years.push(current)\n // Move to the first day of the next year\n current = current.add({ years: 1 })\n }\n\n return years\n}\n\nexport function createDateRange({ start, end }: DateRange): DateValue[] {\n const dates: DateValue[] = []\n\n if (!start || !end)\n return dates\n\n let current = start\n\n while (current.compare(end) <= 0) {\n dates.push(current)\n current = current.add({ days: 1 })\n }\n\n return dates\n}\n\n/**\n * Returns the locale-specific week number\n */\nexport function getWeekNumber(date: DateValue, locale: string = 'en-US', firstDayOfWeek?: DayOfWeek): number {\n const firstDayOfYear = new CalendarDate(date.year, 1, 1)\n\n const firstDayOfYearWeekday = getDayOfWeek(firstDayOfYear, locale, firstDayOfWeek)\n\n const firstWeekStart = firstDayOfYear.subtract({ days: firstDayOfYearWeekday })\n\n // If date is before the first week start It belongs to the last week of the previous year\n if (date.compare(firstWeekStart) < 0) {\n const prevYearDate = new CalendarDate(date.year - 1, 12, 31)\n return getWeekNumber(prevYearDate, locale, firstDayOfWeek)\n }\n\n const days = getDaysBetween(firstWeekStart, date)\n\n // Week number is days divided by 7 plus 1\n return Math.floor(days.length / 7) + 1\n}\n","import type { DateFields, DateValue } from \"@internationalized/date\";\nimport type { Ref } from \"vue\";\nimport type { Formatter } from \"..\";\nimport type {\n DateSegmentPart,\n Granularity,\n HourCycle,\n SegmentContentObj,\n SegmentPart,\n SegmentValueObj,\n TimeSegmentPart,\n} from \"../date\";\nimport { isZonedDateTime, toDate } from \"../../date\";\nimport {\n DATE_SEGMENT_PARTS,\n EDITABLE_SEGMENT_PARTS,\n getOptsByGranularity,\n getPlaceholder,\n isDateSegmentPart,\n isSegmentPart,\n normalizeHourCycle,\n TIME_SEGMENT_PARTS,\n} from \"../date\";\n\nconst calendarDateTimeGranularities = [\"hour\", \"minute\", \"second\"];\n\ntype SyncDateSegmentValuesProps = {\n value: DateValue;\n formatter: Formatter;\n};\n\ntype SyncTimeSegmentValuesProps = {\n value: DateValue;\n formatter: Formatter;\n};\n\nexport function syncTimeSegmentValues(props: SyncTimeSegmentValuesProps) {\n return Object.fromEntries(\n TIME_SEGMENT_PARTS.map((part) => {\n if (part === \"dayPeriod\")\n return [part, props.formatter.dayPeriod(toDate(props.value))];\n return [part, props.value[part as keyof DateValue]];\n }),\n ) as SegmentValueObj;\n}\n\nexport function syncSegmentValues(props: SyncDateSegmentValuesProps) {\n const { formatter } = props;\n\n const dateValues = DATE_SEGMENT_PARTS.map((part) => {\n return [part, props.value[part]];\n });\n if (\"hour\" in props.value) {\n const timeValues = syncTimeSegmentValues({ value: props.value, formatter });\n\n return {\n ...Object.fromEntries(dateValues),\n ...timeValues,\n } as SegmentValueObj;\n }\n\n return Object.fromEntries(dateValues) as SegmentValueObj;\n}\n\nexport function initializeTimeSegmentValues(\n granularity: \"hour\" | \"minute\" | \"second\",\n): SegmentValueObj {\n return Object.fromEntries(\n TIME_SEGMENT_PARTS.map((part) => {\n if (part === \"dayPeriod\") return [part, \"AM\"];\n return [part, null];\n }).filter(([key]) => {\n if (key === \"literal\" || key === null) return false;\n if (granularity === \"minute\" && key === \"second\") return false;\n if (granularity === \"hour\" && (key === \"second\" || key === \"minute\"))\n return false;\n else return true;\n }),\n );\n}\n\nexport function initializeSegmentValues(\n granularity: Granularity,\n): SegmentValueObj {\n const initialParts = EDITABLE_SEGMENT_PARTS.map((part) => {\n if (part === \"dayPeriod\") return [part, \"AM\"];\n\n return [part, null];\n }).filter(([key]) => {\n if (key === \"literal\" || key === null) return false;\n if (granularity === \"minute\" && key === \"second\") return false;\n if (granularity === \"hour\" && (key === \"second\" || key === \"minute\"))\n return false;\n if (granularity === \"day\")\n return (\n !calendarDateTimeGranularities.includes(key) && key !== \"dayPeriod\"\n );\n else return true;\n });\n\n return Object.fromEntries(initialParts);\n}\n\ntype SharedContentProps = {\n granularity: Granularity;\n dateRef: DateValue;\n formatter: Formatter;\n hideTimeZone: boolean;\n hourCycle: HourCycle;\n isTimeValue?: boolean;\n};\n\ntype CreateContentObjProps = SharedContentProps & {\n segmentValues: SegmentValueObj;\n locale: Ref<string>;\n};\n\ntype CreateContentArrProps = SharedContentProps & {\n contentObj: SegmentContentObj;\n};\n\nfunction createContentObj(props: CreateContentObjProps) {\n const { segmentValues, formatter, locale } = props;\n function getPartContent(part: DateSegmentPart | TimeSegmentPart) {\n if (\"hour\" in segmentValues) {\n const value = segmentValues[part];\n if (value !== null) {\n if (part === \"day\") {\n return formatter.part(\n props.dateRef.set({\n [part as keyof DateFields]: value,\n /**\n * Edge case for the day field:\n *\n * 1. If the month is filled,\n * we need to ensure that the day snaps to the maximum value of that month.\n * 2. If the month is not filled,\n * we default to the month with the maximum number of days (here just using January, 31 days),\n * so that user can input any possible day.\n */\n month: segmentValues.month ?? 1,\n }),\n part,\n { hourCycle: normalizeHourCycle(props.hourCycle) },\n );\n }\n return formatter.part(props.dateRef.set({ [part]: value }), part, {\n hourCycle: normalizeHourCycle(props.hourCycle),\n });\n } else {\n return getPlaceholder(part, \"\", locale.value);\n }\n } else {\n if (isDateSegmentPart(part)) {\n const value = segmentValues[part];\n if (value !== null) {\n if (part === \"day\") {\n return formatter.part(\n props.dateRef.set({\n [part]: value,\n // Same logic as above for the day field\n month: segmentValues.month ?? 1,\n }),\n part,\n );\n }\n\n return formatter.part(props.dateRef.set({ [part]: value }), part);\n } else {\n return getPlaceholder(part, \"\", locale.value);\n }\n }\n return \"\";\n }\n }\n\n const content = Object.keys(segmentValues).reduce((obj, part) => {\n if (!isSegmentPart(part)) return obj;\n if (\"hour\" in segmentValues && part === \"dayPeriod\") {\n const value = segmentValues[part];\n\n if (value !== null) obj[part] = value;\n else obj[part] = getPlaceholder(part, \"AM\", locale.value);\n } else {\n obj[part] = getPartContent(part);\n }\n\n return obj;\n }, {} as SegmentContentObj);\n\n return content;\n}\n\nfunction createContentArr(props: CreateContentArrProps) {\n const {\n granularity,\n formatter,\n contentObj,\n hideTimeZone,\n hourCycle,\n isTimeValue,\n } = props;\n const parts = formatter.toParts(\n props.dateRef,\n getOptsByGranularity(granularity, hourCycle, isTimeValue),\n );\n\n const segmentContentArr = parts\n .map((part) => {\n const defaultParts = [\"literal\", \"timeZoneName\", null];\n\n if (defaultParts.includes(part.type) || !isSegmentPart(part.type)) {\n return {\n part: part.type,\n value: part.value,\n };\n }\n\n return {\n part: part.type,\n value: contentObj[part.type],\n };\n })\n .filter((segment): segment is { part: SegmentPart; value: string } => {\n if (segment.part === null || segment.value === null) return false;\n if (\n segment.part === \"timeZoneName\" &&\n (!isZonedDateTime(props.dateRef) || hideTimeZone)\n )\n return false;\n\n return true;\n });\n\n return segmentContentArr;\n}\n\ntype CreateContentProps = CreateContentObjProps;\n\nexport function createContent(props: CreateContentProps) {\n const contentObj = createContentObj(props);\n\n const contentArr = createContentArr({\n contentObj,\n ...props,\n });\n\n return {\n obj: contentObj,\n arr: contentArr,\n };\n}\n","/*\n * Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/date-field/_internal/helpers.ts\n*/\n\nimport type { DateSegmentPart, EditableSegmentPart, SegmentPart, TimeSegmentPart } from './types'\n\nexport const DATE_SEGMENT_PARTS = ['day', 'month', 'year'] as const\nexport const TIME_SEGMENT_PARTS = ['hour', 'minute', 'second', 'dayPeriod'] as const\nexport const NON_EDITABLE_SEGMENT_PARTS = ['literal', 'timeZoneName'] as const\nexport const EDITABLE_SEGMENT_PARTS = [...DATE_SEGMENT_PARTS, ...TIME_SEGMENT_PARTS] as const\nexport const EDITABLE_TIME_SEGMENT_PARTS = [...TIME_SEGMENT_PARTS] as const\nexport const ALL_SEGMENT_PARTS = [\n ...EDITABLE_SEGMENT_PARTS,\n ...NON_EDITABLE_SEGMENT_PARTS,\n] as const\nexport const ALL_EXCEPT_LITERAL_PARTS = ALL_SEGMENT_PARTS.filter(part => part !== 'literal')\n\nexport function isDateSegmentPart(part: unknown): part is DateSegmentPart {\n return DATE_SEGMENT_PARTS.includes(part as DateSegmentPart)\n}\n\nexport function isTimeSegmentPart(part: unknown): part is TimeSegmentPart {\n return TIME_SEGMENT_PARTS.includes(part as TimeSegmentPart)\n}\n\nexport function isSegmentPart(part: string): part is EditableSegmentPart {\n return EDITABLE_SEGMENT_PARTS.includes(part as EditableSegmentPart)\n}\n\nexport function isAnySegmentPart(part: unknown): part is SegmentPart {\n return ALL_SEGMENT_PARTS.includes(part as EditableSegmentPart)\n}\n","/*\n * Implementation ported from from from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/placeholders.ts\n*/\n\nconst supportedLocales = [\n 'ach',\n 'af',\n 'am',\n 'an',\n 'ar',\n 'ast',\n 'az',\n 'be',\n 'bg',\n 'bn',\n 'br',\n 'bs',\n 'ca',\n 'cak',\n 'ckb',\n 'cs',\n 'cy',\n 'da',\n 'de',\n 'dsb',\n 'el',\n 'en',\n 'eo',\n 'es',\n 'et',\n 'eu',\n 'fa',\n 'ff',\n 'fi',\n 'fr',\n 'fy',\n 'ga',\n 'gd',\n 'gl',\n 'he',\n 'hr',\n 'hsb',\n 'hu',\n 'ia',\n 'id',\n 'it',\n 'ja',\n 'ka',\n 'kk',\n 'kn',\n 'ko',\n 'lb',\n 'lo',\n 'lt',\n 'lv',\n 'meh',\n 'ml',\n 'ms',\n 'nl',\n 'nn',\n 'no',\n 'oc',\n 'pl',\n 'pt',\n 'rm',\n 'ro',\n 'ru',\n 'sc',\n 'scn',\n 'sk',\n 'sl',\n 'sr',\n 'sv',\n 'szl',\n 'tg',\n 'th',\n 'tr',\n 'uk',\n 'zh-CN',\n 'zh-TW',\n] as const\n\nconst placeholderFields = ['year', 'month', 'day'] as const\n\ntype PlaceholderField = (typeof placeholderFields)[number]\nexport type SupportedLocale = (typeof supportedLocales)[number]\nexport type PlaceholderMap = Record<SupportedLocale, Record<PlaceholderField, string>>\n\nconst placeholders: PlaceholderMap = {\n 'ach': { year: 'mwaka', month: 'dwe', day: 'nino' },\n 'af': { year: 'jjjj', month: 'mm', day: 'dd' },\n 'am': { year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ' },\n 'an': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'ar': { year: 'سنة', month: 'شهر', day: 'يوم' },\n 'ast': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'az': { year: 'iiii', month: 'aa', day: 'gg' },\n 'be': { year: 'гггг', month: 'мм', day: 'дд' },\n 'bg': { year: 'гггг', month: 'мм', day: 'дд' },\n 'bn': { year: 'yyyy', month: 'মিমি', day: 'dd' },\n 'br': { year: 'bbbb', month: 'mm', day: 'dd' },\n 'bs': { year: 'gggg', month: 'mm', day: 'dd' },\n 'ca': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'cak': { year: 'jjjj', month: 'ii', day: 'q\\'q\\'' },\n 'ckb': { year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ' },\n 'cs': { year: 'rrrr', month: 'mm', day: 'dd' },\n 'cy': { year: 'bbbb', month: 'mm', day: 'dd' },\n 'da': { year: 'åååå', month: 'mm', day: 'dd' },\n 'de': { year: 'jjjj', month: 'mm', day: 'tt' },\n 'dsb': { year: 'llll', month: 'mm', day: 'źź' },\n 'el': { year: 'εεεε', month: 'μμ', day: 'ηη' },\n 'en': { year: 'yyyy', month: 'mm', day: 'dd' },\n 'eo': { year: 'jjjj', month: 'mm', day: 'tt' },\n 'es': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'et': { year: 'aaaa', month: 'kk', day: 'pp' },\n 'eu': { year: 'uuuu', month: 'hh', day: 'ee' },\n 'fa': { year: 'سال', month: 'ماه', day: 'روز' },\n 'ff': { year: 'hhhh', month: 'll', day: 'ññ' },\n 'fi': { year: 'vvvv', month: 'kk', day: 'pp' },\n 'fr': { year: 'aaaa', month: 'mm', day: 'jj' },\n 'fy': { year: 'jjjj', month: 'mm', day: 'dd' },\n 'ga': { year: 'bbbb', month: 'mm', day: 'll' },\n 'gd': { year: 'bbbb', month: 'mm', day: 'll' },\n 'gl': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'he': { year: 'שנה', month: 'חודש', day: 'יום' },\n 'hr': { year: 'gggg', month: 'mm', day: 'dd' },\n 'hsb': { year: 'llll', month: 'mm', day: 'dd' },\n 'hu': { year: 'éééé', month: 'hh', day: 'nn' },\n 'ia': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'id': { year: 'tttt', month: 'bb', day: 'hh' },\n 'it': { year: 'aaaa', month: 'mm', day: 'gg' },\n 'ja': { year: ' 年 ', month: '月', day: '日' },\n 'ka': { year: 'წწწწ', month: 'თთ', day: 'რრ' },\n 'kk': { year: 'жжжж', month: 'аа', day: 'кк' },\n 'kn': { year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ' },\n 'ko': { year: '연도', month: '월', day: '일' },\n 'lb': { year: 'jjjj', month: 'mm', day: 'dd' },\n 'lo': { year: 'ປປປປ', month: 'ດດ', day: 'ວວ' },\n 'lt': { year: 'mmmm', month: 'mm', day: 'dd' },\n 'lv': { year: 'gggg', month: 'mm', day: 'dd' },\n 'meh': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'ml': { year: 'വർഷം', month: 'മാസം', day: 'തീയതി' },\n 'ms': { year: 'tttt', month: 'mm', day: 'hh' },\n 'nl': { year: 'jjjj', month: 'mm', day: 'dd' },\n 'nn': { year: 'åååå', month: 'mm', day: 'dd' },\n 'no': { year: 'åååå', month: 'mm', day: 'dd' },\n 'oc': { year: 'aaaa', month: 'mm', day: 'jj' },\n 'pl': { year: 'rrrr', month: 'mm', day: 'dd' },\n 'pt': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'rm': { year: 'oooo', month: 'mm', day: 'dd' },\n 'ro': { year: 'aaaa', month: 'll', day: 'zz' },\n 'ru': { year: 'гггг', month: 'мм', day: 'дд' },\n 'sc': { year: 'aaaa', month: 'mm', day: 'dd' },\n 'scn': { year: 'aaaa', month: 'mm', day: 'jj' },\n 'sk': { year: 'rrrr', month: 'mm', day: 'dd' },\n 'sl': { year: 'llll', month: 'mm', day: 'dd' },\n 'sr': { year: 'гггг', month: 'мм', day: 'дд' },\n 'sv': { year: 'åååå', month: 'mm', day: 'dd' },\n 'szl': { year: 'rrrr', month: 'mm', day: 'dd' },\n 'tg': { year: 'сссс', month: 'мм', day: 'рр' },\n 'th': { year: 'ปปปป', month: 'ดด', day: 'วว' },\n 'tr': { year: 'yyyy', month: 'aa', day: 'gg' },\n 'uk': { year: 'рррр', month: 'мм', day: 'дд' },\n 'zh-CN': { year: '年', month: '月', day: '日' },\n 'zh-TW': { year: '年', month: '月', day: '日' },\n}\n\nfunction getPlaceholderObj(locale: SupportedLocale | (string & {})) {\n if (!isSupportedLocale(locale)) {\n const localeLanguage = getLocaleLanguage(locale)\n if (!isSupportedLocale(localeLanguage))\n return placeholders.en\n\n else\n return placeholders[localeLanguage]\n }\n else {\n return placeholders[locale]\n }\n}\n\ntype Field = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod'\n\nexport function getPlaceholder(\n field: Field,\n value: string,\n locale: SupportedLocale | (string & {}),\n) {\n if (isPlaceholderField(field))\n return getPlaceholderObj(locale)[field]\n\n if (isDefaultField(field))\n return value\n\n if (isTimeField(field))\n return '––'\n\n return ''\n}\n\nfunction isSupportedLocale(locale: string): locale is SupportedLocale {\n return supportedLocales.includes(locale as SupportedLocale)\n}\n\nfunction isPlaceholderField(field: unknown): field is PlaceholderField {\n return placeholderFields.includes(field as PlaceholderField)\n}\n\nfunction isTimeField(field: unknown): field is 'hour' | 'minute' | 'second' {\n return field === 'hour' || field === 'minute' || field === 'second'\n}\n\nfunction isDefaultField(field: unknown): field is 'era' | 'dayPeriod' {\n return field === 'era' || field === 'dayPeriod'\n}\n\nfunction getLocaleLanguage(locale: string) {\n if (Intl.Locale)\n return new Intl.Locale(locale).language\n\n return locale.split('-')[0]\n}\n","import { useKbd } from \"..\";\n\nexport function isSegmentNavigationKey(key: string) {\n const kbd = useKbd();\n if (key === kbd.ARROW_RIGHT || key === kbd.ARROW_LEFT) return true;\n return false;\n}\n\nexport function isNumberString(value: string) {\n if (Number.isNaN(Number.parseInt(value))) return false;\n return true;\n}\n\nexport function isAcceptableSegmentKey(key: string) {\n const kbd = useKbd();\n const acceptableSegmentKeys = [\n kbd.ENTER,\n kbd.ARROW_UP,\n kbd.ARROW_DOWN,\n kbd.ARROW_LEFT,\n kbd.ARROW_RIGHT,\n kbd.BACKSPACE,\n kbd.SPACE,\n \"a\",\n \"A\",\n \"p\",\n \"P\",\n ];\n if (acceptableSegmentKeys.includes(key)) return true;\n if (isNumberString(key)) return true;\n return false;\n}\n\nexport function getSegmentElements(parentElement: HTMLElement): Element[] {\n return Array.from(\n parentElement.querySelectorAll(\"[data-reka-date-field-segment]\"),\n ).filter(\n (item) => item.getAttribute(\"data-reka-date-field-segment\") !== \"literal\",\n );\n}\n\nexport function getTimeFieldSegmentElements(\n parentElement: HTMLElement,\n): Element[] {\n return Array.from(\n parentElement.querySelectorAll(\"[data-reka-time-field-segment]\"),\n ).filter(\n (item) => item.getAttribute(\"data-reka-time-field-segment\") !== \"literal\",\n );\n}\n","export function useKbd() {\n return {\n ALT: 'Alt',\n ARROW_DOWN: 'ArrowDown',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_RIGHT: 'ArrowRight',\n ARROW_UP: 'ArrowUp',\n BACKSPACE: 'Backspace',\n CAPS_LOCK: 'CapsLock',\n CONTROL: 'Control',\n DELETE: 'Delete',\n END: 'End',\n ENTER: 'Enter',\n ESCAPE: 'Escape',\n F1: 'F1',\n F10: 'F10',\n F11: 'F11',\n F12: 'F12',\n F2: 'F2',\n F3: 'F3',\n F4: 'F4',\n F5: 'F5',\n F6: 'F6',\n F7: 'F7',\n F8: 'F8',\n F9: 'F9',\n HOME: 'Home',\n META: 'Meta',\n PAGE_DOWN: 'PageDown',\n PAGE_UP: 'PageUp',\n SHIFT: 'Shift',\n SPACE: ' ',\n TAB: 'Tab',\n CTRL: 'Control',\n ASTERISK: '*',\n SPACE_CODE: 'Space',\n }\n}\n\n/**\n * A wrapper around the internal kbd object to make it easier to use in tests\n * which require the key names to be wrapped in curly braces.\n */\nexport type KbdKeys = keyof ReturnType<typeof useKbd>\n\nexport function useTestKbd() {\n const kbd = useKbd()\n\n const initTestKbd: Record<KbdKeys, string> = Object.entries(kbd).reduce((acc, [key, value]) => {\n acc[key as KbdKeys] = `{${value}}`\n return acc\n }, {} as Record<KbdKeys, string>)\n\n return {\n ...initTestKbd,\n SHIFT_TAB: `{Shift>}{${kbd.TAB}}`,\n }\n}\n","import type {\n CalendarDateTime,\n CycleTimeOptions,\n DateFields,\n DateValue,\n TimeFields,\n} from \"@internationalized/date\";\nimport type { Ref } from \"vue\";\nimport type {\n AnyExceptLiteral,\n DateStep,\n HourCycle,\n SegmentPart,\n SegmentValueObj,\n} from \"./types\";\nimport type { Formatter } from \"..\";\nimport { computed } from \"vue\";\nimport { getDaysInMonth, toDate } from \"../../date\";\nimport { useKbd } from \"../useKbd\";\nimport {\n isAcceptableSegmentKey,\n isNumberString,\n isSegmentNavigationKey,\n} from \"./segment\";\n\ntype MinuteSecondIncrementProps = {\n e: KeyboardEvent;\n part: keyof TimeFields;\n dateRef: DateValue;\n prevValue: number | null;\n};\n\ntype DateTimeValueIncrementation = {\n e: KeyboardEvent;\n part: keyof Omit<DateFields, \"era\"> | keyof TimeFields;\n dateRef: DateValue;\n prevValue: number | null;\n hourCycle?: HourCycle;\n};\n\ntype SegmentAttrProps = {\n disabled: boolean;\n segmentValues: SegmentValueObj;\n hourCycle: HourCycle;\n placeholder: DateValue;\n formatter: Formatter;\n};\n\nfunction commonSegmentAttrs(props: SegmentAttrProps) {\n return {\n role: \"spinbutton\",\n contenteditable: true,\n tabindex: props.disabled ? undefined : 0,\n spellcheck: false,\n inputmode: \"numeric\",\n autocorrect: \"off\",\n enterkeyhint: \"next\",\n style: \"caret-color: transparent;\",\n };\n}\n\nfunction daySegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, placeholder } = props;\n const isEmpty = segmentValues.day === null;\n const date = segmentValues.day\n ? placeholder.set({ day: segmentValues.day })\n : placeholder;\n\n const valueNow = date.day;\n const valueMin = 1;\n const valueMax = getDaysInMonth(date);\n const valueText = isEmpty ? \"Empty\" : `${valueNow}`;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"day,\",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n \"data-placeholder\": isEmpty ? \"\" : undefined,\n };\n}\n\nfunction monthSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, placeholder, formatter } = props;\n const isEmpty = segmentValues.month === null;\n const date = segmentValues.month\n ? placeholder.set({ month: segmentValues.month })\n : placeholder;\n const valueNow = date.month;\n const valueMin = 1;\n const valueMax = 12;\n const valueText = isEmpty\n ? \"Empty\"\n : `${valueNow} - ${formatter.fullMonth(toDate(date))}`;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"month, \",\n contenteditable: true,\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n \"data-placeholder\": isEmpty ? \"\" : undefined,\n };\n}\n\nfunction yearSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, placeholder } = props;\n const isEmpty = segmentValues.year === null;\n const date = segmentValues.year\n ? placeholder.set({ year: segmentValues.year })\n : placeholder;\n const valueMin = 1;\n const valueMax = 9999;\n const valueNow = date.year;\n const valueText = isEmpty ? \"Empty\" : `${valueNow}`;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"year, \",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n \"data-placeholder\": isEmpty ? \"\" : undefined,\n };\n}\n\nfunction hourSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, hourCycle, placeholder } = props;\n\n if (!(\"hour\" in segmentValues) || !(\"hour\" in placeholder)) return {};\n const isEmpty = segmentValues.hour === null;\n const date = segmentValues.hour\n ? placeholder.set({ hour: segmentValues.hour })\n : placeholder;\n const valueMin = hourCycle === 12 ? 1 : 0;\n const valueMax = hourCycle === 12 ? 12 : 23;\n const valueNow = date.hour;\n const valueText = isEmpty\n ? \"Empty\"\n : `${valueNow} ${segmentValues.dayPeriod ?? \"\"}`;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"hour, \",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n \"data-placeholder\": isEmpty ? \"\" : undefined,\n };\n}\n\nfunction minuteSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, placeholder } = props;\n if (!(\"minute\" in segmentValues) || !(\"minute\" in placeholder)) return {};\n const isEmpty = segmentValues.minute === null;\n const date = segmentValues.minute\n ? placeholder.set({ minute: segmentValues.minute })\n : placeholder;\n const valueNow = date.minute;\n const valueMin = 0;\n const valueMax = 59;\n const valueText = isEmpty ? \"Empty\" : `${valueNow}`;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"minute, \",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n \"data-placeholder\": isEmpty ? \"\" : undefined,\n };\n}\n\nfunction secondSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, placeholder } = props;\n if (!(\"second\" in segmentValues) || !(\"second\" in placeholder)) return {};\n const isEmpty = segmentValues.second === null;\n const date = segmentValues.second\n ? placeholder.set({ second: segmentValues.second })\n : placeholder;\n const valueNow = date.second;\n const valueMin = 0;\n const valueMax = 59;\n const valueText = isEmpty ? \"Empty\" : `${valueNow}`;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"second, \",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n \"data-placeholder\": isEmpty ? \"\" : undefined,\n };\n}\n\nfunction dayPeriodSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues } = props;\n if (!(\"dayPeriod\" in segmentValues)) return {};\n\n const valueMin = 0;\n const valueMax = 12;\n const valueNow = segmentValues.hour\n ? segmentValues.hour > 12\n ? segmentValues.hour - 12\n : segmentValues.hour\n : 0;\n const valueText = segmentValues.dayPeriod ?? \"AM\";\n\n return {\n ...commonSegmentAttrs(props),\n inputmode: \"text\",\n \"aria-label\": \"AM/PM\",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n };\n}\n\nfunction literalSegmentAttrs(_props: SegmentAttrProps) {\n return {\n \"aria-hidden\": true,\n \"data-segment\": \"literal\",\n };\n}\n\nfunction timeZoneSegmentAttrs(props: SegmentAttrProps) {\n return {\n role: \"textbox\",\n \"aria-label\": \"timezone, \",\n \"data-readonly\": true,\n \"data-segment\": \"timeZoneName\",\n tabindex: props.disabled ? undefined : 0,\n style: \"caret-color: transparent;\",\n };\n}\n\nfunction eraSegmentAttrs(props: SegmentAttrProps) {\n const { segmentValues, placeholder } = props;\n\n const valueMin = 0;\n const valueMax = 0;\n const valueNow = 0;\n const valueText =\n \"era\" in segmentValues ? segmentValues.era : placeholder.era;\n\n return {\n ...commonSegmentAttrs(props),\n \"aria-label\": \"era\",\n \"aria-valuemin\": valueMin,\n \"aria-valuemax\": valueMax,\n \"aria-valuenow\": valueNow,\n \"aria-valuetext\": valueText,\n };\n}\n\nexport const segmentBuilders = {\n day: {\n attrs: daySegmentAttrs,\n },\n month: {\n attrs: monthSegmentAttrs,\n },\n year: {\n attrs: yearSegmentAttrs,\n },\n hour: {\n attrs: hourSegmentAttrs,\n },\n minute: {\n attrs: minuteSegmentAttrs,\n },\n second: {\n attrs: secondSegmentAttrs,\n },\n dayPeriod: {\n attrs: dayPeriodSegmentAttrs,\n },\n literal: {\n attrs: literalSegmentAttrs,\n },\n timeZoneName: {\n attrs: timeZoneSegmentAttrs,\n },\n era: {\n attrs: eraSegmentAttrs,\n },\n};\n\nexport type UseDateFieldProps = {\n hasLeftFocus: Ref<boolean>;\n lastKeyZero: Ref<boolean>;\n placeholder: Ref<DateValue>;\n hourCycle: HourCycle;\n step: Ref<DateStep>;\n formatter: Formatter;\n segmentValues: Ref<SegmentValueObj>;\n disabled: Ref<boolean>;\n readonly: Ref<boolean>;\n part: SegmentPart;\n modelValue: Ref<DateValue | undefined>;\n focusNext: () => void;\n};\n\nexport function useDateField(props: UseDateFieldProps) {\n const kbd = useKbd();\n\n function minuteSecondIncrementation({\n e,\n part,\n dateRef,\n prevValue,\n }: MinuteSecondIncrementProps): number {\n const step = props.step.value[part] ?? 1;\n const sign = e.key === kbd.ARROW_UP ? step : -step;\n const min = 0;\n const max = 59;\n\n if (prevValue === null) return sign > 0 ? min : max;\n\n const cycleArgs: [keyof TimeFields, number] = [part, sign];\n return (dateRef as CalendarDateTime)\n .set({ [part]: prevValue })\n .cycle(...cycleArgs)[part];\n }\n\n function deleteValue(prevValue: number | null) {\n props.hasLeftFocus.value = false;\n if (prevValue === null) return prevValue;\n\n const str = prevValue.toString();\n if (str.length === 1) {\n props.modelValue.value = undefined;\n return null;\n }\n\n return Number.parseInt(str.slice(0, -1));\n }\n function dateTimeValueIncrementation({\n e,\n part,\n dateRef,\n prevValue,\n hourCycle,\n }: DateTimeValueIncrementation): number {\n const step = props.step.value[part] ?? 1;\n const sign = e.key === kbd.ARROW_UP ? step : -step;\n\n if (prevValue === null)\n return dateRef[part as keyof Omit<DateFields, \"era\">];\n\n if (part === \"hour\" && \"hour\" in dateRef) {\n const cycleArgs: [\n keyof DateFields | keyof TimeFields,\n number,\n CycleTimeOptions?,\n ] = [part, sign, { hourCycle }];\n return dateRef\n .set({ [part as keyof DateValue]: prevValue })\n .cycle(...cycleArgs)[part];\n }\n\n const cycleArgs: [keyof DateFields, number] = [\n part as keyof DateFields,\n sign,\n ];\n if (part === \"day\") {\n return dateRef\n .set({\n [part as keyof DateValue]: prevValue,\n /**\n * Edge case for the day field:\n *\n * 1. If the month is filled,\n * we need to ensure that the day snaps to the maximum value of that month.\n * 2. If the month is not filled,\n * we default to the month with the maximum number of days (here just using January, 31 days),\n * so that user can input any possible day.\n */\n month: props.segmentValues.value.month ?? 1,\n })\n .cycle(...cycleArgs)[part as keyof Omit<DateFields, \"era\">];\n }\n\n return dateRef\n .set({ [part as keyof DateValue]: prevValue })\n .cycle(...cycleArgs)[part as keyof Omit<DateFields, \"era\">];\n }\n function updateDayOrMonth(max: number, num: number, prev: number | null) {\n let moveToNext = false;\n const maxStart = Math.floor(max / 10);\n\n /**\n * If the user has left the segment, we want to reset the\n * `prev` value so that we can start the segment over again\n * when the user types a number.\n */\n if (props.hasLeftFocus.value) {\n props.hasLeftFocus.value = false;\n prev = null;\n }\n\n if (prev === null) {\n /**\n * If the user types a 0 as the first number, we want\n * to keep track of that so that when they type the next\n * number, we can move to the next segment.\n */\n\n if (num === 0) {\n props.lastKeyZero.value = true;\n return { value: null, moveToNext };\n }\n /**\n * If the last key was a 0, or if the first number is\n * greater than the max start digit (0-3 in most cases), then\n * we want to move to the next segment, since it's not possible\n * to continue typing a valid number in this segment.\n */\n\n if (props.lastKeyZero.value || num > maxStart) {\n // move to next\n moveToNext = true;\n }\n props.lastKeyZero.value = false;\n /**\n * If none of the above conditions are met, then we can just\n * return the number as the segment value and continue typing\n * in this segment.\n */\n return { value: num, moveToNext };\n }\n\n /**\n * If the number of digits is 2, or if the total with the existing digit\n * and the pressed digit is greater than the maximum value for this\n * month, then we will reset the segment as if the user had pressed the\n * backspace key and then typed the number.\n */\n const digits = prev.toString().length;\n const total = Number.parseInt(prev.toString() + num.toString());\n /**\n * If the number of digits is 2, or if the total with the existing digit\n * and the pressed digit is greater than the maximum value for this\n * month, then we will reset the segment as if the user had pressed the\n * backspace key and then typed the number.\n */\n\n if (digits === 2 || total > max) {\n /**\n * As we're doing elsewhere, we're checking if the number is greater\n * than the max start digit (0-3 in most months), and if so, we're\n * going to move to the next segment.\n */\n if (num > maxStart || total > max) {\n // move to next\n moveToNext = true;\n }\n return { value: num, moveToNext };\n }\n // move to next\n moveToNext = true;\n return { value: total, moveToNext };\n }\n\n function updateMinuteOrSecond(num: number, prev: number | null) {\n const max = 59;\n let moveToNext = false;\n const maxStart = Math.floor(max / 10);\n\n /**\n * If the user has left the segment, we want to reset the\n * `prev` value so that we can start the segment over again\n * when the user types a number.\n */\n if (props.hasLeftFocus.value) {\n props.hasLeftFocus.value = false;\n prev = null;\n }\n\n if (prev === null) {\n /**\n * If the user types a 0 as the first number, we want\n * to keep track of that so that when they type the next\n * number, we can move to the next segment.\n */\n\n if (num === 0) {\n props.lastKeyZero.value = true;\n return { value: 0, moveToNext };\n }\n /**\n * If the last key was a 0, or if the first number is\n * greater than the max start digit (0-3 in most cases), then\n * we want to move to the next segment, since it's not possible\n * to continue typing a valid number in this segment.\n */\n\n if (props.lastKeyZero.value || num > maxStart) {\n // move to next\n moveToNext = true;\n }\n props.lastKeyZero.value = false;\n /**\n * If none of the above conditions are met, then we can just\n * return the number as the segment value and continue typing\n * in this segment.\n */\n return { value: num, moveToNext };\n }\n\n /**\n * If the number of digits is 2, or if the total with the existing digit\n * and the pressed digit is greater than the maximum value for this\n * month, then we will reset the segment as if the user had pressed the\n * backspace key and then typed the number.\n */\n const digits = prev.toString().length;\n const total = Number.parseInt(prev.toString() + num.toString());\n\n /**\n * If the number of digits is 2, or if the total with the existing digit\n * and the pressed digit is greater than the maximum value for this\n * month, then we will reset the segment as if the user had pressed the\n * backspace key and then typed the number.\n */\n\n if (digits === 2 || total > max) {\n /**\n * As we're doing elsewhere, we're checking if the number is greater\n * than the max start digit (0-3 in most months), and if so, we're\n * going to move to the next segment.\n */\n if (num > maxStart) {\n // move to next\n moveToNext = true;\n }\n return { value: num, moveToNext };\n }\n // move to next\n moveToNext = true;\n return { value: total, moveToNext };\n }\n\n function updateHour(num: number, prev: number | null) {\n const max = 24;\n let moveToNext = false;\n const maxStart = Math.floor(max / 10);\n\n /**\n * If the user has left the segment, we want to reset the\n * `prev` value so that we can start the segment over again\n * when the user types a number.\n */\n // probably not implement, kind of weird\n if (props.hasLeftFocus.value) {\n props.hasLeftFocus.value = false;\n prev = null;\n }\n\n if (prev === null) {\n /**\n * If the user types a 0 as the first number, we want\n * to keep track of that so that when they type the next\n * number, we can move to the next segment.\n */\n\n if (num === 0) {\n props.lastKeyZero.value = true;\n return { value: 0, moveToNext };\n }\n /**\n * If the last key was a 0, or if the first number is\n * greater than the max start digit (0-3 in most cases), then\n * we want to move to the next segment, since it's not possible\n * to continue typing a valid number in this segment.\n */\n\n if (props.lastKeyZero.value || num > maxStart) {\n // move to next\n moveToNext = true;\n }\n props.lastKeyZero.value = false;\n /**\n * If none of the above conditions are met, then we can just\n * return the number as the segment value and continue typing\n * in this segment.\n */\n return { value: num, moveToNext };\n }\n\n /**\n * If the number of digits is 2, or if the total with the existing digit\n * and the pressed digit is greater than the maximum value for this\n * month, then we will reset the segment as if the user had pressed the\n * backspace key and then typed the number.\n */\n const digits = prev.toString().length;\n const total = Number.parseInt(prev.toString() + num.toString());\n\n /**\n * If the number of digits is 2, or if the total with the existing digit\n * and the pressed digit is greater than the maximum value for this\n * month, then we will reset the segment as if the user had pressed the\n * backspace key and then typed the number.\n */\n\n if (digits === 2 || total > max) {\n /**\n * As we're doing elsewhere, we're checking if the number is greater\n * than the max start digit (0-3 in most months), and if so, we're\n * going to move to the next segment.\n */\n if (num > maxStart) {\n // move to next\n moveToNext = true;\n }\n return { value: num, moveToNext };\n }\n // move to next\n moveToNext = true;\n return { value: total, moveToNext };\n }\n\n function updateYear(num: number, prev: number | null) {\n let moveToNext = false;\n\n /**\n * If the user has left the segment, we want to reset the\n * `prev` value so that we can start the segment over again\n * when the user types a number.\n */\n // probably not implement, kind of weird\n if (props.hasLeftFocus.value) {\n props.hasLeftFocus.value = false;\n prev = null;\n }\n\n if (prev === null) return { value: num === 0 ? 1 : num, moveToNext };\n\n const str = prev.toString() + num.toString();\n\n if (str.length > 4) return { value: num === 0 ? 1 : num, moveToNext };\n\n if (str.length === 4) moveToNext = true;\n\n const int = Number.parseInt(str);\n return { value: int, moveToNext };\n }\n\n const attributes = computed(\n () =>\n segmentBuilders[props.part]?.attrs({\n disabled: props.disabled.value,\n placeholder: props.placeholder.value,\n hourCycle: props.hourCycle,\n segmentValues: props.segmentValues.value,\n formatter: props.formatter,\n }) ?? {},\n );\n\n // TODO: look into abstracting segment keydown functions since they have the same structure (checks -> arrow_up, arrow_down update -> number string update -> move to next -> backspace update)\n function handleDaySegmentKeydown(e: KeyboardEvent) {\n if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;\n\n const prevValue = props.segmentValues.value.day;\n\n if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {\n props.segmentValues.value.day = dateTimeValueIncrementation({\n e,\n part: \"day\",\n dateRef: props.placeholder.value,\n prevValue,\n });\n return;\n }\n\n if (isNumberString(e.key)) {\n const num = Number.parseInt(e.key);\n const segmentMonthValue = props.segmentValues.value.month;\n\n const daysInMonth = segmentMonthValue\n ? getDaysInMonth(\n props.placeholder.value.set({ month: segmentMonthValue }),\n )\n : // if the month is not set, we default to the maximum number of days in a month\n // so that user can input any possible day\n 31;\n\n const { value, moveToNext } = updateDayOrMonth(\n daysInMonth,\n num,\n prevValue,\n );\n\n props.segmentValues.value.day = value;\n\n if (moveToNext) props.focusNext();\n }\n\n if (e.key === kbd.BACKSPACE) {\n props.hasLeftFocus.value = false;\n props.segmentValues.value.day = deleteValue(prevValue);\n }\n }\n\n function handleMonthSegmentKeydown(e: KeyboardEvent) {\n if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;\n\n const prevValue = props.segmentValues.value.month;\n\n if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {\n props.segmentValues.value.month = dateTimeValueIncrementation({\n e,\n part: \"month\",\n dateRef: props.placeholder.value,\n prevValue,\n });\n return;\n }\n\n if (isNumberString(e.key)) {\n const num = Number.parseInt(e.key);\n const { value, moveToNext } = updateDayOrMonth(12, num, prevValue);\n\n props.segmentValues.value.month = value;\n\n if (moveToNext) props.focusNext();\n }\n\n if (e.key === kbd.BACKSPACE) {\n props.hasLeftFocus.value = false;\n props.segmentValues.value.month = deleteValue(prevValue);\n }\n }\n\n function handleYearSegmentKeydown(e: KeyboardEvent) {\n if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;\n\n const prevValue = props.segmentValues.value.year;\n\n if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {\n props.segmentValues.value.year = dateTimeValueIncrementation({\n e,\n part: \"year\",\n dateRef: props.placeholder.value,\n prevValue,\n });\n return;\n }\n\n if (isNumberString(e.key)) {\n const num = Number.parseInt(e.key);\n const { value, moveToNext } = updateYear(num, prevValue);\n\n props.segmentValues.value.year = value;\n\n if (moveToNext) props.focusNext();\n }\n\n if (e.key === kbd.BACKSPACE) {\n props.hasLeftFocus.value = false;\n props.segmentValues.value.year = deleteValue(prevValue);\n }\n }\n\n function handleHourSegmentKeydown(e: KeyboardEvent) {\n const dateRef = props.placeholder.value;\n if (\n !isAcceptableSegmentKey(e.key) ||\n isSegmentNavigationKey(e.key) ||\n !(\"hour\" in dateRef) ||\n !(\"hour\" in props.segmentValues.value)\n )\n return;\n\n const prevValue = props.segmentValues.value.hour;\n\n const hourCycle = props.hourCycle;\n\n if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n props.segmentValues.value.hour = dateTimeValueIncrementation({\n e,\n part: \"hour\",\n dateRef: props.placeholder.value,\n prevValue,\n hourCycle,\n });\n\n if (\"dayPeriod\" in props.segmentValues.value) {\n if (props.segmentValues.value.hour < 12)\n props.segmentValues.value.dayPeriod = \"AM\";\n else if (props.segmentValues.value.hour)\n props.segmentValues.value.dayPeriod = \"PM\";\n }\n\n return;\n }\n\n if (isNumberString(e.key)) {\n const num = Number.parseInt(e.key);\n const { value, moveToNext } = updateHour(num, prevValue);\n\n if (\"dayPeriod\" in props.segmentValues.value && value && value > 12)\n props.segmentValues.value.dayPeriod = \"PM\";\n else if (\"dayPeriod\" in props.segmentValues.value && value)\n props.segmentValues.value.dayPeriod = \"AM\";\n\n props.segmentValues.value.hour = value;\n\n if (moveToNext) props.focusNext();\n }\n\n if (e.key === kbd.BACKSPACE) {\n props.hasLeftFocus.value = false;\n props.segmentValues.value.hour = deleteValue(prevValue);\n }\n }\n\n function handleMinuteSegmentKeydown(e: KeyboardEvent) {\n const dateRef = props.placeholder.value;\n\n if (\n !isAcceptableSegmentKey(e.key) ||\n isSegmentNavigationKey(e.key) ||\n !(\"minute\" in dateRef) ||\n !(\"minute\" in props.segmentValues.value)\n )\n return;\n\n const prevValue = props.segmentValues.value.minute;\n\n if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n props.segmentValues.value.minute = minuteSecondIncrementation({\n e,\n part: \"minute\",\n dateRef: props.placeholder.value,\n prevValue,\n });\n }\n\n if (isNumberString(e.key)) {\n const num = Number.parseInt(e.key);\n\n const { value, moveToNext } = updateMinuteOrSecond(num, prevValue);\n\n props.segmentValues.value.minute = value;\n\n if (moveToNext) props.focusNext();\n }\n\n if (e.key === kbd.BACKSPACE) {\n props.hasLeftFocus.value = false;\n props.segmentValues.value.minute = deleteValue(prevValue);\n }\n }\n\n function handleSecondSegmentKeydown(e: KeyboardEvent) {\n const dateRef = props.placeholder.value;\n\n if (\n !isAcceptableSegmentKey(e.key) ||\n isSegmentNavigationKey(e.key) ||\n !(\"second\" in dateRef) ||\n !(\"second\" in props.segmentValues.value)\n )\n return;\n\n const prevValue = props.segmentValues.value.second;\n\n if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n props.segmentValues.value.second = minuteSecondIncrementation({\n e,\n part: \"second\",\n dateRef: props.placeholder.value,\n prevValue,\n });\n }\n\n if (isNumberString(e.key)) {\n const num = Number.parseInt(e.key);\n const { value, moveToNext } = updateMinuteOrSecond(num, prevValue);\n\n props.segmentValues.value.second = value;\n\n if (moveToNext) props.focusNext();\n }\n\n if (e.key === kbd.BACKSPACE) {\n props.hasLeftFocus.value = false;\n props.segmentValues.value.second = deleteValue(prevValue);\n }\n }\n\n function handleDayPeriodSegmentKeydown(e: KeyboardEvent) {\n if (\n ((!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) &&\n e.key !== \"a\" &&\n e.key !== \"p\") ||\n !(\"hour\" in props.placeholder.value) ||\n !(\"dayPeriod\" in props.segmentValues.value)\n )\n return;\n\n if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n if (props.segmentValues.value.dayPeriod === \"AM\") {\n props.segmentValues.value.dayPeriod = \"PM\";\n props.segmentValues.value.hour = props.segmentValues.value.hour! + 12;\n return;\n }\n props.segmentValues.value.dayPeriod = \"AM\";\n props.segmentValues.value.hour = props.segmentValues.value.hour! - 12;\n return;\n }\n\n if (\n [\"a\", \"A\"].includes(e.key) &&\n props.segmentValues.value.dayPeriod !== \"AM\"\n ) {\n props.segmentValues.value.dayPeriod = \"AM\";\n props.segmentValues.value.hour = props.segmentValues.value.hour! - 12;\n return;\n }\n\n if (\n [\"p\", \"P\"].includes(e.key) &&\n props.segmentValues.value.dayPeriod !== \"PM\"\n ) {\n props.segmentValues.value.dayPeriod = \"PM\";\n props.segmentValues.value.hour = props.segmentValues.value.hour! + 12;\n }\n }\n\n function handleSegmentClick(e: MouseEvent) {\n const disabled = props.disabled.value;\n if (disabled) e.preventDefault();\n }\n\n function handleSegmentKeydown(e: KeyboardEvent) {\n const disabled = props.disabled.value;\n const readonly = props.readonly.value;\n if (e.key !== kbd.TAB) e.preventDefault();\n\n if (disabled || readonly) return;\n const segmentKeydownHandlers = {\n day: handleDaySegmentKeydown,\n month: handleMonthSegmentKeydown,\n year: handleYearSegmentKeydown,\n hour: handleHourSegmentKeydown,\n minute: handleMinuteSegmentKeydown,\n second: handleSecondSegmentKeydown,\n dayPeriod: handleDayPeriodSegmentKeydown,\n timeZoneName: () => {},\n } as const;\n\n segmentKeydownHandlers[props.part as keyof typeof segmentKeydownHandlers](\n e,\n );\n\n if (\n ![kbd.ARROW_LEFT, kbd.ARROW_RIGHT].includes(e.key) &&\n e.key !== kbd.TAB &&\n e.key !== kbd.SHIFT &&\n isAcceptableSegmentKey(e.key)\n ) {\n if (\n Object.values(props.segmentValues.value).every((item) => item !== null)\n ) {\n const updateObject = {\n ...(props.segmentValues.value as Record<AnyExceptLiteral, number>),\n };\n\n let dateRef = props.placeholder.value.copy();\n\n Object.keys(updateObject).forEach((part) => {\n const value = updateObject[part as AnyExceptLiteral];\n dateRef = dateRef.set({ [part]: value });\n });\n\n props.modelValue.value = dateRef.copy();\n }\n }\n }\n\n return {\n handleSegmentClick,\n handleSegmentKeydown,\n attributes,\n };\n}\n","import type { Granularity } from './comparators'\nimport type { DateStep, HourCycle } from './types'\nimport { defu } from 'defu'\n\nexport function getOptsByGranularity(granularity: Granularity, hourCycle: HourCycle, isTimeValue: boolean = false) {\n const opts: Intl.DateTimeFormatOptions = {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n timeZoneName: 'short',\n hourCycle: normalizeHourCycle(hourCycle),\n hour12: normalizeHour12(hourCycle),\n }\n if (isTimeValue) {\n delete opts.year\n delete opts.month\n delete opts.day\n }\n\n if (granularity === 'day') {\n delete opts.second\n delete opts.hour\n delete opts.minute\n delete opts.timeZoneName\n }\n if (granularity === 'hour') {\n delete opts.minute\n delete opts.second\n }\n\n if (granularity === 'minute')\n delete opts.second\n\n return opts\n}\n\ntype GetDefaultDateStepProps = {\n step?: DateStep\n}\n\nexport function normalizeDateStep(props?: GetDefaultDateStepProps): DateStep {\n return defu(props?.step, {\n year: 1,\n month: 1,\n day: 1,\n hour: 1,\n minute: 1,\n second: 1,\n millisecond: 1,\n } satisfies DateStep)\n}\n\nexport function handleCalendarInitialFocus(calendar: HTMLElement) {\n const selectedDay = calendar.querySelector<HTMLElement>('[data-selected]')\n if (selectedDay)\n return selectedDay.focus()\n\n const today = calendar.querySelector<HTMLElement>('[data-today]')\n if (today)\n return today.focus()\n\n const firstDay = calendar.querySelector<HTMLElement>('[data-reka-calendar-day]')\n if (firstDay)\n return firstDay.focus()\n}\n\nexport function normalizeHourCycle(hourCycle: HourCycle) {\n if (hourCycle === 24)\n return 'h23'\n if (hourCycle === 12)\n return 'h11'\n return undefined\n}\n\nexport function normalizeHour12(hourCycle: HourCycle) {\n if (hourCycle === 24)\n return false\n if (hourCycle === 12)\n return true\n return undefined\n}\n","export function getActiveElement(): Element | null {\r\n let activeElement = document.activeElement\r\n if (activeElement == null) {\r\n return null\r\n }\r\n\r\n while (activeElement != null && activeElement.shadowRoot != null && activeElement.shadowRoot.activeElement != null) {\r\n activeElement = activeElement.shadowRoot.activeElement\r\n }\r\n\r\n return activeElement\r\n}\r\n","export function handleAndDispatchCustomEvent<\n E extends CustomEvent,\n OriginalEvent extends Event,\n>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D>\n ? D\n : never),\n) {\n const target = detail.originalEvent.target\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail,\n })\n if (handler)\n target.addEventListener(name, handler as EventListener, { once: true })\n\n target.dispatchEvent(event)\n}\n","export function isNullish(value: any): value is null | undefined {\n return value === null || value === undefined\n}\n","import type { VNode } from 'vue'\nimport { Fragment } from 'vue'\n\nexport function renderSlotFragments(children?: VNode[]): VNode[] {\n if (!children)\n return []\n return children.flatMap((child) => {\n if (child.type === Fragment)\n return renderSlotFragments(child.children as VNode[])\n\n return [child]\n })\n}\n","/*\n * Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/formatter.ts\n */\n\nimport type { DateValue, ZonedDateTime } from \"@internationalized/date\";\nimport {\n DateFormatter,\n getLocalTimeZone,\n today,\n} from \"@internationalized/date\";\nimport { ref } from \"vue\";\nimport { hasTime, isZonedDateTime, toDate } from \"../date\";\n\nexport interface DateFormatterOptions extends Intl.DateTimeFormatOptions {\n calendar?: string;\n}\n\nexport type Formatter = {\n getLocale: () => string;\n setLocale: (newLocale: string) => void;\n custom: (date: Date, options: DateFormatterOptions) => string;\n selectedDate: (date: DateValue, includeTime?: boolean) => string;\n dayOfWeek: (date: Date, length?: DateFormatterOptions[\"weekday\"]) => string;\n fullMonthAndYear: (date: Date, options?: DateFormatterOptions) => string;\n fullMonth: (date: Date, options?: DateFormatterOptions) => string;\n fullYear: (date: Date, options?: DateFormatterOptions) => string;\n dayPeriod: (date: Date) => string;\n part: (\n dateObj: DateValue,\n type: Intl.DateTimeFormatPartTypes,\n options?: DateFormatterOptions,\n ) => string;\n toParts: (\n date: DateValue,\n options?: DateFormatterOptions,\n ) => Intl.DateTimeFormatPart[];\n getMonths: () => { label: string; value: number }[];\n};\n\n/**\n * Creates a wrapper around the `DateFormatter`, which is\n * an improved version of the {@link Intl.DateTimeFormat} API,\n * that is used internally by the various date builders to\n * easily format dates in a consistent way.\n *\n * @see [DateFormatter](https://react-spectrum.adobe.com/internationalized/date/DateFormatter.html)\n */\nexport function useDateFormatter(\n initialLocale: string,\n opts: DateFormatterOptions = {},\n): Formatter {\n const locale = ref(initialLocale);\n\n function getLocale() {\n return locale.value;\n }\n\n function setLocale(newLocale: string) {\n locale.value = newLocale;\n }\n\n function custom(date: Date, options: DateFormatterOptions) {\n return new DateFormatter(locale.value, { ...opts, ...options }).format(\n date,\n );\n }\n\n function selectedDate(date: DateValue, includeTime = true) {\n if (hasTime(date) && includeTime) {\n return custom(toDate(date), {\n dateStyle: \"long\",\n timeStyle: \"long\",\n });\n } else {\n return custom(toDate(date), {\n dateStyle: \"long\",\n });\n }\n }\n\n function fullMonthAndYear(date: Date, options: DateFormatterOptions = {}) {\n return new DateFormatter(locale.value, {\n ...opts,\n month: \"long\",\n year: \"numeric\",\n ...options,\n }).format(date);\n }\n\n function fullMonth(date: Date, options: DateFormatterOptions = {}) {\n return new DateFormatter(locale.value, {\n ...opts,\n month: \"long\",\n ...options,\n }).format(date);\n }\n\n function getMonths() {\n const defaultDate = today(getLocalTimeZone());\n const months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n return months.map((item) => ({\n label: fullMonth(toDate(defaultDate.set({ month: item }))),\n value: item,\n }));\n }\n\n function fullYear(date: Date, options: DateFormatterOptions = {}) {\n return new DateFormatter(locale.value, {\n ...opts,\n year: \"numeric\",\n ...options,\n }).format(date);\n }\n\n function toParts(date: DateValue, options?: DateFormatterOptions) {\n if (isZonedDateTime(date)) {\n return new DateFormatter(locale.value, {\n ...opts,\n ...options,\n timeZone: (date as ZonedDateTime).timeZone,\n }).formatToParts(toDate(date));\n } else {\n return new DateFormatter(locale.value, {\n ...opts,\n ...options,\n }).formatToParts(toDate(date));\n }\n }\n\n function dayOfWeek(\n date: Date,\n length: DateFormatterOptions[\"weekday\"] = \"narrow\",\n ) {\n return new DateFormatter(locale.value, { ...opts, weekday: length }).format(\n date,\n );\n }\n\n function dayPeriod(date: Date) {\n const parts = new DateFormatter(locale.value, {\n ...opts,\n hour: \"numeric\",\n minute: \"numeric\",\n }).formatToParts(date);\n const value = parts.find((p) => p.type === \"dayPeriod\")?.value;\n // Day period can be \"AM\"/\"PM\" or \"a.m.\"/\"p.m.\" in some locales\n if (value === \"PM\" || value === \"p.m.\") return \"PM\";\n\n return \"AM\";\n }\n\n const defaultPartOptions: DateFormatterOptions = {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n };\n\n function part(\n dateObj: DateValue,\n type: Intl.DateTimeFormatPartTypes,\n options: DateFormatterOptions = {},\n ) {\n const opts = { ...defaultPartOptions, ...options };\n const parts = toParts(dateObj, opts);\n const part = parts.find((p) => p.type === type);\n return part ? part.value : \"\";\n }\n\n return {\n setLocale,\n getLocale,\n fullMonth,\n fullYear,\n fullMonthAndYear,\n toParts,\n custom,\n part,\n dayPeriod,\n selectedDate,\n dayOfWeek,\n getMonths,\n };\n}\n","<script lang=\"ts\">\nimport type { Ref } from \"vue\";\nimport type { Direction, ScrollBodyOption } from \"../../shared/types\";\nimport { createContext } from \"../../shared\";\n\ninterface ConfigProviderContextValue {\n dir?: Ref<Direction>;\n locale?: Ref<string>;\n scrollBody?: Ref<boolean | ScrollBodyOption>;\n nonce?: Ref<string | undefined>;\n useId?: () => string;\n}\n\nexport const [injectConfigProviderContext, provideConfigProviderContext] =\n createContext<ConfigProviderContextValue>(\"ConfigProvider\");\n\nexport interface ConfigProviderProps {\n /**\n * The global reading direction of your application. This will be inherited by all primitives.\n * @defaultValue 'ltr'\n */\n dir?: Direction;\n /**\n * The global locale of your application. This will be inherited by all primitives.\n * @defaultValue 'en'\n */\n locale?: string;\n /**\n * The global scroll body behavior of your application. This will be inherited by the related primitives.\n * @type boolean | ScrollBodyOption\n */\n scrollBody?: boolean | ScrollBodyOption;\n /**\n * The global `nonce` value of your application. This will be inherited by the related primitives.\n * @type string\n */\n nonce?: string;\n /**\n * The global `useId` injection as a workaround for preventing hydration issue.\n */\n useId?: () => string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from \"vue\";\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst props = withDefaults(defineProps<ConfigProviderProps>(), {\n dir: \"ltr\",\n locale: \"en\",\n scrollBody: true,\n nonce: undefined,\n useId: undefined,\n});\n\nconst { dir, locale, scrollBody, nonce } = toRefs(props);\n\nprovideConfigProviderContext({\n dir,\n locale,\n scrollBody,\n nonce,\n useId: props.useId,\n});\n</script>\n\n<template>\n <slot />\n</template>\n","import type { Ref } from \"vue\";\nimport type { Direction } from \"./types\";\nimport { computed, ref } from \"vue\";\nimport { injectConfigProviderContext } from \"../components/ConfigProvider/ConfigProvider.vue\";\n\n/**\n * The `useDirection` function provides a way to access the current direction in your application.\n * @param {Ref<Direction | undefined>} [dir] - An optional ref containing the direction (ltr or rtl).\n * @returns computed value that combines with the resolved direction.\n */\nexport function useDirection(dir?: Ref<Direction | undefined>) {\n const context = injectConfigProviderContext({\n dir: ref(\"ltr\"),\n });\n return computed(() => dir?.value || context.dir?.value || \"ltr\");\n}\n","import { camelize, getCurrentInstance, toHandlerKey } from 'vue'\n\n// Vue doesn't have emits forwarding, in order to bind the emits we have to convert events into `onXXX` handlers\n// issue: https://github.com/vuejs/core/issues/5917\n/**\n * The `useEmitAsProps` function is a TypeScript utility that converts emitted events into props for a\n * Vue component.\n * @param emit - The `emit` parameter is a function that is used to emit events from a component. It\n * takes two parameters: `name` which is the name of the event to be emitted, and `...args` which are\n * the arguments to be passed along with the event.\n * @returns The function `useEmitAsProps` returns an object that maps event names to functions that\n * call the `emit` function with the corresponding event name and arguments.\n */\nexport function useEmitAsProps<Name extends string>(\n emit: (name: Name, ...args: any[]) => void,\n) {\n const vm = getCurrentInstance()\n\n const events = vm?.type.emits as Name[]\n const result: Record<string, any> = {}\n\n if (!events?.length) {\n console.warn(\n `No emitted event found. Please check component: ${vm?.type.__name}`,\n )\n }\n\n events?.forEach((ev) => {\n result[toHandlerKey(camelize(ev))] = (...arg: any) => emit(ev, ...arg)\n })\n return result\n}\n","import { isClient } from '@vueuse/shared'\nimport { watchEffect } from 'vue'\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nexport function useFocusGuards() {\n watchEffect((cleanupFn) => {\n if (!isClient)\n return\n const edgeGuards = document.querySelectorAll('[data-reka-focus-guard]')\n document.body.insertAdjacentElement(\n 'afterbegin',\n edgeGuards[0] ?? createFocusGuard(),\n )\n document.body.insertAdjacentElement(\n 'beforeend',\n edgeGuards[1] ?? createFocusGuard(),\n )\n count++\n\n cleanupFn(() => {\n if (count === 1) {\n document\n .querySelectorAll('[data-reka-focus-guard]')\n .forEach(node => node.remove())\n }\n count--\n })\n })\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span')\n element.setAttribute('data-reka-focus-guard', '')\n element.tabIndex = 0\n element.style.outline = 'none'\n element.style.opacity = '0'\n element.style.position = 'fixed'\n element.style.pointerEvents = 'none'\n return element\n}\n","import type { ComponentPublicInstance } from 'vue'\n// reference: https://github.com/vuejs/rfcs/issues/258#issuecomment-1068697672\nimport { unrefElement } from '@vueuse/core'\nimport { computed, getCurrentInstance, ref } from 'vue'\n\nexport function useForwardExpose<T extends ComponentPublicInstance>() {\n const instance = getCurrentInstance()!\n\n const currentRef = ref<Element | T | null>()\n const currentElement = computed<HTMLElement>(() => {\n // $el could be text/comment for non-single root normal or text root, thus we retrieve the nextElementSibling\n // @ts-expect-error ignore ts error\n return ['#text', '#comment'].includes(currentRef.value?.$el.nodeName) ? currentRef.value?.$el.nextElementSibling : unrefElement(currentRef)\n })\n\n // Do give us credit if you reference our code :D\n // localExpose should only be assigned once else will create infinite loop\n const localExpose: Record<string, any> | null = Object.assign({}, instance.exposed)\n const ret: Record<string, any> = {}\n\n // retrieve props for current instance\n for (const key in instance.props) {\n Object.defineProperty(ret, key, {\n enumerable: true,\n configurable: true,\n get: () => instance.props[key],\n })\n }\n\n // retrieve default exposed value\n if (Object.keys(localExpose).length > 0) {\n for (const key in localExpose) {\n Object.defineProperty(ret, key, {\n enumerable: true,\n configurable: true,\n get: () => localExpose![key],\n })\n }\n }\n\n // retrieve original first root element\n Object.defineProperty(ret, '$el', {\n enumerable: true,\n configurable: true,\n get: () => instance.vnode.el,\n })\n instance.exposed = ret\n\n function forwardRef(ref: Element | T | null) {\n currentRef.value = ref\n\n if (!ref)\n return\n\n // retrieve the forwarded element\n Object.defineProperty(ret, '$el', {\n enumerable: true,\n configurable: true,\n get: () => (ref instanceof Element ? ref : ref.$el),\n })\n\n instance.exposed = ret\n }\n\n return { forwardRef, currentRef, currentElement }\n}\n","import type { MaybeRefOrGetter } from 'vue'\nimport { camelize, computed, getCurrentInstance, toRef } from 'vue'\n\ninterface PropOptions {\n type?: any\n required?: boolean\n default?: any\n}\n\n/**\n * The `useForwardProps` function in TypeScript takes in a set of props and returns a computed value\n * that combines default props with assigned props from the current instance.\n * @param {T} props - The `props` parameter is an object that represents the props passed to a\n * component.\n * @returns computed value that combines the default props, preserved props, and assigned props.\n */\nexport function useForwardProps<T extends Record<string, any>>(props: MaybeRefOrGetter<T>) {\n const vm = getCurrentInstance()\n // Default value for declared props\n const defaultProps = Object.keys(vm?.type.props ?? {}).reduce((prev, curr) => {\n const defaultValue = (vm?.type.props[curr] as PropOptions).default\n if (defaultValue !== undefined)\n prev[curr as keyof T] = defaultValue\n return prev\n }, {} as T)\n\n const refProps = toRef(props)\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = assignedProps[key]\n })\n\n // Only return value from the props parameter\n return Object.keys({ ...defaultProps, ...preservedProps }).reduce((prev, curr) => {\n if (refProps.value[curr] !== undefined)\n prev[curr as keyof T] = refProps.value[curr]\n return prev\n }, {} as T)\n })\n}\n","import type { MaybeRefOrGetter } from 'vue'\nimport { computed } from 'vue'\nimport { useEmitAsProps } from './useEmitAsProps'\nimport { useForwardProps } from './useForwardProps'\n\n/**\n * The function `useForwardPropsEmits` takes in props and an optional emit function, and returns a\n * computed object that combines the parsed props and emits as props.\n * @param {T} props - The `props` parameter is of type `T`, which is a generic type that extends the\n * parameters of the `useForwardProps` function. It represents the props object that is passed to the\n * `useForwardProps` function.\n * @param [emit] - The `emit` parameter is a function that can be used to emit events. It takes two\n * arguments: `name`, which is the name of the event to be emitted, and `args`, which are the arguments\n * to be passed along with the event.\n * @returns a computed property that combines the parsed\n * props and emits as props.\n */\nexport function useForwardPropsEmits<T extends Record<string, any>, Name extends string>(props: MaybeRefOrGetter<T>, emit?: (name: Name, ...args: any[]) => void) {\n const parsedProps = useForwardProps(props)\n const emitsAsProps = emit ? useEmitAsProps(emit) : {}\n\n return computed(() => ({\n ...parsedProps.value,\n ...emitsAsProps,\n }))\n}\n","import * as vue from \"vue\";\n// Inspired from https://github.com/tailwindlabs/headlessui/issues/2913\n// as the alternative, and a fallback for Vue version < 3.5\nimport { injectConfigProviderContext } from \"../components/ConfigProvider/ConfigProvider.vue\";\n\nlet count = 0;\n/**\n * The `useId` function generates a unique identifier using a provided deterministic ID or a default\n * one prefixed with \"reka-\", or the provided one via `useId` props from `<ConfigProvider>`.\n * @param {string | null | undefined} [deterministicId] - The `useId` function you provided takes an\n * optional parameter `deterministicId`, which can be a string, null, or undefined. If\n * `deterministicId` is provided, the function will return it. Otherwise, it will generate an id using\n * the `useId` function obtained\n */\nexport function useId(\n deterministicId?: string | null | undefined,\n prefix = \"reka\",\n) {\n if (deterministicId) return deterministicId;\n\n if (\"useId\" in vue) {\n return `${prefix}-${vue.useId?.()}`;\n }\n\n const configProviderContext = injectConfigProviderContext({\n useId: undefined,\n });\n\n if (configProviderContext.useId) {\n return `${prefix}-${configProviderContext.useId()}`;\n }\n\n return `${prefix}-${++count}`;\n}\n","import type { Ref } from \"vue\";\nimport { computed, ref } from \"vue\";\nimport { injectConfigProviderContext } from \"../components/ConfigProvider/ConfigProvider.vue\";\n\n/**\n * The `useLocale` function provides a way to access the current locale in your application.\n * @param {Ref<string | undefined>} [locale] - An optional ref containing the locale.\n * @returns A computed ref holding the resolved locale.\n */\nexport function useLocale(locale?: Ref<string | undefined>) {\n const context = injectConfigProviderContext({\n locale: ref(\"en\"),\n });\n return computed(() => locale?.value || context.locale?.value || \"en\");\n}\n","import type { MaybeElementRef } from '@vueuse/core'\nimport { unrefElement } from '@vueuse/core'\nimport { computed, onMounted, ref } from 'vue'\n\nexport function useSize(element: MaybeElementRef) {\n const size = ref<{ width: number, height: number }>()\n const width = computed(() => size.value?.width ?? 0)\n const height = computed(() => size.value?.height ?? 0)\n\n onMounted(() => {\n const el = unrefElement(element) as HTMLElement\n if (el) {\n // provide size as early as possible\n size.value = { width: el.offsetWidth, height: el.offsetHeight }\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries))\n return\n\n // Since we only observe the one element, we don't need to loop over the\n // array\n if (!entries.length)\n return\n\n const entry = entries[0]\n let width: number\n let height: number\n\n if ('borderBoxSize' in entry) {\n const borderSizeEntry = entry.borderBoxSize\n // iron out differences between browsers\n const borderSize = Array.isArray(borderSizeEntry)\n ? borderSizeEntry[0]\n : borderSizeEntry\n width = borderSize.inlineSize\n height = borderSize.blockSize\n }\n else {\n // for browsers that don't support `borderBoxSize`\n // we calculate it ourselves to get the correct border box.\n width = el.offsetWidth\n height = el.offsetHeight\n }\n\n // temporary disable width/height from resize observer. borderSizeEntry seems to be incorrect\n size.value = { width, height }\n })\n\n resizeObserver.observe(el, { box: 'border-box' })\n\n return () => resizeObserver.unobserve(el)\n }\n else {\n // We only want to reset to `undefined` when the element becomes `null`,\n // not if it changes to another element.\n size.value = undefined\n }\n })\n\n return {\n width,\n height,\n }\n}\n","import type { Ref } from 'vue'\nimport { ref } from 'vue'\n\ninterface Machine<S> {\n [k: string]: { [k: string]: S }\n}\ntype MachineState<T> = keyof T\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (\n x: infer R\n) => any\n ? R\n : never\n\n/**\n * The `useStateMachine` function is a TypeScript function that creates a state machine and returns the\n * current state and a dispatch function to update the state based on events.\n * @param initialState - The `initialState` parameter is the initial state of the state machine. It\n * represents the starting point of the state machine's state.\n * @param machine - The `machine` parameter is an object that represents a state machine. It should\n * have keys that correspond to the possible states of the machine, and the values should be objects\n * that represent the possible events and their corresponding next states.\n * @returns The `useStateMachine` function returns an object with two properties: `state` and\n * `dispatch`.\n */\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>,\n) {\n const state = ref(initialState) as Ref<MachineState<M>>\n\n function reducer(event: MachineEvent<M>) {\n // @ts-expect-error state.value is keyof M\n const nextState = machine[state.value][event]\n return nextState ?? state.value\n }\n\n const dispatch = (event: MachineEvent<M>) => {\n state.value = reducer(event)\n }\n\n return {\n state,\n dispatch,\n }\n}\n","import { cloneVNode, Comment, defineComponent, mergeProps } from \"vue\";\nimport { renderSlotFragments } from \"../../shared\";\n\nexport const Slot = defineComponent({\n name: \"PrimitiveSlot\",\n inheritAttrs: false,\n setup(_, { attrs, slots }) {\n return () => {\n if (!slots.default) return null;\n\n const children = renderSlotFragments(slots.default());\n const firstNonCommentChildrenIndex = children.findIndex(\n (child) => child.type !== Comment,\n );\n if (firstNonCommentChildrenIndex === -1) return children;\n\n const firstNonCommentChildren = children[firstNonCommentChildrenIndex];\n\n // Remove props ref from being inferred\n delete firstNonCommentChildren.props?.ref;\n\n // Manually merge props to ensure `firstNonCommentChildren.props`\n // has higher priority than `attrs` and can override `attrs`.\n // Otherwise `cloneVNode(firstNonCommentChildren, attrs)` will\n // prioritize `attrs` and override `firstNonCommentChildren.props`.\n const mergedProps = firstNonCommentChildren.props\n ? mergeProps(attrs, firstNonCommentChildren.props)\n : attrs;\n const cloned = cloneVNode(\n { ...firstNonCommentChildren, props: {} },\n mergedProps,\n );\n\n if (children.length === 1) return cloned;\n\n children[firstNonCommentChildrenIndex] = cloned;\n return children;\n };\n },\n});\n","import type { Component, PropType } from 'vue'\nimport { defineComponent, h } from 'vue'\nimport { Slot } from './Slot'\n\nexport type AsTag =\n | 'a'\n | 'button'\n | 'div'\n | 'form'\n | 'h2'\n | 'h3'\n | 'img'\n | 'input'\n | 'label'\n | 'li'\n | 'nav'\n | 'ol'\n | 'p'\n | 'span'\n | 'svg'\n | 'ul'\n | 'template'\n | ({} & string) // any other string\n\nexport interface PrimitiveProps {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.\n */\n asChild?: boolean\n /**\n * The element or component this component should render as. Can be overwritten by `asChild`.\n * @defaultValue \"div\"\n */\n as?: AsTag | Component\n}\n\n// For self closing tags, don't provide default slots because of hydration issue\nconst SELF_CLOSING_TAGS = ['area', 'img', 'input']\n\nexport const Primitive = defineComponent({\n name: 'Primitive',\n inheritAttrs: false,\n props: {\n asChild: {\n type: Boolean,\n default: false,\n },\n as: {\n type: [String, Object] as PropType<AsTag | Component>,\n default: 'div',\n },\n },\n setup(props, { attrs, slots }) {\n const asTag = props.asChild ? 'template' : props.as\n\n if (typeof asTag === 'string' && SELF_CLOSING_TAGS.includes(asTag))\n return () => h(asTag, attrs)\n\n if (asTag !== 'template')\n return () => h(props.as, attrs, { default: slots.default })\n\n return () => h(Slot, attrs, { default: slots.default })\n },\n})\n","import type { ComponentPublicInstance } from 'vue'\nimport { unrefElement } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\nexport function usePrimitiveElement<T extends ComponentPublicInstance>() {\n const primitiveElement = ref<T>()\n const currentElement = computed<HTMLElement>(() => ['#text', '#comment'].includes(primitiveElement.value?.$el.nodeName) ? primitiveElement.value?.$el.nextElementSibling : unrefElement(primitiveElement))\n\n return {\n primitiveElement,\n currentElement,\n }\n}\n","<script lang=\"ts\">\nimport type { ReferenceElement } from \"@floating-ui/vue\";\nimport type { Ref } from \"vue\";\nimport { createContext } from \"../../shared\";\n\nexport interface Measurable {\n getBoundingClientRect: () => DOMRect;\n}\n\ninterface PopperRootContext {\n anchor: Ref<ReferenceElement | undefined>;\n onAnchorChange: (element: ReferenceElement | undefined) => void;\n}\n\nexport const [injectPopperRootContext, providePopperRootContext] =\n createContext<PopperRootContext>(\"PopperRoot\");\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst anchor = ref<ReferenceElement>();\n\nprovidePopperRootContext({\n anchor,\n onAnchorChange: (element) => (anchor.value = element),\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\nimport type { ReferenceElement } from \"@floating-ui/vue\";\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { useForwardExpose } from \"../../shared\";\n\nexport interface PopperAnchorProps extends PrimitiveProps {\n /**\n * The reference (or anchor) element that is being referred to for positioning.\n *\n * If not provided will use the current component as anchor.\n */\n reference?: ReferenceElement;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { watchPostEffect } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectPopperRootContext } from \"./PopperRoot.vue\";\n\nconst props = defineProps<PopperAnchorProps>();\n\nconst { forwardRef, currentElement } = useForwardExpose();\n\nconst rootContext = injectPopperRootContext();\n\nwatchPostEffect(() => {\n rootContext.onAnchorChange(props.reference ?? currentElement.value);\n});\n</script>\n\n<template>\n <Primitive :ref=\"forwardRef\" :as=\"as\" :as-child=\"asChild\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../../components/Primitive\";\nimport { useForwardExpose } from \"../useForwardExpose\";\n\nexport interface ArrowProps extends PrimitiveProps {\n /**\n * The width of the arrow in pixels.\n *\n * @defaultValue 10\n */\n width?: number;\n /**\n * The height of the arrow in pixels.\n *\n * @defaultValue 5\n */\n height?: number;\n /**\n * When `true`, render the rounded version of arrow. Do not work with `as`/`asChild`\n *\n * @defaultValue false\n */\n rounded?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../../components/Primitive\";\n\nconst props = withDefaults(defineProps<ArrowProps>(), {\n width: 10,\n height: 5,\n as: \"svg\",\n});\n\nuseForwardExpose();\n</script>\n\n<template>\n <Primitive\n v-bind=\"props\"\n :width=\"width\"\n :height=\"height\"\n :viewBox=\"asChild ? undefined : '0 0 12 6'\"\n :preserveAspectRatio=\"asChild ? undefined : 'none'\"\n >\n <slot>\n <path v-if=\"!rounded\" d=\"M0 0L6 6L12 0\" />\n <path\n v-else\n d=\"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0\"\n />\n </slot>\n </Primitive>\n</template>\n","import type { Middleware, Placement } from '@floating-ui/vue'\n\nconst SIDE_OPTIONS = ['top', 'right', 'bottom', 'left'] as const\nconst ALIGN_OPTIONS = ['start', 'center', 'end'] as const\n\nexport type Side = (typeof SIDE_OPTIONS)[number]\nexport type Align = (typeof ALIGN_OPTIONS)[number]\n\nexport function isNotNull<T>(value: T | null): value is T {\n return value !== null\n}\n\nexport function transformOrigin(options: {\n arrowWidth: number\n arrowHeight: number\n}): Middleware {\n return {\n name: 'transformOrigin',\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data\n\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0\n const isArrowHidden = cannotCenterArrow\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight\n\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement)\n const noArrowAlign = { start: '0%', center: '50%', end: '100%' }[\n placedAlign\n ]\n\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2\n\n let x = ''\n let y = ''\n\n if (placedSide === 'bottom') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`\n y = `${-arrowHeight}px`\n }\n else if (placedSide === 'top') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`\n y = `${rects.floating.height + arrowHeight}px`\n }\n else if (placedSide === 'right') {\n x = `${-arrowHeight}px`\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`\n }\n else if (placedSide === 'left') {\n x = `${rects.floating.width + arrowHeight}px`\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`\n }\n return { data: { x, y } }\n },\n }\n}\n\nexport function getSideAndAlignFromPlacement(placement: Placement) {\n const [side, align = 'center'] = placement.split('-')\n return [side as Side, align as Align] as const\n}\n","<script lang=\"ts\">\nimport type { Middleware, Placement, ReferenceElement } from \"@floating-ui/vue\";\nimport type { Ref } from \"vue\";\nimport type { Align, Side } from \"./utils\";\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { createContext, useForwardExpose, useSize } from \"../../shared\";\n\nexport const PopperContentPropsDefaultValue = {\n side: \"bottom\" as Side,\n sideOffset: 0,\n sideFlip: true,\n align: \"center\" as Align,\n alignOffset: 0,\n alignFlip: true,\n arrowPadding: 0,\n avoidCollisions: true,\n collisionBoundary: () => [],\n collisionPadding: 0,\n sticky: \"partial\" as \"partial\" | \"always\",\n hideWhenDetached: false,\n positionStrategy: \"fixed\" as \"absolute\" | \"fixed\",\n updatePositionStrategy: \"optimized\" as \"optimized\" | \"always\",\n prioritizePosition: false,\n};\n\nexport interface PopperContentProps extends PrimitiveProps {\n /**\n * The preferred side of the trigger to render against when open.\n * Will be reversed when collisions occur and avoidCollisions\n * is enabled.\n *\n * @defaultValue \"top\"\n */\n side?: Side;\n\n /**\n * The distance in pixels from the trigger.\n *\n * @defaultValue 0\n */\n sideOffset?: number;\n\n /**\n * Flip to the opposite side when colliding with boundary.\n *\n * @defaultValue true\n */\n sideFlip?: boolean;\n\n /**\n * The preferred alignment against the trigger.\n * May change when collisions occur.\n *\n * @defaultValue \"center\"\n */\n align?: Align;\n\n /**\n * An offset in pixels from the `start` or `end` alignment options.\n *\n * @defaultValue 0\n */\n alignOffset?: number;\n\n /**\n * Flip alignment when colliding with boundary.\n * May only occur when `prioritizePosition` is true.\n *\n * @defaultValue true\n */\n alignFlip?: boolean;\n\n /**\n * When `true`, overrides the side and align preferences\n * to prevent collisions with boundary edges.\n *\n * @defaultValue true\n */\n avoidCollisions?: boolean;\n\n /**\n * The element used as the collision boundary. By default\n * this is the viewport, though you can provide additional\n * element(s) to be included in this check.\n *\n * @defaultValue []\n */\n collisionBoundary?: Element | null | Array<Element | null>;\n\n /**\n * The distance in pixels from the boundary edges where collision\n * detection should occur. Accepts a number (same for all sides),\n * or a partial padding object, for example: { top: 20, left: 20 }.\n *\n * @defaultValue 0\n */\n collisionPadding?: number | Partial<Record<Side, number>>;\n\n /**\n * The padding between the arrow and the edges of the content.\n * If your content has border-radius, this will prevent it from\n * overflowing the corners.\n *\n * @defaultValue 0\n */\n arrowPadding?: number;\n\n /**\n * The sticky behavior on the align axis. `partial` will keep the\n * content in the boundary as long as the trigger is at least partially\n * in the boundary whilst \"always\" will keep the content in the boundary\n * regardless.\n *\n * @defaultValue \"partial\"\n */\n sticky?: \"partial\" | \"always\";\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n *\n * @defaultValue false\n */\n hideWhenDetached?: boolean;\n\n /**\n * The type of CSS position property to use.\n */\n positionStrategy?: \"absolute\" | \"fixed\";\n\n /**\n * Strategy to update the position of the floating element on every animation frame.\n *\n * @defaultValue 'optimized'\n */\n updatePositionStrategy?: \"optimized\" | \"always\";\n\n /**\n * Whether to disable the update position for the content when the layout shifted.\n *\n * @defaultValue false\n */\n disableUpdateOnLayoutShift?: boolean;\n\n /**\n * Force content to be position within the viewport.\n *\n * Might overlap the reference element, which may not be desired.\n *\n * @defaultValue false\n */\n prioritizePosition?: boolean;\n\n /**\n * The custom element or virtual element that will be set as the reference\n * to position the floating element.\n *\n * If provided, it will replace the default anchor element.\n */\n reference?: ReferenceElement;\n}\n\nexport interface PopperContentContext {\n placedSide: Ref<Side>;\n onArrowChange: (arrow: HTMLElement | undefined) => void;\n arrowX?: Ref<number>;\n arrowY?: Ref<number>;\n shouldHideArrow: Ref<boolean>;\n}\n\nexport const [injectPopperContentContext, providePopperContentContext] =\n createContext<PopperContentContext>(\"PopperContent\");\n</script>\n\n<script setup lang=\"ts\">\nimport {\n autoUpdate,\n flip,\n arrow as floatingUIarrow,\n hide,\n limitShift,\n offset,\n shift,\n size,\n useFloating,\n} from \"@floating-ui/vue\";\nimport { computedEager } from \"@vueuse/core\";\nimport { computed, ref, watchEffect, watchPostEffect } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectPopperRootContext } from \"./PopperRoot.vue\";\nimport {\n getSideAndAlignFromPlacement,\n isNotNull,\n transformOrigin,\n} from \"./utils\";\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst props = withDefaults(defineProps<PopperContentProps>(), {\n ...PopperContentPropsDefaultValue,\n});\nconst emits = defineEmits<{\n placed: [void];\n}>();\n\nconst rootContext = injectPopperRootContext();\nconst { forwardRef, currentElement: contentElement } = useForwardExpose();\n\nconst floatingRef = ref<HTMLElement>();\n\nconst arrow = ref<HTMLElement>();\nconst { width: arrowWidth, height: arrowHeight } = useSize(arrow);\n\nconst desiredPlacement = computed(\n () =>\n (props.side +\n (props.align !== \"center\" ? `-${props.align}` : \"\")) as Placement,\n);\n\nconst collisionPadding = computed(() => {\n return typeof props.collisionPadding === \"number\"\n ? props.collisionPadding\n : { top: 0, right: 0, bottom: 0, left: 0, ...props.collisionPadding };\n});\n\nconst boundary = computed(() => {\n return Array.isArray(props.collisionBoundary)\n ? props.collisionBoundary\n : [props.collisionBoundary];\n});\n\nconst detectOverflowOptions = computed(() => {\n return {\n padding: collisionPadding.value,\n boundary: boundary.value.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: boundary.value.length > 0,\n };\n});\n\nconst flipOptions = computed(() => {\n return {\n mainAxis: props.sideFlip,\n crossAxis: props.alignFlip,\n };\n});\n\nconst computedMiddleware = computedEager(() => {\n return [\n offset({\n mainAxis: props.sideOffset + arrowHeight.value,\n alignmentAxis: props.alignOffset,\n }),\n props.prioritizePosition &&\n props.avoidCollisions &&\n flip({\n ...detectOverflowOptions.value,\n ...flipOptions.value,\n }),\n props.avoidCollisions &&\n shift({\n mainAxis: true,\n crossAxis: !!props.prioritizePosition,\n limiter: props.sticky === \"partial\" ? limitShift() : undefined,\n ...detectOverflowOptions.value,\n }),\n !props.prioritizePosition &&\n props.avoidCollisions &&\n flip({\n ...detectOverflowOptions.value,\n ...flipOptions.value,\n }),\n size({\n ...detectOverflowOptions.value,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\n \"--reka-popper-available-width\",\n `${availableWidth}px`,\n );\n contentStyle.setProperty(\n \"--reka-popper-available-height\",\n `${availableHeight}px`,\n );\n contentStyle.setProperty(\n \"--reka-popper-anchor-width\",\n `${anchorWidth}px`,\n );\n contentStyle.setProperty(\n \"--reka-popper-anchor-height\",\n `${anchorHeight}px`,\n );\n },\n }),\n arrow.value &&\n floatingUIarrow({ element: arrow.value, padding: props.arrowPadding }),\n transformOrigin({\n arrowWidth: arrowWidth.value,\n arrowHeight: arrowHeight.value,\n }),\n props.hideWhenDetached &&\n hide({ strategy: \"referenceHidden\", ...detectOverflowOptions.value }),\n ] as Middleware[];\n});\n\n// If provided custom reference, it will overwrite the default anchor element\nconst reference = computed(() => props.reference ?? rootContext.anchor.value);\n\nconst { floatingStyles, placement, isPositioned, middlewareData, update } =\n useFloating(reference, floatingRef, {\n strategy: props.positionStrategy,\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n layoutShift: !props.disableUpdateOnLayoutShift,\n animationFrame: props.updatePositionStrategy === \"always\",\n });\n return cleanup;\n },\n middleware: computedMiddleware,\n });\n\nconst placedSide = computed(\n () => getSideAndAlignFromPlacement(placement.value)[0],\n);\nconst placedAlign = computed(\n () => getSideAndAlignFromPlacement(placement.value)[1],\n);\n\nwatchPostEffect(() => {\n if (isPositioned.value) emits(\"placed\");\n});\n\nconst cannotCenterArrow = computed(\n () => middlewareData.value.arrow?.centerOffset !== 0,\n);\n\nconst contentZIndex = ref(\"\");\nwatchEffect(() => {\n if (contentElement.value)\n contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;\n});\n\nconst arrowX = computed(() => middlewareData.value.arrow?.x ?? 0);\nconst arrowY = computed(() => middlewareData.value.arrow?.y ?? 0);\n\nprovidePopperContentContext({\n placedSide,\n onArrowChange: (element) => (arrow.value = element),\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n});\n</script>\n\n<template>\n <div\n ref=\"floatingRef\"\n data-reka-popper-content-wrapper=\"\"\n :style=\"{\n ...floatingStyles,\n transform: isPositioned\n ? floatingStyles.transform\n : 'translate(0, -200%)', // keep off the page when measuring\n minWidth: 'max-content',\n zIndex: contentZIndex,\n ['--reka-popper-transform-origin' as any]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y,\n ].join(' '),\n\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...(middlewareData.hide?.referenceHidden && {\n visibility: 'hidden',\n pointerEvents: 'none',\n }),\n }\"\n >\n <Primitive\n :ref=\"forwardRef\"\n v-bind=\"$attrs\"\n :as-child=\"props.asChild\"\n :as=\"as\"\n :data-side=\"placedSide\"\n :data-align=\"placedAlign\"\n :style=\"{\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? 'none' : undefined,\n }\"\n >\n <slot />\n </Primitive>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Side } from \"./utils\";\nimport type { PrimitiveProps } from \"../Primitive\";\nimport type { ArrowProps } from \"../../shared/component/Arrow.vue\";\n\nconst OPPOSITE_SIDE: Record<Side, Side> = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\",\n};\n\nexport interface PopperArrowProps extends ArrowProps, PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { useForwardExpose } from \"../../shared\";\nimport Arrow from \"../../shared/component/Arrow.vue\";\nimport { injectPopperContentContext } from \"./PopperContent.vue\";\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nwithDefaults(defineProps<PopperArrowProps>(), { as: \"svg\" });\n\nconst { forwardRef } = useForwardExpose();\nconst contentContext = injectPopperContentContext();\n\nconst baseSide = computed(() => OPPOSITE_SIDE[contentContext.placedSide.value]);\n</script>\n\n<template>\n <span\n :ref=\"\n (el: HTMLElement) => {\n contentContext.onArrowChange(el);\n return undefined;\n }\n \"\n :style=\"{\n position: 'absolute',\n left: contentContext.arrowX?.value\n ? `${contentContext.arrowX?.value}px`\n : undefined,\n top: contentContext.arrowY?.value\n ? `${contentContext.arrowY?.value}px`\n : undefined,\n [baseSide]: 0,\n transformOrigin: {\n top: '',\n right: '0 0',\n bottom: 'center 0',\n left: '100% 0',\n }[contentContext.placedSide.value],\n transform: {\n top: 'translateY(100%)',\n right: 'translateY(50%) rotate(90deg) translateX(-50%)',\n bottom: `rotate(180deg)`,\n left: 'translateY(50%) rotate(-90deg) translateX(50%)',\n }[contentContext.placedSide.value],\n visibility: contentContext.shouldHideArrow.value ? 'hidden' : undefined,\n }\"\n >\n <Arrow\n v-bind=\"$attrs\"\n :ref=\"forwardRef\"\n :style=\"{\n display: 'block',\n }\"\n :as=\"as\"\n :as-child=\"asChild\"\n :rounded=\"rounded\"\n :width=\"width\"\n :height=\"height\"\n >\n <slot />\n </Arrow>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from \"vue\";\nimport { createContext } from \"../../shared\";\n\nexport interface PopoverRootProps {\n /**\n * The open state of the popover when it is initially rendered. Use when you do not need to control its open state.\n */\n defaultOpen?: boolean;\n /**\n * The controlled open state of the popover.\n */\n open?: boolean;\n}\nexport type PopoverRootEmits = {\n /**\n * Event handler called when the open state of the popover changes.\n */\n \"update:open\": [value: boolean];\n};\n\nexport interface PopoverRootContext {\n triggerElement: Ref<HTMLElement | undefined>;\n triggerId: string;\n contentId: string;\n open: Ref<boolean>;\n onOpenChange: (value: boolean) => void;\n onOpenToggle: () => void;\n hasCustomAnchor: Ref<boolean>;\n}\n\nexport const [injectPopoverRootContext, providePopoverRootContext] =\n createContext<PopoverRootContext>(\"PopoverRoot\");\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from \"@vueuse/core\";\nimport { ref, toRefs } from \"vue\";\nimport { PopperRoot } from \"../Popper\";\n\nconst props = withDefaults(defineProps<PopoverRootProps>(), {\n defaultOpen: false,\n open: undefined,\n});\nconst emit = defineEmits<PopoverRootEmits>();\n\ndefineSlots<{\n default?: (props: {\n /** Current open state */\n open: typeof open.value;\n /** Close the popover */\n close: () => void;\n }) => any;\n}>();\n\nconst open = useVModel(props, \"open\", emit, {\n defaultValue: props.defaultOpen,\n passive: (props.open === undefined) as false,\n}) as Ref<boolean>;\n\nconst triggerElement = ref<HTMLElement>();\nconst hasCustomAnchor = ref(false);\n\nprovidePopoverRootContext({\n contentId: \"\",\n triggerId: \"\",\n open,\n onOpenChange: (value) => {\n open.value = value;\n },\n onOpenToggle: () => {\n open.value = !open.value;\n },\n triggerElement,\n hasCustomAnchor,\n});\n</script>\n\n<template>\n <PopperRoot>\n <slot :open=\"open\" :close=\"() => (open = false)\" />\n </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { PopperAnchorProps } from \"../Popper\";\nimport { useForwardExpose } from \"../../shared\";\n\nexport type PopoverAnchorProps = PopperAnchorProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { onBeforeMount, onUnmounted } from \"vue\";\nimport { PopperAnchor } from \"../Popper\";\nimport { injectPopoverRootContext } from \"./PopoverRoot.vue\";\n\nconst props = defineProps<PopoverAnchorProps>();\n\nuseForwardExpose();\nconst rootContext = injectPopoverRootContext();\n\nonBeforeMount(() => {\n rootContext.hasCustomAnchor.value = true;\n});\nonUnmounted(() => {\n rootContext.hasCustomAnchor.value = false;\n});\n</script>\n\n<template>\n <PopperAnchor v-bind=\"props\">\n <slot />\n </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from \"../Popper\";\nimport { useForwardExpose } from \"../../shared\";\n\nexport type PopoverArrowProps = PopperArrowProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from \"../Popper\";\n\nconst props = withDefaults(defineProps<PopoverArrowProps>(), {\n width: 10,\n height: 5,\n as: \"svg\",\n});\nuseForwardExpose();\n</script>\n\n<template>\n <PopperArrow v-bind=\"props\">\n <slot />\n </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { useForwardExpose } from \"../../shared\";\n\nexport type PopoverCloseProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\nimport { injectPopoverRootContext } from \"./PopoverRoot.vue\";\n\nconst props = withDefaults(defineProps<PopoverCloseProps>(), {\n as: \"button\",\n});\n\nuseForwardExpose();\nconst rootContext = injectPopoverRootContext();\n</script>\n\n<template>\n <Primitive\n :type=\"as === 'button' ? 'button' : undefined\"\n :as=\"as\"\n :as-child=\"props.asChild\"\n @click=\"rootContext.onOpenChange(false)\"\n >\n <slot />\n </Primitive>\n</template>\n","import type { Ref } from \"vue\";\nimport { useStateMachine } from \"../../shared\";\nimport { defaultWindow } from \"@vueuse/core\";\nimport { isClient } from \"@vueuse/shared\";\nimport { computed, nextTick, onUnmounted, ref, watch } from \"vue\";\n\nexport function usePresence(\n present: Ref<boolean>,\n node: Ref<HTMLElement | undefined>,\n) {\n const stylesRef = ref<CSSStyleDeclaration>({} as any);\n const prevAnimationNameRef = ref<string>(\"none\");\n const prevPresentRef = ref(present);\n const initialState = present.value ? \"mounted\" : \"unmounted\";\n let timeoutId: number | undefined;\n const ownerWindow = node.value?.ownerDocument.defaultView ?? defaultWindow;\n\n const { state, dispatch } = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\",\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\",\n },\n unmounted: {\n MOUNT: \"mounted\",\n },\n });\n\n const dispatchCustomEvent = (\n name: \"enter\" | \"after-enter\" | \"leave\" | \"after-leave\",\n ) => {\n // We only dispatch this event because CustomEvent is not available in Node18\n // https://github.com/unovue/reka-ui/issues/930\n if (isClient) {\n const customEvent = new CustomEvent(name, {\n bubbles: false,\n cancelable: false,\n });\n node.value?.dispatchEvent(customEvent);\n }\n };\n\n watch(\n present,\n async (currentPresent, prevPresent) => {\n const hasPresentChanged = prevPresent !== currentPresent;\n await nextTick();\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.value;\n const currentAnimationName = getAnimationName(node.value);\n\n if (currentPresent) {\n dispatch(\"MOUNT\");\n dispatchCustomEvent(\"enter\");\n if (currentAnimationName === \"none\")\n dispatchCustomEvent(\"after-enter\");\n } else if (\n currentAnimationName === \"none\" ||\n currentAnimationName === \"undefined\" ||\n stylesRef.value?.display === \"none\"\n ) {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly rv\n dispatch(\"UNMOUNT\");\n dispatchCustomEvent(\"leave\");\n dispatchCustomEvent(\"after-leave\");\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (prevPresent && isAnimating) {\n dispatch(\"ANIMATION_OUT\");\n dispatchCustomEvent(\"leave\");\n } else {\n dispatch(\"UNMOUNT\");\n dispatchCustomEvent(\"after-leave\");\n }\n }\n }\n },\n { immediate: true },\n );\n\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(node.value);\n const isCurrentAnimation = currentAnimationName.includes(\n CSS.escape(event.animationName),\n );\n const directionName = state.value === \"mounted\" ? \"enter\" : \"leave\";\n if (event.target === node.value && isCurrentAnimation) {\n dispatchCustomEvent(`after-${directionName}`);\n dispatch(\"ANIMATION_END\");\n\n if (!prevPresentRef.value) {\n const currentFillMode = node.value.style.animationFillMode;\n node.value.style.animationFillMode = \"forwards\";\n // Reset the style after the node had time to unmount (for cases\n // where the component chooses not to unmount). Doing this any\n // sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n // still causes a flash.\n timeoutId = ownerWindow?.setTimeout(() => {\n if (node.value?.style.animationFillMode === \"forwards\") {\n node.value.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n // if no animation, immediately trigger 'ANIMATION_END'\n if (event.target === node.value && currentAnimationName === \"none\")\n dispatch(\"ANIMATION_END\");\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node.value) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.value = getAnimationName(node.value);\n }\n };\n\n const watcher = watch(\n node,\n (newNode, oldNode) => {\n if (newNode) {\n stylesRef.value = getComputedStyle(newNode);\n newNode.addEventListener(\"animationstart\", handleAnimationStart);\n newNode.addEventListener(\"animationcancel\", handleAnimationEnd);\n newNode.addEventListener(\"animationend\", handleAnimationEnd);\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n dispatch(\"ANIMATION_END\");\n\n if (timeoutId !== undefined) ownerWindow?.clearTimeout(timeoutId);\n oldNode?.removeEventListener(\"animationstart\", handleAnimationStart);\n oldNode?.removeEventListener(\"animationcancel\", handleAnimationEnd);\n oldNode?.removeEventListener(\"animationend\", handleAnimationEnd);\n }\n },\n { immediate: true },\n );\n\n const stateWatcher = watch(state, () => {\n const currentAnimationName = getAnimationName(node.value);\n prevAnimationNameRef.value =\n state.value === \"mounted\" ? currentAnimationName : \"none\";\n });\n\n onUnmounted(() => {\n watcher();\n stateWatcher();\n });\n\n const isPresent = computed(() =>\n [\"mounted\", \"unmountSuspended\"].includes(state.value),\n );\n\n return {\n isPresent,\n };\n}\n\nfunction getAnimationName(node?: HTMLElement) {\n return node ? getComputedStyle(node).animationName || \"none\" : \"none\";\n}\n","import type { SlotsType, VNode } from \"vue\";\nimport { unrefElement } from \"@vueuse/core\";\nimport { defineComponent, getCurrentInstance, h, ref, toRefs } from \"vue\";\nimport { renderSlotFragments } from \"../../shared\";\nimport { usePresence } from \"./usePresence\";\n\nexport interface PresenceProps {\n /**\n * Conditional to mount or unmount the child element. Similar to `v-if`\n *\n * @required true\n */\n present: boolean;\n /**\n * Force the element to render all the time.\n *\n * Useful for programmatically render grandchild component with the exposed `present`\n *\n * @defaultValue false\n */\n forceMount?: boolean;\n}\n\nexport default defineComponent({\n name: \"Presence\",\n props: {\n present: {\n type: Boolean,\n required: true,\n },\n forceMount: {\n type: Boolean,\n },\n },\n slots: {} as SlotsType<{\n default: (opts: { present: boolean }) => any;\n }>,\n setup(props, { slots, expose }) {\n const { present, forceMount } = toRefs(props);\n\n const node = ref<HTMLElement>();\n // Mount composables once to prevent duplicated eventListener\n const { isPresent } = usePresence(present, node);\n expose({ present: isPresent });\n\n let children = slots.default({ present: isPresent.value });\n children = renderSlotFragments(children || []);\n const instance = getCurrentInstance();\n\n if (children && children?.length > 1) {\n const componentName = instance?.parent?.type.name\n ? `<${instance.parent.type.name} />`\n : \"component\";\n\n throw new Error(\n [\n `Detected an invalid children for \\`${componentName}\\` for \\`Presence\\` component.`,\n \"\",\n \"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.\",\n \"You can apply a few solutions:\",\n [\n \"Provide a single child element so that `presence` directive attach correctly.\",\n \"Ensure the first child is an actual element instead of a raw text node or comment node.\",\n ]\n .map((line) => ` - ${line}`)\n .join(\"\\n\"),\n ].join(\"\\n\"),\n );\n }\n\n return () => {\n if (forceMount.value || present.value || isPresent.value) {\n return h(slots.default({ present: isPresent.value })[0] as VNode, {\n ref: (v) => {\n const el = unrefElement(v as HTMLElement);\n if (typeof el?.hasAttribute === \"undefined\") return el;\n\n // special case to handle animation for PopperContent\n if (el?.hasAttribute(\"data-reka-popper-content-wrapper\"))\n node.value = el.firstElementChild as HTMLElement;\n else node.value = el;\n\n return el;\n },\n });\n } else {\n return null;\n }\n };\n },\n});\n","import type { MaybeRefOrGetter, Ref } from \"vue\";\nimport { isClient } from \"@vueuse/shared\";\nimport { nextTick, ref, toValue, watchEffect } from \"vue\";\nimport { handleAndDispatchCustomEvent } from \"../../shared\";\n\nexport type PointerDownOutsideEvent = CustomEvent<{\n originalEvent: PointerEvent;\n}>;\nexport type FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\nexport const DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nexport const CONTEXT_UPDATE = \"dismissableLayer.update\";\nexport const POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nexport const FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\n\nfunction isLayerExist(layerElement: HTMLElement, targetElement: HTMLElement) {\n const targetLayer = targetElement.closest(\"[data-dismissable-layer]\");\n\n const mainLayer =\n layerElement.dataset.dismissableLayer === \"\"\n ? layerElement\n : (layerElement.querySelector(\"[data-dismissable-layer]\") as HTMLElement);\n\n const nodeList = Array.from(\n layerElement.ownerDocument.querySelectorAll(\"[data-dismissable-layer]\"),\n );\n\n if (\n targetLayer &&\n (mainLayer === targetLayer ||\n nodeList.indexOf(mainLayer) < nodeList.indexOf(targetLayer))\n ) {\n return true;\n } else {\n return false;\n }\n}\n\n/**\n * Listens for `pointerdown` outside a DOM subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nexport function usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n element?: Ref<HTMLElement | undefined>,\n enabled: MaybeRefOrGetter<boolean> = true,\n) {\n const ownerDocument: Document =\n element?.value?.ownerDocument ?? globalThis?.document;\n\n const isPointerInsideDOMTree = ref(false);\n const handleClickRef = ref(() => {});\n\n watchEffect((cleanupFn) => {\n if (!isClient || !toValue(enabled)) return;\n const handlePointerDown = async (event: PointerEvent) => {\n const target = event.target as HTMLElement | undefined;\n\n if (!element?.value || !target) return;\n\n if (isLayerExist(element.value, target)) {\n isPointerInsideDOMTree.value = false;\n return;\n }\n\n if (event.target && !isPointerInsideDOMTree.value) {\n const eventDetail = { originalEvent: event };\n\n function handleAndDispatchPointerDownOutsideEvent() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n onPointerDownOutside,\n eventDetail,\n );\n }\n\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executes events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.value);\n handleClickRef.value = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener(\"click\", handleClickRef.value, {\n once: true,\n });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener(\"click\", handleClickRef.value);\n }\n isPointerInsideDOMTree.value = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n\n cleanupFn(() => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.value);\n });\n });\n\n return {\n onPointerDownCapture: () => {\n if (!toValue(enabled)) return;\n isPointerInsideDOMTree.value = true;\n },\n };\n}\n\n/**\n * Listens for when focus happens outside a DOM subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nexport function useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n element?: Ref<HTMLElement | undefined>,\n enabled: MaybeRefOrGetter<boolean> = true,\n) {\n const ownerDocument: Document =\n element?.value?.ownerDocument ?? globalThis?.document;\n\n const isFocusInsideDOMTree = ref(false);\n watchEffect((cleanupFn) => {\n if (!isClient || !toValue(enabled)) return;\n const handleFocus = async (event: FocusEvent) => {\n if (!element?.value) return;\n\n await nextTick();\n await nextTick();\n const target = event.target as HTMLElement | undefined;\n if (!element.value || !target || isLayerExist(element.value, target))\n return;\n\n if (event.target && !isFocusInsideDOMTree.value) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(\n FOCUS_OUTSIDE,\n onFocusOutside,\n eventDetail,\n );\n }\n };\n\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n\n cleanupFn(() => ownerDocument.removeEventListener(\"focusin\", handleFocus));\n });\n\n return {\n onFocusCapture: () => {\n if (!toValue(enabled)) return;\n\n isFocusInsideDOMTree.value = true;\n },\n onBlurCapture: () => {\n if (!toValue(enabled)) return;\n\n isFocusInsideDOMTree.value = false;\n },\n };\n}\n\nexport function dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n","<script lang=\"ts\">\nimport type { FocusOutsideEvent, PointerDownOutsideEvent } from \"./utils\";\n\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { computed, nextTick, reactive, watchEffect } from \"vue\";\nimport { useForwardExpose } from \"../../shared\";\n\nexport interface DismissableLayerProps extends PrimitiveProps {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside\n * the `DismissableLayer`. Users will need to click twice on outside elements to\n * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean;\n}\n\nexport type DismissableLayerEmits = {\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n escapeKeyDown: [event: KeyboardEvent];\n /**\n * Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n pointerDownOutside: [event: PointerDownOutsideEvent];\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n focusOutside: [event: FocusOutsideEvent];\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n interactOutside: [event: PointerDownOutsideEvent | FocusOutsideEvent];\n};\n\nexport type DismissableLayerPrivateEmits = DismissableLayerEmits & {\n /**\n * Handler called when the `DismissableLayer` should be dismissed\n */\n dismiss: [];\n};\n\nexport const context = reactive({\n layersRoot: new Set<HTMLElement>(),\n layersWithOutsidePointerEventsDisabled: new Set<HTMLElement>(),\n branches: new Set<HTMLElement>(),\n});\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke } from \"@vueuse/core\";\nimport { Primitive } from \"../Primitive\";\nimport { useFocusOutside, usePointerDownOutside } from \"./utils\";\n\nconst props = withDefaults(defineProps<DismissableLayerProps>(), {\n disableOutsidePointerEvents: false,\n});\n\nconst emits = defineEmits<DismissableLayerPrivateEmits>();\n\nconst { forwardRef, currentElement: layerElement } = useForwardExpose();\nconst ownerDocument = computed(\n () => layerElement.value?.ownerDocument ?? globalThis.document,\n);\n\nconst layers = computed(() => context.layersRoot);\n\nconst index = computed(() => {\n return layerElement.value\n ? Array.from(layers.value).indexOf(layerElement.value)\n : -1;\n});\n\nconst isBodyPointerEventsDisabled = computed(() => {\n return context.layersWithOutsidePointerEventsDisabled.size > 0;\n});\n\nconst isPointerEventsEnabled = computed(() => {\n const localLayers = Array.from(layers.value);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled,\n ].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = localLayers.indexOf(\n highestLayerWithOutsidePointerEventsDisabled,\n );\n\n return index.value >= highestLayerWithOutsidePointerEventsDisabledIndex;\n});\n\nconst pointerDownOutside = usePointerDownOutside(async (event) => {\n const isPointerDownOnBranch = [...context.branches].some((branch) =>\n branch?.contains(event.target as HTMLElement),\n );\n\n if (!isPointerEventsEnabled.value || isPointerDownOnBranch) return;\n emits(\"pointerDownOutside\", event);\n emits(\"interactOutside\", event);\n await nextTick();\n if (!event.defaultPrevented) emits(\"dismiss\");\n}, layerElement);\n\nconst focusOutside = useFocusOutside((event) => {\n const isFocusInBranch = [...context.branches].some((branch) =>\n branch?.contains(event.target as HTMLElement),\n );\n\n if (isFocusInBranch) return;\n emits(\"focusOutside\", event);\n emits(\"interactOutside\", event);\n if (!event.defaultPrevented) emits(\"dismiss\");\n}, layerElement);\n\nonKeyStroke(\"Escape\", (event) => {\n const isHighestLayer = index.value === layers.value.size - 1;\n if (!isHighestLayer) return;\n emits(\"escapeKeyDown\", event);\n if (!event.defaultPrevented) emits(\"dismiss\");\n});\n\nlet originalBodyPointerEvents: string;\nwatchEffect((cleanupFn) => {\n if (!layerElement.value) return;\n if (props.disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.value.body.style.pointerEvents;\n ownerDocument.value.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(layerElement.value);\n }\n layers.value.add(layerElement.value);\n\n cleanupFn(() => {\n if (\n props.disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1\n ) {\n ownerDocument.value.body.style.pointerEvents = originalBodyPointerEvents;\n }\n });\n});\n\nwatchEffect((cleanupFn) => {\n cleanupFn(() => {\n if (!layerElement.value) return;\n layers.value.delete(layerElement.value);\n context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value);\n });\n});\n</script>\n\n<template>\n <Primitive\n :ref=\"forwardRef\"\n :as-child=\"asChild\"\n :as=\"as\"\n data-dismissable-layer\n :style=\"{\n pointerEvents: isBodyPointerEventsDisabled\n ? isPointerEventsEnabled\n ? 'auto'\n : 'none'\n : undefined,\n }\"\n @focus.capture=\"focusOutside.onFocusCapture\"\n @blur.capture=\"focusOutside.onBlurCapture\"\n @pointerdown.capture=\"pointerDownOutside.onPointerDownCapture\"\n >\n <slot />\n </Primitive>\n</template>\n","import { createGlobalState } from '@vueuse/core'\nimport { ref } from 'vue'\n\ninterface FocusScopeAPI {\n paused: boolean\n pause: () => void\n resume: () => void\n}\n\nconst useFocusStackState = createGlobalState(() => {\n const stack = ref<FocusScopeAPI[]>([])\n return stack\n})\n\nexport function createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */\n const stack = useFocusStackState()\n\n return {\n add(focusScope: FocusScopeAPI) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack.value[0]\n if (focusScope !== activeFocusScope)\n activeFocusScope?.pause()\n\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack.value = arrayRemove(stack.value, focusScope)\n stack.value.unshift(focusScope)\n },\n\n remove(focusScope: FocusScopeAPI) {\n stack.value = arrayRemove(stack.value, focusScope)\n stack.value[0]?.resume()\n },\n }\n}\n\nexport function arrayRemove<T>(array: T[], item: T) {\n const updatedArray = [...array]\n const index = updatedArray.indexOf(item)\n if (index !== -1)\n updatedArray.splice(index, 1)\n\n return updatedArray\n}\n\nexport function removeLinks(items: HTMLElement[]) {\n return items.filter(item => item.tagName !== 'A')\n}\n","import { getActiveElement } from \"../../shared\";\n\nexport const AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nexport const AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nexport const EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusableTarget = HTMLElement | { focus: () => void };\n\n/**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */\nexport function focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n const previouslyFocusedElement = getActiveElement();\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (getActiveElement() !== previouslyFocusedElement) return true;\n }\n}\n\n/**\n * Returns the first and last tabbable elements inside a container.\n */\nexport function getTabbableEdges(container: HTMLElement) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last] as const;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nexport function getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nexport function findVisible(elements: HTMLElement[], container: HTMLElement) {\n for (const element of elements) {\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\n\nexport function isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement as HTMLElement;\n }\n return false;\n}\n\nexport function isSelectableInput(\n element: any,\n): element is FocusableTarget & { select: () => void } {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\n\nexport function focus(\n element?: FocusableTarget | null,\n { select = false } = {},\n) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = getActiveElement();\n // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({ preventScroll: true });\n // only select if its not the same element, it supports selection and we need to select\n if (\n element !== previouslyFocusedElement &&\n isSelectableInput(element) &&\n select\n ) {\n element.select();\n }\n }\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { getActiveElement, useForwardExpose } from \"../../shared\";\n\nexport type FocusScopeEmits = {\n /**\n * Event handler called when auto-focusing on mount.\n * Can be prevented.\n */\n mountAutoFocus: [event: Event];\n\n /**\n * Event handler called when auto-focusing on unmount.\n * Can be prevented.\n */\n unmountAutoFocus: [event: Event];\n};\n\nexport interface FocusScopeProps extends PrimitiveProps {\n /**\n * When `true`, tabbing from last item will focus first tabbable\n * and shift+tab from first item will focus last tababble.\n * @defaultValue false\n */\n loop?: boolean;\n\n /**\n * When `true`, focus cannot escape the focus scope via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapped?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isClient } from \"@vueuse/shared\";\nimport { nextTick, reactive, ref, watchEffect } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { createFocusScopesStack, removeLinks } from \"./stack\";\nimport {\n AUTOFOCUS_ON_MOUNT,\n AUTOFOCUS_ON_UNMOUNT,\n EVENT_OPTIONS,\n focus,\n focusFirst,\n getTabbableCandidates,\n getTabbableEdges,\n} from \"./utils\";\n\nconst props = withDefaults(defineProps<FocusScopeProps>(), {\n loop: false,\n trapped: false,\n});\nconst emits = defineEmits<FocusScopeEmits>();\n\nconst { currentRef, currentElement } = useForwardExpose();\nconst lastFocusedElementRef = ref<HTMLElement | null>(null);\nconst focusScopesStack = createFocusScopesStack();\n\nconst focusScope = reactive({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n },\n});\n\nwatchEffect((cleanupFn) => {\n if (!isClient) return;\n const container = currentElement.value;\n if (!props.trapped) return;\n\n function handleFocusIn(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const target = event.target as HTMLElement | null;\n if (container.contains(target)) lastFocusedElementRef.value = target;\n else focus(lastFocusedElementRef.value, { select: true });\n }\n\n function handleFocusOut(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget as HTMLElement | null;\n\n // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return;\n\n // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container.contains(relatedTarget))\n focus(lastFocusedElementRef.value, { select: true });\n }\n\n // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n // -- related: https://github.com/unovue/reka-ui/issues/518\n // Reka UI tentative solution:\n // instead of leaning on document.activeElement, we use lastFocusedElementRef.value to check\n // if the element still exist inside the container,\n // if not then we focus to the container\n function handleMutations(mutations: MutationRecord[]) {\n const isLastFocusedElementExist = container.contains(\n lastFocusedElementRef.value,\n );\n if (!isLastFocusedElementExist) focus(container);\n }\n\n document.addEventListener(\"focusin\", handleFocusIn);\n document.addEventListener(\"focusout\", handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container)\n mutationObserver.observe(container, { childList: true, subtree: true });\n\n cleanupFn(() => {\n document.removeEventListener(\"focusin\", handleFocusIn);\n document.removeEventListener(\"focusout\", handleFocusOut);\n mutationObserver.disconnect();\n });\n});\n\nwatchEffect(async (cleanupFn) => {\n const container = currentElement.value;\n\n await nextTick();\n if (!container) return;\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = getActiveElement() as HTMLElement | null;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, (ev: Event) =>\n emits(\"mountAutoFocus\", ev),\n );\n container.dispatchEvent(mountEvent);\n\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), {\n select: true,\n });\n if (getActiveElement() === previouslyFocusedElement) focus(container);\n }\n }\n\n cleanupFn(() => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, (ev: Event) =>\n emits(\"mountAutoFocus\", ev),\n );\n\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n const unmountEventHandler = (ev: Event) => {\n emits(\"unmountAutoFocus\", ev);\n };\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler);\n container.dispatchEvent(unmountEvent);\n\n setTimeout(() => {\n if (!unmountEvent.defaultPrevented)\n focus(previouslyFocusedElement ?? document.body, { select: true });\n\n // we need to remove the listener after we `dispatchEvent`\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler);\n\n focusScopesStack.remove(focusScope);\n }, 0);\n });\n});\n\nfunction handleKeyDown(event: KeyboardEvent) {\n if (!props.loop && !props.trapped) return;\n if (focusScope.paused) return;\n\n const isTabKey =\n event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = getActiveElement() as HTMLElement | null;\n\n if (isTabKey && focusedElement) {\n const container = event.currentTarget as HTMLElement;\n const [first, last] = getTabbableEdges(container);\n const hasTabbableElementsInside = first && last;\n\n // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (props.loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (props.loop) focus(last, { select: true });\n }\n }\n }\n}\n</script>\n\n<template>\n <Primitive\n ref=\"currentRef\"\n tabindex=\"-1\"\n :as-child=\"asChild\"\n :as=\"as\"\n @keydown=\"handleKeyDown\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type {\n DismissableLayerEmits,\n DismissableLayerProps,\n} from \"../DismissableLayer\";\nimport type { FocusScopeProps } from \"../FocusScope\";\nimport type { PopperContentProps } from \"../Popper\";\nimport { reactiveOmit } from \"@vueuse/shared\";\n\nexport type PopoverContentImplEmits = DismissableLayerEmits & {\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n openAutoFocus: [event: Event];\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n closeAutoFocus: [event: Event];\n};\n\nexport interface PopoverContentImplProps\n extends PopperContentProps, DismissableLayerProps {}\n\ninterface PopoverContentImplPrivateProps extends PopoverContentImplProps {\n /**\n * Whether focus should be trapped within the `MenuContent`\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps[\"trapped\"];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { DismissableLayer } from \"../DismissableLayer\";\nimport { FocusScope } from \"../FocusScope\";\nimport { PopperContent } from \"../Popper\";\nimport {\n useFocusGuards,\n useForwardExpose,\n useForwardProps,\n} from \"../../shared\";\nimport { injectPopoverRootContext } from \"./PopoverRoot.vue\";\n\nconst props = defineProps<PopoverContentImplPrivateProps>();\nconst emits = defineEmits<PopoverContentImplEmits>();\n\nconst forwarded = useForwardProps(\n reactiveOmit(props, \"trapFocus\", \"disableOutsidePointerEvents\"),\n);\nconst { forwardRef } = useForwardExpose();\n\nconst rootContext = injectPopoverRootContext();\nuseFocusGuards();\n</script>\n\n<template>\n <FocusScope\n as-child\n loop\n :trapped=\"trapFocus\"\n @mount-auto-focus=\"emits('openAutoFocus', $event)\"\n @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n >\n <DismissableLayer\n as-child\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n @interact-outside=\"emits('interactOutside', $event)\"\n @escape-key-down=\"emits('escapeKeyDown', $event)\"\n @focus-outside=\"emits('focusOutside', $event)\"\n @dismiss=\"rootContext.onOpenChange(false)\"\n >\n <PopperContent\n v-bind=\"forwarded\"\n :id=\"rootContext.contentId\"\n :ref=\"forwardRef\"\n :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n :aria-labelledby=\"rootContext.triggerId\"\n :style=\"{\n '--reka-popover-content-transform-origin':\n 'var(--reka-popper-transform-origin)',\n '--reka-popover-content-available-width':\n 'var(--reka-popper-available-width)',\n '--reka-popover-content-available-height':\n 'var(--reka-popper-available-height)',\n '--reka-popover-trigger-width': 'var(--reka-popper-anchor-width)',\n '--reka-popover-trigger-height': 'var(--reka-popper-anchor-height)',\n }\"\n role=\"dialog\"\n >\n <slot />\n </PopperContent>\n </DismissableLayer>\n </FocusScope>\n</template>\n","<script setup lang=\"ts\">\nimport type {\n PopoverContentImplEmits,\n PopoverContentImplProps,\n} from \"./PopoverContentImpl.vue\";\nimport { ref } from \"vue\";\nimport { useForwardPropsEmits } from \"../../shared\";\nimport PopoverContentImpl from \"./PopoverContentImpl.vue\";\nimport { injectPopoverRootContext } from \"./PopoverRoot.vue\";\n\nconst props = defineProps<PopoverContentImplProps>();\nconst emits = defineEmits<PopoverContentImplEmits>();\nconst rootContext = injectPopoverRootContext();\nconst hasInteractedOutsideRef = ref(false);\nconst hasPointerDownOutsideRef = ref(false);\n\nconst forwarded = useForwardPropsEmits(props, emits);\n</script>\n\n<template>\n <PopoverContentImpl\n v-bind=\"forwarded\"\n :trap-focus=\"false\"\n :disable-outside-pointer-events=\"false\"\n @close-auto-focus=\"\n (event) => {\n emits('closeAutoFocus', event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef)\n rootContext.triggerElement.value?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef = false;\n hasPointerDownOutsideRef = false;\n }\n \"\n @interact-outside=\"\n async (event) => {\n emits('interactOutside', event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger =\n rootContext.triggerElement.value?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (\n event.detail.originalEvent.type === 'focusin' &&\n hasPointerDownOutsideRef\n ) {\n event.preventDefault();\n }\n }\n \"\n >\n <slot />\n </PopoverContentImpl>\n</template>\n","<script lang=\"ts\">\nimport type {\n PopoverContentImplEmits,\n PopoverContentImplProps,\n} from \"./PopoverContentImpl.vue\";\n\nexport type PopoverContentEmits = PopoverContentImplEmits;\n\nexport interface PopoverContentProps extends PopoverContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with Vue animation libraries.\n */\n forceMount?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from \"../Presence\";\nimport { useForwardExpose, useForwardPropsEmits, useId } from \"../../shared\";\nimport PopoverContentNonModal from \"./PopoverContentNonModal.vue\";\nimport { injectPopoverRootContext } from \"./PopoverRoot.vue\";\n\nconst props = defineProps<PopoverContentProps>();\nconst emits = defineEmits<PopoverContentEmits>();\n\nconst rootContext = injectPopoverRootContext();\n\nconst forwarded = useForwardPropsEmits(props, emits);\nconst { forwardRef } = useForwardExpose();\n\nrootContext.contentId ||= useId(undefined, \"reka-popover-content\");\n</script>\n\n<template>\n <Presence :present=\"forceMount || rootContext.open.value\">\n <PopoverContentNonModal v-bind=\"forwarded\" :ref=\"forwardRef\">\n <slot />\n </PopoverContentNonModal>\n </Presence>\n</template>\n","<script lang=\"ts\">\nexport interface TeleportProps {\n /**\n * Vue native teleport component prop `:to`\n *\n * {@link https://vuejs.org/guide/built-ins/teleport.html#basic-usage}\n */\n to?: string | HTMLElement\n /**\n * Disable teleport and render the component inline\n *\n * {@link https://vuejs.org/guide/built-ins/teleport.html#disabling-teleport}\n */\n disabled?: boolean\n /**\n * Defer the resolving of a Teleport target until other parts of the\n * application have mounted (requires Vue 3.5.0+)\n *\n * {@link https://vuejs.org/guide/built-ins/teleport.html#deferred-teleport}\n */\n defer?: boolean\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with Vue animation libraries.\n */\n forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted } from '@vueuse/core'\n\nwithDefaults(defineProps<TeleportProps>(), {\n to: 'body',\n})\n\nconst isMounted = useMounted()\n</script>\n\n<template>\n <Teleport\n v-if=\"isMounted || forceMount\"\n :to=\"to\"\n :disabled=\"disabled\"\n :defer=\"defer\"\n >\n <slot />\n </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from \"../Teleport\";\n\nexport type PopoverPortalProps = TeleportProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from \"../Teleport\";\n\nconst props = defineProps<PopoverPortalProps>();\n</script>\n\n<template>\n <TeleportPrimitive v-bind=\"props\">\n <slot />\n </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { useForwardExpose, useId } from \"../../shared\";\n\nexport type PopoverTriggerProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from \"vue\";\nimport { PopperAnchor } from \"../Popper\";\nimport { Primitive } from \"../Primitive\";\nimport { injectPopoverRootContext } from \"./PopoverRoot.vue\";\n\nconst props = withDefaults(defineProps<PopoverTriggerProps>(), {\n as: \"button\",\n});\n\nconst rootContext = injectPopoverRootContext();\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose();\n\nrootContext.triggerId ||= useId(undefined, \"reka-popover-trigger\");\nonMounted(() => {\n rootContext.triggerElement.value = triggerElement.value;\n});\n</script>\n\n<template>\n <component\n :is=\"rootContext.hasCustomAnchor.value ? Primitive : PopperAnchor\"\n as-child\n >\n <Primitive\n :id=\"rootContext.triggerId\"\n :ref=\"forwardRef\"\n :type=\"as === 'button' ? 'button' : undefined\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"rootContext.open.value\"\n :aria-controls=\"rootContext.contentId\"\n :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n :as=\"as\"\n :as-child=\"props.asChild\"\n @click=\"rootContext.onOpenToggle\"\n >\n <slot />\n </Primitive>\n </component>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverAnchorProps } from \"../Popover\";\nimport { PopoverAnchor } from \"../Popover\";\n\nexport type DatePickerAnchorProps = PopoverAnchorProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerAnchorProps>();\n</script>\n\n<template>\n <PopoverAnchor v-bind=\"props\">\n <slot />\n </PopoverAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverArrowProps } from \"../Popover\";\nimport { PopoverArrow } from \"../Popover\";\n\nexport type DatePickerArrowProps = PopoverArrowProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerArrowProps>();\n</script>\n\n<template>\n <PopoverArrow v-bind=\"props\">\n <slot />\n </PopoverArrow>\n</template>\n","/*\n * Adapted from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/calendar/create.ts\n */\n\nimport type { DateFields, DateValue } from \"@internationalized/date\";\nimport type { Ref } from \"vue\";\nimport type { Grid, Matcher, WeekDayFormat } from \"../../date\";\nimport type { DateFormatterOptions } from \"../../shared/useDateFormatter\";\nimport { isEqualMonth, isSameDay } from \"@internationalized/date\";\nimport { computed, ref, watch } from \"vue\";\nimport {\n createMonths,\n getDaysInMonth,\n isAfter,\n isBefore,\n toDate,\n createYearRange,\n} from \"../../date\";\nimport { useDateFormatter } from \"../../shared\";\n\nexport type UseCalendarProps = {\n locale: Ref<string>;\n placeholder: Ref<DateValue>;\n weekStartsOn: Ref<0 | 1 | 2 | 3 | 4 | 5 | 6>;\n fixedWeeks: Ref<boolean>;\n numberOfMonths: Ref<number>;\n minValue: Ref<DateValue | undefined>;\n maxValue: Ref<DateValue | undefined>;\n disabled: Ref<boolean>;\n weekdayFormat: Ref<WeekDayFormat>;\n pagedNavigation: Ref<boolean>;\n isDateDisabled?: Matcher;\n isDateUnavailable?: Matcher;\n calendarLabel: Ref<string | undefined>;\n nextPage: Ref<((placeholder: DateValue) => DateValue) | undefined>;\n prevPage: Ref<((placeholder: DateValue) => DateValue) | undefined>;\n};\n\nexport type UseCalendarStateProps = {\n isDateDisabled: Matcher;\n isDateUnavailable: Matcher;\n date: Ref<DateValue | DateValue[] | undefined>;\n};\n\nexport function useCalendarState(props: UseCalendarStateProps) {\n function isDateSelected(dateObj: DateValue) {\n if (Array.isArray(props.date.value))\n return props.date.value.some((d) => isSameDay(d, dateObj));\n else if (!props.date.value) return false;\n else return isSameDay(props.date.value, dateObj);\n }\n\n const isInvalid = computed(() => {\n if (Array.isArray(props.date.value)) {\n if (!props.date.value.length) return false;\n for (const dateObj of props.date.value) {\n if (props.isDateDisabled?.(dateObj)) return true;\n if (props.isDateUnavailable?.(dateObj)) return true;\n }\n } else {\n if (!props.date.value) return false;\n if (props.isDateDisabled?.(props.date.value)) return true;\n if (props.isDateUnavailable?.(props.date.value)) return true;\n }\n return false;\n });\n\n return {\n isDateSelected,\n isInvalid,\n };\n}\n\nfunction handleNextDisabled(\n lastPeriodInView: DateValue,\n nextPageFunc: (date: DateValue) => DateValue,\n): DateValue {\n const firstPeriodOfNextPage = nextPageFunc(lastPeriodInView);\n const diff = firstPeriodOfNextPage.compare(lastPeriodInView);\n const duration: DateFields = {};\n if (diff >= 7) duration.day = 1;\n if (diff >= getDaysInMonth(lastPeriodInView)) duration.month = 1;\n return firstPeriodOfNextPage.set({ ...duration });\n}\nfunction handlePrevDisabled(\n firstPeriodInView: DateValue,\n prevPageFunc: (date: DateValue) => DateValue,\n): DateValue {\n const lastPeriodOfPrevPage = prevPageFunc(firstPeriodInView);\n const diff = firstPeriodInView.compare(lastPeriodOfPrevPage);\n const duration: DateFields = {};\n if (diff >= 7) duration.day = 35;\n if (diff >= getDaysInMonth(firstPeriodInView)) duration.month = 13;\n return lastPeriodOfPrevPage.set({ ...duration });\n}\nfunction handleNextPage(\n date: DateValue,\n nextPageFunc: (date: DateValue) => DateValue,\n): DateValue {\n return nextPageFunc(date);\n}\n\nfunction handlePrevPage(\n date: DateValue,\n prevPageFunc: (date: DateValue) => DateValue,\n): DateValue {\n return prevPageFunc(date);\n}\n\nexport function useCalendar(props: UseCalendarProps) {\n const formatter = useDateFormatter(props.locale.value);\n\n const headingFormatOptions = computed(() => {\n const options: DateFormatterOptions = {\n calendar: props.placeholder.value.calendar.identifier,\n };\n\n if (\n props.placeholder.value.calendar.identifier === \"gregory\" &&\n props.placeholder.value.era === \"BC\"\n )\n options.era = \"short\";\n\n return options;\n });\n\n const grid = ref<Grid<DateValue>[]>(\n createMonths({\n dateObj: props.placeholder.value,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n }),\n ) as Ref<Grid<DateValue>[]>;\n\n const visibleView = computed(() => {\n return grid.value.map((month) => month.value);\n });\n\n function isOutsideVisibleView(date: DateValue) {\n return !visibleView.value.some((month) => isEqualMonth(date, month));\n }\n\n const isNextButtonDisabled = (\n nextPageFunc?: (date: DateValue) => DateValue,\n ) => {\n if (!props.maxValue.value || !grid.value.length) return false;\n if (props.disabled.value) return true;\n\n const lastPeriodInView = grid.value[grid.value.length - 1].value;\n\n if (!nextPageFunc && !props.nextPage.value) {\n const firstPeriodOfNextPage = lastPeriodInView\n .add({ months: 1 })\n .set({ day: 1 });\n return isAfter(firstPeriodOfNextPage, props.maxValue.value);\n }\n\n const firstPeriodOfNextPage = handleNextDisabled(\n lastPeriodInView,\n nextPageFunc || props.nextPage.value!,\n );\n return isAfter(firstPeriodOfNextPage, props.maxValue.value);\n };\n\n const isPrevButtonDisabled = (\n prevPageFunc?: (date: DateValue) => DateValue,\n ) => {\n if (!props.minValue.value || !grid.value.length) return false;\n if (props.disabled.value) return true;\n const firstPeriodInView = grid.value[0].value;\n\n if (!prevPageFunc && !props.prevPage.value) {\n const lastPeriodOfPrevPage = firstPeriodInView\n .subtract({ months: 1 })\n .set({ day: 35 });\n return isBefore(lastPeriodOfPrevPage, props.minValue.value);\n }\n\n const lastPeriodOfPrevPage = handlePrevDisabled(\n firstPeriodInView,\n prevPageFunc || props.prevPage.value!,\n );\n return isBefore(lastPeriodOfPrevPage, props.minValue.value);\n };\n\n function isDateDisabled(dateObj: DateValue) {\n if (props.isDateDisabled?.(dateObj) || props.disabled.value) return true;\n if (props.maxValue.value && isAfter(dateObj, props.maxValue.value))\n return true;\n if (props.minValue.value && isBefore(dateObj, props.minValue.value))\n return true;\n return false;\n }\n\n const isDateUnavailable = (date: DateValue) => {\n if (props.isDateUnavailable?.(date)) return true;\n return false;\n };\n\n const weekdays = computed(() => {\n if (!grid.value.length) return [];\n return grid.value[0].rows[0].map((date) => {\n return formatter.dayOfWeek(toDate(date), props.weekdayFormat.value);\n });\n });\n\n const nextPage = (nextPageFunc?: (date: DateValue) => DateValue) => {\n const firstDate = grid.value[0].value;\n\n if (!nextPageFunc && !props.nextPage.value) {\n const newDate = firstDate.add({\n months: props.pagedNavigation.value ? props.numberOfMonths.value : 1,\n });\n\n const newGrid = createMonths({\n dateObj: newDate,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n });\n\n grid.value = newGrid;\n\n props.placeholder.value = newGrid[0].value.set({ day: 1 });\n return;\n }\n\n const newDate = handleNextPage(\n firstDate,\n nextPageFunc || props.nextPage.value!,\n );\n const newGrid = createMonths({\n dateObj: newDate,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n });\n\n grid.value = newGrid;\n\n const duration: DateFields = {};\n\n // Do not adjust the placeholder if the nextPageFunc is defined (overwrite)\n if (!nextPageFunc) {\n const diff = newGrid[0].value.compare(firstDate);\n if (diff >= getDaysInMonth(firstDate)) duration.day = 1;\n\n if (diff >= 365) duration.month = 1;\n }\n\n props.placeholder.value = newGrid[0].value.set({ ...duration });\n };\n\n const prevPage = (prevPageFunc?: (date: DateValue) => DateValue) => {\n const firstDate = grid.value[0].value;\n\n if (!prevPageFunc && !props.prevPage.value) {\n const newDate = firstDate.subtract({\n months: props.pagedNavigation.value ? props.numberOfMonths.value : 1,\n });\n\n const newGrid = createMonths({\n dateObj: newDate,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n });\n\n grid.value = newGrid;\n\n props.placeholder.value = newGrid[0].value.set({ day: 1 });\n return;\n }\n\n const newDate = handlePrevPage(\n firstDate,\n prevPageFunc || props.prevPage.value!,\n );\n const newGrid = createMonths({\n dateObj: newDate,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n });\n\n grid.value = newGrid;\n\n const duration: DateFields = {};\n\n // Do not adjust the placeholder if the prevPageFunc is defined (overwrite)\n if (!prevPageFunc) {\n const diff = firstDate.compare(newGrid[0].value);\n if (diff >= getDaysInMonth(firstDate)) duration.day = 1;\n\n if (diff >= 365) duration.month = 1;\n }\n\n props.placeholder.value = newGrid[0].value.set({ ...duration });\n };\n\n watch(props.placeholder, (value) => {\n if (visibleView.value.some((month) => isEqualMonth(month, value))) return;\n grid.value = createMonths({\n dateObj: value,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n });\n });\n\n watch(\n [props.locale, props.weekStartsOn, props.fixedWeeks, props.numberOfMonths],\n () => {\n grid.value = createMonths({\n dateObj: props.placeholder.value,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: props.numberOfMonths.value,\n });\n },\n );\n\n const headingValue = computed(() => {\n if (!grid.value.length) return \"\";\n\n if (props.locale.value !== formatter.getLocale())\n formatter.setLocale(props.locale.value);\n\n if (grid.value.length === 1) {\n const month = grid.value[0].value;\n return `${formatter.fullMonthAndYear(toDate(month), headingFormatOptions.value)}`;\n }\n\n const startMonth = toDate(grid.value[0].value);\n const endMonth = toDate(grid.value[grid.value.length - 1].value);\n\n const startMonthName = formatter.fullMonth(\n startMonth,\n headingFormatOptions.value,\n );\n const endMonthName = formatter.fullMonth(\n endMonth,\n headingFormatOptions.value,\n );\n const startMonthYear = formatter.fullYear(\n startMonth,\n headingFormatOptions.value,\n );\n const endMonthYear = formatter.fullYear(\n endMonth,\n headingFormatOptions.value,\n );\n\n const content =\n startMonthYear === endMonthYear\n ? `${startMonthName} - ${endMonthName} ${endMonthYear}`\n : `${startMonthName} ${startMonthYear} - ${endMonthName} ${endMonthYear}`;\n\n return content;\n });\n\n // TODO: rewrite (a lot of duplication)\n const currentMonth = computed(() => {\n if (!grid.value.length) return \"\";\n \n if (props.locale.value !== formatter.getLocale())\n formatter.setLocale(props.locale.value);\n\n const date = grid.value[0]?.value;\n\n if (date) {\n return `${formatter.fullMonth(toDate(date), headingFormatOptions.value)}`;\n }\n\n return \"\";\n });\n\n const currentYear = computed(() => {\n if (!grid.value.length) return \"\";\n\n if (props.locale.value !== formatter.getLocale())\n formatter.setLocale(props.locale.value);\n\n const date = grid.value[0]?.value;\n\n if (date) {\n return `${formatter.fullYear(toDate(date), headingFormatOptions.value)}`;\n }\n\n return \"\";\n });\n\n // TODO: look if there is a better way to create months with locale month name\n const months = computed(() => {\n const startDate = props.placeholder.value.set({ month: 1 });\n\n const monthsArray = createMonths({\n dateObj: startDate,\n weekStartsOn: props.weekStartsOn.value,\n locale: props.locale.value,\n fixedWeeks: props.fixedWeeks.value,\n numberOfMonths: 12,\n });\n\n \n\n return monthsArray.map((month) => {\n const date = month.value.copy() as DateValue & { monthName: string };\n date.monthName = `${formatter.fullMonth(toDate(date), headingFormatOptions.value)}`;\n return date;\n });\n });\n\n // TODO: add min and max for years and maybe we should switch to date object here as well for consistency\n const years = computed(() => {\n const startDate = props.placeholder.value.set({ year: 1875 });\n const endDate = props.placeholder.value.set({ year: 2100 });\n \n return createYearRange({ start: startDate, end: endDate })\n });\n\n const fullCalendarLabel = computed(\n () => `${props.calendarLabel.value ?? \"Event Date\"}, ${headingValue.value}`,\n );\n\n return {\n isDateDisabled,\n isDateUnavailable,\n isNextButtonDisabled,\n isPrevButtonDisabled,\n grid,\n weekdays,\n visibleView,\n isOutsideVisibleView,\n formatter,\n nextPage,\n prevPage,\n headingValue,\n currentMonth,\n currentYear,\n fullCalendarLabel,\n months,\n years,\n };\n}\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\n\nimport type { Ref } from \"vue\";\nimport type { Grid, Matcher, WeekDayFormat } from \"../../date\";\nimport type { PrimitiveProps } from \"../Primitive\";\n\nimport type { Formatter } from \"../../shared\";\nimport type { Direction } from \"../../shared/types\";\nimport { isEqualDay, isSameDay } from \"@internationalized/date\";\nimport { createContext, useDirection, useLocale } from \"../../shared\";\nimport { getDefaultDate, handleCalendarInitialFocus } from \"../../shared/date\";\nimport { useCalendar, useCalendarState } from \"./useCalendar\";\n\nexport type MonthNameDateValue = DateValue & { monthName: string };\n\ntype CalendarRootContext = {\n locale: Ref<string>;\n modelValue: Ref<DateValue | DateValue[] | undefined>;\n placeholder: Ref<DateValue>;\n pagedNavigation: Ref<boolean>;\n preventDeselect: Ref<boolean>;\n grid: Ref<Grid<DateValue>[]>;\n weekDays: Ref<string[]>;\n weekStartsOn: Ref<0 | 1 | 2 | 3 | 4 | 5 | 6>;\n weekdayFormat: Ref<WeekDayFormat>;\n fixedWeeks: Ref<boolean>;\n multiple: Ref<boolean>;\n numberOfMonths: Ref<number>;\n disabled: Ref<boolean>;\n readonly: Ref<boolean>;\n initialFocus: Ref<boolean>;\n onDateChange: (date: DateValue) => void;\n onPlaceholderChange: (date: DateValue) => void;\n fullCalendarLabel: Ref<string>;\n parentElement: Ref<HTMLElement | undefined>;\n headingValue: Ref<string>;\n currentMonth: Ref<string>;\n currentYear: Ref<string>;\n isInvalid: Ref<boolean>;\n isDateDisabled: Matcher;\n isDateSelected: Matcher;\n isDateUnavailable?: Matcher;\n isOutsideVisibleView: (date: DateValue) => boolean;\n prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void;\n nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void;\n isNextButtonDisabled: (\n nextPageFunc?: (date: DateValue) => DateValue,\n ) => boolean;\n isPrevButtonDisabled: (\n prevPageFunc?: (date: DateValue) => DateValue,\n ) => boolean;\n formatter: Formatter;\n dir: Ref<Direction>;\n disableDaysOutsideCurrentView: Ref<boolean>;\n minValue: Ref<DateValue | undefined>;\n maxValue: Ref<DateValue | undefined>;\n months: Ref<MonthNameDateValue[]>;\n years: Ref<{ year: number }[]>;\n monthYearOverlayState: Ref<false | \"month\" | \"year\">;\n};\n\nexport interface CalendarRootProps extends PrimitiveProps {\n /** The default value for the calendar */\n defaultValue?: DateValue;\n /** The default placeholder date */\n defaultPlaceholder?: DateValue;\n /** The placeholder date, which is used to determine what month to display when no date is selected */\n placeholder?: DateValue;\n /** This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month */\n pagedNavigation?: boolean;\n /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n preventDeselect?: boolean;\n /** The day of the week to start the calendar on */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** The format to use for the weekday strings provided via the weekdays slot prop */\n weekdayFormat?: WeekDayFormat;\n /** The accessible label for the calendar */\n calendarLabel?: string;\n /** Whether or not to always display 6 weeks in the calendar */\n fixedWeeks?: boolean;\n /** The maximum date that can be selected */\n maxValue?: DateValue;\n /** The minimum date that can be selected */\n minValue?: DateValue;\n /** The locale to use for formatting dates */\n locale?: string;\n /** The number of months to display at once */\n numberOfMonths?: number;\n /** Whether the calendar is disabled */\n disabled?: boolean;\n /** Whether the calendar is readonly */\n readonly?: boolean;\n /** If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted */\n initialFocus?: boolean;\n /** A function that returns whether or not a date is disabled */\n isDateDisabled?: Matcher;\n /** A function that returns whether or not a date is unavailable */\n isDateUnavailable?: Matcher;\n /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n dir?: Direction;\n /** A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component. */\n nextPage?: (placeholder: DateValue) => DateValue;\n /** A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component. */\n prevPage?: (placeholder: DateValue) => DateValue;\n /** The controlled checked state of the calendar */\n modelValue?: DateValue | DateValue[] | undefined;\n /** Whether multiple dates can be selected */\n multiple?: boolean;\n /** Whether or not to disable days outside the current view. */\n disableDaysOutsideCurrentView?: boolean;\n}\n\nexport type CalendarRootEmits = {\n /** Event handler called whenever the model value changes */\n \"update:modelValue\": [date: DateValue | undefined];\n /** Event handler called whenever the placeholder value changes */\n \"update:placeholder\": [date: DateValue];\n};\n\nexport const [injectCalendarRootContext, provideCalendarRootContext] =\n createContext<CalendarRootContext>(\"CalendarRoot\");\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from \"@vueuse/core\";\nimport { onMounted, toRefs, watch, ref } from \"vue\";\nimport { Primitive, usePrimitiveElement } from \"../Primitive\";\n\nconst props = withDefaults(defineProps<CalendarRootProps>(), {\n defaultValue: undefined,\n as: \"div\",\n pagedNavigation: false,\n preventDeselect: false,\n weekStartsOn: 0,\n weekdayFormat: \"narrow\",\n fixedWeeks: false,\n multiple: false,\n numberOfMonths: 1,\n disabled: false,\n readonly: false,\n initialFocus: false,\n placeholder: undefined,\n isDateDisabled: undefined,\n isDateUnavailable: undefined,\n disableDaysOutsideCurrentView: false,\n});\nconst emits = defineEmits<CalendarRootEmits>();\ndefineSlots<{\n default?: (props: {\n /** The current date of the placeholder */\n date: DateValue;\n /** The grid of dates */\n grid: Grid<DateValue>[];\n /** The days of the week */\n weekDays: string[];\n /** The start of the week */\n weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** The calendar locale */\n locale: string;\n /** Whether or not to always display 6 weeks in the calendar */\n fixedWeeks: boolean;\n /** The current date of the calendar */\n modelValue: DateValue | DateValue[] | undefined;\n }) => any;\n}>();\n\nconst {\n disabled,\n readonly,\n initialFocus,\n pagedNavigation,\n weekStartsOn,\n weekdayFormat,\n fixedWeeks,\n multiple,\n minValue,\n maxValue,\n numberOfMonths,\n preventDeselect,\n isDateDisabled: propsIsDateDisabled,\n isDateUnavailable: propsIsDateUnavailable,\n calendarLabel,\n defaultValue,\n nextPage: propsNextPage,\n prevPage: propsPrevPage,\n dir: propDir,\n locale: propLocale,\n disableDaysOutsideCurrentView,\n} = toRefs(props);\n\nconst { primitiveElement, currentElement: parentElement } =\n usePrimitiveElement();\nconst locale = useLocale(propLocale);\nconst dir = useDirection(propDir);\n\nconst modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: defaultValue.value,\n passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>;\n\nconst monthYearOverlayState = ref<(false | \"month\" | \"year\")>(false);\n\nconst defaultDate = getDefaultDate({\n defaultPlaceholder: props.placeholder,\n defaultValue: modelValue.value,\n locale: props.locale,\n});\n\nconst placeholder = useVModel(props, \"placeholder\", emits, {\n defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>;\n\nfunction onPlaceholderChange(value: DateValue) {\n placeholder.value = value.copy();\n}\n\nconst {\n fullCalendarLabel,\n headingValue,\n isDateDisabled,\n isDateUnavailable,\n isNextButtonDisabled,\n isPrevButtonDisabled,\n weekdays,\n isOutsideVisibleView,\n nextPage,\n prevPage,\n formatter,\n grid,\n currentMonth,\n currentYear,\n months,\n years,\n} = useCalendar({\n locale,\n placeholder,\n weekStartsOn,\n fixedWeeks,\n numberOfMonths,\n minValue,\n maxValue,\n disabled,\n weekdayFormat,\n pagedNavigation,\n isDateDisabled: propsIsDateDisabled.value,\n isDateUnavailable: propsIsDateUnavailable.value,\n calendarLabel,\n nextPage: propsNextPage,\n prevPage: propsPrevPage,\n});\n\nconst { isInvalid, isDateSelected } = useCalendarState({\n date: modelValue,\n isDateDisabled,\n isDateUnavailable,\n});\n\nwatch(modelValue, (_modelValue) => {\n if (Array.isArray(_modelValue) && _modelValue.length) {\n const lastValue = _modelValue[_modelValue.length - 1];\n if (lastValue && !isEqualDay(placeholder.value, lastValue))\n onPlaceholderChange(lastValue);\n } else if (\n !Array.isArray(_modelValue) &&\n _modelValue &&\n !isEqualDay(placeholder.value, _modelValue)\n ) {\n onPlaceholderChange(_modelValue);\n }\n});\n\nfunction onDateChange(value: DateValue) {\n if (!multiple.value) {\n if (!modelValue.value) {\n modelValue.value = value.copy();\n return;\n }\n\n if (\n !preventDeselect.value &&\n isEqualDay(modelValue.value as DateValue, value)\n ) {\n placeholder.value = value.copy();\n modelValue.value = undefined;\n } else {\n modelValue.value = value.copy();\n }\n } else if (!modelValue.value) {\n modelValue.value = [value.copy()];\n } else if (Array.isArray(modelValue.value)) {\n const index = modelValue.value.findIndex((date) => isSameDay(date, value));\n if (index === -1) {\n modelValue.value = [...modelValue.value, value];\n } else if (!preventDeselect.value) {\n const next = modelValue.value.filter((date) => !isSameDay(date, value));\n if (!next.length) {\n placeholder.value = value.copy();\n modelValue.value = undefined;\n return;\n }\n modelValue.value = next.map((date) => date.copy());\n }\n }\n}\n\nonMounted(() => {\n if (initialFocus.value) handleCalendarInitialFocus(parentElement.value);\n});\n\nprovideCalendarRootContext({\n isDateUnavailable,\n dir,\n isDateDisabled,\n locale,\n formatter,\n modelValue,\n placeholder,\n disabled,\n initialFocus,\n pagedNavigation,\n grid,\n weekDays: weekdays,\n weekStartsOn,\n weekdayFormat,\n fixedWeeks,\n multiple,\n numberOfMonths,\n monthYearOverlayState,\n readonly,\n preventDeselect,\n fullCalendarLabel,\n headingValue,\n isInvalid,\n isDateSelected,\n isNextButtonDisabled,\n isPrevButtonDisabled,\n isOutsideVisibleView,\n nextPage,\n prevPage,\n parentElement,\n onPlaceholderChange,\n onDateChange,\n disableDaysOutsideCurrentView,\n minValue,\n maxValue,\n currentMonth,\n currentYear,\n months,\n years,\n});\n</script>\n\n<template>\n <Primitive\n ref=\"primitiveElement\"\n :as=\"as\"\n :as-child=\"asChild\"\n :aria-label=\"fullCalendarLabel\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :dir=\"dir\"\n >\n <slot\n :date=\"placeholder\"\n :grid=\"grid\"\n :week-days=\"weekdays\"\n :week-starts-on=\"weekStartsOn\"\n :locale=\"locale\"\n :fixed-weeks=\"fixedWeeks\"\n :model-value=\"modelValue\"\n />\n <div\n style=\"\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n \"\n >\n <div role=\"heading\" aria-level=\"2\">\n {{ fullCalendarLabel }}\n </div>\n </div>\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport interface CalendarCellProps extends PrimitiveProps {\n /** The date value for the cell */\n date: DateValue;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nwithDefaults(defineProps<CalendarCellProps>(), { as: \"td\" });\nconst rootContext = injectCalendarRootContext();\n</script>\n\n<template>\n <Primitive\n :as=\"as\"\n :as-child=\"asChild\"\n role=\"gridcell\"\n :aria-selected=\"rootContext.isDateSelected(date) ? true : undefined\"\n :aria-disabled=\"\n rootContext.isDateDisabled(date) ||\n rootContext.isDateUnavailable?.(date) ||\n rootContext.disableDaysOutsideCurrentView.value\n \"\n :data-disabled=\"\n rootContext.isDateDisabled(date) ||\n rootContext.disableDaysOutsideCurrentView.value\n ? ''\n : undefined\n \"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { PrimitiveProps } from \"../Primitive\";\nimport {\n getLocalTimeZone,\n isSameDay,\n isSameMonth,\n isToday,\n} from \"@internationalized/date\";\nimport { computed, nextTick } from \"vue\";\nimport { toDate } from \"../../date\";\nimport { useKbd } from \"../../shared\";\n\nexport interface CalendarCellTriggerProps extends PrimitiveProps {\n /** The date value provided to the cell trigger */\n day: DateValue;\n /** The month in which the cell is rendered */\n month: DateValue;\n}\n\nexport interface CalendarCellTriggerSlot {\n default?: (props: {\n /** Current day */\n dayValue: string;\n /** Current disable state */\n disabled: boolean;\n /** Current selected state */\n selected: boolean;\n /** Current today state */\n today: boolean;\n /** Current outside view state */\n outsideView: boolean;\n /** Current outside visible view state */\n outsideVisibleView: boolean;\n /** Current unavailable state */\n unavailable: boolean;\n }) => any;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarCellTriggerProps>(), {\n as: \"div\",\n});\n\ndefineSlots<CalendarCellTriggerSlot>();\n\nconst kbd = useKbd();\nconst rootContext = injectCalendarRootContext();\n\nconst { primitiveElement, currentElement } = usePrimitiveElement();\n\nconst dayValue = computed(() =>\n props.day.day.toLocaleString(rootContext.locale.value),\n);\n\nconst labelText = computed(() => {\n return rootContext.formatter.custom(toDate(props.day), {\n weekday: \"long\",\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n });\n});\n\nconst isUnavailable = computed(\n () => rootContext.isDateUnavailable?.(props.day) ?? false,\n);\nconst isDateToday = computed(() => {\n return isToday(props.day, getLocalTimeZone());\n});\nconst isOutsideView = computed(() => {\n return !isSameMonth(props.day, props.month);\n});\n\nconst isOutsideVisibleView = computed(() =>\n rootContext.isOutsideVisibleView(props.day),\n);\n\nconst isDisabled = computed(\n () =>\n rootContext.isDateDisabled(props.day) ||\n (rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value),\n);\n\nconst isFocusedDate = computed(() => {\n return (\n !rootContext.disabled.value &&\n isSameDay(props.day, rootContext.placeholder.value)\n );\n});\nconst isSelectedDate = computed(() => rootContext.isDateSelected(props.day));\n\nfunction changeDate(date: DateValue) {\n if (rootContext.readonly.value) return;\n if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date))\n return;\n\n rootContext.onDateChange(date);\n}\n\nfunction handleClick() {\n if (isDisabled.value) return;\n changeDate(props.day);\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n if (isDisabled.value) return;\n e.preventDefault();\n e.stopPropagation();\n const parentElement = rootContext.parentElement.value!;\n const indexIncrementation = 7;\n const sign = rootContext.dir.value === \"rtl\" ? -1 : 1;\n switch (e.code) {\n case kbd.ARROW_RIGHT:\n shiftFocus(props.day, sign);\n break;\n case kbd.ARROW_LEFT:\n shiftFocus(props.day, -sign);\n break;\n case kbd.ARROW_UP:\n shiftFocus(props.day, -indexIncrementation);\n break;\n case kbd.ARROW_DOWN:\n shiftFocus(props.day, indexIncrementation);\n break;\n case kbd.ENTER:\n case kbd.SPACE_CODE:\n changeDate(props.day);\n }\n\n function shiftFocus(day: DateValue, add: number) {\n const candidateDayValue = day.add({ days: add });\n\n if (\n (rootContext.minValue.value &&\n candidateDayValue.compare(rootContext.minValue.value) < 0) ||\n (rootContext.maxValue.value &&\n candidateDayValue.compare(rootContext.maxValue.value) > 0)\n )\n return;\n\n const candidateDay = parentElement.querySelector<HTMLElement>(\n `[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`,\n );\n // If the date is not found it means we must change the page\n if (!candidateDay) {\n if (add > 0) {\n if (rootContext.isNextButtonDisabled()) return;\n rootContext.nextPage();\n } else {\n if (rootContext.isPrevButtonDisabled()) return;\n rootContext.prevPage();\n }\n nextTick(() => {\n shiftFocus(day, add);\n });\n return;\n }\n\n if (candidateDay && candidateDay.hasAttribute(\"data-disabled\")) {\n return shiftFocus(candidateDayValue, add);\n }\n rootContext.onPlaceholderChange(candidateDayValue);\n candidateDay?.focus();\n }\n}\n</script>\n\n<template>\n <Primitive\n ref=\"primitiveElement\"\n v-bind=\"props\"\n role=\"button\"\n :aria-label=\"labelText\"\n data-reka-calendar-cell-trigger\n :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n :data-selected=\"isSelectedDate ? true : undefined\"\n :data-value=\"day.toString()\"\n :data-disabled=\"isDisabled ? '' : undefined\"\n :data-unavailable=\"isUnavailable ? '' : undefined\"\n :data-today=\"isDateToday ? '' : undefined\"\n :data-outside-view=\"isOutsideView ? '' : undefined\"\n :data-outside-visible-view=\"isOutsideVisibleView ? '' : undefined\"\n :data-focused=\"isFocusedDate ? '' : undefined\"\n :tabindex=\"isFocusedDate ? 0 : isOutsideView || isDisabled ? undefined : -1\"\n @click=\"handleClick\"\n @keydown.up.down.left.right.space.enter=\"handleArrowKey\"\n @keydown.enter.prevent\n >\n <slot\n :day-value=\"dayValue\"\n :disabled=\"isDisabled\"\n :today=\"isDateToday\"\n :selected=\"isSelectedDate\"\n :outside-view=\"isOutsideView\"\n :outside-visible-view=\"isOutsideVisibleView\"\n :unavailable=\"isUnavailable\"\n >\n {{ dayValue }}\n </slot>\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarGridProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarGridProps>(), { as: \"table\" });\n\nconst rootContext = injectCalendarRootContext();\nconst disabled = computed(() =>\n rootContext.disabled.value ? true : undefined,\n);\nconst readonly = computed(() =>\n rootContext.readonly.value ? true : undefined,\n);\n</script>\n\n<template>\n <Primitive\n v-bind=\"props\"\n tabindex=\"-1\"\n role=\"grid\"\n :aria-readonly=\"readonly\"\n :aria-disabled=\"disabled\"\n :data-readonly=\"readonly && ''\"\n :data-disabled=\"disabled && ''\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarGridBodyProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\n\nconst props = withDefaults(defineProps<CalendarGridBodyProps>(), {\n as: \"tbody\",\n});\n</script>\n\n<template>\n <Primitive v-bind=\"props\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarGridHeadProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\n\nconst props = withDefaults(defineProps<CalendarGridHeadProps>(), {\n as: \"thead\",\n});\n</script>\n\n<template>\n <Primitive v-bind=\"props\" aria-hidden=\"true\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarGridRowProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\n\nconst props = withDefaults(defineProps<CalendarGridRowProps>(), { as: \"tr\" });\n</script>\n\n<template>\n <Primitive v-bind=\"props\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarHeadCellProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\n\nconst props = withDefaults(defineProps<CalendarHeadCellProps>(), { as: \"th\" });\n</script>\n\n<template>\n <Primitive v-bind=\"props\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarHeaderProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), { as: \"div\" });\n</script>\n\n<template>\n <Primitive v-bind=\"props\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport type CalendarHeadingProps = PrimitiveProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarHeadingProps>(), { as: \"div\" });\n\ndefineSlots<{\n default?: (props: {\n /** Current month and year */\n headingValue: string;\n }) => any;\n}>();\n\nconst rootContext = injectCalendarRootContext();\n</script>\n\n<template>\n <Primitive\n v-bind=\"props\"\n :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n >\n <slot :heading-value=\"rootContext.headingValue.value\">\n {{ rootContext.headingValue.value }}\n </slot>\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport interface CalendarNextProps extends PrimitiveProps {\n /** The function to be used for the next page. Overwrites the `nextPage` function set on the `CalendarRoot`. */\n nextPage?: (placeholder: DateValue) => DateValue;\n}\n\nexport interface CalendarNextSlot {\n default?: (props: {\n /** Current disable state */\n disabled: boolean;\n }) => any;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarNextProps>(), {\n as: \"button\",\n step: \"month\",\n});\ndefineSlots<CalendarNextSlot>();\n\nconst disabled = computed(\n () =>\n rootContext.disabled.value ||\n rootContext.isNextButtonDisabled(props.nextPage),\n);\n\nconst rootContext = injectCalendarRootContext();\n</script>\n\n<template>\n <Primitive\n :as=\"props.as\"\n :as-child=\"props.asChild\"\n aria-label=\"Next page\"\n :type=\"as === 'button' ? 'button' : undefined\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"disabled || undefined\"\n :disabled=\"disabled\"\n @click=\"rootContext.nextPage(props.nextPage)\"\n >\n <slot :disabled> Next page </slot>\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport interface CalendarPrevProps extends PrimitiveProps {\n /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `CalendarRoot`. */\n prevPage?: (placeholder: DateValue) => DateValue;\n}\n\nexport interface CalendarPrevSlot {\n default?: (props: {\n /** Current disable state */\n disabled: boolean;\n }) => any;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarPrevProps>(), {\n as: \"button\",\n step: \"month\",\n});\ndefineSlots<CalendarPrevSlot>();\n\nconst disabled = computed(\n () =>\n rootContext.disabled.value ||\n rootContext.isPrevButtonDisabled(props.prevPage),\n);\n\nconst rootContext = injectCalendarRootContext();\n</script>\n\n<template>\n <Primitive\n aria-label=\"Previous page\"\n :as=\"props.as\"\n :as-child=\"props.asChild\"\n :type=\"as === 'button' ? 'button' : undefined\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"disabled || undefined\"\n :disabled=\"disabled\"\n @click=\"rootContext.prevPage(props.prevPage)\"\n >\n <slot :disabled> Prev page </slot>\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport interface CalendarMonthHeadingProps extends PrimitiveProps {}\n\nexport interface CalendarNextSlot {\n default?: (props: {\n /** Current disable state */\n disabled: boolean;\n }) => any;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarMonthHeadingProps>(), {\n as: \"button\",\n});\n\n// TODO\n// defineSlots<CalendarNextSlot>();\n\nconst disabled = computed(() => {\n // TODO\n\n // rootContext.disabled.value ||\n // rootContext.isNextButtonDisabled(props.nextPage),\n return false;\n});\n\nconst rootContext = injectCalendarRootContext();\nconst currentMonth = computed(() => rootContext.currentMonth?.value);\nconst attrs = useAttrs();\nconst ariaLabel = computed(\n () =>\n currentMonth.value +\n \" - \" +\n (attrs[\"aria-label\"] || \"Open month selection overlay\"),\n);\n\nfunction handleClick() {\n rootContext.monthYearOverlayState.value = \"month\";\n}\n</script>\n\n<template>\n <Primitive\n :as=\"props.as\"\n :as-child=\"props.asChild\"\n :aria-label=\"ariaLabel\"\n :type=\"as === 'button' ? 'button' : undefined\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"disabled || undefined\"\n :disabled=\"disabled\"\n @click=\"handleClick\"\n >\n <slot :disabled>\n {{ currentMonth }}\n </slot>\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport interface CalendarYearHeadingProps extends PrimitiveProps {}\n\nexport interface CalendarNextSlot {\n default?: (props: {\n /** Current disable state */\n disabled: boolean;\n }) => any;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nconst props = withDefaults(defineProps<CalendarYearHeadingProps>(), {\n as: \"button\",\n});\n// defineSlots<CalendarNextSlot>();\n\nconst disabled = computed(() => {\n // TODO\n\n // rootContext.disabled.value ||\n // rootContext.isNextButtonDisabled(props.nextPage),\n return false;\n});\n\nconst rootContext = injectCalendarRootContext();\nconst currentYear = computed(() => rootContext.currentYear?.value);\nconst attrs = useAttrs();\nconst ariaLabel = computed(\n () =>\n currentYear.value +\n \" - \" +\n (attrs[\"aria-label\"] || \"Open month selection overlay\"),\n); \n\nfunction handleClick() {\n rootContext.monthYearOverlayState.value = \"year\";\n}\n</script>\n\n<template>\n <Primitive\n :as=\"props.as\"\n :as-child=\"props.asChild\"\n :aria-label=\"ariaLabel\"\n :type=\"as === 'button' ? 'button' : undefined\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"disabled || undefined\"\n :disabled=\"disabled\"\n @click=\"handleClick\"\n >\n <slot :disabled>\n {{ currentYear }}\n </slot>\n </Primitive>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Primitive, type PrimitiveProps } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";import DismissableLayer from \"../DismissableLayer/DismissableLayer.vue\";\n\nexport interface CalendarMonthYearOverlayProps extends PrimitiveProps {\n type: \"month\" | \"year\";\n}\n\nconst props = defineProps<CalendarMonthYearOverlayProps>();\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst rootContext = injectCalendarRootContext();\n\nconst months = computed(() => rootContext.months.value);\nconst years = computed(() => rootContext.years.value);\n\nconst isOpen = computed(() => rootContext.monthYearOverlayState.value === props.type);\n\nfunction onEscapeKeyDown() {\n rootContext.monthYearOverlayState.value = false;\n}\n\n</script>\n\n<template>\n <DismissableLayer as-child @escape-key-down=\"onEscapeKeyDown\">\n <Primitive\n v-if=\"isOpen\"\n v-bind=\"{ ...props, ...$attrs }\"\n :style=\"{\n position: 'absolute',\n height: '100%',\n width: '100%',\n top: '0',\n left: '0',\n zIndex: '1000',\n }\"\n role=\"dialog\"\n tabindex=\"0\"\n >\n <slot :months=\"months\" :years=\"years\" :state=\"rootContext.monthYearOverlayState\" />\n </Primitive>\n </DismissableLayer>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\n\nimport type { Ref } from \"vue\";\nimport type { CalendarRootProps } from \"../Calendar\";\nimport type { DateFieldRootProps } from \"../DateField\";\nimport type { PopoverRootEmits, PopoverRootProps } from \"../Popover\";\nimport type { DateFieldRoot } from \"../DateField\";\nimport type { Matcher, WeekDayFormat } from \"../../date\";\nimport type { DateStep, Granularity, HourCycle } from \"../../shared/date\";\nimport type { Direction } from \"../../shared/types\";\nimport { computed, ref, toRefs, watch } from \"vue\";\nimport { createContext, useDirection } from \"../../shared\";\nimport { getDefaultDate } from \"../../shared/date\";\nimport { PopoverRoot } from \"../Popover\";\n\ntype DatePickerRootContext = {\n id: Ref<string | undefined>;\n name: Ref<string | undefined>;\n minValue: Ref<DateValue | undefined>;\n maxValue: Ref<DateValue | undefined>;\n hourCycle: Ref<HourCycle | undefined>;\n granularity: Ref<Granularity | undefined>;\n hideTimeZone: Ref<boolean>;\n required: Ref<boolean>;\n locale: Ref<string>;\n dateFieldRef: Ref<InstanceType<typeof DateFieldRoot> | undefined>;\n modelValue: Ref<DateValue | undefined>;\n placeholder: Ref<DateValue>;\n pagedNavigation: Ref<boolean>;\n preventDeselect: Ref<boolean>;\n weekStartsOn: Ref<0 | 1 | 2 | 3 | 4 | 5 | 6>;\n weekdayFormat: Ref<WeekDayFormat>;\n fixedWeeks: Ref<boolean>;\n numberOfMonths: Ref<number>;\n disabled: Ref<boolean>;\n readonly: Ref<boolean>;\n isDateDisabled?: Matcher;\n isDateUnavailable?: Matcher;\n defaultOpen: Ref<boolean>;\n open: Ref<boolean>;\n onDateChange: (date: DateValue | undefined) => void;\n onPlaceholderChange: (date: DateValue) => void;\n dir: Ref<Direction>;\n step: Ref<DateStep | undefined>;\n closeOnSelect: Ref<boolean>;\n};\n\nexport type DatePickerRootProps = DateFieldRootProps &\n PopoverRootProps &\n Pick<\n CalendarRootProps,\n | \"isDateDisabled\"\n | \"pagedNavigation\"\n | \"weekStartsOn\"\n | \"weekdayFormat\"\n | \"fixedWeeks\"\n | \"numberOfMonths\"\n | \"preventDeselect\"\n > & {\n /** Whether or not to close the popover on date select */\n closeOnSelect?: boolean;\n };\n\nexport type DatePickerRootEmits = {\n /** Event handler called whenever the model value changes */\n \"update:modelValue\": [date: DateValue | undefined];\n /** Event handler called whenever the placeholder value changes */\n \"update:placeholder\": [date: DateValue];\n};\n\nexport const [injectDatePickerRootContext, provideDatePickerRootContext] =\n createContext<DatePickerRootContext>(\"DatePickerRoot\");\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from \"@vueuse/core\";\n\ndefineOptions({\n inheritAttrs: false,\n});\nconst props = withDefaults(defineProps<DatePickerRootProps>(), {\n defaultValue: undefined,\n defaultOpen: false,\n open: undefined,\n pagedNavigation: false,\n preventDeselect: false,\n weekStartsOn: 0,\n weekdayFormat: \"narrow\",\n fixedWeeks: false,\n numberOfMonths: 1,\n disabled: false,\n readonly: false,\n placeholder: undefined,\n locale: \"en\",\n isDateDisabled: undefined,\n isDateUnavailable: undefined,\n closeOnSelect: false,\n});\nconst emits = defineEmits<DatePickerRootEmits & PopoverRootEmits>();\nconst {\n locale,\n disabled,\n readonly,\n pagedNavigation,\n weekStartsOn,\n weekdayFormat,\n fixedWeeks,\n numberOfMonths,\n preventDeselect,\n isDateDisabled: propsIsDateDisabled,\n isDateUnavailable: propsIsDateUnavailable,\n defaultOpen,\n id,\n name,\n required,\n minValue,\n maxValue,\n granularity,\n hideTimeZone,\n hourCycle,\n defaultValue,\n dir: propDir,\n step,\n closeOnSelect,\n} = toRefs(props);\n\nconst dir = useDirection(propDir);\n\nconst modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: defaultValue.value,\n passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | undefined>;\n\nconst defaultDate = computed(() =>\n getDefaultDate({\n defaultPlaceholder: props.placeholder,\n granularity: props.granularity,\n defaultValue: modelValue.value,\n locale: props.locale,\n }),\n);\n\nconst placeholder = useVModel(props, \"placeholder\", emits, {\n defaultValue: props.defaultPlaceholder ?? defaultDate.value.copy(),\n passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>;\n\nconst open = useVModel(props, \"open\", emits, {\n defaultValue: defaultOpen.value,\n passive: (props.open === undefined) as false,\n}) as Ref<boolean>;\n\nconst dateFieldRef = ref<InstanceType<typeof DateFieldRoot> | undefined>();\n\nwatch(modelValue, (value) => {\n if (value && value.compare(placeholder.value) !== 0) {\n placeholder.value = value.copy();\n }\n if (closeOnSelect.value) {\n open.value = false;\n }\n});\n\nprovideDatePickerRootContext({\n isDateUnavailable: propsIsDateUnavailable.value,\n isDateDisabled: propsIsDateDisabled.value,\n locale,\n disabled,\n pagedNavigation,\n weekStartsOn,\n weekdayFormat,\n fixedWeeks,\n numberOfMonths,\n readonly,\n preventDeselect,\n modelValue,\n placeholder,\n defaultOpen,\n open,\n id,\n name,\n required,\n minValue,\n maxValue,\n granularity,\n hideTimeZone,\n hourCycle,\n dateFieldRef,\n dir,\n step,\n onDateChange(date: DateValue | undefined) {\n if (!date || !modelValue.value) {\n modelValue.value = date?.copy() ?? undefined;\n } else if (\n !preventDeselect.value &&\n date &&\n modelValue.value.compare(date) === 0\n ) {\n modelValue.value = undefined;\n } else {\n modelValue.value = date.copy();\n }\n },\n onPlaceholderChange(date: DateValue) {\n placeholder.value = date.copy();\n },\n closeOnSelect,\n});\n</script>\n\n<template>\n <PopoverRoot v-model:open=\"open\" :default-open=\"defaultOpen\">\n <slot />\n </PopoverRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport { isEqualDay } from \"@internationalized/date\";\nimport { CalendarRoot } from \"../Calendar\";\nimport { injectDatePickerRootContext } from \"./DatePickerRoot.vue\";\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext();\n</script>\n\n<template>\n <CalendarRoot\n v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n v-bind=\"{\n isDateDisabled: rootContext.isDateDisabled,\n isDateUnavailable: rootContext.isDateUnavailable,\n minValue: rootContext.minValue.value,\n maxValue: rootContext.maxValue.value,\n locale: rootContext.locale.value,\n disabled: rootContext.disabled.value,\n pagedNavigation: rootContext.pagedNavigation.value,\n weekStartsOn: rootContext.weekStartsOn.value,\n weekdayFormat: rootContext.weekdayFormat.value,\n fixedWeeks: rootContext.fixedWeeks.value,\n numberOfMonths: rootContext.numberOfMonths.value,\n readonly: rootContext.readonly.value,\n preventDeselect: rootContext.preventDeselect.value,\n dir: rootContext.dir.value,\n }\"\n :model-value=\"rootContext.modelValue.value\"\n :placeholder=\"rootContext.placeholder.value\"\n :multiple=\"false\"\n @update:model-value=\"\n (date: DateValue | undefined) => {\n if (\n date &&\n rootContext.modelValue.value &&\n isEqualDay(date, rootContext.modelValue.value)\n )\n return;\n\n rootContext.onDateChange(date);\n }\n \"\n @update:placeholder=\"\n (date: DateValue) => {\n if (isEqualDay(date, rootContext.placeholder.value)) return;\n rootContext.onPlaceholderChange(date);\n }\n \"\n >\n <slot\n :date=\"date\"\n :grid=\"grid\"\n :week-days=\"weekDays\"\n :week-starts-on=\"weekStartsOn\"\n :locale=\"locale\"\n :fixed-weeks=\"fixedWeeks\"\n />\n </CalendarRoot>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarCellProps } from \"../Calendar\";\nimport { CalendarCell } from \"../Calendar\";\n\nexport type DatePickerCellProps = CalendarCellProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCellProps>();\n</script>\n\n<template>\n <CalendarCell v-bind=\"props\">\n <slot />\n </CalendarCell>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarCellTriggerProps } from \"../Calendar\";\nimport type { CalendarCellTriggerSlot } from \"../Calendar/CalendarCellTrigger.vue\";\nimport { CalendarCellTrigger } from \"../Calendar\";\n\nexport type DatePickerCellTriggerProps = CalendarCellTriggerProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCellTriggerProps>();\ndefineSlots<CalendarCellTriggerSlot>();\n</script>\n\n<template>\n <CalendarCellTrigger v-slot=\"slotProps\" v-bind=\"props\">\n <slot v-bind=\"slotProps\" />\n </CalendarCellTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverCloseProps } from \"../Popover\";\nimport { PopoverClose } from \"../Popover\";\n\nexport type DatePickerCloseProps = PopoverCloseProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCloseProps>();\n</script>\n\n<template>\n <PopoverClose v-bind=\"props\">\n <slot />\n </PopoverClose>\n</template>\n","<script lang=\"ts\">\nimport type {\n PopoverContentEmits,\n PopoverContentProps,\n PopoverPortalProps,\n} from \"../Popover\";\nimport { computed } from \"vue\";\nimport { handleCalendarInitialFocus } from \"../../shared/date\";\nimport { PopoverContent, PopoverPortal } from \"../Popover\";\nimport { useForwardPropsEmits } from \"../../shared\";\n\nexport interface DatePickerContentProps extends PopoverContentProps {\n /**\n * Props to control the portal wrapped around the content.\n */\n portal?: PopoverPortalProps;\n}\nexport type DatePickerContentEmits = PopoverContentEmits;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerContentProps>();\nconst emits = defineEmits<DatePickerContentEmits>();\n\nconst propsToForward = computed(() => ({\n ...props,\n portal: undefined,\n}));\nconst forwarded = useForwardPropsEmits(propsToForward, emits);\n</script>\n\n<template>\n <PopoverPortal v-bind=\"portal\">\n <PopoverContent\n v-bind=\"{ ...forwarded, ...$attrs }\"\n @open-auto-focus=\"\n (event) => {\n emits('openAutoFocus', event);\n\n if (!event.defaultPrevented && event.target) {\n handleCalendarInitialFocus(event.target as HTMLElement);\n event.preventDefault();\n }\n }\n \"\n >\n <slot />\n </PopoverContent>\n </PopoverPortal>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\n\nexport interface VisuallyHiddenProps extends PrimitiveProps {\n feature?: \"focusable\" | \"fully-hidden\";\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from \"../Primitive\";\n\nwithDefaults(defineProps<VisuallyHiddenProps>(), {\n as: \"span\",\n feature: \"focusable\",\n});\n</script>\n\n<template>\n <Primitive\n :as=\"as\"\n :as-child=\"asChild\"\n :aria-hidden=\"feature === 'focusable' ? 'true' : undefined\"\n :data-hidden=\"feature === 'fully-hidden' ? '' : undefined\"\n :tabindex=\"feature === 'fully-hidden' ? '-1' : undefined\"\n :style=\"{\n // See: https://github.com/twbs/bootstrap/blob/a360960b8dfdb4bf48f87539c2243458fa0366f7/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n clipPath: 'inset(50%)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n\n // Prevent causing unnecessary container scroll\n // @see https://github.com/unovue/reka-ui/issues/2127\n top: '-1px',\n left: '-1px',\n }\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport type { Ref } from \"vue\";\nimport type { Matcher } from \"../../date\";\nimport type { PrimitiveProps } from \"../Primitive\";\nimport type { DateStep, Formatter } from \"../../shared\";\nimport type {\n Granularity,\n HourCycle,\n SegmentPart,\n SegmentValueObj,\n} from \"../../shared/date\";\nimport type { Direction, FormFieldProps } from \"../../shared/types\";\nimport { hasTime, isBefore } from \"../../date\";\nimport {\n createContext,\n isNullish,\n useDateFormatter,\n useDirection,\n useKbd,\n useLocale,\n} from \"../../shared\";\nimport {\n createContent,\n getDefaultDate,\n getSegmentElements,\n initializeSegmentValues,\n isSegmentNavigationKey,\n normalizeDateStep,\n normalizeHourCycle,\n syncSegmentValues,\n} from \"../../shared/date\";\n\ntype DateFieldRootContext = {\n locale: Ref<string>;\n modelValue: Ref<DateValue | undefined>;\n placeholder: Ref<DateValue>;\n isDateUnavailable?: Matcher;\n isInvalid: Ref<boolean>;\n disabled: Ref<boolean>;\n readonly: Ref<boolean>;\n formatter: Formatter;\n hourCycle: HourCycle;\n step: Ref<DateStep>;\n segmentValues: Ref<SegmentValueObj>;\n segmentContents: Ref<{ part: SegmentPart; value: string }[]>;\n elements: Ref<Set<HTMLElement>>;\n focusNext: () => void;\n setFocusedElement: (el: HTMLElement) => void;\n};\n\nexport interface DateFieldRootProps extends PrimitiveProps, FormFieldProps {\n /** The default value for the calendar */\n defaultValue?: DateValue;\n /** The default placeholder date */\n defaultPlaceholder?: DateValue;\n /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n placeholder?: DateValue;\n /** The controlled checked state of the calendar. Can be bound as `v-model`. */\n modelValue?: DateValue | null;\n /** The hour cycle used for formatting times. Defaults to the local preference */\n hourCycle?: HourCycle;\n /** The stepping interval for the time fields. Defaults to `1`. */\n step?: DateStep;\n /** The granularity to use for formatting times. Defaults to day if a CalendarDate is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n granularity?: Granularity;\n /** Whether or not to hide the time zone segment of the field */\n hideTimeZone?: boolean;\n /** The maximum date that can be selected */\n maxValue?: DateValue;\n /** The minimum date that can be selected */\n minValue?: DateValue;\n /** The locale to use for formatting dates */\n locale?: string;\n /** Whether or not the date field is disabled */\n disabled?: boolean;\n /** Whether or not the date field is readonly */\n readonly?: boolean;\n /** A function that returns whether or not a date is unavailable */\n isDateUnavailable?: Matcher;\n /** Id of the element */\n id?: string;\n /** The reading direction of the date field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n dir?: Direction;\n}\n\nexport type DateFieldRootEmits = {\n /** Event handler called whenever the model value changes */\n \"update:modelValue\": [date: DateValue | undefined];\n /** Event handler called whenever the placeholder value changes */\n \"update:placeholder\": [date: DateValue];\n};\n\nexport const [injectDateFieldRootContext, provideDateFieldRootContext] =\n createContext<DateFieldRootContext>(\"DateFieldRoot\");\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from \"@vueuse/core\";\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from \"vue\";\nimport { Primitive, usePrimitiveElement } from \"../Primitive\";\nimport { VisuallyHidden } from \"../VisuallyHidden\";\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst props = withDefaults(defineProps<DateFieldRootProps>(), {\n defaultValue: undefined,\n disabled: false,\n readonly: false,\n placeholder: undefined,\n isDateUnavailable: undefined,\n});\nconst emits = defineEmits<DateFieldRootEmits>();\ndefineSlots<{\n default?: (props: {\n /** The current date of the field */\n modelValue: DateValue | undefined;\n /** The date field segment contents */\n segments: { part: SegmentPart; value: string }[];\n /** Value if the input is invalid */\n isInvalid: boolean;\n }) => any;\n}>();\n\nconst {\n disabled,\n readonly,\n isDateUnavailable: propsIsDateUnavailable,\n granularity,\n defaultValue,\n dir: propDir,\n locale: propLocale,\n} = toRefs(props);\nconst locale = useLocale(propLocale);\nconst dir = useDirection(propDir);\n\nconst formatter = useDateFormatter(locale.value, {\n hourCycle: normalizeHourCycle(props.hourCycle),\n});\nconst { primitiveElement, currentElement: parentElement } =\n usePrimitiveElement();\nconst segmentElements = ref<Set<HTMLElement>>(new Set());\n\nonMounted(() => {\n getSegmentElements(parentElement.value).forEach((item) =>\n segmentElements.value.add(item as HTMLElement),\n );\n});\n\nconst modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: defaultValue.value,\n passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue>;\n\nconst defaultDate = getDefaultDate({\n defaultPlaceholder: props.placeholder,\n granularity: granularity.value,\n defaultValue: modelValue.value,\n locale: props.locale,\n});\n\nconst placeholder = useVModel(props, \"placeholder\", emits, {\n defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>;\n\nconst step = computed(() => normalizeDateStep(props));\n\nconst inferredGranularity = computed(() => {\n if (props.granularity)\n return !hasTime(placeholder.value) ? \"day\" : props.granularity;\n\n return hasTime(placeholder.value) ? \"minute\" : \"day\";\n});\n\nconst isInvalid = computed(() => {\n if (!modelValue.value) return false;\n\n if (propsIsDateUnavailable.value?.(modelValue.value)) return true;\n\n if (props.minValue && isBefore(modelValue.value, props.minValue)) return true;\n\n if (props.maxValue && isBefore(props.maxValue, modelValue.value)) return true;\n\n return false;\n});\n\nconst initialSegments = initializeSegmentValues(inferredGranularity.value);\n\nconst segmentValues = ref<SegmentValueObj>(\n modelValue.value\n ? { ...syncSegmentValues({ value: modelValue.value, formatter }) }\n : { ...initialSegments },\n);\n\nconst allSegmentContent = computed(() =>\n createContent({\n granularity: inferredGranularity.value,\n dateRef: placeholder.value,\n formatter,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n segmentValues: segmentValues.value,\n locale,\n }),\n);\n\nconst segmentContents = computed(() => allSegmentContent.value.arr);\n\nconst editableSegmentContents = computed(() =>\n segmentContents.value.filter(({ part }) => part !== \"literal\"),\n);\n\nwatch(locale, (value) => {\n if (formatter.getLocale() !== value) {\n formatter.setLocale(value);\n // Locale changed, so we need to clear the segment elements and re-get them (different order)\n // Get the focusable elements again on the next tick\n nextTick(() => {\n segmentElements.value.clear();\n getSegmentElements(parentElement.value).forEach((item) =>\n segmentElements.value.add(item as HTMLElement),\n );\n });\n }\n});\n\nwatch(modelValue, (_modelValue) => {\n if (!isNullish(_modelValue) && placeholder.value.compare(_modelValue) !== 0) {\n placeholder.value = _modelValue.copy();\n }\n});\n\nwatch([modelValue, locale], ([_modelValue]) => {\n if (!isNullish(_modelValue)) {\n segmentValues.value = {\n ...syncSegmentValues({ value: _modelValue, formatter }),\n };\n }\n // If segment has null value, means that user modified it, thus do not reset the segmentValues\n else if (\n Object.values(segmentValues.value).every((value) => value !== null) &&\n isNullish(_modelValue)\n ) {\n segmentValues.value = { ...initialSegments };\n }\n});\n\nconst currentFocusedElement = ref<HTMLElement | null>(null);\n\nconst currentSegmentIndex = computed(() =>\n Array.from(segmentElements.value).findIndex(\n (el) =>\n el.getAttribute(\"data-reka-date-field-segment\") ===\n currentFocusedElement.value?.getAttribute(\"data-reka-date-field-segment\"),\n ),\n);\n\nconst nextFocusableSegment = computed(() => {\n const sign = dir.value === \"rtl\" ? -1 : 1;\n const nextCondition =\n sign < 0\n ? currentSegmentIndex.value < 0\n : currentSegmentIndex.value > segmentElements.value.size - 1;\n if (nextCondition) return null;\n const segmentToFocus = Array.from(segmentElements.value)[\n currentSegmentIndex.value + sign\n ];\n return segmentToFocus;\n});\n\nconst prevFocusableSegment = computed(() => {\n const sign = dir.value === \"rtl\" ? -1 : 1;\n const prevCondition =\n sign > 0\n ? currentSegmentIndex.value < 0\n : currentSegmentIndex.value > segmentElements.value.size - 1;\n if (prevCondition) return null;\n\n const segmentToFocus = Array.from(segmentElements.value)[\n currentSegmentIndex.value - sign\n ];\n return segmentToFocus;\n});\n\nconst kbd = useKbd();\n\nfunction handleKeydown(e: KeyboardEvent) {\n if (!isSegmentNavigationKey(e.key)) return;\n if (e.key === kbd.ARROW_LEFT) prevFocusableSegment.value?.focus();\n if (e.key === kbd.ARROW_RIGHT) nextFocusableSegment.value?.focus();\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n currentFocusedElement.value = el;\n}\n\nprovideDateFieldRootContext({\n isDateUnavailable: propsIsDateUnavailable.value,\n locale,\n modelValue,\n placeholder,\n disabled,\n formatter,\n hourCycle: props.hourCycle,\n step,\n readonly,\n segmentValues,\n isInvalid,\n segmentContents: editableSegmentContents,\n elements: segmentElements,\n setFocusedElement,\n focusNext() {\n nextFocusableSegment.value?.focus();\n },\n});\n\ndefineExpose({\n /** Helper to set the focused element inside the DateField */\n setFocusedElement,\n});\n</script>\n\n<template>\n <Primitive\n v-bind=\"$attrs\"\n ref=\"primitiveElement\"\n role=\"group\"\n :aria-disabled=\"disabled ? true : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :dir=\"dir\"\n @keydown.left.right=\"handleKeydown\"\n >\n <slot\n :model-value=\"modelValue\"\n :segments=\"segmentContents\"\n :is-invalid=\"isInvalid\"\n />\n\n <VisuallyHidden\n :id=\"id\"\n as=\"input\"\n type=\"date\"\n feature=\"focusable\"\n tabindex=\"-1\"\n :value=\"modelValue ? modelValue.toString() : ''\"\n :name=\"name\"\n :disabled=\"disabled\"\n :required=\"required\"\n :max=\"maxValue\"\n :min=\"minValue\"\n @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from \"../Primitive\";\nimport type { SegmentPart } from \"../../shared/date\";\nimport { computed, ref } from \"vue\";\nimport { Primitive } from \"../Primitive\";\nimport { useDateField } from \"../../shared/date/useDateField\";\nimport { injectDateFieldRootContext } from \"./DateFieldRoot.vue\";\n\nexport interface DateFieldInputProps extends PrimitiveProps {\n /** The part of the date to render */\n part: SegmentPart;\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateFieldInputProps>();\n\nconst rootContext = injectDateFieldRootContext();\n\nconst hasLeftFocus = ref(true);\nconst lastKeyZero = ref(false);\n\nconst { handleSegmentClick, handleSegmentKeydown, attributes } = useDateField({\n hasLeftFocus,\n lastKeyZero,\n placeholder: rootContext.placeholder,\n hourCycle: rootContext.hourCycle,\n step: rootContext.step,\n segmentValues: rootContext.segmentValues,\n formatter: rootContext.formatter,\n part: props.part,\n disabled: rootContext.disabled,\n readonly: rootContext.readonly,\n focusNext: rootContext.focusNext,\n modelValue: rootContext.modelValue,\n});\n\nconst disabled = computed(() => rootContext.disabled.value);\nconst readonly = computed(() => rootContext.readonly.value);\nconst isInvalid = computed(() => rootContext.isInvalid.value);\n</script>\n\n<template>\n <Primitive\n :as=\"as\"\n :as-child=\"asChild\"\n v-bind=\"attributes\"\n :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n :data-reka-date-field-segment=\"part\"\n :aria-disabled=\"disabled ? true : undefined\"\n :aria-readonly=\"readonly ? true : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :aria-invalid=\"isInvalid ? true : undefined\"\n v-on=\"\n part !== 'literal'\n ? {\n mousedown: handleSegmentClick,\n keydown: handleSegmentKeydown,\n focusout: () => {\n hasLeftFocus = true;\n },\n focusin: (e: FocusEvent) => {\n rootContext.setFocusedElement(e.target as HTMLElement);\n },\n }\n : {}\n \"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport { DateFieldRoot } from \"../DateField\";\nimport { injectDatePickerRootContext } from \"./DatePickerRoot.vue\";\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext();\n</script>\n\n<template>\n <DateFieldRoot\n v-slot=\"{ segments, modelValue }\"\n :ref=\"rootContext.dateFieldRef\"\n :model-value=\"rootContext.modelValue.value\"\n :placeholder=\"rootContext.placeholder.value\"\n v-bind=\"{\n id: rootContext.id.value,\n name: rootContext.name.value,\n disabled: rootContext.disabled.value,\n minValue: rootContext.minValue.value,\n maxValue: rootContext.maxValue.value,\n readonly: rootContext.readonly.value,\n hourCycle: rootContext.hourCycle.value,\n granularity: rootContext.granularity.value,\n hideTimeZone: rootContext.hideTimeZone.value,\n locale: rootContext.locale.value,\n isDateUnavailable: rootContext.isDateUnavailable,\n required: rootContext.required.value,\n dir: rootContext.dir.value,\n step: rootContext.step.value,\n }\"\n @update:model-value=\"\n (date: DateValue | undefined) => {\n if (\n date &&\n rootContext.modelValue.value &&\n date.compare(rootContext.modelValue.value) === 0\n )\n return;\n rootContext.onDateChange(date);\n }\n \"\n @update:placeholder=\"\n (date: DateValue) => {\n if (date.compare(rootContext.placeholder.value) === 0) return;\n rootContext.onPlaceholderChange(date);\n }\n \"\n >\n <slot :segments=\"segments\" :model-value=\"modelValue\" />\n </DateFieldRoot>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridProps } from \"../Calendar\";\nimport { CalendarGrid } from \"../Calendar\";\n\nexport type DatePickerGridProps = CalendarGridProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridProps>();\n</script>\n\n<template>\n <CalendarGrid v-bind=\"props\">\n <slot />\n </CalendarGrid>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridBodyProps } from \"../Calendar\";\nimport { CalendarGridBody } from \"../Calendar\";\n\nexport type DatePickerGridBodyProps = CalendarGridBodyProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridBodyProps>();\n</script>\n\n<template>\n <CalendarGridBody v-bind=\"props\">\n <slot />\n </CalendarGridBody>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridHeadProps } from \"../Calendar\";\nimport { CalendarGridHead } from \"../Calendar\";\n\nexport type DatePickerGridHeadProps = CalendarGridHeadProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridHeadProps>();\n</script>\n\n<template>\n <CalendarGridHead v-bind=\"props\">\n <slot />\n </CalendarGridHead>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridRowProps } from \"../Calendar\";\nimport { CalendarGridRow } from \"../Calendar\";\n\nexport type DatePickerGridRowProps = CalendarGridRowProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridRowProps>();\n</script>\n\n<template>\n <CalendarGridRow v-bind=\"props\">\n <slot />\n </CalendarGridRow>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeadCellProps } from \"../Calendar\";\nimport { CalendarHeadCell } from \"../Calendar\";\n\nexport type DatePickerHeadCellProps = CalendarHeadCellProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeadCellProps>();\n</script>\n\n<template>\n <CalendarHeadCell v-bind=\"props\">\n <slot />\n </CalendarHeadCell>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeaderProps } from \"../Calendar\";\nimport { CalendarHeader } from \"../Calendar\";\n\nexport type DatePickerHeaderProps = CalendarHeaderProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeaderProps>();\n</script>\n\n<template>\n <CalendarHeader v-bind=\"props\">\n <slot />\n </CalendarHeader>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeadingProps } from \"../Calendar\";\nimport { CalendarHeading } from \"../Calendar\";\n\nexport type DatePickerHeadingProps = CalendarHeadingProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeadingProps>();\ndefineSlots<{\n default?: (props: {\n /** Current month and year */\n headingValue: string;\n }) => any;\n}>();\n</script>\n\n<template>\n <CalendarHeading v-slot=\"{ headingValue }\" v-bind=\"props\">\n <slot :heading-value=\"headingValue\">\n {{ headingValue }}\n </slot>\n </CalendarHeading>\n</template>\n","<script lang=\"ts\">\nimport type { DateFieldInputProps } from \"../DateField\";\nimport { DateFieldInput } from \"../DateField\";\n\nexport type DatePickerInputProps = DateFieldInputProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerInputProps>();\n</script>\n\n<template>\n <DateFieldInput v-bind=\"props\">\n <slot />\n </DateFieldInput>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarNextProps } from \"../Calendar\";\nimport type { CalendarNextSlot } from \"../Calendar/CalendarNext.vue\";\nimport { CalendarNext } from \"../Calendar\";\n\nexport type DatePickerNextProps = CalendarNextProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerNextProps>();\n\ndefineSlots<CalendarNextSlot>();\n</script>\n\n<template>\n <CalendarNext v-slot=\"slotProps\" v-bind=\"props\">\n <slot v-bind=\"slotProps\" />\n </CalendarNext>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarPrevProps } from \"../Calendar\";\nimport type { CalendarPrevSlot } from \"../Calendar/CalendarPrev.vue\";\nimport { CalendarPrev } from \"../Calendar\";\n\nexport type DatePickerPrevProps = CalendarPrevProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerPrevProps>();\ndefineSlots<CalendarPrevSlot>();\n</script>\n\n<template>\n <CalendarPrev v-slot=\"slotProps\" v-bind=\"props\">\n <slot v-bind=\"slotProps\" />\n </CalendarPrev>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverTriggerProps } from \"../Popover\";\nimport { PopoverTrigger } from \"../Popover\";\nimport { injectDatePickerRootContext } from \"./DatePickerRoot.vue\";\n\nexport type DatePickerTriggerProps = PopoverTriggerProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerTriggerProps>();\nconst rootContext = injectDatePickerRootContext();\n</script>\n\n<template>\n <PopoverTrigger\n data-reka-date-field-segment=\"trigger\"\n v-bind=\"props\"\n :disabled=\"rootContext.disabled.value\"\n @focusin=\"\n (e: FocusEvent) => {\n rootContext.dateFieldRef.value?.setFocusedElement(\n e.target as HTMLElement,\n );\n }\n \"\n >\n <slot />\n </PopoverTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarMonthHeadingProps } from \"../Calendar\";\nimport { CalendarMonthHeading } from \"../Calendar\";\n\nexport type DatePickerMonthHeadingProps = CalendarMonthHeadingProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<CalendarMonthHeadingProps>();\n\n// TODO\n// defineSlots<CalendarNextSlot>();\n</script>\n\n<template>\n <CalendarMonthHeading v-slot=\"slotProps\" v-bind=\"props\">\n <slot v-bind=\"slotProps\" />\n </CalendarMonthHeading>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarYearHeadingProps } from \"../Calendar\";\nimport { CalendarYearHeading } from \"../Calendar\";\n\nexport type DatePickerYearHeadingProps = CalendarYearHeadingProps;\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<CalendarYearHeadingProps>();\n\n// TODO\n// defineSlots<CalendarNextSlot>();\n</script>\n\n<template>\n <CalendarYearHeading v-slot=\"slotProps\" v-bind=\"props\">\n <slot v-bind=\"slotProps\" />\n </CalendarYearHeading>\n</template>\n","<script setup lang=\"ts\">\nimport { CalendarMonthYearOverlay, type CalendarMonthYearOverlayProps } from \"../Calendar\";\n\nexport type DatePickerMonthYearOverlayProps = CalendarMonthYearOverlayProps \n\nconst props = defineProps<DatePickerMonthYearOverlayProps>();\n</script> \n\n<template>\n <CalendarMonthYearOverlay v-bind=\"props\" v-slot=\"{ months, years }\">\n <slot :months=\"months\" :years=\"years\" />\n </CalendarMonthYearOverlay>\n</template>\n","<script setup lang=\"ts\">\nimport type { DateValue } from \"@internationalized/date\";\nimport { Primitive } from \"../Primitive\";\nimport type { PrimitiveProps } from \"../Primitive\";\nimport { injectCalendarRootContext } from \"./CalendarRoot.vue\";\n\nexport interface CalendarOverlayItemProps extends PrimitiveProps {\n date: DateValue;\n}\n\nconst props = withDefaults(defineProps<CalendarOverlayItemProps>(), {\n as: \"button\",\n});\n\nconst rootContext = injectCalendarRootContext();\n\nfunction handleClick() {\n if (rootContext.isDateDisabled(props.date) || rootContext.isDateUnavailable?.(props.date))\n return;\n\n rootContext.onDateChange(props.date);\n rootContext.monthYearOverlayState.value = false;\n}\n</script>\n\n<template>\n <Primitive v-bind=\"props\" @click=\"handleClick\">\n <slot />\n </Primitive>\n</template>\n","<script setup lang=\"ts\">\n import { useAttrs } from 'vue';\nimport CalendarOverlayItem, {\n type CalendarOverlayItemProps,\n} from \"../Calendar/CalendarOverlayItem.vue\";\n\nexport type DatePickerOverlayItemProps = CalendarOverlayItemProps\n\nconst props = defineProps<DatePickerOverlayItemProps>();\n</script>\n\n<template>\n <CalendarOverlayItem v-bind=\"props\">\n <slot />\n </CalendarOverlayItem>\n</template>\n","import {\n DatePickerRoot,\n DatePickerHeader,\n DatePickerHeading,\n DatePickerGrid,\n DatePickerCell,\n DatePickerHeadCell,\n DatePickerNext,\n DatePickerPrev,\n DatePickerGridHead,\n DatePickerGridBody,\n DatePickerGridRow,\n DatePickerCellTrigger,\n DatePickerInput,\n DatePickerCalendar,\n DatePickerField,\n DatePickerAnchor,\n DatePickerArrow,\n DatePickerClose,\n DatePickerTrigger,\n DatePickerContent,\n DatePickerMonthHeading,\n DatePickerYearHeading,\n DatePickerMonthYearOverlay,\n DatePickerOverlayItem,\n} from \"./components/DatePicker/index\";\n\nexport const DatePicker = {\n Root: DatePickerRoot,\n Header: DatePickerHeader,\n Heading: DatePickerHeading,\n Grid: DatePickerGrid,\n Cell: DatePickerCell,\n HeadCell: DatePickerHeadCell,\n Next: DatePickerNext,\n Prev: DatePickerPrev,\n GridHead: DatePickerGridHead,\n GridBody: DatePickerGridBody,\n GridRow: DatePickerGridRow,\n CellTrigger: DatePickerCellTrigger,\n Input: DatePickerInput,\n Calendar: DatePickerCalendar,\n Field: DatePickerField,\n Anchor: DatePickerAnchor,\n Arrow: DatePickerArrow,\n Close: DatePickerClose,\n Trigger: DatePickerTrigger,\n Content: DatePickerContent,\n MonthHeading: DatePickerMonthHeading,\n YearHeading: DatePickerYearHeading,\n MonthYearOverlay: DatePickerMonthYearOverlay,\n OverlayItem: DatePickerOverlayItem,\n} as const;\n\nexport default DatePicker;\n"],"names":["context","calendarDateTimeGranularities","size","cycleArgs","today","opts","part","count","ref","width","height","_renderSlot","_createBlock","_unref","_mergeProps","_openBlock","_createElementBlock","_hoisted_1","_hoisted_2","arrow","floatingUIarrow","_normalizeStyle","_createVNode","$attrs","Arrow","PopperRoot","FocusScope","DismissableLayer","PopperContent","PopoverContentImpl","PopoverContentNonModal","_Teleport","_resolveDynamicComponent","PopperAnchor","firstPeriodOfNextPage","lastPeriodOfPrevPage","newDate","newGrid","_createElementVNode","_toDisplayString","PopoverRoot","_withCtx","PopoverContent","VisuallyHidden","_toHandlers","CalendarOverlayItem","DatePickerRoot","DatePickerHeader","DatePickerHeading","DatePickerGrid","DatePickerCell","DatePickerHeadCell","DatePickerNext","DatePickerPrev","DatePickerGridHead","DatePickerGridBody","DatePickerGridRow","DatePickerCellTrigger","DatePickerInput","DatePickerCalendar","DatePickerField","DatePickerAnchor","DatePickerArrow","DatePickerClose","DatePickerTrigger","DatePickerContent","DatePickerMonthHeading","DatePickerYearHeading","DatePickerMonthYearOverlay","DatePickerOverlayItem"],"mappings":";;;;;;;;AAUO,SAAS,cACd,uBACA,aACA;AACA,QAAM,oBACF,OAAO,0BAA0B,YAAY,CAAC,cAC5C,GAAG,qBAAqB,YACxB;AAEN,QAAM,eAAkD,OAAO,iBAAiB;AAQhF,QAAM,gBAAgB,CAGpB,aACwD;AACxD,UAAMA,WAAU,OAAO,cAAc,QAAQ;AAC7C,QAAIA;AACF,aAAOA;AAET,QAAIA,aAAY;AACd,aAAOA;A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