@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
|
@@ -92,11 +92,7 @@ Buttons.style = {
|
|
|
92
92
|
md: buttonsMdCss()
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
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)}`;
|
|
98
|
-
|
|
99
|
-
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)}`;
|
|
95
|
+
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}}`;
|
|
100
96
|
|
|
101
97
|
const Content = class {
|
|
102
98
|
constructor(hostRef) {
|
|
@@ -554,7 +550,7 @@ const Content = class {
|
|
|
554
550
|
const forceOverscroll = this.shouldForceOverscroll(mode);
|
|
555
551
|
const transitionShadow = theme === 'ios';
|
|
556
552
|
this.resize();
|
|
557
|
-
return (h(Host, { key: '
|
|
553
|
+
return (h(Host, { key: '7e283337732b709e43fe89b08f6852c499b964ff', role: isMainContent ? 'main' : undefined, class: createColorClasses(this.color, {
|
|
558
554
|
[theme]: true,
|
|
559
555
|
'content-fullscreen': this.fullscreen,
|
|
560
556
|
'content-sizing': this.sizeToContent,
|
|
@@ -563,12 +559,12 @@ const Content = class {
|
|
|
563
559
|
}), style: {
|
|
564
560
|
'--offset-top': `${this.cTop}px`,
|
|
565
561
|
'--offset-bottom': `${this.cBottom}px`,
|
|
566
|
-
}, ...inheritedAttributes }, h("div", { key: '
|
|
562
|
+
}, ...inheritedAttributes }, h("div", { key: '0dcbe4f4fe2d0f85b8c36bc656fc619afdc89cfe', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? h("slot", { name: "fixed" }) : null, h("div", { key: 'cbe91794c2fc53a59f8994968571a677a2e8346b', class: {
|
|
567
563
|
'inner-scroll': true,
|
|
568
564
|
'scroll-x': scrollX,
|
|
569
565
|
'scroll-y': scrollY,
|
|
570
566
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
571
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '
|
|
567
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '1a6b9bf25051eee41003185e1b519e4c4af2c001' })), transitionShadow ? (h("div", { class: "transition-effect" }, h("div", { class: "transition-cover" }), h("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? h("slot", { name: "fixed" }) : null));
|
|
572
568
|
}
|
|
573
569
|
get el() { return getElement(this); }
|
|
574
570
|
static get watchers() { return {
|
|
@@ -632,11 +628,7 @@ const updateScrollDetail = (detail, el, timestamp, shouldStart) => {
|
|
|
632
628
|
detail.velocityY = velocityY * 0.7 + detail.velocityY * 0.3;
|
|
633
629
|
}
|
|
634
630
|
};
|
|
635
|
-
Content.style =
|
|
636
|
-
ionic: contentIonicCss(),
|
|
637
|
-
ios: contentIosCss(),
|
|
638
|
-
md: contentMdCss()
|
|
639
|
-
};
|
|
631
|
+
Content.style = contentCss();
|
|
640
632
|
|
|
641
633
|
const handleFooterFade = (scrollEl, baseEl) => {
|
|
642
634
|
readTask(() => {
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as printIonError, h, f as Host, g as getElemen
|
|
|
5
5
|
import { f as addEventListener, c as componentOnReady } from './helpers-B_F2b1gy.js';
|
|
6
6
|
import { c as createColorClasses } from './theme-BUF_V-Kg.js';
|
|
7
7
|
import { c as getIonTheme } from './ionic-global-DSbFWXp3.js';
|
|
8
|
-
import {
|
|
8
|
+
import { E as parseDate, d as getHourCycle, P as getLocalizedDateTime, O as getLocalizedTime, l as isAfter } from './format-DUHrIiJq.js';
|
|
9
9
|
import './index-ZjP4CjeZ.js';
|
|
10
10
|
import './focus-visible-BYk20Mf5.js';
|
|
11
11
|
import './dir-Dj4J3LkD.js';
|
|
@@ -52,7 +52,7 @@ const DatetimeButton = class {
|
|
|
52
52
|
if (!datetimeEl) {
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
55
|
+
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, selectionMode, titleSelectedDatesFormatter, } = datetimeEl;
|
|
56
56
|
const parsedValues = this.getParsedDateValues(value);
|
|
57
57
|
/**
|
|
58
58
|
* Both ion-datetime and ion-datetime-button default to today's date and
|
|
@@ -64,6 +64,8 @@ const DatetimeButton = class {
|
|
|
64
64
|
if (!parsedDatetimes) {
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
+
const isRangeMode = selectionMode === 'range';
|
|
68
|
+
const isMultipleMode = selectionMode === 'multiple' || (selectionMode === undefined && multiple);
|
|
67
69
|
/**
|
|
68
70
|
* If developers incorrectly use multiple="true"
|
|
69
71
|
* with non "date" datetimes, then just select
|
|
@@ -73,11 +75,12 @@ const DatetimeButton = class {
|
|
|
73
75
|
*/
|
|
74
76
|
const firstParsedDatetime = parsedDatetimes[0];
|
|
75
77
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
78
|
+
const dateFormatOptions = formatOptions?.date ?? { month: 'short', day: 'numeric', year: 'numeric' };
|
|
76
79
|
this.dateText = this.timeText = undefined;
|
|
77
80
|
switch (datetimePresentation) {
|
|
78
81
|
case 'date-time':
|
|
79
82
|
case 'time-date':
|
|
80
|
-
const dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
83
|
+
const dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
81
84
|
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions?.time);
|
|
82
85
|
if (preferWheel) {
|
|
83
86
|
this.dateText = `${dateText} ${timeText}`;
|
|
@@ -88,7 +91,31 @@ const DatetimeButton = class {
|
|
|
88
91
|
}
|
|
89
92
|
break;
|
|
90
93
|
case 'date':
|
|
91
|
-
if (
|
|
94
|
+
if (isRangeMode && parsedValues.length >= 2) {
|
|
95
|
+
/**
|
|
96
|
+
* Use the first and last entries in date order, matching
|
|
97
|
+
* how ion-datetime reads a range value.
|
|
98
|
+
*/
|
|
99
|
+
let startIndex = 0;
|
|
100
|
+
let endIndex = parsedValues.length - 1;
|
|
101
|
+
if (isAfter(parsedDatetimes[startIndex], parsedDatetimes[endIndex])) {
|
|
102
|
+
[startIndex, endIndex] = [endIndex, startIndex];
|
|
103
|
+
}
|
|
104
|
+
const rangeValues = [parsedValues[startIndex], parsedValues[endIndex]];
|
|
105
|
+
const startDate = getLocalizedDateTime(locale, parsedDatetimes[startIndex], dateFormatOptions);
|
|
106
|
+
const endDate = getLocalizedDateTime(locale, parsedDatetimes[endIndex], dateFormatOptions);
|
|
107
|
+
let rangeText = `${startDate} - ${endDate}`;
|
|
108
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
109
|
+
try {
|
|
110
|
+
rangeText = titleSelectedDatesFormatter(rangeValues);
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
printIonError('[ion-datetime-button] - Exception in provided `titleSelectedDatesFormatter`:', e);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
this.dateText = rangeText;
|
|
117
|
+
}
|
|
118
|
+
else if (isMultipleMode && parsedValues.length !== 1) {
|
|
92
119
|
let headerText = `${parsedValues.length} days`; // default/fallback for multiple selection
|
|
93
120
|
if (titleSelectedDatesFormatter !== undefined) {
|
|
94
121
|
try {
|
|
@@ -101,7 +128,7 @@ const DatetimeButton = class {
|
|
|
101
128
|
this.dateText = headerText;
|
|
102
129
|
}
|
|
103
130
|
else {
|
|
104
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime,
|
|
131
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, dateFormatOptions);
|
|
105
132
|
}
|
|
106
133
|
break;
|
|
107
134
|
case 'time':
|
|
@@ -338,11 +365,11 @@ const DatetimeButton = class {
|
|
|
338
365
|
render() {
|
|
339
366
|
const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
|
|
340
367
|
const theme = getIonTheme(this);
|
|
341
|
-
return (h(Host, { key: '
|
|
368
|
+
return (h(Host, { key: 'e022c5c280d4f889c1ba7ca3e96b38063c5add30', class: createColorClasses(color, {
|
|
342
369
|
[theme]: true,
|
|
343
370
|
[`${selectedButton}-active`]: datetimeActive,
|
|
344
371
|
['datetime-button-disabled']: disabled,
|
|
345
|
-
}) }, dateText && (h("button", { key: '
|
|
372
|
+
}) }, dateText && (h("button", { key: 'b1267d98cefbce7666b0cafa083c42f3116e2398', class: "ion-activatable", id: "date-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleDateClick, disabled: disabled, part: "native", ref: (el) => (this.dateTargetEl = el) }, h("slot", { key: '3fdfa6adf73ee1e35cdb7f318f1d1ddcf4ab4d7b', name: "date-target" }, dateText), theme === 'md' && h("ion-ripple-effect", { key: 'a832d63c77fffe8d7e0d28827bbb469726373d1e' }))), timeText && (h("button", { key: 'c589bdf2b8221609713f0d3554494dd08a1f2e5b', class: "ion-activatable", id: "time-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleTimeClick, disabled: disabled, part: "native", ref: (el) => (this.timeTargetEl = el) }, h("slot", { key: '10769ddadf7933d78744facaaa153bb413ff484a', name: "time-target" }, timeText), theme === 'md' && h("ion-ripple-effect", { key: '7832de031919ddfb312528b45a3dc8e1c20edea6' })))));
|
|
346
373
|
}
|
|
347
374
|
get el() { return getElement(this); }
|
|
348
375
|
};
|