@ionic/core 9.0.1-dev.11787248963.10a00c73 → 9.0.1-dev.11787589191.1e183b55

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.
Files changed (94) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-action-sheet.js +1 -1
  3. package/components/ion-alert.js +1 -1
  4. package/components/ion-datetime.js +1 -1
  5. package/components/ion-item-sliding.js +1 -1
  6. package/components/ion-loading.js +1 -1
  7. package/components/ion-menu.js +1 -1
  8. package/components/ion-modal.js +1 -1
  9. package/components/ion-popover.js +1 -1
  10. package/components/ion-segment-button.js +1 -1
  11. package/components/ion-select-modal.js +1 -1
  12. package/components/ion-select-popover.js +1 -1
  13. package/components/ion-select.js +1 -1
  14. package/components/ion-toast.js +1 -1
  15. package/components/p-BPnXVGaS.js +4 -0
  16. package/components/p-BQAiulS1.js +4 -0
  17. package/components/p-Bh2ta0iG.js +4 -0
  18. package/components/{p-CaiZOhfC.js → p-BnUOVmKh.js} +1 -1
  19. package/components/{p-Bnc0m4SW.js → p-D1OCo42s.js} +1 -1
  20. package/components/p-DD57rSP_.js +4 -0
  21. package/components/p-DnXLaaf7.js +4 -0
  22. package/dist/cjs/index.cjs.js +1 -1
  23. package/dist/cjs/ion-action-sheet.cjs.entry.js +35 -20
  24. package/dist/cjs/ion-alert.cjs.entry.js +20 -12
  25. package/dist/cjs/ion-datetime.cjs.entry.js +1 -1
  26. package/dist/cjs/ion-item-option_3.cjs.entry.js +11 -9
  27. package/dist/cjs/ion-loading.cjs.entry.js +7 -3
  28. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  29. package/dist/cjs/ion-modal.cjs.entry.js +75 -22
  30. package/dist/cjs/ion-popover.cjs.entry.js +13 -3
  31. package/dist/cjs/ion-segment_2.cjs.entry.js +7 -11
  32. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  34. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  35. package/dist/cjs/{overlays-Bg0auTQa.js → overlays-B5JeC8OQ.js} +52 -29
  36. package/dist/collection/components/action-sheet/action-sheet.js +35 -20
  37. package/dist/collection/components/alert/alert.js +20 -12
  38. package/dist/collection/components/item-sliding/item-sliding.js +12 -10
  39. package/dist/collection/components/loading/loading.js +7 -3
  40. package/dist/collection/components/modal/modal.js +75 -22
  41. package/dist/collection/components/popover/popover.js +13 -3
  42. package/dist/collection/components/segment-button/segment-button.js +7 -11
  43. package/dist/collection/utils/overlays.js +51 -29
  44. package/dist/docs.json +1 -1
  45. package/dist/esm/index.js +1 -1
  46. package/dist/esm/ion-action-sheet.entry.js +35 -20
  47. package/dist/esm/ion-alert.entry.js +20 -12
  48. package/dist/esm/ion-datetime.entry.js +1 -1
  49. package/dist/esm/ion-item-option_3.entry.js +12 -10
  50. package/dist/esm/ion-loading.entry.js +7 -3
  51. package/dist/esm/ion-menu_3.entry.js +1 -1
  52. package/dist/esm/ion-modal.entry.js +75 -22
  53. package/dist/esm/ion-popover.entry.js +13 -3
  54. package/dist/esm/ion-segment_2.entry.js +7 -11
  55. package/dist/esm/ion-select-modal.entry.js +1 -1
  56. package/dist/esm/ion-select_3.entry.js +1 -1
  57. package/dist/esm/ion-toast.entry.js +1 -1
  58. package/dist/esm/{overlays-BpnIFlXI.js → overlays-CefdMZgF.js} +52 -30
  59. package/dist/ionic/index.esm.js +1 -1
  60. package/dist/ionic/ionic.esm.js +1 -1
  61. package/dist/ionic/p-36abc1ee.entry.js +4 -0
  62. package/dist/ionic/{p-873a315a.entry.js → p-408973f4.entry.js} +1 -1
  63. package/dist/ionic/{p-4437015c.entry.js → p-46a938a9.entry.js} +1 -1
  64. package/dist/ionic/p-47626333.entry.js +4 -0
  65. package/dist/ionic/p-8f464a8f.entry.js +4 -0
  66. package/dist/ionic/p-9455207b.entry.js +4 -0
  67. package/dist/ionic/p-DLLCmV-y.js +4 -0
  68. package/dist/ionic/{p-05800a02.entry.js → p-a2fa2de2.entry.js} +1 -1
  69. package/dist/ionic/p-a53b0908.entry.js +4 -0
  70. package/dist/ionic/{p-75887ee0.entry.js → p-b875a59e.entry.js} +1 -1
  71. package/dist/ionic/p-f3b671aa.entry.js +4 -0
  72. package/dist/ionic/p-f521b13c.entry.js +4 -0
  73. package/dist/ionic/{p-49b9d405.entry.js → p-f8713b2c.entry.js} +1 -1
  74. package/dist/types/components/action-sheet/action-sheet.d.ts +10 -0
  75. package/dist/types/components/alert/alert.d.ts +7 -0
  76. package/dist/types/components/modal/modal.d.ts +8 -0
  77. package/dist/types/utils/overlays.d.ts +9 -0
  78. package/hydrate/index.js +214 -104
  79. package/hydrate/index.mjs +214 -104
  80. package/package.json +1 -1
  81. package/components/p-Bg4OwDwb.js +0 -4
  82. package/components/p-CQAjyETU.js +0 -4
  83. package/components/p-DqAI6tg7.js +0 -4
  84. package/components/p-DrehWDfv.js +0 -4
  85. package/components/p-eFI3mtEX.js +0 -4
  86. package/dist/collection/utils/test/late-props/late-props.js +0 -69
  87. package/dist/ionic/p-34b9379b.entry.js +0 -4
  88. package/dist/ionic/p-48c859fe.entry.js +0 -4
  89. package/dist/ionic/p-5b906fd6.entry.js +0 -4
  90. package/dist/ionic/p-68507e70.entry.js +0 -4
  91. package/dist/ionic/p-886d9e66.entry.js +0 -4
  92. package/dist/ionic/p-DdhHqKj-.js +0 -4
  93. package/dist/ionic/p-b7a11b58.entry.js +0 -4
  94. package/dist/ionic/p-f7dd1ed9.entry.js +0 -4
@@ -5,7 +5,7 @@ import { Host, h, readTask } from "@stencil/core";
5
5
  import { createButtonActiveGesture } from "../../utils/gesture/button-active";
6
6
  import { raf } from "../../utils/helpers";
7
7
  import { createLockController } from "../../utils/lock-controller";
8
- import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
8
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, restoreRootFocusTrapAccessibility, safeCall, setOverlayId, } from "../../utils/overlays";
9
9
  import { renderOptionLabel } from "../../utils/select-option-render";
10
10
  import { getClassMap } from "../../utils/theme";
11
11
  import { getIonMode } from "../../global/ionic-global";
@@ -277,6 +277,13 @@ export class ActionSheet {
277
277
  connectedCallback() {
278
278
  prepareOverlay(this.el);
279
279
  this.triggerChanged();
280
+ // `componentDidLoad` only fires once per instance, so a reconnect has to
281
+ // rebuild the gesture its disconnect destroyed.
282
+ this.setupButtonActiveGesture();
283
+ // Re-apply the root lock if moved without dismiss() being called
284
+ if (this.presented) {
285
+ restoreRootFocusTrapAccessibility(this.el);
286
+ }
280
287
  }
281
288
  disconnectedCallback() {
282
289
  if (this.gesture) {
@@ -296,24 +303,32 @@ export class ActionSheet {
296
303
  // Initialize activeRadioId for radio buttons
297
304
  this.buttonsChanged();
298
305
  }
299
- componentDidLoad() {
300
- /**
301
- * Only create gesture if:
302
- * 1. A gesture does not already exist
303
- * 2. App is running in iOS mode
304
- * 3. A wrapper ref exists
305
- * 4. A group ref exists
306
- */
306
+ /**
307
+ * Only create gesture if:
308
+ * 1. A gesture does not already exist
309
+ * 2. App is running in iOS mode
310
+ * 3. A wrapper ref exists
311
+ * 4. A group ref exists
312
+ * 5. The host is still connected, since a reconnect can schedule this and
313
+ * disconnect again before the task runs
314
+ */
315
+ setupButtonActiveGesture() {
307
316
  const { groupEl, wrapperEl } = this;
308
- if (!this.gesture && getIonMode(this) === 'ios' && wrapperEl && groupEl) {
309
- readTask(() => {
310
- const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
311
- if (!isScrollable) {
312
- this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
313
- this.gesture.enable(true);
314
- }
315
- });
317
+ if (getIonMode(this) !== 'ios' || !wrapperEl || !groupEl) {
318
+ return;
316
319
  }
320
+ readTask(() => {
321
+ // Two calls before the first flushes would otherwise both create a
322
+ // gesture, orphaning the first with its listeners still bound.
323
+ if (this.gesture || !this.el.isConnected || groupEl.scrollHeight > groupEl.clientHeight) {
324
+ return;
325
+ }
326
+ this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
327
+ this.gesture.enable(true);
328
+ });
329
+ }
330
+ componentDidLoad() {
331
+ this.setupButtonActiveGesture();
317
332
  /**
318
333
  * If action sheet was rendered with isOpen="true"
319
334
  * then we should open action sheet immediately.
@@ -406,17 +421,17 @@ export class ActionSheet {
406
421
  const cancelButton = allButtons.find((b) => b.role === 'cancel');
407
422
  const buttons = allButtons.filter((b) => b.role !== 'cancel');
408
423
  const headerID = `action-sheet-${overlayIndex}-header`;
409
- return (h(Host, { key: '7685831da9a78b73473246a2cea95cefa79a53c3', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1", ...htmlAttributes, style: {
424
+ return (h(Host, { key: '326d4af08e832e10e1882fbbf67dba3221095865', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1", ...htmlAttributes, style: {
410
425
  zIndex: `${20000 + this.overlayIndex}`,
411
426
  }, class: {
412
427
  [mode]: true,
413
428
  ...getClassMap(this.cssClass),
414
429
  'overlay-hidden': true,
415
430
  'action-sheet-translucent': this.translucent,
416
- }, onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: 'c70f00e401cac99b89412d1adb867f35bc855d57', tappable: this.backdropDismiss }), h("div", { key: '3332893ce3098f1435875480b1269b2821d41660', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'eb406b0a9e303d6f94c5c7aa99c6f4c089bfbd41', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '92ec855379f10e1e0bfce6ff68b45d3cda0c137c', class: "action-sheet-container" }, h("div", { key: 'bc88a396d75396f574961471bf7e6c4edb513353', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (h("div", { key: '33329e0193818888bdcaa443ff5ea301802e0787', id: headerID, class: {
431
+ }, onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '8cb6a0d763a60f61f563a1b7d572ad5e9afd6e40', tappable: this.backdropDismiss }), h("div", { key: 'f8b8da0f52ae674a5e313632ee3d049bed3f813f', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '53cf0d1b01a2cda23c27fc8b96edaccf892e61b3', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '6df261ff946c3b4496535df04cc70e2cfa3cc2da', class: "action-sheet-container" }, h("div", { key: '6f6f2846d19baa738651b990d8613aa0ecac9479', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (h("div", { key: '3f36df8eaaedb5e61a41bbf44134f25f263d1e7e', id: headerID, class: {
417
432
  'action-sheet-title': true,
418
433
  'action-sheet-has-sub-title': this.subHeader !== undefined,
419
- } }, header, this.subHeader && h("div", { key: '92ac5a9217a12b7417f7aca9c4fdb7bf6b051364', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (h("div", { key: '020463b830fa48fc3ae647ea64f2aaa4d0969305', class: "action-sheet-group action-sheet-group-cancel" }, h("button", { key: 'cefa9c70a2233f6652a81b1a2eae6e717712144d', ...cancelButton.htmlAttributes, type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h("span", { key: '56d7e2f8bfb3644e4476895164d334445fda9b2f', class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { key: '6a4a49254ec5cd96f4e0dce9447f90d8cac81913', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", { key: '7d3c6e8d70b0922ea0f75520856285ce1005c891' })))))), h("div", { key: '958fc43e603c6a7f5d1e649d3326fce0f163b5d0', tabindex: "0", "aria-hidden": "true" })));
434
+ } }, header, this.subHeader && h("div", { key: 'a6b2bf51123eaae4ed873e65c00c426e9c511ac0', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (h("div", { key: '4dd96553327003b899bc03a815a06a7cce35db29', class: "action-sheet-group action-sheet-group-cancel" }, h("button", { key: 'a1928040a3d20f2e50230b7d6003467d2916f5b4', ...cancelButton.htmlAttributes, type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h("span", { key: '2fa9d0e4072f1fd55f08048966495a627a14ef8f', class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { key: 'c2eec9967cb9f0b75d4428bb548674199089203c', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", { key: '09e71f28d77ae16481b832863f49b3f7d7dd76f9' })))))), h("div", { key: '386fbe5ca2a88e9b52bd3b9d8f3daddbc630e6f6', tabindex: "0", "aria-hidden": "true" })));
420
435
  }
421
436
  static get is() { return "ion-action-sheet"; }
422
437
  static get encapsulation() { return "scoped"; }
@@ -8,7 +8,7 @@ import { raf } from "../../utils/helpers";
8
8
  import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
10
  import { getOverlayLabelJustify, getOverlayLabelPlacement } from "../../utils/overlay-control-label";
11
- import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
11
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, restoreRootFocusTrapAccessibility, safeCall, setOverlayId, } from "../../utils/overlays";
12
12
  import { sanitizeDOMString } from "../../utils/sanitization/index";
13
13
  import { renderOptionLabel } from "../../utils/select-option-render";
14
14
  import { getClassMap } from "../../utils/theme";
@@ -198,10 +198,15 @@ export class Alert {
198
198
  this.triggerChanged();
199
199
  /**
200
200
  * If the alert was previously connected and is being reattached, the
201
- * ResizeObserver was disconnected. componentDidLoad only fires once per
202
- * instance, so re-establish the observer here on reconnect.
201
+ * `ResizeObserver` and the button gesture were torn down. `componentDidLoad`
202
+ * only fires once per instance, so re-establish both here on reconnect.
203
203
  */
204
204
  this.setupButtonGroupResizeObserver();
205
+ this.setupButtonActiveGesture();
206
+ // Re-apply the root lock if moved without dismiss() being called
207
+ if (this.presented) {
208
+ restoreRootFocusTrapAccessibility(this.el);
209
+ }
205
210
  }
206
211
  componentWillLoad() {
207
212
  if (!this.htmlAttributes?.id) {
@@ -223,17 +228,20 @@ export class Alert {
223
228
  this.buttonGroupResizeObserver?.disconnect();
224
229
  this.buttonGroupResizeObserver = undefined;
225
230
  }
226
- componentDidLoad() {
227
- /**
228
- * Only create gesture if:
229
- * 1. A gesture does not already exist
230
- * 2. App is running in iOS mode
231
- * 3. A wrapper ref exists
232
- */
231
+ /**
232
+ * Only create gesture if:
233
+ * 1. A gesture does not already exist
234
+ * 2. App is running in iOS mode
235
+ * 3. A wrapper ref exists
236
+ */
237
+ setupButtonActiveGesture() {
233
238
  if (!this.gesture && getIonMode(this) === 'ios' && this.wrapperEl) {
234
239
  this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
235
240
  this.gesture.enable(true);
236
241
  }
242
+ }
243
+ componentDidLoad() {
244
+ this.setupButtonActiveGesture();
237
245
  this.setupButtonGroupResizeObserver();
238
246
  /**
239
247
  * If alert was rendered with isOpen="true"
@@ -556,14 +564,14 @@ export class Alert {
556
564
  * If neither are defined, do not set aria-labelledby.
557
565
  */
558
566
  const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
559
- return (h(Host, { key: '022f3463b8e6c52064b90ec304c524847c3d5ad3', tabindex: "-1", style: {
567
+ return (h(Host, { key: '083b5250dc4c76e85240e0225abcb7ca2b66de2f', tabindex: "-1", style: {
560
568
  zIndex: `${20000 + overlayIndex}`,
561
569
  }, class: {
562
570
  ...getClassMap(this.cssClass),
563
571
  [mode]: true,
564
572
  'overlay-hidden': true,
565
573
  'alert-translucent': this.translucent,
566
- }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: 'c3cd05738bc2834f54707edeb2fae06ec10d6fd2', tappable: this.backdropDismiss }), h("div", { key: 'b44fadd9ba7ddf073854c5035538d11ae8e66bc2', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'fafea048141a6c7957e62aef31faa8041dd610c1', 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 }, h("div", { key: '3ad9d2d4b7cf425eab8293ddc12eff0fe8df1517', class: "alert-head" }, header && (h("h2", { key: '7d9154f5ee595b7e4da6ecf3a20871f104c1256e', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '1f891f38004be6964e9406b84dd580145c42516a', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '2ab4d344ecb7e384e8f6d3d3e59ee5a1bbcc832c', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: '78a4ff09aa3aaafcd0dc2a42d036767d83b3cfa2', tabindex: "0", "aria-hidden": "true" })));
574
+ }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '65c92a956d998ae9016396dd2a29c42ab7376d0e', tappable: this.backdropDismiss }), h("div", { key: 'f2288fa0b7ef9d0bf031c168fe78c48422cf91c8', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'dbb109435c378f77c6b0231e58756f8a0467732d', 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 }, h("div", { key: '075597f94719673cf1f894a8566e1036849afa75', class: "alert-head" }, header && (h("h2", { key: 'f96f4b1db8473c62040beed6e96108c733978d73', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: 'dbd824ef19a07bddde4eb928f11de7c7cadf98b8', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '4774fa13700dd23aec7930492acae80de3bdf5d1', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: '5c728b7457e231f64294bbec821bdb547c6437dd', tabindex: "0", "aria-hidden": "true" })));
567
575
  }
568
576
  static get is() { return "ion-alert"; }
569
577
  static get encapsulation() { return "scoped"; }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Host, h } from "@stencil/core";
5
5
  import { findClosestIonContent, disableContentScrollY, resetContentScrollY } from "../../utils/content/index";
6
- import { componentOnReady, isEndSide } from "../../utils/helpers";
6
+ import { isEndSide } from "../../utils/helpers";
7
7
  import { printIonWarning } from "../../utils/logging/index";
8
8
  import { watchForOptions } from "../../utils/watch-options";
9
9
  import { getIonMode } from "../../global/ionic-global";
@@ -178,17 +178,19 @@ export class ItemSliding {
178
178
  }
179
179
  }
180
180
  async updateOptions() {
181
- const options = Array.from(this.el.querySelectorAll('ion-item-options'));
182
- /**
183
- * Frameworks that assign element props after inserting the element haven't set
184
- * `side` while `connectedCallback` runs, so reading it any earlier reports every
185
- * option as `end`.
186
- */
187
- await Promise.all(options.map((option) => new Promise((resolve) => componentOnReady(option, resolve))));
181
+ const options = this.el.querySelectorAll('ion-item-options');
188
182
  let sides = 0;
189
183
  // Reset left and right options in case they were removed
190
184
  this.leftOptions = this.rightOptions = undefined;
191
- for (const option of options) {
185
+ for (let i = 0; i < options.length; i++) {
186
+ const item = options.item(i);
187
+ /**
188
+ * We cannot use the componentOnReady helper
189
+ * util here since we need to wait for all of these items
190
+ * to be ready before we set `this.sides` and `this.optsDirty`.
191
+ */
192
+ // eslint-disable-next-line custom-rules/no-component-on-ready-method
193
+ const option = item.componentOnReady !== undefined ? await item.componentOnReady() : item;
192
194
  const side = isEndSide(option.side ?? option.getAttribute('side')) ? 'end' : 'start';
193
195
  if (side === 'start') {
194
196
  this.leftOptions = option;
@@ -387,7 +389,7 @@ export class ItemSliding {
387
389
  }
388
390
  render() {
389
391
  const mode = getIonMode(this);
390
- return (h(Host, { key: '02174ca963753d3a51a4249068f3d436f8acb03d', class: {
392
+ return (h(Host, { key: '15f6a98f8c888e86c29827cdf55d98ace08699dd', class: {
391
393
  [mode]: true,
392
394
  'item-sliding-active-slide': this.state !== 2 /* SlidingState.Disabled */,
393
395
  'item-sliding-active-options-end': (this.state & 8 /* SlidingState.End */) !== 0,
@@ -5,7 +5,7 @@ import { Host, h } from "@stencil/core";
5
5
  import { ENABLE_HTML_CONTENT_DEFAULT } from "../../utils/config";
6
6
  import { raf } from "../../utils/helpers";
7
7
  import { createLockController } from "../../utils/lock-controller";
8
- import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, prepareOverlay, present, setOverlayId, } from "../../utils/overlays";
8
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, prepareOverlay, present, restoreRootFocusTrapAccessibility, setOverlayId, } from "../../utils/overlays";
9
9
  import { sanitizeDOMString } from "../../utils/sanitization/index";
10
10
  import { getClassMap } from "../../utils/theme";
11
11
  import { config } from "../../global/config";
@@ -82,6 +82,10 @@ export class Loading {
82
82
  connectedCallback() {
83
83
  prepareOverlay(this.el);
84
84
  this.triggerChanged();
85
+ // Re-apply the root lock if moved without dismiss() being called
86
+ if (this.presented) {
87
+ restoreRootFocusTrapAccessibility(this.el);
88
+ }
85
89
  }
86
90
  componentWillLoad() {
87
91
  if (this.spinner === undefined) {
@@ -182,14 +186,14 @@ export class Loading {
182
186
  * Otherwise, don't set aria-labelledby.
183
187
  */
184
188
  const ariaLabelledBy = message !== undefined ? msgId : null;
185
- return (h(Host, { key: '2d14122ff3081de73631a7fdd4affdd5c73b8618', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1", ...htmlAttributes, style: {
189
+ return (h(Host, { key: 'b4430bc66aedeca19d5645667cba73c169c4bd76', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1", ...htmlAttributes, style: {
186
190
  zIndex: `${40000 + this.overlayIndex}`,
187
191
  }, onIonBackdropTap: this.onBackdropTap, class: {
188
192
  ...getClassMap(this.cssClass),
189
193
  [mode]: true,
190
194
  'overlay-hidden': true,
191
195
  'loading-translucent': this.translucent,
192
- } }, h("ion-backdrop", { key: 'b7d5bb0d670a20c159d7f67327bf3b1489449188', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '085ce92bd2004d323ab47eb472b83826e48dc619', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '4ecd5bfc0bbd3da434d32f0f319f867a44c5e1f1', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: '5a4498e1421e09d01c0ee4312eae5272e95c3127', class: "loading-spinner" }, h("ion-spinner", { key: '1b3bc7d45d775195657ead3535f65e6b79f37e84', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: 'bc7c5467b9f1c6ab957f79934e97acc713bdec37', tabindex: "0", "aria-hidden": "true" })));
196
+ } }, h("ion-backdrop", { key: 'dec0df942ae778c99ebd4dbf08d6c2a0a992639d', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '71b2d5fc259666225047fc901648ada1efcd5d4b', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '1d83dc3b57ee70c9e8c0f006c6fa576bd96ecded', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: 'd1cd127e044b8831e396b53122322c1db7e89904', class: "loading-spinner" }, h("ion-spinner", { key: '38c2580cf5659da612872f01801a5fbdc2c023ba', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '90e5e32ffe0df2c691f364149f43374e676bfaa3', tabindex: "0", "aria-hidden": "true" })));
193
197
  }
194
198
  static get is() { return "ion-loading"; }
195
199
  static get encapsulation() { return "scoped"; }
@@ -8,7 +8,7 @@ import { raf, inheritAttributes, hasLazyBuild, getElementRoot } from "../../util
8
8
  import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
10
  import { Style as StatusBarStyle, StatusBar } from "../../utils/native/status-bar";
11
- import { BACKDROP, cleanupRootFocusTrapAccessibility, createTriggerController, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, GESTURE, prepareOverlay, present, setOverlayId, } from "../../utils/overlays";
11
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, createTriggerController, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, GESTURE, prepareOverlay, present, restoreRootFocusTrapAccessibility, setOverlayId, } from "../../utils/overlays";
12
12
  import { getClassMap } from "../../utils/theme";
13
13
  import { deepReady, waitForMount } from "../../utils/transition/index";
14
14
  import { config } from "../../global/config";
@@ -43,6 +43,9 @@ export class Modal {
43
43
  this.inline = false;
44
44
  // Whether or not modal is being dismissed via gesture
45
45
  this.gestureAnimationDismissing = false;
46
+ // True from the first safe-area write in `present()` until the enter
47
+ // animation settles. A position-based read in that window is not the rest position.
48
+ this.isPresenting = false;
46
49
  this.presented = false;
47
50
  /** @internal */
48
51
  this.hasController = false;
@@ -279,6 +282,17 @@ export class Modal {
279
282
  const { el } = this;
280
283
  prepareOverlay(el);
281
284
  this.triggerChanged();
285
+ // A disconnect tears down state this presentation still needs and cannot
286
+ // tell a re-insert from a removal, so put it back.
287
+ if (this.presented || this.isPresenting) {
288
+ this.restoreSafeAreaOverrides();
289
+ }
290
+ // A relocation from `willPresent` reaches these before `present()` has
291
+ // applied the lock, so they apply it instead. Both are idempotent.
292
+ if (this.presented) {
293
+ restoreRootFocusTrapAccessibility(el);
294
+ this.initParentRemovalObserver();
295
+ }
282
296
  }
283
297
  disconnectedCallback() {
284
298
  this.triggerController.removeClickListener();
@@ -456,25 +470,33 @@ export class Modal {
456
470
  // Recalculate isSheetModal before safe-area setup because framework
457
471
  // bindings (e.g., Angular) may not have been applied when componentWillLoad ran.
458
472
  this.isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
459
- // Set initial safe-area overrides before animation
460
- this.setInitialSafeAreaOverrides();
473
+ this.isPresenting = true;
461
474
  const hasCardModal = presentingElement !== undefined;
462
- /**
463
- * We need to change the status bar at the
464
- * start of the animation so that it completes
465
- * by the time the card animation is done.
466
- */
467
- if (hasCardModal && getIonMode(this) === 'ios') {
468
- // Cache the original status bar color before the modal is presented
469
- this.statusBarStyle = await StatusBar.getStyle();
470
- setCardStatusBarDark();
475
+ // Wrapped so a throw cannot strand `isPresenting`, which would suppress
476
+ // the position-based correction for the life of this instance.
477
+ try {
478
+ // Set initial safe-area overrides before animation
479
+ this.setInitialSafeAreaOverrides();
480
+ /**
481
+ * We need to change the status bar at the
482
+ * start of the animation so that it completes
483
+ * by the time the card animation is done.
484
+ */
485
+ if (hasCardModal && getIonMode(this) === 'ios') {
486
+ // Cache the original status bar color before the modal is presented
487
+ this.statusBarStyle = await StatusBar.getStyle();
488
+ setCardStatusBarDark();
489
+ }
490
+ await present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
491
+ presentingEl: presentingElement,
492
+ currentBreakpoint: this.initialBreakpoint,
493
+ backdropBreakpoint: this.backdropBreakpoint,
494
+ expandToScroll: this.expandToScroll,
495
+ });
496
+ }
497
+ finally {
498
+ this.isPresenting = false;
471
499
  }
472
- await present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
473
- presentingEl: presentingElement,
474
- currentBreakpoint: this.initialBreakpoint,
475
- backdropBreakpoint: this.backdropBreakpoint,
476
- expandToScroll: this.expandToScroll,
477
- });
478
500
  // Update safe-area based on actual position after animation
479
501
  this.updateSafeAreaOverrides();
480
502
  // Apply fullscreen safe-area padding if needed
@@ -984,6 +1006,9 @@ export class Modal {
984
1006
  this.cachedOriginalParent.tagName === 'ION-APP') {
985
1007
  return;
986
1008
  }
1009
+ // Both `present()` and a reconnect call this, so drop any existing
1010
+ // observer. Below the guards, so a call that bails cannot leave none.
1011
+ this.cleanupParentRemovalObserver();
987
1012
  this.parentRemovalObserver = new MutationObserver((mutations) => {
988
1013
  mutations.forEach((mutation) => {
989
1014
  if (mutation.type === 'childList' && mutation.removedNodes.length > 0) {
@@ -1062,6 +1087,9 @@ export class Modal {
1062
1087
  // Set the internal offset property with the resolved root safe-area-top value
1063
1088
  if (context.isSheetModal) {
1064
1089
  this.updateSheetOffsetTop();
1090
+ // A restore after a DOM move runs this a second time for the same
1091
+ // modal, so drop the previous subscription rather than stacking one.
1092
+ this.unsubscribeRootSafeAreaTop?.();
1065
1093
  this.unsubscribeRootSafeAreaTop = onRootSafeAreaTopChange((safeAreaTop) => this.updateSheetOffsetTop(safeAreaTop));
1066
1094
  }
1067
1095
  }
@@ -1180,6 +1208,31 @@ export class Modal {
1180
1208
  const { contentEl } = this.findContentAndFooter();
1181
1209
  this.clearContentSafeAreaPadding(contentEl);
1182
1210
  }
1211
+ /**
1212
+ * Re-applies what `cleanupSafeAreaOverrides()` removed for a modal moved
1213
+ * while presented. Anything needing no measurement goes on synchronously so
1214
+ * the modal is never painted without safe-area. The position-based
1215
+ * correction waits a frame for the layout pass it reads.
1216
+ */
1217
+ restoreSafeAreaOverrides() {
1218
+ this.setInitialSafeAreaOverrides();
1219
+ this.applyFullscreenSafeArea();
1220
+ raf(() => {
1221
+ // A dismiss or another move can land first, and a read before the enter
1222
+ // animation settles is not the rest position. `present()` redoes it.
1223
+ if (!this.presented || !this.el.isConnected || this.isPresenting) {
1224
+ return;
1225
+ }
1226
+ // A hidden subtree carries `display: none`, so there is no box and the
1227
+ // read would write the safe-area for a modal touching no edge. The
1228
+ // prediction applied above holds until the modal is shown again.
1229
+ const { width, height } = this.el.getBoundingClientRect();
1230
+ if (width === 0 && height === 0) {
1231
+ return;
1232
+ }
1233
+ this.updateSafeAreaOverrides();
1234
+ });
1235
+ }
1183
1236
  render() {
1184
1237
  const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
1185
1238
  const showHandle = handle !== false && isSheetModal;
@@ -1187,7 +1240,7 @@ export class Modal {
1187
1240
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1188
1241
  const isHandleCycle = handleBehavior === 'cycle';
1189
1242
  const isSheetModalWithHandle = isSheetModal && showHandle;
1190
- return (h(Host, { key: 'a471c293319cb6ee5ffb7ffafec0b8413e4289de', "no-router": true,
1243
+ return (h(Host, { key: '7c9c736052c5a788cf31040b6b2386dd9ea7454b', "no-router": true,
1191
1244
  // Allow the modal to be navigable when the handle is focusable
1192
1245
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1, ...htmlAttributes, style: {
1193
1246
  zIndex: `${20000 + this.overlayIndex}`,
@@ -1200,7 +1253,7 @@ export class Modal {
1200
1253
  'overlay-hidden': true,
1201
1254
  [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false,
1202
1255
  ...getClassMap(this.cssClass),
1203
- }, onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }, h("ion-backdrop", { key: 'f67934afd4ddad64623856fb641cb6db846df428', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'a23f5cb6cf60c8f717c1dd556bce375829c80a43', class: "modal-shadow" }), h("div", { key: '51eb6cd1070e4b7e49840a78dc7437238c867a01',
1256
+ }, onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }, h("ion-backdrop", { key: '01b5b5765fb3a32393c736065c824bf760728823', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '40fa7727a0923f7d7461dd027f1511a6a148d84a', class: "modal-shadow" }), h("div", { key: '9af934b607f60795bd5bff7bee6eacfc9b14fa35',
1204
1257
  /*
1205
1258
  role and aria-modal must be used on the
1206
1259
  same element. They must also be set inside the
@@ -1213,9 +1266,9 @@ export class Modal {
1213
1266
  without the tabindex focus() would be a no-op and screen readers
1214
1267
  may not properly announce the dialog and its content when it opens.
1215
1268
  */
1216
- role: "dialog", ...inheritedAttributes, "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }, showHandle && (h("button", { key: 'f49a144642b5c227c0c2b00b33f4c7e37a2bf088', class: "modal-handle",
1269
+ role: "dialog", ...inheritedAttributes, "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }, showHandle && (h("button", { key: 'df84a6806413b13efc5b03c862edde83151579a7', class: "modal-handle",
1217
1270
  // Prevents the handle from receiving keyboard focus when it does not cycle
1218
- 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) })), h("slot", { key: 'e781c0d5881762c6b61aa432721a38b49580ff64', onSlotchange: this.onSlotChange }))));
1271
+ 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) })), h("slot", { key: '072d3929ec6f25481946b184d8ac24219011e783', onSlotchange: this.onSlotChange }))));
1219
1272
  }
1220
1273
  static get is() { return "ion-modal"; }
1221
1274
  static get encapsulation() { return "shadow"; }
@@ -7,7 +7,7 @@ import { CoreDelegate, attachComponent, detachComponent } from "../../utils/fram
7
7
  import { addEventListener, raf, hasLazyBuild } from "../../utils/helpers";
8
8
  import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
- import { BACKDROP, cleanupRootFocusTrapAccessibility, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, prepareOverlay, present, setOverlayId, } from "../../utils/overlays";
10
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, prepareOverlay, present, restoreRootFocusTrapAccessibility, setOverlayId, } from "../../utils/overlays";
11
11
  import { isPlatform } from "../../utils/platform";
12
12
  import { getClassMap } from "../../utils/theme";
13
13
  import { deepReady, waitForMount } from "../../utils/transition/index";
@@ -219,6 +219,13 @@ export class Popover {
219
219
  const { configureTriggerInteraction, el } = this;
220
220
  prepareOverlay(el);
221
221
  configureTriggerInteraction();
222
+ // Re-apply the root lock if moved without dismiss() being called
223
+ if (this.presented) {
224
+ restoreRootFocusTrapAccessibility(el);
225
+ // The disconnect tore down the header observer, and `present()` is its
226
+ // only other caller, so a move mid-layout would lose the recalculation.
227
+ this.recalculateContentOnHeaderReady();
228
+ }
222
229
  }
223
230
  disconnectedCallback() {
224
231
  const { destroyTriggerInteraction } = this;
@@ -396,6 +403,9 @@ export class Popover {
396
403
  if (!header || contentElements.length === 0) {
397
404
  return;
398
405
  }
406
+ // Both `present()` and a reconnect call this, so drop any existing
407
+ // observer. Below the guards, so a call that bails cannot leave none.
408
+ this.headerResizeObserver?.disconnect();
399
409
  this.headerResizeObserver = new ResizeObserver(async () => {
400
410
  if (header.offsetHeight > 0) {
401
411
  this.headerResizeObserver?.disconnect();
@@ -468,7 +478,7 @@ export class Popover {
468
478
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
469
479
  const desktop = isPlatform('desktop');
470
480
  const enableArrow = arrow && !parentPopover;
471
- return (h(Host, { key: '52ffc7116969ae1b8b927e67f2acbfe5f5434f70', "aria-modal": "true", "no-router": true, tabindex: "-1", ...htmlAttributes, style: {
481
+ return (h(Host, { key: '5a41565e6129c73112835aab18b7ae213de040f2', "aria-modal": "true", "no-router": true, tabindex: "-1", ...htmlAttributes, style: {
472
482
  zIndex: `${20000 + this.overlayIndex}`,
473
483
  }, class: {
474
484
  ...getClassMap(this.cssClass),
@@ -479,7 +489,7 @@ export class Popover {
479
489
  [`popover-side-${side}`]: true,
480
490
  [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false,
481
491
  'popover-nested': !!parentPopover,
482
- }, onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }, !parentPopover && h("ion-backdrop", { key: '79a8e851dbd22119e21ffb2f4709c555251045c8', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'c46c9f62c3ef3f902e23f27404eaa446a5d8cf88', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '9fdcbbc4ea6c7bde74f646d48eb77296b2c9dd83', class: "popover-arrow", part: "arrow" }), h("div", { key: '138e56bb83462ebb0908edb522b45ecf94b82aeb', class: "popover-content", part: "content" }, h("slot", { key: 'daeefcf002e8d89e91d6e0faf7f63f75b68a2dbe' })))));
492
+ }, onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }, !parentPopover && h("ion-backdrop", { key: '59e724e4a6ce25eae78ccf1668effd988be7232a', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '88d787ca20ac7cbacc4190bd771645dbe6083ad9', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: 'f766e6413cc4545f27a43d5931c033261e3daa2c', class: "popover-arrow", part: "arrow" }), h("div", { key: '675bddff0c071378858bb2d07bec91da68c2652a', class: "popover-content", part: "content" }, h("slot", { key: '1c446b867083016b24b1b3baccd19b9fc08e114a' })))));
483
493
  }
484
494
  static get is() { return "ion-popover"; }
485
495
  static get encapsulation() { return "shadow"; }
@@ -58,6 +58,11 @@ export class SegmentButton {
58
58
  addEventListener(segmentEl, 'ionSelect', this.updateState);
59
59
  addEventListener(segmentEl, 'ionStyle', this.updateStyle);
60
60
  }
61
+ // Prevent buttons from being disabled when associated with segment content
62
+ if (this.contentId && this.disabled) {
63
+ printIonWarning(`[ion-segment-button] - Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
64
+ this.disabled = false;
65
+ }
61
66
  }
62
67
  disconnectedCallback() {
63
68
  const segmentEl = this.segmentEl;
@@ -74,15 +79,6 @@ export class SegmentButton {
74
79
  // Return if there is no contentId defined
75
80
  if (!this.contentId)
76
81
  return;
77
- /**
78
- * Checked here rather than in `connectedCallback` so frameworks that assign element
79
- * props after inserting the element have set `disabled` by now. A disabled ion-segment
80
- * pushes that onto its buttons too, which this guard should not undo.
81
- */
82
- if (this.disabled && this.segmentEl?.disabled !== true) {
83
- printIonWarning(`[ion-segment-button] - Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
84
- this.disabled = false;
85
- }
86
82
  // Attempt to find the Segment Content by its contentId
87
83
  const segmentContent = document.getElementById(this.contentId);
88
84
  // If no associated Segment Content exists, log an error and return
@@ -117,7 +113,7 @@ export class SegmentButton {
117
113
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
118
114
  const mode = getIonMode(this);
119
115
  const hasSegmentColor = () => segmentEl?.color !== undefined;
120
- return (h(Host, { key: 'd8acc71d87e26b32f20b2d0f9a6acc9f0dab0dee', class: {
116
+ return (h(Host, { key: '2b4b7ad8b981d2ee39aba5b9c734de8a5bd045ba', class: {
121
117
  [mode]: true,
122
118
  'in-toolbar': hostContext('ion-toolbar', this.el),
123
119
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
@@ -133,7 +129,7 @@ export class SegmentButton {
133
129
  'ion-activatable': true,
134
130
  'ion-activatable-instant': true,
135
131
  'ion-focusable': true,
136
- } }, h("button", { key: 'ce65da07b1a012bce353b3c6c24eecfbd4071d54', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled, ...this.inheritedAttributes }, h("span", { key: '6c4b4dcd20e407e5dc31674bea23633d8a09187a', class: "button-inner" }, h("slot", { key: '817145ae77a3c5ada88ab95723d881f1bde96b2a' })), mode === 'md' && h("ion-ripple-effect", { key: '054d7e5e2a13013914fac6bbde8efdb28d9b459e' })), h("div", { key: 'c48074881a302510ad4752eeb9383222cd3a54cb', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '7672a6b10ee18ad026b798fbd8207dc3cd5683f9', part: "indicator-background", class: "segment-button-indicator-background" }))));
132
+ } }, h("button", { key: '9cc58cfbe70844a0f5e1a307002e0d04e044be99', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled, ...this.inheritedAttributes }, h("span", { key: '6443551951ce589efdb2d0e1fd1a14e35b82ed19', class: "button-inner" }, h("slot", { key: 'c3548b469ae6e5477d8372cb28bc70dff3a24d18' })), mode === 'md' && h("ion-ripple-effect", { key: 'fb176415ca1702766c4d7a5964ec0bb467bdcb55' })), h("div", { key: 'aa22b4752f8336d0e232a1e0894e87023b284a08', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '61e29ea52048fa0583fce6c20c81614a4d0199cb', part: "indicator-background", class: "segment-button-indicator-background" }))));
137
133
  }
138
134
  static get is() { return "ion-segment-button"; }
139
135
  static get encapsulation() { return "shadow"; }