nuxt-ui-elements-pro 0.1.7 → 0.1.9
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/module.json +1 -1
- package/dist/module.mjs +4 -7
- package/dist/runtime/components/EventCalendar.d.vue.ts +7 -9
- package/dist/runtime/components/EventCalendar.vue +12 -18
- package/dist/runtime/components/EventCalendar.vue.d.ts +7 -9
- package/dist/runtime/components/event-calendar/EventCalendarListView.d.vue.ts +1 -1
- package/dist/runtime/components/event-calendar/EventCalendarListView.vue +1 -1
- package/dist/runtime/components/event-calendar/EventCalendarListView.vue.d.ts +1 -1
- package/dist/runtime/components/event-calendar/EventCalendarMonthView.d.vue.ts +3 -4
- package/dist/runtime/components/event-calendar/EventCalendarMonthView.vue +8 -32
- package/dist/runtime/components/event-calendar/EventCalendarMonthView.vue.d.ts +3 -4
- package/dist/runtime/components/event-calendar/EventCalendarTimeGrid.d.vue.ts +2 -3
- package/dist/runtime/components/event-calendar/EventCalendarTimeGrid.vue +3 -25
- package/dist/runtime/components/event-calendar/EventCalendarTimeGrid.vue.d.ts +2 -3
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -14,7 +14,7 @@ const eventCalendar = (options) => ({
|
|
|
14
14
|
weekdayRow: "grid grid-cols-7 border-b border-default",
|
|
15
15
|
weekdayCell: "py-2 text-center text-xs font-medium text-muted uppercase tracking-wider",
|
|
16
16
|
monthBody: "flex flex-col select-none",
|
|
17
|
-
monthWeekRow: "",
|
|
17
|
+
monthWeekRow: "relative",
|
|
18
18
|
dayCell: "border-b border-r border-default hover:bg-elevated/50 cursor-pointer",
|
|
19
19
|
dayCellOutside: "bg-muted/20",
|
|
20
20
|
monthDayNumber: "relative z-[1] p-1",
|
|
@@ -33,7 +33,7 @@ const eventCalendar = (options) => ({
|
|
|
33
33
|
eventTime: "font-medium mr-1",
|
|
34
34
|
recurringIcon: "size-3 shrink-0 opacity-60 align-middle mr-0.5",
|
|
35
35
|
moreEvents: "relative z-[2] text-xs text-muted px-1.5 py-0.5 cursor-pointer hover:text-highlighted",
|
|
36
|
-
expandedOverlay: "bg-default border border-default rounded-lg p-1.5 shadow-xl z-20 animate-expand-overlay",
|
|
36
|
+
expandedOverlay: "absolute top-1/2 -translate-x-1/2 -translate-y-1/2 bg-default border border-default rounded-lg p-1.5 shadow-xl z-20 animate-expand-overlay",
|
|
37
37
|
// Week/Day view
|
|
38
38
|
timeGridRoot: "flex-1 flex flex-col min-h-0 overflow-hidden",
|
|
39
39
|
columnHeaders: "flex border-b border-default shrink-0",
|
|
@@ -79,12 +79,9 @@ const eventCalendar = (options) => ({
|
|
|
79
79
|
dragSnapSlot: "",
|
|
80
80
|
// Selection
|
|
81
81
|
selectionOverlay: "",
|
|
82
|
-
// Loading
|
|
82
|
+
// Loading state
|
|
83
83
|
loadingOverlay: "absolute inset-0 z-30 flex items-center justify-center bg-default/60",
|
|
84
|
-
loadingIcon: "size-8 text-muted animate-spin"
|
|
85
|
-
emptyState: "flex flex-col items-center justify-center gap-2 py-14 text-center",
|
|
86
|
-
emptyStateIcon: "size-10 text-muted/50",
|
|
87
|
-
emptyStateText: "text-sm text-muted"
|
|
84
|
+
loadingIcon: "size-8 text-muted animate-spin"
|
|
88
85
|
},
|
|
89
86
|
variants: {
|
|
90
87
|
color: {
|
|
@@ -100,40 +100,38 @@ export interface EventCalendarSlots {
|
|
|
100
100
|
view: CalendarView;
|
|
101
101
|
}) => any;
|
|
102
102
|
/** Customize weekday header labels (month view) */
|
|
103
|
-
"
|
|
103
|
+
"month-weekday-header"?: (props: {
|
|
104
104
|
day: string;
|
|
105
105
|
index: number;
|
|
106
106
|
}) => any;
|
|
107
|
-
/** Customize day cell
|
|
108
|
-
day?: (props: {
|
|
107
|
+
/** Customize the day header area in each month cell (month view) */
|
|
108
|
+
"month-day-header"?: (props: {
|
|
109
109
|
day: CalendarDay;
|
|
110
110
|
}) => any;
|
|
111
111
|
/** Customize "+N more" indicator (month view) */
|
|
112
|
-
"more-events"?: (props: {
|
|
112
|
+
"month-more-events"?: (props: {
|
|
113
113
|
events: CalendarEvent[];
|
|
114
114
|
count: number;
|
|
115
115
|
day: CalendarDay;
|
|
116
116
|
}) => any;
|
|
117
117
|
/** Customize time labels (week/day view) */
|
|
118
|
-
"time-label"?: (props: {
|
|
118
|
+
"time-grid-label"?: (props: {
|
|
119
119
|
hour: number;
|
|
120
120
|
label: string;
|
|
121
121
|
}) => any;
|
|
122
122
|
/** Customize all-day event area (week/day view) */
|
|
123
|
-
"all-day"?: (props: {
|
|
123
|
+
"time-grid-all-day"?: (props: {
|
|
124
124
|
events: CalendarEvent[];
|
|
125
125
|
date: CalendarDate;
|
|
126
126
|
}) => any;
|
|
127
127
|
/** Customize date group headers (list view) */
|
|
128
|
-
"date-header"?: (props: {
|
|
128
|
+
"list-date-header"?: (props: {
|
|
129
129
|
day: CalendarDay;
|
|
130
130
|
weekday: string;
|
|
131
131
|
dateLabel: string;
|
|
132
132
|
}) => any;
|
|
133
133
|
/** Customize loading overlay */
|
|
134
134
|
loading?: () => any;
|
|
135
|
-
/** Customize empty state */
|
|
136
|
-
empty?: () => any;
|
|
137
135
|
}
|
|
138
136
|
declare const _default: typeof __VLS_export;
|
|
139
137
|
export default _default;
|
|
@@ -223,21 +223,18 @@ defineExpose({
|
|
|
223
223
|
<template v-if="slots.event" #event="eventProps">
|
|
224
224
|
<slot name="event" v-bind="eventProps" />
|
|
225
225
|
</template>
|
|
226
|
-
<template v-if="slots['
|
|
227
|
-
<slot name="
|
|
226
|
+
<template v-if="slots['month-weekday-header']" #month-weekday-header="dayHeaderProps">
|
|
227
|
+
<slot name="month-weekday-header" v-bind="dayHeaderProps" />
|
|
228
228
|
</template>
|
|
229
|
-
<template v-if="slots
|
|
230
|
-
<slot name="day" v-bind="dayProps" />
|
|
229
|
+
<template v-if="slots['month-day-header']" #month-day-header="dayProps">
|
|
230
|
+
<slot name="month-day-header" v-bind="dayProps" />
|
|
231
231
|
</template>
|
|
232
|
-
<template v-if="slots['more-events']" #more-events="moreProps">
|
|
233
|
-
<slot name="more-events" v-bind="moreProps" />
|
|
232
|
+
<template v-if="slots['month-more-events']" #month-more-events="moreProps">
|
|
233
|
+
<slot name="month-more-events" v-bind="moreProps" />
|
|
234
234
|
</template>
|
|
235
235
|
<template v-if="slots.loading" #loading>
|
|
236
236
|
<slot name="loading" />
|
|
237
237
|
</template>
|
|
238
|
-
<template v-if="slots.empty" #empty>
|
|
239
|
-
<slot name="empty" />
|
|
240
|
-
</template>
|
|
241
238
|
</EventCalendarMonthView>
|
|
242
239
|
|
|
243
240
|
<!-- Week/Day time grid view -->
|
|
@@ -245,18 +242,15 @@ defineExpose({
|
|
|
245
242
|
<template v-if="slots.event" #event="eventProps">
|
|
246
243
|
<slot name="event" v-bind="eventProps" />
|
|
247
244
|
</template>
|
|
248
|
-
<template v-if="slots['time-label']" #time-label="timeLabelProps">
|
|
249
|
-
<slot name="time-label" v-bind="timeLabelProps" />
|
|
245
|
+
<template v-if="slots['time-grid-label']" #time-grid-label="timeLabelProps">
|
|
246
|
+
<slot name="time-grid-label" v-bind="timeLabelProps" />
|
|
250
247
|
</template>
|
|
251
|
-
<template v-if="slots['all-day']" #all-day="allDayProps">
|
|
252
|
-
<slot name="all-day" v-bind="allDayProps" />
|
|
248
|
+
<template v-if="slots['time-grid-all-day']" #time-grid-all-day="allDayProps">
|
|
249
|
+
<slot name="time-grid-all-day" v-bind="allDayProps" />
|
|
253
250
|
</template>
|
|
254
251
|
<template v-if="slots.loading" #loading>
|
|
255
252
|
<slot name="loading" />
|
|
256
253
|
</template>
|
|
257
|
-
<template v-if="slots.empty" #empty>
|
|
258
|
-
<slot name="empty" />
|
|
259
|
-
</template>
|
|
260
254
|
</EventCalendarTimeGrid>
|
|
261
255
|
|
|
262
256
|
<!-- List view -->
|
|
@@ -264,8 +258,8 @@ defineExpose({
|
|
|
264
258
|
<template v-if="slots.event" #event="eventProps">
|
|
265
259
|
<slot name="event" v-bind="eventProps" />
|
|
266
260
|
</template>
|
|
267
|
-
<template v-if="slots['date-header']" #date-header="dateHeaderProps">
|
|
268
|
-
<slot name="date-header" v-bind="dateHeaderProps" />
|
|
261
|
+
<template v-if="slots['list-date-header']" #list-date-header="dateHeaderProps">
|
|
262
|
+
<slot name="list-date-header" v-bind="dateHeaderProps" />
|
|
269
263
|
</template>
|
|
270
264
|
</EventCalendarListView>
|
|
271
265
|
</template>
|
|
@@ -100,40 +100,38 @@ export interface EventCalendarSlots {
|
|
|
100
100
|
view: CalendarView;
|
|
101
101
|
}) => any;
|
|
102
102
|
/** Customize weekday header labels (month view) */
|
|
103
|
-
"
|
|
103
|
+
"month-weekday-header"?: (props: {
|
|
104
104
|
day: string;
|
|
105
105
|
index: number;
|
|
106
106
|
}) => any;
|
|
107
|
-
/** Customize day cell
|
|
108
|
-
day?: (props: {
|
|
107
|
+
/** Customize the day header area in each month cell (month view) */
|
|
108
|
+
"month-day-header"?: (props: {
|
|
109
109
|
day: CalendarDay;
|
|
110
110
|
}) => any;
|
|
111
111
|
/** Customize "+N more" indicator (month view) */
|
|
112
|
-
"more-events"?: (props: {
|
|
112
|
+
"month-more-events"?: (props: {
|
|
113
113
|
events: CalendarEvent[];
|
|
114
114
|
count: number;
|
|
115
115
|
day: CalendarDay;
|
|
116
116
|
}) => any;
|
|
117
117
|
/** Customize time labels (week/day view) */
|
|
118
|
-
"time-label"?: (props: {
|
|
118
|
+
"time-grid-label"?: (props: {
|
|
119
119
|
hour: number;
|
|
120
120
|
label: string;
|
|
121
121
|
}) => any;
|
|
122
122
|
/** Customize all-day event area (week/day view) */
|
|
123
|
-
"all-day"?: (props: {
|
|
123
|
+
"time-grid-all-day"?: (props: {
|
|
124
124
|
events: CalendarEvent[];
|
|
125
125
|
date: CalendarDate;
|
|
126
126
|
}) => any;
|
|
127
127
|
/** Customize date group headers (list view) */
|
|
128
|
-
"date-header"?: (props: {
|
|
128
|
+
"list-date-header"?: (props: {
|
|
129
129
|
day: CalendarDay;
|
|
130
130
|
weekday: string;
|
|
131
131
|
dateLabel: string;
|
|
132
132
|
}) => any;
|
|
133
133
|
/** Customize loading overlay */
|
|
134
134
|
loading?: () => any;
|
|
135
|
-
/** Customize empty state */
|
|
136
|
-
empty?: () => any;
|
|
137
135
|
}
|
|
138
136
|
declare const _default: typeof __VLS_export;
|
|
139
137
|
export default _default;
|
|
@@ -31,7 +31,7 @@ function formatDateLabel(day) {
|
|
|
31
31
|
<div
|
|
32
32
|
data-slot="listDateHeader"
|
|
33
33
|
:class="ctx.ui.value.listDateHeader({ class: ctx.propUi.value?.listDateHeader })">
|
|
34
|
-
<slot name="date-header" :day="day" :weekday="formatWeekday(day)" :date-label="formatDateLabel(day)">
|
|
34
|
+
<slot name="list-date-header" :day="day" :weekday="formatWeekday(day)" :date-label="formatDateLabel(day)">
|
|
35
35
|
<span
|
|
36
36
|
data-slot="listDateWeekday"
|
|
37
37
|
:class="ctx.ui.value.listDateWeekday({ class: ctx.propUi.value?.listDateWeekday })">
|
|
@@ -5,24 +5,23 @@ export interface EventCalendarMonthViewProps {
|
|
|
5
5
|
as?: string | Component;
|
|
6
6
|
}
|
|
7
7
|
export interface EventCalendarMonthViewSlots {
|
|
8
|
-
"
|
|
8
|
+
"month-weekday-header": (props: {
|
|
9
9
|
day: string;
|
|
10
10
|
index: number;
|
|
11
11
|
}) => any;
|
|
12
|
-
day: (props: {
|
|
12
|
+
"month-day-header": (props: {
|
|
13
13
|
day: CalendarDay;
|
|
14
14
|
}) => any;
|
|
15
15
|
event: (props: {
|
|
16
16
|
event: CalendarEvent;
|
|
17
17
|
view: CalendarView;
|
|
18
18
|
}) => any;
|
|
19
|
-
"more-events": (props: {
|
|
19
|
+
"month-more-events": (props: {
|
|
20
20
|
events: CalendarEvent[];
|
|
21
21
|
count: number;
|
|
22
22
|
day: CalendarDay;
|
|
23
23
|
}) => any;
|
|
24
24
|
loading: () => any;
|
|
25
|
-
empty: () => any;
|
|
26
25
|
}
|
|
27
26
|
declare const _default: typeof __VLS_export;
|
|
28
27
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { Primitive } from "reka-ui";
|
|
3
|
-
import {
|
|
3
|
+
import { ref } from "vue";
|
|
4
4
|
import { useEventListener, onKeyStroke } from "@vueuse/core";
|
|
5
5
|
import { useEventCalendarContext } from "../../composables/useEventCalendarContext";
|
|
6
6
|
</script>
|
|
@@ -11,11 +11,6 @@ const props = defineProps({
|
|
|
11
11
|
});
|
|
12
12
|
defineSlots();
|
|
13
13
|
const ctx = useEventCalendarContext();
|
|
14
|
-
const isEmpty = computed(
|
|
15
|
-
() => !ctx.loading.value && ctx.monthWeekLayouts.value.every(
|
|
16
|
-
(layout) => layout.spanning.length === 0 && layout.singleDay.length === 0
|
|
17
|
-
)
|
|
18
|
-
);
|
|
19
14
|
const expandedDay = ref(null);
|
|
20
15
|
function openExpandDay(dateKey, e) {
|
|
21
16
|
e.stopPropagation();
|
|
@@ -43,7 +38,7 @@ onKeyStroke("Escape", () => {
|
|
|
43
38
|
data-slot="weekdayCell"
|
|
44
39
|
role="columnheader"
|
|
45
40
|
:class="ctx.ui.value.weekdayCell({ class: ctx.propUi.value?.weekdayCell })">
|
|
46
|
-
<slot name="
|
|
41
|
+
<slot name="month-weekday-header" :day="day" :index="index">
|
|
47
42
|
{{ day }}
|
|
48
43
|
</slot>
|
|
49
44
|
</div>
|
|
@@ -88,7 +83,7 @@ onKeyStroke("Escape", () => {
|
|
|
88
83
|
ctx.dropTargetKey.value === `month-${day.date.toString()}` && ctx.ui.value.dropTarget({ class: ctx.propUi.value?.dropTarget }),
|
|
89
84
|
colIdx === 6 && 'border-r-0!',
|
|
90
85
|
ctx.isDateInSelection(day.date) && ctx.ui.value.selectionOverlay({ class: ctx.propUi.value?.selectionOverlay }),
|
|
91
|
-
isExpanded(day.date.toString()) && '
|
|
86
|
+
isExpanded(day.date.toString()) && 'z-10'
|
|
92
87
|
]"
|
|
93
88
|
:style="{
|
|
94
89
|
gridColumn: `${colIdx + 1}`,
|
|
@@ -111,10 +106,9 @@ onKeyStroke("Escape", () => {
|
|
|
111
106
|
:class="ctx.ui.value.monthDayNumber({ class: ctx.propUi.value?.monthDayNumber })"
|
|
112
107
|
:style="{
|
|
113
108
|
gridColumn: `${colIdx + 1}`,
|
|
114
|
-
gridRow: '1'
|
|
115
|
-
pointerEvents: 'none'
|
|
109
|
+
gridRow: '1'
|
|
116
110
|
}">
|
|
117
|
-
<slot name="day" :day="day">
|
|
111
|
+
<slot name="month-day-header" :day="day">
|
|
118
112
|
<div
|
|
119
113
|
:class="[
|
|
120
114
|
!day.isToday && ctx.ui.value.dayNumber({ class: ctx.propUi.value?.dayNumber }),
|
|
@@ -230,7 +224,7 @@ onKeyStroke("Escape", () => {
|
|
|
230
224
|
@keydown.enter.stop="openExpandDay(layout.week.days[overflowItem.col].date.toString(), $event)"
|
|
231
225
|
@keydown.space.prevent.stop="openExpandDay(layout.week.days[overflowItem.col].date.toString(), $event)">
|
|
232
226
|
<slot
|
|
233
|
-
name="more-events"
|
|
227
|
+
name="month-more-events"
|
|
234
228
|
:events="overflowItem.hiddenEvents.map((e) => e.original)"
|
|
235
229
|
:count="overflowItem.hiddenCount"
|
|
236
230
|
:day="layout.week.days[overflowItem.col]">
|
|
@@ -248,9 +242,8 @@ onKeyStroke("Escape", () => {
|
|
|
248
242
|
:aria-label="`Events for ${ctx.formatDateAriaLabel(day.date)}`"
|
|
249
243
|
:class="ctx.ui.value.expandedOverlay({ class: ctx.propUi.value?.expandedOverlay })"
|
|
250
244
|
:style="{
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
zIndex: 20
|
|
245
|
+
left: `calc(${colIdx} / 7 * 100% + 100% / 14)`,
|
|
246
|
+
width: 'calc(100% / 7 + 16px)'
|
|
254
247
|
}"
|
|
255
248
|
@click.stop>
|
|
256
249
|
<div
|
|
@@ -314,23 +307,6 @@ onKeyStroke("Escape", () => {
|
|
|
314
307
|
<span class="sr-only">Loading events</span>
|
|
315
308
|
</slot>
|
|
316
309
|
</div>
|
|
317
|
-
|
|
318
|
-
<!-- Empty state -->
|
|
319
|
-
<div
|
|
320
|
-
v-else-if="isEmpty"
|
|
321
|
-
data-slot="emptyState"
|
|
322
|
-
:class="ctx.ui.value.emptyState({ class: ctx.propUi.value?.emptyState })">
|
|
323
|
-
<slot name="empty">
|
|
324
|
-
<UIcon
|
|
325
|
-
name="i-lucide-calendar-x2"
|
|
326
|
-
data-slot="emptyStateIcon"
|
|
327
|
-
:class="ctx.ui.value.emptyStateIcon({ class: ctx.propUi.value?.emptyStateIcon })"
|
|
328
|
-
aria-hidden="true" />
|
|
329
|
-
<p data-slot="emptyStateText" :class="ctx.ui.value.emptyStateText({ class: ctx.propUi.value?.emptyStateText })">
|
|
330
|
-
No events
|
|
331
|
-
</p>
|
|
332
|
-
</slot>
|
|
333
|
-
</div>
|
|
334
310
|
</div>
|
|
335
311
|
</Primitive>
|
|
336
312
|
</template>
|
|
@@ -5,24 +5,23 @@ export interface EventCalendarMonthViewProps {
|
|
|
5
5
|
as?: string | Component;
|
|
6
6
|
}
|
|
7
7
|
export interface EventCalendarMonthViewSlots {
|
|
8
|
-
"
|
|
8
|
+
"month-weekday-header": (props: {
|
|
9
9
|
day: string;
|
|
10
10
|
index: number;
|
|
11
11
|
}) => any;
|
|
12
|
-
day: (props: {
|
|
12
|
+
"month-day-header": (props: {
|
|
13
13
|
day: CalendarDay;
|
|
14
14
|
}) => any;
|
|
15
15
|
event: (props: {
|
|
16
16
|
event: CalendarEvent;
|
|
17
17
|
view: CalendarView;
|
|
18
18
|
}) => any;
|
|
19
|
-
"more-events": (props: {
|
|
19
|
+
"month-more-events": (props: {
|
|
20
20
|
events: CalendarEvent[];
|
|
21
21
|
count: number;
|
|
22
22
|
day: CalendarDay;
|
|
23
23
|
}) => any;
|
|
24
24
|
loading: () => any;
|
|
25
|
-
empty: () => any;
|
|
26
25
|
}
|
|
27
26
|
declare const _default: typeof __VLS_export;
|
|
28
27
|
export default _default;
|
|
@@ -10,16 +10,15 @@ export interface EventCalendarTimeGridSlots {
|
|
|
10
10
|
event: CalendarEvent;
|
|
11
11
|
view: CalendarView;
|
|
12
12
|
}) => any;
|
|
13
|
-
"time-label": (props: {
|
|
13
|
+
"time-grid-label": (props: {
|
|
14
14
|
hour: number;
|
|
15
15
|
label: string;
|
|
16
16
|
}) => any;
|
|
17
|
-
"all-day": (props: {
|
|
17
|
+
"time-grid-all-day": (props: {
|
|
18
18
|
events: CalendarEvent[];
|
|
19
19
|
date: CalendarDate;
|
|
20
20
|
}) => any;
|
|
21
21
|
loading: () => any;
|
|
22
|
-
empty: () => any;
|
|
23
22
|
}
|
|
24
23
|
declare const _default: typeof __VLS_export;
|
|
25
24
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { Primitive } from "reka-ui";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "vue";
|
|
4
4
|
import { useEventCalendarContext } from "../../composables/useEventCalendarContext";
|
|
5
5
|
import { format } from "#std/date";
|
|
6
6
|
</script>
|
|
@@ -11,11 +11,6 @@ const props = defineProps({
|
|
|
11
11
|
});
|
|
12
12
|
defineSlots();
|
|
13
13
|
const ctx = useEventCalendarContext();
|
|
14
|
-
const isEmpty = computed(
|
|
15
|
-
() => !ctx.loading.value && ctx.timeGridDays.value.every(
|
|
16
|
-
(day) => day.allDayEvents.length === 0 && day.timedEvents.length === 0
|
|
17
|
-
)
|
|
18
|
-
);
|
|
19
14
|
</script>
|
|
20
15
|
|
|
21
16
|
<template>
|
|
@@ -67,7 +62,7 @@ const isEmpty = computed(
|
|
|
67
62
|
@dragover="ctx.onDragOver(`allday-${day.dateKey}`, $event)"
|
|
68
63
|
@dragleave="ctx.onDragLeave"
|
|
69
64
|
@drop="ctx.onDropMonthCell(day.date, $event)">
|
|
70
|
-
<slot name="all-day" :events="day.allDayEvents.map((e) => e.original)" :date="day.date">
|
|
65
|
+
<slot name="time-grid-all-day" :events="day.allDayEvents.map((e) => e.original)" :date="day.date">
|
|
71
66
|
<div
|
|
72
67
|
v-for="event in day.allDayEvents"
|
|
73
68
|
:key="event.id"
|
|
@@ -179,7 +174,7 @@ const isEmpty = computed(
|
|
|
179
174
|
:class="ctx.ui.value.timeGutterSlot({ class: ctx.propUi.value?.timeGutterSlot })"
|
|
180
175
|
:style="{ height: `${ctx.SLOT_HEIGHT}px` }">
|
|
181
176
|
<div v-if="slot.label" data-slot="timeLabel" :class="ctx.ui.value.timeLabel({ class: ctx.propUi.value?.timeLabel })">
|
|
182
|
-
<slot name="time-label" :hour="slot.hour" :label="slot.label">
|
|
177
|
+
<slot name="time-grid-label" :hour="slot.hour" :label="slot.label">
|
|
183
178
|
{{ slot.label }}
|
|
184
179
|
</slot>
|
|
185
180
|
</div>
|
|
@@ -284,23 +279,6 @@ const isEmpty = computed(
|
|
|
284
279
|
<span class="sr-only">Loading events</span>
|
|
285
280
|
</slot>
|
|
286
281
|
</div>
|
|
287
|
-
|
|
288
|
-
<!-- Empty state -->
|
|
289
|
-
<div
|
|
290
|
-
v-else-if="isEmpty"
|
|
291
|
-
data-slot="emptyState"
|
|
292
|
-
:class="ctx.ui.value.emptyState({ class: ctx.propUi.value?.emptyState })">
|
|
293
|
-
<slot name="empty">
|
|
294
|
-
<UIcon
|
|
295
|
-
name="i-lucide-calendar-x2"
|
|
296
|
-
data-slot="emptyStateIcon"
|
|
297
|
-
:class="ctx.ui.value.emptyStateIcon({ class: ctx.propUi.value?.emptyStateIcon })"
|
|
298
|
-
aria-hidden="true" />
|
|
299
|
-
<p data-slot="emptyStateText" :class="ctx.ui.value.emptyStateText({ class: ctx.propUi.value?.emptyStateText })">
|
|
300
|
-
No events
|
|
301
|
-
</p>
|
|
302
|
-
</slot>
|
|
303
|
-
</div>
|
|
304
282
|
</div>
|
|
305
283
|
</Primitive>
|
|
306
284
|
</template>
|
|
@@ -10,16 +10,15 @@ export interface EventCalendarTimeGridSlots {
|
|
|
10
10
|
event: CalendarEvent;
|
|
11
11
|
view: CalendarView;
|
|
12
12
|
}) => any;
|
|
13
|
-
"time-label": (props: {
|
|
13
|
+
"time-grid-label": (props: {
|
|
14
14
|
hour: number;
|
|
15
15
|
label: string;
|
|
16
16
|
}) => any;
|
|
17
|
-
"all-day": (props: {
|
|
17
|
+
"time-grid-all-day": (props: {
|
|
18
18
|
events: CalendarEvent[];
|
|
19
19
|
date: CalendarDate;
|
|
20
20
|
}) => any;
|
|
21
21
|
loading: () => any;
|
|
22
|
-
empty: () => any;
|
|
23
22
|
}
|
|
24
23
|
declare const _default: typeof __VLS_export;
|
|
25
24
|
export default _default;
|