@auronui/vue 1.0.23 → 1.1.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.
- package/ai-rules.md +884 -0
- package/bin/setup-ai.mjs +74 -0
- package/dist/cjs/index.cjs +1003 -891
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +8 -0
- package/dist/components/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.vue_vue_type_script_setup_true_lang.js +17 -2
- package/dist/components/checkbox/CheckboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/checkbox/checkbox-group.context.js.map +1 -1
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/date-range-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/date-time-picker/DateTimePicker.js.map +1 -1
- package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/validation.js +1 -1
- package/dist/components/form/validation.js.map +1 -1
- package/dist/components/modal/ModalContent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/popover/PopoverContent.js.map +1 -1
- package/dist/components/popover/PopoverContent.vue_vue_type_script_setup_true_lang.js +46 -34
- package/dist/components/popover/PopoverContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/Radio.vue_vue_type_script_setup_true_lang.js +9 -1
- package/dist/components/radio/Radio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/radio/RadioGroup.js.map +1 -1
- package/dist/components/radio/RadioGroup.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/radio/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/radio/radio-group.context.js.map +1 -1
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/switch/Switch.vue_vue_type_script_setup_true_lang.js +8 -0
- package/dist/components/switch/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/switch/SwitchGroup.js.map +1 -1
- package/dist/components/switch/SwitchGroup.vue_vue_type_script_setup_true_lang.js +17 -2
- package/dist/components/switch/SwitchGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/switch/switch-group.context.js.map +1 -1
- package/dist/components/tooltip/TooltipContent.js.map +1 -1
- package/dist/components/tooltip/TooltipContent.vue_vue_type_script_setup_true_lang.js +46 -34
- package/dist/components/tooltip/TooltipContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/index.d.ts +78 -20
- package/package.json +9 -3
package/dist/components/date-range-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/date-range-picker/DateRangePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n DateRangePickerRoot,\n DateRangePickerTrigger,\n DateRangePickerContent,\n} from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport { dateRangePickerVariants, type DateRangeFieldVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport RangeCalendar from '../range-calendar/RangeCalendar.vue'\nimport DateRangeField from '../date-range-field/DateRangeField.vue'\n\nexport interface DateRange {\n start: DateValue\n end: DateValue\n}\n\nconst props = withDefaults(defineProps<{\n /* Field appearance — forwarded to DateRangeField */\n variant?: DateRangeFieldVariants['variant']\n size?: DateRangeFieldVariants['size']\n color?: DateRangeFieldVariants['color']\n labelPlacement?: DateRangeFieldVariants['labelPlacement']\n fullWidth?: boolean\n\n defaultValue?: DateRange\n defaultOpen?: boolean\n defaultPlaceholder?: DateValue\n placeholderValue?: DateValue\n minValue?: DateValue\n maxValue?: DateValue\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => boolean\n locale?: string\n granularity?: 'day' | 'hour' | 'minute' | 'second'\n hourCycle?: 12 | 24\n /** Steps for segment keyboard navigation. */\n step?: Partial<Record<'hour' | 'minute' | 'second' | 'millisecond', number>>\n label?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isReadOnly?: boolean\n isRequired?: boolean\n name?: string\n hideTimeZone?: boolean\n visibleMonths?: number\n pageBehavior?: 'visible' | 'single'\n closeOnSelect?: boolean\n modal?: boolean\n /** Text direction. */\n dir?: 'ltr' | 'rtl'\n /** HTML id attribute forwarded to the root DateRangePickerRoot element. */\n id?: string\n /** Marks the field as required. */\n required?: boolean\n /** Use paged navigation. */\n pagedNavigation?: boolean\n /** Day the week starts on. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n /** Format for weekday header cells. */\n weekdayFormat?: 'narrow' | 'short' | 'long'\n /** Always show 6 weeks per month. */\n fixedWeeks?: boolean\n /** Number of months shown in the calendar. */\n numberOfMonths?: number\n /** Prevent deselecting a selected date. */\n preventDeselect?: boolean\n /** Whether a date is highlightable in the range. */\n isDateHighlightable?: (date: DateValue) => boolean\n /** Allow non-contiguous ranges. */\n allowNonContiguousRanges?: boolean\n /** Fix one end of the range. */\n fixedDate?: 'start' | 'end'\n /** Maximum number of days in the range. */\n maximumDays?: number\n /** Render trigger as a different element. */\n triggerAs?: string\n /** Render trigger child as root element. */\n triggerAsChild?: boolean\n /** Portal target for the content. */\n portal?: string | HTMLElement\n /** Force the content to stay mounted. */\n forceMount?: boolean\n /** Side of the anchor the content appears on. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n /** Distance in px from the anchor. */\n sideOffset?: number\n /** Allow flipping to opposite side. */\n sideFlip?: boolean\n /** Alignment of the content relative to the anchor. */\n align?: 'start' | 'center' | 'end'\n /** Offset along the align axis. */\n alignOffset?: number\n /** Allow flipping alignment. */\n alignFlip?: boolean\n /** Avoid collisions with the viewport. */\n avoidCollisions?: boolean\n /** Elements to use as collision boundaries. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Padding for collision detection. */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n /** Padding between arrow and content edge. */\n arrowPadding?: number\n /** Hide the arrow when it is shifted. */\n hideShiftedArrow?: boolean\n /** Sticky behavior when overflowing. */\n sticky?: 'partial' | 'always'\n /** Hide content when anchor is detached. */\n hideWhenDetached?: boolean\n /** CSS position strategy. */\n positionStrategy?: 'fixed' | 'absolute'\n /** When to recalculate position. */\n updatePositionStrategy?: 'always' | 'optimized'\n /** Disable position update on layout shift. */\n disableUpdateOnLayoutShift?: boolean\n /** Prioritize keeping content in viewport. */\n prioritizePosition?: boolean\n /** Virtual reference element for positioning. */\n reference?: object | null\n /** Render content as a different element. */\n contentAs?: string\n /** Render content child as root element. */\n contentAsChild?: boolean\n /** Disable pointer events outside the content. */\n disableOutsidePointerEvents?: boolean\n class?: ClassValue\n /** Per-slot class overrides */\n classNames?: Partial<{\n base: ClassValue\n trigger: ClassValue\n triggerIndicator: ClassValue\n popover: ClassValue\n }>\n}>(), {\n variant: 'flat',\n size: 'md',\n color: 'default',\n labelPlacement: 'inside',\n fullWidth: false,\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n isRequired: false,\n hideTimeZone: false,\n closeOnSelect: true,\n modal: false,\n visibleMonths: 1,\n defaultOpen: false,\n})\n\nconst emit = defineEmits<{\n 'update:placeholder': [value: DateValue | undefined]\n 'update:start-value': [value: DateValue | undefined]\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst modelValue = defineModel<DateRange | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open')\n\nconst slotFns = computed(() => dateRangePickerVariants())\n\n// Sync RangeCalendar's `DateRange | null` v-model with DateRangePicker's model,\n// and close the popover when a complete range is selected (closeOnSelect).\nconst rangeValue = computed<DateRange | null>({\n get: () => modelValue.value ?? null,\n set: (val) => {\n modelValue.value = val ?? null\n if (props.closeOnSelect && val?.start && val?.end) {\n openModel.value = false\n }\n },\n})\n</script>\n\n<template>\n <DateRangePickerRoot\n v-model=\"modelValue\"\n v-model:open=\"openModel\"\n :default-value=\"defaultValue\"\n :default-open=\"defaultOpen\"\n :default-placeholder=\"defaultPlaceholder\"\n :placeholder-value=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-unavailable=\"isDateUnavailable\"\n :is-date-disabled=\"isDateDisabled\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :step=\"step\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :dir=\"dir\"\n :id=\"id\"\n :required=\"required\"\n :paged-navigation=\"pagedNavigation\"\n :week-starts-on=\"weekStartsOn\"\n :weekday-format=\"weekdayFormat\"\n :fixed-weeks=\"fixedWeeks\"\n :number-of-months=\"numberOfMonths ?? visibleMonths\"\n :prevent-deselect=\"preventDeselect\"\n :is-date-highlightable=\"isDateHighlightable\"\n :allow-non-contiguous-ranges=\"allowNonContiguousRanges\"\n :fixed-date=\"fixedDate\"\n :maximum-days=\"maximumDays\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-range-picker\"\n >\n <!-- DateRangeField hosts label/helper/field; trigger sits in its endContent slot -->\n <DateRangeField\n v-model=\"modelValue\"\n :variant=\"variant\"\n :size=\"size\"\n :color=\"color\"\n :label-placement=\"labelPlacement\"\n :full-width=\"fullWidth\"\n :default-value=\"defaultValue\"\n :placeholder-value=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :label=\"label\"\n :description=\"description\"\n :error-message=\"errorMessage\"\n :is-invalid=\"isInvalid\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n :is-required=\"isRequired\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n >\n <template #endContent>\n <DateRangePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n :as=\"triggerAs\"\n :as-child=\"triggerAsChild\"\n aria-label=\"Open date range picker\"\n @mousedown.prevent\n >\n <slot name=\"selectorIcon\">\n <svg\n :class=\"composeClassName(slotFns.triggerIndicator(), props.classNames?.triggerIndicator)\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect\n x=\"3\"\n y=\"4\"\n width=\"18\"\n height=\"18\"\n rx=\"2\"\n ry=\"2\"\n />\n <line\n x1=\"16\"\n y1=\"2\"\n x2=\"16\"\n y2=\"6\"\n />\n <line\n x1=\"8\"\n y1=\"2\"\n x2=\"8\"\n y2=\"6\"\n />\n <line\n x1=\"3\"\n y1=\"10\"\n x2=\"21\"\n y2=\"10\"\n />\n </svg>\n </slot>\n </DateRangePickerTrigger>\n </template>\n </DateRangeField>\n\n <!-- Popover (portaled + positioned by Reka) -->\n <DateRangePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"sideOffset ?? 8\"\n :portal=\"portal != null ? { to: portal } : undefined\"\n :force-mount=\"forceMount\"\n :side=\"side\"\n :side-flip=\"sideFlip\"\n :align=\"align\"\n :align-offset=\"alignOffset\"\n :align-flip=\"alignFlip\"\n :avoid-collisions=\"avoidCollisions\"\n :collision-boundary=\"collisionBoundary\"\n :collision-padding=\"collisionPadding\"\n :arrow-padding=\"arrowPadding\"\n :hide-shifted-arrow=\"hideShiftedArrow\"\n :sticky=\"sticky\"\n :hide-when-detached=\"hideWhenDetached\"\n :position-strategy=\"positionStrategy\"\n :update-position-strategy=\"updatePositionStrategy\"\n :disable-update-on-layout-shift=\"disableUpdateOnLayoutShift\"\n :prioritize-position=\"prioritizePosition\"\n :reference=\"(reference as any)\"\n :as=\"contentAs\"\n :as-child=\"contentAsChild\"\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <slot name=\"calendarTopContent\" />\n\n <RangeCalendar\n v-model=\"rangeValue\"\n :default-placeholder=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-disabled=\"isDateDisabled\"\n :is-date-unavailable=\"isDateUnavailable\"\n :locale=\"locale\"\n :number-of-months=\"visibleMonths\"\n :readonly=\"isReadOnly\"\n :disabled=\"isDisabled\"\n />\n\n <slot name=\"calendarBottomContent\" />\n </DateRangePickerContent>\n </DateRangePickerRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,QAAA;OAClB,UAAU,QAAA;OACV,UAAU,QAAA;;;;;;;;;;;;;MAGb,WAAqC,KAAA,QAAA,wBAAA"}
|
|
1
|
+
{"version":3,"file":"DateRangePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/date-range-picker/DateRangePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n DateRangePickerRoot,\n DateRangePickerTrigger,\n DateRangePickerContent,\n} from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport { dateRangePickerVariants, type DateRangeFieldVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport RangeCalendar from '../range-calendar/RangeCalendar.vue'\nimport DateRangeField from '../date-range-field/DateRangeField.vue'\n\nexport interface DateRange {\n start: DateValue\n end: DateValue\n}\n\nconst props = withDefaults(defineProps<{\n /* Field appearance — forwarded to DateRangeField */\n variant?: DateRangeFieldVariants['variant']\n size?: DateRangeFieldVariants['size']\n color?: DateRangeFieldVariants['color']\n labelPlacement?: DateRangeFieldVariants['labelPlacement']\n fullWidth?: boolean\n\n defaultValue?: DateRange\n defaultOpen?: boolean\n defaultPlaceholder?: DateValue\n placeholderValue?: DateValue\n minValue?: DateValue\n maxValue?: DateValue\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => boolean\n locale?: string\n granularity?: 'day' | 'hour' | 'minute' | 'second'\n hourCycle?: 12 | 24\n /** Steps for segment keyboard navigation. */\n step?: Partial<Record<'hour' | 'minute' | 'second' | 'millisecond', number>>\n label?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isReadOnly?: boolean\n isRequired?: boolean\n name?: string\n hideTimeZone?: boolean\n visibleMonths?: number\n pageBehavior?: 'visible' | 'single'\n closeOnSelect?: boolean\n modal?: boolean\n /** Text direction. */\n dir?: 'ltr' | 'rtl'\n /** HTML id attribute forwarded to the root DateRangePickerRoot element. */\n id?: string\n /** Marks the field as required. */\n required?: boolean\n /** Use paged navigation. */\n pagedNavigation?: boolean\n /** Day the week starts on. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n /** Format for weekday header cells. */\n weekdayFormat?: 'narrow' | 'short' | 'long'\n /** Always show 6 weeks per month. */\n fixedWeeks?: boolean\n /** Number of months shown in the calendar. */\n numberOfMonths?: number\n /** Prevent deselecting a selected date. */\n preventDeselect?: boolean\n /** Whether a date is highlightable in the range. */\n isDateHighlightable?: (date: DateValue) => boolean\n /** Allow non-contiguous ranges. */\n allowNonContiguousRanges?: boolean\n /** Fix one end of the range. */\n fixedDate?: 'start' | 'end'\n /** Maximum number of days in the range. */\n maximumDays?: number\n /** Render trigger as a different element. */\n triggerAs?: string\n /** Render trigger child as root element. */\n triggerAsChild?: boolean\n /** Portal target for the content. */\n portal?: string | HTMLElement\n /** Force the content to stay mounted. */\n forceMount?: boolean\n /** Side of the anchor the content appears on. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n /** Distance in px from the anchor. */\n sideOffset?: number\n /** Allow flipping to opposite side. */\n sideFlip?: boolean\n /** Alignment of the content relative to the anchor. */\n align?: 'start' | 'center' | 'end'\n /** Offset along the align axis. */\n alignOffset?: number\n /** Allow flipping alignment. */\n alignFlip?: boolean\n /** Avoid collisions with the viewport. */\n avoidCollisions?: boolean\n /** Elements to use as collision boundaries. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Padding for collision detection. */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n /** Padding between arrow and content edge. */\n arrowPadding?: number\n /** Hide the arrow when it is shifted. */\n hideShiftedArrow?: boolean\n /** Sticky behavior when overflowing. */\n sticky?: 'partial' | 'always'\n /** Hide content when anchor is detached. */\n hideWhenDetached?: boolean\n /** CSS position strategy. */\n positionStrategy?: 'fixed' | 'absolute'\n /** When to recalculate position. */\n updatePositionStrategy?: 'always' | 'optimized'\n /** Disable position update on layout shift. */\n disableUpdateOnLayoutShift?: boolean\n /** Prioritize keeping content in viewport. */\n prioritizePosition?: boolean\n /** Virtual reference element for positioning. */\n reference?: object | null\n /** Render content as a different element. */\n contentAs?: string\n /** Render content child as root element. */\n contentAsChild?: boolean\n /** Disable pointer events outside the content. */\n disableOutsidePointerEvents?: boolean\n class?: ClassValue\n /** Per-slot class overrides */\n classNames?: Partial<{\n base: ClassValue\n trigger: ClassValue\n triggerIndicator: ClassValue\n popover: ClassValue\n }>\n}>(), {\n variant: 'flat',\n size: 'md',\n color: 'default',\n labelPlacement: 'inside',\n fullWidth: false,\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n isRequired: false,\n hideTimeZone: false,\n closeOnSelect: true,\n modal: false,\n visibleMonths: 1,\n defaultOpen: false,\n avoidCollisions: true,\n collisionPadding: 8,\n prioritizePosition: true,\n})\n\nconst emit = defineEmits<{\n 'update:placeholder': [value: DateValue | undefined]\n 'update:start-value': [value: DateValue | undefined]\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst modelValue = defineModel<DateRange | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open')\n\nconst slotFns = computed(() => dateRangePickerVariants())\n\n// Sync RangeCalendar's `DateRange | null` v-model with DateRangePicker's model,\n// and close the popover when a complete range is selected (closeOnSelect).\nconst rangeValue = computed<DateRange | null>({\n get: () => modelValue.value ?? null,\n set: (val) => {\n modelValue.value = val ?? null\n if (props.closeOnSelect && val?.start && val?.end) {\n openModel.value = false\n }\n },\n})\n</script>\n\n<template>\n <DateRangePickerRoot\n v-model=\"modelValue\"\n v-model:open=\"openModel\"\n :default-value=\"defaultValue\"\n :default-open=\"defaultOpen\"\n :default-placeholder=\"defaultPlaceholder\"\n :placeholder-value=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-unavailable=\"isDateUnavailable\"\n :is-date-disabled=\"isDateDisabled\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :step=\"step\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :dir=\"dir\"\n :id=\"id\"\n :required=\"required\"\n :paged-navigation=\"pagedNavigation\"\n :week-starts-on=\"weekStartsOn\"\n :weekday-format=\"weekdayFormat\"\n :fixed-weeks=\"fixedWeeks\"\n :number-of-months=\"numberOfMonths ?? visibleMonths\"\n :prevent-deselect=\"preventDeselect\"\n :is-date-highlightable=\"isDateHighlightable\"\n :allow-non-contiguous-ranges=\"allowNonContiguousRanges\"\n :fixed-date=\"fixedDate\"\n :maximum-days=\"maximumDays\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-range-picker\"\n >\n <!-- DateRangeField hosts label/helper/field; trigger sits in its endContent slot -->\n <DateRangeField\n v-model=\"modelValue\"\n :variant=\"variant\"\n :size=\"size\"\n :color=\"color\"\n :label-placement=\"labelPlacement\"\n :full-width=\"fullWidth\"\n :default-value=\"defaultValue\"\n :placeholder-value=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :label=\"label\"\n :description=\"description\"\n :error-message=\"errorMessage\"\n :is-invalid=\"isInvalid\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n :is-required=\"isRequired\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n >\n <template #endContent>\n <DateRangePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n :as=\"triggerAs\"\n :as-child=\"triggerAsChild\"\n aria-label=\"Open date range picker\"\n @mousedown.prevent\n >\n <slot name=\"selectorIcon\">\n <svg\n :class=\"composeClassName(slotFns.triggerIndicator(), props.classNames?.triggerIndicator)\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect\n x=\"3\"\n y=\"4\"\n width=\"18\"\n height=\"18\"\n rx=\"2\"\n ry=\"2\"\n />\n <line\n x1=\"16\"\n y1=\"2\"\n x2=\"16\"\n y2=\"6\"\n />\n <line\n x1=\"8\"\n y1=\"2\"\n x2=\"8\"\n y2=\"6\"\n />\n <line\n x1=\"3\"\n y1=\"10\"\n x2=\"21\"\n y2=\"10\"\n />\n </svg>\n </slot>\n </DateRangePickerTrigger>\n </template>\n </DateRangeField>\n\n <!-- Popover (portaled + positioned by Reka) -->\n <DateRangePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"sideOffset ?? 8\"\n :portal=\"portal != null ? { to: portal } : undefined\"\n :force-mount=\"forceMount\"\n :side=\"side\"\n :side-flip=\"sideFlip\"\n :align=\"align\"\n :align-offset=\"alignOffset\"\n :align-flip=\"alignFlip\"\n :avoid-collisions=\"avoidCollisions\"\n :collision-boundary=\"collisionBoundary\"\n :collision-padding=\"collisionPadding\"\n :arrow-padding=\"arrowPadding\"\n :hide-shifted-arrow=\"hideShiftedArrow\"\n :sticky=\"sticky\"\n :hide-when-detached=\"hideWhenDetached\"\n :position-strategy=\"positionStrategy\"\n :update-position-strategy=\"updatePositionStrategy\"\n :disable-update-on-layout-shift=\"disableUpdateOnLayoutShift\"\n :prioritize-position=\"prioritizePosition\"\n :reference=\"(reference as any)\"\n :as=\"contentAs\"\n :as-child=\"contentAsChild\"\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <slot name=\"calendarTopContent\" />\n\n <RangeCalendar\n v-model=\"rangeValue\"\n :default-placeholder=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-disabled=\"isDateDisabled\"\n :is-date-unavailable=\"isDateUnavailable\"\n :locale=\"locale\"\n :number-of-months=\"visibleMonths\"\n :readonly=\"isReadOnly\"\n :disabled=\"isDisabled\"\n />\n\n <slot name=\"calendarBottomContent\" />\n </DateRangePickerContent>\n </DateRangePickerRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ;EA0Id,MAAM,OAAO;EAWb,MAAM,aAAa,SAAyC,SAAC,aAAY;EACzE,MAAM,YAAY,SAAoB,SAAC,OAAM;EAE7C,MAAM,UAAU,eAAe,yBAAyB,CAAA;EAIxD,MAAM,aAAa,SAA2B;GAC5C,WAAW,WAAW,SAAS;GAC/B,MAAM,QAAQ;AACZ,eAAW,QAAQ,OAAO;AAC1B,QAAI,MAAM,iBAAiB,KAAK,SAAS,KAAK,IAC5C,WAAU,QAAQ;;GAGvB,CAAA;;uBAIC,YAqKsB,MAAA,oBAAA,EAAA;gBApKX,WAAA;4EAAU,QAAA;IACX,MAAM,UAAA;uEAAS,QAAA;IACtB,iBAAe,QAAA;IACf,gBAAc,QAAA;IACd,uBAAqB,QAAA;IACrB,qBAAmB,QAAA;IACnB,aAAW,QAAA;IACX,aAAW,QAAA;IACX,uBAAqB,QAAA;IACrB,oBAAkB,QAAA;IAClB,QAAQ,QAAA;IACR,aAAa,QAAA;IACb,cAAY,QAAA;IACZ,MAAM,QAAA;IACN,UA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AA,MAAA,WAAE,KAAI,wBAAyB,OAAM;KACzD,gBAAa,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,iBAAkB,OAAM;KAC3C,mBAAgB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,oBAAqB,OAAM;KACjD,iBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,mBAAoB,OAAM;KAC/C,kBAAgB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,oBAAqB,OAAM;;4BAEhB;MAAlC,WAAkC,KAAA,QAAA,qBAAA;MAElC,YAWE,uBAAA;mBAVS,WAAA;+EAAU,QAAA;OAClB,uBAAqB,QAAA;OACrB,aAAW,QAAA;OACX,aAAW,QAAA;OACX,oBAAkB,QAAA;OAClB,uBAAqB,QAAA;OACrB,QAAQ,QAAA;OACR,oBAAkB,QAAA;OAClB,UAAU,QAAA;OACV,UAAU,QAAA;;;;;;;;;;;;;MAGb,WAAqC,KAAA,QAAA,wBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.js","names":[],"sources":["../../../src/components/date-time-picker/DateTimePicker.vue"],"sourcesContent":["<!-- packages/vue/src/components/date-time-picker/DateTimePicker.vue -->\n<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from 'vue'\nimport {\n DatePickerRoot,\n DatePickerTrigger,\n DatePickerContent,\n} from 'reka-ui'\nimport {\n type DateValue,\n CalendarDateTime,\n toCalendarDate,\n today,\n getLocalTimeZone,\n} from '@internationalized/date'\nimport { dateTimePickerVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport Calendar from '../calendar/Calendar.vue'\nimport DateInput from '../date-input/DateInput.vue'\nimport DateTimePickerTimeScroller from './DateTimePickerTimeScroller.vue'\nimport Button from '../button/Button.vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n variant?: 'flat' | 'bordered' | 'faded' | 'underlined'\n size?: 'sm' | 'md' | 'lg'\n color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'\n labelPlacement?: 'inside' | 'outside' | 'outside-left'\n fullWidth?: boolean\n label?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isReadOnly?: boolean\n isRequired?: boolean\n name?: string\n class?: ClassValue\n /** Override classes for individual slots */\n classNames?: Partial<{\n base: ClassValue\n trigger: ClassValue\n triggerIndicator: ClassValue\n popover: ClassValue\n panel: ClassValue\n divider: ClassValue\n }>\n granularity?: 'minute' | 'second'\n hourCycle?: 12 | 24\n hideTimeZone?: boolean\n defaultOpen?: boolean\n closeOnSelect?: boolean\n /** Label for the footer button that closes the picker. */\n doneLabel?: string\n locale?: string\n defaultValue?: CalendarDateTime\n /** Initial placeholder date for the calendar. */\n defaultPlaceholder?: DateValue\n /** Controlled placeholder date. */\n placeholder?: DateValue\n minValue?: CalendarDateTime\n maxValue?: CalendarDateTime\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => boolean\n /** Steps for segment keyboard navigation. */\n step?: Partial<Record<'hour' | 'minute' | 'second' | 'millisecond', number>>\n /** Text direction. */\n dir?: 'ltr' | 'rtl'\n /** HTML id attribute forwarded to the root element. */\n id?: string\n /** Whether the calendar popover is modal (traps focus). */\n modal?: boolean\n /** Marks the field as required. */\n required?: boolean\n /** Use paged navigation in the calendar. */\n pagedNavigation?: boolean\n /** Day the week starts on. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n /** Format for weekday header cells. */\n weekdayFormat?: 'narrow' | 'short' | 'long'\n /** Always show 6 weeks per month. */\n fixedWeeks?: boolean\n /** Number of months shown in the calendar. */\n numberOfMonths?: number\n /** Prevent deselecting a selected date. */\n preventDeselect?: boolean\n /** Render trigger as a different element. */\n triggerAs?: string\n /** Render trigger child as root element. */\n triggerAsChild?: boolean\n /** Portal target for the content. */\n portal?: string | HTMLElement\n /** Force the content to stay mounted. */\n forceMount?: boolean\n /** Side of the anchor the content appears on. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n /** Distance in px from the anchor. */\n sideOffset?: number\n /** Allow flipping to opposite side. */\n sideFlip?: boolean\n /** Alignment of the content relative to the anchor. */\n align?: 'start' | 'center' | 'end'\n /** Offset along the align axis. */\n alignOffset?: number\n /** Allow flipping alignment. */\n alignFlip?: boolean\n /** Avoid collisions with the viewport. */\n avoidCollisions?: boolean\n /** Elements to use as collision boundaries. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Padding for collision detection. */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n /** Padding between arrow and content edge. */\n arrowPadding?: number\n /** Hide the arrow when it is shifted. */\n hideShiftedArrow?: boolean\n /** Sticky behavior when overflowing. */\n sticky?: 'partial' | 'always'\n /** Hide content when anchor is detached. */\n hideWhenDetached?: boolean\n /** CSS position strategy. */\n positionStrategy?: 'fixed' | 'absolute'\n /** When to recalculate position. */\n updatePositionStrategy?: 'always' | 'optimized'\n /** Disable position update on layout shift. */\n disableUpdateOnLayoutShift?: boolean\n /** Prioritize keeping content in viewport. */\n prioritizePosition?: boolean\n /** Virtual reference element for positioning. */\n reference?: object | null\n /** Render content as a different element. */\n contentAs?: string\n /** Render content child as root element. */\n contentAsChild?: boolean\n /** Disable pointer events outside the content. */\n disableOutsidePointerEvents?: boolean\n}>(), {\n size: 'md',\n color: 'default',\n labelPlacement: 'inside',\n fullWidth: false,\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n isRequired: false,\n hideTimeZone: false,\n granularity: 'minute',\n defaultOpen: false,\n closeOnSelect: true,\n doneLabel: 'Done',\n})\n\nconst emit = defineEmits<{\n 'update:placeholder': [value: DateValue | undefined]\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst modelValue = defineModel<CalendarDateTime | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open', { default: undefined })\n\n// Seed controlled open state from defaultOpen so portal renders in uncontrolled mode too\nif (props.defaultOpen && openModel.value === undefined) {\n openModel.value = true\n}\n\n// Seed controlled value from defaultValue so DateFieldRoot is always in controlled\n// mode from the start. Without this, an uncontrolled→controlled transition\n// happens mid-lifecycle and Reka's DateFieldRoot won't re-render segments.\nif (modelValue.value == null && props.defaultValue != null) {\n modelValue.value = props.defaultValue\n}\n\n// Internal working value — always a CalendarDateTime, never null/undefined.\nconst _today = today(getLocalTimeZone())\nconst internalValue = shallowRef<CalendarDateTime>(\n modelValue.value ?? props.defaultValue ?? new CalendarDateTime(_today.year, _today.month, _today.day, 0, 0),\n)\n\n// Sync inbound: parent resets the value → update internalValue.\n// Guard on CalendarDateTime: ignore CalendarDate emits (no time info).\nwatch(modelValue, (v) => {\n if (v instanceof CalendarDateTime) internalValue.value = v\n})\n\n// Route segment edits from DateInput back to both internalValue and modelValue.\n// DateInput is bound to internalValue (not modelValue) so this is the only place\n// that propagates user-typed changes outward.\nfunction onInputChange(v: DateValue | null | undefined) {\n if (!(v instanceof CalendarDateTime)) return\n internalValue.value = v\n modelValue.value = v\n}\n\n// ─── Calendar value sync ─────────────────────────────────────────────────\n\nconst calendarValue = computed<DateValue | undefined>({\n // Pass CalendarDate to CalendarRoot — Reka always emits CalendarDate from\n // onDateChange. The setter reconstructs the full CalendarDateTime.\n get: () => toCalendarDate(internalValue.value),\n set: (val) => {\n if (!val) return\n internalValue.value = internalValue.value.set({\n year: val.year,\n month: val.month,\n day: val.day,\n })\n modelValue.value = internalValue.value\n },\n})\n\n// ─── Time update ─────────────────────────────────────────────────────────\n\nfunction onTimeUpdate(val: CalendarDateTime) {\n internalValue.value = val\n modelValue.value = val\n}\n\n// ─── Styles ──────────────────────────────────────────────────────────────\n\nconst slotFns = computed(() =>\n dateTimePickerVariants({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n fullWidth: props.fullWidth,\n }),\n)\n</script>\n\n<template>\n <DatePickerRoot\n v-model=\"modelValue\"\n v-model:open=\"openModel\"\n :default-value=\"defaultValue\"\n :default-open=\"defaultOpen\"\n :default-placeholder=\"defaultPlaceholder\"\n :placeholder=\"placeholder\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-unavailable=\"isDateUnavailable\"\n :is-date-disabled=\"isDateDisabled\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :step=\"step\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :dir=\"dir\"\n :id=\"id\"\n :required=\"required\"\n :modal=\"modal\"\n :paged-navigation=\"pagedNavigation\"\n :week-starts-on=\"weekStartsOn\"\n :weekday-format=\"weekdayFormat\"\n :fixed-weeks=\"fixedWeeks\"\n :number-of-months=\"numberOfMonths\"\n :prevent-deselect=\"preventDeselect\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-time-picker\"\n >\n <DateInput\n :model-value=\"internalValue\"\n :variant=\"variant\"\n :size=\"size\"\n :color=\"color\"\n :label-placement=\"labelPlacement\"\n :full-width=\"fullWidth\"\n :default-value=\"defaultValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :label=\"label\"\n :description=\"description\"\n :error-message=\"errorMessage\"\n :is-invalid=\"isInvalid\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n :is-required=\"isRequired\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n @update:model-value=\"onInputChange\"\n >\n <template #endContent>\n <DatePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n :as=\"triggerAs\"\n :as-child=\"triggerAsChild\"\n aria-label=\"Open date time picker\"\n @mousedown.prevent\n >\n <slot name=\"selectorIcon\">\n <svg\n :class=\"composeClassName(slotFns.triggerIndicator(), props.classNames?.triggerIndicator)\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect\n x=\"3\"\n y=\"4\"\n width=\"18\"\n height=\"18\"\n rx=\"2\"\n ry=\"2\"\n />\n <line\n x1=\"16\"\n y1=\"2\"\n x2=\"16\"\n y2=\"6\"\n />\n <line\n x1=\"8\"\n y1=\"2\"\n x2=\"8\"\n y2=\"6\"\n />\n <line\n x1=\"3\"\n y1=\"10\"\n x2=\"21\"\n y2=\"10\"\n />\n </svg>\n </slot>\n </DatePickerTrigger>\n </template>\n </DateInput>\n\n <DatePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"sideOffset ?? 8\"\n :portal=\"portal != null ? { to: portal } : undefined\"\n :force-mount=\"forceMount\"\n :side=\"side\"\n :side-flip=\"sideFlip\"\n :align=\"align\"\n :align-offset=\"alignOffset\"\n :align-flip=\"alignFlip\"\n :avoid-collisions=\"avoidCollisions\"\n :collision-boundary=\"collisionBoundary\"\n :collision-padding=\"collisionPadding\"\n :arrow-padding=\"arrowPadding\"\n :hide-shifted-arrow=\"hideShiftedArrow\"\n :sticky=\"sticky\"\n :hide-when-detached=\"hideWhenDetached\"\n :position-strategy=\"positionStrategy\"\n :update-position-strategy=\"updatePositionStrategy\"\n :disable-update-on-layout-shift=\"disableUpdateOnLayoutShift\"\n :prioritize-position=\"prioritizePosition\"\n :reference=\"(reference as any)\"\n :as=\"contentAs\"\n :as-child=\"contentAsChild\"\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <div\n :class=\"composeClassName(slotFns.panel(), props.classNames?.panel)\"\n data-slot=\"panel\"\n >\n <!-- Wrapper keeps Calendar's multiple view roots (date grid, month\n picker, year picker) as ONE flex child. Without it, the panel's\n flex layout spreads those sibling roots into separate columns and\n the inactive (empty) root shows as a blank box. -->\n <div\n :class=\"slotFns.calendarPane()\"\n data-slot=\"calendar-pane\"\n >\n <Calendar\n v-model=\"calendarValue\"\n :default-value=\"defaultValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-disabled=\"isDateDisabled\"\n :is-date-unavailable=\"isDateUnavailable\"\n :locale=\"locale\"\n :readonly=\"isReadOnly\"\n :disabled=\"isDisabled\"\n />\n </div>\n\n <div\n :class=\"composeClassName(slotFns.divider(), props.classNames?.divider)\"\n data-slot=\"divider\"\n aria-hidden=\"true\"\n />\n\n <!-- Time column: wheels on top, Done button pinned to the bottom so it\n lines up with the calendar's bottom edge. Selection is already live,\n so Done just closes the popover for users who miss click-outside. -->\n <div\n :class=\"slotFns.timePane()\"\n data-slot=\"time-pane\"\n >\n <DateTimePickerTimeScroller\n :model-value=\"internalValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n @update:model-value=\"onTimeUpdate\"\n />\n\n <div\n :class=\"slotFns.timeDone()\"\n data-slot=\"time-done\"\n >\n <slot name=\"footer\" :close=\"() => { openModel = false }\">\n <Button\n size=\"sm\"\n color=\"primary\"\n data-slot=\"done-button\"\n @click=\"openModel = false\"\n >\n {{ doneLabel }}\n </Button>\n </slot>\n </div>\n </div>\n </div>\n </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DateTimePicker.js","names":[],"sources":["../../../src/components/date-time-picker/DateTimePicker.vue"],"sourcesContent":["<!-- packages/vue/src/components/date-time-picker/DateTimePicker.vue -->\n<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from 'vue'\nimport {\n DatePickerRoot,\n DatePickerTrigger,\n DatePickerContent,\n} from 'reka-ui'\nimport {\n type DateValue,\n CalendarDateTime,\n toCalendarDate,\n today,\n getLocalTimeZone,\n} from '@internationalized/date'\nimport { dateTimePickerVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport Calendar from '../calendar/Calendar.vue'\nimport DateInput from '../date-input/DateInput.vue'\nimport DateTimePickerTimeScroller from './DateTimePickerTimeScroller.vue'\nimport Button from '../button/Button.vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n variant?: 'flat' | 'bordered' | 'faded' | 'underlined'\n size?: 'sm' | 'md' | 'lg'\n color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'\n labelPlacement?: 'inside' | 'outside' | 'outside-left'\n fullWidth?: boolean\n label?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isReadOnly?: boolean\n isRequired?: boolean\n name?: string\n class?: ClassValue\n /** Override classes for individual slots */\n classNames?: Partial<{\n base: ClassValue\n trigger: ClassValue\n triggerIndicator: ClassValue\n popover: ClassValue\n panel: ClassValue\n divider: ClassValue\n }>\n granularity?: 'minute' | 'second'\n hourCycle?: 12 | 24\n hideTimeZone?: boolean\n defaultOpen?: boolean\n closeOnSelect?: boolean\n /** Label for the footer button that closes the picker. */\n doneLabel?: string\n locale?: string\n defaultValue?: CalendarDateTime\n /** Initial placeholder date for the calendar. */\n defaultPlaceholder?: DateValue\n /** Controlled placeholder date. */\n placeholder?: DateValue\n minValue?: CalendarDateTime\n maxValue?: CalendarDateTime\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => boolean\n /** Steps for segment keyboard navigation. */\n step?: Partial<Record<'hour' | 'minute' | 'second' | 'millisecond', number>>\n /** Text direction. */\n dir?: 'ltr' | 'rtl'\n /** HTML id attribute forwarded to the root element. */\n id?: string\n /** Whether the calendar popover is modal (traps focus). */\n modal?: boolean\n /** Marks the field as required. */\n required?: boolean\n /** Use paged navigation in the calendar. */\n pagedNavigation?: boolean\n /** Day the week starts on. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n /** Format for weekday header cells. */\n weekdayFormat?: 'narrow' | 'short' | 'long'\n /** Always show 6 weeks per month. */\n fixedWeeks?: boolean\n /** Number of months shown in the calendar. */\n numberOfMonths?: number\n /** Prevent deselecting a selected date. */\n preventDeselect?: boolean\n /** Render trigger as a different element. */\n triggerAs?: string\n /** Render trigger child as root element. */\n triggerAsChild?: boolean\n /** Portal target for the content. */\n portal?: string | HTMLElement\n /** Force the content to stay mounted. */\n forceMount?: boolean\n /** Side of the anchor the content appears on. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n /** Distance in px from the anchor. */\n sideOffset?: number\n /** Allow flipping to opposite side. */\n sideFlip?: boolean\n /** Alignment of the content relative to the anchor. */\n align?: 'start' | 'center' | 'end'\n /** Offset along the align axis. */\n alignOffset?: number\n /** Allow flipping alignment. */\n alignFlip?: boolean\n /** Avoid collisions with the viewport. */\n avoidCollisions?: boolean\n /** Elements to use as collision boundaries. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Padding for collision detection. */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n /** Padding between arrow and content edge. */\n arrowPadding?: number\n /** Hide the arrow when it is shifted. */\n hideShiftedArrow?: boolean\n /** Sticky behavior when overflowing. */\n sticky?: 'partial' | 'always'\n /** Hide content when anchor is detached. */\n hideWhenDetached?: boolean\n /** CSS position strategy. */\n positionStrategy?: 'fixed' | 'absolute'\n /** When to recalculate position. */\n updatePositionStrategy?: 'always' | 'optimized'\n /** Disable position update on layout shift. */\n disableUpdateOnLayoutShift?: boolean\n /** Prioritize keeping content in viewport. */\n prioritizePosition?: boolean\n /** Virtual reference element for positioning. */\n reference?: object | null\n /** Render content as a different element. */\n contentAs?: string\n /** Render content child as root element. */\n contentAsChild?: boolean\n /** Disable pointer events outside the content. */\n disableOutsidePointerEvents?: boolean\n}>(), {\n size: 'md',\n color: 'default',\n labelPlacement: 'inside',\n fullWidth: false,\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n isRequired: false,\n hideTimeZone: false,\n granularity: 'minute',\n defaultOpen: false,\n closeOnSelect: true,\n doneLabel: 'Done',\n avoidCollisions: true,\n collisionPadding: 8,\n prioritizePosition: true,\n})\n\nconst emit = defineEmits<{\n 'update:placeholder': [value: DateValue | undefined]\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst modelValue = defineModel<CalendarDateTime | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open', { default: undefined })\n\n// Seed controlled open state from defaultOpen so portal renders in uncontrolled mode too\nif (props.defaultOpen && openModel.value === undefined) {\n openModel.value = true\n}\n\n// Seed controlled value from defaultValue so DateFieldRoot is always in controlled\n// mode from the start. Without this, an uncontrolled→controlled transition\n// happens mid-lifecycle and Reka's DateFieldRoot won't re-render segments.\nif (modelValue.value == null && props.defaultValue != null) {\n modelValue.value = props.defaultValue\n}\n\n// Internal working value — always a CalendarDateTime, never null/undefined.\nconst _today = today(getLocalTimeZone())\nconst internalValue = shallowRef<CalendarDateTime>(\n modelValue.value ?? props.defaultValue ?? new CalendarDateTime(_today.year, _today.month, _today.day, 0, 0),\n)\n\n// Sync inbound: parent resets the value → update internalValue.\n// Guard on CalendarDateTime: ignore CalendarDate emits (no time info).\nwatch(modelValue, (v) => {\n if (v instanceof CalendarDateTime) internalValue.value = v\n})\n\n// Route segment edits from DateInput back to both internalValue and modelValue.\n// DateInput is bound to internalValue (not modelValue) so this is the only place\n// that propagates user-typed changes outward.\nfunction onInputChange(v: DateValue | null | undefined) {\n if (!(v instanceof CalendarDateTime)) return\n internalValue.value = v\n modelValue.value = v\n}\n\n// ─── Calendar value sync ─────────────────────────────────────────────────\n\nconst calendarValue = computed<DateValue | undefined>({\n // Pass CalendarDate to CalendarRoot — Reka always emits CalendarDate from\n // onDateChange. The setter reconstructs the full CalendarDateTime.\n get: () => toCalendarDate(internalValue.value),\n set: (val) => {\n if (!val) return\n internalValue.value = internalValue.value.set({\n year: val.year,\n month: val.month,\n day: val.day,\n })\n modelValue.value = internalValue.value\n },\n})\n\n// ─── Time update ─────────────────────────────────────────────────────────\n\nfunction onTimeUpdate(val: CalendarDateTime) {\n internalValue.value = val\n modelValue.value = val\n}\n\n// ─── Styles ──────────────────────────────────────────────────────────────\n\nconst slotFns = computed(() =>\n dateTimePickerVariants({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n fullWidth: props.fullWidth,\n }),\n)\n</script>\n\n<template>\n <DatePickerRoot\n v-model=\"modelValue\"\n v-model:open=\"openModel\"\n :default-value=\"defaultValue\"\n :default-open=\"defaultOpen\"\n :default-placeholder=\"defaultPlaceholder\"\n :placeholder=\"placeholder\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-unavailable=\"isDateUnavailable\"\n :is-date-disabled=\"isDateDisabled\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :step=\"step\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :dir=\"dir\"\n :id=\"id\"\n :required=\"required\"\n :modal=\"modal\"\n :paged-navigation=\"pagedNavigation\"\n :week-starts-on=\"weekStartsOn\"\n :weekday-format=\"weekdayFormat\"\n :fixed-weeks=\"fixedWeeks\"\n :number-of-months=\"numberOfMonths\"\n :prevent-deselect=\"preventDeselect\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-time-picker\"\n >\n <DateInput\n :model-value=\"internalValue\"\n :variant=\"variant\"\n :size=\"size\"\n :color=\"color\"\n :label-placement=\"labelPlacement\"\n :full-width=\"fullWidth\"\n :default-value=\"defaultValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :label=\"label\"\n :description=\"description\"\n :error-message=\"errorMessage\"\n :is-invalid=\"isInvalid\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n :is-required=\"isRequired\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n @update:model-value=\"onInputChange\"\n >\n <template #endContent>\n <DatePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n :as=\"triggerAs\"\n :as-child=\"triggerAsChild\"\n aria-label=\"Open date time picker\"\n @mousedown.prevent\n >\n <slot name=\"selectorIcon\">\n <svg\n :class=\"composeClassName(slotFns.triggerIndicator(), props.classNames?.triggerIndicator)\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect\n x=\"3\"\n y=\"4\"\n width=\"18\"\n height=\"18\"\n rx=\"2\"\n ry=\"2\"\n />\n <line\n x1=\"16\"\n y1=\"2\"\n x2=\"16\"\n y2=\"6\"\n />\n <line\n x1=\"8\"\n y1=\"2\"\n x2=\"8\"\n y2=\"6\"\n />\n <line\n x1=\"3\"\n y1=\"10\"\n x2=\"21\"\n y2=\"10\"\n />\n </svg>\n </slot>\n </DatePickerTrigger>\n </template>\n </DateInput>\n\n <DatePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"sideOffset ?? 8\"\n :portal=\"portal != null ? { to: portal } : undefined\"\n :force-mount=\"forceMount\"\n :side=\"side\"\n :side-flip=\"sideFlip\"\n :align=\"align\"\n :align-offset=\"alignOffset\"\n :align-flip=\"alignFlip\"\n :avoid-collisions=\"avoidCollisions\"\n :collision-boundary=\"collisionBoundary\"\n :collision-padding=\"collisionPadding\"\n :arrow-padding=\"arrowPadding\"\n :hide-shifted-arrow=\"hideShiftedArrow\"\n :sticky=\"sticky\"\n :hide-when-detached=\"hideWhenDetached\"\n :position-strategy=\"positionStrategy\"\n :update-position-strategy=\"updatePositionStrategy\"\n :disable-update-on-layout-shift=\"disableUpdateOnLayoutShift\"\n :prioritize-position=\"prioritizePosition\"\n :reference=\"(reference as any)\"\n :as=\"contentAs\"\n :as-child=\"contentAsChild\"\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <div\n :class=\"composeClassName(slotFns.panel(), props.classNames?.panel)\"\n data-slot=\"panel\"\n >\n <!-- Wrapper keeps Calendar's multiple view roots (date grid, month\n picker, year picker) as ONE flex child. Without it, the panel's\n flex layout spreads those sibling roots into separate columns and\n the inactive (empty) root shows as a blank box. -->\n <div\n :class=\"slotFns.calendarPane()\"\n data-slot=\"calendar-pane\"\n >\n <Calendar\n v-model=\"calendarValue\"\n :default-value=\"defaultValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-disabled=\"isDateDisabled\"\n :is-date-unavailable=\"isDateUnavailable\"\n :locale=\"locale\"\n :readonly=\"isReadOnly\"\n :disabled=\"isDisabled\"\n />\n </div>\n\n <div\n :class=\"composeClassName(slotFns.divider(), props.classNames?.divider)\"\n data-slot=\"divider\"\n aria-hidden=\"true\"\n />\n\n <!-- Time column: wheels on top, Done button pinned to the bottom so it\n lines up with the calendar's bottom edge. Selection is already live,\n so Done just closes the popover for users who miss click-outside. -->\n <div\n :class=\"slotFns.timePane()\"\n data-slot=\"time-pane\"\n >\n <DateTimePickerTimeScroller\n :model-value=\"internalValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n @update:model-value=\"onTimeUpdate\"\n />\n\n <div\n :class=\"slotFns.timeDone()\"\n data-slot=\"time-done\"\n >\n <slot name=\"footer\" :close=\"() => { openModel = false }\">\n <Button\n size=\"sm\"\n color=\"primary\"\n data-slot=\"done-button\"\n @click=\"openModel = false\"\n >\n {{ doneLabel }}\n </Button>\n </slot>\n </div>\n </div>\n </div>\n </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":""}
|
package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -94,9 +94,12 @@ var DateTimePicker_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
94
94
|
align: {},
|
|
95
95
|
alignOffset: {},
|
|
96
96
|
alignFlip: { type: Boolean },
|
|
97
|
-
avoidCollisions: {
|
|
97
|
+
avoidCollisions: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: true
|
|
100
|
+
},
|
|
98
101
|
collisionBoundary: {},
|
|
99
|
-
collisionPadding: {},
|
|
102
|
+
collisionPadding: { default: 8 },
|
|
100
103
|
arrowPadding: {},
|
|
101
104
|
hideShiftedArrow: { type: Boolean },
|
|
102
105
|
sticky: {},
|
|
@@ -104,7 +107,10 @@ var DateTimePicker_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
104
107
|
positionStrategy: {},
|
|
105
108
|
updatePositionStrategy: {},
|
|
106
109
|
disableUpdateOnLayoutShift: { type: Boolean },
|
|
107
|
-
prioritizePosition: {
|
|
110
|
+
prioritizePosition: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: true
|
|
113
|
+
},
|
|
108
114
|
reference: {},
|
|
109
115
|
contentAs: {},
|
|
110
116
|
contentAsChild: { type: Boolean },
|
package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/date-time-picker/DateTimePicker.vue"],"sourcesContent":["<!-- packages/vue/src/components/date-time-picker/DateTimePicker.vue -->\n<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from 'vue'\nimport {\n DatePickerRoot,\n DatePickerTrigger,\n DatePickerContent,\n} from 'reka-ui'\nimport {\n type DateValue,\n CalendarDateTime,\n toCalendarDate,\n today,\n getLocalTimeZone,\n} from '@internationalized/date'\nimport { dateTimePickerVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport Calendar from '../calendar/Calendar.vue'\nimport DateInput from '../date-input/DateInput.vue'\nimport DateTimePickerTimeScroller from './DateTimePickerTimeScroller.vue'\nimport Button from '../button/Button.vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n variant?: 'flat' | 'bordered' | 'faded' | 'underlined'\n size?: 'sm' | 'md' | 'lg'\n color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'\n labelPlacement?: 'inside' | 'outside' | 'outside-left'\n fullWidth?: boolean\n label?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isReadOnly?: boolean\n isRequired?: boolean\n name?: string\n class?: ClassValue\n /** Override classes for individual slots */\n classNames?: Partial<{\n base: ClassValue\n trigger: ClassValue\n triggerIndicator: ClassValue\n popover: ClassValue\n panel: ClassValue\n divider: ClassValue\n }>\n granularity?: 'minute' | 'second'\n hourCycle?: 12 | 24\n hideTimeZone?: boolean\n defaultOpen?: boolean\n closeOnSelect?: boolean\n /** Label for the footer button that closes the picker. */\n doneLabel?: string\n locale?: string\n defaultValue?: CalendarDateTime\n /** Initial placeholder date for the calendar. */\n defaultPlaceholder?: DateValue\n /** Controlled placeholder date. */\n placeholder?: DateValue\n minValue?: CalendarDateTime\n maxValue?: CalendarDateTime\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => boolean\n /** Steps for segment keyboard navigation. */\n step?: Partial<Record<'hour' | 'minute' | 'second' | 'millisecond', number>>\n /** Text direction. */\n dir?: 'ltr' | 'rtl'\n /** HTML id attribute forwarded to the root element. */\n id?: string\n /** Whether the calendar popover is modal (traps focus). */\n modal?: boolean\n /** Marks the field as required. */\n required?: boolean\n /** Use paged navigation in the calendar. */\n pagedNavigation?: boolean\n /** Day the week starts on. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n /** Format for weekday header cells. */\n weekdayFormat?: 'narrow' | 'short' | 'long'\n /** Always show 6 weeks per month. */\n fixedWeeks?: boolean\n /** Number of months shown in the calendar. */\n numberOfMonths?: number\n /** Prevent deselecting a selected date. */\n preventDeselect?: boolean\n /** Render trigger as a different element. */\n triggerAs?: string\n /** Render trigger child as root element. */\n triggerAsChild?: boolean\n /** Portal target for the content. */\n portal?: string | HTMLElement\n /** Force the content to stay mounted. */\n forceMount?: boolean\n /** Side of the anchor the content appears on. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n /** Distance in px from the anchor. */\n sideOffset?: number\n /** Allow flipping to opposite side. */\n sideFlip?: boolean\n /** Alignment of the content relative to the anchor. */\n align?: 'start' | 'center' | 'end'\n /** Offset along the align axis. */\n alignOffset?: number\n /** Allow flipping alignment. */\n alignFlip?: boolean\n /** Avoid collisions with the viewport. */\n avoidCollisions?: boolean\n /** Elements to use as collision boundaries. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Padding for collision detection. */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n /** Padding between arrow and content edge. */\n arrowPadding?: number\n /** Hide the arrow when it is shifted. */\n hideShiftedArrow?: boolean\n /** Sticky behavior when overflowing. */\n sticky?: 'partial' | 'always'\n /** Hide content when anchor is detached. */\n hideWhenDetached?: boolean\n /** CSS position strategy. */\n positionStrategy?: 'fixed' | 'absolute'\n /** When to recalculate position. */\n updatePositionStrategy?: 'always' | 'optimized'\n /** Disable position update on layout shift. */\n disableUpdateOnLayoutShift?: boolean\n /** Prioritize keeping content in viewport. */\n prioritizePosition?: boolean\n /** Virtual reference element for positioning. */\n reference?: object | null\n /** Render content as a different element. */\n contentAs?: string\n /** Render content child as root element. */\n contentAsChild?: boolean\n /** Disable pointer events outside the content. */\n disableOutsidePointerEvents?: boolean\n}>(), {\n size: 'md',\n color: 'default',\n labelPlacement: 'inside',\n fullWidth: false,\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n isRequired: false,\n hideTimeZone: false,\n granularity: 'minute',\n defaultOpen: false,\n closeOnSelect: true,\n doneLabel: 'Done',\n})\n\nconst emit = defineEmits<{\n 'update:placeholder': [value: DateValue | undefined]\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst modelValue = defineModel<CalendarDateTime | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open', { default: undefined })\n\n// Seed controlled open state from defaultOpen so portal renders in uncontrolled mode too\nif (props.defaultOpen && openModel.value === undefined) {\n openModel.value = true\n}\n\n// Seed controlled value from defaultValue so DateFieldRoot is always in controlled\n// mode from the start. Without this, an uncontrolled→controlled transition\n// happens mid-lifecycle and Reka's DateFieldRoot won't re-render segments.\nif (modelValue.value == null && props.defaultValue != null) {\n modelValue.value = props.defaultValue\n}\n\n// Internal working value — always a CalendarDateTime, never null/undefined.\nconst _today = today(getLocalTimeZone())\nconst internalValue = shallowRef<CalendarDateTime>(\n modelValue.value ?? props.defaultValue ?? new CalendarDateTime(_today.year, _today.month, _today.day, 0, 0),\n)\n\n// Sync inbound: parent resets the value → update internalValue.\n// Guard on CalendarDateTime: ignore CalendarDate emits (no time info).\nwatch(modelValue, (v) => {\n if (v instanceof CalendarDateTime) internalValue.value = v\n})\n\n// Route segment edits from DateInput back to both internalValue and modelValue.\n// DateInput is bound to internalValue (not modelValue) so this is the only place\n// that propagates user-typed changes outward.\nfunction onInputChange(v: DateValue | null | undefined) {\n if (!(v instanceof CalendarDateTime)) return\n internalValue.value = v\n modelValue.value = v\n}\n\n// ─── Calendar value sync ─────────────────────────────────────────────────\n\nconst calendarValue = computed<DateValue | undefined>({\n // Pass CalendarDate to CalendarRoot — Reka always emits CalendarDate from\n // onDateChange. The setter reconstructs the full CalendarDateTime.\n get: () => toCalendarDate(internalValue.value),\n set: (val) => {\n if (!val) return\n internalValue.value = internalValue.value.set({\n year: val.year,\n month: val.month,\n day: val.day,\n })\n modelValue.value = internalValue.value\n },\n})\n\n// ─── Time update ─────────────────────────────────────────────────────────\n\nfunction onTimeUpdate(val: CalendarDateTime) {\n internalValue.value = val\n modelValue.value = val\n}\n\n// ─── Styles ──────────────────────────────────────────────────────────────\n\nconst slotFns = computed(() =>\n dateTimePickerVariants({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n fullWidth: props.fullWidth,\n }),\n)\n</script>\n\n<template>\n <DatePickerRoot\n v-model=\"modelValue\"\n v-model:open=\"openModel\"\n :default-value=\"defaultValue\"\n :default-open=\"defaultOpen\"\n :default-placeholder=\"defaultPlaceholder\"\n :placeholder=\"placeholder\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-unavailable=\"isDateUnavailable\"\n :is-date-disabled=\"isDateDisabled\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :step=\"step\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :dir=\"dir\"\n :id=\"id\"\n :required=\"required\"\n :modal=\"modal\"\n :paged-navigation=\"pagedNavigation\"\n :week-starts-on=\"weekStartsOn\"\n :weekday-format=\"weekdayFormat\"\n :fixed-weeks=\"fixedWeeks\"\n :number-of-months=\"numberOfMonths\"\n :prevent-deselect=\"preventDeselect\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-time-picker\"\n >\n <DateInput\n :model-value=\"internalValue\"\n :variant=\"variant\"\n :size=\"size\"\n :color=\"color\"\n :label-placement=\"labelPlacement\"\n :full-width=\"fullWidth\"\n :default-value=\"defaultValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :label=\"label\"\n :description=\"description\"\n :error-message=\"errorMessage\"\n :is-invalid=\"isInvalid\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n :is-required=\"isRequired\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n @update:model-value=\"onInputChange\"\n >\n <template #endContent>\n <DatePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n :as=\"triggerAs\"\n :as-child=\"triggerAsChild\"\n aria-label=\"Open date time picker\"\n @mousedown.prevent\n >\n <slot name=\"selectorIcon\">\n <svg\n :class=\"composeClassName(slotFns.triggerIndicator(), props.classNames?.triggerIndicator)\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect\n x=\"3\"\n y=\"4\"\n width=\"18\"\n height=\"18\"\n rx=\"2\"\n ry=\"2\"\n />\n <line\n x1=\"16\"\n y1=\"2\"\n x2=\"16\"\n y2=\"6\"\n />\n <line\n x1=\"8\"\n y1=\"2\"\n x2=\"8\"\n y2=\"6\"\n />\n <line\n x1=\"3\"\n y1=\"10\"\n x2=\"21\"\n y2=\"10\"\n />\n </svg>\n </slot>\n </DatePickerTrigger>\n </template>\n </DateInput>\n\n <DatePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"sideOffset ?? 8\"\n :portal=\"portal != null ? { to: portal } : undefined\"\n :force-mount=\"forceMount\"\n :side=\"side\"\n :side-flip=\"sideFlip\"\n :align=\"align\"\n :align-offset=\"alignOffset\"\n :align-flip=\"alignFlip\"\n :avoid-collisions=\"avoidCollisions\"\n :collision-boundary=\"collisionBoundary\"\n :collision-padding=\"collisionPadding\"\n :arrow-padding=\"arrowPadding\"\n :hide-shifted-arrow=\"hideShiftedArrow\"\n :sticky=\"sticky\"\n :hide-when-detached=\"hideWhenDetached\"\n :position-strategy=\"positionStrategy\"\n :update-position-strategy=\"updatePositionStrategy\"\n :disable-update-on-layout-shift=\"disableUpdateOnLayoutShift\"\n :prioritize-position=\"prioritizePosition\"\n :reference=\"(reference as any)\"\n :as=\"contentAs\"\n :as-child=\"contentAsChild\"\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <div\n :class=\"composeClassName(slotFns.panel(), props.classNames?.panel)\"\n data-slot=\"panel\"\n >\n <!-- Wrapper keeps Calendar's multiple view roots (date grid, month\n picker, year picker) as ONE flex child. Without it, the panel's\n flex layout spreads those sibling roots into separate columns and\n the inactive (empty) root shows as a blank box. -->\n <div\n :class=\"slotFns.calendarPane()\"\n data-slot=\"calendar-pane\"\n >\n <Calendar\n v-model=\"calendarValue\"\n :default-value=\"defaultValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-disabled=\"isDateDisabled\"\n :is-date-unavailable=\"isDateUnavailable\"\n :locale=\"locale\"\n :readonly=\"isReadOnly\"\n :disabled=\"isDisabled\"\n />\n </div>\n\n <div\n :class=\"composeClassName(slotFns.divider(), props.classNames?.divider)\"\n data-slot=\"divider\"\n aria-hidden=\"true\"\n />\n\n <!-- Time column: wheels on top, Done button pinned to the bottom so it\n lines up with the calendar's bottom edge. Selection is already live,\n so Done just closes the popover for users who miss click-outside. -->\n <div\n :class=\"slotFns.timePane()\"\n data-slot=\"time-pane\"\n >\n <DateTimePickerTimeScroller\n :model-value=\"internalValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n @update:model-value=\"onTimeUpdate\"\n />\n\n <div\n :class=\"slotFns.timeDone()\"\n data-slot=\"time-done\"\n >\n <slot name=\"footer\" :close=\"() => { openModel = false }\">\n <Button\n size=\"sm\"\n color=\"primary\"\n data-slot=\"done-button\"\n @click=\"openModel = false\"\n >\n {{ doneLabel }}\n </Button>\n </slot>\n </div>\n </div>\n </div>\n </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ;EAiId,MAAM,OAAO;EAUb,MAAM,aAAa,SAAgD,SAAC,aAAY;EAChF,MAAM,YAAY,SAAoB,SAAC,OAA8B;AAGrE,MAAI,MAAM,eAAe,UAAU,UAAU,KAAA,EAC3C,WAAU,QAAQ;AAMpB,MAAI,WAAW,SAAS,QAAQ,MAAM,gBAAgB,KACpD,YAAW,QAAQ,MAAM;EAI3B,MAAM,SAAS,0CAAM,2CAAkB,CAAA;EACvC,MAAM,gBAAgB,WACpB,WAAW,SAAS,MAAM,gBAAgB,IAAI,0CAAiB,OAAO,MAAM,OAAO,OAAO,OAAO,KAAK,GAAG,EAAE,CAC7G;AAIA,QAAM,aAAa,MAAM;AACvB,OAAI,aAAa,0CAAkB,eAAc,QAAQ;IAC1D;EAKD,SAAS,cAAc,GAAiC;AACtD,OAAI,EAAE,aAAa,2CAAmB;AACtC,iBAAc,QAAQ;AACtB,cAAW,QAA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A;OAClB,uBAAqB,QAAA;OACrB,QAAQ,QAAA;OACR,UAAU,QAAA;OACV,UAAU,QAAA;;;;;;;;;;;;MAIf,mBAIE,OAAA;OAHC,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,SAAO,EAAI,MAAM,YAAY,QAAO,CAAA;OACrE,aAAU;OACV,eAAY;;MAMd,mBA0BM,OAAA;OAzBH,OAAK,eAAE,QAAA,MAAQ,UAAQ,CAAA;OACxB,aAAU;UAEV,YAKE,oCAAA;OAJC,eAAa,cAAA;OACb,aAAa,QAAA;OACb,cAAY,QAAA;OACZ,uBAAoB;;;;;UAGvB,mBAcM,OAAA;OAbH,OAAK,eAAE,QAAA,MAAQ,UAAQ,CAAA;OACxB,aAAU;UAEV,WASO,KAAA,QAAA,UAAA,EATc,aAAK;AAAU,iBAAA,QAAS;iBAStC,CARL,YAOS,gBAAA;OANP,MAAK;OACL,OAAM;OACN,aAAU;OACT,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,UAAA,QAAS;;8BAEF,CAAA,gBAAA,gBAAZ,QAAA,UAAS,EAAA,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"DateTimePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/date-time-picker/DateTimePicker.vue"],"sourcesContent":["<!-- packages/vue/src/components/date-time-picker/DateTimePicker.vue -->\n<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from 'vue'\nimport {\n DatePickerRoot,\n DatePickerTrigger,\n DatePickerContent,\n} from 'reka-ui'\nimport {\n type DateValue,\n CalendarDateTime,\n toCalendarDate,\n today,\n getLocalTimeZone,\n} from '@internationalized/date'\nimport { dateTimePickerVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport Calendar from '../calendar/Calendar.vue'\nimport DateInput from '../date-input/DateInput.vue'\nimport DateTimePickerTimeScroller from './DateTimePickerTimeScroller.vue'\nimport Button from '../button/Button.vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n variant?: 'flat' | 'bordered' | 'faded' | 'underlined'\n size?: 'sm' | 'md' | 'lg'\n color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'\n labelPlacement?: 'inside' | 'outside' | 'outside-left'\n fullWidth?: boolean\n label?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isReadOnly?: boolean\n isRequired?: boolean\n name?: string\n class?: ClassValue\n /** Override classes for individual slots */\n classNames?: Partial<{\n base: ClassValue\n trigger: ClassValue\n triggerIndicator: ClassValue\n popover: ClassValue\n panel: ClassValue\n divider: ClassValue\n }>\n granularity?: 'minute' | 'second'\n hourCycle?: 12 | 24\n hideTimeZone?: boolean\n defaultOpen?: boolean\n closeOnSelect?: boolean\n /** Label for the footer button that closes the picker. */\n doneLabel?: string\n locale?: string\n defaultValue?: CalendarDateTime\n /** Initial placeholder date for the calendar. */\n defaultPlaceholder?: DateValue\n /** Controlled placeholder date. */\n placeholder?: DateValue\n minValue?: CalendarDateTime\n maxValue?: CalendarDateTime\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => boolean\n /** Steps for segment keyboard navigation. */\n step?: Partial<Record<'hour' | 'minute' | 'second' | 'millisecond', number>>\n /** Text direction. */\n dir?: 'ltr' | 'rtl'\n /** HTML id attribute forwarded to the root element. */\n id?: string\n /** Whether the calendar popover is modal (traps focus). */\n modal?: boolean\n /** Marks the field as required. */\n required?: boolean\n /** Use paged navigation in the calendar. */\n pagedNavigation?: boolean\n /** Day the week starts on. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n /** Format for weekday header cells. */\n weekdayFormat?: 'narrow' | 'short' | 'long'\n /** Always show 6 weeks per month. */\n fixedWeeks?: boolean\n /** Number of months shown in the calendar. */\n numberOfMonths?: number\n /** Prevent deselecting a selected date. */\n preventDeselect?: boolean\n /** Render trigger as a different element. */\n triggerAs?: string\n /** Render trigger child as root element. */\n triggerAsChild?: boolean\n /** Portal target for the content. */\n portal?: string | HTMLElement\n /** Force the content to stay mounted. */\n forceMount?: boolean\n /** Side of the anchor the content appears on. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n /** Distance in px from the anchor. */\n sideOffset?: number\n /** Allow flipping to opposite side. */\n sideFlip?: boolean\n /** Alignment of the content relative to the anchor. */\n align?: 'start' | 'center' | 'end'\n /** Offset along the align axis. */\n alignOffset?: number\n /** Allow flipping alignment. */\n alignFlip?: boolean\n /** Avoid collisions with the viewport. */\n avoidCollisions?: boolean\n /** Elements to use as collision boundaries. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Padding for collision detection. */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n /** Padding between arrow and content edge. */\n arrowPadding?: number\n /** Hide the arrow when it is shifted. */\n hideShiftedArrow?: boolean\n /** Sticky behavior when overflowing. */\n sticky?: 'partial' | 'always'\n /** Hide content when anchor is detached. */\n hideWhenDetached?: boolean\n /** CSS position strategy. */\n positionStrategy?: 'fixed' | 'absolute'\n /** When to recalculate position. */\n updatePositionStrategy?: 'always' | 'optimized'\n /** Disable position update on layout shift. */\n disableUpdateOnLayoutShift?: boolean\n /** Prioritize keeping content in viewport. */\n prioritizePosition?: boolean\n /** Virtual reference element for positioning. */\n reference?: object | null\n /** Render content as a different element. */\n contentAs?: string\n /** Render content child as root element. */\n contentAsChild?: boolean\n /** Disable pointer events outside the content. */\n disableOutsidePointerEvents?: boolean\n}>(), {\n size: 'md',\n color: 'default',\n labelPlacement: 'inside',\n fullWidth: false,\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n isRequired: false,\n hideTimeZone: false,\n granularity: 'minute',\n defaultOpen: false,\n closeOnSelect: true,\n doneLabel: 'Done',\n avoidCollisions: true,\n collisionPadding: 8,\n prioritizePosition: true,\n})\n\nconst emit = defineEmits<{\n 'update:placeholder': [value: DateValue | undefined]\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst modelValue = defineModel<CalendarDateTime | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open', { default: undefined })\n\n// Seed controlled open state from defaultOpen so portal renders in uncontrolled mode too\nif (props.defaultOpen && openModel.value === undefined) {\n openModel.value = true\n}\n\n// Seed controlled value from defaultValue so DateFieldRoot is always in controlled\n// mode from the start. Without this, an uncontrolled→controlled transition\n// happens mid-lifecycle and Reka's DateFieldRoot won't re-render segments.\nif (modelValue.value == null && props.defaultValue != null) {\n modelValue.value = props.defaultValue\n}\n\n// Internal working value — always a CalendarDateTime, never null/undefined.\nconst _today = today(getLocalTimeZone())\nconst internalValue = shallowRef<CalendarDateTime>(\n modelValue.value ?? props.defaultValue ?? new CalendarDateTime(_today.year, _today.month, _today.day, 0, 0),\n)\n\n// Sync inbound: parent resets the value → update internalValue.\n// Guard on CalendarDateTime: ignore CalendarDate emits (no time info).\nwatch(modelValue, (v) => {\n if (v instanceof CalendarDateTime) internalValue.value = v\n})\n\n// Route segment edits from DateInput back to both internalValue and modelValue.\n// DateInput is bound to internalValue (not modelValue) so this is the only place\n// that propagates user-typed changes outward.\nfunction onInputChange(v: DateValue | null | undefined) {\n if (!(v instanceof CalendarDateTime)) return\n internalValue.value = v\n modelValue.value = v\n}\n\n// ─── Calendar value sync ─────────────────────────────────────────────────\n\nconst calendarValue = computed<DateValue | undefined>({\n // Pass CalendarDate to CalendarRoot — Reka always emits CalendarDate from\n // onDateChange. The setter reconstructs the full CalendarDateTime.\n get: () => toCalendarDate(internalValue.value),\n set: (val) => {\n if (!val) return\n internalValue.value = internalValue.value.set({\n year: val.year,\n month: val.month,\n day: val.day,\n })\n modelValue.value = internalValue.value\n },\n})\n\n// ─── Time update ─────────────────────────────────────────────────────────\n\nfunction onTimeUpdate(val: CalendarDateTime) {\n internalValue.value = val\n modelValue.value = val\n}\n\n// ─── Styles ──────────────────────────────────────────────────────────────\n\nconst slotFns = computed(() =>\n dateTimePickerVariants({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n fullWidth: props.fullWidth,\n }),\n)\n</script>\n\n<template>\n <DatePickerRoot\n v-model=\"modelValue\"\n v-model:open=\"openModel\"\n :default-value=\"defaultValue\"\n :default-open=\"defaultOpen\"\n :default-placeholder=\"defaultPlaceholder\"\n :placeholder=\"placeholder\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-unavailable=\"isDateUnavailable\"\n :is-date-disabled=\"isDateDisabled\"\n :locale=\"locale\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :step=\"step\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :dir=\"dir\"\n :id=\"id\"\n :required=\"required\"\n :modal=\"modal\"\n :paged-navigation=\"pagedNavigation\"\n :week-starts-on=\"weekStartsOn\"\n :weekday-format=\"weekdayFormat\"\n :fixed-weeks=\"fixedWeeks\"\n :number-of-months=\"numberOfMonths\"\n :prevent-deselect=\"preventDeselect\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-time-picker\"\n >\n <DateInput\n :model-value=\"internalValue\"\n :variant=\"variant\"\n :size=\"size\"\n :color=\"color\"\n :label-placement=\"labelPlacement\"\n :full-width=\"fullWidth\"\n :default-value=\"defaultValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :label=\"label\"\n :description=\"description\"\n :error-message=\"errorMessage\"\n :is-invalid=\"isInvalid\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n :is-required=\"isRequired\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n @update:model-value=\"onInputChange\"\n >\n <template #endContent>\n <DatePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n :as=\"triggerAs\"\n :as-child=\"triggerAsChild\"\n aria-label=\"Open date time picker\"\n @mousedown.prevent\n >\n <slot name=\"selectorIcon\">\n <svg\n :class=\"composeClassName(slotFns.triggerIndicator(), props.classNames?.triggerIndicator)\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect\n x=\"3\"\n y=\"4\"\n width=\"18\"\n height=\"18\"\n rx=\"2\"\n ry=\"2\"\n />\n <line\n x1=\"16\"\n y1=\"2\"\n x2=\"16\"\n y2=\"6\"\n />\n <line\n x1=\"8\"\n y1=\"2\"\n x2=\"8\"\n y2=\"6\"\n />\n <line\n x1=\"3\"\n y1=\"10\"\n x2=\"21\"\n y2=\"10\"\n />\n </svg>\n </slot>\n </DatePickerTrigger>\n </template>\n </DateInput>\n\n <DatePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"sideOffset ?? 8\"\n :portal=\"portal != null ? { to: portal } : undefined\"\n :force-mount=\"forceMount\"\n :side=\"side\"\n :side-flip=\"sideFlip\"\n :align=\"align\"\n :align-offset=\"alignOffset\"\n :align-flip=\"alignFlip\"\n :avoid-collisions=\"avoidCollisions\"\n :collision-boundary=\"collisionBoundary\"\n :collision-padding=\"collisionPadding\"\n :arrow-padding=\"arrowPadding\"\n :hide-shifted-arrow=\"hideShiftedArrow\"\n :sticky=\"sticky\"\n :hide-when-detached=\"hideWhenDetached\"\n :position-strategy=\"positionStrategy\"\n :update-position-strategy=\"updatePositionStrategy\"\n :disable-update-on-layout-shift=\"disableUpdateOnLayoutShift\"\n :prioritize-position=\"prioritizePosition\"\n :reference=\"(reference as any)\"\n :as=\"contentAs\"\n :as-child=\"contentAsChild\"\n :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <div\n :class=\"composeClassName(slotFns.panel(), props.classNames?.panel)\"\n data-slot=\"panel\"\n >\n <!-- Wrapper keeps Calendar's multiple view roots (date grid, month\n picker, year picker) as ONE flex child. Without it, the panel's\n flex layout spreads those sibling roots into separate columns and\n the inactive (empty) root shows as a blank box. -->\n <div\n :class=\"slotFns.calendarPane()\"\n data-slot=\"calendar-pane\"\n >\n <Calendar\n v-model=\"calendarValue\"\n :default-value=\"defaultValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :is-date-disabled=\"isDateDisabled\"\n :is-date-unavailable=\"isDateUnavailable\"\n :locale=\"locale\"\n :readonly=\"isReadOnly\"\n :disabled=\"isDisabled\"\n />\n </div>\n\n <div\n :class=\"composeClassName(slotFns.divider(), props.classNames?.divider)\"\n data-slot=\"divider\"\n aria-hidden=\"true\"\n />\n\n <!-- Time column: wheels on top, Done button pinned to the bottom so it\n lines up with the calendar's bottom edge. Selection is already live,\n so Done just closes the popover for users who miss click-outside. -->\n <div\n :class=\"slotFns.timePane()\"\n data-slot=\"time-pane\"\n >\n <DateTimePickerTimeScroller\n :model-value=\"internalValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n @update:model-value=\"onTimeUpdate\"\n />\n\n <div\n :class=\"slotFns.timeDone()\"\n data-slot=\"time-done\"\n >\n <slot name=\"footer\" :close=\"() => { openModel = false }\">\n <Button\n size=\"sm\"\n color=\"primary\"\n data-slot=\"done-button\"\n @click=\"openModel = false\"\n >\n {{ doneLabel }}\n </Button>\n </slot>\n </div>\n </div>\n </div>\n </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":";;;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,EATc,aAAK;AAAU,iBAAA,QAAS;iBAStC,CARL,YAOS,gBAAA;OANP,MAAK;OACL,OAAM;OACN,aAAU;OACT,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,UAAA,QAAS;;8BAEF,CAAA,gBAAA,gBAAZ,QAAA,UAAS,EAAA,EAAA,CAAA,CAAA"}
|
|
@@ -41,7 +41,7 @@ async function runValidation(value, rules, validate, context) {
|
|
|
41
41
|
if (!rules && !validate) return void 0;
|
|
42
42
|
if (rules?.required !== void 0) {
|
|
43
43
|
const { enabled, message } = resolveSimpleRule(rules.required);
|
|
44
|
-
if (enabled && isEmpty(value)) return message ?? "
|
|
44
|
+
if (enabled && isEmpty(value)) return message ?? "Enter a value";
|
|
45
45
|
}
|
|
46
46
|
if (isEmpty(value)) {
|
|
47
47
|
if (validate) return await validate(value, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","names":[],"sources":["../../../src/components/form/validation.ts"],"sourcesContent":["type RuleWithMessage<T> = T | { value: T; message: string }\n\nexport interface FieldRules {\n required?: boolean | string\n email?: boolean | string\n url?: boolean | string\n integer?: boolean | string\n pattern?: RuleWithMessage<RegExp>\n minLength?: RuleWithMessage<number>\n maxLength?: RuleWithMessage<number>\n min?: RuleWithMessage<number>\n max?: RuleWithMessage<number>\n /** Match the value of another field by name (e.g. confirm password). */\n matches?: RuleWithMessage<string>\n}\n\nexport interface ValidationContext {\n /** All current form field values — available for cross-field rules and custom validators. */\n values: Record<string, unknown>\n}\n\nexport type CustomValidator = (\n value: unknown,\n context?: ValidationContext,\n) => string | undefined | Promise<string | undefined>\n\nconst EMAIL_REGEX = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\nconst URL_REGEX = /^(https?:\\/\\/)?([\\w-]+\\.)+[\\w-]+(\\/[\\w\\-./?%&=]*)?$/i\n\nfunction isEmpty(value: unknown): boolean {\n if (value === undefined || value === null || value === '' || value === false) return true\n if (Array.isArray(value) && value.length === 0) return true\n return false\n}\n\nfunction resolveSimpleRule(rule: boolean | string): { enabled: boolean; message: string | undefined } {\n if (typeof rule === 'string') return { enabled: true, message: rule }\n return { enabled: rule, message: undefined }\n}\n\nfunction resolveNumericRule(rule: number | { value: number; message: string }): { value: number; message: string | undefined } {\n if (typeof rule === 'number') return { value: rule, message: undefined }\n return rule\n}\n\nfunction resolvePatternRule(rule: RegExp | { value: RegExp; message: string }): { value: RegExp; message: string | undefined } {\n if (rule instanceof RegExp) return { value: rule, message: undefined }\n return rule\n}\n\nfunction resolveStringRule(rule: string | { value: string; message: string }): { value: string; message: string | undefined } {\n if (typeof rule === 'string') return { value: rule, message: undefined }\n return rule\n}\n\nexport async function runValidation(\n value: unknown,\n rules?: FieldRules,\n validate?: CustomValidator,\n context?: ValidationContext,\n): Promise<string | undefined> {\n if (!rules && !validate) return undefined\n\n if (rules?.required !== undefined) {\n const { enabled, message } = resolveSimpleRule(rules.required)\n if (enabled && isEmpty(value)) return message ?? '
|
|
1
|
+
{"version":3,"file":"validation.js","names":[],"sources":["../../../src/components/form/validation.ts"],"sourcesContent":["type RuleWithMessage<T> = T | { value: T; message: string }\n\nexport interface FieldRules {\n required?: boolean | string\n email?: boolean | string\n url?: boolean | string\n integer?: boolean | string\n pattern?: RuleWithMessage<RegExp>\n minLength?: RuleWithMessage<number>\n maxLength?: RuleWithMessage<number>\n min?: RuleWithMessage<number>\n max?: RuleWithMessage<number>\n /** Match the value of another field by name (e.g. confirm password). */\n matches?: RuleWithMessage<string>\n}\n\nexport interface ValidationContext {\n /** All current form field values — available for cross-field rules and custom validators. */\n values: Record<string, unknown>\n}\n\nexport type CustomValidator = (\n value: unknown,\n context?: ValidationContext,\n) => string | undefined | Promise<string | undefined>\n\nconst EMAIL_REGEX = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\nconst URL_REGEX = /^(https?:\\/\\/)?([\\w-]+\\.)+[\\w-]+(\\/[\\w\\-./?%&=]*)?$/i\n\nfunction isEmpty(value: unknown): boolean {\n if (value === undefined || value === null || value === '' || value === false) return true\n if (Array.isArray(value) && value.length === 0) return true\n return false\n}\n\nfunction resolveSimpleRule(rule: boolean | string): { enabled: boolean; message: string | undefined } {\n if (typeof rule === 'string') return { enabled: true, message: rule }\n return { enabled: rule, message: undefined }\n}\n\nfunction resolveNumericRule(rule: number | { value: number; message: string }): { value: number; message: string | undefined } {\n if (typeof rule === 'number') return { value: rule, message: undefined }\n return rule\n}\n\nfunction resolvePatternRule(rule: RegExp | { value: RegExp; message: string }): { value: RegExp; message: string | undefined } {\n if (rule instanceof RegExp) return { value: rule, message: undefined }\n return rule\n}\n\nfunction resolveStringRule(rule: string | { value: string; message: string }): { value: string; message: string | undefined } {\n if (typeof rule === 'string') return { value: rule, message: undefined }\n return rule\n}\n\nexport async function runValidation(\n value: unknown,\n rules?: FieldRules,\n validate?: CustomValidator,\n context?: ValidationContext,\n): Promise<string | undefined> {\n if (!rules && !validate) return undefined\n\n if (rules?.required !== undefined) {\n const { enabled, message } = resolveSimpleRule(rules.required)\n if (enabled && isEmpty(value)) return message ?? 'Enter a value'\n }\n\n if (isEmpty(value)) {\n if (validate) return await validate(value, context)\n return undefined\n }\n\n if (rules?.email !== undefined) {\n const { enabled, message } = resolveSimpleRule(rules.email)\n if (enabled && !EMAIL_REGEX.test(String(value))) return message ?? 'Enter a valid email address'\n }\n\n if (rules?.url !== undefined) {\n const { enabled, message } = resolveSimpleRule(rules.url)\n if (enabled && !URL_REGEX.test(String(value))) return message ?? 'Enter a valid URL'\n }\n\n if (rules?.integer !== undefined) {\n const { enabled, message } = resolveSimpleRule(rules.integer)\n if (enabled && !Number.isInteger(Number(value))) return message ?? 'Must be a whole number'\n }\n\n if (rules?.pattern !== undefined) {\n const { value: regex, message } = resolvePatternRule(rules.pattern)\n if (!regex.test(String(value))) return message ?? 'Invalid format'\n }\n\n if (rules?.minLength !== undefined) {\n const { value: min, message } = resolveNumericRule(rules.minLength)\n const len = Array.isArray(value) ? value.length : String(value).length\n if (len < min) return message ?? `Must be at least ${min} characters`\n }\n\n if (rules?.maxLength !== undefined) {\n const { value: max, message } = resolveNumericRule(rules.maxLength)\n const len = Array.isArray(value) ? value.length : String(value).length\n if (len > max) return message ?? `Must be at most ${max} characters`\n }\n\n if (rules?.min !== undefined) {\n const { value: minVal, message } = resolveNumericRule(rules.min)\n if (Number(value) < minVal) return message ?? `Must be at least ${minVal}`\n }\n\n if (rules?.max !== undefined) {\n const { value: maxVal, message } = resolveNumericRule(rules.max)\n if (Number(value) > maxVal) return message ?? `Must be at most ${maxVal}`\n }\n\n if (rules?.matches !== undefined) {\n const { value: fieldName, message } = resolveStringRule(rules.matches)\n const otherValue = context?.values[fieldName]\n if (value !== otherValue) return message ?? `Must match ${fieldName}`\n }\n\n if (validate) return await validate(value, context)\n\n return undefined\n}\n"],"mappings":";AA0BA,IAAM,cAAc;AACpB,IAAM,YAAY;AAElB,SAAS,QAAQ,OAAyB;AACxC,KAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,MAAM,UAAU,MAAO,QAAO;AACrF,KAAI,MAAM,QAAQ,MAAM,IAAI,MAAM,WAAW,EAAG,QAAO;AACvD,QAAO;;AAGT,SAAS,kBAAkB,MAA2E;AACpG,KAAI,OAAO,SAAS,SAAU,QAAO;EAAE,SAAS;EAAM,SAAS;EAAM;AACrE,QAAO;EAAE,SAAS;EAAM,SAAS,KAAA;EAAW;;AAG9C,SAAS,mBAAmB,MAAmG;AAC7H,KAAI,OAAO,SAAS,SAAU,QAAO;EAAE,OAAO;EAAM,SAAS,KAAA;EAAW;AACxE,QAAO;;AAGT,SAAS,mBAAmB,MAAmG;AAC7H,KAAI,gBAAgB,OAAQ,QAAO;EAAE,OAAO;EAAM,SAAS,KAAA;EAAW;AACtE,QAAO;;AAGT,SAAS,kBAAkB,MAAmG;AAC5H,KAAI,OAAO,SAAS,SAAU,QAAO;EAAE,OAAO;EAAM,SAAS,KAAA;EAAW;AACxE,QAAO;;AAGT,eAAsB,cACpB,OACA,OACA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UAAU;AAEnE,OADY,MAAM,QAAQ,MAAM,GAAG,MAAM,SAAS,OAAO,MAAM,CAAC,UACtD,IAAK,QAAO,WAAW,mBAAmB,IAAI;;AAG1D,KAAI,OAAO,QAAQ,KAAA,GAAW;EAC5B,MAAM,EAAE,OAAO,QAAQ,YAAY,mBAAmB,MAAM,IAAI;AAChE,MAAI,OAAO,MAAM,GAAG,OAAQ,QAAO,WAAW,oBAAoB;;AAGpE,KAAI,OAAO,QAAQ,KAAA,GAAW;EAC5B,MAAM,EAAE,OAAO,QAAQ,YAAY,mBAAmB,MAAM,IAAI;AAChE,MAAI,OAAO,MAAM,GAAG,OAAQ,QAAO,WAAW,mBAAmB;;AAGnE,KAAI,OAAO,YAAY,KAAA,GAAW;EAChC,MAAM,EAAE,OAAO,WAAW,YAAY,kBAAkB,MAAM,QAAQ;AAEtE,MAAI,UADe,SAAS,OAAO,WACT,QAAO,WAAW,cAAc;;AAG5D,KAAI,SAAU,QAAO,MAAM,SAAS,OAAO,QAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { composeClassName } from "../../utils/composeClassName.js";
|
|
2
|
+
import { useModalInject } from "./Modal.vue_vue_type_script_lang.js";
|
|
2
3
|
import { motion } from "../../node_modules/.pnpm/motion-v@2.2.1_@vueuse_core@14.2.1_vue@3.5.32_typescript@6.0.2___react-dom@19.2.5_react_8b28b23614a2152514812dba6ef76a55/node_modules/motion-v/dist/es/components/motion/index.js";
|
|
3
4
|
import { AnimatePresence_default } from "../../node_modules/.pnpm/motion-v@2.2.1_@vueuse_core@14.2.1_vue@3.5.32_typescript@6.0.2___react-dom@19.2.5_react_8b28b23614a2152514812dba6ef76a55/node_modules/motion-v/dist/es/components/animate-presence/AnimatePresence.js";
|
|
4
|
-
import { useModalInject } from "./Modal.vue_vue_type_script_lang.js";
|
|
5
5
|
import { modalVariants } from "../../packages/styles/src/components/modal/modal.styles.js";
|
|
6
6
|
import ModalOverlay_default from "./ModalOverlay.js";
|
|
7
7
|
import { createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverContent.js","names":[],"sources":["../../../src/components/popover/PopoverContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PopoverPortal, PopoverContent
|
|
1
|
+
{"version":3,"file":"PopoverContent.js","names":[],"sources":["../../../src/components/popover/PopoverContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PopoverPortal, PopoverContent } from 'reka-ui'\nimport { popoverVariants } from '@auronui/styles/components/popover'\nimport { composeClassName } from '../../utils/composeClassName'\n\nconst props = withDefaults(defineProps<{\n side?: 'top' | 'right' | 'bottom' | 'left'\n sideOffset?: number\n sideFlip?: boolean\n align?: 'start' | 'center' | 'end'\n alignOffset?: number\n alignFlip?: boolean\n avoidCollisions?: boolean\n collisionBoundary?: Element | null | Array<Element | null>\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n arrowPadding?: number\n hideShiftedArrow?: boolean\n sticky?: 'partial' | 'always'\n hideWhenDetached?: boolean\n positionStrategy?: 'fixed' | 'absolute'\n updatePositionStrategy?: 'always' | 'optimized'\n disableUpdateOnLayoutShift?: boolean\n prioritizePosition?: boolean\n class?: string\n}>(), {\n side: 'bottom',\n sideOffset: 8,\n align: 'center',\n alignOffset: 0,\n avoidCollisions: true,\n collisionPadding: 8,\n prioritizePosition: true,\n})\n\nconst emit = defineEmits<{\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst styles = popoverVariants()\n</script>\n\n<template>\n <PopoverPortal>\n <PopoverContent\n :side=\"props.side\"\n :side-offset=\"props.sideOffset\"\n :align=\"props.align\"\n :align-offset=\"props.alignOffset\"\n :side-flip=\"props.sideFlip\"\n :align-flip=\"props.alignFlip\"\n :avoid-collisions=\"props.avoidCollisions\"\n :collision-boundary=\"props.collisionBoundary\"\n :collision-padding=\"props.collisionPadding\"\n :arrow-padding=\"props.arrowPadding\"\n :hide-shifted-arrow=\"props.hideShiftedArrow\"\n :sticky=\"props.sticky\"\n :hide-when-detached=\"props.hideWhenDetached\"\n :position-strategy=\"props.positionStrategy\"\n :update-position-strategy=\"props.updatePositionStrategy\"\n :disable-update-on-layout-shift=\"props.disableUpdateOnLayoutShift\"\n :prioritize-position=\"props.prioritizePosition\"\n :class=\"composeClassName(styles.base(), props.class)\"\n v-bind=\"$attrs\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <slot />\n </PopoverContent>\n </PopoverPortal>\n</template>\n"],"mappings":""}
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
import { composeClassName } from "../../utils/composeClassName.js";
|
|
2
|
-
import { motion } from "../../node_modules/.pnpm/motion-v@2.2.1_@vueuse_core@14.2.1_vue@3.5.32_typescript@6.0.2___react-dom@19.2.5_react_8b28b23614a2152514812dba6ef76a55/node_modules/motion-v/dist/es/components/motion/index.js";
|
|
3
|
-
import { AnimatePresence_default } from "../../node_modules/.pnpm/motion-v@2.2.1_@vueuse_core@14.2.1_vue@3.5.32_typescript@6.0.2___react-dom@19.2.5_react_8b28b23614a2152514812dba6ef76a55/node_modules/motion-v/dist/es/components/animate-presence/AnimatePresence.js";
|
|
4
2
|
import { popoverVariants } from "../../packages/styles/src/components/popover/popover.styles.js";
|
|
5
|
-
import { createBlock,
|
|
6
|
-
import { PopoverContent, PopoverPortal
|
|
3
|
+
import { createBlock, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
4
|
+
import { PopoverContent, PopoverPortal } from "reka-ui";
|
|
7
5
|
//#region src/components/popover/PopoverContent.vue?vue&type=script&setup=true&lang.ts
|
|
8
6
|
var PopoverContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
9
7
|
__name: "PopoverContent",
|
|
10
8
|
props: {
|
|
11
9
|
side: { default: "bottom" },
|
|
12
10
|
sideOffset: { default: 8 },
|
|
11
|
+
sideFlip: { type: Boolean },
|
|
13
12
|
align: { default: "center" },
|
|
14
13
|
alignOffset: { default: 0 },
|
|
14
|
+
alignFlip: { type: Boolean },
|
|
15
15
|
avoidCollisions: {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: true
|
|
18
18
|
},
|
|
19
|
+
collisionBoundary: {},
|
|
20
|
+
collisionPadding: { default: 8 },
|
|
21
|
+
arrowPadding: {},
|
|
22
|
+
hideShiftedArrow: { type: Boolean },
|
|
23
|
+
sticky: {},
|
|
24
|
+
hideWhenDetached: { type: Boolean },
|
|
25
|
+
positionStrategy: {},
|
|
26
|
+
updatePositionStrategy: {},
|
|
27
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
28
|
+
prioritizePosition: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true
|
|
31
|
+
},
|
|
19
32
|
class: {}
|
|
20
33
|
},
|
|
21
34
|
emits: [
|
|
@@ -29,17 +42,28 @@ var PopoverContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
29
42
|
setup(__props, { emit: __emit }) {
|
|
30
43
|
const props = __props;
|
|
31
44
|
const emit = __emit;
|
|
32
|
-
const rootContext = injectPopoverRootContext();
|
|
33
45
|
const styles = popoverVariants();
|
|
34
46
|
return (_ctx, _cache) => {
|
|
35
47
|
return openBlock(), createBlock(unref(PopoverPortal), null, {
|
|
36
48
|
default: withCtx(() => [createVNode(unref(PopoverContent), mergeProps({
|
|
37
|
-
"force-mount": true,
|
|
38
49
|
side: props.side,
|
|
39
50
|
"side-offset": props.sideOffset,
|
|
40
51
|
align: props.align,
|
|
41
52
|
"align-offset": props.alignOffset,
|
|
42
|
-
"
|
|
53
|
+
"side-flip": props.sideFlip,
|
|
54
|
+
"align-flip": props.alignFlip,
|
|
55
|
+
"avoid-collisions": props.avoidCollisions,
|
|
56
|
+
"collision-boundary": props.collisionBoundary,
|
|
57
|
+
"collision-padding": props.collisionPadding,
|
|
58
|
+
"arrow-padding": props.arrowPadding,
|
|
59
|
+
"hide-shifted-arrow": props.hideShiftedArrow,
|
|
60
|
+
sticky: props.sticky,
|
|
61
|
+
"hide-when-detached": props.hideWhenDetached,
|
|
62
|
+
"position-strategy": props.positionStrategy,
|
|
63
|
+
"update-position-strategy": props.updatePositionStrategy,
|
|
64
|
+
"disable-update-on-layout-shift": props.disableUpdateOnLayoutShift,
|
|
65
|
+
"prioritize-position": props.prioritizePosition,
|
|
66
|
+
class: unref(composeClassName)(unref(styles).base(), props.class)
|
|
43
67
|
}, _ctx.$attrs, {
|
|
44
68
|
onEscapeKeyDown: _cache[0] || (_cache[0] = ($event) => emit("escape-key-down", $event)),
|
|
45
69
|
onPointerDownOutside: _cache[1] || (_cache[1] = ($event) => emit("pointer-down-outside", $event)),
|
|
@@ -48,39 +72,27 @@ var PopoverContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
48
72
|
onOpenAutoFocus: _cache[4] || (_cache[4] = ($event) => emit("open-auto-focus", $event)),
|
|
49
73
|
onCloseAutoFocus: _cache[5] || (_cache[5] = ($event) => emit("close-auto-focus", $event))
|
|
50
74
|
}), {
|
|
51
|
-
default: withCtx(() => [
|
|
52
|
-
default: withCtx(() => [unref(rootContext).open.value ? (openBlock(), createBlock(unref(motion).div, {
|
|
53
|
-
key: "popover-content",
|
|
54
|
-
class: normalizeClass(unref(composeClassName)(unref(styles).base(), props.class)),
|
|
55
|
-
initial: {
|
|
56
|
-
opacity: 0,
|
|
57
|
-
scale: .95
|
|
58
|
-
},
|
|
59
|
-
animate: {
|
|
60
|
-
opacity: 1,
|
|
61
|
-
scale: 1
|
|
62
|
-
},
|
|
63
|
-
exit: {
|
|
64
|
-
opacity: 0,
|
|
65
|
-
scale: .95
|
|
66
|
-
},
|
|
67
|
-
transition: {
|
|
68
|
-
duration: .15,
|
|
69
|
-
ease: "easeOut"
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
73
|
-
_: 3
|
|
74
|
-
}, 8, ["class"])) : createCommentVNode("", true)]),
|
|
75
|
-
_: 3
|
|
76
|
-
})]),
|
|
75
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
77
76
|
_: 3
|
|
78
77
|
}, 16, [
|
|
79
78
|
"side",
|
|
80
79
|
"side-offset",
|
|
81
80
|
"align",
|
|
82
81
|
"align-offset",
|
|
83
|
-
"
|
|
82
|
+
"side-flip",
|
|
83
|
+
"align-flip",
|
|
84
|
+
"avoid-collisions",
|
|
85
|
+
"collision-boundary",
|
|
86
|
+
"collision-padding",
|
|
87
|
+
"arrow-padding",
|
|
88
|
+
"hide-shifted-arrow",
|
|
89
|
+
"sticky",
|
|
90
|
+
"hide-when-detached",
|
|
91
|
+
"position-strategy",
|
|
92
|
+
"update-position-strategy",
|
|
93
|
+
"disable-update-on-layout-shift",
|
|
94
|
+
"prioritize-position",
|
|
95
|
+
"class"
|
|
84
96
|
])]),
|
|
85
97
|
_: 3
|
|
86
98
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverContent.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/popover/PopoverContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PopoverPortal, PopoverContent
|
|
1
|
+
{"version":3,"file":"PopoverContent.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/popover/PopoverContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PopoverPortal, PopoverContent } from 'reka-ui'\nimport { popoverVariants } from '@auronui/styles/components/popover'\nimport { composeClassName } from '../../utils/composeClassName'\n\nconst props = withDefaults(defineProps<{\n side?: 'top' | 'right' | 'bottom' | 'left'\n sideOffset?: number\n sideFlip?: boolean\n align?: 'start' | 'center' | 'end'\n alignOffset?: number\n alignFlip?: boolean\n avoidCollisions?: boolean\n collisionBoundary?: Element | null | Array<Element | null>\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n arrowPadding?: number\n hideShiftedArrow?: boolean\n sticky?: 'partial' | 'always'\n hideWhenDetached?: boolean\n positionStrategy?: 'fixed' | 'absolute'\n updatePositionStrategy?: 'always' | 'optimized'\n disableUpdateOnLayoutShift?: boolean\n prioritizePosition?: boolean\n class?: string\n}>(), {\n side: 'bottom',\n sideOffset: 8,\n align: 'center',\n alignOffset: 0,\n avoidCollisions: true,\n collisionPadding: 8,\n prioritizePosition: true,\n})\n\nconst emit = defineEmits<{\n 'escape-key-down': [event: KeyboardEvent]\n 'pointer-down-outside': [event: Event]\n 'focus-outside': [event: Event]\n 'interact-outside': [event: Event]\n 'open-auto-focus': [event: Event]\n 'close-auto-focus': [event: Event]\n}>()\n\nconst styles = popoverVariants()\n</script>\n\n<template>\n <PopoverPortal>\n <PopoverContent\n :side=\"props.side\"\n :side-offset=\"props.sideOffset\"\n :align=\"props.align\"\n :align-offset=\"props.alignOffset\"\n :side-flip=\"props.sideFlip\"\n :align-flip=\"props.alignFlip\"\n :avoid-collisions=\"props.avoidCollisions\"\n :collision-boundary=\"props.collisionBoundary\"\n :collision-padding=\"props.collisionPadding\"\n :arrow-padding=\"props.arrowPadding\"\n :hide-shifted-arrow=\"props.hideShiftedArrow\"\n :sticky=\"props.sticky\"\n :hide-when-detached=\"props.hideWhenDetached\"\n :position-strategy=\"props.positionStrategy\"\n :update-position-strategy=\"props.updatePositionStrategy\"\n :disable-update-on-layout-shift=\"props.disableUpdateOnLayoutShift\"\n :prioritize-position=\"props.prioritizePosition\"\n :class=\"composeClassName(styles.base(), props.class)\"\n v-bind=\"$attrs\"\n @escape-key-down=\"emit('escape-key-down', $event)\"\n @pointer-down-outside=\"emit('pointer-down-outside', $event)\"\n @focus-outside=\"emit('focus-outside', $event)\"\n @interact-outside=\"emit('interact-outside', $event)\"\n @open-auto-focus=\"emit('open-auto-focus', $event)\"\n @close-auto-focus=\"emit('close-auto-focus', $event)\"\n >\n <slot />\n </PopoverContent>\n </PopoverPortal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKA,MAAM,QAAQ;EA6Bd,MAAM,OAAO;EASb,MAAM,SAAS,iBAAgB;;uBAI7B,YA8BgB,MAAA,cAAA,EAAA,MAAA;2BADG,CA5BjB,YA4BiB,MAAA,eAAA,EA5BjB,WA4BiB;KA3Bd,MAAM,MAAM;KACZ,eAAa,MAAM;KACnB,OAAO,MAAM;KACb,gBAAc,MAAM;KACpB,aAAW,MAAM;KACjB,cAAY,MAAM;KAClB,oBAAkB,MAAM;KACxB,sBAAoB,MAAM;KAC1B,qBAAmB,MAAM;KACzB,iBAAe,MAAM;KACrB,sBAAoB,MAAM;KAC1B,QAAQ,MAAM;KACd,sBAAoB,MAAM;KAC1B,qBAAmB,MAAM;KACzB,4BAA0B,MAAM;KAChC,kCAAgC,MAAM;KACtC,uBAAqB,MAAM;KAC3B,OAAO,MAAA,iBAAgB,CAAC,MAAA,OAAM,CAAC,MAAI,EAAI,MAAM,MAAK;OAC3CA,KAAAA,QAAM;KACb,iBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,mBAAoB,OAAM;KAC/C,sBAAoB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,wBAAyB,OAAM;KACzD,gBAAa,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,iBAAkB,OAAM;KAC3C,mBAAgB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,oBAAqB,OAAM;KACjD,iBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,mBAAoB,OAAM;KAC/C,kBAAgB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,oBAAqB,OAAM;;4BAE1C,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","names":[],"sources":["../../../src/components/radio/Radio.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { RadioGroupItem, RadioGroupIndicator } from 'reka-ui'\nimport { radioVariants, type RadioGroupVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useRadioGroupInject } from './radio-group.context'\n\n// Disable Vue attribute fallthrough — we manually forward $attrs to RadioGroupItem\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n value: string\n variant?: RadioGroupVariants['variant']\n disabled?: boolean\n /** HTML id attribute forwarded to RadioGroupItem. */\n id?: string\n /** Whether RadioGroupItem renders as a child element. */\n asChild?: boolean\n /** Element or component to render RadioGroupItem as. */\n as?: string\n /** HTML name attribute forwarded to RadioGroupItem. */\n name?: string\n /** Whether the radio item is required. */\n required?: boolean\n /** Whether RadioGroupIndicator should force-mount even when unselected. */\n indicatorForceMount?: boolean\n /** Whether RadioGroupIndicator renders as a child element. */\n indicatorAsChild?: boolean\n /** Element or component to render RadioGroupIndicator as. */\n indicatorAs?: string\n class?: ClassValue\n /** Override classNames for individual slots */\n classNames?: Partial<{\n base: ClassValue\n control: ClassValue\n indicator: ClassValue\n content: ClassValue\n }>\n}>(), {\n variant: undefined,\n disabled: false,\n id: undefined,\n asChild: false,\n as: undefined,\n name: undefined,\n required: false,\n indicatorForceMount: undefined,\n indicatorAsChild: false,\n indicatorAs: undefined,\n class: undefined,\n classNames: undefined,\n})\n\nconst emit = defineEmits<{\n 'select': [event: Event]\n}>()\n\nconst attrs = useAttrs()\n\n// Inject RadioGroup context with fallback defaults (standalone mode)\nconst groupCtx = useRadioGroupInject({\n variant: ref(undefined),\n disabled: ref(false),\n})\n\n// Prop precedence: group disabled wins (D-02)\nconst isDisabled = computed(() => groupCtx.disabled.value || props.disabled)\n\n// Child variant wins over group variant (used for data-variant attribute propagation)\nconst finalVariant = computed(() => props.variant ?? groupCtx.variant.value)\n\nconst slotFns = computed(() => radioVariants())\n</script>\n\n<template>\n <RadioGroupItem\n v-bind=\"attrs\"\n :value=\"props.value\"\n :disabled=\"isDisabled\"\n :id=\"props.id\"\n :as-child=\"props.asChild\"\n :as=\"props.as\"\n :name=\"props.name\"\n :required=\"props.required\"\n :data-variant=\"finalVariant\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n @select=\"emit('select', $event)\"\n >\n <span :class=\"composeClassName(slotFns.control(), props.classNames?.control)\">\n <RadioGroupIndicator\n :force-mount=\"props.indicatorForceMount\"\n :as-child=\"props.indicatorAsChild\"\n :as=\"props.indicatorAs\"\n :class=\"composeClassName(slotFns.indicator(), props.classNames?.indicator)\"\n />\n </span>\n <span :class=\"composeClassName(slotFns.content(), props.classNames?.content)\">\n <slot />\n </span>\n </RadioGroupItem>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Radio.js","names":[],"sources":["../../../src/components/radio/Radio.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { RadioGroupItem, RadioGroupIndicator } from 'reka-ui'\nimport { radioVariants, type RadioGroupVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useRadioGroupInject } from './radio-group.context'\n\n// Disable Vue attribute fallthrough — we manually forward $attrs to RadioGroupItem\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n value: string\n variant?: RadioGroupVariants['variant']\n disabled?: boolean\n isInvalid?: boolean\n /** HTML id attribute forwarded to RadioGroupItem. */\n id?: string\n /** Whether RadioGroupItem renders as a child element. */\n asChild?: boolean\n /** Element or component to render RadioGroupItem as. */\n as?: string\n /** HTML name attribute forwarded to RadioGroupItem. */\n name?: string\n /** Whether the radio item is required. */\n required?: boolean\n /** Whether RadioGroupIndicator should force-mount even when unselected. */\n indicatorForceMount?: boolean\n /** Whether RadioGroupIndicator renders as a child element. */\n indicatorAsChild?: boolean\n /** Element or component to render RadioGroupIndicator as. */\n indicatorAs?: string\n class?: ClassValue\n /** Override classNames for individual slots */\n classNames?: Partial<{\n base: ClassValue\n control: ClassValue\n indicator: ClassValue\n content: ClassValue\n }>\n}>(), {\n variant: undefined,\n disabled: false,\n isInvalid: false,\n id: undefined,\n asChild: false,\n as: undefined,\n name: undefined,\n required: false,\n indicatorForceMount: undefined,\n indicatorAsChild: false,\n indicatorAs: undefined,\n class: undefined,\n classNames: undefined,\n})\n\nconst emit = defineEmits<{\n 'select': [event: Event]\n}>()\n\nconst attrs = useAttrs()\n\n// Inject RadioGroup context with fallback defaults (standalone mode)\nconst groupCtx = useRadioGroupInject({\n variant: ref(undefined),\n disabled: ref(false),\n isInvalid: ref(false),\n})\n\n// Prop precedence: group disabled wins (D-02)\nconst isDisabled = computed(() => groupCtx.disabled.value || props.disabled)\n// Group invalid overrides item; item prop allows standalone invalid\nconst effectiveInvalid = computed(() => groupCtx.isInvalid.value || props.isInvalid)\n\n// Child variant wins over group variant (used for data-variant attribute propagation)\nconst finalVariant = computed(() => props.variant ?? groupCtx.variant.value)\n\nconst slotFns = computed(() => radioVariants())\n</script>\n\n<template>\n <RadioGroupItem\n v-bind=\"attrs\"\n :value=\"props.value\"\n :disabled=\"isDisabled\"\n :aria-invalid=\"effectiveInvalid || undefined\"\n :id=\"props.id\"\n :as-child=\"props.asChild\"\n :as=\"props.as\"\n :name=\"props.name\"\n :required=\"props.required\"\n :data-variant=\"finalVariant\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n @select=\"emit('select', $event)\"\n >\n <span :class=\"composeClassName(slotFns.control(), props.classNames?.control)\">\n <RadioGroupIndicator\n :force-mount=\"props.indicatorForceMount\"\n :as-child=\"props.indicatorAsChild\"\n :as=\"props.indicatorAs\"\n :class=\"composeClassName(slotFns.indicator(), props.classNames?.indicator)\"\n />\n </span>\n <span :class=\"composeClassName(slotFns.content(), props.classNames?.content)\">\n <slot />\n </span>\n </RadioGroupItem>\n</template>\n"],"mappings":""}
|
|
@@ -14,6 +14,10 @@ var Radio_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
14
14
|
type: Boolean,
|
|
15
15
|
default: false
|
|
16
16
|
},
|
|
17
|
+
isInvalid: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
17
21
|
id: { default: void 0 },
|
|
18
22
|
asChild: {
|
|
19
23
|
type: Boolean,
|
|
@@ -53,15 +57,18 @@ var Radio_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
53
57
|
const attrs = useAttrs();
|
|
54
58
|
const groupCtx = useRadioGroupInject({
|
|
55
59
|
variant: ref(void 0),
|
|
56
|
-
disabled: ref(false)
|
|
60
|
+
disabled: ref(false),
|
|
61
|
+
isInvalid: ref(false)
|
|
57
62
|
});
|
|
58
63
|
const isDisabled = computed(() => groupCtx.disabled.value || props.disabled);
|
|
64
|
+
const effectiveInvalid = computed(() => groupCtx.isInvalid.value || props.isInvalid);
|
|
59
65
|
const finalVariant = computed(() => props.variant ?? groupCtx.variant.value);
|
|
60
66
|
const slotFns = computed(() => radioVariants());
|
|
61
67
|
return (_ctx, _cache) => {
|
|
62
68
|
return openBlock(), createBlock(unref(RadioGroupItem), mergeProps(unref(attrs), {
|
|
63
69
|
value: props.value,
|
|
64
70
|
disabled: isDisabled.value,
|
|
71
|
+
"aria-invalid": effectiveInvalid.value || void 0,
|
|
65
72
|
id: props.id,
|
|
66
73
|
"as-child": props.asChild,
|
|
67
74
|
as: props.as,
|
|
@@ -86,6 +93,7 @@ var Radio_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
86
93
|
}, 16, [
|
|
87
94
|
"value",
|
|
88
95
|
"disabled",
|
|
96
|
+
"aria-invalid",
|
|
89
97
|
"id",
|
|
90
98
|
"as-child",
|
|
91
99
|
"as",
|