nuxt-ui-elements-pro 0.1.5 → 0.1.7

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.
Files changed (67) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +153 -18
  3. package/dist/runtime/components/EventCalendar.d.vue.ts +109 -22
  4. package/dist/runtime/components/EventCalendar.vue +225 -602
  5. package/dist/runtime/components/EventCalendar.vue.d.ts +109 -22
  6. package/dist/runtime/components/OrgChart.d.vue.ts +191 -0
  7. package/dist/runtime/components/OrgChart.vue +290 -0
  8. package/dist/runtime/components/OrgChart.vue.d.ts +191 -0
  9. package/dist/runtime/components/event-calendar/EventCalendarHeader.d.vue.ts +45 -0
  10. package/dist/runtime/components/event-calendar/EventCalendarHeader.vue +55 -0
  11. package/dist/runtime/components/event-calendar/EventCalendarHeader.vue.d.ts +45 -0
  12. package/dist/runtime/components/event-calendar/EventCalendarListView.d.vue.ts +25 -0
  13. package/dist/runtime/components/event-calendar/EventCalendarListView.vue +95 -0
  14. package/dist/runtime/components/event-calendar/EventCalendarListView.vue.d.ts +25 -0
  15. package/dist/runtime/components/event-calendar/EventCalendarMonthView.d.vue.ts +34 -0
  16. package/dist/runtime/components/event-calendar/EventCalendarMonthView.vue +336 -0
  17. package/dist/runtime/components/event-calendar/EventCalendarMonthView.vue.d.ts +34 -0
  18. package/dist/runtime/components/event-calendar/EventCalendarTimeGrid.d.vue.ts +31 -0
  19. package/dist/runtime/components/event-calendar/EventCalendarTimeGrid.vue +306 -0
  20. package/dist/runtime/components/event-calendar/EventCalendarTimeGrid.vue.d.ts +31 -0
  21. package/dist/runtime/components/org-chart/OrgChartConnectors.d.vue.ts +15 -0
  22. package/dist/runtime/components/org-chart/OrgChartConnectors.vue +29 -0
  23. package/dist/runtime/components/org-chart/OrgChartConnectors.vue.d.ts +15 -0
  24. package/dist/runtime/components/org-chart/OrgChartControls.d.vue.ts +19 -0
  25. package/dist/runtime/components/org-chart/OrgChartControls.vue +25 -0
  26. package/dist/runtime/components/org-chart/OrgChartControls.vue.d.ts +19 -0
  27. package/dist/runtime/components/org-chart/OrgChartNode.d.vue.ts +30 -0
  28. package/dist/runtime/components/org-chart/OrgChartNode.vue +129 -0
  29. package/dist/runtime/components/org-chart/OrgChartNode.vue.d.ts +30 -0
  30. package/dist/runtime/composables/useEventCalendar.d.ts +52 -0
  31. package/dist/runtime/composables/useEventCalendar.js +362 -0
  32. package/dist/runtime/composables/useEventCalendarContext.d.ts +8 -0
  33. package/dist/runtime/composables/useEventCalendarContext.js +11 -0
  34. package/dist/runtime/composables/useEventCalendarDragDrop.d.ts +1 -1
  35. package/dist/runtime/composables/useEventCalendarDragDrop.js +11 -9
  36. package/dist/runtime/composables/useEventCalendarKeyboard.d.ts +20 -0
  37. package/dist/runtime/composables/useEventCalendarKeyboard.js +128 -0
  38. package/dist/runtime/composables/useEventCalendarResize.d.ts +31 -0
  39. package/dist/runtime/composables/useEventCalendarResize.js +87 -0
  40. package/dist/runtime/composables/useEventCalendarSelect.d.ts +21 -0
  41. package/dist/runtime/composables/useEventCalendarSelect.js +119 -0
  42. package/dist/runtime/composables/useOrgChart.d.ts +42 -0
  43. package/dist/runtime/composables/useOrgChart.js +154 -0
  44. package/dist/runtime/composables/useOrgChartContext.d.ts +8 -0
  45. package/dist/runtime/composables/useOrgChartContext.js +11 -0
  46. package/dist/runtime/composables/useOrgChartDragDrop.d.ts +20 -0
  47. package/dist/runtime/composables/useOrgChartDragDrop.js +67 -0
  48. package/dist/runtime/composables/useOrgChartKeyboard.d.ts +16 -0
  49. package/dist/runtime/composables/useOrgChartKeyboard.js +101 -0
  50. package/dist/runtime/composables/useOrgChartSearch.d.ts +16 -0
  51. package/dist/runtime/composables/useOrgChartSearch.js +62 -0
  52. package/dist/runtime/composables/useOrgChartZoom.d.ts +26 -0
  53. package/dist/runtime/composables/useOrgChartZoom.js +101 -0
  54. package/dist/runtime/index.d.ts +3 -0
  55. package/dist/runtime/index.js +2 -0
  56. package/dist/runtime/types/event-calendar.d.ts +170 -0
  57. package/dist/runtime/types/index.d.ts +2 -0
  58. package/dist/runtime/types/index.js +2 -0
  59. package/dist/runtime/types/org-chart.d.ts +181 -0
  60. package/dist/runtime/types/org-chart.js +0 -0
  61. package/dist/runtime/utils/event-calendar.d.ts +22 -1
  62. package/dist/runtime/utils/event-calendar.js +199 -1
  63. package/dist/runtime/utils/org-chart.d.ts +55 -0
  64. package/dist/runtime/utils/org-chart.js +367 -0
  65. package/dist/runtime/utils/recurrence.d.ts +30 -0
  66. package/dist/runtime/utils/recurrence.js +150 -0
  67. package/package.json +15 -6
@@ -0,0 +1,191 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import type { ComponentConfig } from "nuxt-ui-elements";
3
+ import type { OrgChartNode, OrgChartTreeNode, OrgChartConnection, OrgChartConnectionPath, OrgChartDirection, OrgChartConnectorStyle, OrgChartSelectionMode, OrgChartLayoutConfig, OrgChartZoomConfig, OrgChartConnector, OrgChartContext } from "../types/org-chart.js";
4
+ import { type Component } from "vue";
5
+ import theme from "#build/ui-elements-pro/org-chart";
6
+ type OrgChartTheme = ComponentConfig<typeof theme, AppConfig, "orgChart">;
7
+ export interface OrgChartProps {
8
+ /** Rendered element type @defaultValue 'div' */
9
+ as?: string | Component;
10
+ /** Flat array of org chart nodes */
11
+ nodes?: OrgChartNode[];
12
+ /** Non-hierarchical connections between nodes */
13
+ connections?: OrgChartConnection[];
14
+ /** Layout direction @defaultValue 'vertical' */
15
+ direction?: OrgChartDirection;
16
+ /** Connector style @defaultValue 'right-angle' */
17
+ connectorStyle?: OrgChartConnectorStyle;
18
+ /** Selection mode @defaultValue 'none' */
19
+ selectionMode?: OrgChartSelectionMode;
20
+ /** Compact mode with reduced spacing @defaultValue false */
21
+ compact?: boolean;
22
+ /** Theme color @defaultValue 'primary' */
23
+ color?: OrgChartTheme["variants"]["color"];
24
+ /** Two-way binding for expanded node IDs */
25
+ expanded?: (string | number)[];
26
+ /** Two-way binding for selected node IDs */
27
+ selected?: (string | number)[];
28
+ /** Search query to filter and highlight nodes */
29
+ searchQuery?: string;
30
+ /** Enable drag-and-drop rearrangement @defaultValue false */
31
+ draggable?: boolean;
32
+ /** Enable animations @defaultValue true */
33
+ animated?: boolean;
34
+ /** Layout configuration overrides */
35
+ layoutConfig?: OrgChartLayoutConfig;
36
+ /** Zoom/pan configuration */
37
+ zoomConfig?: OrgChartZoomConfig;
38
+ /** Slot class overrides */
39
+ ui?: OrgChartTheme["slots"];
40
+ }
41
+ export interface OrgChartEmits {
42
+ /** Fires when expanded node IDs change */
43
+ "update:expanded": [value: (string | number)[]];
44
+ /** Fires when selected node IDs change */
45
+ "update:selected": [value: (string | number)[]];
46
+ /** Fires when any node is clicked */
47
+ "node-click": [node: OrgChartNode];
48
+ /** Fires when a node is expanded or collapsed */
49
+ "node-expand": [payload: {
50
+ node: OrgChartNode;
51
+ expanded: boolean;
52
+ }];
53
+ /** Fires when a node is selected or deselected */
54
+ "node-select": [payload: {
55
+ node: OrgChartNode;
56
+ selected: boolean;
57
+ }];
58
+ /** Fires when a node is dropped onto a new parent via drag-and-drop */
59
+ "node-drop": [payload: {
60
+ node: OrgChartNode;
61
+ oldParentId: string | number | null;
62
+ newParentId: string | number;
63
+ }];
64
+ /** Fires when a non-hierarchical connection is clicked */
65
+ "connection-click": [connection: OrgChartConnection];
66
+ }
67
+ export interface OrgChartSlots {
68
+ /** Compound mode: full rendering control */
69
+ default?: (props: OrgChartContext) => any;
70
+ /** Custom node rendering (replaces entire node card content) */
71
+ node?: (props: {
72
+ node: OrgChartNode;
73
+ treeNode: OrgChartTreeNode;
74
+ selected: boolean;
75
+ expanded: boolean;
76
+ focused: boolean;
77
+ matched: boolean;
78
+ dimmed: boolean;
79
+ }) => any;
80
+ /** Custom avatar area */
81
+ avatar?: (props: {
82
+ node: OrgChartNode;
83
+ }) => any;
84
+ /** Custom label */
85
+ label?: (props: {
86
+ node: OrgChartNode;
87
+ highlight?: string;
88
+ }) => any;
89
+ /** Custom description / title */
90
+ description?: (props: {
91
+ node: OrgChartNode;
92
+ highlight?: string;
93
+ }) => any;
94
+ /** Custom connector rendering */
95
+ connector?: (props: {
96
+ connectors: OrgChartConnector[];
97
+ }) => any;
98
+ /** Custom non-hierarchical connection rendering */
99
+ connection?: (props: {
100
+ connections: OrgChartConnectionPath[];
101
+ }) => any;
102
+ /** Custom connection label */
103
+ "connection-label"?: (props: {
104
+ connection: OrgChartConnection;
105
+ x: number;
106
+ y: number;
107
+ }) => any;
108
+ /** Custom collapse toggle */
109
+ "collapse-toggle"?: (props: {
110
+ expanded: boolean;
111
+ count: number;
112
+ node: OrgChartNode;
113
+ }) => any;
114
+ /** Custom zoom controls */
115
+ "zoom-controls"?: (props: {
116
+ zoomIn: () => void;
117
+ zoomOut: () => void;
118
+ zoomReset: () => void;
119
+ fitToView: () => void;
120
+ scale: number;
121
+ }) => any;
122
+ /** Custom drop indicator */
123
+ "drop-indicator"?: (props: {
124
+ targetNode: OrgChartNode;
125
+ }) => any;
126
+ /** Empty state (no nodes) */
127
+ empty?: () => any;
128
+ }
129
+ declare const _default: typeof __VLS_export;
130
+ export default _default;
131
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<OrgChartProps, {
132
+ expandAll: () => void;
133
+ collapseAll: () => void;
134
+ toggleNode: (id: string | number) => void;
135
+ selectNode: (id: string | number) => void;
136
+ deselectNode: (id: string | number) => void;
137
+ scrollToNode: (id: string | number) => void;
138
+ fitToView: () => void;
139
+ getChildren: (id: string | number) => OrgChartTreeNode[];
140
+ getAncestors: (id: string | number) => OrgChartTreeNode[];
141
+ tree: import("vue").ComputedRef<OrgChartTreeNode | null>;
142
+ layout: import("vue").ComputedRef<import("../types/org-chart.js").OrgChartLayout>;
143
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
144
+ "update:expanded": (value: (string | number)[]) => any;
145
+ "update:selected": (value: (string | number)[]) => any;
146
+ "node-click": (node: OrgChartNode) => any;
147
+ "node-expand": (payload: {
148
+ node: OrgChartNode;
149
+ expanded: boolean;
150
+ }) => any;
151
+ "node-select": (payload: {
152
+ node: OrgChartNode;
153
+ selected: boolean;
154
+ }) => any;
155
+ "node-drop": (payload: {
156
+ node: OrgChartNode;
157
+ oldParentId: string | number | null;
158
+ newParentId: string | number;
159
+ }) => any;
160
+ "connection-click": (connection: OrgChartConnection) => any;
161
+ }, string, import("vue").PublicProps, Readonly<OrgChartProps> & Readonly<{
162
+ "onUpdate:expanded"?: ((value: (string | number)[]) => any) | undefined;
163
+ "onUpdate:selected"?: ((value: (string | number)[]) => any) | undefined;
164
+ "onNode-click"?: ((node: OrgChartNode) => any) | undefined;
165
+ "onNode-expand"?: ((payload: {
166
+ node: OrgChartNode;
167
+ expanded: boolean;
168
+ }) => any) | undefined;
169
+ "onNode-select"?: ((payload: {
170
+ node: OrgChartNode;
171
+ selected: boolean;
172
+ }) => any) | undefined;
173
+ "onNode-drop"?: ((payload: {
174
+ node: OrgChartNode;
175
+ oldParentId: string | number | null;
176
+ newParentId: string | number;
177
+ }) => any) | undefined;
178
+ "onConnection-click"?: ((connection: OrgChartConnection) => any) | undefined;
179
+ }>, {
180
+ draggable: boolean;
181
+ compact: boolean;
182
+ direction: OrgChartDirection;
183
+ connectorStyle: OrgChartConnectorStyle;
184
+ selectionMode: OrgChartSelectionMode;
185
+ animated: boolean;
186
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, OrgChartSlots>;
187
+ type __VLS_WithSlots<T, S> = T & {
188
+ new (): {
189
+ $slots: S;
190
+ };
191
+ };
@@ -0,0 +1,45 @@
1
+ import type { CalendarDate } from "@internationalized/date";
2
+ import type { CalendarView } from "../../types/event-calendar.js";
3
+ import type { Component } from "vue";
4
+ export interface EventCalendarHeaderProps {
5
+ /** Rendered element type @defaultValue 'div' */
6
+ as?: string | Component;
7
+ }
8
+ export interface EventCalendarHeaderSlots {
9
+ default: (props: {
10
+ title: string;
11
+ prev: () => void;
12
+ next: () => void;
13
+ today: () => void;
14
+ currentDate: CalendarDate;
15
+ view: CalendarView;
16
+ setView: (v: CalendarView) => void;
17
+ views: CalendarView[];
18
+ }) => any;
19
+ /** Replace just the title element */
20
+ title: (props: {
21
+ title: string;
22
+ date: CalendarDate;
23
+ view: CalendarView;
24
+ }) => any;
25
+ /** Replace just the navigation buttons */
26
+ nav: (props: {
27
+ prev: () => void;
28
+ next: () => void;
29
+ today: () => void;
30
+ }) => any;
31
+ /** Replace just the view switcher */
32
+ "view-switcher": (props: {
33
+ view: CalendarView;
34
+ setView: (v: CalendarView) => void;
35
+ views: CalendarView[];
36
+ }) => any;
37
+ }
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
40
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EventCalendarHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EventCalendarHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EventCalendarHeaderSlots>;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,55 @@
1
+ <script>
2
+ import { Primitive } from "reka-ui";
3
+ import { useEventCalendarContext } from "../../composables/useEventCalendarContext";
4
+ </script>
5
+
6
+ <script setup>
7
+ const props = defineProps({
8
+ as: { type: null, required: false }
9
+ });
10
+ defineSlots();
11
+ const ctx = useEventCalendarContext();
12
+ </script>
13
+
14
+ <template>
15
+ <Primitive :as="props.as ?? 'div'" data-slot="header" :class="ctx.ui.value.header({ class: ctx.propUi.value?.header })">
16
+ <slot
17
+ :title="ctx.headerTitle.value"
18
+ :prev="ctx.goToPrev"
19
+ :next="ctx.goToNext"
20
+ :today="ctx.goToToday"
21
+ :current-date="ctx.displayDate.value"
22
+ :view="ctx.view.value"
23
+ :set-view="ctx.setView"
24
+ :views="ctx.views.value">
25
+ <slot name="title" :title="ctx.headerTitle.value" :date="ctx.displayDate.value" :view="ctx.view.value">
26
+ <span data-slot="headerTitle" :class="ctx.ui.value.headerTitle({ class: ctx.propUi.value?.headerTitle })" aria-live="polite" aria-atomic="true">
27
+ {{ ctx.headerTitle.value }}
28
+ </span>
29
+ </slot>
30
+
31
+ <div data-slot="headerActions" :class="ctx.ui.value.headerActions({ class: ctx.propUi.value?.headerActions })">
32
+ <slot name="view-switcher" :view="ctx.view.value" :set-view="ctx.setView" :views="ctx.views.value">
33
+ <div data-slot="viewSwitcher" role="group" aria-label="Calendar view" :class="ctx.ui.value.viewSwitcher({ class: ctx.propUi.value?.viewSwitcher })">
34
+ <UButton
35
+ v-for="v in ctx.views.value"
36
+ :key="v"
37
+ :label="v"
38
+ size="xs"
39
+ :color="ctx.view.value === v ? ctx.color.value : 'neutral'"
40
+ :variant="ctx.view.value === v ? 'subtle' : 'ghost'"
41
+ :aria-pressed="ctx.view.value === v"
42
+ class="capitalize"
43
+ @click="ctx.setView(v)" />
44
+ </div>
45
+ </slot>
46
+
47
+ <slot name="nav" :prev="ctx.goToPrev" :next="ctx.goToNext" :today="ctx.goToToday">
48
+ <UButton icon="i-lucide-chevron-left" color="neutral" variant="ghost" size="xs" square :aria-label="`Previous ${ctx.view.value}`" @click="ctx.goToPrev" />
49
+ <UButton label="Today" color="neutral" variant="ghost" size="xs" aria-label="Go to today" @click="ctx.goToToday" />
50
+ <UButton icon="i-lucide-chevron-right" color="neutral" variant="ghost" size="xs" square :aria-label="`Next ${ctx.view.value}`" @click="ctx.goToNext" />
51
+ </slot>
52
+ </div>
53
+ </slot>
54
+ </Primitive>
55
+ </template>
@@ -0,0 +1,45 @@
1
+ import type { CalendarDate } from "@internationalized/date";
2
+ import type { CalendarView } from "../../types/event-calendar.js";
3
+ import type { Component } from "vue";
4
+ export interface EventCalendarHeaderProps {
5
+ /** Rendered element type @defaultValue 'div' */
6
+ as?: string | Component;
7
+ }
8
+ export interface EventCalendarHeaderSlots {
9
+ default: (props: {
10
+ title: string;
11
+ prev: () => void;
12
+ next: () => void;
13
+ today: () => void;
14
+ currentDate: CalendarDate;
15
+ view: CalendarView;
16
+ setView: (v: CalendarView) => void;
17
+ views: CalendarView[];
18
+ }) => any;
19
+ /** Replace just the title element */
20
+ title: (props: {
21
+ title: string;
22
+ date: CalendarDate;
23
+ view: CalendarView;
24
+ }) => any;
25
+ /** Replace just the navigation buttons */
26
+ nav: (props: {
27
+ prev: () => void;
28
+ next: () => void;
29
+ today: () => void;
30
+ }) => any;
31
+ /** Replace just the view switcher */
32
+ "view-switcher": (props: {
33
+ view: CalendarView;
34
+ setView: (v: CalendarView) => void;
35
+ views: CalendarView[];
36
+ }) => any;
37
+ }
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
40
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EventCalendarHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EventCalendarHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EventCalendarHeaderSlots>;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,25 @@
1
+ import type { CalendarEvent, CalendarView, CalendarDay } from "../../types/event-calendar.js";
2
+ import type { Component } from "vue";
3
+ export interface EventCalendarListViewProps {
4
+ /** Rendered element type @defaultValue 'div' */
5
+ as?: string | Component;
6
+ }
7
+ export interface EventCalendarListViewSlots {
8
+ "date-header": (props: {
9
+ day: CalendarDay;
10
+ weekday: string;
11
+ dateLabel: string;
12
+ }) => any;
13
+ event: (props: {
14
+ event: CalendarEvent;
15
+ view: CalendarView;
16
+ }) => any;
17
+ }
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EventCalendarListViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EventCalendarListViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EventCalendarListViewSlots>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,95 @@
1
+ <script>
2
+ import { Primitive } from "reka-ui";
3
+ import { useEventCalendarContext } from "../../composables/useEventCalendarContext";
4
+ </script>
5
+
6
+ <script setup>
7
+ import { computed } from "vue";
8
+ import { format } from "#std/date";
9
+ const props = defineProps({
10
+ as: { type: null, required: false }
11
+ });
12
+ defineSlots();
13
+ const ctx = useEventCalendarContext();
14
+ const daysWithEvents = computed(
15
+ () => ctx.listDays.value.filter((day) => day.events.length > 0)
16
+ );
17
+ function formatWeekday(day) {
18
+ return format(day.date, "dddd", ctx.locale.value);
19
+ }
20
+ function formatDateLabel(day) {
21
+ return format(day.date, "MMMM D, YYYY", ctx.locale.value);
22
+ }
23
+ </script>
24
+
25
+ <template>
26
+ <Primitive v-if="ctx.view.value === 'list'" :as="props.as ?? 'div'" data-slot="listView">
27
+ <div data-slot="listBody" :class="ctx.ui.value.listBody({ class: ctx.propUi.value?.listBody })">
28
+ <template v-if="daysWithEvents.length > 0">
29
+ <template v-for="day in daysWithEvents" :key="day.date.toString()">
30
+ <!-- Date header -->
31
+ <div
32
+ data-slot="listDateHeader"
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)">
35
+ <span
36
+ data-slot="listDateWeekday"
37
+ :class="ctx.ui.value.listDateWeekday({ class: ctx.propUi.value?.listDateWeekday })">
38
+ {{ formatWeekday(day) }}
39
+ </span>
40
+ <span
41
+ data-slot="listDateLabel"
42
+ :class="ctx.ui.value.listDateLabel({ class: ctx.propUi.value?.listDateLabel })">
43
+ {{ formatDateLabel(day) }}
44
+ </span>
45
+ </slot>
46
+ </div>
47
+
48
+ <!-- Event rows -->
49
+ <div
50
+ v-for="event in day.events"
51
+ :key="event.id"
52
+ data-slot="listEventRow"
53
+ role="button"
54
+ :aria-label="ctx.formatEventAriaLabel(event)"
55
+ tabindex="0"
56
+ :class="ctx.ui.value.listEventRow({ class: ctx.propUi.value?.listEventRow })"
57
+ @click="ctx.handleEventClick(event, $event)"
58
+ @keydown.enter.stop="ctx.handleEventClick(event, $event)"
59
+ @keydown.space.prevent.stop="ctx.handleEventClick(event, $event)">
60
+ <slot name="event" :event="event.original" :view="ctx.view.value">
61
+ <span
62
+ data-slot="listEventTime"
63
+ :class="ctx.ui.value.listEventTime({ class: ctx.propUi.value?.listEventTime })">
64
+ {{ event.allDay ? "all day" : ctx.formatTimeRange(event.start, event.end) }}
65
+ </span>
66
+ <span
67
+ data-slot="listEventDot"
68
+ :class="ctx.ui.value.listEventDot({ class: ctx.propUi.value?.listEventDot })"
69
+ :style="{ backgroundColor: `var(--ui-${event.color === 'neutral' ? 'bg-inverted' : event.color})` }" />
70
+ <span
71
+ data-slot="listEventTitle"
72
+ :class="ctx.ui.value.listEventTitle({ class: ctx.propUi.value?.listEventTitle })">
73
+ <UIcon
74
+ v-if="event.recurringEventId"
75
+ name="i-lucide-repeat"
76
+ data-slot="recurringIcon"
77
+ :class="ctx.ui.value.recurringIcon({ class: ctx.propUi.value?.recurringIcon })"
78
+ aria-hidden="true" />
79
+ {{ event.title }}
80
+ </span>
81
+ </slot>
82
+ </div>
83
+ </template>
84
+ </template>
85
+
86
+ <!-- Empty state -->
87
+ <div
88
+ v-else
89
+ data-slot="listEmpty"
90
+ :class="ctx.ui.value.listEmpty({ class: ctx.propUi.value?.listEmpty })">
91
+ No events this week
92
+ </div>
93
+ </div>
94
+ </Primitive>
95
+ </template>
@@ -0,0 +1,25 @@
1
+ import type { CalendarEvent, CalendarView, CalendarDay } from "../../types/event-calendar.js";
2
+ import type { Component } from "vue";
3
+ export interface EventCalendarListViewProps {
4
+ /** Rendered element type @defaultValue 'div' */
5
+ as?: string | Component;
6
+ }
7
+ export interface EventCalendarListViewSlots {
8
+ "date-header": (props: {
9
+ day: CalendarDay;
10
+ weekday: string;
11
+ dateLabel: string;
12
+ }) => any;
13
+ event: (props: {
14
+ event: CalendarEvent;
15
+ view: CalendarView;
16
+ }) => any;
17
+ }
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EventCalendarListViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EventCalendarListViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EventCalendarListViewSlots>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,34 @@
1
+ import type { CalendarEvent, CalendarView, CalendarDay } from "../../types/event-calendar.js";
2
+ import { type Component } from "vue";
3
+ export interface EventCalendarMonthViewProps {
4
+ /** Rendered element type @defaultValue 'div' */
5
+ as?: string | Component;
6
+ }
7
+ export interface EventCalendarMonthViewSlots {
8
+ "day-header": (props: {
9
+ day: string;
10
+ index: number;
11
+ }) => any;
12
+ day: (props: {
13
+ day: CalendarDay;
14
+ }) => any;
15
+ event: (props: {
16
+ event: CalendarEvent;
17
+ view: CalendarView;
18
+ }) => any;
19
+ "more-events": (props: {
20
+ events: CalendarEvent[];
21
+ count: number;
22
+ day: CalendarDay;
23
+ }) => any;
24
+ loading: () => any;
25
+ empty: () => any;
26
+ }
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EventCalendarMonthViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EventCalendarMonthViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EventCalendarMonthViewSlots>;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };