@plexui/vue 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/es/components/Badge/Badge.js +1 -1
  2. package/dist/es/components/Badge/Badge.js.map +1 -1
  3. package/dist/es/components/Button/Button.js +13 -5
  4. package/dist/es/components/Button/Button.js.map +1 -1
  5. package/dist/es/components/Button/ButtonLink.js +7 -1
  6. package/dist/es/components/Button/ButtonLink.js.map +1 -1
  7. package/dist/es/components/Button/NavigationButton.js +27 -0
  8. package/dist/es/components/Button/NavigationButton.js.map +1 -0
  9. package/dist/es/components/Button/NavigationGlyph.js +27 -0
  10. package/dist/es/components/Button/NavigationGlyph.js.map +1 -0
  11. package/dist/es/components/Button/index.js +1 -0
  12. package/dist/es/components/Button/index.js.map +1 -1
  13. package/dist/es/components/Checkbox/Checkbox.js +14 -4
  14. package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
  15. package/dist/es/components/DateInput/DateInput.js +7 -3
  16. package/dist/es/components/DateInput/DateInput.js.map +1 -1
  17. package/dist/es/components/DatePicker/Calendar.js +130 -86
  18. package/dist/es/components/DatePicker/Calendar.js.map +1 -1
  19. package/dist/es/components/DatePicker/CalendarNavigationIcon.js +31 -0
  20. package/dist/es/components/DatePicker/CalendarNavigationIcon.js.map +1 -0
  21. package/dist/es/components/DatePicker/DatePicker.js +16 -4
  22. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  23. package/dist/es/components/DatePicker/context.js.map +1 -1
  24. package/dist/es/components/DatePicker/useCalendarGutter.js +14 -0
  25. package/dist/es/components/DatePicker/useCalendarGutter.js.map +1 -0
  26. package/dist/es/components/DateRangePicker/Calendar.js +92 -71
  27. package/dist/es/components/DateRangePicker/Calendar.js.map +1 -1
  28. package/dist/es/components/DateRangePicker/DateRangePicker.js +13 -4
  29. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  30. package/dist/es/components/DateRangePicker/Trigger.js +1 -0
  31. package/dist/es/components/DateRangePicker/Trigger.js.map +1 -1
  32. package/dist/es/components/Dialog/Dialog.js +125 -52
  33. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  34. package/dist/es/components/Dialog/index.js.map +1 -1
  35. package/dist/es/components/Dialog/sheetDrag.js +77 -24
  36. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  37. package/dist/es/components/Field/Field.js +58 -5
  38. package/dist/es/components/Field/Field.js.map +1 -1
  39. package/dist/es/components/FieldGroup/FieldGroup.js +3 -1
  40. package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
  41. package/dist/es/components/FileUpload/FileUpload.js +50 -11
  42. package/dist/es/components/FileUpload/FileUpload.js.map +1 -1
  43. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +24 -13
  44. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
  45. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js +9 -3
  46. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js.map +1 -1
  47. package/dist/es/components/Icon/index.js +1 -0
  48. package/dist/es/components/Icon/index.js.map +1 -1
  49. package/dist/es/components/Icon/svg/Disclosure.js +10 -0
  50. package/dist/es/components/Icon/svg/Disclosure.js.map +1 -0
  51. package/dist/es/components/Indicator/LoadingIndicator.js +2 -2
  52. package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
  53. package/dist/es/components/Input/Input.js +15 -5
  54. package/dist/es/components/Input/Input.js.map +1 -1
  55. package/dist/es/components/InputGroup/InputGroup.js +3 -1
  56. package/dist/es/components/InputGroup/InputGroup.js.map +1 -1
  57. package/dist/es/components/MarkdownEditor/MarkdownEditor.js +126 -151
  58. package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
  59. package/dist/es/components/Menu/Menu.js +217 -35
  60. package/dist/es/components/Menu/Menu.js.map +1 -1
  61. package/dist/es/components/Menu/internal.js +2 -1
  62. package/dist/es/components/Menu/internal.js.map +1 -1
  63. package/dist/es/components/OTPInput/OTPInput.js +7 -4
  64. package/dist/es/components/OTPInput/OTPInput.js.map +1 -1
  65. package/dist/es/components/Page/Page.js +93 -14
  66. package/dist/es/components/Page/Page.js.map +1 -1
  67. package/dist/es/components/Page/index.js +1 -1
  68. package/dist/es/components/Page/index.js.map +1 -1
  69. package/dist/es/components/Popover/Popover.js +16 -6
  70. package/dist/es/components/Popover/Popover.js.map +1 -1
  71. package/dist/es/components/Popover/deferredPointerDownOutside.js +6 -0
  72. package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
  73. package/dist/es/components/RadioGroup/RadioGroup.js +31 -13
  74. package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
  75. package/dist/es/components/Select/Select.js +75 -25
  76. package/dist/es/components/Select/Select.js.map +1 -1
  77. package/dist/es/components/SelectControl/SelectControl.js +58 -25
  78. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  79. package/dist/es/components/SelectControl/index.js +1 -1
  80. package/dist/es/components/SelectControl/index.js.map +1 -1
  81. package/dist/es/components/ShimmerText/ShimmerText.js +16 -3
  82. package/dist/es/components/ShimmerText/ShimmerText.js.map +1 -1
  83. package/dist/es/components/Slider/Slider.js +56 -16
  84. package/dist/es/components/Slider/Slider.js.map +1 -1
  85. package/dist/es/components/Sortable/Sortable.js +20 -13
  86. package/dist/es/components/Sortable/Sortable.js.map +1 -1
  87. package/dist/es/components/Switch/Switch.js +6 -3
  88. package/dist/es/components/Switch/Switch.js.map +1 -1
  89. package/dist/es/components/Tabs/Tabs.js +12 -11
  90. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  91. package/dist/es/components/TagInput/TagInput.js +46 -6
  92. package/dist/es/components/TagInput/TagInput.js.map +1 -1
  93. package/dist/es/components/Textarea/Textarea.js +13 -2
  94. package/dist/es/components/Textarea/Textarea.js.map +1 -1
  95. package/dist/es/components/Toast/ToastRenderer.js +144 -0
  96. package/dist/es/components/Toast/ToastRenderer.js.map +1 -0
  97. package/dist/es/components/Toast/Toaster.js +23 -1
  98. package/dist/es/components/Toast/Toaster.js.map +1 -1
  99. package/dist/es/components/Toast/toastLifecycle.js +283 -0
  100. package/dist/es/components/Toast/toastLifecycle.js.map +1 -0
  101. package/dist/es/components/Toolbar/Toolbar.js +107 -0
  102. package/dist/es/components/Toolbar/Toolbar.js.map +1 -0
  103. package/dist/es/components/Toolbar/index.js +2 -0
  104. package/dist/es/components/Toolbar/index.js.map +1 -0
  105. package/dist/es/components/Tooltip/CopyTooltip.js +39 -13
  106. package/dist/es/components/Tooltip/CopyTooltip.js.map +1 -1
  107. package/dist/es/components/Tooltip/Tooltip.js +35 -14
  108. package/dist/es/components/Tooltip/Tooltip.js.map +1 -1
  109. package/dist/es/composables/useFloatingBoundary.js +48 -0
  110. package/dist/es/composables/useFloatingBoundary.js.map +1 -0
  111. package/dist/es/composables/usePhoneSubmenu.js +19 -0
  112. package/dist/es/composables/usePhoneSubmenu.js.map +1 -0
  113. package/dist/es/lib/copyToClipboard.js +16 -7
  114. package/dist/es/lib/copyToClipboard.js.map +1 -1
  115. package/dist/es/lib/floatingBoundary.js +90 -0
  116. package/dist/es/lib/floatingBoundary.js.map +1 -0
  117. package/dist/es/lib/focusRestore.js +56 -0
  118. package/dist/es/lib/focusRestore.js.map +1 -0
  119. package/dist/es/lib/helpers.js +0 -18
  120. package/dist/es/lib/helpers.js.map +1 -1
  121. package/dist/es/lib/inputMode.js +9 -0
  122. package/dist/es/lib/inputMode.js.map +1 -0
  123. package/dist/es/lib/menuInitialFocus.js +100 -0
  124. package/dist/es/lib/menuInitialFocus.js.map +1 -0
  125. package/dist/es/lib/menuSubmenuPlacement.js +219 -0
  126. package/dist/es/lib/menuSubmenuPlacement.js.map +1 -0
  127. package/dist/es/lib/observeTextareaWidth.js +49 -0
  128. package/dist/es/lib/observeTextareaWidth.js.map +1 -0
  129. package/dist/es/lib/selectPress.js +34 -0
  130. package/dist/es/lib/selectPress.js.map +1 -0
  131. package/dist/es/lib/sortable.js +74 -20
  132. package/dist/es/lib/sortable.js.map +1 -1
  133. package/dist/types/components/Button/Button.d.ts +6 -2
  134. package/dist/types/components/Button/ButtonLink.d.ts +6 -2
  135. package/dist/types/components/Button/NavigationButton.d.ts +27 -0
  136. package/dist/types/components/Button/NavigationGlyph.d.ts +16 -0
  137. package/dist/types/components/Button/index.d.ts +1 -0
  138. package/dist/types/components/Checkbox/Checkbox.d.ts +12 -12
  139. package/dist/types/components/DateInput/DateInput.d.ts +4 -4
  140. package/dist/types/components/DatePicker/CalendarNavigationIcon.d.ts +6 -0
  141. package/dist/types/components/DatePicker/DatePicker.d.ts +13 -13
  142. package/dist/types/components/DatePicker/context.d.ts +1 -0
  143. package/dist/types/components/DatePicker/useCalendarGutter.d.ts +2 -0
  144. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +13 -13
  145. package/dist/types/components/Dialog/Dialog.d.ts +46 -11
  146. package/dist/types/components/Dialog/index.d.ts +1 -1
  147. package/dist/types/components/Field/Field.d.ts +2 -2
  148. package/dist/types/components/FileUpload/FileUpload.d.ts +6 -6
  149. package/dist/types/components/FloatingLabelInput/FloatingLabelInput.d.ts +4 -4
  150. package/dist/types/components/Icon/index.d.ts +1 -0
  151. package/dist/types/components/Icon/svg/Disclosure.d.ts +3 -0
  152. package/dist/types/components/Indicator/LoadingIndicator.d.ts +2 -2
  153. package/dist/types/components/Input/Input.d.ts +2 -2
  154. package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts +8 -8
  155. package/dist/types/components/Menu/Menu.d.ts +18 -25
  156. package/dist/types/components/OTPInput/OTPInput.d.ts +6 -6
  157. package/dist/types/components/Page/Page.d.ts +48 -7
  158. package/dist/types/components/Page/index.d.ts +1 -1
  159. package/dist/types/components/Popover/Popover.d.ts +17 -6
  160. package/dist/types/components/RadioGroup/RadioGroup.d.ts +10 -10
  161. package/dist/types/components/SelectControl/index.d.ts +1 -1
  162. package/dist/types/components/Sortable/Sortable.d.ts +8 -8
  163. package/dist/types/components/Switch/Switch.d.ts +34 -12
  164. package/dist/types/components/Tabs/Tabs.d.ts +6 -6
  165. package/dist/types/components/TagInput/TagInput.d.ts +4 -4
  166. package/dist/types/components/Textarea/Textarea.d.ts +2 -2
  167. package/dist/types/components/Toast/ToastRenderer.d.ts +79 -0
  168. package/dist/types/components/Toast/Toaster.d.ts +6 -2
  169. package/dist/types/components/Toast/toastLifecycle.d.ts +90 -0
  170. package/dist/types/components/Toolbar/Toolbar.d.ts +149 -0
  171. package/dist/types/components/Toolbar/index.d.ts +1 -0
  172. package/dist/types/components/Tooltip/CopyTooltip.d.ts +2 -2
  173. package/dist/types/components/Tooltip/Tooltip.d.ts +6 -6
  174. package/dist/types/composables/useFloatingBoundary.d.ts +24 -0
  175. package/dist/types/composables/usePhoneSubmenu.d.ts +3 -0
  176. package/dist/types/lib/floatingBoundary.d.ts +9 -0
  177. package/dist/types/lib/focusRestore.d.ts +5 -0
  178. package/dist/types/lib/helpers.d.ts +0 -4
  179. package/dist/types/lib/inputMode.d.ts +7 -0
  180. package/dist/types/lib/menuInitialFocus.d.ts +9 -0
  181. package/dist/types/lib/menuSubmenuPlacement.d.ts +44 -0
  182. package/dist/types/lib/observeTextareaWidth.d.ts +2 -0
  183. package/dist/types/lib/selectPress.d.ts +23 -0
  184. package/dist/types/lib/sortable.d.ts +1 -1
  185. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/Calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAC9G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO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,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;4BAC7C,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;4BAC/C,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;4BAC7C,WAAW,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;yBAC3E,EACD,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACtE;qBACF,CAAC,CAAA;gBACJ,CAAC,CAAC,CACH,CACF;aACF,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import { DateTime, Interval } from \"luxon\"\nimport { computed, defineComponent, h, nextTick, onMounted, ref, shallowRef, watch, type PropType } from \"vue\"\nimport { chunkIntoWeeks, getDaysOfMonth, isAfter, isBefore, isSameDay, isToday } from \"../../lib/dateUtils.js\"\nimport { waitForAnimationFrame } from \"../../lib/helpers.js\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronLeft, ChevronRight } from \"../Icon/index.js\"\nimport { usePopoverClose } from \"../Popover/usePopoverController.js\"\nimport { Select, type Option } from \"../Select/index.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport s from \"@plexui/styles/components/DatePicker/Calendar.module.css\"\nimport { useDateContext } from \"./context.js\"\n\n// Vue port of packages/ui/src/components/DatePicker/Calendar.tsx.\n// - React's `[value]` effects are watchers on the context value; the height\n// effect runs on mount and when the visible month changes, after render.\n// - The `stable-view-N` key on the wrapper remounts the calendar view, as in\n// React, when the value jumps out of view or the dropdowns change month.\n// - React's pending-focus effect is a post watcher on the month; its cleanup\n// cancels the frame, as the effect's does.\n// - The time fields are React controlled inputs: a typed value the state\n// does not take is put back, and the `value` attribute follows the shown\n// value (React syncs it for controlled inputs).\n\nconst CALENDAR_WIDTH_PX = 210\nconst CALENDAR_GAP_PX = 32\nconst STEP_DISTANCE_PX = CALENDAR_WIDTH_PX + CALENDAR_GAP_PX\n\nconst SHORT_MONTH_NAMES = Array.from({ length: 12 }, (_, i) => DateTime.local(2024, i + 1, 1).monthShort!)\n\n// The day a grid key moves to: a day, a week, the Sunday or Saturday of the\n// week (rows start on Sunday), or a month (Luxon clamps Jan 31 to Feb 28/29)\nconst getKeyTarget = (key: string, day: DateTime): DateTime | null => {\n switch (key) {\n case \"ArrowLeft\":\n return day.minus({ days: 1 })\n case \"ArrowRight\":\n return day.plus({ days: 1 })\n case \"ArrowUp\":\n return day.minus({ days: 7 })\n case \"ArrowDown\":\n return day.plus({ days: 7 })\n case \"Home\":\n return day.minus({ days: day.weekday % 7 })\n case \"End\":\n return day.plus({ days: 6 - (day.weekday % 7) })\n case \"PageUp\":\n return day.minus({ months: 1 })\n case \"PageDown\":\n return day.plus({ months: 1 })\n default:\n return null\n }\n}\n\n// Whole-day bounds, as the day buttons' disabled state\nconst isDayWithinLimits = (day: DateTime, min?: DateTime, max?: DateTime) =>\n !(min && isBefore(day, min.startOf(\"day\"))) && !(max && isAfter(day, max.endOf(\"day\")))\n\nconst monthIndex = (date: DateTime) => date.year * 12 + date.month\n\nexport const DateCalendar = defineComponent({\n name: \"DateCalendar\",\n setup() {\n const context = useDateContext()\n const closePopover = usePopoverClose()\n const calendarContainerRef = shallowRef<HTMLDivElement | null>(null)\n // The day to focus once a key has moved the view to its month. It lives\n // here, outside the wrapper that the dropdown layout re-keys\n let pendingFocus: DateTime | null = null\n const calendarSteps = ref(0)\n const forceRenderIncrement = ref(0)\n const calendarDate = shallowRef<DateTime>(context.value ?? DateTime.now())\n\n const pendingHour = ref(context.value?.hour ?? 12)\n const pendingMinute = ref(context.value?.minute ?? 0)\n\n watch(\n () => context.value,\n (value) => {\n if (value) {\n pendingHour.value = value.hour\n pendingMinute.value = value.minute\n }\n },\n )\n\n const isDropdown = () => context.captionLayout === \"dropdown\"\n\n const canGoBack = () => !context.min || isBefore(context.min, calendarDate.value.startOf(\"month\"))\n const canGoForward = () => !context.max || isBefore(calendarDate.value.endOf(\"month\"), context.max)\n\n const handleNext = () => {\n if (isDropdown()) {\n calendarDate.value = calendarDate.value.plus({ months: 1 })\n forceRenderIncrement.value += 1\n } else {\n calendarSteps.value += 1\n calendarDate.value = calendarDate.value.plus({ months: 1 })\n }\n }\n\n const handlePrevious = () => {\n if (isDropdown()) {\n calendarDate.value = calendarDate.value.minus({ months: 1 })\n forceRenderIncrement.value += 1\n } else {\n calendarSteps.value -= 1\n calendarDate.value = calendarDate.value.minus({ months: 1 })\n }\n }\n\n // The calendar limits whole days; with a time picker the chosen time on a\n // min or max day can still cross the bound, so clamp the full date-time\n const clampToBounds = (dateTime: DateTime) => {\n const { min, max } = context\n if (min && dateTime.toMillis() < min.toMillis()) return min\n if (max && dateTime.toMillis() > max.toMillis()) return max\n return dateTime\n }\n\n const handleDateSelect = (selectedDate: DateTime) => {\n if (context.showTime) {\n context.onChange(clampToBounds(selectedDate.set({ hour: pendingHour.value, minute: pendingMinute.value })))\n } else {\n context.onChange(selectedDate)\n closePopover()\n }\n }\n\n const handleTimeChange = (hour: number, minute: number) => {\n const value = context.value\n const next = value ? clampToBounds(value.set({ hour, minute })) : null\n // Show the time that was actually applied, even when clamping left value unchanged\n pendingHour.value = next ? next.hour : hour\n pendingMinute.value = next ? next.minute : minute\n if (next) {\n context.onChange(next)\n }\n }\n\n const handleDropdownMonthChange = (month: number) => {\n calendarDate.value = DateTime.local(calendarDate.value.year, month, 1)\n forceRenderIncrement.value += 1\n }\n\n const handleDropdownYearChange = (year: number) => {\n calendarDate.value = DateTime.local(year, calendarDate.value.month, 1)\n forceRenderIncrement.value += 1\n }\n\n // Days are named by their full date; skip a calendar that is leaving\n const focusDay = (day: DateTime) => {\n const label = day.toLocaleString(DateTime.DATE_HUGE)\n const buttons = calendarContainerRef.value?.querySelectorAll<HTMLButtonElement>(`button[aria-label=\"${label}\"]`)\n Array.from(buttons ?? [])\n .find((button) => !button.closest(\"[data-exiting]\"))\n ?.focus()\n }\n\n const handleDayKeyDown = (event: KeyboardEvent, day: DateTime) => {\n if (event.altKey || event.ctrlKey || event.metaKey) {\n return\n }\n\n // While a move waits for its month to render, the next key starts from\n // the day it is moving to (key repeat), not the day that still has focus\n const target = getKeyTarget(event.key, pendingFocus ?? day)\n if (!target) {\n return\n }\n\n event.preventDefault()\n\n // A disabled day keeps focus where it is\n if (!isDayWithinLimits(target, context.min, context.max)) {\n return\n }\n\n const months = monthIndex(target) - monthIndex(calendarDate.value)\n if (months === 0) {\n pendingFocus = null\n focusDay(target)\n return\n }\n\n // Step the view like the month buttons; a day within min/max keeps every step in bounds\n if (months > 0 ? !canGoForward() : !canGoBack()) {\n return\n }\n\n pendingFocus = target\n for (let step = 0; step < Math.abs(months); step++) {\n if (months > 0) {\n handleNext()\n } else {\n handlePrevious()\n }\n }\n }\n\n // Force re-renders when `value` changes out of band from direct user-selection\n watch(\n () => context.value,\n (value) => {\n // No-op when value is empty\n if (!value) {\n return\n }\n\n // Check if `value` is still within view of our calendar\n const viewInterval = Interval.fromDateTimes(\n calendarDate.value.startOf(\"month\"),\n calendarDate.value.endOf(\"month\"),\n )\n const isValueInRangeOfCalendar = viewInterval.contains(value)\n if (!isValueInRangeOfCalendar) {\n // Reset state the calendar view entirely\n calendarSteps.value = 0\n calendarDate.value = value\n forceRenderIncrement.value += 1\n }\n },\n )\n\n // Detect height changes when new calendars are rendered\n const measureHeight = () => {\n waitForAnimationFrame(() => {\n const container = calendarContainerRef.value\n\n if (!container) {\n return\n }\n\n let maxHeight = -Infinity\n\n // Find the tallest calendar\n container.querySelectorAll<HTMLElement>(\"[data-calendar]\")?.forEach((element) => {\n // NOTE: clientHeight does not respect the scale() that popover uses to animate in, which is what we want\n // We want to know the full height of the element, without any transform applied.\n const height = element.clientHeight\n\n // Ignore calendars that are exiting\n if (element.closest(\"[data-exiting]\")) {\n return\n }\n\n if (height > maxHeight) {\n maxHeight = height\n }\n })\n\n container.style.height = `${maxHeight}px`\n\n // Don't animate the initial height.\n // This is relevant when the calendar opens to a larger size than the default.\n if (!container.style.transition) {\n waitForAnimationFrame(() => {\n container.style.transition = `height 0.25s var(--cubic-move)`\n })\n }\n })\n }\n onMounted(measureHeight)\n watch(calendarDate, measureHeight, { flush: \"post\" })\n\n // Focus a pending day once its month has rendered. TransitionGroup marks\n // the leaving calendar after this render, so wait a frame like the height does\n watch(\n calendarDate,\n (_date, _previous, onCleanup) => {\n if (!pendingFocus) {\n return\n }\n\n onCleanup(\n waitForAnimationFrame(() => {\n const target = pendingFocus\n pendingFocus = null\n if (target) {\n focusDay(target)\n }\n }),\n )\n },\n { flush: \"post\" },\n )\n\n const setContainer = (el: unknown) => {\n calendarContainerRef.value = (el as HTMLDivElement | null) ?? null\n }\n\n return () => {\n const dropdown = isDropdown()\n const date = calendarDate.value\n const { value, min, max } = context\n const viewKey = date.toLocaleString({ month: \"long\", year: \"numeric\" })\n\n return h(\"div\", { key: `stable-view-${forceRenderIncrement.value}`, class: s.CalendarWrapper }, [\n h(\n \"div\",\n { \"ref\": setContainer, \"class\": s.CalendarContainer, \"data-dropdown\": dropdown ? \"\" : undefined },\n [\n h(\"div\", { class: s.Previous }, [\n h(\n Button,\n {\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"size\": \"sm\",\n \"gutterSize\": \"2xs\",\n \"pill\": false,\n \"iconSize\": \"sm\",\n \"onClick\": handlePrevious,\n \"disabled\": !canGoBack(),\n \"aria-label\": \"Previous month\",\n },\n { default: () => [h(ChevronLeft)] },\n ),\n ]),\n h(\"div\", { class: s.Next }, [\n h(\n Button,\n {\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"size\": \"sm\",\n \"gutterSize\": \"2xs\",\n \"pill\": false,\n \"iconSize\": \"sm\",\n \"onClick\": handleNext,\n \"disabled\": !canGoForward(),\n \"aria-label\": \"Next month\",\n },\n { default: () => [h(ChevronRight)] },\n ),\n ]),\n dropdown\n ? h(DropdownCaption, {\n date,\n onMonthChange: handleDropdownMonthChange,\n onYearChange: handleDropdownYearChange,\n min,\n max,\n yearRange: context.yearRange,\n })\n : null,\n h(\n \"div\",\n {\n class: s.CalendarRange,\n style: !dropdown\n ? { transform: `translate(${calendarSteps.value * -1 * STEP_DISTANCE_PX}px, 0)` }\n : undefined,\n },\n [\n !dropdown\n ? h(\n TransitionGroup,\n { enterDuration: 400, exitDuration: 400 },\n {\n default: () => [\n h(CalendarView, {\n key: viewKey,\n stepPosition: calendarSteps.value,\n date,\n selectedDate: value,\n min,\n max,\n onDateSelect: handleDateSelect,\n onDayKeyDown: handleDayKeyDown,\n hideMonthLabel: false,\n }),\n ],\n },\n )\n : h(CalendarView, {\n key: viewKey,\n stepPosition: 0,\n date,\n selectedDate: value,\n min,\n max,\n onDateSelect: handleDateSelect,\n onDayKeyDown: handleDayKeyDown,\n hideMonthLabel: true,\n }),\n ],\n ),\n ],\n ),\n context.showTime\n ? h(TimeInput, { hour: pendingHour.value, minute: pendingMinute.value, onChange: handleTimeChange })\n : null,\n ])\n }\n },\n})\n\nconst DropdownCaption = defineComponent({\n name: \"DateCalendarDropdownCaption\",\n props: {\n date: { type: Object as PropType<DateTime>, required: true },\n onMonthChange: { type: Function as PropType<(month: number) => void>, required: true },\n onYearChange: { type: Function as PropType<(year: number) => void>, required: true },\n min: Object as PropType<DateTime>,\n max: Object as PropType<DateTime>,\n yearRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props) {\n const minYear = computed(() => props.yearRange?.[0] ?? props.min?.year ?? DateTime.now().year - 120)\n const maxYear = computed(() => props.yearRange?.[1] ?? props.max?.year ?? DateTime.now().year)\n\n const years = computed(() => {\n const result: number[] = []\n for (let y = maxYear.value; y >= minYear.value; y--) {\n result.push(y)\n }\n return result\n })\n\n return () =>\n h(\"div\", { class: s.DropdownCaption }, [\n h(Select, {\n \"aria-label\": \"Month\",\n \"listMinWidth\": \"auto\",\n \"listWidth\": \"auto\",\n \"variant\": \"ghost\",\n \"size\": \"sm\",\n \"dropdownIconType\": \"chevronDown\",\n \"value\": String(props.date.month),\n \"options\": SHORT_MONTH_NAMES.map((label, index) => ({ value: String(index + 1), label })),\n \"onChange\": (option: Option | Option[]) => props.onMonthChange(Number((option as Option).value)),\n }),\n h(Select, {\n \"aria-label\": \"Year\",\n \"searchAriaLabel\": \"Search year\",\n \"listMinWidth\": \"auto\",\n \"listWidth\": \"auto\",\n \"variant\": \"ghost\",\n \"size\": \"sm\",\n \"dropdownIconType\": \"chevronDown\",\n \"value\": String(props.date.year),\n \"options\": years.value.map((year) => ({ value: String(year), label: String(year) })),\n \"onChange\": (option: Option | Option[]) => props.onYearChange(Number((option as Option).value)),\n }),\n ])\n },\n})\n\nconst pad = (value: number) => String(value).padStart(2, \"0\")\n\nconst TimeInput = defineComponent({\n name: \"DateCalendarTimeInput\",\n props: {\n hour: { type: Number, required: true },\n minute: { type: Number, required: true },\n onChange: { type: Function as PropType<(hour: number, minute: number) => void>, required: true },\n },\n setup(props) {\n const minuteRef = shallowRef<HTMLInputElement | null>(null)\n const hourText = ref<string | null>(null)\n const minuteText = ref<string | null>(null)\n\n const hourValue = () => hourText.value ?? pad(props.hour)\n const minuteValue = () => minuteText.value ?? pad(props.minute)\n\n // Like a React controlled input, a typed value the state does not take is put back\n const restore = (target: HTMLInputElement, shown: () => string) => {\n void nextTick(() => {\n const value = shown()\n if (target.value !== value) target.value = value\n })\n }\n\n const handleHourChange = (e: Event) => {\n const target = e.target as HTMLInputElement\n const raw = target.value.replace(/\\D/g, \"\").slice(0, 2)\n hourText.value = raw\n if (raw.length === 2) {\n props.onChange(Math.min(23, Number(raw)), props.minute)\n minuteRef.value?.focus()\n minuteRef.value?.select()\n }\n restore(target, hourValue)\n }\n\n const handleHourBlur = (e: FocusEvent) => {\n const raw = (e.currentTarget as HTMLInputElement).value.replace(/\\D/g, \"\").slice(0, 2)\n const h = Math.min(23, Number(raw) || 0)\n props.onChange(h, props.minute)\n hourText.value = null\n }\n\n const handleMinuteChange = (e: Event) => {\n const target = e.target as HTMLInputElement\n const raw = target.value.replace(/\\D/g, \"\").slice(0, 2)\n minuteText.value = raw\n if (raw.length === 2) {\n props.onChange(props.hour, Math.min(59, Number(raw)))\n // Show the accepted value: the parent may clamp it to min/max\n minuteText.value = null\n }\n restore(target, minuteValue)\n }\n\n const handleMinuteBlur = (e: FocusEvent) => {\n const raw = (e.currentTarget as HTMLInputElement).value.replace(/\\D/g, \"\").slice(0, 2)\n const m = Math.min(59, Number(raw) || 0)\n props.onChange(props.hour, m)\n minuteText.value = null\n }\n\n // Arrow steps drop the draft text so the field shows the accepted value,\n // which the parent may have clamped to min/max\n const handleKeyDown = (e: KeyboardEvent, type: \"hour\" | \"minute\") => {\n const step = e.shiftKey ? 10 : 1\n const { hour, minute } = props\n if (e.key === \"ArrowUp\") {\n e.preventDefault()\n if (type === \"hour\") {\n props.onChange((hour + step) % 24, minute)\n hourText.value = null\n } else {\n props.onChange(hour, (minute + step) % 60)\n minuteText.value = null\n }\n } else if (e.key === \"ArrowDown\") {\n e.preventDefault()\n if (type === \"hour\") {\n props.onChange((hour - step + 24) % 24, minute)\n hourText.value = null\n } else {\n props.onChange(hour, (minute - step + 60) % 60)\n minuteText.value = null\n }\n }\n }\n\n const setMinuteRef = (el: unknown) => {\n minuteRef.value = (el as HTMLInputElement | null) ?? null\n }\n\n return () => {\n const hour = hourValue()\n const minute = minuteValue()\n\n return h(\"div\", { class: s.TimeFooter }, [\n h(\"span\", { class: s.TimeLabel }, \"Time\"),\n h(\"div\", { class: s.TimeInputGroup }, [\n h(\"input\", {\n \"class\": s.TimeField,\n \"type\": \"text\",\n \"inputmode\": \"numeric\",\n \"value\": hour,\n // React keeps the `value` attribute in sync with a controlled value\n \"^value\": hour,\n \"onInput\": handleHourChange,\n \"onBlur\": handleHourBlur,\n \"onFocus\": (e: FocusEvent) => {\n const target = e.target as HTMLInputElement\n hourText.value = target.value\n target.select()\n },\n \"onKeydown\": (e: KeyboardEvent) => handleKeyDown(e, \"hour\"),\n \"maxlength\": 2,\n \"aria-label\": \"Hour\",\n }),\n h(\"span\", { class: s.TimeSeparator }, \":\"),\n h(\"input\", {\n \"ref\": setMinuteRef,\n \"class\": s.TimeField,\n \"type\": \"text\",\n \"inputmode\": \"numeric\",\n \"value\": minute,\n \"^value\": minute,\n \"onInput\": handleMinuteChange,\n \"onBlur\": handleMinuteBlur,\n \"onFocus\": (e: FocusEvent) => {\n const target = e.target as HTMLInputElement\n minuteText.value = target.value\n target.select()\n },\n \"onKeydown\": (e: KeyboardEvent) => handleKeyDown(e, \"minute\"),\n \"maxlength\": 2,\n \"aria-label\": \"Minute\",\n }),\n ]),\n ])\n }\n },\n})\n\nconst daysOfTheWeekLabels = [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"]\n\nconst CalendarView = defineComponent({\n name: \"DateCalendarView\",\n props: {\n date: { type: Object as PropType<DateTime>, required: true },\n selectedDate: { type: Object as PropType<DateTime | null>, default: undefined },\n onDateSelect: Function as PropType<(dt: DateTime) => void>,\n onDayKeyDown: Function as PropType<(event: KeyboardEvent, dt: DateTime) => void>,\n min: Object as PropType<DateTime>,\n max: Object as PropType<DateTime>,\n stepPosition: { type: Number, required: true },\n hideMonthLabel: { type: Boolean, default: false },\n },\n setup(props) {\n // Lock position on mount and don't respond to changes\n const position = props.stepPosition\n const view = computed(() => {\n const { date, min, max } = props\n const monthStart = date.startOf(\"month\")\n const endOfMonth = date.endOf(\"month\")\n\n const daysBeforeMonthStart = monthStart.weekday % 7\n const blankDays = new Array(daysBeforeMonthStart).fill(null)\n const daysInMonth = getDaysOfMonth(monthStart)\n const calendarCells = [...blankDays, ...daysInMonth]\n\n // Cells are start-of-day values and Interval excludes its end, so widen the\n // bounds to whole days: min/max days themselves stay selectable.\n const enabledDateInterval = Interval.fromDateTimes(\n (min || monthStart).startOf(\"day\"),\n (max || endOfMonth).endOf(\"day\"),\n )\n\n return {\n startOfMonth: monthStart,\n endOfMonth,\n weeks: chunkIntoWeeks(calendarCells, 7) as Array<Array<DateTime | null>>,\n enabledInterval: enabledDateInterval,\n }\n })\n\n return () => {\n const { startOfMonth, weeks, enabledInterval } = view.value\n const { hideMonthLabel, selectedDate } = props\n\n return h(\n \"div\",\n {\n \"class\": s.Calendar,\n \"style\": hideMonthLabel ? undefined : { left: `${position * STEP_DISTANCE_PX}px` },\n \"data-calendar\": true,\n \"data-static\": hideMonthLabel ? \"\" : undefined,\n },\n [\n hideMonthLabel\n ? h(\"div\", { \"class\": s.MonthLabelSpacer, \"aria-hidden\": \"true\" })\n : h(\"p\", { class: s.MonthLabel }, [startOfMonth.monthLong, \" \", String(startOfMonth.year)]),\n h(\n \"div\",\n { class: s.Week },\n daysOfTheWeekLabels.map((day) => h(\"div\", { key: day, class: s.DayLabel }, day)),\n ),\n ...weeks.map((week, weekIndex) =>\n h(\n \"div\",\n { class: s.Week, key: weekIndex },\n week.map((d, dayIndex) => {\n if (!d) {\n return h(\"div\", { class: s.Day, key: `${weekIndex}-${dayIndex}` })\n }\n\n const enabled = enabledInterval.contains(d)\n const isSelected = enabled && selectedDate && isSameDay(d, selectedDate)\n const dayIsToday = isToday(d)\n\n return h(\"div\", { \"class\": s.Day, \"key\": dayIndex, \"data-is-selected\": isSelected ? \"\" : undefined }, [\n // The full date names the day, which \"15\" alone does not across months\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"class\": s.InteractiveDay,\n \"disabled\": !enabled,\n \"aria-label\": d.toLocaleString(DateTime.DATE_HUGE),\n \"aria-pressed\": isSelected ? \"true\" : \"false\",\n \"aria-current\": dayIsToday ? \"date\" : undefined,\n \"onClick\": () => d && props.onDateSelect?.(d),\n \"onKeydown\": (event: KeyboardEvent) => d && props.onDayKeyDown?.(event, d),\n },\n [String(d.day), dayIsToday ? h(\"span\", { class: s.TodayDot }) : null],\n ),\n ])\n }),\n ),\n ),\n ],\n )\n }\n },\n})\n"]}
1
+ {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/Calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AACnG,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAC9G,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,MAAM,EAAe,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,CAAC,MAAM,0DAA0D,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,kEAAkE;AAClE,4EAA4E;AAC5E,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,6CAA6C;AAC7C,yEAAyE;AACzE,2EAA2E;AAC3E,kDAAkD;AAElD,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAA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CAAC,SAAS,EAAE,EAAE;wBACpG,uEAAuE;wBACvE,CAAC,CACC,QAAQ,EACR;4BACE,MAAM,EAAE,QAAQ;4BAChB,OAAO,EAAE,CAAC,CAAC,cAAc;4BACzB,UAAU,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO;4BACxC,YAAY,EAAE,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC;4BAClD,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;4BAC7C,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;4BAC/C,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC;gCAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC;4BACxE,WAAW,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;yBAC3E,EACD,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACtE;qBACF,CAAC,CAAA;gBACJ,CAAC,CAAC,CACH,CACF;aACF,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import { DateTime, Interval } from \"luxon\"\nimport { computed, defineComponent, h, nextTick, ref, shallowRef, watch, type PropType } from \"vue\"\nimport { chunkIntoWeeks, getDaysOfMonth, isAfter, isBefore, isSameDay, isToday } from \"../../lib/dateUtils.js\"\nimport { waitForAnimationFrame } from \"../../lib/helpers.js\"\nimport { Button } from \"../Button/index.js\"\nimport { CalendarNavigationIcon } from \"./CalendarNavigationIcon.js\"\nimport { usePopoverClose } from \"../Popover/usePopoverController.js\"\nimport { Select, type Option } from \"../Select/index.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport s from \"@plexui/styles/components/DatePicker/Calendar.module.css\"\nimport { useDateContext } from \"./context.js\"\n\n// Vue port of packages/ui/src/components/DatePicker/Calendar.tsx.\n// - React's `[value]` effects are watchers on the context value; the height\n// effect runs on mount and when the visible month changes, after render.\n// - The `stable-view-N` key on the wrapper remounts the calendar view, as in\n// React, when the value jumps out of view or the dropdowns change month.\n// - React's pending-focus effect is a post watcher on the month; its cleanup\n// cancels the frame, as the effect's does.\n// - The time fields are React controlled inputs: a typed value the state\n// does not take is put back, and the `value` attribute follows the shown\n// value (React syncs it for controlled inputs).\n\nconst SHORT_MONTH_NAMES = Array.from({ length: 12 }, (_, i) => DateTime.local(2024, i + 1, 1).monthShort!)\n\n// The day a grid key moves to: a day, a week, the Sunday or Saturday of the\n// week (rows start on Sunday), or a month (Luxon clamps Jan 31 to Feb 28/29)\nconst getKeyTarget = (key: string, day: DateTime): DateTime | null => {\n switch (key) {\n case \"ArrowLeft\":\n return day.minus({ days: 1 })\n case \"ArrowRight\":\n return day.plus({ days: 1 })\n case \"ArrowUp\":\n return day.minus({ days: 7 })\n case \"ArrowDown\":\n return day.plus({ days: 7 })\n case \"Home\":\n return day.minus({ days: day.weekday % 7 })\n case \"End\":\n return day.plus({ days: 6 - (day.weekday % 7) })\n case \"PageUp\":\n return day.minus({ months: 1 })\n case \"PageDown\":\n return day.plus({ months: 1 })\n default:\n return null\n }\n}\n\n// Whole-day bounds, as the day buttons' disabled state\nconst isDayWithinLimits = (day: DateTime, min?: DateTime, max?: DateTime) =>\n !(min && isBefore(day, min.startOf(\"day\"))) && !(max && isAfter(day, max.endOf(\"day\")))\n\nconst monthIndex = (date: DateTime) => date.year * 12 + date.month\n\nexport const DateCalendar = defineComponent({\n name: \"DateCalendar\",\n setup() {\n const context = useDateContext()\n const closePopover = usePopoverClose()\n const calendarContainerRef = shallowRef<HTMLDivElement | null>(null)\n // The day to focus once a key has moved the view to its month. It lives\n // here, outside the wrapper that the dropdown layout re-keys\n let pendingFocus: DateTime | null = null\n const calendarSteps = ref(0)\n const forceRenderIncrement = ref(0)\n const calendarDate = shallowRef<DateTime>(context.value ?? DateTime.now())\n\n const pendingHour = ref(context.value?.hour ?? 12)\n const pendingMinute = ref(context.value?.minute ?? 0)\n\n watch(\n () => context.value,\n (value) => {\n if (value) {\n pendingHour.value = value.hour\n pendingMinute.value = value.minute\n }\n },\n )\n\n const isDropdown = () => context.captionLayout === \"dropdown\"\n\n const canGoBack = () => !context.min || isBefore(context.min, calendarDate.value.startOf(\"month\"))\n const canGoForward = () => !context.max || isBefore(calendarDate.value.endOf(\"month\"), context.max)\n\n const handleNext = () => {\n if (context.disabled) return\n if (isDropdown()) {\n calendarDate.value = calendarDate.value.plus({ months: 1 })\n forceRenderIncrement.value += 1\n } else {\n calendarSteps.value += 1\n calendarDate.value = calendarDate.value.plus({ months: 1 })\n }\n }\n\n const handlePrevious = () => {\n if (context.disabled) return\n if (isDropdown()) {\n calendarDate.value = calendarDate.value.minus({ months: 1 })\n forceRenderIncrement.value += 1\n } else {\n calendarSteps.value -= 1\n calendarDate.value = calendarDate.value.minus({ months: 1 })\n }\n }\n\n // The calendar limits whole days; with a time picker the chosen time on a\n // min or max day can still cross the bound, so clamp the full date-time\n const clampToBounds = (dateTime: DateTime) => {\n const { min, max } = context\n if (min && dateTime.toMillis() < min.toMillis()) return min\n if (max && dateTime.toMillis() > max.toMillis()) return max\n return dateTime\n }\n\n const handleDateSelect = (selectedDate: DateTime) => {\n if (context.disabled) return\n if (context.showTime) {\n context.onChange(clampToBounds(selectedDate.set({ hour: context.value?.hour ?? pendingHour.value, minute: context.value?.minute ?? pendingMinute.value })))\n } else {\n context.onChange(selectedDate)\n closePopover()\n }\n }\n\n const handleTimeChange = (hour: number, minute: number) => {\n if (context.disabled) return\n const value = context.value\n if (value) {\n // A controlled value is authoritative, including when the owner refuses the request.\n context.onChange(clampToBounds(value.set({ hour, minute })))\n } else {\n // Before a day is chosen the time is a local draft, not a selected date.\n pendingHour.value = hour\n pendingMinute.value = minute\n }\n }\n\n const handleDropdownMonthChange = (month: number) => {\n if (context.disabled) return\n calendarDate.value = DateTime.local(calendarDate.value.year, month, 1)\n forceRenderIncrement.value += 1\n }\n\n const handleDropdownYearChange = (year: number) => {\n if (context.disabled) return\n calendarDate.value = DateTime.local(year, calendarDate.value.month, 1)\n forceRenderIncrement.value += 1\n }\n\n // Days are named by their full date; skip a calendar that is leaving\n const focusDay = (day: DateTime) => {\n const label = day.toLocaleString(DateTime.DATE_HUGE)\n const buttons = calendarContainerRef.value?.querySelectorAll<HTMLButtonElement>(`button[aria-label=\"${label}\"]`)\n Array.from(buttons ?? [])\n .find((button) => !button.closest(\"[data-exiting]\"))\n ?.focus()\n }\n\n const handleDayKeyDown = (event: KeyboardEvent, day: DateTime) => {\n if (context.disabled || event.altKey || event.ctrlKey || event.metaKey) {\n return\n }\n\n // While a move waits for its month to render, the next key starts from\n // the day it is moving to (key repeat), not the day that still has focus\n const target = getKeyTarget(event.key, pendingFocus ?? day)\n if (!target) {\n return\n }\n\n event.preventDefault()\n\n // A disabled day keeps focus where it is\n if (!isDayWithinLimits(target, context.min, context.max)) {\n return\n }\n\n const months = monthIndex(target) - monthIndex(calendarDate.value)\n if (months === 0) {\n pendingFocus = null\n focusDay(target)\n return\n }\n\n // Step the view like the month buttons; a day within min/max keeps every step in bounds\n if (months > 0 ? !canGoForward() : !canGoBack()) {\n return\n }\n\n pendingFocus = target\n for (let step = 0; step < Math.abs(months); step++) {\n if (months > 0) {\n handleNext()\n } else {\n handlePrevious()\n }\n }\n }\n\n // Force re-renders when `value` changes out of band from direct user-selection\n watch(\n () => context.value,\n (value) => {\n // No-op when value is empty\n if (!value) {\n return\n }\n\n // Check if `value` is still within view of our calendar\n const viewInterval = Interval.fromDateTimes(\n calendarDate.value.startOf(\"month\"),\n calendarDate.value.endOf(\"month\"),\n )\n const isValueInRangeOfCalendar = viewInterval.contains(value)\n if (!isValueInRangeOfCalendar) {\n // Reset state the calendar view entirely\n calendarSteps.value = 0\n calendarDate.value = value\n forceRenderIncrement.value += 1\n }\n },\n )\n\n // Observe calendar border boxes as Phone geometry/fonts change, as well as month changes.\n watch([calendarDate, forceRenderIncrement, () => context.captionLayout], (_value, _previous, onCleanup) => {\n let cancelTransition: (() => void) | undefined\n let observer: ResizeObserver | undefined\n const cancelMeasure = waitForAnimationFrame(() => {\n const container = calendarContainerRef.value\n if (!container) return\n const calendars = () => Array.from(container.querySelectorAll<HTMLElement>(\"[data-calendar]\"))\n .filter((element) => !element.closest(\"[data-exiting]\"))\n const measure = () => {\n const visible = calendars()\n if (!visible.length) return\n const height = `${Math.max(...visible.map((element) => element.clientHeight))}px`\n if (container.style.height !== height) container.style.height = height\n // Do not animate the initial measurement. CSS follows live reduced motion.\n if (!container.style.transition && !cancelTransition) {\n cancelTransition = waitForAnimationFrame(() => {\n container.style.transition = \"height var(--calendar-height-duration, 0.25s) var(--cubic-move)\"\n })\n }\n }\n measure()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(measure) : undefined\n observer?.observe(container, { box: \"border-box\" })\n calendars().forEach((calendar) => observer?.observe(calendar, { box: \"border-box\" }))\n })\n onCleanup(() => {\n cancelMeasure()\n cancelTransition?.()\n observer?.disconnect()\n })\n }, { immediate: true, flush: \"post\" })\n\n // Focus a pending day once its month has rendered. TransitionGroup marks\n // the leaving calendar after this render, so wait a frame like the height does\n watch(\n calendarDate,\n (_date, _previous, onCleanup) => {\n if (!pendingFocus) {\n return\n }\n\n onCleanup(\n waitForAnimationFrame(() => {\n const target = pendingFocus\n pendingFocus = null\n if (target) {\n focusDay(target)\n }\n }),\n )\n },\n { flush: \"post\" },\n )\n\n const setContainer = (el: unknown) => {\n calendarContainerRef.value = (el as HTMLDivElement | null) ?? null\n }\n\n return () => {\n const dropdown = isDropdown()\n const date = calendarDate.value\n const { value, min, max } = context\n const viewKey = date.toLocaleString({ month: \"long\", year: \"numeric\" })\n\n return h(\"div\", { key: `stable-view-${forceRenderIncrement.value}`, class: s.CalendarWrapper }, [\n h(\n \"div\",\n { \"ref\": setContainer, \"class\": s.CalendarContainer, \"data-dropdown\": dropdown ? \"\" : undefined },\n [\n h(\"div\", { class: s.Previous }, [\n h(\n Button,\n {\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"size\": \"sm\",\n \"gutterSize\": \"2xs\",\n \"pill\": false,\n \"iconSize\": \"sm\",\n \"onClick\": handlePrevious,\n \"disabled\": context.disabled || !canGoBack(),\n \"aria-label\": \"Previous month\",\n },\n { default: () => [h(CalendarNavigationIcon, { direction: \"previous\" })] },\n ),\n ]),\n h(\"div\", { class: s.Next }, [\n h(\n Button,\n {\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"size\": \"sm\",\n \"gutterSize\": \"2xs\",\n \"pill\": false,\n \"iconSize\": \"sm\",\n \"onClick\": handleNext,\n \"disabled\": context.disabled || !canGoForward(),\n \"aria-label\": \"Next month\",\n },\n { default: () => [h(CalendarNavigationIcon, { direction: \"next\" })] },\n ),\n ]),\n dropdown\n ? h(DropdownCaption, {\n date,\n onMonthChange: handleDropdownMonthChange,\n onYearChange: handleDropdownYearChange,\n min,\n max,\n yearRange: context.yearRange,\n })\n : null,\n h(\"div\", { class: s.CalendarViewport }, [\n h(\n \"div\",\n {\n class: s.CalendarRange,\n style: !dropdown\n ? { transform: `translate(calc(${calendarSteps.value * -1} * var(--calendar-step)), 0)` }\n : undefined,\n },\n [\n !dropdown\n ? h(\n TransitionGroup,\n { enterDuration: 400, exitDuration: 400 },\n {\n default: () => [\n h(CalendarView, {\n key: viewKey,\n stepPosition: calendarSteps.value,\n date,\n selectedDate: value,\n min,\n max,\n onDateSelect: handleDateSelect,\n onDayKeyDown: handleDayKeyDown,\n hideMonthLabel: false,\n }),\n ],\n },\n )\n : h(CalendarView, {\n key: viewKey,\n stepPosition: 0,\n date,\n selectedDate: value,\n min,\n max,\n onDateSelect: handleDateSelect,\n onDayKeyDown: handleDayKeyDown,\n hideMonthLabel: true,\n }),\n ],\n ),\n ]),\n ],\n ),\n context.showTime\n ? h(TimeInput, { hour: context.value?.hour ?? pendingHour.value, minute: context.value?.minute ?? pendingMinute.value, onChange: handleTimeChange })\n : null,\n ])\n }\n },\n})\n\nconst DropdownCaption = defineComponent({\n name: \"DateCalendarDropdownCaption\",\n props: {\n date: { type: Object as PropType<DateTime>, required: true },\n onMonthChange: { type: Function as PropType<(month: number) => void>, required: true },\n onYearChange: { type: Function as PropType<(year: number) => void>, required: true },\n min: Object as PropType<DateTime>,\n max: Object as PropType<DateTime>,\n yearRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props) {\n const context = useDateContext()\n const minYear = computed(() => props.yearRange?.[0] ?? props.min?.year ?? DateTime.now().year - 120)\n const maxYear = computed(() => props.yearRange?.[1] ?? props.max?.year ?? DateTime.now().year)\n\n const years = computed(() => {\n const result: number[] = []\n for (let y = maxYear.value; y >= minYear.value; y--) {\n result.push(y)\n }\n return result\n })\n\n return () =>\n h(\"div\", { class: s.DropdownCaption }, [\n h(Select, {\n \"aria-label\": \"Month\",\n \"disabled\": context.disabled,\n \"listMinWidth\": \"auto\",\n \"listWidth\": \"auto\",\n \"variant\": \"ghost\",\n \"size\": \"sm\",\n \"dropdownIconType\": \"chevronDown\",\n \"value\": String(props.date.month),\n \"options\": SHORT_MONTH_NAMES.map((label, index) => ({ value: String(index + 1), label })),\n \"onChange\": (option: Option | Option[]) => props.onMonthChange(Number((option as Option).value)),\n }),\n h(Select, {\n \"aria-label\": \"Year\",\n \"disabled\": context.disabled,\n \"searchAriaLabel\": \"Search year\",\n \"listMinWidth\": \"auto\",\n \"listWidth\": \"auto\",\n \"variant\": \"ghost\",\n \"size\": \"sm\",\n \"dropdownIconType\": \"chevronDown\",\n \"value\": String(props.date.year),\n \"options\": years.value.map((year) => ({ value: String(year), label: String(year) })),\n \"onChange\": (option: Option | Option[]) => props.onYearChange(Number((option as Option).value)),\n }),\n ])\n },\n})\n\nconst pad = (value: number) => String(value).padStart(2, \"0\")\n\nconst TimeInput = defineComponent({\n name: \"DateCalendarTimeInput\",\n props: {\n hour: { type: Number, required: true },\n minute: { type: Number, required: true },\n onChange: { type: Function as PropType<(hour: number, minute: number) => void>, required: true },\n },\n setup(props) {\n const context = useDateContext()\n const minuteRef = shallowRef<HTMLInputElement | null>(null)\n const hourText = ref<string | null>(null)\n const minuteText = ref<string | null>(null)\n\n // Disabling a focused input does not reliably blur it. Cancel both drafts\n // independently so they cannot mask a later owner value or commit on re-enable.\n watch(() => context.disabled, (disabled) => {\n if (!disabled) return\n hourText.value = null\n minuteText.value = null\n }, { flush: \"sync\" })\n\n const hourValue = () => hourText.value ?? pad(props.hour)\n const minuteValue = () => minuteText.value ?? pad(props.minute)\n\n // Like a React controlled input, a typed value the state does not take is put back\n const restore = (target: HTMLInputElement, shown: () => string) => {\n void nextTick(() => {\n const value = shown()\n if (target.value !== value) target.value = value\n })\n }\n\n const handleHourChange = (e: Event) => {\n if (context.disabled) return\n const target = e.target as HTMLInputElement\n const raw = target.value.replace(/\\D/g, \"\").slice(0, 2)\n hourText.value = raw\n if (raw.length === 2) {\n props.onChange(Math.min(23, Number(raw)), props.minute)\n minuteRef.value?.focus()\n minuteRef.value?.select()\n }\n restore(target, hourValue)\n }\n\n const handleHourBlur = (e: FocusEvent) => {\n hourText.value = null\n if (context.disabled) return\n const raw = (e.currentTarget as HTMLInputElement).value.replace(/\\D/g, \"\").slice(0, 2)\n const h = Math.min(23, Number(raw) || 0)\n props.onChange(h, props.minute)\n }\n\n const handleMinuteChange = (e: Event) => {\n if (context.disabled) return\n const target = e.target as HTMLInputElement\n const raw = target.value.replace(/\\D/g, \"\").slice(0, 2)\n minuteText.value = raw\n if (raw.length === 2) {\n props.onChange(props.hour, Math.min(59, Number(raw)))\n // Show the accepted value: the parent may clamp it to min/max\n minuteText.value = null\n }\n restore(target, minuteValue)\n }\n\n const handleMinuteBlur = (e: FocusEvent) => {\n minuteText.value = null\n if (context.disabled) return\n const raw = (e.currentTarget as HTMLInputElement).value.replace(/\\D/g, \"\").slice(0, 2)\n const m = Math.min(59, Number(raw) || 0)\n props.onChange(props.hour, m)\n }\n\n // Arrow steps drop the draft text so the field shows the accepted value,\n // which the parent may have clamped to min/max\n const handleKeyDown = (e: KeyboardEvent, type: \"hour\" | \"minute\") => {\n if (context.disabled) return\n const step = e.shiftKey ? 10 : 1\n const { hour, minute } = props\n if (e.key === \"ArrowUp\") {\n e.preventDefault()\n if (type === \"hour\") {\n props.onChange((hour + step) % 24, minute)\n hourText.value = null\n } else {\n props.onChange(hour, (minute + step) % 60)\n minuteText.value = null\n }\n } else if (e.key === \"ArrowDown\") {\n e.preventDefault()\n if (type === \"hour\") {\n props.onChange((hour - step + 24) % 24, minute)\n hourText.value = null\n } else {\n props.onChange(hour, (minute - step + 60) % 60)\n minuteText.value = null\n }\n }\n }\n\n const setMinuteRef = (el: unknown) => {\n minuteRef.value = (el as HTMLInputElement | null) ?? null\n }\n\n return () => {\n const hour = hourValue()\n const minute = minuteValue()\n\n return h(\"div\", { class: s.TimeFooter }, [\n h(\"span\", { class: s.TimeLabel }, \"Time\"),\n h(\"div\", { class: s.TimeInputGroup }, [\n h(\"input\", {\n \"class\": s.TimeField,\n \"disabled\": context.disabled,\n \"type\": \"text\",\n \"inputmode\": \"numeric\",\n \"value\": hour,\n // React keeps the `value` attribute in sync with a controlled value\n \"^value\": hour,\n \"onInput\": handleHourChange,\n \"onBlur\": handleHourBlur,\n \"onFocus\": (e: FocusEvent) => {\n const target = e.target as HTMLInputElement\n hourText.value = target.value\n target.select()\n },\n \"onKeydown\": (e: KeyboardEvent) => handleKeyDown(e, \"hour\"),\n \"maxlength\": 2,\n \"aria-label\": \"Hour\",\n }),\n h(\"span\", { class: s.TimeSeparator }, \":\"),\n h(\"input\", {\n \"ref\": setMinuteRef,\n \"class\": s.TimeField,\n \"disabled\": context.disabled,\n \"type\": \"text\",\n \"inputmode\": \"numeric\",\n \"value\": minute,\n \"^value\": minute,\n \"onInput\": handleMinuteChange,\n \"onBlur\": handleMinuteBlur,\n \"onFocus\": (e: FocusEvent) => {\n const target = e.target as HTMLInputElement\n minuteText.value = target.value\n target.select()\n },\n \"onKeydown\": (e: KeyboardEvent) => handleKeyDown(e, \"minute\"),\n \"maxlength\": 2,\n \"aria-label\": \"Minute\",\n }),\n ]),\n ])\n }\n },\n})\n\nconst daysOfTheWeekLabels = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\n\nconst CalendarView = defineComponent({\n name: \"DateCalendarView\",\n props: {\n date: { type: Object as PropType<DateTime>, required: true },\n selectedDate: { type: Object as PropType<DateTime | null>, default: undefined },\n onDateSelect: Function as PropType<(dt: DateTime) => void>,\n onDayKeyDown: Function as PropType<(event: KeyboardEvent, dt: DateTime) => void>,\n min: Object as PropType<DateTime>,\n max: Object as PropType<DateTime>,\n stepPosition: { type: Number, required: true },\n hideMonthLabel: { type: Boolean, default: false },\n },\n setup(props) {\n const context = useDateContext()\n // Lock position on mount and don't respond to changes\n const position = props.stepPosition\n const view = computed(() => {\n const { date, min, max } = props\n const monthStart = date.startOf(\"month\")\n const endOfMonth = date.endOf(\"month\")\n\n const daysBeforeMonthStart = monthStart.weekday % 7\n const blankDays = new Array(daysBeforeMonthStart).fill(null)\n const daysInMonth = getDaysOfMonth(monthStart)\n const calendarCells = [...blankDays, ...daysInMonth]\n\n // Cells are start-of-day values and Interval excludes its end, so widen the\n // bounds to whole days: min/max days themselves stay selectable.\n const enabledDateInterval = Interval.fromDateTimes(\n (min || monthStart).startOf(\"day\"),\n (max || endOfMonth).endOf(\"day\"),\n )\n\n return {\n startOfMonth: monthStart,\n endOfMonth,\n weeks: chunkIntoWeeks(calendarCells, 7) as Array<Array<DateTime | null>>,\n enabledInterval: enabledDateInterval,\n }\n })\n\n return () => {\n const { startOfMonth, weeks, enabledInterval } = view.value\n const { hideMonthLabel, selectedDate } = props\n\n return h(\n \"div\",\n {\n \"class\": s.Calendar,\n \"style\": hideMonthLabel ? undefined : { left: `calc(${position} * var(--calendar-step))` },\n \"data-calendar\": true,\n \"data-static\": hideMonthLabel ? \"\" : undefined,\n },\n [\n hideMonthLabel\n ? h(\"div\", { \"class\": s.MonthLabelSpacer, \"aria-hidden\": \"true\" })\n : h(\"p\", { class: s.MonthLabel }, [startOfMonth.monthLong, \" \", String(startOfMonth.year)]),\n h(\n \"div\",\n { class: [s.Week, s.WeekdayHeader] },\n daysOfTheWeekLabels.map((day) => h(\"div\", { key: day, class: s.DayLabel }, [\n h(\"span\", { class: s.ShortDayLabel }, day.slice(0, 2)),\n h(\"span\", { class: s.LongDayLabel }, day),\n ])),\n ),\n ...weeks.map((week, weekIndex) =>\n h(\n \"div\",\n { class: s.Week, key: weekIndex },\n week.map((d, dayIndex) => {\n if (!d) {\n return h(\"div\", { class: s.Day, key: `${weekIndex}-${dayIndex}` })\n }\n\n const enabled = enabledInterval.contains(d)\n const isSelected = enabled && selectedDate && isSameDay(d, selectedDate)\n const dayIsToday = isToday(d)\n\n return h(\"div\", { \"class\": s.Day, \"key\": dayIndex, \"data-is-selected\": isSelected ? \"\" : undefined }, [\n // The full date names the day, which \"15\" alone does not across months\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"class\": s.InteractiveDay,\n \"disabled\": context.disabled || !enabled,\n \"aria-label\": d.toLocaleString(DateTime.DATE_HUGE),\n \"aria-pressed\": isSelected ? \"true\" : \"false\",\n \"aria-current\": dayIsToday ? \"date\" : undefined,\n \"onClick\": () => { if (!context.disabled && d) props.onDateSelect?.(d) },\n \"onKeydown\": (event: KeyboardEvent) => d && props.onDayKeyDown?.(event, d),\n },\n [String(d.day), dayIsToday ? h(\"span\", { class: s.TodayDot }) : null],\n ),\n ])\n }),\n ),\n ),\n ],\n )\n }\n },\n})\n"]}
@@ -0,0 +1,31 @@
1
+ import { Fragment, h } from "vue";
2
+ import { ChevronLeft, ChevronRight } from "../Icon/index.js";
3
+ import s from "@plexui/styles/components/DatePicker/CalendarNavigationIcon.module.css";
4
+ // Outlined Figma Compact calendar arrows, nodes 495:46787 and 495:46788.
5
+ // Keep the 15x24 text boxes and their ink offsets; no SF Symbols font is needed.
6
+ const PREVIOUS_PATH = "M0 8.64258C0 8.47331 0.0292969 8.31706 0.0878906 8.17383C0.152995 8.0306 0.250651 7.89388 0.380859 7.76367L7.98828 0.322266C8.20964 0.107422 8.47656 0 8.78906 0C9.00391 0 9.19596 0.0520833 9.36523 0.15625C9.54102 0.253906 9.68099 0.38737 9.78516 0.556641C9.88932 0.725911 9.94141 0.917969 9.94141 1.13281C9.94141 1.4388 9.82096 1.71224 9.58008 1.95312L2.72461 8.64258L9.58008 15.332C9.82096 15.5729 9.94141 15.8496 9.94141 16.1621C9.94141 16.3704 9.88932 16.5592 9.78516 16.7285C9.68099 16.9043 9.54102 17.041 9.36523 17.1387C9.19596 17.2428 9.00391 17.2949 8.78906 17.2949C8.47656 17.2949 8.20964 17.1842 7.98828 16.9629L0.380859 9.52148C0.250651 9.39128 0.152995 9.25456 0.0878906 9.11133C0.0292969 8.9681 0 8.81185 0 8.64258Z";
7
+ const NEXT_PATH = "M9.94141 8.64258C9.94141 8.81185 9.90885 8.9681 9.84375 9.11133C9.77865 9.25456 9.68099 9.39128 9.55078 9.52148L1.94336 16.9629C1.72852 17.1842 1.46159 17.2949 1.14258 17.2949C0.934245 17.2949 0.742188 17.2428 0.566406 17.1387C0.390625 17.041 0.250651 16.9043 0.146484 16.7285C0.0488281 16.5592 0 16.3704 0 16.1621C0 15.8496 0.117188 15.5729 0.351562 15.332L7.20703 8.64258L0.351562 1.95312C0.117188 1.71224 0 1.4388 0 1.13281C0 0.917969 0.0488281 0.725911 0.146484 0.556641C0.250651 0.38737 0.390625 0.253906 0.566406 0.15625C0.742188 0.0520833 0.934245 0 1.14258 0C1.46159 0 1.72852 0.107422 1.94336 0.322266L9.55078 7.76367C9.68099 7.89388 9.77865 8.0306 9.84375 8.17383C9.90885 8.31706 9.94141 8.47331 9.94141 8.64258Z";
8
+ export const CalendarNavigationIcon = ({ direction }) => {
9
+ const previous = direction === "previous";
10
+ const DesktopIcon = previous ? ChevronLeft : ChevronRight;
11
+ return h(Fragment, null, [
12
+ h(DesktopIcon, { class: s.DesktopIcon, "data-no-autosize": "" }),
13
+ h("svg", {
14
+ class: s.PhoneIcon,
15
+ "data-direction": direction,
16
+ "data-no-autosize": "",
17
+ width: "15",
18
+ height: "24",
19
+ viewBox: "0 0 15 24",
20
+ fill: "currentColor",
21
+ "aria-hidden": "true",
22
+ }, [
23
+ h("path", {
24
+ d: previous ? PREVIOUS_PATH : NEXT_PATH,
25
+ transform: `translate(${previous ? 1.25 : 3.818359375} 3.306640625)`,
26
+ }),
27
+ ]),
28
+ ]);
29
+ };
30
+ CalendarNavigationIcon.inheritAttrs = false;
31
+ //# sourceMappingURL=CalendarNavigationIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarNavigationIcon.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/CalendarNavigationIcon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAA4B,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,CAAC,MAAM,wEAAwE,CAAA;AAItF,yEAAyE;AACzE,iFAAiF;AACjF,MAAM,aAAa,GAAG,0tBAA0tB,CAAA;AAChvB,MAAM,SAAS,GAAG,otBAAotB,CAAA;AAEtuB,MAAM,CAAC,MAAM,sBAAsB,GAAqD,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IACxG,MAAM,QAAQ,GAAG,SAAS,KAAK,UAAU,CAAA;IACzC,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAA;IAEzD,OAAO,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE;QACvB,CAAC,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC;QAChE,CAAC,CAAC,KAAK,EAAE;YACP,KAAK,EAAE,CAAC,CAAC,SAAS;YAClB,gBAAgB,EAAE,SAAS;YAC3B,kBAAkB,EAAE,EAAE;YACtB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,cAAc;YACpB,aAAa,EAAE,MAAM;SACtB,EAAE;YACD,CAAC,CAAC,MAAM,EAAE;gBACR,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;gBACvC,SAAS,EAAE,aAAa,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,eAAe;aACrE,CAAC;SACH,CAAC;KACH,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,sBAAsB,CAAC,YAAY,GAAG,KAAK,CAAA","sourcesContent":["import { Fragment, h, type FunctionalComponent } from \"vue\"\nimport { ChevronLeft, ChevronRight } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/DatePicker/CalendarNavigationIcon.module.css\"\n\ntype CalendarNavigationIconProps = { direction: \"previous\" | \"next\" }\n\n// Outlined Figma Compact calendar arrows, nodes 495:46787 and 495:46788.\n// Keep the 15x24 text boxes and their ink offsets; no SF Symbols font is needed.\nconst PREVIOUS_PATH = \"M0 8.64258C0 8.47331 0.0292969 8.31706 0.0878906 8.17383C0.152995 8.0306 0.250651 7.89388 0.380859 7.76367L7.98828 0.322266C8.20964 0.107422 8.47656 0 8.78906 0C9.00391 0 9.19596 0.0520833 9.36523 0.15625C9.54102 0.253906 9.68099 0.38737 9.78516 0.556641C9.88932 0.725911 9.94141 0.917969 9.94141 1.13281C9.94141 1.4388 9.82096 1.71224 9.58008 1.95312L2.72461 8.64258L9.58008 15.332C9.82096 15.5729 9.94141 15.8496 9.94141 16.1621C9.94141 16.3704 9.88932 16.5592 9.78516 16.7285C9.68099 16.9043 9.54102 17.041 9.36523 17.1387C9.19596 17.2428 9.00391 17.2949 8.78906 17.2949C8.47656 17.2949 8.20964 17.1842 7.98828 16.9629L0.380859 9.52148C0.250651 9.39128 0.152995 9.25456 0.0878906 9.11133C0.0292969 8.9681 0 8.81185 0 8.64258Z\"\nconst NEXT_PATH = \"M9.94141 8.64258C9.94141 8.81185 9.90885 8.9681 9.84375 9.11133C9.77865 9.25456 9.68099 9.39128 9.55078 9.52148L1.94336 16.9629C1.72852 17.1842 1.46159 17.2949 1.14258 17.2949C0.934245 17.2949 0.742188 17.2428 0.566406 17.1387C0.390625 17.041 0.250651 16.9043 0.146484 16.7285C0.0488281 16.5592 0 16.3704 0 16.1621C0 15.8496 0.117188 15.5729 0.351562 15.332L7.20703 8.64258L0.351562 1.95312C0.117188 1.71224 0 1.4388 0 1.13281C0 0.917969 0.0488281 0.725911 0.146484 0.556641C0.250651 0.38737 0.390625 0.253906 0.566406 0.15625C0.742188 0.0520833 0.934245 0 1.14258 0C1.46159 0 1.72852 0.107422 1.94336 0.322266L9.55078 7.76367C9.68099 7.89388 9.77865 8.0306 9.84375 8.17383C9.90885 8.31706 9.94141 8.47331 9.94141 8.64258Z\"\n\nexport const CalendarNavigationIcon: FunctionalComponent<CalendarNavigationIconProps> = ({ direction }) => {\n const previous = direction === \"previous\"\n const DesktopIcon = previous ? ChevronLeft : ChevronRight\n\n return h(Fragment, null, [\n h(DesktopIcon, { class: s.DesktopIcon, \"data-no-autosize\": \"\" }),\n h(\"svg\", {\n class: s.PhoneIcon,\n \"data-direction\": direction,\n \"data-no-autosize\": \"\",\n width: \"15\",\n height: \"24\",\n viewBox: \"0 0 15 24\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n }, [\n h(\"path\", {\n d: previous ? PREVIOUS_PATH : NEXT_PATH,\n transform: `translate(${previous ? 1.25 : 3.818359375} 3.306640625)`,\n }),\n ]),\n ])\n}\n\nCalendarNavigationIcon.inheritAttrs = false\n"]}
@@ -1,9 +1,13 @@
1
+ import s from "@plexui/styles/components/DatePicker/Calendar.module.css";
2
+ import { DateTime } from "luxon";
1
3
  import { defineComponent, h, provide, toRaw, useId } from "vue";
4
+ import { useBreakpoint } from "../../composables/useBreakpoints.js";
2
5
  import { isAfter } from "../../lib/dateUtils.js";
3
6
  import { Calendar } from "../Icon/index.js";
4
7
  import { Popover, PopoverContent, PopoverTrigger } from "../Popover/index.js";
5
8
  import { SelectControl } from "../SelectControl/index.js";
6
9
  import { DateCalendar } from "./Calendar.js";
10
+ import { useCalendarGutter } from "./useCalendarGutter.js";
7
11
  import { DateContextKey } from "./context.js";
8
12
  // Vue port of packages/ui/src/components/DatePicker/DatePicker.tsx.
9
13
  // - `value` + `update:value` (`v-model:value`), plus `change` with the same
@@ -33,7 +37,7 @@ const DatePickerComponent = defineComponent({
33
37
  min: Object,
34
38
  /** Defines the latest selectable date (inclusive). */
35
39
  max: Object,
36
- /** The preferred side of the trigger to render against when open. @default "bottom" */
40
+ /** Preferred side; collisions can flip it. On phones, left and right prefer bottom so seven 44px day targets fit. @default "bottom" */
37
41
  side: { type: String, default: "bottom" },
38
42
  /** The distance in pixels from the trigger. @default 8 */
39
43
  sideOffset: { type: Number, default: 8 },
@@ -71,10 +75,12 @@ const DatePickerComponent = defineComponent({
71
75
  yearRange: Array,
72
76
  },
73
77
  emits: {
74
- "update:value": (_nextValue) => true,
75
- "change": (_nextValue) => true,
78
+ "update:value": (nextValue) => nextValue === null || DateTime.isDateTime(nextValue),
79
+ "change": (nextValue) => nextValue === null || DateTime.isDateTime(nextValue),
76
80
  },
77
81
  setup(props, { emit }) {
82
+ const wide = useBreakpoint("md");
83
+ const calendarGutter = useCalendarGutter();
78
84
  const unwrap = (value) => (value ? toRaw(value) : value);
79
85
  const onChange = (nextValue) => {
80
86
  emit("update:value", nextValue);
@@ -90,6 +96,9 @@ const DatePickerComponent = defineComponent({
90
96
  get max() {
91
97
  return unwrap(props.max);
92
98
  },
99
+ get disabled() {
100
+ return props.disabled;
101
+ },
93
102
  get captionLayout() {
94
103
  return props.captionLayout;
95
104
  },
@@ -135,6 +144,7 @@ const DatePickerComponent = defineComponent({
135
144
  "block": props.block,
136
145
  "size": props.size,
137
146
  "disabled": props.disabled,
147
+ "interactOnEnter": true,
138
148
  "StartIcon": props.triggerShowIcon ? Calendar : undefined,
139
149
  "dropdownIconType": props.dropdownIconType,
140
150
  "onClearClick": props.clearable ? handleClearClick : undefined,
@@ -142,8 +152,10 @@ const DatePickerComponent = defineComponent({
142
152
  ],
143
153
  }),
144
154
  h(PopoverContent, {
155
+ class: s.Popover,
145
156
  minWidth: 230,
146
- side: props.side,
157
+ collisionPadding: wide.value ? 20 : calendarGutter.value,
158
+ side: wide.value || props.side === "top" ? props.side : "bottom",
147
159
  sideOffset: props.sideOffset,
148
160
  align,
149
161
  alignOffset: props.alignOffset ?? (align === "center" ? 0 : -5),
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAuC,MAAM,qBAAqB,CAAA;AAClH,OAAO,EAAE,aAAa,EAAyB,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAyB,MAAM,cAAc,CAAA;AAEpE,oEAAoE;AACpE,4EAA4E;AAC5E,uEAAuE;AACvE,8DAA8D;AAC9D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,CACC,cAAc,EACd;wBACE,QAAQ,EAAE,GAAG;wBACb,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,UAAU,EAAE,KAAK,CAAC,UAAU;wBAC5B,KAAK;wBACL,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;qBAChE,EACD,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,CACrC;iBACF;aACF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAMF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAA","sourcesContent":["import type { DateTime } from \"luxon\"\nimport { defineComponent, h, provide, toRaw, useId, type PropType } from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { isAfter } from \"../../lib/dateUtils.js\"\nimport { Calendar } from \"../Icon/index.js\"\nimport { Popover, PopoverContent, PopoverTrigger, type PopoverAlign, type PopoverSide } from \"../Popover/index.js\"\nimport { SelectControl, type DropdownIconType } from \"../SelectControl/index.js\"\nimport { DateCalendar } from \"./Calendar.js\"\nimport { DateContextKey, type DateContextValue } from \"./context.js\"\n\n// Vue port of packages/ui/src/components/DatePicker/DatePicker.tsx.\n// - `value` + `update:value` (`v-model:value`), plus `change` with the same\n// value (React's `onChange`). Like React the picker is controlled: a\n// parent that does not update `value` keeps the shown date.\n// - `aria-label`, `aria-labelledby`, `aria-describedby` and `aria-invalid`\n// reach the trigger, as in React. Other attributes are not passed on\n// (React's DatePicker takes no other props).\n// - DateTime values are read unwrapped (`toRaw`), so a `ref()` holding one\n// (a deep reactive proxy) works like a plain value.\n\nconst DatePickerComponent = defineComponent({\n name: \"DatePicker\",\n inheritAttrs: false,\n props: {\n /** Allow targeting the input for forms and accessibility. */\n id: String,\n \"ariaLabel\": String,\n \"ariaLabelledby\": String,\n \"ariaDescribedby\": String,\n \"ariaInvalid\": {\n type: [Boolean, String] as PropType<boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\">,\n default: undefined,\n },\n /** The selected date value (`v-model:value`). */\n value: { type: Object as PropType<DateTime | null>, default: null },\n /** Defines the earliest selectable date (inclusive). */\n min: Object as PropType<DateTime>,\n /** Defines the latest selectable date (inclusive). */\n max: Object as PropType<DateTime>,\n /** The preferred side of the trigger to render against when open. @default \"bottom\" */\n side: { type: String as PropType<PopoverSide>, default: \"bottom\" },\n /** The distance in pixels from the trigger. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** The preferred alignment against the trigger. @default \"center\" */\n align: { type: String as PropType<PopoverAlign>, default: \"center\" },\n /** An offset in pixels from the \"start\" or \"end\" alignment options. @default 0 */\n alignOffset: Number,\n /** Disables the select visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Placeholder text for the select. @default \"Select date...\" */\n placeholder: { type: String, default: \"Select date...\" },\n /** Style variant for the select trigger. @default \"outline\" */\n variant: { type: String as PropType<\"soft\" | \"outline\" | \"ghost\">, default: \"outline\" },\n /** Determines if the select trigger should be a fully rounded pill shape. @default true */\n pill: { type: Boolean, default: true },\n /** Size of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Icon displayed in the far right of the select trigger. @default \"dropdown\" */\n dropdownIconType: String as PropType<DropdownIconType>,\n /** Custom class applied to the select trigger */\n triggerClassName: String,\n /** Display calendar icon at the start of the trigger. @default true */\n triggerShowIcon: { type: Boolean, default: true },\n /** Format of dates displayed in the trigger. @default \"MM/dd/yy\" (\"MM/dd/yy HH:mm\" with `showTime`) */\n triggerDateFormat: String,\n /** Display a clear action that allows the select to be unset. @default false */\n clearable: { type: Boolean, default: false },\n /** Extends select to 100% of available width. @default false */\n block: { type: Boolean, default: false },\n /** Calendar header: arrow navigation (`\"buttons\"`) or month and year dropdowns. @default \"buttons\" */\n captionLayout: { type: String as PropType<\"buttons\" | \"dropdown\">, default: \"buttons\" },\n /** Show time input below the calendar for combined date and time selection. @default false */\n showTime: { type: Boolean, default: false },\n /** Range of selectable years when `captionLayout` is `\"dropdown\"`. @default [currentYear - 120, currentYear] */\n yearRange: Array as unknown as PropType<[number, number]>,\n },\n emits: {\n \"update:value\": (_nextValue: DateTime | null) => true,\n \"change\": (_nextValue: DateTime | null) => true,\n },\n setup(props, { emit }) {\n const unwrap = <T>(value: T): T => (value ? toRaw(value) : value)\n\n const onChange = (nextValue: DateTime | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const store: DateContextValue = {\n get value() {\n return unwrap(props.value) ?? null\n },\n get min() {\n return unwrap(props.min)\n },\n get max() {\n return unwrap(props.max)\n },\n get captionLayout() {\n return props.captionLayout\n },\n get showTime() {\n return props.showTime\n },\n get yearRange() {\n return props.yearRange\n },\n onChange,\n }\n provide(DateContextKey, store)\n\n const handleClearClick = () => {\n onChange(null)\n }\n\n // The value text needs an id for aria-labelledby, also when `id` is not set\n const generatedId = useId()\n\n return () => {\n const { id, ariaLabelledby, align, placeholder } = props\n const value = store.value\n const { min, max } = store\n\n // min and max are inclusive, so equal bounds allow one date\n if (min && max && isAfter(min, max)) {\n throw new Error(\"DatePicker error: `min` date must not be after the `max` date\")\n }\n\n const valueId = `${id ?? generatedId}-value`\n\n const triggerDateFormat = props.triggerDateFormat ?? (props.showTime ? \"MM/dd/yy HH:mm\" : \"MM/dd/yy\")\n const text = value?.toFormat(triggerDateFormat) ?? placeholder\n\n return h(Popover, null, {\n default: () => [\n h(PopoverTrigger, null, {\n default: () => [\n h(\n SelectControl,\n {\n \"id\": id,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": ariaLabelledby ? `${ariaLabelledby} ${valueId}` : undefined,\n \"aria-describedby\": props.ariaDescribedby,\n \"aria-invalid\": props.ariaInvalid,\n \"class\": props.triggerClassName,\n \"selected\": !!value,\n \"variant\": props.variant,\n \"pill\": props.pill,\n \"block\": props.block,\n \"size\": props.size,\n \"disabled\": props.disabled,\n \"StartIcon\": props.triggerShowIcon ? Calendar : undefined,\n \"dropdownIconType\": props.dropdownIconType,\n \"onClearClick\": props.clearable ? handleClearClick : undefined,\n },\n { default: () => [ariaLabelledby ? h(\"span\", { id: valueId }, text) : text] },\n ),\n ],\n }),\n h(\n PopoverContent,\n {\n minWidth: 230,\n side: props.side,\n sideOffset: props.sideOffset,\n align,\n alignOffset: props.alignOffset ?? (align === \"center\" ? 0 : -5),\n },\n { default: () => [h(DateCalendar)] },\n ),\n ],\n })\n }\n },\n})\n\ntype DatePickerOwnProps = InstanceType<typeof DatePickerComponent>[\"$props\"]\n\nexport type DatePickerProps = DatePickerOwnProps\n\n/**\n * A date (and optionally time) picker: a SelectControl trigger opening a\n * calendar in a popover. Bind the date (a luxon `DateTime`) with\n * `v-model:value`.\n */\nexport const DatePicker = DatePickerComponent\n"]}
1
+ {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,0DAA0D,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAuC,MAAM,qBAAqB,CAAA;AAClH,OAAO,EAAE,aAAa,EAAyB,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,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port { defineComponent, h, provide, toRaw, useId, type PropType } from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { isAfter } from \"../../lib/dateUtils.js\"\nimport { Calendar } from \"../Icon/index.js\"\nimport { Popover, PopoverContent, PopoverTrigger, type PopoverAlign, type PopoverSide } from \"../Popover/index.js\"\nimport { SelectControl, type DropdownIconType } from \"../SelectControl/index.js\"\nimport { DateCalendar } from \"./Calendar.js\"\nimport { useCalendarGutter } from \"./useCalendarGutter.js\"\nimport { DateContextKey, type DateContextValue } from \"./context.js\"\n\n// Vue port of packages/ui/src/components/DatePicker/DatePicker.tsx.\n// - `value` + `update:value` (`v-model:value`), plus `change` with the same\n// value (React's `onChange`). Like React the picker is controlled: a\n// parent that does not update `value` keeps the shown date.\n// - `aria-label`, `aria-labelledby`, `aria-describedby` and `aria-invalid`\n// reach the trigger, as in React. Other attributes are not passed on\n// (React's DatePicker takes no other props).\n// - DateTime values are read unwrapped (`toRaw`), so a `ref()` holding one\n// (a deep reactive proxy) works like a plain value.\n\nconst DatePickerComponent = defineComponent({\n name: \"DatePicker\",\n inheritAttrs: false,\n props: {\n /** Allow targeting the input for forms and accessibility. */\n id: String,\n \"ariaLabel\": String,\n \"ariaLabelledby\": String,\n \"ariaDescribedby\": String,\n \"ariaInvalid\": {\n type: [Boolean, String] as PropType<boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\">,\n default: undefined,\n },\n /** The selected date value (`v-model:value`). */\n value: { type: Object as PropType<DateTime | null>, default: null },\n /** Defines the earliest selectable date (inclusive). */\n min: Object as PropType<DateTime>,\n /** Defines the latest selectable date (inclusive). */\n max: Object as PropType<DateTime>,\n /** Preferred side; collisions can flip it. On phones, left and right prefer bottom so seven 44px day targets fit. @default \"bottom\" */\n side: { type: String as PropType<PopoverSide>, default: \"bottom\" },\n /** The distance in pixels from the trigger. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** The preferred alignment against the trigger. @default \"center\" */\n align: { type: String as PropType<PopoverAlign>, default: \"center\" },\n /** An offset in pixels from the \"start\" or \"end\" alignment options. @default 0 */\n alignOffset: Number,\n /** Disables the select visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Placeholder text for the select. @default \"Select date...\" */\n placeholder: { type: String, default: \"Select date...\" },\n /** Style variant for the select trigger. @default \"outline\" */\n variant: { type: String as PropType<\"soft\" | \"outline\" | \"ghost\">, default: \"outline\" },\n /** Determines if the select trigger should be a fully rounded pill shape. @default true */\n pill: { type: Boolean, default: true },\n /** Size of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Icon displayed in the far right of the select trigger. @default \"dropdown\" */\n dropdownIconType: String as PropType<DropdownIconType>,\n /** Custom class applied to the select trigger */\n triggerClassName: String,\n /** Display calendar icon at the start of the trigger. @default true */\n triggerShowIcon: { type: Boolean, default: true },\n /** Format of dates displayed in the trigger. @default \"MM/dd/yy\" (\"MM/dd/yy HH:mm\" with `showTime`) */\n triggerDateFormat: String,\n /** Display a clear action that allows the select to be unset. @default false */\n clearable: { type: Boolean, default: false },\n /** Extends select to 100% of available width. @default false */\n block: { type: Boolean, default: false },\n /** Calendar header: arrow navigation (`\"buttons\"`) or month and year dropdowns. @default \"buttons\" */\n captionLayout: { type: String as PropType<\"buttons\" | \"dropdown\">, default: \"buttons\" },\n /** Show time input below the calendar for combined date and time selection. @default false */\n showTime: { type: Boolean, default: false },\n /** Range of selectable years when `captionLayout` is `\"dropdown\"`. @default [currentYear - 120, currentYear] */\n yearRange: Array as unknown as PropType<[number, number]>,\n },\n emits: {\n \"update:value\": (nextValue: DateTime | null) => nextValue === null || DateTime.isDateTime(nextValue),\n \"change\": (nextValue: DateTime | null) => nextValue === null || DateTime.isDateTime(nextValue),\n },\n setup(props, { emit }) {\n const wide = useBreakpoint(\"md\")\n const calendarGutter = useCalendarGutter()\n const unwrap = <T>(value: T): T => (value ? toRaw(value) : value)\n\n const onChange = (nextValue: DateTime | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const store: DateContextValue = {\n get value() {\n return unwrap(props.value) ?? null\n },\n get min() {\n return unwrap(props.min)\n },\n get max() {\n return unwrap(props.max)\n },\n get disabled() {\n return props.disabled\n },\n get captionLayout() {\n return props.captionLayout\n },\n get showTime() {\n return props.showTime\n },\n get yearRange() {\n return props.yearRange\n },\n onChange,\n }\n provide(DateContextKey, store)\n\n const handleClearClick = () => {\n onChange(null)\n }\n\n // The value text needs an id for aria-labelledby, also when `id` is not set\n const generatedId = useId()\n\n return () => {\n const { id, ariaLabelledby, align, placeholder } = props\n const value = store.value\n const { min, max } = store\n\n // min and max are inclusive, so equal bounds allow one date\n if (min && max && isAfter(min, max)) {\n throw new Error(\"DatePicker error: `min` date must not be after the `max` date\")\n }\n\n const valueId = `${id ?? generatedId}-value`\n\n const triggerDateFormat = props.triggerDateFormat ?? (props.showTime ? \"MM/dd/yy HH:mm\" : \"MM/dd/yy\")\n const text = value?.toFormat(triggerDateFormat) ?? placeholder\n\n return h(Popover, null, {\n default: () => [\n h(PopoverTrigger, null, {\n default: () => [\n h(\n SelectControl,\n {\n \"id\": id,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": ariaLabelledby ? `${ariaLabelledby} ${valueId}` : undefined,\n \"aria-describedby\": props.ariaDescribedby,\n \"aria-invalid\": props.ariaInvalid,\n \"class\": props.triggerClassName,\n \"selected\": !!value,\n \"variant\": props.variant,\n \"pill\": props.pill,\n \"block\": props.block,\n \"size\": props.size,\n \"disabled\": props.disabled,\n \"interactOnEnter\": true,\n \"StartIcon\": props.triggerShowIcon ? Calendar : undefined,\n \"dropdownIconType\": props.dropdownIconType,\n \"onClearClick\": props.clearable ? handleClearClick : undefined,\n },\n { default: () => [ariaLabelledby ? h(\"span\", { id: valueId }, text) : text] },\n ),\n ],\n }),\n h(\n PopoverContent,\n {\n class: s.Popover,\n minWidth: 230,\n collisionPadding: wide.value ? 20 : calendarGutter.value,\n side: wide.value || props.side === \"top\" ? props.side : \"bottom\",\n sideOffset: props.sideOffset,\n align,\n alignOffset: props.alignOffset ?? (align === \"center\" ? 0 : -5),\n },\n { default: () => [h(DateCalendar)] },\n ),\n ],\n })\n }\n },\n})\n\ntype DatePickerOwnProps = InstanceType<typeof DatePickerComponent>[\"$props\"]\n\nexport type DatePickerProps = DatePickerOwnProps\n\n/**\n * A date (and optionally time) picker: a SelectControl trigger opening a\n * calendar in a popover. Bind the date (a luxon `DateTime`) with\n * `v-model:value`.\n */\nexport const DatePicker = DatePickerComponent\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAqB,MAAM,KAAK,CAAA;AAiB/C,MAAM,CAAC,MAAM,cAAc,GAAmC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAExF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IAE5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;IACtE,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import type { DateTime } from \"luxon\"\nimport { inject, type InjectionKey } from \"vue\"\n\n// Vue port of packages/ui/src/components/DatePicker/context.tsx. The values\n// are getters over DatePicker's props (read them in render, computed or\n// watch to track them); React's `onChangeRef` is a plain function here, as\n// Vue props and emits are always current.\n\nexport type DateContextValue = {\n readonly value: DateTime | null\n readonly min?: DateTime\n readonly max?: DateTime\n readonly captionLayout: \"buttons\" | \"dropdown\"\n readonly showTime: boolean\n readonly yearRange?: [number, number]\n onChange: (nextValue: DateTime | null) => void\n}\n\nexport const DateContextKey: InjectionKey<DateContextValue> = Symbol(\"PlexUIDatePicker\")\n\nexport const useDateContext = () => {\n const context = inject(DateContextKey, null)\n\n if (!context) {\n throw new Error(\"Date components must be wrapped in <DatePicker />\")\n }\n\n return context\n}\n"]}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAqB,MAAM,KAAK,CAAA;AAkB/C,MAAM,CAAC,MAAM,cAAc,GAAmC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAExF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IAE5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;IACtE,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import type { DateTime } from \"luxon\"\nimport { inject, type InjectionKey } from \"vue\"\n\n// Vue port of packages/ui/src/components/DatePicker/context.tsx. The values\n// are getters over DatePicker's props (read them in render, computed or\n// watch to track them); React's `onChangeRef` is a plain function here, as\n// Vue props and emits are always current.\n\nexport type DateContextValue = {\n readonly value: DateTime | null\n readonly min?: DateTime\n readonly max?: DateTime\n readonly disabled: boolean\n readonly captionLayout: \"buttons\" | \"dropdown\"\n readonly showTime: boolean\n readonly yearRange?: [number, number]\n onChange: (nextValue: DateTime | null) => void\n}\n\nexport const DateContextKey: InjectionKey<DateContextValue> = Symbol(\"PlexUIDatePicker\")\n\nexport const useDateContext = () => {\n const context = inject(DateContextKey, null)\n\n if (!context) {\n throw new Error(\"Date components must be wrapped in <DatePicker />\")\n }\n\n return context\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { computed, onBeforeUnmount, onMounted, ref } from "vue";
2
+ // Mirrors React's useWindowSize subscription; the CSS uses the same gutter
3
+ // formula so Popover's numeric collision padding matches the rendered width.
4
+ export const useCalendarGutter = () => {
5
+ const width = ref();
6
+ const update = () => { width.value = window.innerWidth; };
7
+ onMounted(() => {
8
+ update();
9
+ window.addEventListener("resize", update);
10
+ });
11
+ onBeforeUnmount(() => window.removeEventListener("resize", update));
12
+ return computed(() => width.value === undefined ? 16 : Math.max(3, Math.min(16, (width.value - 308) / 4)));
13
+ };
14
+ //# sourceMappingURL=useCalendarGutter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCalendarGutter.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/useCalendarGutter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAoB,MAAM,KAAK,CAAA;AAEjF,2EAA2E;AAC3E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAwB,EAAE;IACzD,MAAM,KAAK,GAAG,GAAG,EAAU,CAAA;IAC3B,MAAM,MAAM,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAA,CAAC,CAAC,CAAA;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,EAAE,CAAA;QACR,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;IACF,eAAe,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAA;IAEnE,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5G,CAAC,CAAA","sourcesContent":["import { computed, onBeforeUnmount, onMounted, ref, type ComputedRef } from \"vue\"\n\n// Mirrors React's useWindowSize subscription; the CSS uses the same gutter\n// formula so Popover's numeric collision padding matches the rendered width.\nexport const useCalendarGutter = (): ComputedRef<number> => {\n const width = ref<number>()\n const update = () => { width.value = window.innerWidth }\n\n onMounted(() => {\n update()\n window.addEventListener(\"resize\", update)\n })\n onBeforeUnmount(() => window.removeEventListener(\"resize\", update))\n\n return computed(() => width.value === undefined ? 16 : Math.max(3, Math.min(16, (width.value - 308) / 4)))\n}\n"]}