mood-ui 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.OLD.md +5 -0
- package/README.md +84 -0
- package/dist/components/ModoProvider.vue.d.ts +61 -0
- package/dist/components/data-display/Card.vue.d.ts +26 -0
- package/dist/components/data-display/Typography.vue.d.ts +21 -0
- package/dist/components/data-display/avatar/Avatar.vue.d.ts +9 -0
- package/dist/components/data-display/avatar/AvatarGroup.vue.d.ts +7 -0
- package/dist/components/data-display/calendar/AgendaView.vue.d.ts +76 -0
- package/dist/components/data-display/calendar/Calendar.vue.d.ts +25 -0
- package/dist/components/data-display/calendar/CalendarEventTooltip.vue.d.ts +34 -0
- package/dist/components/data-display/calendar/CalendarHeader.vue.d.ts +67 -0
- package/dist/components/data-display/calendar/DayView.vue.d.ts +91 -0
- package/dist/components/data-display/calendar/MonthView.vue.d.ts +71 -0
- package/dist/components/data-display/calendar/Scheduler.vue.d.ts +102 -0
- package/dist/components/data-display/calendar/WeekView.vue.d.ts +101 -0
- package/dist/components/data-display/date-picker/DateRangePicker.vue.d.ts +18 -0
- package/dist/components/data-display/date-picker/DateTimePicker.vue.d.ts +17 -0
- package/dist/components/data-display/table/Table.vue.d.ts +75 -0
- package/dist/components/data-display/table/TableColumn.vue.d.ts +26 -0
- package/dist/components/data-display/table/TablePagination.vue.d.ts +14 -0
- package/dist/components/feedback/Badge.vue.d.ts +24 -0
- package/dist/components/feedback/Banner.vue.d.ts +28 -0
- package/dist/components/feedback/Chip.vue.d.ts +22 -0
- package/dist/components/feedback/ConfirmDialog.vue.d.ts +4 -0
- package/dist/components/feedback/Drawer.vue.d.ts +43 -0
- package/dist/components/feedback/EmptyState.vue.d.ts +19 -0
- package/dist/components/feedback/Loader.vue.d.ts +7 -0
- package/dist/components/feedback/Modal.vue.d.ts +44 -0
- package/dist/components/feedback/ProgressBar.vue.d.ts +10 -0
- package/dist/components/feedback/Skeleton.vue.d.ts +10 -0
- package/dist/components/feedback/Toast.vue.d.ts +19 -0
- package/dist/components/feedback/ToastContainer.vue.d.ts +11 -0
- package/dist/components/feedback/Tooltip.vue.d.ts +35 -0
- package/dist/components/forms/Button.vue.d.ts +24 -0
- package/dist/components/forms/ButtonGroup.vue.d.ts +16 -0
- package/dist/components/forms/Checkbox.vue.d.ts +22 -0
- package/dist/components/forms/Combobox.vue.d.ts +48 -0
- package/dist/components/forms/DateField.vue.d.ts +30 -0
- package/dist/components/forms/DateRangeField.vue.d.ts +32 -0
- package/dist/components/forms/DateTimeField.vue.d.ts +34 -0
- package/dist/components/forms/FileInput.vue.d.ts +33 -0
- package/dist/components/forms/FormField.vue.d.ts +30 -0
- package/dist/components/forms/Input.vue.d.ts +33 -0
- package/dist/components/forms/MultiSelect.vue.d.ts +51 -0
- package/dist/components/forms/NumberInput.vue.d.ts +35 -0
- package/dist/components/forms/PasswordInput.vue.d.ts +40 -0
- package/dist/components/forms/Radio.vue.d.ts +16 -0
- package/dist/components/forms/RadioGroup.vue.d.ts +27 -0
- package/dist/components/forms/RangeSlider.vue.d.ts +27 -0
- package/dist/components/forms/SearchInput.vue.d.ts +37 -0
- package/dist/components/forms/Select.vue.d.ts +46 -0
- package/dist/components/forms/Slider.vue.d.ts +26 -0
- package/dist/components/forms/Switch.vue.d.ts +22 -0
- package/dist/components/forms/Textarea.vue.d.ts +36 -0
- package/dist/components/layout/AppShell.vue.d.ts +124 -0
- package/dist/components/layout/Canvas.vue.d.ts +21 -0
- package/dist/components/layout/Container.vue.d.ts +21 -0
- package/dist/components/layout/Divider.vue.d.ts +21 -0
- package/dist/components/layout/HStack.vue.d.ts +14 -0
- package/dist/components/layout/PageHeader.vue.d.ts +34 -0
- package/dist/components/layout/PopoverPanel.vue.d.ts +29 -0
- package/dist/components/layout/Sidebar.vue.d.ts +39 -0
- package/dist/components/layout/SidebarRow.vue.d.ts +31 -0
- package/dist/components/layout/SidebarRowContent.vue.d.ts +27 -0
- package/dist/components/layout/Stack.vue.d.ts +24 -0
- package/dist/components/layout/Topbar.vue.d.ts +36 -0
- package/dist/components/layout/VStack.vue.d.ts +14 -0
- package/dist/components/navigation/Breadcrumbs.vue.d.ts +13 -0
- package/dist/components/navigation/DropdownMenu.vue.d.ts +36 -0
- package/dist/components/navigation/Pagination.vue.d.ts +18 -0
- package/dist/components/navigation/Tabs.vue.d.ts +37 -0
- package/dist/composables/eventColors.d.ts +13 -0
- package/dist/composables/useAutoScroll.d.ts +11 -0
- package/dist/composables/useCalendar.d.ts +44 -0
- package/dist/composables/useCalendarKeyboard.d.ts +17 -0
- package/dist/composables/useCalendarTheme.d.ts +22 -0
- package/dist/composables/useColorMode.d.ts +28 -0
- package/dist/composables/useConfirm.d.ts +146 -0
- package/dist/composables/useCurrentTimeLine.d.ts +5 -0
- package/dist/composables/useEventHover.d.ts +29 -0
- package/dist/composables/useField.d.ts +89 -0
- package/dist/composables/useModoConfig.d.ts +29 -0
- package/dist/composables/usePopover.d.ts +59 -0
- package/dist/composables/useTable.d.ts +29 -0
- package/dist/composables/useTableColumnsState.d.ts +52 -0
- package/dist/composables/useTableFilter.d.ts +39 -0
- package/dist/composables/useTableKeyboard.d.ts +38 -0
- package/dist/composables/useTablePagination.d.ts +44 -0
- package/dist/composables/useTableQuery.d.ts +90 -0
- package/dist/composables/useTableSelection.d.ts +40 -0
- package/dist/composables/useTableSort.d.ts +41 -0
- package/dist/composables/useTableTree.d.ts +55 -0
- package/dist/composables/useTableUrlSync.d.ts +66 -0
- package/dist/composables/useTableVirtual.d.ts +43 -0
- package/dist/composables/useTimeGrid.d.ts +22 -0
- package/dist/composables/useToast.d.ts +176 -0
- package/dist/config/ModoConfig.d.ts +32 -0
- package/dist/config/ModoLocale.d.ts +212 -0
- package/dist/config/colorPrimitives.d.ts +13 -0
- package/dist/config/createModoUI.d.ts +85 -0
- package/dist/config/palettes.d.ts +30 -0
- package/dist/index.d.ts +130 -0
- package/dist/interfaces/data-display/Card.interface.d.ts +8 -0
- package/dist/interfaces/data-display/Typography.interface.d.ts +12 -0
- package/dist/interfaces/data-display/avatar/Avatar.interface.d.ts +24 -0
- package/dist/interfaces/data-display/avatar/AvatarGroup.interface.d.ts +8 -0
- package/dist/interfaces/data-display/calendar/AgendaView.interface.d.ts +29 -0
- package/dist/interfaces/data-display/calendar/Calendar.interface.d.ts +16 -0
- package/dist/interfaces/data-display/calendar/DayView.interface.d.ts +43 -0
- package/dist/interfaces/data-display/calendar/MonthView.interface.d.ts +41 -0
- package/dist/interfaces/data-display/calendar/Scheduler.interface.d.ts +63 -0
- package/dist/interfaces/data-display/calendar/WeekView.interface.d.ts +65 -0
- package/dist/interfaces/data-display/date-picker/DateRangePicker.interface.d.ts +20 -0
- package/dist/interfaces/data-display/date-picker/DateTimePicker.interface.d.ts +16 -0
- package/dist/interfaces/data-display/table/Table.interface.d.ts +615 -0
- package/dist/interfaces/data-display/table/TableColumn.interface.d.ts +10 -0
- package/dist/interfaces/data-display/table/TablePagination.interface.d.ts +33 -0
- package/dist/interfaces/feedback/Badge.interface.d.ts +14 -0
- package/dist/interfaces/feedback/Banner.interface.d.ts +14 -0
- package/dist/interfaces/feedback/Chip.interface.d.ts +35 -0
- package/dist/interfaces/feedback/ConfirmDialog.interface.d.ts +49 -0
- package/dist/interfaces/feedback/Drawer.interface.d.ts +49 -0
- package/dist/interfaces/feedback/EmptyState.interface.d.ts +31 -0
- package/dist/interfaces/feedback/Loader.interface.d.ts +7 -0
- package/dist/interfaces/feedback/Modal.interface.d.ts +50 -0
- package/dist/interfaces/feedback/ProgressBar.interface.d.ts +31 -0
- package/dist/interfaces/feedback/Skeleton.interface.d.ts +123 -0
- package/dist/interfaces/feedback/Toast.interface.d.ts +86 -0
- package/dist/interfaces/feedback/Tooltip.interface.d.ts +38 -0
- package/dist/interfaces/forms/Button.interface.d.ts +26 -0
- package/dist/interfaces/forms/ButtonGroup.interface.d.ts +9 -0
- package/dist/interfaces/forms/Checkbox.interface.d.ts +32 -0
- package/dist/interfaces/forms/Combobox.interface.d.ts +57 -0
- package/dist/interfaces/forms/DateField.interface.d.ts +39 -0
- package/dist/interfaces/forms/DateRangeField.interface.d.ts +41 -0
- package/dist/interfaces/forms/DateTimeField.interface.d.ts +44 -0
- package/dist/interfaces/forms/FileInput.interface.d.ts +105 -0
- package/dist/interfaces/forms/FormField.interface.d.ts +55 -0
- package/dist/interfaces/forms/Input.interface.d.ts +68 -0
- package/dist/interfaces/forms/NumberInput.interface.d.ts +77 -0
- package/dist/interfaces/forms/PasswordInput.interface.d.ts +84 -0
- package/dist/interfaces/forms/Radio.interface.d.ts +54 -0
- package/dist/interfaces/forms/RadioGroup.context.d.ts +13 -0
- package/dist/interfaces/forms/RangeSlider.interface.d.ts +30 -0
- package/dist/interfaces/forms/SearchInput.interface.d.ts +59 -0
- package/dist/interfaces/forms/Select.interface.d.ts +145 -0
- package/dist/interfaces/forms/Slider.interface.d.ts +36 -0
- package/dist/interfaces/forms/Switch.interface.d.ts +30 -0
- package/dist/interfaces/forms/Textarea.interface.d.ts +64 -0
- package/dist/interfaces/layout/AppShell.interface.d.ts +56 -0
- package/dist/interfaces/layout/Canvas.interface.d.ts +39 -0
- package/dist/interfaces/layout/Container.interface.d.ts +8 -0
- package/dist/interfaces/layout/Divider.interface.d.ts +53 -0
- package/dist/interfaces/layout/PageHeader.interface.d.ts +23 -0
- package/dist/interfaces/layout/Sidebar.interface.d.ts +88 -0
- package/dist/interfaces/layout/Stack.interface.d.ts +42 -0
- package/dist/interfaces/layout/Topbar.interface.d.ts +28 -0
- package/dist/interfaces/navigation/Breadcrumbs.interface.d.ts +38 -0
- package/dist/interfaces/navigation/DropdownMenu.interface.d.ts +72 -0
- package/dist/interfaces/navigation/Pagination.interface.d.ts +37 -0
- package/dist/interfaces/navigation/Tabs.interface.d.ts +74 -0
- package/dist/mood-ui.cjs +4 -0
- package/dist/mood-ui.cjs.map +1 -0
- package/dist/mood-ui.css +2 -0
- package/dist/mood-ui.mjs +19832 -0
- package/dist/mood-ui.mjs.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Design-system locale strings.
|
|
4
|
+
*
|
|
5
|
+
* Every namespace corresponds to a component (or a small group). Keys are
|
|
6
|
+
* stable contract — renaming a key is a breaking change for consumers.
|
|
7
|
+
*
|
|
8
|
+
* Rules:
|
|
9
|
+
* - Keep entries short and component-scoped. This is UI copy, not i18n
|
|
10
|
+
* for user content.
|
|
11
|
+
* - Never use HTML. These strings are injected as text / aria-label.
|
|
12
|
+
* - Placeholders use `{name}` interpolation (see `interpolate()`).
|
|
13
|
+
*
|
|
14
|
+
* Precedence resolved by components:
|
|
15
|
+
* component prop (e.g. `rejectMessages`) → provider locale → default EN.
|
|
16
|
+
*/
|
|
17
|
+
export interface ModoLocale {
|
|
18
|
+
/** Shared strings used across multiple components. */
|
|
19
|
+
common: {
|
|
20
|
+
clear: string;
|
|
21
|
+
loading: string;
|
|
22
|
+
close: string;
|
|
23
|
+
dismiss: string;
|
|
24
|
+
remove: string;
|
|
25
|
+
};
|
|
26
|
+
input: {
|
|
27
|
+
clear: string;
|
|
28
|
+
};
|
|
29
|
+
textarea: {
|
|
30
|
+
clear: string;
|
|
31
|
+
};
|
|
32
|
+
select: {
|
|
33
|
+
empty: string;
|
|
34
|
+
clear: string;
|
|
35
|
+
clearSearch: string;
|
|
36
|
+
};
|
|
37
|
+
multiSelect: {
|
|
38
|
+
clear: string;
|
|
39
|
+
clearSearch: string;
|
|
40
|
+
};
|
|
41
|
+
combobox: {
|
|
42
|
+
clear: string;
|
|
43
|
+
toggleOptions: string;
|
|
44
|
+
};
|
|
45
|
+
numberInput: {
|
|
46
|
+
increment: string;
|
|
47
|
+
decrement: string;
|
|
48
|
+
};
|
|
49
|
+
searchInput: {
|
|
50
|
+
clear: string;
|
|
51
|
+
};
|
|
52
|
+
passwordInput: {
|
|
53
|
+
show: string;
|
|
54
|
+
hide: string;
|
|
55
|
+
/** Label per strength score. Empty string `''` is valid for score 0. */
|
|
56
|
+
strength: {
|
|
57
|
+
0: string;
|
|
58
|
+
1: string;
|
|
59
|
+
2: string;
|
|
60
|
+
3: string;
|
|
61
|
+
4: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
dateField: {
|
|
65
|
+
clear: string;
|
|
66
|
+
};
|
|
67
|
+
dateTimeField: {
|
|
68
|
+
clear: string;
|
|
69
|
+
};
|
|
70
|
+
dateRangeField: {
|
|
71
|
+
clear: string;
|
|
72
|
+
};
|
|
73
|
+
calendar: {
|
|
74
|
+
prevYear: string;
|
|
75
|
+
prevMonth: string;
|
|
76
|
+
nextMonth: string;
|
|
77
|
+
nextYear: string;
|
|
78
|
+
today: string;
|
|
79
|
+
};
|
|
80
|
+
agenda: {
|
|
81
|
+
empty: string;
|
|
82
|
+
};
|
|
83
|
+
fileInput: {
|
|
84
|
+
/** Trigger / inline placeholder. */
|
|
85
|
+
placeholder: string;
|
|
86
|
+
/** aria-label when variant='area' and no explicit label is given. */
|
|
87
|
+
uploadFiles: string;
|
|
88
|
+
/** Default for `dropzoneLabel` when variant='area' and nothing selected. */
|
|
89
|
+
dropzoneLabel: string;
|
|
90
|
+
dropzoneLabelMultiple: string;
|
|
91
|
+
/** Default for helper text under the trigger ("up to 5MB · max 3"). */
|
|
92
|
+
hintUpTo: string;
|
|
93
|
+
hintMax: string;
|
|
94
|
+
/** Action labels for the inline browse button. */
|
|
95
|
+
browse: string;
|
|
96
|
+
addMore: string;
|
|
97
|
+
replace: string;
|
|
98
|
+
/** Headline when several files are selected: `{count} files selected`. */
|
|
99
|
+
filesSelected: string;
|
|
100
|
+
reject: {
|
|
101
|
+
size: string;
|
|
102
|
+
sizeNoLimit: string;
|
|
103
|
+
type: string;
|
|
104
|
+
count: string;
|
|
105
|
+
countNoLimit: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
banner: {
|
|
109
|
+
dismiss: string;
|
|
110
|
+
};
|
|
111
|
+
badge: {
|
|
112
|
+
remove: string;
|
|
113
|
+
};
|
|
114
|
+
avatarGroup: {
|
|
115
|
+
/** `{count}` placeholder: total users in the group. */
|
|
116
|
+
group: string;
|
|
117
|
+
};
|
|
118
|
+
slider: {
|
|
119
|
+
/** Generic aria-label when no label / ariaLabel is provided. */
|
|
120
|
+
aria: string;
|
|
121
|
+
};
|
|
122
|
+
skeleton: {
|
|
123
|
+
loading: string;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Strings for the `Table` component family. Phase 1 only ships a small
|
|
127
|
+
* subset (empty/loading/caption); later phases extend this namespace
|
|
128
|
+
* with sort, selection, pagination, filter, edit, group, toolbar.
|
|
129
|
+
*/
|
|
130
|
+
table: {
|
|
131
|
+
/** Empty state when `data` is empty and no filter is applied. */
|
|
132
|
+
empty: string;
|
|
133
|
+
/** Empty state when filtering produced zero rows. */
|
|
134
|
+
noResults: string;
|
|
135
|
+
/** Visually hidden caption / aria-label fallback. */
|
|
136
|
+
defaultLabel: string;
|
|
137
|
+
/** SR-only announcement while `loading` is true. */
|
|
138
|
+
loading: string;
|
|
139
|
+
/** Sortable column hints (announced via `aria-sort` + button label). */
|
|
140
|
+
sortAscending: string;
|
|
141
|
+
sortDescending: string;
|
|
142
|
+
sortNone: string;
|
|
143
|
+
/** Live region announcement when a column gets sorted. */
|
|
144
|
+
sortedBy: string;
|
|
145
|
+
/** Selection a11y. */
|
|
146
|
+
selectAllRows: string;
|
|
147
|
+
selectRow: string;
|
|
148
|
+
/** Live region after a row is (de)selected: `{count} selected`. */
|
|
149
|
+
selectedCount: string;
|
|
150
|
+
/** Row expansion controls. */
|
|
151
|
+
expandRow: string;
|
|
152
|
+
collapseRow: string;
|
|
153
|
+
/** Filter row UX. */
|
|
154
|
+
filterPlaceholder: string;
|
|
155
|
+
clearFilter: string;
|
|
156
|
+
/** Global search input (Phase 5a · toolbar). */
|
|
157
|
+
searchPlaceholder: string;
|
|
158
|
+
/** Toolbar column-visibility menu (Phase 5b). */
|
|
159
|
+
columnVisibility: string;
|
|
160
|
+
/** Toolbar export menu (Phase 5c). */
|
|
161
|
+
export: string;
|
|
162
|
+
exportCsv: string;
|
|
163
|
+
exportJson: string;
|
|
164
|
+
exportClipboard: string;
|
|
165
|
+
/** Live region after Ctrl/Cmd+C copy of selected rows (Phase 5e). */
|
|
166
|
+
copiedRows: string;
|
|
167
|
+
/** Column resize handle (aria-label). */
|
|
168
|
+
resizeColumn: string;
|
|
169
|
+
/** Column reorder drag handle / announcement. */
|
|
170
|
+
reorderColumn: string;
|
|
171
|
+
/** Live region: `Moved {column} to position {position}`. */
|
|
172
|
+
movedColumn: string;
|
|
173
|
+
/** Pagination controls (used by `<TablePagination>`). */
|
|
174
|
+
pagination: {
|
|
175
|
+
previous: string;
|
|
176
|
+
next: string;
|
|
177
|
+
first: string;
|
|
178
|
+
last: string;
|
|
179
|
+
/** `Page {current} of {total}` when both numbers are known. */
|
|
180
|
+
page: string;
|
|
181
|
+
rowsPerPage: string;
|
|
182
|
+
/** Range readout: `{from}-{to} of {total}`. */
|
|
183
|
+
range: string;
|
|
184
|
+
/** Range readout when total is unknown: `{from}-{to}`. */
|
|
185
|
+
rangeUnknown: string;
|
|
186
|
+
};
|
|
187
|
+
/** Inline cell editing (Phase 4a). */
|
|
188
|
+
edit: {
|
|
189
|
+
/** Aria-label / tooltip on an editable cell's editor. */
|
|
190
|
+
editCell: string;
|
|
191
|
+
/** Hint shown after entering edit mode (sr-only). */
|
|
192
|
+
commitHint: string;
|
|
193
|
+
/** Generic invalid-value message used when no validator runs. */
|
|
194
|
+
invalid: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/** Default locale (English). Serves as the non-breaking fallback. */
|
|
199
|
+
export declare const defaultLocale: ModoLocale;
|
|
200
|
+
/** Deep-partial for consumer overrides. Each leaf string stays optional. */
|
|
201
|
+
export type DeepPartial<T> = {
|
|
202
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
203
|
+
};
|
|
204
|
+
export type PartialLocale = DeepPartial<ModoLocale>;
|
|
205
|
+
/** Deep-merge `override` into `base`. Non-destructive; returns a new object. */
|
|
206
|
+
export declare function mergeLocale(base: ModoLocale, override?: PartialLocale): ModoLocale;
|
|
207
|
+
/**
|
|
208
|
+
* Simple `{name}` interpolator. Values not provided pass through (keeps the
|
|
209
|
+
* placeholder untouched), so missing data never throws.
|
|
210
|
+
*/
|
|
211
|
+
export declare function interpolate(template: string, vars?: Record<string, string | number>): string;
|
|
212
|
+
export declare const MODO_LOCALE: InjectionKey<Ref<ModoLocale>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color primitives — sRGB hex → OKLCH, foreground picker.
|
|
3
|
+
* Used by ModoProvider to derive semantic tokens from user palettes.
|
|
4
|
+
*/
|
|
5
|
+
/** Returns a CSS `oklch(L C H)` string for the given hex color. */
|
|
6
|
+
export declare function hexToOklchString(hex: string): string;
|
|
7
|
+
/** APCA Lc score (absolute value); > ~75 for body text, > ~60 for large text. */
|
|
8
|
+
export declare function apcaLc(textHex: string, bgHex: string): number;
|
|
9
|
+
/**
|
|
10
|
+
* Picks a readable foreground (near-black or near-white) for the given hex color,
|
|
11
|
+
* using APCA Lc. Returns an `oklch()` string suitable for CSS tokens.
|
|
12
|
+
*/
|
|
13
|
+
export declare function pickForegroundOklch(bgHex: string): string;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ModoConfig } from './ModoConfig';
|
|
3
|
+
import { ModoPalette } from './palettes';
|
|
4
|
+
export interface ModoUIOptions {
|
|
5
|
+
color?: ModoConfig['color'];
|
|
6
|
+
radius?: ModoConfig['radius'];
|
|
7
|
+
theme?: ModoConfig['theme'];
|
|
8
|
+
palettes?: {
|
|
9
|
+
default?: Partial<ModoPalette>;
|
|
10
|
+
primary?: Partial<ModoPalette>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function createModoUI(options?: ModoUIOptions): {
|
|
14
|
+
install(app: App): void;
|
|
15
|
+
config: import('vue').Ref<{
|
|
16
|
+
color: import('./ModoConfig').ModoColor;
|
|
17
|
+
radius: import('./ModoConfig').ModoRadius;
|
|
18
|
+
size: import('./ModoConfig').ModoSize;
|
|
19
|
+
theme: import('./ModoConfig').ModoTheme;
|
|
20
|
+
halo: import('./ModoConfig').ModoHalo;
|
|
21
|
+
palettes: {
|
|
22
|
+
default: {
|
|
23
|
+
50: string;
|
|
24
|
+
100: string;
|
|
25
|
+
200: string;
|
|
26
|
+
300: string;
|
|
27
|
+
400: string;
|
|
28
|
+
500: string;
|
|
29
|
+
600: string;
|
|
30
|
+
700: string;
|
|
31
|
+
800: string;
|
|
32
|
+
900: string;
|
|
33
|
+
950: string;
|
|
34
|
+
};
|
|
35
|
+
primary: {
|
|
36
|
+
50: string;
|
|
37
|
+
100: string;
|
|
38
|
+
200: string;
|
|
39
|
+
300: string;
|
|
40
|
+
400: string;
|
|
41
|
+
500: string;
|
|
42
|
+
600: string;
|
|
43
|
+
700: string;
|
|
44
|
+
800: string;
|
|
45
|
+
900: string;
|
|
46
|
+
950: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}, ModoConfig | {
|
|
50
|
+
color: import('./ModoConfig').ModoColor;
|
|
51
|
+
radius: import('./ModoConfig').ModoRadius;
|
|
52
|
+
size: import('./ModoConfig').ModoSize;
|
|
53
|
+
theme: import('./ModoConfig').ModoTheme;
|
|
54
|
+
halo: import('./ModoConfig').ModoHalo;
|
|
55
|
+
palettes: {
|
|
56
|
+
default: {
|
|
57
|
+
50: string;
|
|
58
|
+
100: string;
|
|
59
|
+
200: string;
|
|
60
|
+
300: string;
|
|
61
|
+
400: string;
|
|
62
|
+
500: string;
|
|
63
|
+
600: string;
|
|
64
|
+
700: string;
|
|
65
|
+
800: string;
|
|
66
|
+
900: string;
|
|
67
|
+
950: string;
|
|
68
|
+
};
|
|
69
|
+
primary: {
|
|
70
|
+
50: string;
|
|
71
|
+
100: string;
|
|
72
|
+
200: string;
|
|
73
|
+
300: string;
|
|
74
|
+
400: string;
|
|
75
|
+
500: string;
|
|
76
|
+
600: string;
|
|
77
|
+
700: string;
|
|
78
|
+
800: string;
|
|
79
|
+
900: string;
|
|
80
|
+
950: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
84
|
+
set(next: Partial<ModoUIOptions>): void;
|
|
85
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type PaletteShade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
2
|
+
export type ModoPalette = Record<PaletteShade, string>;
|
|
3
|
+
export interface ModoPalettes {
|
|
4
|
+
default: ModoPalette;
|
|
5
|
+
primary: ModoPalette;
|
|
6
|
+
}
|
|
7
|
+
/** Tailwind `gray` — used as the neutral/default accent. */
|
|
8
|
+
export declare const defaultPalette: ModoPalette;
|
|
9
|
+
/** Tailwind `blue` — default brand color. */
|
|
10
|
+
export declare const primaryPalette: ModoPalette;
|
|
11
|
+
export declare const defaultPalettes: ModoPalettes;
|
|
12
|
+
/**
|
|
13
|
+
* Generates a Tailwind-shaped 11-shade palette from a single seed hex.
|
|
14
|
+
* Hue/saturation are preserved; lightness is mapped per shade.
|
|
15
|
+
*/
|
|
16
|
+
export declare function paletteFromHex(hex: string): ModoPalette;
|
|
17
|
+
/** Merges partial overrides over defaults (or an optional `base` palettes). */
|
|
18
|
+
export declare function mergePalettes(overrides?: {
|
|
19
|
+
default?: Partial<ModoPalette>;
|
|
20
|
+
primary?: Partial<ModoPalette>;
|
|
21
|
+
}, base?: ModoPalettes): ModoPalettes;
|
|
22
|
+
/** Produces CSS var declarations (channel form, e.g. "59 130 246") for use with rgb(var(--x) / 0.1). */
|
|
23
|
+
export declare function palettesToCssVars(palettes: ModoPalettes): Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Derives OKLCH semantic tokens from palettes (matching the `--primary-*`
|
|
26
|
+
* tokens that ModoProvider exposes). Exported so teleported surfaces
|
|
27
|
+
* (PopoverPanel, modals, tooltips) can re-apply them once they leave the
|
|
28
|
+
* provider's DOM subtree.
|
|
29
|
+
*/
|
|
30
|
+
export declare function semanticTokensFromPalettes(palettes: ModoPalettes, toOklchString: (hex: string) => string, pickForegroundOklchStr: (hex: string) => string): Record<string, string>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public entry point of the `modo-ui` package.
|
|
3
|
+
*
|
|
4
|
+
* This module re-exports every component, composable and type that is
|
|
5
|
+
* intended to be consumed by external apps. Internal helpers stay
|
|
6
|
+
* unexported on purpose — anything not listed here is private.
|
|
7
|
+
*
|
|
8
|
+
* Phase 8 (lib export) builds against this file via `vite build --lib`.
|
|
9
|
+
*/
|
|
10
|
+
export { default as ModoProvider } from './components/ModoProvider.vue';
|
|
11
|
+
export { MODO_CONFIG, defaultModoConfig, type ModoColor, type ModoRadius, type ModoSize, type ModoTheme, type ModoHalo, type ModoConfig, } from './config/ModoConfig';
|
|
12
|
+
export { MODO_LOCALE, defaultLocale, mergeLocale, type ModoLocale, type PartialLocale, } from './config/ModoLocale';
|
|
13
|
+
export { defaultPalettes, paletteFromHex, mergePalettes, palettesToCssVars, semanticTokensFromPalettes, type ModoPalette, type ModoPalettes, type PaletteShade, } from './config/palettes';
|
|
14
|
+
export { useModoConfig, useResolvedColor, useResolvedRadius, useResolvedSize, useResolvedTheme, useResolvedHalo, useModoLocale, useLocaleString, } from './composables/useModoConfig';
|
|
15
|
+
export { useColorMode, resolveColorMode, type ColorMode } from './composables/useColorMode';
|
|
16
|
+
export { useToast, useToastQueue } from './composables/useToast';
|
|
17
|
+
export { useConfirm, useConfirmQueue } from './composables/useConfirm';
|
|
18
|
+
export { default as Button } from './components/forms/Button.vue';
|
|
19
|
+
export { default as ButtonGroup } from './components/forms/ButtonGroup.vue';
|
|
20
|
+
export { default as FormField } from './components/forms/FormField.vue';
|
|
21
|
+
export { default as Input } from './components/forms/Input.vue';
|
|
22
|
+
export { default as Textarea } from './components/forms/Textarea.vue';
|
|
23
|
+
export { default as PasswordInput } from './components/forms/PasswordInput.vue';
|
|
24
|
+
export { default as NumberInput } from './components/forms/NumberInput.vue';
|
|
25
|
+
export { default as SearchInput } from './components/forms/SearchInput.vue';
|
|
26
|
+
export { default as Select } from './components/forms/Select.vue';
|
|
27
|
+
export { default as MultiSelect } from './components/forms/MultiSelect.vue';
|
|
28
|
+
export { default as Combobox } from './components/forms/Combobox.vue';
|
|
29
|
+
export { default as Checkbox } from './components/forms/Checkbox.vue';
|
|
30
|
+
export { default as Radio } from './components/forms/Radio.vue';
|
|
31
|
+
export { default as RadioGroup } from './components/forms/RadioGroup.vue';
|
|
32
|
+
export { default as Switch } from './components/forms/Switch.vue';
|
|
33
|
+
export { default as Slider } from './components/forms/Slider.vue';
|
|
34
|
+
export { default as RangeSlider } from './components/forms/RangeSlider.vue';
|
|
35
|
+
export { default as FileInput } from './components/forms/FileInput.vue';
|
|
36
|
+
export { default as DateField } from './components/forms/DateField.vue';
|
|
37
|
+
export { default as DateRangeField } from './components/forms/DateRangeField.vue';
|
|
38
|
+
export { default as DateTimeField } from './components/forms/DateTimeField.vue';
|
|
39
|
+
export { default as Badge } from './components/feedback/Badge.vue';
|
|
40
|
+
export { default as Banner } from './components/feedback/Banner.vue';
|
|
41
|
+
export { default as Chip } from './components/feedback/Chip.vue';
|
|
42
|
+
export { default as Drawer } from './components/feedback/Drawer.vue';
|
|
43
|
+
export { default as Loader } from './components/feedback/Loader.vue';
|
|
44
|
+
export { default as Modal } from './components/feedback/Modal.vue';
|
|
45
|
+
export { default as Skeleton } from './components/feedback/Skeleton.vue';
|
|
46
|
+
export { default as Tooltip } from './components/feedback/Tooltip.vue';
|
|
47
|
+
export { default as Toast } from './components/feedback/Toast.vue';
|
|
48
|
+
export { default as ToastContainer } from './components/feedback/ToastContainer.vue';
|
|
49
|
+
export { default as ConfirmDialog } from './components/feedback/ConfirmDialog.vue';
|
|
50
|
+
export { default as EmptyState } from './components/feedback/EmptyState.vue';
|
|
51
|
+
export { default as ProgressBar } from './components/feedback/ProgressBar.vue';
|
|
52
|
+
export { default as AppShell } from './components/layout/AppShell.vue';
|
|
53
|
+
export { default as Canvas } from './components/layout/Canvas.vue';
|
|
54
|
+
export { default as Container } from './components/layout/Container.vue';
|
|
55
|
+
export { default as Divider } from './components/layout/Divider.vue';
|
|
56
|
+
export { default as Stack } from './components/layout/Stack.vue';
|
|
57
|
+
export { default as HStack } from './components/layout/HStack.vue';
|
|
58
|
+
export { default as VStack } from './components/layout/VStack.vue';
|
|
59
|
+
export { default as PageHeader } from './components/layout/PageHeader.vue';
|
|
60
|
+
export { default as PopoverPanel } from './components/layout/PopoverPanel.vue';
|
|
61
|
+
export { default as Sidebar } from './components/layout/Sidebar.vue';
|
|
62
|
+
export { default as SidebarRow } from './components/layout/SidebarRow.vue';
|
|
63
|
+
export { default as SidebarRowContent } from './components/layout/SidebarRowContent.vue';
|
|
64
|
+
export { default as Topbar } from './components/layout/Topbar.vue';
|
|
65
|
+
export { default as Tabs } from './components/navigation/Tabs.vue';
|
|
66
|
+
export { default as Breadcrumbs } from './components/navigation/Breadcrumbs.vue';
|
|
67
|
+
export { default as DropdownMenu } from './components/navigation/DropdownMenu.vue';
|
|
68
|
+
export { default as Pagination } from './components/navigation/Pagination.vue';
|
|
69
|
+
export { default as Card } from './components/data-display/Card.vue';
|
|
70
|
+
export { default as Typography } from './components/data-display/Typography.vue';
|
|
71
|
+
export { default as Avatar } from './components/data-display/avatar/Avatar.vue';
|
|
72
|
+
export { default as AvatarGroup } from './components/data-display/avatar/AvatarGroup.vue';
|
|
73
|
+
export { default as Calendar } from './components/data-display/calendar/Calendar.vue';
|
|
74
|
+
export { default as MonthView } from './components/data-display/calendar/MonthView.vue';
|
|
75
|
+
export { default as WeekView } from './components/data-display/calendar/WeekView.vue';
|
|
76
|
+
export { default as DayView } from './components/data-display/calendar/DayView.vue';
|
|
77
|
+
export { default as AgendaView } from './components/data-display/calendar/AgendaView.vue';
|
|
78
|
+
export { default as Scheduler } from './components/data-display/calendar/Scheduler.vue';
|
|
79
|
+
export { default as CalendarHeader } from './components/data-display/calendar/CalendarHeader.vue';
|
|
80
|
+
export { default as CalendarEventTooltip } from './components/data-display/calendar/CalendarEventTooltip.vue';
|
|
81
|
+
export { default as DateRangePicker } from './components/data-display/date-picker/DateRangePicker.vue';
|
|
82
|
+
export { default as DateTimePicker } from './components/data-display/date-picker/DateTimePicker.vue';
|
|
83
|
+
export { default as Table } from './components/data-display/table/Table.vue';
|
|
84
|
+
export { default as TableColumn } from './components/data-display/table/TableColumn.vue';
|
|
85
|
+
export { default as TablePagination } from './components/data-display/table/TablePagination.vue';
|
|
86
|
+
export type * from './interfaces/forms/Button.interface';
|
|
87
|
+
export type * from './interfaces/forms/FormField.interface';
|
|
88
|
+
export type * from './interfaces/forms/ButtonGroup.interface';
|
|
89
|
+
export type * from './interfaces/forms/Input.interface';
|
|
90
|
+
export type * from './interfaces/forms/Textarea.interface';
|
|
91
|
+
export type * from './interfaces/forms/PasswordInput.interface';
|
|
92
|
+
export type * from './interfaces/forms/NumberInput.interface';
|
|
93
|
+
export type * from './interfaces/forms/SearchInput.interface';
|
|
94
|
+
export type * from './interfaces/forms/Select.interface';
|
|
95
|
+
export type * from './interfaces/forms/Combobox.interface';
|
|
96
|
+
export type * from './interfaces/forms/Checkbox.interface';
|
|
97
|
+
export type * from './interfaces/forms/Radio.interface';
|
|
98
|
+
export type * from './interfaces/forms/Switch.interface';
|
|
99
|
+
export type * from './interfaces/forms/Slider.interface';
|
|
100
|
+
export type * from './interfaces/forms/RangeSlider.interface';
|
|
101
|
+
export type * from './interfaces/forms/FileInput.interface';
|
|
102
|
+
export type * from './interfaces/forms/DateField.interface';
|
|
103
|
+
export type * from './interfaces/forms/DateRangeField.interface';
|
|
104
|
+
export type * from './interfaces/forms/DateTimeField.interface';
|
|
105
|
+
export type * from './interfaces/feedback/Badge.interface';
|
|
106
|
+
export type * from './interfaces/feedback/Banner.interface';
|
|
107
|
+
export type * from './interfaces/feedback/Chip.interface';
|
|
108
|
+
export type * from './interfaces/feedback/Drawer.interface';
|
|
109
|
+
export type * from './interfaces/feedback/Loader.interface';
|
|
110
|
+
export type * from './interfaces/feedback/Modal.interface';
|
|
111
|
+
export type * from './interfaces/feedback/Skeleton.interface';
|
|
112
|
+
export type * from './interfaces/feedback/Tooltip.interface';
|
|
113
|
+
export type * from './interfaces/feedback/Toast.interface';
|
|
114
|
+
export type * from './interfaces/feedback/ConfirmDialog.interface';
|
|
115
|
+
export type * from './interfaces/feedback/EmptyState.interface';
|
|
116
|
+
export type * from './interfaces/feedback/ProgressBar.interface';
|
|
117
|
+
export type * from './interfaces/layout/AppShell.interface';
|
|
118
|
+
export type * from './interfaces/layout/Canvas.interface';
|
|
119
|
+
export type * from './interfaces/layout/Container.interface';
|
|
120
|
+
export type * from './interfaces/layout/Divider.interface';
|
|
121
|
+
export type * from './interfaces/layout/Stack.interface';
|
|
122
|
+
export type * from './interfaces/layout/PageHeader.interface';
|
|
123
|
+
export type * from './interfaces/layout/Sidebar.interface';
|
|
124
|
+
export type * from './interfaces/layout/Topbar.interface';
|
|
125
|
+
export type * from './interfaces/navigation/Tabs.interface';
|
|
126
|
+
export type * from './interfaces/navigation/Breadcrumbs.interface';
|
|
127
|
+
export type * from './interfaces/navigation/DropdownMenu.interface';
|
|
128
|
+
export type * from './interfaces/navigation/Pagination.interface';
|
|
129
|
+
export type * from './interfaces/data-display/Card.interface';
|
|
130
|
+
export type * from './interfaces/data-display/Typography.interface';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Typography {
|
|
2
|
+
variant?: 'display' | 'heading' | 'title' | 'subtitle' | 'body' | 'caption' | 'overline';
|
|
3
|
+
size?: 'small' | 'medium' | 'large';
|
|
4
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label' | 'small' | 'strong' | 'em';
|
|
5
|
+
weight?: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
|
|
6
|
+
align?: 'left' | 'center' | 'right';
|
|
7
|
+
color?: 'default' | 'muted' | 'primary' | 'danger' | 'success' | 'warning';
|
|
8
|
+
truncate?: boolean;
|
|
9
|
+
italic?: boolean;
|
|
10
|
+
underline?: boolean;
|
|
11
|
+
strikethrough?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface Avatar {
|
|
2
|
+
src?: string;
|
|
3
|
+
alt?: string;
|
|
4
|
+
initials?: string;
|
|
5
|
+
size?: 'xs' | 'small' | 'medium' | 'large' | 'xl';
|
|
6
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
7
|
+
status?: 'online' | 'offline' | 'away' | 'busy';
|
|
8
|
+
bordered?: boolean;
|
|
9
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
10
|
+
/**
|
|
11
|
+
* Accessible name applied to the avatar root when it falls back to
|
|
12
|
+
* initials/icon (no image). Takes priority over `alt`/`initials` for
|
|
13
|
+
* the ARIA label. The `<img>` element keeps `alt` for screen readers.
|
|
14
|
+
*/
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* When true, renders a `Skeleton` placeholder with the same footprint
|
|
18
|
+
* (size + radius) instead of the real avatar content. Use this while
|
|
19
|
+
* the avatar data is loading so the layout does not shift when the
|
|
20
|
+
* image/initials arrive.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
skeleton?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface AvatarGroup {
|
|
2
|
+
max?: number;
|
|
3
|
+
size?: 'xs' | 'small' | 'medium' | 'large' | 'xl';
|
|
4
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
5
|
+
bordered?: boolean;
|
|
6
|
+
/** Accessible label for the group. Falls back to "Group of N users". */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CalendarEvent } from './MonthView.interface';
|
|
2
|
+
export interface AgendaView {
|
|
3
|
+
modelValue?: Date;
|
|
4
|
+
events?: CalendarEvent[];
|
|
5
|
+
locale?: string;
|
|
6
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
7
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
8
|
+
bordered?: boolean;
|
|
9
|
+
minDate?: Date;
|
|
10
|
+
maxDate?: Date;
|
|
11
|
+
daysToShow?: number;
|
|
12
|
+
daysBefore?: number;
|
|
13
|
+
showEmptyDays?: boolean;
|
|
14
|
+
showHeader?: boolean;
|
|
15
|
+
showMonthSeparator?: boolean;
|
|
16
|
+
showYearNavigation?: boolean;
|
|
17
|
+
showMonthYearSelects?: boolean;
|
|
18
|
+
showTodayButton?: boolean;
|
|
19
|
+
dayNameFormat?: 'narrow' | 'short' | 'long';
|
|
20
|
+
dayNameCase?: 'upper' | 'lower' | 'capitalize' | 'normal';
|
|
21
|
+
format?: '12h' | '24h';
|
|
22
|
+
readonly?: boolean;
|
|
23
|
+
highlightedDates?: Date[];
|
|
24
|
+
disabledDates?: Date[];
|
|
25
|
+
disabledWeekdays?: number[];
|
|
26
|
+
emptyText?: string;
|
|
27
|
+
loadMoreChunk?: number;
|
|
28
|
+
enableKeyboardNavigation?: boolean;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Calendar {
|
|
2
|
+
modelValue?: Date | null;
|
|
3
|
+
month?: number;
|
|
4
|
+
year?: number;
|
|
5
|
+
locale?: string;
|
|
6
|
+
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
minDate?: Date;
|
|
8
|
+
maxDate?: Date;
|
|
9
|
+
disabledDates?: Date[];
|
|
10
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
11
|
+
variant?: 'filled' | 'outline';
|
|
12
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
13
|
+
showOutsideDays?: boolean;
|
|
14
|
+
showHeader?: boolean;
|
|
15
|
+
fixedWeeks?: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CalendarEvent } from './MonthView.interface';
|
|
2
|
+
import { BusinessHours, DisabledTimeRange } from './WeekView.interface';
|
|
3
|
+
export interface DayView {
|
|
4
|
+
modelValue?: Date;
|
|
5
|
+
events?: CalendarEvent[];
|
|
6
|
+
locale?: string;
|
|
7
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
8
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
9
|
+
bordered?: boolean;
|
|
10
|
+
minDate?: Date;
|
|
11
|
+
maxDate?: Date;
|
|
12
|
+
dayNameFormat?: 'narrow' | 'short' | 'long';
|
|
13
|
+
dayNameCase?: 'upper' | 'lower' | 'capitalize' | 'normal';
|
|
14
|
+
highlightedDates?: Date[];
|
|
15
|
+
disabledDates?: Date[];
|
|
16
|
+
disabledWeekdays?: number[];
|
|
17
|
+
disabledTimeRanges?: DisabledTimeRange[];
|
|
18
|
+
businessHours?: BusinessHours | BusinessHours[];
|
|
19
|
+
showHeader?: boolean;
|
|
20
|
+
showYearJump?: boolean;
|
|
21
|
+
showTodayButton?: boolean;
|
|
22
|
+
showMonthYearSelects?: boolean;
|
|
23
|
+
hourStart?: number;
|
|
24
|
+
hourEnd?: number;
|
|
25
|
+
slotMinutes?: 15 | 30 | 60;
|
|
26
|
+
slotHeight?: number;
|
|
27
|
+
format?: '12h' | '24h';
|
|
28
|
+
showCurrentTime?: boolean;
|
|
29
|
+
showCurrentTimeLabel?: boolean;
|
|
30
|
+
currentTimeColor?: 'red' | 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
31
|
+
currentTimeUpdateInterval?: number;
|
|
32
|
+
draggableEvents?: boolean;
|
|
33
|
+
resizableEvents?: boolean;
|
|
34
|
+
allowRangeSelection?: boolean;
|
|
35
|
+
allowDropOnDisabled?: boolean;
|
|
36
|
+
allowResizeOverDisabled?: boolean;
|
|
37
|
+
readonly?: boolean;
|
|
38
|
+
preventOverlap?: boolean;
|
|
39
|
+
autoScrollOnDrag?: boolean;
|
|
40
|
+
showAllDayRow?: boolean;
|
|
41
|
+
enableKeyboardNavigation?: boolean;
|
|
42
|
+
showNowPill?: boolean;
|
|
43
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface CalendarEvent {
|
|
2
|
+
id: string | number;
|
|
3
|
+
title: string;
|
|
4
|
+
start: Date;
|
|
5
|
+
end?: Date;
|
|
6
|
+
allDay?: boolean;
|
|
7
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning' | 'info' | 'purple' | 'pink';
|
|
8
|
+
colorHex?: string;
|
|
9
|
+
resourceId?: string | number;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
description?: string;
|
|
12
|
+
meta?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface MonthView {
|
|
15
|
+
modelValue?: Date;
|
|
16
|
+
events?: CalendarEvent[];
|
|
17
|
+
locale?: string;
|
|
18
|
+
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
19
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
20
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
21
|
+
maxEventsPerDay?: number;
|
|
22
|
+
showWeekNumbers?: boolean;
|
|
23
|
+
fixedWeeks?: boolean;
|
|
24
|
+
showHeader?: boolean;
|
|
25
|
+
bordered?: boolean;
|
|
26
|
+
keyboardNavigation?: boolean;
|
|
27
|
+
minDate?: Date;
|
|
28
|
+
maxDate?: Date;
|
|
29
|
+
minYear?: number;
|
|
30
|
+
maxYear?: number;
|
|
31
|
+
disabledDates?: Date[];
|
|
32
|
+
disabledDaysOfWeek?: number[];
|
|
33
|
+
dayNameFormat?: 'narrow' | 'short' | 'long';
|
|
34
|
+
dayNameCase?: 'upper' | 'lower' | 'capitalize' | 'normal';
|
|
35
|
+
highlightWeekends?: boolean;
|
|
36
|
+
showOutsideDays?: boolean;
|
|
37
|
+
showMonthYearSelects?: boolean;
|
|
38
|
+
showYearJump?: boolean;
|
|
39
|
+
draggableEvents?: boolean;
|
|
40
|
+
laneHeight?: number;
|
|
41
|
+
}
|