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.mjs CHANGED
@@ -4040,10 +4040,57 @@ 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.accordionGroupUpdateHandler = () => {
4044
+ /**
4045
+ * Determine if this update will cause an actual state change.
4046
+ * We only want to mark as "interacted" if the state is changing.
4047
+ */
4048
+ const accordionGroup = this.accordionGroupEl;
4049
+ if (accordionGroup) {
4050
+ const value = accordionGroup.value;
4051
+ const accordionValue = this.value;
4052
+ const shouldExpand = Array.isArray(value) ? value.includes(accordionValue) : value === accordionValue;
4053
+ const isExpanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
4054
+ const stateWillChange = shouldExpand !== isExpanded;
4055
+ /**
4056
+ * Only mark as interacted if:
4057
+ * 1. This is not the first update we've received with a defined value
4058
+ * 2. The state is actually changing (prevents redundant updates from enabling animations)
4059
+ */
4060
+ if (this.hasReceivedFirstUpdate && stateWillChange) {
4061
+ this.hasInteracted = true;
4062
+ }
4063
+ /**
4064
+ * Only count this as the first update if the group value is defined.
4065
+ * This prevents the initial undefined value from the group's componentDidLoad
4066
+ * from being treated as the first real update.
4067
+ */
4068
+ if (value !== undefined) {
4069
+ this.hasReceivedFirstUpdate = true;
4070
+ }
4071
+ }
4072
+ this.updateState();
4073
+ };
4044
4074
  this.state = 1 /* AccordionState.Collapsed */;
4045
4075
  this.isNext = false;
4046
4076
  this.isPrevious = false;
4077
+ /**
4078
+ * Tracks whether a user-initiated interaction has occurred.
4079
+ * Animations are disabled until the first interaction happens.
4080
+ * This prevents the accordion from animating when it's programmatically
4081
+ * set to an expanded or collapsed state on initial load.
4082
+ */
4083
+ this.hasInteracted = false;
4084
+ /**
4085
+ * Tracks if this accordion has ever been expanded.
4086
+ * Used to prevent the first expansion from animating.
4087
+ */
4088
+ this.hasEverBeenExpanded = false;
4089
+ /**
4090
+ * Tracks if this accordion has received its first update from the group.
4091
+ * Used to distinguish initial programmatic sets from user interactions.
4092
+ */
4093
+ this.hasReceivedFirstUpdate = false;
4047
4094
  /**
4048
4095
  * The value of the accordion. Defaults to an autogenerated
4049
4096
  * value.
@@ -4148,10 +4195,15 @@ class Accordion {
4148
4195
  iconEl.setAttribute('aria-hidden', 'true');
4149
4196
  ionItem.appendChild(iconEl);
4150
4197
  };
4151
- this.expandAccordion = (initialUpdate = false) => {
4198
+ this.expandAccordion = () => {
4152
4199
  const { contentEl, contentElWrapper } = this;
4153
- if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
4200
+ /**
4201
+ * If the content elements aren't available yet, just set the state.
4202
+ * This happens on initial render before the DOM is ready.
4203
+ */
4204
+ if (contentEl === undefined || contentElWrapper === undefined) {
4154
4205
  this.state = 4 /* AccordionState.Expanded */;
4206
+ this.hasEverBeenExpanded = true;
4155
4207
  return;
4156
4208
  }
4157
4209
  if (this.state === 4 /* AccordionState.Expanded */) {
@@ -4160,6 +4212,11 @@ class Accordion {
4160
4212
  if (this.currentRaf !== undefined) {
4161
4213
  cancelAnimationFrame(this.currentRaf);
4162
4214
  }
4215
+ /**
4216
+ * Mark that this accordion has been expanded at least once.
4217
+ * This allows subsequent expansions to animate.
4218
+ */
4219
+ this.hasEverBeenExpanded = true;
4163
4220
  if (this.shouldAnimate()) {
4164
4221
  raf(() => {
4165
4222
  this.state = 8 /* AccordionState.Expanding */;
@@ -4177,9 +4234,13 @@ class Accordion {
4177
4234
  this.state = 4 /* AccordionState.Expanded */;
4178
4235
  }
4179
4236
  };
4180
- this.collapseAccordion = (initialUpdate = false) => {
4237
+ this.collapseAccordion = () => {
4181
4238
  const { contentEl } = this;
4182
- if (initialUpdate || contentEl === undefined) {
4239
+ /**
4240
+ * If the content element isn't available yet, just set the state.
4241
+ * This happens on initial render before the DOM is ready.
4242
+ */
4243
+ if (contentEl === undefined) {
4183
4244
  this.state = 1 /* AccordionState.Collapsed */;
4184
4245
  return;
4185
4246
  }
@@ -4214,6 +4275,18 @@ class Accordion {
4214
4275
  * of what is set in the config.
4215
4276
  */
4216
4277
  this.shouldAnimate = () => {
4278
+ /**
4279
+ * Don't animate until after the first user interaction.
4280
+ * This prevents animations on initial load when accordions
4281
+ * start in an expanded or collapsed state programmatically.
4282
+ *
4283
+ * Additionally, don't animate the very first expansion even if
4284
+ * hasInteracted is true. This handles edge cases like React StrictMode
4285
+ * where effects run twice and might incorrectly mark as interacted.
4286
+ */
4287
+ if (!this.hasInteracted || !this.hasEverBeenExpanded) {
4288
+ return false;
4289
+ }
4217
4290
  if (typeof window === 'undefined') {
4218
4291
  return false;
4219
4292
  }
@@ -4230,7 +4303,7 @@ class Accordion {
4230
4303
  }
4231
4304
  return true;
4232
4305
  };
4233
- this.updateState = async (initialUpdate = false) => {
4306
+ this.updateState = async () => {
4234
4307
  const accordionGroup = this.accordionGroupEl;
4235
4308
  const accordionValue = this.value;
4236
4309
  if (!accordionGroup) {
@@ -4239,11 +4312,11 @@ class Accordion {
4239
4312
  const value = accordionGroup.value;
4240
4313
  const shouldExpand = Array.isArray(value) ? value.includes(accordionValue) : value === accordionValue;
4241
4314
  if (shouldExpand) {
4242
- this.expandAccordion(initialUpdate);
4315
+ this.expandAccordion();
4243
4316
  this.isNext = this.isPrevious = false;
4244
4317
  }
4245
4318
  else {
4246
- this.collapseAccordion(initialUpdate);
4319
+ this.collapseAccordion();
4247
4320
  /**
4248
4321
  * When using popout or inset,
4249
4322
  * the collapsed accordion items
@@ -4291,14 +4364,14 @@ class Accordion {
4291
4364
  var _a;
4292
4365
  const accordionGroupEl = (this.accordionGroupEl = (_a = this.el) === null || _a === void 0 ? void 0 : _a.closest('ion-accordion-group'));
4293
4366
  if (accordionGroupEl) {
4294
- this.updateState(true);
4295
- addEventListener$1(accordionGroupEl, 'ionValueChange', this.updateListener);
4367
+ this.updateState();
4368
+ addEventListener$1(accordionGroupEl, 'ionValueChange', this.accordionGroupUpdateHandler);
4296
4369
  }
4297
4370
  }
4298
4371
  disconnectedCallback() {
4299
4372
  const accordionGroupEl = this.accordionGroupEl;
4300
4373
  if (accordionGroupEl) {
4301
- removeEventListener(accordionGroupEl, 'ionValueChange', this.updateListener);
4374
+ removeEventListener(accordionGroupEl, 'ionValueChange', this.accordionGroupUpdateHandler);
4302
4375
  }
4303
4376
  }
4304
4377
  componentDidLoad() {
@@ -4322,6 +4395,11 @@ class Accordion {
4322
4395
  const { accordionGroupEl, disabled, readonly, value, state } = this;
4323
4396
  if (disabled || readonly)
4324
4397
  return;
4398
+ /**
4399
+ * Mark that the user has interacted with the accordion.
4400
+ * This enables animations for all future state changes.
4401
+ */
4402
+ this.hasInteracted = true;
4325
4403
  if (accordionGroupEl) {
4326
4404
  /**
4327
4405
  * Because the accordion group may or may
@@ -4342,7 +4420,7 @@ class Accordion {
4342
4420
  const headerPart = expanded ? 'header expanded' : 'header';
4343
4421
  const contentPart = expanded ? 'content expanded' : 'content';
4344
4422
  this.setAria(expanded);
4345
- return (hAsync(Host, { key: '073e1d02c18dcbc20c68648426e87c14750c031d', class: {
4423
+ return (hAsync(Host, { key: '9c90bce01eff7e5774a19f69c872f3761d66cf3c', class: {
4346
4424
  [mode]: true,
4347
4425
  'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
4348
4426
  'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
@@ -4353,7 +4431,7 @@ class Accordion {
4353
4431
  'accordion-disabled': disabled,
4354
4432
  'accordion-readonly': readonly,
4355
4433
  '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" })))));
4434
+ } }, 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" })))));
4357
4435
  }
4358
4436
  static get delegatesFocus() { return true; }
4359
4437
  get el() { return getElement(this); }
@@ -4375,7 +4453,8 @@ class Accordion {
4375
4453
  "toggleIconSlot": [1, "toggle-icon-slot"],
4376
4454
  "state": [32],
4377
4455
  "isNext": [32],
4378
- "isPrevious": [32]
4456
+ "isPrevious": [32],
4457
+ "hasInteracted": [32]
4379
4458
  },
4380
4459
  "$listeners$": undefined,
4381
4460
  "$lazyBundleId$": "-",
@@ -9261,11 +9340,7 @@ class Button {
9261
9340
  target,
9262
9341
  };
9263
9342
  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) {
9343
+ if (fill === undefined) {
9269
9344
  fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
9270
9345
  }
9271
9346
  /**
@@ -9278,7 +9353,7 @@ class Button {
9278
9353
  {
9279
9354
  type !== 'button' && this.renderHiddenButton();
9280
9355
  }
9281
- return (hAsync(Host, { key: 'b105ad09215adb3ca2298acdadf0dc9154bbb9b0', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9356
+ return (hAsync(Host, { key: 'ed82ea53705523f9afc5f1a9addff44cc6424f27', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
9282
9357
  [mode]: true,
9283
9358
  [buttonType]: true,
9284
9359
  [`${buttonType}-${expand}`]: expand !== undefined,
@@ -9293,7 +9368,7 @@ class Button {
9293
9368
  'button-disabled': disabled,
9294
9369
  'ion-activatable': true,
9295
9370
  '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 }))));
9371
+ }) }, 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
9372
  }
9298
9373
  get el() { return getElement(this); }
9299
9374
  static get watchers() { return {
@@ -9688,7 +9763,6 @@ class Checkbox {
9688
9763
  };
9689
9764
  this.toggleChecked = (ev) => {
9690
9765
  ev.preventDefault();
9691
- this.setFocus();
9692
9766
  this.setChecked(!this.checked);
9693
9767
  this.indeterminate = false;
9694
9768
  };
@@ -9725,9 +9799,7 @@ class Checkbox {
9725
9799
  }
9726
9800
  /** @internal */
9727
9801
  async setFocus() {
9728
- if (this.focusEl) {
9729
- this.focusEl.focus();
9730
- }
9802
+ this.el.focus();
9731
9803
  }
9732
9804
  getHintTextID() {
9733
9805
  const { el, helperText, errorText, helperTextId, errorTextId } = this;
@@ -9763,7 +9835,7 @@ class Checkbox {
9763
9835
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
9764
9836
  // The host element must have a checkbox role to ensure proper VoiceOver
9765
9837
  // support in Safari for accessibility.
9766
- 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, {
9838
+ 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, {
9767
9839
  [mode]: true,
9768
9840
  'in-item': hostContext('ion-item', el),
9769
9841
  'checkbox-checked': checked,
@@ -9773,10 +9845,10 @@ class Checkbox {
9773
9845
  [`checkbox-justify-${justify}`]: justify !== undefined,
9774
9846
  [`checkbox-alignment-${alignment}`]: alignment !== undefined,
9775
9847
  [`checkbox-label-placement-${labelPlacement}`]: true,
9776
- }), 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: {
9848
+ }) }, 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: {
9777
9849
  'label-text-wrapper': true,
9778
9850
  'label-text-wrapper-hidden': !hasLabelContent,
9779
- }, 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)))));
9851
+ }, 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)))));
9780
9852
  }
9781
9853
  getSVGPath(mode, indeterminate) {
9782
9854
  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" }));
@@ -15227,6 +15299,8 @@ class Grid {
15227
15299
  }
15228
15300
 
15229
15301
  const TRANSITION = 'all 0.2s ease-in-out';
15302
+ const ROLE_NONE = 'none';
15303
+ const ROLE_BANNER = 'banner';
15230
15304
  const cloneElement = (tagName) => {
15231
15305
  const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
15232
15306
  if (getCachedEl !== null) {
@@ -15353,6 +15427,7 @@ const setHeaderActive = (headerIndex, active = true) => {
15353
15427
  const toolbars = headerIndex.toolbars;
15354
15428
  const ionTitles = toolbars.map((toolbar) => toolbar.ionTitleEl);
15355
15429
  if (active) {
15430
+ headerEl.setAttribute('role', ROLE_BANNER);
15356
15431
  headerEl.classList.remove('header-collapse-condense-inactive');
15357
15432
  ionTitles.forEach((ionTitle) => {
15358
15433
  if (ionTitle) {
@@ -15361,6 +15436,16 @@ const setHeaderActive = (headerIndex, active = true) => {
15361
15436
  });
15362
15437
  }
15363
15438
  else {
15439
+ /**
15440
+ * There can only be one banner landmark per page.
15441
+ * By default, all ion-headers have the banner role.
15442
+ * This causes an accessibility issue when using a
15443
+ * condensed header since there are two ion-headers
15444
+ * on the page at once (active and inactive).
15445
+ * To solve this, the role needs to be toggled
15446
+ * based on which header is active.
15447
+ */
15448
+ headerEl.setAttribute('role', ROLE_NONE);
15364
15449
  headerEl.classList.add('header-collapse-condense-inactive');
15365
15450
  /**
15366
15451
  * The small title should only be accessed by screen readers
@@ -15420,8 +15505,32 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
15420
15505
  });
15421
15506
  });
15422
15507
  };
15508
+ /**
15509
+ * Get the role type for the ion-header.
15510
+ *
15511
+ * @param isInsideMenu If ion-header is inside ion-menu.
15512
+ * @param isCondensed If ion-header has collapse="condense".
15513
+ * @param mode The current mode.
15514
+ * @returns 'none' if inside ion-menu or if condensed in md
15515
+ * mode, otherwise 'banner'.
15516
+ */
15517
+ const getRoleType = (isInsideMenu, isCondensed, mode) => {
15518
+ // If the header is inside a menu, it should not have the banner role.
15519
+ if (isInsideMenu) {
15520
+ return ROLE_NONE;
15521
+ }
15522
+ /**
15523
+ * Only apply role="none" to `md` mode condensed headers
15524
+ * since the large header is never shown.
15525
+ */
15526
+ if (isCondensed && mode === 'md') {
15527
+ return ROLE_NONE;
15528
+ }
15529
+ // Default to banner role.
15530
+ return ROLE_BANNER;
15531
+ };
15423
15532
 
15424
- const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:0px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header.header-ios:not(.header-collapse-main):has(~ion-content ion-header.header-ios[collapse=condense],~ion-content ion-header.header-ios.header-collapse-condense){opacity:0}";
15533
+ 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
15534
 
15426
15535
  const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}";
15427
15536
 
@@ -15564,16 +15673,17 @@ class Header {
15564
15673
  const { translucent, inheritedAttributes } = this;
15565
15674
  const mode = getIonMode$1(this);
15566
15675
  const collapse = this.collapse || 'none';
15676
+ const isCondensed = collapse === 'condense';
15567
15677
  // 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: {
15678
+ const roleType = getRoleType(hostContext('ion-menu', this.el), isCondensed, mode);
15679
+ return (hAsync(Host, Object.assign({ key: '863c4568cd7b8c0ec55109f193bbbaed68a1346e', role: roleType, class: {
15570
15680
  [mode]: true,
15571
15681
  // Used internally for styling
15572
15682
  [`header-${mode}`]: true,
15573
15683
  [`header-translucent`]: this.translucent,
15574
15684
  [`header-collapse-${collapse}`]: true,
15575
15685
  [`header-translucent-${mode}`]: this.translucent,
15576
- } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '395766d4dcee3398bc91960db21f922095292f14', class: "header-background" }), hAsync("slot", { key: '09a67ece27b258ff1248805d43d92a49b2c6859a' })));
15686
+ } }, inheritedAttributes), mode === 'ios' && translucent && hAsync("div", { key: '25c3bdce328b0b35607d154c8b8374679313d881', class: "header-background" }), hAsync("slot", { key: 'b44fab0a9be7920b9650da26117c783e751e1702' })));
15577
15687
  }
15578
15688
  get el() { return getElement(this); }
15579
15689
  static get style() { return {
@@ -16385,6 +16495,19 @@ const isOptionSelected = (currentValue, compareValue, compareWith) => {
16385
16495
  }
16386
16496
  };
16387
16497
 
16498
+ /**
16499
+ * Checks if the form element is in an invalid state based on
16500
+ * Ionic validation classes.
16501
+ *
16502
+ * @param el The form element to check.
16503
+ * @returns `true` if the element is invalid, `false` otherwise.
16504
+ */
16505
+ const checkInvalidState = (el) => {
16506
+ const hasIonTouched = el.classList.contains('ion-touched');
16507
+ const hasIonInvalid = el.classList.contains('ion-invalid');
16508
+ return hasIonTouched && hasIonInvalid;
16509
+ };
16510
+
16388
16511
  /**
16389
16512
  * Used to update a scoped component that uses emulated slots. This fires when
16390
16513
  * content is passed into the slot or when the content inside of a slot changes.
@@ -16750,20 +16873,12 @@ class Input {
16750
16873
  componentWillLoad() {
16751
16874
  this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes$1(this.el, ['tabindex', 'title', 'data-form-type', 'dir']));
16752
16875
  }
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
16876
  connectedCallback() {
16762
16877
  const { el } = this;
16763
16878
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
16764
16879
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
16765
16880
  // Always set initial state
16766
- this.isInvalid = this.checkInvalidState();
16881
+ this.isInvalid = checkInvalidState(el);
16767
16882
  this.debounceChanged();
16768
16883
  }
16769
16884
  componentDidLoad() {
@@ -17017,7 +17132,7 @@ class Input {
17017
17132
  * TODO(FW-5592): Remove hasStartEndSlots condition
17018
17133
  */
17019
17134
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
17020
- return (hAsync(Host, { key: '8a51f0300d5bc66392f9ab9a6fa0b5d388072a33', class: createColorClasses$1(this.color, {
17135
+ return (hAsync(Host, { key: '97b5308021064d9e7434ef2d3d96f27045c1b0c4', class: createColorClasses$1(this.color, {
17021
17136
  [mode]: true,
17022
17137
  'has-value': hasValue,
17023
17138
  'has-focus': hasFocus,
@@ -17028,14 +17143,14 @@ class Input {
17028
17143
  'in-item': inItem,
17029
17144
  'in-item-color': hostContext('ion-item.ion-color', this.el),
17030
17145
  '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) => {
17146
+ }) }, 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
17147
  /**
17033
17148
  * This prevents mobile browsers from
17034
17149
  * blurring the input when the clear
17035
17150
  * button is activated.
17036
17151
  */
17037
17152
  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()));
17153
+ }, 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
17154
  }
17040
17155
  get el() { return getElement(this); }
17041
17156
  static get watchers() { return {
@@ -20676,11 +20791,22 @@ const iosTransitionAnimation$1 = () => Promise.resolve().then(function () { retu
20676
20791
  const mdTransitionAnimation$1 = () => Promise.resolve().then(function () { return md_transition; });
20677
20792
  const focusController = createFocusController();
20678
20793
  // TODO(FW-2832): types
20794
+ /**
20795
+ * Executes the main page transition.
20796
+ * It also manages the lifecycle of header visibility (if any)
20797
+ * to prevent visual flickering in iOS. The flickering only
20798
+ * occurs for a condensed header that is placed above the content.
20799
+ *
20800
+ * @param opts Options for the transition.
20801
+ * @returns A promise that resolves when the transition is complete.
20802
+ */
20679
20803
  const transition = (opts) => {
20680
20804
  return new Promise((resolve, reject) => {
20681
20805
  writeTask(() => {
20682
- beforeTransition(opts);
20683
- runTransition(opts).then((result) => {
20806
+ const transitioningInactiveHeader = getIosIonHeader(opts);
20807
+ beforeTransition(opts, transitioningInactiveHeader);
20808
+ runTransition(opts)
20809
+ .then((result) => {
20684
20810
  if (result.animation) {
20685
20811
  result.animation.destroy();
20686
20812
  }
@@ -20689,15 +20815,21 @@ const transition = (opts) => {
20689
20815
  }, (error) => {
20690
20816
  afterTransition(opts);
20691
20817
  reject(error);
20818
+ })
20819
+ .finally(() => {
20820
+ // Ensure that the header is restored to its original state.
20821
+ setHeaderTransitionClass(transitioningInactiveHeader, false);
20692
20822
  });
20693
20823
  });
20694
20824
  });
20695
20825
  };
20696
- const beforeTransition = (opts) => {
20826
+ const beforeTransition = (opts, transitioningInactiveHeader) => {
20697
20827
  const enteringEl = opts.enteringEl;
20698
20828
  const leavingEl = opts.leavingEl;
20699
20829
  focusController.saveViewFocus(leavingEl);
20700
20830
  setZIndex(enteringEl, leavingEl, opts.direction);
20831
+ // Prevent flickering of the header by adding a class.
20832
+ setHeaderTransitionClass(transitioningInactiveHeader, true);
20701
20833
  if (opts.showGoBack) {
20702
20834
  enteringEl.classList.add('can-go-back');
20703
20835
  }
@@ -20886,6 +21018,39 @@ const setZIndex = (enteringEl, leavingEl, direction) => {
20886
21018
  leavingEl.style.zIndex = '100';
20887
21019
  }
20888
21020
  };
21021
+ /**
21022
+ * Add a class to ensure that the header (if any)
21023
+ * does not flicker during the transition. By adding the
21024
+ * transitioning class, we ensure that the header has
21025
+ * the necessary styles to prevent the following flickers:
21026
+ * 1. When entering a page with a condensed header, the
21027
+ * header should never be visible. However,
21028
+ * it briefly renders the background color while
21029
+ * the transition is occurring.
21030
+ * 2. When leaving a page with a condensed header, the
21031
+ * header has an opacity of 0 and the pages
21032
+ * have a z-index which causes the entering page to
21033
+ * briefly show it's content underneath the leaving page.
21034
+ * 3. When entering a page or leaving a page with a fade
21035
+ * header, the header should not have a background color.
21036
+ * However, it briefly shows the background color while
21037
+ * the transition is occurring.
21038
+ *
21039
+ * @param header The header element to modify.
21040
+ * @param isTransitioning Whether the transition is occurring.
21041
+ */
21042
+ const setHeaderTransitionClass = (header, isTransitioning) => {
21043
+ if (!header) {
21044
+ return;
21045
+ }
21046
+ const transitionClass = 'header-transitioning';
21047
+ if (isTransitioning) {
21048
+ header.classList.add(transitionClass);
21049
+ }
21050
+ else {
21051
+ header.classList.remove(transitionClass);
21052
+ }
21053
+ };
20889
21054
  const getIonPageElement = (element) => {
20890
21055
  if (element.classList.contains('ion-page')) {
20891
21056
  return element;
@@ -20897,6 +21062,27 @@ const getIonPageElement = (element) => {
20897
21062
  // idk, return the original element so at least something animates and we don't have a null pointer
20898
21063
  return element;
20899
21064
  };
21065
+ /**
21066
+ * Retrieves the ion-header element from a page based on the
21067
+ * direction of the transition.
21068
+ *
21069
+ * @param opts Options for the transition.
21070
+ * @returns The ion-header element or null if not found or not in 'ios' mode.
21071
+ */
21072
+ const getIosIonHeader = (opts) => {
21073
+ const enteringEl = opts.enteringEl;
21074
+ const leavingEl = opts.leavingEl;
21075
+ const direction = opts.direction;
21076
+ const mode = opts.mode;
21077
+ if (mode !== 'ios') {
21078
+ return null;
21079
+ }
21080
+ const element = direction === 'back' ? leavingEl : enteringEl;
21081
+ if (!element) {
21082
+ return null;
21083
+ }
21084
+ return element.querySelector('ion-header');
21085
+ };
20900
21086
 
20901
21087
  const KEYBOARD_DID_OPEN = 'ionKeyboardDidShow';
20902
21088
 
@@ -33059,6 +33245,10 @@ class Select {
33059
33245
  * is applied in both cases.
33060
33246
  */
33061
33247
  this.hasFocus = false;
33248
+ /**
33249
+ * Track validation state for proper aria-live announcements.
33250
+ */
33251
+ this.isInvalid = false;
33062
33252
  /**
33063
33253
  * The text to display on the cancel button.
33064
33254
  */
@@ -33181,9 +33371,12 @@ class Select {
33181
33371
  this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {
33182
33372
  this.updateOverlayOptions();
33183
33373
  });
33374
+ // Always set initial state
33375
+ this.isInvalid = checkInvalidState(this.el);
33184
33376
  }
33185
33377
  componentWillLoad() {
33186
33378
  this.inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
33379
+ this.hintTextID = this.getHintTextID();
33187
33380
  }
33188
33381
  componentDidLoad() {
33189
33382
  /**
@@ -33207,6 +33400,11 @@ class Select {
33207
33400
  this.notchController.destroy();
33208
33401
  this.notchController = undefined;
33209
33402
  }
33403
+ // Clean up validation observer to prevent memory leaks.
33404
+ if (this.validationObserver) {
33405
+ this.validationObserver.disconnect();
33406
+ this.validationObserver = undefined;
33407
+ }
33210
33408
  }
33211
33409
  /**
33212
33410
  * Open the select overlay. The overlay is either an alert, action sheet, or popover,
@@ -33677,11 +33875,11 @@ class Select {
33677
33875
  }
33678
33876
  renderListbox() {
33679
33877
  const { disabled, inputId, isExpanded, required } = this;
33680
- 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) }));
33878
+ 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) }));
33681
33879
  }
33682
33880
  getHintTextID() {
33683
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
33684
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
33881
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33882
+ if (isInvalid && errorText) {
33685
33883
  return errorTextId;
33686
33884
  }
33687
33885
  if (helperText) {
@@ -33693,10 +33891,10 @@ class Select {
33693
33891
  * Renders the helper text or error text values
33694
33892
  */
33695
33893
  renderHintText() {
33696
- const { helperText, errorText, helperTextId, errorTextId } = this;
33894
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
33697
33895
  return [
33698
- hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText),
33699
- hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText),
33896
+ hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null),
33897
+ hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null),
33700
33898
  ];
33701
33899
  }
33702
33900
  /**
@@ -33744,7 +33942,7 @@ class Select {
33744
33942
  * TODO(FW-5592): Remove hasStartEndSlots condition
33745
33943
  */
33746
33944
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
33747
- return (hAsync(Host, { key: 'c03fb65e8fc9f9aab295e07b282377d57d910519', onClick: this.onClick, class: createColorClasses$1(this.color, {
33945
+ return (hAsync(Host, { key: '35b5e18e6f79a802ff2d46d1242e80ff755cc0b9', onClick: this.onClick, class: createColorClasses$1(this.color, {
33748
33946
  [mode]: true,
33749
33947
  'in-item': inItem,
33750
33948
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -33762,7 +33960,7 @@ class Select {
33762
33960
  [`select-justify-${justify}`]: justifyEnabled,
33763
33961
  [`select-shape-${shape}`]: shape !== undefined,
33764
33962
  [`select-label-placement-${labelPlacement}`]: true,
33765
- }) }, 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()));
33963
+ }) }, 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()));
33766
33964
  }
33767
33965
  get el() { return getElement(this); }
33768
33966
  static get watchers() { return {
@@ -33803,6 +34001,8 @@ class Select {
33803
34001
  "required": [4],
33804
34002
  "isExpanded": [32],
33805
34003
  "hasFocus": [32],
34004
+ "isInvalid": [32],
34005
+ "hintTextID": [32],
33806
34006
  "open": [64]
33807
34007
  },
33808
34008
  "$listeners$": undefined,
@@ -34990,20 +35190,12 @@ class Textarea {
34990
35190
  this.el.click();
34991
35191
  }
34992
35192
  }
34993
- /**
34994
- * Checks if the textarea is in an invalid state based on Ionic validation classes
34995
- */
34996
- checkValidationState() {
34997
- const hasIonTouched = this.el.classList.contains('ion-touched');
34998
- const hasIonInvalid = this.el.classList.contains('ion-invalid');
34999
- return hasIonTouched && hasIonInvalid;
35000
- }
35001
35193
  connectedCallback() {
35002
35194
  const { el } = this;
35003
35195
  this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => forceUpdate());
35004
35196
  this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
35005
35197
  // Always set initial state
35006
- this.isInvalid = this.checkValidationState();
35198
+ this.isInvalid = checkInvalidState(this.el);
35007
35199
  this.debounceChanged();
35008
35200
  }
35009
35201
  disconnectedCallback() {
@@ -35257,7 +35449,7 @@ class Textarea {
35257
35449
  * TODO(FW-5592): Remove hasStartEndSlots condition
35258
35450
  */
35259
35451
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
35260
- return (hAsync(Host, { key: '26b46666a92b3f652775bb1c46661f9a30392104', class: createColorClasses$1(this.color, {
35452
+ return (hAsync(Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: createColorClasses$1(this.color, {
35261
35453
  [mode]: true,
35262
35454
  'has-value': hasValue,
35263
35455
  'has-focus': hasFocus,
@@ -35266,7 +35458,7 @@ class Textarea {
35266
35458
  [`textarea-shape-${shape}`]: shape !== undefined,
35267
35459
  [`textarea-label-placement-${labelPlacement}`]: true,
35268
35460
  'textarea-disabled': disabled,
35269
- }) }, 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()));
35461
+ }) }, 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()));
35270
35462
  }
35271
35463
  get el() { return getElement(this); }
35272
35464
  static get watchers() { return {
@@ -36388,7 +36580,6 @@ class Toggle {
36388
36580
  const { checked, value } = this;
36389
36581
  const isNowChecked = !checked;
36390
36582
  this.checked = isNowChecked;
36391
- this.setFocus();
36392
36583
  this.ionChange.emit({
36393
36584
  checked: isNowChecked,
36394
36585
  value,
@@ -36439,9 +36630,7 @@ class Toggle {
36439
36630
  return this.value || '';
36440
36631
  }
36441
36632
  setFocus() {
36442
- if (this.focusEl) {
36443
- this.focusEl.focus();
36444
- }
36633
+ this.el.focus();
36445
36634
  }
36446
36635
  renderOnOffSwitchLabels(mode, checked) {
36447
36636
  const icon = this.getSwitchLabelIcon(mode, checked);
@@ -36491,7 +36680,7 @@ class Toggle {
36491
36680
  const value = this.getValue();
36492
36681
  const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
36493
36682
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
36494
- 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, {
36683
+ 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, {
36495
36684
  [mode]: true,
36496
36685
  'in-item': hostContext('ion-item', el),
36497
36686
  'toggle-activated': activated,
@@ -36501,10 +36690,10 @@ class Toggle {
36501
36690
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
36502
36691
  [`toggle-label-placement-${labelPlacement}`]: true,
36503
36692
  [`toggle-${rtl}`]: true,
36504
- }) }, 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: {
36693
+ }) }, 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: {
36505
36694
  'label-text-wrapper': true,
36506
36695
  'label-text-wrapper-hidden': !hasLabel,
36507
- }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: 'd88e1e3dcdd8293f6b61f237cd7a0511dcbce300' }), this.renderHintText()), hAsync("div", { key: '0e924225f5f0caf3c88738acb6c557bd8c1b68f6', class: "native-wrapper" }, this.renderToggleControl()))));
36696
+ }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '8322b9d54dc7edeb4e16fefcde9f7ebca8d5c3e1' }), this.renderHintText()), hAsync("div", { key: 'fe6984143db817a7b3020a3f57cf5418fc3dcc0e', class: "native-wrapper" }, this.renderToggleControl()))));
36508
36697
  }
36509
36698
  get el() { return getElement(this); }
36510
36699
  static get watchers() { return {