@youcan/celeste 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/celeste.css +495 -30
- package/dist/cjs/calendar.cjs +2 -0
- package/dist/cjs/chunks/ComboboxContent.cjs +1 -1
- package/dist/cjs/chunks/DialogPortal.cjs +1 -1
- package/dist/cjs/chunks/DismissableLayer.cjs +0 -34
- package/dist/cjs/chunks/FocusScope.cjs +2 -2
- package/dist/cjs/chunks/MenuContentImpl.cjs +1 -1
- package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +1 -1
- package/dist/cjs/chunks/calendar.cjs +923 -0
- package/dist/cjs/chunks/components.cjs +9 -1
- package/dist/cjs/chunks/counter-input.cjs +2 -13
- package/dist/cjs/chunks/date-picker.cjs +99 -0
- package/dist/cjs/chunks/defu.cjs +34 -0
- package/dist/cjs/chunks/popover-content.cjs +1 -1
- package/dist/cjs/chunks/range-calendar.cjs +1170 -0
- package/dist/cjs/chunks/range-picker.cjs +231 -0
- package/dist/cjs/chunks/text-input.cjs +1 -1
- package/dist/cjs/chunks/tooltip-content.cjs +3 -2
- package/dist/cjs/chunks/useCalendar.cjs +2439 -0
- package/dist/cjs/chunks/useLocale.cjs +20 -0
- package/dist/cjs/date-picker.cjs +2 -0
- package/dist/cjs/index.cjs +9 -1
- package/dist/cjs/range-calendar.cjs +2 -0
- package/dist/cjs/range-picker.cjs +2 -0
- package/dist/components/calendar/calendar.d.ts +19 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/date-picker/date-picker.d.ts +27 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/range-calendar/index.d.ts +2 -0
- package/dist/components/range-calendar/range-calendar.d.ts +24 -0
- package/dist/components/range-picker/index.d.ts +2 -0
- package/dist/components/range-picker/range-picker.d.ts +38 -0
- package/dist/components/rich-editor/rich-editor.d.ts +1 -1
- package/dist/components/text-input/text-input.d.ts +2 -2
- package/dist/es/calendar.js +2 -0
- package/dist/es/chunks/ComboboxContent.js +1 -1
- package/dist/es/chunks/DialogPortal.js +1 -1
- package/dist/es/chunks/DismissableLayer.js +1 -29
- package/dist/es/chunks/FocusScope.js +1 -1
- package/dist/es/chunks/MenuContentImpl.js +1 -1
- package/dist/es/chunks/SelectItemAlignedPosition.js +1 -1
- package/dist/es/chunks/calendar.js +916 -0
- package/dist/es/chunks/components.js +9 -1
- package/dist/es/chunks/counter-input.js +1 -12
- package/dist/es/chunks/date-picker.js +92 -0
- package/dist/es/chunks/defu.js +29 -0
- package/dist/es/chunks/popover-content.js +1 -1
- package/dist/es/chunks/range-calendar.js +1163 -0
- package/dist/es/chunks/range-picker.js +224 -0
- package/dist/es/chunks/text-input.js +1 -1
- package/dist/es/chunks/tooltip-content.js +2 -1
- package/dist/es/chunks/useCalendar.js +2331 -0
- package/dist/es/chunks/useLocale.js +14 -0
- package/dist/es/date-picker.js +2 -0
- package/dist/es/index.js +6 -2
- package/dist/es/range-calendar.js +2 -0
- package/dist/es/range-picker.js +2 -0
- package/package.json +4 -3
- package/src/components/calendar/calendar.vue +305 -0
- package/src/components/calendar/index.ts +2 -0
- package/src/components/calendar/stories/calendar.stories.ts +76 -0
- package/src/components/date-picker/date-picker.vue +91 -0
- package/src/components/date-picker/index.ts +2 -0
- package/src/components/date-picker/stories/date-picker.stories.ts +92 -0
- package/src/components/index.ts +4 -0
- package/src/components/range-calendar/index.ts +2 -0
- package/src/components/range-calendar/range-calendar.vue +363 -0
- package/src/components/range-calendar/stories/range-calendar.stories.ts +46 -0
- package/src/components/range-picker/index.ts +2 -0
- package/src/components/range-picker/range-picker.vue +237 -0
- package/src/components/range-picker/stories/range-picker.stories.ts +97 -0
- package/src/components/text-input/text-input.vue +2 -1
|
@@ -0,0 +1,1170 @@
|
|
|
1
|
+
require("./chunk.cjs");
|
|
2
|
+
const require_clsx = require("./clsx.cjs");
|
|
3
|
+
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper.cjs");
|
|
4
|
+
const require_createContext = require("./createContext.cjs");
|
|
5
|
+
const require_dist = require("./dist.cjs");
|
|
6
|
+
const require_Primitive = require("./Primitive.cjs");
|
|
7
|
+
const require_useCalendar = require("./useCalendar.cjs");
|
|
8
|
+
const require_useDirection = require("./useDirection.cjs");
|
|
9
|
+
const require_useForwardPropsEmits = require("./useForwardPropsEmits.cjs");
|
|
10
|
+
const require_useKbd = require("./useKbd.cjs");
|
|
11
|
+
const require_useLocale = require("./useLocale.cjs");
|
|
12
|
+
const require_usePrimitiveElement = require("./usePrimitiveElement.cjs");
|
|
13
|
+
const require_use_delegated_props = require("../use-delegated-props.cjs");
|
|
14
|
+
let vue = require("vue");
|
|
15
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/useRangeCalendar.js
|
|
16
|
+
function useRangeCalendarState(props) {
|
|
17
|
+
const isStartInvalid = (0, vue.computed)(() => {
|
|
18
|
+
if (!props.start.value) return false;
|
|
19
|
+
if (props.isDateDisabled(props.start.value)) return true;
|
|
20
|
+
return false;
|
|
21
|
+
});
|
|
22
|
+
const isEndInvalid = (0, vue.computed)(() => {
|
|
23
|
+
if (!props.end.value) return false;
|
|
24
|
+
if (props.isDateDisabled(props.end.value)) return true;
|
|
25
|
+
return false;
|
|
26
|
+
});
|
|
27
|
+
const isInvalid = (0, vue.computed)(() => {
|
|
28
|
+
if (isStartInvalid.value || isEndInvalid.value) return true;
|
|
29
|
+
if (props.start.value && props.end.value && require_useCalendar.isBefore(props.end.value, props.start.value)) return true;
|
|
30
|
+
return false;
|
|
31
|
+
});
|
|
32
|
+
const isSelectionStart = (date) => {
|
|
33
|
+
if (!props.start.value) return false;
|
|
34
|
+
return require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.start.value, date);
|
|
35
|
+
};
|
|
36
|
+
const isSelectionEnd = (date) => {
|
|
37
|
+
if (!props.end.value) return false;
|
|
38
|
+
return require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.end.value, date);
|
|
39
|
+
};
|
|
40
|
+
const isSelected = (date) => {
|
|
41
|
+
if (props.start.value && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.start.value, date)) return true;
|
|
42
|
+
if (props.end.value && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.end.value, date)) return true;
|
|
43
|
+
if (props.end.value && props.start.value) return require_useCalendar.isBetween(date, props.start.value, props.end.value);
|
|
44
|
+
return false;
|
|
45
|
+
};
|
|
46
|
+
const rangeIsDateDisabled = (date) => {
|
|
47
|
+
if (props.isDateDisabled(date)) return true;
|
|
48
|
+
if (props.maximumDays?.value) {
|
|
49
|
+
if (props.start.value && props.end.value) {
|
|
50
|
+
if (props.fixedDate.value) {
|
|
51
|
+
const diff = require_useCalendar.getDaysBetween(props.start.value, props.end.value).length;
|
|
52
|
+
if (diff <= props.maximumDays.value) {
|
|
53
|
+
const daysLeft = props.maximumDays.value - diff - 1;
|
|
54
|
+
return !require_useCalendar.isBetween(date, props.start.value.subtract({ days: daysLeft }), props.end.value.add({ days: daysLeft }));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (props.start.value) {
|
|
60
|
+
const maxDate = props.start.value.add({ days: props.maximumDays.value });
|
|
61
|
+
return !require_useCalendar.isBetween(date, props.start.value.subtract({ days: props.maximumDays.value }), maxDate);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
};
|
|
66
|
+
const isDateHighlightable = (date) => {
|
|
67
|
+
if (props.isDateHighlightable?.(date)) return true;
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
const highlightedRange = (0, vue.computed)(() => {
|
|
71
|
+
if (props.start.value && props.end.value && !props.fixedDate.value) return null;
|
|
72
|
+
if (!props.start.value || !props.focusedValue.value) return null;
|
|
73
|
+
const isStartBeforeFocused = require_useCalendar.isBefore(props.start.value, props.focusedValue.value);
|
|
74
|
+
const start = isStartBeforeFocused ? props.start.value : props.focusedValue.value;
|
|
75
|
+
const end = isStartBeforeFocused ? props.focusedValue.value : props.start.value;
|
|
76
|
+
if (require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(start, end)) return {
|
|
77
|
+
start,
|
|
78
|
+
end
|
|
79
|
+
};
|
|
80
|
+
if (props.maximumDays?.value && !props.end.value) {
|
|
81
|
+
const maximumDays = props.maximumDays.value;
|
|
82
|
+
const anchor = props.start.value;
|
|
83
|
+
const focused = props.focusedValue.value;
|
|
84
|
+
if (!require_useCalendar.isBefore(focused, anchor)) return {
|
|
85
|
+
start: anchor,
|
|
86
|
+
end: anchor.add({ days: maximumDays - 1 })
|
|
87
|
+
};
|
|
88
|
+
return {
|
|
89
|
+
start: anchor.subtract({ days: maximumDays - 1 }),
|
|
90
|
+
end: anchor
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (require_useCalendar.areAllDaysBetweenValid(start, end, props.allowNonContiguousRanges.value ? () => false : props.isDateUnavailable, rangeIsDateDisabled, props.isDateHighlightable)) return {
|
|
94
|
+
start,
|
|
95
|
+
end
|
|
96
|
+
};
|
|
97
|
+
return null;
|
|
98
|
+
});
|
|
99
|
+
const isHighlightedStart = (date) => {
|
|
100
|
+
if (!highlightedRange.value || !highlightedRange.value.start) return false;
|
|
101
|
+
return require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(highlightedRange.value.start, date);
|
|
102
|
+
};
|
|
103
|
+
const isHighlightedEnd = (date) => {
|
|
104
|
+
if (!highlightedRange.value || !highlightedRange.value.end) return false;
|
|
105
|
+
return require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(highlightedRange.value.end, date);
|
|
106
|
+
};
|
|
107
|
+
const hasSelectedDate = (0, vue.computed)(() => {
|
|
108
|
+
return !!(props.start.value || props.end.value);
|
|
109
|
+
});
|
|
110
|
+
const isStartDateDisabled = (0, vue.computed)(() => {
|
|
111
|
+
return !!(props.start.value && props.isDateDisabled(props.start.value));
|
|
112
|
+
});
|
|
113
|
+
const isEndDateDisabled = (0, vue.computed)(() => {
|
|
114
|
+
return !!(props.end.value && props.isDateDisabled(props.end.value));
|
|
115
|
+
});
|
|
116
|
+
return {
|
|
117
|
+
isInvalid,
|
|
118
|
+
isSelected,
|
|
119
|
+
isDateHighlightable,
|
|
120
|
+
highlightedRange,
|
|
121
|
+
isSelectionStart,
|
|
122
|
+
isSelectionEnd,
|
|
123
|
+
isHighlightedStart,
|
|
124
|
+
isHighlightedEnd,
|
|
125
|
+
isDateDisabled: rangeIsDateDisabled,
|
|
126
|
+
hasSelectedDate,
|
|
127
|
+
isSelectedDisabled: (0, vue.computed)(() => {
|
|
128
|
+
const hasStart = !!props.start.value;
|
|
129
|
+
const hasEnd = !!props.end.value;
|
|
130
|
+
if (!hasStart && !hasEnd) return false;
|
|
131
|
+
if (hasStart && hasEnd) return isStartDateDisabled.value && isEndDateDisabled.value;
|
|
132
|
+
return hasStart && isStartDateDisabled.value || hasEnd && isEndDateDisabled.value;
|
|
133
|
+
}),
|
|
134
|
+
selectedFocusableDate: (0, vue.computed)(() => {
|
|
135
|
+
if (props.start.value && !isStartDateDisabled.value) return props.start.value;
|
|
136
|
+
if (props.end.value && !isEndDateDisabled.value) return props.end.value;
|
|
137
|
+
})
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarRoot.js
|
|
142
|
+
var _hoisted_1$1 = { style: {
|
|
143
|
+
"border": "0px",
|
|
144
|
+
"clip": "rect(0px, 0px, 0px, 0px)",
|
|
145
|
+
"clip-path": "inset(50%)",
|
|
146
|
+
"height": "1px",
|
|
147
|
+
"margin": "-1px",
|
|
148
|
+
"overflow": "hidden",
|
|
149
|
+
"padding": "0px",
|
|
150
|
+
"position": "absolute",
|
|
151
|
+
"white-space": "nowrap",
|
|
152
|
+
"width": "1px"
|
|
153
|
+
} };
|
|
154
|
+
var _hoisted_2$1 = {
|
|
155
|
+
role: "heading",
|
|
156
|
+
"aria-level": "2"
|
|
157
|
+
};
|
|
158
|
+
var [injectRangeCalendarRootContext, provideRangeCalendarRootContext] = /* @__PURE__ */ require_createContext.createContext("RangeCalendarRoot");
|
|
159
|
+
var RangeCalendarRoot_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
160
|
+
__name: "RangeCalendarRoot",
|
|
161
|
+
props: {
|
|
162
|
+
defaultPlaceholder: {
|
|
163
|
+
type: null,
|
|
164
|
+
required: false
|
|
165
|
+
},
|
|
166
|
+
defaultValue: {
|
|
167
|
+
type: Object,
|
|
168
|
+
required: false,
|
|
169
|
+
default: () => ({
|
|
170
|
+
start: void 0,
|
|
171
|
+
end: void 0
|
|
172
|
+
})
|
|
173
|
+
},
|
|
174
|
+
modelValue: {
|
|
175
|
+
type: [Object, null],
|
|
176
|
+
required: false
|
|
177
|
+
},
|
|
178
|
+
placeholder: {
|
|
179
|
+
type: null,
|
|
180
|
+
required: false,
|
|
181
|
+
default: void 0
|
|
182
|
+
},
|
|
183
|
+
allowNonContiguousRanges: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
required: false,
|
|
186
|
+
default: false
|
|
187
|
+
},
|
|
188
|
+
pagedNavigation: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
required: false,
|
|
191
|
+
default: false
|
|
192
|
+
},
|
|
193
|
+
preventDeselect: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
required: false,
|
|
196
|
+
default: false
|
|
197
|
+
},
|
|
198
|
+
maximumDays: {
|
|
199
|
+
type: Number,
|
|
200
|
+
required: false,
|
|
201
|
+
default: void 0
|
|
202
|
+
},
|
|
203
|
+
weekStartsOn: {
|
|
204
|
+
type: Number,
|
|
205
|
+
required: false
|
|
206
|
+
},
|
|
207
|
+
weekdayFormat: {
|
|
208
|
+
type: String,
|
|
209
|
+
required: false,
|
|
210
|
+
default: "narrow"
|
|
211
|
+
},
|
|
212
|
+
calendarLabel: {
|
|
213
|
+
type: String,
|
|
214
|
+
required: false
|
|
215
|
+
},
|
|
216
|
+
fixedWeeks: {
|
|
217
|
+
type: Boolean,
|
|
218
|
+
required: false,
|
|
219
|
+
default: false
|
|
220
|
+
},
|
|
221
|
+
maxValue: {
|
|
222
|
+
type: null,
|
|
223
|
+
required: false
|
|
224
|
+
},
|
|
225
|
+
minValue: {
|
|
226
|
+
type: null,
|
|
227
|
+
required: false
|
|
228
|
+
},
|
|
229
|
+
locale: {
|
|
230
|
+
type: String,
|
|
231
|
+
required: false
|
|
232
|
+
},
|
|
233
|
+
numberOfMonths: {
|
|
234
|
+
type: Number,
|
|
235
|
+
required: false,
|
|
236
|
+
default: 1
|
|
237
|
+
},
|
|
238
|
+
disabled: {
|
|
239
|
+
type: Boolean,
|
|
240
|
+
required: false,
|
|
241
|
+
default: false
|
|
242
|
+
},
|
|
243
|
+
readonly: {
|
|
244
|
+
type: Boolean,
|
|
245
|
+
required: false,
|
|
246
|
+
default: false
|
|
247
|
+
},
|
|
248
|
+
initialFocus: {
|
|
249
|
+
type: Boolean,
|
|
250
|
+
required: false,
|
|
251
|
+
default: false
|
|
252
|
+
},
|
|
253
|
+
isDateDisabled: {
|
|
254
|
+
type: Function,
|
|
255
|
+
required: false,
|
|
256
|
+
default: void 0
|
|
257
|
+
},
|
|
258
|
+
isDateUnavailable: {
|
|
259
|
+
type: Function,
|
|
260
|
+
required: false,
|
|
261
|
+
default: void 0
|
|
262
|
+
},
|
|
263
|
+
isDateHighlightable: {
|
|
264
|
+
type: Function,
|
|
265
|
+
required: false,
|
|
266
|
+
default: void 0
|
|
267
|
+
},
|
|
268
|
+
dir: {
|
|
269
|
+
type: String,
|
|
270
|
+
required: false
|
|
271
|
+
},
|
|
272
|
+
nextPage: {
|
|
273
|
+
type: Function,
|
|
274
|
+
required: false
|
|
275
|
+
},
|
|
276
|
+
prevPage: {
|
|
277
|
+
type: Function,
|
|
278
|
+
required: false
|
|
279
|
+
},
|
|
280
|
+
disableDaysOutsideCurrentView: {
|
|
281
|
+
type: Boolean,
|
|
282
|
+
required: false,
|
|
283
|
+
default: false
|
|
284
|
+
},
|
|
285
|
+
fixedDate: {
|
|
286
|
+
type: String,
|
|
287
|
+
required: false
|
|
288
|
+
},
|
|
289
|
+
asChild: {
|
|
290
|
+
type: Boolean,
|
|
291
|
+
required: false
|
|
292
|
+
},
|
|
293
|
+
as: {
|
|
294
|
+
type: null,
|
|
295
|
+
required: false,
|
|
296
|
+
default: "div"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
emits: [
|
|
300
|
+
"update:modelValue",
|
|
301
|
+
"update:validModelValue",
|
|
302
|
+
"update:placeholder",
|
|
303
|
+
"update:startValue"
|
|
304
|
+
],
|
|
305
|
+
setup(__props, { emit: __emit }) {
|
|
306
|
+
const props = __props;
|
|
307
|
+
const emits = __emit;
|
|
308
|
+
const { disabled, readonly, initialFocus, pagedNavigation, weekdayFormat, fixedWeeks, numberOfMonths, preventDeselect, isDateUnavailable: propsIsDateUnavailable, isDateHighlightable: propsIsDateHighlightable, isDateDisabled: propsIsDateDisabled, calendarLabel, maxValue, minValue, dir: propDir, locale: propLocale, nextPage: propsNextPage, prevPage: propsPrevPage, allowNonContiguousRanges, disableDaysOutsideCurrentView, fixedDate, maximumDays } = (0, vue.toRefs)(props);
|
|
309
|
+
const { primitiveElement, currentElement: parentElement } = require_usePrimitiveElement.usePrimitiveElement();
|
|
310
|
+
const dir = require_useDirection.useDirection(propDir);
|
|
311
|
+
const locale = require_useLocale.useLocale(propLocale);
|
|
312
|
+
const weekStartsOn = (0, vue.computed)(() => props.weekStartsOn ?? require_useCalendar.getWeekStartsOn(locale.value));
|
|
313
|
+
const lastPressedDateValue = (0, vue.ref)();
|
|
314
|
+
const focusedValue = (0, vue.ref)();
|
|
315
|
+
const isEditing = (0, vue.ref)(false);
|
|
316
|
+
const modelValue = require_dist.useVModel(props, "modelValue", emits, {
|
|
317
|
+
defaultValue: props.defaultValue ?? {
|
|
318
|
+
start: void 0,
|
|
319
|
+
end: void 0
|
|
320
|
+
},
|
|
321
|
+
passive: props.modelValue === void 0
|
|
322
|
+
});
|
|
323
|
+
const normalizeRange = (value) => value ?? {
|
|
324
|
+
start: void 0,
|
|
325
|
+
end: void 0
|
|
326
|
+
};
|
|
327
|
+
const normalizedModelValue = (0, vue.computed)(() => normalizeRange(modelValue.value));
|
|
328
|
+
const validModelValue = (0, vue.ref)(normalizeRange(modelValue.value));
|
|
329
|
+
(0, vue.watch)(validModelValue, (value) => {
|
|
330
|
+
emits("update:validModelValue", value);
|
|
331
|
+
});
|
|
332
|
+
const defaultDate = require_useCalendar.getDefaultDate({
|
|
333
|
+
defaultPlaceholder: props.placeholder,
|
|
334
|
+
defaultValue: normalizeRange(modelValue.value).start,
|
|
335
|
+
locale: props.locale
|
|
336
|
+
});
|
|
337
|
+
const startValue = (0, vue.ref)(normalizeRange(modelValue.value).start);
|
|
338
|
+
const endValue = (0, vue.ref)(normalizeRange(modelValue.value).end);
|
|
339
|
+
const placeholder = require_dist.useVModel(props, "placeholder", emits, {
|
|
340
|
+
defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),
|
|
341
|
+
passive: props.placeholder === void 0
|
|
342
|
+
});
|
|
343
|
+
function onPlaceholderChange(value) {
|
|
344
|
+
placeholder.value = value.copy();
|
|
345
|
+
}
|
|
346
|
+
const { fullCalendarLabel, headingValue, isDateDisabled, isDateUnavailable, isNextButtonDisabled, isPrevButtonDisabled, grid, weekdays, isOutsideVisibleView, nextPage, prevPage, formatter, isPlaceholderFocusable, firstFocusableDate } = require_useCalendar.useCalendar({
|
|
347
|
+
locale,
|
|
348
|
+
placeholder,
|
|
349
|
+
weekStartsOn,
|
|
350
|
+
fixedWeeks,
|
|
351
|
+
numberOfMonths,
|
|
352
|
+
minValue,
|
|
353
|
+
maxValue,
|
|
354
|
+
disabled,
|
|
355
|
+
weekdayFormat,
|
|
356
|
+
pagedNavigation,
|
|
357
|
+
isDateDisabled: propsIsDateDisabled.value,
|
|
358
|
+
isDateUnavailable: propsIsDateUnavailable.value,
|
|
359
|
+
calendarLabel,
|
|
360
|
+
nextPage: propsNextPage,
|
|
361
|
+
prevPage: propsPrevPage
|
|
362
|
+
});
|
|
363
|
+
const { isInvalid, isSelected, isDateHighlightable, highlightedRange, isSelectionStart, isSelectionEnd, isHighlightedStart, isHighlightedEnd, isDateDisabled: rangeIsDateDisabled, hasSelectedDate, isSelectedDisabled, selectedFocusableDate } = useRangeCalendarState({
|
|
364
|
+
start: startValue,
|
|
365
|
+
end: endValue,
|
|
366
|
+
isDateDisabled,
|
|
367
|
+
isDateUnavailable,
|
|
368
|
+
isDateHighlightable: propsIsDateHighlightable.value,
|
|
369
|
+
focusedValue,
|
|
370
|
+
allowNonContiguousRanges,
|
|
371
|
+
fixedDate,
|
|
372
|
+
maximumDays
|
|
373
|
+
});
|
|
374
|
+
(0, vue.watch)(modelValue, (_modelValue) => {
|
|
375
|
+
const next = normalizeRange(_modelValue);
|
|
376
|
+
if (!(!next.start && !startValue.value || !!next.start && !!startValue.value && require_useCalendar.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(next.start, startValue.value))) startValue.value = next.start?.copy?.();
|
|
377
|
+
if (!(!next.end && !endValue.value || !!next.end && !!endValue.value && require_useCalendar.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(next.end, endValue.value))) endValue.value = next.end?.copy?.();
|
|
378
|
+
});
|
|
379
|
+
(0, vue.watch)(startValue, (_startValue) => {
|
|
380
|
+
if (_startValue && !require_useCalendar.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(_startValue, placeholder.value)) onPlaceholderChange(_startValue);
|
|
381
|
+
emits("update:startValue", _startValue);
|
|
382
|
+
});
|
|
383
|
+
(0, vue.watch)([startValue, endValue], ([_startValue, _endValue]) => {
|
|
384
|
+
const value = modelValue.value;
|
|
385
|
+
if (value && value.start && value.end && _startValue && _endValue && require_useCalendar.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(value.start, _startValue) && require_useCalendar.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(value.end, _endValue)) return;
|
|
386
|
+
isEditing.value = true;
|
|
387
|
+
if (_endValue && _startValue) {
|
|
388
|
+
const nextValue = require_useCalendar.isBefore(_endValue, _startValue) ? {
|
|
389
|
+
start: _endValue.copy(),
|
|
390
|
+
end: _startValue.copy()
|
|
391
|
+
} : {
|
|
392
|
+
start: _startValue.copy(),
|
|
393
|
+
end: _endValue.copy()
|
|
394
|
+
};
|
|
395
|
+
modelValue.value = {
|
|
396
|
+
start: nextValue.start,
|
|
397
|
+
end: nextValue.end
|
|
398
|
+
};
|
|
399
|
+
isEditing.value = false;
|
|
400
|
+
validModelValue.value = {
|
|
401
|
+
start: nextValue.start.copy(),
|
|
402
|
+
end: nextValue.end.copy()
|
|
403
|
+
};
|
|
404
|
+
} else modelValue.value = _startValue ? {
|
|
405
|
+
start: _startValue.copy(),
|
|
406
|
+
end: void 0
|
|
407
|
+
} : {
|
|
408
|
+
start: _endValue?.copy(),
|
|
409
|
+
end: void 0
|
|
410
|
+
};
|
|
411
|
+
});
|
|
412
|
+
const kbd = require_useKbd.useKbd();
|
|
413
|
+
require_dist.useEventListener(parentElement, "keydown", (ev) => {
|
|
414
|
+
if (ev.key === kbd.ESCAPE && isEditing.value) {
|
|
415
|
+
startValue.value = validModelValue.value.start?.copy();
|
|
416
|
+
endValue.value = validModelValue.value.end?.copy();
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
provideRangeCalendarRootContext({
|
|
420
|
+
isDateUnavailable,
|
|
421
|
+
isDateHighlightable,
|
|
422
|
+
startValue,
|
|
423
|
+
endValue,
|
|
424
|
+
formatter,
|
|
425
|
+
modelValue: normalizedModelValue,
|
|
426
|
+
placeholder,
|
|
427
|
+
disabled,
|
|
428
|
+
initialFocus,
|
|
429
|
+
pagedNavigation,
|
|
430
|
+
grid,
|
|
431
|
+
weekDays: weekdays,
|
|
432
|
+
weekStartsOn,
|
|
433
|
+
weekdayFormat,
|
|
434
|
+
fixedWeeks,
|
|
435
|
+
numberOfMonths,
|
|
436
|
+
readonly,
|
|
437
|
+
preventDeselect,
|
|
438
|
+
fullCalendarLabel,
|
|
439
|
+
headingValue,
|
|
440
|
+
isInvalid,
|
|
441
|
+
isDateDisabled: rangeIsDateDisabled,
|
|
442
|
+
allowNonContiguousRanges,
|
|
443
|
+
highlightedRange,
|
|
444
|
+
focusedValue,
|
|
445
|
+
lastPressedDateValue,
|
|
446
|
+
isSelected,
|
|
447
|
+
isSelectionEnd,
|
|
448
|
+
isSelectionStart,
|
|
449
|
+
isNextButtonDisabled,
|
|
450
|
+
isPrevButtonDisabled,
|
|
451
|
+
isOutsideVisibleView,
|
|
452
|
+
nextPage,
|
|
453
|
+
prevPage,
|
|
454
|
+
parentElement,
|
|
455
|
+
onPlaceholderChange,
|
|
456
|
+
locale,
|
|
457
|
+
dir,
|
|
458
|
+
isHighlightedStart,
|
|
459
|
+
isHighlightedEnd,
|
|
460
|
+
disableDaysOutsideCurrentView,
|
|
461
|
+
fixedDate,
|
|
462
|
+
maximumDays,
|
|
463
|
+
minValue,
|
|
464
|
+
maxValue,
|
|
465
|
+
isPlaceholderFocusable,
|
|
466
|
+
firstFocusableDate,
|
|
467
|
+
hasSelectedDate,
|
|
468
|
+
isSelectedDisabled,
|
|
469
|
+
selectedFocusableDate
|
|
470
|
+
});
|
|
471
|
+
(0, vue.onMounted)(() => {
|
|
472
|
+
if (initialFocus.value) require_useCalendar.handleCalendarInitialFocus(parentElement.value);
|
|
473
|
+
});
|
|
474
|
+
return (_ctx, _cache) => {
|
|
475
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), {
|
|
476
|
+
ref_key: "primitiveElement",
|
|
477
|
+
ref: primitiveElement,
|
|
478
|
+
as: _ctx.as,
|
|
479
|
+
"as-child": _ctx.asChild,
|
|
480
|
+
"aria-label": (0, vue.unref)(fullCalendarLabel),
|
|
481
|
+
"data-readonly": (0, vue.unref)(readonly) ? "" : void 0,
|
|
482
|
+
"data-disabled": (0, vue.unref)(disabled) ? "" : void 0,
|
|
483
|
+
"data-invalid": (0, vue.unref)(isInvalid) ? "" : void 0,
|
|
484
|
+
dir: (0, vue.unref)(dir)
|
|
485
|
+
}, {
|
|
486
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$1, [(0, vue.createElementVNode)("div", _hoisted_2$1, (0, vue.toDisplayString)((0, vue.unref)(fullCalendarLabel)), 1)]), (0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
487
|
+
date: (0, vue.unref)(placeholder),
|
|
488
|
+
grid: (0, vue.unref)(grid),
|
|
489
|
+
weekDays: (0, vue.unref)(weekdays),
|
|
490
|
+
weekStartsOn: weekStartsOn.value,
|
|
491
|
+
locale: (0, vue.unref)(locale),
|
|
492
|
+
fixedWeeks: (0, vue.unref)(fixedWeeks),
|
|
493
|
+
modelValue: normalizedModelValue.value
|
|
494
|
+
})]),
|
|
495
|
+
_: 3
|
|
496
|
+
}, 8, [
|
|
497
|
+
"as",
|
|
498
|
+
"as-child",
|
|
499
|
+
"aria-label",
|
|
500
|
+
"data-readonly",
|
|
501
|
+
"data-disabled",
|
|
502
|
+
"data-invalid",
|
|
503
|
+
"dir"
|
|
504
|
+
]);
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarCell.js
|
|
510
|
+
var RangeCalendarCell_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
511
|
+
__name: "RangeCalendarCell",
|
|
512
|
+
props: {
|
|
513
|
+
date: {
|
|
514
|
+
type: null,
|
|
515
|
+
required: true
|
|
516
|
+
},
|
|
517
|
+
asChild: {
|
|
518
|
+
type: Boolean,
|
|
519
|
+
required: false
|
|
520
|
+
},
|
|
521
|
+
as: {
|
|
522
|
+
type: null,
|
|
523
|
+
required: false,
|
|
524
|
+
default: "td"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
setup(__props) {
|
|
528
|
+
const rootContext = injectRangeCalendarRootContext();
|
|
529
|
+
return (_ctx, _cache) => {
|
|
530
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), {
|
|
531
|
+
as: _ctx.as,
|
|
532
|
+
"as-child": _ctx.asChild,
|
|
533
|
+
role: "gridcell",
|
|
534
|
+
"aria-selected": (0, vue.unref)(rootContext).isSelected(_ctx.date) ? true : void 0,
|
|
535
|
+
"aria-disabled": (0, vue.unref)(rootContext).isDateDisabled(_ctx.date) || (0, vue.unref)(rootContext).isDateUnavailable?.(_ctx.date) || (0, vue.unref)(rootContext).disableDaysOutsideCurrentView.value,
|
|
536
|
+
"data-disabled": (0, vue.unref)(rootContext).isDateDisabled(_ctx.date) || (0, vue.unref)(rootContext).disableDaysOutsideCurrentView.value ? "" : void 0
|
|
537
|
+
}, {
|
|
538
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
539
|
+
_: 3
|
|
540
|
+
}, 8, [
|
|
541
|
+
"as",
|
|
542
|
+
"as-child",
|
|
543
|
+
"aria-selected",
|
|
544
|
+
"aria-disabled",
|
|
545
|
+
"data-disabled"
|
|
546
|
+
]);
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
//#endregion
|
|
551
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarCellTrigger.js
|
|
552
|
+
var RangeCalendarCellTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
553
|
+
__name: "RangeCalendarCellTrigger",
|
|
554
|
+
props: {
|
|
555
|
+
day: {
|
|
556
|
+
type: null,
|
|
557
|
+
required: true
|
|
558
|
+
},
|
|
559
|
+
month: {
|
|
560
|
+
type: null,
|
|
561
|
+
required: true
|
|
562
|
+
},
|
|
563
|
+
asChild: {
|
|
564
|
+
type: Boolean,
|
|
565
|
+
required: false
|
|
566
|
+
},
|
|
567
|
+
as: {
|
|
568
|
+
type: null,
|
|
569
|
+
required: false,
|
|
570
|
+
default: "div"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
setup(__props) {
|
|
574
|
+
const props = __props;
|
|
575
|
+
const rootContext = injectRangeCalendarRootContext();
|
|
576
|
+
const kbd = require_useKbd.useKbd();
|
|
577
|
+
const { primitiveElement, currentElement } = require_usePrimitiveElement.usePrimitiveElement();
|
|
578
|
+
const labelText = (0, vue.computed)(() => rootContext.formatter.custom(require_useCalendar.toDate(props.day), {
|
|
579
|
+
weekday: "long",
|
|
580
|
+
month: "long",
|
|
581
|
+
day: "numeric",
|
|
582
|
+
year: "numeric"
|
|
583
|
+
}));
|
|
584
|
+
const isUnavailable = (0, vue.computed)(() => rootContext.isDateUnavailable?.(props.day) ?? false);
|
|
585
|
+
const isSelectedDate = (0, vue.computed)(() => rootContext.isSelected(props.day));
|
|
586
|
+
const isSelectionStart = (0, vue.computed)(() => rootContext.isSelectionStart(props.day));
|
|
587
|
+
const isSelectionEnd = (0, vue.computed)(() => rootContext.isSelectionEnd(props.day));
|
|
588
|
+
const isHighlightStart = (0, vue.computed)(() => rootContext.isHighlightedStart(props.day));
|
|
589
|
+
const isHighlightEnd = (0, vue.computed)(() => rootContext.isHighlightedEnd(props.day));
|
|
590
|
+
const isHighlighted = (0, vue.computed)(() => rootContext.highlightedRange.value ? require_useCalendar.isBetweenInclusive(props.day, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end) : false);
|
|
591
|
+
const allowNonContiguousRanges = (0, vue.computed)(() => rootContext.allowNonContiguousRanges.value);
|
|
592
|
+
const isDateToday = (0, vue.computed)(() => {
|
|
593
|
+
return require_useCalendar.$14e0f24ef4ac5c92$export$629b0a497aa65267(props.day, require_useCalendar.$14e0f24ef4ac5c92$export$aa8b41735afcabd2());
|
|
594
|
+
});
|
|
595
|
+
const isOutsideView = (0, vue.computed)(() => {
|
|
596
|
+
return !require_useCalendar.$14e0f24ef4ac5c92$export$a18c89cbd24170ff(props.day, props.month);
|
|
597
|
+
});
|
|
598
|
+
const isOutsideVisibleView = (0, vue.computed)(() => rootContext.isOutsideVisibleView(props.day));
|
|
599
|
+
const isDisabled = (0, vue.computed)(() => rootContext.isDateDisabled(props.day) || rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value);
|
|
600
|
+
const dayValue = (0, vue.computed)(() => props.day.day.toLocaleString(rootContext.locale.value));
|
|
601
|
+
const isFocusedDate = (0, vue.computed)(() => {
|
|
602
|
+
if (isOutsideView.value || isDisabled.value) return false;
|
|
603
|
+
if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.day, rootContext.placeholder.value)) return true;
|
|
604
|
+
if (!rootContext.disabled.value && rootContext.selectedFocusableDate.value && !rootContext.isPlaceholderFocusable.value) return require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.day, rootContext.selectedFocusableDate.value);
|
|
605
|
+
if (!rootContext.disabled.value && (!rootContext.hasSelectedDate.value || rootContext.isSelectedDisabled.value) && !rootContext.isPlaceholderFocusable.value) return rootContext.firstFocusableDate.value && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(props.day, rootContext.firstFocusableDate.value);
|
|
606
|
+
return false;
|
|
607
|
+
});
|
|
608
|
+
function changeDate(e, date) {
|
|
609
|
+
if (rootContext.readonly.value) return;
|
|
610
|
+
if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date)) return;
|
|
611
|
+
if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {
|
|
612
|
+
if (require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {
|
|
613
|
+
rootContext.startValue.value = void 0;
|
|
614
|
+
rootContext.onPlaceholderChange(date);
|
|
615
|
+
rootContext.lastPressedDateValue.value = date.copy();
|
|
616
|
+
return;
|
|
617
|
+
} else if (!rootContext.endValue.value) {
|
|
618
|
+
e.preventDefault();
|
|
619
|
+
if (rootContext.lastPressedDateValue.value && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(rootContext.lastPressedDateValue.value, date)) rootContext.startValue.value = date.copy();
|
|
620
|
+
rootContext.lastPressedDateValue.value = date.copy();
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
rootContext.lastPressedDateValue.value = date.copy();
|
|
625
|
+
if (rootContext.startValue.value && rootContext.endValue.value && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(rootContext.startValue.value, rootContext.endValue.value) && require_useCalendar.$14e0f24ef4ac5c92$export$ea39ec197993aef0(rootContext.startValue.value, date) && !rootContext.preventDeselect.value) {
|
|
626
|
+
rootContext.startValue.value = void 0;
|
|
627
|
+
rootContext.endValue.value = void 0;
|
|
628
|
+
rootContext.onPlaceholderChange(date);
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
if (!rootContext.startValue.value) rootContext.startValue.value = date.copy();
|
|
632
|
+
else if (!rootContext.endValue.value) rootContext.endValue.value = date.copy();
|
|
633
|
+
else if (rootContext.endValue.value && rootContext.startValue.value) {
|
|
634
|
+
if (!rootContext.fixedDate.value) {
|
|
635
|
+
rootContext.endValue.value = void 0;
|
|
636
|
+
rootContext.startValue.value = date.copy();
|
|
637
|
+
} else if (rootContext.fixedDate.value === "start") if (date.compare(rootContext.startValue.value) < 0) rootContext.startValue.value = date.copy();
|
|
638
|
+
else rootContext.endValue.value = date.copy();
|
|
639
|
+
else if (rootContext.fixedDate.value === "end") if (date.compare(rootContext.endValue.value) > 0) rootContext.endValue.value = date.copy();
|
|
640
|
+
else rootContext.startValue.value = date.copy();
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
function handleClick(e) {
|
|
644
|
+
if (isDisabled.value) return;
|
|
645
|
+
changeDate(e, props.day);
|
|
646
|
+
}
|
|
647
|
+
function handleFocus() {
|
|
648
|
+
if (isDisabled.value || rootContext.isDateUnavailable?.(props.day)) return;
|
|
649
|
+
rootContext.focusedValue.value = props.day.copy();
|
|
650
|
+
}
|
|
651
|
+
function handleArrowKey(e) {
|
|
652
|
+
if (isDisabled.value) return;
|
|
653
|
+
if ((e.code === kbd.ENTER || e.code === kbd.SPACE_CODE) && (e.ctrlKey || e.metaKey || e.altKey)) return;
|
|
654
|
+
e.preventDefault();
|
|
655
|
+
e.stopPropagation();
|
|
656
|
+
const parentElement = rootContext.parentElement.value;
|
|
657
|
+
const indexIncrementation = 7;
|
|
658
|
+
const sign = rootContext.dir.value === "rtl" ? -1 : 1;
|
|
659
|
+
switch (e.code) {
|
|
660
|
+
case kbd.ARROW_RIGHT:
|
|
661
|
+
shiftFocus(props.day, sign);
|
|
662
|
+
break;
|
|
663
|
+
case kbd.ARROW_LEFT:
|
|
664
|
+
shiftFocus(props.day, -sign);
|
|
665
|
+
break;
|
|
666
|
+
case kbd.ARROW_UP:
|
|
667
|
+
shiftFocus(props.day, -indexIncrementation);
|
|
668
|
+
break;
|
|
669
|
+
case kbd.ARROW_DOWN:
|
|
670
|
+
shiftFocus(props.day, indexIncrementation);
|
|
671
|
+
break;
|
|
672
|
+
case kbd.ENTER:
|
|
673
|
+
case kbd.SPACE_CODE: changeDate(e, props.day);
|
|
674
|
+
}
|
|
675
|
+
function shiftFocus(day, add) {
|
|
676
|
+
const candidateDayValue = day.add({ days: add });
|
|
677
|
+
if (rootContext.minValue.value && candidateDayValue.compare(rootContext.minValue.value) < 0 || rootContext.maxValue.value && candidateDayValue.compare(rootContext.maxValue.value) > 0) return;
|
|
678
|
+
const candidateDay = parentElement.querySelector(`[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`);
|
|
679
|
+
if (!candidateDay) {
|
|
680
|
+
if (add > 0) {
|
|
681
|
+
if (rootContext.isNextButtonDisabled()) return;
|
|
682
|
+
rootContext.nextPage();
|
|
683
|
+
} else {
|
|
684
|
+
if (rootContext.isPrevButtonDisabled()) return;
|
|
685
|
+
rootContext.prevPage();
|
|
686
|
+
}
|
|
687
|
+
(0, vue.nextTick)(() => {
|
|
688
|
+
shiftFocus(day, add);
|
|
689
|
+
});
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
if (candidateDay && candidateDay.hasAttribute("data-disabled")) return shiftFocus(candidateDayValue, add);
|
|
693
|
+
rootContext.onPlaceholderChange(candidateDayValue);
|
|
694
|
+
candidateDay?.focus();
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
return (_ctx, _cache) => {
|
|
698
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), {
|
|
699
|
+
ref_key: "primitiveElement",
|
|
700
|
+
ref: primitiveElement,
|
|
701
|
+
as: _ctx.as,
|
|
702
|
+
"as-child": _ctx.asChild,
|
|
703
|
+
role: "button",
|
|
704
|
+
"aria-label": labelText.value,
|
|
705
|
+
"data-reka-calendar-cell-trigger": "",
|
|
706
|
+
"aria-pressed": isSelectedDate.value && (allowNonContiguousRanges.value || !isUnavailable.value) ? true : void 0,
|
|
707
|
+
"aria-disabled": isDisabled.value || isUnavailable.value ? true : void 0,
|
|
708
|
+
"data-highlighted": isHighlighted.value && (allowNonContiguousRanges.value || !isUnavailable.value) ? "" : void 0,
|
|
709
|
+
"data-selection-start": isSelectionStart.value ? true : void 0,
|
|
710
|
+
"data-selection-end": isSelectionEnd.value ? true : void 0,
|
|
711
|
+
"data-highlighted-start": isHighlightStart.value ? true : void 0,
|
|
712
|
+
"data-highlighted-end": isHighlightEnd.value ? true : void 0,
|
|
713
|
+
"data-selected": isSelectedDate.value && (allowNonContiguousRanges.value || !isUnavailable.value) ? true : void 0,
|
|
714
|
+
"data-outside-visible-view": isOutsideVisibleView.value ? "" : void 0,
|
|
715
|
+
"data-value": _ctx.day.toString(),
|
|
716
|
+
"data-disabled": isDisabled.value ? "" : void 0,
|
|
717
|
+
"data-unavailable": isUnavailable.value ? "" : void 0,
|
|
718
|
+
"data-today": isDateToday.value ? "" : void 0,
|
|
719
|
+
"data-outside-view": isOutsideView.value ? "" : void 0,
|
|
720
|
+
"data-focused": isFocusedDate.value ? "" : void 0,
|
|
721
|
+
tabindex: isFocusedDate.value ? 0 : isOutsideView.value || isDisabled.value ? void 0 : -1,
|
|
722
|
+
onClick: handleClick,
|
|
723
|
+
onFocusin: handleFocus,
|
|
724
|
+
onMouseenter: handleFocus,
|
|
725
|
+
onKeydown: (0, vue.withKeys)(handleArrowKey, [
|
|
726
|
+
"up",
|
|
727
|
+
"down",
|
|
728
|
+
"left",
|
|
729
|
+
"right",
|
|
730
|
+
"enter",
|
|
731
|
+
"space"
|
|
732
|
+
])
|
|
733
|
+
}, {
|
|
734
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
735
|
+
dayValue: dayValue.value,
|
|
736
|
+
disabled: isDisabled.value,
|
|
737
|
+
today: isDateToday.value,
|
|
738
|
+
selected: isSelectedDate.value,
|
|
739
|
+
outsideView: isOutsideView.value,
|
|
740
|
+
outsideVisibleView: isOutsideVisibleView.value,
|
|
741
|
+
unavailable: isUnavailable.value,
|
|
742
|
+
highlighted: isHighlighted.value && (allowNonContiguousRanges.value || !isUnavailable.value),
|
|
743
|
+
highlightedStart: isHighlightStart.value,
|
|
744
|
+
highlightedEnd: isHighlightEnd.value,
|
|
745
|
+
selectionStart: isSelectionStart.value,
|
|
746
|
+
selectionEnd: isSelectionEnd.value
|
|
747
|
+
}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(dayValue.value), 1)])]),
|
|
748
|
+
_: 3
|
|
749
|
+
}, 8, [
|
|
750
|
+
"as",
|
|
751
|
+
"as-child",
|
|
752
|
+
"aria-label",
|
|
753
|
+
"aria-pressed",
|
|
754
|
+
"aria-disabled",
|
|
755
|
+
"data-highlighted",
|
|
756
|
+
"data-selection-start",
|
|
757
|
+
"data-selection-end",
|
|
758
|
+
"data-highlighted-start",
|
|
759
|
+
"data-highlighted-end",
|
|
760
|
+
"data-selected",
|
|
761
|
+
"data-outside-visible-view",
|
|
762
|
+
"data-value",
|
|
763
|
+
"data-disabled",
|
|
764
|
+
"data-unavailable",
|
|
765
|
+
"data-today",
|
|
766
|
+
"data-outside-view",
|
|
767
|
+
"data-focused",
|
|
768
|
+
"tabindex"
|
|
769
|
+
]);
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarGrid.js
|
|
775
|
+
var RangeCalendarGrid_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
776
|
+
__name: "RangeCalendarGrid",
|
|
777
|
+
props: {
|
|
778
|
+
asChild: {
|
|
779
|
+
type: Boolean,
|
|
780
|
+
required: false
|
|
781
|
+
},
|
|
782
|
+
as: {
|
|
783
|
+
type: null,
|
|
784
|
+
required: false,
|
|
785
|
+
default: "table"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
setup(__props) {
|
|
789
|
+
const props = __props;
|
|
790
|
+
const rootContext = injectRangeCalendarRootContext();
|
|
791
|
+
const disabled = (0, vue.computed)(() => rootContext.disabled.value ? true : void 0);
|
|
792
|
+
const readonly = (0, vue.computed)(() => rootContext.readonly.value ? true : void 0);
|
|
793
|
+
return (_ctx, _cache) => {
|
|
794
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.mergeProps)(props, {
|
|
795
|
+
tabindex: "-1",
|
|
796
|
+
role: "application",
|
|
797
|
+
"aria-readonly": readonly.value,
|
|
798
|
+
"aria-disabled": disabled.value,
|
|
799
|
+
"data-readonly": readonly.value && "",
|
|
800
|
+
"data-disabled": disabled.value && "",
|
|
801
|
+
onMouseleave: _cache[0] || (_cache[0] = ($event) => (0, vue.unref)(rootContext).focusedValue.value = void 0)
|
|
802
|
+
}), {
|
|
803
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
804
|
+
_: 3
|
|
805
|
+
}, 16, [
|
|
806
|
+
"aria-readonly",
|
|
807
|
+
"aria-disabled",
|
|
808
|
+
"data-readonly",
|
|
809
|
+
"data-disabled"
|
|
810
|
+
]);
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
//#endregion
|
|
815
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarGridBody.js
|
|
816
|
+
var RangeCalendarGridBody_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
817
|
+
__name: "RangeCalendarGridBody",
|
|
818
|
+
props: {
|
|
819
|
+
asChild: {
|
|
820
|
+
type: Boolean,
|
|
821
|
+
required: false
|
|
822
|
+
},
|
|
823
|
+
as: {
|
|
824
|
+
type: null,
|
|
825
|
+
required: false,
|
|
826
|
+
default: "tbody"
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
setup(__props) {
|
|
830
|
+
const props = __props;
|
|
831
|
+
return (_ctx, _cache) => {
|
|
832
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.normalizeProps)((0, vue.guardReactiveProps)(props)), {
|
|
833
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
834
|
+
_: 3
|
|
835
|
+
}, 16);
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarGridHead.js
|
|
841
|
+
var RangeCalendarGridHead_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
842
|
+
__name: "RangeCalendarGridHead",
|
|
843
|
+
props: {
|
|
844
|
+
asChild: {
|
|
845
|
+
type: Boolean,
|
|
846
|
+
required: false
|
|
847
|
+
},
|
|
848
|
+
as: {
|
|
849
|
+
type: null,
|
|
850
|
+
required: false,
|
|
851
|
+
default: "thead"
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
setup(__props) {
|
|
855
|
+
const props = __props;
|
|
856
|
+
return (_ctx, _cache) => {
|
|
857
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.mergeProps)(props, { "aria-hidden": "true" }), {
|
|
858
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
859
|
+
_: 3
|
|
860
|
+
}, 16);
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
//#endregion
|
|
865
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarGridRow.js
|
|
866
|
+
var RangeCalendarGridRow_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
867
|
+
__name: "RangeCalendarGridRow",
|
|
868
|
+
props: {
|
|
869
|
+
asChild: {
|
|
870
|
+
type: Boolean,
|
|
871
|
+
required: false
|
|
872
|
+
},
|
|
873
|
+
as: {
|
|
874
|
+
type: null,
|
|
875
|
+
required: false,
|
|
876
|
+
default: "tr"
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
setup(__props) {
|
|
880
|
+
const props = __props;
|
|
881
|
+
return (_ctx, _cache) => {
|
|
882
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.normalizeProps)((0, vue.guardReactiveProps)(props)), {
|
|
883
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
884
|
+
_: 3
|
|
885
|
+
}, 16);
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
//#endregion
|
|
890
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarHeadCell.js
|
|
891
|
+
var RangeCalendarHeadCell_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
892
|
+
__name: "RangeCalendarHeadCell",
|
|
893
|
+
props: {
|
|
894
|
+
asChild: {
|
|
895
|
+
type: Boolean,
|
|
896
|
+
required: false
|
|
897
|
+
},
|
|
898
|
+
as: {
|
|
899
|
+
type: null,
|
|
900
|
+
required: false,
|
|
901
|
+
default: "th"
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
setup(__props) {
|
|
905
|
+
const props = __props;
|
|
906
|
+
return (_ctx, _cache) => {
|
|
907
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.normalizeProps)((0, vue.guardReactiveProps)(props)), {
|
|
908
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
909
|
+
_: 3
|
|
910
|
+
}, 16);
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
//#endregion
|
|
915
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarNext.js
|
|
916
|
+
var RangeCalendarNext_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
917
|
+
__name: "RangeCalendarNext",
|
|
918
|
+
props: {
|
|
919
|
+
nextPage: {
|
|
920
|
+
type: Function,
|
|
921
|
+
required: false
|
|
922
|
+
},
|
|
923
|
+
asChild: {
|
|
924
|
+
type: Boolean,
|
|
925
|
+
required: false
|
|
926
|
+
},
|
|
927
|
+
as: {
|
|
928
|
+
type: null,
|
|
929
|
+
required: false,
|
|
930
|
+
default: "button"
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
setup(__props) {
|
|
934
|
+
const props = __props;
|
|
935
|
+
const disabled = (0, vue.computed)(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage));
|
|
936
|
+
const rootContext = injectRangeCalendarRootContext();
|
|
937
|
+
function handleClick() {
|
|
938
|
+
if (disabled.value) return;
|
|
939
|
+
rootContext.nextPage(props.nextPage);
|
|
940
|
+
}
|
|
941
|
+
return (_ctx, _cache) => {
|
|
942
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), {
|
|
943
|
+
as: props.as,
|
|
944
|
+
"as-child": props.asChild,
|
|
945
|
+
"aria-label": "Next page",
|
|
946
|
+
type: props.as === "button" ? "button" : void 0,
|
|
947
|
+
"aria-disabled": disabled.value || void 0,
|
|
948
|
+
"data-disabled": disabled.value || void 0,
|
|
949
|
+
disabled: disabled.value,
|
|
950
|
+
onClick: handleClick
|
|
951
|
+
}, {
|
|
952
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", { disabled: disabled.value }, () => [_cache[0] || (_cache[0] = (0, vue.createTextVNode)(" Next page "))])]),
|
|
953
|
+
_: 3
|
|
954
|
+
}, 8, [
|
|
955
|
+
"as",
|
|
956
|
+
"as-child",
|
|
957
|
+
"type",
|
|
958
|
+
"aria-disabled",
|
|
959
|
+
"data-disabled",
|
|
960
|
+
"disabled"
|
|
961
|
+
]);
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
//#endregion
|
|
966
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@6.0.3_/node_modules/reka-ui/dist/RangeCalendar/RangeCalendarPrev.js
|
|
967
|
+
var RangeCalendarPrev_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
968
|
+
__name: "RangeCalendarPrev",
|
|
969
|
+
props: {
|
|
970
|
+
prevPage: {
|
|
971
|
+
type: Function,
|
|
972
|
+
required: false
|
|
973
|
+
},
|
|
974
|
+
asChild: {
|
|
975
|
+
type: Boolean,
|
|
976
|
+
required: false
|
|
977
|
+
},
|
|
978
|
+
as: {
|
|
979
|
+
type: null,
|
|
980
|
+
required: false,
|
|
981
|
+
default: "button"
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
setup(__props) {
|
|
985
|
+
const props = __props;
|
|
986
|
+
const disabled = (0, vue.computed)(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage));
|
|
987
|
+
const rootContext = injectRangeCalendarRootContext();
|
|
988
|
+
function handleClick() {
|
|
989
|
+
if (disabled.value) return;
|
|
990
|
+
rootContext.prevPage(props.prevPage);
|
|
991
|
+
}
|
|
992
|
+
return (_ctx, _cache) => {
|
|
993
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), {
|
|
994
|
+
as: props.as,
|
|
995
|
+
"as-child": props.asChild,
|
|
996
|
+
"aria-label": "Previous page",
|
|
997
|
+
type: props.as === "button" ? "button" : void 0,
|
|
998
|
+
"aria-disabled": disabled.value || void 0,
|
|
999
|
+
"data-disabled": disabled.value || void 0,
|
|
1000
|
+
disabled: disabled.value,
|
|
1001
|
+
onClick: handleClick
|
|
1002
|
+
}, {
|
|
1003
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", { disabled: disabled.value }, () => [_cache[0] || (_cache[0] = (0, vue.createTextVNode)(" Prev page "))])]),
|
|
1004
|
+
_: 3
|
|
1005
|
+
}, 8, [
|
|
1006
|
+
"as",
|
|
1007
|
+
"as-child",
|
|
1008
|
+
"type",
|
|
1009
|
+
"aria-disabled",
|
|
1010
|
+
"data-disabled",
|
|
1011
|
+
"disabled"
|
|
1012
|
+
]);
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
//#endregion
|
|
1017
|
+
//#region src/components/range-calendar/range-calendar.vue?vue&type=script&setup=true&lang.ts
|
|
1018
|
+
var _hoisted_1 = { class: "celeste-range-calendar-months" };
|
|
1019
|
+
var _hoisted_2 = { class: "celeste-range-calendar-header" };
|
|
1020
|
+
var _hoisted_3 = { class: "celeste-range-calendar-heading" };
|
|
1021
|
+
var _hoisted_4 = { class: "celeste-range-calendar-day-number" };
|
|
1022
|
+
var range_calendar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
1023
|
+
__name: "range-calendar",
|
|
1024
|
+
props: {
|
|
1025
|
+
class: {},
|
|
1026
|
+
markedDates: {},
|
|
1027
|
+
defaultPlaceholder: {},
|
|
1028
|
+
defaultValue: {},
|
|
1029
|
+
modelValue: {},
|
|
1030
|
+
placeholder: {},
|
|
1031
|
+
allowNonContiguousRanges: { type: Boolean },
|
|
1032
|
+
pagedNavigation: { type: Boolean },
|
|
1033
|
+
preventDeselect: { type: Boolean },
|
|
1034
|
+
maximumDays: {},
|
|
1035
|
+
weekStartsOn: { default: 1 },
|
|
1036
|
+
weekdayFormat: { default: "short" },
|
|
1037
|
+
calendarLabel: {},
|
|
1038
|
+
fixedWeeks: {
|
|
1039
|
+
type: Boolean,
|
|
1040
|
+
default: true
|
|
1041
|
+
},
|
|
1042
|
+
maxValue: {},
|
|
1043
|
+
minValue: {},
|
|
1044
|
+
locale: {},
|
|
1045
|
+
numberOfMonths: { default: 2 },
|
|
1046
|
+
disabled: { type: Boolean },
|
|
1047
|
+
readonly: { type: Boolean },
|
|
1048
|
+
initialFocus: { type: Boolean },
|
|
1049
|
+
isDateDisabled: {},
|
|
1050
|
+
isDateUnavailable: {},
|
|
1051
|
+
isDateHighlightable: {},
|
|
1052
|
+
dir: {},
|
|
1053
|
+
nextPage: {},
|
|
1054
|
+
prevPage: {},
|
|
1055
|
+
disableDaysOutsideCurrentView: { type: Boolean },
|
|
1056
|
+
fixedDate: {},
|
|
1057
|
+
asChild: { type: Boolean },
|
|
1058
|
+
as: {}
|
|
1059
|
+
},
|
|
1060
|
+
emits: [
|
|
1061
|
+
"update:modelValue",
|
|
1062
|
+
"update:validModelValue",
|
|
1063
|
+
"update:placeholder",
|
|
1064
|
+
"update:startValue"
|
|
1065
|
+
],
|
|
1066
|
+
setup(__props, { emit: __emit }) {
|
|
1067
|
+
const props = __props;
|
|
1068
|
+
const emits = __emit;
|
|
1069
|
+
const forwarded = require_useForwardPropsEmits.useForwardPropsEmits(require_use_delegated_props.useDelegatedProps(props, ["class", "markedDates"]), emits);
|
|
1070
|
+
const monthFormatter = (0, vue.computed)(() => new require_useCalendar.$fb18d541ea1ad717$export$ad991b66133851cf(props.locale ?? "en-US", {
|
|
1071
|
+
month: "long",
|
|
1072
|
+
year: "numeric"
|
|
1073
|
+
}));
|
|
1074
|
+
function formatMonth(date) {
|
|
1075
|
+
return monthFormatter.value.format(date.toDate(require_useCalendar.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));
|
|
1076
|
+
}
|
|
1077
|
+
function isMarked(date) {
|
|
1078
|
+
return props.markedDates?.some((marked) => require_useCalendar.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(marked, date)) ?? false;
|
|
1079
|
+
}
|
|
1080
|
+
function weekdayLabel(day) {
|
|
1081
|
+
return /^[a-z]/i.test(day.trim()) ? day.slice(0, 2) : day;
|
|
1082
|
+
}
|
|
1083
|
+
return (_ctx, _cache) => {
|
|
1084
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(RangeCalendarRoot_default), (0, vue.mergeProps)((0, vue.unref)(forwarded), { class: (0, vue.unref)(require_clsx.clsx)("celeste-range-calendar", props.class) }), {
|
|
1085
|
+
default: (0, vue.withCtx)(({ weekDays, grid }) => [(0, vue.createElementVNode)("div", _hoisted_1, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(grid, (month) => {
|
|
1086
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
1087
|
+
key: month.value.toString(),
|
|
1088
|
+
class: "celeste-range-calendar-month"
|
|
1089
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_2, [
|
|
1090
|
+
(0, vue.createVNode)((0, vue.unref)(RangeCalendarPrev_default), { "as-child": "" }, {
|
|
1091
|
+
default: (0, vue.withCtx)(() => _cache[0] || (_cache[0] = [(0, vue.createElementVNode)("button", {
|
|
1092
|
+
type: "button",
|
|
1093
|
+
class: "celeste-range-calendar-nav"
|
|
1094
|
+
}, [(0, vue.createElementVNode)("i", { class: "i-celeste-arrow-left-s-line" })], -1)])),
|
|
1095
|
+
_: 1
|
|
1096
|
+
}),
|
|
1097
|
+
(0, vue.createElementVNode)("span", _hoisted_3, (0, vue.toDisplayString)(formatMonth(month.value)), 1),
|
|
1098
|
+
(0, vue.createVNode)((0, vue.unref)(RangeCalendarNext_default), { "as-child": "" }, {
|
|
1099
|
+
default: (0, vue.withCtx)(() => _cache[1] || (_cache[1] = [(0, vue.createElementVNode)("button", {
|
|
1100
|
+
type: "button",
|
|
1101
|
+
class: "celeste-range-calendar-nav"
|
|
1102
|
+
}, [(0, vue.createElementVNode)("i", { class: "i-celeste-arrow-right-s-line" })], -1)])),
|
|
1103
|
+
_: 1
|
|
1104
|
+
})
|
|
1105
|
+
]), (0, vue.createVNode)((0, vue.unref)(RangeCalendarGrid_default), { class: "celeste-range-calendar-grid" }, {
|
|
1106
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(RangeCalendarGridHead_default), null, {
|
|
1107
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(RangeCalendarGridRow_default), { class: "celeste-range-calendar-week" }, {
|
|
1108
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(weekDays, (day) => {
|
|
1109
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(RangeCalendarHeadCell_default), {
|
|
1110
|
+
key: day,
|
|
1111
|
+
class: "celeste-range-calendar-weekday"
|
|
1112
|
+
}, {
|
|
1113
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(weekdayLabel(day)), 1)]),
|
|
1114
|
+
_: 2
|
|
1115
|
+
}, 1024);
|
|
1116
|
+
}), 128))]),
|
|
1117
|
+
_: 2
|
|
1118
|
+
}, 1024)]),
|
|
1119
|
+
_: 2
|
|
1120
|
+
}, 1024), (0, vue.createVNode)((0, vue.unref)(RangeCalendarGridBody_default), { class: "celeste-range-calendar-body" }, {
|
|
1121
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(month.rows, (weekDates, index) => {
|
|
1122
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(RangeCalendarGridRow_default), {
|
|
1123
|
+
key: `week-${index}`,
|
|
1124
|
+
class: "celeste-range-calendar-week"
|
|
1125
|
+
}, {
|
|
1126
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(weekDates, (weekDate) => {
|
|
1127
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(RangeCalendarCell_default), {
|
|
1128
|
+
key: weekDate.toString(),
|
|
1129
|
+
date: weekDate,
|
|
1130
|
+
class: "celeste-range-calendar-cell"
|
|
1131
|
+
}, {
|
|
1132
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(RangeCalendarCellTrigger_default), {
|
|
1133
|
+
day: weekDate,
|
|
1134
|
+
month: month.value,
|
|
1135
|
+
class: "celeste-range-calendar-day",
|
|
1136
|
+
"data-marked": isMarked(weekDate) ? "" : void 0
|
|
1137
|
+
}, {
|
|
1138
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_4, (0, vue.toDisplayString)(weekDate.day), 1)]),
|
|
1139
|
+
_: 2
|
|
1140
|
+
}, 1032, [
|
|
1141
|
+
"day",
|
|
1142
|
+
"month",
|
|
1143
|
+
"data-marked"
|
|
1144
|
+
])]),
|
|
1145
|
+
_: 2
|
|
1146
|
+
}, 1032, ["date"]);
|
|
1147
|
+
}), 128))]),
|
|
1148
|
+
_: 2
|
|
1149
|
+
}, 1024);
|
|
1150
|
+
}), 128))]),
|
|
1151
|
+
_: 2
|
|
1152
|
+
}, 1024)]),
|
|
1153
|
+
_: 2
|
|
1154
|
+
}, 1024)]);
|
|
1155
|
+
}), 128))])]),
|
|
1156
|
+
_: 1
|
|
1157
|
+
}, 16, ["class"]);
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
//#endregion
|
|
1162
|
+
//#region src/components/range-calendar/range-calendar.vue
|
|
1163
|
+
var range_calendar_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(range_calendar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-dc79fc39"]]);
|
|
1164
|
+
//#endregion
|
|
1165
|
+
Object.defineProperty(exports, "range_calendar_default", {
|
|
1166
|
+
enumerable: true,
|
|
1167
|
+
get: function() {
|
|
1168
|
+
return range_calendar_default;
|
|
1169
|
+
}
|
|
1170
|
+
});
|