@ionic/core 9.0.11-dev.11793726772.1e883321 → 9.0.11-dev.11793727726.19b906b5
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-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/{p-DtZimz8H.js → p-1HReh-CB.js} +1 -1
- package/components/{p-BCQSEpww.js → p-B7ExaLVL.js} +1 -1
- package/components/{p-CseHeZbU.js → p-BCYVFy50.js} +1 -1
- package/components/p-ByE0slik.js +4 -0
- package/components/p-DgNvIX46.js +4 -0
- package/components/p-DmyvpOqm.js +4 -0
- package/components/p-mG85e2ek.js +4 -0
- 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/css/ionic/global.bundle.ionic.css.map +1 -1
- package/css/ionic/link.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -13
- package/dist/cjs/ion-datetime-button.cjs.entry.js +33 -6
- package/dist/cjs/ion-datetime.cjs.entry.js +353 -36
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +1 -1
- package/dist/collection/components/alert/alert.ionic.css +1 -1
- package/dist/collection/components/content/{content.ios.css → content.css} +41 -65
- package/dist/collection/components/content/content.js +5 -9
- package/dist/collection/components/datetime/datetime.ionic.css +179 -5
- package/dist/collection/components/datetime/datetime.ios.css +134 -2
- package/dist/collection/components/datetime/datetime.js +406 -33
- package/dist/collection/components/datetime/datetime.md.css +120 -0
- package/dist/collection/components/datetime/utils/state.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +34 -6
- package/dist/collection/components/modal/modal.ionic.css +2 -2
- package/dist/collection/components/popover/popover.ionic.css +1 -2
- package/dist/collection/components/toast/toast.ionic.css +1 -1
- package/dist/docs.json +160 -127
- package/dist/esm/{format-NT7iHsbA.js → format-DUHrIiJq.js} +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-app_8.entry.js +5 -13
- package/dist/esm/ion-datetime-button.entry.js +34 -7
- package/dist/esm/ion-datetime.entry.js +354 -37
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +20 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-b076511a.entry.js → p-3674a7de.entry.js} +1 -1
- package/dist/ionic/p-56d77e95.entry.js +4 -0
- package/dist/ionic/{p-3ddd32cc.entry.js → p-5a024b02.entry.js} +1 -1
- package/dist/ionic/p-9cce1ed5.entry.js +4 -0
- package/dist/ionic/{p-BtccSO5J.js → p-CaOPF8Xt.js} +1 -1
- package/dist/ionic/p-b30b468d.entry.js +4 -0
- package/dist/ionic/p-ceca04fb.entry.js +4 -0
- package/dist/ionic/p-d7da66b1.entry.js +4 -0
- package/dist/ionic/p-f02c29cd.entry.js +4 -0
- package/dist/types/components/datetime/datetime-interface.d.ts +4 -0
- package/dist/types/components/datetime/datetime.d.ts +71 -2
- package/dist/types/components/datetime/utils/state.d.ts +5 -2
- package/dist/types/components.d.ts +33 -0
- package/hydrate/index.js +405 -61
- package/hydrate/index.mjs +405 -61
- package/package.json +2 -2
- package/components/p-Da8LCPwo.js +0 -4
- package/components/p-DibGn4gb.js +0 -4
- package/components/p-NZGZhPF5.js +0 -4
- package/components/p-PFwuhbqg.js +0 -4
- package/dist/collection/components/content/content.ionic.css +0 -352
- package/dist/collection/components/content/content.md.css +0 -347
- package/dist/ionic/p-0743a26a.entry.js +0 -4
- package/dist/ionic/p-1d87b153.entry.js +0 -4
- package/dist/ionic/p-39e3be74.entry.js +0 -4
- package/dist/ionic/p-a1555032.entry.js +0 -4
- package/dist/ionic/p-ad46d2fd.entry.js +0 -4
- package/dist/ionic/p-dbf53341.entry.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import type { Color, StyleEventDetail } from '../../interface';
|
|
3
|
-
import type { DatetimePresentation, DatetimeChangeEventDetail, DatetimeParts, TitleSelectedDatesFormatter, DatetimeHighlight, DatetimeHighlightCallback, DatetimeHourCycle, FormatOptions } from './datetime-interface';
|
|
3
|
+
import type { DatetimePresentation, DatetimeChangeEventDetail, DatetimeParts, DatetimeRangeParts, TitleSelectedDatesFormatter, DatetimeHighlight, DatetimeHighlightCallback, DatetimeHourCycle, FormatOptions } from './datetime-interface';
|
|
4
4
|
/**
|
|
5
5
|
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
6
6
|
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
|
@@ -32,6 +32,11 @@ import type { DatetimePresentation, DatetimeChangeEventDetail, DatetimeParts, Ti
|
|
|
32
32
|
* @part calendar-day today - The calendar day that contains the current day.
|
|
33
33
|
* @part calendar-day disabled - The calendar day that is disabled.
|
|
34
34
|
*
|
|
35
|
+
* @part range-start - The calendar day button that is the start of a range selection.
|
|
36
|
+
* @part range-end - The calendar day button that is the end of a range selection.
|
|
37
|
+
* @part range-selection - The calendar day button that is part of a range selection (includes start and end).
|
|
38
|
+
* @part range-track - The track that connects the start and end days of a range selection.
|
|
39
|
+
*
|
|
35
40
|
* @part datetime-header - The datetime header contains the content for the `title` slot and the selected date.
|
|
36
41
|
* @part datetime-title - The element that contains the `title` slot content.
|
|
37
42
|
* @part datetime-selected-date - The element that contains the selected date.
|
|
@@ -47,6 +52,11 @@ export declare class Datetime implements ComponentInterface {
|
|
|
47
52
|
private parsedMonthValues?;
|
|
48
53
|
private parsedYearValues?;
|
|
49
54
|
private parsedDayValues?;
|
|
55
|
+
/**
|
|
56
|
+
* Set when the user completes a range interactively, so processValue
|
|
57
|
+
* can skip navigation and keep the calendar on the current month.
|
|
58
|
+
*/
|
|
59
|
+
private rangeCompletedInteractively;
|
|
50
60
|
private destroyCalendarListener?;
|
|
51
61
|
private destroyKeyboardMO?;
|
|
52
62
|
private destroyOverlayPresentListener?;
|
|
@@ -65,7 +75,7 @@ export declare class Datetime implements ComponentInterface {
|
|
|
65
75
|
private prevPresentation;
|
|
66
76
|
private resolveForceDateScrolling?;
|
|
67
77
|
showMonthAndYear: boolean;
|
|
68
|
-
activeParts: DatetimeParts | DatetimeParts[];
|
|
78
|
+
activeParts: DatetimeParts | DatetimeParts[] | DatetimeRangeParts;
|
|
69
79
|
workingParts: DatetimeParts;
|
|
70
80
|
el: HTMLIonDatetimeElement;
|
|
71
81
|
isTimePopoverOpen: boolean;
|
|
@@ -155,6 +165,16 @@ export declare class Datetime implements ComponentInterface {
|
|
|
155
165
|
presentation: DatetimePresentation;
|
|
156
166
|
protected presentationChanged(): void;
|
|
157
167
|
private get isGridStyle();
|
|
168
|
+
private get isMultipleMode();
|
|
169
|
+
private get isRangeMode();
|
|
170
|
+
/**
|
|
171
|
+
* Type guard: returns true if the given activeParts is a DatetimeRangeParts object.
|
|
172
|
+
*/
|
|
173
|
+
private isRangeParts;
|
|
174
|
+
/**
|
|
175
|
+
* Returns the current range parts if in range mode, or undefined otherwise.
|
|
176
|
+
*/
|
|
177
|
+
private get rangeParts();
|
|
158
178
|
/**
|
|
159
179
|
* The text to display on the picker's cancel button.
|
|
160
180
|
*/
|
|
@@ -238,8 +258,31 @@ export declare class Datetime implements ComponentInterface {
|
|
|
238
258
|
/**
|
|
239
259
|
* If `true`, multiple dates can be selected at once. Only
|
|
240
260
|
* applies to `presentation="date"` and `preferWheel="false"`.
|
|
261
|
+
*
|
|
262
|
+
* @deprecated Use `selectionMode="multiple"` instead.
|
|
241
263
|
*/
|
|
242
264
|
multiple: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Controls the date selection behavior.
|
|
267
|
+
* `'multiple'` enables selecting multiple individual dates.
|
|
268
|
+
* `'range'` enables selecting a start and end date range.
|
|
269
|
+
* When unset, single-date selection is used.
|
|
270
|
+
*
|
|
271
|
+
* Range selection only works with `presentation="date"` and `preferWheel="false"`.
|
|
272
|
+
*/
|
|
273
|
+
selectionMode?: 'multiple' | 'range';
|
|
274
|
+
/**
|
|
275
|
+
* The text shown in the datetime header when the start of the range
|
|
276
|
+
* is empty, also used by screen readers to announce the start date.
|
|
277
|
+
* Only applies when `selectionMode="range"`.
|
|
278
|
+
*/
|
|
279
|
+
startDateLabel: string;
|
|
280
|
+
/**
|
|
281
|
+
* The text shown in the datetime header when the end of the range
|
|
282
|
+
* is empty, also used by screen readers to announce the end date.
|
|
283
|
+
* Only applies when `selectionMode="range"`.
|
|
284
|
+
*/
|
|
285
|
+
endDateLabel: string;
|
|
243
286
|
/**
|
|
244
287
|
* Used to apply custom text and background colors to specific dates.
|
|
245
288
|
*
|
|
@@ -400,7 +443,23 @@ export declare class Datetime implements ComponentInterface {
|
|
|
400
443
|
private getActivePart;
|
|
401
444
|
private closeParentOverlay;
|
|
402
445
|
private setWorkingParts;
|
|
446
|
+
/**
|
|
447
|
+
* Checks whether the span from start to end contains any disabled day.
|
|
448
|
+
* Used by range mode to prevent selecting across disabled dates.
|
|
449
|
+
*/
|
|
450
|
+
private rangeContainsDisabledDate;
|
|
403
451
|
private setActiveParts;
|
|
452
|
+
/**
|
|
453
|
+
* Handles range selection logic when a day is clicked.
|
|
454
|
+
*
|
|
455
|
+
* Creating a new range: first click sets start, second sets end.
|
|
456
|
+
* Modifying an existing range:
|
|
457
|
+
* - Before range → new start
|
|
458
|
+
* - Within range → new end
|
|
459
|
+
* - After range → new end
|
|
460
|
+
* If the resulting span contains a disabled date, start a new range instead.
|
|
461
|
+
*/
|
|
462
|
+
private setActivePartsRange;
|
|
404
463
|
private get isCalendarPicker();
|
|
405
464
|
private initializeKeyboardListeners;
|
|
406
465
|
private focusWorkingDay;
|
|
@@ -488,6 +547,16 @@ export declare class Datetime implements ComponentInterface {
|
|
|
488
547
|
private renderTimeLabel;
|
|
489
548
|
private renderTimeOverlay;
|
|
490
549
|
private getHeaderSelectedDateText;
|
|
550
|
+
/**
|
|
551
|
+
* Returns the formatted range header text.
|
|
552
|
+
* Shows "Start date - End date" with placeholders from startDateLabel/endDateLabel.
|
|
553
|
+
*/
|
|
554
|
+
private getRangeHeaderText;
|
|
555
|
+
/**
|
|
556
|
+
* Returns the current range value as an ISO string array for
|
|
557
|
+
* titleSelectedDatesFormatter and ionChange.
|
|
558
|
+
*/
|
|
559
|
+
private getRangeValueArray;
|
|
491
560
|
private renderHeader;
|
|
492
561
|
/**
|
|
493
562
|
* Render time picker inside of datetime.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DatetimeHighlight, DatetimeHighlightCallback, DatetimeHighlightStyle, DatetimeParts } from '../datetime-interface';
|
|
1
|
+
import type { DatetimeHighlight, DatetimeHighlightCallback, DatetimeHighlightStyle, DatetimeParts, DatetimeRangeParts } from '../datetime-interface';
|
|
2
2
|
export declare const isYearDisabled: (refYear: number, minParts?: DatetimeParts, maxParts?: DatetimeParts) => boolean;
|
|
3
3
|
/**
|
|
4
4
|
* Returns true if a given day should
|
|
@@ -10,10 +10,13 @@ export declare const isDayDisabled: (refParts: DatetimeParts, minParts?: Datetim
|
|
|
10
10
|
* Given a locale, a date, the selected date(s), and today's date,
|
|
11
11
|
* generate the state for a given calendar day button.
|
|
12
12
|
*/
|
|
13
|
-
export declare const getCalendarDayState: (locale: string, refParts: DatetimeParts, activeParts: DatetimeParts | DatetimeParts[], todayParts: DatetimeParts, minParts?: DatetimeParts, maxParts?: DatetimeParts, dayValues?: number[]) => {
|
|
13
|
+
export declare const getCalendarDayState: (locale: string, refParts: DatetimeParts, activeParts: DatetimeParts | DatetimeParts[], todayParts: DatetimeParts, minParts?: DatetimeParts, maxParts?: DatetimeParts, dayValues?: number[], rangeParts?: DatetimeRangeParts) => {
|
|
14
14
|
disabled: boolean;
|
|
15
15
|
isActive: boolean;
|
|
16
16
|
isToday: boolean;
|
|
17
|
+
isRangeStart: boolean;
|
|
18
|
+
isRangeEnd: boolean;
|
|
19
|
+
isInRange: boolean;
|
|
17
20
|
ariaSelected: string | null;
|
|
18
21
|
ariaLabel: string | null;
|
|
19
22
|
text: string | null;
|
|
@@ -1162,6 +1162,11 @@ export namespace Components {
|
|
|
1162
1162
|
* @default 'Done'
|
|
1163
1163
|
*/
|
|
1164
1164
|
"doneText": string;
|
|
1165
|
+
/**
|
|
1166
|
+
* The text shown in the datetime header when the end of the range is empty, also used by screen readers to announce the end date. Only applies when `selectionMode="range"`.
|
|
1167
|
+
* @default 'End date'
|
|
1168
|
+
*/
|
|
1169
|
+
"endDateLabel": string;
|
|
1165
1170
|
/**
|
|
1166
1171
|
* The first day of the week to use for `ion-datetime`. The default value is `0` and represents Sunday.
|
|
1167
1172
|
* @default 0
|
|
@@ -1218,6 +1223,7 @@ export namespace Components {
|
|
|
1218
1223
|
"monthValues"?: number[] | number | string;
|
|
1219
1224
|
/**
|
|
1220
1225
|
* If `true`, multiple dates can be selected at once. Only applies to `presentation="date"` and `preferWheel="false"`.
|
|
1226
|
+
* @deprecated Use `selectionMode="multiple"` instead.
|
|
1221
1227
|
* @default false
|
|
1222
1228
|
*/
|
|
1223
1229
|
"multiple": boolean;
|
|
@@ -1246,6 +1252,10 @@ export namespace Components {
|
|
|
1246
1252
|
* @param startDate A valid [ISO-8601 string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format) to reset the datetime state to.
|
|
1247
1253
|
*/
|
|
1248
1254
|
"reset": (startDate?: string) => Promise<void>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Controls the date selection behavior. `'multiple'` enables selecting multiple individual dates. `'range'` enables selecting a start and end date range. When unset, single-date selection is used. Range selection only works with `presentation="date"` and `preferWheel="false"`.
|
|
1257
|
+
*/
|
|
1258
|
+
"selectionMode"?: 'multiple' | 'range';
|
|
1249
1259
|
/**
|
|
1250
1260
|
* If `true`, the datetime calendar displays a six-week (42-day) layout, including days from the previous and next months to fill the grid. These adjacent days are selectable unless disabled.
|
|
1251
1261
|
* @default false
|
|
@@ -1276,6 +1286,11 @@ export namespace Components {
|
|
|
1276
1286
|
* @default 'fixed'
|
|
1277
1287
|
*/
|
|
1278
1288
|
"size": 'cover' | 'fixed';
|
|
1289
|
+
/**
|
|
1290
|
+
* The text shown in the datetime header when the start of the range is empty, also used by screen readers to announce the start date. Only applies when `selectionMode="range"`.
|
|
1291
|
+
* @default 'Start date'
|
|
1292
|
+
*/
|
|
1293
|
+
"startDateLabel": string;
|
|
1279
1294
|
/**
|
|
1280
1295
|
* The theme determines the visual appearance of the component.
|
|
1281
1296
|
*/
|
|
@@ -7044,6 +7059,11 @@ declare namespace LocalJSX {
|
|
|
7044
7059
|
* @default 'Done'
|
|
7045
7060
|
*/
|
|
7046
7061
|
"doneText"?: string;
|
|
7062
|
+
/**
|
|
7063
|
+
* The text shown in the datetime header when the end of the range is empty, also used by screen readers to announce the end date. Only applies when `selectionMode="range"`.
|
|
7064
|
+
* @default 'End date'
|
|
7065
|
+
*/
|
|
7066
|
+
"endDateLabel"?: string;
|
|
7047
7067
|
/**
|
|
7048
7068
|
* The first day of the week to use for `ion-datetime`. The default value is `0` and represents Sunday.
|
|
7049
7069
|
* @default 0
|
|
@@ -7096,6 +7116,7 @@ declare namespace LocalJSX {
|
|
|
7096
7116
|
"monthValues"?: number[] | number | string;
|
|
7097
7117
|
/**
|
|
7098
7118
|
* If `true`, multiple dates can be selected at once. Only applies to `presentation="date"` and `preferWheel="false"`.
|
|
7119
|
+
* @deprecated Use `selectionMode="multiple"` instead.
|
|
7099
7120
|
* @default false
|
|
7100
7121
|
*/
|
|
7101
7122
|
"multiple"?: boolean;
|
|
@@ -7135,6 +7156,10 @@ declare namespace LocalJSX {
|
|
|
7135
7156
|
* @default false
|
|
7136
7157
|
*/
|
|
7137
7158
|
"readonly"?: boolean;
|
|
7159
|
+
/**
|
|
7160
|
+
* Controls the date selection behavior. `'multiple'` enables selecting multiple individual dates. `'range'` enables selecting a start and end date range. When unset, single-date selection is used. Range selection only works with `presentation="date"` and `preferWheel="false"`.
|
|
7161
|
+
*/
|
|
7162
|
+
"selectionMode"?: 'multiple' | 'range';
|
|
7138
7163
|
/**
|
|
7139
7164
|
* If `true`, the datetime calendar displays a six-week (42-day) layout, including days from the previous and next months to fill the grid. These adjacent days are selectable unless disabled.
|
|
7140
7165
|
* @default false
|
|
@@ -7165,6 +7190,11 @@ declare namespace LocalJSX {
|
|
|
7165
7190
|
* @default 'fixed'
|
|
7166
7191
|
*/
|
|
7167
7192
|
"size"?: 'cover' | 'fixed';
|
|
7193
|
+
/**
|
|
7194
|
+
* The text shown in the datetime header when the start of the range is empty, also used by screen readers to announce the start date. Only applies when `selectionMode="range"`.
|
|
7195
|
+
* @default 'Start date'
|
|
7196
|
+
*/
|
|
7197
|
+
"startDateLabel"?: string;
|
|
7168
7198
|
/**
|
|
7169
7199
|
* The theme determines the visual appearance of the component.
|
|
7170
7200
|
*/
|
|
@@ -10545,6 +10575,9 @@ declare namespace LocalJSX {
|
|
|
10545
10575
|
"locale": string;
|
|
10546
10576
|
"firstDayOfWeek": number;
|
|
10547
10577
|
"multiple": boolean;
|
|
10578
|
+
"selectionMode": 'multiple' | 'range';
|
|
10579
|
+
"startDateLabel": string;
|
|
10580
|
+
"endDateLabel": string;
|
|
10548
10581
|
"value": string | string[] | null;
|
|
10549
10582
|
"showDefaultTitle": boolean;
|
|
10550
10583
|
"showDefaultButtons": boolean;
|