@ionic/core 8.8.20-dev.11791579113.1f843ab0 → 8.8.20-dev.11792194859.16be5d7f
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-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/{p-BE21dB_a.js → p-Bpr3edV8.js} +1 -1
- package/dist/cjs/ion-datetime-button.cjs.entry.js +28 -10
- package/dist/cjs/ion-datetime_3.cjs.entry.js +354 -30
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/datetime/datetime.ionic.css +144 -1
- package/dist/collection/components/datetime/datetime.ios.css +118 -0
- package/dist/collection/components/datetime/datetime.js +407 -27
- package/dist/collection/components/datetime/datetime.md.css +117 -0
- package/dist/collection/components/datetime/utils/state.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +28 -10
- package/dist/docs.json +151 -1
- package/dist/esm/{format-2WlZcMvG.js → format-BNGmd1mx.js} +1 -1
- package/dist/esm/ion-datetime-button.entry.js +29 -11
- package/dist/esm/ion-datetime_3.entry.js +355 -31
- 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-4aa6153d.entry.js +4 -0
- package/dist/ionic/p-4f2e482f.entry.js +4 -0
- package/dist/ionic/{p-7k7Q1A38.js → p-CrgdPEJR.js} +1 -1
- package/dist/types/components/datetime/datetime-interface.d.ts +4 -0
- package/dist/types/components/datetime/datetime.d.ts +66 -2
- package/dist/types/components/datetime/utils/state.d.ts +5 -2
- package/dist/types/components.d.ts +33 -0
- package/hydrate/index.js +390 -40
- package/hydrate/index.mjs +390 -40
- package/package.json +1 -1
- package/dist/ionic/p-3a4f9b8a.entry.js +0 -4
- package/dist/ionic/p-f6768728.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -16427,7 +16427,7 @@ const isDayDisabled = (refParts, minParts, maxParts, dayValues) => {
|
|
|
16427
16427
|
* Given a locale, a date, the selected date(s), and today's date,
|
|
16428
16428
|
* generate the state for a given calendar day button.
|
|
16429
16429
|
*/
|
|
16430
|
-
const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {
|
|
16430
|
+
const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues, rangeParts) => {
|
|
16431
16431
|
/**
|
|
16432
16432
|
* activeParts signals what day(s) are currently selected in the datetime.
|
|
16433
16433
|
* If multiple="true", this will be an array, but the logic in this util
|
|
@@ -16443,6 +16443,20 @@ const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts
|
|
|
16443
16443
|
const isActive = activePartsArray.find((parts) => isSameDay(refParts, parts)) !== undefined;
|
|
16444
16444
|
const isToday = isSameDay(refParts, todayParts);
|
|
16445
16445
|
const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);
|
|
16446
|
+
/**
|
|
16447
|
+
* Range state: determine if this day is the range start, end, or in between.
|
|
16448
|
+
*/
|
|
16449
|
+
let isRangeStart = false;
|
|
16450
|
+
let isRangeEnd = false;
|
|
16451
|
+
let isInRange = false;
|
|
16452
|
+
if (rangeParts) {
|
|
16453
|
+
const { start, end } = rangeParts;
|
|
16454
|
+
isRangeStart = isSameDay(refParts, start);
|
|
16455
|
+
if (end) {
|
|
16456
|
+
isRangeEnd = isSameDay(refParts, end);
|
|
16457
|
+
isInRange = !disabled && !isRangeStart && !isRangeEnd && isAfter(refParts, start) && isBefore(refParts, end);
|
|
16458
|
+
}
|
|
16459
|
+
}
|
|
16446
16460
|
/**
|
|
16447
16461
|
* Note that we always return one object regardless of whether activeParts
|
|
16448
16462
|
* was an array, since we pare down to one value for isActive.
|
|
@@ -16451,6 +16465,9 @@ const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts
|
|
|
16451
16465
|
disabled,
|
|
16452
16466
|
isActive,
|
|
16453
16467
|
isToday,
|
|
16468
|
+
isRangeStart,
|
|
16469
|
+
isRangeEnd,
|
|
16470
|
+
isInRange,
|
|
16454
16471
|
ariaSelected: isActive ? 'true' : null,
|
|
16455
16472
|
ariaLabel: generateDayAriaLabel(locale, isToday, refParts),
|
|
16456
16473
|
text: refParts.day != null ? getDay(locale, refParts) : null,
|
|
@@ -16568,11 +16585,11 @@ const checkForPresentationFormatMismatch = (el, presentation, formatOptions) =>
|
|
|
16568
16585
|
}
|
|
16569
16586
|
};
|
|
16570
16587
|
|
|
16571
|
-
const datetimeIonicCss = () => `: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-cover){width:100%}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .datetime-year{display:none}: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,::slotted([slot=buttons]),.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-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{-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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}.calendar-day[disabled]{pointer-events:none}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{display:-ms-flexbox;display:flex;border:none;font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.in-item){position:static}.calendar-month-year{min-width:0}.calendar-month-year-toggle{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;white-space:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle ion-icon{-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}:host{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--focus-ring-color:var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));--focus-ring-width:var(--token-border-radius-025, var(--token-scale-050, 2px));--body-opacity:0;--year-opacity:0}:host .calendar-body{opacity:var(--body-opacity)}:host .datetime-year{opacity:var(--year-opacity)}:host(.datetime-ready) .calendar-body{--body-opacity:1}:host(.datetime-ready) .datetime-year{--year-opacity:1}:host .datetime-header{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:var(--token-space-400, var(--token-scale-400, 16px));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start;-ms-flex-pack:justify;justify-content:space-between;height:var(--token-scale-1400, 56px);margin-bottom:var(--token-space-200, var(--token-scale-200, 8px));border-bottom:solid var(--token-border-size-025, var(--token-scale-025, 1px)) var(--token-primitives-neutral-400, #d0d7df)}:host .datetime-header .datetime-title{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.555556;color:var(--token-primitives-neutral-800, #6c727a)}:host .datetime-header .datetime-selected-date{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-regular, 400);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.714286;color:var(--token-primitives-neutral-1000, #383e45)}.calendar-action-buttons{padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:var(--token-space-200, var(--token-scale-200, 8px));-ms-flex-align:center;align-items:center;height:var(--token-scale-1400, 56px);-webkit-box-sizing:border-box;box-sizing:border-box}.calendar-month-year{-ms-flex:1 0 0px;flex:1 0 0}.calendar-month-year-toggle{border-radius:var(--token-border-radius-full, 999px);font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-400, 1rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-100, 0.01em);line-height:1.5;-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:var(--token-space-200, var(--token-scale-200, 8px));min-width:var(--token-scale-1600, 64px);min-height:var(--token-scale-1000, 40px);border:var(--focus-ring-width) solid transparent;color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}@media (any-hover: hover){.calendar-month-year-toggle:hover{background:var(--token-primitives-neutral-200, #ebeef2)}}.calendar-month-year-toggle.ion-focused{border-color:var(--focus-ring-color)}.calendar-month-year-toggle.ion-activated{background:var(--token-primitives-neutral-200, #ebeef2)}.calendar-next-prev ion-button.button-has-icon-only{--color:var(--token-primitives-neutral-1000, #383e45);--background-activated:var(--token-primitives-neutral-200, #ebeef2);--background-hover:var(--token-primitives-neutral-200, #ebeef2);--background-hover-opacity:1;min-height:var(--token-scale-1000, 40px)}.calendar-next-prev ion-button.button-has-icon-only.ion-focused::part(native){border:var(--token-border-size-050, var(--token-scale-050, 2px)) solid var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));outline:none}.calendar-days-of-week{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-300, 0.75rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-150, 0.015em);line-height:1.666667;text-transform:uppercase;-ms-flex-line-pack:center;align-content:center;height:var(--token-scale-1200, 48px);color:var(--token-primitives-neutral-800, #6c727a)}.calendar-day{border-radius:var(--token-border-radius-full, 999px);-webkit-padding-start:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-start:var(--token-space-100, var(--token-scale-100, 4px));-webkit-padding-end:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-end:var(--token-space-100, var(--token-scale-100, 4px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-100, 0.01em);line-height:1.428571;width:var(--token-scale-1200, 48px);min-width:var(--token-scale-1200, 48px);height:var(--token-scale-1200, 48px);color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}.calendar-day[disabled]:not(.calendar-day-constrained){color:var(--token-primitives-neutral-500, #9fa5ad)}.calendar-day.calendar-day-today{color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active.calendar-day-adjacent-day{background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff))}.calendar-day:focus-visible{border:var(--focus-ring-width) solid var(--focus-ring-color)}@media (any-hover: hover){.calendar-day:not([disabled]):not(:active):hover{background:var(--token-semantics-primary-200, var(--token-primitives-blue-200, #e4e8ff))}}.calendar-day:active,.calendar-day.calendar-day-adjacent-day:active{background:var(--token-bg-primary-subtle-press, var(--token-semantics-primary-300, var(--token-primitives-blue-300, #d0d7fa)))}.calendar-day.calendar-day-adjacent-day{color:var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a))}.calendar-day.calendar-day-active.calendar-day-adjacent-day{color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host .datetime-time{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}:host .datetime-time .time-header{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-400, 1rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-100, 0.01em);line-height:1.5;color:var(--token-primitives-neutral-800, #6c727a)}:host .datetime-time button{-webkit-padding-start:var(--token-space-200, var(--token-scale-200, 8px));padding-inline-start:var(--token-space-200, var(--token-scale-200, 8px));-webkit-padding-end:var(--token-space-200, var(--token-scale-200, 8px));padding-inline-end:var(--token-space-200, var(--token-scale-200, 8px));padding-top:var(--token-space-0, var(--token-scale-0, 0px));padding-bottom:var(--token-space-0, var(--token-scale-0, 0px));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.714286;border-radius:var(--token-border-radius-full, 999px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:var(--token-scale-800, 32px);background-color:var(--token-primitives-neutral-100, #f6f7fa);color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host .datetime-footer{padding-left:0;padding-right:0;padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:0;margin-left:0;margin-right:0;margin-top:var(--token-space-200, var(--token-scale-200, 8px));margin-bottom:0;border-left:0;border-right:0;border-top:solid var(--token-border-size-025, var(--token-scale-025, 1px)) var(--token-primitives-neutral-400, #d0d7df);border-bottom:0}:host .datetime-buttons .datetime-action-buttons,.datetime-action-buttons .datetime-action-buttons-container,::slotted([slot=buttons]){-ms-flex-flow:column;flex-flow:column;-ms-flex-align:stretch;align-items:stretch;gap:var(--token-space-200, var(--token-scale-200, 8px))}`;
|
|
16588
|
+
const datetimeIonicCss = () => `: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-cover){width:100%}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .datetime-year{display:none}: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,::slotted([slot=buttons]),.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-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;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible;z-index:0}:host .calendar-day-wrapper-range-start::before,:host .calendar-day-wrapper-in-range::before,:host .calendar-day-wrapper-range-end::before{position:absolute;top:50%;height:var(--range-track-height);-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--range-background);content:"";z-index:-1}:host .calendar-day-wrapper-range-start::before{inset-inline-start:50%;inset-inline-end:0}:host .calendar-day-wrapper-in-range::before{inset-inline-start:0;inset-inline-end:0}:host .calendar-day-wrapper-range-end::before{inset-inline-start:0;inset-inline-end:50%}:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before{display:none}:host(.datetime-disabled) .calendar-day-wrapper-range-start,:host(.datetime-disabled) .calendar-day-wrapper-in-range,:host(.datetime-disabled) .calendar-day-wrapper-range-end{opacity:0.4}:host(.datetime-disabled) .calendar-day-wrapper-range-start .calendar-day[disabled],:host(.datetime-disabled) .calendar-day-wrapper-in-range .calendar-day[disabled],:host(.datetime-disabled) .calendar-day-wrapper-range-end .calendar-day[disabled]{opacity:1}.calendar-day{-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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}.calendar-day[disabled]{pointer-events:none}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{display:-ms-flexbox;display:flex;border:none;font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.in-item){position:static}.calendar-month-year{min-width:0}.calendar-month-year-toggle{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;white-space:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle ion-icon{-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}:host{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--focus-ring-color:var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));--focus-ring-width:var(--token-border-size-050, var(--token-scale-050, 2px));--body-opacity:0;--year-opacity:0}:host .calendar-body{opacity:var(--body-opacity)}:host .datetime-year{opacity:var(--year-opacity)}:host(.datetime-ready) .calendar-body{--body-opacity:1}:host(.datetime-ready) .datetime-year{--year-opacity:1}:host .datetime-header{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:var(--token-space-400, var(--token-scale-400, 16px));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start;-ms-flex-pack:justify;justify-content:space-between;height:var(--token-scale-1400, 56px);margin-bottom:var(--token-space-200, var(--token-scale-200, 8px));border-bottom:solid var(--token-border-size-025, var(--token-scale-025, 1px)) var(--token-primitives-neutral-400, #d0d7df)}:host .datetime-header .datetime-title{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.555556;color:var(--token-primitives-neutral-800, #6c727a)}:host .datetime-header .datetime-selected-date{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-regular, 400);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.714286;color:var(--token-primitives-neutral-1000, #383e45)}.calendar-action-buttons{padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:var(--token-space-200, var(--token-scale-200, 8px));-ms-flex-align:center;align-items:center;height:var(--token-scale-1400, 56px);-webkit-box-sizing:border-box;box-sizing:border-box}.calendar-month-year{-ms-flex:1 0 0px;flex:1 0 0}.calendar-month-year-toggle{border-radius:var(--token-border-radius-full, 999px);font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-400, 1rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-100, 0.01em);line-height:1.5;-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:var(--token-space-200, var(--token-scale-200, 8px));min-width:var(--token-scale-1600, 64px);min-height:var(--token-scale-1000, 40px);border:var(--focus-ring-width) solid transparent;color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}@media (any-hover: hover){.calendar-month-year-toggle:hover{background:var(--token-primitives-neutral-200, #ebeef2)}}.calendar-month-year-toggle.ion-focused{border-color:var(--focus-ring-color)}.calendar-month-year-toggle.ion-activated{background:var(--token-primitives-neutral-200, #ebeef2)}.calendar-next-prev ion-button.button-has-icon-only{--color:var(--token-primitives-neutral-1000, #383e45);--background-activated:var(--token-primitives-neutral-200, #ebeef2);--background-hover:var(--token-primitives-neutral-200, #ebeef2);--background-hover-opacity:1;min-height:var(--token-scale-1000, 40px)}.calendar-next-prev ion-button.button-has-icon-only.ion-focused::part(native){border:var(--token-border-size-050, var(--token-scale-050, 2px)) solid var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));outline:none}.calendar-days-of-week{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-300, 0.75rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-150, 0.015em);line-height:1.666667;text-transform:uppercase;-ms-flex-line-pack:center;align-content:center;height:var(--token-scale-1200, 48px);color:var(--token-primitives-neutral-800, #6c727a)}.calendar-day{border-radius:var(--token-border-radius-full, 999px);-webkit-padding-start:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-start:var(--token-space-100, var(--token-scale-100, 4px));-webkit-padding-end:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-end:var(--token-space-100, var(--token-scale-100, 4px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-100, 0.01em);line-height:1.428571;width:var(--token-scale-1200, 48px);min-width:var(--token-scale-1200, 48px);height:var(--token-scale-1200, 48px);color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}.calendar-day[disabled]:not(.calendar-day-constrained){color:var(--token-primitives-neutral-500, #9fa5ad)}.calendar-day.calendar-day-today{color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active.calendar-day-adjacent-day{background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff))}.calendar-day:focus-visible{border:var(--focus-ring-width) solid var(--focus-ring-color)}@media (any-hover: hover){.calendar-day:not([disabled]):not(:active):hover{background:var(--token-semantics-primary-200, var(--token-primitives-blue-200, #e4e8ff))}}.calendar-day:active,.calendar-day.calendar-day-adjacent-day:active{background:var(--token-bg-primary-subtle-press, var(--token-semantics-primary-300, var(--token-primitives-blue-300, #d0d7fa)))}.calendar-day.calendar-day-adjacent-day{color:var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a))}.calendar-day.calendar-day-active.calendar-day-adjacent-day{color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host{--range-background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff));--range-track-height:var(--token-scale-1200, 48px)}.calendar-day.calendar-day-range-start{border-radius:var(--token-border-radius-full, 999px) 0 0 var(--token-border-radius-full, 999px);background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff));color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}.calendar-day.calendar-day-range-end{border-radius:0 var(--token-border-radius-full, 999px) var(--token-border-radius-full, 999px) 0;background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff));color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}.calendar-day.calendar-day-range-start.calendar-day-range-end{border-radius:var(--token-border-radius-full, 999px)}.calendar-day.calendar-day-in-range{border-radius:0;background:none;color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}.calendar-day.calendar-day-today.calendar-day-in-range{color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}.calendar-day.calendar-day-today.calendar-day-range-start,.calendar-day.calendar-day-today.calendar-day-range-end{color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}@media (any-hover: hover){.calendar-day.calendar-day-range-start:not([disabled]):not(:active):hover,.calendar-day.calendar-day-range-end:not([disabled]):not(:active):hover,.calendar-day.calendar-day-in-range:not([disabled]):not(:active):hover{background:var(--token-semantics-primary-200, var(--token-primitives-blue-200, #e4e8ff))}}.calendar-day.calendar-day-range-start:active,.calendar-day.calendar-day-range-end:active,.calendar-day.calendar-day-in-range:active{background:var(--token-bg-primary-subtle-press, var(--token-semantics-primary-300, var(--token-primitives-blue-300, #d0d7fa)))}:host(:not(.datetime-readonly)) .calendar-day.calendar-day-range-start[disabled],:host(:not(.datetime-readonly)) .calendar-day.calendar-day-range-end[disabled],:host(:not(.datetime-readonly)) .calendar-day.calendar-day-in-range[disabled]{color:var(--token-primitives-neutral-500, #9fa5ad);opacity:1}:host(.datetime-readonly) .calendar-day.calendar-day-range-start[disabled],:host(.datetime-readonly) .calendar-day.calendar-day-range-end[disabled]{color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host(.datetime-readonly) .calendar-day.calendar-day-in-range[disabled]{color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-in-range[disabled],:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-start[disabled],:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-end[disabled]{color:var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}:host .datetime-time{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}:host .datetime-time .time-header{font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-400, 1rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-100, 0.01em);line-height:1.5;color:var(--token-primitives-neutral-800, #6c727a)}:host .datetime-time button{-webkit-padding-start:var(--token-space-200, var(--token-scale-200, 8px));padding-inline-start:var(--token-space-200, var(--token-scale-200, 8px));-webkit-padding-end:var(--token-space-200, var(--token-scale-200, 8px));padding-inline-end:var(--token-space-200, var(--token-scale-200, 8px));padding-top:var(--token-space-0, var(--token-scale-0, 0px));padding-bottom:var(--token-space-0, var(--token-scale-0, 0px));font-family:var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0);line-height:1.714286;border-radius:var(--token-border-radius-full, 999px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:var(--token-scale-800, 32px);background-color:var(--token-primitives-neutral-100, #f6f7fa);color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host .datetime-footer{padding-left:0;padding-right:0;padding-top:var(--token-space-200, var(--token-scale-200, 8px));padding-bottom:0;margin-left:0;margin-right:0;margin-top:var(--token-space-200, var(--token-scale-200, 8px));margin-bottom:0;border-left:0;border-right:0;border-top:solid var(--token-border-size-025, var(--token-scale-025, 1px)) var(--token-primitives-neutral-400, #d0d7df);border-bottom:0}:host .datetime-buttons .datetime-action-buttons,.datetime-action-buttons .datetime-action-buttons-container,::slotted([slot=buttons]){-ms-flex-flow:column;flex-flow:column;-ms-flex-align:stretch;align-items:stretch;gap:var(--token-space-200, var(--token-scale-200, 8px))}`;
|
|
16572
16589
|
|
|
16573
|
-
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-cover){width:100%}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .datetime-year{display:none}: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,::slotted([slot=buttons]),.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-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{-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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}.calendar-day[disabled]{pointer-events:none}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{display:-ms-flexbox;display:flex;border:none;font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.in-item){position:static}.calendar-month-year{min-width:0}.calendar-month-year-toggle{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;white-space:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle ion-icon{-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}:host{}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host .calendar-body,:host .datetime-year{opacity:0}:host(.datetime-ready) .calendar-body,:host(.datetime-ready) .datetime-year{opacity:1}: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 .calendar-action-buttons ion-button{--background:transparent}.calendar-day{border-radius:50%;font-family:var(--ion-font-family, inherit)}:host .calendar-day[disabled]{opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:current-color(base, 0.2);-webkit-box-shadow:0px 0px 0px 4px current-color(base, 0.2);box-shadow:0px 0px 0px 4px current-color(base, 0.2)}.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 .calendar-next-prev{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:start}.calendar-next-prev ion-button ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}: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-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;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000)}:host .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year-toggle::after{right:0;left: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}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 .datetime-action-buttons{-ms-flex-pack:justify;justify-content:space-between}: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-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-action-buttons .calendar-next-prev{-ms-flex-align:stretch;align-items:stretch}.calendar-next-prev ion-button{--padding-top:0;--padding-bottom:0;--padding-start:5px;--padding-end:5px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.calendar-next-prev ion-button ion-icon[slot=icon-only]{font-size:1.65em;line-height:0.67}: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([slot=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,::slotted([slot=buttons]){width:100%}`;
|
|
16590
|
+
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-cover){width:100%}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .datetime-year{display:none}: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,::slotted([slot=buttons]),.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-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;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible;z-index:0}:host .calendar-day-wrapper-range-start::before,:host .calendar-day-wrapper-in-range::before,:host .calendar-day-wrapper-range-end::before{position:absolute;top:50%;height:var(--range-track-height);-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--range-background);content:"";z-index:-1}:host .calendar-day-wrapper-range-start::before{inset-inline-start:50%;inset-inline-end:0}:host .calendar-day-wrapper-in-range::before{inset-inline-start:0;inset-inline-end:0}:host .calendar-day-wrapper-range-end::before{inset-inline-start:0;inset-inline-end:50%}:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before{display:none}:host(.datetime-disabled) .calendar-day-wrapper-range-start,:host(.datetime-disabled) .calendar-day-wrapper-in-range,:host(.datetime-disabled) .calendar-day-wrapper-range-end{opacity:0.4}:host(.datetime-disabled) .calendar-day-wrapper-range-start .calendar-day[disabled],:host(.datetime-disabled) .calendar-day-wrapper-in-range .calendar-day[disabled],:host(.datetime-disabled) .calendar-day-wrapper-range-end .calendar-day[disabled]{opacity:1}.calendar-day{-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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}.calendar-day[disabled]{pointer-events:none}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{display:-ms-flexbox;display:flex;border:none;font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.in-item){position:static}.calendar-month-year{min-width:0}.calendar-month-year-toggle{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;white-space:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle ion-icon{-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}:host{}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host .calendar-body,:host .datetime-year{opacity:0}:host(.datetime-ready) .calendar-body,:host(.datetime-ready) .datetime-year{opacity:1}: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 .calendar-action-buttons ion-button{--background:transparent}.calendar-day{border-radius:50%;font-family:var(--ion-font-family, inherit)}:host .calendar-day[disabled]{opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:current-color(base, 0.2);-webkit-box-shadow:0px 0px 0px 4px current-color(base, 0.2);box-shadow:0px 0px 0px 4px current-color(base, 0.2)}.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 .calendar-next-prev{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:start}.calendar-next-prev ion-button ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}: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-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;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000)}:host .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year-toggle::after{right:0;left: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}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 .datetime-action-buttons{-ms-flex-pack:justify;justify-content:space-between}: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-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-action-buttons .calendar-next-prev{-ms-flex-align:stretch;align-items:stretch}.calendar-next-prev ion-button{--padding-top:0;--padding-bottom:0;--padding-start:5px;--padding-end:5px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.calendar-next-prev ion-button ion-icon[slot=icon-only]{font-size:1.65em;line-height:0.67}: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{--range-background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);--range-track-height:40px}:host(.ion-color){--range-background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-range-start{border-radius:50% 0 0 50%;background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff);font-weight:600}:host .calendar-day.calendar-day-range-end{border-radius:0 50% 50% 0;background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff);font-weight:600}:host .calendar-day.calendar-day-range-start.calendar-day-range-end{border-radius:50%}:host .calendar-day.calendar-day-in-range{border-radius:0;background:none}:host(.ion-color) .calendar-day.calendar-day-range-start,:host(.ion-color) .calendar-day.calendar-day-range-end{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-today.calendar-day-in-range{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today.calendar-day-in-range{color: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: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([slot=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,::slotted([slot=buttons]){width:100%}`;
|
|
16574
16591
|
|
|
16575
|
-
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-cover){width:100%}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .datetime-year{display:none}: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,::slotted([slot=buttons]),.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-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{-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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}.calendar-day[disabled]{pointer-events:none}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{display:-ms-flexbox;display:flex;border:none;font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.in-item){position:static}.calendar-month-year{min-width:0}.calendar-month-year-toggle{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;white-space:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle ion-icon{-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}:host{}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host .calendar-body,:host .datetime-year{opacity:0}:host(.datetime-ready) .calendar-body,:host(.datetime-ready) .datetime-year{opacity:1}: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 .calendar-action-buttons ion-button{--background:transparent}.calendar-day{border-radius:50%;font-family:var(--ion-font-family, inherit)}:host .calendar-day[disabled]{opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:current-color(base, 0.2);-webkit-box-shadow:0px 0px 0px 4px current-color(base, 0.2);box-shadow:0px 0px 0px 4px current-color(base, 0.2)}.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 .calendar-next-prev{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:start}.calendar-next-prev ion-button ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}: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-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;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000)}:host .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year-toggle::after{right:0;left: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}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 .datetime-action-buttons{-ms-flex-pack:justify;justify-content:space-between}: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-next-prev ion-button{--padding-top:12px;--padding-end:12px;--padding-bottom:12px;--padding-start:12px;--border-radius:50%;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:3rem;height:3rem}.calendar-next-prev ion-button ion-icon[slot=icon-only]{font-size:1.8em}.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}`;
|
|
16592
|
+
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-cover){width:100%}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .datetime-year{display:none}: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,::slotted([slot=buttons]),.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-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;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible;z-index:0}:host .calendar-day-wrapper-range-start::before,:host .calendar-day-wrapper-in-range::before,:host .calendar-day-wrapper-range-end::before{position:absolute;top:50%;height:var(--range-track-height);-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--range-background);content:"";z-index:-1}:host .calendar-day-wrapper-range-start::before{inset-inline-start:50%;inset-inline-end:0}:host .calendar-day-wrapper-in-range::before{inset-inline-start:0;inset-inline-end:0}:host .calendar-day-wrapper-range-end::before{inset-inline-start:0;inset-inline-end:50%}:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before{display:none}:host(.datetime-disabled) .calendar-day-wrapper-range-start,:host(.datetime-disabled) .calendar-day-wrapper-in-range,:host(.datetime-disabled) .calendar-day-wrapper-range-end{opacity:0.4}:host(.datetime-disabled) .calendar-day-wrapper-range-start .calendar-day[disabled],:host(.datetime-disabled) .calendar-day-wrapper-in-range .calendar-day[disabled],:host(.datetime-disabled) .calendar-day-wrapper-range-end .calendar-day[disabled]{opacity:1}.calendar-day{-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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}.calendar-day[disabled]{pointer-events:none}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{display:-ms-flexbox;display:flex;border:none;font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.in-item){position:static}.calendar-month-year{min-width:0}.calendar-month-year-toggle{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-align:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;white-space:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle ion-icon{-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}:host{}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host .calendar-body,:host .datetime-year{opacity:0}:host(.datetime-ready) .calendar-body,:host(.datetime-ready) .datetime-year{opacity:1}: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 .calendar-action-buttons ion-button{--background:transparent}.calendar-day{border-radius:50%;font-family:var(--ion-font-family, inherit)}:host .calendar-day[disabled]{opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:current-color(base, 0.2);-webkit-box-shadow:0px 0px 0px 4px current-color(base, 0.2);box-shadow:0px 0px 0px 4px current-color(base, 0.2)}.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 .calendar-next-prev{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:start}.calendar-next-prev ion-button ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}: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-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;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000)}:host .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year-toggle::after{right:0;left: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}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 .datetime-action-buttons{-ms-flex-pack:justify;justify-content:space-between}: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-next-prev ion-button{--padding-top:12px;--padding-end:12px;--padding-bottom:12px;--padding-start:12px;--border-radius:50%;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:3rem;height:3rem}.calendar-next-prev ion-button ion-icon[slot=icon-only]{font-size:1.8em}.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{--range-background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);--range-track-height:42px}:host(.ion-color){--range-background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-range-start{border-radius:50% 0 0 50%;background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host .calendar-day.calendar-day-range-end{border-radius:0 50% 50% 0;background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host .calendar-day.calendar-day-range-start.calendar-day-range-end{border-radius:50%}:host .calendar-day.calendar-day-in-range{border-radius:0;background:none}:host(.ion-color) .calendar-day.calendar-day-range-start,:host(.ion-color) .calendar-day.calendar-day-range-end{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-today.calendar-day-in-range{border:none;color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today.calendar-day-in-range{color: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}`;
|
|
16576
16593
|
|
|
16577
16594
|
/**
|
|
16578
16595
|
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
@@ -16605,6 +16622,11 @@ const datetimeMdCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-flo
|
|
|
16605
16622
|
* @part calendar-day today - The calendar day that contains the current day.
|
|
16606
16623
|
* @part calendar-day disabled - The calendar day that is disabled.
|
|
16607
16624
|
*
|
|
16625
|
+
* @part range-start - The calendar day button that is the start of a range selection.
|
|
16626
|
+
* @part range-end - The calendar day button that is the end of a range selection.
|
|
16627
|
+
* @part range-selection - The calendar day button that is part of a range selection (includes start and end).
|
|
16628
|
+
* @part range-track - The calendar day wrapper element whose ::before pseudo-element draws the range highlight track.
|
|
16629
|
+
*
|
|
16608
16630
|
* @part datetime-header - The datetime header contains the content for the `title` slot and the selected date.
|
|
16609
16631
|
* @part datetime-title - The element that contains the `title` slot content.
|
|
16610
16632
|
* @part datetime-selected-date - The element that contains the selected date.
|
|
@@ -16702,8 +16724,22 @@ class Datetime {
|
|
|
16702
16724
|
/**
|
|
16703
16725
|
* If `true`, multiple dates can be selected at once. Only
|
|
16704
16726
|
* applies to `presentation="date"` and `preferWheel="false"`.
|
|
16727
|
+
*
|
|
16728
|
+
* @deprecated Use `selectionMode="multiple"` instead.
|
|
16705
16729
|
*/
|
|
16706
16730
|
this.multiple = false;
|
|
16731
|
+
/**
|
|
16732
|
+
* The text shown in the datetime header when the start of the range
|
|
16733
|
+
* is empty, also used by screen readers to announce the start date.
|
|
16734
|
+
* Only applies when `selectionMode="range"`.
|
|
16735
|
+
*/
|
|
16736
|
+
this.startDateLabel = 'Start date';
|
|
16737
|
+
/**
|
|
16738
|
+
* The text shown in the datetime header when the end of the range
|
|
16739
|
+
* is empty, also used by screen readers to announce the end date.
|
|
16740
|
+
* Only applies when `selectionMode="range"`.
|
|
16741
|
+
*/
|
|
16742
|
+
this.endDateLabel = 'End date';
|
|
16707
16743
|
/**
|
|
16708
16744
|
* If `true`, a header will be shown above the calendar
|
|
16709
16745
|
* picker. This will include both the slotted title, and
|
|
@@ -16756,8 +16792,8 @@ class Datetime {
|
|
|
16756
16792
|
*/
|
|
16757
16793
|
this.preferWheel = false;
|
|
16758
16794
|
this.warnIfIncorrectValueUsage = () => {
|
|
16759
|
-
const {
|
|
16760
|
-
if (!
|
|
16795
|
+
const { value } = this;
|
|
16796
|
+
if (!this.isMultipleMode && !this.isRangeMode && Array.isArray(value)) {
|
|
16761
16797
|
/**
|
|
16762
16798
|
* We do some processing on the `value` array so
|
|
16763
16799
|
* that it looks more like an array when logged to
|
|
@@ -16766,7 +16802,13 @@ class Datetime {
|
|
|
16766
16802
|
* Default toString() behavior: a,b
|
|
16767
16803
|
* Custom behavior: ['a', 'b']
|
|
16768
16804
|
*/
|
|
16769
|
-
printIonWarning(`[ion-datetime] - An array of values was passed, but multiple
|
|
16805
|
+
printIonWarning(`[ion-datetime] - An array of values was passed, but neither selectionMode="multiple" nor selectionMode="range" is set. This is incorrect usage and may result in unexpected behaviors.
|
|
16806
|
+
|
|
16807
|
+
Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
|
|
16808
|
+
`, this.el);
|
|
16809
|
+
}
|
|
16810
|
+
if (this.isRangeMode && Array.isArray(value) && value.length > 2) {
|
|
16811
|
+
printIonWarning(`[ion-datetime] - More than 2 values were passed with selectionMode="range". Only the first and last values will be used.
|
|
16770
16812
|
|
|
16771
16813
|
Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
|
|
16772
16814
|
`, this.el);
|
|
@@ -16793,6 +16835,9 @@ class Datetime {
|
|
|
16793
16835
|
};
|
|
16794
16836
|
this.getActivePart = () => {
|
|
16795
16837
|
const { activeParts } = this;
|
|
16838
|
+
if (this.isRangeParts(activeParts)) {
|
|
16839
|
+
return activeParts.start;
|
|
16840
|
+
}
|
|
16796
16841
|
return Array.isArray(activeParts) ? activeParts[0] : activeParts;
|
|
16797
16842
|
};
|
|
16798
16843
|
this.closeParentOverlay = (role) => {
|
|
@@ -16804,6 +16849,33 @@ class Datetime {
|
|
|
16804
16849
|
this.setWorkingParts = (parts) => {
|
|
16805
16850
|
this.workingParts = Object.assign({}, parts);
|
|
16806
16851
|
};
|
|
16852
|
+
/**
|
|
16853
|
+
* Checks whether the span from start to end contains any disabled day.
|
|
16854
|
+
* Used by range mode to prevent selecting across disabled dates.
|
|
16855
|
+
*/
|
|
16856
|
+
this.rangeContainsDisabledDate = (start, end) => {
|
|
16857
|
+
const { minParts, maxParts, parsedDayValues, isDateEnabled } = this;
|
|
16858
|
+
let cursor = getNextDay(start);
|
|
16859
|
+
while (isBefore(cursor, end) || isSameDay(cursor, end)) {
|
|
16860
|
+
if (isSameDay(cursor, end))
|
|
16861
|
+
break;
|
|
16862
|
+
if (isDayDisabled(cursor, minParts, maxParts, parsedDayValues)) {
|
|
16863
|
+
return true;
|
|
16864
|
+
}
|
|
16865
|
+
if (isDateEnabled) {
|
|
16866
|
+
try {
|
|
16867
|
+
if (!isDateEnabled(convertDataToISO(cursor))) {
|
|
16868
|
+
return true;
|
|
16869
|
+
}
|
|
16870
|
+
}
|
|
16871
|
+
catch (_a) {
|
|
16872
|
+
// Swallow user callback exceptions during validation
|
|
16873
|
+
}
|
|
16874
|
+
}
|
|
16875
|
+
cursor = getNextDay(cursor);
|
|
16876
|
+
}
|
|
16877
|
+
return false;
|
|
16878
|
+
};
|
|
16807
16879
|
this.setActiveParts = (parts, removeDate = false) => {
|
|
16808
16880
|
/** if the datetime component is in readonly mode,
|
|
16809
16881
|
* allow browsing of the calendar without changing
|
|
@@ -16812,7 +16884,7 @@ class Datetime {
|
|
|
16812
16884
|
if (this.readonly) {
|
|
16813
16885
|
return;
|
|
16814
16886
|
}
|
|
16815
|
-
const {
|
|
16887
|
+
const { minParts, maxParts, activeParts } = this;
|
|
16816
16888
|
/**
|
|
16817
16889
|
* When setting the active parts, it is possible
|
|
16818
16890
|
* to set invalid data. For example,
|
|
@@ -16825,7 +16897,10 @@ class Datetime {
|
|
|
16825
16897
|
*/
|
|
16826
16898
|
const validatedParts = validateParts(parts, minParts, maxParts);
|
|
16827
16899
|
this.setWorkingParts(validatedParts);
|
|
16828
|
-
if (
|
|
16900
|
+
if (this.isRangeMode) {
|
|
16901
|
+
this.setActivePartsRange(validatedParts);
|
|
16902
|
+
}
|
|
16903
|
+
else if (this.isMultipleMode) {
|
|
16829
16904
|
const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];
|
|
16830
16905
|
if (removeDate) {
|
|
16831
16906
|
this.activeParts = activePartsArray.filter((p) => !isSameDay(p, validatedParts));
|
|
@@ -16843,6 +16918,70 @@ class Datetime {
|
|
|
16843
16918
|
}
|
|
16844
16919
|
this.confirm();
|
|
16845
16920
|
};
|
|
16921
|
+
/**
|
|
16922
|
+
* Handles range selection logic when a day is clicked.
|
|
16923
|
+
*
|
|
16924
|
+
* Creating a new range: first click sets start, second sets end.
|
|
16925
|
+
* Modifying an existing range:
|
|
16926
|
+
* - Before range → new start
|
|
16927
|
+
* - Within range → new end
|
|
16928
|
+
* - After range → new end
|
|
16929
|
+
* If the resulting span contains a disabled date, start a new range instead.
|
|
16930
|
+
*/
|
|
16931
|
+
this.setActivePartsRange = (parts) => {
|
|
16932
|
+
const current = this.rangeParts;
|
|
16933
|
+
if (!current) {
|
|
16934
|
+
// No range yet — start a new one
|
|
16935
|
+
this.activeParts = { start: parts };
|
|
16936
|
+
return;
|
|
16937
|
+
}
|
|
16938
|
+
const { start, end } = current;
|
|
16939
|
+
if (end) {
|
|
16940
|
+
// A complete range exists
|
|
16941
|
+
if (isBefore(parts, start)) {
|
|
16942
|
+
// Before range → new start
|
|
16943
|
+
this.activeParts = { start: parts };
|
|
16944
|
+
}
|
|
16945
|
+
else if (isSameDay(parts, start) || (isAfter(parts, start) && isBefore(parts, end))) {
|
|
16946
|
+
// Within range (including start) → set new end
|
|
16947
|
+
if (this.rangeContainsDisabledDate(start, parts)) {
|
|
16948
|
+
this.activeParts = { start: parts };
|
|
16949
|
+
}
|
|
16950
|
+
else {
|
|
16951
|
+
this.activeParts = { start, end: parts };
|
|
16952
|
+
}
|
|
16953
|
+
}
|
|
16954
|
+
else {
|
|
16955
|
+
// After or equal to end → new end
|
|
16956
|
+
if (this.rangeContainsDisabledDate(start, parts)) {
|
|
16957
|
+
this.activeParts = { start: parts };
|
|
16958
|
+
}
|
|
16959
|
+
else {
|
|
16960
|
+
this.activeParts = { start, end: parts };
|
|
16961
|
+
}
|
|
16962
|
+
}
|
|
16963
|
+
}
|
|
16964
|
+
else {
|
|
16965
|
+
// Only start date, no end yet
|
|
16966
|
+
if (isSameDay(parts, start)) {
|
|
16967
|
+
// Same day → single-day range
|
|
16968
|
+
this.activeParts = { start, end: parts };
|
|
16969
|
+
}
|
|
16970
|
+
else if (isBefore(parts, start)) {
|
|
16971
|
+
// Before start → new start
|
|
16972
|
+
this.activeParts = { start: parts };
|
|
16973
|
+
}
|
|
16974
|
+
else {
|
|
16975
|
+
// After start → set end if no disabled dates in between
|
|
16976
|
+
if (this.rangeContainsDisabledDate(start, parts)) {
|
|
16977
|
+
this.activeParts = { start: parts };
|
|
16978
|
+
}
|
|
16979
|
+
else {
|
|
16980
|
+
this.activeParts = { start, end: parts };
|
|
16981
|
+
}
|
|
16982
|
+
}
|
|
16983
|
+
}
|
|
16984
|
+
};
|
|
16846
16985
|
this.initializeKeyboardListeners = () => {
|
|
16847
16986
|
const calendarBodyRef = this.calendarBodyRef;
|
|
16848
16987
|
if (!calendarBodyRef) {
|
|
@@ -17240,6 +17379,43 @@ class Datetime {
|
|
|
17240
17379
|
if (hasValue) {
|
|
17241
17380
|
warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);
|
|
17242
17381
|
}
|
|
17382
|
+
/**
|
|
17383
|
+
* Range mode: convert the value array into DatetimeRangeParts.
|
|
17384
|
+
*/
|
|
17385
|
+
if (this.isRangeMode) {
|
|
17386
|
+
if (hasValue && Array.isArray(valueToProcess)) {
|
|
17387
|
+
let rangeValues = valueToProcess;
|
|
17388
|
+
// If more than 2 entries, use first and last
|
|
17389
|
+
if (rangeValues.length > 2) {
|
|
17390
|
+
rangeValues = [rangeValues[0], rangeValues[rangeValues.length - 1]];
|
|
17391
|
+
}
|
|
17392
|
+
let startParts = rangeValues[0];
|
|
17393
|
+
let endParts = rangeValues.length > 1 ? rangeValues[1] : undefined;
|
|
17394
|
+
// Normalize reversed pairs so earlier date is start
|
|
17395
|
+
if (endParts && isAfter(startParts, endParts)) {
|
|
17396
|
+
const temp = startParts;
|
|
17397
|
+
startParts = endParts;
|
|
17398
|
+
endParts = temp;
|
|
17399
|
+
}
|
|
17400
|
+
this.activeParts = endParts ? { start: startParts, end: endParts } : { start: startParts };
|
|
17401
|
+
// Navigate calendar to the start date
|
|
17402
|
+
const targetValue = clampDate(startParts, minParts, maxParts);
|
|
17403
|
+
const { month, day, year } = targetValue;
|
|
17404
|
+
const didChangeMonth = (month !== undefined && month !== workingParts.month) || (year !== undefined && year !== workingParts.year);
|
|
17405
|
+
const bodyIsVisible = el.classList.contains('datetime-ready');
|
|
17406
|
+
const { isGridStyle, showMonthAndYear } = this;
|
|
17407
|
+
if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) {
|
|
17408
|
+
this.animateToDate(targetValue);
|
|
17409
|
+
}
|
|
17410
|
+
else {
|
|
17411
|
+
this.setWorkingParts({ month, day, year, hour: 0, minute: 0, ampm: 'am' });
|
|
17412
|
+
}
|
|
17413
|
+
}
|
|
17414
|
+
else {
|
|
17415
|
+
this.activeParts = [];
|
|
17416
|
+
}
|
|
17417
|
+
return;
|
|
17418
|
+
}
|
|
17243
17419
|
/**
|
|
17244
17420
|
* If there are multiple values, clamp to the last one.
|
|
17245
17421
|
* This is because the last value is the one that the user
|
|
@@ -17400,6 +17576,27 @@ class Datetime {
|
|
|
17400
17576
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
17401
17577
|
return hasDatePresentation && !preferWheel;
|
|
17402
17578
|
}
|
|
17579
|
+
get isMultipleMode() {
|
|
17580
|
+
return this.selectionMode === 'multiple' || (this.selectionMode === undefined && this.multiple);
|
|
17581
|
+
}
|
|
17582
|
+
get isRangeMode() {
|
|
17583
|
+
return this.selectionMode === 'range';
|
|
17584
|
+
}
|
|
17585
|
+
/**
|
|
17586
|
+
* Type guard: returns true if the given activeParts is a DatetimeRangeParts object.
|
|
17587
|
+
*/
|
|
17588
|
+
isRangeParts(parts) {
|
|
17589
|
+
return this.isRangeMode && parts !== null && typeof parts === 'object' && !Array.isArray(parts) && 'start' in parts;
|
|
17590
|
+
}
|
|
17591
|
+
/**
|
|
17592
|
+
* Returns the current range parts if in range mode, or undefined otherwise.
|
|
17593
|
+
*/
|
|
17594
|
+
get rangeParts() {
|
|
17595
|
+
if (this.isRangeParts(this.activeParts)) {
|
|
17596
|
+
return this.activeParts;
|
|
17597
|
+
}
|
|
17598
|
+
return undefined;
|
|
17599
|
+
}
|
|
17403
17600
|
yearValuesChanged() {
|
|
17404
17601
|
this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);
|
|
17405
17602
|
}
|
|
@@ -17435,6 +17632,18 @@ class Datetime {
|
|
|
17435
17632
|
*/
|
|
17436
17633
|
async confirm(closeOverlay = false) {
|
|
17437
17634
|
const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
|
|
17635
|
+
/**
|
|
17636
|
+
* In range mode, only confirm when both start and end are selected.
|
|
17637
|
+
*/
|
|
17638
|
+
if (this.isRangeMode) {
|
|
17639
|
+
if (this.isRangeParts(activeParts) && activeParts.end) {
|
|
17640
|
+
this.setValue([convertDataToISO(activeParts.start), convertDataToISO(activeParts.end)]);
|
|
17641
|
+
}
|
|
17642
|
+
if (closeOverlay) {
|
|
17643
|
+
this.closeParentOverlay(CONFIRM_ROLE);
|
|
17644
|
+
}
|
|
17645
|
+
return;
|
|
17646
|
+
}
|
|
17438
17647
|
/**
|
|
17439
17648
|
* We only update the value if the presentation is not a calendar picker.
|
|
17440
17649
|
*/
|
|
@@ -17469,6 +17678,22 @@ class Datetime {
|
|
|
17469
17678
|
* @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.
|
|
17470
17679
|
*/
|
|
17471
17680
|
async reset(startDate) {
|
|
17681
|
+
if (this.isRangeMode) {
|
|
17682
|
+
/**
|
|
17683
|
+
* In range mode, reset clears the full range. If a startDate
|
|
17684
|
+
* is provided, the calendar navigates to that month without
|
|
17685
|
+
* selecting anything so the user begins a fresh selection.
|
|
17686
|
+
*/
|
|
17687
|
+
this.activeParts = [];
|
|
17688
|
+
if (startDate) {
|
|
17689
|
+
const parsed = parseDate(startDate);
|
|
17690
|
+
if (parsed) {
|
|
17691
|
+
const target = Array.isArray(parsed) ? parsed[0] : parsed;
|
|
17692
|
+
this.setWorkingParts(target);
|
|
17693
|
+
}
|
|
17694
|
+
}
|
|
17695
|
+
return;
|
|
17696
|
+
}
|
|
17472
17697
|
this.processValue(startDate);
|
|
17473
17698
|
}
|
|
17474
17699
|
/**
|
|
@@ -17480,6 +17705,14 @@ class Datetime {
|
|
|
17480
17705
|
* @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
|
|
17481
17706
|
*/
|
|
17482
17707
|
async cancel(closeOverlay = false) {
|
|
17708
|
+
/**
|
|
17709
|
+
* In range mode, clear the visible selection (including partial ranges)
|
|
17710
|
+
* so the component returns to an empty state. The value property is
|
|
17711
|
+
* left untouched, matching single/multiple mode behavior.
|
|
17712
|
+
*/
|
|
17713
|
+
if (this.isRangeMode) {
|
|
17714
|
+
this.activeParts = [];
|
|
17715
|
+
}
|
|
17483
17716
|
this.ionCancel.emit();
|
|
17484
17717
|
if (closeOverlay) {
|
|
17485
17718
|
this.closeParentOverlay(CANCEL_ROLE);
|
|
@@ -17660,8 +17893,11 @@ class Datetime {
|
|
|
17660
17893
|
});
|
|
17661
17894
|
}
|
|
17662
17895
|
componentWillLoad() {
|
|
17663
|
-
const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
17664
|
-
if (multiple) {
|
|
17896
|
+
const { el, formatOptions, highlightedDates, multiple, selectionMode, presentation, preferWheel } = this;
|
|
17897
|
+
if (selectionMode === undefined && multiple) {
|
|
17898
|
+
printIonWarning('[ion-datetime] - The "multiple" property is deprecated. Use selectionMode="multiple" instead.', el);
|
|
17899
|
+
}
|
|
17900
|
+
if (this.isMultipleMode) {
|
|
17665
17901
|
if (presentation !== 'date') {
|
|
17666
17902
|
printIonWarning('[ion-datetime] - Multiple date selection is only supported for presentation="date".', el);
|
|
17667
17903
|
}
|
|
@@ -17669,6 +17905,17 @@ class Datetime {
|
|
|
17669
17905
|
printIonWarning('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".', el);
|
|
17670
17906
|
}
|
|
17671
17907
|
}
|
|
17908
|
+
if (this.isRangeMode) {
|
|
17909
|
+
if (presentation !== 'date') {
|
|
17910
|
+
printIonWarning('[ion-datetime] - Range selection is only supported for presentation="date".', el);
|
|
17911
|
+
}
|
|
17912
|
+
if (preferWheel) {
|
|
17913
|
+
printIonWarning('[ion-datetime] - Range selection is not supported with preferWheel="true".', el);
|
|
17914
|
+
}
|
|
17915
|
+
}
|
|
17916
|
+
if (selectionMode !== undefined && multiple) {
|
|
17917
|
+
printIonWarning('[ion-datetime] - Both "selectionMode" and "multiple" are set. "selectionMode" takes precedence.', el);
|
|
17918
|
+
}
|
|
17672
17919
|
if (highlightedDates !== undefined) {
|
|
17673
17920
|
if (presentation !== 'date' && presentation !== 'date-time' && presentation !== 'time-date') {
|
|
17674
17921
|
printIonWarning('[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.', el);
|
|
@@ -17723,6 +17970,12 @@ class Datetime {
|
|
|
17723
17970
|
* is disabled or readonly.
|
|
17724
17971
|
*/
|
|
17725
17972
|
const isButtonDisabled = disabled || readonly;
|
|
17973
|
+
/**
|
|
17974
|
+
* In range mode, the confirm button should be disabled until
|
|
17975
|
+
* both a start and end date have been selected.
|
|
17976
|
+
*/
|
|
17977
|
+
const isRangeIncomplete = this.isRangeMode && (!this.isRangeParts(this.activeParts) || !this.activeParts.end);
|
|
17978
|
+
const isConfirmDisabled = isButtonDisabled || isRangeIncomplete;
|
|
17726
17979
|
const confirmFill = theme === 'ionic' ? 'solid' : undefined;
|
|
17727
17980
|
const hasSlottedButtons = this.el.querySelector('[slot="buttons"]') !== null;
|
|
17728
17981
|
if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {
|
|
@@ -17742,7 +17995,7 @@ class Datetime {
|
|
|
17742
17995
|
return (hAsync("div", { class: "datetime-footer" }, hAsync("div", { class: "datetime-buttons" }, hAsync("div", { class: {
|
|
17743
17996
|
['datetime-action-buttons']: true,
|
|
17744
17997
|
['has-clear-button']: this.showClearButton,
|
|
17745
|
-
} }, hAsync("slot", { name: "buttons" }, showDefaultButtons && (hAsync("ion-button", { id: "cancel-button", color: this.color, onClick: () => this.cancel(true), disabled: isButtonDisabled }, this.cancelText)), hAsync("div", { class: "datetime-action-buttons-container" }, showClearButton && (hAsync("ion-button", { id: "clear-button", color: this.color, onClick: () => clearButtonClick(), disabled: isButtonDisabled }, this.clearText)), showDefaultButtons && (hAsync("ion-button", { id: "confirm-button", fill: confirmFill, color: this.color, onClick: () => this.confirm(true), disabled:
|
|
17998
|
+
} }, hAsync("slot", { name: "buttons" }, showDefaultButtons && (hAsync("ion-button", { id: "cancel-button", color: this.color, onClick: () => this.cancel(true), disabled: isButtonDisabled }, this.cancelText)), hAsync("div", { class: "datetime-action-buttons-container" }, showClearButton && (hAsync("ion-button", { id: "clear-button", color: this.color, onClick: () => clearButtonClick(), disabled: isButtonDisabled }, this.clearText)), showDefaultButtons && (hAsync("ion-button", { id: "confirm-button", fill: confirmFill, color: this.color, onClick: () => this.confirm(true), disabled: isConfirmDisabled }, this.doneText))))))));
|
|
17746
17999
|
}
|
|
17747
18000
|
/**
|
|
17748
18001
|
* Wheel picker render methods
|
|
@@ -18042,7 +18295,7 @@ class Datetime {
|
|
|
18042
18295
|
'calendar-month-disabled': !isWorkingMonth && swipeDisabled,
|
|
18043
18296
|
} }, hAsync("div", { class: "calendar-month-grid" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7, this.showAdjacentDays).map((dateObject, index) => {
|
|
18044
18297
|
const { day, dayOfWeek, isAdjacentDay } = dateObject;
|
|
18045
|
-
const { el, highlightedDates, isDateEnabled,
|
|
18298
|
+
const { el, highlightedDates, isDateEnabled, showAdjacentDays } = this;
|
|
18046
18299
|
let _month = month;
|
|
18047
18300
|
let _year = year;
|
|
18048
18301
|
if (showAdjacentDays && isAdjacentDay && day !== null) {
|
|
@@ -18071,7 +18324,7 @@ class Datetime {
|
|
|
18071
18324
|
}
|
|
18072
18325
|
const referenceParts = { month: _month, day, year: _year, isAdjacentDay };
|
|
18073
18326
|
const isCalendarPadding = day === null;
|
|
18074
|
-
const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, text, } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
|
|
18327
|
+
const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, isRangeStart, isRangeEnd, isInRange, text, } = getCalendarDayState(this.locale, referenceParts, this.isRangeParts(this.activeParts) ? [] : this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues, this.rangeParts);
|
|
18075
18328
|
const dateIsoString = convertDataToISO(referenceParts);
|
|
18076
18329
|
let isCalDayDisabled = isCalMonthDisabled || isDayDisabled;
|
|
18077
18330
|
if (!isCalDayDisabled && isDateEnabled !== undefined) {
|
|
@@ -18094,24 +18347,50 @@ class Datetime {
|
|
|
18094
18347
|
*/
|
|
18095
18348
|
const isCalDayConstrained = isCalDayDisabled && isDatetimeDisabled;
|
|
18096
18349
|
const isButtonDisabled = isCalDayDisabled || isDatetimeDisabled;
|
|
18350
|
+
/**
|
|
18351
|
+
* Determine if this day is part of the range selection.
|
|
18352
|
+
* Range styling takes priority over highlightedDates.
|
|
18353
|
+
*/
|
|
18354
|
+
const isPartOfRange = isRangeStart || isRangeEnd || isInRange;
|
|
18097
18355
|
let dateStyle = undefined;
|
|
18098
18356
|
/**
|
|
18099
|
-
* Custom highlight styles should not override the style for selected dates
|
|
18100
|
-
* nor apply to "filler days" at the start of the grid.
|
|
18357
|
+
* Custom highlight styles should not override the style for selected dates
|
|
18358
|
+
* or range selection, nor apply to "filler days" at the start of the grid.
|
|
18101
18359
|
*/
|
|
18102
|
-
if (highlightedDates !== undefined && !isActive && day !== null && !isAdjacentDay) {
|
|
18360
|
+
if (highlightedDates !== undefined && !isActive && !isPartOfRange && day !== null && !isAdjacentDay) {
|
|
18103
18361
|
dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);
|
|
18104
18362
|
}
|
|
18105
18363
|
let dateParts = undefined;
|
|
18106
18364
|
// "Filler days" at the beginning of the grid should not get the calendar day
|
|
18107
18365
|
// CSS parts added to them
|
|
18108
18366
|
if (!isCalendarPadding && !isAdjacentDay) {
|
|
18109
|
-
dateParts = `calendar-day${isActive ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}`;
|
|
18367
|
+
dateParts = `calendar-day${isActive || isRangeStart || isRangeEnd ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}${isRangeStart ? ' range-start range-selection' : ''}${isRangeEnd ? ' range-end range-selection' : ''}${isInRange ? ' range-selection' : ''}`;
|
|
18110
18368
|
}
|
|
18111
18369
|
else if (isAdjacentDay) {
|
|
18112
18370
|
dateParts = `calendar-day${isCalDayDisabled ? ' disabled' : ''}`;
|
|
18113
18371
|
}
|
|
18114
|
-
|
|
18372
|
+
/**
|
|
18373
|
+
* Build the wrapper's shadow part attribute for range track styling.
|
|
18374
|
+
*/
|
|
18375
|
+
const wrapperParts = isPartOfRange && !isCalendarPadding && !isAdjacentDay ? 'range-track' : undefined;
|
|
18376
|
+
/**
|
|
18377
|
+
* Build the aria-label for range mode accessibility.
|
|
18378
|
+
*/
|
|
18379
|
+
let rangeAriaLabel = ariaLabel;
|
|
18380
|
+
if (this.isRangeMode && ariaLabel) {
|
|
18381
|
+
if (isRangeStart) {
|
|
18382
|
+
rangeAriaLabel = `${ariaLabel}, ${this.startDateLabel}`;
|
|
18383
|
+
}
|
|
18384
|
+
if (isRangeEnd) {
|
|
18385
|
+
rangeAriaLabel = `${ariaLabel}, ${this.endDateLabel}`;
|
|
18386
|
+
}
|
|
18387
|
+
}
|
|
18388
|
+
return (hAsync("div", { class: {
|
|
18389
|
+
'calendar-day-wrapper': true,
|
|
18390
|
+
'calendar-day-wrapper-range-start': isRangeStart,
|
|
18391
|
+
'calendar-day-wrapper-in-range': isInRange,
|
|
18392
|
+
'calendar-day-wrapper-range-end': isRangeEnd,
|
|
18393
|
+
}, part: wrapperParts }, hAsync("button", {
|
|
18115
18394
|
// We need to use !important for the inline styles here because
|
|
18116
18395
|
// otherwise the CSS shadow parts will override these styles.
|
|
18117
18396
|
// See https://github.com/WICG/webcomponents/issues/847
|
|
@@ -18127,25 +18406,37 @@ class Datetime {
|
|
|
18127
18406
|
}, tabindex: "-1", "data-day": day, "data-month": _month, "data-year": _year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isButtonDisabled, class: {
|
|
18128
18407
|
'calendar-day-padding': isCalendarPadding,
|
|
18129
18408
|
'calendar-day': true,
|
|
18130
|
-
'calendar-day-active': isActive,
|
|
18409
|
+
'calendar-day-active': isActive || isRangeStart || isRangeEnd,
|
|
18131
18410
|
'calendar-day-constrained': isCalDayConstrained,
|
|
18132
18411
|
'calendar-day-today': isToday,
|
|
18133
18412
|
'calendar-day-adjacent-day': isAdjacentDay,
|
|
18134
|
-
|
|
18413
|
+
'calendar-day-range-start': isRangeStart,
|
|
18414
|
+
'calendar-day-range-end': isRangeEnd,
|
|
18415
|
+
'calendar-day-in-range': isInRange,
|
|
18416
|
+
}, part: dateParts, "aria-hidden": isCalendarPadding ? 'true' : null, "aria-selected": isActive || isRangeStart || isRangeEnd ? 'true' : ariaSelected, "aria-label": rangeAriaLabel, onClick: () => {
|
|
18135
18417
|
if (isCalendarPadding) {
|
|
18136
18418
|
return;
|
|
18137
18419
|
}
|
|
18138
18420
|
if (isAdjacentDay) {
|
|
18139
18421
|
// The user selected a day outside the current month. Ignore this button, as the month will be re-rendered.
|
|
18140
18422
|
this.el.blur();
|
|
18141
|
-
|
|
18423
|
+
if (!this.isRangeMode) {
|
|
18424
|
+
this.activeParts = Object.assign(Object.assign({}, activePart), referenceParts);
|
|
18425
|
+
}
|
|
18142
18426
|
this.animateToDate(referenceParts);
|
|
18143
|
-
this.
|
|
18427
|
+
if (this.isRangeMode) {
|
|
18428
|
+
this.setActiveParts(referenceParts);
|
|
18429
|
+
}
|
|
18430
|
+
else {
|
|
18431
|
+
this.confirm();
|
|
18432
|
+
}
|
|
18144
18433
|
}
|
|
18145
18434
|
else {
|
|
18146
18435
|
this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), referenceParts));
|
|
18147
|
-
|
|
18148
|
-
|
|
18436
|
+
if (this.isRangeMode) {
|
|
18437
|
+
this.setActiveParts(referenceParts);
|
|
18438
|
+
}
|
|
18439
|
+
else if (this.isMultipleMode) {
|
|
18149
18440
|
this.setActiveParts(referenceParts, isActive);
|
|
18150
18441
|
}
|
|
18151
18442
|
else {
|
|
@@ -18216,10 +18507,23 @@ class Datetime {
|
|
|
18216
18507
|
}
|
|
18217
18508
|
getHeaderSelectedDateText() {
|
|
18218
18509
|
var _a;
|
|
18219
|
-
const { activeParts, formatOptions,
|
|
18510
|
+
const { activeParts, formatOptions, titleSelectedDatesFormatter } = this;
|
|
18220
18511
|
const isArray = Array.isArray(activeParts);
|
|
18512
|
+
const dateFormatOptions = (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' };
|
|
18221
18513
|
let headerText;
|
|
18222
|
-
if (
|
|
18514
|
+
if (this.isRangeMode) {
|
|
18515
|
+
headerText = this.getRangeHeaderText(dateFormatOptions);
|
|
18516
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
18517
|
+
try {
|
|
18518
|
+
const rangeValues = this.getRangeValueArray();
|
|
18519
|
+
headerText = titleSelectedDatesFormatter(rangeValues);
|
|
18520
|
+
}
|
|
18521
|
+
catch (e) {
|
|
18522
|
+
printIonError('[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:', e);
|
|
18523
|
+
}
|
|
18524
|
+
}
|
|
18525
|
+
}
|
|
18526
|
+
else if (this.isMultipleMode && isArray && activeParts.length !== 1) {
|
|
18223
18527
|
headerText = `${activeParts.length} days`; // default/fallback for multiple selection
|
|
18224
18528
|
if (titleSelectedDatesFormatter !== undefined) {
|
|
18225
18529
|
try {
|
|
@@ -18232,10 +18536,35 @@ class Datetime {
|
|
|
18232
18536
|
}
|
|
18233
18537
|
else {
|
|
18234
18538
|
// for exactly 1 day selected (multiple set or not), show a formatted version of that
|
|
18235
|
-
headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(),
|
|
18539
|
+
headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), dateFormatOptions);
|
|
18236
18540
|
}
|
|
18237
18541
|
return headerText;
|
|
18238
18542
|
}
|
|
18543
|
+
/**
|
|
18544
|
+
* Returns the formatted range header text.
|
|
18545
|
+
* Shows "Start date - End date" with placeholders from startDateLabel/endDateLabel.
|
|
18546
|
+
*/
|
|
18547
|
+
getRangeHeaderText(dateFormatOptions) {
|
|
18548
|
+
const range = this.rangeParts;
|
|
18549
|
+
if (!range) {
|
|
18550
|
+
return `${this.startDateLabel} - ${this.endDateLabel}`;
|
|
18551
|
+
}
|
|
18552
|
+
const startText = getLocalizedDateTime(this.locale, range.start, dateFormatOptions);
|
|
18553
|
+
const endText = range.end ? getLocalizedDateTime(this.locale, range.end, dateFormatOptions) : this.endDateLabel;
|
|
18554
|
+
return `${startText} - ${endText}`;
|
|
18555
|
+
}
|
|
18556
|
+
/**
|
|
18557
|
+
* Returns the current range value as an ISO string array for
|
|
18558
|
+
* titleSelectedDatesFormatter and ionChange.
|
|
18559
|
+
*/
|
|
18560
|
+
getRangeValueArray() {
|
|
18561
|
+
const range = this.rangeParts;
|
|
18562
|
+
if (!range)
|
|
18563
|
+
return [];
|
|
18564
|
+
if (!range.end)
|
|
18565
|
+
return [convertDataToISO(range.start)];
|
|
18566
|
+
return [convertDataToISO(range.start), convertDataToISO(range.end)];
|
|
18567
|
+
}
|
|
18239
18568
|
renderHeader(showExpandedHeader = true) {
|
|
18240
18569
|
const hasSlottedTitle = this.el.querySelector('[slot="title"]') !== null;
|
|
18241
18570
|
if (!hasSlottedTitle && !this.showDefaultTitle) {
|
|
@@ -18393,7 +18722,7 @@ class Datetime {
|
|
|
18393
18722
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
18394
18723
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
18395
18724
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
18396
|
-
return (hAsync(Host, { key: '
|
|
18725
|
+
return (hAsync(Host, { key: '8ec46f2a5bc855c3d6210f72305b66655ad59b93', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
|
|
18397
18726
|
[theme]: true,
|
|
18398
18727
|
['datetime-readonly']: readonly,
|
|
18399
18728
|
['datetime-disabled']: disabled,
|
|
@@ -18403,7 +18732,7 @@ class Datetime {
|
|
|
18403
18732
|
[`datetime-size-${size}`]: true,
|
|
18404
18733
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
18405
18734
|
[`datetime-grid`]: isGridStyle,
|
|
18406
|
-
})) }, hAsync("div", { key: '
|
|
18735
|
+
})) }, hAsync("div", { key: 'b7bf9b1e681b8d1a5a24a27c758a528c03a203fc', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(theme)));
|
|
18407
18736
|
}
|
|
18408
18737
|
get el() { return getElement(this); }
|
|
18409
18738
|
static get watchers() { return {
|
|
@@ -18472,6 +18801,9 @@ class Datetime {
|
|
|
18472
18801
|
"firstDayOfWeek": [2, "first-day-of-week"],
|
|
18473
18802
|
"titleSelectedDatesFormatter": [16],
|
|
18474
18803
|
"multiple": [4],
|
|
18804
|
+
"selectionMode": [1, "selection-mode"],
|
|
18805
|
+
"startDateLabel": [1, "start-date-label"],
|
|
18806
|
+
"endDateLabel": [1, "end-date-label"],
|
|
18475
18807
|
"highlightedDates": [16],
|
|
18476
18808
|
"value": [1025],
|
|
18477
18809
|
"showDefaultTitle": [4, "show-default-title"],
|
|
@@ -18556,12 +18888,12 @@ class DatetimeButton {
|
|
|
18556
18888
|
* to the locale specified on ion-datetime.
|
|
18557
18889
|
*/
|
|
18558
18890
|
this.setDateTimeText = async () => {
|
|
18559
|
-
var _a, _b, _c, _d
|
|
18891
|
+
var _a, _b, _c, _d;
|
|
18560
18892
|
const { datetimeEl, datetimePresentation } = this;
|
|
18561
18893
|
if (!datetimeEl) {
|
|
18562
18894
|
return;
|
|
18563
18895
|
}
|
|
18564
|
-
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
18896
|
+
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, selectionMode, titleSelectedDatesFormatter, } = datetimeEl;
|
|
18565
18897
|
const parsedValues = this.getParsedDateValues(value);
|
|
18566
18898
|
/**
|
|
18567
18899
|
* Both ion-datetime and ion-datetime-button default to today's date and
|
|
@@ -18573,6 +18905,8 @@ class DatetimeButton {
|
|
|
18573
18905
|
if (!parsedDatetimes) {
|
|
18574
18906
|
return;
|
|
18575
18907
|
}
|
|
18908
|
+
const isRangeMode = selectionMode === 'range';
|
|
18909
|
+
const isMultipleMode = selectionMode === 'multiple' || (selectionMode === undefined && multiple);
|
|
18576
18910
|
/**
|
|
18577
18911
|
* If developers incorrectly use multiple="true"
|
|
18578
18912
|
* with non "date" datetimes, then just select
|
|
@@ -18582,11 +18916,12 @@ class DatetimeButton {
|
|
|
18582
18916
|
*/
|
|
18583
18917
|
const firstParsedDatetime = parsedDatetimes[0];
|
|
18584
18918
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
18919
|
+
const dateFormatOptions = (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { month: 'short', day: 'numeric', year: 'numeric' };
|
|
18585
18920
|
this.dateText = this.timeText = undefined;
|
|
18586
18921
|
switch (datetimePresentation) {
|
|
18587
18922
|
case 'date-time':
|
|
18588
18923
|
case 'time-date':
|
|
18589
|
-
const dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
18924
|
+
const dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
18590
18925
|
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);
|
|
18591
18926
|
if (preferWheel) {
|
|
18592
18927
|
this.dateText = `${dateText} ${timeText}`;
|
|
@@ -18597,7 +18932,22 @@ class DatetimeButton {
|
|
|
18597
18932
|
}
|
|
18598
18933
|
break;
|
|
18599
18934
|
case 'date':
|
|
18600
|
-
if (
|
|
18935
|
+
if (isRangeMode && parsedValues.length === 2) {
|
|
18936
|
+
// Range mode: display "startDate - endDate"
|
|
18937
|
+
const startDate = getLocalizedDateTime(locale, parsedDatetimes[0], dateFormatOptions);
|
|
18938
|
+
const endDate = getLocalizedDateTime(locale, parsedDatetimes.length > 1 ? parsedDatetimes[1] : parsedDatetimes[0], dateFormatOptions);
|
|
18939
|
+
let rangeText = `${startDate} - ${endDate}`;
|
|
18940
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
18941
|
+
try {
|
|
18942
|
+
rangeText = titleSelectedDatesFormatter(parsedValues);
|
|
18943
|
+
}
|
|
18944
|
+
catch (e) {
|
|
18945
|
+
printIonError('[ion-datetime-button] - Exception in provided `titleSelectedDatesFormatter`:', e);
|
|
18946
|
+
}
|
|
18947
|
+
}
|
|
18948
|
+
this.dateText = rangeText;
|
|
18949
|
+
}
|
|
18950
|
+
else if (isMultipleMode && parsedValues.length !== 1) {
|
|
18601
18951
|
let headerText = `${parsedValues.length} days`; // default/fallback for multiple selection
|
|
18602
18952
|
if (titleSelectedDatesFormatter !== undefined) {
|
|
18603
18953
|
try {
|
|
@@ -18610,20 +18960,20 @@ class DatetimeButton {
|
|
|
18610
18960
|
this.dateText = headerText;
|
|
18611
18961
|
}
|
|
18612
18962
|
else {
|
|
18613
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
18963
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
18614
18964
|
}
|
|
18615
18965
|
break;
|
|
18616
18966
|
case 'time':
|
|
18617
18967
|
this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);
|
|
18618
18968
|
break;
|
|
18619
18969
|
case 'month-year':
|
|
18620
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (
|
|
18970
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _b !== void 0 ? _b : { month: 'long', year: 'numeric' });
|
|
18621
18971
|
break;
|
|
18622
18972
|
case 'month':
|
|
18623
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (
|
|
18973
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _c !== void 0 ? _c : { month: 'long' });
|
|
18624
18974
|
break;
|
|
18625
18975
|
case 'year':
|
|
18626
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (
|
|
18976
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _d !== void 0 ? _d : { year: 'numeric' });
|
|
18627
18977
|
break;
|
|
18628
18978
|
}
|
|
18629
18979
|
};
|
|
@@ -18844,11 +19194,11 @@ class DatetimeButton {
|
|
|
18844
19194
|
render() {
|
|
18845
19195
|
const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
|
|
18846
19196
|
const theme = getIonTheme(this);
|
|
18847
|
-
return (hAsync(Host, { key: '
|
|
19197
|
+
return (hAsync(Host, { key: 'b1bc06c9642af956c42e886af07e27176ba4a13a', class: createColorClasses$1(color, {
|
|
18848
19198
|
[theme]: true,
|
|
18849
19199
|
[`${selectedButton}-active`]: datetimeActive,
|
|
18850
19200
|
['datetime-button-disabled']: disabled,
|
|
18851
|
-
}) }, dateText && (hAsync("button", { key: '
|
|
19201
|
+
}) }, dateText && (hAsync("button", { key: '3939366688b3be6db62b70b6a3b717819934560f', class: "ion-activatable", id: "date-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleDateClick, disabled: disabled, part: "native", ref: (el) => (this.dateTargetEl = el) }, hAsync("slot", { key: 'e4cf933fcfdb2c7559806af448c4ec8dfd5a5e14', name: "date-target" }, dateText), theme === 'md' && hAsync("ion-ripple-effect", { key: 'b1c11e4c67bce14f5dfa8b69a15cde5b367b1c4a' }))), timeText && (hAsync("button", { key: '708c2070eecabf09e3db6d8f8a45a76ecd53ccf8', class: "ion-activatable", id: "time-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleTimeClick, disabled: disabled, part: "native", ref: (el) => (this.timeTargetEl = el) }, hAsync("slot", { key: '2885629c3fb033b234bfae0ec9038874e109b0de', name: "time-target" }, timeText), theme === 'md' && hAsync("ion-ripple-effect", { key: '4eed69bef9ed46fb1fd53605bcd05cd104e2505b' })))));
|
|
18852
19202
|
}
|
|
18853
19203
|
get el() { return getElement(this); }
|
|
18854
19204
|
static get style() { return {
|