@ionic/core 8.0.1-dev.11713535425.1a4afba3 → 8.0.1-dev.11713879639.102f51a0

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 (45) hide show
  1. package/components/input-shims.js +5 -5
  2. package/components/ion-input.js +4 -12
  3. package/dist/cjs/{input-shims-9e59ef62.js → input-shims-20d639e6.js} +5 -5
  4. package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
  5. package/dist/cjs/ion-input.cjs.entry.js +4 -12
  6. package/dist/cjs/ionic.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/input/input.js +4 -12
  9. package/dist/collection/utils/input-shims/hacks/scroll-assist.js +5 -5
  10. package/dist/collection/utils/test/playwright/page/utils/goto.js +12 -3
  11. package/dist/docs.json +3 -3
  12. package/dist/esm/{input-shims-0314bbe5.js → input-shims-4530285e.js} +5 -5
  13. package/dist/esm/ion-app_8.entry.js +1 -1
  14. package/dist/esm/ion-input.entry.js +4 -12
  15. package/dist/esm/ionic.js +1 -1
  16. package/dist/esm-es5/input-shims-4530285e.js +4 -0
  17. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  18. package/dist/esm-es5/ion-input.entry.js +1 -1
  19. package/dist/ionic/ionic.esm.js +1 -1
  20. package/dist/ionic/ionic.js +1 -1
  21. package/dist/ionic/{p-cc258008.entry.js → p-32dfbcdc.entry.js} +1 -1
  22. package/dist/ionic/{p-eda2459e.entry.js → p-34f26d8b.entry.js} +1 -1
  23. package/dist/ionic/{p-2690b1de.js → p-46111310.js} +1 -1
  24. package/dist/ionic/p-46f407f0.system.js +4 -0
  25. package/dist/ionic/{p-ead3aefc.system.entry.js → p-4761ae79.system.entry.js} +1 -1
  26. package/dist/ionic/p-5895b91d.entry.js +4 -0
  27. package/dist/ionic/p-5f15ee76.entry.js +4 -0
  28. package/dist/ionic/p-629da37e.entry.js +4 -0
  29. package/dist/ionic/p-703f62c1.entry.js +4 -0
  30. package/dist/ionic/p-70f6b982.entry.js +4 -0
  31. package/dist/ionic/{p-c4e495a3.system.js → p-d8d6ebc0.system.js} +1 -1
  32. package/dist/ionic/p-e62d4a6c.entry.js +4 -0
  33. package/dist/ionic/{p-4d2b2d23.system.entry.js → p-e832408b.system.entry.js} +1 -1
  34. package/dist/ionic/p-eac224fa.entry.js +4 -0
  35. package/hydrate/index.js +5 -13
  36. package/package.json +1 -1
  37. package/dist/esm-es5/input-shims-0314bbe5.js +0 -4
  38. package/dist/ionic/p-13cc6ee6.entry.js +0 -4
  39. package/dist/ionic/p-1fa53d02.entry.js +0 -4
  40. package/dist/ionic/p-23fdee0e.entry.js +0 -4
  41. package/dist/ionic/p-495ed1c3.entry.js +0 -4
  42. package/dist/ionic/p-ae42c907.entry.js +0 -4
  43. package/dist/ionic/p-d73f49d0.entry.js +0 -4
  44. package/dist/ionic/p-df8f26d1.entry.js +0 -4
  45. package/dist/ionic/p-dfb78785.system.js +0 -4
@@ -336,7 +336,7 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
336
336
  const focusOut = () => {
337
337
  hasKeyboardBeenPresentedForTextField = false;
338
338
  win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
339
- componentEl.removeEventListener('focusout', focusOut);
339
+ componentEl.removeEventListener('focusout', focusOut, true);
340
340
  };
341
341
  /**
342
342
  * When the input is about to receive
@@ -356,13 +356,13 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
356
356
  }
357
357
  jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput, platformHeight);
358
358
  win === null || win === void 0 ? void 0 : win.addEventListener('ionKeyboardDidShow', keyboardShow);
359
- componentEl.addEventListener('focusout', focusOut);
359
+ componentEl.addEventListener('focusout', focusOut, true);
360
360
  };
361
- componentEl.addEventListener('focusin', focusIn);
361
+ componentEl.addEventListener('focusin', focusIn, true);
362
362
  return () => {
363
- componentEl.removeEventListener('focusin', focusIn);
363
+ componentEl.removeEventListener('focusin', focusIn, true);
364
364
  win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
365
- componentEl.removeEventListener('focusout', focusOut);
365
+ componentEl.removeEventListener('focusout', focusOut, true);
366
366
  };
367
367
  };
368
368
  /**
@@ -75,7 +75,6 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
75
75
  ev.preventDefault();
76
76
  ev.stopPropagation();
77
77
  // Attempt to focus input again after pressing clear button
78
- console.log('hi there');
79
78
  this.setFocus();
80
79
  }
81
80
  this.value = '';
@@ -176,6 +175,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
176
175
  * such as [type] in Angular.
177
176
  */
178
177
  this.onTypeChange();
178
+ this.debounceChanged();
179
179
  }
180
180
  componentDidRender() {
181
181
  var _a;
@@ -402,7 +402,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
402
402
  * TODO(FW-5592): Remove hasStartEndSlots condition
403
403
  */
404
404
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
405
- return (h(Host, { key: 'c151cc531804483693052773aeeec1ee5f0c8a47', class: createColorClasses(this.color, {
405
+ return (h(Host, { key: '083568e68a2970485e93a84ad3b837c117e03fed', class: createColorClasses(this.color, {
406
406
  [mode]: true,
407
407
  'has-value': hasValue,
408
408
  'has-focus': hasFocus,
@@ -413,22 +413,14 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
413
413
  'in-item': inItem,
414
414
  'in-item-color': hostContext('ion-item.ion-color', this.el),
415
415
  'input-disabled': disabled,
416
- }) }, h("label", { key: 'fbe253f1e0dd24ad13333f4dc06dd13f6b33a042', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '817707ed2e4dce8b5ae2391960d1be367a1e2ddf', class: "native-wrapper" }, h("slot", { key: '776c6b305b275e0babdfd6116ccc3f5399c97d38', name: "start" }), h("input", Object.assign({ key: 'eb5bdc9fda239c8edd7ed7fdc78517728a351a50', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '57ff8319da7ca85f3ce41a7581c55b4d91202542', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
416
+ }) }, h("label", { key: '5e6767a20b8ac61d5df69106f4ce11ecc46ae5bf', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '4af8df127e8194b4eeb8b16936a36489aee17009', class: "native-wrapper" }, h("slot", { key: '90e925fa36a5c057a4ca5e03d5fcaf8e12e711ad', name: "start" }), h("input", Object.assign({ key: '0a5455e8c31beca48e08b97faa5e3e069822248f', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '2f51b23231d9ca819d2af069f3d32df4e29d042d', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
417
417
  /**
418
418
  * This prevents mobile browsers from
419
419
  * blurring the input when the clear
420
420
  * button is activated.
421
421
  */
422
422
  ev.preventDefault();
423
- }, onFocusin: (ev) => {
424
- /**
425
- * Prevent the focusin event from bubbling otherwise it will cause the focusin
426
- * event listener in scroll assist to fire. When this fires, focus will be moved
427
- * back to the input even if the clear button was never tapped. This poses issues
428
- * for screen readers as it means users would be unable to swipe past the clear button.
429
- */
430
- ev.stopPropagation();
431
- }, onClick: this.clearTextInput }, h("ion-icon", { key: 'c4c74c4387e8e81b4e00e0800ad7fd65d190a4ca', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: '6cf9e37091750a70ae97faa0104822f92cd313f5', name: "end" })), shouldRenderHighlight && h("div", { key: 'd4d032e244ae917cbedddac633d83501a1a2cf5b', class: "input-highlight" })), this.renderBottomContent()));
423
+ }, onClick: this.clearTextInput }, h("ion-icon", { key: '569290d2b83d2752cfda6b5d8a84c06945b5c943', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: 'c94a79a60d5d403941dd641202125367ad490e53', name: "end" })), shouldRenderHighlight && h("div", { key: 'b4f192ac376fdb1a2b0708797cac46f07818e962', class: "input-highlight" })), this.renderBottomContent()));
432
424
  }
433
425
  get el() { return this; }
434
426
  static get watchers() { return {
@@ -340,7 +340,7 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
340
340
  const focusOut = () => {
341
341
  hasKeyboardBeenPresentedForTextField = false;
342
342
  index.win === null || index.win === void 0 ? void 0 : index.win.removeEventListener('ionKeyboardDidShow', keyboardShow);
343
- componentEl.removeEventListener('focusout', focusOut);
343
+ componentEl.removeEventListener('focusout', focusOut, true);
344
344
  };
345
345
  /**
346
346
  * When the input is about to receive
@@ -360,13 +360,13 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
360
360
  }
361
361
  jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput, platformHeight);
362
362
  index.win === null || index.win === void 0 ? void 0 : index.win.addEventListener('ionKeyboardDidShow', keyboardShow);
363
- componentEl.addEventListener('focusout', focusOut);
363
+ componentEl.addEventListener('focusout', focusOut, true);
364
364
  };
365
- componentEl.addEventListener('focusin', focusIn);
365
+ componentEl.addEventListener('focusin', focusIn, true);
366
366
  return () => {
367
- componentEl.removeEventListener('focusin', focusIn);
367
+ componentEl.removeEventListener('focusin', focusIn, true);
368
368
  index.win === null || index.win === void 0 ? void 0 : index.win.removeEventListener('ionKeyboardDidShow', keyboardShow);
369
- componentEl.removeEventListener('focusout', focusOut);
369
+ componentEl.removeEventListener('focusout', focusOut, true);
370
370
  };
371
371
  };
372
372
  /**
@@ -45,7 +45,7 @@ const App = class {
45
45
  * platforms proceed into this block.
46
46
  */
47
47
  const platform = ionicGlobal.isPlatform(window, 'ios') ? 'ios' : 'android';
48
- Promise.resolve().then(function () { return require('./input-shims-9e59ef62.js'); }).then((module) => module.startInputShims(ionicGlobal.config, platform));
48
+ Promise.resolve().then(function () { return require('./input-shims-20d639e6.js'); }).then((module) => module.startInputShims(ionicGlobal.config, platform));
49
49
  }
50
50
  const hardwareBackButtonModule = await Promise.resolve().then(function () { return require('./hardware-back-button-44e7c052.js'); });
51
51
  const supportsHardwareBackButtonEvents = isHybrid || hardwareBackButton.shouldUseCloseWatcher();
@@ -79,7 +79,6 @@ const Input = class {
79
79
  ev.preventDefault();
80
80
  ev.stopPropagation();
81
81
  // Attempt to focus input again after pressing clear button
82
- console.log('hi there');
83
82
  this.setFocus();
84
83
  }
85
84
  this.value = '';
@@ -180,6 +179,7 @@ const Input = class {
180
179
  * such as [type] in Angular.
181
180
  */
182
181
  this.onTypeChange();
182
+ this.debounceChanged();
183
183
  }
184
184
  componentDidRender() {
185
185
  var _a;
@@ -406,7 +406,7 @@ const Input = class {
406
406
  * TODO(FW-5592): Remove hasStartEndSlots condition
407
407
  */
408
408
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
409
- return (index.h(index.Host, { key: 'c151cc531804483693052773aeeec1ee5f0c8a47', class: theme.createColorClasses(this.color, {
409
+ return (index.h(index.Host, { key: '083568e68a2970485e93a84ad3b837c117e03fed', class: theme.createColorClasses(this.color, {
410
410
  [mode]: true,
411
411
  'has-value': hasValue,
412
412
  'has-focus': hasFocus,
@@ -417,22 +417,14 @@ const Input = class {
417
417
  'in-item': inItem,
418
418
  'in-item-color': theme.hostContext('ion-item.ion-color', this.el),
419
419
  'input-disabled': disabled,
420
- }) }, index.h("label", { key: 'fbe253f1e0dd24ad13333f4dc06dd13f6b33a042', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), index.h("div", { key: '817707ed2e4dce8b5ae2391960d1be367a1e2ddf', class: "native-wrapper" }, index.h("slot", { key: '776c6b305b275e0babdfd6116ccc3f5399c97d38', name: "start" }), index.h("input", Object.assign({ key: 'eb5bdc9fda239c8edd7ed7fdc78517728a351a50', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (index.h("button", { key: '57ff8319da7ca85f3ce41a7581c55b4d91202542', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
420
+ }) }, index.h("label", { key: '5e6767a20b8ac61d5df69106f4ce11ecc46ae5bf', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), index.h("div", { key: '4af8df127e8194b4eeb8b16936a36489aee17009', class: "native-wrapper" }, index.h("slot", { key: '90e925fa36a5c057a4ca5e03d5fcaf8e12e711ad', name: "start" }), index.h("input", Object.assign({ key: '0a5455e8c31beca48e08b97faa5e3e069822248f', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (index.h("button", { key: '2f51b23231d9ca819d2af069f3d32df4e29d042d', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
421
421
  /**
422
422
  * This prevents mobile browsers from
423
423
  * blurring the input when the clear
424
424
  * button is activated.
425
425
  */
426
426
  ev.preventDefault();
427
- }, onFocusin: (ev) => {
428
- /**
429
- * Prevent the focusin event from bubbling otherwise it will cause the focusin
430
- * event listener in scroll assist to fire. When this fires, focus will be moved
431
- * back to the input even if the clear button was never tapped. This poses issues
432
- * for screen readers as it means users would be unable to swipe past the clear button.
433
- */
434
- ev.stopPropagation();
435
- }, onClick: this.clearTextInput }, index.h("ion-icon", { key: 'c4c74c4387e8e81b4e00e0800ad7fd65d190a4ca', "aria-hidden": "true", icon: mode === 'ios' ? index$1.closeCircle : index$1.closeSharp }))), index.h("slot", { key: '6cf9e37091750a70ae97faa0104822f92cd313f5', name: "end" })), shouldRenderHighlight && index.h("div", { key: 'd4d032e244ae917cbedddac633d83501a1a2cf5b', class: "input-highlight" })), this.renderBottomContent()));
427
+ }, onClick: this.clearTextInput }, index.h("ion-icon", { key: '569290d2b83d2752cfda6b5d8a84c06945b5c943', "aria-hidden": "true", icon: mode === 'ios' ? index$1.closeCircle : index$1.closeSharp }))), index.h("slot", { key: 'c94a79a60d5d403941dd641202125367ad490e53', name: "end" })), shouldRenderHighlight && index.h("div", { key: 'b4f192ac376fdb1a2b0708797cac46f07818e962', class: "input-highlight" })), this.renderBottomContent()));
436
428
  }
437
429
  get el() { return index.getElement(this); }
438
430
  static get watchers() { return {
@@ -10,7 +10,7 @@ const appGlobals = require('./app-globals-5bfa2d7f.js');
10
10
  require('./ionic-global-62487d02.js');
11
11
 
12
12
  /*
13
- Stencil Client Patch Browser v4.15.0 | MIT Licensed | https://stenciljs.com
13
+ Stencil Client Patch Browser v4.16.0 | MIT Licensed | https://stenciljs.com
14
14
  */
15
15
  const patchBrowser = () => {
16
16
  {
@@ -96,8 +96,8 @@
96
96
  ],
97
97
  "compiler": {
98
98
  "name": "@stencil/core",
99
- "version": "4.15.0",
100
- "typescriptVersion": "5.4.4"
99
+ "version": "4.16.0",
100
+ "typescriptVersion": "5.4.5"
101
101
  },
102
102
  "collections": [
103
103
  {
@@ -69,7 +69,6 @@ export class Input {
69
69
  ev.preventDefault();
70
70
  ev.stopPropagation();
71
71
  // Attempt to focus input again after pressing clear button
72
- console.log('hi there');
73
72
  this.setFocus();
74
73
  }
75
74
  this.value = '';
@@ -170,6 +169,7 @@ export class Input {
170
169
  * such as [type] in Angular.
171
170
  */
172
171
  this.onTypeChange();
172
+ this.debounceChanged();
173
173
  }
174
174
  componentDidRender() {
175
175
  var _a;
@@ -396,7 +396,7 @@ export class Input {
396
396
  * TODO(FW-5592): Remove hasStartEndSlots condition
397
397
  */
398
398
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
399
- return (h(Host, { key: 'c151cc531804483693052773aeeec1ee5f0c8a47', class: createColorClasses(this.color, {
399
+ return (h(Host, { key: '083568e68a2970485e93a84ad3b837c117e03fed', class: createColorClasses(this.color, {
400
400
  [mode]: true,
401
401
  'has-value': hasValue,
402
402
  'has-focus': hasFocus,
@@ -407,22 +407,14 @@ export class Input {
407
407
  'in-item': inItem,
408
408
  'in-item-color': hostContext('ion-item.ion-color', this.el),
409
409
  'input-disabled': disabled,
410
- }) }, h("label", { key: 'fbe253f1e0dd24ad13333f4dc06dd13f6b33a042', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '817707ed2e4dce8b5ae2391960d1be367a1e2ddf', class: "native-wrapper" }, h("slot", { key: '776c6b305b275e0babdfd6116ccc3f5399c97d38', name: "start" }), h("input", Object.assign({ key: 'eb5bdc9fda239c8edd7ed7fdc78517728a351a50', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '57ff8319da7ca85f3ce41a7581c55b4d91202542', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
410
+ }) }, h("label", { key: '5e6767a20b8ac61d5df69106f4ce11ecc46ae5bf', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '4af8df127e8194b4eeb8b16936a36489aee17009', class: "native-wrapper" }, h("slot", { key: '90e925fa36a5c057a4ca5e03d5fcaf8e12e711ad', name: "start" }), h("input", Object.assign({ key: '0a5455e8c31beca48e08b97faa5e3e069822248f', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '2f51b23231d9ca819d2af069f3d32df4e29d042d', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
411
411
  /**
412
412
  * This prevents mobile browsers from
413
413
  * blurring the input when the clear
414
414
  * button is activated.
415
415
  */
416
416
  ev.preventDefault();
417
- }, onFocusin: (ev) => {
418
- /**
419
- * Prevent the focusin event from bubbling otherwise it will cause the focusin
420
- * event listener in scroll assist to fire. When this fires, focus will be moved
421
- * back to the input even if the clear button was never tapped. This poses issues
422
- * for screen readers as it means users would be unable to swipe past the clear button.
423
- */
424
- ev.stopPropagation();
425
- }, onClick: this.clearTextInput }, h("ion-icon", { key: 'c4c74c4387e8e81b4e00e0800ad7fd65d190a4ca', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: '6cf9e37091750a70ae97faa0104822f92cd313f5', name: "end" })), shouldRenderHighlight && h("div", { key: 'd4d032e244ae917cbedddac633d83501a1a2cf5b', class: "input-highlight" })), this.renderBottomContent()));
417
+ }, onClick: this.clearTextInput }, h("ion-icon", { key: '569290d2b83d2752cfda6b5d8a84c06945b5c943', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: 'c94a79a60d5d403941dd641202125367ad490e53', name: "end" })), shouldRenderHighlight && h("div", { key: 'b4f192ac376fdb1a2b0708797cac46f07818e962', class: "input-highlight" })), this.renderBottomContent()));
426
418
  }
427
419
  static get is() { return "ion-input"; }
428
420
  static get encapsulation() { return "scoped"; }
@@ -96,7 +96,7 @@ export const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, ke
96
96
  const focusOut = () => {
97
97
  hasKeyboardBeenPresentedForTextField = false;
98
98
  win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
99
- componentEl.removeEventListener('focusout', focusOut);
99
+ componentEl.removeEventListener('focusout', focusOut, true);
100
100
  };
101
101
  /**
102
102
  * When the input is about to receive
@@ -116,13 +116,13 @@ export const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, ke
116
116
  }
117
117
  jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput, platformHeight);
118
118
  win === null || win === void 0 ? void 0 : win.addEventListener('ionKeyboardDidShow', keyboardShow);
119
- componentEl.addEventListener('focusout', focusOut);
119
+ componentEl.addEventListener('focusout', focusOut, true);
120
120
  };
121
- componentEl.addEventListener('focusin', focusIn);
121
+ componentEl.addEventListener('focusin', focusIn, true);
122
122
  return () => {
123
- componentEl.removeEventListener('focusin', focusIn);
123
+ componentEl.removeEventListener('focusin', focusIn, true);
124
124
  win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
125
- componentEl.removeEventListener('focusout', focusOut);
125
+ componentEl.removeEventListener('focusout', focusOut, true);
126
126
  };
127
127
  };
128
128
  /**
@@ -9,7 +9,7 @@
9
9
  * to be hydrated before proceeding with the test.
10
10
  */
11
11
  export const goto = async (page, url, testInfo, originalFn, options) => {
12
- var _a, _b, _c;
12
+ var _a, _b, _c, _d;
13
13
  if (options === undefined && testInfo.project.metadata.mode === undefined) {
14
14
  throw new Error(`
15
15
  A config must be passed to page.goto to use a generator test:
@@ -22,13 +22,16 @@ configs().forEach(({ config, title }) => {
22
22
  }
23
23
  let mode;
24
24
  let direction;
25
+ let palette;
25
26
  if (options == undefined) {
26
27
  mode = testInfo.project.metadata.mode;
27
28
  direction = testInfo.project.metadata.rtl ? 'rtl' : 'ltr';
29
+ palette = testInfo.project.metadata.palette;
28
30
  }
29
31
  else {
30
32
  mode = options.mode;
31
33
  direction = options.direction;
34
+ palette = options.palette;
32
35
  }
33
36
  const rtlString = direction === 'rtl' ? 'true' : undefined;
34
37
  const splitUrl = url.split('?');
@@ -40,12 +43,14 @@ configs().forEach(({ config, title }) => {
40
43
  const urlToParams = new URLSearchParams(paramsString);
41
44
  const formattedMode = (_a = urlToParams.get('ionic:mode')) !== null && _a !== void 0 ? _a : mode;
42
45
  const formattedRtl = (_b = urlToParams.get('rtl')) !== null && _b !== void 0 ? _b : rtlString;
43
- const ionicTesting = (_c = urlToParams.get('ionic:_testing')) !== null && _c !== void 0 ? _c : true;
46
+ const formattedPalette = (_c = urlToParams.get('palette')) !== null && _c !== void 0 ? _c : palette;
47
+ const ionicTesting = (_d = urlToParams.get('ionic:_testing')) !== null && _d !== void 0 ? _d : true;
44
48
  /**
45
49
  * Pass through other custom query params
46
50
  */
47
51
  urlToParams.delete('ionic:mode');
48
52
  urlToParams.delete('rtl');
53
+ urlToParams.delete('palette');
49
54
  urlToParams.delete('ionic:_testing');
50
55
  /**
51
56
  * Convert remaining query params to a string.
@@ -54,7 +59,7 @@ configs().forEach(({ config, title }) => {
54
59
  */
55
60
  const remainingQueryParams = decodeURIComponent(urlToParams.toString());
56
61
  const remainingQueryParamsString = remainingQueryParams == '' ? '' : `&${remainingQueryParams}`;
57
- const formattedUrl = `${splitUrl[0]}?ionic:_testing=${ionicTesting}&ionic:mode=${formattedMode}&rtl=${formattedRtl}${remainingQueryParamsString}`;
62
+ const formattedUrl = `${splitUrl[0]}?ionic:_testing=${ionicTesting}&ionic:mode=${formattedMode}&rtl=${formattedRtl}&palette=${formattedPalette}${remainingQueryParamsString}`;
58
63
  testInfo.annotations.push({
59
64
  type: 'mode',
60
65
  description: formattedMode,
@@ -63,6 +68,10 @@ configs().forEach(({ config, title }) => {
63
68
  type: 'direction',
64
69
  description: formattedRtl === 'true' ? 'rtl' : 'ltr',
65
70
  });
71
+ testInfo.annotations.push({
72
+ type: 'palette',
73
+ description: formattedPalette,
74
+ });
66
75
  const result = await Promise.all([
67
76
  page.waitForFunction(() => window.testAppLoaded === true, { timeout: 4750 }),
68
77
  originalFn(formattedUrl, options),
package/dist/docs.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2024-04-19T14:05:43",
2
+ "timestamp": "2024-04-23T13:42:46",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.15.0",
6
- "typescriptVersion": "5.4.4"
5
+ "version": "4.16.0",
6
+ "typescriptVersion": "5.4.5"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -338,7 +338,7 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
338
338
  const focusOut = () => {
339
339
  hasKeyboardBeenPresentedForTextField = false;
340
340
  win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
341
- componentEl.removeEventListener('focusout', focusOut);
341
+ componentEl.removeEventListener('focusout', focusOut, true);
342
342
  };
343
343
  /**
344
344
  * When the input is about to receive
@@ -358,13 +358,13 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
358
358
  }
359
359
  jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput, platformHeight);
360
360
  win === null || win === void 0 ? void 0 : win.addEventListener('ionKeyboardDidShow', keyboardShow);
361
- componentEl.addEventListener('focusout', focusOut);
361
+ componentEl.addEventListener('focusout', focusOut, true);
362
362
  };
363
- componentEl.addEventListener('focusin', focusIn);
363
+ componentEl.addEventListener('focusin', focusIn, true);
364
364
  return () => {
365
- componentEl.removeEventListener('focusin', focusIn);
365
+ componentEl.removeEventListener('focusin', focusIn, true);
366
366
  win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
367
- componentEl.removeEventListener('focusout', focusOut);
367
+ componentEl.removeEventListener('focusout', focusOut, true);
368
368
  };
369
369
  };
370
370
  /**
@@ -41,7 +41,7 @@ const App = class {
41
41
  * platforms proceed into this block.
42
42
  */
43
43
  const platform = isPlatform(window, 'ios') ? 'ios' : 'android';
44
- import('./input-shims-0314bbe5.js').then((module) => module.startInputShims(config, platform));
44
+ import('./input-shims-4530285e.js').then((module) => module.startInputShims(config, platform));
45
45
  }
46
46
  const hardwareBackButtonModule = await import('./hardware-back-button-ba8f64c2.js');
47
47
  const supportsHardwareBackButtonEvents = isHybrid || shouldUseCloseWatcher();
@@ -75,7 +75,6 @@ const Input = class {
75
75
  ev.preventDefault();
76
76
  ev.stopPropagation();
77
77
  // Attempt to focus input again after pressing clear button
78
- console.log('hi there');
79
78
  this.setFocus();
80
79
  }
81
80
  this.value = '';
@@ -176,6 +175,7 @@ const Input = class {
176
175
  * such as [type] in Angular.
177
176
  */
178
177
  this.onTypeChange();
178
+ this.debounceChanged();
179
179
  }
180
180
  componentDidRender() {
181
181
  var _a;
@@ -402,7 +402,7 @@ const Input = class {
402
402
  * TODO(FW-5592): Remove hasStartEndSlots condition
403
403
  */
404
404
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
405
- return (h(Host, { key: 'c151cc531804483693052773aeeec1ee5f0c8a47', class: createColorClasses(this.color, {
405
+ return (h(Host, { key: '083568e68a2970485e93a84ad3b837c117e03fed', class: createColorClasses(this.color, {
406
406
  [mode]: true,
407
407
  'has-value': hasValue,
408
408
  'has-focus': hasFocus,
@@ -413,22 +413,14 @@ const Input = class {
413
413
  'in-item': inItem,
414
414
  'in-item-color': hostContext('ion-item.ion-color', this.el),
415
415
  'input-disabled': disabled,
416
- }) }, h("label", { key: 'fbe253f1e0dd24ad13333f4dc06dd13f6b33a042', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '817707ed2e4dce8b5ae2391960d1be367a1e2ddf', class: "native-wrapper" }, h("slot", { key: '776c6b305b275e0babdfd6116ccc3f5399c97d38', name: "start" }), h("input", Object.assign({ key: 'eb5bdc9fda239c8edd7ed7fdc78517728a351a50', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '57ff8319da7ca85f3ce41a7581c55b4d91202542', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
416
+ }) }, h("label", { key: '5e6767a20b8ac61d5df69106f4ce11ecc46ae5bf', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '4af8df127e8194b4eeb8b16936a36489aee17009', class: "native-wrapper" }, h("slot", { key: '90e925fa36a5c057a4ca5e03d5fcaf8e12e711ad', name: "start" }), h("input", Object.assign({ key: '0a5455e8c31beca48e08b97faa5e3e069822248f', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '2f51b23231d9ca819d2af069f3d32df4e29d042d', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
417
417
  /**
418
418
  * This prevents mobile browsers from
419
419
  * blurring the input when the clear
420
420
  * button is activated.
421
421
  */
422
422
  ev.preventDefault();
423
- }, onFocusin: (ev) => {
424
- /**
425
- * Prevent the focusin event from bubbling otherwise it will cause the focusin
426
- * event listener in scroll assist to fire. When this fires, focus will be moved
427
- * back to the input even if the clear button was never tapped. This poses issues
428
- * for screen readers as it means users would be unable to swipe past the clear button.
429
- */
430
- ev.stopPropagation();
431
- }, onClick: this.clearTextInput }, h("ion-icon", { key: 'c4c74c4387e8e81b4e00e0800ad7fd65d190a4ca', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: '6cf9e37091750a70ae97faa0104822f92cd313f5', name: "end" })), shouldRenderHighlight && h("div", { key: 'd4d032e244ae917cbedddac633d83501a1a2cf5b', class: "input-highlight" })), this.renderBottomContent()));
423
+ }, onClick: this.clearTextInput }, h("ion-icon", { key: '569290d2b83d2752cfda6b5d8a84c06945b5c943', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: 'c94a79a60d5d403941dd641202125367ad490e53', name: "end" })), shouldRenderHighlight && h("div", { key: 'b4f192ac376fdb1a2b0708797cac46f07818e962', class: "input-highlight" })), this.renderBottomContent()));
432
424
  }
433
425
  get el() { return getElement(this); }
434
426
  static get watchers() { return {
package/dist/esm/ionic.js CHANGED
@@ -7,7 +7,7 @@ import { g as globalScripts } from './app-globals-49873df1.js';
7
7
  import './ionic-global-e6c98cd0.js';
8
8
 
9
9
  /*
10
- Stencil Client Patch Browser v4.15.0 | MIT Licensed | https://stenciljs.com
10
+ Stencil Client Patch Browser v4.16.0 | MIT Licensed | https://stenciljs.com
11
11
  */
12
12
  const patchBrowser = () => {
13
13
  {
@@ -0,0 +1,4 @@
1
+ import{__awaiter,__generator,__spreadArray}from"tslib";
2
+ /*!
3
+ * (C) Ionic http://ionicframework.com - MIT License
4
+ */import{w as win,d as doc}from"./index-a5d50daf.js";import{g as getScrollElement,c as scrollByPoint,f as findClosestIonContent}from"./index-5cc724f3.js";import{a as addEventListener,b as removeEventListener,r as raf,c as componentOnReady}from"./helpers-da915de8.js";import{a as KeyboardResize,K as Keyboard}from"./keyboard-73175e24.js";import"./index-9b0d46f4.js";import"./capacitor-59395cbd.js";var cloneMap=new WeakMap;var relocateInput=function(r,n,e,t,i){if(t===void 0){t=0}if(i===void 0){i=false}if(cloneMap.has(r)===e){return}if(e){addClone(r,n,t,i)}else{removeClone(r,n)}};var isFocused=function(r){return r===r.getRootNode().activeElement};var addClone=function(r,n,e,t){if(t===void 0){t=false}var i=n.parentNode;var o=n.cloneNode(false);o.classList.add("cloned-input");o.tabIndex=-1;if(t){o.disabled=true}i.appendChild(o);cloneMap.set(r,o);var a=r.ownerDocument;var u=a.dir==="rtl"?9999:-9999;r.style.pointerEvents="none";n.style.transform="translate3d(".concat(u,"px,").concat(e,"px,0) scale(0)")};var removeClone=function(r,n){var e=cloneMap.get(r);if(e){cloneMap.delete(r);e.remove()}r.style.pointerEvents="";n.style.transform=""};var SCROLL_AMOUNT_PADDING=50;var enableHideCaretOnScroll=function(r,n,e){if(!e||!n){return function(){return}}var t=function(e){if(isFocused(n)){relocateInput(r,n,e)}};var i=function(){return relocateInput(r,n,false)};var o=function(){return t(true)};var a=function(){return t(false)};addEventListener(e,"ionScrollStart",o);addEventListener(e,"ionScrollEnd",a);n.addEventListener("blur",i);return function(){removeEventListener(e,"ionScrollStart",o);removeEventListener(e,"ionScrollEnd",a);n.removeEventListener("blur",i)}};var SKIP_SELECTOR="input, textarea, [no-blur], [contenteditable]";var enableInputBlurring=function(){var r=true;var n=false;var e=document;var t=function(){n=true};var i=function(){r=true};var o=function(t){if(n){n=false;return}var i=e.activeElement;if(!i){return}if(i.matches(SKIP_SELECTOR)){return}var o=t.target;if(o===i){return}if(o.matches(SKIP_SELECTOR)||o.closest(SKIP_SELECTOR)){return}r=false;setTimeout((function(){if(!r){i.blur()}}),50)};addEventListener(e,"ionScrollStart",t);e.addEventListener("focusin",i,true);e.addEventListener("touchend",o,false);return function(){removeEventListener(e,"ionScrollStart",t,true);e.removeEventListener("focusin",i,true);e.removeEventListener("touchend",o,false)}};var SCROLL_ASSIST_SPEED=.3;var getScrollData=function(r,n,e,t){var i;var o=(i=r.closest("ion-item,[ion-item]"))!==null&&i!==void 0?i:r;return calcScrollData(o.getBoundingClientRect(),n.getBoundingClientRect(),e,t)};var calcScrollData=function(r,n,e,t){var i=r.top;var o=r.bottom;var a=n.top;var u=Math.min(n.bottom,t-e);var c=a+15;var d=u-SCROLL_AMOUNT_PADDING;var f=d-o;var l=c-i;var s=Math.round(f<0?-f:l>0?-l:0);var v=Math.min(s,i-a);var S=Math.abs(v);var _=S/SCROLL_ASSIST_SPEED;var w=Math.min(400,Math.max(150,_));return{scrollAmount:v,scrollDuration:w,scrollPadding:e,inputSafeY:-(i-c)+4}};var PADDING_TIMER_KEY="$ionPaddingTimer";var setScrollPadding=function(r,n,e){var t=r[PADDING_TIMER_KEY];if(t){clearTimeout(t)}if(n>0){r.style.setProperty("--keyboard-offset","".concat(n,"px"))}else{r[PADDING_TIMER_KEY]=setTimeout((function(){r.style.setProperty("--keyboard-offset","0px");if(e){e()}}),120)}};var setClearScrollPaddingListener=function(r,n,e){var t=function(){if(n){setScrollPadding(n,0,e)}};r.addEventListener("focusout",t,{once:true})};var currentPadding=0;var SKIP_SCROLL_ASSIST="data-ionic-skip-scroll-assist";var enableScrollAssist=function(r,n,e,t,i,o,a,u){if(u===void 0){u=false}var c=o&&(a===undefined||a.mode===KeyboardResize.None);var d=false;var f=win!==undefined?win.innerHeight:0;var l=function(i){if(d===false){d=true;return}jsSetFocus(r,n,e,t,i.detail.keyboardHeight,c,u,f,false)};var s=function(){d=false;win===null||win===void 0?void 0:win.removeEventListener("ionKeyboardDidShow",l);r.removeEventListener("focusout",s,true)};var v=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){if(n.hasAttribute(SKIP_SCROLL_ASSIST)){n.removeAttribute(SKIP_SCROLL_ASSIST);return[2]}jsSetFocus(r,n,e,t,i,c,u,f);win===null||win===void 0?void 0:win.addEventListener("ionKeyboardDidShow",l);r.addEventListener("focusout",s,true);return[2]}))}))};r.addEventListener("focusin",v,true);return function(){r.removeEventListener("focusin",v,true);win===null||win===void 0?void 0:win.removeEventListener("ionKeyboardDidShow",l);r.removeEventListener("focusout",s,true)}};var setManualFocus=function(r){if(document.activeElement===r){return}r.setAttribute(SKIP_SCROLL_ASSIST,"true");r.focus()};var jsSetFocus=function(r,n,e,t,i,o){var a=[];for(var u=6;u<arguments.length;u++){a[u-6]=arguments[u]}return __awaiter(void 0,__spreadArray([r,n,e,t,i,o],a,true),void 0,(function(r,n,e,t,i,o,a,u,c){var d,f,l,s,v,S;if(a===void 0){a=false}if(u===void 0){u=0}if(c===void 0){c=true}return __generator(this,(function(_){switch(_.label){case 0:if(!e&&!t){return[2]}d=getScrollData(r,e||t,i,u);if(e&&Math.abs(d.scrollAmount)<4){setManualFocus(n);if(o&&e!==null){setScrollPadding(e,currentPadding);setClearScrollPaddingListener(n,e,(function(){return currentPadding=0}))}return[2]}relocateInput(r,n,true,d.inputSafeY,a);setManualFocus(n);raf((function(){return r.click()}));if(o&&e){currentPadding=d.scrollPadding;setScrollPadding(e,currentPadding)}if(!(typeof window!=="undefined"))return[3,3];l=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(f!==undefined){clearTimeout(f)}window.removeEventListener("ionKeyboardDidShow",s);window.removeEventListener("ionKeyboardDidShow",l);if(!e)return[3,2];return[4,scrollByPoint(e,0,d.scrollAmount,d.scrollDuration)];case 1:t.sent();t.label=2;case 2:relocateInput(r,n,false,d.inputSafeY);setManualFocus(n);if(o){setClearScrollPaddingListener(n,e,(function(){return currentPadding=0}))}return[2]}}))}))};s=function(){window.removeEventListener("ionKeyboardDidShow",s);window.addEventListener("ionKeyboardDidShow",l)};if(!e)return[3,2];return[4,getScrollElement(e)];case 1:v=_.sent();S=v.scrollHeight-v.clientHeight;if(c&&d.scrollAmount>S-v.scrollTop){if(n.type==="password"){d.scrollAmount+=SCROLL_AMOUNT_PADDING;window.addEventListener("ionKeyboardDidShow",s)}else{window.addEventListener("ionKeyboardDidShow",l)}f=setTimeout(l,1e3);return[2]}_.label=2;case 2:l();_.label=3;case 3:return[2]}}))}))};var INPUT_BLURRING=true;var startInputShims=function(r,n){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,o,a,u,c,d,f,l,s,v,S,_,w,p;return __generator(this,(function(I){switch(I.label){case 0:if(doc===undefined){return[2]}e=n==="ios";t=n==="android";i=r.getNumber("keyboardHeight",290);o=r.getBoolean("scrollAssist",true);a=r.getBoolean("hideCaretOnScroll",e);u=r.getBoolean("inputBlurring",false);c=r.getBoolean("scrollPadding",true);d=Array.from(doc.querySelectorAll("ion-input, ion-textarea"));f=new WeakMap;l=new WeakMap;return[4,Keyboard.getResizeMode()];case 1:s=I.sent();v=function(r){return __awaiter(void 0,void 0,void 0,(function(){var n,e,u,d,v,S,v;return __generator(this,(function(_){switch(_.label){case 0:return[4,new Promise((function(n){return componentOnReady(r,n)}))];case 1:_.sent();n=r.shadowRoot||r;e=n.querySelector("input")||n.querySelector("textarea");u=findClosestIonContent(r);d=!u?r.closest("ion-footer"):null;if(!e){return[2]}if(!!u&&a&&!f.has(r)){v=enableHideCaretOnScroll(r,e,u);f.set(r,v)}S=e.type==="date"||e.type==="datetime-local";if(!S&&(!!u||!!d)&&o&&!l.has(r)){v=enableScrollAssist(r,e,u,d,i,c,s,t);l.set(r,v)}return[2]}}))}))};S=function(r){if(a){var n=f.get(r);if(n){n()}f.delete(r)}if(o){var n=l.get(r);if(n){n()}l.delete(r)}};if(u&&INPUT_BLURRING){enableInputBlurring()}for(_=0,w=d;_<w.length;_++){p=w[_];v(p)}doc.addEventListener("ionInputDidLoad",(function(r){v(r.detail)}));doc.addEventListener("ionInputDidUnload",(function(r){S(r.detail)}));return[2]}}))}))};export{startInputShims};