@ionic/core 8.7.7-nightly.20251015 → 8.7.8-dev.11760615726.158c2a8a

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 (62) hide show
  1. package/components/button.js +3 -7
  2. package/components/header.js +41 -3
  3. package/components/ion-accordion-group.js +28 -26
  4. package/components/ion-accordion.js +7 -3
  5. package/components/ion-input.js +6 -14
  6. package/components/ion-select.js +58 -10
  7. package/components/ion-textarea.js +5 -13
  8. package/components/{notch-controller.js → validity.js} +14 -1
  9. package/dist/cjs/ion-accordion_2.cjs.entry.js +35 -29
  10. package/dist/cjs/ion-app_8.cjs.entry.js +41 -3
  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-select_3.cjs.entry.js +56 -10
  14. package/dist/cjs/ion-textarea.cjs.entry.js +6 -14
  15. package/dist/cjs/ionic.cjs.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/{notch-controller-Bzqhjm4f.js → validity-C8QoAYT2.js} +14 -0
  18. package/dist/collection/components/accordion/accordion.js +7 -3
  19. package/dist/collection/components/accordion-group/accordion-group.js +28 -26
  20. package/dist/collection/components/button/button.js +3 -7
  21. package/dist/collection/components/header/header.js +5 -4
  22. package/dist/collection/components/header/header.utils.js +37 -0
  23. package/dist/collection/components/input/input.js +6 -14
  24. package/dist/collection/components/select/select.js +59 -11
  25. package/dist/collection/components/textarea/textarea.js +5 -13
  26. package/dist/collection/utils/forms/index.js +1 -0
  27. package/dist/collection/utils/forms/validity.js +15 -0
  28. package/dist/docs.json +2 -2
  29. package/dist/esm/ion-accordion_2.entry.js +35 -29
  30. package/dist/esm/ion-app_8.entry.js +41 -3
  31. package/dist/esm/ion-button_2.entry.js +3 -7
  32. package/dist/esm/ion-input.entry.js +6 -14
  33. package/dist/esm/ion-select_3.entry.js +55 -9
  34. package/dist/esm/ion-textarea.entry.js +5 -13
  35. package/dist/esm/ionic.js +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/{notch-controller-BwelN_JM.js → validity-B8oWougr.js} +14 -1
  38. package/dist/ionic/ionic.esm.js +1 -1
  39. package/dist/ionic/p-16280296.entry.js +4 -0
  40. package/dist/ionic/p-43ed1ef5.entry.js +4 -0
  41. package/dist/ionic/p-4c85d268.entry.js +4 -0
  42. package/dist/ionic/p-4cc26913.entry.js +4 -0
  43. package/dist/ionic/p-8bdfc8f6.entry.js +4 -0
  44. package/dist/ionic/{p-DCv9sLH2.js → p-DieJyvMP.js} +1 -1
  45. package/dist/ionic/p-f65f9308.entry.js +4 -0
  46. package/dist/types/components/accordion-group/accordion-group-interface.d.ts +1 -0
  47. package/dist/types/components/accordion-group/accordion-group.d.ts +1 -0
  48. package/dist/types/components/header/header.utils.d.ts +10 -0
  49. package/dist/types/components/input/input.d.ts +0 -4
  50. package/dist/types/components/select/select.d.ts +6 -0
  51. package/dist/types/components/textarea/textarea.d.ts +0 -4
  52. package/dist/types/utils/forms/index.d.ts +1 -0
  53. package/dist/types/utils/forms/validity.d.ts +10 -0
  54. package/hydrate/index.js +121 -70
  55. package/hydrate/index.mjs +121 -70
  56. package/package.json +2 -2
  57. package/dist/ionic/p-1c8a476d.entry.js +0 -4
  58. package/dist/ionic/p-62e50f80.entry.js +0 -4
  59. package/dist/ionic/p-7647da93.entry.js +0 -4
  60. package/dist/ionic/p-785026d7.entry.js +0 -4
  61. package/dist/ionic/p-78c74a3e.entry.js +0 -4
  62. package/dist/ionic/p-913a7c1e.entry.js +0 -4
package/hydrate/index.mjs CHANGED
@@ -4040,7 +4040,11 @@ const accordionMdCss = ":host{display:block;position:relative;width:100%;backgro
4040
4040
  class Accordion {
4041
4041
  constructor(hostRef) {
4042
4042
  registerInstance(this, hostRef);
4043
- this.updateListener = () => this.updateState(false);
4043
+ this.updateListener = (ev) => {
4044
+ var _a, _b;
4045
+ const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
4046
+ this.updateState(initialUpdate);
4047
+ };
4044
4048
  this.state = 1 /* AccordionState.Collapsed */;
4045
4049
  this.isNext = false;
4046
4050
  this.isPrevious = false;
@@ -4342,7 +4346,7 @@ class Accordion {
4342
4346
  const headerPart = expanded ? 'header expanded' : 'header';
4343
4347
  const contentPart = expanded ? 'content expanded' : 'content';
4344
4348
  this.setAria(expanded);
4345
- return (hAsync(Host, { key: '073e1d02c18dcbc20c68648426e87c14750c031d', class: {
4349
+ return (hAsync(Host, { key: '4c8a2978e1c428f1b856d80adcee31d7abb3925d', class: {
4346
4350
  [mode]: true,
4347
4351
  'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
4348
4352
  'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
@@ -4353,7 +4357,7 @@ class Accordion {
4353
4357
  'accordion-disabled': disabled,
4354
4358
  'accordion-readonly': readonly,
4355
4359
  'accordion-animated': this.shouldAnimate(),
4356
- } }, hAsync("div", { key: '9b4cf326de8bb6b4033992903c0c1bfd7eea9bcc', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, hAsync("slot", { key: '464c32a37f64655eacf4218284214f5f30b14a1e', name: "header" })), hAsync("div", { key: '8bb52e6a62d7de0106b253201a89a32e79d9a594', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, hAsync("div", { key: '1d9dfd952ad493754aaeea7a8f625b33c2dd90a0', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, hAsync("slot", { key: '970dfbc55a612d739d0ca3b7b1a08e5c96d0c479', name: "content" })))));
4360
+ } }, hAsync("div", { key: '789c5cec6e54d2aa7528d63e880e1f2cf1924ff2', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, hAsync("slot", { key: 'c98907a0e54d2edc0e6e50b8dce1af6e81588eba', name: "header" })), hAsync("div", { key: 'adfe9e7083d5addc1b7cbba0cfc9c65d5809f8f6', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, hAsync("div", { key: 'c77a044fae8d5173ea180bc57c84d24b39abb494', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, hAsync("slot", { key: '8214cfd99fcb7a77fc08b1145b2c3d58ddf7f185', name: "content" })))));
4357
4361
  }
4358
4362
  static get delegatesFocus() { return true; }
4359
4363
  get el() { return getElement(this); }
@@ -4419,26 +4423,7 @@ class AccordionGroup {
4419
4423
  this.expand = 'compact';
4420
4424
  }
4421
4425
  valueChanged() {
4422
- const { value, multiple } = this;
4423
- if (!multiple && Array.isArray(value)) {
4424
- /**
4425
- * We do some processing on the `value` array so
4426
- * that it looks more like an array when logged to
4427
- * the console.
4428
- * Example given ['a', 'b']
4429
- * Default toString() behavior: a,b
4430
- * Custom behavior: ['a', 'b']
4431
- */
4432
- printIonWarning(`[ion-accordion-group] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
4433
-
4434
- Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
4435
- `, this.el);
4436
- }
4437
- /**
4438
- * Do not use `value` here as that will be
4439
- * not account for the adjustment we make above.
4440
- */
4441
- this.ionValueChange.emit({ value: this.value });
4426
+ this.emitValueChange(false);
4442
4427
  }
4443
4428
  async disabledChanged() {
4444
4429
  const { disabled } = this;
@@ -4512,11 +4497,10 @@ class AccordionGroup {
4512
4497
  * it is possible for the value to be set after the Web Component
4513
4498
  * initializes but before the value watcher is set up in Stencil.
4514
4499
  * As a result, the watcher callback may not be fired.
4515
- * We work around this by manually calling the watcher
4516
- * callback when the component has loaded and the watcher
4517
- * is configured.
4500
+ * We work around this by manually emitting a value change when the component
4501
+ * has loaded and the watcher is configured.
4518
4502
  */
4519
- this.valueChanged();
4503
+ this.emitValueChange(true);
4520
4504
  }
4521
4505
  /**
4522
4506
  * Sets the value property and emits ionChange.
@@ -4596,15 +4580,37 @@ class AccordionGroup {
4596
4580
  async getAccordions() {
4597
4581
  return Array.from(this.el.querySelectorAll(':scope > ion-accordion'));
4598
4582
  }
4583
+ emitValueChange(initial) {
4584
+ const { value, multiple } = this;
4585
+ if (!multiple && Array.isArray(value)) {
4586
+ /**
4587
+ * We do some processing on the `value` array so
4588
+ * that it looks more like an array when logged to
4589
+ * the console.
4590
+ * Example given ['a', 'b']
4591
+ * Default toString() behavior: a,b
4592
+ * Custom behavior: ['a', 'b']
4593
+ */
4594
+ printIonWarning(`[ion-accordion-group] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
4595
+
4596
+ Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
4597
+ `, this.el);
4598
+ }
4599
+ /**
4600
+ * Do not use `value` here as that will not account
4601
+ * for the adjustment we make above.
4602
+ */
4603
+ this.ionValueChange.emit({ value: this.value, initial });
4604
+ }
4599
4605
  render() {
4600
4606
  const { disabled, readonly, expand } = this;
4601
4607
  const mode = getIonMode$1(this);
4602
- return (hAsync(Host, { key: 'd1a79a93179474fbba66fcf11a92f4871dacc975', class: {
4608
+ return (hAsync(Host, { key: 'c69c3fa4c844cb2e88f778af9a8c757d752bb261', class: {
4603
4609
  [mode]: true,
4604
4610
  'accordion-group-disabled': disabled,
4605
4611
  'accordion-group-readonly': readonly,
4606
4612
  [`accordion-group-expand-${expand}`]: true,
4607
- }, role: "presentation" }, hAsync("slot", { key: 'e6b8954b686d1fbb4fc92adb07fddc97a24b0a31' })));
4613
+ }, role: "presentation" }, hAsync("slot", { key: 'fe661334ae44c291cc4e61f22f17a7c51f62acb7' })));
4608
4614
  }
4609
4615
  get el() { return getElement(this); }
4610
4616
  static get watchers() { return {
@@ -9261,11 +9267,7 @@ class Button {
9261
9267
  target,
9262
9268
  };
9263
9269
  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) {
9270
+ if (fill === undefined) {
9269
9271
  fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
9270
9272
  }
9271
9273
  /**
@@ -9278,7 +9280,7 @@ class Button {
9278
9280
  {
9279
9281
  type !== 'button' && this.renderHiddenButton();
9280
9282
  }
9281
- return (hAsync(Host, { key: 'b105ad09215adb3ca2298acdadf0dc9154bbb9b0', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9283
+ return (hAsync(Host, { key: 'ed82ea53705523f9afc5f1a9addff44cc6424f27', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9282
9284
  [mode]: true,
9283
9285
  [buttonType]: true,
9284
9286
  [`${buttonType}-${expand}`]: expand !== undefined,
@@ -9293,7 +9295,7 @@ class Button {
9293
9295
  'button-disabled': disabled,
9294
9296
  'ion-activatable': true,
9295
9297
  '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 }))));
9298
+ }) }, 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
9299
  }
9298
9300
  get el() { return getElement(this); }
9299
9301
  static get watchers() { return {
@@ -15227,6 +15229,8 @@ class Grid {
15227
15229
  }
15228
15230
 
15229
15231
  const TRANSITION = 'all 0.2s ease-in-out';
15232
+ const ROLE_NONE = 'none';
15233
+ const ROLE_BANNER = 'banner';
15230
15234
  const cloneElement = (tagName) => {
15231
15235
  const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
15232
15236
  if (getCachedEl !== null) {
@@ -15353,6 +15357,7 @@ const setHeaderActive = (headerIndex, active = true) => {
15353
15357
  const toolbars = headerIndex.toolbars;
15354
15358
  const ionTitles = toolbars.map((toolbar) => toolbar.ionTitleEl);
15355
15359
  if (active) {
15360
+ headerEl.setAttribute('role', ROLE_BANNER);
15356
15361
  headerEl.classList.remove('header-collapse-condense-inactive');
15357
15362
  ionTitles.forEach((ionTitle) => {
15358
15363
  if (ionTitle) {
@@ -15361,6 +15366,16 @@ const setHeaderActive = (headerIndex, active = true) => {
15361
15366
  });
15362
15367
  }
15363
15368
  else {
15369
+ /**
15370
+ * There can only be one banner landmark per page.
15371
+ * By default, all ion-headers have the banner role.
15372
+ * This causes an accessibility issue when using a
15373
+ * condensed header since there are two ion-headers
15374
+ * on the page at once (active and inactive).
15375
+ * To solve this, the role needs to be toggled
15376
+ * based on which header is active.
15377
+ */
15378
+ headerEl.setAttribute('role', ROLE_NONE);
15364
15379
  headerEl.classList.add('header-collapse-condense-inactive');
15365
15380
  /**
15366
15381
  * The small title should only be accessed by screen readers
@@ -15420,6 +15435,30 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
15420
15435
  });
15421
15436
  });
15422
15437
  };
15438
+ /**
15439
+ * Get the role type for the ion-header.
15440
+ *
15441
+ * @param isInsideMenu If ion-header is inside ion-menu.
15442
+ * @param isCondensed If ion-header has collapse="condense".
15443
+ * @param mode The current mode.
15444
+ * @returns 'none' if inside ion-menu or if condensed in md
15445
+ * mode, otherwise 'banner'.
15446
+ */
15447
+ const getRoleType = (isInsideMenu, isCondensed, mode) => {
15448
+ // If the header is inside a menu, it should not have the banner role.
15449
+ if (isInsideMenu) {
15450
+ return ROLE_NONE;
15451
+ }
15452
+ /**
15453
+ * Only apply role="none" to `md` mode condensed headers
15454
+ * since the large header is never shown.
15455
+ */
15456
+ if (isCondensed && mode === 'md') {
15457
+ return ROLE_NONE;
15458
+ }
15459
+ // Default to banner role.
15460
+ return ROLE_BANNER;
15461
+ };
15423
15462
 
15424
15463
  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
15464
 
@@ -15564,16 +15603,17 @@ class Header {
15564
15603
  const { translucent, inheritedAttributes } = this;
15565
15604
  const mode = getIonMode$1(this);
15566
15605
  const collapse = this.collapse || 'none';
15606
+ const isCondensed = collapse === 'condense';
15567
15607
  // 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: {
15608
+ const roleType = getRoleType(hostContext('ion-menu', this.el), isCondensed, mode);
15609
+ return (hAsync(Host, Object.assign({ key: '863c4568cd7b8c0ec55109f193bbbaed68a1346e', role: roleType, class: {
15570
15610
  [mode]: true,
15571
15611
  // Used internally for styling
15572
15612
  [`header-${mode}`]: true,
15573
15613
  [`header-translucent`]: this.translucent,
15574
15614
  [`header-collapse-${collapse}`]: true,
15575
15615
  [`header-translucent-${mode}`]: this.translucent,
15576
- } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '395766d4dcee3398bc91960db21f922095292f14', class: "header-background" }), hAsync("slot", { key: '09a67ece27b258ff1248805d43d92a49b2c6859a' })));
15616
+ } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '25c3bdce328b0b35607d154c8b8374679313d881', class: "header-background" }), hAsync("slot", { key: 'b44fab0a9be7920b9650da26117c783e751e1702' })));
15577
15617
  }
15578
15618
  get el() { return getElement(this); }
15579
15619
  static get style() { return {
@@ -16385,6 +16425,19 @@ const isOptionSelected = (currentValue, compareValue, compareWith) => {
16385
16425
  }
16386
16426
  };
16387
16427
 
16428
+ /**
16429
+ * Checks if the form element is in an invalid state based on
16430
+ * Ionic validation classes.
16431
+ *
16432
+ * @param el The form element to check.
16433
+ * @returns `true` if the element is invalid, `false` otherwise.
16434
+ */
16435
+ const checkInvalidState = (el) => {
16436
+ const hasIonTouched = el.classList.contains('ion-touched');
16437
+ const hasIonInvalid = el.classList.contains('ion-invalid');
16438
+ return hasIonTouched && hasIonInvalid;
16439
+ };
16440
+
16388
16441
  /**
16389
16442
  * Used to update a scoped component that uses emulated slots. This fires when
16390
16443
  * content is passed into the slot or when the content inside of a slot changes.
@@ -16750,20 +16803,12 @@ class Input {
16750
16803
  componentWillLoad() {
16751
16804
  this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes$1(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
16752
16805
  }
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
16806
  connectedCallback() {
16762
16807
  const { el } = this;
16763
16808
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
16764
16809
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
16765
16810
  // Always set initial state
16766
- this.isInvalid = this.checkInvalidState();
16811
+ this.isInvalid = checkInvalidState(el);
16767
16812
  this.debounceChanged();
16768
16813
  }
16769
16814
  componentDidLoad() {
@@ -17017,7 +17062,7 @@ class Input {
17017
17062
  * TODO(FW-5592): Remove hasStartEndSlots condition
17018
17063
  */
17019
17064
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
17020
- return (hAsync(Host, { key: '8a51f0300d5bc66392f9ab9a6fa0b5d388072a33', class: createColorClasses$1(this.color, {
17065
+ return (hAsync(Host, { key: '97b5308021064d9e7434ef2d3d96f27045c1b0c4', class: createColorClasses$1(this.color, {
17021
17066
  [mode]: true,
17022
17067
  'has-value': hasValue,
17023
17068
  'has-focus': hasFocus,
@@ -17028,14 +17073,14 @@ class Input {
17028
17073
  'in-item': inItem,
17029
17074
  'in-item-color': hostContext('ion-item.ion-color', this.el),
17030
17075
  '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) => {
17076
+ }) }, 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
17077
  /**
17033
17078
  * This prevents mobile browsers from
17034
17079
  * blurring the input when the clear
17035
17080
  * button is activated.
17036
17081
  */
17037
17082
  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()));
17083
+ }, 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
17084
  }
17040
17085
  get el() { return getElement(this); }
17041
17086
  static get watchers() { return {
@@ -33127,6 +33172,10 @@ class Select {
33127
33172
  * is applied in both cases.
33128
33173
  */
33129
33174
  this.hasFocus = false;
33175
+ /**
33176
+ * Track validation state for proper aria-live announcements.
33177
+ */
33178
+ this.isInvalid = false;
33130
33179
  /**
33131
33180
  * The text to display on the cancel button.
33132
33181
  */
@@ -33249,9 +33298,12 @@ class Select {
33249
33298
  this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {
33250
33299
  this.updateOverlayOptions();
33251
33300
  });
33301
+ // Always set initial state
33302
+ this.isInvalid = checkInvalidState(this.el);
33252
33303
  }
33253
33304
  componentWillLoad() {
33254
33305
  this.inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
33306
+ this.hintTextID = this.getHintTextID();
33255
33307
  }
33256
33308
  componentDidLoad() {
33257
33309
  /**
@@ -33275,6 +33327,11 @@ class Select {
33275
33327
  this.notchController.destroy();
33276
33328
  this.notchController = undefined;
33277
33329
  }
33330
+ // Clean up validation observer to prevent memory leaks.
33331
+ if (this.validationObserver) {
33332
+ this.validationObserver.disconnect();
33333
+ this.validationObserver = undefined;
33334
+ }
33278
33335
  }
33279
33336
  /**
33280
33337
  * Open the select overlay. The overlay is either an alert, action sheet, or popover,
@@ -33745,11 +33802,11 @@ class Select {
33745
33802
  }
33746
33803
  renderListbox() {
33747
33804
  const { disabled, inputId, isExpanded, required } = this;
33748
- 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) }));
33805
+ 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) }));
33749
33806
  }
33750
33807
  getHintTextID() {
33751
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
33752
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
33808
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33809
+ if (isInvalid && errorText) {
33753
33810
  return errorTextId;
33754
33811
  }
33755
33812
  if (helperText) {
@@ -33761,10 +33818,10 @@ class Select {
33761
33818
  * Renders the helper text or error text values
33762
33819
  */
33763
33820
  renderHintText() {
33764
- const { helperText, errorText, helperTextId, errorTextId } = this;
33821
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33765
33822
  return [
33766
- hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText),
33767
- hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText),
33823
+ hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null),
33824
+ hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null),
33768
33825
  ];
33769
33826
  }
33770
33827
  /**
@@ -33812,7 +33869,7 @@ class Select {
33812
33869
  * TODO(FW-5592): Remove hasStartEndSlots condition
33813
33870
  */
33814
33871
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
33815
- return (hAsync(Host, { key: 'c03fb65e8fc9f9aab295e07b282377d57d910519', onClick: this.onClick, class: createColorClasses$1(this.color, {
33872
+ return (hAsync(Host, { key: '35b5e18e6f79a802ff2d46d1242e80ff755cc0b9', onClick: this.onClick, class: createColorClasses$1(this.color, {
33816
33873
  [mode]: true,
33817
33874
  'in-item': inItem,
33818
33875
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -33830,7 +33887,7 @@ class Select {
33830
33887
  [`select-justify-${justify}`]: justifyEnabled,
33831
33888
  [`select-shape-${shape}`]: shape !== undefined,
33832
33889
  [`select-label-placement-${labelPlacement}`]: true,
33833
- }) }, 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()));
33890
+ }) }, 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()));
33834
33891
  }
33835
33892
  get el() { return getElement(this); }
33836
33893
  static get watchers() { return {
@@ -33871,6 +33928,8 @@ class Select {
33871
33928
  "required": [4],
33872
33929
  "isExpanded": [32],
33873
33930
  "hasFocus": [32],
33931
+ "isInvalid": [32],
33932
+ "hintTextID": [32],
33874
33933
  "open": [64]
33875
33934
  },
33876
33935
  "$listeners$": undefined,
@@ -35058,20 +35117,12 @@ class Textarea {
35058
35117
  this.el.click();
35059
35118
  }
35060
35119
  }
35061
- /**
35062
- * Checks if the textarea is in an invalid state based on Ionic validation classes
35063
- */
35064
- checkValidationState() {
35065
- const hasIonTouched = this.el.classList.contains('ion-touched');
35066
- const hasIonInvalid = this.el.classList.contains('ion-invalid');
35067
- return hasIonTouched && hasIonInvalid;
35068
- }
35069
35120
  connectedCallback() {
35070
35121
  const { el } = this;
35071
35122
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
35072
35123
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
35073
35124
  // Always set initial state
35074
- this.isInvalid = this.checkValidationState();
35125
+ this.isInvalid = checkInvalidState(this.el);
35075
35126
  this.debounceChanged();
35076
35127
  }
35077
35128
  disconnectedCallback() {
@@ -35325,7 +35376,7 @@ class Textarea {
35325
35376
  * TODO(FW-5592): Remove hasStartEndSlots condition
35326
35377
  */
35327
35378
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
35328
- return (hAsync(Host, { key: '26b46666a92b3f652775bb1c46661f9a30392104', class: createColorClasses$1(this.color, {
35379
+ return (hAsync(Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: createColorClasses$1(this.color, {
35329
35380
  [mode]: true,
35330
35381
  'has-value': hasValue,
35331
35382
  'has-focus': hasFocus,
@@ -35334,7 +35385,7 @@ class Textarea {
35334
35385
  [`textarea-shape-${shape}`]: shape !== undefined,
35335
35386
  [`textarea-label-placement-${labelPlacement}`]: true,
35336
35387
  'textarea-disabled': disabled,
35337
- }) }, 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()));
35388
+ }) }, 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()));
35338
35389
  }
35339
35390
  get el() { return getElement(this); }
35340
35391
  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.20251015",
3
+ "version": "8.7.8-dev.11760615726.158c2a8a",
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}
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{r as o,e as t,h as i,d as n,g as e,c as a,f as s}from"./p-C8IsBmNU.js";import{g as r,r as d,f as c,m as h,t as l}from"./p-CTfR9YZG.js";import{l as p}from"./p-DV3sJJW8.js";import{b as g}from"./p-BFvmZNyx.js";const u=class{constructor(i){o(this,i),this.updateListener=()=>this.updateState(!1),this.state=1,this.isNext=!1,this.isPrevious=!1,this.value="ion-accordion-"+b++,this.disabled=!1,this.readonly=!1,this.toggleIcon=p,this.toggleIconSlot="end",this.setItemDefaults=()=>{const o=this.getSlottedHeaderIonItem();o&&(o.button=!0,o.detail=!1,void 0===o.lines&&(o.lines="full"))},this.getSlottedHeaderIonItem=()=>{const{headerEl:o}=this;if(!o)return;const t=o.querySelector("slot");return t&&void 0!==t.assignedElements?t.assignedElements().find((o=>"ION-ITEM"===o.tagName)):void 0},this.setAria=(o=!1)=>{const t=this.getSlottedHeaderIonItem();if(!t)return;const i=r(t).querySelector("button");i&&i.setAttribute("aria-expanded",`${o}`)},this.slotToggleIcon=()=>{const o=this.getSlottedHeaderIonItem();if(!o)return;const{toggleIconSlot:t,toggleIcon:i}=this;if(o.querySelector(".ion-accordion-toggle-icon"))return;const n=document.createElement("ion-icon");n.slot=t,n.lazy=!1,n.classList.add("ion-accordion-toggle-icon"),n.icon=i,n.setAttribute("aria-hidden","true"),o.appendChild(n)},this.expandAccordion=(o=!1)=>{const{contentEl:t,contentElWrapper:i}=this;o||void 0===t||void 0===i?this.state=4:4!==this.state&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?d((()=>{this.state=8,this.currentRaf=d((async()=>{const o=i.offsetHeight,n=l(t,2e3);t.style.setProperty("max-height",`${o}px`),await n,this.state=4,t.style.removeProperty("max-height")}))})):this.state=4)},this.collapseAccordion=(o=!1)=>{const{contentEl:t}=this;o||void 0===t?this.state=1:1!==this.state&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?this.currentRaf=d((async()=>{t.style.setProperty("max-height",`${t.offsetHeight}px`),d((async()=>{const o=l(t,2e3);this.state=2,await o,this.state=1,t.style.removeProperty("max-height")}))})):this.state=1)},this.shouldAnimate=()=>"undefined"!=typeof window&&(!matchMedia("(prefers-reduced-motion: reduce)").matches&&!(!t.get("animated",!0)||this.accordionGroupEl&&!this.accordionGroupEl.animated)),this.updateState=async(o=!1)=>{const t=this.accordionGroupEl,i=this.value;if(!t)return;const n=t.value;if(Array.isArray(n)?n.includes(i):n===i)this.expandAccordion(o),this.isNext=this.isPrevious=!1;else{this.collapseAccordion(o);const t=this.getNextSibling(),i=null==t?void 0:t.value;void 0!==i&&(this.isPrevious=Array.isArray(n)?n.includes(i):n===i);const e=this.getPreviousSibling(),a=null==e?void 0:e.value;void 0!==a&&(this.isNext=Array.isArray(n)?n.includes(a):n===a)}},this.getNextSibling=()=>{if(!this.el)return;const o=this.el.nextElementSibling;return"ION-ACCORDION"===(null==o?void 0:o.tagName)?o:void 0},this.getPreviousSibling=()=>{if(!this.el)return;const o=this.el.previousElementSibling;return"ION-ACCORDION"===(null==o?void 0:o.tagName)?o:void 0}}valueChanged(){this.updateState()}connectedCallback(){var o;const t=this.accordionGroupEl=null===(o=this.el)||void 0===o?void 0:o.closest("ion-accordion-group");t&&(this.updateState(!0),c(t,"ionValueChange",this.updateListener))}disconnectedCallback(){const o=this.accordionGroupEl;o&&h(o,"ionValueChange",this.updateListener)}componentDidLoad(){this.setItemDefaults(),this.slotToggleIcon(),d((()=>{this.setAria(4===this.state||8===this.state)}))}toggleExpanded(){const{accordionGroupEl:o,disabled:t,readonly:i,value:n,state:e}=this;t||i||!o||o.requestAccordionToggle(n,1===e||2===e)}render(){const{disabled:o,readonly:t}=this,e=g(this),a=4===this.state||8===this.state,s=a?"header expanded":"header",r=a?"content expanded":"content";return this.setAria(a),i(n,{key:"073e1d02c18dcbc20c68648426e87c14750c031d",class:{[e]:!0,"accordion-expanding":8===this.state,"accordion-expanded":4===this.state,"accordion-collapsing":2===this.state,"accordion-collapsed":1===this.state,"accordion-next":this.isNext,"accordion-previous":this.isPrevious,"accordion-disabled":o,"accordion-readonly":t,"accordion-animated":this.shouldAnimate()}},i("div",{key:"9b4cf326de8bb6b4033992903c0c1bfd7eea9bcc",onClick:()=>this.toggleExpanded(),id:"header",part:s,"aria-controls":"content",ref:o=>this.headerEl=o},i("slot",{key:"464c32a37f64655eacf4218284214f5f30b14a1e",name:"header"})),i("div",{key:"8bb52e6a62d7de0106b253201a89a32e79d9a594",id:"content",part:r,role:"region","aria-labelledby":"header",ref:o=>this.contentEl=o},i("div",{key:"1d9dfd952ad493754aaeea7a8f625b33c2dd90a0",id:"content-wrapper",ref:o=>this.contentElWrapper=o},i("slot",{key:"970dfbc55a612d739d0ca3b7b1a08e5c96d0c479",name:"content"}))))}static get delegatesFocus(){return!0}get el(){return e(this)}static get watchers(){return{value:["valueChanged"]}}};let b=0;u.style={ios:":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}",md:":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}"};const x=class{constructor(t){o(this,t),this.ionChange=a(this,"ionChange",7),this.ionValueChange=a(this,"ionValueChange",7),this.animated=!0,this.disabled=!1,this.readonly=!1,this.expand="compact"}valueChanged(){const{value:o,multiple:t}=this;!t&&Array.isArray(o)&&s(`[ion-accordion-group] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${o.map((o=>`'${o}'`)).join(", ")}]\n`,this.el),this.ionValueChange.emit({value:this.value})}async disabledChanged(){const{disabled:o}=this,t=await this.getAccordions();for(const i of t)i.disabled=o}async readonlyChanged(){const{readonly:o}=this,t=await this.getAccordions();for(const i of t)i.readonly=o}async onKeydown(o){const t=document.activeElement;if(!t)return;if(!t.closest('ion-accordion [slot="header"]'))return;const i="ION-ACCORDION"===t.tagName?t:t.closest("ion-accordion");if(!i)return;if(i.closest("ion-accordion-group")!==this.el)return;const n=await this.getAccordions(),e=n.findIndex((o=>o===i));if(-1===e)return;let a;"ArrowDown"===o.key?a=this.findNextAccordion(n,e):"ArrowUp"===o.key?a=this.findPreviousAccordion(n,e):"Home"===o.key?a=n[0]:"End"===o.key&&(a=n[n.length-1]),void 0!==a&&a!==t&&a.focus()}async componentDidLoad(){this.disabled&&this.disabledChanged(),this.readonly&&this.readonlyChanged(),this.valueChanged()}setValue(o){const t=this.value=o;this.ionChange.emit({value:t})}async requestAccordionToggle(o,t){const{multiple:i,value:n,readonly:e,disabled:a}=this;if(!e&&!a)if(t)if(i){const t=null!=n?n:[],i=Array.isArray(t)?t:[t];void 0===i.find((t=>t===o))&&void 0!==o&&this.setValue([...i,o])}else this.setValue(o);else if(i){const t=null!=n?n:[],i=Array.isArray(t)?t:[t];this.setValue(i.filter((t=>t!==o)))}else this.setValue(void 0)}findNextAccordion(o,t){const i=o[t+1];return void 0===i?o[0]:i}findPreviousAccordion(o,t){const i=o[t-1];return void 0===i?o[o.length-1]:i}async getAccordions(){return Array.from(this.el.querySelectorAll(":scope > ion-accordion"))}render(){const{disabled:o,readonly:t,expand:e}=this,a=g(this);return i(n,{key:"d1a79a93179474fbba66fcf11a92f4871dacc975",class:{[a]:!0,"accordion-group-disabled":o,"accordion-group-readonly":t,[`accordion-group-expand-${e}`]:!0},role:"presentation"},i("slot",{key:"e6b8954b686d1fbb4fc92adb07fddc97a24b0a31"}))}get el(){return e(this)}static get watchers(){return{value:["valueChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"]}}};x.style={ios:":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){border-bottom:none}",md:":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion){-webkit-box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;border-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous){border-end-end-radius:6px;border-end-start-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next){border-start-start-radius:6px;border-start-end-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion):first-of-type{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}"};export{u as ion_accordion,x as ion_accordion_group}