@ionic/core 8.7.7-nightly.20251014 → 8.7.7

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 (78) hide show
  1. package/components/button.js +3 -7
  2. package/components/header.js +42 -4
  3. package/components/index2.js +74 -3
  4. package/components/ion-input.js +6 -14
  5. package/components/ion-select.js +58 -10
  6. package/components/ion-textarea.js +5 -13
  7. package/components/{notch-controller.js → validity.js} +14 -1
  8. package/dist/cjs/{index-CD5Rjp23.js → index-094mMFB-.js} +76 -5
  9. package/dist/cjs/index.cjs.js +3 -3
  10. package/dist/cjs/ion-app_8.cjs.entry.js +43 -5
  11. package/dist/cjs/ion-button_2.cjs.entry.js +3 -7
  12. package/dist/cjs/ion-input.cjs.entry.js +7 -15
  13. package/dist/cjs/ion-modal.cjs.entry.js +1 -1
  14. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  15. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-select_3.cjs.entry.js +56 -10
  17. package/dist/cjs/ion-textarea.cjs.entry.js +6 -14
  18. package/dist/cjs/ionic.cjs.js +1 -1
  19. package/dist/cjs/{ios.transition-j9CclgEW.js → ios.transition-BOt_uW73.js} +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/{md.transition-CwFyRSfv.js → md.transition-Dt968VXB.js} +1 -1
  22. package/dist/cjs/{notch-controller-Bzqhjm4f.js → validity-C8QoAYT2.js} +14 -0
  23. package/dist/collection/components/button/button.js +3 -7
  24. package/dist/collection/components/header/header.ios.css +27 -1
  25. package/dist/collection/components/header/header.js +5 -4
  26. package/dist/collection/components/header/header.utils.js +37 -0
  27. package/dist/collection/components/input/input.js +6 -14
  28. package/dist/collection/components/select/select.js +59 -11
  29. package/dist/collection/components/textarea/textarea.js +5 -13
  30. package/dist/collection/utils/forms/index.js +1 -0
  31. package/dist/collection/utils/forms/validity.js +15 -0
  32. package/dist/collection/utils/transition/index.js +74 -3
  33. package/dist/docs.json +1 -1
  34. package/dist/esm/{index-D6G2seR8.js → index-r2D9DEro.js} +76 -5
  35. package/dist/esm/index.js +3 -3
  36. package/dist/esm/ion-app_8.entry.js +43 -5
  37. package/dist/esm/ion-button_2.entry.js +3 -7
  38. package/dist/esm/ion-input.entry.js +6 -14
  39. package/dist/esm/ion-modal.entry.js +1 -1
  40. package/dist/esm/ion-nav_2.entry.js +1 -1
  41. package/dist/esm/ion-popover.entry.js +1 -1
  42. package/dist/esm/ion-select_3.entry.js +55 -9
  43. package/dist/esm/ion-textarea.entry.js +5 -13
  44. package/dist/esm/ionic.js +1 -1
  45. package/dist/esm/{ios.transition-Bpq9ixwv.js → ios.transition-BDzw0_Hm.js} +1 -1
  46. package/dist/esm/loader.js +1 -1
  47. package/dist/esm/{md.transition-zOA0oanq.js → md.transition-BzDYi3qq.js} +1 -1
  48. package/dist/esm/{notch-controller-BwelN_JM.js → validity-B8oWougr.js} +14 -1
  49. package/dist/ionic/index.esm.js +1 -1
  50. package/dist/ionic/ionic.esm.js +1 -1
  51. package/dist/ionic/p-43ed1ef5.entry.js +4 -0
  52. package/dist/ionic/p-4c85d268.entry.js +4 -0
  53. package/dist/ionic/p-4cc26913.entry.js +4 -0
  54. package/dist/ionic/p-8bdfc8f6.entry.js +4 -0
  55. package/dist/ionic/{p-DPhQmGJN.js → p-C7hRNDhM.js} +1 -1
  56. package/dist/ionic/p-DUt5fQmA.js +4 -0
  57. package/dist/ionic/{p-9R1XyICs.js → p-DZRJwG4S.js} +1 -1
  58. package/dist/ionic/{p-DCv9sLH2.js → p-DieJyvMP.js} +1 -1
  59. package/dist/ionic/{p-c59314fd.entry.js → p-a80f1b04.entry.js} +1 -1
  60. package/dist/ionic/{p-c85c40ee.entry.js → p-dbbe606a.entry.js} +1 -1
  61. package/dist/ionic/{p-de7b5fa3.entry.js → p-e16b69e1.entry.js} +1 -1
  62. package/dist/ionic/p-f65f9308.entry.js +4 -0
  63. package/dist/types/components/header/header.utils.d.ts +10 -0
  64. package/dist/types/components/input/input.d.ts +0 -4
  65. package/dist/types/components/select/select.d.ts +6 -0
  66. package/dist/types/components/textarea/textarea.d.ts +0 -4
  67. package/dist/types/utils/forms/index.d.ts +1 -0
  68. package/dist/types/utils/forms/validity.d.ts +10 -0
  69. package/dist/types/utils/transition/index.d.ts +9 -0
  70. package/hydrate/index.js +161 -45
  71. package/hydrate/index.mjs +161 -45
  72. package/package.json +2 -2
  73. package/dist/ionic/p-1c8a476d.entry.js +0 -4
  74. package/dist/ionic/p-49f0149c.entry.js +0 -4
  75. package/dist/ionic/p-785026d7.entry.js +0 -4
  76. package/dist/ionic/p-78c74a3e.entry.js +0 -4
  77. package/dist/ionic/p-913a7c1e.entry.js +0 -4
  78. package/dist/ionic/p-CMhMiYSX.js +0 -4
package/hydrate/index.mjs CHANGED
@@ -9261,11 +9261,7 @@ class Button {
9261
9261
  target,
9262
9262
  };
9263
9263
  let fill = this.fill;
9264
- /**
9265
- * We check both undefined and null to
9266
- * work around https://github.com/ionic-team/stencil/issues/3586.
9267
- */
9268
- if (fill == null) {
9264
+ if (fill === undefined) {
9269
9265
  fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
9270
9266
  }
9271
9267
  /**
@@ -9278,7 +9274,7 @@ class Button {
9278
9274
  {
9279
9275
  type !== 'button' && this.renderHiddenButton();
9280
9276
  }
9281
- return (hAsync(Host, { key: 'b105ad09215adb3ca2298acdadf0dc9154bbb9b0', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9277
+ return (hAsync(Host, { key: 'ed82ea53705523f9afc5f1a9addff44cc6424f27', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9282
9278
  [mode]: true,
9283
9279
  [buttonType]: true,
9284
9280
  [`${buttonType}-${expand}`]: expand !== undefined,
@@ -9293,7 +9289,7 @@ class Button {
9293
9289
  'button-disabled': disabled,
9294
9290
  'ion-activatable': true,
9295
9291
  'ion-focusable': true,
9296
- }) }, hAsync(TagType, Object.assign({ key: '66b4e7112bcb9e41d5a723fbbadb0a3104f9ee1d' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), hAsync("span", { key: '1439fc3da280221028dcf7ce8ec9dab273c4d4bb', class: "button-inner" }, hAsync("slot", { key: 'd5269ae1afc87ec7b99746032f59cbae93720a9f', name: "icon-only", onSlotchange: this.slotChanged }), hAsync("slot", { key: '461c83e97aa246aa86d83e14f1e15a288d35041e', name: "start" }), hAsync("slot", { key: '807170d47101f9f6a333dd4ff489c89284f306fe' }), hAsync("slot", { key: 'e67f116dd0349a0d27893e4f3ff0ccef1d402f80', name: "end" })), mode === 'md' && hAsync("ion-ripple-effect", { key: '273f0bd9645a36c1bfd18a5c2ab4f81e22b7b989', type: this.rippleType }))));
9292
+ }) }, hAsync(TagType, Object.assign({ key: 'fadec13053469dd0405bbbc61b70ced568aa4826' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), hAsync("span", { key: '6bf0e5144fb1148002e88038522402b789689d2c', class: "button-inner" }, hAsync("slot", { key: '25da0ca155cfa9e2754842c34f4fd09f576ac2d2', name: "icon-only", onSlotchange: this.slotChanged }), hAsync("slot", { key: '51414065bb11953ec9d818f8d9353589bc9072c5', name: "start" }), hAsync("slot", { key: 'c9b5f8842aeabd20628df2f4600f1257ea913d8d' }), hAsync("slot", { key: '478dd3671c7be1909fc84e672f0fa8dfe6082263', name: "end" })), mode === 'md' && hAsync("ion-ripple-effect", { key: 'e1d55f85a55144d743f58a5914cd116cb065fa8c', type: this.rippleType }))));
9297
9293
  }
9298
9294
  get el() { return getElement(this); }
9299
9295
  static get watchers() { return {
@@ -15227,6 +15223,8 @@ class Grid {
15227
15223
  }
15228
15224
 
15229
15225
  const TRANSITION = 'all 0.2s ease-in-out';
15226
+ const ROLE_NONE = 'none';
15227
+ const ROLE_BANNER = 'banner';
15230
15228
  const cloneElement = (tagName) => {
15231
15229
  const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
15232
15230
  if (getCachedEl !== null) {
@@ -15353,6 +15351,7 @@ const setHeaderActive = (headerIndex, active = true) => {
15353
15351
  const toolbars = headerIndex.toolbars;
15354
15352
  const ionTitles = toolbars.map((toolbar) => toolbar.ionTitleEl);
15355
15353
  if (active) {
15354
+ headerEl.setAttribute('role', ROLE_BANNER);
15356
15355
  headerEl.classList.remove('header-collapse-condense-inactive');
15357
15356
  ionTitles.forEach((ionTitle) => {
15358
15357
  if (ionTitle) {
@@ -15361,6 +15360,16 @@ const setHeaderActive = (headerIndex, active = true) => {
15361
15360
  });
15362
15361
  }
15363
15362
  else {
15363
+ /**
15364
+ * There can only be one banner landmark per page.
15365
+ * By default, all ion-headers have the banner role.
15366
+ * This causes an accessibility issue when using a
15367
+ * condensed header since there are two ion-headers
15368
+ * on the page at once (active and inactive).
15369
+ * To solve this, the role needs to be toggled
15370
+ * based on which header is active.
15371
+ */
15372
+ headerEl.setAttribute('role', ROLE_NONE);
15364
15373
  headerEl.classList.add('header-collapse-condense-inactive');
15365
15374
  /**
15366
15375
  * The small title should only be accessed by screen readers
@@ -15420,8 +15429,32 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
15420
15429
  });
15421
15430
  });
15422
15431
  };
15432
+ /**
15433
+ * Get the role type for the ion-header.
15434
+ *
15435
+ * @param isInsideMenu If ion-header is inside ion-menu.
15436
+ * @param isCondensed If ion-header has collapse="condense".
15437
+ * @param mode The current mode.
15438
+ * @returns 'none' if inside ion-menu or if condensed in md
15439
+ * mode, otherwise 'banner'.
15440
+ */
15441
+ const getRoleType = (isInsideMenu, isCondensed, mode) => {
15442
+ // If the header is inside a menu, it should not have the banner role.
15443
+ if (isInsideMenu) {
15444
+ return ROLE_NONE;
15445
+ }
15446
+ /**
15447
+ * Only apply role="none" to `md` mode condensed headers
15448
+ * since the large header is never shown.
15449
+ */
15450
+ if (isCondensed && mode === 'md') {
15451
+ return ROLE_NONE;
15452
+ }
15453
+ // Default to banner role.
15454
+ return ROLE_BANNER;
15455
+ };
15423
15456
 
15424
- const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:0px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header.header-ios:not(.header-collapse-main):has(~ion-content ion-header.header-ios[collapse=condense],~ion-content ion-header.header-ios.header-collapse-condense){opacity:0}";
15457
+ const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-fade.header-transitioning ion-toolbar{--background:transparent;--border-style:none}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:0px;z-index:1}.header-collapse-condense ion-toolbar{z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense ion-toolbar,.header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar{--background:var(--ion-background-color, #fff)}.header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar{--border-style:none;--opacity-scale:1}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header.header-ios:not(.header-collapse-main):has(~ion-content ion-header.header-ios[collapse=condense],~ion-content ion-header.header-ios.header-collapse-condense){opacity:0}";
15425
15458
 
15426
15459
  const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}";
15427
15460
 
@@ -15564,16 +15597,17 @@ class Header {
15564
15597
  const { translucent, inheritedAttributes } = this;
15565
15598
  const mode = getIonMode$1(this);
15566
15599
  const collapse = this.collapse || 'none';
15600
+ const isCondensed = collapse === 'condense';
15567
15601
  // banner role must be at top level, so remove role if inside a menu
15568
- const roleType = hostContext('ion-menu', this.el) ? 'none' : 'banner';
15569
- return (hAsync(Host, Object.assign({ key: 'b6cc27f0b08afc9fcc889683525da765d80ba672', role: roleType, class: {
15602
+ const roleType = getRoleType(hostContext('ion-menu', this.el), isCondensed, mode);
15603
+ return (hAsync(Host, Object.assign({ key: '863c4568cd7b8c0ec55109f193bbbaed68a1346e', role: roleType, class: {
15570
15604
  [mode]: true,
15571
15605
  // Used internally for styling
15572
15606
  [`header-${mode}`]: true,
15573
15607
  [`header-translucent`]: this.translucent,
15574
15608
  [`header-collapse-${collapse}`]: true,
15575
15609
  [`header-translucent-${mode}`]: this.translucent,
15576
- } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '395766d4dcee3398bc91960db21f922095292f14', class: "header-background" }), hAsync("slot", { key: '09a67ece27b258ff1248805d43d92a49b2c6859a' })));
15610
+ } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '25c3bdce328b0b35607d154c8b8374679313d881', class: "header-background" }), hAsync("slot", { key: 'b44fab0a9be7920b9650da26117c783e751e1702' })));
15577
15611
  }
15578
15612
  get el() { return getElement(this); }
15579
15613
  static get style() { return {
@@ -16385,6 +16419,19 @@ const isOptionSelected = (currentValue, compareValue, compareWith) => {
16385
16419
  }
16386
16420
  };
16387
16421
 
16422
+ /**
16423
+ * Checks if the form element is in an invalid state based on
16424
+ * Ionic validation classes.
16425
+ *
16426
+ * @param el The form element to check.
16427
+ * @returns `true` if the element is invalid, `false` otherwise.
16428
+ */
16429
+ const checkInvalidState = (el) => {
16430
+ const hasIonTouched = el.classList.contains('ion-touched');
16431
+ const hasIonInvalid = el.classList.contains('ion-invalid');
16432
+ return hasIonTouched && hasIonInvalid;
16433
+ };
16434
+
16388
16435
  /**
16389
16436
  * Used to update a scoped component that uses emulated slots. This fires when
16390
16437
  * content is passed into the slot or when the content inside of a slot changes.
@@ -16750,20 +16797,12 @@ class Input {
16750
16797
  componentWillLoad() {
16751
16798
  this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes$1(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
16752
16799
  }
16753
- /**
16754
- * Checks if the input is in an invalid state based on Ionic validation classes
16755
- */
16756
- checkInvalidState() {
16757
- const hasIonTouched = this.el.classList.contains('ion-touched');
16758
- const hasIonInvalid = this.el.classList.contains('ion-invalid');
16759
- return hasIonTouched && hasIonInvalid;
16760
- }
16761
16800
  connectedCallback() {
16762
16801
  const { el } = this;
16763
16802
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
16764
16803
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
16765
16804
  // Always set initial state
16766
- this.isInvalid = this.checkInvalidState();
16805
+ this.isInvalid = checkInvalidState(el);
16767
16806
  this.debounceChanged();
16768
16807
  }
16769
16808
  componentDidLoad() {
@@ -17017,7 +17056,7 @@ class Input {
17017
17056
  * TODO(FW-5592): Remove hasStartEndSlots condition
17018
17057
  */
17019
17058
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
17020
- return (hAsync(Host, { key: '8a51f0300d5bc66392f9ab9a6fa0b5d388072a33', class: createColorClasses$1(this.color, {
17059
+ return (hAsync(Host, { key: '97b5308021064d9e7434ef2d3d96f27045c1b0c4', class: createColorClasses$1(this.color, {
17021
17060
  [mode]: true,
17022
17061
  'has-value': hasValue,
17023
17062
  'has-focus': hasFocus,
@@ -17028,14 +17067,14 @@ class Input {
17028
17067
  'in-item': inItem,
17029
17068
  'in-item-color': hostContext('ion-item.ion-color', this.el),
17030
17069
  'input-disabled': disabled,
17031
- }) }, hAsync("label", { key: '9f8cf88d7d0e27931b51bd9c67f048c7fc6f5703', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '7ad30bf9777774062a6ccf9a3ba804f251eef1bb', class: "native-wrapper", onClick: this.onLabelClick }, hAsync("slot", { key: '8af0b0325d101df8eed7d24f2767d6ca4d307319', name: "start" }), hAsync("input", Object.assign({ key: '1c53f7f9fa2567f3df19681cf4e7c21be382eae6', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (hAsync("button", { key: 'b081d0e1ec1444b4c9cca145fc9cd2ad4a68b3da', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
17070
+ }) }, hAsync("label", { key: '353f68726ce180299bd9adc81e5ff7d26a48f54f', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '2034b4bad04fc157f3298a1805819216b6f439d0', class: "native-wrapper", onClick: this.onLabelClick }, hAsync("slot", { key: '96bb5e30176b2bd76dfb75bfbf6c1c3d4403f4bb', name: "start" }), hAsync("input", Object.assign({ key: '1a1d75b0e414a95c89d5a760757c33548d234aca', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (hAsync("button", { key: '95f3df17b7691d9a2e7dcd4a51f16a94aa3ca36f', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
17032
17071
  /**
17033
17072
  * This prevents mobile browsers from
17034
17073
  * blurring the input when the clear
17035
17074
  * button is activated.
17036
17075
  */
17037
17076
  ev.preventDefault();
17038
- }, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '01535299241c3635460c05646420acf62a1ff567', "aria-hidden": "true", icon: clearIconData }))), hAsync("slot", { key: '480f3eb58b08ae792866a5b9b4c068748c5567cc', name: "end" })), shouldRenderHighlight && hAsync("div", { key: 'a8609cacee88e4a09f1cca65b6a47cb79a56f35e', class: "input-highlight" })), this.renderBottomContent()));
17077
+ }, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '16b0af75eed50c8115fb5597f73b5fbf71c2530e', "aria-hidden": "true", icon: clearIconData }))), hAsync("slot", { key: 'c48da0f8ddb3764ac43efa705bb4a6bb2d9cc2fd', name: "end" })), shouldRenderHighlight && hAsync("div", { key: 'f15238481fc20de56ca7ecb6e350b3c024cc755e', class: "input-highlight" })), this.renderBottomContent()));
17039
17078
  }
17040
17079
  get el() { return getElement(this); }
17041
17080
  static get watchers() { return {
@@ -20674,11 +20713,22 @@ const iosTransitionAnimation$1 = () => Promise.resolve().then(function () { retu
20674
20713
  const mdTransitionAnimation$1 = () => Promise.resolve().then(function () { return md_transition; });
20675
20714
  const focusController = createFocusController();
20676
20715
  // TODO(FW-2832): types
20716
+ /**
20717
+ * Executes the main page transition.
20718
+ * It also manages the lifecycle of header visibility (if any)
20719
+ * to prevent visual flickering in iOS. The flickering only
20720
+ * occurs for a condensed header that is placed above the content.
20721
+ *
20722
+ * @param opts Options for the transition.
20723
+ * @returns A promise that resolves when the transition is complete.
20724
+ */
20677
20725
  const transition = (opts) => {
20678
20726
  return new Promise((resolve, reject) => {
20679
20727
  writeTask(() => {
20680
- beforeTransition(opts);
20681
- runTransition(opts).then((result) => {
20728
+ const transitioningInactiveHeader = getIosIonHeader(opts);
20729
+ beforeTransition(opts, transitioningInactiveHeader);
20730
+ runTransition(opts)
20731
+ .then((result) => {
20682
20732
  if (result.animation) {
20683
20733
  result.animation.destroy();
20684
20734
  }
@@ -20687,15 +20737,21 @@ const transition = (opts) => {
20687
20737
  }, (error) => {
20688
20738
  afterTransition(opts);
20689
20739
  reject(error);
20740
+ })
20741
+ .finally(() => {
20742
+ // Ensure that the header is restored to its original state.
20743
+ setHeaderTransitionClass(transitioningInactiveHeader, false);
20690
20744
  });
20691
20745
  });
20692
20746
  });
20693
20747
  };
20694
- const beforeTransition = (opts) => {
20748
+ const beforeTransition = (opts, transitioningInactiveHeader) => {
20695
20749
  const enteringEl = opts.enteringEl;
20696
20750
  const leavingEl = opts.leavingEl;
20697
20751
  focusController.saveViewFocus(leavingEl);
20698
20752
  setZIndex(enteringEl, leavingEl, opts.direction);
20753
+ // Prevent flickering of the header by adding a class.
20754
+ setHeaderTransitionClass(transitioningInactiveHeader, true);
20699
20755
  if (opts.showGoBack) {
20700
20756
  enteringEl.classList.add('can-go-back');
20701
20757
  }
@@ -20884,6 +20940,39 @@ const setZIndex = (enteringEl, leavingEl, direction) => {
20884
20940
  leavingEl.style.zIndex = '100';
20885
20941
  }
20886
20942
  };
20943
+ /**
20944
+ * Add a class to ensure that the header (if any)
20945
+ * does not flicker during the transition. By adding the
20946
+ * transitioning class, we ensure that the header has
20947
+ * the necessary styles to prevent the following flickers:
20948
+ * 1. When entering a page with a condensed header, the
20949
+ * header should never be visible. However,
20950
+ * it briefly renders the background color while
20951
+ * the transition is occurring.
20952
+ * 2. When leaving a page with a condensed header, the
20953
+ * header has an opacity of 0 and the pages
20954
+ * have a z-index which causes the entering page to
20955
+ * briefly show it's content underneath the leaving page.
20956
+ * 3. When entering a page or leaving a page with a fade
20957
+ * header, the header should not have a background color.
20958
+ * However, it briefly shows the background color while
20959
+ * the transition is occurring.
20960
+ *
20961
+ * @param header The header element to modify.
20962
+ * @param isTransitioning Whether the transition is occurring.
20963
+ */
20964
+ const setHeaderTransitionClass = (header, isTransitioning) => {
20965
+ if (!header) {
20966
+ return;
20967
+ }
20968
+ const transitionClass = 'header-transitioning';
20969
+ if (isTransitioning) {
20970
+ header.classList.add(transitionClass);
20971
+ }
20972
+ else {
20973
+ header.classList.remove(transitionClass);
20974
+ }
20975
+ };
20887
20976
  const getIonPageElement = (element) => {
20888
20977
  if (element.classList.contains('ion-page')) {
20889
20978
  return element;
@@ -20895,6 +20984,27 @@ const getIonPageElement = (element) => {
20895
20984
  // idk, return the original element so at least something animates and we don't have a null pointer
20896
20985
  return element;
20897
20986
  };
20987
+ /**
20988
+ * Retrieves the ion-header element from a page based on the
20989
+ * direction of the transition.
20990
+ *
20991
+ * @param opts Options for the transition.
20992
+ * @returns The ion-header element or null if not found or not in 'ios' mode.
20993
+ */
20994
+ const getIosIonHeader = (opts) => {
20995
+ const enteringEl = opts.enteringEl;
20996
+ const leavingEl = opts.leavingEl;
20997
+ const direction = opts.direction;
20998
+ const mode = opts.mode;
20999
+ if (mode !== 'ios') {
21000
+ return null;
21001
+ }
21002
+ const element = direction === 'back' ? leavingEl : enteringEl;
21003
+ if (!element) {
21004
+ return null;
21005
+ }
21006
+ return element.querySelector('ion-header');
21007
+ };
20898
21008
 
20899
21009
  const KEYBOARD_DID_OPEN = 'ionKeyboardDidShow';
20900
21010
 
@@ -33056,6 +33166,10 @@ class Select {
33056
33166
  * is applied in both cases.
33057
33167
  */
33058
33168
  this.hasFocus = false;
33169
+ /**
33170
+ * Track validation state for proper aria-live announcements.
33171
+ */
33172
+ this.isInvalid = false;
33059
33173
  /**
33060
33174
  * The text to display on the cancel button.
33061
33175
  */
@@ -33178,9 +33292,12 @@ class Select {
33178
33292
  this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {
33179
33293
  this.updateOverlayOptions();
33180
33294
  });
33295
+ // Always set initial state
33296
+ this.isInvalid = checkInvalidState(this.el);
33181
33297
  }
33182
33298
  componentWillLoad() {
33183
33299
  this.inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
33300
+ this.hintTextID = this.getHintTextID();
33184
33301
  }
33185
33302
  componentDidLoad() {
33186
33303
  /**
@@ -33204,6 +33321,11 @@ class Select {
33204
33321
  this.notchController.destroy();
33205
33322
  this.notchController = undefined;
33206
33323
  }
33324
+ // Clean up validation observer to prevent memory leaks.
33325
+ if (this.validationObserver) {
33326
+ this.validationObserver.disconnect();
33327
+ this.validationObserver = undefined;
33328
+ }
33207
33329
  }
33208
33330
  /**
33209
33331
  * Open the select overlay. The overlay is either an alert, action sheet, or popover,
@@ -33674,11 +33796,11 @@ class Select {
33674
33796
  }
33675
33797
  renderListbox() {
33676
33798
  const { disabled, inputId, isExpanded, required } = this;
33677
- return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
33799
+ return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.hintTextID, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
33678
33800
  }
33679
33801
  getHintTextID() {
33680
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
33681
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
33802
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33803
+ if (isInvalid && errorText) {
33682
33804
  return errorTextId;
33683
33805
  }
33684
33806
  if (helperText) {
@@ -33690,10 +33812,10 @@ class Select {
33690
33812
  * Renders the helper text or error text values
33691
33813
  */
33692
33814
  renderHintText() {
33693
- const { helperText, errorText, helperTextId, errorTextId } = this;
33815
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33694
33816
  return [
33695
- hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText),
33696
- hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText),
33817
+ hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null),
33818
+ hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null),
33697
33819
  ];
33698
33820
  }
33699
33821
  /**
@@ -33741,7 +33863,7 @@ class Select {
33741
33863
  * TODO(FW-5592): Remove hasStartEndSlots condition
33742
33864
  */
33743
33865
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
33744
- return (hAsync(Host, { key: 'c03fb65e8fc9f9aab295e07b282377d57d910519', onClick: this.onClick, class: createColorClasses$1(this.color, {
33866
+ return (hAsync(Host, { key: '35b5e18e6f79a802ff2d46d1242e80ff755cc0b9', onClick: this.onClick, class: createColorClasses$1(this.color, {
33745
33867
  [mode]: true,
33746
33868
  'in-item': inItem,
33747
33869
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -33759,7 +33881,7 @@ class Select {
33759
33881
  [`select-justify-${justify}`]: justifyEnabled,
33760
33882
  [`select-shape-${shape}`]: shape !== undefined,
33761
33883
  [`select-label-placement-${labelPlacement}`]: true,
33762
- }) }, hAsync("label", { key: '0d0c8ec55269adcac625f2899a547f4e7f3e3741', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: 'f6dfc93c0e23cbe75a2947abde67d842db2dad78', class: "select-wrapper-inner" }, hAsync("slot", { key: '957bfadf9f101f519091419a362d3abdc2be66f6', name: "start" }), hAsync("div", { key: 'ca349202a484e7f2e884533fd330f0b136754f7d', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: 'f0e62a6533ff1c8f62bd2d27f60b23385c4fa9ed', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: 'fb840d46bafafb09898ebeebbe8c181906a3d8a2', class: "select-highlight" })), this.renderBottomContent()));
33884
+ }) }, hAsync("label", { key: '6005b34a0c50bc4d7653a4276bc232ecd02e083c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: 'c7e07aa81ae856c057f16275dd058f37c5670a47', class: "select-wrapper-inner" }, hAsync("slot", { key: '7fc2deefe0424404caacdbbd9e08ed43ba55d28a', name: "start" }), hAsync("div", { key: '157d74ee717b1bc30b5f1c233a09b0c8456aa68e', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: 'ea66db304528b82bf9317730b6dce3db2612f235', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: '786eb1530b7476f0615d4e7c0bf4e7e4dc66509c', class: "select-highlight" })), this.renderBottomContent()));
33763
33885
  }
33764
33886
  get el() { return getElement(this); }
33765
33887
  static get watchers() { return {
@@ -33800,6 +33922,8 @@ class Select {
33800
33922
  "required": [4],
33801
33923
  "isExpanded": [32],
33802
33924
  "hasFocus": [32],
33925
+ "isInvalid": [32],
33926
+ "hintTextID": [32],
33803
33927
  "open": [64]
33804
33928
  },
33805
33929
  "$listeners$": undefined,
@@ -34987,20 +35111,12 @@ class Textarea {
34987
35111
  this.el.click();
34988
35112
  }
34989
35113
  }
34990
- /**
34991
- * Checks if the textarea is in an invalid state based on Ionic validation classes
34992
- */
34993
- checkValidationState() {
34994
- const hasIonTouched = this.el.classList.contains('ion-touched');
34995
- const hasIonInvalid = this.el.classList.contains('ion-invalid');
34996
- return hasIonTouched && hasIonInvalid;
34997
- }
34998
35114
  connectedCallback() {
34999
35115
  const { el } = this;
35000
35116
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
35001
35117
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
35002
35118
  // Always set initial state
35003
- this.isInvalid = this.checkValidationState();
35119
+ this.isInvalid = checkInvalidState(this.el);
35004
35120
  this.debounceChanged();
35005
35121
  }
35006
35122
  disconnectedCallback() {
@@ -35254,7 +35370,7 @@ class Textarea {
35254
35370
  * TODO(FW-5592): Remove hasStartEndSlots condition
35255
35371
  */
35256
35372
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
35257
- return (hAsync(Host, { key: '26b46666a92b3f652775bb1c46661f9a30392104', class: createColorClasses$1(this.color, {
35373
+ return (hAsync(Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: createColorClasses$1(this.color, {
35258
35374
  [mode]: true,
35259
35375
  'has-value': hasValue,
35260
35376
  'has-focus': hasFocus,
@@ -35263,7 +35379,7 @@ class Textarea {
35263
35379
  [`textarea-shape-${shape}`]: shape !== undefined,
35264
35380
  [`textarea-label-placement-${labelPlacement}`]: true,
35265
35381
  'textarea-disabled': disabled,
35266
- }) }, hAsync("label", { key: '2649da816216959ebe1f34cafd9dedbac20ec3c2', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: 'dca98593efece1b044dbcda045fa70882d715cb2', class: "textarea-wrapper-inner" }, hAsync("div", { key: '2019daf87fddca5ec0b2e336f0376fd9642bae1b', class: "start-slot-wrapper" }, hAsync("slot", { key: '36c423c394a71d08261705b9d6729e756bf65924', name: "start" })), hAsync("div", { key: '0c3ea34105c7eddfa4094371c5d288c50ed10db3', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, hAsync("textarea", Object.assign({ key: 'ce173b83b16aff43d293fa1edef9b66c6676227b', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), hAsync("div", { key: '756e343cfd208bb5ad9ecf08d77cbb0a9606dc7b', class: "end-slot-wrapper" }, hAsync("slot", { key: '0eb596814a037fa4634ff8c5bac0045540edfe21', name: "end" }))), shouldRenderHighlight && hAsync("div", { key: 'df62f896eb6e0e2d1217aa487c198eb82a52bcb8', class: "textarea-highlight" })), this.renderBottomContent()));
35382
+ }) }, hAsync("label", { key: '8a2dd59a60f7469df84018eb0ede3a9ec3862703', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '1bfc368236e3da7a225a45118c27fbfc1fe5fa46', class: "textarea-wrapper-inner" }, hAsync("div", { key: '215cbb2635ff52e31a8973376989b85e7245d40f', class: "start-slot-wrapper" }, hAsync("slot", { key: '9f6b461cdee9d629deb695d2bea054ece2f32305', name: "start" })), hAsync("div", { key: 'c1af35a2d5bc452bebe0b22a26d15ff52b4e9fc8', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, hAsync("textarea", Object.assign({ key: '69a69b3cf0932baafbe37e6e846f1a571608d3f2', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), hAsync("div", { key: 'c053ea8b865d0e29763aed2e4939cc9c9e374c15', class: "end-slot-wrapper" }, hAsync("slot", { key: '930aa641833b0df54b9ea10368fc2f46d5f491f6', name: "end" }))), shouldRenderHighlight && hAsync("div", { key: '8d12597d15f5f429d80e8272ea99e64ed924e482', class: "textarea-highlight" })), this.renderBottomContent()));
35267
35383
  }
35268
35384
  get el() { return getElement(this); }
35269
35385
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.7.7-nightly.20251014",
3
+ "version": "8.7.7",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -44,7 +44,7 @@
44
44
  "@clack/prompts": "^0.11.0",
45
45
  "@ionic/eslint-config": "^0.3.0",
46
46
  "@ionic/prettier-config": "^2.0.0",
47
- "@playwright/test": "^1.55.1",
47
+ "@playwright/test": "^1.56.0",
48
48
  "@rollup/plugin-node-resolve": "^8.4.0",
49
49
  "@rollup/plugin-virtual": "^2.0.3",
50
50
  "@stencil/angular-output-target": "^0.10.0",
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{r as o,c as t,i as n,f as i,h as r,d as e,g as a,k as s}from"./p-C8IsBmNU.js";import{k as c,i as l}from"./p-CTfR9YZG.js";import{o as d,c as b,h}from"./p-DiVJyqlX.js";import{b as u}from"./p-BFvmZNyx.js";const p=class{constructor(n){o(this,n),this.ionFocus=t(this,"ionFocus",7),this.ionBlur=t(this,"ionBlur",7),this.inItem=!1,this.inListHeader=!1,this.inToolbar=!1,this.formButtonEl=null,this.formEl=null,this.inheritedAttributes={},this.isCircle=!1,this.buttonType="button",this.disabled=!1,this.routerDirection="forward",this.strong=!1,this.type="button",this.handleClick=o=>{const{el:t}=this;"button"===this.type?d(this.href,o,this.routerDirection,this.routerAnimation):c(t)&&this.submitForm(o)},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.slotChanged=()=>{this.isCircle=this.hasIconOnly}}disabledChanged(){const{disabled:o}=this;this.formButtonEl&&(this.formButtonEl.disabled=o)}onAriaChanged(o,t,i){this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[i]:o}),n(this)}renderHiddenButton(){const o=this.formEl=this.findForm();if(o){const{formButtonEl:t}=this;if(null!==t&&o.contains(t))return;const n=this.formButtonEl=document.createElement("button");n.type=this.type,n.style.display="none",n.disabled=this.disabled,o.appendChild(n)}}componentWillLoad(){this.inToolbar=!!this.el.closest("ion-buttons"),this.inListHeader=!!this.el.closest("ion-list-header"),this.inItem=!!this.el.closest("ion-item")||!!this.el.closest("ion-item-divider"),this.inheritedAttributes=l(this.el)}get hasIconOnly(){return!!this.el.querySelector('[slot="icon-only"]')}get rippleType(){return(void 0===this.fill||"clear"===this.fill)&&this.hasIconOnly&&this.inToolbar?"unbounded":"bounded"}findForm(){const{form:o}=this;if(o instanceof HTMLFormElement)return o;if("string"==typeof o){const t=document.getElementById(o);return t?t instanceof HTMLFormElement?t:(i(`[ion-button] - Form with selector: "#${o}" could not be found. Verify that the id is attached to a <form> element.`,this.el),null):(i(`[ion-button] - Form with selector: "#${o}" could not be found. Verify that the id is correct and the form is rendered in the DOM.`,this.el),null)}return void 0!==o?(i('[ion-button] - The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.',this.el),null):this.el.closest("form")}submitForm(o){this.formEl&&this.formButtonEl&&(o.preventDefault(),this.formButtonEl.click())}render(){const o=u(this),{buttonType:t,type:n,disabled:i,rel:a,target:s,size:c,href:l,color:d,expand:p,hasIconOnly:m,shape:g,strong:v,inheritedAttributes:f}=this,x=void 0===c&&this.inItem?"small":c,k=void 0===l?"button":"a",y="button"===k?{type:n}:{download:this.download,href:l,rel:a,target:s};let w=this.fill;return null==w&&(w=this.inToolbar||this.inListHeader?"clear":"solid"),"button"!==n&&this.renderHiddenButton(),r(e,{key:"b105ad09215adb3ca2298acdadf0dc9154bbb9b0",onClick:this.handleClick,"aria-disabled":i?"true":null,class:b(d,{[o]:!0,[t]:!0,[`${t}-${p}`]:void 0!==p,[`${t}-${x}`]:void 0!==x,[`${t}-${g}`]:void 0!==g,[`${t}-${w}`]:!0,[`${t}-strong`]:v,"in-toolbar":h("ion-toolbar",this.el),"in-toolbar-color":h("ion-toolbar[color]",this.el),"in-buttons":h("ion-buttons",this.el),"button-has-icon-only":m,"button-disabled":i,"ion-activatable":!0,"ion-focusable":!0})},r(k,Object.assign({key:"66b4e7112bcb9e41d5a723fbbadb0a3104f9ee1d"},y,{class:"button-native",part:"native",disabled:i,onFocus:this.onFocus,onBlur:this.onBlur},f),r("span",{key:"1439fc3da280221028dcf7ce8ec9dab273c4d4bb",class:"button-inner"},r("slot",{key:"d5269ae1afc87ec7b99746032f59cbae93720a9f",name:"icon-only",onSlotchange:this.slotChanged}),r("slot",{key:"461c83e97aa246aa86d83e14f1e15a288d35041e",name:"start"}),r("slot",{key:"807170d47101f9f6a333dd4ff489c89284f306fe"}),r("slot",{key:"e67f116dd0349a0d27893e4f3ff0ccef1d402f80",name:"end"})),"md"===o&&r("ion-ripple-effect",{key:"273f0bd9645a36c1bfd18a5c2ab4f81e22b7b989",type:this.rippleType})))}get el(){return a(this)}static get watchers(){return{disabled:["disabledChanged"],"aria-checked":["onAriaChanged"],"aria-label":["onAriaChanged"]}}};let m;p.style={ios:':host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;white-space:normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #0054e9);--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-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:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:14px;--padding-top:13px;--padding-bottom:13px;--padding-start:1em;--padding-end:1em;--transition:background-color, opacity 100ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:3.1em;font-size:min(1rem, 48px);font-weight:500;letter-spacing:0}:host(.button-solid){--background-activated:var(--ion-color-primary-shade, #004acd);--background-focused:var(--ion-color-primary-shade, #004acd);--background-hover:var(--ion-color-primary-tint, #1a65eb);--background-activated-opacity:1;--background-focused-opacity:1;--background-hover-opacity:1}:host(.button-outline){--border-radius:14px;--border-width:1px;--border-style:solid;--background-activated:var(--ion-color-primary, #0054e9);--background-focused:var(--ion-color-primary, #0054e9);--background-hover:transparent;--background-focused-opacity:.1;--color-activated:var(--ion-color-primary-contrast, #fff)}:host(.button-clear){--background-activated:transparent;--background-activated-opacity:0;--background-focused:var(--ion-color-primary, #0054e9);--background-hover:transparent;--background-focused-opacity:.1;font-size:min(1.0625rem, 51px);font-weight:normal}:host(.in-buttons){font-size:clamp(17px, 1.0625rem, 21.08px);font-weight:400}:host(.button-large){--border-radius:16px;--padding-top:17px;--padding-start:1em;--padding-end:1em;--padding-bottom:17px;min-height:3.1em;font-size:min(1.25rem, 60px)}:host(.button-small){--border-radius:6px;--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:min(0.8125rem, 39px)}:host(.button-round){--border-radius:999px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-strong){font-weight:600}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:var(--padding-top);--padding-end:var(--padding-top);--padding-start:var(--padding-end);min-width:clamp(30px, 2.125em, 60px);min-height:clamp(30px, 2.125em, 60px)}::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.12px, 1.125em, 43.02px)}:host(.button-small.button-has-icon-only){min-width:clamp(23px, 2.16em, 54px);min-height:clamp(23px, 2.16em, 54px)}:host(.button-small) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(12.1394px, 1.308125em, 40.1856px)}:host(.button-large.button-has-icon-only){min-width:clamp(46px, 2.5em, 78px);min-height:clamp(46px, 2.5em, 78px)}:host(.button-large) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.12px, 0.9em, 43.056px)}:host(.button-outline.ion-focused.ion-color) .button-native,:host(.button-clear.ion-focused.ion-color) .button-native{color:var(--ion-color-base)}:host(.button-outline.ion-focused.ion-color) .button-native::after,:host(.button-clear.ion-focused.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-shade)}@media (any-hover: hover){:host(.button-clear:not(.ion-activated):hover),:host(.button-outline:not(.ion-activated):hover){opacity:0.6}:host(.button-clear.ion-color:hover) .button-native,:host(.button-outline.ion-color:hover) .button-native{color:var(--ion-color-base)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:transparent}:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-tint)}:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated)) .button-native::after{background:#fff;opacity:0.1}}:host(.button-clear.ion-activated){opacity:0.4}:host(.button-outline.ion-activated.ion-color) .button-native{color:var(--ion-color-contrast)}:host(.button-outline.ion-activated.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-activated) .button-native::after{background:var(--ion-color-shade)}:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--color));color:var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff))}',md:':host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;white-space:normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #0054e9);--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-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:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:4px;--padding-top:8px;--padding-bottom:8px;--padding-start:1.1em;--padding-end:1.1em;--transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),\n background-color 15ms linear,\n color 15ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:36px;font-size:0.875rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}:host(.button-solid){--background-activated:transparent;--background-hover:var(--ion-color-primary-contrast, #fff);--background-focused:var(--ion-color-primary-contrast, #fff);--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}:host(.button-solid.ion-activated){--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)}:host(.button-outline){--border-width:2px;--border-style:solid;--box-shadow:none;--background-activated:transparent;--background-focused:var(--ion-color-primary, #0054e9);--background-hover:var(--ion-color-primary, #0054e9);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-outline.ion-activated.ion-color) .button-native{background:transparent}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #0054e9);--background-hover:var(--ion-color-primary, #0054e9);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-round){--border-radius:999px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-large){--padding-top:14px;--padding-start:1em;--padding-end:1em;--padding-bottom:14px;min-height:2.8em;font-size:1.25rem}:host(.button-small){--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:0.8125rem}:host(.button-strong){font-weight:bold}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:var(--padding-top);--padding-end:var(--padding-top);--padding-start:var(--padding-end);min-width:clamp(30px, 2.86em, 60px);min-height:clamp(30px, 2.86em, 60px)}::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.104px, 1.6em, 43.008px)}:host(.button-small.button-has-icon-only){min-width:clamp(23px, 2.16em, 54px);min-height:clamp(23px, 2.16em, 54px)}:host(.button-small) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(13.002px, 1.23125em, 40.385px)}:host(.button-large.button-has-icon-only){min-width:clamp(46px, 2.5em, 78px);min-height:clamp(46px, 2.5em, 78px)}:host(.button-large) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.008px, 1.4em, 43.008px)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color.ion-focused) .button-native::after,:host(.button-outline.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-background, var(--color));color:var(--ion-toolbar-color, var(--background), var(--ion-color-primary-contrast, #fff))}'};const g=(o,t,n,i,r)=>(n="ios"===(n&&k(n))?"ios":"md",i&&"ios"===n?o=k(i):r&&"md"===n?o=k(r):(o||!t||f(t)||(o=t),x(o)&&(o=k(o))),x(o)&&""!==o.trim()?""!==o.replace(/[a-z]|-|\d/gi,"")?null:o:null),v=o=>x(o)&&(o=o.trim(),f(o))?o:null,f=o=>o.length>0&&/(\/|\.)/.test(o),x=o=>"string"==typeof o,k=o=>o.toLowerCase(),y=o=>{if(1===o.nodeType){if("script"===o.nodeName.toLowerCase())return!1;for(let t=0;t<o.attributes.length;t++){const n=o.attributes[t].name;if(x(n)&&0===n.toLowerCase().indexOf("on"))return!1}for(let t=0;t<o.childNodes.length;t++)if(!y(o.childNodes[t]))return!1}return!0},w=new Map,z=new Map;let C;function $(o){return w.set(o,""),""}const j=class{constructor(t){o(this,t),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=M(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=((o,t=[])=>{const n={};return t.forEach((t=>{o.hasAttribute(t)&&(null!==o.getAttribute(t)&&(n[t]=o.getAttribute(t)),o.removeAttribute(t))})),n})(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=!0,this.loadIcon()}))}componentDidLoad(){this.didLoadIcon||this.loadIcon()}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0)}waitUntilVisible(o,t,n){if(!Boolean(this.lazy&&"undefined"!=typeof window&&window.IntersectionObserver))return n();const i=this.io=new window.IntersectionObserver((o=>{o[0].isIntersecting&&(i.disconnect(),this.io=void 0,n())}),{rootMargin:t});i.observe(o)}loadIcon(){if(this.isVisible){const o=(o=>{let t=v(o.src);if(t)return t;if(t=g(o.name,o.icon,o.mode,o.ios,o.md),t)return((o,t)=>{const n=(()=>{if("undefined"==typeof window)return new Map;if(!m){const o=window;o.Ionicons=o.Ionicons||{},m=o.Ionicons.map=o.Ionicons.map||new Map}return m})().get(o);if(n)return n;try{return s(`svg/${o}.svg`)}catch(n){console.log("e",n),console.warn(`[Ionicons Warning]: Could not load icon with name "${o}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,t)}})(t,o);if(o.icon){if(t=v(o.icon),t)return t;if(t=v(o.icon[o.mode]),t)return t}return null})(this);o&&(w.has(o)?this.svgContent=w.get(o):((o,t)=>z.get(o)||("undefined"!=typeof fetch&&"undefined"!=typeof document?(o=>o.startsWith("data:image/svg+xml"))(o)&&(o=>-1!==o.indexOf(";utf8,"))(o)?Promise.resolve(function(o){C||(C=new DOMParser);const t=C.parseFromString(o,"text/html").querySelector("svg");if(t)return w.set(o,t.outerHTML),t.outerHTML;throw new Error(`Could not parse svg from ${o}`)}(o)):function(o,t){const n=fetch(o).then((n=>n.text().then((n=>{n&&!1!==t&&(n=(o=>{const t=document.createElement("div");t.innerHTML=o;for(let o=t.childNodes.length-1;o>=0;o--)"svg"!==t.childNodes[o].nodeName.toLowerCase()&&t.removeChild(t.childNodes[o]);const n=t.firstElementChild;if(n&&"svg"===n.nodeName.toLowerCase()){const o=n.getAttribute("class")||"";if(n.setAttribute("class",(o+" s-ion-icon").trim()),y(n))return t.innerHTML}return""})(n));const i=n||"";return w.set(o,i),i})).catch((()=>$(o))))).catch((()=>$(o)));return z.set(o,n),n}(o,t):Promise.resolve($(o))))(o,this.sanitize).then((()=>this.svgContent=w.get(o))),this.didLoadIcon=!0)}this.iconName=g(this.name,this.icon,this.mode,this.ios,this.md)}render(){const{flipRtl:o,iconName:t,inheritedAttributes:n,el:i}=this,a=this.mode||"md",s=!!t&&(t.includes("arrow")||t.includes("chevron"))&&!1!==o,c=o||s;return r(e,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[a]:!0},I(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":c,"icon-rtl":c&&(l=i,l&&""!==l.dir?"rtl"===l.dir.toLowerCase():"rtl"===(null===document||void 0===document?void 0:document.dir.toLowerCase()))})},n),r("div",this.svgContent?{class:"icon-inner",innerHTML:this.svgContent}:{class:"icon-inner"}));var l}static get assetsDirs(){return["svg"]}get el(){return a(this)}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}},M=()=>"undefined"!=typeof document&&document.documentElement.getAttribute("mode")||"md",I=o=>o?{"ion-color":!0,[`ion-color-${o}`]:!0}:null;j.style=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";export{p as ion_button,j as ion_icon}