@ionic/core 8.5.7-dev.11747865624.1ff4bb55 → 8.5.7-dev.11748379940.12698faf

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 (30) hide show
  1. package/components/input-shims.js +23 -0
  2. package/components/ion-input-otp.js +45 -28
  3. package/components/ion-input.js +2 -10
  4. package/dist/cjs/{input-shims-DGvxKeWy.js → input-shims-CQQtxW4l.js} +23 -0
  5. package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
  6. package/dist/cjs/ion-input-otp.cjs.entry.js +45 -28
  7. package/dist/cjs/ion-input.cjs.entry.js +2 -10
  8. package/dist/collection/components/input/input.js +2 -10
  9. package/dist/collection/components/input-otp/input-otp.ios.css +4 -0
  10. package/dist/collection/components/input-otp/input-otp.js +44 -27
  11. package/dist/collection/components/input-otp/input-otp.md.css +4 -0
  12. package/dist/collection/utils/input-shims/hacks/scroll-assist.js +23 -0
  13. package/dist/docs.json +2 -2
  14. package/dist/esm/{input-shims-qlIPzMSm.js → input-shims-Km36_5AQ.js} +23 -0
  15. package/dist/esm/ion-app_8.entry.js +1 -1
  16. package/dist/esm/ion-input-otp.entry.js +45 -28
  17. package/dist/esm/ion-input.entry.js +2 -10
  18. package/dist/ionic/ionic.esm.js +1 -1
  19. package/dist/ionic/p-702c7264.entry.js +4 -0
  20. package/dist/ionic/p-BcSCNsNs.js +4 -0
  21. package/dist/ionic/{p-832b6c90.entry.js → p-b9fc80d5.entry.js} +1 -1
  22. package/dist/ionic/p-d7a74bde.entry.js +4 -0
  23. package/dist/types/components/input-otp/input-otp.d.ts +3 -1
  24. package/dist/types/components.d.ts +1 -1
  25. package/hydrate/index.js +46 -38
  26. package/hydrate/index.mjs +46 -38
  27. package/package.json +1 -1
  28. package/dist/ionic/p-178084cb.entry.js +0 -4
  29. package/dist/ionic/p-6805748f.entry.js +0 -4
  30. package/dist/ionic/p-DjV8cNim.js +0 -4
@@ -485,22 +485,14 @@ export class Input {
485
485
  'in-item': inItem,
486
486
  'in-item-color': hostContext('ion-item.ion-color', this.el),
487
487
  'input-disabled': disabled,
488
- }) }, h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '367d1a1c2eb69d4887fe29ab96ead3230d7dd513', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
488
+ }) }, h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '78b3470646ec4fc237d33229a132164b089538a2', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
489
489
  /**
490
490
  * This prevents mobile browsers from
491
491
  * blurring the input when the clear
492
492
  * button is activated.
493
493
  */
494
494
  ev.preventDefault();
495
- }, onFocusin: (ev) => {
496
- /**
497
- * Prevent the focusin event from bubbling otherwise it will cause the focusin
498
- * event listener in scroll assist to fire. When this fires, focus will be moved
499
- * back to the input even if the clear button was never tapped. This poses issues
500
- * for screen readers as it means users would be unable to swipe past the clear button.
501
- */
502
- ev.stopPropagation();
503
- }, onClick: this.clearTextInput }, h("ion-icon", { key: '69afc5c7ea6bfa1bff301635281b536e84277965', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '6f770a0ab703b4d19e936a0e1955274bc9f3e941', name: "end" })), shouldRenderHighlight && h("div", { key: 'a048e240432c4d5e11b2c92fa99a0cff07f9a778', class: "input-highlight" })), this.renderBottomContent()));
495
+ }, onClick: this.clearTextInput }, h("ion-icon", { key: '686ca853cf0e074ab32d01c077f066b5b4ab2dad', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '354e0bde7c7066a3ce31f852923e334859fedb78', name: "end" })), shouldRenderHighlight && h("div", { key: '5fa78de0aee8883506ccdbdf1c834a3fa8503c87', class: "input-highlight" })), this.renderBottomContent()));
504
496
  }
505
497
  static get is() { return "ion-input"; }
506
498
  static get encapsulation() { return "scoped"; }
@@ -167,6 +167,10 @@
167
167
  text-align: center;
168
168
  }
169
169
 
170
+ .input-otp-description-hidden {
171
+ display: none;
172
+ }
173
+
170
174
  .input-otp-separator {
171
175
  border-radius: var(--separator-border-radius);
172
176
  flex-shrink: 0;
@@ -2,12 +2,14 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { Fragment, Host, h } from "@stencil/core";
5
+ import { inheritAriaAttributes } from "../../utils/helpers";
5
6
  import { printIonWarning } from "../../utils/logging/index";
6
7
  import { isRTL } from "../../utils/rtl/index";
7
8
  import { createColorClasses } from "../../utils/theme";
8
9
  import { getIonMode } from "../../global/ionic-global";
9
10
  export class InputOTP {
10
11
  constructor() {
12
+ this.inheritedAttributes = {};
11
13
  this.inputRefs = [];
12
14
  this.inputId = `ion-input-otp-${inputIds++}`;
13
15
  this.parsedSeparators = [];
@@ -196,21 +198,19 @@ export class InputOTP {
196
198
  .split('')
197
199
  .filter((char) => validKeyPattern.test(char))
198
200
  .slice(0, length);
199
- // Find the first empty input
200
- const startIndex = this.getFirstEmptyIndex();
201
- // If all boxes are filled, start at 0
202
- const pasteStart = startIndex === -1 ? 0 : startIndex;
201
+ // Always paste starting at the first box
203
202
  validChars.forEach((char, index) => {
204
- const targetIndex = pasteStart + index;
205
- if (targetIndex < length) {
206
- this.inputRefs[targetIndex].value = char;
207
- this.inputValues[targetIndex] = char;
203
+ if (index < length) {
204
+ this.inputRefs[index].value = char;
205
+ this.inputValues[index] = char;
208
206
  }
209
207
  });
208
+ // Update the value so that all input boxes are updated
209
+ this.value = validChars.join('');
210
210
  this.updateValue(event);
211
211
  // Focus the next empty input after pasting
212
212
  // If all boxes are filled, focus the last input
213
- const nextEmptyIndex = pasteStart + validChars.length;
213
+ const nextEmptyIndex = validChars.length;
214
214
  if (nextEmptyIndex < length) {
215
215
  (_b = inputRefs[nextEmptyIndex]) === null || _b === void 0 ? void 0 : _b.focus();
216
216
  }
@@ -329,9 +329,13 @@ export class InputOTP {
329
329
  this.parsedSeparators = separatorValues.filter((pos) => pos <= length);
330
330
  }
331
331
  componentWillLoad() {
332
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
332
333
  this.processSeparators();
333
334
  this.initializeValues();
334
335
  }
336
+ componentDidLoad() {
337
+ this.updateTabIndexes();
338
+ }
335
339
  /**
336
340
  * Initializes the input values array based on the current value prop.
337
341
  * This splits the value into individual characters and validates them against
@@ -339,22 +343,27 @@ export class InputOTP {
339
343
  * input boxes and the value of the input group is updated.
340
344
  */
341
345
  initializeValues() {
342
- if (this.value != null && String(this.value).length > 0) {
343
- const chars = String(this.value).split('').slice(0, this.length);
344
- chars.forEach((char, index) => {
345
- if (this.validKeyPattern.test(char)) {
346
- this.inputValues[index] = char;
347
- }
348
- });
349
- // Update the value without emitting events
350
- this.value = this.inputValues.join('');
346
+ // Clear all input values
347
+ this.inputValues = Array(this.length).fill('');
348
+ // If the value is null, undefined, or an empty string, return
349
+ if (this.value == null || String(this.value).length === 0) {
350
+ return;
351
351
  }
352
+ // Split the value into individual characters and validate
353
+ // them against the allowed pattern
354
+ const chars = String(this.value).split('').slice(0, this.length);
355
+ chars.forEach((char, index) => {
356
+ if (this.validKeyPattern.test(char)) {
357
+ this.inputValues[index] = char;
358
+ }
359
+ });
360
+ // Update the value without emitting events
361
+ this.value = this.inputValues.join('');
352
362
  }
353
363
  /**
354
- * Resets the input values and focus state.
364
+ * Resets the value and focus state.
355
365
  */
356
366
  async reset() {
357
- this.inputValues = Array(this.length).fill('');
358
367
  this.value = '';
359
368
  this.focusedValue = null;
360
369
  this.hasFocus = false;
@@ -429,6 +438,7 @@ export class InputOTP {
429
438
  if (newValue.length === length) {
430
439
  this.ionComplete.emit({ value: newValue });
431
440
  }
441
+ this.updateTabIndexes();
432
442
  }
433
443
  /**
434
444
  * Emits an `ionChange` event.
@@ -495,12 +505,14 @@ export class InputOTP {
495
505
  break;
496
506
  }
497
507
  }
498
- // Update tabIndex for all inputs
508
+ // Update tabIndex and aria-hidden for all inputs
499
509
  inputRefs.forEach((input, index) => {
500
- // If all boxes are filled, make the last box tabbable
501
- // Otherwise, make the first empty box tabbable
502
510
  const shouldBeTabbable = firstEmptyIndex === -1 ? index === length - 1 : firstEmptyIndex === index;
503
511
  input.tabIndex = shouldBeTabbable ? 0 : -1;
512
+ // If the input is empty and not the first empty input,
513
+ // it should be hidden from screen readers.
514
+ const isEmpty = !inputValues[index] || inputValues[index] === '';
515
+ input.setAttribute('aria-hidden', isEmpty && !shouldBeTabbable ? 'true' : 'false');
504
516
  });
505
517
  }
506
518
  /**
@@ -527,12 +539,14 @@ export class InputOTP {
527
539
  return firstEmptyIndex === -1 ? length - 1 : firstEmptyIndex;
528
540
  }
529
541
  render() {
530
- const { autocapitalize, color, disabled, fill, hasFocus, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
542
+ var _a, _b;
543
+ const { autocapitalize, color, disabled, el, fill, hasFocus, inheritedAttributes, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
531
544
  const mode = getIonMode(this);
532
545
  const inputmode = this.getInputmode();
533
546
  const tabbableIndex = this.getTabbableIndex();
534
547
  const pattern = this.getPattern();
535
- return (h(Host, { key: '884f6a95d40a90eab486cd17bc3e34ee474fd7aa', class: createColorClasses(color, {
548
+ const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
549
+ return (h(Host, { key: '973743fa99d77dbdaaf9b630b64180a189b5d778', class: createColorClasses(color, {
536
550
  [mode]: true,
537
551
  'has-focus': hasFocus,
538
552
  [`input-otp-size-${size}`]: true,
@@ -540,7 +554,10 @@ export class InputOTP {
540
554
  [`input-otp-fill-${fill}`]: true,
541
555
  'input-otp-disabled': disabled,
542
556
  'input-otp-readonly': readonly,
543
- }) }, h("div", { key: 'eb7ed18905b9c3c9ffa2b6f2866b459a509c6191', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: index === 0 ? 'one-time-code' : 'off', ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '796d62711429899348c3e6b8583167113cd610f3', class: "input-otp-description" }, h("slot", { key: '30f1b8fedb63d8e3ed7b96139be218ee4584f73b' }))));
557
+ }) }, h("div", Object.assign({ key: '3891cbdc07d4fa017ea04590bbb6225ab68deff2', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: index === 0 ? 'one-time-code' : 'off', ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '0d3cfa8c081552d0c52a544a1c52c0e3d5d4f532', class: {
558
+ 'input-otp-description': true,
559
+ 'input-otp-description-hidden': !hasDescription,
560
+ } }, h("slot", { key: '13c3f795956749ccdf396bfb0ff882a9c9e9ce81' }))));
544
561
  }
545
562
  static get is() { return "ion-input-otp"; }
546
563
  static get encapsulation() { return "scoped"; }
@@ -949,7 +966,7 @@ export class InputOTP {
949
966
  "return": "Promise<void>"
950
967
  },
951
968
  "docs": {
952
- "text": "Resets the input values and focus state.",
969
+ "text": "Resets the value and focus state.",
953
970
  "tags": []
954
971
  }
955
972
  },
@@ -167,6 +167,10 @@
167
167
  text-align: center;
168
168
  }
169
169
 
170
+ .input-otp-description-hidden {
171
+ display: none;
172
+ }
173
+
170
174
  .input-otp-separator {
171
175
  border-radius: var(--separator-border-radius);
172
176
  flex-shrink: 0;
@@ -130,6 +130,7 @@ export const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, ke
130
130
  * focus an input but not have scroll assist run again.
131
131
  */
132
132
  const setManualFocus = (el) => {
133
+ var _a;
133
134
  /**
134
135
  * If element is already focused then
135
136
  * a new focusin event will not be dispatched
@@ -138,6 +139,28 @@ const setManualFocus = (el) => {
138
139
  if (document.activeElement === el) {
139
140
  return;
140
141
  }
142
+ /**
143
+ * Optimization for scenarios where the currently focused element is a sibling
144
+ * of the target element. In such cases, we avoid setting `SKIP_SCROLL_ASSIST`.
145
+ *
146
+ * This is crucial for accessibility: input elements can now contain focusable
147
+ * siblings (e.g., clear buttons, slotted elements). If we didn't skip setting
148
+ * the attribute here, screen readers would be unable to navigate to and interact
149
+ * with these sibling elements.
150
+ *
151
+ * Without this check, we would need to call `ev.stopPropagation()` on the
152
+ * 'focusin' event of each focusable sibling to prevent the scroll assist
153
+ * listener from incorrectly moving focus back to the input. That approach
154
+ * would be less maintainable and more error-prone.
155
+ */
156
+ const inputId = el.getAttribute('id');
157
+ const label = el.closest(`label[for="${inputId}"]`);
158
+ const activeElLabel = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest(`label[for="${inputId}"]`);
159
+ if (label !== null && label === activeElLabel) {
160
+ // If the label is the same as the active element label, then
161
+ // we don't need to set the `SKIP_SCROLL_ASSIST` and reset focus.
162
+ return;
163
+ }
141
164
  el.setAttribute(SKIP_SCROLL_ASSIST, 'true');
142
165
  el.focus();
143
166
  };
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-05-21T22:15:29",
2
+ "timestamp": "2025-05-27T21:07:25",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.29.3",
@@ -13530,7 +13530,7 @@
13530
13530
  },
13531
13531
  "signature": "reset() => Promise<void>",
13532
13532
  "parameters": [],
13533
- "docs": "Resets the input values and focus state.",
13533
+ "docs": "Resets the value and focus state.",
13534
13534
  "docsTags": []
13535
13535
  },
13536
13536
  {
@@ -372,6 +372,7 @@ const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardH
372
372
  * focus an input but not have scroll assist run again.
373
373
  */
374
374
  const setManualFocus = (el) => {
375
+ var _a;
375
376
  /**
376
377
  * If element is already focused then
377
378
  * a new focusin event will not be dispatched
@@ -380,6 +381,28 @@ const setManualFocus = (el) => {
380
381
  if (document.activeElement === el) {
381
382
  return;
382
383
  }
384
+ /**
385
+ * Optimization for scenarios where the currently focused element is a sibling
386
+ * of the target element. In such cases, we avoid setting `SKIP_SCROLL_ASSIST`.
387
+ *
388
+ * This is crucial for accessibility: input elements can now contain focusable
389
+ * siblings (e.g., clear buttons, slotted elements). If we didn't skip setting
390
+ * the attribute here, screen readers would be unable to navigate to and interact
391
+ * with these sibling elements.
392
+ *
393
+ * Without this check, we would need to call `ev.stopPropagation()` on the
394
+ * 'focusin' event of each focusable sibling to prevent the scroll assist
395
+ * listener from incorrectly moving focus back to the input. That approach
396
+ * would be less maintainable and more error-prone.
397
+ */
398
+ const inputId = el.getAttribute('id');
399
+ const label = el.closest(`label[for="${inputId}"]`);
400
+ const activeElLabel = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest(`label[for="${inputId}"]`);
401
+ if (label !== null && label === activeElLabel) {
402
+ // If the label is the same as the active element label, then
403
+ // we don't need to set the `SKIP_SCROLL_ASSIST` and reset focus.
404
+ return;
405
+ }
383
406
  el.setAttribute(SKIP_SCROLL_ASSIST, 'true');
384
407
  el.focus();
385
408
  };
@@ -40,7 +40,7 @@ const App = class {
40
40
  * platforms proceed into this block.
41
41
  */
42
42
  const platform = isPlatform(window, 'ios') ? 'ios' : 'android';
43
- import('./input-shims-qlIPzMSm.js').then((module) => module.startInputShims(config, platform));
43
+ import('./input-shims-Km36_5AQ.js').then((module) => module.startInputShims(config, platform));
44
44
  }
45
45
  const hardwareBackButtonModule = await import('./hardware-back-button-pnZ0X1YR.js');
46
46
  const supportsHardwareBackButtonEvents = isHybrid || shouldUseCloseWatcher();
@@ -2,14 +2,15 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, c as createEvent, h, F as Fragment, d as Host, g as getElement } from './index-3GtB1kQI.js';
5
+ import { i as inheritAriaAttributes } from './helpers-CzIihwFO.js';
5
6
  import { p as printIonWarning } from './index-CEo1SqXS.js';
6
7
  import { i as isRTL } from './dir-C53feagD.js';
7
8
  import { c as createColorClasses } from './theme-DiVJyqlX.js';
8
9
  import { b as getIonMode } from './ionic-global-Dw-MNnQB.js';
9
10
 
10
- const inputOtpIosCss = ".sc-ion-input-otp-ios-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-ios{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-ios{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-ios{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-separator.sc-ion-input-otp-ios{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-ios-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:8px}.input-otp-size-medium.sc-ion-input-otp-ios-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-ios-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios,.input-otp-size-large.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:12px}.input-otp-shape-round.sc-ion-input-otp-ios-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-ios-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-ios-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-ios-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-disabled.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-ios-h,.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-ios-h{--border-width:0.55px}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-width:1px}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))))}";
11
+ const inputOtpIosCss = ".sc-ion-input-otp-ios-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-ios{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-ios{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-ios{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-ios{display:none}.input-otp-separator.sc-ion-input-otp-ios{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-ios-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:8px}.input-otp-size-medium.sc-ion-input-otp-ios-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-ios-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios,.input-otp-size-large.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:12px}.input-otp-shape-round.sc-ion-input-otp-ios-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-ios-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-ios-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-ios-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-disabled.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-ios-h,.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-ios-h{--border-width:0.55px}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-width:1px}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))))}";
11
12
 
12
- const inputOtpMdCss = ".sc-ion-input-otp-md-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-md{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-md{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-md{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-separator.sc-ion-input-otp-md{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-md-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:8px}.input-otp-size-medium.sc-ion-input-otp-md-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-md-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md,.input-otp-size-large.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:12px}.input-otp-shape-round.sc-ion-input-otp-md-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-md-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-md-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-md-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-md-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-disabled.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-md-h,.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-md-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-md-h{--border-width:1px}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-width:2px}.input-otp-fill-outline.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3))}";
13
+ const inputOtpMdCss = ".sc-ion-input-otp-md-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-md{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-md{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-md{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-md{display:none}.input-otp-separator.sc-ion-input-otp-md{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-md-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:8px}.input-otp-size-medium.sc-ion-input-otp-md-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-md-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md,.input-otp-size-large.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:12px}.input-otp-shape-round.sc-ion-input-otp-md-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-md-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-md-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-md-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-md-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-disabled.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-md-h,.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-md-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-md-h{--border-width:1px}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-width:2px}.input-otp-fill-outline.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3))}";
13
14
 
14
15
  const InputOTP = class {
15
16
  constructor(hostRef) {
@@ -19,6 +20,7 @@ const InputOTP = class {
19
20
  this.ionComplete = createEvent(this, "ionComplete", 7);
20
21
  this.ionBlur = createEvent(this, "ionBlur", 7);
21
22
  this.ionFocus = createEvent(this, "ionFocus", 7);
23
+ this.inheritedAttributes = {};
22
24
  this.inputRefs = [];
23
25
  this.inputId = `ion-input-otp-${inputIds++}`;
24
26
  this.parsedSeparators = [];
@@ -207,21 +209,19 @@ const InputOTP = class {
207
209
  .split('')
208
210
  .filter((char) => validKeyPattern.test(char))
209
211
  .slice(0, length);
210
- // Find the first empty input
211
- const startIndex = this.getFirstEmptyIndex();
212
- // If all boxes are filled, start at 0
213
- const pasteStart = startIndex === -1 ? 0 : startIndex;
212
+ // Always paste starting at the first box
214
213
  validChars.forEach((char, index) => {
215
- const targetIndex = pasteStart + index;
216
- if (targetIndex < length) {
217
- this.inputRefs[targetIndex].value = char;
218
- this.inputValues[targetIndex] = char;
214
+ if (index < length) {
215
+ this.inputRefs[index].value = char;
216
+ this.inputValues[index] = char;
219
217
  }
220
218
  });
219
+ // Update the value so that all input boxes are updated
220
+ this.value = validChars.join('');
221
221
  this.updateValue(event);
222
222
  // Focus the next empty input after pasting
223
223
  // If all boxes are filled, focus the last input
224
- const nextEmptyIndex = pasteStart + validChars.length;
224
+ const nextEmptyIndex = validChars.length;
225
225
  if (nextEmptyIndex < length) {
226
226
  (_b = inputRefs[nextEmptyIndex]) === null || _b === void 0 ? void 0 : _b.focus();
227
227
  }
@@ -340,9 +340,13 @@ const InputOTP = class {
340
340
  this.parsedSeparators = separatorValues.filter((pos) => pos <= length);
341
341
  }
342
342
  componentWillLoad() {
343
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
343
344
  this.processSeparators();
344
345
  this.initializeValues();
345
346
  }
347
+ componentDidLoad() {
348
+ this.updateTabIndexes();
349
+ }
346
350
  /**
347
351
  * Initializes the input values array based on the current value prop.
348
352
  * This splits the value into individual characters and validates them against
@@ -350,22 +354,27 @@ const InputOTP = class {
350
354
  * input boxes and the value of the input group is updated.
351
355
  */
352
356
  initializeValues() {
353
- if (this.value != null && String(this.value).length > 0) {
354
- const chars = String(this.value).split('').slice(0, this.length);
355
- chars.forEach((char, index) => {
356
- if (this.validKeyPattern.test(char)) {
357
- this.inputValues[index] = char;
358
- }
359
- });
360
- // Update the value without emitting events
361
- this.value = this.inputValues.join('');
357
+ // Clear all input values
358
+ this.inputValues = Array(this.length).fill('');
359
+ // If the value is null, undefined, or an empty string, return
360
+ if (this.value == null || String(this.value).length === 0) {
361
+ return;
362
362
  }
363
+ // Split the value into individual characters and validate
364
+ // them against the allowed pattern
365
+ const chars = String(this.value).split('').slice(0, this.length);
366
+ chars.forEach((char, index) => {
367
+ if (this.validKeyPattern.test(char)) {
368
+ this.inputValues[index] = char;
369
+ }
370
+ });
371
+ // Update the value without emitting events
372
+ this.value = this.inputValues.join('');
363
373
  }
364
374
  /**
365
- * Resets the input values and focus state.
375
+ * Resets the value and focus state.
366
376
  */
367
377
  async reset() {
368
- this.inputValues = Array(this.length).fill('');
369
378
  this.value = '';
370
379
  this.focusedValue = null;
371
380
  this.hasFocus = false;
@@ -440,6 +449,7 @@ const InputOTP = class {
440
449
  if (newValue.length === length) {
441
450
  this.ionComplete.emit({ value: newValue });
442
451
  }
452
+ this.updateTabIndexes();
443
453
  }
444
454
  /**
445
455
  * Emits an `ionChange` event.
@@ -506,12 +516,14 @@ const InputOTP = class {
506
516
  break;
507
517
  }
508
518
  }
509
- // Update tabIndex for all inputs
519
+ // Update tabIndex and aria-hidden for all inputs
510
520
  inputRefs.forEach((input, index) => {
511
- // If all boxes are filled, make the last box tabbable
512
- // Otherwise, make the first empty box tabbable
513
521
  const shouldBeTabbable = firstEmptyIndex === -1 ? index === length - 1 : firstEmptyIndex === index;
514
522
  input.tabIndex = shouldBeTabbable ? 0 : -1;
523
+ // If the input is empty and not the first empty input,
524
+ // it should be hidden from screen readers.
525
+ const isEmpty = !inputValues[index] || inputValues[index] === '';
526
+ input.setAttribute('aria-hidden', isEmpty && !shouldBeTabbable ? 'true' : 'false');
515
527
  });
516
528
  }
517
529
  /**
@@ -538,12 +550,14 @@ const InputOTP = class {
538
550
  return firstEmptyIndex === -1 ? length - 1 : firstEmptyIndex;
539
551
  }
540
552
  render() {
541
- const { autocapitalize, color, disabled, fill, hasFocus, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
553
+ var _a, _b;
554
+ const { autocapitalize, color, disabled, el, fill, hasFocus, inheritedAttributes, inputId, inputRefs, inputValues, length, readonly, shape, size, } = this;
542
555
  const mode = getIonMode(this);
543
556
  const inputmode = this.getInputmode();
544
557
  const tabbableIndex = this.getTabbableIndex();
545
558
  const pattern = this.getPattern();
546
- return (h(Host, { key: '884f6a95d40a90eab486cd17bc3e34ee474fd7aa', class: createColorClasses(color, {
559
+ const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
560
+ return (h(Host, { key: '973743fa99d77dbdaaf9b630b64180a189b5d778', class: createColorClasses(color, {
547
561
  [mode]: true,
548
562
  'has-focus': hasFocus,
549
563
  [`input-otp-size-${size}`]: true,
@@ -551,7 +565,10 @@ const InputOTP = class {
551
565
  [`input-otp-fill-${fill}`]: true,
552
566
  'input-otp-disabled': disabled,
553
567
  'input-otp-readonly': readonly,
554
- }) }, h("div", { key: 'eb7ed18905b9c3c9ffa2b6f2866b459a509c6191', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: index === 0 ? 'one-time-code' : 'off', ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '796d62711429899348c3e6b8583167113cd610f3', class: "input-otp-description" }, h("slot", { key: '30f1b8fedb63d8e3ed7b96139be218ee4584f73b' }))));
568
+ }) }, h("div", Object.assign({ key: '3891cbdc07d4fa017ea04590bbb6225ab68deff2', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: index === 0 ? 'one-time-code' : 'off', ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '0d3cfa8c081552d0c52a544a1c52c0e3d5d4f532', class: {
569
+ 'input-otp-description': true,
570
+ 'input-otp-description-hidden': !hasDescription,
571
+ } }, h("slot", { key: '13c3f795956749ccdf396bfb0ff882a9c9e9ce81' }))));
555
572
  }
556
573
  get el() { return getElement(this); }
557
574
  static get watchers() { return {
@@ -489,22 +489,14 @@ const Input = class {
489
489
  'in-item': inItem,
490
490
  'in-item-color': hostContext('ion-item.ion-color', this.el),
491
491
  'input-disabled': disabled,
492
- }) }, h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '367d1a1c2eb69d4887fe29ab96ead3230d7dd513', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
492
+ }) }, h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '78b3470646ec4fc237d33229a132164b089538a2', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
493
493
  /**
494
494
  * This prevents mobile browsers from
495
495
  * blurring the input when the clear
496
496
  * button is activated.
497
497
  */
498
498
  ev.preventDefault();
499
- }, onFocusin: (ev) => {
500
- /**
501
- * Prevent the focusin event from bubbling otherwise it will cause the focusin
502
- * event listener in scroll assist to fire. When this fires, focus will be moved
503
- * back to the input even if the clear button was never tapped. This poses issues
504
- * for screen readers as it means users would be unable to swipe past the clear button.
505
- */
506
- ev.stopPropagation();
507
- }, onClick: this.clearTextInput }, h("ion-icon", { key: '69afc5c7ea6bfa1bff301635281b536e84277965', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '6f770a0ab703b4d19e936a0e1955274bc9f3e941', name: "end" })), shouldRenderHighlight && h("div", { key: 'a048e240432c4d5e11b2c92fa99a0cff07f9a778', class: "input-highlight" })), this.renderBottomContent()));
499
+ }, onClick: this.clearTextInput }, h("ion-icon", { key: '686ca853cf0e074ab32d01c077f066b5b4ab2dad', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '354e0bde7c7066a3ce31f852923e334859fedb78', name: "end" })), shouldRenderHighlight && h("div", { key: '5fa78de0aee8883506ccdbdf1c834a3fa8503c87', class: "input-highlight" })), this.renderBottomContent()));
508
500
  }
509
501
  get el() { return getElement(this); }
510
502
  static get watchers() { return {