@ionic/core 8.7.18-dev.11771365900.125bf49c → 8.7.18-dev.11772217280.122eed89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-app.js +17 -12
- package/components/ion-checkbox.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime.js +7 -4
- package/components/ion-fab-list.js +10 -3
- package/components/ion-img.js +11 -2
- package/components/ion-label.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-radio-group.js +1 -1
- package/components/ion-searchbar.js +17 -6
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +8 -8
- package/components/{p-CJrGvZ1Z.js → p-51c2oSfC.js} +3 -3
- package/components/{p-BnpDIASH.js → p-BANeLH_G.js} +2 -2
- package/components/{p-D3KEyQ8e.js → p-BRLve2EP.js} +3 -3
- package/components/{p-DRHwNkVo.js → p-C6dkQWq2.js} +152 -30
- package/components/{p-CUfY9DTD.js → p-Cdm3dKWf.js} +8 -3
- package/components/{p-DyFBFrV7.js → p-D--b4514.js} +4 -4
- package/components/{p-DPm73mCi.js → p-DGOrLIyS.js} +7 -3
- package/components/{p-IHgAGzvW.js → p-iyo0Toaz.js} +326 -17
- package/dist/cjs/ion-app_8.cjs.entry.js +22 -13
- package/dist/cjs/ion-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +6 -3
- package/dist/cjs/ion-fab_3.cjs.entry.js +10 -3
- package/dist/cjs/ion-img.cjs.entry.js +11 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +8 -3
- package/dist/cjs/ion-modal.cjs.entry.js +326 -17
- package/dist/cjs/ion-popover.cjs.entry.js +152 -30
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +17 -6
- package/dist/collection/components/app/app.js +15 -10
- package/dist/collection/components/checkbox/checkbox.js +4 -4
- package/dist/collection/components/content/content.js +7 -3
- package/dist/collection/components/datetime/datetime.js +6 -3
- package/dist/collection/components/fab-list/fab-list.js +10 -3
- package/dist/collection/components/img/img.js +11 -2
- package/dist/collection/components/label/label.js +8 -3
- package/dist/collection/components/modal/modal.ios.css +6 -5
- package/dist/collection/components/modal/modal.js +164 -15
- package/dist/collection/components/modal/modal.md.css +6 -5
- package/dist/collection/components/modal/safe-area-utils.js +165 -0
- package/dist/collection/components/popover/animations/ios.enter.js +33 -8
- package/dist/collection/components/popover/animations/md.enter.js +26 -6
- package/dist/collection/components/popover/utils.js +96 -19
- package/dist/collection/components/radio-group/radio-group.ios.css +0 -4
- package/dist/collection/components/radio-group/radio-group.md.css +0 -4
- package/dist/collection/components/searchbar/searchbar.js +17 -6
- package/dist/docs.json +1 -1
- package/dist/esm/ion-app_8.entry.js +24 -15
- package/dist/esm/ion-checkbox.entry.js +4 -4
- package/dist/esm/ion-datetime_3.entry.js +6 -3
- package/dist/esm/ion-fab_3.entry.js +10 -3
- package/dist/esm/ion-img.entry.js +11 -2
- package/dist/esm/ion-item_8.entry.js +8 -3
- package/dist/esm/ion-modal.entry.js +326 -17
- package/dist/esm/ion-popover.entry.js +152 -30
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +17 -6
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-72af946b.entry.js → p-2ac254dc.entry.js} +1 -1
- package/dist/ionic/p-7cad388a.entry.js +4 -0
- package/dist/ionic/p-7d218555.entry.js +4 -0
- package/dist/ionic/p-8303e3fc.entry.js +4 -0
- package/dist/ionic/p-915b3e3d.entry.js +4 -0
- package/dist/ionic/{p-eaf3f5ff.entry.js → p-b0ebf9f8.entry.js} +1 -1
- package/dist/ionic/p-e4c57008.entry.js +4 -0
- package/dist/ionic/p-e5d6d0f0.entry.js +4 -0
- package/dist/ionic/p-f1dfee25.entry.js +4 -0
- package/dist/ionic/{p-6444c606.entry.js → p-f9f7b9db.entry.js} +1 -1
- package/dist/types/components/app/app.d.ts +3 -0
- package/dist/types/components/datetime/datetime.d.ts +1 -0
- package/dist/types/components/fab-list/fab-list.d.ts +2 -0
- package/dist/types/components/img/img.d.ts +2 -0
- package/dist/types/components/label/label.d.ts +2 -0
- package/dist/types/components/modal/modal.d.ts +35 -0
- package/dist/types/components/modal/safe-area-utils.d.ts +66 -0
- package/dist/types/components/popover/utils.d.ts +23 -1
- package/dist/types/components/searchbar/searchbar.d.ts +3 -0
- package/hydrate/index.js +556 -73
- package/hydrate/index.mjs +556 -73
- package/package.json +1 -1
- package/dist/ionic/p-01e27965.entry.js +0 -4
- package/dist/ionic/p-3ec563c1.entry.js +0 -4
- package/dist/ionic/p-42db6404.entry.js +0 -4
- package/dist/ionic/p-46d74291.entry.js +0 -4
- package/dist/ionic/p-bc293244.entry.js +0 -4
- package/dist/ionic/p-d1f54e28.entry.js +0 -4
- package/dist/ionic/p-e338f669.entry.js +0 -4
|
@@ -2,6 +2,58 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { getElementRoot, raf } from "../../utils/helpers";
|
|
5
|
+
/**
|
|
6
|
+
* Shared per-frame cache for safe-area insets. Avoids creating a temporary
|
|
7
|
+
* DOM element and forcing a synchronous reflow on every call within the same
|
|
8
|
+
* frame (e.g., multiple popovers presenting simultaneously). Invalidated
|
|
9
|
+
* after the next animation frame so values stay fresh across orientation
|
|
10
|
+
* changes and viewport resizes.
|
|
11
|
+
*/
|
|
12
|
+
let cachedInsets = null;
|
|
13
|
+
let cacheInvalidationScheduled = false;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the current --ion-safe-area-* CSS custom property values
|
|
16
|
+
* to actual pixel numbers. A temporary element is needed because
|
|
17
|
+
* getComputedStyle on :root returns the declared value of custom
|
|
18
|
+
* properties (e.g. "env(safe-area-inset-top)") rather than a
|
|
19
|
+
* resolved number. By assigning them to standard padding properties,
|
|
20
|
+
* the browser resolves the value.
|
|
21
|
+
*
|
|
22
|
+
* Results are cached for the current frame to avoid repeated reflows.
|
|
23
|
+
*/
|
|
24
|
+
export const getSafeAreaInsets = (doc) => {
|
|
25
|
+
if (cachedInsets !== null) {
|
|
26
|
+
return cachedInsets;
|
|
27
|
+
}
|
|
28
|
+
if (doc.body === null) {
|
|
29
|
+
return { top: 0, bottom: 0, left: 0, right: 0 };
|
|
30
|
+
}
|
|
31
|
+
const el = doc.createElement('div');
|
|
32
|
+
el.style.cssText =
|
|
33
|
+
'position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;' +
|
|
34
|
+
'padding-top:var(--ion-safe-area-top,0px);' +
|
|
35
|
+
'padding-bottom:var(--ion-safe-area-bottom,0px);' +
|
|
36
|
+
'padding-left:var(--ion-safe-area-left,0px);' +
|
|
37
|
+
'padding-right:var(--ion-safe-area-right,0px);';
|
|
38
|
+
doc.body.appendChild(el);
|
|
39
|
+
const style = getComputedStyle(el);
|
|
40
|
+
const insets = {
|
|
41
|
+
top: parseFloat(style.paddingTop) || 0,
|
|
42
|
+
bottom: parseFloat(style.paddingBottom) || 0,
|
|
43
|
+
left: parseFloat(style.paddingLeft) || 0,
|
|
44
|
+
right: parseFloat(style.paddingRight) || 0,
|
|
45
|
+
};
|
|
46
|
+
el.remove();
|
|
47
|
+
cachedInsets = insets;
|
|
48
|
+
if (!cacheInvalidationScheduled) {
|
|
49
|
+
cacheInvalidationScheduled = true;
|
|
50
|
+
raf(() => {
|
|
51
|
+
cachedInsets = null;
|
|
52
|
+
cacheInvalidationScheduled = false;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return insets;
|
|
56
|
+
};
|
|
5
57
|
/**
|
|
6
58
|
* Returns the dimensions of the popover
|
|
7
59
|
* arrow on `ios` mode. If arrow is disabled
|
|
@@ -639,8 +691,10 @@ const calculatePopoverCenterAlign = (side, triggerBoundingBox, contentWidth, con
|
|
|
639
691
|
* Adjusts popover positioning coordinates
|
|
640
692
|
* such that popover does not appear offscreen
|
|
641
693
|
* or overlapping safe area bounds.
|
|
694
|
+
*
|
|
695
|
+
* @internal - This is not part of the public API.
|
|
642
696
|
*/
|
|
643
|
-
export const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyWidth, bodyHeight, contentWidth, contentHeight,
|
|
697
|
+
export const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeArea, contentOriginX, contentOriginY, triggerCoordinates, coordArrowTop = 0, coordArrowLeft = 0, arrowHeight = 0) => {
|
|
644
698
|
let arrowTop = coordArrowTop;
|
|
645
699
|
const arrowLeft = coordArrowLeft;
|
|
646
700
|
let left = coordLeft;
|
|
@@ -650,16 +704,19 @@ export const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding
|
|
|
650
704
|
let originY = contentOriginY;
|
|
651
705
|
let checkSafeAreaLeft = false;
|
|
652
706
|
let checkSafeAreaRight = false;
|
|
707
|
+
let checkSafeAreaTop = false;
|
|
708
|
+
let checkSafeAreaBottom = false;
|
|
653
709
|
const triggerTop = triggerCoordinates
|
|
654
710
|
? triggerCoordinates.top + triggerCoordinates.height
|
|
655
711
|
: bodyHeight / 2 - contentHeight / 2;
|
|
656
712
|
const triggerHeight = triggerCoordinates ? triggerCoordinates.height : 0;
|
|
657
713
|
let addPopoverBottomClass = false;
|
|
714
|
+
const hideArrow = false;
|
|
658
715
|
/**
|
|
659
716
|
* Adjust popover so it does not
|
|
660
717
|
* go off the left of the screen.
|
|
661
718
|
*/
|
|
662
|
-
if (left < bodyPadding +
|
|
719
|
+
if (left < bodyPadding + safeArea.left) {
|
|
663
720
|
left = bodyPadding;
|
|
664
721
|
checkSafeAreaLeft = true;
|
|
665
722
|
originX = 'left';
|
|
@@ -668,41 +725,58 @@ export const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding
|
|
|
668
725
|
* go off the right of the screen.
|
|
669
726
|
*/
|
|
670
727
|
}
|
|
671
|
-
else if (contentWidth + bodyPadding + left +
|
|
728
|
+
else if (contentWidth + bodyPadding + left + safeArea.right > bodyWidth) {
|
|
672
729
|
checkSafeAreaRight = true;
|
|
673
730
|
left = bodyWidth - contentWidth - bodyPadding;
|
|
674
731
|
originX = 'right';
|
|
675
732
|
}
|
|
676
733
|
/**
|
|
677
734
|
* Adjust popover so it does not
|
|
678
|
-
* go off the
|
|
735
|
+
* go off the bottom of the screen
|
|
736
|
+
* or overlap the bottom safe area.
|
|
679
737
|
* If popover is on the left or the right of
|
|
680
738
|
* the trigger, then we should not adjust top
|
|
681
739
|
* margins.
|
|
682
740
|
*/
|
|
683
|
-
if (triggerTop + triggerHeight + contentHeight > bodyHeight
|
|
684
|
-
|
|
741
|
+
if (triggerTop + triggerHeight + contentHeight > bodyHeight - safeArea.bottom &&
|
|
742
|
+
(side === 'top' || side === 'bottom')) {
|
|
743
|
+
/**
|
|
744
|
+
* Calculate where the popover top would be if flipped
|
|
745
|
+
* above the trigger. Check whether that position clears
|
|
746
|
+
* the top safe area with room for bodyPadding.
|
|
747
|
+
*/
|
|
748
|
+
const idealFlipTop = triggerTop - contentHeight - triggerHeight - (arrowHeight - 1);
|
|
749
|
+
if (idealFlipTop >= safeArea.top + bodyPadding) {
|
|
685
750
|
/**
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
* off the bottom of the screen. However, we do not want to move
|
|
690
|
-
* the popover up so much that it goes off the top of the screen.
|
|
691
|
-
*
|
|
692
|
-
* We chose 12 here so that the popover position looks a bit nicer as
|
|
693
|
-
* it is not right up against the edge of the screen.
|
|
751
|
+
* Popover fits above the trigger without overlapping
|
|
752
|
+
* the top safe area. Use the ideal position directly —
|
|
753
|
+
* no safe-area CSS vars needed since it clears both edges.
|
|
694
754
|
*/
|
|
695
|
-
top =
|
|
755
|
+
top = idealFlipTop;
|
|
696
756
|
arrowTop = top + contentHeight;
|
|
697
757
|
originY = 'bottom';
|
|
698
758
|
addPopoverBottomClass = true;
|
|
699
|
-
/**
|
|
700
|
-
* If not enough room for popover to appear
|
|
701
|
-
* above trigger, then cut it off.
|
|
702
|
-
*/
|
|
703
759
|
}
|
|
704
760
|
else {
|
|
761
|
+
/**
|
|
762
|
+
* Can't flip above the trigger. Constrain the bottom
|
|
763
|
+
* edge while keeping the top near the trigger. This
|
|
764
|
+
* creates a scrollable area anchored to the trigger.
|
|
765
|
+
*/
|
|
705
766
|
bottom = bodyPadding;
|
|
767
|
+
checkSafeAreaBottom = true;
|
|
768
|
+
/**
|
|
769
|
+
* When the trigger is near the bottom of the screen,
|
|
770
|
+
* the calculated top may be at or past the bottom
|
|
771
|
+
* constraint, leaving zero visible height. In that
|
|
772
|
+
* case, pull top up to the top safe area so the
|
|
773
|
+
* popover fills the available space between safe areas.
|
|
774
|
+
*/
|
|
775
|
+
const bottomEdge = bodyHeight - safeArea.bottom - bodyPadding;
|
|
776
|
+
if (top >= bottomEdge) {
|
|
777
|
+
top = safeArea.top + bodyPadding;
|
|
778
|
+
checkSafeAreaTop = true;
|
|
779
|
+
}
|
|
706
780
|
}
|
|
707
781
|
}
|
|
708
782
|
return {
|
|
@@ -713,9 +787,12 @@ export const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding
|
|
|
713
787
|
originY,
|
|
714
788
|
checkSafeAreaLeft,
|
|
715
789
|
checkSafeAreaRight,
|
|
790
|
+
checkSafeAreaTop,
|
|
791
|
+
checkSafeAreaBottom,
|
|
716
792
|
arrowTop,
|
|
717
793
|
arrowLeft,
|
|
718
794
|
addPopoverBottomClass,
|
|
795
|
+
hideArrow,
|
|
719
796
|
};
|
|
720
797
|
};
|
|
721
798
|
export const shouldShowArrow = (side, didAdjustBounds = false, ev, trigger) => {
|
|
@@ -96,11 +96,14 @@ export class Searchbar {
|
|
|
96
96
|
* Clears the input field and triggers the control change.
|
|
97
97
|
*/
|
|
98
98
|
this.onClearInput = async (shouldFocus) => {
|
|
99
|
+
if (this.clearTimeout) {
|
|
100
|
+
clearTimeout(this.clearTimeout);
|
|
101
|
+
}
|
|
99
102
|
this.ionClear.emit();
|
|
100
103
|
return new Promise((resolve) => {
|
|
101
104
|
// setTimeout() fixes https://github.com/ionic-team/ionic-framework/issues/7527
|
|
102
105
|
// wait for 4 frames
|
|
103
|
-
setTimeout(() => {
|
|
106
|
+
this.clearTimeout = setTimeout(() => {
|
|
104
107
|
const value = this.getValue();
|
|
105
108
|
if (value !== '') {
|
|
106
109
|
this.value = '';
|
|
@@ -235,10 +238,18 @@ export class Searchbar {
|
|
|
235
238
|
this.originalIonInput = this.ionInput;
|
|
236
239
|
this.positionElements();
|
|
237
240
|
this.debounceChanged();
|
|
238
|
-
setTimeout(() => {
|
|
241
|
+
this.loadTimeout = setTimeout(() => {
|
|
239
242
|
this.noAnimate = false;
|
|
240
243
|
}, 300);
|
|
241
244
|
}
|
|
245
|
+
disconnectedCallback() {
|
|
246
|
+
if (this.loadTimeout) {
|
|
247
|
+
clearTimeout(this.loadTimeout);
|
|
248
|
+
}
|
|
249
|
+
if (this.clearTimeout) {
|
|
250
|
+
clearTimeout(this.clearTimeout);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
242
253
|
emitStyle() {
|
|
243
254
|
this.ionStyle.emit({
|
|
244
255
|
searchbar: true,
|
|
@@ -427,8 +438,8 @@ export class Searchbar {
|
|
|
427
438
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
428
439
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
429
440
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
430
|
-
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '
|
|
431
|
-
return (h(Host, { key: '
|
|
441
|
+
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '9e9f3a7f6ee66140181f8c3cfa42bbeee75adafc', "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: '5f83fbcc0708830637815e8c0b69356cad381870', "aria-hidden": "true" }, mode === 'md' ? (h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
442
|
+
return (h(Host, { key: '219c263c1f3cc63e18bc2d2ba5d672b7806eddd0', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
|
432
443
|
[mode]: true,
|
|
433
444
|
'searchbar-animated': animated,
|
|
434
445
|
'searchbar-disabled': this.disabled,
|
|
@@ -438,14 +449,14 @@ export class Searchbar {
|
|
|
438
449
|
'searchbar-has-focus': this.focused,
|
|
439
450
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
440
451
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
441
|
-
}) }, h("div", { key: '
|
|
452
|
+
}) }, h("div", { key: '3f1c25442d6d87c0df67f79482a925b80dcc403d', class: "searchbar-input-container" }, h("input", Object.assign({ key: 'a386fecafda0fab449ea1488906ba6cfc55e2b5c', "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: '5f81642628335def39a14f0726e0fafdc7203776', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), h("button", { key: 'da3073646f2d7f639261b556517fbadabc3c10e9', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
442
453
|
/**
|
|
443
454
|
* This prevents mobile browsers from
|
|
444
455
|
* blurring the input when the clear
|
|
445
456
|
* button is activated.
|
|
446
457
|
*/
|
|
447
458
|
ev.preventDefault();
|
|
448
|
-
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '
|
|
459
|
+
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '065cd6c707ae462c0767df1bab04ce8045f340a4', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
449
460
|
}
|
|
450
461
|
static get is() { return "ion-searchbar"; }
|
|
451
462
|
static get encapsulation() { return "scoped"; }
|
package/dist/docs.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance,
|
|
4
|
+
import { r as registerInstance, e as config, f as printIonWarning, h, d as Host, g as getElement, c as createEvent, a as readTask, i as forceUpdate, w as writeTask, j as printIonError } from './index-C8IsBmNU.js';
|
|
5
5
|
import { shouldUseCloseWatcher } from './hardware-back-button-CPLxO-Ev.js';
|
|
6
|
-
import {
|
|
6
|
+
import { a as isPlatform, b as getIonMode } from './ionic-global-CDrldh-5.js';
|
|
7
7
|
import { i as inheritAriaAttributes, h as hasLazyBuild, c as componentOnReady, e as clamp, s as shallowEqualStringMap } from './helpers-DEn3pfjm.js';
|
|
8
8
|
import { i as isRTL } from './dir-C53feagD.js';
|
|
9
9
|
import { c as createColorClasses, h as hostContext } from './theme-DiVJyqlX.js';
|
|
@@ -25,7 +25,7 @@ const App = class {
|
|
|
25
25
|
}
|
|
26
26
|
componentDidLoad() {
|
|
27
27
|
{
|
|
28
|
-
rIC(async () => {
|
|
28
|
+
this.rIC(async () => {
|
|
29
29
|
const isHybrid = isPlatform(window, 'hybrid');
|
|
30
30
|
if (!config.getBoolean('_testing')) {
|
|
31
31
|
import('./index-ceb5RaMT.js').then((module) => module.startTapClick(config));
|
|
@@ -63,6 +63,11 @@ const App = class {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
if (this.loadTimeout) {
|
|
68
|
+
clearTimeout(this.loadTimeout);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
66
71
|
/**
|
|
67
72
|
* Used to set focus on an element that uses `ion-focusable`.
|
|
68
73
|
* Do not use this if focusing the element as a result of a keyboard
|
|
@@ -79,9 +84,17 @@ const App = class {
|
|
|
79
84
|
this.focusVisible.setFocus(elements);
|
|
80
85
|
}
|
|
81
86
|
}
|
|
87
|
+
rIC(callback) {
|
|
88
|
+
if ('requestIdleCallback' in window) {
|
|
89
|
+
window.requestIdleCallback(callback);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this.loadTimeout = setTimeout(callback, 32);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
82
95
|
render() {
|
|
83
96
|
const mode = getIonMode(this);
|
|
84
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: '77a7459d3e42b3715a5a7e1cf468e2ebc99e54bb', class: {
|
|
85
98
|
[mode]: true,
|
|
86
99
|
'ion-page': true,
|
|
87
100
|
'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
|
|
@@ -108,14 +121,6 @@ const needInputShims = () => {
|
|
|
108
121
|
}
|
|
109
122
|
return false;
|
|
110
123
|
};
|
|
111
|
-
const rIC = (callback) => {
|
|
112
|
-
if ('requestIdleCallback' in window) {
|
|
113
|
-
window.requestIdleCallback(callback);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
setTimeout(callback, 32);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
124
|
App.style = appCss;
|
|
120
125
|
|
|
121
126
|
const buttonsIosCss = ".sc-ion-buttons-ios-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:99}.sc-ion-buttons-ios-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-ios-s ion-button{--padding-top:3px;--padding-bottom:3px;--padding-start:5px;--padding-end:5px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.sc-ion-buttons-ios-s .button-has-icon-only{--padding-top:0;--padding-bottom:0}.sc-ion-buttons-ios-s ion-button:not(.button-round){--border-radius:4px}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button{--color:initial;--border-color:initial;--background-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-solid,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-solid{--background:var(--ion-color-contrast);--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12;--background-hover:var(--ion-color-base);--background-hover-opacity:0.45;--color:var(--ion-color-base);--color-focused:var(--ion-color-base)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-clear,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-clear{--color-activated:var(--ion-color-contrast);--color-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-outline,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-outline{--color-activated:var(--ion-color-base);--color-focused:var(--ion-color-contrast);--background-activated:var(--ion-color-contrast)}.sc-ion-buttons-ios-s .button-clear,.sc-ion-buttons-ios-s .button-outline{--background-activated:transparent;--background-focused:currentColor;--background-hover:transparent}.sc-ion-buttons-ios-s .button-solid:not(.ion-color){--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12}.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:1.41em;line-height:0.67}.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-start:0.4em;margin-inline-start:0.4em;font-size:1.41em;line-height:0.67}.sc-ion-buttons-ios-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.65em;line-height:0.67}";
|
|
@@ -275,6 +280,10 @@ const Content = class {
|
|
|
275
280
|
this.tabsElement = null;
|
|
276
281
|
this.tabsLoadCallback = undefined;
|
|
277
282
|
}
|
|
283
|
+
if (this.resizeTimeout) {
|
|
284
|
+
clearTimeout(this.resizeTimeout);
|
|
285
|
+
this.resizeTimeout = null;
|
|
286
|
+
}
|
|
278
287
|
}
|
|
279
288
|
/**
|
|
280
289
|
* Rotating certain devices can update
|
|
@@ -513,7 +522,7 @@ const Content = class {
|
|
|
513
522
|
const forceOverscroll = this.shouldForceOverscroll();
|
|
514
523
|
const transitionShadow = mode === 'ios';
|
|
515
524
|
this.resize();
|
|
516
|
-
return (h(Host, Object.assign({ key: '
|
|
525
|
+
return (h(Host, Object.assign({ key: '287f5bb78888b0f66394a35ba2a3ad636d8f3412', role: isMainContent ? 'main' : undefined, class: createColorClasses(this.color, {
|
|
517
526
|
[mode]: true,
|
|
518
527
|
'content-sizing': hostContext('ion-popover', this.el),
|
|
519
528
|
overscroll: forceOverscroll,
|
|
@@ -521,12 +530,12 @@ const Content = class {
|
|
|
521
530
|
}), style: {
|
|
522
531
|
'--offset-top': `${this.cTop}px`,
|
|
523
532
|
'--offset-bottom': `${this.cBottom}px`,
|
|
524
|
-
} }, inheritedAttributes), h("div", { key: '
|
|
533
|
+
} }, inheritedAttributes), h("div", { key: '2e70e5e0ab4209478ea711a630058fa0e83af7f8', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? h("slot", { name: "fixed" }) : null, h("div", { key: '018a83406173ec7f7725f09b4bd1c0d964874ee4', class: {
|
|
525
534
|
'inner-scroll': true,
|
|
526
535
|
'scroll-x': scrollX,
|
|
527
536
|
'scroll-y': scrollY,
|
|
528
537
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
529
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '
|
|
538
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '6f028eeb7c9dc7e1b82a8e549e1dd8aaf1d15fca' })), transitionShadow ? (h("div", { class: "transition-effect" }, h("div", { class: "transition-cover" }), h("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? h("slot", { name: "fixed" }) : null));
|
|
530
539
|
}
|
|
531
540
|
get el() { return getElement(this); }
|
|
532
541
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, i as forceUpdate, d as Host, g as getElement } from './index-C8IsBmNU.js';
|
|
5
5
|
import { i as inheritAriaAttributes, a as renderHiddenInput } from './helpers-DEn3pfjm.js';
|
|
6
6
|
import { c as checkInvalidState } from './validity-DJztqcrH.js';
|
|
7
7
|
import { c as createColorClasses, h as hostContext } from './theme-DiVJyqlX.js';
|
|
@@ -198,7 +198,7 @@ const Checkbox = class {
|
|
|
198
198
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
199
199
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
200
200
|
// support in Safari for accessibility.
|
|
201
|
-
return (h(Host, { key: '
|
|
201
|
+
return (h(Host, { key: 'fca2e80987d5e2e7f9138eeac3314d883ea1252b', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
202
202
|
[mode]: true,
|
|
203
203
|
'in-item': hostContext('ion-item', el),
|
|
204
204
|
'checkbox-checked': checked,
|
|
@@ -208,10 +208,10 @@ const Checkbox = class {
|
|
|
208
208
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
209
209
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
210
210
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
211
|
-
}) }, h("label", { key: '
|
|
211
|
+
}) }, h("label", { key: '5cf50b6abdb9a3ae1f846f18bd8d5345de0ea2e9', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'b8c3c6b01f65ff1b723c0de4b5d6f1b62940f481', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), h("div", { key: '7b29b18b97b8151f454760d73aca1543c8325e41', class: {
|
|
212
212
|
'label-text-wrapper': true,
|
|
213
213
|
'label-text-wrapper-hidden': !hasLabelContent,
|
|
214
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
214
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'ffbce8010274a68b8e67f9c0f19ec012944df484', onSlotchange: () => forceUpdate(this) }), this.renderHintText()), h("div", { key: '8e21fb89c72fbd52df70fa1916367ab5a543f281', class: "native-wrapper" }, h("svg", { key: 'c2519ff1a5c7f69e03ab26197ccfa8718b0951c6', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
|
|
215
215
|
}
|
|
216
216
|
getSVGPath(mode, indeterminate) {
|
|
217
217
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -1083,6 +1083,9 @@ const Datetime = class {
|
|
|
1083
1083
|
this.clearFocusVisible();
|
|
1084
1084
|
this.clearFocusVisible = undefined;
|
|
1085
1085
|
}
|
|
1086
|
+
if (this.loadTimeout) {
|
|
1087
|
+
clearTimeout(this.loadTimeout);
|
|
1088
|
+
}
|
|
1086
1089
|
}
|
|
1087
1090
|
initializeListeners() {
|
|
1088
1091
|
this.initializeCalendarListener();
|
|
@@ -1131,7 +1134,7 @@ const Datetime = class {
|
|
|
1131
1134
|
*
|
|
1132
1135
|
* We schedule this after everything has had a chance to run.
|
|
1133
1136
|
*/
|
|
1134
|
-
setTimeout(() => {
|
|
1137
|
+
this.loadTimeout = setTimeout(() => {
|
|
1135
1138
|
this.ensureReadyIfVisible();
|
|
1136
1139
|
}, 100);
|
|
1137
1140
|
/**
|
|
@@ -1889,7 +1892,7 @@ const Datetime = class {
|
|
|
1889
1892
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1890
1893
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1891
1894
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1892
|
-
return (h(Host, { key: '
|
|
1895
|
+
return (h(Host, { key: 'b81c3531f4654be3f6948df5f790c0f6ab488000', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1893
1896
|
[mode]: true,
|
|
1894
1897
|
['datetime-readonly']: readonly,
|
|
1895
1898
|
['datetime-disabled']: disabled,
|
|
@@ -1899,7 +1902,7 @@ const Datetime = class {
|
|
|
1899
1902
|
[`datetime-size-${size}`]: true,
|
|
1900
1903
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1901
1904
|
[`datetime-grid`]: isGridStyle,
|
|
1902
|
-
})) }, h("div", { key: '
|
|
1905
|
+
})) }, h("div", { key: 'f7f39f8e56146186210d0ab70ae95e829573e549', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1903
1906
|
}
|
|
1904
1907
|
get el() { return getElement(this); }
|
|
1905
1908
|
static get watchers() { return {
|
|
@@ -177,6 +177,7 @@ const fabListCss = ":host{margin-left:0;margin-right:0;margin-top:calc(100% + 10
|
|
|
177
177
|
const FabList = class {
|
|
178
178
|
constructor(hostRef) {
|
|
179
179
|
registerInstance(this, hostRef);
|
|
180
|
+
this.activateTimeouts = [];
|
|
180
181
|
/**
|
|
181
182
|
* If `true`, the fab list will show all fab buttons in the list.
|
|
182
183
|
*/
|
|
@@ -187,20 +188,26 @@ const FabList = class {
|
|
|
187
188
|
this.side = 'bottom';
|
|
188
189
|
}
|
|
189
190
|
activatedChanged(activated) {
|
|
191
|
+
this.activateTimeouts.forEach(clearTimeout);
|
|
192
|
+
this.activateTimeouts = [];
|
|
190
193
|
const fabs = Array.from(this.el.querySelectorAll('ion-fab-button'));
|
|
191
194
|
// if showing the fabs add a timeout, else show immediately
|
|
192
195
|
const timeout = activated ? 30 : 0;
|
|
193
196
|
fabs.forEach((fab, i) => {
|
|
194
|
-
setTimeout(() => (fab.show = activated), i * timeout);
|
|
197
|
+
this.activateTimeouts.push(setTimeout(() => (fab.show = activated), i * timeout));
|
|
195
198
|
});
|
|
196
199
|
}
|
|
200
|
+
disconnectedCallback() {
|
|
201
|
+
this.activateTimeouts.forEach(clearTimeout);
|
|
202
|
+
this.activateTimeouts = [];
|
|
203
|
+
}
|
|
197
204
|
render() {
|
|
198
205
|
const mode = getIonMode(this);
|
|
199
|
-
return (h(Host, { key: '
|
|
206
|
+
return (h(Host, { key: '03a8920c29a93c6df4bab14753a78a8a30722ce8', class: {
|
|
200
207
|
[mode]: true,
|
|
201
208
|
'fab-list-active': this.activated,
|
|
202
209
|
[`fab-list-side-${this.side}`]: true,
|
|
203
|
-
} }, h("slot", { key: '
|
|
210
|
+
} }, h("slot", { key: 'd9e1541cb044e209bc2dff14080f3b938a2b84ae' })));
|
|
204
211
|
}
|
|
205
212
|
get el() { return getElement(this); }
|
|
206
213
|
static get watchers() { return {
|
|
@@ -30,7 +30,16 @@ const Img = class {
|
|
|
30
30
|
componentDidLoad() {
|
|
31
31
|
this.addIO();
|
|
32
32
|
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
if (this.loadTimeout) {
|
|
35
|
+
clearTimeout(this.loadTimeout);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
33
38
|
addIO() {
|
|
39
|
+
if (this.loadTimeout) {
|
|
40
|
+
clearTimeout(this.loadTimeout);
|
|
41
|
+
this.loadTimeout = undefined;
|
|
42
|
+
}
|
|
34
43
|
if (this.src === undefined) {
|
|
35
44
|
return;
|
|
36
45
|
}
|
|
@@ -54,7 +63,7 @@ const Img = class {
|
|
|
54
63
|
}
|
|
55
64
|
else {
|
|
56
65
|
// fall back to setTimeout for Safari and IE
|
|
57
|
-
setTimeout(() => this.load(), 200);
|
|
66
|
+
this.loadTimeout = setTimeout(() => this.load(), 200);
|
|
58
67
|
}
|
|
59
68
|
}
|
|
60
69
|
load() {
|
|
@@ -71,7 +80,7 @@ const Img = class {
|
|
|
71
80
|
render() {
|
|
72
81
|
const { loadSrc, alt, onLoad, loadError, inheritedAttributes } = this;
|
|
73
82
|
const { draggable } = inheritedAttributes;
|
|
74
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '9bfaa659b0680189fd29f3acb2fdce7f70be6060', class: getIonMode(this) }, h("img", { key: 'd484beae0d5cbe0406958bfad40cdd6c05625340', decoding: "async", src: loadSrc, alt: alt, onLoad: onLoad, onError: loadError, part: "image", draggable: isDraggable(draggable) })));
|
|
75
84
|
}
|
|
76
85
|
get el() { return getElement(this); }
|
|
77
86
|
static get watchers() { return {
|
|
@@ -328,11 +328,16 @@ const Label = class {
|
|
|
328
328
|
}
|
|
329
329
|
componentDidLoad() {
|
|
330
330
|
if (this.noAnimate) {
|
|
331
|
-
setTimeout(() => {
|
|
331
|
+
this.loadTimeout = setTimeout(() => {
|
|
332
332
|
this.noAnimate = false;
|
|
333
333
|
}, 1000);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
+
disconnectedCallback() {
|
|
337
|
+
if (this.loadTimeout) {
|
|
338
|
+
clearTimeout(this.loadTimeout);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
336
341
|
colorChanged() {
|
|
337
342
|
this.emitColor();
|
|
338
343
|
}
|
|
@@ -361,13 +366,13 @@ const Label = class {
|
|
|
361
366
|
render() {
|
|
362
367
|
const position = this.position;
|
|
363
368
|
const mode = getIonMode(this);
|
|
364
|
-
return (h(Host, { key: '
|
|
369
|
+
return (h(Host, { key: 'd603670c442213c28737b0c052c094705b8c84ef', class: createColorClasses(this.color, {
|
|
365
370
|
[mode]: true,
|
|
366
371
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
367
372
|
[`label-${position}`]: position !== undefined,
|
|
368
373
|
[`label-no-animate`]: this.noAnimate,
|
|
369
374
|
'label-rtl': document.dir === 'rtl',
|
|
370
|
-
}) }, h("slot", { key: '
|
|
375
|
+
}) }, h("slot", { key: 'a8c3aed240a20ee5856c423662878481a1e6d4cf' })));
|
|
371
376
|
}
|
|
372
377
|
get el() { return getElement(this); }
|
|
373
378
|
static get watchers() { return {
|