frontile 0.18.0-alpha.17 → 0.18.0-alpha.19
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/declarations/-private/intent-icons.d.ts +9 -0
- package/declarations/components/collections/calendar/calendar.d.ts +585 -0
- package/declarations/components/collections/calendar/day-cell.d.ts +19 -0
- package/declarations/components/collections/calendar/header.d.ts +56 -0
- package/declarations/components/collections/calendar/icons.d.ts +14 -0
- package/declarations/components/collections/calendar/month-grid.d.ts +36 -0
- package/declarations/components/collections/calendar/types.d.ts +94 -0
- package/declarations/components/collections/calendar/utils.d.ts +51 -0
- package/declarations/components/collections/calendar/year-grid.d.ts +32 -0
- package/declarations/components/collections/calendar.d.ts +3 -0
- package/declarations/components/collections/dropdown/dropdown.d.ts +190 -0
- package/declarations/components/collections/dropdown/menu-context.d.ts +64 -0
- package/declarations/components/collections/dropdown/sub.d.ts +195 -0
- package/declarations/components/collections/dropdown.d.ts +2 -117
- package/declarations/components/collections/index.d.ts +1 -0
- package/declarations/components/collections/listbox/item.d.ts +57 -0
- package/declarations/components/collections/listbox/listbox.d.ts +11 -2
- package/declarations/components/disclosure/accordion/accordion.d.ts +247 -0
- package/declarations/components/disclosure/accordion/item.d.ts +96 -0
- package/declarations/components/disclosure/accordion.d.ts +3 -0
- package/declarations/components/disclosure/icons.d.ts +9 -0
- package/declarations/components/disclosure/index.d.ts +1 -0
- package/declarations/components/forms/autocomplete.d.ts +0 -2
- package/declarations/components/navigation/external-link.d.ts +94 -0
- package/declarations/components/navigation/index.d.ts +2 -0
- package/declarations/components/navigation/pagination/icons.d.ts +13 -0
- package/declarations/components/navigation/pagination/pagination.d.ts +279 -0
- package/declarations/components/navigation/pagination/range.d.ts +34 -0
- package/declarations/components/navigation/pagination.d.ts +3 -0
- package/declarations/components/overlays/drawer/drag-handle.d.ts +26 -0
- package/declarations/components/overlays/drawer/header.d.ts +106 -1
- package/declarations/components/overlays/drawer/selectors.d.ts +22 -0
- package/declarations/components/overlays/drawer.d.ts +148 -2
- package/declarations/components/overlays/index.d.ts +3 -1
- package/declarations/components/overlays/modal.d.ts +1 -1
- package/declarations/components/overlays/mount-animation.d.ts +81 -0
- package/declarations/components/overlays/overlay.d.ts +31 -0
- package/declarations/components/overlays/popover.d.ts +210 -5
- package/declarations/components/overlays/tooltip.d.ts +401 -0
- package/declarations/components/status/alert.d.ts +134 -0
- package/declarations/components/status/index.d.ts +1 -0
- package/declarations/components/utilities/collapsible.d.ts +9 -0
- package/declarations/components/utilities/index.d.ts +1 -0
- package/declarations/disclosure.d.ts +1 -0
- package/declarations/index.d.ts +1 -0
- package/declarations/modifiers/drag-to-dismiss.d.ts +22 -0
- package/declarations/template-registry.d.ts +11 -4
- package/declarations/test-support.d.ts +1 -0
- package/declarations/utils/listManager.d.ts +7 -0
- package/declarations/utils/prefers-reduced-motion.d.ts +3 -0
- package/declarations/utils/safe-area.d.ts +52 -0
- package/dist/collections.js +2 -1
- package/dist/collections.js.map +1 -1
- package/dist/components/collections/calendar/calendar.js +808 -0
- package/dist/components/collections/calendar/calendar.js.map +1 -0
- package/dist/components/collections/calendar/day-cell.js +16 -0
- package/dist/components/collections/calendar/day-cell.js.map +1 -0
- package/dist/components/collections/calendar/header.js +48 -0
- package/dist/components/collections/calendar/header.js.map +1 -0
- package/dist/components/collections/calendar/icons.js +23 -0
- package/dist/components/collections/calendar/icons.js.map +1 -0
- package/dist/components/collections/calendar/month-grid.js +14 -0
- package/dist/components/collections/calendar/month-grid.js.map +1 -0
- package/dist/components/collections/calendar/types.js +2 -0
- package/dist/components/collections/calendar/types.js.map +1 -0
- package/dist/components/collections/calendar/utils.js +199 -0
- package/dist/components/collections/calendar/utils.js.map +1 -0
- package/dist/components/collections/calendar/year-grid.js +117 -0
- package/dist/components/collections/calendar/year-grid.js.map +1 -0
- package/dist/components/collections/calendar.js +2 -0
- package/dist/components/collections/calendar.js.map +1 -0
- package/dist/components/collections/dropdown/dropdown.js +206 -0
- package/dist/components/collections/dropdown/dropdown.js.map +1 -0
- package/dist/components/collections/dropdown/menu-context.js +62 -0
- package/dist/components/collections/dropdown/menu-context.js.map +1 -0
- package/dist/components/collections/dropdown/sub.js +256 -0
- package/dist/components/collections/dropdown/sub.js.map +1 -0
- package/dist/components/collections/dropdown.js +1 -105
- package/dist/components/collections/dropdown.js.map +1 -1
- package/dist/components/collections/index.js +2 -1
- package/dist/components/collections/index.js.map +1 -1
- package/dist/components/collections/listbox/item.js +74 -2
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/listbox/listbox.js +91 -26
- package/dist/components/collections/listbox/listbox.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +1 -1
- package/dist/components/disclosure/accordion/accordion.js +225 -0
- package/dist/components/disclosure/accordion/accordion.js.map +1 -0
- package/dist/components/disclosure/accordion/item.js +86 -0
- package/dist/components/disclosure/accordion/item.js.map +1 -0
- package/dist/components/disclosure/accordion.js +3 -0
- package/dist/components/disclosure/accordion.js.map +1 -0
- package/dist/components/disclosure/icons.js +13 -0
- package/dist/components/disclosure/icons.js.map +1 -0
- package/dist/components/disclosure/index.js +3 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/forms/autocomplete.js +7 -11
- package/dist/components/forms/autocomplete.js.map +1 -1
- package/dist/components/forms/input-otp.js +1 -1
- package/dist/components/forms/input-otp.js.map +1 -1
- package/dist/components/forms/radio.js +1 -1
- package/dist/components/forms/radio.js.map +1 -1
- package/dist/components/navigation/external-link.js +107 -0
- package/dist/components/navigation/external-link.js.map +1 -0
- package/dist/components/navigation/index.js +3 -0
- package/dist/components/navigation/index.js.map +1 -1
- package/dist/components/navigation/pagination/icons.js +23 -0
- package/dist/components/navigation/pagination/icons.js.map +1 -0
- package/dist/components/navigation/pagination/pagination.js +216 -0
- package/dist/components/navigation/pagination/pagination.js.map +1 -0
- package/dist/components/navigation/pagination/range.js +58 -0
- package/dist/components/navigation/pagination/range.js.map +1 -0
- package/dist/components/navigation/pagination.js +3 -0
- package/dist/components/navigation/pagination.js.map +1 -0
- package/dist/components/notifications/index.js +1 -1
- package/dist/components/notifications/notification-card.js +2 -2
- package/dist/components/notifications/notifications-container.js +1 -1
- package/dist/components/overlays/drawer/body.js +1 -1
- package/dist/components/overlays/drawer/body.js.map +1 -1
- package/dist/components/overlays/drawer/drag-handle.js +18 -0
- package/dist/components/overlays/drawer/drag-handle.js.map +1 -0
- package/dist/components/overlays/drawer/header.js +35 -3
- package/dist/components/overlays/drawer/header.js.map +1 -1
- package/dist/components/overlays/drawer/selectors.js +29 -0
- package/dist/components/overlays/drawer/selectors.js.map +1 -0
- package/dist/components/overlays/drawer.js +48 -2
- package/dist/components/overlays/drawer.js.map +1 -1
- package/dist/components/overlays/index.js +4 -2
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/overlays/modal.js +1 -1
- package/dist/components/overlays/modal.js.map +1 -1
- package/dist/components/overlays/mount-animation.js +146 -0
- package/dist/components/overlays/mount-animation.js.map +1 -0
- package/dist/components/overlays/overlay.js +101 -18
- package/dist/components/overlays/overlay.js.map +1 -1
- package/dist/components/overlays/popover.js +342 -29
- package/dist/components/overlays/popover.js.map +1 -1
- package/dist/components/overlays/portal.js +1 -1
- package/dist/components/overlays/tooltip.js +377 -0
- package/dist/components/overlays/tooltip.js.map +1 -0
- package/dist/components/status/alert.js +146 -0
- package/dist/components/status/alert.js.map +1 -0
- package/dist/components/status/index.js +1 -0
- package/dist/components/status/index.js.map +1 -1
- package/dist/components/utilities/collapsible.js +42 -5
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/components/utilities/index.js +1 -0
- package/dist/components/utilities/index.js.map +1 -1
- package/dist/disclosure.js +3 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/{dom-Dpb18UgD.js → dom-cKWVvtkd.js} +2 -2
- package/dist/{dom-Dpb18UgD.js.map → dom-cKWVvtkd.js.map} +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/{components/notifications/icons.js → intent-icons-DpEViO8C.js} +2 -2
- package/dist/intent-icons-DpEViO8C.js.map +1 -0
- package/dist/modifiers/drag-to-dismiss.js +392 -0
- package/dist/modifiers/drag-to-dismiss.js.map +1 -0
- package/dist/navigation.js +3 -0
- package/dist/navigation.js.map +1 -1
- package/dist/{notification-card-ByIC9X6o.js → notification-card-D5fd-Sxa.js} +2 -2
- package/dist/notification-card-D5fd-Sxa.js.map +1 -0
- package/dist/notifications.js +1 -1
- package/dist/overlays.js +4 -2
- package/dist/overlays.js.map +1 -1
- package/dist/status.js +1 -0
- package/dist/status.js.map +1 -1
- package/dist/test-support.js +1 -0
- package/dist/test-support.js.map +1 -1
- package/dist/utilities.js +1 -0
- package/dist/utilities.js.map +1 -1
- package/dist/utils/listManager.js +11 -1
- package/dist/utils/listManager.js.map +1 -1
- package/dist/utils/prefers-reduced-motion.js +21 -0
- package/dist/utils/prefers-reduced-motion.js.map +1 -0
- package/dist/utils/safe-area.js +133 -0
- package/dist/utils/safe-area.js.map +1 -0
- package/package.json +9 -3
- package/dist/components/notifications/icons.js.map +0 -1
- package/dist/notification-card-ByIC9X6o.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TOC } from '@ember/component/template-only';
|
|
2
|
+
type IconSignature = TOC<{
|
|
3
|
+
Element: SVGElement;
|
|
4
|
+
}>;
|
|
5
|
+
declare const IconInfo: IconSignature;
|
|
6
|
+
declare const IconSuccess: IconSignature;
|
|
7
|
+
declare const IconWarning: IconSignature;
|
|
8
|
+
declare const IconDanger: IconSignature;
|
|
9
|
+
export { IconInfo, IconSuccess, IconWarning, IconDanger };
|
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type SlotsToClasses } from '@frontile/theme';
|
|
3
|
+
import { type CalendarHeaderContext } from './header';
|
|
4
|
+
import type { CalendarSlots, CalendarVariants } from '@frontile/theme';
|
|
5
|
+
import type { CalendarDay, CalendarMode, CalendarMonthData, CalendarValue, DayState, WeekDay, WeekdayLabel } from './types';
|
|
6
|
+
export interface CalendarArgs<M extends CalendarMode = 'single'> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether a click selects one day or the two ends of a range.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue 'single'
|
|
11
|
+
*/
|
|
12
|
+
mode?: M;
|
|
13
|
+
/**
|
|
14
|
+
* Seeds the visible month when uncontrolled -- the *first* month of the
|
|
15
|
+
* window when `@visibleMonths` is greater than one.
|
|
16
|
+
*/
|
|
17
|
+
defaultMonth?: Date;
|
|
18
|
+
/**
|
|
19
|
+
* Controlled visible month -- the *first* month of the window when
|
|
20
|
+
* `@visibleMonths` is greater than one.
|
|
21
|
+
*
|
|
22
|
+
* *Passing* this argument at all puts the month axis in controlled mode --
|
|
23
|
+
* passing it as `undefined` included. Omit it entirely to let `Calendar`
|
|
24
|
+
* track the visible month itself.
|
|
25
|
+
*/
|
|
26
|
+
month?: Date;
|
|
27
|
+
/** Called with the month the user asked to move to. */
|
|
28
|
+
onMonthChange?: (month: Date) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Controlled selection. *Passing* this argument at all puts selection in
|
|
31
|
+
* controlled mode -- passing it as `undefined` included.
|
|
32
|
+
*/
|
|
33
|
+
value?: CalendarValue<M>;
|
|
34
|
+
/** Seeds the selection when uncontrolled. */
|
|
35
|
+
defaultValue?: CalendarValue<M>;
|
|
36
|
+
/** Called with the new selection when the user picks or clears a day. */
|
|
37
|
+
onChange?: (value: CalendarValue<M>) => void;
|
|
38
|
+
/** BCP-47 tag. All human-readable text is produced by `Intl` from this. */
|
|
39
|
+
locale?: string;
|
|
40
|
+
/** Overrides the first day of week implied by `@locale`. */
|
|
41
|
+
weekStartsOn?: WeekDay;
|
|
42
|
+
/**
|
|
43
|
+
* Whether days from the adjacent month fill out a grid's leading/trailing
|
|
44
|
+
* weeks. @defaultValue `true` when a single month is visible, `false`
|
|
45
|
+
* once `@visibleMonths` is greater than one -- otherwise a boundary date
|
|
46
|
+
* would render twice, once per adjacent grid.
|
|
47
|
+
*/
|
|
48
|
+
showOutsideDays?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Renders six week rows in every month, so the calendar keeps the same
|
|
51
|
+
* height as you page between months of different lengths.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue false
|
|
54
|
+
*/
|
|
55
|
+
fixedWeeks?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* How many months to render side by side, starting from the visible
|
|
58
|
+
* month. @defaultValue 1
|
|
59
|
+
*/
|
|
60
|
+
visibleMonths?: number;
|
|
61
|
+
/**
|
|
62
|
+
* How far prev/next paging advances. `'visible'` moves by the whole
|
|
63
|
+
* window (`@visibleMonths`); `'single'` always moves by one month.
|
|
64
|
+
*
|
|
65
|
+
* @defaultValue 'visible'
|
|
66
|
+
*/
|
|
67
|
+
pageBehavior?: 'visible' | 'single';
|
|
68
|
+
/**
|
|
69
|
+
* The color used for the selected day and the range band.
|
|
70
|
+
*
|
|
71
|
+
* @defaultValue 'primary'
|
|
72
|
+
*/
|
|
73
|
+
intent?: CalendarVariants['intent'];
|
|
74
|
+
/**
|
|
75
|
+
* The size of the calendar cells and caption text.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue 'md'
|
|
78
|
+
*/
|
|
79
|
+
size?: CalendarVariants['size'];
|
|
80
|
+
/**
|
|
81
|
+
* Blocks navigation and selection entirely.
|
|
82
|
+
*
|
|
83
|
+
* @defaultValue false
|
|
84
|
+
*/
|
|
85
|
+
isDisabled?: boolean;
|
|
86
|
+
/** Earliest selectable date. Also clamps month navigation. */
|
|
87
|
+
minValue?: Date;
|
|
88
|
+
/** Latest selectable date. Also clamps month navigation. */
|
|
89
|
+
maxValue?: Date;
|
|
90
|
+
/**
|
|
91
|
+
* Marks a date as present but unselectable -- a holiday, a booked night.
|
|
92
|
+
* Distinct from `@minValue`/`@maxValue`, which put a date out of range
|
|
93
|
+
* entirely.
|
|
94
|
+
*/
|
|
95
|
+
isDateUnavailable?: (date: Date) => boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Allows paging between months but blocks selecting a day. Unlike
|
|
98
|
+
* `@isDisabled`, the days stay focusable so the calendar can still be read
|
|
99
|
+
* with the keyboard.
|
|
100
|
+
*
|
|
101
|
+
* @defaultValue false
|
|
102
|
+
*/
|
|
103
|
+
isReadOnly?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Moves DOM focus into the grid on insert. This is the *only* thing that
|
|
106
|
+
* may focus the calendar on mount -- rendering a calendar must never
|
|
107
|
+
* otherwise steal focus.
|
|
108
|
+
*
|
|
109
|
+
* @defaultValue false
|
|
110
|
+
*/
|
|
111
|
+
autofocus?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* The id of an element naming this calendar, forwarded to each month grid's
|
|
114
|
+
* `aria-labelledby`. Use it when something outside the calendar already
|
|
115
|
+
* names it -- a date picker's own label, say -- so the grid is announced
|
|
116
|
+
* with that name instead of its month caption.
|
|
117
|
+
*
|
|
118
|
+
* An `aria-labelledby` passed through `...attributes` lands on the root
|
|
119
|
+
* element, which has no role, so it would not reach the grid.
|
|
120
|
+
*/
|
|
121
|
+
labelledBy?: string;
|
|
122
|
+
/** Overrides the classes applied to individual slots. */
|
|
123
|
+
classes?: SlotsToClasses<CalendarSlots>;
|
|
124
|
+
/**
|
|
125
|
+
* `'label'` renders the plain month/year caption; `'dropdown'` swaps it for
|
|
126
|
+
* a native month `<select>` plus a year trigger that opens a year-grid
|
|
127
|
+
* picker.
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue 'label'
|
|
130
|
+
*/
|
|
131
|
+
captionLayout?: 'label' | 'dropdown';
|
|
132
|
+
}
|
|
133
|
+
export interface CalendarSignature<M extends CalendarMode = 'single'> {
|
|
134
|
+
Args: CalendarArgs<M>;
|
|
135
|
+
Blocks: {
|
|
136
|
+
day: [DayState];
|
|
137
|
+
header: [CalendarHeaderContext];
|
|
138
|
+
weekday: [WeekdayLabel];
|
|
139
|
+
footer: [];
|
|
140
|
+
};
|
|
141
|
+
Element: HTMLDivElement;
|
|
142
|
+
}
|
|
143
|
+
declare class Calendar<M extends CalendarMode = 'single'> extends Component<CalendarSignature<M>> {
|
|
144
|
+
#private;
|
|
145
|
+
get locale(): string;
|
|
146
|
+
get weekStartsOn(): WeekDay;
|
|
147
|
+
/**
|
|
148
|
+
* Default is `true` for a single visible month, `false` once more than
|
|
149
|
+
* one month is visible -- a boundary date would otherwise render twice
|
|
150
|
+
* (once as a trailing/leading outside day, once as a real day in the
|
|
151
|
+
* neighbouring grid). An explicit `@showOutsideDays` always wins, in
|
|
152
|
+
* either direction.
|
|
153
|
+
*/
|
|
154
|
+
get showOutsideDays(): boolean;
|
|
155
|
+
get captionLayout(): 'label' | 'dropdown';
|
|
156
|
+
isYearGridOpen: boolean;
|
|
157
|
+
toggleYearGrid: () => void;
|
|
158
|
+
private returnFocusToYearTrigger;
|
|
159
|
+
dismissYearGrid: () => void;
|
|
160
|
+
pickYear: (year: number) => void;
|
|
161
|
+
/**
|
|
162
|
+
* The root element, for the imperative focus restores above: closing the
|
|
163
|
+
* year grid unmounts the button focus was on, so the element to move focus
|
|
164
|
+
* to has to be looked up rather than rendered into.
|
|
165
|
+
*/
|
|
166
|
+
rootRef: {
|
|
167
|
+
current: HTMLElement | undefined;
|
|
168
|
+
"__#6@#onChange"?: ((el: HTMLElement | undefined) => void) | undefined;
|
|
169
|
+
setup: import("ember-modifier").FunctionBasedModifier<{
|
|
170
|
+
Args: {
|
|
171
|
+
Positional: unknown[];
|
|
172
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
173
|
+
};
|
|
174
|
+
Element: HTMLElement;
|
|
175
|
+
}>;
|
|
176
|
+
};
|
|
177
|
+
get monthOptions(): {
|
|
178
|
+
value: number;
|
|
179
|
+
label: string;
|
|
180
|
+
isDisabled: boolean;
|
|
181
|
+
}[];
|
|
182
|
+
/**
|
|
183
|
+
* A getter, not a bare `{{this.visibleMonth.getFullYear}}` in the
|
|
184
|
+
* template -- Glimmer does not auto-invoke a plain method reference in
|
|
185
|
+
* argument position, it would pass the function itself instead of a
|
|
186
|
+
* number.
|
|
187
|
+
*/
|
|
188
|
+
get visibleYear(): number;
|
|
189
|
+
get yearOptions(): number[];
|
|
190
|
+
get yearGridClasses(): {
|
|
191
|
+
yearGrid: string;
|
|
192
|
+
yearCell: string;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Uncontrolled mode's own state. `undefined` means "not navigated yet",
|
|
196
|
+
* which is what lets the seed getters below resolve without a tracked
|
|
197
|
+
* write during render.
|
|
198
|
+
*/
|
|
199
|
+
private _month;
|
|
200
|
+
private get isMonthControlled();
|
|
201
|
+
get visibleMonth(): Date;
|
|
202
|
+
/**
|
|
203
|
+
* A calendar seeded with a selection should open showing that selection,
|
|
204
|
+
* not today.
|
|
205
|
+
*/
|
|
206
|
+
private get seedMonth();
|
|
207
|
+
goToMonth: (month: Date) => void;
|
|
208
|
+
/**
|
|
209
|
+
* Uncontrolled mode's own selection. `undefined` means "not selected yet",
|
|
210
|
+
* mirroring `_month` above so the seed getter can resolve without a
|
|
211
|
+
* tracked write during render.
|
|
212
|
+
*/
|
|
213
|
+
private _value;
|
|
214
|
+
private get isValueControlled();
|
|
215
|
+
get selection(): CalendarValue<M> | null;
|
|
216
|
+
private commit;
|
|
217
|
+
/** The first endpoint of a range being built. `undefined` means idle. */
|
|
218
|
+
private _anchor;
|
|
219
|
+
/** The day currently hovered or focused while anchored. */
|
|
220
|
+
private _hovered;
|
|
221
|
+
private get isRange();
|
|
222
|
+
/** How far the pending range may reach before it hits an unavailable day. */
|
|
223
|
+
private get pendingLimits();
|
|
224
|
+
/** The range to paint: the pending preview if anchored, else the committed one. */
|
|
225
|
+
private get displayRange();
|
|
226
|
+
hoverDay: (date: Date | null) => void;
|
|
227
|
+
cancelPending: () => void;
|
|
228
|
+
selectDay: (date: Date) => void;
|
|
229
|
+
private isDaySelected;
|
|
230
|
+
isDayUnavailable: (date: Date) => boolean;
|
|
231
|
+
isDayOutsideRange: (date: Date) => boolean;
|
|
232
|
+
isDayDisabled: (date: Date) => boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Focus management is hand-rolled rather than delegated to the repo's
|
|
235
|
+
* `rovingFocus` utility (`packages/frontile/src/utils/roving-focus.ts`),
|
|
236
|
+
* and the reason is structural: arrow keys must cross month boundaries --
|
|
237
|
+
* Right on Sept 30 lands on Oct 1 -- and at the moment the key fires that
|
|
238
|
+
* element does not exist in the DOM yet. `rovingFocus` navigates among
|
|
239
|
+
* already-rendered siblings sorted by document position and cannot move
|
|
240
|
+
* focus into an element a re-render has yet to create.
|
|
241
|
+
*/
|
|
242
|
+
private _focusedDate;
|
|
243
|
+
get focusedDate(): Date;
|
|
244
|
+
private get defaultFocusedDate();
|
|
245
|
+
private moveFocus;
|
|
246
|
+
/** Is `date` inside any of the currently visible months' window? */
|
|
247
|
+
private isWithinWindow;
|
|
248
|
+
/**
|
|
249
|
+
* The date to navigate *from*. Read off the actual DOM-focused day button
|
|
250
|
+
* (via the event target) rather than trusting `this.focusedDate` alone --
|
|
251
|
+
* that tracked value only advances when `moveFocus` runs, so it can lag
|
|
252
|
+
* behind wherever the browser's real focus happens to be (a direct
|
|
253
|
+
* `.focus()` call, or focus arriving by Tab into a cell this render
|
|
254
|
+
* hasn't marked as the roving tabstop yet). The DOM is the source of
|
|
255
|
+
* truth for "where is focus right now"; the tracked value exists only to
|
|
256
|
+
* tell `applyFocus` which element to re-focus after a rerender.
|
|
257
|
+
*
|
|
258
|
+
* Returns `null` when the event did not originate from a day cell --
|
|
259
|
+
* `handleKeydown` is bound on the calendar's root element, so it also
|
|
260
|
+
* receives keydowns bubbling up from the header's nav buttons (and, later,
|
|
261
|
+
* a month `<select>`). Those controls have their own keyboard behavior
|
|
262
|
+
* (arrow keys operate a native `<select>`, for instance) and must not be
|
|
263
|
+
* hijacked by the day-grid's roving-focus handling.
|
|
264
|
+
*/
|
|
265
|
+
private focusOrigin;
|
|
266
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
267
|
+
applyFocus: import("ember-modifier").FunctionBasedModifier<{
|
|
268
|
+
Args: {
|
|
269
|
+
Positional: [Date, boolean];
|
|
270
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
271
|
+
};
|
|
272
|
+
Element: HTMLElement;
|
|
273
|
+
}>;
|
|
274
|
+
/** How many months to render, starting at `visibleMonth`. */
|
|
275
|
+
get visibleMonths(): number;
|
|
276
|
+
/** How far prev/next paging moves the window. */
|
|
277
|
+
private get pageSize();
|
|
278
|
+
goToPrevious: () => void;
|
|
279
|
+
goToNext: () => void;
|
|
280
|
+
/**
|
|
281
|
+
* Whether a window whose first month is `firstMonth` has any day inside
|
|
282
|
+
* `@minValue`/`@maxValue`.
|
|
283
|
+
*
|
|
284
|
+
* The single source of truth for month-level bounds. Every entry point that
|
|
285
|
+
* can move the window -- the prev/next buttons, `goToMonth` (and so the
|
|
286
|
+
* `setMonth`/`setYear` and `<:header>` paths through it), and the month
|
|
287
|
+
* picker's option list -- asks this, so an affordance can never offer a
|
|
288
|
+
* month the enforcement would then refuse.
|
|
289
|
+
*
|
|
290
|
+
* The whole window is tested, not just its first month: with several months
|
|
291
|
+
* visible a bound can fall inside a later month, which is still a legitimate
|
|
292
|
+
* place to land.
|
|
293
|
+
*/
|
|
294
|
+
private canShowWindow;
|
|
295
|
+
get canGoPrevious(): boolean;
|
|
296
|
+
get canGoNext(): boolean;
|
|
297
|
+
get headerContext(): CalendarHeaderContext;
|
|
298
|
+
get months(): CalendarMonthData[];
|
|
299
|
+
captionFor: (month: Date) => string;
|
|
300
|
+
get weekdays(): WeekdayLabel[];
|
|
301
|
+
get caption(): string;
|
|
302
|
+
/**
|
|
303
|
+
* Memoized per `@locale` rather than constructed fresh in `stateFor` --
|
|
304
|
+
* `Intl.DateTimeFormat` construction is not free, and `stateFor` runs
|
|
305
|
+
* once per rendered day.
|
|
306
|
+
*/
|
|
307
|
+
/** Reused across all twelve options rather than rebuilt per render. */
|
|
308
|
+
private get monthNameFormatter();
|
|
309
|
+
private get dayLabelFormatter();
|
|
310
|
+
/**
|
|
311
|
+
* One `Date` per render rather than one per cell. `stateFor` runs for every
|
|
312
|
+
* rendered day -- 35 to 42 of them, more with several months visible -- and
|
|
313
|
+
* they all need the same "today".
|
|
314
|
+
*/
|
|
315
|
+
private get today();
|
|
316
|
+
get isReadOnly(): boolean;
|
|
317
|
+
get styles(): {
|
|
318
|
+
base: (slotProps?: ({
|
|
319
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
320
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
321
|
+
isDisabled?: boolean | undefined;
|
|
322
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
323
|
+
body: (slotProps?: ({
|
|
324
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
325
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
326
|
+
isDisabled?: boolean | undefined;
|
|
327
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
328
|
+
header: (slotProps?: ({
|
|
329
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
330
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
331
|
+
isDisabled?: boolean | undefined;
|
|
332
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
333
|
+
title: (slotProps?: ({
|
|
334
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
335
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
336
|
+
isDisabled?: boolean | undefined;
|
|
337
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
338
|
+
nav: (slotProps?: ({
|
|
339
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
340
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
341
|
+
isDisabled?: boolean | undefined;
|
|
342
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
343
|
+
monthSelectWrapper: (slotProps?: ({
|
|
344
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
345
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
346
|
+
isDisabled?: boolean | undefined;
|
|
347
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
348
|
+
monthSelectValue: (slotProps?: ({
|
|
349
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
350
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
351
|
+
isDisabled?: boolean | undefined;
|
|
352
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
353
|
+
monthSelect: (slotProps?: ({
|
|
354
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
355
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
356
|
+
isDisabled?: boolean | undefined;
|
|
357
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
358
|
+
monthSelectIcon: (slotProps?: ({
|
|
359
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
360
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
361
|
+
isDisabled?: boolean | undefined;
|
|
362
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
363
|
+
yearTrigger: (slotProps?: ({
|
|
364
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
365
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
366
|
+
isDisabled?: boolean | undefined;
|
|
367
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
368
|
+
navButton: (slotProps?: ({
|
|
369
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
370
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
371
|
+
isDisabled?: boolean | undefined;
|
|
372
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
373
|
+
monthsWrapper: (slotProps?: ({
|
|
374
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
375
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
376
|
+
isDisabled?: boolean | undefined;
|
|
377
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
378
|
+
monthGrid: (slotProps?: ({
|
|
379
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
380
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
381
|
+
isDisabled?: boolean | undefined;
|
|
382
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
383
|
+
weekdaysRow: (slotProps?: ({
|
|
384
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
385
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
386
|
+
isDisabled?: boolean | undefined;
|
|
387
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
388
|
+
weekday: (slotProps?: ({
|
|
389
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
390
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
391
|
+
isDisabled?: boolean | undefined;
|
|
392
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
393
|
+
week: (slotProps?: ({
|
|
394
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
395
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
396
|
+
isDisabled?: boolean | undefined;
|
|
397
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
398
|
+
cell: (slotProps?: ({
|
|
399
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
400
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
401
|
+
isDisabled?: boolean | undefined;
|
|
402
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
403
|
+
cellBand: (slotProps?: ({
|
|
404
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
405
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
406
|
+
isDisabled?: boolean | undefined;
|
|
407
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
408
|
+
day: (slotProps?: ({
|
|
409
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
410
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
411
|
+
isDisabled?: boolean | undefined;
|
|
412
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
413
|
+
dayContent: (slotProps?: ({
|
|
414
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
415
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
416
|
+
isDisabled?: boolean | undefined;
|
|
417
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
418
|
+
footer: (slotProps?: ({
|
|
419
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
420
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
421
|
+
isDisabled?: boolean | undefined;
|
|
422
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
423
|
+
indicator: (slotProps?: ({
|
|
424
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
425
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
426
|
+
isDisabled?: boolean | undefined;
|
|
427
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
428
|
+
yearGrid: (slotProps?: ({
|
|
429
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
430
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
431
|
+
isDisabled?: boolean | undefined;
|
|
432
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
433
|
+
yearCell: (slotProps?: ({
|
|
434
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
435
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
436
|
+
isDisabled?: boolean | undefined;
|
|
437
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
438
|
+
} & {
|
|
439
|
+
base: (slotProps?: ({
|
|
440
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
441
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
442
|
+
isDisabled?: boolean | undefined;
|
|
443
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
444
|
+
body: (slotProps?: ({
|
|
445
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
446
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
447
|
+
isDisabled?: boolean | undefined;
|
|
448
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
449
|
+
header: (slotProps?: ({
|
|
450
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
451
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
452
|
+
isDisabled?: boolean | undefined;
|
|
453
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
454
|
+
title: (slotProps?: ({
|
|
455
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
456
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
457
|
+
isDisabled?: boolean | undefined;
|
|
458
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
459
|
+
nav: (slotProps?: ({
|
|
460
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
461
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
462
|
+
isDisabled?: boolean | undefined;
|
|
463
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
464
|
+
monthSelectWrapper: (slotProps?: ({
|
|
465
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
466
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
467
|
+
isDisabled?: boolean | undefined;
|
|
468
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
469
|
+
monthSelectValue: (slotProps?: ({
|
|
470
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
471
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
472
|
+
isDisabled?: boolean | undefined;
|
|
473
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
474
|
+
monthSelect: (slotProps?: ({
|
|
475
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
476
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
477
|
+
isDisabled?: boolean | undefined;
|
|
478
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
479
|
+
monthSelectIcon: (slotProps?: ({
|
|
480
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
481
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
482
|
+
isDisabled?: boolean | undefined;
|
|
483
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
484
|
+
yearTrigger: (slotProps?: ({
|
|
485
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
486
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
487
|
+
isDisabled?: boolean | undefined;
|
|
488
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
489
|
+
navButton: (slotProps?: ({
|
|
490
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
491
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
492
|
+
isDisabled?: boolean | undefined;
|
|
493
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
494
|
+
monthsWrapper: (slotProps?: ({
|
|
495
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
496
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
497
|
+
isDisabled?: boolean | undefined;
|
|
498
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
499
|
+
monthGrid: (slotProps?: ({
|
|
500
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
501
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
502
|
+
isDisabled?: boolean | undefined;
|
|
503
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
504
|
+
weekdaysRow: (slotProps?: ({
|
|
505
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
506
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
507
|
+
isDisabled?: boolean | undefined;
|
|
508
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
509
|
+
weekday: (slotProps?: ({
|
|
510
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
511
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
512
|
+
isDisabled?: boolean | undefined;
|
|
513
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
514
|
+
week: (slotProps?: ({
|
|
515
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
516
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
517
|
+
isDisabled?: boolean | undefined;
|
|
518
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
519
|
+
cell: (slotProps?: ({
|
|
520
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
521
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
522
|
+
isDisabled?: boolean | undefined;
|
|
523
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
524
|
+
cellBand: (slotProps?: ({
|
|
525
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
526
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
527
|
+
isDisabled?: boolean | undefined;
|
|
528
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
529
|
+
day: (slotProps?: ({
|
|
530
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
531
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
532
|
+
isDisabled?: boolean | undefined;
|
|
533
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
534
|
+
dayContent: (slotProps?: ({
|
|
535
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
536
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
537
|
+
isDisabled?: boolean | undefined;
|
|
538
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
539
|
+
footer: (slotProps?: ({
|
|
540
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
541
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
542
|
+
isDisabled?: boolean | undefined;
|
|
543
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
544
|
+
indicator: (slotProps?: ({
|
|
545
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
546
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
547
|
+
isDisabled?: boolean | undefined;
|
|
548
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
549
|
+
yearGrid: (slotProps?: ({
|
|
550
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
551
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
552
|
+
isDisabled?: boolean | undefined;
|
|
553
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
554
|
+
yearCell: (slotProps?: ({
|
|
555
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
556
|
+
intent?: "default" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | undefined;
|
|
557
|
+
isDisabled?: boolean | undefined;
|
|
558
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
559
|
+
} & {};
|
|
560
|
+
get headerClasses(): {
|
|
561
|
+
header: string;
|
|
562
|
+
title: string;
|
|
563
|
+
nav: string;
|
|
564
|
+
navButton: string;
|
|
565
|
+
monthSelectWrapper: string;
|
|
566
|
+
monthSelect: string;
|
|
567
|
+
monthSelectValue: string;
|
|
568
|
+
monthSelectIcon: string;
|
|
569
|
+
yearTrigger: string;
|
|
570
|
+
};
|
|
571
|
+
get gridClasses(): {
|
|
572
|
+
monthGrid: string;
|
|
573
|
+
weekdaysRow: string;
|
|
574
|
+
weekday: string;
|
|
575
|
+
week: string;
|
|
576
|
+
cell: string;
|
|
577
|
+
cellBand: string;
|
|
578
|
+
day: string;
|
|
579
|
+
dayContent: string;
|
|
580
|
+
indicator: string;
|
|
581
|
+
};
|
|
582
|
+
stateFor: (day: CalendarDay) => DayState;
|
|
583
|
+
}
|
|
584
|
+
export default Calendar;
|
|
585
|
+
export { Calendar };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TOC } from '@ember/component/template-only';
|
|
2
|
+
import type { CalendarDay, DayCellClasses, DayState } from './types';
|
|
3
|
+
export interface DayCellSignature {
|
|
4
|
+
Args: {
|
|
5
|
+
day: CalendarDay;
|
|
6
|
+
state: DayState;
|
|
7
|
+
hasCustomContent: boolean;
|
|
8
|
+
onSelect: (date: Date) => void;
|
|
9
|
+
onHover: (date: Date | null) => void;
|
|
10
|
+
classes: DayCellClasses;
|
|
11
|
+
};
|
|
12
|
+
Blocks: {
|
|
13
|
+
default: [DayState];
|
|
14
|
+
};
|
|
15
|
+
Element: HTMLTableCellElement;
|
|
16
|
+
}
|
|
17
|
+
declare const DayCell: TOC<DayCellSignature>;
|
|
18
|
+
export default DayCell;
|
|
19
|
+
export { DayCell };
|