voyager-ionic-core 8.7.6 → 8.7.9

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 (251) hide show
  1. package/components/button.js +3 -7
  2. package/components/checkbox.js +4 -7
  3. package/components/header.js +42 -4
  4. package/components/index2.js +74 -3
  5. package/components/ion-accordion.js +93 -14
  6. package/components/ion-input.js +6 -14
  7. package/components/ion-select.js +58 -10
  8. package/components/ion-textarea.js +5 -13
  9. package/components/ion-toggle.js +4 -7
  10. package/components/{notch-controller.js → validity.js} +14 -1
  11. package/dist/cjs/{index-CD5Rjp23.js → index-094mMFB-.js} +76 -5
  12. package/dist/cjs/index.cjs.js +3 -3
  13. package/dist/cjs/ion-accordion_2.cjs.entry.js +91 -13
  14. package/dist/cjs/ion-app_8.cjs.entry.js +43 -5
  15. package/dist/cjs/ion-button_2.cjs.entry.js +3 -7
  16. package/dist/cjs/ion-checkbox.cjs.entry.js +4 -7
  17. package/dist/cjs/ion-input.cjs.entry.js +7 -15
  18. package/dist/cjs/ion-modal.cjs.entry.js +1 -1
  19. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  20. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-select_3.cjs.entry.js +56 -10
  22. package/dist/cjs/ion-textarea.cjs.entry.js +6 -14
  23. package/dist/cjs/ion-toggle.cjs.entry.js +4 -7
  24. package/dist/cjs/ionic.cjs.js +1 -1
  25. package/dist/cjs/{ios.transition-j9CclgEW.js → ios.transition-BOt_uW73.js} +1 -1
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/cjs/{md.transition-CwFyRSfv.js → md.transition-Dt968VXB.js} +1 -1
  28. package/dist/cjs/{notch-controller-Bzqhjm4f.js → validity-C8QoAYT2.js} +14 -0
  29. package/dist/collection/components/accordion/accordion.js +93 -14
  30. package/dist/collection/components/button/button.js +3 -7
  31. package/dist/collection/components/checkbox/checkbox.js +4 -7
  32. package/dist/collection/components/header/header.ios.css +27 -1
  33. package/dist/collection/components/header/header.js +5 -4
  34. package/dist/collection/components/header/header.utils.js +37 -0
  35. package/dist/collection/components/input/input.js +6 -14
  36. package/dist/collection/components/select/select.js +59 -11
  37. package/dist/collection/components/textarea/textarea.js +5 -13
  38. package/dist/collection/components/toggle/toggle.js +4 -7
  39. package/dist/collection/utils/forms/index.js +1 -0
  40. package/dist/collection/utils/forms/validity.js +15 -0
  41. package/dist/collection/utils/test/playwright/page/utils/spy-on-event.js +32 -0
  42. package/dist/collection/utils/transition/index.js +74 -3
  43. package/dist/docs.json +1 -1
  44. package/dist/esm/{index-D6G2seR8.js → index-r2D9DEro.js} +76 -5
  45. package/dist/esm/index.js +3 -3
  46. package/dist/esm/ion-accordion_2.entry.js +91 -13
  47. package/dist/esm/ion-app_8.entry.js +43 -5
  48. package/dist/esm/ion-button_2.entry.js +3 -7
  49. package/dist/esm/ion-checkbox.entry.js +4 -7
  50. package/dist/esm/ion-input.entry.js +6 -14
  51. package/dist/esm/ion-modal.entry.js +1 -1
  52. package/dist/esm/ion-nav_2.entry.js +1 -1
  53. package/dist/esm/ion-popover.entry.js +1 -1
  54. package/dist/esm/ion-select_3.entry.js +55 -9
  55. package/dist/esm/ion-textarea.entry.js +5 -13
  56. package/dist/esm/ion-toggle.entry.js +4 -7
  57. package/dist/esm/ionic.js +1 -1
  58. package/dist/esm/{ios.transition-Bpq9ixwv.js → ios.transition-BDzw0_Hm.js} +1 -1
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/{md.transition-zOA0oanq.js → md.transition-BzDYi3qq.js} +1 -1
  61. package/dist/esm/{notch-controller-BwelN_JM.js → validity-B8oWougr.js} +14 -1
  62. package/dist/ionic/index.esm.js +1 -1
  63. package/dist/ionic/ionic.esm.js +1 -1
  64. package/dist/ionic/p-43ed1ef5.entry.js +4 -0
  65. package/dist/ionic/p-4cc26913.entry.js +4 -0
  66. package/dist/ionic/{p-323421af.entry.js → p-5a39a99a.entry.js} +1 -1
  67. package/dist/ionic/p-5fb517e4.entry.js +4 -0
  68. package/dist/ionic/p-8bdfc8f6.entry.js +4 -0
  69. package/dist/ionic/{p-9a36e2e7.entry.js → p-95bddd49.entry.js} +1 -1
  70. package/dist/ionic/{p-DPhQmGJN.js → p-C7hRNDhM.js} +1 -1
  71. package/dist/ionic/p-DUt5fQmA.js +4 -0
  72. package/dist/ionic/{p-9R1XyICs.js → p-DZRJwG4S.js} +1 -1
  73. package/dist/ionic/{p-DCv9sLH2.js → p-DieJyvMP.js} +1 -1
  74. package/dist/ionic/p-d0a2a1ab.entry.js +4 -0
  75. package/dist/ionic/p-dc2e126d.entry.js +4 -0
  76. package/dist/ionic/{p-de7b5fa3.entry.js → p-e16b69e1.entry.js} +1 -1
  77. package/dist/ionic/p-f65f9308.entry.js +4 -0
  78. package/dist/ionic/p-fc278823.entry.js +4 -0
  79. package/dist/ionic/svg/checkbox-outline.svg +1 -0
  80. package/dist/ionic/svg/checkbox-sharp.svg +1 -0
  81. package/dist/ionic/svg/checkbox.svg +1 -0
  82. package/dist/ionic/svg/checkmark-circle-outline.svg +1 -0
  83. package/dist/ionic/svg/checkmark-circle-sharp.svg +1 -0
  84. package/dist/ionic/svg/checkmark-circle.svg +1 -0
  85. package/dist/ionic/svg/checkmark-done-circle-outline.svg +1 -0
  86. package/dist/ionic/svg/checkmark-done-circle-sharp.svg +1 -0
  87. package/dist/ionic/svg/checkmark-done-circle.svg +1 -0
  88. package/dist/ionic/svg/checkmark-done-outline.svg +1 -0
  89. package/dist/ionic/svg/checkmark-done-sharp.svg +1 -0
  90. package/dist/ionic/svg/checkmark-done.svg +1 -0
  91. package/dist/ionic/svg/checkmark-outline.svg +1 -0
  92. package/dist/ionic/svg/checkmark-sharp.svg +1 -0
  93. package/dist/ionic/svg/checkmark.svg +1 -0
  94. package/dist/ionic/svg/chevron-back-circle-outline.svg +1 -0
  95. package/dist/ionic/svg/chevron-back-circle-sharp.svg +1 -0
  96. package/dist/ionic/svg/chevron-back-circle.svg +1 -0
  97. package/dist/ionic/svg/chevron-back-outline.svg +1 -0
  98. package/dist/ionic/svg/chevron-back-sharp.svg +1 -0
  99. package/dist/ionic/svg/chevron-back.svg +1 -0
  100. package/dist/ionic/svg/chevron-collapse-outline.svg +1 -0
  101. package/dist/ionic/svg/chevron-collapse-sharp.svg +1 -0
  102. package/dist/ionic/svg/chevron-collapse.svg +1 -0
  103. package/dist/ionic/svg/chevron-down-circle-outline.svg +1 -0
  104. package/dist/ionic/svg/chevron-down-circle-sharp.svg +1 -0
  105. package/dist/ionic/svg/chevron-down-circle.svg +1 -0
  106. package/dist/ionic/svg/chevron-down-outline.svg +1 -0
  107. package/dist/ionic/svg/chevron-down-sharp.svg +1 -0
  108. package/dist/ionic/svg/chevron-down.svg +1 -0
  109. package/dist/ionic/svg/chevron-expand-outline.svg +1 -0
  110. package/dist/ionic/svg/chevron-expand-sharp.svg +1 -0
  111. package/dist/ionic/svg/chevron-expand.svg +1 -0
  112. package/dist/ionic/svg/chevron-forward-circle-outline.svg +1 -0
  113. package/dist/ionic/svg/chevron-forward-circle-sharp.svg +1 -0
  114. package/dist/ionic/svg/chevron-forward-circle.svg +1 -0
  115. package/dist/ionic/svg/chevron-forward-outline.svg +1 -0
  116. package/dist/ionic/svg/chevron-forward-sharp.svg +1 -0
  117. package/dist/ionic/svg/chevron-forward.svg +1 -0
  118. package/dist/ionic/svg/chevron-up-circle-outline.svg +1 -0
  119. package/dist/ionic/svg/chevron-up-circle-sharp.svg +1 -0
  120. package/dist/ionic/svg/chevron-up-circle.svg +1 -0
  121. package/dist/ionic/svg/chevron-up-outline.svg +1 -0
  122. package/dist/ionic/svg/chevron-up-sharp.svg +1 -0
  123. package/dist/ionic/svg/chevron-up.svg +1 -0
  124. package/dist/ionic/svg/clipboard-outline.svg +1 -0
  125. package/dist/ionic/svg/clipboard-sharp.svg +1 -0
  126. package/dist/ionic/svg/clipboard.svg +1 -0
  127. package/dist/ionic/svg/close-circle-outline.svg +1 -0
  128. package/dist/ionic/svg/close-circle-sharp.svg +1 -0
  129. package/dist/ionic/svg/close-circle.svg +1 -0
  130. package/dist/ionic/svg/close-outline.svg +1 -0
  131. package/dist/ionic/svg/close-sharp.svg +1 -0
  132. package/dist/ionic/svg/close.svg +1 -0
  133. package/dist/ionic/svg/cloud-circle-outline.svg +1 -0
  134. package/dist/ionic/svg/cloud-circle-sharp.svg +1 -0
  135. package/dist/ionic/svg/cloud-circle.svg +1 -0
  136. package/dist/ionic/svg/cloud-done-outline.svg +1 -0
  137. package/dist/ionic/svg/cloud-done-sharp.svg +1 -0
  138. package/dist/ionic/svg/cloud-done.svg +1 -0
  139. package/dist/ionic/svg/cloud-download-outline.svg +1 -0
  140. package/dist/ionic/svg/cloud-download-sharp.svg +1 -0
  141. package/dist/ionic/svg/cloud-download.svg +1 -0
  142. package/dist/ionic/svg/cloud-offline-outline.svg +1 -0
  143. package/dist/ionic/svg/cloud-offline-sharp.svg +1 -0
  144. package/dist/ionic/svg/cloud-offline.svg +1 -0
  145. package/dist/ionic/svg/cloud-outline.svg +1 -0
  146. package/dist/ionic/svg/cloud-sharp.svg +1 -0
  147. package/dist/ionic/svg/cloud-upload-outline.svg +1 -0
  148. package/dist/ionic/svg/cloud-upload-sharp.svg +1 -0
  149. package/dist/ionic/svg/cloud-upload.svg +1 -0
  150. package/dist/ionic/svg/cloud.svg +1 -0
  151. package/dist/ionic/svg/cloudy-night-outline.svg +1 -0
  152. package/dist/ionic/svg/cloudy-night-sharp.svg +1 -0
  153. package/dist/ionic/svg/cloudy-night.svg +1 -0
  154. package/dist/ionic/svg/cloudy-outline.svg +1 -0
  155. package/dist/ionic/svg/cloudy-sharp.svg +1 -0
  156. package/dist/ionic/svg/cloudy.svg +1 -0
  157. package/dist/ionic/svg/code-download-outline.svg +1 -0
  158. package/dist/ionic/svg/code-download-sharp.svg +1 -0
  159. package/dist/ionic/svg/code-download.svg +1 -0
  160. package/dist/ionic/svg/code-outline.svg +1 -0
  161. package/dist/ionic/svg/code-sharp.svg +1 -0
  162. package/dist/ionic/svg/code-slash-outline.svg +1 -0
  163. package/dist/ionic/svg/code-slash-sharp.svg +1 -0
  164. package/dist/ionic/svg/code-slash.svg +1 -0
  165. package/dist/ionic/svg/code-working-outline.svg +1 -0
  166. package/dist/ionic/svg/code-working-sharp.svg +1 -0
  167. package/dist/ionic/svg/code-working.svg +1 -0
  168. package/dist/ionic/svg/code.svg +1 -0
  169. package/dist/ionic/svg/cog-outline.svg +1 -0
  170. package/dist/ionic/svg/cog-sharp.svg +1 -0
  171. package/dist/ionic/svg/cog.svg +1 -0
  172. package/dist/ionic/svg/color-fill-outline.svg +1 -0
  173. package/dist/ionic/svg/color-fill-sharp.svg +1 -0
  174. package/dist/ionic/svg/color-fill.svg +1 -0
  175. package/dist/ionic/svg/color-filter-outline.svg +1 -0
  176. package/dist/ionic/svg/color-filter-sharp.svg +1 -0
  177. package/dist/ionic/svg/color-filter.svg +1 -0
  178. package/dist/ionic/svg/color-palette-outline.svg +1 -0
  179. package/dist/ionic/svg/color-palette-sharp.svg +1 -0
  180. package/dist/ionic/svg/color-palette.svg +1 -0
  181. package/dist/ionic/svg/color-wand-outline.svg +1 -0
  182. package/dist/ionic/svg/color-wand-sharp.svg +1 -0
  183. package/dist/ionic/svg/color-wand.svg +1 -0
  184. package/dist/ionic/svg/compass-outline.svg +1 -0
  185. package/dist/ionic/svg/compass-sharp.svg +1 -0
  186. package/dist/ionic/svg/compass.svg +1 -0
  187. package/dist/ionic/svg/construct-outline.svg +1 -0
  188. package/dist/ionic/svg/construct-sharp.svg +1 -0
  189. package/dist/ionic/svg/construct.svg +1 -0
  190. package/dist/ionic/svg/contract-outline.svg +1 -0
  191. package/dist/ionic/svg/contract-sharp.svg +1 -0
  192. package/dist/ionic/svg/contract.svg +1 -0
  193. package/dist/ionic/svg/contrast-outline.svg +1 -0
  194. package/dist/ionic/svg/contrast-sharp.svg +1 -0
  195. package/dist/ionic/svg/contrast.svg +1 -0
  196. package/dist/ionic/svg/copy-outline.svg +1 -0
  197. package/dist/ionic/svg/copy-sharp.svg +1 -0
  198. package/dist/ionic/svg/copy.svg +1 -0
  199. package/dist/ionic/svg/create-outline.svg +1 -0
  200. package/dist/ionic/svg/create-sharp.svg +1 -0
  201. package/dist/ionic/svg/create.svg +1 -0
  202. package/dist/ionic/svg/crop-outline.svg +1 -0
  203. package/dist/ionic/svg/crop-sharp.svg +1 -0
  204. package/dist/ionic/svg/crop.svg +1 -0
  205. package/dist/ionic/svg/cube-outline.svg +1 -0
  206. package/dist/ionic/svg/cube-sharp.svg +1 -0
  207. package/dist/ionic/svg/cube.svg +1 -0
  208. package/dist/ionic/svg/cut-outline.svg +1 -0
  209. package/dist/ionic/svg/cut-sharp.svg +1 -0
  210. package/dist/ionic/svg/cut.svg +1 -0
  211. package/dist/ionic/svg/desktop-outline.svg +1 -0
  212. package/dist/ionic/svg/desktop-sharp.svg +1 -0
  213. package/dist/ionic/svg/desktop.svg +1 -0
  214. package/dist/ionic/svg/diamond-outline.svg +1 -0
  215. package/dist/ionic/svg/diamond-sharp.svg +1 -0
  216. package/dist/ionic/svg/diamond.svg +1 -0
  217. package/dist/ionic/svg/dice-outline.svg +1 -0
  218. package/dist/ionic/svg/dice-sharp.svg +1 -0
  219. package/dist/ionic/svg/dice.svg +1 -0
  220. package/dist/ionic/svg/disc-outline.svg +1 -0
  221. package/dist/ionic/svg/disc-sharp.svg +1 -0
  222. package/dist/ionic/svg/disc.svg +1 -0
  223. package/dist/ionic/svg/document-attach-outline.svg +1 -0
  224. package/dist/ionic/svg/document-attach-sharp.svg +1 -0
  225. package/dist/ionic/svg/document-attach.svg +1 -0
  226. package/dist/ionic/svg/document-lock-outline.svg +1 -0
  227. package/dist/ionic/svg/document-lock-sharp.svg +1 -0
  228. package/dist/ionic/svg/document-lock.svg +1 -0
  229. package/dist/ionic/svg/document-outline.svg +1 -0
  230. package/dist/types/components/accordion/accordion.d.ts +18 -1
  231. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  232. package/dist/types/components/header/header.utils.d.ts +10 -0
  233. package/dist/types/components/input/input.d.ts +0 -4
  234. package/dist/types/components/select/select.d.ts +6 -0
  235. package/dist/types/components/textarea/textarea.d.ts +0 -4
  236. package/dist/types/components/toggle/toggle.d.ts +0 -1
  237. package/dist/types/utils/forms/index.d.ts +1 -0
  238. package/dist/types/utils/forms/validity.d.ts +10 -0
  239. package/dist/types/utils/transition/index.d.ts +9 -0
  240. package/hydrate/index.js +262 -73
  241. package/hydrate/index.mjs +262 -73
  242. package/package.json +3 -3
  243. package/dist/ionic/p-1c8a476d.entry.js +0 -4
  244. package/dist/ionic/p-3355a2ff.entry.js +0 -4
  245. package/dist/ionic/p-62e50f80.entry.js +0 -4
  246. package/dist/ionic/p-785026d7.entry.js +0 -4
  247. package/dist/ionic/p-78c74a3e.entry.js +0 -4
  248. package/dist/ionic/p-83fc84e7.entry.js +0 -4
  249. package/dist/ionic/p-913a7c1e.entry.js +0 -4
  250. package/dist/ionic/p-CMhMiYSX.js +0 -4
  251. package/dist/ionic/p-c17c0a01.entry.js +0 -4
package/hydrate/index.js CHANGED
@@ -4042,10 +4042,57 @@ const accordionMdCss = ":host{display:block;position:relative;width:100%;backgro
4042
4042
  class Accordion {
4043
4043
  constructor(hostRef) {
4044
4044
  registerInstance(this, hostRef);
4045
- this.updateListener = () => this.updateState(false);
4045
+ this.accordionGroupUpdateHandler = () => {
4046
+ /**
4047
+ * Determine if this update will cause an actual state change.
4048
+ * We only want to mark as "interacted" if the state is changing.
4049
+ */
4050
+ const accordionGroup = this.accordionGroupEl;
4051
+ if (accordionGroup) {
4052
+ const value = accordionGroup.value;
4053
+ const accordionValue = this.value;
4054
+ const shouldExpand = Array.isArray(value) ? value.includes(accordionValue) : value === accordionValue;
4055
+ const isExpanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
4056
+ const stateWillChange = shouldExpand !== isExpanded;
4057
+ /**
4058
+ * Only mark as interacted if:
4059
+ * 1. This is not the first update we've received with a defined value
4060
+ * 2. The state is actually changing (prevents redundant updates from enabling animations)
4061
+ */
4062
+ if (this.hasReceivedFirstUpdate && stateWillChange) {
4063
+ this.hasInteracted = true;
4064
+ }
4065
+ /**
4066
+ * Only count this as the first update if the group value is defined.
4067
+ * This prevents the initial undefined value from the group's componentDidLoad
4068
+ * from being treated as the first real update.
4069
+ */
4070
+ if (value !== undefined) {
4071
+ this.hasReceivedFirstUpdate = true;
4072
+ }
4073
+ }
4074
+ this.updateState();
4075
+ };
4046
4076
  this.state = 1 /* AccordionState.Collapsed */;
4047
4077
  this.isNext = false;
4048
4078
  this.isPrevious = false;
4079
+ /**
4080
+ * Tracks whether a user-initiated interaction has occurred.
4081
+ * Animations are disabled until the first interaction happens.
4082
+ * This prevents the accordion from animating when it's programmatically
4083
+ * set to an expanded or collapsed state on initial load.
4084
+ */
4085
+ this.hasInteracted = false;
4086
+ /**
4087
+ * Tracks if this accordion has ever been expanded.
4088
+ * Used to prevent the first expansion from animating.
4089
+ */
4090
+ this.hasEverBeenExpanded = false;
4091
+ /**
4092
+ * Tracks if this accordion has received its first update from the group.
4093
+ * Used to distinguish initial programmatic sets from user interactions.
4094
+ */
4095
+ this.hasReceivedFirstUpdate = false;
4049
4096
  /**
4050
4097
  * The value of the accordion. Defaults to an autogenerated
4051
4098
  * value.
@@ -4150,10 +4197,15 @@ class Accordion {
4150
4197
  iconEl.setAttribute('aria-hidden', 'true');
4151
4198
  ionItem.appendChild(iconEl);
4152
4199
  };
4153
- this.expandAccordion = (initialUpdate = false) => {
4200
+ this.expandAccordion = () => {
4154
4201
  const { contentEl, contentElWrapper } = this;
4155
- if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
4202
+ /**
4203
+ * If the content elements aren't available yet, just set the state.
4204
+ * This happens on initial render before the DOM is ready.
4205
+ */
4206
+ if (contentEl === undefined || contentElWrapper === undefined) {
4156
4207
  this.state = 4 /* AccordionState.Expanded */;
4208
+ this.hasEverBeenExpanded = true;
4157
4209
  return;
4158
4210
  }
4159
4211
  if (this.state === 4 /* AccordionState.Expanded */) {
@@ -4162,6 +4214,11 @@ class Accordion {
4162
4214
  if (this.currentRaf !== undefined) {
4163
4215
  cancelAnimationFrame(this.currentRaf);
4164
4216
  }
4217
+ /**
4218
+ * Mark that this accordion has been expanded at least once.
4219
+ * This allows subsequent expansions to animate.
4220
+ */
4221
+ this.hasEverBeenExpanded = true;
4165
4222
  if (this.shouldAnimate()) {
4166
4223
  raf(() => {
4167
4224
  this.state = 8 /* AccordionState.Expanding */;
@@ -4179,9 +4236,13 @@ class Accordion {
4179
4236
  this.state = 4 /* AccordionState.Expanded */;
4180
4237
  }
4181
4238
  };
4182
- this.collapseAccordion = (initialUpdate = false) => {
4239
+ this.collapseAccordion = () => {
4183
4240
  const { contentEl } = this;
4184
- if (initialUpdate || contentEl === undefined) {
4241
+ /**
4242
+ * If the content element isn't available yet, just set the state.
4243
+ * This happens on initial render before the DOM is ready.
4244
+ */
4245
+ if (contentEl === undefined) {
4185
4246
  this.state = 1 /* AccordionState.Collapsed */;
4186
4247
  return;
4187
4248
  }
@@ -4216,6 +4277,18 @@ class Accordion {
4216
4277
  * of what is set in the config.
4217
4278
  */
4218
4279
  this.shouldAnimate = () => {
4280
+ /**
4281
+ * Don't animate until after the first user interaction.
4282
+ * This prevents animations on initial load when accordions
4283
+ * start in an expanded or collapsed state programmatically.
4284
+ *
4285
+ * Additionally, don't animate the very first expansion even if
4286
+ * hasInteracted is true. This handles edge cases like React StrictMode
4287
+ * where effects run twice and might incorrectly mark as interacted.
4288
+ */
4289
+ if (!this.hasInteracted || !this.hasEverBeenExpanded) {
4290
+ return false;
4291
+ }
4219
4292
  if (typeof window === 'undefined') {
4220
4293
  return false;
4221
4294
  }
@@ -4232,7 +4305,7 @@ class Accordion {
4232
4305
  }
4233
4306
  return true;
4234
4307
  };
4235
- this.updateState = async (initialUpdate = false) => {
4308
+ this.updateState = async () => {
4236
4309
  const accordionGroup = this.accordionGroupEl;
4237
4310
  const accordionValue = this.value;
4238
4311
  if (!accordionGroup) {
@@ -4241,11 +4314,11 @@ class Accordion {
4241
4314
  const value = accordionGroup.value;
4242
4315
  const shouldExpand = Array.isArray(value) ? value.includes(accordionValue) : value === accordionValue;
4243
4316
  if (shouldExpand) {
4244
- this.expandAccordion(initialUpdate);
4317
+ this.expandAccordion();
4245
4318
  this.isNext = this.isPrevious = false;
4246
4319
  }
4247
4320
  else {
4248
- this.collapseAccordion(initialUpdate);
4321
+ this.collapseAccordion();
4249
4322
  /**
4250
4323
  * When using popout or inset,
4251
4324
  * the collapsed accordion items
@@ -4293,14 +4366,14 @@ class Accordion {
4293
4366
  var _a;
4294
4367
  const accordionGroupEl = (this.accordionGroupEl = (_a = this.el) === null || _a === void 0 ? void 0 : _a.closest('ion-accordion-group'));
4295
4368
  if (accordionGroupEl) {
4296
- this.updateState(true);
4297
- addEventListener$1(accordionGroupEl, 'ionValueChange', this.updateListener);
4369
+ this.updateState();
4370
+ addEventListener$1(accordionGroupEl, 'ionValueChange', this.accordionGroupUpdateHandler);
4298
4371
  }
4299
4372
  }
4300
4373
  disconnectedCallback() {
4301
4374
  const accordionGroupEl = this.accordionGroupEl;
4302
4375
  if (accordionGroupEl) {
4303
- removeEventListener(accordionGroupEl, 'ionValueChange', this.updateListener);
4376
+ removeEventListener(accordionGroupEl, 'ionValueChange', this.accordionGroupUpdateHandler);
4304
4377
  }
4305
4378
  }
4306
4379
  componentDidLoad() {
@@ -4324,6 +4397,11 @@ class Accordion {
4324
4397
  const { accordionGroupEl, disabled, readonly, value, state } = this;
4325
4398
  if (disabled || readonly)
4326
4399
  return;
4400
+ /**
4401
+ * Mark that the user has interacted with the accordion.
4402
+ * This enables animations for all future state changes.
4403
+ */
4404
+ this.hasInteracted = true;
4327
4405
  if (accordionGroupEl) {
4328
4406
  /**
4329
4407
  * Because the accordion group may or may
@@ -4344,7 +4422,7 @@ class Accordion {
4344
4422
  const headerPart = expanded ? 'header expanded' : 'header';
4345
4423
  const contentPart = expanded ? 'content expanded' : 'content';
4346
4424
  this.setAria(expanded);
4347
- return (hAsync(Host, { key: '073e1d02c18dcbc20c68648426e87c14750c031d', class: {
4425
+ return (hAsync(Host, { key: '9c90bce01eff7e5774a19f69c872f3761d66cf3c', class: {
4348
4426
  [mode]: true,
4349
4427
  'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
4350
4428
  'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
@@ -4355,7 +4433,7 @@ class Accordion {
4355
4433
  'accordion-disabled': disabled,
4356
4434
  'accordion-readonly': readonly,
4357
4435
  'accordion-animated': this.shouldAnimate(),
4358
- } }, 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" })))));
4436
+ } }, hAsync("div", { key: 'cab40d5bcf3c93fd78e70b6d3906a541e725837d', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, hAsync("slot", { key: '672bc7fb3f9e18076b41e20fc9eaeab7cafcf3a2', name: "header" })), hAsync("div", { key: 'fd777ca5b4ab04aa4f44c339d58c8cd987c52bcb', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, hAsync("div", { key: '0aad70a71e2cd2c16b2e98fa0bdd40421d95fe16', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, hAsync("slot", { key: 'd630e10ac7c56b4dbf943b523f26759b83aead55', name: "content" })))));
4359
4437
  }
4360
4438
  static get delegatesFocus() { return true; }
4361
4439
  get el() { return getElement(this); }
@@ -4377,7 +4455,8 @@ class Accordion {
4377
4455
  "toggleIconSlot": [1, "toggle-icon-slot"],
4378
4456
  "state": [32],
4379
4457
  "isNext": [32],
4380
- "isPrevious": [32]
4458
+ "isPrevious": [32],
4459
+ "hasInteracted": [32]
4381
4460
  },
4382
4461
  "$listeners$": undefined,
4383
4462
  "$lazyBundleId$": "-",
@@ -9263,11 +9342,7 @@ class Button {
9263
9342
  target,
9264
9343
  };
9265
9344
  let fill = this.fill;
9266
- /**
9267
- * We check both undefined and null to
9268
- * work around https://github.com/ionic-team/stencil/issues/3586.
9269
- */
9270
- if (fill == null) {
9345
+ if (fill === undefined) {
9271
9346
  fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
9272
9347
  }
9273
9348
  /**
@@ -9280,7 +9355,7 @@ class Button {
9280
9355
  {
9281
9356
  type !== 'button' && this.renderHiddenButton();
9282
9357
  }
9283
- return (hAsync(Host, { key: 'b105ad09215adb3ca2298acdadf0dc9154bbb9b0', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9358
+ return (hAsync(Host, { key: 'ed82ea53705523f9afc5f1a9addff44cc6424f27', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9284
9359
  [mode]: true,
9285
9360
  [buttonType]: true,
9286
9361
  [`${buttonType}-${expand}`]: expand !== undefined,
@@ -9295,7 +9370,7 @@ class Button {
9295
9370
  'button-disabled': disabled,
9296
9371
  'ion-activatable': true,
9297
9372
  'ion-focusable': true,
9298
- }) }, 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 }))));
9373
+ }) }, 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 }))));
9299
9374
  }
9300
9375
  get el() { return getElement(this); }
9301
9376
  static get watchers() { return {
@@ -9690,7 +9765,6 @@ class Checkbox {
9690
9765
  };
9691
9766
  this.toggleChecked = (ev) => {
9692
9767
  ev.preventDefault();
9693
- this.setFocus();
9694
9768
  this.setChecked(!this.checked);
9695
9769
  this.indeterminate = false;
9696
9770
  };
@@ -9727,9 +9801,7 @@ class Checkbox {
9727
9801
  }
9728
9802
  /** @internal */
9729
9803
  async setFocus() {
9730
- if (this.focusEl) {
9731
- this.focusEl.focus();
9732
- }
9804
+ this.el.focus();
9733
9805
  }
9734
9806
  getHintTextID() {
9735
9807
  const { el, helperText, errorText, helperTextId, errorTextId } = this;
@@ -9765,7 +9837,7 @@ class Checkbox {
9765
9837
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
9766
9838
  // The host element must have a checkbox role to ensure proper VoiceOver
9767
9839
  // support in Safari for accessibility.
9768
- return (hAsync(Host, { key: '26cbe7220e555107200e9b5deeae754aa534a80b', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: createColorClasses$1(color, {
9840
+ return (hAsync(Host, { key: 'ee2e02d28f9d15a1ec746609f7e9559444f621e5', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses$1(color, {
9769
9841
  [mode]: true,
9770
9842
  'in-item': hostContext('ion-item', el),
9771
9843
  'checkbox-checked': checked,
@@ -9775,10 +9847,10 @@ class Checkbox {
9775
9847
  [`checkbox-justify-${justify}`]: justify !== undefined,
9776
9848
  [`checkbox-alignment-${alignment}`]: alignment !== undefined,
9777
9849
  [`checkbox-label-placement-${labelPlacement}`]: true,
9778
- }), onClick: this.onClick }, hAsync("label", { key: 'f025cec5ff08e8be4487b9cc0324616ca5dfae2a', class: "checkbox-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: 'dc53f7e4e240dc2e18556e6350df2b5c3169f553', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), hAsync("div", { key: 'a625e9b50c3b617de8bbbfd624d772454fecaf2d', class: {
9850
+ }) }, hAsync("label", { key: '84d4c33da0348dc65ad36fb0fafd48be366dcf3b', class: "checkbox-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: '427db69a3ab8a17aa0867519c90f585b8930406b', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), hAsync("div", { key: '9dda7024b3a4f1ee55351f783f9a10f9b4ad0d12', class: {
9779
9851
  'label-text-wrapper': true,
9780
9852
  'label-text-wrapper-hidden': !hasLabelContent,
9781
- }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '87d1a90691327945f4343406706e4ab27f453844' }), this.renderHintText()), hAsync("div", { key: 'b57fed8cdecee4df1ef0d57f157267ee77fac653', class: "native-wrapper" }, hAsync("svg", { key: '13a8aac044d46dc99e3b60a1a643785511f216ac', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
9853
+ }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: 'f9d1d545ffd4164b650808241b51ea1bedc6a42c' }), this.renderHintText()), hAsync("div", { key: 'a96d61ac324864228f14caa0e9f2c0d15418882e', class: "native-wrapper" }, hAsync("svg", { key: '64ff3e4d87e190601811ef64323edec18d510cd1', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
9782
9854
  }
9783
9855
  getSVGPath(mode, indeterminate) {
9784
9856
  let path = indeterminate ? (hAsync("path", { d: "M6 12L18 12", part: "mark" })) : (hAsync("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
@@ -15229,6 +15301,8 @@ class Grid {
15229
15301
  }
15230
15302
 
15231
15303
  const TRANSITION = 'all 0.2s ease-in-out';
15304
+ const ROLE_NONE = 'none';
15305
+ const ROLE_BANNER = 'banner';
15232
15306
  const cloneElement = (tagName) => {
15233
15307
  const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
15234
15308
  if (getCachedEl !== null) {
@@ -15355,6 +15429,7 @@ const setHeaderActive = (headerIndex, active = true) => {
15355
15429
  const toolbars = headerIndex.toolbars;
15356
15430
  const ionTitles = toolbars.map((toolbar) => toolbar.ionTitleEl);
15357
15431
  if (active) {
15432
+ headerEl.setAttribute('role', ROLE_BANNER);
15358
15433
  headerEl.classList.remove('header-collapse-condense-inactive');
15359
15434
  ionTitles.forEach((ionTitle) => {
15360
15435
  if (ionTitle) {
@@ -15363,6 +15438,16 @@ const setHeaderActive = (headerIndex, active = true) => {
15363
15438
  });
15364
15439
  }
15365
15440
  else {
15441
+ /**
15442
+ * There can only be one banner landmark per page.
15443
+ * By default, all ion-headers have the banner role.
15444
+ * This causes an accessibility issue when using a
15445
+ * condensed header since there are two ion-headers
15446
+ * on the page at once (active and inactive).
15447
+ * To solve this, the role needs to be toggled
15448
+ * based on which header is active.
15449
+ */
15450
+ headerEl.setAttribute('role', ROLE_NONE);
15366
15451
  headerEl.classList.add('header-collapse-condense-inactive');
15367
15452
  /**
15368
15453
  * The small title should only be accessed by screen readers
@@ -15422,8 +15507,32 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
15422
15507
  });
15423
15508
  });
15424
15509
  };
15510
+ /**
15511
+ * Get the role type for the ion-header.
15512
+ *
15513
+ * @param isInsideMenu If ion-header is inside ion-menu.
15514
+ * @param isCondensed If ion-header has collapse="condense".
15515
+ * @param mode The current mode.
15516
+ * @returns 'none' if inside ion-menu or if condensed in md
15517
+ * mode, otherwise 'banner'.
15518
+ */
15519
+ const getRoleType = (isInsideMenu, isCondensed, mode) => {
15520
+ // If the header is inside a menu, it should not have the banner role.
15521
+ if (isInsideMenu) {
15522
+ return ROLE_NONE;
15523
+ }
15524
+ /**
15525
+ * Only apply role="none" to `md` mode condensed headers
15526
+ * since the large header is never shown.
15527
+ */
15528
+ if (isCondensed && mode === 'md') {
15529
+ return ROLE_NONE;
15530
+ }
15531
+ // Default to banner role.
15532
+ return ROLE_BANNER;
15533
+ };
15425
15534
 
15426
- 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}";
15535
+ 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}";
15427
15536
 
15428
15537
  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}";
15429
15538
 
@@ -15566,16 +15675,17 @@ class Header {
15566
15675
  const { translucent, inheritedAttributes } = this;
15567
15676
  const mode = getIonMode$1(this);
15568
15677
  const collapse = this.collapse || 'none';
15678
+ const isCondensed = collapse === 'condense';
15569
15679
  // banner role must be at top level, so remove role if inside a menu
15570
- const roleType = hostContext('ion-menu', this.el) ? 'none' : 'banner';
15571
- return (hAsync(Host, Object.assign({ key: 'b6cc27f0b08afc9fcc889683525da765d80ba672', role: roleType, class: {
15680
+ const roleType = getRoleType(hostContext('ion-menu', this.el), isCondensed, mode);
15681
+ return (hAsync(Host, Object.assign({ key: '863c4568cd7b8c0ec55109f193bbbaed68a1346e', role: roleType, class: {
15572
15682
  [mode]: true,
15573
15683
  // Used internally for styling
15574
15684
  [`header-${mode}`]: true,
15575
15685
  [`header-translucent`]: this.translucent,
15576
15686
  [`header-collapse-${collapse}`]: true,
15577
15687
  [`header-translucent-${mode}`]: this.translucent,
15578
- } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '395766d4dcee3398bc91960db21f922095292f14', class: "header-background" }), hAsync("slot", { key: '09a67ece27b258ff1248805d43d92a49b2c6859a' })));
15688
+ } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '25c3bdce328b0b35607d154c8b8374679313d881', class: "header-background" }), hAsync("slot", { key: 'b44fab0a9be7920b9650da26117c783e751e1702' })));
15579
15689
  }
15580
15690
  get el() { return getElement(this); }
15581
15691
  static get style() { return {
@@ -16387,6 +16497,19 @@ const isOptionSelected = (currentValue, compareValue, compareWith) => {
16387
16497
  }
16388
16498
  };
16389
16499
 
16500
+ /**
16501
+ * Checks if the form element is in an invalid state based on
16502
+ * Ionic validation classes.
16503
+ *
16504
+ * @param el The form element to check.
16505
+ * @returns `true` if the element is invalid, `false` otherwise.
16506
+ */
16507
+ const checkInvalidState = (el) => {
16508
+ const hasIonTouched = el.classList.contains('ion-touched');
16509
+ const hasIonInvalid = el.classList.contains('ion-invalid');
16510
+ return hasIonTouched && hasIonInvalid;
16511
+ };
16512
+
16390
16513
  /**
16391
16514
  * Used to update a scoped component that uses emulated slots. This fires when
16392
16515
  * content is passed into the slot or when the content inside of a slot changes.
@@ -16752,20 +16875,12 @@ class Input {
16752
16875
  componentWillLoad() {
16753
16876
  this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes$1(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
16754
16877
  }
16755
- /**
16756
- * Checks if the input is in an invalid state based on Ionic validation classes
16757
- */
16758
- checkInvalidState() {
16759
- const hasIonTouched = this.el.classList.contains('ion-touched');
16760
- const hasIonInvalid = this.el.classList.contains('ion-invalid');
16761
- return hasIonTouched && hasIonInvalid;
16762
- }
16763
16878
  connectedCallback() {
16764
16879
  const { el } = this;
16765
16880
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
16766
16881
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
16767
16882
  // Always set initial state
16768
- this.isInvalid = this.checkInvalidState();
16883
+ this.isInvalid = checkInvalidState(el);
16769
16884
  this.debounceChanged();
16770
16885
  }
16771
16886
  componentDidLoad() {
@@ -17019,7 +17134,7 @@ class Input {
17019
17134
  * TODO(FW-5592): Remove hasStartEndSlots condition
17020
17135
  */
17021
17136
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
17022
- return (hAsync(Host, { key: '8a51f0300d5bc66392f9ab9a6fa0b5d388072a33', class: createColorClasses$1(this.color, {
17137
+ return (hAsync(Host, { key: '97b5308021064d9e7434ef2d3d96f27045c1b0c4', class: createColorClasses$1(this.color, {
17023
17138
  [mode]: true,
17024
17139
  'has-value': hasValue,
17025
17140
  'has-focus': hasFocus,
@@ -17030,14 +17145,14 @@ class Input {
17030
17145
  'in-item': inItem,
17031
17146
  'in-item-color': hostContext('ion-item.ion-color', this.el),
17032
17147
  'input-disabled': disabled,
17033
- }) }, 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) => {
17148
+ }) }, 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) => {
17034
17149
  /**
17035
17150
  * This prevents mobile browsers from
17036
17151
  * blurring the input when the clear
17037
17152
  * button is activated.
17038
17153
  */
17039
17154
  ev.preventDefault();
17040
- }, 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()));
17155
+ }, 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()));
17041
17156
  }
17042
17157
  get el() { return getElement(this); }
17043
17158
  static get watchers() { return {
@@ -20678,11 +20793,22 @@ const iosTransitionAnimation$1 = () => Promise.resolve().then(function () { retu
20678
20793
  const mdTransitionAnimation$1 = () => Promise.resolve().then(function () { return md_transition; });
20679
20794
  const focusController = createFocusController();
20680
20795
  // TODO(FW-2832): types
20796
+ /**
20797
+ * Executes the main page transition.
20798
+ * It also manages the lifecycle of header visibility (if any)
20799
+ * to prevent visual flickering in iOS. The flickering only
20800
+ * occurs for a condensed header that is placed above the content.
20801
+ *
20802
+ * @param opts Options for the transition.
20803
+ * @returns A promise that resolves when the transition is complete.
20804
+ */
20681
20805
  const transition = (opts) => {
20682
20806
  return new Promise((resolve, reject) => {
20683
20807
  writeTask(() => {
20684
- beforeTransition(opts);
20685
- runTransition(opts).then((result) => {
20808
+ const transitioningInactiveHeader = getIosIonHeader(opts);
20809
+ beforeTransition(opts, transitioningInactiveHeader);
20810
+ runTransition(opts)
20811
+ .then((result) => {
20686
20812
  if (result.animation) {
20687
20813
  result.animation.destroy();
20688
20814
  }
@@ -20691,15 +20817,21 @@ const transition = (opts) => {
20691
20817
  }, (error) => {
20692
20818
  afterTransition(opts);
20693
20819
  reject(error);
20820
+ })
20821
+ .finally(() => {
20822
+ // Ensure that the header is restored to its original state.
20823
+ setHeaderTransitionClass(transitioningInactiveHeader, false);
20694
20824
  });
20695
20825
  });
20696
20826
  });
20697
20827
  };
20698
- const beforeTransition = (opts) => {
20828
+ const beforeTransition = (opts, transitioningInactiveHeader) => {
20699
20829
  const enteringEl = opts.enteringEl;
20700
20830
  const leavingEl = opts.leavingEl;
20701
20831
  focusController.saveViewFocus(leavingEl);
20702
20832
  setZIndex(enteringEl, leavingEl, opts.direction);
20833
+ // Prevent flickering of the header by adding a class.
20834
+ setHeaderTransitionClass(transitioningInactiveHeader, true);
20703
20835
  if (opts.showGoBack) {
20704
20836
  enteringEl.classList.add('can-go-back');
20705
20837
  }
@@ -20888,6 +21020,39 @@ const setZIndex = (enteringEl, leavingEl, direction) => {
20888
21020
  leavingEl.style.zIndex = '100';
20889
21021
  }
20890
21022
  };
21023
+ /**
21024
+ * Add a class to ensure that the header (if any)
21025
+ * does not flicker during the transition. By adding the
21026
+ * transitioning class, we ensure that the header has
21027
+ * the necessary styles to prevent the following flickers:
21028
+ * 1. When entering a page with a condensed header, the
21029
+ * header should never be visible. However,
21030
+ * it briefly renders the background color while
21031
+ * the transition is occurring.
21032
+ * 2. When leaving a page with a condensed header, the
21033
+ * header has an opacity of 0 and the pages
21034
+ * have a z-index which causes the entering page to
21035
+ * briefly show it's content underneath the leaving page.
21036
+ * 3. When entering a page or leaving a page with a fade
21037
+ * header, the header should not have a background color.
21038
+ * However, it briefly shows the background color while
21039
+ * the transition is occurring.
21040
+ *
21041
+ * @param header The header element to modify.
21042
+ * @param isTransitioning Whether the transition is occurring.
21043
+ */
21044
+ const setHeaderTransitionClass = (header, isTransitioning) => {
21045
+ if (!header) {
21046
+ return;
21047
+ }
21048
+ const transitionClass = 'header-transitioning';
21049
+ if (isTransitioning) {
21050
+ header.classList.add(transitionClass);
21051
+ }
21052
+ else {
21053
+ header.classList.remove(transitionClass);
21054
+ }
21055
+ };
20891
21056
  const getIonPageElement = (element) => {
20892
21057
  if (element.classList.contains('ion-page')) {
20893
21058
  return element;
@@ -20899,6 +21064,27 @@ const getIonPageElement = (element) => {
20899
21064
  // idk, return the original element so at least something animates and we don't have a null pointer
20900
21065
  return element;
20901
21066
  };
21067
+ /**
21068
+ * Retrieves the ion-header element from a page based on the
21069
+ * direction of the transition.
21070
+ *
21071
+ * @param opts Options for the transition.
21072
+ * @returns The ion-header element or null if not found or not in 'ios' mode.
21073
+ */
21074
+ const getIosIonHeader = (opts) => {
21075
+ const enteringEl = opts.enteringEl;
21076
+ const leavingEl = opts.leavingEl;
21077
+ const direction = opts.direction;
21078
+ const mode = opts.mode;
21079
+ if (mode !== 'ios') {
21080
+ return null;
21081
+ }
21082
+ const element = direction === 'back' ? leavingEl : enteringEl;
21083
+ if (!element) {
21084
+ return null;
21085
+ }
21086
+ return element.querySelector('ion-header');
21087
+ };
20902
21088
 
20903
21089
  const KEYBOARD_DID_OPEN = 'ionKeyboardDidShow';
20904
21090
 
@@ -33061,6 +33247,10 @@ class Select {
33061
33247
  * is applied in both cases.
33062
33248
  */
33063
33249
  this.hasFocus = false;
33250
+ /**
33251
+ * Track validation state for proper aria-live announcements.
33252
+ */
33253
+ this.isInvalid = false;
33064
33254
  /**
33065
33255
  * The text to display on the cancel button.
33066
33256
  */
@@ -33183,9 +33373,12 @@ class Select {
33183
33373
  this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {
33184
33374
  this.updateOverlayOptions();
33185
33375
  });
33376
+ // Always set initial state
33377
+ this.isInvalid = checkInvalidState(this.el);
33186
33378
  }
33187
33379
  componentWillLoad() {
33188
33380
  this.inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
33381
+ this.hintTextID = this.getHintTextID();
33189
33382
  }
33190
33383
  componentDidLoad() {
33191
33384
  /**
@@ -33209,6 +33402,11 @@ class Select {
33209
33402
  this.notchController.destroy();
33210
33403
  this.notchController = undefined;
33211
33404
  }
33405
+ // Clean up validation observer to prevent memory leaks.
33406
+ if (this.validationObserver) {
33407
+ this.validationObserver.disconnect();
33408
+ this.validationObserver = undefined;
33409
+ }
33212
33410
  }
33213
33411
  /**
33214
33412
  * Open the select overlay. The overlay is either an alert, action sheet, or popover,
@@ -33679,11 +33877,11 @@ class Select {
33679
33877
  }
33680
33878
  renderListbox() {
33681
33879
  const { disabled, inputId, isExpanded, required } = this;
33682
- 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) }));
33880
+ 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) }));
33683
33881
  }
33684
33882
  getHintTextID() {
33685
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
33686
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
33883
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33884
+ if (isInvalid && errorText) {
33687
33885
  return errorTextId;
33688
33886
  }
33689
33887
  if (helperText) {
@@ -33695,10 +33893,10 @@ class Select {
33695
33893
  * Renders the helper text or error text values
33696
33894
  */
33697
33895
  renderHintText() {
33698
- const { helperText, errorText, helperTextId, errorTextId } = this;
33896
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33699
33897
  return [
33700
- hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText),
33701
- hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText),
33898
+ hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null),
33899
+ hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null),
33702
33900
  ];
33703
33901
  }
33704
33902
  /**
@@ -33746,7 +33944,7 @@ class Select {
33746
33944
  * TODO(FW-5592): Remove hasStartEndSlots condition
33747
33945
  */
33748
33946
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
33749
- return (hAsync(Host, { key: 'c03fb65e8fc9f9aab295e07b282377d57d910519', onClick: this.onClick, class: createColorClasses$1(this.color, {
33947
+ return (hAsync(Host, { key: '35b5e18e6f79a802ff2d46d1242e80ff755cc0b9', onClick: this.onClick, class: createColorClasses$1(this.color, {
33750
33948
  [mode]: true,
33751
33949
  'in-item': inItem,
33752
33950
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -33764,7 +33962,7 @@ class Select {
33764
33962
  [`select-justify-${justify}`]: justifyEnabled,
33765
33963
  [`select-shape-${shape}`]: shape !== undefined,
33766
33964
  [`select-label-placement-${labelPlacement}`]: true,
33767
- }) }, 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()));
33965
+ }) }, 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()));
33768
33966
  }
33769
33967
  get el() { return getElement(this); }
33770
33968
  static get watchers() { return {
@@ -33805,6 +34003,8 @@ class Select {
33805
34003
  "required": [4],
33806
34004
  "isExpanded": [32],
33807
34005
  "hasFocus": [32],
34006
+ "isInvalid": [32],
34007
+ "hintTextID": [32],
33808
34008
  "open": [64]
33809
34009
  },
33810
34010
  "$listeners$": undefined,
@@ -34992,20 +35192,12 @@ class Textarea {
34992
35192
  this.el.click();
34993
35193
  }
34994
35194
  }
34995
- /**
34996
- * Checks if the textarea is in an invalid state based on Ionic validation classes
34997
- */
34998
- checkValidationState() {
34999
- const hasIonTouched = this.el.classList.contains('ion-touched');
35000
- const hasIonInvalid = this.el.classList.contains('ion-invalid');
35001
- return hasIonTouched && hasIonInvalid;
35002
- }
35003
35195
  connectedCallback() {
35004
35196
  const { el } = this;
35005
35197
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
35006
35198
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
35007
35199
  // Always set initial state
35008
- this.isInvalid = this.checkValidationState();
35200
+ this.isInvalid = checkInvalidState(this.el);
35009
35201
  this.debounceChanged();
35010
35202
  }
35011
35203
  disconnectedCallback() {
@@ -35259,7 +35451,7 @@ class Textarea {
35259
35451
  * TODO(FW-5592): Remove hasStartEndSlots condition
35260
35452
  */
35261
35453
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
35262
- return (hAsync(Host, { key: '26b46666a92b3f652775bb1c46661f9a30392104', class: createColorClasses$1(this.color, {
35454
+ return (hAsync(Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: createColorClasses$1(this.color, {
35263
35455
  [mode]: true,
35264
35456
  'has-value': hasValue,
35265
35457
  'has-focus': hasFocus,
@@ -35268,7 +35460,7 @@ class Textarea {
35268
35460
  [`textarea-shape-${shape}`]: shape !== undefined,
35269
35461
  [`textarea-label-placement-${labelPlacement}`]: true,
35270
35462
  'textarea-disabled': disabled,
35271
- }) }, 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()));
35463
+ }) }, 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()));
35272
35464
  }
35273
35465
  get el() { return getElement(this); }
35274
35466
  static get watchers() { return {
@@ -36390,7 +36582,6 @@ class Toggle {
36390
36582
  const { checked, value } = this;
36391
36583
  const isNowChecked = !checked;
36392
36584
  this.checked = isNowChecked;
36393
- this.setFocus();
36394
36585
  this.ionChange.emit({
36395
36586
  checked: isNowChecked,
36396
36587
  value,
@@ -36441,9 +36632,7 @@ class Toggle {
36441
36632
  return this.value || '';
36442
36633
  }
36443
36634
  setFocus() {
36444
- if (this.focusEl) {
36445
- this.focusEl.focus();
36446
- }
36635
+ this.el.focus();
36447
36636
  }
36448
36637
  renderOnOffSwitchLabels(mode, checked) {
36449
36638
  const icon = this.getSwitchLabelIcon(mode, checked);
@@ -36493,7 +36682,7 @@ class Toggle {
36493
36682
  const value = this.getValue();
36494
36683
  const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
36495
36684
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
36496
- return (hAsync(Host, { key: '21037ea2e8326f58c84becadde475f007f931924', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === errorTextId, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: createColorClasses$1(color, {
36685
+ return (hAsync(Host, { key: '17bbbc8d229868e5c872b2bc5a3faf579780c5e0', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === errorTextId, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses$1(color, {
36497
36686
  [mode]: true,
36498
36687
  'in-item': hostContext('ion-item', el),
36499
36688
  'toggle-activated': activated,
@@ -36503,10 +36692,10 @@ class Toggle {
36503
36692
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
36504
36693
  [`toggle-label-placement-${labelPlacement}`]: true,
36505
36694
  [`toggle-${rtl}`]: true,
36506
- }) }, hAsync("label", { key: '4d153679d118d01286f6633d1c19558a97745ff6', class: "toggle-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: '0dfcd4df15b8d41bec5ff5f8912503afbb7bec53', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), hAsync("div", { key: 'ffed3a07ba2ab70e5b232e6041bc3b6b34be8331', class: {
36695
+ }) }, hAsync("label", { key: '673625b62a2c909e95dccb642c91312967a6cd1c', class: "toggle-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: '7dc3f357b4708116663970047765da9f8f845bf0', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), hAsync("div", { key: '8f1c6a182031e8cbc6727e5f4ac0e00ad4247447', class: {
36507
36696
  'label-text-wrapper': true,
36508
36697
  'label-text-wrapper-hidden': !hasLabel,
36509
- }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: 'd88e1e3dcdd8293f6b61f237cd7a0511dcbce300' }), this.renderHintText()), hAsync("div", { key: '0e924225f5f0caf3c88738acb6c557bd8c1b68f6', class: "native-wrapper" }, this.renderToggleControl()))));
36698
+ }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '8322b9d54dc7edeb4e16fefcde9f7ebca8d5c3e1' }), this.renderHintText()), hAsync("div", { key: 'fe6984143db817a7b3020a3f57cf5418fc3dcc0e', class: "native-wrapper" }, this.renderToggleControl()))));
36510
36699
  }
36511
36700
  get el() { return getElement(this); }
36512
36701
  static get watchers() { return {