@auronui/vue 1.0.15 → 1.0.17
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/dist/cjs/index.cjs +582 -75
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/accordion/Accordion.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/accordion/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/accordion/AccordionContent.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/accordion/AccordionContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/accordion/AccordionHeader.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/accordion/AccordionHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/accordion/AccordionItem.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/accordion/AccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/accordion/AccordionTrigger.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/accordion/AccordionTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/alert-dialog/AlertDialogAction.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/alert-dialog/AlertDialogAction.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/alert-dialog/AlertDialogCancel.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/alert-dialog/AlertDialogCancel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/aspect-ratio/AspectRatio.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/aspect-ratio/AspectRatio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/avatar/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/badge/Badge.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/badge/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItem.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/breadcrumbs/BreadcrumbItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/breadcrumbs/Breadcrumbs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/button/Button.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/button/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/button/ButtonGroup.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/button/ButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/button/ToggleButtonGroup.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/button/ToggleButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/calendar/Calendar.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/calendar/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/calendar-year-picker/CalendarYearPicker.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/calendar-year-picker/CalendarYearPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/card/Card.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/card/Card.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/card/CardBody.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/card/CardBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/card/CardFooter.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/card/CardFooter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/card/CardHeader.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/card/CardHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/chip/Chip.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/chip/Chip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/collapsible/Collapsible.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/collapsible/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/collapsible/CollapsibleContent.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/collapsible/CollapsibleContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/collapsible/CollapsibleGroup.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/collapsible/CollapsibleGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/collapsible/CollapsibleTrigger.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/collapsible/CollapsibleTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/combo-box/ComboBox.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/combo-box/ComboBox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/date-input/DateInput.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/date-input/DateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/date-range-field/DateRangeField.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/date-range-field/DateRangeField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +7 -1
- 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.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/input/Input.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/input/Input.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/input-otp/InputOTP.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/input-otp/InputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/kbd/Kbd.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/kbd/Kbd.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/link/Link.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/link/Link.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/list-box/ListBox.js.map +1 -1
- package/dist/components/list-box/ListBox.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/list-box/ListBox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/list-box/ListBoxItem.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/list-box/ListBoxItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/meter/Meter.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/meter/Meter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/number-field/NumberField.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/number-field/NumberField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/progress-bar/ProgressBar.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/progress-bar/ProgressBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/progress-circle/ProgressCircle.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/progress-circle/ProgressCircle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/radio/Radio.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/radio/Radio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/range-calendar/RangeCalendar.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/range-calendar/RangeCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/scroll-shadow/ScrollShadow.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/scroll-shadow/ScrollShadow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/select/SelectContent.js.map +1 -1
- package/dist/components/select/SelectContent.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/components/select/SelectContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/select/SelectTrigger.js.map +1 -1
- package/dist/components/select/SelectTrigger.vue_vue_type_script_setup_true_lang.js +16 -2
- package/dist/components/select/SelectTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/slider/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/splitter/SplitterGroup.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/splitter/SplitterGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/splitter/SplitterPanel.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/splitter/SplitterPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/splitter/SplitterResizeHandle.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/splitter/SplitterResizeHandle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/Stepper.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/StepperContent.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/StepperContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/StepperDescription.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/StepperDescription.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/StepperIndicator.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/StepperIndicator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/StepperItem.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/StepperItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/StepperSeparator.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/StepperSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/stepper/StepperTitle.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/stepper/StepperTitle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/switch/Switch.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/switch/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/TableRow.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/table/TableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/Tab.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/tabs/Tab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/TabIndicator.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/tabs/TabIndicator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/TabList.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/tabs/TabList.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/TabPanel.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/tabs/TabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/Tabs.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/tabs/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/time-field/TimeField.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/time-field/TimeField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tree/Tree.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/tree/Tree.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tree/TreeItem.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/tree/TreeItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tree/TreeItemToggle.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/components/tree/TreeItemToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/utils/composeClassName.js.map +1 -1
- package/package.json +4 -4
package/dist/components/collapsible/CollapsibleTrigger.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleTrigger.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/collapsible/CollapsibleTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CollapsibleTrigger } from 'reka-ui'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useCollapsibleInject } from './collapsible.context'\n\nconst props = defineProps<{\n class?: ClassValue\n /** Classnames for individual slots */\n classNames?: Partial<{\n trigger: ClassValue\n indicator: ClassValue\n }>\n}>()\nconst ctx = useCollapsibleInject()\n</script>\n\n<template>\n <CollapsibleTrigger :class=\"composeClassName(ctx.slotFns.value.trigger(), props.class, props.classNames?.trigger)\">\n <slot />\n <span\n :class=\"composeClassName(ctx.slotFns.value.indicator(), props.classNames?.indicator)\"\n :data-state=\"ctx.isOpen.value ? 'open' : 'closed'\"\n aria-hidden=\"true\"\n >\n <svg\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 <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </CollapsibleTrigger>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollapsibleTrigger.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/collapsible/CollapsibleTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CollapsibleTrigger } from 'reka-ui'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useCollapsibleInject } from './collapsible.context'\n\nconst props = defineProps<{\n class?: ClassValue\n /** Classnames for individual slots */\n classNames?: Partial<{\n trigger: ClassValue\n indicator: ClassValue\n }>\n}>()\nconst ctx = useCollapsibleInject()\n</script>\n\n<template>\n <CollapsibleTrigger :class=\"composeClassName(ctx.slotFns.value.trigger(), props.class, props.classNames?.trigger)\">\n <slot />\n <span\n :class=\"composeClassName(ctx.slotFns.value.indicator(), props.classNames?.indicator)\"\n :data-state=\"ctx.isOpen.value ? 'open' : 'closed'\"\n aria-hidden=\"true\"\n >\n <svg\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 <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </CollapsibleTrigger>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAKA,MAAM,QAAQ;EAQd,MAAM,MAAM,sBAAqB;;uBAI/B,YAuBqB,MAAA,mBAAA,EAAA,EAvBA,OAAK,eAAE,MAAA,iBAAgB,CAAC,MAAA,IAAG,CAAC,QAAQ,MAAM,SAAO,EAAI,MAAM,OAAO,MAAM,YAAY,QAAO,CAAA,EAAA,EAAA;2BACtG,CAAR,WAAQ,KAAA,QAAA,UAAA,EACR,mBAoBO,QAAA;KAnBJ,OAAK,eAAE,MAAA,iBAAgB,CAAC,MAAA,IAAG,CAAC,QAAQ,MAAM,WAAS,EAAI,MAAM,YAAY,UAAS,CAAA;KAClF,cAAY,MAAA,IAAG,CAAC,OAAO,QAAK,SAAA;KAC7B,eAAY;sCAEZ,mBAcM,OAAA;KAbJ,OAAM;KACN,OAAM;KACN,QAAO;KACP,SAAQ;KACR,MAAK;KACL,QAAO;KACP,gBAAa;KACb,kBAAe;KACf,mBAAgB;KAChB,eAAY;KACZ,WAAU;QAEV,mBAAoC,YAAA,EAA1B,QAAO,kBAAgB,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,EAAA,IAAA,WAAA,CAAA,CAAA"}
|
|
@@ -69,7 +69,16 @@ var ComboBox_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
69
69
|
type: Function,
|
|
70
70
|
default: void 0
|
|
71
71
|
},
|
|
72
|
-
class: {
|
|
72
|
+
class: {
|
|
73
|
+
type: [
|
|
74
|
+
String,
|
|
75
|
+
Boolean,
|
|
76
|
+
null,
|
|
77
|
+
Object,
|
|
78
|
+
Array
|
|
79
|
+
],
|
|
80
|
+
default: void 0
|
|
81
|
+
},
|
|
73
82
|
classNames: { default: void 0 }
|
|
74
83
|
},
|
|
75
84
|
emits: ["update:modelValue", "update:open"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/combo-box/ComboBox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, toRef, useId, useSlots, watch } from 'vue'\nimport { ComboboxRoot } from 'reka-ui'\nimport { comboBoxVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useComboBoxProvide } from './ComboBox.context'\nimport { hasSlotComponent } from '../../utils/hasSlotComponent'\nimport ComboBoxInput from './ComboBoxInput.vue'\nimport ComboBoxContent from './ComboBoxContent.vue'\nimport ComboBoxItem from './ComboBoxItem.vue'\n\nexport interface ComboBoxItem {\n value: string\n label?: string\n textValue?: string\n isDisabled?: boolean\n}\n\nconst props = withDefaults(defineProps<{\n modelValue?: string\n defaultValue?: string\n open?: boolean\n defaultOpen?: boolean\n items?: ComboBoxItem[]\n label?: string\n placeholder?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isRequired?: boolean\n allowsCustomValue?: boolean\n fullWidth?: boolean\n /** Custom filter function: return true to include item */\n filterFunction?: (item: string, searchTerm: string) => boolean\n class?: ClassValue\n /** Override classes for individual slots */\n classNames?: Partial<{\n base: ClassValue\n }>\n}>(), {\n modelValue: undefined,\n defaultValue: undefined,\n open: undefined,\n defaultOpen: undefined,\n items: () => [],\n label: undefined,\n placeholder: undefined,\n description: undefined,\n errorMessage: undefined,\n isInvalid: false,\n isDisabled: false,\n isRequired: false,\n allowsCustomValue: false,\n fullWidth: false,\n filterFunction: undefined,\n class: undefined,\n classNames: undefined,\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: string]\n 'update:open': [value: boolean]\n}>()\n\nconst labelId = useId()\n\nconst slots = useSlots()\n// Compound chrome present → pass slot through (advanced). Otherwise render the\n// input/content/items internally (short-form).\nconst usesCustomChrome = computed(() =>\n hasSlotComponent(slots.default?.(), [ComboBoxInput, ComboBoxContent]),\n)\n\nconst slotFns = computed(() =>\n comboBoxVariants({\n fullWidth: props.fullWidth,\n })\n)\n\n// Default filter: case-insensitive substring match\nconst effectiveFilter = computed(() => {\n if (props.filterFunction) return props.filterFunction\n return (itemText: string, searchTerm: string): boolean =>\n itemText.toLowerCase().includes(searchTerm.toLowerCase())\n})\n\n// Registry for slot-rendered items: value → label (populated by ComboBoxItem at mount).\n// Replaced with a new Map instance on each mutation so Vue's ref() reactivity tracks changes.\nconst slotItemRegistry = ref(new Map<string, string>())\n\nfunction registerItem(value: string, label: string) {\n const next = new Map(slotItemRegistry.value)\n next.set(value, label)\n slotItemRegistry.value = next\n}\n\nfunction unregisterItem(value: string) {\n const next = new Map(slotItemRegistry.value)\n next.delete(value)\n slotItemRegistry.value = next\n}\n\n// Resolve a user-facing value (\"us\") to the label text used internally by Reka.\n// Priority: items prop entry > slot registry > identity fallback\nfunction labelFor(value: string | undefined): string {\n if (!value) return ''\n const item = props.items.find(i => i.value === value)\n if (item) return item.label ?? item.textValue ?? value\n return slotItemRegistry.value.get(value) ?? value\n}\n\n// Resolve a Reka-internal label text back to the user-facing value.\nfunction valueFor(label: string): string {\n if (!label) return ''\n // Check items prop first\n const item = props.items.find(i => (i.label ?? i.textValue ?? i.value) === label)\n if (item) return item.value\n // Check slot registry\n for (const [value, lbl] of slotItemRegistry.value) {\n if (lbl === label) return value\n }\n return label\n}\n\n// internalValue holds the label text that Reka sees as its modelValue.\n// This lets Reka write the label directly into the input without a displayValue function.\nconst internalValue = ref(labelFor(props.modelValue))\n\n// Map a stored value back to its human-readable label for the input display.\n// Used as a no-op pass-through since internalValue already holds the label.\nconst displayValue = computed(() => (val: string): string => val)\n\n// Parent → internal: when the user's v-model changes, resolve to label text\nwatch(() => props.modelValue, (val) => {\n const next = labelFor(val)\n if (internalValue.value !== next) internalValue.value = next\n})\n\n// Internal → parent: when Reka emits a label text (after selection), translate to real value\nfunction handleModelValueUpdate(emitted: string) {\n internalValue.value = emitted\n emit('update:modelValue', valueFor(emitted))\n}\n\n// When slot items register (children mount after parent), re-resolve internalValue.\n// This covers the case where modelValue is set before children have mounted.\nwatch(slotItemRegistry, () => {\n const next = labelFor(props.modelValue)\n if (next !== internalValue.value && valueFor(internalValue.value) === (props.modelValue ?? '')) {\n internalValue.value = next\n }\n})\n\nuseComboBoxProvide({\n isDisabled: toRef(props, 'isDisabled'),\n isInvalid: toRef(props, 'isInvalid'),\n fullWidth: toRef(props, 'fullWidth'),\n slots: slotFns,\n displayValue,\n registerItem,\n unregisterItem,\n})\n</script>\n\n<template>\n <div\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n :aria-invalid=\"props.isInvalid || undefined\"\n data-slot=\"combo-box\"\n >\n <label\n v-if=\"props.label\"\n :id=\"labelId\"\n data-slot=\"label\"\n >\n {{ props.label }}\n <span\n v-if=\"props.isRequired\"\n aria-hidden=\"true\"\n > *</span>\n </label>\n\n <ComboboxRoot\n v-model=\"internalValue\"\n :default-value=\"props.defaultValue ? labelFor(props.defaultValue) : undefined\"\n :open=\"props.open\"\n :default-open=\"props.defaultOpen\"\n :disabled=\"props.isDisabled\"\n :required=\"props.isRequired\"\n :filter-function=\"effectiveFilter\"\n @update:model-value=\"handleModelValueUpdate($event)\"\n @update:open=\"emit('update:open', $event)\"\n >\n <slot v-if=\"usesCustomChrome\" />\n <template v-else>\n <ComboBoxInput :placeholder=\"props.placeholder\" />\n <ComboBoxContent>\n <ComboBoxItem\n v-for=\"item in props.items\"\n :key=\"item.value\"\n :value=\"item.value\"\n :is-disabled=\"item.isDisabled\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n >{{ item.label ?? item.textValue ?? item.value }}</slot>\n </ComboBoxItem>\n </ComboBoxContent>\n </template>\n </ComboboxRoot>\n\n <div\n v-if=\"props.description || (props.isInvalid && props.errorMessage)\"\n data-slot=\"helper-wrapper\"\n >\n <p\n v-if=\"props.isInvalid && props.errorMessage\"\n data-slot=\"error-message\"\n aria-live=\"polite\"\n >\n {{ props.errorMessage }}\n </p>\n <p\n v-else-if=\"props.description\"\n data-slot=\"description\"\n >\n {{ props.description }}\n </p>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ;EA0Cd,MAAM,OAAO;EAKb,MAAM,UAAU,OAAM;EAEtB,MAAM,QAAQ,UAAS;EAGvB,MAAM,mBAAmB,eACvB,iBAAiB,MAAM,WAAW,EAAE,CAAC,uBAAe,wBAAgB,CAAC,CACvE;EAEA,MAAM,UAAU,eACd,iBAAiB,EACf,WAAW,MAAM,WAClB,CAAA,CACH;EAGA,MAAM,kBAAkB,eAAe;AACrC,OAAI,MAAM,eAAgB,QAAO,MAAM;AACvC,WAAQ,UAAkB,eACxB,SAAS,aAAa,CAAC,SAAS,WAAW,aAAa,CAAA;IAC3D;EAID,MAAM,mBAAmB,oBAAI,IAAI,KAAqB,CAAA;EAEtD,SAAS,aAAa,OAAe,OAAe;GAClD,MAAM,OAAO,IAAI,IAAI,iBAAiB,MAAK;AAC3C,QAAK,IAAI,OAAO,MAAK;AACrB,oBAAiB,QAAQ;;EAG3B,SAAS,eAAe,OAAe;GACrC,MAAM,OAAO,IAAI,IAAI,iBAAiB,MAAK;AAC3C,QAAK,OAAO,MAAK;AACjB,oBAAiB,QAAQ;;EAK3B,SAAS,SAAS,OAAmC;AACnD,OAAI,CAAC,MAAO,QAAO;GACnB,MAAM,OAAO,MAAM,MAAM,MAAK,MAAK,EAAE,UAAU,MAAK;AACpD,OAAI,KAAM,QAAO,KAAK,SAAS,KAAK,aAAa;AACjD,UAAO,iBAAiB,MAAM,IAAI,MAAM,IAAI;;EAI9C,SAAS,SAAS,OAAuB;AACvC,OAAI,CAAC,MAAO,QAAO;GAEnB,MAAM,OAAO,MAAM,MAAM,MAAK,OAAM,E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ue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, toRef, useId, useSlots, watch } from 'vue'\nimport { ComboboxRoot } from 'reka-ui'\nimport { comboBoxVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useComboBoxProvide } from './ComboBox.context'\nimport { hasSlotComponent } from '../../utils/hasSlotComponent'\nimport ComboBoxInput from './ComboBoxInput.vue'\nimport ComboBoxContent from './ComboBoxContent.vue'\nimport ComboBoxItem from './ComboBoxItem.vue'\n\nexport interface ComboBoxItem {\n value: string\n label?: string\n textValue?: string\n isDisabled?: boolean\n}\n\nconst props = withDefaults(defineProps<{\n modelValue?: string\n defaultValue?: string\n open?: boolean\n defaultOpen?: boolean\n items?: ComboBoxItem[]\n label?: string\n placeholder?: string\n description?: string\n errorMessage?: string\n isInvalid?: boolean\n isDisabled?: boolean\n isRequired?: boolean\n allowsCustomValue?: boolean\n fullWidth?: boolean\n /** Custom filter function: return true to include item */\n filterFunction?: (item: string, searchTerm: string) => boolean\n class?: ClassValue\n /** Override classes for individual slots */\n classNames?: Partial<{\n base: ClassValue\n }>\n}>(), {\n modelValue: undefined,\n defaultValue: undefined,\n open: undefined,\n defaultOpen: undefined,\n items: () => [],\n label: undefined,\n placeholder: undefined,\n description: undefined,\n errorMessage: undefined,\n isInvalid: false,\n isDisabled: false,\n isRequired: false,\n allowsCustomValue: false,\n fullWidth: false,\n filterFunction: undefined,\n class: undefined,\n classNames: undefined,\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: string]\n 'update:open': [value: boolean]\n}>()\n\nconst labelId = useId()\n\nconst slots = useSlots()\n// Compound chrome present → pass slot through (advanced). Otherwise render the\n// input/content/items internally (short-form).\nconst usesCustomChrome = computed(() =>\n hasSlotComponent(slots.default?.(), [ComboBoxInput, ComboBoxContent]),\n)\n\nconst slotFns = computed(() =>\n comboBoxVariants({\n fullWidth: props.fullWidth,\n })\n)\n\n// Default filter: case-insensitive substring match\nconst effectiveFilter = computed(() => {\n if (props.filterFunction) return props.filterFunction\n return (itemText: string, searchTerm: string): boolean =>\n itemText.toLowerCase().includes(searchTerm.toLowerCase())\n})\n\n// Registry for slot-rendered items: value → label (populated by ComboBoxItem at mount).\n// Replaced with a new Map instance on each mutation so Vue's ref() reactivity tracks changes.\nconst slotItemRegistry = ref(new Map<string, string>())\n\nfunction registerItem(value: string, label: string) {\n const next = new Map(slotItemRegistry.value)\n next.set(value, label)\n slotItemRegistry.value = next\n}\n\nfunction unregisterItem(value: string) {\n const next = new Map(slotItemRegistry.value)\n next.delete(value)\n slotItemRegistry.value = next\n}\n\n// Resolve a user-facing value (\"us\") to the label text used internally by Reka.\n// Priority: items prop entry > slot registry > identity fallback\nfunction labelFor(value: string | undefined): string {\n if (!value) return ''\n const item = props.items.find(i => i.value === value)\n if (item) return item.label ?? item.textValue ?? value\n return slotItemRegistry.value.get(value) ?? value\n}\n\n// Resolve a Reka-internal label text back to the user-facing value.\nfunction valueFor(label: string): string {\n if (!label) return ''\n // Check items prop first\n const item = props.items.find(i => (i.label ?? i.textValue ?? i.value) === label)\n if (item) return item.value\n // Check slot registry\n for (const [value, lbl] of slotItemRegistry.value) {\n if (lbl === label) return value\n }\n return label\n}\n\n// internalValue holds the label text that Reka sees as its modelValue.\n// This lets Reka write the label directly into the input without a displayValue function.\nconst internalValue = ref(labelFor(props.modelValue))\n\n// Map a stored value back to its human-readable label for the input display.\n// Used as a no-op pass-through since internalValue already holds the label.\nconst displayValue = computed(() => (val: string): string => val)\n\n// Parent → internal: when the user's v-model changes, resolve to label text\nwatch(() => props.modelValue, (val) => {\n const next = labelFor(val)\n if (internalValue.value !== next) internalValue.value = next\n})\n\n// Internal → parent: when Reka emits a label text (after selection), translate to real value\nfunction handleModelValueUpdate(emitted: string) {\n internalValue.value = emitted\n emit('update:modelValue', valueFor(emitted))\n}\n\n// When slot items register (children mount after parent), re-resolve internalValue.\n// This covers the case where modelValue is set before children have mounted.\nwatch(slotItemRegistry, () => {\n const next = labelFor(props.modelValue)\n if (next !== internalValue.value && valueFor(internalValue.value) === (props.modelValue ?? '')) {\n internalValue.value = next\n }\n})\n\nuseComboBoxProvide({\n isDisabled: toRef(props, 'isDisabled'),\n isInvalid: toRef(props, 'isInvalid'),\n fullWidth: toRef(props, 'fullWidth'),\n slots: slotFns,\n displayValue,\n registerItem,\n unregisterItem,\n})\n</script>\n\n<template>\n <div\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n :aria-invalid=\"props.isInvalid || undefined\"\n data-slot=\"combo-box\"\n >\n <label\n v-if=\"props.label\"\n :id=\"labelId\"\n data-slot=\"label\"\n >\n {{ props.label }}\n <span\n v-if=\"props.isRequired\"\n aria-hidden=\"true\"\n > *</span>\n </label>\n\n <ComboboxRoot\n v-model=\"internalValue\"\n :default-value=\"props.defaultValue ? labelFor(props.defaultValue) : undefined\"\n :open=\"props.open\"\n :default-open=\"props.defaultOpen\"\n :disabled=\"props.isDisabled\"\n :required=\"props.isRequired\"\n :filter-function=\"effectiveFilter\"\n @update:model-value=\"handleModelValueUpdate($event)\"\n @update:open=\"emit('update:open', $event)\"\n >\n <slot v-if=\"usesCustomChrome\" />\n <template v-else>\n <ComboBoxInput :placeholder=\"props.placeholder\" />\n <ComboBoxContent>\n <ComboBoxItem\n v-for=\"item in props.items\"\n :key=\"item.value\"\n :value=\"item.value\"\n :is-disabled=\"item.isDisabled\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n >{{ item.label ?? item.textValue ?? item.value }}</slot>\n </ComboBoxItem>\n </ComboBoxContent>\n </template>\n </ComboboxRoot>\n\n <div\n v-if=\"props.description || (props.isInvalid && props.errorMessage)\"\n data-slot=\"helper-wrapper\"\n >\n <p\n v-if=\"props.isInvalid && props.errorMessage\"\n data-slot=\"error-message\"\n aria-live=\"polite\"\n >\n {{ props.errorMessage }}\n </p>\n <p\n v-else-if=\"props.description\"\n data-slot=\"description\"\n >\n {{ props.description }}\n </p>\n </div>\n </div>\n</template>\n"],"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,MAAM;KACpB,UAAU,MAAM;KAChB,UAAU,MAAM;KAChB,mBAAiB,gBAAA;KAEjB,iBAAW,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,eAAgB,OAAM;;4BAER,CAApB,iBAAA,QAAZ,WAAgC,KAAA,QAAA,WAAA,EAAA,KAAA,GAAA,CAAA,IAAA,WAAA,EAChC,mBAeW,UAAA,EAAA,KAAA,GAAA,EAAA,CAdT,YAAkD,uBAAA,EAAlC,aAAa,MAAM,aAAA,EAAA,MAAA,GAAA,CAAA,cAAA,CAAA,EACnC,YAYkB,yBAAA,MAAA;6BAVa,EAAA,UAAA,KAAA,EAD7B,mBAUe,UAAA,MAAA,WATE,MAAM,QAAd,SAAI;2BADb,YAUe,sBAAA;QARZ,KAAK,KAAK;QACV,OAAO,KAAK;QACZ,eAAa,KAAK;;+BAKqC,CAHxD,WAGwD,KAAA,QAAA,QAAA,EAD/C,MAAI,QAC2C,CAAA,gBAAA,gBAApD,KAAK,SAAS,KAAK,aAAa,KAAK,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;IAO9C,MAAM,eAAgB,MAAM,aAAa,MAAM,gBAAA,WAAA,EADvD,mBAiBM,OAjBN,YAiBM,CAZI,MAAM,aAAa,MAAM,gBAAA,WAAA,EADjC,mBAMI,KANJ,YAMI,gBADC,MAAM,aAAY,EAAA,EAAA,IAGV,MAAM,eAAA,WAAA,EADnB,mBAKI,KALJ,YAKI,gBADC,MAAM,YAAW,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
|
|
@@ -54,7 +54,13 @@ var DateInput_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
54
54
|
label: {},
|
|
55
55
|
description: {},
|
|
56
56
|
errorMessage: {},
|
|
57
|
-
class: {
|
|
57
|
+
class: { type: [
|
|
58
|
+
String,
|
|
59
|
+
Boolean,
|
|
60
|
+
null,
|
|
61
|
+
Object,
|
|
62
|
+
Array
|
|
63
|
+
] },
|
|
58
64
|
classNames: {},
|
|
59
65
|
defaultValue: {},
|
|
60
66
|
placeholderValue: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/date-input/DateInput.vue"],"sourcesContent":["<!--\n DateInput — form-field mirror of Input.vue for @internationalized/date.\n\n Anatomy, data-attributes, floating-label behavior, start/end content\n slots, and a11y wiring all mirror Input.vue. See the Input.vue docblock\n for the canonical contract.\n-->\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useId, watch } from 'vue'\nimport { DateFieldRoot, DateFieldInput } from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport { dateInputVariants, type DateInputVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<Props>(), {\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})\n\nconst modelValue = defineModel<DateValue | null | undefined>()\n\ntype Props = {\n /** Visual style of the field. @default 'flat' */\n variant?: DateInputVariants['variant']\n /** Field height. @default 'md' */\n size?: DateInputVariants['size']\n /** Accent color applied to focus ring + floating label. @default 'default' */\n color?: DateInputVariants['color']\n /** Label placement relative to the field. @default 'inside' */\n labelPlacement?: DateInputVariants['labelPlacement']\n /** Stretches root wrapper to 100% width. @default false */\n fullWidth?: boolean\n /** Marks the field as invalid. @default false */\n isInvalid?: boolean\n /** Disables the field. @default false */\n isDisabled?: boolean\n /** Makes the field read-only. @default false */\n isReadOnly?: boolean\n /** Adds a required asterisk next to the label. @default false */\n isRequired?: boolean\n /** Field label. When omitted, floating-label behavior is skipped. */\n label?: string\n /** Helper text below the field. Suppressed when isInvalid && errorMessage is shown. */\n description?: string\n /** Error text below the field. Only rendered when isInvalid is true. */\n errorMessage?: string\n /** Extra classes merged onto the root wrapper. */\n class?: ClassValue\n /** Per-slot class overrides. */\n classNames?: Partial<{\n base: ClassValue\n label: ClassValue\n mainWrapper: ClassValue\n inputWrapper: ClassValue\n startContent: ClassValue\n segmentList: ClassValue\n segment: ClassValue\n endContent: ClassValue\n helperWrapper: ClassValue\n errorMessage: ClassValue\n description: ClassValue\n }>\n\n /* ─── DateInput-specific ──────────────────────────────────────── */\n defaultValue?: DateValue\n placeholderValue?: DateValue\n minValue?: DateValue\n maxValue?: DateValue\n granularity?: 'day' | 'hour' | 'minute' | 'second'\n hourCycle?: 12 | 24\n locale?: string\n name?: string\n hideTimeZone?: boolean\n}\n\nconst attrs = useAttrs()\nconst generatedId = useId()\nconst fieldId = computed(() => (attrs.id as string | undefined) ?? `${generatedId}-field`)\nconst labelId = computed(() => `${generatedId}-label`)\nconst descriptionId = computed(() => `${generatedId}-description`)\nconst errorMessageId = computed(() => `${generatedId}-error`)\n\nconst hasLabel = computed(() => !!props.label)\nconst isFilled = computed(() => modelValue.value != null)\n\nconst showError = computed(() => props.isInvalid && !!props.errorMessage)\nconst showDescription = computed(() => !!props.description && !showError.value)\nconst hasHelper = computed(() => showError.value || showDescription.value)\nconst ariaDescribedBy = computed(() => {\n if (showError.value) return errorMessageId.value\n if (showDescription.value) return descriptionId.value\n return undefined\n})\n\nconst fieldRef = ref<HTMLElement | null>(null)\n// Reka components expose their root DOM node via $el — unwrap before using DOM APIs.\nconst fieldEl = computed<HTMLElement | null>(() => {\n const r = fieldRef.value as unknown as { $el?: HTMLElement } | HTMLElement | null\n if (!r) return null\n if (r instanceof HTMLElement) return r\n return r.$el ?? null\n})\n\n// `isFocused` tracks focus on a DATE SEGMENT specifically — not any descendant.\n// This prevents nested interactive children (e.g. a DatePickerTrigger button in\n// endContent) from flipping the field into the focused visual state.\nconst isFocused = ref(false)\nfunction updateSegmentFocus() {\n const root = fieldEl.value\n if (!root) { isFocused.value = false; return }\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n isFocused.value = !!active\n && root.contains(active)\n && active.hasAttribute('data-reka-date-field-segment')\n}\nfunction onDocFocusIn() { updateSegmentFocus() }\nfunction onDocFocusOut() { queueMicrotask(updateSegmentFocus) }\n\n// Guard against a focus snap-back after an outside click. When the user\n// clicks outside the field, we mark a short-lived \"suppress segment focus\"\n// window. Any focusin landing on a segment inside that window gets blurred\n// immediately — kills the two-click-to-blur UX regardless of which internal\n// mechanism (Reka VisuallyHidden, label-for, contenteditable selection\n// restoration) tried to restore the focus.\nlet suppressSegmentFocusUntil = 0\nfunction onDocPointerDown(e: PointerEvent) {\n const root = fieldEl.value\n if (!root) return\n const target = e.target as Node | null\n if (!target || root.contains(target)) return\n suppressSegmentFocusUntil = performance.now() + 250\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n active.blur()\n }\n}\nfunction onDocFocusInGuard(e: FocusEvent) {\n if (performance.now() >= suppressSegmentFocusUntil) return\n const root = fieldEl.value\n if (!root) return\n const t = e.target as HTMLElement | null\n if (t && root.contains(t) && t.hasAttribute?.('data-reka-date-field-segment')) {\n t.blur()\n }\n}\n\nonMounted(() => {\n document.addEventListener('focusin', onDocFocusIn)\n document.addEventListener('focusout', onDocFocusOut)\n document.addEventListener('pointerdown', onDocPointerDown, true)\n document.addEventListener('focusin', onDocFocusInGuard, true)\n})\nonBeforeUnmount(() => {\n document.removeEventListener('focusin', onDocFocusIn)\n document.removeEventListener('focusout', onDocFocusOut)\n document.removeEventListener('pointerdown', onDocPointerDown, true)\n document.removeEventListener('focusin', onDocFocusInGuard, true)\n})\n\n// Track data-filled synchronously from the rendered segments — defaultValue +\n// isFilled from modelValue misses the uncontrolled case and the partially-typed\n// case. After each value/segment render, sniff any non-literal segment that\n// carries data-placeholder=\"false\".\nconst segmentsFilled = ref(false)\nfunction recomputeFilled() {\n const root = fieldEl.value\n if (!root || typeof root.querySelectorAll !== 'function') {\n segmentsFilled.value = false\n return\n }\n const segs = root.querySelectorAll('[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])')\n let anyFilled = false\n segs.forEach((el) => {\n if ((el as HTMLElement).dataset.placeholder === 'false') anyFilled = true\n })\n segmentsFilled.value = anyFilled\n}\nwatch([modelValue, () => props.defaultValue, () => props.granularity], () => {\n queueMicrotask(recomputeFilled)\n}, { immediate: true })\n\nconst effectiveFilled = computed(() => isFilled.value || segmentsFilled.value)\n\n// Only intervene on the INITIAL click that enters the field. Once a segment\n// already holds focus, leave subsequent mousedowns alone so the user can\n// blur naturally (clicking elsewhere) without focus snapping back to a\n// segment and requiring a second click.\nfunction handleFieldMousedown(e: MouseEvent) {\n const target = e.target as HTMLElement | null\n if (!target) return\n if (target.closest('[data-reka-date-field-segment]')) return\n if (target.closest('[data-slot=\"start-content\"]')) return\n if (target.closest('[data-slot=\"end-content\"]')) return\n if (target.closest('button, [role=\"button\"]')) return\n const root = fieldEl.value\n if (!root) return\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n return\n }\n const first = root.querySelector<HTMLElement>(\n '[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])',\n )\n if (first) {\n e.preventDefault()\n first.focus()\n }\n}\n\nconst slotFns = computed(() =>\n dateInputVariants({\n variant: props.variant,\n size: props.size,\n color: props.color,\n fullWidth: props.fullWidth,\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isReadonly: props.isReadOnly,\n hasLabel: hasLabel.value,\n labelPlacement: props.labelPlacement,\n }),\n)\n\nconst showOutsideLabel = computed(\n () => hasLabel.value && props.labelPlacement !== 'inside',\n)\nconst showInsideLabel = computed(\n () => hasLabel.value && props.labelPlacement === 'inside',\n)\n</script>\n\n<template>\n <div\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n :data-required=\"isRequired || undefined\"\n :data-has-label=\"hasLabel || undefined\"\n :data-has-helper=\"hasHelper || undefined\"\n >\n <label\n v-if=\"showOutsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <div :class=\"composeClassName(slotFns.mainWrapper(), props.classNames?.mainWrapper)\">\n <DateFieldRoot\n :id=\"fieldId\"\n ref=\"fieldRef\"\n v-model=\"modelValue\"\n :default-value=\"defaultValue\"\n :placeholder=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n :aria-labelledby=\"hasLabel ? labelId : undefined\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"isRequired || undefined\"\n :aria-invalid=\"isInvalid || undefined\"\n :class=\"composeClassName(slotFns.inputWrapper(), props.classNames?.inputWrapper)\"\n :data-filled=\"hasLabel ? (effectiveFilled || undefined) : undefined\"\n :data-focused=\"isFocused || undefined\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n @mousedown=\"handleFieldMousedown\"\n >\n <template #default=\"{ segments }\">\n <label\n v-if=\"showInsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <span\n v-if=\"$slots.startContent\"\n :class=\"composeClassName(slotFns.startContent(), props.classNames?.startContent)\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n\n <div\n :class=\"composeClassName(slotFns.segmentList(), props.classNames?.segmentList)\"\n data-slot=\"segment-list\"\n >\n <template\n v-for=\"(segment, _i) in segments\"\n :key=\"_i\"\n >\n <DateFieldInput\n :part=\"segment.part\"\n :class=\"composeClassName(slotFns.segment(), props.classNames?.segment)\"\n >\n {{ segment.value }}\n </DateFieldInput>\n </template>\n </div>\n\n <span\n v-if=\"$slots.endContent\"\n :class=\"composeClassName(slotFns.endContent(), props.classNames?.endContent)\"\n data-slot=\"end-content\"\n >\n <slot name=\"endContent\" />\n </span>\n </template>\n </DateFieldRoot>\n\n <div\n v-if=\"hasHelper\"\n :class=\"composeClassName(slotFns.helperWrapper(), props.classNames?.helperWrapper)\"\n >\n <div\n v-if=\"showError\"\n :id=\"errorMessageId\"\n :class=\"composeClassName(slotFns.errorMessage(), props.classNames?.errorMessage)\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n <div\n v-else-if=\"showDescription\"\n :id=\"descriptionId\"\n :class=\"composeClassName(slotFns.description(), props.classNames?.description)\"\n >\n {{ description }}\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAad,MAAM,aAAa,SAAyC,SAAA,aAAC;EAwD7D,MAAM,QAAQ,UAAS;EACvB,MAAM,cAAc,OAAM;EAC1B,MAAM,UAAU,eAAgB,MAAM,MAA6B,GAAG,YAAY,QAAO;EACzF,MAAM,UAAU,eAAe,GAAG,YAAY,QAAO;EACrD,MAAM,gBAAgB,eAAe,GAAG,YAAY,cAAa;EACjE,MAAM,iBAAiB,eAAe,GAAG,YAAY,QAAO;EAE5D,MAAM,WAAW,eAAe,CAAC,CAAC,MAAM,MAAK;EAC7C,MAAM,WAAW,eAAe,WAAW,SAAS,KAAI;EAEx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1E,QAAA,YAAW,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"DateInput.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/date-input/DateInput.vue"],"sourcesContent":["<!--\n DateInput — form-field mirror of Input.vue for @internationalized/date.\n\n Anatomy, data-attributes, floating-label behavior, start/end content\n slots, and a11y wiring all mirror Input.vue. See the Input.vue docblock\n for the canonical contract.\n-->\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useId, watch } from 'vue'\nimport { DateFieldRoot, DateFieldInput } from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport { dateInputVariants, type DateInputVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<Props>(), {\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})\n\nconst modelValue = defineModel<DateValue | null | undefined>()\n\ntype Props = {\n /** Visual style of the field. @default 'flat' */\n variant?: DateInputVariants['variant']\n /** Field height. @default 'md' */\n size?: DateInputVariants['size']\n /** Accent color applied to focus ring + floating label. @default 'default' */\n color?: DateInputVariants['color']\n /** Label placement relative to the field. @default 'inside' */\n labelPlacement?: DateInputVariants['labelPlacement']\n /** Stretches root wrapper to 100% width. @default false */\n fullWidth?: boolean\n /** Marks the field as invalid. @default false */\n isInvalid?: boolean\n /** Disables the field. @default false */\n isDisabled?: boolean\n /** Makes the field read-only. @default false */\n isReadOnly?: boolean\n /** Adds a required asterisk next to the label. @default false */\n isRequired?: boolean\n /** Field label. When omitted, floating-label behavior is skipped. */\n label?: string\n /** Helper text below the field. Suppressed when isInvalid && errorMessage is shown. */\n description?: string\n /** Error text below the field. Only rendered when isInvalid is true. */\n errorMessage?: string\n /** Extra classes merged onto the root wrapper. */\n class?: ClassValue\n /** Per-slot class overrides. */\n classNames?: Partial<{\n base: ClassValue\n label: ClassValue\n mainWrapper: ClassValue\n inputWrapper: ClassValue\n startContent: ClassValue\n segmentList: ClassValue\n segment: ClassValue\n endContent: ClassValue\n helperWrapper: ClassValue\n errorMessage: ClassValue\n description: ClassValue\n }>\n\n /* ─── DateInput-specific ──────────────────────────────────────── */\n defaultValue?: DateValue\n placeholderValue?: DateValue\n minValue?: DateValue\n maxValue?: DateValue\n granularity?: 'day' | 'hour' | 'minute' | 'second'\n hourCycle?: 12 | 24\n locale?: string\n name?: string\n hideTimeZone?: boolean\n}\n\nconst attrs = useAttrs()\nconst generatedId = useId()\nconst fieldId = computed(() => (attrs.id as string | undefined) ?? `${generatedId}-field`)\nconst labelId = computed(() => `${generatedId}-label`)\nconst descriptionId = computed(() => `${generatedId}-description`)\nconst errorMessageId = computed(() => `${generatedId}-error`)\n\nconst hasLabel = computed(() => !!props.label)\nconst isFilled = computed(() => modelValue.value != null)\n\nconst showError = computed(() => props.isInvalid && !!props.errorMessage)\nconst showDescription = computed(() => !!props.description && !showError.value)\nconst hasHelper = computed(() => showError.value || showDescription.value)\nconst ariaDescribedBy = computed(() => {\n if (showError.value) return errorMessageId.value\n if (showDescription.value) return descriptionId.value\n return undefined\n})\n\nconst fieldRef = ref<HTMLElement | null>(null)\n// Reka components expose their root DOM node via $el — unwrap before using DOM APIs.\nconst fieldEl = computed<HTMLElement | null>(() => {\n const r = fieldRef.value as unknown as { $el?: HTMLElement } | HTMLElement | null\n if (!r) return null\n if (r instanceof HTMLElement) return r\n return r.$el ?? null\n})\n\n// `isFocused` tracks focus on a DATE SEGMENT specifically — not any descendant.\n// This prevents nested interactive children (e.g. a DatePickerTrigger button in\n// endContent) from flipping the field into the focused visual state.\nconst isFocused = ref(false)\nfunction updateSegmentFocus() {\n const root = fieldEl.value\n if (!root) { isFocused.value = false; return }\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n isFocused.value = !!active\n && root.contains(active)\n && active.hasAttribute('data-reka-date-field-segment')\n}\nfunction onDocFocusIn() { updateSegmentFocus() }\nfunction onDocFocusOut() { queueMicrotask(updateSegmentFocus) }\n\n// Guard against a focus snap-back after an outside click. When the user\n// clicks outside the field, we mark a short-lived \"suppress segment focus\"\n// window. Any focusin landing on a segment inside that window gets blurred\n// immediately — kills the two-click-to-blur UX regardless of which internal\n// mechanism (Reka VisuallyHidden, label-for, contenteditable selection\n// restoration) tried to restore the focus.\nlet suppressSegmentFocusUntil = 0\nfunction onDocPointerDown(e: PointerEvent) {\n const root = fieldEl.value\n if (!root) return\n const target = e.target as Node | null\n if (!target || root.contains(target)) return\n suppressSegmentFocusUntil = performance.now() + 250\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n active.blur()\n }\n}\nfunction onDocFocusInGuard(e: FocusEvent) {\n if (performance.now() >= suppressSegmentFocusUntil) return\n const root = fieldEl.value\n if (!root) return\n const t = e.target as HTMLElement | null\n if (t && root.contains(t) && t.hasAttribute?.('data-reka-date-field-segment')) {\n t.blur()\n }\n}\n\nonMounted(() => {\n document.addEventListener('focusin', onDocFocusIn)\n document.addEventListener('focusout', onDocFocusOut)\n document.addEventListener('pointerdown', onDocPointerDown, true)\n document.addEventListener('focusin', onDocFocusInGuard, true)\n})\nonBeforeUnmount(() => {\n document.removeEventListener('focusin', onDocFocusIn)\n document.removeEventListener('focusout', onDocFocusOut)\n document.removeEventListener('pointerdown', onDocPointerDown, true)\n document.removeEventListener('focusin', onDocFocusInGuard, true)\n})\n\n// Track data-filled synchronously from the rendered segments — defaultValue +\n// isFilled from modelValue misses the uncontrolled case and the partially-typed\n// case. After each value/segment render, sniff any non-literal segment that\n// carries data-placeholder=\"false\".\nconst segmentsFilled = ref(false)\nfunction recomputeFilled() {\n const root = fieldEl.value\n if (!root || typeof root.querySelectorAll !== 'function') {\n segmentsFilled.value = false\n return\n }\n const segs = root.querySelectorAll('[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])')\n let anyFilled = false\n segs.forEach((el) => {\n if ((el as HTMLElement).dataset.placeholder === 'false') anyFilled = true\n })\n segmentsFilled.value = anyFilled\n}\nwatch([modelValue, () => props.defaultValue, () => props.granularity], () => {\n queueMicrotask(recomputeFilled)\n}, { immediate: true })\n\nconst effectiveFilled = computed(() => isFilled.value || segmentsFilled.value)\n\n// Only intervene on the INITIAL click that enters the field. Once a segment\n// already holds focus, leave subsequent mousedowns alone so the user can\n// blur naturally (clicking elsewhere) without focus snapping back to a\n// segment and requiring a second click.\nfunction handleFieldMousedown(e: MouseEvent) {\n const target = e.target as HTMLElement | null\n if (!target) return\n if (target.closest('[data-reka-date-field-segment]')) return\n if (target.closest('[data-slot=\"start-content\"]')) return\n if (target.closest('[data-slot=\"end-content\"]')) return\n if (target.closest('button, [role=\"button\"]')) return\n const root = fieldEl.value\n if (!root) return\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n return\n }\n const first = root.querySelector<HTMLElement>(\n '[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])',\n )\n if (first) {\n e.preventDefault()\n first.focus()\n }\n}\n\nconst slotFns = computed(() =>\n dateInputVariants({\n variant: props.variant,\n size: props.size,\n color: props.color,\n fullWidth: props.fullWidth,\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isReadonly: props.isReadOnly,\n hasLabel: hasLabel.value,\n labelPlacement: props.labelPlacement,\n }),\n)\n\nconst showOutsideLabel = computed(\n () => hasLabel.value && props.labelPlacement !== 'inside',\n)\nconst showInsideLabel = computed(\n () => hasLabel.value && props.labelPlacement === 'inside',\n)\n</script>\n\n<template>\n <div\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n :data-required=\"isRequired || undefined\"\n :data-has-label=\"hasLabel || undefined\"\n :data-has-helper=\"hasHelper || undefined\"\n >\n <label\n v-if=\"showOutsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <div :class=\"composeClassName(slotFns.mainWrapper(), props.classNames?.mainWrapper)\">\n <DateFieldRoot\n :id=\"fieldId\"\n ref=\"fieldRef\"\n v-model=\"modelValue\"\n :default-value=\"defaultValue\"\n :placeholder=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n :aria-labelledby=\"hasLabel ? labelId : undefined\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"isRequired || undefined\"\n :aria-invalid=\"isInvalid || undefined\"\n :class=\"composeClassName(slotFns.inputWrapper(), props.classNames?.inputWrapper)\"\n :data-filled=\"hasLabel ? (effectiveFilled || undefined) : undefined\"\n :data-focused=\"isFocused || undefined\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n @mousedown=\"handleFieldMousedown\"\n >\n <template #default=\"{ segments }\">\n <label\n v-if=\"showInsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <span\n v-if=\"$slots.startContent\"\n :class=\"composeClassName(slotFns.startContent(), props.classNames?.startContent)\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n\n <div\n :class=\"composeClassName(slotFns.segmentList(), props.classNames?.segmentList)\"\n data-slot=\"segment-list\"\n >\n <template\n v-for=\"(segment, _i) in segments\"\n :key=\"_i\"\n >\n <DateFieldInput\n :part=\"segment.part\"\n :class=\"composeClassName(slotFns.segment(), props.classNames?.segment)\"\n >\n {{ segment.value }}\n </DateFieldInput>\n </template>\n </div>\n\n <span\n v-if=\"$slots.endContent\"\n :class=\"composeClassName(slotFns.endContent(), props.classNames?.endContent)\"\n data-slot=\"end-content\"\n >\n <slot name=\"endContent\" />\n </span>\n </template>\n </DateFieldRoot>\n\n <div\n v-if=\"hasHelper\"\n :class=\"composeClassName(slotFns.helperWrapper(), props.classNames?.helperWrapper)\"\n >\n <div\n v-if=\"showError\"\n :id=\"errorMessageId\"\n :class=\"composeClassName(slotFns.errorMessage(), props.classNames?.errorMessage)\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n <div\n v-else-if=\"showDescription\"\n :id=\"descriptionId\"\n :class=\"composeClassName(slotFns.description(), props.classNames?.description)\"\n >\n {{ description }}\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAad,MAAM,aAAa,SAAyC,SAAA,aAAC;EAwD7D,MAAM,QAAQ,UAAS;EACvB,MAAM,cAAc,OAAM;EAC1B,MAAM,UAAU,eAAgB,MAAM,MAA6B,GAAG,YAAY,QAAO;EACzF,MAAM,UAAU,eAAe,GAAG,YAAY,QAAO;EACrD,MAAM,gBAAgB,eAAe,GAAG,YAAY,cAAa;EACjE,MAAM,iBAAiB,eAAe,GAAG,YAAY,QAAO;EAE5D,MAAM,WAAW,eAAe,CAAC,CAAC,MAAM,MAAK;EAC7C,MAAM,WAAW,eAAe,W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AY,YAAW,CAAA;sBAE1E,QAAA,YAAW,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
@@ -63,7 +63,13 @@ var DatePicker_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
63
63
|
type: Boolean,
|
|
64
64
|
default: false
|
|
65
65
|
},
|
|
66
|
-
class: {
|
|
66
|
+
class: { type: [
|
|
67
|
+
String,
|
|
68
|
+
Boolean,
|
|
69
|
+
null,
|
|
70
|
+
Object,
|
|
71
|
+
Array
|
|
72
|
+
] },
|
|
67
73
|
classNames: {}
|
|
68
74
|
}, {
|
|
69
75
|
"modelValue": {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/date-picker/DatePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n DatePickerRoot,\n DatePickerTrigger,\n DatePickerContent,\n} from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport type { CalendarDateTime, ZonedDateTime } from '@internationalized/date'\nimport { datePickerVariants, type DateInputVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport Calendar from '../calendar/Calendar.vue'\nimport DateInput from '../date-input/DateInput.vue'\n\nconst props = withDefaults(defineProps<{\n /* Field appearance — forwarded to DateInput */\n variant?: DateInputVariants['variant']\n size?: DateInputVariants['size']\n color?: DateInputVariants['color']\n labelPlacement?: DateInputVariants['labelPlacement']\n fullWidth?: boolean\n\n defaultValue?: DateValue\n defaultOpen?: boolean\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 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 class?: ClassValue\n /** Override classes for individual slots (base, trigger, triggerIndicator, popover) */\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 modelValue = defineModel<DateValue | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open')\n\nconst slotFns = computed(() => datePickerVariants())\n\n// Sync Calendar's `DateValue` v-model with DatePicker's `DateValue | null` model,\n// and close the popover on selection when closeOnSelect is enabled.\n// When the current value carries a time component (CalendarDateTime / ZonedDateTime),\n// preserve it so clicking a date in the calendar doesn't wipe out the time the user\n// typed into the field segments.\nconst calendarValue = computed<DateValue | undefined>({\n get: () => modelValue.value ?? undefined,\n set: (val) => {\n if (val != null && modelValue.value != null && 'hour' in modelValue.value) {\n const existing = modelValue.value as CalendarDateTime | ZonedDateTime\n modelValue.value = existing.set({ year: val.year, month: val.month, day: val.day })\n } else {\n modelValue.value = val ?? null\n }\n if (props.closeOnSelect && val != null) {\n openModel.value = false\n }\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 :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 :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :number-of-months=\"visibleMonths\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-picker\"\n >\n <!-- DateInput hosts label/helper/field; trigger sits in its endContent slot -->\n <DateInput\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 <DatePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n aria-label=\"Open date 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 <!-- Popover (portaled + positioned by Reka) -->\n <DatePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"8\"\n >\n <slot name=\"calendarTopContent\" />\n\n <Calendar\n v-model=\"calendarValue\"\n :default-value=\"defaultValue\"\n :default-placeholder=\"placeholderValue ?? defaultValue\"\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 </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/date-picker/DatePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n DatePickerRoot,\n DatePickerTrigger,\n DatePickerContent,\n} from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport type { CalendarDateTime, ZonedDateTime } from '@internationalized/date'\nimport { datePickerVariants, type DateInputVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport Calendar from '../calendar/Calendar.vue'\nimport DateInput from '../date-input/DateInput.vue'\n\nconst props = withDefaults(defineProps<{\n /* Field appearance — forwarded to DateInput */\n variant?: DateInputVariants['variant']\n size?: DateInputVariants['size']\n color?: DateInputVariants['color']\n labelPlacement?: DateInputVariants['labelPlacement']\n fullWidth?: boolean\n\n defaultValue?: DateValue\n defaultOpen?: boolean\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 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 class?: ClassValue\n /** Override classes for individual slots (base, trigger, triggerIndicator, popover) */\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 modelValue = defineModel<DateValue | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open')\n\nconst slotFns = computed(() => datePickerVariants())\n\n// Sync Calendar's `DateValue` v-model with DatePicker's `DateValue | null` model,\n// and close the popover on selection when closeOnSelect is enabled.\n// When the current value carries a time component (CalendarDateTime / ZonedDateTime),\n// preserve it so clicking a date in the calendar doesn't wipe out the time the user\n// typed into the field segments.\nconst calendarValue = computed<DateValue | undefined>({\n get: () => modelValue.value ?? undefined,\n set: (val) => {\n if (val != null && modelValue.value != null && 'hour' in modelValue.value) {\n const existing = modelValue.value as CalendarDateTime | ZonedDateTime\n modelValue.value = existing.set({ year: val.year, month: val.month, day: val.day })\n } else {\n modelValue.value = val ?? null\n }\n if (props.closeOnSelect && val != null) {\n openModel.value = false\n }\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 :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 :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :number-of-months=\"visibleMonths\"\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n data-slot=\"date-picker\"\n >\n <!-- DateInput hosts label/helper/field; trigger sits in its endContent slot -->\n <DateInput\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 <DatePickerTrigger\n :class=\"composeClassName(slotFns.trigger(), props.classNames?.trigger)\"\n aria-label=\"Open date 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 <!-- Popover (portaled + positioned by Reka) -->\n <DatePickerContent\n :class=\"composeClassName(slotFns.popover(), props.classNames?.popover)\"\n data-slot=\"popover\"\n :side-offset=\"8\"\n >\n <slot name=\"calendarTopContent\" />\n\n <Calendar\n v-model=\"calendarValue\"\n :default-value=\"defaultValue\"\n :default-placeholder=\"placeholderValue ?? defaultValue\"\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 </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAM,QAAQ;EAwDd,MAAM,aAAa,SAAyC,SAAC,aAAY;EACzE,MAAM,YAAY,SAAoB,SAAC,OAAM;EAE7C,MAAM,UAAU,eAAe,oBAAoB,CAAA;EAOnD,MAAM,gBAAgB,SAAgC;GACpD,WAAW,WAAW,SAAS,KAAA;GAC/B,MAAM,QAAQ;AACZ,QAAI,OAAO,QAAQ,WAAW,SAAS,QAAQ,UAAU,WAAW,MAElE,YAAW,QADM,WAAW,MACA,IAAI;KAAE,MAAM,IAAI;KAAM,OAAO,IAAI;KAAO,KAAK,IAAI;KAAK,CAAA;QAElF,YAAW,QAAQ,OAAO;AAE5B,QAAI,MAAM,iBAAiB,OAAO,KAChC,WAAU,QAAQ;;GAGvB,CAAA;;uBAIC,YA0HiB,MAAA,eAAA,EAAA;gBAzHN,WAAA;4EAAU,QAAA;IACX,MAAM,UAAA;qEAAS,QAAA;IACtB,iBAAe,QAAA;IACf,gBAAc,QAAA;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L,QAAO;OACP,gBAAa;OACb,kBAAe;OACf,mBAAgB;OAChB,eAAY;OACZ,WAAU;;OAEV,mBAOE,QAAA;QANA,GAAE;QACF,GAAE;QACF,OAAM;QACN,QAAO;QACP,IAAG;QACH,IAAG;;OAEL,mBAKE,QAAA;QAJA,IAAG;QACH,IAAG;QACH,IAAG;QACH,IAAG;;OAEL,mBAKE,QAAA;QAJA,IAAG;QACH,IAAG;QACH,IAAG;QACH,IAAG;;OAEL,mBAKE,QAAA;QAJA,IAAG;QACH,IAAG;QACH,IAAG;QACH,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QASf,YAsBoB,MAAA,kBAAA,EAAA;KArBjB,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,SAAO,EAAI,MAAM,YAAY,QAAO,CAAA;KACrE,aAAU;KACT,eAAa;;4BAEoB;MAAlC,WAAkC,KAAA,QAAA,qBAAA;MAElC,YAYE,kBAAA;mBAXS,cAAA;kFAAa,QAAA;OACrB,iBAAe,QAAA;OACf,uBAAqB,QAAA,oBAAoB,QAAA;OACzC,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"}
|
package/dist/components/date-range-field/DateRangeField.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -54,7 +54,13 @@ var DateRangeField_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
54
54
|
label: {},
|
|
55
55
|
description: {},
|
|
56
56
|
errorMessage: {},
|
|
57
|
-
class: {
|
|
57
|
+
class: { type: [
|
|
58
|
+
String,
|
|
59
|
+
Boolean,
|
|
60
|
+
null,
|
|
61
|
+
Object,
|
|
62
|
+
Array
|
|
63
|
+
] },
|
|
58
64
|
classNames: {},
|
|
59
65
|
defaultValue: {},
|
|
60
66
|
placeholderValue: {},
|
package/dist/components/date-range-field/DateRangeField.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeField.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/date-range-field/DateRangeField.vue"],"sourcesContent":["<!--\n DateRangeField — form-field mirror of DateInput.vue for a date range.\n\n Same prop surface, data-attribute contract, floating-label behavior,\n start/end content slots, and a11y wiring as DateInput. Renders TWO\n segment lists (start + end) separated by a visible \"–\" glyph.\n-->\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useId, watch } from 'vue'\nimport { DateRangeFieldRoot, DateRangeFieldInput } from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport { dateRangeFieldVariants, type DateRangeFieldVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<Props>(), {\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})\n\nconst modelValue = defineModel<DateRange | null | undefined>()\n\nexport interface DateRange {\n start: DateValue\n end: DateValue\n}\n\ntype Props = {\n /** Visual style of the field. @default 'flat' */\n variant?: DateRangeFieldVariants['variant']\n /** Field height. @default 'md' */\n size?: DateRangeFieldVariants['size']\n /** Accent color applied to focus ring + floating label. @default 'default' */\n color?: DateRangeFieldVariants['color']\n /** Label placement relative to the field. @default 'inside' */\n labelPlacement?: DateRangeFieldVariants['labelPlacement']\n /** Stretches root wrapper to 100% width. @default false */\n fullWidth?: boolean\n /** Marks the field as invalid. @default false */\n isInvalid?: boolean\n /** Disables the field. @default false */\n isDisabled?: boolean\n /** Makes the field read-only. @default false */\n isReadOnly?: boolean\n /** Adds a required asterisk next to the label. @default false */\n isRequired?: boolean\n /** Field label. When omitted, floating-label behavior is skipped. */\n label?: string\n /** Helper text below the field. Suppressed when isInvalid && errorMessage is shown. */\n description?: string\n /** Error text below the field. Only rendered when isInvalid is true. */\n errorMessage?: string\n /** Extra classes merged onto the root wrapper. */\n class?: ClassValue\n /** Per-slot class overrides. Merged with tailwind-variants styles. */\n classNames?: Partial<{\n base: ClassValue\n label: ClassValue\n mainWrapper: ClassValue\n inputWrapper: ClassValue\n startContent: ClassValue\n segmentList: ClassValue\n segment: ClassValue\n separator: ClassValue\n endContent: ClassValue\n helperWrapper: ClassValue\n errorMessage: ClassValue\n description: ClassValue\n }>\n\n /* ─── DateRangeField-specific ─────────────────────────────────── */\n defaultValue?: DateRange\n placeholderValue?: DateValue\n minValue?: DateValue\n maxValue?: DateValue\n granularity?: 'day' | 'hour' | 'minute' | 'second'\n hourCycle?: 12 | 24\n locale?: string\n name?: string\n hideTimeZone?: boolean\n}\n\nconst attrs = useAttrs()\nconst generatedId = useId()\nconst fieldId = computed(() => (attrs.id as string | undefined) ?? `${generatedId}-field`)\nconst labelId = computed(() => `${generatedId}-label`)\nconst descriptionId = computed(() => `${generatedId}-description`)\nconst errorMessageId = computed(() => `${generatedId}-error`)\n\nconst hasLabel = computed(() => !!props.label)\nconst isFilled = computed(() => modelValue.value?.start != null || modelValue.value?.end != null)\n\nconst showError = computed(() => props.isInvalid && !!props.errorMessage)\nconst showDescription = computed(() => !!props.description && !showError.value)\nconst hasHelper = computed(() => showError.value || showDescription.value)\nconst ariaDescribedBy = computed(() => {\n if (showError.value) return errorMessageId.value\n if (showDescription.value) return descriptionId.value\n return undefined\n})\n\nconst fieldRef = ref<HTMLElement | null>(null)\nconst fieldEl = computed<HTMLElement | null>(() => {\n const r = fieldRef.value as unknown as { $el?: HTMLElement } | HTMLElement | null\n if (!r) return null\n if (r instanceof HTMLElement) return r\n return r.$el ?? null\n})\n\n// `isFocused` tracks focus on a DATE SEGMENT specifically — not any descendant.\nconst isFocused = ref(false)\nfunction updateSegmentFocus() {\n const root = fieldEl.value\n if (!root) { isFocused.value = false; return }\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n isFocused.value = !!active\n && root.contains(active)\n && active.hasAttribute('data-reka-date-field-segment')\n}\nfunction onDocFocusIn() { updateSegmentFocus() }\nfunction onDocFocusOut() { queueMicrotask(updateSegmentFocus) }\n\n// Guard against focus snap-back after an outside click.\nlet suppressSegmentFocusUntil = 0\nfunction onDocPointerDown(e: PointerEvent) {\n const root = fieldEl.value\n if (!root) return\n const target = e.target as Node | null\n if (!target || root.contains(target)) return\n suppressSegmentFocusUntil = performance.now() + 250\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n active.blur()\n }\n}\nfunction onDocFocusInGuard(e: FocusEvent) {\n if (performance.now() >= suppressSegmentFocusUntil) return\n const root = fieldEl.value\n if (!root) return\n const t = e.target as HTMLElement | null\n if (t && root.contains(t) && t.hasAttribute?.('data-reka-date-field-segment')) {\n t.blur()\n }\n}\n\nonMounted(() => {\n document.addEventListener('focusin', onDocFocusIn)\n document.addEventListener('focusout', onDocFocusOut)\n document.addEventListener('pointerdown', onDocPointerDown, true)\n document.addEventListener('focusin', onDocFocusInGuard, true)\n})\nonBeforeUnmount(() => {\n document.removeEventListener('focusin', onDocFocusIn)\n document.removeEventListener('focusout', onDocFocusOut)\n document.removeEventListener('pointerdown', onDocPointerDown, true)\n document.removeEventListener('focusin', onDocFocusInGuard, true)\n})\n\n// Track data-filled by sniffing rendered segments across BOTH segment lists.\nconst segmentsFilled = ref(false)\nfunction recomputeFilled() {\n const root = fieldEl.value\n if (!root || typeof root.querySelectorAll !== 'function') {\n segmentsFilled.value = false\n return\n }\n const segs = root.querySelectorAll('[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])')\n let anyFilled = false\n segs.forEach((el) => {\n if ((el as HTMLElement).dataset.placeholder === 'false') anyFilled = true\n })\n segmentsFilled.value = anyFilled\n}\nwatch([modelValue, () => props.defaultValue, () => props.granularity], () => {\n queueMicrotask(recomputeFilled)\n}, { immediate: true })\n\nconst effectiveFilled = computed(() => isFilled.value || segmentsFilled.value)\n\nfunction handleFieldMousedown(e: MouseEvent) {\n const target = e.target as HTMLElement | null\n if (!target) return\n if (target.closest('[data-reka-date-field-segment]')) return\n if (target.closest('[data-slot=\"start-content\"]')) return\n if (target.closest('[data-slot=\"end-content\"]')) return\n if (target.closest('button, [role=\"button\"]')) return\n const root = fieldEl.value\n if (!root) return\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n return\n }\n const first = root.querySelector<HTMLElement>(\n '[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])',\n )\n if (first) {\n e.preventDefault()\n first.focus()\n }\n}\n\nconst slotFns = computed(() =>\n dateRangeFieldVariants({\n variant: props.variant,\n size: props.size,\n color: props.color,\n fullWidth: props.fullWidth,\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isReadonly: props.isReadOnly,\n hasLabel: hasLabel.value,\n labelPlacement: props.labelPlacement,\n }),\n)\n\nconst showOutsideLabel = computed(\n () => hasLabel.value && props.labelPlacement !== 'inside',\n)\nconst showInsideLabel = computed(\n () => hasLabel.value && props.labelPlacement === 'inside',\n)\n</script>\n\n<template>\n <div\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n :data-required=\"isRequired || undefined\"\n :data-has-label=\"hasLabel || undefined\"\n :data-has-helper=\"hasHelper || undefined\"\n data-slot=\"date-range-field\"\n >\n <label\n v-if=\"showOutsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <div :class=\"composeClassName(slotFns.mainWrapper(), props.classNames?.mainWrapper)\">\n <DateRangeFieldRoot\n :id=\"fieldId\"\n ref=\"fieldRef\"\n v-model=\"modelValue\"\n :default-value=\"defaultValue\"\n :placeholder=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n :aria-labelledby=\"hasLabel ? labelId : undefined\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"isRequired || undefined\"\n :aria-invalid=\"isInvalid || undefined\"\n :class=\"composeClassName(slotFns.inputWrapper(), props.classNames?.inputWrapper)\"\n :data-filled=\"hasLabel ? (effectiveFilled || undefined) : undefined\"\n :data-focused=\"isFocused || undefined\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n @mousedown=\"handleFieldMousedown\"\n >\n <template #default=\"{ segments }\">\n <label\n v-if=\"showInsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <span\n v-if=\"$slots.startContent\"\n :class=\"composeClassName(slotFns.startContent(), props.classNames?.startContent)\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n\n <div\n :class=\"composeClassName(slotFns.segmentList(), props.classNames?.segmentList)\"\n data-slot=\"segment-list\"\n data-type=\"start\"\n >\n <template\n v-for=\"(segment, _i) in segments.start\"\n :key=\"`start-${_i}`\"\n >\n <DateRangeFieldInput\n :part=\"segment.part\"\n type=\"start\"\n :class=\"composeClassName(slotFns.segment(), props.classNames?.segment)\"\n >\n {{ segment.value }}\n </DateRangeFieldInput>\n </template>\n </div>\n\n <span\n :class=\"composeClassName(slotFns.separator(), props.classNames?.separator)\"\n aria-hidden=\"true\"\n data-slot=\"separator\"\n >–</span>\n\n <div\n :class=\"composeClassName(slotFns.segmentList(), props.classNames?.segmentList)\"\n data-slot=\"segment-list\"\n data-type=\"end\"\n >\n <template\n v-for=\"(segment, _i) in segments.end\"\n :key=\"`end-${_i}`\"\n >\n <DateRangeFieldInput\n :part=\"segment.part\"\n type=\"end\"\n :class=\"composeClassName(slotFns.segment(), props.classNames?.segment)\"\n >\n {{ segment.value }}\n </DateRangeFieldInput>\n </template>\n </div>\n\n <span\n v-if=\"$slots.endContent\"\n :class=\"composeClassName(slotFns.endContent(), props.classNames?.endContent)\"\n data-slot=\"end-content\"\n >\n <slot name=\"endContent\" />\n </span>\n </template>\n </DateRangeFieldRoot>\n\n <div\n v-if=\"hasHelper\"\n :class=\"composeClassName(slotFns.helperWrapper(), props.classNames?.helperWrapper)\"\n >\n <div\n v-if=\"showError\"\n :id=\"errorMessageId\"\n :class=\"composeClassName(slotFns.errorMessage(), props.classNames?.errorMessage)\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n <div\n v-else-if=\"showDescription\"\n :id=\"descriptionId\"\n :class=\"composeClassName(slotFns.description(), props.classNames?.description)\"\n >\n {{ description }}\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAad,MAAM,aAAa,SAAyC,SAAA,aAAC;EA8D7D,MAAM,QAAQ,UAAS;EACvB,MAAM,cAAc,OAAM;EAC1B,MAAM,UAAU,eAAgB,MAAM,MAA6B,GAAG,YAAY,QAAO;EACzF,MAAM,UAAU,eAAe,GAAG,YAAY,QAAO;EACrD,MAAM,gBAAgB,eAAe,GAAG,YAAY,cAAa;EACjE,MAAM,iBAAiB,eAAe,GAAG,YAAY,QAAO;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A,KAAAA,OAAO,cAAA,WAAA,EADf,mBAMO,QAAA;;MAJJ,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,YAAU,EAAI,MAAM,YAAY,WAAU,CAAA;MAC3E,aAAU;SAEV,WAA0B,KAAA,QAAA,aAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;OAMxB,UAAA,SAAA,WAAA,EADR,mBAmBM,OAAA;;IAjBH,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,eAAa,EAAI,MAAM,YAAY,cAAa,CAAA;OAGzE,UAAA,SAAA,WAAA,EADR,mBAOM,OAAA;;IALH,IAAI,eAAA;IACJ,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,cAAY,EAAI,MAAM,YAAY,aAAY,CAAA;IAC/E,MAAK;sBAEF,QAAA,aAAY,EAAA,IAAA,WAAA,IAGJ,gBAAA,SAAA,WAAA,EADb,mBAMM,OAAA;;IAJH,IAAI,cAAA;IACJ,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,aAAW,EAAI,MAAM,YAAY,YAAW,CAAA;sBAE1E,QAAA,YAAW,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"DateRangeField.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/date-range-field/DateRangeField.vue"],"sourcesContent":["<!--\n DateRangeField — form-field mirror of DateInput.vue for a date range.\n\n Same prop surface, data-attribute contract, floating-label behavior,\n start/end content slots, and a11y wiring as DateInput. Renders TWO\n segment lists (start + end) separated by a visible \"–\" glyph.\n-->\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useId, watch } from 'vue'\nimport { DateRangeFieldRoot, DateRangeFieldInput } from 'reka-ui'\nimport type { DateValue } from '@internationalized/date'\nimport { dateRangeFieldVariants, type DateRangeFieldVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<Props>(), {\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})\n\nconst modelValue = defineModel<DateRange | null | undefined>()\n\nexport interface DateRange {\n start: DateValue\n end: DateValue\n}\n\ntype Props = {\n /** Visual style of the field. @default 'flat' */\n variant?: DateRangeFieldVariants['variant']\n /** Field height. @default 'md' */\n size?: DateRangeFieldVariants['size']\n /** Accent color applied to focus ring + floating label. @default 'default' */\n color?: DateRangeFieldVariants['color']\n /** Label placement relative to the field. @default 'inside' */\n labelPlacement?: DateRangeFieldVariants['labelPlacement']\n /** Stretches root wrapper to 100% width. @default false */\n fullWidth?: boolean\n /** Marks the field as invalid. @default false */\n isInvalid?: boolean\n /** Disables the field. @default false */\n isDisabled?: boolean\n /** Makes the field read-only. @default false */\n isReadOnly?: boolean\n /** Adds a required asterisk next to the label. @default false */\n isRequired?: boolean\n /** Field label. When omitted, floating-label behavior is skipped. */\n label?: string\n /** Helper text below the field. Suppressed when isInvalid && errorMessage is shown. */\n description?: string\n /** Error text below the field. Only rendered when isInvalid is true. */\n errorMessage?: string\n /** Extra classes merged onto the root wrapper. */\n class?: ClassValue\n /** Per-slot class overrides. Merged with tailwind-variants styles. */\n classNames?: Partial<{\n base: ClassValue\n label: ClassValue\n mainWrapper: ClassValue\n inputWrapper: ClassValue\n startContent: ClassValue\n segmentList: ClassValue\n segment: ClassValue\n separator: ClassValue\n endContent: ClassValue\n helperWrapper: ClassValue\n errorMessage: ClassValue\n description: ClassValue\n }>\n\n /* ─── DateRangeField-specific ─────────────────────────────────── */\n defaultValue?: DateRange\n placeholderValue?: DateValue\n minValue?: DateValue\n maxValue?: DateValue\n granularity?: 'day' | 'hour' | 'minute' | 'second'\n hourCycle?: 12 | 24\n locale?: string\n name?: string\n hideTimeZone?: boolean\n}\n\nconst attrs = useAttrs()\nconst generatedId = useId()\nconst fieldId = computed(() => (attrs.id as string | undefined) ?? `${generatedId}-field`)\nconst labelId = computed(() => `${generatedId}-label`)\nconst descriptionId = computed(() => `${generatedId}-description`)\nconst errorMessageId = computed(() => `${generatedId}-error`)\n\nconst hasLabel = computed(() => !!props.label)\nconst isFilled = computed(() => modelValue.value?.start != null || modelValue.value?.end != null)\n\nconst showError = computed(() => props.isInvalid && !!props.errorMessage)\nconst showDescription = computed(() => !!props.description && !showError.value)\nconst hasHelper = computed(() => showError.value || showDescription.value)\nconst ariaDescribedBy = computed(() => {\n if (showError.value) return errorMessageId.value\n if (showDescription.value) return descriptionId.value\n return undefined\n})\n\nconst fieldRef = ref<HTMLElement | null>(null)\nconst fieldEl = computed<HTMLElement | null>(() => {\n const r = fieldRef.value as unknown as { $el?: HTMLElement } | HTMLElement | null\n if (!r) return null\n if (r instanceof HTMLElement) return r\n return r.$el ?? null\n})\n\n// `isFocused` tracks focus on a DATE SEGMENT specifically — not any descendant.\nconst isFocused = ref(false)\nfunction updateSegmentFocus() {\n const root = fieldEl.value\n if (!root) { isFocused.value = false; return }\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n isFocused.value = !!active\n && root.contains(active)\n && active.hasAttribute('data-reka-date-field-segment')\n}\nfunction onDocFocusIn() { updateSegmentFocus() }\nfunction onDocFocusOut() { queueMicrotask(updateSegmentFocus) }\n\n// Guard against focus snap-back after an outside click.\nlet suppressSegmentFocusUntil = 0\nfunction onDocPointerDown(e: PointerEvent) {\n const root = fieldEl.value\n if (!root) return\n const target = e.target as Node | null\n if (!target || root.contains(target)) return\n suppressSegmentFocusUntil = performance.now() + 250\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n active.blur()\n }\n}\nfunction onDocFocusInGuard(e: FocusEvent) {\n if (performance.now() >= suppressSegmentFocusUntil) return\n const root = fieldEl.value\n if (!root) return\n const t = e.target as HTMLElement | null\n if (t && root.contains(t) && t.hasAttribute?.('data-reka-date-field-segment')) {\n t.blur()\n }\n}\n\nonMounted(() => {\n document.addEventListener('focusin', onDocFocusIn)\n document.addEventListener('focusout', onDocFocusOut)\n document.addEventListener('pointerdown', onDocPointerDown, true)\n document.addEventListener('focusin', onDocFocusInGuard, true)\n})\nonBeforeUnmount(() => {\n document.removeEventListener('focusin', onDocFocusIn)\n document.removeEventListener('focusout', onDocFocusOut)\n document.removeEventListener('pointerdown', onDocPointerDown, true)\n document.removeEventListener('focusin', onDocFocusInGuard, true)\n})\n\n// Track data-filled by sniffing rendered segments across BOTH segment lists.\nconst segmentsFilled = ref(false)\nfunction recomputeFilled() {\n const root = fieldEl.value\n if (!root || typeof root.querySelectorAll !== 'function') {\n segmentsFilled.value = false\n return\n }\n const segs = root.querySelectorAll('[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])')\n let anyFilled = false\n segs.forEach((el) => {\n if ((el as HTMLElement).dataset.placeholder === 'false') anyFilled = true\n })\n segmentsFilled.value = anyFilled\n}\nwatch([modelValue, () => props.defaultValue, () => props.granularity], () => {\n queueMicrotask(recomputeFilled)\n}, { immediate: true })\n\nconst effectiveFilled = computed(() => isFilled.value || segmentsFilled.value)\n\nfunction handleFieldMousedown(e: MouseEvent) {\n const target = e.target as HTMLElement | null\n if (!target) return\n if (target.closest('[data-reka-date-field-segment]')) return\n if (target.closest('[data-slot=\"start-content\"]')) return\n if (target.closest('[data-slot=\"end-content\"]')) return\n if (target.closest('button, [role=\"button\"]')) return\n const root = fieldEl.value\n if (!root) return\n const active = (root.ownerDocument ?? document).activeElement as HTMLElement | null\n if (active && root.contains(active) && active.hasAttribute('data-reka-date-field-segment')) {\n return\n }\n const first = root.querySelector<HTMLElement>(\n '[data-reka-date-field-segment]:not([data-reka-date-field-segment=\"literal\"])',\n )\n if (first) {\n e.preventDefault()\n first.focus()\n }\n}\n\nconst slotFns = computed(() =>\n dateRangeFieldVariants({\n variant: props.variant,\n size: props.size,\n color: props.color,\n fullWidth: props.fullWidth,\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isReadonly: props.isReadOnly,\n hasLabel: hasLabel.value,\n labelPlacement: props.labelPlacement,\n }),\n)\n\nconst showOutsideLabel = computed(\n () => hasLabel.value && props.labelPlacement !== 'inside',\n)\nconst showInsideLabel = computed(\n () => hasLabel.value && props.labelPlacement === 'inside',\n)\n</script>\n\n<template>\n <div\n :class=\"composeClassName(slotFns.base(), props.class, props.classNames?.base)\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n :data-required=\"isRequired || undefined\"\n :data-has-label=\"hasLabel || undefined\"\n :data-has-helper=\"hasHelper || undefined\"\n data-slot=\"date-range-field\"\n >\n <label\n v-if=\"showOutsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <div :class=\"composeClassName(slotFns.mainWrapper(), props.classNames?.mainWrapper)\">\n <DateRangeFieldRoot\n :id=\"fieldId\"\n ref=\"fieldRef\"\n v-model=\"modelValue\"\n :default-value=\"defaultValue\"\n :placeholder=\"placeholderValue\"\n :min-value=\"minValue\"\n :max-value=\"maxValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n :locale=\"locale\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :hide-time-zone=\"hideTimeZone\"\n :aria-labelledby=\"hasLabel ? labelId : undefined\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"isRequired || undefined\"\n :aria-invalid=\"isInvalid || undefined\"\n :class=\"composeClassName(slotFns.inputWrapper(), props.classNames?.inputWrapper)\"\n :data-filled=\"hasLabel ? (effectiveFilled || undefined) : undefined\"\n :data-focused=\"isFocused || undefined\"\n :data-invalid=\"isInvalid || undefined\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n @mousedown=\"handleFieldMousedown\"\n >\n <template #default=\"{ segments }\">\n <label\n v-if=\"showInsideLabel\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :class=\"composeClassName(slotFns.label(), props.classNames?.label)\"\n >{{ label }}<span\n v-if=\"isRequired\"\n aria-hidden=\"true\"\n > *</span></label>\n\n <span\n v-if=\"$slots.startContent\"\n :class=\"composeClassName(slotFns.startContent(), props.classNames?.startContent)\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n\n <div\n :class=\"composeClassName(slotFns.segmentList(), props.classNames?.segmentList)\"\n data-slot=\"segment-list\"\n data-type=\"start\"\n >\n <template\n v-for=\"(segment, _i) in segments.start\"\n :key=\"`start-${_i}`\"\n >\n <DateRangeFieldInput\n :part=\"segment.part\"\n type=\"start\"\n :class=\"composeClassName(slotFns.segment(), props.classNames?.segment)\"\n >\n {{ segment.value }}\n </DateRangeFieldInput>\n </template>\n </div>\n\n <span\n :class=\"composeClassName(slotFns.separator(), props.classNames?.separator)\"\n aria-hidden=\"true\"\n data-slot=\"separator\"\n >–</span>\n\n <div\n :class=\"composeClassName(slotFns.segmentList(), props.classNames?.segmentList)\"\n data-slot=\"segment-list\"\n data-type=\"end\"\n >\n <template\n v-for=\"(segment, _i) in segments.end\"\n :key=\"`end-${_i}`\"\n >\n <DateRangeFieldInput\n :part=\"segment.part\"\n type=\"end\"\n :class=\"composeClassName(slotFns.segment(), props.classNames?.segment)\"\n >\n {{ segment.value }}\n </DateRangeFieldInput>\n </template>\n </div>\n\n <span\n v-if=\"$slots.endContent\"\n :class=\"composeClassName(slotFns.endContent(), props.classNames?.endContent)\"\n data-slot=\"end-content\"\n >\n <slot name=\"endContent\" />\n </span>\n </template>\n </DateRangeFieldRoot>\n\n <div\n v-if=\"hasHelper\"\n :class=\"composeClassName(slotFns.helperWrapper(), props.classNames?.helperWrapper)\"\n >\n <div\n v-if=\"showError\"\n :id=\"errorMessageId\"\n :class=\"composeClassName(slotFns.errorMessage(), props.classNames?.errorMessage)\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n <div\n v-else-if=\"showDescription\"\n :id=\"descriptionId\"\n :class=\"composeClassName(slotFns.description(), props.classNames?.description)\"\n >\n {{ description }}\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAad,MAAM,aAAa,SAAyC,SAAA,aAAC;EA8D7D,MAAM,QAAQ,UAAS;EACvB,MAAM,cAAc,OAAM;EAC1B,MAAM,UAAU,eAAgB,MAAM,MAA6B,GAAG,YAAY,QAAO;EACzF,MAAM,UAAU,eAAe,GAAG,YAAY,QAAO;EACrD,MAAM,gBAAgB,eAAe,GAAG,YAAY,cAAa;EACjE,MAAM,iBAAiB,eAAe,GAAG,YAAY,QAAO;EAE5D,MAAM,WAAW,eAAe,CAAC,CAAC,MAAM,MAAK;EAC7C,MAAM,WAAW,eAAe,WAAW,OAAO,SAAS,QAAQ,WAAW,OAAO,OAAO,KAAI;EAEhG,MAAM,YAAY,eAAe,MAAM,aAAa,CAAC,CAAC,MAAM,aAAY;EACxE,MAAM,kBAAkB,eAAe,CAAC,CAAC,MAAM,eAAe,CAAC,UAAU,MAAK;EAC9E,MAAM,YAAY,eAAe,UAAU,SAAS,gBAAgB,MAAK;EACzE,MAAM,kBAAkB,eAAe;AACrC,OAAI,UAAU,MAAO,QAAO,eAAe;AAC3C,OAAI,gBAAgB,MAAO,QAAO,cAAc;IAEjD;EAED,MAAM,WAAW,IAAwB,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IAAI,eAAA;IACJ,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,cAAY,EAAI,MAAM,YAAY,aAAY,CAAA;IAC/E,MAAK;sBAEF,QAAA,aAAY,EAAA,IAAA,WAAA,IAGJ,gBAAA,SAAA,WAAA,EADb,mBAMM,OAAA;;IAJH,IAAI,cAAA;IACJ,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,aAAW,EAAI,MAAM,YAAY,YAAW,CAAA;sBAE1E,QAAA,YAAW,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA"}
|
package/dist/components/date-range-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -63,7 +63,13 @@ var DateRangePicker_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
|
|
|
63
63
|
type: Boolean,
|
|
64
64
|
default: false
|
|
65
65
|
},
|
|
66
|
-
class: {
|
|
66
|
+
class: { type: [
|
|
67
|
+
String,
|
|
68
|
+
Boolean,
|
|
69
|
+
null,
|
|
70
|
+
Object,
|
|
71
|
+
Array
|
|
72
|
+
] },
|
|
67
73
|
classNames: {}
|
|
68
74
|
}, {
|
|
69
75
|
"modelValue": {},
|
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 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 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 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 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 :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 :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :number-of-months=\"visibleMonths\"\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 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=\"8\"\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":"
|
|
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 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 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 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 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 :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 :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\n :number-of-months=\"visibleMonths\"\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 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=\"8\"\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;EAwDd,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,YAyHsB,MAAA,oBAAA,EAAA;gBAxHX,WAAA;4EAAU,QAAA;IACX,MAAM,UAAA;qEAAS,QAAA;IACtB,iBAAe,QAAA;IACf,gBAAc,QAAA;IACd,qBAAmB,QAAA;IACnB,aAAW,QAAA;IACX,aAAW,QAAA;IACX,uBAAqB,QAAA;IAC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V,mBAOE,QAAA;QANA,GAAE;QACF,GAAE;QACF,OAAM;QACN,QAAO;QACP,IAAG;QACH,IAAG;;OAEL,mBAKE,QAAA;QAJA,IAAG;QACH,IAAG;QACH,IAAG;QACH,IAAG;;OAEL,mBAKE,QAAA;QAJA,IAAG;QACH,IAAG;QACH,IAAG;QACH,IAAG;;OAEL,mBAKE,QAAA;QAJA,IAAG;QACH,IAAG;QACH,IAAG;QACH,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QASf,YAqByB,MAAA,uBAAA,EAAA;KApBtB,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,SAAO,EAAI,MAAM,YAAY,QAAO,CAAA;KACrE,aAAU;KACT,eAAa;;4BAEoB;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"}
|
package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -57,7 +57,13 @@ var DateTimePicker_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
57
57
|
default: false
|
|
58
58
|
},
|
|
59
59
|
name: {},
|
|
60
|
-
class: {
|
|
60
|
+
class: { type: [
|
|
61
|
+
String,
|
|
62
|
+
Boolean,
|
|
63
|
+
null,
|
|
64
|
+
Object,
|
|
65
|
+
Array
|
|
66
|
+
] },
|
|
61
67
|
classNames: {},
|
|
62
68
|
granularity: { default: "minute" },
|
|
63
69
|
hourCycle: {},
|
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, ref, 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 { AnimatePresence, motion } from 'motion-v'\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'\n\ntype Step = 'date' | 'time'\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 stepHeader: ClassValue\n navButton: ClassValue\n stepTitle: ClassValue\n doneLabel: ClassValue\n panelWrap: ClassValue\n }>\n granularity?: 'minute' | 'second'\n hourCycle?: 12 | 24\n hideTimeZone?: boolean\n defaultOpen?: boolean\n closeOnSelect?: boolean\n locale?: string\n defaultValue?: CalendarDateTime\n minValue?: CalendarDateTime\n maxValue?: CalendarDateTime\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => 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})\n\nconst modelValue = defineModel<CalendarDateTime | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open', { default: undefined })\n\nconst STEP_TITLES: Record<Step, string> = {\n date: 'Pick a date',\n time: 'Pick a time',\n}\nconst STEP_ORDER: Step[] = ['date', 'time']\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// ─── Step state ──────────────────────────────────────────────────────────\n\nconst activeStep = ref<Step>('date')\nconst direction = ref<1 | -1>(1)\n\nwatch(openModel, (open) => {\n if (open) activeStep.value = 'date'\n})\n\nfunction goTo(step: Step) {\n const from = STEP_ORDER.indexOf(activeStep.value)\n const to = STEP_ORDER.indexOf(step)\n direction.value = to > from ? 1 : -1\n activeStep.value = step\n}\n\nfunction goBack() {\n const idx = STEP_ORDER.indexOf(activeStep.value)\n if (idx > 0) goTo(STEP_ORDER[idx - 1])\n}\n\nfunction goForward() {\n const idx = STEP_ORDER.indexOf(activeStep.value)\n if (idx < STEP_ORDER.length - 1) {\n goTo(STEP_ORDER[idx + 1])\n } else if (props.closeOnSelect) {\n openModel.value = false\n }\n}\n\n// ─── Panel animation variants ────────────────────────────────────────────\n\nconst panelInitial = computed(() => ({ x: direction.value > 0 ? '100%' : '-100%', opacity: 0 }))\nconst panelAnimate = { x: '0%', opacity: 1 }\nconst panelExit = computed(() => ({ x: direction.value > 0 ? '-100%' : '100%', opacity: 0 }))\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 goTo('time')\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 :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 :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\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 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=\"8\"\n >\n <!-- Step header -->\n <div\n :class=\"composeClassName(slotFns.stepHeader(), props.classNames?.stepHeader)\"\n data-slot=\"step-header\"\n >\n <button\n type=\"button\"\n :class=\"composeClassName(slotFns.navButton(), props.classNames?.navButton)\"\n :data-hidden=\"activeStep === 'date' ? 'true' : undefined\"\n aria-label=\"Previous step\"\n data-slot=\"back-button\"\n @click=\"goBack\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n </button>\n\n <span :class=\"composeClassName(slotFns.stepTitle(), props.classNames?.stepTitle)\">{{ STEP_TITLES[activeStep] }}</span>\n\n <button\n type=\"button\"\n :class=\"composeClassName(slotFns.navButton(), props.classNames?.navButton)\"\n :aria-label=\"activeStep === 'time' ? 'Done' : 'Next step'\"\n data-slot=\"forward-button\"\n @click=\"goForward\"\n >\n <span\n v-if=\"activeStep === 'time'\"\n :class=\"composeClassName(slotFns.doneLabel(), props.classNames?.doneLabel)\"\n >Done</span>\n <svg\n v-else\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n </button>\n </div>\n\n <!-- Sliding panels -->\n <div\n :class=\"composeClassName(slotFns.panelWrap(), props.classNames?.panelWrap)\"\n style=\"overflow: hidden;\"\n >\n <AnimatePresence mode=\"popLayout\">\n <motion.div\n v-if=\"activeStep === 'date'\"\n key=\"date\"\n :initial=\"panelInitial\"\n :animate=\"panelAnimate\"\n :exit=\"panelExit\"\n :transition=\"{ duration: 0.15 }\"\n class=\"px-3 pb-3\"\n data-slot=\"calendar-panel\"\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 </motion.div>\n\n <motion.div\n v-else-if=\"activeStep === 'time'\"\n key=\"time\"\n :initial=\"panelInitial\"\n :animate=\"panelAnimate\"\n :exit=\"panelExit\"\n :transition=\"{ duration: 0.15 }\"\n >\n <DateTimePickerTimeScroller\n :model-value=\"internalValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n @update:model-value=\"onTimeUpdate\"\n />\n </motion.div>\n </AnimatePresence>\n </div>\n </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,QAAQ;EAqDd,MAAM,aAAa,SAAgD,SAAC,aAAY;EAChF,MAAM,YAAY,SAAoB,SAAC,OAA8B;EAErE,MAAM,cAAoC;GACxC,MAAM;GACN,MAAM;GACR;EACA,MAAM,aAAqB,CAAC,QAAQ,OAAM;AAG1C,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,Q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I;OACH,SAAS,aAAA;OACT,SAAS;OACT,MAAM,UAAA;OACN,YAAY,EAAA,UAAA,KAAkB;;8BAO7B,CALF,YAKE,oCAAA;QAJC,eAAa,cAAA;QACb,aAAa,QAAA;QACb,cAAY,QAAA;QACZ,uBAAoB"}
|
|
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, ref, 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 { AnimatePresence, motion } from 'motion-v'\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'\n\ntype Step = 'date' | 'time'\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 stepHeader: ClassValue\n navButton: ClassValue\n stepTitle: ClassValue\n doneLabel: ClassValue\n panelWrap: ClassValue\n }>\n granularity?: 'minute' | 'second'\n hourCycle?: 12 | 24\n hideTimeZone?: boolean\n defaultOpen?: boolean\n closeOnSelect?: boolean\n locale?: string\n defaultValue?: CalendarDateTime\n minValue?: CalendarDateTime\n maxValue?: CalendarDateTime\n isDateUnavailable?: (date: DateValue) => boolean\n isDateDisabled?: (date: DateValue) => 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})\n\nconst modelValue = defineModel<CalendarDateTime | null | undefined>('modelValue')\nconst openModel = defineModel<boolean>('open', { default: undefined })\n\nconst STEP_TITLES: Record<Step, string> = {\n date: 'Pick a date',\n time: 'Pick a time',\n}\nconst STEP_ORDER: Step[] = ['date', 'time']\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// ─── Step state ──────────────────────────────────────────────────────────\n\nconst activeStep = ref<Step>('date')\nconst direction = ref<1 | -1>(1)\n\nwatch(openModel, (open) => {\n if (open) activeStep.value = 'date'\n})\n\nfunction goTo(step: Step) {\n const from = STEP_ORDER.indexOf(activeStep.value)\n const to = STEP_ORDER.indexOf(step)\n direction.value = to > from ? 1 : -1\n activeStep.value = step\n}\n\nfunction goBack() {\n const idx = STEP_ORDER.indexOf(activeStep.value)\n if (idx > 0) goTo(STEP_ORDER[idx - 1])\n}\n\nfunction goForward() {\n const idx = STEP_ORDER.indexOf(activeStep.value)\n if (idx < STEP_ORDER.length - 1) {\n goTo(STEP_ORDER[idx + 1])\n } else if (props.closeOnSelect) {\n openModel.value = false\n }\n}\n\n// ─── Panel animation variants ────────────────────────────────────────────\n\nconst panelInitial = computed(() => ({ x: direction.value > 0 ? '100%' : '-100%', opacity: 0 }))\nconst panelAnimate = { x: '0%', opacity: 1 }\nconst panelExit = computed(() => ({ x: direction.value > 0 ? '-100%' : '100%', opacity: 0 }))\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 goTo('time')\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 :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 :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :name=\"name\"\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 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=\"8\"\n >\n <!-- Step header -->\n <div\n :class=\"composeClassName(slotFns.stepHeader(), props.classNames?.stepHeader)\"\n data-slot=\"step-header\"\n >\n <button\n type=\"button\"\n :class=\"composeClassName(slotFns.navButton(), props.classNames?.navButton)\"\n :data-hidden=\"activeStep === 'date' ? 'true' : undefined\"\n aria-label=\"Previous step\"\n data-slot=\"back-button\"\n @click=\"goBack\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n </button>\n\n <span :class=\"composeClassName(slotFns.stepTitle(), props.classNames?.stepTitle)\">{{ STEP_TITLES[activeStep] }}</span>\n\n <button\n type=\"button\"\n :class=\"composeClassName(slotFns.navButton(), props.classNames?.navButton)\"\n :aria-label=\"activeStep === 'time' ? 'Done' : 'Next step'\"\n data-slot=\"forward-button\"\n @click=\"goForward\"\n >\n <span\n v-if=\"activeStep === 'time'\"\n :class=\"composeClassName(slotFns.doneLabel(), props.classNames?.doneLabel)\"\n >Done</span>\n <svg\n v-else\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n </button>\n </div>\n\n <!-- Sliding panels -->\n <div\n :class=\"composeClassName(slotFns.panelWrap(), props.classNames?.panelWrap)\"\n style=\"overflow: hidden;\"\n >\n <AnimatePresence mode=\"popLayout\">\n <motion.div\n v-if=\"activeStep === 'date'\"\n key=\"date\"\n :initial=\"panelInitial\"\n :animate=\"panelAnimate\"\n :exit=\"panelExit\"\n :transition=\"{ duration: 0.15 }\"\n class=\"px-3 pb-3\"\n data-slot=\"calendar-panel\"\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 </motion.div>\n\n <motion.div\n v-else-if=\"activeStep === 'time'\"\n key=\"time\"\n :initial=\"panelInitial\"\n :animate=\"panelAnimate\"\n :exit=\"panelExit\"\n :transition=\"{ duration: 0.15 }\"\n >\n <DateTimePickerTimeScroller\n :model-value=\"internalValue\"\n :granularity=\"granularity\"\n :hour-cycle=\"hourCycle\"\n @update:model-value=\"onTimeUpdate\"\n />\n </motion.div>\n </AnimatePresence>\n </div>\n </DatePickerContent>\n </DatePickerRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,QAAQ;EAqDd,MAAM,aAAa,SAAgD,SAAC,aAAY;EAChF,MAAM,YAAY,SAAoB,SAAC,OAA8B;EAErE,MAAM,cAAoC;GACxC,MAAM;GACN,MAAM;GACR;EACA,MAAM,aAAqB,CAAC,QAAQ,OAAM;AAG1C,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,OAA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