voyager-ionic-core 8.8.5 → 8.8.8
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-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-app.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-segment.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/{p-0z8QSI5b.js → p-BeXMwcl5.js} +1 -1
- package/components/p-CEmXdzGo.js +4 -0
- package/components/{p-BlNv564p.js → p-Cf6Z1pmL.js} +1 -1
- package/components/{p-D3Ti70Hx.js → p-DZhbcvo5.js} +1 -1
- package/components/{p-BGHGpkPX.js → p-Q1-Xy3As.js} +1 -1
- package/components/p-ZuZOauwD.js +4 -0
- package/dist/cjs/{input-shims-Dl5cnc_e.js → input-shims-CPL2J8F-.js} +0 -6
- package/dist/cjs/ion-action-sheet.cjs.entry.js +3 -3
- package/dist/cjs/ion-alert.cjs.entry.js +66 -4
- package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +30 -14
- package/dist/cjs/ion-modal.cjs.entry.js +9 -9
- package/dist/cjs/ion-segment_2.cjs.entry.js +6 -2
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/action-sheet/action-sheet.js +3 -3
- package/dist/collection/components/alert/alert.js +71 -4
- package/dist/collection/components/content/content.css +1 -1
- package/dist/collection/components/datetime/datetime.js +30 -14
- package/dist/collection/components/modal/modal.js +9 -9
- package/dist/collection/components/segment/segment.js +6 -2
- package/dist/collection/utils/input-shims/hacks/scroll-assist.js +0 -7
- package/dist/docs.json +1 -1
- package/dist/esm/{input-shims-AaDhOpKN.js → input-shims-DbrgeeNb.js} +1 -7
- package/dist/esm/ion-action-sheet.entry.js +3 -3
- package/dist/esm/ion-alert.entry.js +66 -4
- package/dist/esm/ion-app_8.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +30 -14
- package/dist/esm/ion-modal.entry.js +9 -9
- package/dist/esm/ion-segment_2.entry.js +6 -2
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-cb27fe68.entry.js → p-050873ec.entry.js} +1 -1
- package/dist/ionic/p-164f79c4.entry.js +4 -0
- package/dist/ionic/p-1ca9c36b.entry.js +4 -0
- package/dist/ionic/{p-268a3397.entry.js → p-7761ef65.entry.js} +1 -1
- package/dist/ionic/p-DcSNwXfb.js +4 -0
- package/dist/ionic/p-a893c61c.entry.js +4 -0
- package/dist/ionic/p-f3e7b155.entry.js +4 -0
- package/dist/types/components/alert/alert.d.ts +5 -0
- package/dist/types/components/datetime/datetime.d.ts +7 -0
- package/dist/types/components/modal/modal.d.ts +3 -3
- package/hydrate/index.js +116 -33
- package/hydrate/index.mjs +116 -33
- package/package.json +4 -4
- package/components/p-CH0NYjKq.js +0 -4
- package/components/p-Cwv-vmkN.js +0 -4
- package/dist/ionic/p-1b02923f.entry.js +0 -4
- package/dist/ionic/p-4c67ce4c.entry.js +0 -4
- package/dist/ionic/p-9cdbabbb.entry.js +0 -4
- package/dist/ionic/p-CYvM5g3q.js +0 -4
- package/dist/ionic/p-ce2edb36.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -9813,12 +9813,12 @@ class ActionSheet {
|
|
|
9813
9813
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
9814
9814
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
9815
9815
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
9816
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
9816
|
+
return (hAsync(Host, Object.assign({ key: '48b63b870f2816b4cad3c606f3d9956854cee79a', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
9817
9817
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
9818
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '
|
|
9818
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '41dd5781f139d26b3feea33ab387451aeafacd51', tappable: this.backdropDismiss }), hAsync("div", { key: 'f797c2657782e4e83adf90d2d796108e857a1fc0', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '8e74209321fc5e8712e3e293c91a6fa036ea45ab', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: 'c811860be2eed0b6c73fc2cc5a59cb94db2e8912', class: "action-sheet-container" }, hAsync("div", { key: 'd36ee14b70d73eb5cd69e0c57bc5cc31daf86ab3', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (hAsync("div", { key: '922695de191edc86451eed2552acc4f54993ea52', id: headerID, class: {
|
|
9819
9819
|
'action-sheet-title': true,
|
|
9820
9820
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
9821
|
-
} }, header, this.subHeader && hAsync("div", { key: '
|
|
9821
|
+
} }, header, this.subHeader && hAsync("div", { key: 'a119d4a93668e829f7106f11cbbdd437310f3e80', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (hAsync("div", { key: '1d27f36d09bedd2e4c61fea9dd9d05f8f9271aef', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: 'ed13658176c54cc45808a54a0331c297430d9bc6' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: '5208e3e3535b775a443cef6fb1decd790db69b0c', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: 'b7ba489e1ee50524a5b4af670eef787844a16286', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: 'b3f88898114855853259f0001def26b4bd6e4a98' })))))), hAsync("div", { key: '0dfd0fcdc633bf565990eaa06679608e749cf8f9', tabindex: "0", "aria-hidden": "true" })));
|
|
9822
9822
|
}
|
|
9823
9823
|
get el() { return getElement(this); }
|
|
9824
9824
|
static get watchers() { return {
|
|
@@ -10145,6 +10145,7 @@ class Alert {
|
|
|
10145
10145
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
10146
10146
|
this.processedInputs = [];
|
|
10147
10147
|
this.processedButtons = [];
|
|
10148
|
+
this.isButtonGroupWrapped = false;
|
|
10148
10149
|
this.presented = false;
|
|
10149
10150
|
/** @internal */
|
|
10150
10151
|
this.hasController = false;
|
|
@@ -10269,6 +10270,13 @@ class Alert {
|
|
|
10269
10270
|
this.processedButtons = buttons.map((btn) => {
|
|
10270
10271
|
return typeof btn === 'string' ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined } : btn;
|
|
10271
10272
|
});
|
|
10273
|
+
/**
|
|
10274
|
+
* Reset wrap state so the new button set can be re-evaluated. Without this,
|
|
10275
|
+
* a previously-latched vertical layout would persist even if the new buttons
|
|
10276
|
+
* fit horizontally.
|
|
10277
|
+
*/
|
|
10278
|
+
this.isButtonGroupWrapped = false;
|
|
10279
|
+
this.checkButtonGroupWrap();
|
|
10272
10280
|
}
|
|
10273
10281
|
inputsChanged() {
|
|
10274
10282
|
const inputs = this.inputs;
|
|
@@ -10309,6 +10317,12 @@ class Alert {
|
|
|
10309
10317
|
connectedCallback() {
|
|
10310
10318
|
prepareOverlay(this.el);
|
|
10311
10319
|
this.triggerChanged();
|
|
10320
|
+
/**
|
|
10321
|
+
* If the alert was previously connected and is being reattached, the
|
|
10322
|
+
* ResizeObserver was disconnected. componentDidLoad only fires once per
|
|
10323
|
+
* instance, so re-establish the observer here on reconnect.
|
|
10324
|
+
*/
|
|
10325
|
+
this.setupButtonGroupResizeObserver();
|
|
10312
10326
|
}
|
|
10313
10327
|
componentWillLoad() {
|
|
10314
10328
|
var _a;
|
|
@@ -10319,11 +10333,14 @@ class Alert {
|
|
|
10319
10333
|
this.buttonsChanged();
|
|
10320
10334
|
}
|
|
10321
10335
|
disconnectedCallback() {
|
|
10336
|
+
var _a;
|
|
10322
10337
|
this.triggerController.removeClickListener();
|
|
10323
10338
|
if (this.gesture) {
|
|
10324
10339
|
this.gesture.destroy();
|
|
10325
10340
|
this.gesture = undefined;
|
|
10326
10341
|
}
|
|
10342
|
+
(_a = this.buttonGroupResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
10343
|
+
this.buttonGroupResizeObserver = undefined;
|
|
10327
10344
|
}
|
|
10328
10345
|
componentDidLoad() {
|
|
10329
10346
|
/**
|
|
@@ -10336,6 +10353,7 @@ class Alert {
|
|
|
10336
10353
|
this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
|
|
10337
10354
|
this.gesture.enable(true);
|
|
10338
10355
|
}
|
|
10356
|
+
this.setupButtonGroupResizeObserver();
|
|
10339
10357
|
/**
|
|
10340
10358
|
* If alert was rendered with isOpen="true"
|
|
10341
10359
|
* then we should open alert immediately.
|
|
@@ -10525,14 +10543,58 @@ class Alert {
|
|
|
10525
10543
|
}
|
|
10526
10544
|
})));
|
|
10527
10545
|
}
|
|
10546
|
+
setupButtonGroupResizeObserver() {
|
|
10547
|
+
var _a;
|
|
10548
|
+
/**
|
|
10549
|
+
* Re-evaluate vertical layout when the button group resizes so a 2-button
|
|
10550
|
+
* group with long text wraps cleanly instead of leaving a stray right-edge
|
|
10551
|
+
* border on the first button.
|
|
10552
|
+
*/
|
|
10553
|
+
if (!this.buttonGroupEl || typeof ResizeObserver === 'undefined') {
|
|
10554
|
+
return;
|
|
10555
|
+
}
|
|
10556
|
+
(_a = this.buttonGroupResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
10557
|
+
this.buttonGroupResizeObserver = new ResizeObserver(() => this.checkButtonGroupWrap());
|
|
10558
|
+
this.buttonGroupResizeObserver.observe(this.buttonGroupEl);
|
|
10559
|
+
this.checkButtonGroupWrap();
|
|
10560
|
+
}
|
|
10561
|
+
checkButtonGroupWrap() {
|
|
10562
|
+
/**
|
|
10563
|
+
* Defer the layout read out of the ResizeObserver callback so we don't
|
|
10564
|
+
* force synchronous layout and avoid "ResizeObserver loop" warnings when
|
|
10565
|
+
* applying the vertical-layout class itself triggers another resize.
|
|
10566
|
+
*/
|
|
10567
|
+
raf(() => {
|
|
10568
|
+
/**
|
|
10569
|
+
* Bail if the alert was disconnected after this raf was queued.
|
|
10570
|
+
* `buttonGroupEl` persists across disconnect so the observer can be
|
|
10571
|
+
* re-attached on reconnect; the observer reference is the disconnect
|
|
10572
|
+
* sentinel.
|
|
10573
|
+
*/
|
|
10574
|
+
if (!this.buttonGroupResizeObserver) {
|
|
10575
|
+
return;
|
|
10576
|
+
}
|
|
10577
|
+
const groupEl = this.buttonGroupEl;
|
|
10578
|
+
if (!groupEl) {
|
|
10579
|
+
return;
|
|
10580
|
+
}
|
|
10581
|
+
const buttons = Array.from(groupEl.querySelectorAll('.alert-button'));
|
|
10582
|
+
if (buttons.length < 2) {
|
|
10583
|
+
this.isButtonGroupWrapped = false;
|
|
10584
|
+
return;
|
|
10585
|
+
}
|
|
10586
|
+
const firstTop = buttons[0].offsetTop;
|
|
10587
|
+
this.isButtonGroupWrapped = buttons.some((btn) => btn.offsetTop !== firstTop);
|
|
10588
|
+
});
|
|
10589
|
+
}
|
|
10528
10590
|
renderAlertButtons() {
|
|
10529
10591
|
const buttons = this.processedButtons;
|
|
10530
10592
|
const mode = getIonMode$1(this);
|
|
10531
10593
|
const alertButtonGroupClass = {
|
|
10532
10594
|
'alert-button-group': true,
|
|
10533
|
-
'alert-button-group-vertical': buttons.length > 2,
|
|
10595
|
+
'alert-button-group-vertical': buttons.length > 2 || this.isButtonGroupWrapped,
|
|
10534
10596
|
};
|
|
10535
|
-
return (hAsync("div", { class: alertButtonGroupClass }, buttons.map((button) => (hAsync("button", Object.assign({}, button.htmlAttributes, { type: "button", id: button.id, class: buttonClass$2(button), tabIndex: 0, onClick: () => this.buttonClick(button) }), hAsync("span", { class: "alert-button-inner" }, button.text), mode === 'md' && hAsync("ion-ripple-effect", null))))));
|
|
10597
|
+
return (hAsync("div", { class: alertButtonGroupClass, ref: (el) => (this.buttonGroupEl = el) }, buttons.map((button) => (hAsync("button", Object.assign({}, button.htmlAttributes, { type: "button", id: button.id, class: buttonClass$2(button), tabIndex: 0, onClick: () => this.buttonClick(button) }), hAsync("span", { class: "alert-button-inner" }, button.text), mode === 'md' && hAsync("ion-ripple-effect", null))))));
|
|
10536
10598
|
}
|
|
10537
10599
|
renderAlertMessage(msgId) {
|
|
10538
10600
|
const { customHTMLEnabled, message } = this;
|
|
@@ -10555,9 +10617,9 @@ class Alert {
|
|
|
10555
10617
|
* If neither are defined, do not set aria-labelledby.
|
|
10556
10618
|
*/
|
|
10557
10619
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
10558
|
-
return (hAsync(Host, { key: '
|
|
10620
|
+
return (hAsync(Host, { key: '8d54ccd725ea634be080e67b56fa5efe498f496c', tabindex: "-1", style: {
|
|
10559
10621
|
zIndex: `${20000 + overlayIndex}`,
|
|
10560
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '
|
|
10622
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '05a238583342285545587de9dce144a82d779193', tappable: this.backdropDismiss }), hAsync("div", { key: 'e52c53fd9845e66781af01b2a788a291b45a927c', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: '8417e52eebca24ff436fab0703666db51072f980', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), hAsync("div", { key: '5c560d4800b24d41961423718108b54be6cd6f91', class: "alert-head" }, header && (hAsync("h2", { key: '8637b64cd5125b2258115d1c11f3743113658608', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: '7a4e61a02c29b16b336d8acaf6569b30de6fe71e', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: '30844b6a0a7e3dab46514cd548ecffa86dcd59cb', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: '39c824fee1e60ad8d6234c79d22ceb8bba8004af', tabindex: "0", "aria-hidden": "true" })));
|
|
10561
10623
|
}
|
|
10562
10624
|
get el() { return getElement(this); }
|
|
10563
10625
|
static get watchers() { return {
|
|
@@ -10600,6 +10662,7 @@ class Alert {
|
|
|
10600
10662
|
"htmlAttributes": [16],
|
|
10601
10663
|
"isOpen": [4, "is-open"],
|
|
10602
10664
|
"trigger": [1],
|
|
10665
|
+
"isButtonGroupWrapped": [32],
|
|
10603
10666
|
"present": [64],
|
|
10604
10667
|
"dismiss": [64],
|
|
10605
10668
|
"onDidDismiss": [64],
|
|
@@ -12367,7 +12430,7 @@ const isRTL$1 = (hostEl) => {
|
|
|
12367
12430
|
return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
|
|
12368
12431
|
};
|
|
12369
12432
|
|
|
12370
|
-
const contentCss = () => `:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--
|
|
12433
|
+
const contentCss = () => `:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}`;
|
|
12371
12434
|
|
|
12372
12435
|
/**
|
|
12373
12436
|
* @slot - Content is placed in the scrollable area if provided without a slot.
|
|
@@ -14781,6 +14844,12 @@ class Datetime {
|
|
|
14781
14844
|
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
14782
14845
|
this.ionRender = createEvent(this, "ionRender", 7);
|
|
14783
14846
|
this.inputId = `ion-dt-${datetimeIds++}`;
|
|
14847
|
+
/**
|
|
14848
|
+
* Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
|
|
14849
|
+
* synthetic "not intersecting" entry IntersectionObserver fires on
|
|
14850
|
+
* `observe()` when the host mounts offscreen.
|
|
14851
|
+
*/
|
|
14852
|
+
this.hasBeenIntersecting = false;
|
|
14784
14853
|
this.prevPresentation = null;
|
|
14785
14854
|
this.showMonthAndYear = false;
|
|
14786
14855
|
this.activeParts = [];
|
|
@@ -15343,7 +15412,21 @@ class Datetime {
|
|
|
15343
15412
|
if (rect.width === 0 || rect.height === 0) {
|
|
15344
15413
|
return;
|
|
15345
15414
|
}
|
|
15415
|
+
this.markReady();
|
|
15416
|
+
};
|
|
15417
|
+
this.markReady = () => {
|
|
15418
|
+
if (this.el.classList.contains('datetime-ready')) {
|
|
15419
|
+
return;
|
|
15420
|
+
}
|
|
15346
15421
|
this.initializeListeners();
|
|
15422
|
+
/**
|
|
15423
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
15424
|
+
* can properly scroll contents into view. As a result
|
|
15425
|
+
* we hide the scrollable content until after that frame
|
|
15426
|
+
* so users do not see the content quickly shifting. The downside
|
|
15427
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
15428
|
+
* is a better way to handle this?
|
|
15429
|
+
*/
|
|
15347
15430
|
writeTask(() => {
|
|
15348
15431
|
this.el.classList.add('datetime-ready');
|
|
15349
15432
|
});
|
|
@@ -15636,6 +15719,7 @@ class Datetime {
|
|
|
15636
15719
|
this.clearFocusVisible = undefined;
|
|
15637
15720
|
}
|
|
15638
15721
|
this.loadTimeoutCleanup();
|
|
15722
|
+
this.hasBeenIntersecting = false;
|
|
15639
15723
|
}
|
|
15640
15724
|
initializeListeners() {
|
|
15641
15725
|
this.initializeCalendarListener();
|
|
@@ -15655,18 +15739,8 @@ class Datetime {
|
|
|
15655
15739
|
if (!ev.isIntersecting) {
|
|
15656
15740
|
return;
|
|
15657
15741
|
}
|
|
15658
|
-
this.
|
|
15659
|
-
|
|
15660
|
-
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
15661
|
-
* can properly scroll contents into view. As a result
|
|
15662
|
-
* we hide the scrollable content until after that frame
|
|
15663
|
-
* so users do not see the content quickly shifting. The downside
|
|
15664
|
-
* is that the content will pop into view a frame after. Maybe there
|
|
15665
|
-
* is a better way to handle this?
|
|
15666
|
-
*/
|
|
15667
|
-
writeTask(() => {
|
|
15668
|
-
this.el.classList.add('datetime-ready');
|
|
15669
|
-
});
|
|
15742
|
+
this.hasBeenIntersecting = true;
|
|
15743
|
+
this.markReady();
|
|
15670
15744
|
};
|
|
15671
15745
|
const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });
|
|
15672
15746
|
/**
|
|
@@ -15702,6 +15776,11 @@ class Datetime {
|
|
|
15702
15776
|
if (ev.isIntersecting) {
|
|
15703
15777
|
return;
|
|
15704
15778
|
}
|
|
15779
|
+
// Ignore the initial "not intersecting" entry IntersectionObserver fires on observe().
|
|
15780
|
+
if (!this.hasBeenIntersecting) {
|
|
15781
|
+
return;
|
|
15782
|
+
}
|
|
15783
|
+
this.hasBeenIntersecting = false;
|
|
15705
15784
|
this.destroyInteractionListeners();
|
|
15706
15785
|
/**
|
|
15707
15786
|
* When datetime is hidden, we need to make sure that
|
|
@@ -16445,7 +16524,7 @@ class Datetime {
|
|
|
16445
16524
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
16446
16525
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
16447
16526
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
16448
|
-
return (hAsync(Host, { key: '
|
|
16527
|
+
return (hAsync(Host, { key: '323c8c2327088f00934b8c93c3306538cb9b5677', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
|
|
16449
16528
|
[mode]: true,
|
|
16450
16529
|
['datetime-readonly']: readonly,
|
|
16451
16530
|
['datetime-disabled']: disabled,
|
|
@@ -16455,7 +16534,7 @@ class Datetime {
|
|
|
16455
16534
|
[`datetime-size-${size}`]: true,
|
|
16456
16535
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
16457
16536
|
[`datetime-grid`]: isGridStyle,
|
|
16458
|
-
})) }, hAsync("div", { key: '
|
|
16537
|
+
})) }, hAsync("div", { key: '1e0855c8909bc3f1e48a21ad68159fa782060691', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
16459
16538
|
}
|
|
16460
16539
|
get el() { return getElement(this); }
|
|
16461
16540
|
static get watchers() { return {
|
|
@@ -26257,12 +26336,12 @@ class Modal {
|
|
|
26257
26336
|
this.applyFullscreenSafeAreaTo(contentEl, hasFooter);
|
|
26258
26337
|
}
|
|
26259
26338
|
/**
|
|
26260
|
-
* Sets --
|
|
26339
|
+
* Sets --internal-content-safe-area-padding-bottom on the given ion-content
|
|
26261
26340
|
* when no footer is present, so ion-content's .inner-scroll includes
|
|
26262
26341
|
* safe-area-bottom in its scroll padding. This keeps the modal background
|
|
26263
26342
|
* edge-to-edge while ensuring content scrolls clear of the system nav bar.
|
|
26264
26343
|
*
|
|
26265
|
-
* --
|
|
26344
|
+
* --internal-content-safe-area-padding-bottom is an internal CSS property used
|
|
26266
26345
|
* only by this code path. It is not part of ion-content's public API and
|
|
26267
26346
|
* should not be set by consumers. The default of 0px makes it a no-op
|
|
26268
26347
|
* when unset, which is the expected state for ion-content used outside of
|
|
@@ -26274,17 +26353,17 @@ class Modal {
|
|
|
26274
26353
|
// padding. Custom modals with raw HTML are developer-controlled.
|
|
26275
26354
|
if (!contentEl || hasFooter)
|
|
26276
26355
|
return;
|
|
26277
|
-
contentEl.style.setProperty('--
|
|
26356
|
+
contentEl.style.setProperty('--internal-content-safe-area-padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
|
|
26278
26357
|
}
|
|
26279
26358
|
/**
|
|
26280
|
-
* Removes the internal --
|
|
26359
|
+
* Removes the internal --internal-content-safe-area-padding-bottom property
|
|
26281
26360
|
* from an already-located ion-content. Callers do their own
|
|
26282
26361
|
* findContentAndFooter() so they can also read hasFooter if needed.
|
|
26283
26362
|
*/
|
|
26284
26363
|
clearContentSafeAreaPadding(contentEl) {
|
|
26285
26364
|
if (!contentEl)
|
|
26286
26365
|
return;
|
|
26287
|
-
contentEl.style.removeProperty('--
|
|
26366
|
+
contentEl.style.removeProperty('--internal-content-safe-area-padding-bottom');
|
|
26288
26367
|
}
|
|
26289
26368
|
/**
|
|
26290
26369
|
* Finds ion-content and ion-footer among direct children and one level of
|
|
@@ -26331,20 +26410,20 @@ class Modal {
|
|
|
26331
26410
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26332
26411
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26333
26412
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26334
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26413
|
+
return (hAsync(Host, Object.assign({ key: 'd6a271ace939c33703966a1425ab32b7a30bf246', "no-router": true,
|
|
26335
26414
|
// Allow the modal to be navigable when the handle is focusable
|
|
26336
26415
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26337
26416
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26338
|
-
}, 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, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '
|
|
26417
|
+
}, 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, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '51e29823c1444059edc1299e2f8509dda4c39008', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '4292a849e82b83570b18b95e3cbdf05af0a4e170', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'd3131150733c13cd6658545207e4ab49094672b7',
|
|
26339
26418
|
/*
|
|
26340
26419
|
role and aria-modal must be used on the
|
|
26341
26420
|
same element. They must also be set inside the
|
|
26342
26421
|
shadow DOM otherwise ion-button will not be highlighted
|
|
26343
26422
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26344
26423
|
*/
|
|
26345
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
26424
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '3da13bff87602c8c0aa8e3db54375b40d96d3b83', class: "modal-handle",
|
|
26346
26425
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26347
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '
|
|
26426
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '73b22a4eb7ca2e499b9f843b66751a1dbfef69a9', onSlotchange: this.onSlotChange }))));
|
|
26348
26427
|
}
|
|
26349
26428
|
get el() { return getElement(this); }
|
|
26350
26429
|
static get watchers() { return {
|
|
@@ -36041,6 +36120,7 @@ class Segment {
|
|
|
36041
36120
|
return segmentContent === null || segmentContent === void 0 ? void 0 : segmentContent.closest('ion-segment-view');
|
|
36042
36121
|
}
|
|
36043
36122
|
handleSegmentViewScroll(ev) {
|
|
36123
|
+
var _a;
|
|
36044
36124
|
const { scrollRatio, isManualScroll } = ev.detail;
|
|
36045
36125
|
if (!isManualScroll) {
|
|
36046
36126
|
return;
|
|
@@ -36057,6 +36137,9 @@ class Segment {
|
|
|
36057
36137
|
const index = buttons.findIndex((button) => button.value === this.value);
|
|
36058
36138
|
const current = buttons[index];
|
|
36059
36139
|
const nextIndex = Math.round(scrollRatio * (buttons.length - 1));
|
|
36140
|
+
if ((_a = buttons[nextIndex]) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
36141
|
+
return;
|
|
36142
|
+
}
|
|
36060
36143
|
if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
|
|
36061
36144
|
this.lastNextIndex = nextIndex;
|
|
36062
36145
|
this.triggerScrollOnValueChange = false;
|
|
@@ -36267,14 +36350,14 @@ class Segment {
|
|
|
36267
36350
|
}
|
|
36268
36351
|
render() {
|
|
36269
36352
|
const mode = getIonMode$1(this);
|
|
36270
|
-
return (hAsync(Host, { key: '
|
|
36353
|
+
return (hAsync(Host, { key: 'eda6b7b88b7967b55cf9098c59b655b348a42224', role: "tablist", onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
36271
36354
|
[mode]: true,
|
|
36272
36355
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
36273
36356
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
36274
36357
|
'segment-activated': this.activated,
|
|
36275
36358
|
'segment-disabled': this.disabled,
|
|
36276
36359
|
'segment-scrollable': this.scrollable,
|
|
36277
|
-
}) }, hAsync("slot", { key: '
|
|
36360
|
+
}) }, hAsync("slot", { key: 'fdb451f235ce59c5bb50c61a13c69160ece2d5df', onSlotchange: this.onSlottedItemsChange })));
|
|
36278
36361
|
}
|
|
36279
36362
|
get el() { return getElement(this); }
|
|
36280
36363
|
static get watchers() { return {
|