cally 0.7.2 → 0.9.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/README.md +2 -2
- package/dist/cally.d.ts +154 -98
- package/dist/cally.js +705 -564
- package/package.json +23 -14
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Small, feature-rich calendar components
|
|
4
4
|
|
|
5
|
-
- **Small bundle size** - less than
|
|
6
|
-
- **Full feature set** - single dates, ranges, display multiple months
|
|
5
|
+
- **Small bundle size** - less than 9KB min/gzip
|
|
6
|
+
- **Full feature set** - single dates, multiple dates, ranges, display multiple months
|
|
7
7
|
- **HTML-friendly** - easy to author, framework-independent
|
|
8
8
|
- **Minimal dependencies** - just one
|
|
9
9
|
- **Accessible** - keyboard and screen reader
|
package/dist/cally.d.ts
CHANGED
|
@@ -31,128 +31,184 @@ DOMThis<Base> & {
|
|
|
31
31
|
readonly symbolId: unique symbol;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export declare const CalendarDate: Atomico<{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
export declare const CalendarDate: Atomico< {
|
|
35
|
+
months: number;
|
|
36
|
+
value: string;
|
|
37
|
+
focus: (options?: CalendarFocusOptions) => void;
|
|
38
|
+
firstDayOfWeek: DaysOfWeek;
|
|
39
|
+
isDateDisallowed: (date: Date) => boolean;
|
|
40
|
+
min: string;
|
|
41
|
+
max: string;
|
|
42
|
+
today: string;
|
|
43
|
+
locale: string | undefined;
|
|
44
|
+
focusedDate: string | undefined;
|
|
45
|
+
formatWeekday: "short" | "narrow";
|
|
46
|
+
onFocusDay: (event: CustomEvent<Date>) => any;
|
|
47
|
+
getDayParts: (date: Date) => string;
|
|
48
|
+
showOutsideDays: boolean;
|
|
49
|
+
showWeekNumbers: boolean;
|
|
50
|
+
pageBy: Pagination;
|
|
51
|
+
onChange: (event: Event) => any;
|
|
47
52
|
} & {}, {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
months: number;
|
|
54
|
+
value: string;
|
|
55
|
+
focus: (options?: CalendarFocusOptions) => void;
|
|
56
|
+
firstDayOfWeek: DaysOfWeek;
|
|
57
|
+
isDateDisallowed: (date: Date) => boolean;
|
|
58
|
+
min: string;
|
|
59
|
+
max: string;
|
|
60
|
+
today: string;
|
|
61
|
+
locale: string | undefined;
|
|
62
|
+
focusedDate: string | undefined;
|
|
63
|
+
formatWeekday: "short" | "narrow";
|
|
64
|
+
onFocusDay: (event: CustomEvent<Date>) => any;
|
|
65
|
+
getDayParts: (date: Date) => string;
|
|
66
|
+
showOutsideDays: boolean;
|
|
67
|
+
showWeekNumbers: boolean;
|
|
68
|
+
pageBy: Pagination;
|
|
69
|
+
onChange: (event: Event) => any;
|
|
60
70
|
} & {}, {
|
|
61
|
-
|
|
62
|
-
|
|
71
|
+
new (): HTMLElement;
|
|
72
|
+
prototype: HTMLElement;
|
|
63
73
|
}>;
|
|
64
74
|
|
|
65
75
|
export declare type CalendarDateProps = ComponentProps<typeof CalendarDate>;
|
|
66
76
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
declare interface CalendarFocusOptions extends FocusOptions {
|
|
78
|
+
target?: "day" | "next" | "previous";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export declare const CalendarMonth: Atomico< {
|
|
82
|
+
offset: number;
|
|
83
|
+
onSelectDay: (event: CustomEvent<string>) => any;
|
|
84
|
+
onFocusDay: (event: CustomEvent<string>) => any;
|
|
85
|
+
onHoverDay: (event: CustomEvent<string>) => any;
|
|
72
86
|
} & {}, {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
87
|
+
offset: number;
|
|
88
|
+
onSelectDay: (event: CustomEvent<string>) => any;
|
|
89
|
+
onFocusDay: (event: CustomEvent<string>) => any;
|
|
90
|
+
onHoverDay: (event: CustomEvent<string>) => any;
|
|
77
91
|
} & {}, {
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
new (): HTMLElement;
|
|
93
|
+
prototype: HTMLElement;
|
|
80
94
|
}>;
|
|
81
95
|
|
|
82
96
|
export declare type CalendarMonthProps = ComponentProps<typeof CalendarMonth>;
|
|
83
97
|
|
|
84
|
-
export declare const CalendarMulti: Atomico<{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
export declare const CalendarMulti: Atomico< {
|
|
99
|
+
months: number;
|
|
100
|
+
value: string;
|
|
101
|
+
focus: (options?: CalendarFocusOptions) => void;
|
|
102
|
+
firstDayOfWeek: DaysOfWeek;
|
|
103
|
+
isDateDisallowed: (date: Date) => boolean;
|
|
104
|
+
min: string;
|
|
105
|
+
max: string;
|
|
106
|
+
today: string;
|
|
107
|
+
locale: string | undefined;
|
|
108
|
+
focusedDate: string | undefined;
|
|
109
|
+
formatWeekday: "short" | "narrow";
|
|
110
|
+
onFocusDay: (event: CustomEvent<Date>) => any;
|
|
111
|
+
getDayParts: (date: Date) => string;
|
|
112
|
+
showOutsideDays: boolean;
|
|
113
|
+
showWeekNumbers: boolean;
|
|
114
|
+
pageBy: Pagination;
|
|
115
|
+
onChange: (event: Event) => any;
|
|
97
116
|
} & {}, {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
months: number;
|
|
118
|
+
value: string;
|
|
119
|
+
focus: (options?: CalendarFocusOptions) => void;
|
|
120
|
+
firstDayOfWeek: DaysOfWeek;
|
|
121
|
+
isDateDisallowed: (date: Date) => boolean;
|
|
122
|
+
min: string;
|
|
123
|
+
max: string;
|
|
124
|
+
today: string;
|
|
125
|
+
locale: string | undefined;
|
|
126
|
+
focusedDate: string | undefined;
|
|
127
|
+
formatWeekday: "short" | "narrow";
|
|
128
|
+
onFocusDay: (event: CustomEvent<Date>) => any;
|
|
129
|
+
getDayParts: (date: Date) => string;
|
|
130
|
+
showOutsideDays: boolean;
|
|
131
|
+
showWeekNumbers: boolean;
|
|
132
|
+
pageBy: Pagination;
|
|
133
|
+
onChange: (event: Event) => any;
|
|
110
134
|
} & {}, {
|
|
111
|
-
|
|
112
|
-
|
|
135
|
+
new (): HTMLElement;
|
|
136
|
+
prototype: HTMLElement;
|
|
113
137
|
}>;
|
|
114
138
|
|
|
115
139
|
export declare type CalendarMultiProps = ComponentProps<typeof CalendarMulti>;
|
|
116
140
|
|
|
117
|
-
export declare const CalendarRange: Atomico<{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
export declare const CalendarRange: Atomico< {
|
|
142
|
+
months: number;
|
|
143
|
+
value: string;
|
|
144
|
+
focus: (options?: CalendarFocusOptions) => void;
|
|
145
|
+
firstDayOfWeek: DaysOfWeek;
|
|
146
|
+
isDateDisallowed: (date: Date) => boolean;
|
|
147
|
+
min: string;
|
|
148
|
+
max: string;
|
|
149
|
+
today: string;
|
|
150
|
+
locale: string | undefined;
|
|
151
|
+
focusedDate: string | undefined;
|
|
152
|
+
formatWeekday: "short" | "narrow";
|
|
153
|
+
onFocusDay: (event: CustomEvent<Date>) => any;
|
|
154
|
+
getDayParts: (date: Date) => string;
|
|
155
|
+
showOutsideDays: boolean;
|
|
156
|
+
showWeekNumbers: boolean;
|
|
157
|
+
pageBy: Pagination;
|
|
158
|
+
onChange: (event: Event) => any;
|
|
159
|
+
tentative: string;
|
|
160
|
+
onRangeStart: (event: CustomEvent<Date>) => any;
|
|
161
|
+
onRangeEnd: (event: CustomEvent<Date>) => any;
|
|
133
162
|
} & {}, {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
163
|
+
months: number;
|
|
164
|
+
value: string;
|
|
165
|
+
focus: (options?: CalendarFocusOptions) => void;
|
|
166
|
+
firstDayOfWeek: DaysOfWeek;
|
|
167
|
+
isDateDisallowed: (date: Date) => boolean;
|
|
168
|
+
min: string;
|
|
169
|
+
max: string;
|
|
170
|
+
today: string;
|
|
171
|
+
locale: string | undefined;
|
|
172
|
+
focusedDate: string | undefined;
|
|
173
|
+
formatWeekday: "short" | "narrow";
|
|
174
|
+
onFocusDay: (event: CustomEvent<Date>) => any;
|
|
175
|
+
getDayParts: (date: Date) => string;
|
|
176
|
+
showOutsideDays: boolean;
|
|
177
|
+
showWeekNumbers: boolean;
|
|
178
|
+
pageBy: Pagination;
|
|
179
|
+
onChange: (event: Event) => any;
|
|
180
|
+
tentative: string;
|
|
181
|
+
onRangeStart: (event: CustomEvent<Date>) => any;
|
|
182
|
+
onRangeEnd: (event: CustomEvent<Date>) => any;
|
|
149
183
|
} & {}, {
|
|
150
|
-
|
|
151
|
-
|
|
184
|
+
new (): HTMLElement;
|
|
185
|
+
prototype: HTMLElement;
|
|
152
186
|
}>;
|
|
153
187
|
|
|
154
188
|
export declare type CalendarRangeProps = ComponentProps<typeof CalendarRange>;
|
|
155
189
|
|
|
190
|
+
export declare const CalendarSelectMonth: Atomico< {
|
|
191
|
+
formatMonth: "long" | "short";
|
|
192
|
+
} & {}, {
|
|
193
|
+
formatMonth: "long" | "short";
|
|
194
|
+
} & {}, {
|
|
195
|
+
new (): HTMLElement;
|
|
196
|
+
prototype: HTMLElement;
|
|
197
|
+
}>;
|
|
198
|
+
|
|
199
|
+
export declare type CalendarSelectMonthProps = ComponentProps<typeof CalendarSelectMonth>;
|
|
200
|
+
|
|
201
|
+
export declare const CalendarSelectYear: Atomico< {
|
|
202
|
+
maxYears: number;
|
|
203
|
+
} & {}, {
|
|
204
|
+
maxYears: number;
|
|
205
|
+
} & {}, {
|
|
206
|
+
new (): HTMLElement;
|
|
207
|
+
prototype: HTMLElement;
|
|
208
|
+
}>;
|
|
209
|
+
|
|
210
|
+
export declare type CalendarSelectYearProps = ComponentProps<typeof CalendarSelectYear>;
|
|
211
|
+
|
|
156
212
|
declare type CheckEvent<CurrentEvent, True> = CurrentEvent extends Event ? True : never;
|
|
157
213
|
|
|
158
214
|
declare type ComponentProps<T extends abstract new (...args: any) => any> = Simplify<Partial<Omit<InstanceType<T>, keyof HTMLElement | keyof AtomicoThis>>>;
|