@ionic/core 8.8.4-dev.11776184632.103b8351 → 8.8.4-dev.11776246162.138c2737
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/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-picker-legacy.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-B36-MWK0.js +4 -0
- package/components/p-BDPU2685.js +4 -0
- package/components/p-BrNzoF1U.js +4 -0
- package/components/{p-B0orUoaV.js → p-C-_EGKki.js} +1 -1
- package/components/{p-qhBzWoOF.js → p-C2cZvGcF.js} +1 -1
- package/components/p-CEUppJkx.js +4 -0
- package/components/p-CSexRbnt.js +4 -0
- package/components/{p-ZRp3l6Dk.js → p-CoarhFWH.js} +1 -1
- package/components/p-DNdBtsfu.js +4 -0
- package/components/p-Njik5v4C.js +4 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +34 -18
- package/dist/cjs/ion-alert.cjs.entry.js +35 -32
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +28 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +29 -4
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +176 -79
- package/dist/cjs/ion-popover.cjs.entry.js +90 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +27 -46
- package/dist/cjs/ion-select_3.cjs.entry.js +48 -177
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +3 -3
- package/dist/cjs/ion-toast.cjs.entry.js +32 -4
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-Dhoy6v_5.js → overlays-BbhewSIQ.js} +4 -4
- package/dist/collection/components/action-sheet/action-sheet.ios.css +0 -84
- package/dist/collection/components/action-sheet/action-sheet.js +8 -15
- package/dist/collection/components/action-sheet/action-sheet.md.css +0 -84
- package/dist/collection/components/action-sheet/animations/ionic.enter.js +27 -0
- package/dist/collection/components/action-sheet/animations/ionic.leave.js +21 -0
- package/dist/collection/components/alert/alert.ios.css +0 -83
- package/dist/collection/components/alert/alert.js +8 -29
- package/dist/collection/components/alert/alert.md.css +0 -83
- package/dist/collection/components/alert/animations/ionic.enter.js +28 -0
- package/dist/collection/components/alert/animations/ionic.leave.js +19 -0
- package/dist/collection/components/loading/animations/ionic.enter.js +28 -0
- package/dist/collection/components/loading/animations/ionic.leave.js +22 -0
- package/dist/collection/components/loading/loading.js +4 -3
- package/dist/collection/components/modal/animations/ionic.enter.js +40 -0
- package/dist/collection/components/modal/animations/ionic.leave.js +28 -0
- package/dist/collection/components/modal/gestures/sheet.js +71 -9
- package/dist/collection/components/modal/modal.ionic.css +1 -1
- package/dist/collection/components/modal/modal.js +6 -5
- package/dist/collection/components/picker-legacy/animations/ionic.enter.js +27 -0
- package/dist/collection/components/picker-legacy/animations/ionic.leave.js +23 -0
- package/dist/collection/components/picker-legacy/picker.js +4 -3
- package/dist/collection/components/popover/animations/ionic.enter.js +91 -0
- package/dist/collection/components/popover/animations/ionic.leave.js +29 -0
- package/dist/collection/components/popover/popover.js +4 -3
- package/dist/collection/components/select/select.ionic.css +0 -31
- package/dist/collection/components/select/select.ios.css +0 -31
- package/dist/collection/components/select/select.js +14 -125
- package/dist/collection/components/select/select.md.css +0 -31
- package/dist/collection/components/select-modal/select-modal.ionic.css +0 -24
- package/dist/collection/components/select-modal/select-modal.ios.css +0 -77
- package/dist/collection/components/select-modal/select-modal.js +23 -42
- package/dist/collection/components/select-modal/select-modal.md.css +1 -80
- package/dist/collection/components/select-option/select-option.js +2 -21
- package/dist/collection/components/select-popover/select-popover.ios.css +0 -77
- package/dist/collection/components/select-popover/select-popover.js +26 -45
- package/dist/collection/components/select-popover/select-popover.md.css +0 -77
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/animations/ionic.enter.js +33 -0
- package/dist/collection/components/toast/animations/ionic.leave.js +16 -0
- package/dist/collection/components/toast/toast.js +4 -3
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/overlays.js +5 -5
- package/dist/docs.json +5 -139
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +34 -18
- package/dist/esm/ion-alert.entry.js +35 -32
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +28 -4
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +29 -4
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +177 -80
- package/dist/esm/ion-popover.entry.js +90 -4
- package/dist/esm/ion-select-modal.entry.js +27 -46
- package/dist/esm/ion-select_3.entry.js +49 -178
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +3 -3
- package/dist/esm/ion-toast.entry.js +32 -4
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-CvFHfO3y.js → overlays-VA-4NWjf.js} +5 -5
- package/dist/html.html-data.json +0 -4
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-07b129d5.entry.js +4 -0
- package/dist/ionic/p-0cb50208.entry.js +4 -0
- package/dist/ionic/{p-db4f4eaf.entry.js → p-1efe83c8.entry.js} +1 -1
- package/dist/ionic/{p-d2fe6791.entry.js → p-2193e875.entry.js} +1 -1
- package/dist/ionic/{p-69033ad6.entry.js → p-2bf931ae.entry.js} +1 -1
- package/dist/ionic/{p-26595044.entry.js → p-3bf01c2c.entry.js} +1 -1
- package/dist/ionic/p-3d4c8528.entry.js +4 -0
- package/dist/ionic/{p-9e71982e.entry.js → p-49799a34.entry.js} +1 -1
- package/dist/ionic/p-64341e32.entry.js +4 -0
- package/dist/ionic/p-6992d9d6.entry.js +4 -0
- package/dist/ionic/{p-aa8c1e64.entry.js → p-6c8c37c2.entry.js} +1 -1
- package/dist/ionic/{p-a94016be.entry.js → p-91e242e4.entry.js} +1 -1
- package/dist/ionic/{p-96ec9a10.entry.js → p-9b9b1450.entry.js} +1 -1
- package/dist/ionic/p-9dd4276b.entry.js +4 -0
- package/dist/ionic/p-BExfzy0B.js +4 -0
- package/dist/ionic/p-a3d794ba.entry.js +4 -0
- package/dist/ionic/p-ba9f8cbb.entry.js +4 -0
- package/dist/ionic/{p-2095969c.entry.js → p-bae3ebe5.entry.js} +1 -1
- package/dist/ionic/{p-a1c8ba8c.entry.js → p-bc5713f7.entry.js} +1 -1
- package/dist/ionic/{p-71f28573.entry.js → p-cdfbe4cc.entry.js} +1 -1
- package/dist/ionic/p-fa701753.entry.js +4 -0
- package/dist/types/components/action-sheet/action-sheet-interface.d.ts +1 -4
- package/dist/types/components/action-sheet/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/action-sheet/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/alert/alert-interface.d.ts +1 -4
- package/dist/types/components/alert/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/alert/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/loading/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/loading/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/modal/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/modal/animations/ionic.leave.d.ts +6 -0
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/picker-legacy/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/picker-legacy/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/popover/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/popover/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/select/select.d.ts +0 -7
- package/dist/types/components/select-modal/select-modal-interface.d.ts +1 -4
- package/dist/types/components/select-option/select-option.d.ts +0 -4
- package/dist/types/components/select-popover/select-popover-interface.d.ts +1 -4
- package/dist/types/components/toast/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/toast/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components.d.ts +0 -9
- package/dist/types/utils/overlays.d.ts +1 -1
- package/hydrate/index.js +518 -442
- package/hydrate/index.mjs +518 -442
- package/package.json +1 -1
- package/components/p-B6czg-mf.js +0 -4
- package/components/p-BDwab5EM.js +0 -4
- package/components/p-BjV_nNDy.js +0 -4
- package/components/p-C8Dne7pI.js +0 -4
- package/components/p-C9d4LXRu.js +0 -4
- package/components/p-CvoKp7OI.js +0 -4
- package/components/p-GytrfCp8.js +0 -4
- package/components/p-ZeIAjDcZ.js +0 -4
- package/dist/cjs/select-option-render-qQf4xz8P.js +0 -67
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +0 -834
- package/dist/collection/components/alert/alert.ionic.css +0 -1165
- package/dist/collection/components/select-popover/select-popover.ionic.css +0 -489
- package/dist/collection/utils/select-option-render.js +0 -62
- package/dist/esm/select-option-render-BQUT9Aqa.js +0 -65
- package/dist/ionic/p-37f895a8.entry.js +0 -4
- package/dist/ionic/p-3884bfa4.entry.js +0 -4
- package/dist/ionic/p-38897781.entry.js +0 -4
- package/dist/ionic/p-63e09af5.entry.js +0 -4
- package/dist/ionic/p-6bffc700.entry.js +0 -4
- package/dist/ionic/p-6e0ce081.entry.js +0 -4
- package/dist/ionic/p-BYtS2rae.js +0 -4
- package/dist/ionic/p-Dr3N4o63.js +0 -4
- package/dist/ionic/p-a64ae62e.entry.js +0 -4
- package/dist/ionic/p-d45b911b.entry.js +0 -4
- package/dist/ionic/p-ef0c281a.entry.js +0 -4
- package/dist/types/utils/select-option-render.d.ts +0 -26
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-CzcLEdQ5.js');
|
|
7
|
-
var overlays = require('./overlays-
|
|
7
|
+
var overlays = require('./overlays-BbhewSIQ.js');
|
|
8
8
|
var frameworkDelegate = require('./framework-delegate-Dx9FrqAC.js');
|
|
9
9
|
var helpers = require('./helpers-DJYxKN5U.js');
|
|
10
10
|
var lockController = require('./lock-controller-aDB9wrEf.js');
|
|
@@ -832,6 +832,92 @@ const shouldShowArrow = (side, didAdjustBounds = false, ev, trigger) => {
|
|
|
832
832
|
return true;
|
|
833
833
|
};
|
|
834
834
|
|
|
835
|
+
const POPOVER_MD_BODY_PADDING$1 = 12;
|
|
836
|
+
/**
|
|
837
|
+
* Ionic Popover Enter Animation
|
|
838
|
+
*/
|
|
839
|
+
// TODO(FW-2832): types
|
|
840
|
+
const ionicEnterAnimation = (baseEl, opts) => {
|
|
841
|
+
var _a;
|
|
842
|
+
const { event: ev, size, trigger, reference, side, align } = opts;
|
|
843
|
+
const doc = baseEl.ownerDocument;
|
|
844
|
+
const isRTL = doc.dir === 'rtl';
|
|
845
|
+
const bodyWidth = doc.defaultView.innerWidth;
|
|
846
|
+
const bodyHeight = doc.defaultView.innerHeight;
|
|
847
|
+
const root = helpers.getElementRoot(baseEl);
|
|
848
|
+
const contentEl = root.querySelector('.popover-content');
|
|
849
|
+
const referenceSizeEl = trigger || ((_a = ev === null || ev === void 0 ? void 0 : ev.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) || (ev === null || ev === void 0 ? void 0 : ev.target);
|
|
850
|
+
const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
|
|
851
|
+
const defaultPosition = {
|
|
852
|
+
top: bodyHeight / 2 - contentHeight / 2,
|
|
853
|
+
left: bodyWidth / 2 - contentWidth / 2,
|
|
854
|
+
originX: isRTL ? 'right' : 'left',
|
|
855
|
+
originY: 'top',
|
|
856
|
+
};
|
|
857
|
+
const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
|
|
858
|
+
const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING$1;
|
|
859
|
+
// MD mode now applies safe-area insets (previously passed 0, ignoring all safe areas).
|
|
860
|
+
// This is needed for Android edge-to-edge (API 36+) where system bars overlap content.
|
|
861
|
+
const safeArea = size === 'cover' ? { top: 0, bottom: 0, left: 0, right: 0 } : getSafeAreaInsets(doc);
|
|
862
|
+
const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, checkSafeAreaTop, checkSafeAreaBottom, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeArea, results.originX, results.originY, results.referenceCoordinates);
|
|
863
|
+
const safeAreaLeftCalc = ' + var(--ion-safe-area-left, 0px)';
|
|
864
|
+
const safeAreaRightCalc = ' - var(--ion-safe-area-right, 0px)';
|
|
865
|
+
let leftValue = `${left}px`;
|
|
866
|
+
if (checkSafeAreaLeft) {
|
|
867
|
+
leftValue = `${left}px${safeAreaLeftCalc}`;
|
|
868
|
+
}
|
|
869
|
+
if (checkSafeAreaRight) {
|
|
870
|
+
leftValue = `${left}px${safeAreaRightCalc}`;
|
|
871
|
+
}
|
|
872
|
+
let topValue = `${top}px`;
|
|
873
|
+
if (checkSafeAreaTop) {
|
|
874
|
+
topValue = `${top}px + var(--ion-safe-area-top, 0px)`;
|
|
875
|
+
}
|
|
876
|
+
const baseAnimation = animation.createAnimation();
|
|
877
|
+
const backdropAnimation = animation.createAnimation();
|
|
878
|
+
const wrapperAnimation = animation.createAnimation();
|
|
879
|
+
const contentAnimation = animation.createAnimation();
|
|
880
|
+
const viewportAnimation = animation.createAnimation();
|
|
881
|
+
backdropAnimation
|
|
882
|
+
.addElement(root.querySelector('ion-backdrop'))
|
|
883
|
+
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
884
|
+
.beforeStyles({
|
|
885
|
+
'pointer-events': 'none',
|
|
886
|
+
})
|
|
887
|
+
.afterClearStyles(['pointer-events']);
|
|
888
|
+
wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).duration(150).fromTo('opacity', 0.01, 1);
|
|
889
|
+
contentAnimation
|
|
890
|
+
.addElement(contentEl)
|
|
891
|
+
.beforeStyles({
|
|
892
|
+
top: `calc(${topValue} + var(--offset-y, 0px))`,
|
|
893
|
+
left: `calc(${leftValue} + var(--offset-x, 0px))`,
|
|
894
|
+
'transform-origin': `${originY} ${originX}`,
|
|
895
|
+
})
|
|
896
|
+
.beforeAddWrite(() => {
|
|
897
|
+
if (bottom !== undefined) {
|
|
898
|
+
let bottomValue = `${bottom}px`;
|
|
899
|
+
if (checkSafeAreaBottom) {
|
|
900
|
+
bottomValue = `${bottom}px + var(--ion-safe-area-bottom, 0px)`;
|
|
901
|
+
}
|
|
902
|
+
contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
|
|
903
|
+
}
|
|
904
|
+
})
|
|
905
|
+
.fromTo('transform', 'scale(0.8)', 'scale(1)');
|
|
906
|
+
viewportAnimation.addElement(root.querySelector('.popover-viewport')).fromTo('opacity', 0.01, 1);
|
|
907
|
+
return baseAnimation
|
|
908
|
+
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
|
909
|
+
.duration(300)
|
|
910
|
+
.beforeAddWrite(() => {
|
|
911
|
+
if (size === 'cover') {
|
|
912
|
+
baseEl.style.setProperty('--width', `${contentWidth}px`);
|
|
913
|
+
}
|
|
914
|
+
if (addPopoverBottomClass) {
|
|
915
|
+
baseEl.classList.add('popover-bottom');
|
|
916
|
+
}
|
|
917
|
+
})
|
|
918
|
+
.addAnimation([backdropAnimation, wrapperAnimation, contentAnimation, viewportAnimation]);
|
|
919
|
+
};
|
|
920
|
+
|
|
835
921
|
const POPOVER_IOS_BODY_PADDING = 5;
|
|
836
922
|
/**
|
|
837
923
|
* Minimum edge margin for iOS popovers ensures visual spacing from screen
|
|
@@ -1436,7 +1522,7 @@ const Popover = class {
|
|
|
1436
1522
|
else if (!this.keepContentsMounted) {
|
|
1437
1523
|
await index$1.waitForMount();
|
|
1438
1524
|
}
|
|
1439
|
-
await overlays.present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1525
|
+
await overlays.present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation, {
|
|
1440
1526
|
event: event || this.event,
|
|
1441
1527
|
size: this.size,
|
|
1442
1528
|
trigger: this.triggerEl,
|
|
@@ -1545,9 +1631,9 @@ const Popover = class {
|
|
|
1545
1631
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
1546
1632
|
const desktop = ionicGlobal.isPlatform('desktop');
|
|
1547
1633
|
const enableArrow = arrow && !parentPopover;
|
|
1548
|
-
return (index.h(index.Host, Object.assign({ key: '
|
|
1634
|
+
return (index.h(index.Host, Object.assign({ key: '398b4c72cfea89fb743d427e3c2b48507649aff1', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1549
1635
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1550
|
-
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [theme$1]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { key: '
|
|
1636
|
+
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [theme$1]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { key: '6baec0b33665557c55425ffad9c6b31741c25651', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index.h("div", { key: '6ce3a61164f478560cc45c618fc5b7f62b491ecd', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index.h("div", { key: 'a36815fc0417a10fb350429909a79cb4025baf3a', class: "popover-arrow", part: "arrow" }), index.h("div", { key: 'cec3436cdb2cb6fa839c37abb3cb6daf7de453de', class: "popover-content", part: "content" }, index.h("slot", { key: '5405fb03bab017acd7fa09d00cfe1b7cfbdfae92' })))));
|
|
1551
1637
|
}
|
|
1552
1638
|
get el() { return index.getElement(this); }
|
|
1553
1639
|
static get watchers() { return {
|
|
@@ -5,19 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
var index = require('./index-CzcLEdQ5.js');
|
|
7
7
|
var ionicGlobal = require('./ionic-global-CSEbHD_F.js');
|
|
8
|
-
var overlays = require('./overlays-
|
|
9
|
-
var selectOptionRender = require('./select-option-render-qQf4xz8P.js');
|
|
8
|
+
var overlays = require('./overlays-BbhewSIQ.js');
|
|
10
9
|
var theme = require('./theme-IlOsGAz7.js');
|
|
11
10
|
require('./helpers-DJYxKN5U.js');
|
|
12
11
|
require('./focus-visible-BIj-I3-C.js');
|
|
13
12
|
require('./framework-delegate-Dx9FrqAC.js');
|
|
14
13
|
require('./gesture-controller-dtqlP_q4.js');
|
|
15
14
|
|
|
16
|
-
const selectModalIonicCss = () => `.sc-ion-select-modal-ionic-h{height:100%}.
|
|
15
|
+
const selectModalIonicCss = () => `.sc-ion-select-modal-ionic-h{height:100%}.in-modal-default.sc-ion-select-modal-ionic-h ion-content.sc-ion-select-modal-ionic::part(scroll),.in-modal-default.sc-ion-select-modal-ionic-h ion-content.sc-ion-select-modal-ionic [part~="scroll"]{--padding-bottom:var(--token-space-400, var(--token-scale-400, 16px))}ion-item.sc-ion-select-modal-ionic{--border-width:0}ion-item.ion-focused.sc-ion-select-modal-ionic::part(native)::after,ion-item.ion-focused.sc-ion-select-modal-ionic [part~="native"]::after{border:none}ion-toolbar.sc-ion-select-modal-ionic{font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-700, var(--token-scale-700, 28px));text-decoration:none;text-transform:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"],ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic [part~="label"]{font-size:var(--token-font-size-400, 1rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-600, var(--token-scale-600, 24px));text-decoration:none;text-transform:none}.item-radio-checked.sc-ion-select-modal-ionic,.item-checkbox-checked.sc-ion-select-modal-ionic{--background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #e9ecfc));--border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}ion-content.sc-ion-select-modal-ionic{--padding-start:var(--token-space-400, var(--token-scale-400, 16px)) !important;--padding-end:var(--token-space-400, var(--token-scale-400, 16px)) !important;--padding-bottom:var(--token-space-1200, var(--token-scale-1200, 48px)) !important}ion-content.sc-ion-select-modal-ionic:has(.radio-checked) .ion-focused.sc-ion-select-modal-ionic:not(.item-radio-checked){--background-focused-opacity:1}`;
|
|
17
16
|
|
|
18
|
-
const selectModalIosCss = () => `.sc-ion-select-modal-ios-h{height:100%}
|
|
17
|
+
const selectModalIosCss = () => `.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}`;
|
|
19
18
|
|
|
20
|
-
const selectModalMdCss = () => `.sc-ion-select-modal-md-h{height:100%}
|
|
19
|
+
const selectModalMdCss = () => `.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}`;
|
|
21
20
|
|
|
22
21
|
const SelectModal = class {
|
|
23
22
|
constructor(hostRef) {
|
|
@@ -75,51 +74,33 @@ const SelectModal = class {
|
|
|
75
74
|
}
|
|
76
75
|
renderRadioOptions() {
|
|
77
76
|
const checked = this.options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
78
|
-
return (index.h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Selecting a radio option with keyboard navigation,
|
|
93
|
-
* either through the Enter or Space keys, should
|
|
94
|
-
* dismiss the modal.
|
|
95
|
-
*/
|
|
96
|
-
this.closeModal();
|
|
97
|
-
}
|
|
98
|
-
} }, selectOptionRender.renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
99
|
-
})));
|
|
77
|
+
return (index.h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option) => (index.h("ion-item", { lines: "none", class: Object.assign({
|
|
78
|
+
// TODO FW-4784
|
|
79
|
+
'item-radio-checked': option.value === checked
|
|
80
|
+
}, theme.getClassMap(option.cssClass)) }, index.h("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyUp: (ev) => {
|
|
81
|
+
if (ev.key === ' ') {
|
|
82
|
+
/**
|
|
83
|
+
* Selecting a radio option with keyboard navigation,
|
|
84
|
+
* either through the Enter or Space keys, should
|
|
85
|
+
* dismiss the modal.
|
|
86
|
+
*/
|
|
87
|
+
this.closeModal();
|
|
88
|
+
}
|
|
89
|
+
} }, option.text))))));
|
|
100
90
|
}
|
|
101
91
|
renderCheckboxOptions() {
|
|
102
|
-
return this.options.map((option
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// TODO FW-4784
|
|
112
|
-
'item-checkbox-checked': option.checked
|
|
113
|
-
}, theme.getClassMap(option.cssClass)) }, index.h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
114
|
-
this.setChecked(ev);
|
|
115
|
-
this.callOptionHandler(ev);
|
|
116
|
-
// TODO FW-4784
|
|
117
|
-
index.forceUpdate(this);
|
|
118
|
-
} }, selectOptionRender.renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
119
|
-
});
|
|
92
|
+
return this.options.map((option) => (index.h("ion-item", { class: Object.assign({
|
|
93
|
+
// TODO FW-4784
|
|
94
|
+
'item-checkbox-checked': option.checked
|
|
95
|
+
}, theme.getClassMap(option.cssClass)) }, index.h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
96
|
+
this.setChecked(ev);
|
|
97
|
+
this.callOptionHandler(ev);
|
|
98
|
+
// TODO FW-4784
|
|
99
|
+
index.forceUpdate(this);
|
|
100
|
+
} }, option.text))));
|
|
120
101
|
}
|
|
121
102
|
render() {
|
|
122
|
-
return (index.h(index.Host, { key: '
|
|
103
|
+
return (index.h(index.Host, { key: 'c0218aa9ebcbe9d70a6cc1ed8d005ca656e163d3', class: Object.assign({ [ionicGlobal.getIonMode(this)]: true }, this.getModalContextClasses()) }, index.h("ion-header", { key: '4698d7442befa17e449655b2f9439001298991a0' }, index.h("ion-toolbar", { key: 'd0f1d3418f8fdbfdf12fef752f6be4939e70eb79' }, this.header !== undefined && index.h("ion-title", { key: '2916c22b3a42635e503fa0a0c916b32909999761' }, this.header), index.h("ion-buttons", { key: 'e93827fc49edd8ac04100e7df8a2a5144d257c19', slot: "end" }, index.h("ion-button", { key: '0b46828d67d5b4864f40fcbf082ae24797099fb9', onClick: () => this.closeModal() }, this.cancelText)))), index.h("ion-content", { key: '8460ad9ce425ad0b25b603d0cd42c58b68ca63ee' }, index.h("ion-list", { key: 'c48ea90af6f36a44102a8852267bd7f6f82f9598' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
123
104
|
}
|
|
124
105
|
get el() { return index.getElement(this); }
|
|
125
106
|
};
|