@ionic/core 9.0.11-dev.11793889755.165fa328 → 9.0.11-dev.11793900758.1bf6a6e5
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/components/ion-accordion.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/{p-BCQSEpww.js → p-B7ExaLVL.js} +1 -1
- package/css/ionic/bundle.ionic.css +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime-button.cjs.entry.js +33 -6
- package/dist/cjs/ion-datetime.cjs.entry.js +339 -37
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion.ionic.css +11 -6
- package/dist/collection/components/datetime/datetime.ionic.css +211 -5
- package/dist/collection/components/datetime/datetime.ios.css +164 -0
- package/dist/collection/components/datetime/datetime.js +394 -36
- package/dist/collection/components/datetime/datetime.md.css +152 -0
- package/dist/collection/components/datetime/utils/state.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +34 -6
- package/dist/docs.json +153 -3
- package/dist/esm/{format-NT7iHsbA.js → format-DUHrIiJq.js} +1 -1
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-datetime-button.entry.js +34 -7
- package/dist/esm/ion-datetime.entry.js +340 -38
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +21 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-0f694e87.entry.js → p-8b107444.entry.js} +1 -1
- package/dist/ionic/{p-BtccSO5J.js → p-CaOPF8Xt.js} +1 -1
- package/dist/ionic/p-ceca04fb.entry.js +4 -0
- package/dist/ionic/p-ec99dc1f.entry.js +4 -0
- package/dist/types/components/datetime/datetime-interface.d.ts +4 -0
- package/dist/types/components/datetime/datetime.d.ts +73 -6
- package/dist/types/components/datetime/utils/state.d.ts +5 -2
- package/dist/types/components.d.ts +37 -4
- package/hydrate/index.js +381 -44
- package/hydrate/index.mjs +381 -44
- package/package.json +1 -1
- package/dist/ionic/p-0743a26a.entry.js +0 -4
- package/dist/ionic/p-ad46d2fd.entry.js +0 -4
|
@@ -349,11 +349,140 @@
|
|
|
349
349
|
|
|
350
350
|
:host .calendar-day-wrapper {
|
|
351
351
|
display: flex;
|
|
352
|
+
position: relative;
|
|
352
353
|
align-items: center;
|
|
353
354
|
justify-content: center;
|
|
354
355
|
min-width: 0;
|
|
355
356
|
min-height: 0;
|
|
356
357
|
overflow: visible;
|
|
358
|
+
/**
|
|
359
|
+
* Create a stacking context so the range track
|
|
360
|
+
* (::before with z-index: -1) stays behind the
|
|
361
|
+
* day button but above the host background.
|
|
362
|
+
*/
|
|
363
|
+
z-index: 0;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The focus ring can extend past the cell, so lift the focused day
|
|
368
|
+
* above the following days, whose range track would otherwise cover it.
|
|
369
|
+
*/
|
|
370
|
+
:host .calendar-day-wrapper:focus-within {
|
|
371
|
+
z-index: 1;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Keep the range announcement available to screen readers
|
|
376
|
+
* without showing it or covering the calendar.
|
|
377
|
+
*/
|
|
378
|
+
.datetime-range-announcement {
|
|
379
|
+
-webkit-margin-start: -1px;
|
|
380
|
+
margin-inline-start: -1px;
|
|
381
|
+
-webkit-margin-end: -1px;
|
|
382
|
+
margin-inline-end: -1px;
|
|
383
|
+
margin-top: -1px;
|
|
384
|
+
margin-bottom: -1px;
|
|
385
|
+
padding-left: 0;
|
|
386
|
+
padding-right: 0;
|
|
387
|
+
padding-top: 0;
|
|
388
|
+
padding-bottom: 0;
|
|
389
|
+
position: absolute;
|
|
390
|
+
width: 1px;
|
|
391
|
+
height: 1px;
|
|
392
|
+
border: 0;
|
|
393
|
+
white-space: nowrap;
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
clip: rect(0, 0, 0, 0);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Each day in the range draws its own piece of the track with a
|
|
400
|
+
* ::before. In-range days fill the cell, while the start and end
|
|
401
|
+
* caps cover the half between the pill center and the next day.
|
|
402
|
+
*
|
|
403
|
+
* Grid columns are `1fr`, so cell edges land on fractional pixels
|
|
404
|
+
* and a cell's track can fall a hairline short of its neighbor's.
|
|
405
|
+
* Each day therefore extends 1px toward the next day in the range,
|
|
406
|
+
* which the next day paints over except inside such a gap.
|
|
407
|
+
*
|
|
408
|
+
* @prop --range-background: The background color of the range selection track.
|
|
409
|
+
*/
|
|
410
|
+
:host .calendar-day-wrapper-in-range::before,
|
|
411
|
+
:host .calendar-day-wrapper-range-start::before,
|
|
412
|
+
:host .calendar-day-wrapper-range-end::before {
|
|
413
|
+
position: absolute;
|
|
414
|
+
top: 50%;
|
|
415
|
+
inset-inline-start: 0;
|
|
416
|
+
inset-inline-end: 0;
|
|
417
|
+
height: var(--range-track-height);
|
|
418
|
+
transform: translateY(-50%);
|
|
419
|
+
/**
|
|
420
|
+
* `--range-background` is translucent by default, so it is layered
|
|
421
|
+
* over the datetime background to paint an opaque track. Where two
|
|
422
|
+
* days overlap, the color stays the same instead of doubling up
|
|
423
|
+
* into a darker line.
|
|
424
|
+
*/
|
|
425
|
+
background: linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));
|
|
426
|
+
content: "";
|
|
427
|
+
z-index: -1;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
:host .calendar-day-wrapper-range-start::before {
|
|
431
|
+
inset-inline-start: 50%;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
:host .calendar-day-wrapper-range-end::before {
|
|
435
|
+
inset-inline-end: 50%;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Only extend toward a day that draws the track as well. The last
|
|
440
|
+
* day of a week is followed by the next row, and the next day is
|
|
441
|
+
* unpainted when it ends the selection or is disabled inside the
|
|
442
|
+
* range, so extending there would leave a 1px nub.
|
|
443
|
+
*/
|
|
444
|
+
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
445
|
+
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before,
|
|
446
|
+
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
447
|
+
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before {
|
|
448
|
+
inset-inline-end: -1px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A range that continues onto the next week runs the track
|
|
453
|
+
* through the grid padding to the edge of the calendar.
|
|
454
|
+
*/
|
|
455
|
+
:host .calendar-day-wrapper-in-range:nth-child(7n)::before,
|
|
456
|
+
:host .calendar-day-wrapper-range-start:nth-child(7n)::before {
|
|
457
|
+
inset-inline-end: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,
|
|
461
|
+
:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before {
|
|
462
|
+
inset-inline-start: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* When a single day is both the start and end of the range,
|
|
467
|
+
* do not show a track since there is nothing to connect.
|
|
468
|
+
*/
|
|
469
|
+
:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before {
|
|
470
|
+
display: none;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* When the component is disabled, fade the whole grid once instead of
|
|
475
|
+
* fading each day. Fading a day makes it its own compositing group, so
|
|
476
|
+
* the 1px that each day extends toward the next would be painted twice
|
|
477
|
+
* and read as a darker seam. The day buttons drop their own disabled
|
|
478
|
+
* opacity so the grid is the only thing applying it.
|
|
479
|
+
*/
|
|
480
|
+
:host(.datetime-disabled.datetime-range) .calendar-month-grid {
|
|
481
|
+
opacity: 0.4;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
:host(.datetime-disabled.datetime-range) .calendar-month-grid .calendar-day[disabled] {
|
|
485
|
+
opacity: 1;
|
|
357
486
|
}
|
|
358
487
|
|
|
359
488
|
/**
|
|
@@ -900,6 +1029,29 @@ ion-picker {
|
|
|
900
1029
|
color: var(--ion-color-step-500, var(--ion-text-color-step-500, gray));
|
|
901
1030
|
}
|
|
902
1031
|
|
|
1032
|
+
:host {
|
|
1033
|
+
--range-background: rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.12);
|
|
1034
|
+
--range-track-height: 42px;
|
|
1035
|
+
--range-track-edge-overflow: 10px;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
:host(.ion-color) {
|
|
1039
|
+
--range-background: rgba(var(--ion-color-base-rgb), 0.12);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
:host .calendar-day.calendar-day-range-start,
|
|
1043
|
+
:host .calendar-day.calendar-day-range-end {
|
|
1044
|
+
border-radius: 50%;
|
|
1045
|
+
background: var(--ion-color-primary, #0054e9);
|
|
1046
|
+
color: var(--ion-color-primary-contrast, #fff);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
:host(.ion-color) .calendar-day.calendar-day-range-start,
|
|
1050
|
+
:host(.ion-color) .calendar-day.calendar-day-range-end {
|
|
1051
|
+
background: var(--ion-color-base);
|
|
1052
|
+
color: var(--ion-color-contrast);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
903
1055
|
:host .datetime-time {
|
|
904
1056
|
-webkit-padding-start: 16px;
|
|
905
1057
|
padding-inline-start: 16px;
|
|
@@ -74,7 +74,7 @@ export const isDayDisabled = (refParts, minParts, maxParts, dayValues) => {
|
|
|
74
74
|
* Given a locale, a date, the selected date(s), and today's date,
|
|
75
75
|
* generate the state for a given calendar day button.
|
|
76
76
|
*/
|
|
77
|
-
export const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {
|
|
77
|
+
export const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues, rangeParts) => {
|
|
78
78
|
/**
|
|
79
79
|
* activeParts signals what day(s) are currently selected in the datetime.
|
|
80
80
|
* If multiple="true", this will be an array, but the logic in this util
|
|
@@ -90,6 +90,20 @@ export const getCalendarDayState = (locale, refParts, activeParts, todayParts, m
|
|
|
90
90
|
const isActive = activePartsArray.find((parts) => isSameDay(refParts, parts)) !== undefined;
|
|
91
91
|
const isToday = isSameDay(refParts, todayParts);
|
|
92
92
|
const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);
|
|
93
|
+
/**
|
|
94
|
+
* Range state: determine if this day is the range start, end, or in between.
|
|
95
|
+
*/
|
|
96
|
+
let isRangeStart = false;
|
|
97
|
+
let isRangeEnd = false;
|
|
98
|
+
let isInRange = false;
|
|
99
|
+
if (rangeParts) {
|
|
100
|
+
const { start, end } = rangeParts;
|
|
101
|
+
isRangeStart = isSameDay(refParts, start);
|
|
102
|
+
if (end) {
|
|
103
|
+
isRangeEnd = isSameDay(refParts, end);
|
|
104
|
+
isInRange = !disabled && !isRangeStart && !isRangeEnd && isAfter(refParts, start) && isBefore(refParts, end);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
93
107
|
/**
|
|
94
108
|
* Note that we always return one object regardless of whether activeParts
|
|
95
109
|
* was an array, since we pare down to one value for isActive.
|
|
@@ -98,6 +112,9 @@ export const getCalendarDayState = (locale, refParts, activeParts, todayParts, m
|
|
|
98
112
|
disabled,
|
|
99
113
|
isActive,
|
|
100
114
|
isToday,
|
|
115
|
+
isRangeStart,
|
|
116
|
+
isRangeEnd,
|
|
117
|
+
isInRange,
|
|
101
118
|
ariaSelected: isActive ? 'true' : null,
|
|
102
119
|
ariaLabel: generateDayAriaLabel(locale, isToday, refParts),
|
|
103
120
|
text: refParts.day != null ? getDay(locale, refParts) : null,
|
|
@@ -6,6 +6,7 @@ import { componentOnReady, addEventListener } from "../../utils/helpers";
|
|
|
6
6
|
import { printIonError } from "../../utils/logging/index";
|
|
7
7
|
import { createColorClasses } from "../../utils/theme";
|
|
8
8
|
import { getIonTheme } from "../../global/ionic-global";
|
|
9
|
+
import { isAfter } from "../datetime/utils/comparison";
|
|
9
10
|
import { getLocalizedDateTime, getLocalizedTime } from "../datetime/utils/format";
|
|
10
11
|
import { getHourCycle } from "../datetime/utils/helpers";
|
|
11
12
|
import { parseDate } from "../datetime/utils/parse";
|
|
@@ -53,7 +54,7 @@ export class DatetimeButton {
|
|
|
53
54
|
if (!datetimeEl) {
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
|
-
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
57
|
+
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, selectionMode, titleSelectedDatesFormatter, } = datetimeEl;
|
|
57
58
|
const parsedValues = this.getParsedDateValues(value);
|
|
58
59
|
/**
|
|
59
60
|
* Both ion-datetime and ion-datetime-button default to today's date and
|
|
@@ -65,6 +66,8 @@ export class DatetimeButton {
|
|
|
65
66
|
if (!parsedDatetimes) {
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
69
|
+
const isRangeMode = selectionMode === 'range';
|
|
70
|
+
const isMultipleMode = selectionMode === 'multiple' || (selectionMode === undefined && multiple);
|
|
68
71
|
/**
|
|
69
72
|
* If developers incorrectly use multiple="true"
|
|
70
73
|
* with non "date" datetimes, then just select
|
|
@@ -74,11 +77,12 @@ export class DatetimeButton {
|
|
|
74
77
|
*/
|
|
75
78
|
const firstParsedDatetime = parsedDatetimes[0];
|
|
76
79
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
80
|
+
const dateFormatOptions = formatOptions?.date ?? { month: 'short', day: 'numeric', year: 'numeric' };
|
|
77
81
|
this.dateText = this.timeText = undefined;
|
|
78
82
|
switch (datetimePresentation) {
|
|
79
83
|
case 'date-time':
|
|
80
84
|
case 'time-date':
|
|
81
|
-
const dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
85
|
+
const dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
82
86
|
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions?.time);
|
|
83
87
|
if (preferWheel) {
|
|
84
88
|
this.dateText = `${dateText} ${timeText}`;
|
|
@@ -89,7 +93,31 @@ export class DatetimeButton {
|
|
|
89
93
|
}
|
|
90
94
|
break;
|
|
91
95
|
case 'date':
|
|
92
|
-
if (
|
|
96
|
+
if (isRangeMode && parsedValues.length >= 2) {
|
|
97
|
+
/**
|
|
98
|
+
* Use the first and last entries in date order, matching
|
|
99
|
+
* how ion-datetime reads a range value.
|
|
100
|
+
*/
|
|
101
|
+
let startIndex = 0;
|
|
102
|
+
let endIndex = parsedValues.length - 1;
|
|
103
|
+
if (isAfter(parsedDatetimes[startIndex], parsedDatetimes[endIndex])) {
|
|
104
|
+
[startIndex, endIndex] = [endIndex, startIndex];
|
|
105
|
+
}
|
|
106
|
+
const rangeValues = [parsedValues[startIndex], parsedValues[endIndex]];
|
|
107
|
+
const startDate = getLocalizedDateTime(locale, parsedDatetimes[startIndex], dateFormatOptions);
|
|
108
|
+
const endDate = getLocalizedDateTime(locale, parsedDatetimes[endIndex], dateFormatOptions);
|
|
109
|
+
let rangeText = `${startDate} - ${endDate}`;
|
|
110
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
111
|
+
try {
|
|
112
|
+
rangeText = titleSelectedDatesFormatter(rangeValues);
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
printIonError('[ion-datetime-button] - Exception in provided `titleSelectedDatesFormatter`:', e);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
this.dateText = rangeText;
|
|
119
|
+
}
|
|
120
|
+
else if (isMultipleMode && parsedValues.length !== 1) {
|
|
93
121
|
let headerText = `${parsedValues.length} days`; // default/fallback for multiple selection
|
|
94
122
|
if (titleSelectedDatesFormatter !== undefined) {
|
|
95
123
|
try {
|
|
@@ -102,7 +130,7 @@ export class DatetimeButton {
|
|
|
102
130
|
this.dateText = headerText;
|
|
103
131
|
}
|
|
104
132
|
else {
|
|
105
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
133
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
106
134
|
}
|
|
107
135
|
break;
|
|
108
136
|
case 'time':
|
|
@@ -339,11 +367,11 @@ export class DatetimeButton {
|
|
|
339
367
|
render() {
|
|
340
368
|
const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
|
|
341
369
|
const theme = getIonTheme(this);
|
|
342
|
-
return (h(Host, { key: '
|
|
370
|
+
return (h(Host, { key: 'e022c5c280d4f889c1ba7ca3e96b38063c5add30', class: createColorClasses(color, {
|
|
343
371
|
[theme]: true,
|
|
344
372
|
[`${selectedButton}-active`]: datetimeActive,
|
|
345
373
|
['datetime-button-disabled']: disabled,
|
|
346
|
-
}) }, dateText && (h("button", { key: '
|
|
374
|
+
}) }, dateText && (h("button", { key: 'b1267d98cefbce7666b0cafa083c42f3116e2398', class: "ion-activatable", id: "date-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleDateClick, disabled: disabled, part: "native", ref: (el) => (this.dateTargetEl = el) }, h("slot", { key: '3fdfa6adf73ee1e35cdb7f318f1d1ddcf4ab4d7b', name: "date-target" }, dateText), theme === 'md' && h("ion-ripple-effect", { key: 'a832d63c77fffe8d7e0d28827bbb469726373d1e' }))), timeText && (h("button", { key: 'c589bdf2b8221609713f0d3554494dd08a1f2e5b', class: "ion-activatable", id: "time-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleTimeClick, disabled: disabled, part: "native", ref: (el) => (this.timeTargetEl = el) }, h("slot", { key: '10769ddadf7933d78744facaaa153bb413ff484a', name: "time-target" }, timeText), theme === 'md' && h("ion-ripple-effect", { key: '7832de031919ddfb312528b45a3dc8e1c20edea6' })))));
|
|
347
375
|
}
|
|
348
376
|
static get is() { return "ion-datetime-button"; }
|
|
349
377
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-05T17:48:41",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
@@ -11014,6 +11014,22 @@
|
|
|
11014
11014
|
"name": "part",
|
|
11015
11015
|
"text": "calendar-day disabled - The calendar day that is disabled."
|
|
11016
11016
|
},
|
|
11017
|
+
{
|
|
11018
|
+
"name": "part",
|
|
11019
|
+
"text": "range-start - The calendar day button that is the start of a range selection."
|
|
11020
|
+
},
|
|
11021
|
+
{
|
|
11022
|
+
"name": "part",
|
|
11023
|
+
"text": "range-end - The calendar day button that is the end of a range selection."
|
|
11024
|
+
},
|
|
11025
|
+
{
|
|
11026
|
+
"name": "part",
|
|
11027
|
+
"text": "range-selection - The calendar day button that is part of a range selection (includes start and end)."
|
|
11028
|
+
},
|
|
11029
|
+
{
|
|
11030
|
+
"name": "part",
|
|
11031
|
+
"text": "range-track - The track that connects the start and end days of a range selection."
|
|
11032
|
+
},
|
|
11017
11033
|
{
|
|
11018
11034
|
"name": "part",
|
|
11019
11035
|
"text": "datetime-header - The datetime header contains the content for the `title` slot and the selected date."
|
|
@@ -11246,6 +11262,35 @@
|
|
|
11246
11262
|
"getter": false,
|
|
11247
11263
|
"setter": false
|
|
11248
11264
|
},
|
|
11265
|
+
{
|
|
11266
|
+
"name": "endDateLabel",
|
|
11267
|
+
"type": "string",
|
|
11268
|
+
"complexType": {
|
|
11269
|
+
"original": "string",
|
|
11270
|
+
"resolved": "string",
|
|
11271
|
+
"references": {}
|
|
11272
|
+
},
|
|
11273
|
+
"mutable": false,
|
|
11274
|
+
"attr": "end-date-label",
|
|
11275
|
+
"reflectToAttr": false,
|
|
11276
|
+
"docs": "The text shown in the datetime header when the end of the range\nis empty, also used by screen readers to announce the end date.\nOnly applies when `selectionMode=\"range\"`.",
|
|
11277
|
+
"docsTags": [
|
|
11278
|
+
{
|
|
11279
|
+
"name": "default",
|
|
11280
|
+
"text": "'End date'"
|
|
11281
|
+
}
|
|
11282
|
+
],
|
|
11283
|
+
"default": "'End date'",
|
|
11284
|
+
"values": [
|
|
11285
|
+
{
|
|
11286
|
+
"type": "string"
|
|
11287
|
+
}
|
|
11288
|
+
],
|
|
11289
|
+
"optional": false,
|
|
11290
|
+
"required": false,
|
|
11291
|
+
"getter": false,
|
|
11292
|
+
"setter": false
|
|
11293
|
+
},
|
|
11249
11294
|
{
|
|
11250
11295
|
"name": "firstDayOfWeek",
|
|
11251
11296
|
"type": "number",
|
|
@@ -11642,12 +11687,17 @@
|
|
|
11642
11687
|
"reflectToAttr": false,
|
|
11643
11688
|
"docs": "If `true`, multiple dates can be selected at once. Only\napplies to `presentation=\"date\"` and `preferWheel=\"false\"`.",
|
|
11644
11689
|
"docsTags": [
|
|
11690
|
+
{
|
|
11691
|
+
"name": "deprecated",
|
|
11692
|
+
"text": "Use `selectionMode=\"multiple\"` instead."
|
|
11693
|
+
},
|
|
11645
11694
|
{
|
|
11646
11695
|
"name": "default",
|
|
11647
11696
|
"text": "false"
|
|
11648
11697
|
}
|
|
11649
11698
|
],
|
|
11650
11699
|
"default": "false",
|
|
11700
|
+
"deprecation": "Use `selectionMode=\"multiple\"` instead.",
|
|
11651
11701
|
"values": [
|
|
11652
11702
|
{
|
|
11653
11703
|
"type": "boolean"
|
|
@@ -11806,6 +11856,37 @@
|
|
|
11806
11856
|
"getter": false,
|
|
11807
11857
|
"setter": false
|
|
11808
11858
|
},
|
|
11859
|
+
{
|
|
11860
|
+
"name": "selectionMode",
|
|
11861
|
+
"type": "\"multiple\" | \"range\" | undefined",
|
|
11862
|
+
"complexType": {
|
|
11863
|
+
"original": "'multiple' | 'range'",
|
|
11864
|
+
"resolved": "\"multiple\" | \"range\" | undefined",
|
|
11865
|
+
"references": {}
|
|
11866
|
+
},
|
|
11867
|
+
"mutable": false,
|
|
11868
|
+
"attr": "selection-mode",
|
|
11869
|
+
"reflectToAttr": false,
|
|
11870
|
+
"docs": "Controls the date selection behavior.\n`'multiple'` enables selecting multiple individual dates.\n`'range'` enables selecting a start and end date range.\nWhen unset, single-date selection is used.\n\nRange selection only works with `presentation=\"date\"` and `preferWheel=\"false\"`.",
|
|
11871
|
+
"docsTags": [],
|
|
11872
|
+
"values": [
|
|
11873
|
+
{
|
|
11874
|
+
"value": "multiple",
|
|
11875
|
+
"type": "string"
|
|
11876
|
+
},
|
|
11877
|
+
{
|
|
11878
|
+
"value": "range",
|
|
11879
|
+
"type": "string"
|
|
11880
|
+
},
|
|
11881
|
+
{
|
|
11882
|
+
"type": "undefined"
|
|
11883
|
+
}
|
|
11884
|
+
],
|
|
11885
|
+
"optional": true,
|
|
11886
|
+
"required": false,
|
|
11887
|
+
"getter": false,
|
|
11888
|
+
"setter": false
|
|
11889
|
+
},
|
|
11809
11890
|
{
|
|
11810
11891
|
"name": "showAdjacentDays",
|
|
11811
11892
|
"type": "boolean",
|
|
@@ -11985,6 +12066,35 @@
|
|
|
11985
12066
|
"getter": false,
|
|
11986
12067
|
"setter": false
|
|
11987
12068
|
},
|
|
12069
|
+
{
|
|
12070
|
+
"name": "startDateLabel",
|
|
12071
|
+
"type": "string",
|
|
12072
|
+
"complexType": {
|
|
12073
|
+
"original": "string",
|
|
12074
|
+
"resolved": "string",
|
|
12075
|
+
"references": {}
|
|
12076
|
+
},
|
|
12077
|
+
"mutable": false,
|
|
12078
|
+
"attr": "start-date-label",
|
|
12079
|
+
"reflectToAttr": false,
|
|
12080
|
+
"docs": "The text shown in the datetime header when the start of the range\nis empty, also used by screen readers to announce the start date.\nOnly applies when `selectionMode=\"range\"`.",
|
|
12081
|
+
"docsTags": [
|
|
12082
|
+
{
|
|
12083
|
+
"name": "default",
|
|
12084
|
+
"text": "'Start date'"
|
|
12085
|
+
}
|
|
12086
|
+
],
|
|
12087
|
+
"default": "'Start date'",
|
|
12088
|
+
"values": [
|
|
12089
|
+
{
|
|
12090
|
+
"type": "string"
|
|
12091
|
+
}
|
|
12092
|
+
],
|
|
12093
|
+
"optional": false,
|
|
12094
|
+
"required": false,
|
|
12095
|
+
"getter": false,
|
|
12096
|
+
"setter": false
|
|
12097
|
+
},
|
|
11988
12098
|
{
|
|
11989
12099
|
"name": "theme",
|
|
11990
12100
|
"type": "\"ios\" | \"md\" | \"ionic\"",
|
|
@@ -12027,7 +12137,7 @@
|
|
|
12027
12137
|
},
|
|
12028
12138
|
"mutable": false,
|
|
12029
12139
|
"reflectToAttr": false,
|
|
12030
|
-
"docs": "A callback used to format the header text that shows how many\ndates are selected.
|
|
12140
|
+
"docs": "A callback used to format the header text that shows how many\ndates are selected. In multiple mode this is only used when\nthere are 0 or more than 1 selected. In range mode it is\nalways called with `[startDate]` or `[startDate, endDate]`.\nBy default, the header text is set to \"numberOfDates days\".\n\nSee https://ionicframework.com/docs/troubleshooting/runtime#accessing-this\nif you need to access `this` from within the callback.",
|
|
12031
12141
|
"docsTags": [],
|
|
12032
12142
|
"values": [
|
|
12033
12143
|
{
|
|
@@ -12053,7 +12163,7 @@
|
|
|
12053
12163
|
"mutable": true,
|
|
12054
12164
|
"attr": "value",
|
|
12055
12165
|
"reflectToAttr": false,
|
|
12056
|
-
"docs": "The value of the datetime as a valid ISO 8601 datetime string.\
|
|
12166
|
+
"docs": "The value of the datetime as a valid ISO 8601 datetime string.\nShould be an array of strings when using `multiple=\"true\"` or\n`selectionMode=\"range\"`. For range mode the array contains\n`[startDate, endDate]`, or `[startDate]` for a partial selection.",
|
|
12057
12167
|
"docsTags": [],
|
|
12058
12168
|
"values": [
|
|
12059
12169
|
{
|
|
@@ -12166,6 +12276,12 @@
|
|
|
12166
12276
|
"Promise": {
|
|
12167
12277
|
"location": "global",
|
|
12168
12278
|
"id": "global::Promise"
|
|
12279
|
+
},
|
|
12280
|
+
"DatetimeParts": {
|
|
12281
|
+
"location": "import",
|
|
12282
|
+
"path": "./datetime-interface",
|
|
12283
|
+
"id": "src/components/datetime/datetime-interface.ts::DatetimeParts",
|
|
12284
|
+
"referenceLocation": "DatetimeParts"
|
|
12169
12285
|
}
|
|
12170
12286
|
},
|
|
12171
12287
|
"return": "Promise<void>"
|
|
@@ -12335,6 +12451,24 @@
|
|
|
12335
12451
|
"docs": "The width of the ring around the focused element.",
|
|
12336
12452
|
"mode": "ionic"
|
|
12337
12453
|
},
|
|
12454
|
+
{
|
|
12455
|
+
"name": "--range-background",
|
|
12456
|
+
"annotation": "prop",
|
|
12457
|
+
"docs": "The background color of the range selection track.",
|
|
12458
|
+
"mode": "ionic"
|
|
12459
|
+
},
|
|
12460
|
+
{
|
|
12461
|
+
"name": "--range-background",
|
|
12462
|
+
"annotation": "prop",
|
|
12463
|
+
"docs": "The background color of the range selection track.",
|
|
12464
|
+
"mode": "ios"
|
|
12465
|
+
},
|
|
12466
|
+
{
|
|
12467
|
+
"name": "--range-background",
|
|
12468
|
+
"annotation": "prop",
|
|
12469
|
+
"docs": "The background color of the range selection track.",
|
|
12470
|
+
"mode": "md"
|
|
12471
|
+
},
|
|
12338
12472
|
{
|
|
12339
12473
|
"name": "--title-color",
|
|
12340
12474
|
"annotation": "prop",
|
|
@@ -12451,6 +12585,22 @@
|
|
|
12451
12585
|
"name": "previous-button",
|
|
12452
12586
|
"docs": "The button used to navigate to the previous month when using a grid style layout."
|
|
12453
12587
|
},
|
|
12588
|
+
{
|
|
12589
|
+
"name": "range-end",
|
|
12590
|
+
"docs": "The calendar day button that is the end of a range selection."
|
|
12591
|
+
},
|
|
12592
|
+
{
|
|
12593
|
+
"name": "range-selection",
|
|
12594
|
+
"docs": "The calendar day button that is part of a range selection (includes start and end)."
|
|
12595
|
+
},
|
|
12596
|
+
{
|
|
12597
|
+
"name": "range-start",
|
|
12598
|
+
"docs": "The calendar day button that is the start of a range selection."
|
|
12599
|
+
},
|
|
12600
|
+
{
|
|
12601
|
+
"name": "range-track",
|
|
12602
|
+
"docs": "The track that connects the start and end days of a range selection."
|
|
12603
|
+
},
|
|
12454
12604
|
{
|
|
12455
12605
|
"name": "time-button",
|
|
12456
12606
|
"docs": "The button that opens the time picker when using a grid style\nlayout with `presentation=\"date-time\"` or `\"time-date\"`."
|
|
@@ -1122,4 +1122,4 @@ const formatValue = (value) => {
|
|
|
1122
1122
|
return Array.isArray(value) ? value.join(',') : value;
|
|
1123
1123
|
};
|
|
1124
1124
|
|
|
1125
|
-
export {
|
|
1125
|
+
export { getPreviousWeek as A, getNextWeek as B, parseMinParts as C, parseMaxParts as D, parseDate as E, warnIfValueOutOfBounds as F, clampDate as G, parseAmPm as H, convertToArrayOfNumbers as I, getClosestValidDate as J, isMonthFirstLocale as K, isLocaleDayPeriodRTL as L, calculateHourFromAMPM as M, getMonthAndYear as N, getLocalizedTime as O, getLocalizedDateTime as P, formatValue as Q, getPreviousMonth as a, getTodayLabel as b, getYear as c, getHourCycle as d, getInternalHourValue as e, getFormattedHour as f, getNextMonth as g, addTimePadding as h, getLocalizedDayPeriod as i, isBefore as j, isSameDay as k, isAfter as l, is24Hour as m, getNumDaysInMonth as n, getDay as o, generateDayAriaLabel as p, getNextDay as q, removeDateTzOffset as r, convertDataToISO as s, getPartsFromCalendarDay as t, getNextYear as u, validateParts as v, getPreviousYear as w, getEndOfWeek as x, getStartOfWeek as y, getPreviousDay as z };
|
|
@@ -10,7 +10,7 @@ import './index-ZjP4CjeZ.js';
|
|
|
10
10
|
import './focus-visible-BYk20Mf5.js';
|
|
11
11
|
import './dir-Dj4J3LkD.js';
|
|
12
12
|
|
|
13
|
-
const accordionIonicCss = () => `:host{display:block;position:relative;width:100%;overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host{position:relative}:host::after{-webkit-margin-start:var(--token-space-400, var(--token-scale-400, 16px));margin-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-margin-end:var(--token-space-400, var(--token-scale-400, 16px));margin-inline-end:var(--token-space-400, var(--token-scale-400, 16px));right:0;left:0;bottom:0;display:block;position:absolute;height:var(--token-border-size-025, var(--token-scale-025, 1px));background-color:var(--token-border-default, var(--token-primitives-neutral-400, #d0d7df));content:"";z-index:3}:host(.accordion-last)::after{display:none}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}::slotted(ion-item[slot=header]){--border-radius:inherit;--color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528));--border-width:var(--token-border-size-0, var(--token-scale-0, 0px));--inner-border-width:var(--token-scale-0, 0px);--min-height:var(--token-scale-700, 28px);--padding-top:var(--token-space-300, var(--token-scale-300, 12px));--padding-end:var(--token-space-400, var(--token-scale-400, 16px));--padding-bottom:var(--token-space-300, var(--token-scale-300, 12px));--padding-start:var(--token-space-400, var(--token-scale-400, 16px));--background-activated:var(--token-bg-neutral-subtlest-press, var(--token-primitives-neutral-200, #ebeef2));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.555556}#content-wrapper{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-300, var(--token-scale-300, 12px));padding-bottom:var(--token-space-300, var(--token-scale-300, 12px));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-regular, 400);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.714286;color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host(.accordion-disabled)
|
|
13
|
+
const accordionIonicCss = () => `:host{display:block;position:relative;width:100%;overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host{position:relative}:host::after{-webkit-margin-start:var(--token-space-400, var(--token-scale-400, 16px));margin-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-margin-end:var(--token-space-400, var(--token-scale-400, 16px));margin-inline-end:var(--token-space-400, var(--token-scale-400, 16px));right:0;left:0;bottom:0;display:block;position:absolute;height:var(--token-border-size-025, var(--token-scale-025, 1px));background-color:var(--token-border-default, var(--token-primitives-neutral-400, #d0d7df));content:"";z-index:3}:host(.accordion-last)::after{display:none}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}::slotted(ion-item[slot=header]){--border-radius:inherit;--color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528));--border-width:var(--token-border-size-0, var(--token-scale-0, 0px));--inner-border-width:var(--token-scale-0, 0px);--min-height:var(--token-scale-700, 28px);--padding-top:var(--token-space-300, var(--token-scale-300, 12px));--padding-end:var(--token-space-400, var(--token-scale-400, 16px));--padding-bottom:var(--token-space-300, var(--token-scale-300, 12px));--padding-start:var(--token-space-400, var(--token-scale-400, 16px));--background-activated:var(--token-bg-neutral-subtlest-press, var(--token-primitives-neutral-200, #ebeef2));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.555556}#content-wrapper{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-300, var(--token-scale-300, 12px));padding-bottom:var(--token-space-300, var(--token-scale-300, 12px));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-regular, 400);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.714286;color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host(.accordion-disabled)::before{border-radius:inherit;right:0;left:0;top:0;bottom:0;position:absolute;background-color:var(--token-state-disabled, rgba(255, 255, 255, 0.6));content:"";pointer-events:none;z-index:2}`;
|
|
14
14
|
|
|
15
15
|
const accordionIosCss = () => `:host{display:block;position:relative;width:100%;overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host{background-color:var(--ion-background-color, #ffffff)}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}`;
|
|
16
16
|
|