@ionic/core 9.0.11-dev.11793726772.1e883321 → 9.0.11-dev.11793728481.1fc40367
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-content.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/{p-BCQSEpww.js → p-B7ExaLVL.js} +1 -1
- package/components/{p-CseHeZbU.js → p-BCYVFy50.js} +1 -1
- package/components/p-ByE0slik.js +4 -0
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -13
- package/dist/cjs/ion-datetime-button.cjs.entry.js +33 -6
- package/dist/cjs/ion-datetime.cjs.entry.js +353 -36
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/content/{content.ios.css → content.css} +41 -65
- package/dist/collection/components/content/content.js +5 -9
- package/dist/collection/components/datetime/datetime.ionic.css +179 -5
- package/dist/collection/components/datetime/datetime.ios.css +134 -2
- package/dist/collection/components/datetime/datetime.js +406 -33
- package/dist/collection/components/datetime/datetime.md.css +120 -0
- package/dist/collection/components/datetime/utils/state.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +34 -6
- package/dist/docs.json +160 -127
- package/dist/esm/{format-NT7iHsbA.js → format-DUHrIiJq.js} +1 -1
- package/dist/esm/ion-app_8.entry.js +5 -13
- package/dist/esm/ion-datetime-button.entry.js +34 -7
- package/dist/esm/ion-datetime.entry.js +354 -37
- package/dist/esm/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-56d77e95.entry.js +4 -0
- package/dist/ionic/{p-BtccSO5J.js → p-CaOPF8Xt.js} +1 -1
- package/dist/ionic/p-b30b468d.entry.js +4 -0
- package/dist/ionic/p-ceca04fb.entry.js +4 -0
- package/dist/types/components/datetime/datetime-interface.d.ts +4 -0
- package/dist/types/components/datetime/datetime.d.ts +71 -2
- package/dist/types/components/datetime/utils/state.d.ts +5 -2
- package/dist/types/components.d.ts +33 -0
- package/hydrate/index.js +400 -56
- package/hydrate/index.mjs +400 -56
- package/package.json +1 -1
- package/components/p-Da8LCPwo.js +0 -4
- package/dist/collection/components/content/content.ionic.css +0 -352
- package/dist/collection/components/content/content.md.css +0 -347
- package/dist/ionic/p-0743a26a.entry.js +0 -4
- package/dist/ionic/p-39e3be74.entry.js +0 -4
- package/dist/ionic/p-ad46d2fd.entry.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -15155,11 +15155,7 @@ class Col {
|
|
|
15155
15155
|
}; }
|
|
15156
15156
|
}
|
|
15157
15157
|
|
|
15158
|
-
const
|
|
15159
|
-
|
|
15160
|
-
const contentIosCss = () => `:host{--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{right:0px;left:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{right:0px;left:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1);transition:height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1);transition:transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1);transition:transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1)}:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-header-hide-height, 0px));-webkit-transform:translateY(calc(-1 * var(--internal-header-hide-height, 0px)));transform:translateY(calc(-1 * var(--internal-header-hide-height, 0px)));-webkit-transition:height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1);transition:height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1);transition:transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1);transition:transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1)}:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1);transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1)}:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-footer-hide-height, 0px));-webkit-transition:height 350ms cubic-bezier(0.4, 0, 1, 1);transition:height 350ms cubic-bezier(0.4, 0, 1, 1)}:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1);transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1)}:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-tab-bar-hide-height, 0px));-webkit-transition:height 350ms cubic-bezier(0.4, 0, 1, 1);transition:height 350ms cubic-bezier(0.4, 0, 1, 1)}@media (prefers-reduced-motion: reduce){:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll,:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll,:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll{-webkit-transition:none;transition:none}}:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000)}`;
|
|
15161
|
-
|
|
15162
|
-
const contentMdCss = () => `:host{--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{right:0px;left:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{right:0px;left:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1);transition:height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1);transition:transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1);transition:transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1)}:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-header-hide-height, 0px));-webkit-transform:translateY(calc(-1 * var(--internal-header-hide-height, 0px)));transform:translateY(calc(-1 * var(--internal-header-hide-height, 0px)));-webkit-transition:height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1);transition:height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1);transition:transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1);transition:transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1)}:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1);transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1)}:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-footer-hide-height, 0px));-webkit-transition:height 350ms cubic-bezier(0.4, 0, 1, 1);transition:height 350ms cubic-bezier(0.4, 0, 1, 1)}:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1);transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1)}:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-tab-bar-hide-height, 0px));-webkit-transition:height 350ms cubic-bezier(0.4, 0, 1, 1);transition:height 350ms cubic-bezier(0.4, 0, 1, 1)}@media (prefers-reduced-motion: reduce){:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll,:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll,:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll{-webkit-transition:none;transition:none}}:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000)}`;
|
|
15158
|
+
const contentCss = () => `:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{right:0px;left:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{right:0px;left:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1);transition:height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1);transition:transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1);transition:transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 300ms cubic-bezier(0, 0, 0.2, 1)}:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-header-hide-height, 0px));-webkit-transform:translateY(calc(-1 * var(--internal-header-hide-height, 0px)));transform:translateY(calc(-1 * var(--internal-header-hide-height, 0px)));-webkit-transition:height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1);transition:height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1);transition:transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1);transition:transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1), -webkit-transform 200ms cubic-bezier(0.4, 0, 1, 1)}:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1);transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1)}:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-footer-hide-height, 0px));-webkit-transition:height 350ms cubic-bezier(0.4, 0, 1, 1);transition:height 350ms cubic-bezier(0.4, 0, 1, 1)}:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll{-webkit-transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1);transition:height 200ms cubic-bezier(0.16, 1, 0.3, 1)}:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll{height:calc(100% + var(--internal-tab-bar-hide-height, 0px));-webkit-transition:height 350ms cubic-bezier(0.4, 0, 1, 1);transition:height 350ms cubic-bezier(0.4, 0, 1, 1)}@media (prefers-reduced-motion: reduce){:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll,:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll,:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll{-webkit-transition:none;transition:none}}`;
|
|
15163
15159
|
|
|
15164
15160
|
/**
|
|
15165
15161
|
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
@@ -15586,7 +15582,7 @@ class Content {
|
|
|
15586
15582
|
const forceOverscroll = this.shouldForceOverscroll(mode);
|
|
15587
15583
|
const transitionShadow = theme === 'ios';
|
|
15588
15584
|
this.resize();
|
|
15589
|
-
return (hAsync(Host, { key: '
|
|
15585
|
+
return (hAsync(Host, { key: '7e283337732b709e43fe89b08f6852c499b964ff', role: isMainContent ? 'main' : undefined, class: createColorClasses$1(this.color, {
|
|
15590
15586
|
[theme]: true,
|
|
15591
15587
|
'content-fullscreen': this.fullscreen,
|
|
15592
15588
|
'content-sizing': this.sizeToContent,
|
|
@@ -15595,12 +15591,12 @@ class Content {
|
|
|
15595
15591
|
}), style: {
|
|
15596
15592
|
'--offset-top': `${this.cTop}px`,
|
|
15597
15593
|
'--offset-bottom': `${this.cBottom}px`,
|
|
15598
|
-
}, ...inheritedAttributes }, hAsync("div", { key: '
|
|
15594
|
+
}, ...inheritedAttributes }, hAsync("div", { key: '0dcbe4f4fe2d0f85b8c36bc656fc619afdc89cfe', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? hAsync("slot", { name: "fixed" }) : null, hAsync("div", { key: 'cbe91794c2fc53a59f8994968571a677a2e8346b', class: {
|
|
15599
15595
|
'inner-scroll': true,
|
|
15600
15596
|
'scroll-x': scrollX,
|
|
15601
15597
|
'scroll-y': scrollY,
|
|
15602
15598
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
15603
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '
|
|
15599
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '1a6b9bf25051eee41003185e1b519e4c4af2c001' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? hAsync("slot", { name: "fixed" }) : null));
|
|
15604
15600
|
}
|
|
15605
15601
|
get el() { return getElement(this); }
|
|
15606
15602
|
static get watchers() { return {
|
|
@@ -15608,13 +15604,9 @@ class Content {
|
|
|
15608
15604
|
"fullscreenChanged": 0
|
|
15609
15605
|
}]
|
|
15610
15606
|
}; }
|
|
15611
|
-
static get style() { return
|
|
15612
|
-
ionic: contentIonicCss(),
|
|
15613
|
-
ios: contentIosCss(),
|
|
15614
|
-
md: contentMdCss()
|
|
15615
|
-
}; }
|
|
15607
|
+
static get style() { return contentCss(); }
|
|
15616
15608
|
static get cmpMeta() { return {
|
|
15617
|
-
"$flags$":
|
|
15609
|
+
"$flags$": 265,
|
|
15618
15610
|
"$tagName$": "ion-content",
|
|
15619
15611
|
"$members$": {
|
|
15620
15612
|
"color": [513],
|
|
@@ -17404,7 +17396,7 @@ const isDayDisabled = (refParts, minParts, maxParts, dayValues) => {
|
|
|
17404
17396
|
* Given a locale, a date, the selected date(s), and today's date,
|
|
17405
17397
|
* generate the state for a given calendar day button.
|
|
17406
17398
|
*/
|
|
17407
|
-
const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {
|
|
17399
|
+
const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues, rangeParts) => {
|
|
17408
17400
|
/**
|
|
17409
17401
|
* activeParts signals what day(s) are currently selected in the datetime.
|
|
17410
17402
|
* If multiple="true", this will be an array, but the logic in this util
|
|
@@ -17420,6 +17412,20 @@ const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts
|
|
|
17420
17412
|
const isActive = activePartsArray.find((parts) => isSameDay(refParts, parts)) !== undefined;
|
|
17421
17413
|
const isToday = isSameDay(refParts, todayParts);
|
|
17422
17414
|
const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);
|
|
17415
|
+
/**
|
|
17416
|
+
* Range state: determine if this day is the range start, end, or in between.
|
|
17417
|
+
*/
|
|
17418
|
+
let isRangeStart = false;
|
|
17419
|
+
let isRangeEnd = false;
|
|
17420
|
+
let isInRange = false;
|
|
17421
|
+
if (rangeParts) {
|
|
17422
|
+
const { start, end } = rangeParts;
|
|
17423
|
+
isRangeStart = isSameDay(refParts, start);
|
|
17424
|
+
if (end) {
|
|
17425
|
+
isRangeEnd = isSameDay(refParts, end);
|
|
17426
|
+
isInRange = !disabled && !isRangeStart && !isRangeEnd && isAfter(refParts, start) && isBefore(refParts, end);
|
|
17427
|
+
}
|
|
17428
|
+
}
|
|
17423
17429
|
/**
|
|
17424
17430
|
* Note that we always return one object regardless of whether activeParts
|
|
17425
17431
|
* was an array, since we pare down to one value for isActive.
|
|
@@ -17428,6 +17434,9 @@ const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts
|
|
|
17428
17434
|
disabled,
|
|
17429
17435
|
isActive,
|
|
17430
17436
|
isToday,
|
|
17437
|
+
isRangeStart,
|
|
17438
|
+
isRangeEnd,
|
|
17439
|
+
isInRange,
|
|
17431
17440
|
ariaSelected: isActive ? 'true' : null,
|
|
17432
17441
|
ariaLabel: generateDayAriaLabel(locale, isToday, refParts),
|
|
17433
17442
|
text: refParts.day != null ? getDay(locale, refParts) : null,
|
|
@@ -17550,11 +17559,11 @@ const checkForPresentationFormatMismatch = (el, presentation, formatOptions) =>
|
|
|
17550
17559
|
}
|
|
17551
17560
|
};
|
|
17552
17561
|
|
|
17553
|
-
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))}`;
|
|
17562
|
+
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-in-range::before,:host .calendar-day-wrapper-range-start::before,:host .calendar-day-wrapper-range-end::before{position:absolute;top:50%;inset-inline-start:0;inset-inline-end:0;height:var(--range-track-height);-webkit-transform:translateY(-50%);transform:translateY(-50%);background:-webkit-gradient(linear, left top, left bottom, from(var(--range-background)), to(var(--range-background))), -webkit-gradient(linear, left top, left bottom, from(var(--background)), to(var(--background)));background:linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));content:"";z-index:-1}:host .calendar-day-wrapper-range-start::before{inset-inline-start:50%}:host .calendar-day-wrapper-range-end::before{inset-inline-end:50%}:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+.calendar-day-wrapper-in-range)::before,:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+.calendar-day-wrapper-range-end)::before,:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+.calendar-day-wrapper-in-range)::before,:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+.calendar-day-wrapper-range-end)::before{inset-inline-end:-1px}:host .calendar-day-wrapper-in-range:nth-child(7n)::before,:host .calendar-day-wrapper-range-start:nth-child(7n)::before{inset-inline-end:calc(var(--range-track-edge-overflow, 0px) * -1)}:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before{inset-inline-start:calc(var(--range-track-edge-overflow, 0px) * -1)}:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before{display:none}:host(.datetime-disabled.datetime-range) .calendar-month-grid{opacity:0.4}:host(.datetime-disabled.datetime-range) .calendar-month-grid .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-text-disabled, var(--token-primitives-neutral-500, #9fa5ad))}.calendar-day.calendar-day-today{color:var(--token-text-select, 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-bg-primary-subtle-default, 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):not(.calendar-day-in-range):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-bg-primary-subtle-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff)));--range-track-height:var(--token-scale-1200, 48px)}:host .calendar-day.calendar-day-range-start,:host .calendar-day.calendar-day-range-end{border-radius:var(--token-border-radius-full, 999px);background:var(--token-bg-primary-base-default, var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef))));color:var(--token-text-inverse, var(--token-primitives-base-white, #ffffff))}.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-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}:host .calendar-day.calendar-day-today.calendar-day-range-start,:host .calendar-day.calendar-day-today.calendar-day-range-end{color:var(--token-text-inverse, var(--token-primitives-base-white, #ffffff))}@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{background:var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)))}}.calendar-day.calendar-day-range-start:active,.calendar-day.calendar-day-range-end:active{background:var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)))}.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(.datetime-disabled.datetime-range) .calendar-day[disabled]:not(.calendar-day-constrained){color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528))}:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-adjacent-day[disabled]{color:var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a))}:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-today[disabled]{color:var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-start[disabled],:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-end[disabled]{color:var(--token-text-inverse, var(--token-primitives-base-white, #ffffff))}:host(.datetime-readonly) .calendar-day.calendar-day-range-start[disabled],:host(.datetime-readonly) .calendar-day.calendar-day-range-end[disabled]{color:var(--token-text-inverse, var(--token-primitives-base-white, #ffffff))}: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]{color:var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))}: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-text-inverse, var(--token-primitives-base-white, #ffffff))}: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))}`;
|
|
17554
17563
|
|
|
17555
|
-
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:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .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-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.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-primary, #0054e9)}:host(.ion-color) .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host(.ion-color) .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-primary-rgb, 0, 84, 233), 0.2);font-size:min(1.375rem, 35.2px)}:host(.ion-color) .calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .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-primary, #0054e9);font-weight:600}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .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%}`;
|
|
17564
|
+
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-in-range::before,:host .calendar-day-wrapper-range-start::before,:host .calendar-day-wrapper-range-end::before{position:absolute;top:50%;inset-inline-start:0;inset-inline-end:0;height:var(--range-track-height);-webkit-transform:translateY(-50%);transform:translateY(-50%);background:-webkit-gradient(linear, left top, left bottom, from(var(--range-background)), to(var(--range-background))), -webkit-gradient(linear, left top, left bottom, from(var(--background)), to(var(--background)));background:linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));content:"";z-index:-1}:host .calendar-day-wrapper-range-start::before{inset-inline-start:50%}:host .calendar-day-wrapper-range-end::before{inset-inline-end:50%}:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+.calendar-day-wrapper-in-range)::before,:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+.calendar-day-wrapper-range-end)::before,:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+.calendar-day-wrapper-in-range)::before,:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+.calendar-day-wrapper-range-end)::before{inset-inline-end:-1px}:host .calendar-day-wrapper-in-range:nth-child(7n)::before,:host .calendar-day-wrapper-range-start:nth-child(7n)::before{inset-inline-end:calc(var(--range-track-edge-overflow, 0px) * -1)}:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before{inset-inline-start:calc(var(--range-track-edge-overflow, 0px) * -1)}:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before{display:none}:host(.datetime-disabled.datetime-range) .calendar-month-grid{opacity:0.4}:host(.datetime-disabled.datetime-range) .calendar-month-grid .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:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .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-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.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-primary, #0054e9)}:host(.ion-color) .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host(.ion-color) .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-primary-rgb, 0, 84, 233), 0.12);font-size:min(1.375rem, 35.2px)}:host(.ion-color) .calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.12)}:host .calendar-day.calendar-day-today{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .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-primary, #0054e9);font-weight:600}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .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.12);--range-track-height:40px;--range-track-edge-overflow:8px}:host(.ion-color){--range-background:rgba(var(--ion-color-base-rgb), 0.12)}:host(.datetime-range) .calendar-day-wrapper{height:auto}:host .calendar-day.calendar-day-range-start,:host .calendar-day.calendar-day-range-end{border-radius:50%;background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff);font-weight:600}: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 .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%}`;
|
|
17556
17565
|
|
|
17557
|
-
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:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .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-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.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-primary-contrast, #fff)}:host(.ion-color){--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-primary, #0054e9);color:var(--title-color)}:host(.ion-color) .datetime-header{background:var(--ion-color-base)}: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-primary, #0054e9);color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .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-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .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-primary, #0054e9);background:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .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}`;
|
|
17566
|
+
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-in-range::before,:host .calendar-day-wrapper-range-start::before,:host .calendar-day-wrapper-range-end::before{position:absolute;top:50%;inset-inline-start:0;inset-inline-end:0;height:var(--range-track-height);-webkit-transform:translateY(-50%);transform:translateY(-50%);background:-webkit-gradient(linear, left top, left bottom, from(var(--range-background)), to(var(--range-background))), -webkit-gradient(linear, left top, left bottom, from(var(--background)), to(var(--background)));background:linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));content:"";z-index:-1}:host .calendar-day-wrapper-range-start::before{inset-inline-start:50%}:host .calendar-day-wrapper-range-end::before{inset-inline-end:50%}:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+.calendar-day-wrapper-in-range)::before,:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+.calendar-day-wrapper-range-end)::before,:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+.calendar-day-wrapper-in-range)::before,:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+.calendar-day-wrapper-range-end)::before{inset-inline-end:-1px}:host .calendar-day-wrapper-in-range:nth-child(7n)::before,:host .calendar-day-wrapper-range-start:nth-child(7n)::before{inset-inline-end:calc(var(--range-track-edge-overflow, 0px) * -1)}:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before{inset-inline-start:calc(var(--range-track-edge-overflow, 0px) * -1)}:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before{display:none}:host(.datetime-disabled.datetime-range) .calendar-month-grid{opacity:0.4}:host(.datetime-disabled.datetime-range) .calendar-month-grid .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:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .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-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.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-primary-contrast, #fff)}:host(.ion-color){--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-primary, #0054e9);color:var(--title-color)}:host(.ion-color) .datetime-header{background:var(--ion-color-base)}: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-primary, #0054e9);color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .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-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .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-primary, #0054e9);background:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .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.12);--range-track-height:42px;--range-track-edge-overflow:10px}:host(.ion-color){--range-background:rgba(var(--ion-color-base-rgb), 0.12)}:host .calendar-day.calendar-day-range-start,:host .calendar-day.calendar-day-range-end{border-radius:50%;background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}: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 .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}`;
|
|
17558
17567
|
|
|
17559
17568
|
/**
|
|
17560
17569
|
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
@@ -17587,6 +17596,11 @@ const datetimeMdCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-flo
|
|
|
17587
17596
|
* @part calendar-day today - The calendar day that contains the current day.
|
|
17588
17597
|
* @part calendar-day disabled - The calendar day that is disabled.
|
|
17589
17598
|
*
|
|
17599
|
+
* @part range-start - The calendar day button that is the start of a range selection.
|
|
17600
|
+
* @part range-end - The calendar day button that is the end of a range selection.
|
|
17601
|
+
* @part range-selection - The calendar day button that is part of a range selection (includes start and end).
|
|
17602
|
+
* @part range-track - The track that connects the start and end days of a range selection.
|
|
17603
|
+
*
|
|
17590
17604
|
* @part datetime-header - The datetime header contains the content for the `title` slot and the selected date.
|
|
17591
17605
|
* @part datetime-title - The element that contains the `title` slot content.
|
|
17592
17606
|
* @part datetime-selected-date - The element that contains the selected date.
|
|
@@ -17602,6 +17616,11 @@ class Datetime {
|
|
|
17602
17616
|
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
17603
17617
|
this.ionRender = createEvent(this, "ionRender", 7);
|
|
17604
17618
|
this.inputId = `ion-dt-${datetimeIds++}`;
|
|
17619
|
+
/**
|
|
17620
|
+
* Set when the user completes a range interactively, so processValue
|
|
17621
|
+
* can skip navigation and keep the calendar on the current month.
|
|
17622
|
+
*/
|
|
17623
|
+
this.rangeCompletedInteractively = false;
|
|
17605
17624
|
/**
|
|
17606
17625
|
* Set when the user selects a value, cleared when it's confirmed
|
|
17607
17626
|
* or `processValue` runs (`reset()`, or `value` being set to a
|
|
@@ -17675,8 +17694,22 @@ class Datetime {
|
|
|
17675
17694
|
/**
|
|
17676
17695
|
* If `true`, multiple dates can be selected at once. Only
|
|
17677
17696
|
* applies to `presentation="date"` and `preferWheel="false"`.
|
|
17697
|
+
*
|
|
17698
|
+
* @deprecated Use `selectionMode="multiple"` instead.
|
|
17678
17699
|
*/
|
|
17679
17700
|
this.multiple = false;
|
|
17701
|
+
/**
|
|
17702
|
+
* The text shown in the datetime header when the start of the range
|
|
17703
|
+
* is empty, also used by screen readers to announce the start date.
|
|
17704
|
+
* Only applies when `selectionMode="range"`.
|
|
17705
|
+
*/
|
|
17706
|
+
this.startDateLabel = 'Start date';
|
|
17707
|
+
/**
|
|
17708
|
+
* The text shown in the datetime header when the end of the range
|
|
17709
|
+
* is empty, also used by screen readers to announce the end date.
|
|
17710
|
+
* Only applies when `selectionMode="range"`.
|
|
17711
|
+
*/
|
|
17712
|
+
this.endDateLabel = 'End date';
|
|
17680
17713
|
/**
|
|
17681
17714
|
* If `true`, a header will be shown above the calendar
|
|
17682
17715
|
* picker. This will include both the slotted title, and
|
|
@@ -17729,8 +17762,8 @@ class Datetime {
|
|
|
17729
17762
|
*/
|
|
17730
17763
|
this.preferWheel = false;
|
|
17731
17764
|
this.warnIfIncorrectValueUsage = () => {
|
|
17732
|
-
const {
|
|
17733
|
-
if (!
|
|
17765
|
+
const { value } = this;
|
|
17766
|
+
if (!this.isMultipleMode && !this.isRangeMode && Array.isArray(value)) {
|
|
17734
17767
|
/**
|
|
17735
17768
|
* We do some processing on the `value` array so
|
|
17736
17769
|
* that it looks more like an array when logged to
|
|
@@ -17739,7 +17772,13 @@ class Datetime {
|
|
|
17739
17772
|
* Default toString() behavior: a,b
|
|
17740
17773
|
* Custom behavior: ['a', 'b']
|
|
17741
17774
|
*/
|
|
17742
|
-
printIonWarning(`[ion-datetime] - An array of values was passed, but multiple
|
|
17775
|
+
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.
|
|
17776
|
+
|
|
17777
|
+
Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
|
|
17778
|
+
`, this.el);
|
|
17779
|
+
}
|
|
17780
|
+
if (this.isRangeMode && Array.isArray(value) && value.length > 2) {
|
|
17781
|
+
printIonWarning(`[ion-datetime] - More than 2 values were passed with selectionMode="range". Only the first and last values will be used.
|
|
17743
17782
|
|
|
17744
17783
|
Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
|
|
17745
17784
|
`, this.el);
|
|
@@ -17765,6 +17804,9 @@ class Datetime {
|
|
|
17765
17804
|
};
|
|
17766
17805
|
this.getActivePart = () => {
|
|
17767
17806
|
const { activeParts } = this;
|
|
17807
|
+
if (this.isRangeParts(activeParts)) {
|
|
17808
|
+
return activeParts.start;
|
|
17809
|
+
}
|
|
17768
17810
|
return Array.isArray(activeParts) ? activeParts[0] : activeParts;
|
|
17769
17811
|
};
|
|
17770
17812
|
this.closeParentOverlay = (role) => {
|
|
@@ -17779,6 +17821,33 @@ class Datetime {
|
|
|
17779
17821
|
...parts,
|
|
17780
17822
|
};
|
|
17781
17823
|
};
|
|
17824
|
+
/**
|
|
17825
|
+
* Checks whether the span from start to end contains any disabled day.
|
|
17826
|
+
* Used by range mode to prevent selecting across disabled dates.
|
|
17827
|
+
*/
|
|
17828
|
+
this.rangeContainsDisabledDate = (start, end) => {
|
|
17829
|
+
const { minParts, maxParts, parsedDayValues, parsedMonthValues, parsedYearValues, isDateEnabled } = this;
|
|
17830
|
+
let cursor = getNextDay(start);
|
|
17831
|
+
while (isBefore(cursor, end)) {
|
|
17832
|
+
if (isDayDisabled(cursor, minParts, maxParts, parsedDayValues) ||
|
|
17833
|
+
(parsedMonthValues !== undefined && !parsedMonthValues.includes(cursor.month)) ||
|
|
17834
|
+
(parsedYearValues !== undefined && !parsedYearValues.includes(cursor.year))) {
|
|
17835
|
+
return true;
|
|
17836
|
+
}
|
|
17837
|
+
if (isDateEnabled) {
|
|
17838
|
+
try {
|
|
17839
|
+
if (!isDateEnabled(convertDataToISO(cursor))) {
|
|
17840
|
+
return true;
|
|
17841
|
+
}
|
|
17842
|
+
}
|
|
17843
|
+
catch {
|
|
17844
|
+
// Swallow user callback exceptions during validation
|
|
17845
|
+
}
|
|
17846
|
+
}
|
|
17847
|
+
cursor = getNextDay(cursor);
|
|
17848
|
+
}
|
|
17849
|
+
return false;
|
|
17850
|
+
};
|
|
17782
17851
|
this.setActiveParts = (parts, removeDate = false) => {
|
|
17783
17852
|
/** if the datetime component is in readonly mode,
|
|
17784
17853
|
* allow browsing of the calendar without changing
|
|
@@ -17788,7 +17857,7 @@ class Datetime {
|
|
|
17788
17857
|
return;
|
|
17789
17858
|
}
|
|
17790
17859
|
this.hasUnconfirmedSelection = true;
|
|
17791
|
-
const {
|
|
17860
|
+
const { minParts, maxParts, activeParts } = this;
|
|
17792
17861
|
/**
|
|
17793
17862
|
* When setting the active parts, it is possible
|
|
17794
17863
|
* to set invalid data. For example,
|
|
@@ -17801,7 +17870,10 @@ class Datetime {
|
|
|
17801
17870
|
*/
|
|
17802
17871
|
const validatedParts = validateParts(parts, minParts, maxParts);
|
|
17803
17872
|
this.setWorkingParts(validatedParts);
|
|
17804
|
-
if (
|
|
17873
|
+
if (this.isRangeMode) {
|
|
17874
|
+
this.setActivePartsRange(validatedParts);
|
|
17875
|
+
}
|
|
17876
|
+
else if (this.isMultipleMode) {
|
|
17805
17877
|
const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];
|
|
17806
17878
|
if (removeDate) {
|
|
17807
17879
|
this.activeParts = activePartsArray.filter((p) => !isSameDay(p, validatedParts));
|
|
@@ -17821,6 +17893,26 @@ class Datetime {
|
|
|
17821
17893
|
}
|
|
17822
17894
|
this.confirm();
|
|
17823
17895
|
};
|
|
17896
|
+
/**
|
|
17897
|
+
* Handles range selection logic when a day is clicked.
|
|
17898
|
+
*
|
|
17899
|
+
* Creating a new range: first click sets start, second sets end.
|
|
17900
|
+
* Modifying an existing range:
|
|
17901
|
+
* - Before range → new start
|
|
17902
|
+
* - Within range → new end
|
|
17903
|
+
* - After range → new end
|
|
17904
|
+
* If the resulting span contains a disabled date, start a new range instead.
|
|
17905
|
+
*/
|
|
17906
|
+
this.setActivePartsRange = (parts) => {
|
|
17907
|
+
const current = this.rangeParts;
|
|
17908
|
+
if (!current || isBefore(parts, current.start) || this.rangeContainsDisabledDate(current.start, parts)) {
|
|
17909
|
+
this.activeParts = { start: parts };
|
|
17910
|
+
}
|
|
17911
|
+
else {
|
|
17912
|
+
this.rangeCompletedInteractively = true;
|
|
17913
|
+
this.activeParts = { start: current.start, end: parts };
|
|
17914
|
+
}
|
|
17915
|
+
};
|
|
17824
17916
|
this.initializeKeyboardListeners = () => {
|
|
17825
17917
|
const calendarBodyRef = this.calendarBodyRef;
|
|
17826
17918
|
if (!calendarBodyRef) {
|
|
@@ -18232,6 +18324,59 @@ class Datetime {
|
|
|
18232
18324
|
if (hasValue) {
|
|
18233
18325
|
warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);
|
|
18234
18326
|
}
|
|
18327
|
+
/**
|
|
18328
|
+
* Range mode: convert the value array into DatetimeRangeParts.
|
|
18329
|
+
*/
|
|
18330
|
+
if (this.isRangeMode) {
|
|
18331
|
+
/**
|
|
18332
|
+
* The calendar navigates to the start of the range, or to the default
|
|
18333
|
+
* date when there is nothing selected, so that an empty range mode
|
|
18334
|
+
* opens on the same month as the other selection modes.
|
|
18335
|
+
*/
|
|
18336
|
+
let navigateTo;
|
|
18337
|
+
if (hasValue && Array.isArray(valueToProcess)) {
|
|
18338
|
+
let rangeValues = valueToProcess;
|
|
18339
|
+
// If more than 2 entries, use first and last
|
|
18340
|
+
if (rangeValues.length > 2) {
|
|
18341
|
+
rangeValues = [rangeValues[0], rangeValues[rangeValues.length - 1]];
|
|
18342
|
+
}
|
|
18343
|
+
let startParts = rangeValues[0];
|
|
18344
|
+
let endParts = rangeValues.length > 1 ? rangeValues[1] : undefined;
|
|
18345
|
+
// Normalize reversed pairs so earlier date is start
|
|
18346
|
+
if (endParts && isAfter(startParts, endParts)) {
|
|
18347
|
+
const temp = startParts;
|
|
18348
|
+
startParts = endParts;
|
|
18349
|
+
endParts = temp;
|
|
18350
|
+
}
|
|
18351
|
+
this.activeParts = endParts ? { start: startParts, end: endParts } : { start: startParts };
|
|
18352
|
+
/**
|
|
18353
|
+
* When the user just completed the range interactively, stay on the
|
|
18354
|
+
* current month instead of jumping back to the start. The flag is
|
|
18355
|
+
* set in setActivePartsRange and consumed here.
|
|
18356
|
+
*/
|
|
18357
|
+
if (endParts && this.rangeCompletedInteractively) {
|
|
18358
|
+
this.rangeCompletedInteractively = false;
|
|
18359
|
+
return;
|
|
18360
|
+
}
|
|
18361
|
+
navigateTo = startParts;
|
|
18362
|
+
}
|
|
18363
|
+
else {
|
|
18364
|
+
this.activeParts = [];
|
|
18365
|
+
navigateTo = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;
|
|
18366
|
+
}
|
|
18367
|
+
const targetValue = clampDate(navigateTo, minParts, maxParts);
|
|
18368
|
+
const { month, day, year } = targetValue;
|
|
18369
|
+
const didChangeMonth = (month !== undefined && month !== workingParts.month) || (year !== undefined && year !== workingParts.year);
|
|
18370
|
+
const bodyIsVisible = el.classList.contains('datetime-ready');
|
|
18371
|
+
const { isGridStyle, showMonthAndYear } = this;
|
|
18372
|
+
if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) {
|
|
18373
|
+
this.animateToDate(targetValue);
|
|
18374
|
+
}
|
|
18375
|
+
else {
|
|
18376
|
+
this.setWorkingParts({ month, day, year, hour: 0, minute: 0, ampm: 'am' });
|
|
18377
|
+
}
|
|
18378
|
+
return;
|
|
18379
|
+
}
|
|
18235
18380
|
/**
|
|
18236
18381
|
* If there are multiple values, clamp to the last one.
|
|
18237
18382
|
* This is because the last value is the one that the user
|
|
@@ -18393,6 +18538,27 @@ class Datetime {
|
|
|
18393
18538
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
18394
18539
|
return hasDatePresentation && !preferWheel;
|
|
18395
18540
|
}
|
|
18541
|
+
get isMultipleMode() {
|
|
18542
|
+
return this.selectionMode === 'multiple' || (this.selectionMode === undefined && this.multiple);
|
|
18543
|
+
}
|
|
18544
|
+
get isRangeMode() {
|
|
18545
|
+
return this.selectionMode === 'range';
|
|
18546
|
+
}
|
|
18547
|
+
/**
|
|
18548
|
+
* Type guard: returns true if the given activeParts is a DatetimeRangeParts object.
|
|
18549
|
+
*/
|
|
18550
|
+
isRangeParts(parts) {
|
|
18551
|
+
return this.isRangeMode && parts !== null && typeof parts === 'object' && !Array.isArray(parts) && 'start' in parts;
|
|
18552
|
+
}
|
|
18553
|
+
/**
|
|
18554
|
+
* Returns the current range parts if in range mode, or undefined otherwise.
|
|
18555
|
+
*/
|
|
18556
|
+
get rangeParts() {
|
|
18557
|
+
if (this.isRangeParts(this.activeParts)) {
|
|
18558
|
+
return this.activeParts;
|
|
18559
|
+
}
|
|
18560
|
+
return undefined;
|
|
18561
|
+
}
|
|
18396
18562
|
yearValuesChanged() {
|
|
18397
18563
|
this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);
|
|
18398
18564
|
}
|
|
@@ -18428,6 +18594,19 @@ class Datetime {
|
|
|
18428
18594
|
*/
|
|
18429
18595
|
async confirm(closeOverlay = false) {
|
|
18430
18596
|
const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
|
|
18597
|
+
/**
|
|
18598
|
+
* In range mode, only confirm when both start and end are selected.
|
|
18599
|
+
*/
|
|
18600
|
+
if (this.isRangeMode) {
|
|
18601
|
+
if (!this.isRangeParts(activeParts) || !activeParts.end) {
|
|
18602
|
+
return;
|
|
18603
|
+
}
|
|
18604
|
+
this.setValue([convertDataToISO(activeParts.start), convertDataToISO(activeParts.end)]);
|
|
18605
|
+
if (closeOverlay) {
|
|
18606
|
+
this.closeParentOverlay(CONFIRM_ROLE);
|
|
18607
|
+
}
|
|
18608
|
+
return;
|
|
18609
|
+
}
|
|
18431
18610
|
/**
|
|
18432
18611
|
* We only update the value if the presentation is not a calendar picker.
|
|
18433
18612
|
*/
|
|
@@ -18463,6 +18642,22 @@ class Datetime {
|
|
|
18463
18642
|
* @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.
|
|
18464
18643
|
*/
|
|
18465
18644
|
async reset(startDate) {
|
|
18645
|
+
if (this.isRangeMode) {
|
|
18646
|
+
/**
|
|
18647
|
+
* In range mode, reset clears the full range. If a startDate
|
|
18648
|
+
* is provided, the calendar navigates to that month without
|
|
18649
|
+
* selecting anything so the user begins a fresh selection.
|
|
18650
|
+
*/
|
|
18651
|
+
this.activeParts = [];
|
|
18652
|
+
if (startDate) {
|
|
18653
|
+
const parsed = parseDate(startDate);
|
|
18654
|
+
if (parsed) {
|
|
18655
|
+
const target = Array.isArray(parsed) ? parsed[0] : parsed;
|
|
18656
|
+
this.setWorkingParts(target);
|
|
18657
|
+
}
|
|
18658
|
+
}
|
|
18659
|
+
return;
|
|
18660
|
+
}
|
|
18466
18661
|
this.processValue(startDate);
|
|
18467
18662
|
}
|
|
18468
18663
|
/**
|
|
@@ -18698,8 +18893,11 @@ class Datetime {
|
|
|
18698
18893
|
});
|
|
18699
18894
|
}
|
|
18700
18895
|
componentWillLoad() {
|
|
18701
|
-
const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
18702
|
-
if (multiple) {
|
|
18896
|
+
const { el, formatOptions, highlightedDates, multiple, selectionMode, presentation, preferWheel } = this;
|
|
18897
|
+
if (selectionMode === undefined && multiple) {
|
|
18898
|
+
printIonWarning('[ion-datetime] - The "multiple" property is deprecated. Use selectionMode="multiple" instead.', el);
|
|
18899
|
+
}
|
|
18900
|
+
if (this.isMultipleMode) {
|
|
18703
18901
|
if (presentation !== 'date') {
|
|
18704
18902
|
printIonWarning('[ion-datetime] - Multiple date selection is only supported for presentation="date".', el);
|
|
18705
18903
|
}
|
|
@@ -18707,6 +18905,17 @@ class Datetime {
|
|
|
18707
18905
|
printIonWarning('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".', el);
|
|
18708
18906
|
}
|
|
18709
18907
|
}
|
|
18908
|
+
if (this.isRangeMode) {
|
|
18909
|
+
if (presentation !== 'date') {
|
|
18910
|
+
printIonWarning('[ion-datetime] - Range selection is only supported for presentation="date".', el);
|
|
18911
|
+
}
|
|
18912
|
+
if (preferWheel) {
|
|
18913
|
+
printIonWarning('[ion-datetime] - Range selection is not supported with preferWheel="true".', el);
|
|
18914
|
+
}
|
|
18915
|
+
}
|
|
18916
|
+
if (selectionMode !== undefined && multiple) {
|
|
18917
|
+
printIonWarning('[ion-datetime] - Both "selectionMode" and "multiple" are set. "selectionMode" takes precedence.', el);
|
|
18918
|
+
}
|
|
18710
18919
|
if (highlightedDates !== undefined) {
|
|
18711
18920
|
if (presentation !== 'date' && presentation !== 'date-time' && presentation !== 'time-date') {
|
|
18712
18921
|
printIonWarning('[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.', el);
|
|
@@ -18761,6 +18970,12 @@ class Datetime {
|
|
|
18761
18970
|
* is disabled or readonly.
|
|
18762
18971
|
*/
|
|
18763
18972
|
const isButtonDisabled = disabled || readonly;
|
|
18973
|
+
/**
|
|
18974
|
+
* In range mode, the confirm button should be disabled until
|
|
18975
|
+
* both a start and end date have been selected.
|
|
18976
|
+
*/
|
|
18977
|
+
const isRangeIncomplete = this.isRangeMode && (!this.isRangeParts(this.activeParts) || !this.activeParts.end);
|
|
18978
|
+
const isConfirmDisabled = isButtonDisabled || isRangeIncomplete;
|
|
18764
18979
|
const confirmFill = theme === 'ionic' ? 'solid' : undefined;
|
|
18765
18980
|
const hasSlottedButtons = this.el.querySelector('[slot="buttons"]') !== null;
|
|
18766
18981
|
if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {
|
|
@@ -18780,7 +18995,7 @@ class Datetime {
|
|
|
18780
18995
|
return (hAsync("div", { class: "datetime-footer" }, hAsync("div", { class: "datetime-buttons" }, hAsync("div", { class: {
|
|
18781
18996
|
['datetime-action-buttons']: true,
|
|
18782
18997
|
['has-clear-button']: this.showClearButton,
|
|
18783
|
-
} }, 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:
|
|
18998
|
+
} }, 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))))))));
|
|
18784
18999
|
}
|
|
18785
19000
|
/**
|
|
18786
19001
|
* Wheel picker render methods
|
|
@@ -18969,8 +19184,8 @@ class Datetime {
|
|
|
18969
19184
|
...this.workingParts,
|
|
18970
19185
|
month: ev.detail.value,
|
|
18971
19186
|
});
|
|
18972
|
-
// Month wheel is navigation-only in multi-select
|
|
18973
|
-
if (!this.
|
|
19187
|
+
// Month wheel is navigation-only in multi-select and range modes as a fix for https://github.com/ionic-team/ionic-framework/issues/29673
|
|
19188
|
+
if (!this.isMultipleMode && !this.isRangeMode) {
|
|
18974
19189
|
this.setActiveParts({
|
|
18975
19190
|
...activePart,
|
|
18976
19191
|
month: ev.detail.value,
|
|
@@ -18991,8 +19206,8 @@ class Datetime {
|
|
|
18991
19206
|
...this.workingParts,
|
|
18992
19207
|
year: ev.detail.value,
|
|
18993
19208
|
});
|
|
18994
|
-
// Year wheel is navigation-only in multi-select
|
|
18995
|
-
if (!this.
|
|
19209
|
+
// Year wheel is navigation-only in multi-select and range modes as a fix for https://github.com/ionic-team/ionic-framework/issues/29673
|
|
19210
|
+
if (!this.isMultipleMode && !this.isRangeMode) {
|
|
18996
19211
|
this.setActiveParts({
|
|
18997
19212
|
...activePart,
|
|
18998
19213
|
year: ev.detail.value,
|
|
@@ -19136,7 +19351,7 @@ class Datetime {
|
|
|
19136
19351
|
'calendar-month-disabled': !isWorkingMonth && swipeDisabled,
|
|
19137
19352
|
} }, hAsync("div", { class: "calendar-month-grid" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7, this.showAdjacentDays).map((dateObject, index) => {
|
|
19138
19353
|
const { day, dayOfWeek, isAdjacentDay } = dateObject;
|
|
19139
|
-
const { el, highlightedDates, isDateEnabled,
|
|
19354
|
+
const { el, highlightedDates, isDateEnabled, showAdjacentDays } = this;
|
|
19140
19355
|
let _month = month;
|
|
19141
19356
|
let _year = year;
|
|
19142
19357
|
if (showAdjacentDays && isAdjacentDay && day !== null) {
|
|
@@ -19165,7 +19380,7 @@ class Datetime {
|
|
|
19165
19380
|
}
|
|
19166
19381
|
const referenceParts = { month: _month, day, year: _year, isAdjacentDay };
|
|
19167
19382
|
const isCalendarPadding = day === null;
|
|
19168
|
-
const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, text, } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
|
|
19383
|
+
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);
|
|
19169
19384
|
const dateIsoString = convertDataToISO(referenceParts);
|
|
19170
19385
|
let isCalDayDisabled = isCalMonthDisabled || isDayDisabled;
|
|
19171
19386
|
if (!isCalDayDisabled && isDateEnabled !== undefined) {
|
|
@@ -19188,24 +19403,60 @@ class Datetime {
|
|
|
19188
19403
|
*/
|
|
19189
19404
|
const isCalDayConstrained = isCalDayDisabled && isDatetimeDisabled;
|
|
19190
19405
|
const isButtonDisabled = isCalDayDisabled || isDatetimeDisabled;
|
|
19406
|
+
/**
|
|
19407
|
+
* Determine if this day is part of the range selection.
|
|
19408
|
+
* Range styling takes priority over highlightedDates.
|
|
19409
|
+
*/
|
|
19410
|
+
const isPartOfRange = isRangeStart || isRangeEnd || isInRange;
|
|
19191
19411
|
let dateStyle = undefined;
|
|
19192
19412
|
/**
|
|
19193
|
-
* Custom highlight styles should not override the style for selected dates
|
|
19194
|
-
* nor apply to "filler days" at the start of the grid.
|
|
19413
|
+
* Custom highlight styles should not override the style for selected dates
|
|
19414
|
+
* or range selection, nor apply to "filler days" at the start of the grid.
|
|
19195
19415
|
*/
|
|
19196
|
-
if (highlightedDates !== undefined && !isActive && day !== null && !isAdjacentDay) {
|
|
19416
|
+
if (highlightedDates !== undefined && !isActive && !isPartOfRange && day !== null && !isAdjacentDay) {
|
|
19197
19417
|
dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);
|
|
19198
19418
|
}
|
|
19199
19419
|
let dateParts = undefined;
|
|
19200
19420
|
// "Filler days" at the beginning of the grid should not get the calendar day
|
|
19201
19421
|
// CSS parts added to them
|
|
19202
19422
|
if (!isCalendarPadding && !isAdjacentDay) {
|
|
19203
|
-
dateParts = `calendar-day${isActive ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}`;
|
|
19423
|
+
dateParts = `calendar-day${isActive || isRangeStart || isRangeEnd ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}${isRangeStart ? ' range-start range-selection' : ''}${isRangeEnd ? ' range-end range-selection' : ''}${isInRange ? ' range-selection' : ''}`;
|
|
19204
19424
|
}
|
|
19205
19425
|
else if (isAdjacentDay) {
|
|
19206
|
-
|
|
19426
|
+
/**
|
|
19427
|
+
* Adjacent days skip 'active' and 'today' parts but still
|
|
19428
|
+
* include range parts so ::part() styling is consistent
|
|
19429
|
+
* with the visual range track rendering.
|
|
19430
|
+
*/
|
|
19431
|
+
dateParts = `calendar-day${isCalDayDisabled ? ' disabled' : ''}${isRangeStart ? ' range-start range-selection' : ''}${isRangeEnd ? ' range-end range-selection' : ''}${isInRange ? ' range-selection' : ''}`;
|
|
19432
|
+
}
|
|
19433
|
+
/**
|
|
19434
|
+
* Build the wrapper's shadow part attribute for range track styling.
|
|
19435
|
+
*/
|
|
19436
|
+
const hasCompleteRange = this.rangeParts?.end !== undefined;
|
|
19437
|
+
const wrapperParts = isPartOfRange && hasCompleteRange && !isCalendarPadding ? 'range-track' : undefined;
|
|
19438
|
+
/**
|
|
19439
|
+
* Build the aria-label for range mode accessibility.
|
|
19440
|
+
*/
|
|
19441
|
+
let rangeAriaLabel = ariaLabel;
|
|
19442
|
+
if (this.isRangeMode && ariaLabel) {
|
|
19443
|
+
if (isRangeStart) {
|
|
19444
|
+
rangeAriaLabel += `, ${this.startDateLabel}`;
|
|
19445
|
+
}
|
|
19446
|
+
if (isRangeEnd) {
|
|
19447
|
+
rangeAriaLabel += `, ${this.endDateLabel}`;
|
|
19448
|
+
}
|
|
19449
|
+
if (isInRange) {
|
|
19450
|
+
rangeAriaLabel += ', in range';
|
|
19451
|
+
}
|
|
19207
19452
|
}
|
|
19208
|
-
return (hAsync("div", { class:
|
|
19453
|
+
return (hAsync("div", { class: {
|
|
19454
|
+
'calendar-day-wrapper': true,
|
|
19455
|
+
// A start without an end is only the circle until the range is complete
|
|
19456
|
+
'calendar-day-wrapper-range-start': isRangeStart && this.rangeParts?.end !== undefined,
|
|
19457
|
+
'calendar-day-wrapper-in-range': isInRange,
|
|
19458
|
+
'calendar-day-wrapper-range-end': isRangeEnd,
|
|
19459
|
+
}, part: wrapperParts }, hAsync("button", {
|
|
19209
19460
|
// We need to use !important for the inline styles here because
|
|
19210
19461
|
// otherwise the CSS shadow parts will override these styles.
|
|
19211
19462
|
// See https://github.com/WICG/webcomponents/issues/847
|
|
@@ -19221,28 +19472,40 @@ class Datetime {
|
|
|
19221
19472
|
}, tabindex: "-1", "data-day": day, "data-month": _month, "data-year": _year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isButtonDisabled, class: {
|
|
19222
19473
|
'calendar-day-padding': isCalendarPadding,
|
|
19223
19474
|
'calendar-day': true,
|
|
19224
|
-
'calendar-day-active': isActive,
|
|
19475
|
+
'calendar-day-active': isActive || isRangeStart || isRangeEnd,
|
|
19225
19476
|
'calendar-day-constrained': isCalDayConstrained,
|
|
19226
19477
|
'calendar-day-today': isToday,
|
|
19227
19478
|
'calendar-day-adjacent-day': isAdjacentDay,
|
|
19228
|
-
|
|
19479
|
+
'calendar-day-range-start': isRangeStart,
|
|
19480
|
+
'calendar-day-range-end': isRangeEnd,
|
|
19481
|
+
'calendar-day-in-range': isInRange,
|
|
19482
|
+
}, part: dateParts, "aria-hidden": isCalendarPadding ? 'true' : null, "aria-selected": isActive || isRangeStart || isRangeEnd ? 'true' : ariaSelected, "aria-label": rangeAriaLabel, onClick: () => {
|
|
19229
19483
|
if (isCalendarPadding) {
|
|
19230
19484
|
return;
|
|
19231
19485
|
}
|
|
19232
19486
|
if (isAdjacentDay) {
|
|
19233
19487
|
// The user selected a day outside the current month. Ignore this button, as the month will be re-rendered.
|
|
19234
19488
|
this.el.blur();
|
|
19235
|
-
this.
|
|
19489
|
+
if (!this.isRangeMode) {
|
|
19490
|
+
this.activeParts = { ...activePart, ...referenceParts };
|
|
19491
|
+
}
|
|
19236
19492
|
this.animateToDate(referenceParts);
|
|
19237
|
-
this.
|
|
19493
|
+
if (this.isRangeMode) {
|
|
19494
|
+
this.setActiveParts(referenceParts);
|
|
19495
|
+
}
|
|
19496
|
+
else {
|
|
19497
|
+
this.confirm();
|
|
19498
|
+
}
|
|
19238
19499
|
}
|
|
19239
19500
|
else {
|
|
19240
19501
|
this.setWorkingParts({
|
|
19241
19502
|
...this.workingParts,
|
|
19242
19503
|
...referenceParts,
|
|
19243
19504
|
});
|
|
19244
|
-
|
|
19245
|
-
|
|
19505
|
+
if (this.isRangeMode) {
|
|
19506
|
+
this.setActiveParts(referenceParts);
|
|
19507
|
+
}
|
|
19508
|
+
else if (this.isMultipleMode) {
|
|
19246
19509
|
this.setActiveParts(referenceParts, isActive);
|
|
19247
19510
|
}
|
|
19248
19511
|
else {
|
|
@@ -19262,7 +19525,17 @@ class Datetime {
|
|
|
19262
19525
|
})));
|
|
19263
19526
|
}
|
|
19264
19527
|
renderCalendar(theme) {
|
|
19265
|
-
return (hAsync("div", { class: "datetime-calendar", key: "datetime-calendar" }, this.renderCalendarHeader(theme), this.renderCalendarBody()
|
|
19528
|
+
return (hAsync("div", { class: "datetime-calendar", key: "datetime-calendar" }, this.renderCalendarHeader(theme), this.renderCalendarBody(), this.isRangeMode && this.rangeParts && !this.rangeParts.end && (hAsync("div", { "aria-live": "polite", role: "status", style: {
|
|
19529
|
+
position: 'absolute',
|
|
19530
|
+
width: '1px',
|
|
19531
|
+
height: '1px',
|
|
19532
|
+
padding: '0',
|
|
19533
|
+
margin: '-1px',
|
|
19534
|
+
overflow: 'hidden',
|
|
19535
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
19536
|
+
whiteSpace: 'nowrap',
|
|
19537
|
+
border: '0',
|
|
19538
|
+
} }, `${this.startDateLabel} selected, select ${this.endDateLabel.toLowerCase()}`))));
|
|
19266
19539
|
}
|
|
19267
19540
|
renderTimeLabel() {
|
|
19268
19541
|
const hasSlottedTimeLabel = this.el.querySelector('[slot="time-label"]') !== null;
|
|
@@ -19315,10 +19588,23 @@ class Datetime {
|
|
|
19315
19588
|
];
|
|
19316
19589
|
}
|
|
19317
19590
|
getHeaderSelectedDateText() {
|
|
19318
|
-
const { activeParts, formatOptions,
|
|
19591
|
+
const { activeParts, formatOptions, titleSelectedDatesFormatter } = this;
|
|
19319
19592
|
const isArray = Array.isArray(activeParts);
|
|
19593
|
+
const dateFormatOptions = formatOptions?.date ?? { weekday: 'short', month: 'short', day: 'numeric' };
|
|
19320
19594
|
let headerText;
|
|
19321
|
-
if (
|
|
19595
|
+
if (this.isRangeMode) {
|
|
19596
|
+
headerText = this.getRangeHeaderText(formatOptions?.date ?? { month: 'short', day: 'numeric' });
|
|
19597
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
19598
|
+
try {
|
|
19599
|
+
const rangeValues = this.getRangeValueArray();
|
|
19600
|
+
headerText = titleSelectedDatesFormatter(rangeValues);
|
|
19601
|
+
}
|
|
19602
|
+
catch (e) {
|
|
19603
|
+
printIonError('[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:', e);
|
|
19604
|
+
}
|
|
19605
|
+
}
|
|
19606
|
+
}
|
|
19607
|
+
else if (this.isMultipleMode && isArray && activeParts.length !== 1) {
|
|
19322
19608
|
headerText = `${activeParts.length} days`; // default/fallback for multiple selection
|
|
19323
19609
|
if (titleSelectedDatesFormatter !== undefined) {
|
|
19324
19610
|
try {
|
|
@@ -19331,10 +19617,37 @@ class Datetime {
|
|
|
19331
19617
|
}
|
|
19332
19618
|
else {
|
|
19333
19619
|
// for exactly 1 day selected (multiple set or not), show a formatted version of that
|
|
19334
|
-
headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(),
|
|
19620
|
+
headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), dateFormatOptions);
|
|
19335
19621
|
}
|
|
19336
19622
|
return headerText;
|
|
19337
19623
|
}
|
|
19624
|
+
/**
|
|
19625
|
+
* Returns the formatted range header text.
|
|
19626
|
+
* Shows "Start date - End date" with placeholders from startDateLabel/endDateLabel.
|
|
19627
|
+
*/
|
|
19628
|
+
getRangeHeaderText(dateFormatOptions) {
|
|
19629
|
+
const range = this.rangeParts;
|
|
19630
|
+
if (!range) {
|
|
19631
|
+
return `${this.startDateLabel} - ${this.endDateLabel}`;
|
|
19632
|
+
}
|
|
19633
|
+
const startText = getLocalizedDateTime(this.locale, range.start, dateFormatOptions);
|
|
19634
|
+
const endText = range.end ? getLocalizedDateTime(this.locale, range.end, dateFormatOptions) : this.endDateLabel;
|
|
19635
|
+
return `${startText} - ${endText}`;
|
|
19636
|
+
}
|
|
19637
|
+
/**
|
|
19638
|
+
* Returns the current range value as an ISO string array for
|
|
19639
|
+
* titleSelectedDatesFormatter and ionChange.
|
|
19640
|
+
*/
|
|
19641
|
+
getRangeValueArray() {
|
|
19642
|
+
const range = this.rangeParts;
|
|
19643
|
+
if (!range) {
|
|
19644
|
+
return [];
|
|
19645
|
+
}
|
|
19646
|
+
if (!range.end) {
|
|
19647
|
+
return [convertDataToISO(range.start)];
|
|
19648
|
+
}
|
|
19649
|
+
return [convertDataToISO(range.start), convertDataToISO(range.end)];
|
|
19650
|
+
}
|
|
19338
19651
|
renderHeader(showExpandedHeader = true) {
|
|
19339
19652
|
const hasSlottedTitle = this.el.querySelector('[slot="title"]') !== null;
|
|
19340
19653
|
if (!hasSlottedTitle && !this.showDefaultTitle) {
|
|
@@ -19458,7 +19771,7 @@ class Datetime {
|
|
|
19458
19771
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
19459
19772
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
19460
19773
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
19461
|
-
return (hAsync(Host, { key: '
|
|
19774
|
+
return (hAsync(Host, { key: '0a05835fa52e91147d72250941201b89fd850dda', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: {
|
|
19462
19775
|
...createColorClasses$1(color, {
|
|
19463
19776
|
[theme]: true,
|
|
19464
19777
|
['datetime-readonly']: readonly,
|
|
@@ -19469,8 +19782,9 @@ class Datetime {
|
|
|
19469
19782
|
[`datetime-size-${size}`]: true,
|
|
19470
19783
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
19471
19784
|
[`datetime-grid`]: isGridStyle,
|
|
19785
|
+
[`datetime-range`]: this.isRangeMode,
|
|
19472
19786
|
}),
|
|
19473
|
-
} }, hAsync("div", { key: '
|
|
19787
|
+
} }, hAsync("div", { key: '5b5d6999f55b85523f65763a906f7f16c25f2eb2', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(theme)));
|
|
19474
19788
|
}
|
|
19475
19789
|
get el() { return getElement(this); }
|
|
19476
19790
|
static get watchers() { return {
|
|
@@ -19539,6 +19853,9 @@ class Datetime {
|
|
|
19539
19853
|
"firstDayOfWeek": [2, "first-day-of-week"],
|
|
19540
19854
|
"titleSelectedDatesFormatter": [16],
|
|
19541
19855
|
"multiple": [4],
|
|
19856
|
+
"selectionMode": [1, "selection-mode"],
|
|
19857
|
+
"startDateLabel": [1, "start-date-label"],
|
|
19858
|
+
"endDateLabel": [1, "end-date-label"],
|
|
19542
19859
|
"highlightedDates": [16],
|
|
19543
19860
|
"value": [1025],
|
|
19544
19861
|
"showDefaultTitle": [4, "show-default-title"],
|
|
@@ -19621,7 +19938,7 @@ class DatetimeButton {
|
|
|
19621
19938
|
if (!datetimeEl) {
|
|
19622
19939
|
return;
|
|
19623
19940
|
}
|
|
19624
|
-
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
19941
|
+
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, selectionMode, titleSelectedDatesFormatter, } = datetimeEl;
|
|
19625
19942
|
const parsedValues = this.getParsedDateValues(value);
|
|
19626
19943
|
/**
|
|
19627
19944
|
* Both ion-datetime and ion-datetime-button default to today's date and
|
|
@@ -19633,6 +19950,8 @@ class DatetimeButton {
|
|
|
19633
19950
|
if (!parsedDatetimes) {
|
|
19634
19951
|
return;
|
|
19635
19952
|
}
|
|
19953
|
+
const isRangeMode = selectionMode === 'range';
|
|
19954
|
+
const isMultipleMode = selectionMode === 'multiple' || (selectionMode === undefined && multiple);
|
|
19636
19955
|
/**
|
|
19637
19956
|
* If developers incorrectly use multiple="true"
|
|
19638
19957
|
* with non "date" datetimes, then just select
|
|
@@ -19642,11 +19961,12 @@ class DatetimeButton {
|
|
|
19642
19961
|
*/
|
|
19643
19962
|
const firstParsedDatetime = parsedDatetimes[0];
|
|
19644
19963
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
19964
|
+
const dateFormatOptions = formatOptions?.date ?? { month: 'short', day: 'numeric', year: 'numeric' };
|
|
19645
19965
|
this.dateText = this.timeText = undefined;
|
|
19646
19966
|
switch (datetimePresentation) {
|
|
19647
19967
|
case 'date-time':
|
|
19648
19968
|
case 'time-date':
|
|
19649
|
-
const dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
19969
|
+
const dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
19650
19970
|
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions?.time);
|
|
19651
19971
|
if (preferWheel) {
|
|
19652
19972
|
this.dateText = `${dateText} ${timeText}`;
|
|
@@ -19657,7 +19977,31 @@ class DatetimeButton {
|
|
|
19657
19977
|
}
|
|
19658
19978
|
break;
|
|
19659
19979
|
case 'date':
|
|
19660
|
-
if (
|
|
19980
|
+
if (isRangeMode && parsedValues.length >= 2) {
|
|
19981
|
+
/**
|
|
19982
|
+
* Use the first and last entries in date order, matching
|
|
19983
|
+
* how ion-datetime reads a range value.
|
|
19984
|
+
*/
|
|
19985
|
+
let startIndex = 0;
|
|
19986
|
+
let endIndex = parsedValues.length - 1;
|
|
19987
|
+
if (isAfter(parsedDatetimes[startIndex], parsedDatetimes[endIndex])) {
|
|
19988
|
+
[startIndex, endIndex] = [endIndex, startIndex];
|
|
19989
|
+
}
|
|
19990
|
+
const rangeValues = [parsedValues[startIndex], parsedValues[endIndex]];
|
|
19991
|
+
const startDate = getLocalizedDateTime(locale, parsedDatetimes[startIndex], dateFormatOptions);
|
|
19992
|
+
const endDate = getLocalizedDateTime(locale, parsedDatetimes[endIndex], dateFormatOptions);
|
|
19993
|
+
let rangeText = `${startDate} - ${endDate}`;
|
|
19994
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
19995
|
+
try {
|
|
19996
|
+
rangeText = titleSelectedDatesFormatter(rangeValues);
|
|
19997
|
+
}
|
|
19998
|
+
catch (e) {
|
|
19999
|
+
printIonError('[ion-datetime-button] - Exception in provided `titleSelectedDatesFormatter`:', e);
|
|
20000
|
+
}
|
|
20001
|
+
}
|
|
20002
|
+
this.dateText = rangeText;
|
|
20003
|
+
}
|
|
20004
|
+
else if (isMultipleMode && parsedValues.length !== 1) {
|
|
19661
20005
|
let headerText = `${parsedValues.length} days`; // default/fallback for multiple selection
|
|
19662
20006
|
if (titleSelectedDatesFormatter !== undefined) {
|
|
19663
20007
|
try {
|
|
@@ -19670,7 +20014,7 @@ class DatetimeButton {
|
|
|
19670
20014
|
this.dateText = headerText;
|
|
19671
20015
|
}
|
|
19672
20016
|
else {
|
|
19673
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
20017
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
19674
20018
|
}
|
|
19675
20019
|
break;
|
|
19676
20020
|
case 'time':
|
|
@@ -19907,11 +20251,11 @@ class DatetimeButton {
|
|
|
19907
20251
|
render() {
|
|
19908
20252
|
const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
|
|
19909
20253
|
const theme = getIonTheme(this);
|
|
19910
|
-
return (hAsync(Host, { key: '
|
|
20254
|
+
return (hAsync(Host, { key: 'e022c5c280d4f889c1ba7ca3e96b38063c5add30', class: createColorClasses$1(color, {
|
|
19911
20255
|
[theme]: true,
|
|
19912
20256
|
[`${selectedButton}-active`]: datetimeActive,
|
|
19913
20257
|
['datetime-button-disabled']: disabled,
|
|
19914
|
-
}) }, dateText && (hAsync("button", { key: '
|
|
20258
|
+
}) }, dateText && (hAsync("button", { key: 'b1267d98cefbce7666b0cafa083c42f3116e2398', class: "ion-activatable", id: "date-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleDateClick, disabled: disabled, part: "native", ref: (el) => (this.dateTargetEl = el) }, hAsync("slot", { key: '3fdfa6adf73ee1e35cdb7f318f1d1ddcf4ab4d7b', name: "date-target" }, dateText), theme === 'md' && hAsync("ion-ripple-effect", { key: 'a832d63c77fffe8d7e0d28827bbb469726373d1e' }))), timeText && (hAsync("button", { key: 'c589bdf2b8221609713f0d3554494dd08a1f2e5b', class: "ion-activatable", id: "time-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleTimeClick, disabled: disabled, part: "native", ref: (el) => (this.timeTargetEl = el) }, hAsync("slot", { key: '10769ddadf7933d78744facaaa153bb413ff484a', name: "time-target" }, timeText), theme === 'md' && hAsync("ion-ripple-effect", { key: '7832de031919ddfb312528b45a3dc8e1c20edea6' })))));
|
|
19915
20259
|
}
|
|
19916
20260
|
get el() { return getElement(this); }
|
|
19917
20261
|
static get style() { return {
|