@orchidui/dashboard 1.8.1-95 → 1.8.1-96
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/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
- package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
- package/dist/Collection-COudIl-A.js +55 -0
- package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
- package/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
- package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
- package/dist/DialogPortal-zAvO8zt4.js +23 -0
- package/dist/DialogTrigger-BIF1A4hk.js +72 -0
- package/dist/DismissableLayer-C7IJliOb.js +151 -0
- package/dist/FocusScope--pJ6bboI.js +121 -0
- package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
- package/dist/ListboxItem-CjMk-mEX.js +417 -0
- package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
- package/dist/{OcCard-D3be6IMj.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/{OcLottieAnimation-0mdksHMn.js → OcLottieAnimation-DeMoIDaX.js} +1 -1
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
- package/dist/PopperContent-BT3Svcc3.js +1465 -0
- package/dist/Presence-CxfTrw6l.js +133 -0
- package/dist/Primitive-B3twiLO1.js +44 -0
- package/dist/{QuillEditor-DRwC0sgJ.js → QuillEditor-hFQ0MJZO.js} +556 -579
- package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
- package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
- package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
- package/dist/Separator-DRam5i7g.js +54 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
- package/dist/Teleport-DnUewq5H.js +25 -0
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
- package/dist/VisuallyHidden-DMAU4heD.js +41 -0
- package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-CqVTtuYm.js +6 -0
- package/dist/arrays-4jDZqbdb.js +20 -0
- package/dist/check-C2tzJ0Gk.js +11 -0
- package/dist/chevron-down-CnpAlizg.js +13 -0
- package/dist/chevron-left-BOwFasou.js +13 -0
- package/dist/chevron-right-D308801z.js +13 -0
- package/dist/circle-A-6NpYiX.js +13 -0
- package/dist/clamp-BL1Rb24G.js +22 -0
- package/dist/constant-CuDQlTIy.js +3433 -0
- package/dist/createContext-CZEfaSVa.js +17 -0
- package/dist/createLucideIcon-eXqDwUWj.js +71 -0
- package/dist/ellipsis-CEG9G7eN.js +15 -0
- package/dist/getActiveElement-B-HWdUIb.js +11 -0
- package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
- package/dist/index-B3LW8uSH.js +133 -0
- package/dist/index-BIlpXuWX.js +3430 -0
- package/dist/index-BlGEiPHj.js +1246 -0
- package/dist/index-BwPb_idr.js +574 -0
- package/dist/index-C9julNQm.js +173 -0
- package/dist/index-C_aI-Wfj.js +34 -0
- package/dist/index-CumjCvqB.js +5703 -0
- package/dist/index-LqWMCtOd.js +809 -0
- package/dist/index-OpE2oGce.js +110 -0
- package/dist/index.js +3 -3
- package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/dist/nullish-CjWwlQS3.js +6 -0
- package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
- package/dist/plus-CgluTYQY.js +14 -0
- package/dist/text-zwICaAnx.js +743 -0
- package/dist/ui/accordion/index.js +7 -0
- package/dist/ui/alert/index.js +64 -0
- package/dist/ui/alert-dialog/index.js +356 -0
- package/dist/ui/aspect-ratio/index.js +50 -0
- package/dist/ui/auto-form/constant.js +5 -0
- package/dist/ui/auto-form/dependencies.js +61 -0
- package/dist/ui/auto-form/index.js +227 -0
- package/dist/ui/auto-form/interface.js +4 -0
- package/dist/ui/auto-form/utils.js +89 -0
- package/dist/ui/avatar/index.js +189 -0
- package/dist/ui/badge/index.js +37 -0
- package/dist/ui/breadcrumb/index.js +126 -0
- package/dist/ui/button/index.js +55 -0
- package/dist/ui/calendar/index.js +15 -0
- package/dist/ui/card/index.js +38 -0
- package/dist/ui/carousel/index.js +174 -0
- package/dist/ui/carousel/interface.js +1 -0
- package/dist/ui/carousel/useCarousel.js +1288 -0
- package/dist/ui/chart/index.js +8 -0
- package/dist/ui/chart/interface.js +1 -0
- package/dist/ui/chart-area/index.js +331 -0
- package/dist/ui/chart-bar/index.js +490 -0
- package/dist/ui/chart-donut/index.js +509 -0
- package/dist/ui/chart-line/index.js +110 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/dist/ui/collapsible/index.js +60 -0
- package/dist/ui/combobox/index.js +877 -0
- package/dist/ui/command/index.js +323 -0
- package/dist/ui/context-menu/index.js +734 -0
- package/dist/ui/dialog/index.js +169 -0
- package/dist/ui/drawer/index.js +971 -0
- package/dist/ui/dropdown-menu/index.js +723 -0
- package/dist/ui/form/index.js +13 -0
- package/dist/ui/form/injectionKeys.js +4 -0
- package/dist/ui/form/useFormField.js +25 -0
- package/dist/ui/hover-card/index.js +331 -0
- package/dist/ui/input/index.js +4 -0
- package/dist/ui/label/index.js +4 -0
- package/dist/ui/menubar/index.js +862 -0
- package/dist/ui/navigation-menu/index.js +873 -0
- package/dist/ui/number-field/index.js +682 -0
- package/dist/ui/pagination/index.js +444 -0
- package/dist/ui/pin-input/index.js +308 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/progress/index.js +137 -0
- package/dist/ui/radio-group/index.js +5 -0
- package/dist/ui/range-calendar/index.js +986 -0
- package/dist/ui/resizable/index.js +1432 -0
- package/dist/ui/scroll-area/index.js +775 -0
- package/dist/ui/select/index.js +135 -0
- package/dist/ui/separator/index.js +4 -0
- package/dist/ui/sheet/index.js +188 -0
- package/dist/ui/sidebar/index.js +652 -0
- package/dist/ui/sidebar/utils.js +12 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/dist/ui/slider/index.js +478 -0
- package/dist/ui/sonner/index.js +892 -0
- package/dist/ui/stepper/index.js +442 -0
- package/dist/ui/switch/index.js +4 -0
- package/dist/ui/table/index.js +153 -0
- package/dist/ui/tabs/index.js +280 -0
- package/dist/ui/tags-input/index.js +449 -0
- package/dist/ui/textarea/index.js +4 -0
- package/dist/ui/toast/index.js +738 -0
- package/dist/ui/toast/use-toast.js +85 -0
- package/dist/ui/toggle/index.js +6 -0
- package/dist/ui/toggle-group/index.js +112 -0
- package/dist/ui/tooltip/index.js +29 -0
- package/dist/useArrowNavigation-BRMPveaB.js +49 -0
- package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
- package/dist/useDirection-C3C_TLKm.js +14 -0
- package/dist/useFocusGuards-CyjC9cG9.js +26 -0
- package/dist/useFormControl-CFVC51Lp.js +11 -0
- package/dist/useForwardExpose-DZT6mL_U.js +37 -0
- package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
- package/dist/useGraceArea-D7-GP1ii.js +137 -0
- package/dist/useId-reAg216X.js +13 -0
- package/dist/useKbd-BJNupnml.js +41 -0
- package/dist/useLocale-BfU0LC8Z.js +14 -0
- package/dist/useNonce-C1ZOgOp5.js +14 -0
- package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
- package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
- package/dist/useSize-BnyQ8FZF.js +37 -0
- package/dist/useTypeahead-oSidjyFF.js +40 -0
- package/dist/utils-DKNaYMZh.js +57 -0
- package/dist/utils-Dx9la83v.js +35 -0
- package/dist/utils-DxQ_ywGa.js +55 -0
- package/dist/utils-SFgRDk1R.js +2748 -0
- package/dist/utils-W-UiqiPE.js +1869 -0
- package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
- package/dist/x-Cl6YllUK.js +14 -0
- package/package.json +264 -2
|
@@ -0,0 +1,986 @@
|
|
|
1
|
+
import { computed as f, defineComponent as p, toRefs as Qe, ref as te, watch as ge, onMounted as Xe, createBlock as c, openBlock as r, unref as l, withCtx as o, createElementVNode as me, renderSlot as h, toDisplayString as le, mergeProps as _, withKeys as Ye, createTextVNode as z, nextTick as $e, normalizeProps as q, guardReactiveProps as J, createVNode as N, createElementBlock as oe, Fragment as ue, renderList as ce } from "vue";
|
|
2
|
+
import { c as I } from "../../utils-SFgRDk1R.js";
|
|
3
|
+
import { u as Ze, a as U } from "../../useForwardPropsEmits-0XKBv1pB.js";
|
|
4
|
+
import { u as Be, e as ea } from "../../index-BwPb_idr.js";
|
|
5
|
+
import { k as ye, d as V, l as aa, m as ta, g as la, u as sa, c as T, h as na, t as da, n as ia, e as ra, a as oa, f as ua, i as he, j as Se } from "../../utils-W-UiqiPE.js";
|
|
6
|
+
import { u as Oe } from "../../usePrimitiveElement-BjwUvHih.js";
|
|
7
|
+
import { u as ca } from "../../useDirection-C3C_TLKm.js";
|
|
8
|
+
import { u as va } from "../../useLocale-BfU0LC8Z.js";
|
|
9
|
+
import { u as ke } from "../../useKbd-BJNupnml.js";
|
|
10
|
+
import { c as fa } from "../../createContext-CZEfaSVa.js";
|
|
11
|
+
import { P as O } from "../../Primitive-B3twiLO1.js";
|
|
12
|
+
import { i as pa } from "../../nullish-CjWwlQS3.js";
|
|
13
|
+
import { r as j } from "../../index-OpE2oGce.js";
|
|
14
|
+
import { buttonVariants as be } from "../button/index.js";
|
|
15
|
+
import { C as ga } from "../../chevron-right-D308801z.js";
|
|
16
|
+
import { C as ha } from "../../chevron-left-BOwFasou.js";
|
|
17
|
+
function ma(a) {
|
|
18
|
+
const t = f(() => a.start.value ? !!a.isDateDisabled(a.start.value) : !1), e = f(() => a.end.value ? !!a.isDateDisabled(a.end.value) : !1), s = f(
|
|
19
|
+
() => t.value || e.value ? !1 : !!(a.start.value && a.end.value && ye(a.end.value, a.start.value))
|
|
20
|
+
), n = (u) => a.start.value ? V(a.start.value, u) : !1, i = (u) => a.end.value ? V(a.end.value, u) : !1, R = (u) => a.start.value && V(a.start.value, u) || a.end.value && V(a.end.value, u) ? !0 : a.end.value && a.start.value ? ta(u, a.start.value, a.end.value) : !1, P = (u) => {
|
|
21
|
+
var g;
|
|
22
|
+
return a.isDateDisabled(u) ? !0 : !((g = a.maximumDays) != null && g.value) || !a.start.value || a.end.value || V(a.start.value, u) ? !1 : Math.abs(u.compare(a.start.value)) > a.maximumDays.value;
|
|
23
|
+
}, k = (u) => {
|
|
24
|
+
var g;
|
|
25
|
+
return !!((g = a.isDateHighlightable) != null && g.call(a, u));
|
|
26
|
+
}, x = f(() => {
|
|
27
|
+
var M;
|
|
28
|
+
if (a.start.value && a.end.value && !a.fixedDate.value || !a.start.value || !a.focusedValue.value)
|
|
29
|
+
return null;
|
|
30
|
+
const u = ye(a.start.value, a.focusedValue.value), g = u ? a.start.value : a.focusedValue.value, $ = u ? a.focusedValue.value : a.start.value;
|
|
31
|
+
if (V(g, $))
|
|
32
|
+
return {
|
|
33
|
+
start: g,
|
|
34
|
+
end: $
|
|
35
|
+
};
|
|
36
|
+
if ((M = a.maximumDays) != null && M.value && !a.end.value && Math.abs($.compare(g)) > a.maximumDays.value) {
|
|
37
|
+
const W = u ? g.add({ days: a.maximumDays.value }) : g.subtract({ days: a.maximumDays.value });
|
|
38
|
+
return {
|
|
39
|
+
start: g,
|
|
40
|
+
end: W
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return aa(g, $, a.allowNonContiguousRanges.value ? () => !1 : a.isDateUnavailable, P, a.isDateHighlightable) ? {
|
|
44
|
+
start: g,
|
|
45
|
+
end: $
|
|
46
|
+
} : null;
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
isInvalid: s,
|
|
50
|
+
isSelected: R,
|
|
51
|
+
isDateHighlightable: k,
|
|
52
|
+
highlightedRange: x,
|
|
53
|
+
isSelectionStart: n,
|
|
54
|
+
isSelectionEnd: i,
|
|
55
|
+
isHighlightedStart: (u) => !x.value || !x.value.start ? !1 : V(x.value.start, u),
|
|
56
|
+
isHighlightedEnd: (u) => !x.value || !x.value.end ? !1 : V(x.value.end, u),
|
|
57
|
+
isDateDisabled: P
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const ya = { style: { border: "0px", clip: "rect(0px, 0px, 0px, 0px)", "clip-path": "inset(50%)", height: "1px", margin: "-1px", overflow: "hidden", padding: "0px", position: "absolute", "white-space": "nowrap", width: "1px" } }, ba = {
|
|
61
|
+
role: "heading",
|
|
62
|
+
"aria-level": "2"
|
|
63
|
+
}, [Q, Da] = fa("RangeCalendarRoot"), Ca = /* @__PURE__ */ p({
|
|
64
|
+
__name: "RangeCalendarRoot",
|
|
65
|
+
props: {
|
|
66
|
+
defaultPlaceholder: {},
|
|
67
|
+
defaultValue: { default: () => ({ start: void 0, end: void 0 }) },
|
|
68
|
+
modelValue: {},
|
|
69
|
+
placeholder: { default: void 0 },
|
|
70
|
+
allowNonContiguousRanges: { type: Boolean, default: !1 },
|
|
71
|
+
pagedNavigation: { type: Boolean, default: !1 },
|
|
72
|
+
preventDeselect: { type: Boolean, default: !1 },
|
|
73
|
+
maximumDays: { default: void 0 },
|
|
74
|
+
weekStartsOn: { default: 0 },
|
|
75
|
+
weekdayFormat: { default: "narrow" },
|
|
76
|
+
calendarLabel: {},
|
|
77
|
+
fixedWeeks: { type: Boolean, default: !1 },
|
|
78
|
+
maxValue: {},
|
|
79
|
+
minValue: {},
|
|
80
|
+
locale: {},
|
|
81
|
+
numberOfMonths: { default: 1 },
|
|
82
|
+
disabled: { type: Boolean, default: !1 },
|
|
83
|
+
readonly: { type: Boolean, default: !1 },
|
|
84
|
+
initialFocus: { type: Boolean, default: !1 },
|
|
85
|
+
isDateDisabled: { type: Function, default: void 0 },
|
|
86
|
+
isDateUnavailable: { type: Function, default: void 0 },
|
|
87
|
+
isDateHighlightable: { type: Function, default: void 0 },
|
|
88
|
+
dir: {},
|
|
89
|
+
nextPage: {},
|
|
90
|
+
prevPage: {},
|
|
91
|
+
disableDaysOutsideCurrentView: { type: Boolean, default: !1 },
|
|
92
|
+
fixedDate: {},
|
|
93
|
+
asChild: { type: Boolean },
|
|
94
|
+
as: { default: "div" }
|
|
95
|
+
},
|
|
96
|
+
emits: ["update:modelValue", "update:placeholder", "update:startValue"],
|
|
97
|
+
setup(a, { emit: t }) {
|
|
98
|
+
const e = a, s = t, {
|
|
99
|
+
disabled: n,
|
|
100
|
+
readonly: i,
|
|
101
|
+
initialFocus: R,
|
|
102
|
+
pagedNavigation: P,
|
|
103
|
+
weekStartsOn: k,
|
|
104
|
+
weekdayFormat: x,
|
|
105
|
+
fixedWeeks: F,
|
|
106
|
+
numberOfMonths: E,
|
|
107
|
+
preventDeselect: u,
|
|
108
|
+
isDateUnavailable: g,
|
|
109
|
+
isDateHighlightable: $,
|
|
110
|
+
isDateDisabled: X,
|
|
111
|
+
calendarLabel: M,
|
|
112
|
+
maxValue: W,
|
|
113
|
+
minValue: A,
|
|
114
|
+
dir: se,
|
|
115
|
+
locale: ne,
|
|
116
|
+
nextPage: de,
|
|
117
|
+
prevPage: ve,
|
|
118
|
+
allowNonContiguousRanges: Y,
|
|
119
|
+
disableDaysOutsideCurrentView: fe,
|
|
120
|
+
fixedDate: b,
|
|
121
|
+
maximumDays: v
|
|
122
|
+
} = Qe(e), { primitiveElement: K, currentElement: Z } = Oe(), B = ca(se), ee = va(ne), L = te(), S = te(), ie = te(!1), y = Be(e, "modelValue", s, {
|
|
123
|
+
defaultValue: e.defaultValue ?? { start: void 0, end: void 0 },
|
|
124
|
+
passive: e.modelValue === void 0
|
|
125
|
+
}), m = f(
|
|
126
|
+
() => pa(y.value) ? { start: void 0, end: void 0 } : y.value
|
|
127
|
+
), G = la({
|
|
128
|
+
defaultPlaceholder: e.placeholder,
|
|
129
|
+
defaultValue: m.value.start,
|
|
130
|
+
locale: e.locale
|
|
131
|
+
}), H = te(m.value.start), w = te(m.value.end), ae = Be(e, "placeholder", s, {
|
|
132
|
+
defaultValue: e.defaultPlaceholder ?? G.copy(),
|
|
133
|
+
passive: e.placeholder === void 0
|
|
134
|
+
});
|
|
135
|
+
function De(d) {
|
|
136
|
+
ae.value = d.copy();
|
|
137
|
+
}
|
|
138
|
+
const {
|
|
139
|
+
fullCalendarLabel: pe,
|
|
140
|
+
headingValue: Fe,
|
|
141
|
+
isDateDisabled: Ee,
|
|
142
|
+
isDateUnavailable: Ce,
|
|
143
|
+
isNextButtonDisabled: He,
|
|
144
|
+
isPrevButtonDisabled: Ne,
|
|
145
|
+
grid: _e,
|
|
146
|
+
weekdays: xe,
|
|
147
|
+
isOutsideVisibleView: Ie,
|
|
148
|
+
nextPage: je,
|
|
149
|
+
prevPage: Me,
|
|
150
|
+
formatter: Ae
|
|
151
|
+
} = sa({
|
|
152
|
+
locale: ee,
|
|
153
|
+
placeholder: ae,
|
|
154
|
+
weekStartsOn: k,
|
|
155
|
+
fixedWeeks: F,
|
|
156
|
+
numberOfMonths: E,
|
|
157
|
+
minValue: A,
|
|
158
|
+
maxValue: W,
|
|
159
|
+
disabled: n,
|
|
160
|
+
weekdayFormat: x,
|
|
161
|
+
pagedNavigation: P,
|
|
162
|
+
isDateDisabled: X.value,
|
|
163
|
+
isDateUnavailable: g.value,
|
|
164
|
+
calendarLabel: M,
|
|
165
|
+
nextPage: de,
|
|
166
|
+
prevPage: ve
|
|
167
|
+
}), {
|
|
168
|
+
isInvalid: we,
|
|
169
|
+
isSelected: Ge,
|
|
170
|
+
isDateHighlightable: Ue,
|
|
171
|
+
highlightedRange: Le,
|
|
172
|
+
isSelectionStart: Te,
|
|
173
|
+
isSelectionEnd: We,
|
|
174
|
+
isHighlightedStart: Ke,
|
|
175
|
+
isHighlightedEnd: ze,
|
|
176
|
+
isDateDisabled: qe
|
|
177
|
+
} = ma({
|
|
178
|
+
start: H,
|
|
179
|
+
end: w,
|
|
180
|
+
isDateDisabled: Ee,
|
|
181
|
+
isDateUnavailable: Ce,
|
|
182
|
+
isDateHighlightable: $.value,
|
|
183
|
+
focusedValue: S,
|
|
184
|
+
allowNonContiguousRanges: Y,
|
|
185
|
+
fixedDate: b,
|
|
186
|
+
maximumDays: v
|
|
187
|
+
});
|
|
188
|
+
ge(y, (d, D) => {
|
|
189
|
+
var C, Pe, re, Re;
|
|
190
|
+
(!(D != null && D.start) && (d != null && d.start) || !d || !d.start || H.value && !T(d.start, H.value)) && (H.value = (Pe = (C = d == null ? void 0 : d.start) == null ? void 0 : C.copy) == null ? void 0 : Pe.call(C)), (!(D != null && D.end) && d.end || !d || !d.end || w.value && !T(d.end, w.value)) && (w.value = (Re = (re = d == null ? void 0 : d.end) == null ? void 0 : re.copy) == null ? void 0 : Re.call(re));
|
|
191
|
+
}), ge(H, (d) => {
|
|
192
|
+
d && !T(d, ae.value) && De(d), s("update:startValue", d);
|
|
193
|
+
}), ge([H, w], ([d, D]) => {
|
|
194
|
+
const C = m.value;
|
|
195
|
+
if (!(C && C.start && C.end && d && D && T(C.start, d) && T(C.end, D)) && (ie.value = !0, d && D)) {
|
|
196
|
+
if (ie.value = !1, C.start && C.end && T(C.start, d) && T(C.end, D))
|
|
197
|
+
return;
|
|
198
|
+
ye(D, d) ? y.value = {
|
|
199
|
+
start: D.copy(),
|
|
200
|
+
end: d.copy()
|
|
201
|
+
} : y.value = {
|
|
202
|
+
start: d.copy(),
|
|
203
|
+
end: D.copy()
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
const Je = ke();
|
|
208
|
+
return ea("keydown", (d) => {
|
|
209
|
+
var D, C;
|
|
210
|
+
d.key === Je.ESCAPE && ie.value && (H.value = (D = y.value.start) == null ? void 0 : D.copy(), w.value = (C = y.value.end) == null ? void 0 : C.copy());
|
|
211
|
+
}), Da({
|
|
212
|
+
isDateUnavailable: Ce,
|
|
213
|
+
isDateHighlightable: Ue,
|
|
214
|
+
startValue: H,
|
|
215
|
+
endValue: w,
|
|
216
|
+
formatter: Ae,
|
|
217
|
+
modelValue: y,
|
|
218
|
+
placeholder: ae,
|
|
219
|
+
disabled: n,
|
|
220
|
+
initialFocus: R,
|
|
221
|
+
pagedNavigation: P,
|
|
222
|
+
grid: _e,
|
|
223
|
+
weekDays: xe,
|
|
224
|
+
weekStartsOn: k,
|
|
225
|
+
weekdayFormat: x,
|
|
226
|
+
fixedWeeks: F,
|
|
227
|
+
numberOfMonths: E,
|
|
228
|
+
readonly: i,
|
|
229
|
+
preventDeselect: u,
|
|
230
|
+
fullCalendarLabel: pe,
|
|
231
|
+
headingValue: Fe,
|
|
232
|
+
isInvalid: we,
|
|
233
|
+
isDateDisabled: qe,
|
|
234
|
+
allowNonContiguousRanges: Y,
|
|
235
|
+
highlightedRange: Le,
|
|
236
|
+
focusedValue: S,
|
|
237
|
+
lastPressedDateValue: L,
|
|
238
|
+
isSelected: Ge,
|
|
239
|
+
isSelectionEnd: We,
|
|
240
|
+
isSelectionStart: Te,
|
|
241
|
+
isNextButtonDisabled: He,
|
|
242
|
+
isPrevButtonDisabled: Ne,
|
|
243
|
+
isOutsideVisibleView: Ie,
|
|
244
|
+
nextPage: je,
|
|
245
|
+
prevPage: Me,
|
|
246
|
+
parentElement: Z,
|
|
247
|
+
onPlaceholderChange: De,
|
|
248
|
+
locale: ee,
|
|
249
|
+
dir: B,
|
|
250
|
+
isHighlightedStart: Ke,
|
|
251
|
+
isHighlightedEnd: ze,
|
|
252
|
+
disableDaysOutsideCurrentView: fe,
|
|
253
|
+
fixedDate: b,
|
|
254
|
+
maximumDays: v
|
|
255
|
+
}), Xe(() => {
|
|
256
|
+
R.value && na(Z.value);
|
|
257
|
+
}), (d, D) => (r(), c(l(O), {
|
|
258
|
+
ref_key: "primitiveElement",
|
|
259
|
+
ref: K,
|
|
260
|
+
as: d.as,
|
|
261
|
+
"as-child": d.asChild,
|
|
262
|
+
role: "application",
|
|
263
|
+
"aria-label": l(pe),
|
|
264
|
+
"data-readonly": l(i) ? "" : void 0,
|
|
265
|
+
"data-disabled": l(n) ? "" : void 0,
|
|
266
|
+
"data-invalid": l(we) ? "" : void 0,
|
|
267
|
+
dir: l(B)
|
|
268
|
+
}, {
|
|
269
|
+
default: o(() => [
|
|
270
|
+
me("div", ya, [
|
|
271
|
+
me("div", ba, le(l(pe)), 1)
|
|
272
|
+
]),
|
|
273
|
+
h(d.$slots, "default", {
|
|
274
|
+
date: l(ae),
|
|
275
|
+
grid: l(_e),
|
|
276
|
+
weekDays: l(xe),
|
|
277
|
+
weekStartsOn: l(k),
|
|
278
|
+
locale: l(ee),
|
|
279
|
+
fixedWeeks: l(F),
|
|
280
|
+
modelValue: l(y)
|
|
281
|
+
})
|
|
282
|
+
]),
|
|
283
|
+
_: 3
|
|
284
|
+
}, 8, ["as", "as-child", "aria-label", "data-readonly", "data-disabled", "data-invalid", "dir"]));
|
|
285
|
+
}
|
|
286
|
+
}), _a = /* @__PURE__ */ p({
|
|
287
|
+
__name: "RangeCalendarCell",
|
|
288
|
+
props: {
|
|
289
|
+
date: {},
|
|
290
|
+
asChild: { type: Boolean },
|
|
291
|
+
as: { default: "td" }
|
|
292
|
+
},
|
|
293
|
+
setup(a) {
|
|
294
|
+
const t = Q();
|
|
295
|
+
return (e, s) => {
|
|
296
|
+
var n, i;
|
|
297
|
+
return r(), c(l(O), {
|
|
298
|
+
as: e.as,
|
|
299
|
+
"as-child": e.asChild,
|
|
300
|
+
role: "gridcell",
|
|
301
|
+
"aria-selected": l(t).isSelected(e.date) ? !0 : void 0,
|
|
302
|
+
"aria-disabled": l(t).isDateDisabled(e.date) || ((i = (n = l(t)).isDateUnavailable) == null ? void 0 : i.call(n, e.date)) || l(t).disableDaysOutsideCurrentView.value,
|
|
303
|
+
"data-disabled": l(t).isDateDisabled(e.date) || l(t).disableDaysOutsideCurrentView.value ? "" : void 0
|
|
304
|
+
}, {
|
|
305
|
+
default: o(() => [
|
|
306
|
+
h(e.$slots, "default")
|
|
307
|
+
]),
|
|
308
|
+
_: 3
|
|
309
|
+
}, 8, ["as", "as-child", "aria-selected", "aria-disabled", "data-disabled"]);
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
}), xa = /* @__PURE__ */ p({
|
|
313
|
+
__name: "RangeCalendarCellTrigger",
|
|
314
|
+
props: {
|
|
315
|
+
day: {},
|
|
316
|
+
month: {},
|
|
317
|
+
asChild: { type: Boolean },
|
|
318
|
+
as: { default: "div" }
|
|
319
|
+
},
|
|
320
|
+
setup(a) {
|
|
321
|
+
const t = a, e = Q(), s = ke(), { primitiveElement: n, currentElement: i } = Oe(), R = f(() => e.formatter.custom(da(t.day), {
|
|
322
|
+
weekday: "long",
|
|
323
|
+
month: "long",
|
|
324
|
+
day: "numeric",
|
|
325
|
+
year: "numeric"
|
|
326
|
+
})), P = f(() => {
|
|
327
|
+
var b;
|
|
328
|
+
return ((b = e.isDateUnavailable) == null ? void 0 : b.call(e, t.day)) ?? !1;
|
|
329
|
+
}), k = f(() => e.isSelected(t.day)), x = f(() => e.isSelectionStart(t.day)), F = f(() => e.isSelectionEnd(t.day)), E = f(() => e.isHighlightedStart(t.day)), u = f(() => e.isHighlightedEnd(t.day)), g = f(() => e.highlightedRange.value ? ia(t.day, e.highlightedRange.value.start, e.highlightedRange.value.end) : !1), $ = f(() => e.allowNonContiguousRanges.value), X = f(() => ra(t.day, oa())), M = f(() => !ua(t.day, t.month)), W = f(
|
|
330
|
+
() => e.isOutsideVisibleView(t.day)
|
|
331
|
+
), A = f(() => e.isDateDisabled(t.day) || e.disableDaysOutsideCurrentView.value && M.value), se = f(() => t.day.day.toLocaleString(e.locale.value)), ne = f(() => !e.disabled.value && V(t.day, e.placeholder.value));
|
|
332
|
+
function de(b, v) {
|
|
333
|
+
var K;
|
|
334
|
+
if (!e.readonly.value && !(e.isDateDisabled(v) || (K = e.isDateUnavailable) != null && K.call(e, v))) {
|
|
335
|
+
if (e.lastPressedDateValue.value = v.copy(), e.startValue.value && e.highlightedRange.value === null) {
|
|
336
|
+
if (V(v, e.startValue.value) && !e.preventDeselect.value && !e.endValue.value) {
|
|
337
|
+
e.startValue.value = void 0, e.onPlaceholderChange(v);
|
|
338
|
+
return;
|
|
339
|
+
} else if (!e.endValue.value) {
|
|
340
|
+
b.preventDefault(), e.lastPressedDateValue.value && V(e.lastPressedDateValue.value, v) && (e.startValue.value = v.copy());
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (e.startValue.value && e.endValue.value && V(e.endValue.value, v) && !e.preventDeselect.value) {
|
|
345
|
+
e.startValue.value = void 0, e.endValue.value = void 0, e.onPlaceholderChange(v);
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
e.startValue.value ? e.endValue.value ? e.endValue.value && e.startValue.value && (e.fixedDate.value ? e.fixedDate.value === "start" ? v.compare(e.startValue.value) < 0 ? e.startValue.value = v.copy() : e.endValue.value = v.copy() : e.fixedDate.value === "end" && (v.compare(e.endValue.value) > 0 ? e.endValue.value = v.copy() : e.startValue.value = v.copy()) : (e.endValue.value = void 0, e.startValue.value = v.copy())) : e.endValue.value = v.copy() : e.startValue.value = v.copy();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function ve(b) {
|
|
352
|
+
A.value || de(b, t.day);
|
|
353
|
+
}
|
|
354
|
+
function Y() {
|
|
355
|
+
var b;
|
|
356
|
+
A.value || (b = e.isDateUnavailable) != null && b.call(e, t.day) || (e.focusedValue.value = t.day.copy());
|
|
357
|
+
}
|
|
358
|
+
function fe(b) {
|
|
359
|
+
if (A.value)
|
|
360
|
+
return;
|
|
361
|
+
b.preventDefault(), b.stopPropagation();
|
|
362
|
+
const v = e.parentElement.value, K = 7, Z = e.dir.value === "rtl" ? -1 : 1;
|
|
363
|
+
switch (b.code) {
|
|
364
|
+
case s.ARROW_RIGHT:
|
|
365
|
+
B(i.value, Z);
|
|
366
|
+
break;
|
|
367
|
+
case s.ARROW_LEFT:
|
|
368
|
+
B(i.value, -Z);
|
|
369
|
+
break;
|
|
370
|
+
case s.ARROW_UP:
|
|
371
|
+
B(i.value, -7);
|
|
372
|
+
break;
|
|
373
|
+
case s.ARROW_DOWN:
|
|
374
|
+
B(i.value, K);
|
|
375
|
+
break;
|
|
376
|
+
case s.ENTER:
|
|
377
|
+
case s.SPACE_CODE:
|
|
378
|
+
de(b, t.day);
|
|
379
|
+
}
|
|
380
|
+
function B(ee, L) {
|
|
381
|
+
const S = he(v);
|
|
382
|
+
if (!S.length)
|
|
383
|
+
return;
|
|
384
|
+
const y = S.indexOf(ee) + L;
|
|
385
|
+
if (y >= 0 && y < S.length) {
|
|
386
|
+
S[y].hasAttribute("data-disabled") && B(S[y], L), S[y].focus();
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (y < 0) {
|
|
390
|
+
if (e.isPrevButtonDisabled())
|
|
391
|
+
return;
|
|
392
|
+
e.prevPage(), $e(() => {
|
|
393
|
+
const m = he(v);
|
|
394
|
+
if (!m.length)
|
|
395
|
+
return;
|
|
396
|
+
if (!e.pagedNavigation.value && e.numberOfMonths.value > 1) {
|
|
397
|
+
const w = Se(e.placeholder.value) - Math.abs(y);
|
|
398
|
+
m[w].hasAttribute("data-disabled") && B(m[w], L), m[w].focus();
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const G = m.length - Math.abs(y);
|
|
402
|
+
m[G].hasAttribute("data-disabled") && B(m[G], L), m[G].focus();
|
|
403
|
+
});
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
if (y >= S.length) {
|
|
407
|
+
if (e.isNextButtonDisabled())
|
|
408
|
+
return;
|
|
409
|
+
e.nextPage(), $e(() => {
|
|
410
|
+
const m = he(v);
|
|
411
|
+
if (!m.length)
|
|
412
|
+
return;
|
|
413
|
+
if (!e.pagedNavigation.value && e.numberOfMonths.value > 1) {
|
|
414
|
+
const H = Se(
|
|
415
|
+
e.placeholder.value.add({ months: e.numberOfMonths.value - 1 })
|
|
416
|
+
), w = y - S.length + (m.length - H);
|
|
417
|
+
m[w].hasAttribute("data-disabled") && B(m[w], L), m[w].focus();
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
const G = y - S.length;
|
|
421
|
+
m[G].hasAttribute("data-disabled") && B(m[G], L), m[G].focus();
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return (b, v) => (r(), c(l(O), _({
|
|
427
|
+
ref_key: "primitiveElement",
|
|
428
|
+
ref: n
|
|
429
|
+
}, t, {
|
|
430
|
+
role: "button",
|
|
431
|
+
"aria-label": R.value,
|
|
432
|
+
"data-reka-calendar-cell-trigger": "",
|
|
433
|
+
"aria-selected": k.value && ($.value || !P.value) ? !0 : void 0,
|
|
434
|
+
"aria-disabled": A.value || P.value ? !0 : void 0,
|
|
435
|
+
"data-highlighted": g.value && ($.value || !P.value) ? "" : void 0,
|
|
436
|
+
"data-selection-start": x.value ? !0 : void 0,
|
|
437
|
+
"data-selection-end": F.value ? !0 : void 0,
|
|
438
|
+
"data-highlighted-start": E.value ? !0 : void 0,
|
|
439
|
+
"data-highlighted-end": u.value ? !0 : void 0,
|
|
440
|
+
"data-selected": k.value && ($.value || !P.value) ? !0 : void 0,
|
|
441
|
+
"data-outside-visible-view": W.value ? "" : void 0,
|
|
442
|
+
"data-value": b.day.toString(),
|
|
443
|
+
"data-disabled": A.value ? "" : void 0,
|
|
444
|
+
"data-unavailable": P.value ? "" : void 0,
|
|
445
|
+
"data-today": X.value ? "" : void 0,
|
|
446
|
+
"data-outside-view": M.value ? "" : void 0,
|
|
447
|
+
"data-focused": ne.value ? "" : void 0,
|
|
448
|
+
tabindex: ne.value ? 0 : M.value || A.value ? void 0 : -1,
|
|
449
|
+
onClick: ve,
|
|
450
|
+
onFocusin: Y,
|
|
451
|
+
onMouseenter: Y,
|
|
452
|
+
onKeydown: Ye(fe, ["up", "down", "left", "right", "enter", "space"])
|
|
453
|
+
}), {
|
|
454
|
+
default: o(() => [
|
|
455
|
+
h(b.$slots, "default", {
|
|
456
|
+
dayValue: se.value,
|
|
457
|
+
disabled: A.value,
|
|
458
|
+
today: X.value,
|
|
459
|
+
selected: k.value,
|
|
460
|
+
outsideView: M.value,
|
|
461
|
+
outsideVisibleView: W.value,
|
|
462
|
+
unavailable: P.value,
|
|
463
|
+
highlighted: g.value && ($.value || !P.value),
|
|
464
|
+
highlightedStart: E.value,
|
|
465
|
+
highlightedEnd: u.value,
|
|
466
|
+
selectionStart: x.value,
|
|
467
|
+
selectionEnd: F.value
|
|
468
|
+
}, () => [
|
|
469
|
+
z(le(se.value), 1)
|
|
470
|
+
])
|
|
471
|
+
]),
|
|
472
|
+
_: 3
|
|
473
|
+
}, 16, ["aria-label", "aria-selected", "aria-disabled", "data-highlighted", "data-selection-start", "data-selection-end", "data-highlighted-start", "data-highlighted-end", "data-selected", "data-outside-visible-view", "data-value", "data-disabled", "data-unavailable", "data-today", "data-outside-view", "data-focused", "tabindex"]));
|
|
474
|
+
}
|
|
475
|
+
}), wa = /* @__PURE__ */ p({
|
|
476
|
+
__name: "RangeCalendarGrid",
|
|
477
|
+
props: {
|
|
478
|
+
asChild: { type: Boolean },
|
|
479
|
+
as: { default: "table" }
|
|
480
|
+
},
|
|
481
|
+
setup(a) {
|
|
482
|
+
const t = a, e = Q(), s = f(() => e.disabled.value ? !0 : void 0), n = f(() => e.readonly.value ? !0 : void 0);
|
|
483
|
+
return (i, R) => (r(), c(l(O), _(t, {
|
|
484
|
+
tabindex: "-1",
|
|
485
|
+
role: "grid",
|
|
486
|
+
"aria-readonly": n.value,
|
|
487
|
+
"aria-disabled": s.value,
|
|
488
|
+
"data-readonly": n.value && "",
|
|
489
|
+
"data-disabled": s.value && ""
|
|
490
|
+
}), {
|
|
491
|
+
default: o(() => [
|
|
492
|
+
h(i.$slots, "default")
|
|
493
|
+
]),
|
|
494
|
+
_: 3
|
|
495
|
+
}, 16, ["aria-readonly", "aria-disabled", "data-readonly", "data-disabled"]));
|
|
496
|
+
}
|
|
497
|
+
}), Pa = /* @__PURE__ */ p({
|
|
498
|
+
__name: "RangeCalendarGridBody",
|
|
499
|
+
props: {
|
|
500
|
+
asChild: { type: Boolean },
|
|
501
|
+
as: { default: "tbody" }
|
|
502
|
+
},
|
|
503
|
+
setup(a) {
|
|
504
|
+
const t = a;
|
|
505
|
+
return (e, s) => (r(), c(l(O), q(J(t)), {
|
|
506
|
+
default: o(() => [
|
|
507
|
+
h(e.$slots, "default")
|
|
508
|
+
]),
|
|
509
|
+
_: 3
|
|
510
|
+
}, 16));
|
|
511
|
+
}
|
|
512
|
+
}), Ra = /* @__PURE__ */ p({
|
|
513
|
+
__name: "RangeCalendarGridHead",
|
|
514
|
+
props: {
|
|
515
|
+
asChild: { type: Boolean },
|
|
516
|
+
as: { default: "thead" }
|
|
517
|
+
},
|
|
518
|
+
setup(a) {
|
|
519
|
+
const t = a;
|
|
520
|
+
return (e, s) => (r(), c(l(O), _(t, { "aria-hidden": "true" }), {
|
|
521
|
+
default: o(() => [
|
|
522
|
+
h(e.$slots, "default")
|
|
523
|
+
]),
|
|
524
|
+
_: 3
|
|
525
|
+
}, 16));
|
|
526
|
+
}
|
|
527
|
+
}), $a = /* @__PURE__ */ p({
|
|
528
|
+
__name: "RangeCalendarGridRow",
|
|
529
|
+
props: {
|
|
530
|
+
asChild: { type: Boolean },
|
|
531
|
+
as: { default: "tr" }
|
|
532
|
+
},
|
|
533
|
+
setup(a) {
|
|
534
|
+
const t = a;
|
|
535
|
+
return (e, s) => (r(), c(l(O), q(J(t)), {
|
|
536
|
+
default: o(() => [
|
|
537
|
+
h(e.$slots, "default")
|
|
538
|
+
]),
|
|
539
|
+
_: 3
|
|
540
|
+
}, 16));
|
|
541
|
+
}
|
|
542
|
+
}), Ba = /* @__PURE__ */ p({
|
|
543
|
+
__name: "RangeCalendarHeadCell",
|
|
544
|
+
props: {
|
|
545
|
+
asChild: { type: Boolean },
|
|
546
|
+
as: { default: "th" }
|
|
547
|
+
},
|
|
548
|
+
setup(a) {
|
|
549
|
+
const t = a;
|
|
550
|
+
return (e, s) => (r(), c(l(O), q(J(t)), {
|
|
551
|
+
default: o(() => [
|
|
552
|
+
h(e.$slots, "default")
|
|
553
|
+
]),
|
|
554
|
+
_: 3
|
|
555
|
+
}, 16));
|
|
556
|
+
}
|
|
557
|
+
}), Sa = /* @__PURE__ */ p({
|
|
558
|
+
__name: "RangeCalendarHeader",
|
|
559
|
+
props: {
|
|
560
|
+
asChild: { type: Boolean },
|
|
561
|
+
as: { default: "div" }
|
|
562
|
+
},
|
|
563
|
+
setup(a) {
|
|
564
|
+
const t = a;
|
|
565
|
+
return (e, s) => (r(), c(l(O), q(J(t)), {
|
|
566
|
+
default: o(() => [
|
|
567
|
+
h(e.$slots, "default")
|
|
568
|
+
]),
|
|
569
|
+
_: 3
|
|
570
|
+
}, 16));
|
|
571
|
+
}
|
|
572
|
+
}), Va = /* @__PURE__ */ p({
|
|
573
|
+
__name: "RangeCalendarHeading",
|
|
574
|
+
props: {
|
|
575
|
+
asChild: { type: Boolean },
|
|
576
|
+
as: { default: "div" }
|
|
577
|
+
},
|
|
578
|
+
setup(a) {
|
|
579
|
+
const t = a, e = Q();
|
|
580
|
+
return (s, n) => (r(), c(l(O), _(t, {
|
|
581
|
+
"data-disabled": l(e).disabled.value ? "" : void 0
|
|
582
|
+
}), {
|
|
583
|
+
default: o(() => [
|
|
584
|
+
h(s.$slots, "default", {
|
|
585
|
+
headingValue: l(e).headingValue.value
|
|
586
|
+
}, () => [
|
|
587
|
+
z(le(l(e).headingValue.value), 1)
|
|
588
|
+
])
|
|
589
|
+
]),
|
|
590
|
+
_: 3
|
|
591
|
+
}, 16, ["data-disabled"]));
|
|
592
|
+
}
|
|
593
|
+
}), Oa = /* @__PURE__ */ p({
|
|
594
|
+
__name: "RangeCalendarNext",
|
|
595
|
+
props: {
|
|
596
|
+
nextPage: {},
|
|
597
|
+
asChild: { type: Boolean },
|
|
598
|
+
as: { default: "button" }
|
|
599
|
+
},
|
|
600
|
+
setup(a) {
|
|
601
|
+
const t = a, e = f(() => s.disabled.value || s.isNextButtonDisabled(t.nextPage)), s = Q();
|
|
602
|
+
return (n, i) => (r(), c(l(O), _(t, {
|
|
603
|
+
"aria-label": "Next page",
|
|
604
|
+
type: n.as === "button" ? "button" : void 0,
|
|
605
|
+
"aria-disabled": e.value || void 0,
|
|
606
|
+
"data-disabled": e.value || void 0,
|
|
607
|
+
disabled: e.value,
|
|
608
|
+
onClick: i[0] || (i[0] = (R) => l(s).nextPage(t.nextPage))
|
|
609
|
+
}), {
|
|
610
|
+
default: o(() => [
|
|
611
|
+
h(n.$slots, "default", { disabled: e.value }, () => [
|
|
612
|
+
i[1] || (i[1] = z(" Next page "))
|
|
613
|
+
])
|
|
614
|
+
]),
|
|
615
|
+
_: 3
|
|
616
|
+
}, 16, ["type", "aria-disabled", "data-disabled", "disabled"]));
|
|
617
|
+
}
|
|
618
|
+
}), ka = /* @__PURE__ */ p({
|
|
619
|
+
__name: "RangeCalendarPrev",
|
|
620
|
+
props: {
|
|
621
|
+
prevPage: {},
|
|
622
|
+
asChild: { type: Boolean },
|
|
623
|
+
as: { default: "button" }
|
|
624
|
+
},
|
|
625
|
+
setup(a) {
|
|
626
|
+
const t = a, e = f(() => s.disabled.value || s.isPrevButtonDisabled(t.prevPage)), s = Q();
|
|
627
|
+
return (n, i) => (r(), c(l(O), _(t, {
|
|
628
|
+
"aria-label": "Previous page",
|
|
629
|
+
type: n.as === "button" ? "button" : void 0,
|
|
630
|
+
"aria-disabled": e.value || void 0,
|
|
631
|
+
"data-disabled": e.value || void 0,
|
|
632
|
+
disabled: e.value,
|
|
633
|
+
onClick: i[0] || (i[0] = (R) => l(s).prevPage(t.prevPage))
|
|
634
|
+
}), {
|
|
635
|
+
default: o(() => [
|
|
636
|
+
h(n.$slots, "default", { disabled: e.value }, () => [
|
|
637
|
+
i[1] || (i[1] = z(" Prev page "))
|
|
638
|
+
])
|
|
639
|
+
]),
|
|
640
|
+
_: 3
|
|
641
|
+
}, 16, ["type", "aria-disabled", "data-disabled", "disabled"]));
|
|
642
|
+
}
|
|
643
|
+
}), Fa = { class: "flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0" }, dt = /* @__PURE__ */ p({
|
|
644
|
+
__name: "RangeCalendar",
|
|
645
|
+
props: {
|
|
646
|
+
defaultPlaceholder: {},
|
|
647
|
+
defaultValue: {},
|
|
648
|
+
modelValue: {},
|
|
649
|
+
placeholder: {},
|
|
650
|
+
allowNonContiguousRanges: { type: Boolean },
|
|
651
|
+
pagedNavigation: { type: Boolean },
|
|
652
|
+
preventDeselect: { type: Boolean },
|
|
653
|
+
maximumDays: {},
|
|
654
|
+
weekStartsOn: {},
|
|
655
|
+
weekdayFormat: {},
|
|
656
|
+
calendarLabel: {},
|
|
657
|
+
fixedWeeks: { type: Boolean },
|
|
658
|
+
maxValue: {},
|
|
659
|
+
minValue: {},
|
|
660
|
+
locale: {},
|
|
661
|
+
numberOfMonths: {},
|
|
662
|
+
disabled: { type: Boolean },
|
|
663
|
+
readonly: { type: Boolean },
|
|
664
|
+
initialFocus: { type: Boolean },
|
|
665
|
+
isDateDisabled: { type: Function },
|
|
666
|
+
isDateUnavailable: { type: Function },
|
|
667
|
+
isDateHighlightable: { type: Function },
|
|
668
|
+
dir: {},
|
|
669
|
+
nextPage: { type: Function },
|
|
670
|
+
prevPage: { type: Function },
|
|
671
|
+
disableDaysOutsideCurrentView: { type: Boolean },
|
|
672
|
+
fixedDate: {},
|
|
673
|
+
asChild: { type: Boolean },
|
|
674
|
+
as: { type: [String, Object, Function] },
|
|
675
|
+
class: {}
|
|
676
|
+
},
|
|
677
|
+
emits: ["update:modelValue", "update:placeholder", "update:startValue"],
|
|
678
|
+
setup(a, { emit: t }) {
|
|
679
|
+
const e = a, s = t, n = j(e, "class"), i = Ze(n, s);
|
|
680
|
+
return (R, P) => (r(), c(l(Ca), _({
|
|
681
|
+
class: l(I)("p-3", e.class)
|
|
682
|
+
}, l(i)), {
|
|
683
|
+
default: o(({ grid: k, weekDays: x }) => [
|
|
684
|
+
N(l(Aa), null, {
|
|
685
|
+
default: o(() => [
|
|
686
|
+
N(l(La)),
|
|
687
|
+
N(l(Ga)),
|
|
688
|
+
N(l(Ua))
|
|
689
|
+
]),
|
|
690
|
+
_: 1
|
|
691
|
+
}),
|
|
692
|
+
me("div", Fa, [
|
|
693
|
+
(r(!0), oe(ue, null, ce(k, (F) => (r(), c(l(Na), {
|
|
694
|
+
key: F.value.toString()
|
|
695
|
+
}, {
|
|
696
|
+
default: o(() => [
|
|
697
|
+
N(l(ja), null, {
|
|
698
|
+
default: o(() => [
|
|
699
|
+
N(l(Ve), null, {
|
|
700
|
+
default: o(() => [
|
|
701
|
+
(r(!0), oe(ue, null, ce(x, (E) => (r(), c(l(Ma), { key: E }, {
|
|
702
|
+
default: o(() => [
|
|
703
|
+
z(le(E), 1)
|
|
704
|
+
]),
|
|
705
|
+
_: 2
|
|
706
|
+
}, 1024))), 128))
|
|
707
|
+
]),
|
|
708
|
+
_: 2
|
|
709
|
+
}, 1024)
|
|
710
|
+
]),
|
|
711
|
+
_: 2
|
|
712
|
+
}, 1024),
|
|
713
|
+
N(l(Ia), null, {
|
|
714
|
+
default: o(() => [
|
|
715
|
+
(r(!0), oe(ue, null, ce(F.rows, (E, u) => (r(), c(l(Ve), {
|
|
716
|
+
key: `weekDate-${u}`,
|
|
717
|
+
class: "mt-2 w-full"
|
|
718
|
+
}, {
|
|
719
|
+
default: o(() => [
|
|
720
|
+
(r(!0), oe(ue, null, ce(E, (g) => (r(), c(l(Ea), {
|
|
721
|
+
key: g.toString(),
|
|
722
|
+
date: g
|
|
723
|
+
}, {
|
|
724
|
+
default: o(() => [
|
|
725
|
+
N(l(Ha), {
|
|
726
|
+
day: g,
|
|
727
|
+
month: F.value
|
|
728
|
+
}, null, 8, ["day", "month"])
|
|
729
|
+
]),
|
|
730
|
+
_: 2
|
|
731
|
+
}, 1032, ["date"]))), 128))
|
|
732
|
+
]),
|
|
733
|
+
_: 2
|
|
734
|
+
}, 1024))), 128))
|
|
735
|
+
]),
|
|
736
|
+
_: 2
|
|
737
|
+
}, 1024)
|
|
738
|
+
]),
|
|
739
|
+
_: 2
|
|
740
|
+
}, 1024))), 128))
|
|
741
|
+
])
|
|
742
|
+
]),
|
|
743
|
+
_: 1
|
|
744
|
+
}, 16, ["class"]));
|
|
745
|
+
}
|
|
746
|
+
}), Ea = /* @__PURE__ */ p({
|
|
747
|
+
__name: "RangeCalendarCell",
|
|
748
|
+
props: {
|
|
749
|
+
date: {},
|
|
750
|
+
asChild: { type: Boolean },
|
|
751
|
+
as: { type: [String, Object, Function] },
|
|
752
|
+
class: {}
|
|
753
|
+
},
|
|
754
|
+
setup(a) {
|
|
755
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
756
|
+
return (n, i) => (r(), c(l(_a), _({
|
|
757
|
+
class: l(I)("relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-view])]:bg-accent/50 [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md", t.class)
|
|
758
|
+
}, l(s)), {
|
|
759
|
+
default: o(() => [
|
|
760
|
+
h(n.$slots, "default")
|
|
761
|
+
]),
|
|
762
|
+
_: 3
|
|
763
|
+
}, 16, ["class"]));
|
|
764
|
+
}
|
|
765
|
+
}), Ha = /* @__PURE__ */ p({
|
|
766
|
+
__name: "RangeCalendarCellTrigger",
|
|
767
|
+
props: {
|
|
768
|
+
day: {},
|
|
769
|
+
month: {},
|
|
770
|
+
asChild: { type: Boolean },
|
|
771
|
+
as: { type: [String, Object, Function] },
|
|
772
|
+
class: {}
|
|
773
|
+
},
|
|
774
|
+
setup(a) {
|
|
775
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
776
|
+
return (n, i) => (r(), c(l(xa), _({
|
|
777
|
+
class: l(I)(
|
|
778
|
+
l(be)({ variant: "ghost" }),
|
|
779
|
+
"h-9 w-9 p-0 font-normal data-[selected]:opacity-100",
|
|
780
|
+
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
|
781
|
+
// Selection Start
|
|
782
|
+
"data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus:bg-primary data-[selection-start]:focus:text-primary-foreground",
|
|
783
|
+
// Selection End
|
|
784
|
+
"data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus:bg-primary data-[selection-end]:focus:text-primary-foreground",
|
|
785
|
+
// Outside months
|
|
786
|
+
"data-[outside-view]:text-muted-foreground data-[outside-view]:opacity-50 [&[data-outside-view][data-selected]]:bg-accent/50 [&[data-outside-view][data-selected]]:text-muted-foreground [&[data-outside-view][data-selected]]:opacity-30",
|
|
787
|
+
// Disabled
|
|
788
|
+
"data-[disabled]:text-muted-foreground data-[disabled]:opacity-50",
|
|
789
|
+
// Unavailable
|
|
790
|
+
"data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through",
|
|
791
|
+
t.class
|
|
792
|
+
)
|
|
793
|
+
}, l(s)), {
|
|
794
|
+
default: o(() => [
|
|
795
|
+
h(n.$slots, "default")
|
|
796
|
+
]),
|
|
797
|
+
_: 3
|
|
798
|
+
}, 16, ["class"]));
|
|
799
|
+
}
|
|
800
|
+
}), Na = /* @__PURE__ */ p({
|
|
801
|
+
__name: "RangeCalendarGrid",
|
|
802
|
+
props: {
|
|
803
|
+
asChild: { type: Boolean },
|
|
804
|
+
as: { type: [String, Object, Function] },
|
|
805
|
+
class: {}
|
|
806
|
+
},
|
|
807
|
+
setup(a) {
|
|
808
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
809
|
+
return (n, i) => (r(), c(l(wa), _({
|
|
810
|
+
class: l(I)("w-full border-collapse space-y-1", t.class)
|
|
811
|
+
}, l(s)), {
|
|
812
|
+
default: o(() => [
|
|
813
|
+
h(n.$slots, "default")
|
|
814
|
+
]),
|
|
815
|
+
_: 3
|
|
816
|
+
}, 16, ["class"]));
|
|
817
|
+
}
|
|
818
|
+
}), Ia = /* @__PURE__ */ p({
|
|
819
|
+
__name: "RangeCalendarGridBody",
|
|
820
|
+
props: {
|
|
821
|
+
asChild: { type: Boolean },
|
|
822
|
+
as: { type: [String, Object, Function] }
|
|
823
|
+
},
|
|
824
|
+
setup(a) {
|
|
825
|
+
const t = a;
|
|
826
|
+
return (e, s) => (r(), c(l(Pa), q(J(t)), {
|
|
827
|
+
default: o(() => [
|
|
828
|
+
h(e.$slots, "default")
|
|
829
|
+
]),
|
|
830
|
+
_: 3
|
|
831
|
+
}, 16));
|
|
832
|
+
}
|
|
833
|
+
}), ja = /* @__PURE__ */ p({
|
|
834
|
+
__name: "RangeCalendarGridHead",
|
|
835
|
+
props: {
|
|
836
|
+
asChild: { type: Boolean },
|
|
837
|
+
as: { type: [String, Object, Function] }
|
|
838
|
+
},
|
|
839
|
+
setup(a) {
|
|
840
|
+
const t = a;
|
|
841
|
+
return (e, s) => (r(), c(l(Ra), q(J(t)), {
|
|
842
|
+
default: o(() => [
|
|
843
|
+
h(e.$slots, "default")
|
|
844
|
+
]),
|
|
845
|
+
_: 3
|
|
846
|
+
}, 16));
|
|
847
|
+
}
|
|
848
|
+
}), Ve = /* @__PURE__ */ p({
|
|
849
|
+
__name: "RangeCalendarGridRow",
|
|
850
|
+
props: {
|
|
851
|
+
asChild: { type: Boolean },
|
|
852
|
+
as: { type: [String, Object, Function] },
|
|
853
|
+
class: {}
|
|
854
|
+
},
|
|
855
|
+
setup(a) {
|
|
856
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
857
|
+
return (n, i) => (r(), c(l($a), _({
|
|
858
|
+
class: l(I)("flex mt-2 w-full", t.class)
|
|
859
|
+
}, l(s)), {
|
|
860
|
+
default: o(() => [
|
|
861
|
+
h(n.$slots, "default")
|
|
862
|
+
]),
|
|
863
|
+
_: 3
|
|
864
|
+
}, 16, ["class"]));
|
|
865
|
+
}
|
|
866
|
+
}), Ma = /* @__PURE__ */ p({
|
|
867
|
+
__name: "RangeCalendarHeadCell",
|
|
868
|
+
props: {
|
|
869
|
+
asChild: { type: Boolean },
|
|
870
|
+
as: { type: [String, Object, Function] },
|
|
871
|
+
class: {}
|
|
872
|
+
},
|
|
873
|
+
setup(a) {
|
|
874
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
875
|
+
return (n, i) => (r(), c(l(Ba), _({
|
|
876
|
+
class: l(I)("w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground", t.class)
|
|
877
|
+
}, l(s)), {
|
|
878
|
+
default: o(() => [
|
|
879
|
+
h(n.$slots, "default")
|
|
880
|
+
]),
|
|
881
|
+
_: 3
|
|
882
|
+
}, 16, ["class"]));
|
|
883
|
+
}
|
|
884
|
+
}), Aa = /* @__PURE__ */ p({
|
|
885
|
+
__name: "RangeCalendarHeader",
|
|
886
|
+
props: {
|
|
887
|
+
asChild: { type: Boolean },
|
|
888
|
+
as: { type: [String, Object, Function] },
|
|
889
|
+
class: {}
|
|
890
|
+
},
|
|
891
|
+
setup(a) {
|
|
892
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
893
|
+
return (n, i) => (r(), c(l(Sa), _({
|
|
894
|
+
class: l(I)("relative flex w-full items-center justify-between pt-1", t.class)
|
|
895
|
+
}, l(s)), {
|
|
896
|
+
default: o(() => [
|
|
897
|
+
h(n.$slots, "default")
|
|
898
|
+
]),
|
|
899
|
+
_: 3
|
|
900
|
+
}, 16, ["class"]));
|
|
901
|
+
}
|
|
902
|
+
}), Ga = /* @__PURE__ */ p({
|
|
903
|
+
__name: "RangeCalendarHeading",
|
|
904
|
+
props: {
|
|
905
|
+
asChild: { type: Boolean },
|
|
906
|
+
as: { type: [String, Object, Function] },
|
|
907
|
+
class: {}
|
|
908
|
+
},
|
|
909
|
+
setup(a) {
|
|
910
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
911
|
+
return (n, i) => (r(), c(l(Va), _({
|
|
912
|
+
class: l(I)("text-sm font-medium", t.class)
|
|
913
|
+
}, l(s)), {
|
|
914
|
+
default: o(({ headingValue: R }) => [
|
|
915
|
+
h(n.$slots, "default", { headingValue: R }, () => [
|
|
916
|
+
z(le(R), 1)
|
|
917
|
+
])
|
|
918
|
+
]),
|
|
919
|
+
_: 3
|
|
920
|
+
}, 16, ["class"]));
|
|
921
|
+
}
|
|
922
|
+
}), Ua = /* @__PURE__ */ p({
|
|
923
|
+
__name: "RangeCalendarNextButton",
|
|
924
|
+
props: {
|
|
925
|
+
nextPage: { type: Function },
|
|
926
|
+
asChild: { type: Boolean },
|
|
927
|
+
as: { type: [String, Object, Function] },
|
|
928
|
+
class: {}
|
|
929
|
+
},
|
|
930
|
+
setup(a) {
|
|
931
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
932
|
+
return (n, i) => (r(), c(l(Oa), _({
|
|
933
|
+
class: l(I)(
|
|
934
|
+
l(be)({ variant: "outline" }),
|
|
935
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
936
|
+
t.class
|
|
937
|
+
)
|
|
938
|
+
}, l(s)), {
|
|
939
|
+
default: o(() => [
|
|
940
|
+
h(n.$slots, "default", {}, () => [
|
|
941
|
+
N(l(ga), { class: "h-4 w-4" })
|
|
942
|
+
])
|
|
943
|
+
]),
|
|
944
|
+
_: 3
|
|
945
|
+
}, 16, ["class"]));
|
|
946
|
+
}
|
|
947
|
+
}), La = /* @__PURE__ */ p({
|
|
948
|
+
__name: "RangeCalendarPrevButton",
|
|
949
|
+
props: {
|
|
950
|
+
prevPage: { type: Function },
|
|
951
|
+
asChild: { type: Boolean },
|
|
952
|
+
as: { type: [String, Object, Function] },
|
|
953
|
+
class: {}
|
|
954
|
+
},
|
|
955
|
+
setup(a) {
|
|
956
|
+
const t = a, e = j(t, "class"), s = U(e);
|
|
957
|
+
return (n, i) => (r(), c(l(ka), _({
|
|
958
|
+
class: l(I)(
|
|
959
|
+
l(be)({ variant: "outline" }),
|
|
960
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
961
|
+
t.class
|
|
962
|
+
)
|
|
963
|
+
}, l(s)), {
|
|
964
|
+
default: o(() => [
|
|
965
|
+
h(n.$slots, "default", {}, () => [
|
|
966
|
+
N(l(ha), { class: "h-4 w-4" })
|
|
967
|
+
])
|
|
968
|
+
]),
|
|
969
|
+
_: 3
|
|
970
|
+
}, 16, ["class"]));
|
|
971
|
+
}
|
|
972
|
+
});
|
|
973
|
+
export {
|
|
974
|
+
dt as RangeCalendar,
|
|
975
|
+
Ea as RangeCalendarCell,
|
|
976
|
+
Ha as RangeCalendarCellTrigger,
|
|
977
|
+
Na as RangeCalendarGrid,
|
|
978
|
+
Ia as RangeCalendarGridBody,
|
|
979
|
+
ja as RangeCalendarGridHead,
|
|
980
|
+
Ve as RangeCalendarGridRow,
|
|
981
|
+
Ma as RangeCalendarHeadCell,
|
|
982
|
+
Aa as RangeCalendarHeader,
|
|
983
|
+
Ga as RangeCalendarHeading,
|
|
984
|
+
Ua as RangeCalendarNextButton,
|
|
985
|
+
La as RangeCalendarPrevButton
|
|
986
|
+
};
|