@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
|
@@ -16,7 +16,6 @@ import { getIonMode } from "../../global/ionic-global";
|
|
|
16
16
|
import { KEYBOARD_DID_OPEN } from "../../utils/keyboard/keyboard";
|
|
17
17
|
import { iosEnterAnimation } from "./animations/ios.enter";
|
|
18
18
|
import { iosLeaveAnimation } from "./animations/ios.leave";
|
|
19
|
-
import { portraitToLandscapeTransition, landscapeToPortraitTransition } from "./animations/ios.transition";
|
|
20
19
|
import { mdEnterAnimation } from "./animations/md.enter";
|
|
21
20
|
import { mdLeaveAnimation } from "./animations/md.leave";
|
|
22
21
|
import { createSheetGesture } from "./gestures/sheet";
|
|
@@ -185,17 +184,6 @@ export class Modal {
|
|
|
185
184
|
el.dispatchEvent(ev);
|
|
186
185
|
}
|
|
187
186
|
};
|
|
188
|
-
/**
|
|
189
|
-
* When the modal receives focus directly, pass focus to the handle
|
|
190
|
-
* if it exists and is focusable, otherwise let the focus trap handle it.
|
|
191
|
-
*/
|
|
192
|
-
this.onModalFocus = (ev) => {
|
|
193
|
-
const { dragHandleEl, el } = this;
|
|
194
|
-
// Only handle focus if the modal itself was focused (not a child element)
|
|
195
|
-
if (ev.target === el && dragHandleEl && dragHandleEl.tabIndex !== -1) {
|
|
196
|
-
dragHandleEl.focus();
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
187
|
}
|
|
200
188
|
onIsOpenChange(newValue, oldValue) {
|
|
201
189
|
if (newValue === true && oldValue === false) {
|
|
@@ -223,7 +211,6 @@ export class Modal {
|
|
|
223
211
|
}
|
|
224
212
|
disconnectedCallback() {
|
|
225
213
|
this.triggerController.removeClickListener();
|
|
226
|
-
this.cleanupViewTransitionListener();
|
|
227
214
|
}
|
|
228
215
|
componentWillLoad() {
|
|
229
216
|
var _a;
|
|
@@ -434,8 +421,6 @@ export class Modal {
|
|
|
434
421
|
else if (hasCardModal) {
|
|
435
422
|
this.initSwipeToClose();
|
|
436
423
|
}
|
|
437
|
-
// Initialize view transition listener for iOS card modals
|
|
438
|
-
this.initViewTransitionListener();
|
|
439
424
|
unlock();
|
|
440
425
|
}
|
|
441
426
|
initSwipeToClose() {
|
|
@@ -530,13 +515,13 @@ export class Modal {
|
|
|
530
515
|
}
|
|
531
516
|
/**
|
|
532
517
|
* Dismiss the modal overlay after it has been presented.
|
|
518
|
+
*
|
|
519
|
+
* @param data Any data to emit in the dismiss events.
|
|
520
|
+
* @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
|
|
521
|
+
*
|
|
533
522
|
* This is a no-op if the overlay has not been presented yet. If you want
|
|
534
523
|
* to remove an overlay from the DOM that was never presented, use the
|
|
535
524
|
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
536
|
-
*
|
|
537
|
-
* @param data Any data to emit in the dismiss events.
|
|
538
|
-
* @param role The role of the element that is dismissing the modal.
|
|
539
|
-
* For example, `cancel` or `backdrop`.
|
|
540
525
|
*/
|
|
541
526
|
async dismiss(data, role) {
|
|
542
527
|
var _a;
|
|
@@ -589,7 +574,6 @@ export class Modal {
|
|
|
589
574
|
if (this.gesture) {
|
|
590
575
|
this.gesture.destroy();
|
|
591
576
|
}
|
|
592
|
-
this.cleanupViewTransitionListener();
|
|
593
577
|
}
|
|
594
578
|
this.currentBreakpoint = undefined;
|
|
595
579
|
this.animation = undefined;
|
|
@@ -609,10 +593,8 @@ export class Modal {
|
|
|
609
593
|
return eventMethod(this.el, 'ionModalWillDismiss');
|
|
610
594
|
}
|
|
611
595
|
/**
|
|
612
|
-
* Move a sheet style modal to a specific breakpoint.
|
|
613
|
-
*
|
|
614
|
-
* @param breakpoint The breakpoint value to move the sheet modal to.
|
|
615
|
-
* Must be a value defined in your `breakpoints` array.
|
|
596
|
+
* Move a sheet style modal to a specific breakpoint. The breakpoint value must
|
|
597
|
+
* be a value defined in your `breakpoints` array.
|
|
616
598
|
*/
|
|
617
599
|
async setCurrentBreakpoint(breakpoint) {
|
|
618
600
|
if (!this.isSheetModal) {
|
|
@@ -665,105 +647,24 @@ export class Modal {
|
|
|
665
647
|
await this.setCurrentBreakpoint(nextBreakpoint);
|
|
666
648
|
return true;
|
|
667
649
|
}
|
|
668
|
-
initViewTransitionListener() {
|
|
669
|
-
// Only enable for iOS card modals when no custom animations are provided
|
|
670
|
-
if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
|
|
671
|
-
return;
|
|
672
|
-
}
|
|
673
|
-
// Set initial view state
|
|
674
|
-
this.currentViewIsPortrait = window.innerWidth < 768;
|
|
675
|
-
// Create debounced resize handler
|
|
676
|
-
let resizeTimeout;
|
|
677
|
-
this.resizeListener = () => {
|
|
678
|
-
clearTimeout(resizeTimeout);
|
|
679
|
-
resizeTimeout = setTimeout(() => {
|
|
680
|
-
this.handleViewTransition();
|
|
681
|
-
}, 100); // Debounce for 100ms to avoid excessive calls
|
|
682
|
-
};
|
|
683
|
-
window.addEventListener('resize', this.resizeListener);
|
|
684
|
-
}
|
|
685
|
-
handleViewTransition() {
|
|
686
|
-
const isPortrait = window.innerWidth < 768;
|
|
687
|
-
// Only transition if view state actually changed
|
|
688
|
-
if (this.currentViewIsPortrait === isPortrait) {
|
|
689
|
-
return;
|
|
690
|
-
}
|
|
691
|
-
// Cancel any ongoing transition animation
|
|
692
|
-
if (this.viewTransitionAnimation) {
|
|
693
|
-
this.viewTransitionAnimation.destroy();
|
|
694
|
-
this.viewTransitionAnimation = undefined;
|
|
695
|
-
}
|
|
696
|
-
const { presentingElement } = this;
|
|
697
|
-
if (!presentingElement) {
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
// Create transition animation
|
|
701
|
-
let transitionAnimation;
|
|
702
|
-
if (this.currentViewIsPortrait && !isPortrait) {
|
|
703
|
-
// Portrait to landscape transition
|
|
704
|
-
transitionAnimation = portraitToLandscapeTransition(this.el, {
|
|
705
|
-
presentingEl: presentingElement,
|
|
706
|
-
currentBreakpoint: this.currentBreakpoint,
|
|
707
|
-
backdropBreakpoint: this.backdropBreakpoint,
|
|
708
|
-
expandToScroll: this.expandToScroll,
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
else {
|
|
712
|
-
// Landscape to portrait transition
|
|
713
|
-
transitionAnimation = landscapeToPortraitTransition(this.el, {
|
|
714
|
-
presentingEl: presentingElement,
|
|
715
|
-
currentBreakpoint: this.currentBreakpoint,
|
|
716
|
-
backdropBreakpoint: this.backdropBreakpoint,
|
|
717
|
-
expandToScroll: this.expandToScroll,
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
// Update state and play animation
|
|
721
|
-
this.currentViewIsPortrait = isPortrait;
|
|
722
|
-
this.viewTransitionAnimation = transitionAnimation;
|
|
723
|
-
transitionAnimation.play().then(() => {
|
|
724
|
-
this.viewTransitionAnimation = undefined;
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
|
-
cleanupViewTransitionListener() {
|
|
728
|
-
const hasCardView = !!this.resizeListener;
|
|
729
|
-
if (this.resizeListener) {
|
|
730
|
-
window.removeEventListener('resize', this.resizeListener);
|
|
731
|
-
this.resizeListener = undefined;
|
|
732
|
-
}
|
|
733
|
-
if (this.viewTransitionAnimation) {
|
|
734
|
-
this.viewTransitionAnimation.destroy();
|
|
735
|
-
this.viewTransitionAnimation = undefined;
|
|
736
|
-
}
|
|
737
|
-
if (hasCardView) {
|
|
738
|
-
// If we had a card view, let's trigger the view transition
|
|
739
|
-
// one last time to make sure we're in the right state.
|
|
740
|
-
// This will prevent tricky things like resizing the modal causing
|
|
741
|
-
// it to dismiss programatically too quickly and preventing the view transition
|
|
742
|
-
// from being applied.
|
|
743
|
-
this.handleViewTransition();
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
650
|
render() {
|
|
747
651
|
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
|
|
748
652
|
const showHandle = handle !== false && isSheetModal;
|
|
749
653
|
const mode = getIonMode(this);
|
|
750
654
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
751
655
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
752
|
-
|
|
753
|
-
return (h(Host, Object.assign({ key: '857fbf50b5d0b43c1f1a335d740649cedf1d6e2b', "no-router": true,
|
|
754
|
-
// Allow the modal to be navigable when the handle is focusable
|
|
755
|
-
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
656
|
+
return (h(Host, Object.assign({ key: '0bcbdcfcd7d890eb599da3f97f21c317d34f8e0e', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
756
657
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
757
|
-
}, 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
|
|
658
|
+
}, 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',
|
|
758
659
|
/*
|
|
759
660
|
role and aria-modal must be used on the
|
|
760
661
|
same element. They must also be set inside the
|
|
761
662
|
shadow DOM otherwise ion-button will not be highlighted
|
|
762
663
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
763
664
|
*/
|
|
764
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
665
|
+
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",
|
|
765
666
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
766
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle"
|
|
667
|
+
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' }))));
|
|
767
668
|
}
|
|
768
669
|
static get is() { return "ion-modal"; }
|
|
769
670
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1551,7 +1452,7 @@ export class Modal {
|
|
|
1551
1452
|
}, {
|
|
1552
1453
|
"name": "role",
|
|
1553
1454
|
"type": "string | undefined",
|
|
1554
|
-
"docs": "The role of the element that is dismissing the modal
|
|
1455
|
+
"docs": "The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.\n\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method."
|
|
1555
1456
|
}],
|
|
1556
1457
|
"references": {
|
|
1557
1458
|
"Promise": {
|
|
@@ -1566,13 +1467,13 @@ export class Modal {
|
|
|
1566
1467
|
"return": "Promise<boolean>"
|
|
1567
1468
|
},
|
|
1568
1469
|
"docs": {
|
|
1569
|
-
"text": "Dismiss the modal overlay after it has been presented
|
|
1470
|
+
"text": "Dismiss the modal overlay after it has been presented.",
|
|
1570
1471
|
"tags": [{
|
|
1571
1472
|
"name": "param",
|
|
1572
1473
|
"text": "data Any data to emit in the dismiss events."
|
|
1573
1474
|
}, {
|
|
1574
1475
|
"name": "param",
|
|
1575
|
-
"text": "role The role of the element that is dismissing the modal
|
|
1476
|
+
"text": "role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.\n\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method."
|
|
1576
1477
|
}]
|
|
1577
1478
|
}
|
|
1578
1479
|
},
|
|
@@ -1634,7 +1535,7 @@ export class Modal {
|
|
|
1634
1535
|
"parameters": [{
|
|
1635
1536
|
"name": "breakpoint",
|
|
1636
1537
|
"type": "number",
|
|
1637
|
-
"docs": "
|
|
1538
|
+
"docs": ""
|
|
1638
1539
|
}],
|
|
1639
1540
|
"references": {
|
|
1640
1541
|
"Promise": {
|
|
@@ -1645,11 +1546,8 @@ export class Modal {
|
|
|
1645
1546
|
"return": "Promise<void>"
|
|
1646
1547
|
},
|
|
1647
1548
|
"docs": {
|
|
1648
|
-
"text": "Move a sheet style modal to a specific breakpoint.",
|
|
1649
|
-
"tags": [
|
|
1650
|
-
"name": "param",
|
|
1651
|
-
"text": "breakpoint The breakpoint value to move the sheet modal to.\nMust be a value defined in your `breakpoints` array."
|
|
1652
|
-
}]
|
|
1549
|
+
"text": "Move a sheet style modal to a specific breakpoint. The breakpoint value must\nbe a value defined in your `breakpoints` array.",
|
|
1550
|
+
"tags": []
|
|
1653
1551
|
}
|
|
1654
1552
|
},
|
|
1655
1553
|
"getCurrentBreakpoint": {
|
|
@@ -309,8 +309,6 @@ export class Popover {
|
|
|
309
309
|
* Developers can pass a mouse, touch, or pointer event
|
|
310
310
|
* to position the popover relative to where that event
|
|
311
311
|
* was dispatched.
|
|
312
|
-
*
|
|
313
|
-
* @param event The event to position the popover relative to.
|
|
314
312
|
*/
|
|
315
313
|
async present(event) {
|
|
316
314
|
const unlock = await this.lockController.lock();
|
|
@@ -374,14 +372,15 @@ export class Popover {
|
|
|
374
372
|
}
|
|
375
373
|
/**
|
|
376
374
|
* Dismiss the popover overlay after it has been presented.
|
|
377
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
378
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
379
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
380
375
|
*
|
|
381
376
|
* @param data Any data to emit in the dismiss events.
|
|
382
|
-
* @param role The role of the element that is dismissing the popover. For example,
|
|
377
|
+
* @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
|
|
383
378
|
* @param dismissParentPopover If `true`, dismissing this popover will also dismiss
|
|
384
379
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
380
|
+
*
|
|
381
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
382
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
383
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
385
384
|
*/
|
|
386
385
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
387
386
|
const unlock = await this.lockController.lock();
|
|
@@ -433,9 +432,9 @@ export class Popover {
|
|
|
433
432
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
434
433
|
const desktop = isPlatform('desktop');
|
|
435
434
|
const enableArrow = arrow && !parentPopover;
|
|
436
|
-
return (h(Host, Object.assign({ key: '
|
|
435
|
+
return (h(Host, Object.assign({ key: '1de4862099cfcb5035e78008e6dc7c1371846f9a', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
437
436
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
438
|
-
}, 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: '
|
|
437
|
+
}, 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' })))));
|
|
439
438
|
}
|
|
440
439
|
static get is() { return "ion-popover"; }
|
|
441
440
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1260,7 +1259,7 @@ export class Popover {
|
|
|
1260
1259
|
"parameters": [{
|
|
1261
1260
|
"name": "event",
|
|
1262
1261
|
"type": "MouseEvent | PointerEvent | TouchEvent | CustomEvent<any> | undefined",
|
|
1263
|
-
"docs": "
|
|
1262
|
+
"docs": ""
|
|
1264
1263
|
}],
|
|
1265
1264
|
"references": {
|
|
1266
1265
|
"Promise": {
|
|
@@ -1292,10 +1291,7 @@ export class Popover {
|
|
|
1292
1291
|
},
|
|
1293
1292
|
"docs": {
|
|
1294
1293
|
"text": "Present the popover overlay after it has been created.\nDevelopers can pass a mouse, touch, or pointer event\nto position the popover relative to where that event\nwas dispatched.",
|
|
1295
|
-
"tags": [
|
|
1296
|
-
"name": "param",
|
|
1297
|
-
"text": "event The event to position the popover relative to."
|
|
1298
|
-
}]
|
|
1294
|
+
"tags": []
|
|
1299
1295
|
}
|
|
1300
1296
|
},
|
|
1301
1297
|
"dismiss": {
|
|
@@ -1308,11 +1304,11 @@ export class Popover {
|
|
|
1308
1304
|
}, {
|
|
1309
1305
|
"name": "role",
|
|
1310
1306
|
"type": "string | undefined",
|
|
1311
|
-
"docs": "The role of the element that is dismissing the popover. For example,
|
|
1307
|
+
"docs": "The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'."
|
|
1312
1308
|
}, {
|
|
1313
1309
|
"name": "dismissParentPopover",
|
|
1314
1310
|
"type": "boolean",
|
|
1315
|
-
"docs": "If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true
|
|
1311
|
+
"docs": "If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true`.\n\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method."
|
|
1316
1312
|
}],
|
|
1317
1313
|
"references": {
|
|
1318
1314
|
"Promise": {
|
|
@@ -1327,16 +1323,16 @@ export class Popover {
|
|
|
1327
1323
|
"return": "Promise<boolean>"
|
|
1328
1324
|
},
|
|
1329
1325
|
"docs": {
|
|
1330
|
-
"text": "Dismiss the popover overlay after it has been presented
|
|
1326
|
+
"text": "Dismiss the popover overlay after it has been presented.",
|
|
1331
1327
|
"tags": [{
|
|
1332
1328
|
"name": "param",
|
|
1333
1329
|
"text": "data Any data to emit in the dismiss events."
|
|
1334
1330
|
}, {
|
|
1335
1331
|
"name": "param",
|
|
1336
|
-
"text": "role The role of the element that is dismissing the popover. For example,
|
|
1332
|
+
"text": "role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'."
|
|
1337
1333
|
}, {
|
|
1338
1334
|
"name": "param",
|
|
1339
|
-
"text": "dismissParentPopover If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true
|
|
1335
|
+
"text": "dismissParentPopover If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true`.\n\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method."
|
|
1340
1336
|
}]
|
|
1341
1337
|
}
|
|
1342
1338
|
},
|
|
@@ -54,6 +54,7 @@ export class ReorderGroup {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Completes the reorder operation. Must be called by the `ionItemReorder` event.
|
|
57
|
+
*
|
|
57
58
|
* If a list of items is passed, the list will be reordered and returned in the
|
|
58
59
|
* proper order.
|
|
59
60
|
*
|
|
@@ -240,7 +241,7 @@ export class ReorderGroup {
|
|
|
240
241
|
}
|
|
241
242
|
render() {
|
|
242
243
|
const mode = getIonMode(this);
|
|
243
|
-
return (h(Host, { key: '
|
|
244
|
+
return (h(Host, { key: 'f30613b361c5c3095b7928a92fb4b1e8d6eff600', class: {
|
|
244
245
|
[mode]: true,
|
|
245
246
|
'reorder-enabled': !this.disabled,
|
|
246
247
|
'reorder-list-active': this.state !== 0 /* ReorderGroupState.Idle */,
|
|
@@ -329,7 +330,7 @@ export class ReorderGroup {
|
|
|
329
330
|
"return": "Promise<any>"
|
|
330
331
|
},
|
|
331
332
|
"docs": {
|
|
332
|
-
"text": "Completes the reorder operation. Must be called by the `ionItemReorder` event.\nIf a list of items is passed, the list will be reordered and returned in the\nproper order.\n\nIf no parameters are passed or if `true` is passed in, the reorder will complete\nand the item will remain in the position it was dragged to. If `false` is passed,\nthe reorder will complete and the item will bounce back to its original position.",
|
|
333
|
+
"text": "Completes the reorder operation. Must be called by the `ionItemReorder` event.\n\nIf a list of items is passed, the list will be reordered and returned in the\nproper order.\n\nIf no parameters are passed or if `true` is passed in, the reorder will complete\nand the item will remain in the position it was dragged to. If `false` is passed,\nthe reorder will complete and the item will bounce back to its original position.",
|
|
333
334
|
"tags": [{
|
|
334
335
|
"name": "param",
|
|
335
336
|
"text": "listOrReorder A list of items to be sorted and returned in the new order or a\nboolean of whether or not the reorder should reposition the item."
|
|
@@ -90,7 +90,6 @@ export class Router {
|
|
|
90
90
|
*
|
|
91
91
|
* @param path The path to navigate to.
|
|
92
92
|
* @param direction The direction of the animation. Defaults to `"forward"`.
|
|
93
|
-
* @param animation A custom animation to use for the transition.
|
|
94
93
|
*/
|
|
95
94
|
async push(path, direction = 'forward', animation) {
|
|
96
95
|
var _a;
|
|
@@ -412,7 +411,7 @@ export class Router {
|
|
|
412
411
|
}, {
|
|
413
412
|
"name": "animation",
|
|
414
413
|
"type": "AnimationBuilder | undefined",
|
|
415
|
-
"docs": "
|
|
414
|
+
"docs": ""
|
|
416
415
|
}],
|
|
417
416
|
"references": {
|
|
418
417
|
"Promise": {
|
|
@@ -440,9 +439,6 @@ export class Router {
|
|
|
440
439
|
}, {
|
|
441
440
|
"name": "param",
|
|
442
441
|
"text": "direction The direction of the animation. Defaults to `\"forward\"`."
|
|
443
|
-
}, {
|
|
444
|
-
"name": "param",
|
|
445
|
-
"text": "animation A custom animation to use for the transition."
|
|
446
442
|
}]
|
|
447
443
|
}
|
|
448
444
|
},
|
|
@@ -247,8 +247,10 @@ export class Searchbar {
|
|
|
247
247
|
/**
|
|
248
248
|
* Sets focus on the native `input` in `ion-searchbar`. Use this method instead of the global
|
|
249
249
|
* `input.focus()`.
|
|
250
|
+
*
|
|
250
251
|
* Developers who wish to focus an input when a page enters
|
|
251
252
|
* should call `setFocus()` in the `ionViewDidEnter()` lifecycle method.
|
|
253
|
+
*
|
|
252
254
|
* Developers who wish to focus an input when an overlay is presented
|
|
253
255
|
* should call `setFocus` after `didPresent` has resolved.
|
|
254
256
|
*
|
|
@@ -427,8 +429,8 @@ export class Searchbar {
|
|
|
427
429
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
428
430
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
429
431
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
430
|
-
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '
|
|
431
|
-
return (h(Host, { key: '
|
|
432
|
+
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '5835c36fcb0b52aec956538202a783f6c194d853', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, h("div", { key: '85df41676bed611467bd4df0002b08baee4f539c', "aria-hidden": "true" }, mode === 'md' ? (h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
433
|
+
return (h(Host, { key: 'e1e30cdd79f9f54d5f2d27501012358bc46880e5', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
|
432
434
|
[mode]: true,
|
|
433
435
|
'searchbar-animated': animated,
|
|
434
436
|
'searchbar-disabled': this.disabled,
|
|
@@ -438,14 +440,14 @@ export class Searchbar {
|
|
|
438
440
|
'searchbar-has-focus': this.focused,
|
|
439
441
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
440
442
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
441
|
-
}) }, h("div", { key: '
|
|
443
|
+
}) }, h("div", { key: '7e9db147282a35bb1e3c9c6125b9a044e81ddde5', class: "searchbar-input-container" }, h("input", Object.assign({ key: '02f08da21326b78d6cd249d54deab96fd8472ba8', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, h("ion-icon", { key: '048b00348456bd827ae734491c46a67bfb146227', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), h("button", { key: '71f64339bbfd54ebd26a0946c8ee9d726cd89c04', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
442
444
|
/**
|
|
443
445
|
* This prevents mobile browsers from
|
|
444
446
|
* blurring the input when the clear
|
|
445
447
|
* button is activated.
|
|
446
448
|
*/
|
|
447
449
|
ev.preventDefault();
|
|
448
|
-
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '
|
|
450
|
+
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '9b1a177b21951c1c95897a468b34bb7bbd63d137', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
449
451
|
}
|
|
450
452
|
static get is() { return "ion-searchbar"; }
|
|
451
453
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1059,7 +1061,7 @@ export class Searchbar {
|
|
|
1059
1061
|
"return": "Promise<void>"
|
|
1060
1062
|
},
|
|
1061
1063
|
"docs": {
|
|
1062
|
-
"text": "Sets focus on the native `input` in `ion-searchbar`. Use this method instead of the global\n`input.focus()`.\nDevelopers who wish to focus an input when a page enters\nshould call `setFocus()` in the `ionViewDidEnter()` lifecycle method.\nDevelopers who wish to focus an input when an overlay is presented\nshould call `setFocus` after `didPresent` has resolved.\n\nSee [managing focus](/docs/developing/managing-focus) for more information.",
|
|
1064
|
+
"text": "Sets focus on the native `input` in `ion-searchbar`. Use this method instead of the global\n`input.focus()`.\n\nDevelopers who wish to focus an input when a page enters\nshould call `setFocus()` in the `ionViewDidEnter()` lifecycle method.\n\nDevelopers who wish to focus an input when an overlay is presented\nshould call `setFocus` after `didPresent` has resolved.\n\nSee [managing focus](/docs/developing/managing-focus) for more information.",
|
|
1063
1065
|
"tags": []
|
|
1064
1066
|
}
|
|
1065
1067
|
},
|
|
@@ -239,15 +239,16 @@ export class Toast {
|
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
241
241
|
* Dismiss the toast overlay after it has been presented.
|
|
242
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
243
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
244
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
245
242
|
*
|
|
246
243
|
* @param data Any data to emit in the dismiss events.
|
|
247
244
|
* @param role The role of the element that is dismissing the toast.
|
|
248
245
|
* This can be useful in a button handler for determining which button was
|
|
249
246
|
* clicked to dismiss the toast.
|
|
250
|
-
* Some examples include:
|
|
247
|
+
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
248
|
+
*
|
|
249
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
250
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
251
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
251
252
|
*/
|
|
252
253
|
async dismiss(data, role) {
|
|
253
254
|
var _a, _b;
|
|
@@ -415,9 +416,9 @@ export class Toast {
|
|
|
415
416
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
416
417
|
printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
417
418
|
}
|
|
418
|
-
return (h(Host, Object.assign({ key: '
|
|
419
|
+
return (h(Host, Object.assign({ key: '425be734aee0eeef281ab1609a9f982ce8b5e852', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
419
420
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
420
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
421
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '7c3ad1a8df9e21fc30fc179c7edebeabcf3c6874', class: wrapperClass }, h("div", { key: 'f950c21e8d7bf92653e0bd52e820ed6b84fa8cf5', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '0266241927dbe16799adb57f9fc11bd5372877b2', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '9ef4b87bad672af6a5b693af61375564daf1eeeb', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
421
422
|
}
|
|
422
423
|
static get is() { return "ion-toast"; }
|
|
423
424
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1112,7 +1113,7 @@ export class Toast {
|
|
|
1112
1113
|
}, {
|
|
1113
1114
|
"name": "role",
|
|
1114
1115
|
"type": "string | undefined",
|
|
1115
|
-
"docs": "The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include:
|
|
1116
|
+
"docs": "The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method."
|
|
1116
1117
|
}],
|
|
1117
1118
|
"references": {
|
|
1118
1119
|
"Promise": {
|
|
@@ -1128,13 +1129,13 @@ export class Toast {
|
|
|
1128
1129
|
"return": "Promise<boolean>"
|
|
1129
1130
|
},
|
|
1130
1131
|
"docs": {
|
|
1131
|
-
"text": "Dismiss the toast overlay after it has been presented
|
|
1132
|
+
"text": "Dismiss the toast overlay after it has been presented.",
|
|
1132
1133
|
"tags": [{
|
|
1133
1134
|
"name": "param",
|
|
1134
1135
|
"text": "data Any data to emit in the dismiss events."
|
|
1135
1136
|
}, {
|
|
1136
1137
|
"name": "param",
|
|
1137
|
-
"text": "role The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include:
|
|
1138
|
+
"text": "role The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method."
|
|
1138
1139
|
}]
|
|
1139
1140
|
}
|
|
1140
1141
|
},
|