@ionic/core 8.7.6-nightly.20251008 → 8.7.7-dev.11761071592.1d1b804d

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 (51) hide show
  1. package/components/checkbox.js +4 -7
  2. package/components/header.js +1 -1
  3. package/components/index2.js +74 -3
  4. package/components/ion-toggle.js +4 -7
  5. package/dist/cjs/{index-CD5Rjp23.js → index-094mMFB-.js} +76 -5
  6. package/dist/cjs/index.cjs.js +3 -3
  7. package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
  8. package/dist/cjs/ion-checkbox.cjs.entry.js +4 -7
  9. package/dist/cjs/ion-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  11. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  12. package/dist/cjs/ion-toggle.cjs.entry.js +4 -7
  13. package/dist/cjs/{ios.transition-j9CclgEW.js → ios.transition-BOt_uW73.js} +1 -1
  14. package/dist/cjs/{md.transition-CwFyRSfv.js → md.transition-Dt968VXB.js} +1 -1
  15. package/dist/collection/components/checkbox/checkbox.js +4 -7
  16. package/dist/collection/components/header/header.ios.css +27 -1
  17. package/dist/collection/components/toggle/toggle.js +4 -7
  18. package/dist/collection/utils/test/playwright/page/utils/spy-on-event.js +34 -0
  19. package/dist/collection/utils/transition/index.js +74 -3
  20. package/dist/docs.json +1 -1
  21. package/dist/esm/{index-D6G2seR8.js → index-r2D9DEro.js} +76 -5
  22. package/dist/esm/index.js +3 -3
  23. package/dist/esm/ion-app_8.entry.js +2 -2
  24. package/dist/esm/ion-checkbox.entry.js +4 -7
  25. package/dist/esm/ion-modal.entry.js +1 -1
  26. package/dist/esm/ion-nav_2.entry.js +1 -1
  27. package/dist/esm/ion-popover.entry.js +1 -1
  28. package/dist/esm/ion-toggle.entry.js +4 -7
  29. package/dist/esm/{ios.transition-Bpq9ixwv.js → ios.transition-BDzw0_Hm.js} +1 -1
  30. package/dist/esm/{md.transition-zOA0oanq.js → md.transition-BzDYi3qq.js} +1 -1
  31. package/dist/ionic/index.esm.js +1 -1
  32. package/dist/ionic/ionic.esm.js +1 -1
  33. package/dist/ionic/p-013c0591.entry.js +4 -0
  34. package/dist/ionic/p-7647da93.entry.js +4 -0
  35. package/dist/ionic/{p-DPhQmGJN.js → p-C7hRNDhM.js} +1 -1
  36. package/dist/ionic/p-DUt5fQmA.js +4 -0
  37. package/dist/ionic/{p-9R1XyICs.js → p-DZRJwG4S.js} +1 -1
  38. package/dist/ionic/{p-c59314fd.entry.js → p-a80f1b04.entry.js} +1 -1
  39. package/dist/ionic/{p-c85c40ee.entry.js → p-dbbe606a.entry.js} +1 -1
  40. package/dist/ionic/{p-de7b5fa3.entry.js → p-e16b69e1.entry.js} +1 -1
  41. package/dist/ionic/p-e693b1cd.entry.js +4 -0
  42. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  43. package/dist/types/components/toggle/toggle.d.ts +0 -1
  44. package/dist/types/utils/transition/index.d.ts +9 -0
  45. package/hydrate/index.js +83 -18
  46. package/hydrate/index.mjs +83 -18
  47. package/package.json +1 -1
  48. package/dist/ionic/p-49f0149c.entry.js +0 -4
  49. package/dist/ionic/p-83fc84e7.entry.js +0 -4
  50. package/dist/ionic/p-CMhMiYSX.js +0 -4
  51. package/dist/ionic/p-c17c0a01.entry.js +0 -4
@@ -78,7 +78,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
78
78
  };
79
79
  this.toggleChecked = (ev) => {
80
80
  ev.preventDefault();
81
- this.setFocus();
82
81
  this.setChecked(!this.checked);
83
82
  this.indeterminate = false;
84
83
  };
@@ -115,9 +114,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
115
114
  }
116
115
  /** @internal */
117
116
  async setFocus() {
118
- if (this.focusEl) {
119
- this.focusEl.focus();
120
- }
117
+ this.el.focus();
121
118
  }
122
119
  getHintTextID() {
123
120
  const { el, helperText, errorText, helperTextId, errorTextId } = this;
@@ -153,7 +150,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
153
150
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
154
151
  // The host element must have a checkbox role to ensure proper VoiceOver
155
152
  // support in Safari for accessibility.
156
- return (h(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(color, {
153
+ return (h(Host, { key: 'c63ab463a54067b59c3c9c90b54e2ed3bf5464a1', 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(color, {
157
154
  [mode]: true,
158
155
  'in-item': hostContext('ion-item', el),
159
156
  'checkbox-checked': checked,
@@ -163,10 +160,10 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
163
160
  [`checkbox-justify-${justify}`]: justify !== undefined,
164
161
  [`checkbox-alignment-${alignment}`]: alignment !== undefined,
165
162
  [`checkbox-label-placement-${labelPlacement}`]: true,
166
- }), onClick: this.onClick }, h("label", { key: 'f025cec5ff08e8be4487b9cc0324616ca5dfae2a', class: "checkbox-wrapper", htmlFor: inputId }, h("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)), h("div", { key: 'a625e9b50c3b617de8bbbfd624d772454fecaf2d', class: {
163
+ }) }, h("label", { key: 'b518692f79c49b20d59c243221f7ac94b74a9553', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'd66b8994dd794b9911bf322c15f0c0929a4840fa', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), h("div", { key: '8eb61446274ab8400bc86aa41fec03a73de08df7', class: {
167
164
  'label-text-wrapper': true,
168
165
  'label-text-wrapper-hidden': !hasLabelContent,
169
- }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '87d1a90691327945f4343406706e4ab27f453844' }), this.renderHintText()), h("div", { key: 'b57fed8cdecee4df1ef0d57f157267ee77fac653', class: "native-wrapper" }, h("svg", { key: '13a8aac044d46dc99e3b60a1a643785511f216ac', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
166
+ }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '4b690bd86420471d1be9b1329e5cc872351c6e23' }), this.renderHintText()), h("div", { key: 'f48fb369f999851b4da4d7442fe87024e56f5e77', class: "native-wrapper" }, h("svg", { key: '1471004d068eb1b522699f3fa0eb7ae2a3308186', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
170
167
  }
171
168
  getSVGPath(mode, indeterminate) {
172
169
  let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
@@ -202,7 +202,7 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
202
202
  });
203
203
  };
204
204
 
205
- 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}";
205
+ 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}";
206
206
 
207
207
  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}";
208
208
 
@@ -123,11 +123,22 @@ const iosTransitionAnimation = () => import('./ios.transition.js');
123
123
  const mdTransitionAnimation = () => import('./md.transition.js');
124
124
  const focusController = createFocusController();
125
125
  // TODO(FW-2832): types
126
+ /**
127
+ * Executes the main page transition.
128
+ * It also manages the lifecycle of header visibility (if any)
129
+ * to prevent visual flickering in iOS. The flickering only
130
+ * occurs for a condensed header that is placed above the content.
131
+ *
132
+ * @param opts Options for the transition.
133
+ * @returns A promise that resolves when the transition is complete.
134
+ */
126
135
  const transition = (opts) => {
127
136
  return new Promise((resolve, reject) => {
128
137
  writeTask(() => {
129
- beforeTransition(opts);
130
- runTransition(opts).then((result) => {
138
+ const transitioningInactiveHeader = getIosIonHeader(opts);
139
+ beforeTransition(opts, transitioningInactiveHeader);
140
+ runTransition(opts)
141
+ .then((result) => {
131
142
  if (result.animation) {
132
143
  result.animation.destroy();
133
144
  }
@@ -136,15 +147,21 @@ const transition = (opts) => {
136
147
  }, (error) => {
137
148
  afterTransition(opts);
138
149
  reject(error);
150
+ })
151
+ .finally(() => {
152
+ // Ensure that the header is restored to its original state.
153
+ setHeaderTransitionClass(transitioningInactiveHeader, false);
139
154
  });
140
155
  });
141
156
  });
142
157
  };
143
- const beforeTransition = (opts) => {
158
+ const beforeTransition = (opts, transitioningInactiveHeader) => {
144
159
  const enteringEl = opts.enteringEl;
145
160
  const leavingEl = opts.leavingEl;
146
161
  focusController.saveViewFocus(leavingEl);
147
162
  setZIndex(enteringEl, leavingEl, opts.direction);
163
+ // Prevent flickering of the header by adding a class.
164
+ setHeaderTransitionClass(transitioningInactiveHeader, true);
148
165
  if (opts.showGoBack) {
149
166
  enteringEl.classList.add('can-go-back');
150
167
  }
@@ -333,6 +350,39 @@ const setZIndex = (enteringEl, leavingEl, direction) => {
333
350
  leavingEl.style.zIndex = '100';
334
351
  }
335
352
  };
353
+ /**
354
+ * Add a class to ensure that the header (if any)
355
+ * does not flicker during the transition. By adding the
356
+ * transitioning class, we ensure that the header has
357
+ * the necessary styles to prevent the following flickers:
358
+ * 1. When entering a page with a condensed header, the
359
+ * header should never be visible. However,
360
+ * it briefly renders the background color while
361
+ * the transition is occurring.
362
+ * 2. When leaving a page with a condensed header, the
363
+ * header has an opacity of 0 and the pages
364
+ * have a z-index which causes the entering page to
365
+ * briefly show it's content underneath the leaving page.
366
+ * 3. When entering a page or leaving a page with a fade
367
+ * header, the header should not have a background color.
368
+ * However, it briefly shows the background color while
369
+ * the transition is occurring.
370
+ *
371
+ * @param header The header element to modify.
372
+ * @param isTransitioning Whether the transition is occurring.
373
+ */
374
+ const setHeaderTransitionClass = (header, isTransitioning) => {
375
+ if (!header) {
376
+ return;
377
+ }
378
+ const transitionClass = 'header-transitioning';
379
+ if (isTransitioning) {
380
+ header.classList.add(transitionClass);
381
+ }
382
+ else {
383
+ header.classList.remove(transitionClass);
384
+ }
385
+ };
336
386
  const getIonPageElement = (element) => {
337
387
  if (element.classList.contains('ion-page')) {
338
388
  return element;
@@ -344,5 +394,26 @@ const getIonPageElement = (element) => {
344
394
  // idk, return the original element so at least something animates and we don't have a null pointer
345
395
  return element;
346
396
  };
397
+ /**
398
+ * Retrieves the ion-header element from a page based on the
399
+ * direction of the transition.
400
+ *
401
+ * @param opts Options for the transition.
402
+ * @returns The ion-header element or null if not found or not in 'ios' mode.
403
+ */
404
+ const getIosIonHeader = (opts) => {
405
+ const enteringEl = opts.enteringEl;
406
+ const leavingEl = opts.leavingEl;
407
+ const direction = opts.direction;
408
+ const mode = opts.mode;
409
+ if (mode !== 'ios') {
410
+ return null;
411
+ }
412
+ const element = direction === 'back' ? leavingEl : enteringEl;
413
+ if (!element) {
414
+ return null;
415
+ }
416
+ return element.querySelector('ion-header');
417
+ };
347
418
 
348
419
  export { LIFECYCLE_WILL_ENTER as L, LIFECYCLE_DID_ENTER as a, LIFECYCLE_WILL_LEAVE as b, LIFECYCLE_DID_LEAVE as c, LIFECYCLE_WILL_UNLOAD as d, deepReady as e, getIonPageElement as g, lifecycle as l, setPageHidden as s, transition as t, waitForMount as w };
@@ -140,7 +140,6 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
140
140
  const { checked, value } = this;
141
141
  const isNowChecked = !checked;
142
142
  this.checked = isNowChecked;
143
- this.setFocus();
144
143
  this.ionChange.emit({
145
144
  checked: isNowChecked,
146
145
  value,
@@ -191,9 +190,7 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
191
190
  return this.value || '';
192
191
  }
193
192
  setFocus() {
194
- if (this.focusEl) {
195
- this.focusEl.focus();
196
- }
193
+ this.el.focus();
197
194
  }
198
195
  renderOnOffSwitchLabels(mode, checked) {
199
196
  const icon = this.getSwitchLabelIcon(mode, checked);
@@ -243,7 +240,7 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
243
240
  const value = this.getValue();
244
241
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
245
242
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
246
- return (h(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(color, {
243
+ return (h(Host, { key: 'dddb1015bca6ef24df9dfd62439fd80df714946e', 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(color, {
247
244
  [mode]: true,
248
245
  'in-item': hostContext('ion-item', el),
249
246
  'toggle-activated': activated,
@@ -253,10 +250,10 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
253
250
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
254
251
  [`toggle-label-placement-${labelPlacement}`]: true,
255
252
  [`toggle-${rtl}`]: true,
256
- }) }, h("label", { key: '4d153679d118d01286f6633d1c19558a97745ff6', class: "toggle-wrapper", htmlFor: inputId }, h("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)), h("div", { key: 'ffed3a07ba2ab70e5b232e6041bc3b6b34be8331', class: {
253
+ }) }, h("label", { key: '0792d8b50212236905702ca43da3259c061ffcae', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '5bbd595d1ad7552dcb76aabeafd0392cb73fd422', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: 'aef8cd26ccace4bb3b8077fe593ffce2e460c05c', class: {
257
254
  'label-text-wrapper': true,
258
255
  'label-text-wrapper-hidden': !hasLabel,
259
- }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'd88e1e3dcdd8293f6b61f237cd7a0511dcbce300' }), this.renderHintText()), h("div", { key: '0e924225f5f0caf3c88738acb6c557bd8c1b68f6', class: "native-wrapper" }, this.renderToggleControl()))));
256
+ }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'fc2988a91d55cd158e734b8eb9c9a2efc3fc7a36' }), this.renderHintText()), h("div", { key: '86a065669073dfc7f699b7a910fc61b5ab68d5db', class: "native-wrapper" }, this.renderToggleControl()))));
260
257
  }
261
258
  get el() { return this; }
262
259
  static get watchers() { return {
@@ -120,15 +120,26 @@ const createFocusController = () => {
120
120
  };
121
121
  const LAST_FOCUS = 'ion-last-focus';
122
122
 
123
- const iosTransitionAnimation = () => Promise.resolve().then(function () { return require('./ios.transition-j9CclgEW.js'); });
124
- const mdTransitionAnimation = () => Promise.resolve().then(function () { return require('./md.transition-CwFyRSfv.js'); });
123
+ const iosTransitionAnimation = () => Promise.resolve().then(function () { return require('./ios.transition-BOt_uW73.js'); });
124
+ const mdTransitionAnimation = () => Promise.resolve().then(function () { return require('./md.transition-Dt968VXB.js'); });
125
125
  const focusController = createFocusController();
126
126
  // TODO(FW-2832): types
127
+ /**
128
+ * Executes the main page transition.
129
+ * It also manages the lifecycle of header visibility (if any)
130
+ * to prevent visual flickering in iOS. The flickering only
131
+ * occurs for a condensed header that is placed above the content.
132
+ *
133
+ * @param opts Options for the transition.
134
+ * @returns A promise that resolves when the transition is complete.
135
+ */
127
136
  const transition = (opts) => {
128
137
  return new Promise((resolve, reject) => {
129
138
  index.writeTask(() => {
130
- beforeTransition(opts);
131
- runTransition(opts).then((result) => {
139
+ const transitioningInactiveHeader = getIosIonHeader(opts);
140
+ beforeTransition(opts, transitioningInactiveHeader);
141
+ runTransition(opts)
142
+ .then((result) => {
132
143
  if (result.animation) {
133
144
  result.animation.destroy();
134
145
  }
@@ -137,15 +148,21 @@ const transition = (opts) => {
137
148
  }, (error) => {
138
149
  afterTransition(opts);
139
150
  reject(error);
151
+ })
152
+ .finally(() => {
153
+ // Ensure that the header is restored to its original state.
154
+ setHeaderTransitionClass(transitioningInactiveHeader, false);
140
155
  });
141
156
  });
142
157
  });
143
158
  };
144
- const beforeTransition = (opts) => {
159
+ const beforeTransition = (opts, transitioningInactiveHeader) => {
145
160
  const enteringEl = opts.enteringEl;
146
161
  const leavingEl = opts.leavingEl;
147
162
  focusController.saveViewFocus(leavingEl);
148
163
  setZIndex(enteringEl, leavingEl, opts.direction);
164
+ // Prevent flickering of the header by adding a class.
165
+ setHeaderTransitionClass(transitioningInactiveHeader, true);
149
166
  if (opts.showGoBack) {
150
167
  enteringEl.classList.add('can-go-back');
151
168
  }
@@ -334,6 +351,39 @@ const setZIndex = (enteringEl, leavingEl, direction) => {
334
351
  leavingEl.style.zIndex = '100';
335
352
  }
336
353
  };
354
+ /**
355
+ * Add a class to ensure that the header (if any)
356
+ * does not flicker during the transition. By adding the
357
+ * transitioning class, we ensure that the header has
358
+ * the necessary styles to prevent the following flickers:
359
+ * 1. When entering a page with a condensed header, the
360
+ * header should never be visible. However,
361
+ * it briefly renders the background color while
362
+ * the transition is occurring.
363
+ * 2. When leaving a page with a condensed header, the
364
+ * header has an opacity of 0 and the pages
365
+ * have a z-index which causes the entering page to
366
+ * briefly show it's content underneath the leaving page.
367
+ * 3. When entering a page or leaving a page with a fade
368
+ * header, the header should not have a background color.
369
+ * However, it briefly shows the background color while
370
+ * the transition is occurring.
371
+ *
372
+ * @param header The header element to modify.
373
+ * @param isTransitioning Whether the transition is occurring.
374
+ */
375
+ const setHeaderTransitionClass = (header, isTransitioning) => {
376
+ if (!header) {
377
+ return;
378
+ }
379
+ const transitionClass = 'header-transitioning';
380
+ if (isTransitioning) {
381
+ header.classList.add(transitionClass);
382
+ }
383
+ else {
384
+ header.classList.remove(transitionClass);
385
+ }
386
+ };
337
387
  const getIonPageElement = (element) => {
338
388
  if (element.classList.contains('ion-page')) {
339
389
  return element;
@@ -345,6 +395,27 @@ const getIonPageElement = (element) => {
345
395
  // idk, return the original element so at least something animates and we don't have a null pointer
346
396
  return element;
347
397
  };
398
+ /**
399
+ * Retrieves the ion-header element from a page based on the
400
+ * direction of the transition.
401
+ *
402
+ * @param opts Options for the transition.
403
+ * @returns The ion-header element or null if not found or not in 'ios' mode.
404
+ */
405
+ const getIosIonHeader = (opts) => {
406
+ const enteringEl = opts.enteringEl;
407
+ const leavingEl = opts.leavingEl;
408
+ const direction = opts.direction;
409
+ const mode = opts.mode;
410
+ if (mode !== 'ios') {
411
+ return null;
412
+ }
413
+ const element = direction === 'back' ? leavingEl : enteringEl;
414
+ if (!element) {
415
+ return null;
416
+ }
417
+ return element.querySelector('ion-header');
418
+ };
348
419
 
349
420
  exports.LIFECYCLE_DID_ENTER = LIFECYCLE_DID_ENTER;
350
421
  exports.LIFECYCLE_DID_LEAVE = LIFECYCLE_DID_LEAVE;
@@ -4,9 +4,9 @@
4
4
  'use strict';
5
5
 
6
6
  var animation = require('./animation-Bt3H9L1C.js');
7
- var index = require('./index-CD5Rjp23.js');
8
- var ios_transition = require('./ios.transition-j9CclgEW.js');
9
- var md_transition = require('./md.transition-CwFyRSfv.js');
7
+ var index = require('./index-094mMFB-.js');
8
+ var ios_transition = require('./ios.transition-BOt_uW73.js');
9
+ var md_transition = require('./md.transition-Dt968VXB.js');
10
10
  var cubicBezier = require('./cubic-bezier-DAjy1V-e.js');
11
11
  var index$1 = require('./index-CAvQ7Tka.js');
12
12
  var ionicGlobal = require('./ionic-global-HMVqOFGO.js');
@@ -14,7 +14,7 @@ var keyboardController = require('./keyboard-controller-GXBiBRKS.js');
14
14
  var cubicBezier = require('./cubic-bezier-DAjy1V-e.js');
15
15
  var frameworkDelegate = require('./framework-delegate-DMJRBuDi.js');
16
16
  var lockController = require('./lock-controller-aDB9wrEf.js');
17
- var index$2 = require('./index-CD5Rjp23.js');
17
+ var index$2 = require('./index-094mMFB-.js');
18
18
  require('./index-DkNv4J_i.js');
19
19
  require('./keyboard-UuAS4D_9.js');
20
20
  require('./capacitor-DmA66EwP.js');
@@ -904,7 +904,7 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
904
904
  });
905
905
  };
906
906
 
907
- 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}";
907
+ 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}";
908
908
 
909
909
  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}";
910
910
 
@@ -76,7 +76,6 @@ const Checkbox = class {
76
76
  };
77
77
  this.toggleChecked = (ev) => {
78
78
  ev.preventDefault();
79
- this.setFocus();
80
79
  this.setChecked(!this.checked);
81
80
  this.indeterminate = false;
82
81
  };
@@ -113,9 +112,7 @@ const Checkbox = class {
113
112
  }
114
113
  /** @internal */
115
114
  async setFocus() {
116
- if (this.focusEl) {
117
- this.focusEl.focus();
118
- }
115
+ this.el.focus();
119
116
  }
120
117
  getHintTextID() {
121
118
  const { el, helperText, errorText, helperTextId, errorTextId } = this;
@@ -151,7 +148,7 @@ const Checkbox = class {
151
148
  helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
152
149
  // The host element must have a checkbox role to ensure proper VoiceOver
153
150
  // support in Safari for accessibility.
154
- return (index.h(index.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: theme.createColorClasses(color, {
151
+ return (index.h(index.Host, { key: 'c63ab463a54067b59c3c9c90b54e2ed3bf5464a1', 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: theme.createColorClasses(color, {
155
152
  [mode]: true,
156
153
  'in-item': theme.hostContext('ion-item', el),
157
154
  'checkbox-checked': checked,
@@ -161,10 +158,10 @@ const Checkbox = class {
161
158
  [`checkbox-justify-${justify}`]: justify !== undefined,
162
159
  [`checkbox-alignment-${alignment}`]: alignment !== undefined,
163
160
  [`checkbox-label-placement-${labelPlacement}`]: true,
164
- }), onClick: this.onClick }, index.h("label", { key: 'f025cec5ff08e8be4487b9cc0324616ca5dfae2a', class: "checkbox-wrapper", htmlFor: inputId }, index.h("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)), index.h("div", { key: 'a625e9b50c3b617de8bbbfd624d772454fecaf2d', class: {
161
+ }) }, index.h("label", { key: 'b518692f79c49b20d59c243221f7ac94b74a9553', class: "checkbox-wrapper", htmlFor: inputId }, index.h("input", Object.assign({ key: 'd66b8994dd794b9911bf322c15f0c0929a4840fa', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), index.h("div", { key: '8eb61446274ab8400bc86aa41fec03a73de08df7', class: {
165
162
  'label-text-wrapper': true,
166
163
  'label-text-wrapper-hidden': !hasLabelContent,
167
- }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, index.h("slot", { key: '87d1a90691327945f4343406706e4ab27f453844' }), this.renderHintText()), index.h("div", { key: 'b57fed8cdecee4df1ef0d57f157267ee77fac653', class: "native-wrapper" }, index.h("svg", { key: '13a8aac044d46dc99e3b60a1a643785511f216ac', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
164
+ }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, index.h("slot", { key: '4b690bd86420471d1be9b1329e5cc872351c6e23' }), this.renderHintText()), index.h("div", { key: 'f48fb369f999851b4da4d7442fe87024e56f5e77', class: "native-wrapper" }, index.h("svg", { key: '1471004d068eb1b522699f3fa0eb7ae2a3308186', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
168
165
  }
169
166
  getSVGPath(mode, indeterminate) {
170
167
  let path = indeterminate ? (index.h("path", { d: "M6 12L18 12", part: "mark" })) : (index.h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
@@ -11,7 +11,7 @@ var lockController = require('./lock-controller-aDB9wrEf.js');
11
11
  var capacitor = require('./capacitor-DmA66EwP.js');
12
12
  var overlays = require('./overlays-DxIZwUXI.js');
13
13
  var theme = require('./theme-CeDs6Hcv.js');
14
- var index$4 = require('./index-CD5Rjp23.js');
14
+ var index$4 = require('./index-094mMFB-.js');
15
15
  var ionicGlobal = require('./ionic-global-HMVqOFGO.js');
16
16
  var keyboard = require('./keyboard-hHzlEQpk.js');
17
17
  var animation = require('./animation-Bt3H9L1C.js');
@@ -6,7 +6,7 @@
6
6
  var index = require('./index-D6Wc6v08.js');
7
7
  var cubicBezier = require('./cubic-bezier-DAjy1V-e.js');
8
8
  var helpers = require('./helpers-DrTqNghc.js');
9
- var index$1 = require('./index-CD5Rjp23.js');
9
+ var index$1 = require('./index-094mMFB-.js');
10
10
  var ionicGlobal = require('./ionic-global-HMVqOFGO.js');
11
11
  var frameworkDelegate = require('./framework-delegate-DMJRBuDi.js');
12
12
 
@@ -10,7 +10,7 @@ var helpers = require('./helpers-DrTqNghc.js');
10
10
  var lockController = require('./lock-controller-aDB9wrEf.js');
11
11
  var ionicGlobal = require('./ionic-global-HMVqOFGO.js');
12
12
  var theme = require('./theme-CeDs6Hcv.js');
13
- var index$1 = require('./index-CD5Rjp23.js');
13
+ var index$1 = require('./index-094mMFB-.js');
14
14
  var animation = require('./animation-Bt3H9L1C.js');
15
15
  require('./index-DkNv4J_i.js');
16
16
  require('./hardware-back-button-VCK4V3mG.js');
@@ -138,7 +138,6 @@ const Toggle = class {
138
138
  const { checked, value } = this;
139
139
  const isNowChecked = !checked;
140
140
  this.checked = isNowChecked;
141
- this.setFocus();
142
141
  this.ionChange.emit({
143
142
  checked: isNowChecked,
144
143
  value,
@@ -189,9 +188,7 @@ const Toggle = class {
189
188
  return this.value || '';
190
189
  }
191
190
  setFocus() {
192
- if (this.focusEl) {
193
- this.focusEl.focus();
194
- }
191
+ this.el.focus();
195
192
  }
196
193
  renderOnOffSwitchLabels(mode, checked) {
197
194
  const icon = this.getSwitchLabelIcon(mode, checked);
@@ -241,7 +238,7 @@ const Toggle = class {
241
238
  const value = this.getValue();
242
239
  const rtl = dir.isRTL(el) ? 'rtl' : 'ltr';
243
240
  helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
244
- return (index.h(index.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: theme.createColorClasses(color, {
241
+ return (index.h(index.Host, { key: 'dddb1015bca6ef24df9dfd62439fd80df714946e', 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: theme.createColorClasses(color, {
245
242
  [mode]: true,
246
243
  'in-item': theme.hostContext('ion-item', el),
247
244
  'toggle-activated': activated,
@@ -251,10 +248,10 @@ const Toggle = class {
251
248
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
252
249
  [`toggle-label-placement-${labelPlacement}`]: true,
253
250
  [`toggle-${rtl}`]: true,
254
- }) }, index.h("label", { key: '4d153679d118d01286f6633d1c19558a97745ff6', class: "toggle-wrapper", htmlFor: inputId }, index.h("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)), index.h("div", { key: 'ffed3a07ba2ab70e5b232e6041bc3b6b34be8331', class: {
251
+ }) }, index.h("label", { key: '0792d8b50212236905702ca43da3259c061ffcae', class: "toggle-wrapper", htmlFor: inputId }, index.h("input", Object.assign({ key: '5bbd595d1ad7552dcb76aabeafd0392cb73fd422', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), index.h("div", { key: 'aef8cd26ccace4bb3b8077fe593ffce2e460c05c', class: {
255
252
  'label-text-wrapper': true,
256
253
  'label-text-wrapper-hidden': !hasLabel,
257
- }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, index.h("slot", { key: 'd88e1e3dcdd8293f6b61f237cd7a0511dcbce300' }), this.renderHintText()), index.h("div", { key: '0e924225f5f0caf3c88738acb6c557bd8c1b68f6', class: "native-wrapper" }, this.renderToggleControl()))));
254
+ }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, index.h("slot", { key: 'fc2988a91d55cd158e734b8eb9c9a2efc3fc7a36' }), this.renderHintText()), index.h("div", { key: '86a065669073dfc7f699b7a910fc61b5ab68d5db', class: "native-wrapper" }, this.renderToggleControl()))));
258
255
  }
259
256
  get el() { return index.getElement(this); }
260
257
  static get watchers() { return {
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  var animation = require('./animation-Bt3H9L1C.js');
7
- var index = require('./index-CD5Rjp23.js');
7
+ var index = require('./index-094mMFB-.js');
8
8
  require('./index-D6Wc6v08.js');
9
9
  require('./index-DkNv4J_i.js');
10
10
  require('./helpers-DrTqNghc.js');
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  var animation = require('./animation-Bt3H9L1C.js');
7
- var index = require('./index-CD5Rjp23.js');
7
+ var index = require('./index-094mMFB-.js');
8
8
  require('./index-D6Wc6v08.js');
9
9
  require('./index-DkNv4J_i.js');
10
10
  require('./helpers-DrTqNghc.js');
@@ -77,7 +77,6 @@ export class Checkbox {
77
77
  };
78
78
  this.toggleChecked = (ev) => {
79
79
  ev.preventDefault();
80
- this.setFocus();
81
80
  this.setChecked(!this.checked);
82
81
  this.indeterminate = false;
83
82
  };
@@ -114,9 +113,7 @@ export class Checkbox {
114
113
  }
115
114
  /** @internal */
116
115
  async setFocus() {
117
- if (this.focusEl) {
118
- this.focusEl.focus();
119
- }
116
+ this.el.focus();
120
117
  }
121
118
  getHintTextID() {
122
119
  const { el, helperText, errorText, helperTextId, errorTextId } = this;
@@ -152,7 +149,7 @@ export class Checkbox {
152
149
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
153
150
  // The host element must have a checkbox role to ensure proper VoiceOver
154
151
  // support in Safari for accessibility.
155
- return (h(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(color, {
152
+ return (h(Host, { key: 'c63ab463a54067b59c3c9c90b54e2ed3bf5464a1', 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(color, {
156
153
  [mode]: true,
157
154
  'in-item': hostContext('ion-item', el),
158
155
  'checkbox-checked': checked,
@@ -162,10 +159,10 @@ export class Checkbox {
162
159
  [`checkbox-justify-${justify}`]: justify !== undefined,
163
160
  [`checkbox-alignment-${alignment}`]: alignment !== undefined,
164
161
  [`checkbox-label-placement-${labelPlacement}`]: true,
165
- }), onClick: this.onClick }, h("label", { key: 'f025cec5ff08e8be4487b9cc0324616ca5dfae2a', class: "checkbox-wrapper", htmlFor: inputId }, h("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)), h("div", { key: 'a625e9b50c3b617de8bbbfd624d772454fecaf2d', class: {
162
+ }) }, h("label", { key: 'b518692f79c49b20d59c243221f7ac94b74a9553', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'd66b8994dd794b9911bf322c15f0c0929a4840fa', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), h("div", { key: '8eb61446274ab8400bc86aa41fec03a73de08df7', class: {
166
163
  'label-text-wrapper': true,
167
164
  'label-text-wrapper-hidden': !hasLabelContent,
168
- }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '87d1a90691327945f4343406706e4ab27f453844' }), this.renderHintText()), h("div", { key: 'b57fed8cdecee4df1ef0d57f157267ee77fac653', class: "native-wrapper" }, h("svg", { key: '13a8aac044d46dc99e3b60a1a643785511f216ac', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
165
+ }, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '4b690bd86420471d1be9b1329e5cc872351c6e23' }), this.renderHintText()), h("div", { key: 'f48fb369f999851b4da4d7442fe87024e56f5e77', class: "native-wrapper" }, h("svg", { key: '1471004d068eb1b522699f3fa0eb7ae2a3308186', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
169
166
  }
170
167
  getSVGPath(mode, indeterminate) {
171
168
  let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
@@ -152,6 +152,15 @@ ion-header ion-toolbar:first-of-type {
152
152
  --opacity-scale: inherit;
153
153
  }
154
154
 
155
+ /**
156
+ * Override styles applied during the page transition to prevent
157
+ * header flickering.
158
+ */
159
+ .header-collapse-fade.header-transitioning ion-toolbar {
160
+ --background: transparent;
161
+ --border-style: none;
162
+ }
163
+
155
164
  .header-collapse-condense {
156
165
  z-index: 9;
157
166
  }
@@ -175,7 +184,6 @@ ion-header ion-toolbar:first-of-type {
175
184
  * since it needs to blend in with the header above it.
176
185
  */
177
186
  .header-collapse-condense ion-toolbar {
178
- --background: var(--ion-background-color, #fff);
179
187
  z-index: 0;
180
188
  }
181
189
 
@@ -201,6 +209,24 @@ ion-header ion-toolbar:first-of-type {
201
209
  transition: all 0.2s ease-in-out;
202
210
  }
203
211
 
212
+ /**
213
+ * Large title toolbar should just use the content background
214
+ * since it needs to blend in with the header above it.
215
+ */
216
+ .header-collapse-condense ion-toolbar,
217
+ .header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar {
218
+ --background: var(--ion-background-color, #fff);
219
+ }
220
+
221
+ /**
222
+ * Override styles applied during the page transition to prevent
223
+ * header flickering.
224
+ */
225
+ .header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar {
226
+ --border-style: none;
227
+ --opacity-scale: 1;
228
+ }
229
+
204
230
  .header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,
205
231
  .header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse {
206
232
  opacity: 0;