@ionic/core 8.6.3-dev.11751378808.12cc4a5c → 8.6.3-nightly.20250619
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/action-sheet.js +9 -8
- package/components/alert.js +8 -7
- package/components/ion-app.js +1 -3
- package/components/ion-datetime.js +2 -8
- package/components/ion-loading.js +8 -7
- package/components/ion-menu.js +5 -27
- package/components/ion-reorder-group.js +2 -1
- package/components/ion-router.js +0 -1
- package/components/ion-searchbar.js +6 -4
- package/components/ion-toast.js +7 -6
- package/components/modal.js +14 -242
- package/components/popover.js +7 -8
- package/dist/cjs/ion-action-sheet.cjs.entry.js +9 -8
- package/dist/cjs/ion-alert.cjs.entry.js +8 -7
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +2 -8
- package/dist/cjs/ion-loading.cjs.entry.js +8 -7
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -27
- package/dist/cjs/ion-modal.cjs.entry.js +14 -242
- package/dist/cjs/ion-popover.cjs.entry.js +7 -8
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +0 -1
- package/dist/cjs/ion-searchbar.cjs.entry.js +6 -4
- package/dist/cjs/ion-toast.cjs.entry.js +7 -6
- package/dist/collection/components/action-sheet/action-sheet.js +12 -11
- package/dist/collection/components/alert/alert.js +11 -10
- package/dist/collection/components/app/app.js +3 -8
- package/dist/collection/components/datetime/datetime.js +8 -23
- package/dist/collection/components/loading/loading.js +11 -10
- package/dist/collection/components/menu/menu.js +19 -62
- package/dist/collection/components/modal/animations/ios.enter.js +2 -2
- package/dist/collection/components/modal/animations/ios.leave.js +2 -2
- package/dist/collection/components/modal/modal.js +16 -118
- package/dist/collection/components/popover/popover.js +14 -18
- package/dist/collection/components/reorder-group/reorder-group.js +3 -2
- package/dist/collection/components/router/router.js +1 -5
- package/dist/collection/components/searchbar/searchbar.js +7 -5
- package/dist/collection/components/toast/toast.js +10 -9
- package/dist/docs.json +72 -138
- package/dist/esm/ion-action-sheet.entry.js +9 -8
- package/dist/esm/ion-alert.entry.js +8 -7
- package/dist/esm/ion-app_8.entry.js +1 -3
- package/dist/esm/ion-datetime_3.entry.js +2 -8
- package/dist/esm/ion-loading.entry.js +8 -7
- package/dist/esm/ion-menu_3.entry.js +5 -27
- package/dist/esm/ion-modal.entry.js +14 -242
- package/dist/esm/ion-popover.entry.js +7 -8
- package/dist/esm/ion-reorder_2.entry.js +2 -1
- package/dist/esm/ion-route_4.entry.js +0 -1
- package/dist/esm/ion-searchbar.entry.js +6 -4
- package/dist/esm/ion-toast.entry.js +7 -6
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-b758a177.entry.js → p-2020aa51.entry.js} +1 -1
- package/dist/ionic/p-29759454.entry.js +4 -0
- package/dist/ionic/{p-e37d6c67.entry.js → p-3a4feac2.entry.js} +1 -1
- package/dist/ionic/{p-2d0eccfb.entry.js → p-6b666996.entry.js} +1 -1
- package/dist/ionic/p-7149db7e.entry.js +4 -0
- package/dist/ionic/{p-01123ecf.entry.js → p-96389029.entry.js} +1 -1
- package/dist/ionic/{p-0d131a02.entry.js → p-9e699d4a.entry.js} +1 -1
- package/dist/ionic/p-bec79123.entry.js +4 -0
- package/dist/ionic/{p-03d21728.entry.js → p-cb787a4b.entry.js} +1 -1
- package/dist/ionic/{p-d8429eb4.entry.js → p-cd12ed1c.entry.js} +1 -1
- package/dist/ionic/{p-5f671887.entry.js → p-ead42a37.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +6 -5
- package/dist/types/components/alert/alert.d.ts +6 -5
- package/dist/types/components/app/app.d.ts +0 -2
- package/dist/types/components/datetime/datetime.d.ts +0 -6
- package/dist/types/components/loading/loading.d.ts +6 -5
- package/dist/types/components/menu/menu.d.ts +3 -25
- package/dist/types/components/modal/modal.d.ts +6 -20
- package/dist/types/components/popover/popover.d.ts +5 -6
- package/dist/types/components/reorder-group/reorder-group.d.ts +1 -0
- package/dist/types/components/router/router.d.ts +0 -1
- package/dist/types/components/searchbar/searchbar.d.ts +2 -0
- package/dist/types/components/toast/toast.d.ts +5 -4
- package/dist/types/components.d.ts +18 -32
- package/hydrate/index.js +69 -322
- package/hydrate/index.mjs +69 -322
- package/package.json +3 -3
- package/dist/collection/components/modal/animations/ios.transition.js +0 -143
- package/dist/ionic/p-69f91268.entry.js +0 -4
- package/dist/ionic/p-6f74a187.entry.js +0 -4
- package/dist/ionic/p-b9ba04ca.entry.js +0 -4
- package/dist/types/components/modal/animations/ios.transition.d.ts +0 -14
package/components/modal.js
CHANGED
|
@@ -587,7 +587,7 @@ const iosEnterAnimation = (baseEl, opts) => {
|
|
|
587
587
|
baseAnimation.addAnimation(contentAnimation);
|
|
588
588
|
}
|
|
589
589
|
if (presentingEl) {
|
|
590
|
-
const
|
|
590
|
+
const isMobile = window.innerWidth < 768;
|
|
591
591
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
592
592
|
const presentingElRoot = getElementRoot(presentingEl);
|
|
593
593
|
const presentingAnimation = createAnimation().beforeStyles({
|
|
@@ -596,7 +596,7 @@ const iosEnterAnimation = (baseEl, opts) => {
|
|
|
596
596
|
overflow: 'hidden',
|
|
597
597
|
});
|
|
598
598
|
const bodyEl = document.body;
|
|
599
|
-
if (
|
|
599
|
+
if (isMobile) {
|
|
600
600
|
/**
|
|
601
601
|
* Fallback for browsers that does not support `max()` (ex: Firefox)
|
|
602
602
|
* No need to worry about statusbar padding since engines like Gecko
|
|
@@ -674,7 +674,7 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
|
|
|
674
674
|
.duration(duration)
|
|
675
675
|
.addAnimation(wrapperAnimation);
|
|
676
676
|
if (presentingEl) {
|
|
677
|
-
const
|
|
677
|
+
const isMobile = window.innerWidth < 768;
|
|
678
678
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
679
679
|
const presentingElRoot = getElementRoot(presentingEl);
|
|
680
680
|
const presentingAnimation = createAnimation()
|
|
@@ -692,7 +692,7 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
|
|
|
692
692
|
}
|
|
693
693
|
});
|
|
694
694
|
const bodyEl = document.body;
|
|
695
|
-
if (
|
|
695
|
+
if (isMobile) {
|
|
696
696
|
const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
|
697
697
|
const modalTransform = hasCardModal ? '-10px' : transformOffset;
|
|
698
698
|
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
|
@@ -739,144 +739,6 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
|
|
|
739
739
|
return baseAnimation;
|
|
740
740
|
};
|
|
741
741
|
|
|
742
|
-
/**
|
|
743
|
-
* Transition animation from portrait view to landscape view
|
|
744
|
-
* This handles the case where a card modal is open in portrait view
|
|
745
|
-
* and the user switches to landscape view
|
|
746
|
-
*/
|
|
747
|
-
const portraitToLandscapeTransition = (baseEl, opts, duration = 300) => {
|
|
748
|
-
const { presentingEl } = opts;
|
|
749
|
-
if (!presentingEl) {
|
|
750
|
-
// No transition needed for non-card modals
|
|
751
|
-
return createAnimation('portrait-to-landscape-transition');
|
|
752
|
-
}
|
|
753
|
-
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
754
|
-
const presentingElRoot = getElementRoot(presentingEl);
|
|
755
|
-
const bodyEl = document.body;
|
|
756
|
-
const baseAnimation = createAnimation('portrait-to-landscape-transition')
|
|
757
|
-
.addElement(baseEl)
|
|
758
|
-
.easing('cubic-bezier(0.32,0.72,0,1)')
|
|
759
|
-
.duration(duration);
|
|
760
|
-
const presentingAnimation = createAnimation().beforeStyles({
|
|
761
|
-
transform: 'translateY(0)',
|
|
762
|
-
'transform-origin': 'top center',
|
|
763
|
-
overflow: 'hidden',
|
|
764
|
-
});
|
|
765
|
-
if (!hasCardModal) {
|
|
766
|
-
// Non-card modal: transition from portrait state to landscape state
|
|
767
|
-
// Portrait: presentingEl has transform and body has black background
|
|
768
|
-
// Landscape: no transform, no body background, modal wrapper opacity changes
|
|
769
|
-
const root = getElementRoot(baseEl);
|
|
770
|
-
const wrapperAnimation = createAnimation()
|
|
771
|
-
.addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow'))
|
|
772
|
-
.fromTo('opacity', '1', '1'); // Keep wrapper visible in landscape
|
|
773
|
-
const backdropAnimation = createAnimation()
|
|
774
|
-
.addElement(root.querySelector('ion-backdrop'))
|
|
775
|
-
.fromTo('opacity', 'var(--backdrop-opacity)', 'var(--backdrop-opacity)'); // Keep backdrop visible
|
|
776
|
-
// Animate presentingEl from portrait state back to normal
|
|
777
|
-
const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
|
778
|
-
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
|
779
|
-
const fromTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
|
|
780
|
-
presentingAnimation
|
|
781
|
-
.addElement(presentingEl)
|
|
782
|
-
.afterStyles({
|
|
783
|
-
transform: 'translateY(0px) scale(1)',
|
|
784
|
-
'border-radius': '0px',
|
|
785
|
-
})
|
|
786
|
-
.beforeAddWrite(() => bodyEl.style.setProperty('background-color', ''))
|
|
787
|
-
.fromTo('transform', fromTransform, 'translateY(0px) scale(1)')
|
|
788
|
-
.fromTo('filter', 'contrast(0.85)', 'contrast(1)')
|
|
789
|
-
.fromTo('border-radius', '10px 10px 0 0', '0px');
|
|
790
|
-
baseAnimation.addAnimation([presentingAnimation, wrapperAnimation, backdropAnimation]);
|
|
791
|
-
}
|
|
792
|
-
else {
|
|
793
|
-
// Card modal: transition from portrait card state to landscape card state
|
|
794
|
-
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
|
795
|
-
const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
|
796
|
-
const fromTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
|
|
797
|
-
const toTransform = `translateY(-10px) scale(${toPresentingScale})`;
|
|
798
|
-
presentingAnimation
|
|
799
|
-
.addElement(presentingElRoot.querySelector('.modal-wrapper'))
|
|
800
|
-
.fromTo('transform', fromTransform, toTransform)
|
|
801
|
-
.fromTo('filter', 'contrast(0.85)', 'contrast(0.85)'); // Keep same contrast for card
|
|
802
|
-
const shadowAnimation = createAnimation()
|
|
803
|
-
.addElement(presentingElRoot.querySelector('.modal-shadow'))
|
|
804
|
-
.fromTo('opacity', '0', '0') // Shadow stays hidden in landscape for card modals
|
|
805
|
-
.fromTo('transform', fromTransform, toTransform);
|
|
806
|
-
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
|
807
|
-
}
|
|
808
|
-
return baseAnimation;
|
|
809
|
-
};
|
|
810
|
-
/**
|
|
811
|
-
* Transition animation from landscape view to portrait view
|
|
812
|
-
* This handles the case where a card modal is open in landscape view
|
|
813
|
-
* and the user switches to portrait view
|
|
814
|
-
*/
|
|
815
|
-
const landscapeToPortraitTransition = (baseEl, opts, duration = 300) => {
|
|
816
|
-
const { presentingEl } = opts;
|
|
817
|
-
if (!presentingEl) {
|
|
818
|
-
// No transition needed for non-card modals
|
|
819
|
-
return createAnimation('landscape-to-portrait-transition');
|
|
820
|
-
}
|
|
821
|
-
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
822
|
-
const presentingElRoot = getElementRoot(presentingEl);
|
|
823
|
-
const bodyEl = document.body;
|
|
824
|
-
const baseAnimation = createAnimation('landscape-to-portrait-transition')
|
|
825
|
-
.addElement(baseEl)
|
|
826
|
-
.easing('cubic-bezier(0.32,0.72,0,1)')
|
|
827
|
-
.duration(duration);
|
|
828
|
-
const presentingAnimation = createAnimation().beforeStyles({
|
|
829
|
-
transform: 'translateY(0)',
|
|
830
|
-
'transform-origin': 'top center',
|
|
831
|
-
overflow: 'hidden',
|
|
832
|
-
});
|
|
833
|
-
if (!hasCardModal) {
|
|
834
|
-
// Non-card modal: transition from landscape state to portrait state
|
|
835
|
-
const root = getElementRoot(baseEl);
|
|
836
|
-
const wrapperAnimation = createAnimation()
|
|
837
|
-
.addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow'))
|
|
838
|
-
.fromTo('opacity', '1', '1'); // Keep wrapper visible
|
|
839
|
-
const backdropAnimation = createAnimation()
|
|
840
|
-
.addElement(root.querySelector('ion-backdrop'))
|
|
841
|
-
.fromTo('opacity', 'var(--backdrop-opacity)', 'var(--backdrop-opacity)'); // Keep backdrop visible
|
|
842
|
-
// Animate presentingEl from normal state to portrait state
|
|
843
|
-
const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
|
844
|
-
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
|
845
|
-
const toTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
|
|
846
|
-
presentingAnimation
|
|
847
|
-
.addElement(presentingEl)
|
|
848
|
-
.afterStyles({
|
|
849
|
-
transform: toTransform,
|
|
850
|
-
'border-radius': '10px 10px 0 0',
|
|
851
|
-
filter: 'contrast(0.85)',
|
|
852
|
-
overflow: 'hidden',
|
|
853
|
-
'transform-origin': 'top center',
|
|
854
|
-
})
|
|
855
|
-
.beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black'))
|
|
856
|
-
.fromTo('transform', 'translateY(0px) scale(1)', toTransform)
|
|
857
|
-
.fromTo('filter', 'contrast(1)', 'contrast(0.85)')
|
|
858
|
-
.fromTo('border-radius', '0px', '10px 10px 0 0');
|
|
859
|
-
baseAnimation.addAnimation([presentingAnimation, wrapperAnimation, backdropAnimation]);
|
|
860
|
-
}
|
|
861
|
-
else {
|
|
862
|
-
// Card modal: transition from landscape card state to portrait card state
|
|
863
|
-
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
|
864
|
-
const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
|
865
|
-
const fromTransform = `translateY(-10px) scale(${toPresentingScale})`;
|
|
866
|
-
const toTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
|
|
867
|
-
presentingAnimation
|
|
868
|
-
.addElement(presentingElRoot.querySelector('.modal-wrapper'))
|
|
869
|
-
.fromTo('transform', fromTransform, toTransform)
|
|
870
|
-
.fromTo('filter', 'contrast(0.85)', 'contrast(0.85)'); // Keep same contrast for card
|
|
871
|
-
const shadowAnimation = createAnimation()
|
|
872
|
-
.addElement(presentingElRoot.querySelector('.modal-shadow'))
|
|
873
|
-
.fromTo('opacity', '0', '0') // Shadow stays hidden
|
|
874
|
-
.fromTo('transform', fromTransform, toTransform);
|
|
875
|
-
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
|
876
|
-
}
|
|
877
|
-
return baseAnimation;
|
|
878
|
-
};
|
|
879
|
-
|
|
880
742
|
const createEnterAnimation = () => {
|
|
881
743
|
const backdropAnimation = createAnimation()
|
|
882
744
|
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
@@ -1622,17 +1484,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1622
1484
|
el.dispatchEvent(ev);
|
|
1623
1485
|
}
|
|
1624
1486
|
};
|
|
1625
|
-
/**
|
|
1626
|
-
* When the modal receives focus directly, pass focus to the handle
|
|
1627
|
-
* if it exists and is focusable, otherwise let the focus trap handle it.
|
|
1628
|
-
*/
|
|
1629
|
-
this.onModalFocus = (ev) => {
|
|
1630
|
-
const { dragHandleEl, el } = this;
|
|
1631
|
-
// Only handle focus if the modal itself was focused (not a child element)
|
|
1632
|
-
if (ev.target === el && dragHandleEl && dragHandleEl.tabIndex !== -1) {
|
|
1633
|
-
dragHandleEl.focus();
|
|
1634
|
-
}
|
|
1635
|
-
};
|
|
1636
1487
|
}
|
|
1637
1488
|
onIsOpenChange(newValue, oldValue) {
|
|
1638
1489
|
if (newValue === true && oldValue === false) {
|
|
@@ -1660,7 +1511,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1660
1511
|
}
|
|
1661
1512
|
disconnectedCallback() {
|
|
1662
1513
|
this.triggerController.removeClickListener();
|
|
1663
|
-
this.cleanupViewTransitionListener();
|
|
1664
1514
|
}
|
|
1665
1515
|
componentWillLoad() {
|
|
1666
1516
|
var _a;
|
|
@@ -1871,8 +1721,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1871
1721
|
else if (hasCardModal) {
|
|
1872
1722
|
this.initSwipeToClose();
|
|
1873
1723
|
}
|
|
1874
|
-
// Initialize view transition listener for iOS card modals
|
|
1875
|
-
this.initViewTransitionListener();
|
|
1876
1724
|
unlock();
|
|
1877
1725
|
}
|
|
1878
1726
|
initSwipeToClose() {
|
|
@@ -1967,13 +1815,13 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1967
1815
|
}
|
|
1968
1816
|
/**
|
|
1969
1817
|
* Dismiss the modal overlay after it has been presented.
|
|
1818
|
+
*
|
|
1819
|
+
* @param data Any data to emit in the dismiss events.
|
|
1820
|
+
* @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
|
|
1821
|
+
*
|
|
1970
1822
|
* This is a no-op if the overlay has not been presented yet. If you want
|
|
1971
1823
|
* to remove an overlay from the DOM that was never presented, use the
|
|
1972
1824
|
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
1973
|
-
*
|
|
1974
|
-
* @param data Any data to emit in the dismiss events.
|
|
1975
|
-
* @param role The role of the element that is dismissing the modal.
|
|
1976
|
-
* For example, `cancel` or `backdrop`.
|
|
1977
1825
|
*/
|
|
1978
1826
|
async dismiss(data, role) {
|
|
1979
1827
|
var _a;
|
|
@@ -2026,7 +1874,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2026
1874
|
if (this.gesture) {
|
|
2027
1875
|
this.gesture.destroy();
|
|
2028
1876
|
}
|
|
2029
|
-
this.cleanupViewTransitionListener();
|
|
2030
1877
|
}
|
|
2031
1878
|
this.currentBreakpoint = undefined;
|
|
2032
1879
|
this.animation = undefined;
|
|
@@ -2046,10 +1893,8 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2046
1893
|
return eventMethod(this.el, 'ionModalWillDismiss');
|
|
2047
1894
|
}
|
|
2048
1895
|
/**
|
|
2049
|
-
* Move a sheet style modal to a specific breakpoint.
|
|
2050
|
-
*
|
|
2051
|
-
* @param breakpoint The breakpoint value to move the sheet modal to.
|
|
2052
|
-
* Must be a value defined in your `breakpoints` array.
|
|
1896
|
+
* Move a sheet style modal to a specific breakpoint. The breakpoint value must
|
|
1897
|
+
* be a value defined in your `breakpoints` array.
|
|
2053
1898
|
*/
|
|
2054
1899
|
async setCurrentBreakpoint(breakpoint) {
|
|
2055
1900
|
if (!this.isSheetModal) {
|
|
@@ -2102,97 +1947,24 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
2102
1947
|
await this.setCurrentBreakpoint(nextBreakpoint);
|
|
2103
1948
|
return true;
|
|
2104
1949
|
}
|
|
2105
|
-
initViewTransitionListener() {
|
|
2106
|
-
// Only enable for iOS card modals when no custom animations are provided
|
|
2107
|
-
if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
2108
|
-
return;
|
|
2109
|
-
}
|
|
2110
|
-
// Set initial view state
|
|
2111
|
-
this.currentViewIsPortrait = window.innerWidth < 768;
|
|
2112
|
-
// Create debounced resize handler
|
|
2113
|
-
let resizeTimeout;
|
|
2114
|
-
this.resizeListener = () => {
|
|
2115
|
-
clearTimeout(resizeTimeout);
|
|
2116
|
-
resizeTimeout = setTimeout(() => {
|
|
2117
|
-
this.handleViewTransition();
|
|
2118
|
-
}, 100); // Debounce for 100ms to avoid excessive calls
|
|
2119
|
-
};
|
|
2120
|
-
window.addEventListener('resize', this.resizeListener);
|
|
2121
|
-
}
|
|
2122
|
-
handleViewTransition() {
|
|
2123
|
-
const isPortrait = window.innerWidth < 768;
|
|
2124
|
-
// Only transition if view state actually changed
|
|
2125
|
-
if (this.currentViewIsPortrait === isPortrait) {
|
|
2126
|
-
return;
|
|
2127
|
-
}
|
|
2128
|
-
// Cancel any ongoing transition animation
|
|
2129
|
-
if (this.viewTransitionAnimation) {
|
|
2130
|
-
this.viewTransitionAnimation.destroy();
|
|
2131
|
-
this.viewTransitionAnimation = undefined;
|
|
2132
|
-
}
|
|
2133
|
-
const { presentingElement } = this;
|
|
2134
|
-
if (!presentingElement) {
|
|
2135
|
-
return;
|
|
2136
|
-
}
|
|
2137
|
-
// Create transition animation
|
|
2138
|
-
let transitionAnimation;
|
|
2139
|
-
if (this.currentViewIsPortrait && !isPortrait) {
|
|
2140
|
-
// Portrait to landscape transition
|
|
2141
|
-
transitionAnimation = portraitToLandscapeTransition(this.el, {
|
|
2142
|
-
presentingEl: presentingElement});
|
|
2143
|
-
}
|
|
2144
|
-
else {
|
|
2145
|
-
// Landscape to portrait transition
|
|
2146
|
-
transitionAnimation = landscapeToPortraitTransition(this.el, {
|
|
2147
|
-
presentingEl: presentingElement});
|
|
2148
|
-
}
|
|
2149
|
-
// Update state and play animation
|
|
2150
|
-
this.currentViewIsPortrait = isPortrait;
|
|
2151
|
-
this.viewTransitionAnimation = transitionAnimation;
|
|
2152
|
-
transitionAnimation.play().then(() => {
|
|
2153
|
-
this.viewTransitionAnimation = undefined;
|
|
2154
|
-
});
|
|
2155
|
-
}
|
|
2156
|
-
cleanupViewTransitionListener() {
|
|
2157
|
-
const hasCardView = !!this.resizeListener;
|
|
2158
|
-
if (this.resizeListener) {
|
|
2159
|
-
window.removeEventListener('resize', this.resizeListener);
|
|
2160
|
-
this.resizeListener = undefined;
|
|
2161
|
-
}
|
|
2162
|
-
if (this.viewTransitionAnimation) {
|
|
2163
|
-
this.viewTransitionAnimation.destroy();
|
|
2164
|
-
this.viewTransitionAnimation = undefined;
|
|
2165
|
-
}
|
|
2166
|
-
if (hasCardView) {
|
|
2167
|
-
// If we had a card view, let's trigger the view transition
|
|
2168
|
-
// one last time to make sure we're in the right state.
|
|
2169
|
-
// This will prevent tricky things like resizing the modal causing
|
|
2170
|
-
// it to dismiss programatically too quickly and preventing the view transition
|
|
2171
|
-
// from being applied.
|
|
2172
|
-
this.handleViewTransition();
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
1950
|
render() {
|
|
2176
1951
|
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
|
|
2177
1952
|
const showHandle = handle !== false && isSheetModal;
|
|
2178
1953
|
const mode = getIonMode(this);
|
|
2179
1954
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
2180
1955
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
2181
|
-
|
|
2182
|
-
return (h(Host, Object.assign({ key: '857fbf50b5d0b43c1f1a335d740649cedf1d6e2b', "no-router": true,
|
|
2183
|
-
// Allow the modal to be navigable when the handle is focusable
|
|
2184
|
-
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
1956
|
+
return (h(Host, Object.assign({ key: '0bcbdcfcd7d890eb599da3f97f21c317d34f8e0e', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
2185
1957
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2186
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle
|
|
1958
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: 'd72159e73daa5af7349aa9e8f695aa435eb43069', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'fd2d9b13676ae72473881649a397b6eacde03a03', class: "modal-shadow" }), h("div", Object.assign({ key: '908eccb1ad982dcde2dbcff0cbb18b6e60f8ba74',
|
|
2187
1959
|
/*
|
|
2188
1960
|
role and aria-modal must be used on the
|
|
2189
1961
|
same element. They must also be set inside the
|
|
2190
1962
|
shadow DOM otherwise ion-button will not be highlighted
|
|
2191
1963
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
2192
1964
|
*/
|
|
2193
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
1965
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '332dc0b40363a77c7be62331d9f26def91c790e9', class: "modal-handle",
|
|
2194
1966
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
2195
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle"
|
|
1967
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: 'c32698350193c450327e97049daf8b8d1fda0d0e' }))));
|
|
2196
1968
|
}
|
|
2197
1969
|
get el() { return this; }
|
|
2198
1970
|
static get watchers() { return {
|
package/components/popover.js
CHANGED
|
@@ -1263,8 +1263,6 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1263
1263
|
* Developers can pass a mouse, touch, or pointer event
|
|
1264
1264
|
* to position the popover relative to where that event
|
|
1265
1265
|
* was dispatched.
|
|
1266
|
-
*
|
|
1267
|
-
* @param event The event to position the popover relative to.
|
|
1268
1266
|
*/
|
|
1269
1267
|
async present(event) {
|
|
1270
1268
|
const unlock = await this.lockController.lock();
|
|
@@ -1328,14 +1326,15 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1328
1326
|
}
|
|
1329
1327
|
/**
|
|
1330
1328
|
* Dismiss the popover overlay after it has been presented.
|
|
1331
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
1332
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
1333
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
1334
1329
|
*
|
|
1335
1330
|
* @param data Any data to emit in the dismiss events.
|
|
1336
|
-
* @param role The role of the element that is dismissing the popover. For example,
|
|
1331
|
+
* @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
|
|
1337
1332
|
* @param dismissParentPopover If `true`, dismissing this popover will also dismiss
|
|
1338
1333
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
1334
|
+
*
|
|
1335
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
1336
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
1337
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
1339
1338
|
*/
|
|
1340
1339
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
1341
1340
|
const unlock = await this.lockController.lock();
|
|
@@ -1387,9 +1386,9 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1387
1386
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
1388
1387
|
const desktop = isPlatform('desktop');
|
|
1389
1388
|
const enableArrow = arrow && !parentPopover;
|
|
1390
|
-
return (h(Host, Object.assign({ key: '
|
|
1389
|
+
return (h(Host, Object.assign({ key: '1de4862099cfcb5035e78008e6dc7c1371846f9a', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1391
1390
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1392
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '
|
|
1391
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '981aa4e0102cb93312ffbd8243cdf2a0cdc60469', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '1a28ed55e9d34ef78cf0eb0178643301fd2dd75d', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '1c206ea5eb3c0b5883a3d45c34cd22dd5ffe4b65', class: "popover-arrow", part: "arrow" }), h("div", { key: '5ba561486a328c0c7ab825995fdbfb7a196429a4', class: "popover-content", part: "content" }, h("slot", { key: '00fc244ce9dcc2dfc677e6c34b7c8e7a330b2b03' })))));
|
|
1393
1392
|
}
|
|
1394
1393
|
get el() { return this; }
|
|
1395
1394
|
static get watchers() { return {
|
|
@@ -189,15 +189,16 @@ const ActionSheet = class {
|
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Dismiss the action sheet overlay after it has been presented.
|
|
192
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
193
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
194
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
195
192
|
*
|
|
196
193
|
* @param data Any data to emit in the dismiss events.
|
|
197
194
|
* @param role The role of the element that is dismissing the action sheet.
|
|
198
195
|
* This can be useful in a button handler for determining which button was
|
|
199
|
-
* clicked to dismiss the action sheet.
|
|
200
|
-
*
|
|
196
|
+
* clicked to dismiss the action sheet.
|
|
197
|
+
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
198
|
+
*
|
|
199
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
200
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
201
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
201
202
|
*/
|
|
202
203
|
async dismiss(data, role) {
|
|
203
204
|
const unlock = await this.lockController.lock();
|
|
@@ -309,12 +310,12 @@ const ActionSheet = class {
|
|
|
309
310
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
310
311
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
311
312
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
312
|
-
return (index.h(index.Host, Object.assign({ key: '
|
|
313
|
+
return (index.h(index.Host, Object.assign({ key: '7bbd202ca9e19727e7514abbe073687d982f80c3', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
313
314
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
314
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: '
|
|
315
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: '23344a9221a2e6720d7b9de5249dc37256cafa7b', tappable: this.backdropDismiss }), index.h("div", { key: 'fbc2ba15549c2ab04e759e82df6e177fd80cc0a6', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: '748ee5235d0b4cb26d6f1b7589f77af2e37ad28a', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, index.h("div", { key: '7ce5fa236cf75e9b1e49c4725c9a811078706554', class: "action-sheet-container" }, index.h("div", { key: 'dc2251f3bcee4a93e3449f09621cbd2b65d329e9', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (index.h("div", { key: '48d325c8a852f56ed57a9ada1a6709d05ba32ee2', id: headerID, class: {
|
|
315
316
|
'action-sheet-title': true,
|
|
316
317
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
317
|
-
} }, header, this.subHeader && index.h("div", { key: '
|
|
318
|
+
} }, header, this.subHeader && index.h("div", { key: '66093728052eb67f37a35f3232761ce4a08896f3', class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (index.h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b), disabled: b.disabled }), index.h("span", { class: "action-sheet-button-inner" }, b.icon && index.h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && index.h("ion-ripple-effect", null))))), cancelButton && (index.h("div", { key: 'f4eb8e3e2885b85af5080df18d0de0bdd1d719de', class: "action-sheet-group action-sheet-group-cancel" }, index.h("button", Object.assign({ key: '169f4eb09255aba85062baad49ceb151239fbfb7' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), index.h("span", { key: '25fb8a466dd67ea94c79cfb4f9965527e1ce6d42', class: "action-sheet-button-inner" }, cancelButton.icon && (index.h("ion-icon", { key: 'eb5b071e120a2c86afdf967af6a763a43044d1ca', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && index.h("ion-ripple-effect", { key: '452ad7e1052b2c681e2d98de8193949755ad4d54' })))))), index.h("div", { key: 'e1cecf280c987c050d9445e2c458b903f153089b', tabindex: "0", "aria-hidden": "true" })));
|
|
318
319
|
}
|
|
319
320
|
get el() { return index.getElement(this); }
|
|
320
321
|
static get watchers() { return {
|
|
@@ -359,15 +359,16 @@ const Alert = class {
|
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* Dismiss the alert overlay after it has been presented.
|
|
362
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
363
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
364
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
365
362
|
*
|
|
366
363
|
* @param data Any data to emit in the dismiss events.
|
|
367
364
|
* @param role The role of the element that is dismissing the alert.
|
|
368
365
|
* This can be useful in a button handler for determining which button was
|
|
369
|
-
* clicked to dismiss the alert.
|
|
370
|
-
*
|
|
366
|
+
* clicked to dismiss the alert.
|
|
367
|
+
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
368
|
+
*
|
|
369
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
370
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
371
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
371
372
|
*/
|
|
372
373
|
async dismiss(data, role) {
|
|
373
374
|
const unlock = await this.lockController.lock();
|
|
@@ -537,9 +538,9 @@ const Alert = class {
|
|
|
537
538
|
* If neither are defined, do not set aria-labelledby.
|
|
538
539
|
*/
|
|
539
540
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
540
|
-
return (index.h(index.Host, { key: '
|
|
541
|
+
return (index.h(index.Host, { key: 'f8ee04fe6a97a2585b302c8e1a9eea3b122e3479', tabindex: "-1", style: {
|
|
541
542
|
zIndex: `${20000 + overlayIndex}`,
|
|
542
|
-
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, index.h("ion-backdrop", { key: '
|
|
543
|
+
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, index.h("ion-backdrop", { key: 'e9592e879f51c27ef20016beec12c986be632cf3', tappable: this.backdropDismiss }), index.h("div", { key: '5e9425c3c8acdea6f8006389689c73220e2ce423', tabindex: "0", "aria-hidden": "true" }), index.h("div", Object.assign({ key: '615465703e357619681fc36ed7276591a6fe3787', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), index.h("div", { key: '934eba3759456cd4660e10f274edc7859f908461', class: "alert-head" }, header && (index.h("h2", { key: '7d5d98d71f81f59a2cba227121b6fa01e6cc53b6', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (index.h("h2", { key: 'e5f5d35748c58a98ee933eb15cb1dcaf8113e9a7', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (index.h("h3", { key: 'a5cb89ca02bfa9c4828e694cb0835493a9088b05', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), index.h("div", { key: 'cacffc31c911882df73e6845d15c8bb2d4acab56', tabindex: "0", "aria-hidden": "true" })));
|
|
543
544
|
}
|
|
544
545
|
get el() { return index.getElement(this); }
|
|
545
546
|
static get watchers() { return {
|
|
@@ -72,8 +72,6 @@ const App = class {
|
|
|
72
72
|
* a result of another user action. (Ex: We focus the first element
|
|
73
73
|
* inside of a popover when the user presents it, but the popover is not always
|
|
74
74
|
* presented as a result of keyboard action.)
|
|
75
|
-
*
|
|
76
|
-
* @param elements An array of HTML elements to set focus on.
|
|
77
75
|
*/
|
|
78
76
|
async setFocus(elements) {
|
|
79
77
|
if (this.focusVisible) {
|
|
@@ -82,7 +80,7 @@ const App = class {
|
|
|
82
80
|
}
|
|
83
81
|
render() {
|
|
84
82
|
const mode = index.getIonMode(this);
|
|
85
|
-
return (index.h(index.Host, { key: '
|
|
83
|
+
return (index.h(index.Host, { key: '03aa892f986330078d112b1e8b010df98fa7e39e', class: {
|
|
86
84
|
[mode]: true,
|
|
87
85
|
'ion-page': true,
|
|
88
86
|
'force-statusbar-padding': index.config.getBoolean('_forceStatusbarPadding'),
|
|
@@ -994,8 +994,6 @@ const Datetime = class {
|
|
|
994
994
|
* Confirms the selected datetime value, updates the
|
|
995
995
|
* `value` property, and optionally closes the popover
|
|
996
996
|
* or modal that the datetime was presented in.
|
|
997
|
-
*
|
|
998
|
-
* @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
|
|
999
997
|
*/
|
|
1000
998
|
async confirm(closeOverlay = false) {
|
|
1001
999
|
const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
|
|
@@ -1029,8 +1027,6 @@ const Datetime = class {
|
|
|
1029
1027
|
* Resets the internal state of the datetime but does not update the value.
|
|
1030
1028
|
* Passing a valid ISO-8601 string will reset the state of the component to the provided date.
|
|
1031
1029
|
* If no value is provided, the internal state will be reset to the clamped value of the min, max and today.
|
|
1032
|
-
*
|
|
1033
|
-
* @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.
|
|
1034
1030
|
*/
|
|
1035
1031
|
async reset(startDate) {
|
|
1036
1032
|
this.processValue(startDate);
|
|
@@ -1040,8 +1036,6 @@ const Datetime = class {
|
|
|
1040
1036
|
* optionally closes the popover
|
|
1041
1037
|
* or modal that the datetime was
|
|
1042
1038
|
* presented in.
|
|
1043
|
-
*
|
|
1044
|
-
* @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
|
|
1045
1039
|
*/
|
|
1046
1040
|
async cancel(closeOverlay = false) {
|
|
1047
1041
|
this.ionCancel.emit();
|
|
@@ -1855,7 +1849,7 @@ const Datetime = class {
|
|
|
1855
1849
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1856
1850
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1857
1851
|
helpers.renderHiddenInput(true, el, name, data.formatValue(value), disabled);
|
|
1858
|
-
return (index.h(index.Host, { key: '
|
|
1852
|
+
return (index.h(index.Host, { key: '7ea46c27aa5fb01b748dd4d6eb2340ad13f65175', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
|
|
1859
1853
|
[mode]: true,
|
|
1860
1854
|
['datetime-readonly']: readonly,
|
|
1861
1855
|
['datetime-disabled']: disabled,
|
|
@@ -1865,7 +1859,7 @@ const Datetime = class {
|
|
|
1865
1859
|
[`datetime-size-${size}`]: true,
|
|
1866
1860
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1867
1861
|
[`datetime-grid`]: isGridStyle,
|
|
1868
|
-
})) }, index.h("div", { key: '
|
|
1862
|
+
})) }, index.h("div", { key: '6964378424c58b053e23279d08eaedf28dfcc315', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1869
1863
|
}
|
|
1870
1864
|
get el() { return index.getElement(this); }
|
|
1871
1865
|
static get watchers() { return {
|
|
@@ -227,15 +227,16 @@ const Loading = class {
|
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Dismiss the loading overlay after it has been presented.
|
|
230
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
231
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
232
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
233
230
|
*
|
|
234
231
|
* @param data Any data to emit in the dismiss events.
|
|
235
232
|
* @param role The role of the element that is dismissing the loading.
|
|
236
233
|
* This can be useful in a button handler for determining which button was
|
|
237
|
-
* clicked to dismiss the loading.
|
|
238
|
-
*
|
|
234
|
+
* clicked to dismiss the loading.
|
|
235
|
+
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
236
|
+
*
|
|
237
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
238
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
239
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
239
240
|
*/
|
|
240
241
|
async dismiss(data, role) {
|
|
241
242
|
const unlock = await this.lockController.lock();
|
|
@@ -277,9 +278,9 @@ const Loading = class {
|
|
|
277
278
|
* Otherwise, don't set aria-labelledby.
|
|
278
279
|
*/
|
|
279
280
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
280
|
-
return (index.h(index.Host, Object.assign({ key: '
|
|
281
|
+
return (index.h(index.Host, Object.assign({ key: '6369ed244c06c39aa338141bffacf7a861d7da1a', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
281
282
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
282
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: '
|
|
283
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: '1fd5fd8581d59eec321e534f9116f3ec0501010a', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: 'b4028045b0c8fbb9946136d85d939d55120b867c', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: 'b045fb0e61cc28e8163d45be18b431918dc27c80', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (index.h("div", { key: '2cf9df796f987d1251b3599d10a48ed87a1d0eb9', class: "loading-spinner" }, index.h("ion-spinner", { key: '371cd41655402326adcb1e2fe1481009a83243b2', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), index.h("div", { key: '2a5e5e66d22ee4c1cef0c93815ef023d47e7a8eb', tabindex: "0", "aria-hidden": "true" })));
|
|
283
284
|
}
|
|
284
285
|
get el() { return index.getElement(this); }
|
|
285
286
|
static get watchers() { return {
|