@ionic/core 8.5.4-dev.11744209290.123af9eb → 8.5.4-dev.11744646756.1244bf71
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/data.js +29 -4
- package/components/ion-datetime.js +70 -28
- package/components/ion-toggle.js +11 -4
- package/dist/cjs/{app-globals-Di9ZJzjm.js → app-globals-CSpnImi2.js} +1 -1
- package/dist/cjs/{button-active-BlMN9Iyq.js → button-active-BzpKQ5zN.js} +1 -1
- package/dist/cjs/{data-DlPf8ZXm.js → data-BQSLLJwc.js} +30 -5
- package/dist/cjs/{hardware-back-button-lTgcqUpk.js → hardware-back-button-B0yu2YGK.js} +2 -2
- package/dist/cjs/{index-BE9YH63j.js → index-04WNNW0S.js} +5 -5
- package/dist/cjs/{index-CquwaYOd.js → index-3N0K8CTt.js} +1 -1
- package/dist/cjs/{index-CXThGkw7.js → index-BjVGGb_k.js} +3 -3
- package/dist/cjs/{index-rYFHa7ZR.js → index-D7kGM2E_.js} +1 -1
- package/dist/cjs/{index-BVfbh2cJ.js → index-qOuhvt-6.js} +18 -1
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/{input-shims-DA_nJulF.js → input-shims-B23RZ_yw.js} +4 -4
- package/dist/cjs/{input.utils-UHOCoNWM.js → input.utils-BvrpMdKU.js} +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +6 -6
- package/dist/cjs/ion-alert.cjs.entry.js +6 -6
- package/dist/cjs/ion-app_8.cjs.entry.js +9 -9
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-button_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
- package/dist/cjs/ion-datetime_3.cjs.entry.js +75 -34
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ion-input.cjs.entry.js +4 -4
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +5 -5
- package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-modal.cjs.entry.js +7 -7
- package/dist/cjs/ion-nav_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-column.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +6 -6
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +4 -4
- package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select-modal.cjs.entry.js +5 -5
- package/dist/cjs/ion-select_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +4 -4
- package/dist/cjs/ion-toast.cjs.entry.js +5 -5
- package/dist/cjs/ion-toggle.cjs.entry.js +12 -5
- package/dist/cjs/{ionic-global-AdqEvgj6.js → ionic-global-D0fKFhpt.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-B8HcmmPx.js → ios.transition-Cyrk-CkT.js} +4 -4
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-54O0AjJC.js → md.transition-Bh2J94f4.js} +4 -4
- package/dist/cjs/{overlays-CSyZW4m0.js → overlays-hvRku41m.js} +3 -3
- package/dist/cjs/{status-tap-B1Kcv7yf.js → status-tap-EJ9Sb5hb.js} +4 -4
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/datetime/datetime.ios.css +7 -2
- package/dist/collection/components/datetime/datetime.js +87 -26
- package/dist/collection/components/datetime/datetime.md.css +9 -3
- package/dist/collection/components/datetime/utils/data.js +29 -4
- package/dist/collection/components/toggle/toggle.js +11 -3
- package/dist/docs.json +26 -2
- package/dist/esm/{app-globals-CispSZgz.js → app-globals-C0a0o4Av.js} +1 -1
- package/dist/esm/{button-active-D92yWoWC.js → button-active-BQqkZ_sm.js} +1 -1
- package/dist/esm/{data-Dq3-TN9Z.js → data-omKWOMer.js} +30 -5
- package/dist/esm/{hardware-back-button-CRemSDoj.js → hardware-back-button-RMajLSrZ.js} +2 -2
- package/dist/esm/{index-DYJvRcE0.js → index-BKfOgUuW.js} +5 -5
- package/dist/esm/{index-DZLiflRE.js → index-C7r3mIlB.js} +3 -3
- package/dist/esm/{index-DWiwgv23.js → index-CDohRbVJ.js} +1 -1
- package/dist/esm/{index-PfJyigSK.js → index-DR2njD_q.js} +1 -1
- package/dist/esm/{index-C5UXyyFe.js → index-EP3pwcdb.js} +18 -1
- package/dist/esm/index.js +9 -9
- package/dist/esm/{input-shims-BL_oixbH.js → input-shims-Clcc9pEO.js} +4 -4
- package/dist/esm/{input.utils-Bd73EHpQ.js → input.utils-BeGXuyDm.js} +1 -1
- package/dist/esm/ion-accordion_2.entry.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +6 -6
- package/dist/esm/ion-alert.entry.js +6 -6
- package/dist/esm/ion-app_8.entry.js +9 -9
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
- package/dist/esm/ion-button_2.entry.js +3 -3
- package/dist/esm/ion-card_5.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +4 -4
- package/dist/esm/ion-datetime_3.entry.js +75 -34
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +4 -4
- package/dist/esm/ion-input-password-toggle.entry.js +3 -3
- package/dist/esm/ion-input.entry.js +4 -4
- package/dist/esm/ion-item-option_3.entry.js +4 -4
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +5 -5
- package/dist/esm/ion-menu_3.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +7 -7
- package/dist/esm/ion-nav_2.entry.js +4 -4
- package/dist/esm/ion-picker-column-option.entry.js +2 -2
- package/dist/esm/ion-picker-column.entry.js +2 -2
- package/dist/esm/ion-picker.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +6 -6
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +4 -4
- package/dist/esm/ion-refresher_2.entry.js +4 -4
- package/dist/esm/ion-reorder_2.entry.js +4 -4
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select-modal.entry.js +5 -5
- package/dist/esm/ion-select_3.entry.js +5 -5
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +4 -4
- package/dist/esm/ion-toast.entry.js +5 -5
- package/dist/esm/ion-toggle.entry.js +12 -5
- package/dist/esm/{ionic-global-GkM1xiqt.js → ionic-global-CrB2BPUW.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition-BcTzvx5_.js → ios.transition-BObaMu_w.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-DYGWIgPE.js → md.transition-BYk9oj5T.js} +4 -4
- package/dist/esm/{overlays-BuSzwtlC.js → overlays-DUDTB6a2.js} +3 -3
- package/dist/esm/{status-tap-BPk7Ddsi.js → status-tap-Az5SFsVV.js} +4 -4
- package/dist/html.html-data.json +4 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-49b72347.entry.js → p-006975c7.entry.js} +1 -1
- package/dist/ionic/{p-e01503b2.entry.js → p-00acbe36.entry.js} +1 -1
- package/dist/ionic/p-03abd858.entry.js +4 -0
- package/dist/ionic/{p-6a8928b1.entry.js → p-141822bc.entry.js} +1 -1
- package/dist/ionic/p-17e8ff6b.entry.js +4 -0
- package/dist/ionic/{p-879a7b00.entry.js → p-189c7fe9.entry.js} +1 -1
- package/dist/ionic/{p-72d7dd7c.entry.js → p-18b4709f.entry.js} +1 -1
- package/dist/ionic/{p-171d5d3e.entry.js → p-1bea6291.entry.js} +1 -1
- package/dist/ionic/{p-9ca05f27.entry.js → p-1f3d9d38.entry.js} +1 -1
- package/dist/ionic/{p-9d8be89a.entry.js → p-20b45b04.entry.js} +1 -1
- package/dist/ionic/{p-7deacfed.entry.js → p-2959ef70.entry.js} +1 -1
- package/dist/ionic/{p-ccbc5737.entry.js → p-2b9a91c2.entry.js} +1 -1
- package/dist/ionic/{p-a8506291.entry.js → p-2c58164d.entry.js} +1 -1
- package/dist/ionic/{p-6d4f1c6e.entry.js → p-2d142503.entry.js} +1 -1
- package/dist/ionic/{p-930ec949.entry.js → p-3129a2c6.entry.js} +1 -1
- package/dist/ionic/{p-3628b1f7.entry.js → p-3a5bc7b1.entry.js} +1 -1
- package/dist/ionic/{p-b3485dee.entry.js → p-40e55257.entry.js} +1 -1
- package/dist/ionic/{p-841761ee.entry.js → p-45f3c7d9.entry.js} +1 -1
- package/dist/ionic/{p-6f5d9223.entry.js → p-46f82b82.entry.js} +1 -1
- package/dist/ionic/p-47ccb59d.entry.js +4 -0
- package/dist/ionic/{p-9d7d6758.entry.js → p-4bd5bd61.entry.js} +1 -1
- package/dist/ionic/{p-414f60f0.entry.js → p-52043361.entry.js} +1 -1
- package/dist/ionic/{p-8ca2b22c.entry.js → p-527660e0.entry.js} +1 -1
- package/dist/ionic/{p-2a2ab89d.entry.js → p-601f0d27.entry.js} +1 -1
- package/dist/ionic/{p-ddc1c497.entry.js → p-644759cb.entry.js} +1 -1
- package/dist/ionic/{p-c0634ff3.entry.js → p-657e9085.entry.js} +1 -1
- package/dist/ionic/{p-10f11601.entry.js → p-67178c9b.entry.js} +1 -1
- package/dist/ionic/{p-a1581941.entry.js → p-67b4c53d.entry.js} +1 -1
- package/dist/ionic/p-6cab60b7.entry.js +4 -0
- package/dist/ionic/{p-92aed080.entry.js → p-6ceef433.entry.js} +1 -1
- package/dist/ionic/{p-85d22d84.entry.js → p-6d8983d1.entry.js} +1 -1
- package/dist/ionic/{p-10e11b67.entry.js → p-79851759.entry.js} +1 -1
- package/dist/ionic/{p-d3ee5846.entry.js → p-7cdee842.entry.js} +1 -1
- package/dist/ionic/{p-52eca165.entry.js → p-7d026411.entry.js} +1 -1
- package/dist/ionic/{p-a3ec5708.entry.js → p-7d4b2506.entry.js} +1 -1
- package/dist/ionic/{p-fc3eb210.entry.js → p-8b6eb546.entry.js} +1 -1
- package/dist/ionic/{p-d7a76cd0.entry.js → p-8fc1959d.entry.js} +1 -1
- package/dist/ionic/{p-261e3a47.entry.js → p-9092b7fb.entry.js} +1 -1
- package/dist/ionic/{p-b8a159eb.entry.js → p-9cac4dc7.entry.js} +1 -1
- package/dist/ionic/{p-06d06c2f.entry.js → p-9fe56809.entry.js} +1 -1
- package/dist/ionic/{p-CeCT60rb.js → p-C-oNjncL.js} +1 -1
- package/dist/ionic/{p-B1sP_kPm.js → p-C-xl6pej.js} +1 -1
- package/dist/ionic/p-C5Aon1Kb.js +4 -0
- package/dist/ionic/{p-CdKu7oC9.js → p-Cg19OPuo.js} +1 -1
- package/dist/ionic/{p-CdWpy93z.js → p-CwbsDRzJ.js} +1 -1
- package/dist/ionic/p-D0SqsSaH.js +4 -0
- package/dist/ionic/p-DCi8BSH3.js +4 -0
- package/dist/ionic/{p-BTEIaRld.js → p-DGw3g412.js} +1 -1
- package/dist/ionic/{p-lw61HGQ-.js → p-DSMkBmnY.js} +1 -1
- package/dist/ionic/{p-B3UoCFcu.js → p-D_2UPtUV.js} +1 -1
- package/dist/ionic/{p-CiN6q3Lh.js → p-DonNC93r.js} +1 -1
- package/dist/ionic/p-EP3pwcdb.js +5 -0
- package/dist/ionic/{p-XWSYNdC9.js → p-HRylM0tf.js} +1 -1
- package/dist/ionic/{p-C3eOXAUO.js → p-RyPJq84W.js} +1 -1
- package/dist/ionic/{p-B8iLKNde.js → p-Uz6zKimy.js} +1 -1
- package/dist/ionic/{p-210385cd.entry.js → p-a5570370.entry.js} +1 -1
- package/dist/ionic/{p-2469206a.entry.js → p-a5ee3eb8.entry.js} +1 -1
- package/dist/ionic/{p-a951373a.entry.js → p-a92657fc.entry.js} +1 -1
- package/dist/ionic/{p-d6a3361a.entry.js → p-a9997b1b.entry.js} +1 -1
- package/dist/ionic/{p-d85dfc51.entry.js → p-b1f3c158.entry.js} +1 -1
- package/dist/ionic/{p-a1767652.entry.js → p-be19e061.entry.js} +1 -1
- package/dist/ionic/{p-49419ffd.entry.js → p-c5157026.entry.js} +1 -1
- package/dist/ionic/{p-bb3cf0f1.entry.js → p-c6e0f544.entry.js} +1 -1
- package/dist/ionic/{p-2f416d26.entry.js → p-e116bb40.entry.js} +1 -1
- package/dist/ionic/{p-75959e43.entry.js → p-e8526b09.entry.js} +1 -1
- package/dist/ionic/{p-dcf2e017.entry.js → p-f1f6326a.entry.js} +1 -1
- package/dist/ionic/{p-B61pJgh5.js → p-uzIBoXdl.js} +1 -1
- package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
- package/dist/types/components/datetime/datetime.d.ts +6 -0
- package/dist/types/components/datetime/utils/data.d.ts +3 -1
- package/dist/types/components/datetime/utils/manipulation.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +143 -39
- package/hydrate/index.mjs +143 -39
- package/package.json +2 -2
- package/dist/ionic/p-3bd766ca.entry.js +0 -4
- package/dist/ionic/p-76878c5f.entry.js +0 -4
- package/dist/ionic/p-8e57bbf1.entry.js +0 -4
- package/dist/ionic/p-BwAZiDRk.js +0 -4
- package/dist/ionic/p-C5UXyyFe.js +0 -5
- package/dist/ionic/p-DYo1kLGy.js +0 -4
- package/dist/ionic/p-f9c55d46.entry.js +0 -4
- package/dist/ionic/p-zEz12j4K.js +0 -4
package/components/data.js
CHANGED
|
@@ -1182,8 +1182,17 @@ const getDaysOfWeek = (locale, mode, firstDayOfWeek = 0) => {
|
|
|
1182
1182
|
* the firstDayOfWeek value (Sunday by default)
|
|
1183
1183
|
* using null values.
|
|
1184
1184
|
*/
|
|
1185
|
-
const getDaysOfMonth = (month, year, firstDayOfWeek) => {
|
|
1185
|
+
const getDaysOfMonth = (month, year, firstDayOfWeek, showAdjacentDays = false) => {
|
|
1186
1186
|
const numDays = getNumDaysInMonth(month, year);
|
|
1187
|
+
let previousNumDays; //previous month number of days
|
|
1188
|
+
if (month === 1) {
|
|
1189
|
+
// If the current month is January, the previous month should be December of the previous year.
|
|
1190
|
+
previousNumDays = getNumDaysInMonth(12, year - 1);
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
// Otherwise, the previous month should be the current month - 1 of the same year.
|
|
1194
|
+
previousNumDays = getNumDaysInMonth(month - 1, year);
|
|
1195
|
+
}
|
|
1187
1196
|
const firstOfMonth = new Date(`${month}/1/${year}`).getDay();
|
|
1188
1197
|
/**
|
|
1189
1198
|
* To get the first day of the month aligned on the correct
|
|
@@ -1207,10 +1216,26 @@ const getDaysOfMonth = (month, year, firstDayOfWeek) => {
|
|
|
1207
1216
|
const offset = firstOfMonth >= firstDayOfWeek ? firstOfMonth - (firstDayOfWeek + 1) : 6 - (firstDayOfWeek - firstOfMonth);
|
|
1208
1217
|
let days = [];
|
|
1209
1218
|
for (let i = 1; i <= numDays; i++) {
|
|
1210
|
-
days.push({ day: i, dayOfWeek: (offset + i) % 7 });
|
|
1219
|
+
days.push({ day: i, dayOfWeek: (offset + i) % 7, isAdjacentDay: false });
|
|
1220
|
+
}
|
|
1221
|
+
if (showAdjacentDays) {
|
|
1222
|
+
for (let i = 0; i <= offset; i++) {
|
|
1223
|
+
// Using offset create previous month adjacent day, starting from last day
|
|
1224
|
+
days = [{ day: previousNumDays - i, dayOfWeek: (previousNumDays - i) % 7, isAdjacentDay: true }, ...days];
|
|
1225
|
+
}
|
|
1226
|
+
// Calculate positiveOffset
|
|
1227
|
+
// The calendar will display 42 days (6 rows of 7 columns)
|
|
1228
|
+
// Knowing this the offset is 41 (we start at index 0)
|
|
1229
|
+
// minus (the previous offset + the current month days)
|
|
1230
|
+
const positiveOffset = 41 - (numDays + offset);
|
|
1231
|
+
for (let i = 0; i < positiveOffset; i++) {
|
|
1232
|
+
days.push({ day: i + 1, dayOfWeek: (numDays + offset + i) % 7, isAdjacentDay: true });
|
|
1233
|
+
}
|
|
1211
1234
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1235
|
+
else {
|
|
1236
|
+
for (let i = 0; i <= offset; i++) {
|
|
1237
|
+
days = [{ day: null, dayOfWeek: null, isAdjacentDay: false }, ...days];
|
|
1238
|
+
}
|
|
1214
1239
|
}
|
|
1215
1240
|
return days;
|
|
1216
1241
|
};
|
|
@@ -229,9 +229,9 @@ const checkForPresentationFormatMismatch = (el, presentation, formatOptions) =>
|
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
const datetimeIosCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}";
|
|
232
|
+
const datetimeIosCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}";
|
|
233
233
|
|
|
234
|
-
const datetimeMdCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}";
|
|
234
|
+
const datetimeMdCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}";
|
|
235
235
|
|
|
236
236
|
const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLElement {
|
|
237
237
|
constructor() {
|
|
@@ -256,6 +256,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
256
256
|
hour: 13,
|
|
257
257
|
minute: 52,
|
|
258
258
|
ampm: 'pm',
|
|
259
|
+
isAdjacentDay: false,
|
|
259
260
|
};
|
|
260
261
|
this.isTimePopoverOpen = false;
|
|
261
262
|
/**
|
|
@@ -276,6 +277,12 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
276
277
|
* If `true`, the datetime appears normal but the selected date cannot be changed.
|
|
277
278
|
*/
|
|
278
279
|
this.readonly = false;
|
|
280
|
+
/**
|
|
281
|
+
* If `true`, the datetime calendar displays a six-week (42-day) layout,
|
|
282
|
+
* including days from the previous and next months to fill the grid.
|
|
283
|
+
* These adjacent days are selectable unless disabled.
|
|
284
|
+
*/
|
|
285
|
+
this.showAdjacentDays = false;
|
|
279
286
|
/**
|
|
280
287
|
* Which values you want to select. `"date"` will show
|
|
281
288
|
* a calendar picker to select the month, day, and year. `"time"`
|
|
@@ -558,12 +565,15 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
558
565
|
};
|
|
559
566
|
this.focusWorkingDay = (currentMonth) => {
|
|
560
567
|
/**
|
|
561
|
-
* Get the number of
|
|
568
|
+
* Get the number of offset days so
|
|
562
569
|
* we know how much to offset our next selector by
|
|
563
570
|
* to grab the correct calendar-day element.
|
|
564
571
|
*/
|
|
565
|
-
const
|
|
566
|
-
const
|
|
572
|
+
const { day, month, year } = this.workingParts;
|
|
573
|
+
const firstOfMonth = new Date(`${month}/1/${year}`).getDay();
|
|
574
|
+
const offset = firstOfMonth >= this.firstDayOfWeek
|
|
575
|
+
? firstOfMonth - this.firstDayOfWeek
|
|
576
|
+
: 7 - (this.firstDayOfWeek - firstOfMonth);
|
|
567
577
|
if (day === null) {
|
|
568
578
|
return;
|
|
569
579
|
}
|
|
@@ -571,7 +581,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
571
581
|
* Get the calendar day element
|
|
572
582
|
* and focus it.
|
|
573
583
|
*/
|
|
574
|
-
const dayEl = currentMonth.querySelector(`.calendar-day-wrapper:nth-of-type(${
|
|
584
|
+
const dayEl = currentMonth.querySelector(`.calendar-day-wrapper:nth-of-type(${offset + day}) .calendar-day`);
|
|
575
585
|
if (dayEl) {
|
|
576
586
|
dayEl.focus();
|
|
577
587
|
}
|
|
@@ -1585,10 +1595,36 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1585
1595
|
'calendar-month': true,
|
|
1586
1596
|
// Prevents scroll snap swipe gestures for months outside of the min/max bounds
|
|
1587
1597
|
'calendar-month-disabled': !isWorkingMonth && swipeDisabled,
|
|
1588
|
-
} }, h("div", { class: "calendar-month-grid" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {
|
|
1589
|
-
const { day, dayOfWeek } = dateObject;
|
|
1590
|
-
const { el, highlightedDates, isDateEnabled, multiple } = this;
|
|
1591
|
-
|
|
1598
|
+
} }, h("div", { class: "calendar-month-grid" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7, this.showAdjacentDays).map((dateObject, index) => {
|
|
1599
|
+
const { day, dayOfWeek, isAdjacentDay } = dateObject;
|
|
1600
|
+
const { el, highlightedDates, isDateEnabled, multiple, showAdjacentDays } = this;
|
|
1601
|
+
let _month = month;
|
|
1602
|
+
let _year = year;
|
|
1603
|
+
if (showAdjacentDays && isAdjacentDay && day !== null) {
|
|
1604
|
+
if (day > 20) {
|
|
1605
|
+
// Leading with the adjacent day from the previous month
|
|
1606
|
+
// if its a adjacent day and is higher than '20' (last week even in feb)
|
|
1607
|
+
if (month === 1) {
|
|
1608
|
+
_year = year - 1;
|
|
1609
|
+
_month = 12;
|
|
1610
|
+
}
|
|
1611
|
+
else {
|
|
1612
|
+
_month = month - 1;
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
else if (day < 15) {
|
|
1616
|
+
// Leading with the adjacent day from the next month
|
|
1617
|
+
// if its a adjacent day and is lower than '15' (first two weeks)
|
|
1618
|
+
if (month === 12) {
|
|
1619
|
+
_year = year + 1;
|
|
1620
|
+
_month = 1;
|
|
1621
|
+
}
|
|
1622
|
+
else {
|
|
1623
|
+
_month = month + 1;
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
const referenceParts = { month: _month, day, year: _year, isAdjacentDay };
|
|
1592
1628
|
const isCalendarPadding = day === null;
|
|
1593
1629
|
const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, text, } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
|
|
1594
1630
|
const dateIsoString = convertDataToISO(referenceParts);
|
|
@@ -1618,15 +1654,18 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1618
1654
|
* Custom highlight styles should not override the style for selected dates,
|
|
1619
1655
|
* nor apply to "filler days" at the start of the grid.
|
|
1620
1656
|
*/
|
|
1621
|
-
if (highlightedDates !== undefined && !isActive && day !== null) {
|
|
1657
|
+
if (highlightedDates !== undefined && !isActive && day !== null && !isAdjacentDay) {
|
|
1622
1658
|
dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);
|
|
1623
1659
|
}
|
|
1624
1660
|
let dateParts = undefined;
|
|
1625
1661
|
// "Filler days" at the beginning of the grid should not get the calendar day
|
|
1626
1662
|
// CSS parts added to them
|
|
1627
|
-
if (!isCalendarPadding) {
|
|
1663
|
+
if (!isCalendarPadding && !isAdjacentDay) {
|
|
1628
1664
|
dateParts = `calendar-day${isActive ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}`;
|
|
1629
1665
|
}
|
|
1666
|
+
else if (isAdjacentDay) {
|
|
1667
|
+
dateParts = `calendar-day${isCalDayDisabled ? ' disabled' : ''}`;
|
|
1668
|
+
}
|
|
1630
1669
|
return (h("div", { class: "calendar-day-wrapper" }, h("button", {
|
|
1631
1670
|
// We need to use !important for the inline styles here because
|
|
1632
1671
|
// otherwise the CSS shadow parts will override these styles.
|
|
@@ -1639,31 +1678,33 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1639
1678
|
el.style.setProperty('color', `${dateStyle ? dateStyle.textColor : ''}`, 'important');
|
|
1640
1679
|
el.style.setProperty('background-color', `${dateStyle ? dateStyle.backgroundColor : ''}`, 'important');
|
|
1641
1680
|
}
|
|
1642
|
-
}, tabindex: "-1", "data-day": day, "data-month":
|
|
1681
|
+
}, tabindex: "-1", "data-day": day, "data-month": _month, "data-year": _year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isButtonDisabled, class: {
|
|
1643
1682
|
'calendar-day-padding': isCalendarPadding,
|
|
1644
1683
|
'calendar-day': true,
|
|
1645
1684
|
'calendar-day-active': isActive,
|
|
1646
1685
|
'calendar-day-constrained': isCalDayConstrained,
|
|
1647
1686
|
'calendar-day-today': isToday,
|
|
1687
|
+
'calendar-day-adjacent-day': isAdjacentDay,
|
|
1648
1688
|
}, part: dateParts, "aria-hidden": isCalendarPadding ? 'true' : null, "aria-selected": ariaSelected, "aria-label": ariaLabel, onClick: () => {
|
|
1649
1689
|
if (isCalendarPadding) {
|
|
1650
1690
|
return;
|
|
1651
1691
|
}
|
|
1652
|
-
|
|
1653
|
-
day,
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
this.
|
|
1658
|
-
month,
|
|
1659
|
-
day,
|
|
1660
|
-
year,
|
|
1661
|
-
}, isActive);
|
|
1692
|
+
if (isAdjacentDay) {
|
|
1693
|
+
// The user selected a day outside the current month. Ignore this button, as the month will be re-rendered.
|
|
1694
|
+
this.el.blur();
|
|
1695
|
+
this.activeParts = Object.assign(Object.assign({}, activePart), referenceParts);
|
|
1696
|
+
this.animateToDate(referenceParts);
|
|
1697
|
+
this.confirm();
|
|
1662
1698
|
}
|
|
1663
1699
|
else {
|
|
1664
|
-
this.
|
|
1665
|
-
|
|
1666
|
-
|
|
1700
|
+
this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), referenceParts));
|
|
1701
|
+
// Multiple only needs date info so we can wipe out other fields like time.
|
|
1702
|
+
if (multiple) {
|
|
1703
|
+
this.setActiveParts(referenceParts, isActive);
|
|
1704
|
+
}
|
|
1705
|
+
else {
|
|
1706
|
+
this.setActiveParts(Object.assign(Object.assign({}, activePart), referenceParts));
|
|
1707
|
+
}
|
|
1667
1708
|
}
|
|
1668
1709
|
}
|
|
1669
1710
|
}, text)));
|
|
@@ -1834,7 +1875,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1834
1875
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1835
1876
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1836
1877
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1837
|
-
return (h(Host, { key: '
|
|
1878
|
+
return (h(Host, { key: 'aa9d515bd5fda60f924bbed4f4f1c6fa7244a4a2', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1838
1879
|
[mode]: true,
|
|
1839
1880
|
['datetime-readonly']: readonly,
|
|
1840
1881
|
['datetime-disabled']: disabled,
|
|
@@ -1844,7 +1885,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1844
1885
|
[`datetime-size-${size}`]: true,
|
|
1845
1886
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1846
1887
|
[`datetime-grid`]: isGridStyle,
|
|
1847
|
-
})) }, h("div", { key: '
|
|
1888
|
+
})) }, h("div", { key: 'c85a22ea1b64ec5bf28e4d4c1567d72b6b8ce630', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1848
1889
|
}
|
|
1849
1890
|
get el() { return this; }
|
|
1850
1891
|
static get watchers() { return {
|
|
@@ -1871,6 +1912,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1871
1912
|
"formatOptions": [16, "format-options"],
|
|
1872
1913
|
"readonly": [4],
|
|
1873
1914
|
"isDateEnabled": [16, "is-date-enabled"],
|
|
1915
|
+
"showAdjacentDays": [4, "show-adjacent-days"],
|
|
1874
1916
|
"min": [1025],
|
|
1875
1917
|
"max": [1025],
|
|
1876
1918
|
"presentation": [1],
|
package/components/ion-toggle.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { i as inheritAriaAttributes, e as renderHiddenInput } from './helpers.js';
|
|
6
6
|
import { d as hapticSelection } from './haptic.js';
|
|
7
|
+
import { c as config, a as isPlatform, b as getIonMode } from './ionic-global.js';
|
|
7
8
|
import { i as isRTL } from './dir.js';
|
|
8
9
|
import { c as createColorClasses, h as hostContext } from './theme.js';
|
|
9
10
|
import { w as checkmarkOutline, x as removeOutline, y as ellipseOutline } from './index5.js';
|
|
10
|
-
import { c as config, b as getIonMode } from './ionic-global.js';
|
|
11
11
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
12
12
|
|
|
13
13
|
const toggleIosCss = ":host{-webkit-box-sizing:content-box !important;box-sizing:content-box !important;display:inline-block;position:relative;max-width:100%;outline:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-focused) input{border:2px solid #5e9ed6}:host(.toggle-disabled){pointer-events:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.toggle-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.toggle-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.toggle-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.toggle-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.toggle-label-placement-stacked) .toggle-bottom{font-size:1rem}.toggle-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.toggle-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .toggle-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .toggle-bottom .helper-text{display:none}:host(.toggle-label-placement-start) .toggle-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.toggle-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-end) .toggle-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.toggle-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.toggle-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.toggle-label-placement-stacked) .toggle-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.toggle-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).toggle-label-placement-stacked.toggle-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).toggle-label-placement-stacked.toggle-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.toggle-justify-space-between) .toggle-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.toggle-justify-start) .toggle-wrapper{-ms-flex-pack:start;justify-content:start}:host(.toggle-justify-end) .toggle-wrapper{-ms-flex-pack:end;justify-content:end}:host(.toggle-alignment-start) .toggle-wrapper{-ms-flex-align:start;align-items:start}:host(.toggle-alignment-center) .toggle-wrapper{-ms-flex-align:center;align-items:center}:host(.toggle-justify-space-between),:host(.toggle-justify-start),:host(.toggle-justify-end),:host(.toggle-alignment-start),:host(.toggle-alignment-center){display:block}.toggle-icon-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;-webkit-transition:var(--handle-transition);transition:var(--handle-transition);will-change:transform}.toggle-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;background:var(--track-background);overflow:inherit}:host(.toggle-checked) .toggle-icon{background:var(--track-background-checked)}.toggle-inner{border-radius:var(--handle-border-radius);position:absolute;left:var(--handle-spacing);width:var(--handle-width);height:var(--handle-height);max-height:var(--handle-max-height);-webkit-transition:var(--handle-transition);transition:var(--handle-transition);background:var(--handle-background);-webkit-box-shadow:var(--handle-box-shadow);box-shadow:var(--handle-box-shadow);contain:strict}:host(.toggle-ltr) .toggle-inner{left:var(--handle-spacing)}:host(.toggle-rtl) .toggle-inner{right:var(--handle-spacing)}:host(.toggle-ltr.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width)), 0, 0);transform:translate3d(calc(100% - var(--handle-width)), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width)), 0, 0);transform:translate3d(calc(-100% + var(--handle-width)), 0, 0)}:host(.toggle-checked) .toggle-inner{background:var(--handle-background-checked)}:host(.toggle-ltr.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0)}:host{--track-background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.088);--track-background-checked:var(--ion-color-primary, #0054e9);--border-radius:15.5px;--handle-background:#ffffff;--handle-background-checked:#ffffff;--handle-border-radius:25.5px;--handle-box-shadow:0 3px 4px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.06);--handle-height:calc(31px - (2px * 2));--handle-max-height:calc(100% - var(--handle-spacing) * 2);--handle-width:calc(31px - (2px * 2));--handle-spacing:2px;--handle-transition:transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms, right 110ms ease-in-out 80ms}.native-wrapper .toggle-icon{width:51px;height:31px;overflow:hidden}:host(.ion-color.toggle-checked) .toggle-icon{background:var(--ion-color-base)}:host(.toggle-activated) .toggle-switch-icon{opacity:0}.toggle-icon{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:background-color 300ms;transition:background-color 300ms}.toggle-inner{will-change:transform}.toggle-switch-icon{position:absolute;top:50%;width:11px;height:11px;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:opacity 300ms, color 300ms;transition:opacity 300ms, color 300ms}.toggle-switch-icon{position:absolute;color:var(--ion-color-dark, #222428)}:host(.toggle-ltr) .toggle-switch-icon{right:6px}:host(.toggle-rtl) .toggle-switch-icon{right:initial;left:6px;}:host(.toggle-checked) .toggle-switch-icon.toggle-switch-icon-checked{color:var(--ion-color-contrast, #fff)}:host(.toggle-checked) .toggle-switch-icon:not(.toggle-switch-icon-checked){opacity:0}.toggle-switch-icon-checked{position:absolute;width:15px;height:15px;-webkit-transform:translateY(-50%) rotate(90deg);transform:translateY(-50%) rotate(90deg)}:host(.toggle-ltr) .toggle-switch-icon-checked{right:initial;left:4px;}:host(.toggle-rtl) .toggle-switch-icon-checked{right:4px}:host(.toggle-activated) .toggle-icon::before,:host(.toggle-checked) .toggle-icon::before{-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0)}:host(.toggle-activated.toggle-checked) .toggle-inner::before{-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0)}:host(.toggle-activated) .toggle-inner{width:calc(var(--handle-width) + 6px)}:host(.toggle-ltr.toggle-activated.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0);transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0)}:host(.toggle-rtl.toggle-activated.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0);transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0)}:host(.toggle-disabled){opacity:0.3}";
|
|
@@ -84,12 +84,19 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
this.onClick = (ev) => {
|
|
87
|
+
/**
|
|
88
|
+
* The haptics for the toggle on tap is
|
|
89
|
+
* an iOS-only feature. As such, it should
|
|
90
|
+
* only trigger on iOS.
|
|
91
|
+
*/
|
|
92
|
+
const enableHaptics = isPlatform('ios');
|
|
87
93
|
if (this.disabled) {
|
|
88
94
|
return;
|
|
89
95
|
}
|
|
90
96
|
ev.preventDefault();
|
|
91
97
|
if (this.lastDrag + 300 < Date.now()) {
|
|
92
98
|
this.toggleChecked();
|
|
99
|
+
enableHaptics && hapticSelection();
|
|
93
100
|
}
|
|
94
101
|
};
|
|
95
102
|
this.onFocus = () => {
|
|
@@ -217,7 +224,7 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
217
224
|
const value = this.getValue();
|
|
218
225
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
219
226
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
220
|
-
return (h(Host, { key: '
|
|
227
|
+
return (h(Host, { key: '4aaa06d203551c3044e9917ea0c4e5d293bf97bc', "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, onClick: this.onClick, class: createColorClasses(color, {
|
|
221
228
|
[mode]: true,
|
|
222
229
|
'in-item': hostContext('ion-item', el),
|
|
223
230
|
'toggle-activated': activated,
|
|
@@ -227,10 +234,10 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
227
234
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
228
235
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
229
236
|
[`toggle-${rtl}`]: true,
|
|
230
|
-
}) }, h("label", { key: '
|
|
237
|
+
}) }, h("label", { key: 'c8474c9c44ec6130e6380791b74c2b6ce1c0f9e4', class: "toggle-wrapper" }, h("input", Object.assign({ key: '6f9ba22ffeb1660e4238a98bdbb8dc4bcce3f229', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, this.inheritedAttributes)), h("div", { key: '6e980fae20ae17e3c879c555155a16a974726527', class: {
|
|
231
238
|
'label-text-wrapper': true,
|
|
232
239
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
233
|
-
}, part: "label" }, h("slot", { key: '
|
|
240
|
+
}, part: "label" }, h("slot", { key: '2a5bc3c46ca0983c86bd1b7497f153c389e6d01f' }), this.renderHintText()), h("div", { key: '3e99e2ba44cb2bade251f723e78165e21261598c', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
234
241
|
}
|
|
235
242
|
get el() { return this; }
|
|
236
243
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-D7kGM2E_.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns true if the selected day is equal to the reference day
|
|
@@ -1184,8 +1184,17 @@ const getDaysOfWeek = (locale, mode, firstDayOfWeek = 0) => {
|
|
|
1184
1184
|
* the firstDayOfWeek value (Sunday by default)
|
|
1185
1185
|
* using null values.
|
|
1186
1186
|
*/
|
|
1187
|
-
const getDaysOfMonth = (month, year, firstDayOfWeek) => {
|
|
1187
|
+
const getDaysOfMonth = (month, year, firstDayOfWeek, showAdjacentDays = false) => {
|
|
1188
1188
|
const numDays = getNumDaysInMonth(month, year);
|
|
1189
|
+
let previousNumDays; //previous month number of days
|
|
1190
|
+
if (month === 1) {
|
|
1191
|
+
// If the current month is January, the previous month should be December of the previous year.
|
|
1192
|
+
previousNumDays = getNumDaysInMonth(12, year - 1);
|
|
1193
|
+
}
|
|
1194
|
+
else {
|
|
1195
|
+
// Otherwise, the previous month should be the current month - 1 of the same year.
|
|
1196
|
+
previousNumDays = getNumDaysInMonth(month - 1, year);
|
|
1197
|
+
}
|
|
1189
1198
|
const firstOfMonth = new Date(`${month}/1/${year}`).getDay();
|
|
1190
1199
|
/**
|
|
1191
1200
|
* To get the first day of the month aligned on the correct
|
|
@@ -1209,10 +1218,26 @@ const getDaysOfMonth = (month, year, firstDayOfWeek) => {
|
|
|
1209
1218
|
const offset = firstOfMonth >= firstDayOfWeek ? firstOfMonth - (firstDayOfWeek + 1) : 6 - (firstDayOfWeek - firstOfMonth);
|
|
1210
1219
|
let days = [];
|
|
1211
1220
|
for (let i = 1; i <= numDays; i++) {
|
|
1212
|
-
days.push({ day: i, dayOfWeek: (offset + i) % 7 });
|
|
1221
|
+
days.push({ day: i, dayOfWeek: (offset + i) % 7, isAdjacentDay: false });
|
|
1222
|
+
}
|
|
1223
|
+
if (showAdjacentDays) {
|
|
1224
|
+
for (let i = 0; i <= offset; i++) {
|
|
1225
|
+
// Using offset create previous month adjacent day, starting from last day
|
|
1226
|
+
days = [{ day: previousNumDays - i, dayOfWeek: (previousNumDays - i) % 7, isAdjacentDay: true }, ...days];
|
|
1227
|
+
}
|
|
1228
|
+
// Calculate positiveOffset
|
|
1229
|
+
// The calendar will display 42 days (6 rows of 7 columns)
|
|
1230
|
+
// Knowing this the offset is 41 (we start at index 0)
|
|
1231
|
+
// minus (the previous offset + the current month days)
|
|
1232
|
+
const positiveOffset = 41 - (numDays + offset);
|
|
1233
|
+
for (let i = 0; i < positiveOffset; i++) {
|
|
1234
|
+
days.push({ day: i + 1, dayOfWeek: (numDays + offset + i) % 7, isAdjacentDay: true });
|
|
1235
|
+
}
|
|
1213
1236
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1237
|
+
else {
|
|
1238
|
+
for (let i = 0; i <= offset; i++) {
|
|
1239
|
+
days = [{ day: null, dayOfWeek: null, isAdjacentDay: false }, ...days];
|
|
1240
|
+
}
|
|
1216
1241
|
}
|
|
1217
1242
|
return days;
|
|
1218
1243
|
};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-DkNv4J_i.js');
|
|
7
|
-
var ionicGlobal = require('./ionic-global-
|
|
8
|
-
require('./index-
|
|
7
|
+
var ionicGlobal = require('./ionic-global-D0fKFhpt.js');
|
|
8
|
+
require('./index-qOuhvt-6.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* CloseWatcher is a newer API that lets
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var ionicGlobal = require('./ionic-global-
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
var index = require('./index-
|
|
6
|
+
var ionicGlobal = require('./ionic-global-D0fKFhpt.js');
|
|
7
|
+
var index$1 = require('./index-qOuhvt-6.js');
|
|
8
|
+
var index = require('./index-D7kGM2E_.js');
|
|
9
9
|
var helpers = require('./helpers-CLmZlPvl.js');
|
|
10
10
|
|
|
11
11
|
const LIFECYCLE_WILL_ENTER = 'ionViewWillEnter';
|
|
@@ -122,8 +122,8 @@ const createFocusController = () => {
|
|
|
122
122
|
};
|
|
123
123
|
const LAST_FOCUS = 'ion-last-focus';
|
|
124
124
|
|
|
125
|
-
const iosTransitionAnimation = () => Promise.resolve().then(function () { return require('./ios.transition-
|
|
126
|
-
const mdTransitionAnimation = () => Promise.resolve().then(function () { return require('./md.transition-
|
|
125
|
+
const iosTransitionAnimation = () => Promise.resolve().then(function () { return require('./ios.transition-Cyrk-CkT.js'); });
|
|
126
|
+
const mdTransitionAnimation = () => Promise.resolve().then(function () { return require('./md.transition-Bh2J94f4.js'); });
|
|
127
127
|
const focusController = createFocusController();
|
|
128
128
|
// TODO(FW-2832): types
|
|
129
129
|
const transition = (opts) => {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-DkNv4J_i.js');
|
|
7
|
-
var hardwareBackButton = require('./hardware-back-button-
|
|
8
|
-
var index$1 = require('./index-
|
|
7
|
+
var hardwareBackButton = require('./hardware-back-button-B0yu2YGK.js');
|
|
8
|
+
var index$1 = require('./index-D7kGM2E_.js');
|
|
9
9
|
var helpers = require('./helpers-CLmZlPvl.js');
|
|
10
|
-
var ionicGlobal = require('./ionic-global-
|
|
10
|
+
var ionicGlobal = require('./ionic-global-D0fKFhpt.js');
|
|
11
11
|
var animation = require('./animation-Bz5ImL40.js');
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -7,7 +7,7 @@ const NAMESPACE = 'ionic';
|
|
|
7
7
|
const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
|
-
Stencil Client Platform v4.29.
|
|
10
|
+
Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
|
|
11
11
|
*/
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __export = (target, all) => {
|
|
@@ -221,6 +221,11 @@ function queryNonceMetaTagContent(doc) {
|
|
|
221
221
|
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
// src/utils/regular-expression.ts
|
|
225
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
226
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
227
|
+
};
|
|
228
|
+
|
|
224
229
|
// src/utils/remote-value.ts
|
|
225
230
|
var RemoteValue = class _RemoteValue {
|
|
226
231
|
/**
|
|
@@ -1419,6 +1424,18 @@ var findCorrespondingNode = (node, type) => {
|
|
|
1419
1424
|
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1420
1425
|
return sibling;
|
|
1421
1426
|
};
|
|
1427
|
+
var createSupportsRuleRe = (selector) => {
|
|
1428
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1429
|
+
return new RegExp(
|
|
1430
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1431
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1432
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1433
|
+
"g"
|
|
1434
|
+
);
|
|
1435
|
+
};
|
|
1436
|
+
createSupportsRuleRe("::slotted");
|
|
1437
|
+
createSupportsRuleRe(":host");
|
|
1438
|
+
createSupportsRuleRe(":host-context");
|
|
1422
1439
|
|
|
1423
1440
|
// src/runtime/mode.ts
|
|
1424
1441
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|