@slotted/angular 0.1.0-beta.3 → 0.1.0-beta.5
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/docs/AGENTS.snippet.md +2 -0
- package/docs/app-shell.examples.md +1 -1
- package/docs/app-shell.json +4 -4
- package/docs/app-shell.md +2 -2
- package/docs/calendar.json +7 -0
- package/docs/calendar.md +1 -0
- package/docs/date-field.json +8 -1
- package/docs/date-field.md +2 -1
- package/docs/date-picker.examples.md +36 -0
- package/docs/date-picker.json +20 -5
- package/docs/date-picker.md +5 -4
- package/docs/guidelines/README.md +2 -2
- package/docs/guidelines/composition.md +10 -0
- package/docs/guidelines/index.md +3 -1
- package/docs/guidelines/list-pages.md +12 -1
- package/docs/guidelines/own-elements.md +1 -1
- package/docs/page-header.json +1 -0
- package/docs/page-header.md +1 -1
- package/docs/page.json +1 -0
- package/docs/page.md +1 -0
- package/docs/skills/build-own-element/SKILL.md +6 -6
- package/docs/skills/compose-screen/SKILL.md +13 -6
- package/docs/skills/review-screen/SKILL.md +6 -6
- package/docs/skills/theme-app/SKILL.md +1 -1
- package/docs/skills/waiting-states/SKILL.md +2 -2
- package/docs/table.json +13 -0
- package/docs/table.md +3 -1
- package/docs/tabs.json +13 -3
- package/docs/tabs.md +3 -2
- package/docs/text-field.json +1 -1
- package/docs/text-field.md +1 -1
- package/fesm2022/slotted-angular-app-shell.mjs +15 -9
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +158 -33
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +7 -1
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +13 -3
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +25 -4
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-grid.mjs +2 -2
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-field.mjs +35 -12
- package/fesm2022/slotted-angular-date-field.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +95 -33
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +5 -7
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +5 -7
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +5 -7
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +7 -1
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-filter-bar.mjs +1 -1
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-multi-select.mjs +24 -3
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-page-header.mjs +2 -2
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +20 -1
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +7 -1
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-scroll-area.mjs +6 -2
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +49 -17
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +2 -2
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +24 -6
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tabs.mjs +13 -6
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-picker.mjs +4 -6
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +7 -1
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-app-shell.d.ts +5 -3
- package/types/slotted-angular-app-shell.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +28 -2
- package/types/slotted-angular-calendar.d.ts.map +1 -1
- package/types/slotted-angular-cascader.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +1 -0
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-combobox.d.ts +4 -0
- package/types/slotted-angular-combobox.d.ts.map +1 -1
- package/types/slotted-angular-date-field.d.ts +11 -1
- package/types/slotted-angular-date-field.d.ts.map +1 -1
- package/types/slotted-angular-date-picker.d.ts +38 -12
- package/types/slotted-angular-date-picker.d.ts.map +1 -1
- package/types/slotted-angular-date-range-picker.d.ts +0 -1
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-range-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-multi-select.d.ts +4 -0
- package/types/slotted-angular-multi-select.d.ts.map +1 -1
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-popover.d.ts.map +1 -1
- package/types/slotted-angular-scroll-area.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +12 -2
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +17 -2
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-tabs.d.ts +3 -4
- package/types/slotted-angular-tabs.d.ts.map +1 -1
- package/types/slotted-angular-time-picker.d.ts +0 -1
- package/types/slotted-angular-time-picker.d.ts.map +1 -1
- package/types/slotted-angular-time-range-picker.d.ts +0 -1
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-tooltip.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isDateInRange, createDateFormat } from '@slotted/core/date';
|
|
1
|
+
import { isPlainYearMonth, firstDayOf, lastDayOf, isPlainDate, yearMonthOf, isDateInRange, createDateFormat } from '@slotted/core/date';
|
|
2
2
|
import { createDismissableLayer } from '@slotted/core/dismissable-layer';
|
|
3
3
|
import { tabbables } from '@slotted/core/focus';
|
|
4
4
|
import { createPositioner } from '@slotted/core/positioner';
|
|
@@ -66,10 +66,23 @@ let sequence = 0;
|
|
|
66
66
|
* is showing.
|
|
67
67
|
*/
|
|
68
68
|
class SlDatePicker {
|
|
69
|
+
/**
|
|
70
|
+
* The date, the run or the set; under `granularity="month"`, a
|
|
71
|
+
* `PlainYearMonth`. Present means the consumer owns it. Its type is the
|
|
72
|
+
* type `valueChange` reports.
|
|
73
|
+
*/
|
|
69
74
|
value = input(undefined, /* @ts-ignore */
|
|
70
75
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
71
76
|
defaultValue = input(undefined, /* @ts-ignore */
|
|
72
77
|
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
78
|
+
/**
|
|
79
|
+
* What a choice is. `month` opens the calendar on the months of a year and
|
|
80
|
+
* chooses a month cell; the field shows the month and the year; `value`,
|
|
81
|
+
* `defaultValue`, `min` and `max` are `PlainYearMonth`, `valueChange`
|
|
82
|
+
* reports one, and `name` submits `YYYY-MM`.
|
|
83
|
+
*/
|
|
84
|
+
granularity = input(undefined, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "granularity" }] : /* istanbul ignore next */ []));
|
|
73
86
|
/** Present means the consumer owns whether the surface is showing. */
|
|
74
87
|
open = input(undefined, { ...(ngDevMode ? { debugName: "open" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
75
88
|
defaultOpen = input(false, { ...(ngDevMode ? { debugName: "defaultOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -143,8 +156,6 @@ class SlDatePicker {
|
|
|
143
156
|
...(ngDevMode ? [{ debugName: "ownValue" }] : /* istanbul ignore next */ []));
|
|
144
157
|
view = signal('day', /* @ts-ignore */
|
|
145
158
|
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
146
|
-
positioned = signal(false, /* @ts-ignore */
|
|
147
|
-
...(ngDevMode ? [{ debugName: "positioned" }] : /* istanbul ignore next */ []));
|
|
148
159
|
sheet = signal(false, /* @ts-ignore */
|
|
149
160
|
...(ngDevMode ? [{ debugName: "sheet" }] : /* istanbul ignore next */ []));
|
|
150
161
|
formDisabled = signal(undefined, /* @ts-ignore */
|
|
@@ -165,8 +176,41 @@ class SlDatePicker {
|
|
|
165
176
|
dismissable = null;
|
|
166
177
|
isOpen = computed(() => this.open() ?? this.ownOpen(), /* @ts-ignore */
|
|
167
178
|
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
168
|
-
|
|
179
|
+
/**
|
|
180
|
+
* A month is its own value. Under `granularity="month"` the picker holds a
|
|
181
|
+
* `PlainYearMonth`; the field and the calendar below it hold the first day of
|
|
182
|
+
* that month, and the bounds become the first day of `min` and the last day
|
|
183
|
+
* of `max`, so a month the bounds touch is a month the reader may choose.
|
|
184
|
+
*/
|
|
185
|
+
monthly = computed(() => this.granularity() === 'month', /* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [{ debugName: "monthly" }] : /* istanbul ignore next */ []));
|
|
187
|
+
held = computed(() => {
|
|
188
|
+
const value = this.value();
|
|
189
|
+
return value === undefined ? this.ownValue() : this.toDay(value);
|
|
190
|
+
}, /* @ts-ignore */
|
|
169
191
|
...(ngDevMode ? [{ debugName: "held" }] : /* istanbul ignore next */ []));
|
|
192
|
+
minDay = computed(() => {
|
|
193
|
+
const min = this.min();
|
|
194
|
+
return isPlainYearMonth(min) ? firstDayOf(min) : min;
|
|
195
|
+
}, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "minDay" }] : /* istanbul ignore next */ []));
|
|
197
|
+
maxDay = computed(() => {
|
|
198
|
+
const max = this.max();
|
|
199
|
+
return isPlainYearMonth(max) ? lastDayOf(max) : max;
|
|
200
|
+
}, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "maxDay" }] : /* istanbul ignore next */ []));
|
|
202
|
+
/** A month as the day the field and the calendar hold for it. */
|
|
203
|
+
toDay(value) {
|
|
204
|
+
if (value === undefined || value === null)
|
|
205
|
+
return null;
|
|
206
|
+
return isPlainYearMonth(value) ? firstDayOf(value) : value;
|
|
207
|
+
}
|
|
208
|
+
/** What leaves the picker: the month under `month`, the value otherwise. */
|
|
209
|
+
outward(value) {
|
|
210
|
+
if (!this.monthly())
|
|
211
|
+
return value;
|
|
212
|
+
return (isPlainDate(value) ? yearMonthOf(value) : null);
|
|
213
|
+
}
|
|
170
214
|
resolvedLocale = computed(() => this.locale() ?? this.appLocale(), /* @ts-ignore */
|
|
171
215
|
...(ngDevMode ? [{ debugName: "resolvedLocale" }] : /* istanbul ignore next */ []));
|
|
172
216
|
resolvedTimeZone = computed(() => this.timeZone() ?? this.defaults.timeZone, /* @ts-ignore */
|
|
@@ -191,7 +235,8 @@ class SlDatePicker {
|
|
|
191
235
|
* field around it says, because this control is the only thing that knows.
|
|
192
236
|
*/
|
|
193
237
|
resolvedInvalid = computed(() => {
|
|
194
|
-
const refused = asDates(this.held()).some((date) => !isDateInRange(date, this.
|
|
238
|
+
const refused = asDates(this.held()).some((date) => !isDateInRange(date, this.minDay(), this.maxDay()) ||
|
|
239
|
+
this.isDateUnavailable()?.(date) === true);
|
|
195
240
|
if (refused)
|
|
196
241
|
return true;
|
|
197
242
|
return this.invalid() ?? this.enclosing?.invalid();
|
|
@@ -220,7 +265,8 @@ class SlDatePicker {
|
|
|
220
265
|
if (chosen.length === 0)
|
|
221
266
|
return this.t('choose');
|
|
222
267
|
const format = createDateFormat({ locale: this.resolvedLocale() });
|
|
223
|
-
|
|
268
|
+
const words = (date) => this.monthly() ? format.monthYear(date) : format.describe(date);
|
|
269
|
+
return this.t('change', { date: chosen.map(words).join(' – ') });
|
|
224
270
|
}, /* @ts-ignore */
|
|
225
271
|
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
226
272
|
closesOnSelect = computed(() => {
|
|
@@ -251,7 +297,7 @@ class SlDatePicker {
|
|
|
251
297
|
}
|
|
252
298
|
/* ── Forms ─────────────────────────────────────────────────────────── */
|
|
253
299
|
writeValue(value) {
|
|
254
|
-
this.ownValue.set(value
|
|
300
|
+
this.ownValue.set(this.toDay(value));
|
|
255
301
|
}
|
|
256
302
|
registerOnChange(fn) {
|
|
257
303
|
this.onChangeFn = fn;
|
|
@@ -271,9 +317,9 @@ class SlDatePicker {
|
|
|
271
317
|
* them with. `required` is left to Angular's own.
|
|
272
318
|
*/
|
|
273
319
|
validate(control) {
|
|
274
|
-
const dates = asDates(control.value
|
|
275
|
-
const min = this.
|
|
276
|
-
const max = this.
|
|
320
|
+
const dates = asDates(this.toDay(control.value));
|
|
321
|
+
const min = this.minDay();
|
|
322
|
+
const max = this.maxDay();
|
|
277
323
|
const outside = dates.find((date) => !isDateInRange(date, min, max));
|
|
278
324
|
if (outside !== undefined)
|
|
279
325
|
return { slottedDateRange: { min, max, actual: outside } };
|
|
@@ -284,8 +330,8 @@ class SlDatePicker {
|
|
|
284
330
|
}
|
|
285
331
|
ngOnInit() {
|
|
286
332
|
this.ownOpen.set(this.defaultOpen());
|
|
287
|
-
this.ownValue.set(this.defaultValue()
|
|
288
|
-
this.view.set(this.defaultView() ??
|
|
333
|
+
this.ownValue.set(this.toDay(this.defaultValue()));
|
|
334
|
+
this.view.set(this.defaultView() ?? this.lowestView());
|
|
289
335
|
/* A native reset restores the hidden input and tells nothing, so the
|
|
290
336
|
picker would keep the last date chosen in a form that had been reset.
|
|
291
337
|
The value returns to `defaultValue` through `valueChange`, reason
|
|
@@ -295,7 +341,7 @@ class SlDatePicker {
|
|
|
295
341
|
if (form !== null) {
|
|
296
342
|
const onReset = (event) => {
|
|
297
343
|
if (!this.formBound)
|
|
298
|
-
this.commit(this.defaultValue()
|
|
344
|
+
this.commit(this.toDay(this.defaultValue()), 'programmatic', event);
|
|
299
345
|
};
|
|
300
346
|
form.addEventListener('reset', onReset);
|
|
301
347
|
this.destroyRef.onDestroy(() => form.removeEventListener('reset', onReset));
|
|
@@ -370,14 +416,26 @@ class SlDatePicker {
|
|
|
370
416
|
this.setOpen(false, 'select', request.source);
|
|
371
417
|
this.triggerRef?.nativeElement.focus({ preventScroll: true });
|
|
372
418
|
}
|
|
419
|
+
/** The lowest view is where a choice is made: the days, or the months. */
|
|
420
|
+
lowestView() {
|
|
421
|
+
return this.monthly() ? 'month' : 'day';
|
|
422
|
+
}
|
|
373
423
|
commit(next, reason, source) {
|
|
374
424
|
let cancelled = false;
|
|
375
425
|
const state = createControllable({
|
|
376
|
-
controlled: this.value(),
|
|
426
|
+
controlled: this.value() === undefined ? undefined : this.held(),
|
|
377
427
|
initial: this.held(),
|
|
378
428
|
equals: () => false,
|
|
379
429
|
onRequest: (request) => {
|
|
380
|
-
|
|
430
|
+
/* The request keeps its own `cancel` and `cancelled`, and carries the
|
|
431
|
+
months instead of the days under `month`. */
|
|
432
|
+
const asked = this.monthly()
|
|
433
|
+
? Object.create(request, {
|
|
434
|
+
previous: { enumerable: true, value: this.outward(request.previous) },
|
|
435
|
+
value: { enumerable: true, value: this.outward(request.value) },
|
|
436
|
+
})
|
|
437
|
+
: request;
|
|
438
|
+
this.valueChange.emit(asked);
|
|
381
439
|
cancelled = request.cancelled;
|
|
382
440
|
},
|
|
383
441
|
});
|
|
@@ -386,7 +444,7 @@ class SlDatePicker {
|
|
|
386
444
|
return;
|
|
387
445
|
if (this.value() === undefined)
|
|
388
446
|
this.ownValue.set(next);
|
|
389
|
-
this.onChangeFn(next);
|
|
447
|
+
this.onChangeFn(this.outward(next));
|
|
390
448
|
}
|
|
391
449
|
setOpen(next, reason, source) {
|
|
392
450
|
const state = createControllable({
|
|
@@ -410,14 +468,16 @@ class SlDatePicker {
|
|
|
410
468
|
const anchor = this.element.querySelector('[data-part="control"]') ?? this.element;
|
|
411
469
|
const [side, align] = this.resolvedPlacement().split('-');
|
|
412
470
|
this.positioner = createPositioner(anchor, layer, { align: align ?? 'center', side });
|
|
413
|
-
|
|
471
|
+
/* The positioner writes `data-positioned` with the side, on the element, in
|
|
472
|
+
the task that opened the layer; a binding to say it again was a frame later. */
|
|
473
|
+
void this.positioner.update();
|
|
414
474
|
}
|
|
415
475
|
/* The dialog takes focus when it opens, on the day that holds the roving
|
|
416
476
|
tab stop: the chosen date, or today. */
|
|
417
477
|
if (this.focusOnOpen) {
|
|
418
478
|
this.focusOnOpen = false;
|
|
419
479
|
layer
|
|
420
|
-
.querySelector('[data-part="day"][tabindex="0"]')
|
|
480
|
+
.querySelector('[data-part="day"][tabindex="0"], [data-part="period"][tabindex="0"]')
|
|
421
481
|
?.focus({ preventScroll: true });
|
|
422
482
|
}
|
|
423
483
|
const trigger = this.triggerRef?.nativeElement;
|
|
@@ -435,7 +495,7 @@ class SlDatePicker {
|
|
|
435
495
|
* surface by the time it ran; the decision is taken here, and the layer
|
|
436
496
|
* is simply not asked to close.
|
|
437
497
|
*/
|
|
438
|
-
if (request.reason === 'escape' && this.view() !==
|
|
498
|
+
if (request.reason === 'escape' && this.view() !== this.lowestView()) {
|
|
439
499
|
this.view.set(this.view() === 'year' ? 'month' : 'day');
|
|
440
500
|
return;
|
|
441
501
|
}
|
|
@@ -451,10 +511,10 @@ class SlDatePicker {
|
|
|
451
511
|
this.positioner = null;
|
|
452
512
|
this.dismissable?.destroy();
|
|
453
513
|
this.dismissable = null;
|
|
454
|
-
this.
|
|
514
|
+
this.layer?.nativeElement.removeAttribute('data-positioned');
|
|
455
515
|
}
|
|
456
516
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
457
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlDatePicker, isStandalone: true, selector: "[slDatePicker]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, isDateUnavailable: { classPropertyName: "isDateUnavailable", publicName: "isDateUnavailable", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, months: { classPropertyName: "months", publicName: "months", isSignal: true, isRequired: false, transformFunction: null }, defaultView: { classPropertyName: "defaultView", publicName: "defaultView", isSignal: true, isRequired: false, transformFunction: null }, weekNumbers: { classPropertyName: "weekNumbers", publicName: "weekNumbers", isSignal: true, isRequired: false, transformFunction: null }, fixedWeeks: { classPropertyName: "fixedWeeks", publicName: "fixedWeeks", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, yearPivot: { classPropertyName: "yearPivot", publicName: "yearPivot", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", openChange: "openChange" }, host: { attributes: { "data-ui": "date-picker", "data-part": "root" }, properties: { "attr.data-size": "resolvedSize()", "attr.data-variant": "resolvedVariant()", "attr.data-calendar": "resolvedCalendar()", "attr.data-open": "isOpen() ? '' : null", "attr.data-disabled": "resolvedDisabled() === true ? '' : null", "attr.data-invalid": "resolvedInvalid() === true ? '' : null", "attr.data-readonly": "resolvedReadOnly() === true ? '' : null", "attr.data-required": "resolvedRequired() === true ? '' : null" } }, providers: [
|
|
517
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlDatePicker, isStandalone: true, selector: "[slDatePicker]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, granularity: { classPropertyName: "granularity", publicName: "granularity", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, isDateUnavailable: { classPropertyName: "isDateUnavailable", publicName: "isDateUnavailable", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, months: { classPropertyName: "months", publicName: "months", isSignal: true, isRequired: false, transformFunction: null }, defaultView: { classPropertyName: "defaultView", publicName: "defaultView", isSignal: true, isRequired: false, transformFunction: null }, weekNumbers: { classPropertyName: "weekNumbers", publicName: "weekNumbers", isSignal: true, isRequired: false, transformFunction: null }, fixedWeeks: { classPropertyName: "fixedWeeks", publicName: "fixedWeeks", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, yearPivot: { classPropertyName: "yearPivot", publicName: "yearPivot", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", openChange: "openChange" }, host: { attributes: { "data-ui": "date-picker", "data-part": "root" }, properties: { "attr.data-size": "resolvedSize()", "attr.data-variant": "resolvedVariant()", "attr.data-calendar": "resolvedCalendar()", "attr.data-open": "isOpen() ? '' : null", "attr.data-disabled": "resolvedDisabled() === true ? '' : null", "attr.data-invalid": "resolvedInvalid() === true ? '' : null", "attr.data-readonly": "resolvedReadOnly() === true ? '' : null", "attr.data-required": "resolvedRequired() === true ? '' : null" } }, providers: [
|
|
458
518
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlDatePicker), multi: true },
|
|
459
519
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => SlDatePicker), multi: true },
|
|
460
520
|
], viewQueries: [{ propertyName: "layer", first: true, predicate: ["layer"], descendants: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "field", first: true, predicate: ["field"], descendants: true }], exportAs: ["slDatePicker"], ngImport: i0, template: `<div data-part="control" (keydown)="onControlKeyDown($event)">
|
|
@@ -468,8 +528,9 @@ class SlDatePicker {
|
|
|
468
528
|
[calendar]="resolvedCalendar()"
|
|
469
529
|
[size]="resolvedSize()"
|
|
470
530
|
[variant]="resolvedVariant()"
|
|
471
|
-
[min]="
|
|
472
|
-
[max]="
|
|
531
|
+
[min]="minDay()"
|
|
532
|
+
[max]="maxDay()"
|
|
533
|
+
[granularity]="granularity()"
|
|
473
534
|
[isDateUnavailable]="isDateUnavailable()"
|
|
474
535
|
[clearable]="clearable()"
|
|
475
536
|
[name]="name()"
|
|
@@ -506,7 +567,6 @@ class SlDatePicker {
|
|
|
506
567
|
data-part="positioner"
|
|
507
568
|
data-open
|
|
508
569
|
[attr.data-presentation]="sheet() ? 'sheet' : 'popover'"
|
|
509
|
-
[attr.data-positioned]="positioned() ? '' : null"
|
|
510
570
|
>
|
|
511
571
|
<div
|
|
512
572
|
data-part="content"
|
|
@@ -521,8 +581,9 @@ class SlDatePicker {
|
|
|
521
581
|
[locale]="resolvedLocale()"
|
|
522
582
|
[timeZone]="resolvedTimeZone()"
|
|
523
583
|
[firstDayOfWeek]="firstDayOfWeek()"
|
|
524
|
-
[min]="
|
|
525
|
-
[max]="
|
|
584
|
+
[min]="minDay()"
|
|
585
|
+
[max]="maxDay()"
|
|
586
|
+
[granularity]="granularity()"
|
|
526
587
|
[isDateUnavailable]="isDateUnavailable()"
|
|
527
588
|
[selectionMode]="selectionMode()"
|
|
528
589
|
[months]="months()"
|
|
@@ -537,7 +598,7 @@ class SlDatePicker {
|
|
|
537
598
|
<ng-content select="[slDatePickerFooter]" />
|
|
538
599
|
</div>
|
|
539
600
|
</div>
|
|
540
|
-
}`, isInline: true, styles: ["@layer slotted.components{[data-ui=date-picker][data-part=root]{display:block;inline-size:100%}[data-ui=date-picker] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-md, 16px);--_height: var(--slotted-control-height-md, 34px);align-items:center;display:flex;inline-size:100%;min-inline-size:0;position:relative}[data-ui=date-picker][data-part=root][data-size=sm] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_height: var(--slotted-control-height-sm, 30px)}[data-ui=date-picker][data-part=root][data-size=lg] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_height: var(--slotted-control-height-lg, 38px)}[data-ui=date-picker] [data-part=trigger]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var( --slotted-date-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );border:0;border-radius:var(--slotted-date-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-date-picker-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var( --slotted-date-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );justify-content:center;padding:0;position:relative;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=date-picker] [data-part=trigger]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}@media(pointer:coarse){[data-ui=date-picker] [data-part=trigger]:after{inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2))}[data-ui=date-picker] [data-part=end]:has(+[data-part=clear]:not([hidden]))>[data-part=trigger]:after{inset-inline-end:0}}[data-ui=date-picker] [data-part=trigger]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-date-picker-trigger-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=date-picker] [data-part=trigger]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-date-picker-trigger-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=date-picker] [data-part=trigger]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=date-picker][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-date-picker-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=date-picker] [data-part=trigger]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=date-picker][data-part=positioner]{position:absolute;inset-block-start:0;box-sizing:border-box;isolation:isolate;pointer-events:none;z-index:calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));--_enter-distance: var(--slotted-space-2, .25rem);opacity:0;translate:0 calc(-1 * var(--_enter-distance));transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit),translate var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=date-picker][data-part=positioner][data-side=top]{translate:0 var(--_enter-distance)}[data-ui=date-picker][data-part=positioner]:is([data-side=left],[data-side=right]){translate:0 0}[data-ui=date-picker][data-part=positioner][data-open]{opacity:1;translate:0 0;transition:none}[data-ui=date-picker][data-part=positioner][data-open][data-positioned]{animation:slotted-date-picker-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter)}[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=top]{animation-name:slotted-date-picker-enter-up}[data-ui=date-picker][data-part=positioner][data-open][data-positioned]:is([data-side=left],[data-side=right]){animation-name:slotted-date-picker-fade}@keyframes slotted-date-picker-enter-down{0%{opacity:0;translate:0 calc(-1 * var(--_enter-distance))}}@keyframes slotted-date-picker-enter-up{0%{opacity:0;translate:0 var(--_enter-distance)}}@keyframes slotted-date-picker-fade{0%{opacity:0}}@media(prefers-reduced-motion:reduce){[data-ui=date-picker][data-part=positioner],[data-ui=date-picker][data-part=positioner][data-side=top],[data-ui=date-picker][data-part=positioner][data-side=left],[data-ui=date-picker][data-part=positioner][data-side=right]{translate:0 0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=date-picker][data-part=positioner][data-open][data-positioned],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=top],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=left],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=right]{animation-name:slotted-date-picker-fade}}[data-ui=date-picker][data-part=positioner][data-detached]{visibility:hidden}[data-ui=date-picker] [data-part=content]{background-color:var(--slotted-date-picker-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));border-radius:var(--slotted-date-picker-content-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-date-picker-content-shadow, var(--slotted-shadow-md));box-sizing:border-box;color:var(--slotted-date-picker-content-color, var(--slotted-text, CanvasText));display:grid;gap:var(--slotted-space-5, .75rem);grid-template-areas:\"calendar\" \"footer\";grid-template-columns:auto;padding:var(--slotted-date-picker-content-padding, var(--slotted-space-5, .75rem));pointer-events:auto}[data-ui=date-picker] [data-part=content]:has([data-part=presets]){grid-template-areas:\"presets calendar\" \"footer footer\";grid-template-columns:auto auto}[data-ui=date-picker] [data-part=content]>[data-ui=calendar]{grid-area:calendar}[data-ui=date-picker] [data-part=presets]{align-items:flex-start;border-inline-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);grid-area:presets;padding-inline-end:var(--slotted-space-5, .75rem)}[data-ui=date-picker] [data-part=footer]{align-items:center;border-block-start:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));display:flex;gap:var(--slotted-space-2, .25rem);grid-area:footer;justify-content:flex-end;padding-block-start:var(--slotted-space-4, .5rem)}@media(max-width:480px)and (pointer:coarse){[data-ui=date-picker][data-part=positioner][data-presentation=sheet]{inset:auto 0 0;position:fixed;translate:0 var(--slotted-space-9, 2rem)}[data-ui=date-picker][data-part=positioner][data-presentation=sheet][data-open]{translate:0 0}[data-ui=date-picker][data-part=positioner][data-presentation=sheet] [data-part=content]{border-end-end-radius:0;border-end-start-radius:0;border-inline:0;border-block-end:0;inline-size:100%;justify-content:center}[data-ui=date-picker][data-part=positioner][data-presentation=sheet] [data-part=presets]{border-inline-end:0;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));flex-direction:row;flex-wrap:wrap;padding-block-end:var(--slotted-space-4, .5rem);padding-inline-end:0}}}\n"], dependencies: [{ kind: "component", type: SlCalendar, selector: "[slCalendar]", inputs: ["value", "defaultValue", "focusedDate", "defaultFocusedDate", "min", "max", "isDateUnavailable", "selectionMode", "months", "view", "defaultView", "weekNumbers", "fixedWeeks", "outsideDays", "locale", "timeZone", "firstDayOfWeek", "calendar", "disabled", "readOnly", "invalid", "messages"], outputs: ["valueChange", "focusedDateChange", "viewChange", "previewChange"], exportAs: ["slCalendar"] }, { kind: "component", type: SlDateField, selector: "[slDateField]", inputs: ["value", "defaultValue", "min", "max", "isDateUnavailable", "locale", "timeZone", "firstDayOfWeek", "yearPivot", "calendar", "size", "variant", "disabled", "readOnly", "invalid", "required", "clearable", "messages", "name", "label", "groupId"], outputs: ["valueChange"], exportAs: ["slDateField"] }, { kind: "directive", type: SlDateFieldEnd, selector: "[slDateFieldEnd]", exportAs: ["slDateFieldEnd"] }, { kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
601
|
+
}`, isInline: true, styles: ["@layer slotted.components{[data-ui=date-picker][data-part=root]{display:block;inline-size:100%}[data-ui=date-picker] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-md, 16px);--_height: var(--slotted-control-height-md, 34px);align-items:center;display:flex;inline-size:100%;min-inline-size:0;position:relative}[data-ui=date-picker][data-part=root][data-size=sm] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_height: var(--slotted-control-height-sm, 30px)}[data-ui=date-picker][data-part=root][data-size=lg] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_height: var(--slotted-control-height-lg, 38px)}[data-ui=date-picker] [data-part=trigger]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var( --slotted-date-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );border:0;border-radius:var(--slotted-date-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-date-picker-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var( --slotted-date-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );justify-content:center;padding:0;position:relative;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=date-picker] [data-part=trigger]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}@media(pointer:coarse){[data-ui=date-picker] [data-part=trigger]:after{inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2))}[data-ui=date-picker] [data-part=end]:has(+[data-part=clear]:not([hidden]))>[data-part=trigger]:after{inset-inline-end:0}}[data-ui=date-picker] [data-part=trigger]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-date-picker-trigger-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=date-picker] [data-part=trigger]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-date-picker-trigger-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=date-picker] [data-part=trigger]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=date-picker][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-date-picker-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=date-picker] [data-part=trigger]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=date-picker][data-part=positioner]{position:absolute;inset-block-start:0;box-sizing:border-box;isolation:isolate;pointer-events:none;z-index:calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));--_enter-distance: var(--slotted-space-2, .25rem);opacity:0;translate:0 calc(-1 * var(--_enter-distance));transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit),translate var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=date-picker][data-part=positioner][data-side=top]{translate:0 var(--_enter-distance)}[data-ui=date-picker][data-part=positioner]:is([data-side=left],[data-side=right]){translate:0 0}[data-ui=date-picker][data-part=positioner][data-open]{opacity:1;translate:0 0;transition:none}[data-ui=date-picker][data-part=positioner][data-open][data-positioned]{animation:slotted-date-picker-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter)}[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=top]{animation-name:slotted-date-picker-enter-up}[data-ui=date-picker][data-part=positioner][data-open][data-positioned]:is([data-side=left],[data-side=right]){animation-name:slotted-date-picker-fade}@keyframes slotted-date-picker-enter-down{0%{opacity:0;translate:0 calc(-1 * var(--_enter-distance))}}@keyframes slotted-date-picker-enter-up{0%{opacity:0;translate:0 var(--_enter-distance)}}@keyframes slotted-date-picker-fade{0%{opacity:0}}@media(prefers-reduced-motion:reduce){[data-ui=date-picker][data-part=positioner],[data-ui=date-picker][data-part=positioner][data-side=top],[data-ui=date-picker][data-part=positioner][data-side=left],[data-ui=date-picker][data-part=positioner][data-side=right]{translate:0 0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=date-picker][data-part=positioner][data-open][data-positioned],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=top],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=left],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=right]{animation-name:slotted-date-picker-fade}}[data-ui=date-picker][data-part=positioner][data-detached]{visibility:hidden}[data-ui=date-picker] [data-part=content]{background-color:var(--slotted-date-picker-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));border-radius:var(--slotted-date-picker-content-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-date-picker-content-shadow, var(--slotted-shadow-md));box-sizing:border-box;color:var(--slotted-date-picker-content-color, var(--slotted-text, CanvasText));display:grid;gap:var(--slotted-space-5, .75rem);grid-template-areas:\"calendar\" \"footer\";grid-template-columns:auto;padding:var(--slotted-date-picker-content-padding, var(--slotted-space-5, .75rem));pointer-events:auto}[data-ui=date-picker] [data-part=content]:has([data-part=presets]){grid-template-areas:\"presets calendar\" \"footer footer\";grid-template-columns:auto auto}[data-ui=date-picker] [data-part=content]>[data-ui=calendar]{grid-area:calendar}[data-ui=date-picker] [data-part=presets]{align-items:flex-start;border-inline-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);grid-area:presets;padding-inline-end:var(--slotted-space-5, .75rem)}[data-ui=date-picker] [data-part=footer]{align-items:center;border-block-start:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));display:flex;gap:var(--slotted-space-2, .25rem);grid-area:footer;justify-content:flex-end;padding-block-start:var(--slotted-space-4, .5rem)}@media(max-width:480px)and (pointer:coarse){[data-ui=date-picker][data-part=positioner][data-presentation=sheet]{inset:auto 0 0;position:fixed;translate:0 var(--slotted-space-9, 2rem)}[data-ui=date-picker][data-part=positioner][data-presentation=sheet][data-open]{translate:0 0}[data-ui=date-picker][data-part=positioner][data-presentation=sheet] [data-part=content]{border-end-end-radius:0;border-end-start-radius:0;border-inline:0;border-block-end:0;inline-size:100%;justify-content:center}[data-ui=date-picker][data-part=positioner][data-presentation=sheet] [data-part=presets]{border-inline-end:0;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));flex-direction:row;flex-wrap:wrap;padding-block-end:var(--slotted-space-4, .5rem);padding-inline-end:0}}}\n"], dependencies: [{ kind: "component", type: SlCalendar, selector: "[slCalendar]", inputs: ["value", "defaultValue", "focusedDate", "defaultFocusedDate", "min", "max", "isDateUnavailable", "selectionMode", "months", "view", "defaultView", "granularity", "weekNumbers", "fixedWeeks", "outsideDays", "locale", "timeZone", "firstDayOfWeek", "calendar", "disabled", "readOnly", "invalid", "messages"], outputs: ["valueChange", "focusedDateChange", "viewChange", "previewChange"], exportAs: ["slCalendar"] }, { kind: "component", type: SlDateField, selector: "[slDateField]", inputs: ["value", "defaultValue", "granularity", "min", "max", "isDateUnavailable", "locale", "timeZone", "firstDayOfWeek", "yearPivot", "calendar", "size", "variant", "disabled", "readOnly", "invalid", "required", "clearable", "messages", "name", "label", "groupId"], outputs: ["valueChange"], exportAs: ["slDateField"] }, { kind: "directive", type: SlDateFieldEnd, selector: "[slDateFieldEnd]", exportAs: ["slDateFieldEnd"] }, { kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
541
602
|
}
|
|
542
603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDatePicker, decorators: [{
|
|
543
604
|
type: Component,
|
|
@@ -552,8 +613,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
552
613
|
[calendar]="resolvedCalendar()"
|
|
553
614
|
[size]="resolvedSize()"
|
|
554
615
|
[variant]="resolvedVariant()"
|
|
555
|
-
[min]="
|
|
556
|
-
[max]="
|
|
616
|
+
[min]="minDay()"
|
|
617
|
+
[max]="maxDay()"
|
|
618
|
+
[granularity]="granularity()"
|
|
557
619
|
[isDateUnavailable]="isDateUnavailable()"
|
|
558
620
|
[clearable]="clearable()"
|
|
559
621
|
[name]="name()"
|
|
@@ -590,7 +652,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
590
652
|
data-part="positioner"
|
|
591
653
|
data-open
|
|
592
654
|
[attr.data-presentation]="sheet() ? 'sheet' : 'popover'"
|
|
593
|
-
[attr.data-positioned]="positioned() ? '' : null"
|
|
594
655
|
>
|
|
595
656
|
<div
|
|
596
657
|
data-part="content"
|
|
@@ -605,8 +666,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
605
666
|
[locale]="resolvedLocale()"
|
|
606
667
|
[timeZone]="resolvedTimeZone()"
|
|
607
668
|
[firstDayOfWeek]="firstDayOfWeek()"
|
|
608
|
-
[min]="
|
|
609
|
-
[max]="
|
|
669
|
+
[min]="minDay()"
|
|
670
|
+
[max]="maxDay()"
|
|
671
|
+
[granularity]="granularity()"
|
|
610
672
|
[isDateUnavailable]="isDateUnavailable()"
|
|
611
673
|
[selectionMode]="selectionMode()"
|
|
612
674
|
[months]="months()"
|
|
@@ -636,7 +698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
636
698
|
'[attr.data-readonly]': "resolvedReadOnly() === true ? '' : null",
|
|
637
699
|
'[attr.data-required]': "resolvedRequired() === true ? '' : null",
|
|
638
700
|
}, styles: ["@layer slotted.components{[data-ui=date-picker][data-part=root]{display:block;inline-size:100%}[data-ui=date-picker] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-md, 16px);--_height: var(--slotted-control-height-md, 34px);align-items:center;display:flex;inline-size:100%;min-inline-size:0;position:relative}[data-ui=date-picker][data-part=root][data-size=sm] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_height: var(--slotted-control-height-sm, 30px)}[data-ui=date-picker][data-part=root][data-size=lg] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_height: var(--slotted-control-height-lg, 38px)}[data-ui=date-picker] [data-part=trigger]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var( --slotted-date-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );border:0;border-radius:var(--slotted-date-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-date-picker-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var( --slotted-date-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );justify-content:center;padding:0;position:relative;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=date-picker] [data-part=trigger]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}@media(pointer:coarse){[data-ui=date-picker] [data-part=trigger]:after{inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2))}[data-ui=date-picker] [data-part=end]:has(+[data-part=clear]:not([hidden]))>[data-part=trigger]:after{inset-inline-end:0}}[data-ui=date-picker] [data-part=trigger]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-date-picker-trigger-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=date-picker] [data-part=trigger]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-date-picker-trigger-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=date-picker] [data-part=trigger]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=date-picker][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-date-picker-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=date-picker] [data-part=trigger]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=date-picker][data-part=positioner]{position:absolute;inset-block-start:0;box-sizing:border-box;isolation:isolate;pointer-events:none;z-index:calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));--_enter-distance: var(--slotted-space-2, .25rem);opacity:0;translate:0 calc(-1 * var(--_enter-distance));transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit),translate var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=date-picker][data-part=positioner][data-side=top]{translate:0 var(--_enter-distance)}[data-ui=date-picker][data-part=positioner]:is([data-side=left],[data-side=right]){translate:0 0}[data-ui=date-picker][data-part=positioner][data-open]{opacity:1;translate:0 0;transition:none}[data-ui=date-picker][data-part=positioner][data-open][data-positioned]{animation:slotted-date-picker-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter)}[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=top]{animation-name:slotted-date-picker-enter-up}[data-ui=date-picker][data-part=positioner][data-open][data-positioned]:is([data-side=left],[data-side=right]){animation-name:slotted-date-picker-fade}@keyframes slotted-date-picker-enter-down{0%{opacity:0;translate:0 calc(-1 * var(--_enter-distance))}}@keyframes slotted-date-picker-enter-up{0%{opacity:0;translate:0 var(--_enter-distance)}}@keyframes slotted-date-picker-fade{0%{opacity:0}}@media(prefers-reduced-motion:reduce){[data-ui=date-picker][data-part=positioner],[data-ui=date-picker][data-part=positioner][data-side=top],[data-ui=date-picker][data-part=positioner][data-side=left],[data-ui=date-picker][data-part=positioner][data-side=right]{translate:0 0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=date-picker][data-part=positioner][data-open][data-positioned],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=top],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=left],[data-ui=date-picker][data-part=positioner][data-open][data-positioned][data-side=right]{animation-name:slotted-date-picker-fade}}[data-ui=date-picker][data-part=positioner][data-detached]{visibility:hidden}[data-ui=date-picker] [data-part=content]{background-color:var(--slotted-date-picker-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));border-radius:var(--slotted-date-picker-content-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-date-picker-content-shadow, var(--slotted-shadow-md));box-sizing:border-box;color:var(--slotted-date-picker-content-color, var(--slotted-text, CanvasText));display:grid;gap:var(--slotted-space-5, .75rem);grid-template-areas:\"calendar\" \"footer\";grid-template-columns:auto;padding:var(--slotted-date-picker-content-padding, var(--slotted-space-5, .75rem));pointer-events:auto}[data-ui=date-picker] [data-part=content]:has([data-part=presets]){grid-template-areas:\"presets calendar\" \"footer footer\";grid-template-columns:auto auto}[data-ui=date-picker] [data-part=content]>[data-ui=calendar]{grid-area:calendar}[data-ui=date-picker] [data-part=presets]{align-items:flex-start;border-inline-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);grid-area:presets;padding-inline-end:var(--slotted-space-5, .75rem)}[data-ui=date-picker] [data-part=footer]{align-items:center;border-block-start:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));display:flex;gap:var(--slotted-space-2, .25rem);grid-area:footer;justify-content:flex-end;padding-block-start:var(--slotted-space-4, .5rem)}@media(max-width:480px)and (pointer:coarse){[data-ui=date-picker][data-part=positioner][data-presentation=sheet]{inset:auto 0 0;position:fixed;translate:0 var(--slotted-space-9, 2rem)}[data-ui=date-picker][data-part=positioner][data-presentation=sheet][data-open]{translate:0 0}[data-ui=date-picker][data-part=positioner][data-presentation=sheet] [data-part=content]{border-end-end-radius:0;border-end-start-radius:0;border-inline:0;border-block-end:0;inline-size:100%;justify-content:center}[data-ui=date-picker][data-part=positioner][data-presentation=sheet] [data-part=presets]{border-inline-end:0;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-date-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder));flex-direction:row;flex-wrap:wrap;padding-block-end:var(--slotted-space-4, .5rem);padding-inline-end:0}}}\n"] }]
|
|
639
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], isDateUnavailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDateUnavailable", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], months: [{ type: i0.Input, args: [{ isSignal: true, alias: "months", required: false }] }], defaultView: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultView", required: false }] }], weekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekNumbers", required: false }] }], fixedWeeks: [{ type: i0.Input, args: [{ isSignal: true, alias: "fixedWeeks", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], yearPivot: [{ type: i0.Input, args: [{ isSignal: true, alias: "yearPivot", required: false }] }], calendar: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendar", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], layer: [{
|
|
701
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], granularity: [{ type: i0.Input, args: [{ isSignal: true, alias: "granularity", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], isDateUnavailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDateUnavailable", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], months: [{ type: i0.Input, args: [{ isSignal: true, alias: "months", required: false }] }], defaultView: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultView", required: false }] }], weekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekNumbers", required: false }] }], fixedWeeks: [{ type: i0.Input, args: [{ isSignal: true, alias: "fixedWeeks", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], yearPivot: [{ type: i0.Input, args: [{ isSignal: true, alias: "yearPivot", required: false }] }], calendar: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendar", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], layer: [{
|
|
640
702
|
type: ViewChild,
|
|
641
703
|
args: ['layer']
|
|
642
704
|
}], triggerRef: [{
|