@calends/vue 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +138 -2
- package/dist/CalendarHeading.vue.d.ts +18 -0
- package/dist/CalendarNav.vue.d.ts +19 -0
- package/dist/CalendarRoot.vue.d.ts +63 -0
- package/dist/EventBar.vue.d.ts +34 -0
- package/dist/EventResizeHandle.vue.d.ts +23 -0
- package/dist/Gantt.vue.d.ts +21 -0
- package/dist/GanttBar.vue.d.ts +24 -0
- package/dist/GanttLinks.vue.d.ts +37 -0
- package/dist/GanttRow.vue.d.ts +23 -0
- package/dist/GanttToday.vue.d.ts +16 -0
- package/dist/GanttTrack.vue.d.ts +16 -0
- package/dist/MonthDay.vue.d.ts +25 -0
- package/dist/MonthDayMore.vue.d.ts +24 -0
- package/dist/MonthGrid.vue.d.ts +20 -0
- package/dist/MonthWeek.vue.d.ts +23 -0
- package/dist/MonthWeekday.vue.d.ts +22 -0
- package/dist/NowIndicator.vue.d.ts +21 -0
- package/dist/ResourceCell.vue.d.ts +29 -0
- package/dist/ResourceDayHeader.vue.d.ts +23 -0
- package/dist/ResourceGrid.vue.d.ts +20 -0
- package/dist/ResourceLabel.vue.d.ts +25 -0
- package/dist/ResourceRow.vue.d.ts +24 -0
- package/dist/TimeColumn.vue.d.ts +23 -0
- package/dist/TimeEvent.vue.d.ts +27 -0
- package/dist/TimeGrid.vue.d.ts +24 -0
- package/dist/TimeSelection.vue.d.ts +24 -0
- package/dist/Timeline.vue.d.ts +20 -0
- package/dist/TimelineEvent.vue.d.ts +27 -0
- package/dist/TimelineNow.vue.d.ts +16 -0
- package/dist/TimelineRow.vue.d.ts +24 -0
- package/dist/TimelineSelection.vue.d.ts +24 -0
- package/dist/TimelineTrack.vue.d.ts +21 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +1757 -0
- package/dist/index.js.map +1 -0
- package/dist/useCalendar.d.ts +111 -0
- package/dist/useEventState.d.ts +26 -0
- package/dist/useInteractions.d.ts +112 -0
- package/package.json +51 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ben Miller
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,139 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @calends/vue
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Headless Vue calendar primitives from [Calends](https://github.com/benjivm/calends): month, week and
|
|
4
|
+
day time grid, resource, timeline, and Gantt views, with drag, resize, and range select. They ship no
|
|
5
|
+
CSS. State is exposed as data attributes and layout as CSS custom properties, so you style them with
|
|
6
|
+
Tailwind (`data-today:…`) or plain attribute selectors.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install @calends/vue @calends/core reka-ui
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`vue` (3.5+) and `reka-ui` (2.11+) are peer dependencies. Only reka-ui's `Primitive` is used, for
|
|
13
|
+
`as-child`.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- A runtime with native `Temporal`. No polyfill is bundled.
|
|
18
|
+
- For types, TypeScript 6.0 or later with `ESNext` (or `esnext.temporal`) in `lib`.
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```vue
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { ref } from 'vue';
|
|
25
|
+
import {
|
|
26
|
+
CalendarHeading,
|
|
27
|
+
CalendarNav,
|
|
28
|
+
CalendarRoot,
|
|
29
|
+
EventBar,
|
|
30
|
+
MonthDay,
|
|
31
|
+
MonthGrid,
|
|
32
|
+
MonthWeek,
|
|
33
|
+
MonthWeekday,
|
|
34
|
+
} from '@calends/vue';
|
|
35
|
+
|
|
36
|
+
const date = ref(Temporal.Now.plainDateISO());
|
|
37
|
+
const events = [
|
|
38
|
+
{ id: 1, title: 'Offsite', start: '2026-10-12', end: '2026-10-14' },
|
|
39
|
+
{ id: 2, title: 'Standup', start: '2026-10-15T09:00:00', end: '2026-10-15T09:15:00' },
|
|
40
|
+
];
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<CalendarRoot
|
|
45
|
+
v-model:date="date"
|
|
46
|
+
:events="events"
|
|
47
|
+
:max-lanes="4"
|
|
48
|
+
>
|
|
49
|
+
<header class="flex items-center gap-2">
|
|
50
|
+
<CalendarNav action="prev">Previous</CalendarNav>
|
|
51
|
+
<CalendarHeading />
|
|
52
|
+
<CalendarNav action="today">Today</CalendarNav>
|
|
53
|
+
<CalendarNav action="next">Next</CalendarNav>
|
|
54
|
+
</header>
|
|
55
|
+
|
|
56
|
+
<MonthGrid v-slot="{ weekdays, weeks }">
|
|
57
|
+
<div
|
|
58
|
+
role="row"
|
|
59
|
+
class="grid grid-cols-7"
|
|
60
|
+
>
|
|
61
|
+
<MonthWeekday
|
|
62
|
+
v-for="weekday in weekdays"
|
|
63
|
+
:key="weekday.dayOfWeek"
|
|
64
|
+
:date="weekday"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<MonthWeek
|
|
69
|
+
v-for="week in weeks"
|
|
70
|
+
:key="week.start.toString()"
|
|
71
|
+
:week="week"
|
|
72
|
+
class="grid grid-cols-7"
|
|
73
|
+
>
|
|
74
|
+
<MonthDay
|
|
75
|
+
v-for="day in week.days"
|
|
76
|
+
:key="day.date.toString()"
|
|
77
|
+
:day="day"
|
|
78
|
+
class="relative min-h-28 data-outside:opacity-50 data-today:font-bold"
|
|
79
|
+
>
|
|
80
|
+
{{ day.date.day }}
|
|
81
|
+
|
|
82
|
+
<EventBar
|
|
83
|
+
v-for="segment in day.segments"
|
|
84
|
+
v-slot="{ event }"
|
|
85
|
+
:key="segment.event.id"
|
|
86
|
+
:segment="segment"
|
|
87
|
+
class="absolute top-[calc(1.75rem+var(--event-lane)*1.5rem)] h-5 w-[calc(var(--event-span)*100%)] data-highlighted:bg-blue-200"
|
|
88
|
+
>
|
|
89
|
+
{{ event.source.title }}
|
|
90
|
+
</EventBar>
|
|
91
|
+
</MonthDay>
|
|
92
|
+
</MonthWeek>
|
|
93
|
+
</MonthGrid>
|
|
94
|
+
</CalendarRoot>
|
|
95
|
+
</template>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Bars sit inside their start day's gridcell (so the ARIA grid stays intact) and span across with
|
|
99
|
+
`--event-span`. Inside the views, events are typed as plain `CalendarEventInput`; read your own
|
|
100
|
+
fields from an event primitive's slot (`event.source`), which is typed loosely for that. Every segment of a multi-week event gets `data-highlighted` together on hover or
|
|
101
|
+
focus.
|
|
102
|
+
|
|
103
|
+
## Components
|
|
104
|
+
|
|
105
|
+
| View | Primitives |
|
|
106
|
+
| ----------- | ----------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| Shared | `CalendarRoot` (`v-model:date`), `CalendarNav`, `CalendarHeading`, `useCalendar` |
|
|
108
|
+
| Month | `MonthGrid`, `MonthWeekday`, `MonthWeek`, `MonthDay`, `MonthDayMore`, `EventBar` (alias `MonthEvent`) |
|
|
109
|
+
| Time grid | `TimeGrid`, `TimeColumn`, `TimeEvent`, `TimeSelection`, `NowIndicator` |
|
|
110
|
+
| Resources | `ResourceGrid`, `ResourceRow`, `ResourceLabel`, `ResourceCell`, `ResourceDayHeader` |
|
|
111
|
+
| Timeline | `Timeline`, `TimelineRow`, `TimelineTrack`, `TimelineEvent`, `TimelineSelection`, `TimelineNow` |
|
|
112
|
+
| Gantt | `Gantt`, `GanttRow`, `GanttTrack`, `GanttBar`, `GanttToday`, `GanttLinks` |
|
|
113
|
+
| Interaction | `EventResizeHandle`, `useInteractions`, `useEventState` |
|
|
114
|
+
|
|
115
|
+
Common data attributes: `data-today`, `data-outside`, `data-weekend`, `data-focused`,
|
|
116
|
+
`data-selected`, `data-overflow`, `data-past`, `data-highlighted`, `data-editable`, `data-dragging`,
|
|
117
|
+
`data-all-day`, `data-continues-before`, `data-continues-after`, `data-starts-before`, and
|
|
118
|
+
`data-ends-after`.
|
|
119
|
+
|
|
120
|
+
## Interactions
|
|
121
|
+
|
|
122
|
+
Set `editable` and `selectable` on `CalendarRoot` (with `snap-minutes` and `can-edit` to tune them).
|
|
123
|
+
The calendar never changes your `events`. It emits the intent, and you commit it:
|
|
124
|
+
|
|
125
|
+
- `event-drop` and `event-resize` carry the event, its new `start` and `end`, the previous ones, and
|
|
126
|
+
a `resourceId` when it moved rows.
|
|
127
|
+
- `range-select` carries the selected `start`, `end`, `allDay`, and `resourceId`.
|
|
128
|
+
|
|
129
|
+
The keyboard works too: Space picks an event up, arrows move it, Shift with arrows changes its end,
|
|
130
|
+
Space drops it, and Escape cancels. Each move is announced in a live region.
|
|
131
|
+
|
|
132
|
+
## Server rendering
|
|
133
|
+
|
|
134
|
+
By default, `today` and the current time come from the rendering machine's clock and time zone, so
|
|
135
|
+
a server and a browser can disagree. Pass `time-zone` and `today` to `CalendarRoot` so they match.
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
MIT
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_7: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_7) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<PrimitiveProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrimitiveProps> & Readonly<{}>, {
|
|
9
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
type __VLS_Props = PrimitiveProps & {
|
|
3
|
+
action: 'prev' | 'next' | 'today';
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_9: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_9) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { CalendarEventInput, CalendarResource, CalendarView, GanttLinkInput, GanttScale, ResourceId, WeekDay } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
import type { EventDropDetail, RangeSelectDetail } from './useInteractions.js';
|
|
4
|
+
declare const __VLS_export: <T extends CalendarEventInput>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(PrimitiveProps & {
|
|
6
|
+
events?: readonly T[];
|
|
7
|
+
view?: CalendarView;
|
|
8
|
+
weekStartsOn?: WeekDay;
|
|
9
|
+
timeZone?: string;
|
|
10
|
+
locale?: string;
|
|
11
|
+
fixedWeeks?: boolean;
|
|
12
|
+
maxLanes?: number;
|
|
13
|
+
today?: Temporal.PlainDate;
|
|
14
|
+
resources?: readonly CalendarResource[];
|
|
15
|
+
getResourceIds?: (event: T) => readonly ResourceId[] | null | undefined;
|
|
16
|
+
/** Adds a row for events whose resources aren't in `resources`. */
|
|
17
|
+
unassigned?: boolean;
|
|
18
|
+
slotMinMinutes?: number;
|
|
19
|
+
slotMaxMinutes?: number;
|
|
20
|
+
slotMinutes?: number;
|
|
21
|
+
ganttScale?: GanttScale;
|
|
22
|
+
ganttLinks?: readonly GanttLinkInput[];
|
|
23
|
+
editable?: boolean;
|
|
24
|
+
selectable?: boolean;
|
|
25
|
+
snapMinutes?: number;
|
|
26
|
+
canEdit?: (event: T) => boolean;
|
|
27
|
+
} & {
|
|
28
|
+
date?: Temporal.PlainDate;
|
|
29
|
+
}) & {
|
|
30
|
+
"onEvent-drop"?: ((detail: EventDropDetail<T>) => any) | undefined;
|
|
31
|
+
"onEvent-resize"?: ((detail: EventDropDetail<T>) => any) | undefined;
|
|
32
|
+
"onRange-select"?: ((detail: RangeSelectDetail) => any) | undefined;
|
|
33
|
+
"onUpdate:date"?: ((value: Temporal.PlainDate) => any) | undefined;
|
|
34
|
+
}> & (typeof globalThis extends {
|
|
35
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
36
|
+
} ? P : {});
|
|
37
|
+
expose: (exposed: {}) => void;
|
|
38
|
+
attrs: any;
|
|
39
|
+
slots: {
|
|
40
|
+
default?: (props: {
|
|
41
|
+
grid: import("@calends/core").MonthGrid<T>;
|
|
42
|
+
date: Temporal.PlainDate;
|
|
43
|
+
title: string;
|
|
44
|
+
visibleRange: {
|
|
45
|
+
start: Temporal.PlainDate;
|
|
46
|
+
end: Temporal.PlainDate;
|
|
47
|
+
};
|
|
48
|
+
prev: () => void;
|
|
49
|
+
next: () => void;
|
|
50
|
+
goToToday: () => void;
|
|
51
|
+
}) => any;
|
|
52
|
+
};
|
|
53
|
+
emit: (((evt: "event-drop", detail: EventDropDetail<T>) => void) & ((evt: "event-resize", detail: EventDropDetail<T>) => void) & ((evt: "range-select", detail: RangeSelectDetail) => void)) & ((event: "update:date", value: Temporal.PlainDate) => void);
|
|
54
|
+
}>) => import("vue").VNode & {
|
|
55
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
56
|
+
};
|
|
57
|
+
declare const _default: typeof __VLS_export;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
60
|
+
[K in keyof T]: T[K];
|
|
61
|
+
} : {
|
|
62
|
+
[K in keyof T as K]: T[K];
|
|
63
|
+
}) & {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { EventSegment, ResourceId } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
import type { KeyboardAxes } from './useInteractions.js';
|
|
4
|
+
/**
|
|
5
|
+
* Exposes its placement as CSS variables (column, span, and lane) rather than inline
|
|
6
|
+
* geometry, so the recipe decides how bars are drawn.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = PrimitiveProps & {
|
|
9
|
+
segment: EventSegment<any>;
|
|
10
|
+
/** How arrow keys move it once picked up; a month grid moves by days and weeks. */
|
|
11
|
+
keyboardAxes?: KeyboardAxes;
|
|
12
|
+
/** The resource row it's drawn in, so moving it can change resource. */
|
|
13
|
+
resourceId?: ResourceId | null;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_14: {
|
|
16
|
+
event: import("@calends/core").CalendarEvent<any>;
|
|
17
|
+
segment: EventSegment<any>;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_14) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
resourceId: ResourceId | null;
|
|
24
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
25
|
+
keyboardAxes: KeyboardAxes;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
/**
|
|
3
|
+
* Drags one edge of the event it sits in. Renders nothing unless the event is editable;
|
|
4
|
+
* the recipe positions it (`data-edge` says which).
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = PrimitiveProps & {
|
|
7
|
+
edge: 'start' | 'end';
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_10: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_10) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_9: {
|
|
3
|
+
gantt: import("@calends/core").Gantt<import("@calends/core").CalendarEventInput>;
|
|
4
|
+
rows: import("@calends/core").GanttRow<import("@calends/core").CalendarEventInput>[];
|
|
5
|
+
columns: import("@calends/core").GanttColumn[];
|
|
6
|
+
groups: import("@calends/core").GanttColumn[];
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_9) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<PrimitiveProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrimitiveProps> & Readonly<{}>, {
|
|
12
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GanttRow } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
/** Exposes its placement as `--bar-start` and `--bar-end`, in days from the start of the axis. */
|
|
4
|
+
type __VLS_Props = PrimitiveProps & {
|
|
5
|
+
row: GanttRow<any>;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_14: {
|
|
8
|
+
event: import("@calends/core").CalendarEvent<any>;
|
|
9
|
+
row: GanttRow<any>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_14) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type GanttLink } from '@calends/core';
|
|
2
|
+
/**
|
|
3
|
+
* An SVG overlay of the links between rows. Lay it over the rows (absolute, the same box)
|
|
4
|
+
* inside the scrolled content: it measures the rendered bars, so it follows any zoom, row
|
|
5
|
+
* height, or drag preview. The slot draws each link from its `path` and `arrow`.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
/** How far a line runs straight out of a bar and into the next, in pixels. */
|
|
9
|
+
gap?: number;
|
|
10
|
+
radius?: number;
|
|
11
|
+
arrowSize?: number;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_1: {
|
|
14
|
+
links: {
|
|
15
|
+
highlighted: boolean;
|
|
16
|
+
dimmed: boolean;
|
|
17
|
+
link: GanttLink<any>;
|
|
18
|
+
path: string;
|
|
19
|
+
arrow: string;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_1) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
|
+
gap: number;
|
|
27
|
+
radius: number;
|
|
28
|
+
arrowSize: number;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GanttRow } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
type __VLS_Props = PrimitiveProps & {
|
|
4
|
+
row: GanttRow<any>;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_7: {
|
|
7
|
+
row: GanttRow<any>;
|
|
8
|
+
event: import("@calends/core").CalendarEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_7) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<PrimitiveProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrimitiveProps> & Readonly<{}>, {
|
|
7
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<PrimitiveProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrimitiveProps> & Readonly<{}>, {
|
|
7
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MonthDay } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
type __VLS_Props = PrimitiveProps & {
|
|
4
|
+
day: MonthDay<any>;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_9: {
|
|
7
|
+
day: MonthDay<any>;
|
|
8
|
+
segments: import("@calends/core").EventSegment<any>[];
|
|
9
|
+
coveringSegments: import("@calends/core").EventSegment<any>[];
|
|
10
|
+
hiddenCount: number;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_9) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MonthDay } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
/** Renders nothing on days where every event fits, so the recipe can place it unconditionally. */
|
|
4
|
+
type __VLS_Props = PrimitiveProps & {
|
|
5
|
+
day: MonthDay<any>;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_7: {
|
|
8
|
+
hiddenCount: number;
|
|
9
|
+
eventCount: number;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_7) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_10: {
|
|
3
|
+
grid: import("@calends/core").MonthGrid<import("@calends/core").CalendarEventInput>;
|
|
4
|
+
weekdays: Temporal.PlainDate[];
|
|
5
|
+
weeks: import("@calends/core").MonthWeek<import("@calends/core").CalendarEventInput>[];
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_10) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<PrimitiveProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrimitiveProps> & Readonly<{}>, {
|
|
11
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MonthWeek } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
type __VLS_Props = PrimitiveProps & {
|
|
4
|
+
week: MonthWeek<any>;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_7: {
|
|
7
|
+
week: MonthWeek<any>;
|
|
8
|
+
days: import("@calends/core").MonthDay<any>[];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_7) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
2
|
+
type __VLS_Props = PrimitiveProps & {
|
|
3
|
+
date: Temporal.PlainDate;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_7: {
|
|
6
|
+
label: string;
|
|
7
|
+
longLabel: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_7) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type TimeGridDay } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
/** Renders only in today's column and inside the visible window; exposes `--now` in minutes. */
|
|
4
|
+
type __VLS_Props = PrimitiveProps & {
|
|
5
|
+
day: TimeGridDay<any>;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_7: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_7) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ResourceCell, ResourceId } from '@calends/core';
|
|
2
|
+
import { type PrimitiveProps } from 'reka-ui';
|
|
3
|
+
type __VLS_Props = PrimitiveProps & {
|
|
4
|
+
cell: ResourceCell<any>;
|
|
5
|
+
/** Index of the row, for keyboard focus. */
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
/** The resource's name, for the cell's accessible label. */
|
|
8
|
+
resourceLabel?: string;
|
|
9
|
+
/** The row's resource, null for the unassigned row, so drops and selections know it. */
|
|
10
|
+
resourceId?: ResourceId | null;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_9: {
|
|
13
|
+
cell: ResourceCell<any>;
|
|
14
|
+
segments: import("@calends/core").EventSegment<any>[];
|
|
15
|
+
};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
default?: (props: typeof __VLS_9) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|