@coreui/vue-pro 5.15.0 → 5.17.0

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 (89) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/autocomplete/CAutocomplete.js +17 -16
  3. package/dist/cjs/components/autocomplete/CAutocomplete.js.map +1 -1
  4. package/dist/cjs/components/calendar/CCalendar.js +6 -0
  5. package/dist/cjs/components/calendar/CCalendar.js.map +1 -1
  6. package/dist/cjs/components/dropdown/CDropdown.d.ts +32 -7
  7. package/dist/cjs/components/dropdown/CDropdown.js +47 -18
  8. package/dist/cjs/components/dropdown/CDropdown.js.map +1 -1
  9. package/dist/cjs/components/dropdown/CDropdownToggle.d.ts +19 -0
  10. package/dist/cjs/components/dropdown/CDropdownToggle.js +10 -1
  11. package/dist/cjs/components/dropdown/CDropdownToggle.js.map +1 -1
  12. package/dist/cjs/components/dropdown/utils.d.ts +2 -0
  13. package/dist/cjs/components/dropdown/utils.js +13 -0
  14. package/dist/cjs/components/dropdown/utils.js.map +1 -1
  15. package/dist/cjs/components/index.d.ts +1 -0
  16. package/dist/cjs/components/index.js +4 -0
  17. package/dist/cjs/components/index.js.map +1 -1
  18. package/dist/cjs/components/nav/CNavItem.d.ts +2 -2
  19. package/dist/cjs/components/one-time-password-input/COneTimePassword.d.ts +278 -0
  20. package/dist/cjs/components/one-time-password-input/COneTimePassword.js +393 -0
  21. package/dist/cjs/components/one-time-password-input/COneTimePassword.js.map +1 -0
  22. package/dist/cjs/components/one-time-password-input/COneTimePasswordInput.d.ts +4 -0
  23. package/dist/cjs/components/one-time-password-input/COneTimePasswordInput.js +19 -0
  24. package/dist/cjs/components/one-time-password-input/COneTimePasswordInput.js.map +1 -0
  25. package/dist/cjs/components/one-time-password-input/index.d.ts +3 -0
  26. package/dist/cjs/components/one-time-password-input/utils.d.ts +2 -0
  27. package/dist/cjs/components/one-time-password-input/utils.js +18 -0
  28. package/dist/cjs/components/one-time-password-input/utils.js.map +1 -0
  29. package/dist/cjs/components/stepper/CStepper.d.ts +1 -1
  30. package/dist/cjs/components/time-picker/CTimePicker.d.ts +44 -0
  31. package/dist/cjs/components/time-picker/CTimePicker.js +63 -7
  32. package/dist/cjs/components/time-picker/CTimePicker.js.map +1 -1
  33. package/dist/cjs/components/time-picker/CTimePickerRollCol.d.ts +19 -7
  34. package/dist/cjs/components/time-picker/CTimePickerRollCol.js +80 -8
  35. package/dist/cjs/components/time-picker/CTimePickerRollCol.js.map +1 -1
  36. package/dist/cjs/index.js +4 -0
  37. package/dist/cjs/index.js.map +1 -1
  38. package/dist/esm/components/autocomplete/CAutocomplete.js +17 -16
  39. package/dist/esm/components/autocomplete/CAutocomplete.js.map +1 -1
  40. package/dist/esm/components/calendar/CCalendar.js +6 -0
  41. package/dist/esm/components/calendar/CCalendar.js.map +1 -1
  42. package/dist/esm/components/dropdown/CDropdown.d.ts +32 -7
  43. package/dist/esm/components/dropdown/CDropdown.js +49 -20
  44. package/dist/esm/components/dropdown/CDropdown.js.map +1 -1
  45. package/dist/esm/components/dropdown/CDropdownToggle.d.ts +19 -0
  46. package/dist/esm/components/dropdown/CDropdownToggle.js +10 -1
  47. package/dist/esm/components/dropdown/CDropdownToggle.js.map +1 -1
  48. package/dist/esm/components/dropdown/utils.d.ts +2 -0
  49. package/dist/esm/components/dropdown/utils.js +13 -1
  50. package/dist/esm/components/dropdown/utils.js.map +1 -1
  51. package/dist/esm/components/index.d.ts +1 -0
  52. package/dist/esm/components/index.js +2 -0
  53. package/dist/esm/components/index.js.map +1 -1
  54. package/dist/esm/components/nav/CNavItem.d.ts +2 -2
  55. package/dist/esm/components/one-time-password-input/COneTimePassword.d.ts +278 -0
  56. package/dist/esm/components/one-time-password-input/COneTimePassword.js +391 -0
  57. package/dist/esm/components/one-time-password-input/COneTimePassword.js.map +1 -0
  58. package/dist/esm/components/one-time-password-input/COneTimePasswordInput.d.ts +4 -0
  59. package/dist/esm/components/one-time-password-input/COneTimePasswordInput.js +17 -0
  60. package/dist/esm/components/one-time-password-input/COneTimePasswordInput.js.map +1 -0
  61. package/dist/esm/components/one-time-password-input/index.d.ts +3 -0
  62. package/dist/esm/components/one-time-password-input/utils.d.ts +2 -0
  63. package/dist/esm/components/one-time-password-input/utils.js +15 -0
  64. package/dist/esm/components/one-time-password-input/utils.js.map +1 -0
  65. package/dist/esm/components/stepper/CStepper.d.ts +1 -1
  66. package/dist/esm/components/time-picker/CTimePicker.d.ts +44 -0
  67. package/dist/esm/components/time-picker/CTimePicker.js +63 -7
  68. package/dist/esm/components/time-picker/CTimePicker.js.map +1 -1
  69. package/dist/esm/components/time-picker/CTimePickerRollCol.d.ts +19 -7
  70. package/dist/esm/components/time-picker/CTimePickerRollCol.js +80 -8
  71. package/dist/esm/components/time-picker/CTimePickerRollCol.js.map +1 -1
  72. package/dist/esm/index.js +2 -0
  73. package/dist/esm/index.js.map +1 -1
  74. package/package.json +6 -6
  75. package/src/components/autocomplete/CAutocomplete.ts +17 -16
  76. package/src/components/calendar/CCalendar.ts +6 -0
  77. package/src/components/dropdown/CDropdown.ts +92 -36
  78. package/src/components/dropdown/CDropdownToggle.ts +10 -1
  79. package/src/components/dropdown/utils.ts +21 -0
  80. package/src/components/index.ts +1 -0
  81. package/src/components/nav/CNavItem.ts +1 -1
  82. package/src/components/one-time-password-input/COneTimePassword.ts +459 -0
  83. package/src/components/one-time-password-input/COneTimePasswordInput.ts +21 -0
  84. package/src/components/one-time-password-input/__tests__/COneTimePassword.spec.ts +210 -0
  85. package/src/components/one-time-password-input/__tests__/__snapshots__/COneTimePassword.spec.ts.snap +32 -0
  86. package/src/components/one-time-password-input/index.ts +4 -0
  87. package/src/components/one-time-password-input/utils.ts +13 -0
  88. package/src/components/time-picker/CTimePicker.ts +68 -9
  89. package/src/components/time-picker/CTimePickerRollCol.ts +87 -9
@@ -0,0 +1,278 @@
1
+ declare const COneTimePassword: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ /**
3
+ * Function to generate aria-label for each input field. Receives current index (0-based) and total number of inputs.
4
+ */
5
+ ariaLabel: {
6
+ type: FunctionConstructor;
7
+ default: (index: number, total: number) => string;
8
+ };
9
+ /**
10
+ * Automatically submit the form when all one time password fields are filled.
11
+ */
12
+ autoSubmit: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ /**
17
+ * Disable all one time password (OTP) input fields.
18
+ */
19
+ disabled: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ /**
24
+ * Initial value for uncontrolled Vue.js one time password input.
25
+ */
26
+ defaultValue: (NumberConstructor | StringConstructor)[];
27
+ /**
28
+ * Provide valuable, actionable feedback.
29
+ */
30
+ feedback: StringConstructor;
31
+ /**
32
+ * Provide valuable, actionable feedback.
33
+ */
34
+ feedbackInvalid: StringConstructor;
35
+ /**
36
+ * Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, `:invalid` and `:valid`.
37
+ */
38
+ feedbackValid: StringConstructor;
39
+ /**
40
+ * A string of all className you want applied to the floating label wrapper.
41
+ */
42
+ floatingClassName: StringConstructor;
43
+ /**
44
+ * Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, `:invalid` and `:valid`.
45
+ */
46
+ floatingLabel: StringConstructor;
47
+ /**
48
+ * ID attribute for the hidden input field.
49
+ */
50
+ id: StringConstructor;
51
+ /**
52
+ * Set component validation state to invalid.
53
+ */
54
+ invalid: BooleanConstructor;
55
+ /**
56
+ * Add a caption for a component.
57
+ */
58
+ label: StringConstructor;
59
+ /**
60
+ * Enforce sequential input (users must fill fields in order).
61
+ */
62
+ linear: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ /**
67
+ * Show input as password (masked characters).
68
+ */
69
+ masked: {
70
+ type: BooleanConstructor;
71
+ default: boolean;
72
+ };
73
+ /**
74
+ * The default name for a value passed using v-model.
75
+ */
76
+ modelValue: (NumberConstructor | StringConstructor)[];
77
+ /**
78
+ * Name attribute for the hidden input field.
79
+ */
80
+ name: StringConstructor;
81
+ /**
82
+ * Placeholder text for input fields. Single character applies to all fields, longer strings apply character-by-character.
83
+ */
84
+ placeholder: StringConstructor;
85
+ /**
86
+ * Make Vue.js OTP input component read-only.
87
+ */
88
+ readonly: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
92
+ /**
93
+ * Makes the input field required for form validation.
94
+ */
95
+ required: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ /**
100
+ * Sets the visual size of the Vue.js one time password (OTP) input. Use 'sm' for small or 'lg' for large input fields.
101
+ */
102
+ size: {
103
+ type: StringConstructor;
104
+ validator: (value: string) => boolean;
105
+ };
106
+ /**
107
+ * Add helper text to the component.
108
+ */
109
+ text: StringConstructor;
110
+ /**
111
+ * Display validation feedback in a styled tooltip.
112
+ */
113
+ tooltipFeedback: BooleanConstructor;
114
+ /**
115
+ * Input validation type: 'number' for digits only, or 'text' for free text.
116
+ */
117
+ type: {
118
+ type: StringConstructor;
119
+ default: string;
120
+ validator: (value: string) => boolean;
121
+ };
122
+ /**
123
+ * Set component validation state to valid.
124
+ */
125
+ valid: BooleanConstructor;
126
+ /**
127
+ * The current value of the one time password input.
128
+ */
129
+ value: (NumberConstructor | StringConstructor)[];
130
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
131
+ [key: string]: any;
132
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "complete")[], "change" | "update:modelValue" | "complete", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
133
+ /**
134
+ * Function to generate aria-label for each input field. Receives current index (0-based) and total number of inputs.
135
+ */
136
+ ariaLabel: {
137
+ type: FunctionConstructor;
138
+ default: (index: number, total: number) => string;
139
+ };
140
+ /**
141
+ * Automatically submit the form when all one time password fields are filled.
142
+ */
143
+ autoSubmit: {
144
+ type: BooleanConstructor;
145
+ default: boolean;
146
+ };
147
+ /**
148
+ * Disable all one time password (OTP) input fields.
149
+ */
150
+ disabled: {
151
+ type: BooleanConstructor;
152
+ default: boolean;
153
+ };
154
+ /**
155
+ * Initial value for uncontrolled Vue.js one time password input.
156
+ */
157
+ defaultValue: (NumberConstructor | StringConstructor)[];
158
+ /**
159
+ * Provide valuable, actionable feedback.
160
+ */
161
+ feedback: StringConstructor;
162
+ /**
163
+ * Provide valuable, actionable feedback.
164
+ */
165
+ feedbackInvalid: StringConstructor;
166
+ /**
167
+ * Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, `:invalid` and `:valid`.
168
+ */
169
+ feedbackValid: StringConstructor;
170
+ /**
171
+ * A string of all className you want applied to the floating label wrapper.
172
+ */
173
+ floatingClassName: StringConstructor;
174
+ /**
175
+ * Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, `:invalid` and `:valid`.
176
+ */
177
+ floatingLabel: StringConstructor;
178
+ /**
179
+ * ID attribute for the hidden input field.
180
+ */
181
+ id: StringConstructor;
182
+ /**
183
+ * Set component validation state to invalid.
184
+ */
185
+ invalid: BooleanConstructor;
186
+ /**
187
+ * Add a caption for a component.
188
+ */
189
+ label: StringConstructor;
190
+ /**
191
+ * Enforce sequential input (users must fill fields in order).
192
+ */
193
+ linear: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ /**
198
+ * Show input as password (masked characters).
199
+ */
200
+ masked: {
201
+ type: BooleanConstructor;
202
+ default: boolean;
203
+ };
204
+ /**
205
+ * The default name for a value passed using v-model.
206
+ */
207
+ modelValue: (NumberConstructor | StringConstructor)[];
208
+ /**
209
+ * Name attribute for the hidden input field.
210
+ */
211
+ name: StringConstructor;
212
+ /**
213
+ * Placeholder text for input fields. Single character applies to all fields, longer strings apply character-by-character.
214
+ */
215
+ placeholder: StringConstructor;
216
+ /**
217
+ * Make Vue.js OTP input component read-only.
218
+ */
219
+ readonly: {
220
+ type: BooleanConstructor;
221
+ default: boolean;
222
+ };
223
+ /**
224
+ * Makes the input field required for form validation.
225
+ */
226
+ required: {
227
+ type: BooleanConstructor;
228
+ default: boolean;
229
+ };
230
+ /**
231
+ * Sets the visual size of the Vue.js one time password (OTP) input. Use 'sm' for small or 'lg' for large input fields.
232
+ */
233
+ size: {
234
+ type: StringConstructor;
235
+ validator: (value: string) => boolean;
236
+ };
237
+ /**
238
+ * Add helper text to the component.
239
+ */
240
+ text: StringConstructor;
241
+ /**
242
+ * Display validation feedback in a styled tooltip.
243
+ */
244
+ tooltipFeedback: BooleanConstructor;
245
+ /**
246
+ * Input validation type: 'number' for digits only, or 'text' for free text.
247
+ */
248
+ type: {
249
+ type: StringConstructor;
250
+ default: string;
251
+ validator: (value: string) => boolean;
252
+ };
253
+ /**
254
+ * Set component validation state to valid.
255
+ */
256
+ valid: BooleanConstructor;
257
+ /**
258
+ * The current value of the one time password input.
259
+ */
260
+ value: (NumberConstructor | StringConstructor)[];
261
+ }>> & Readonly<{
262
+ onChange?: ((...args: any[]) => any) | undefined;
263
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
264
+ onComplete?: ((...args: any[]) => any) | undefined;
265
+ }>, {
266
+ invalid: boolean;
267
+ type: string;
268
+ disabled: boolean;
269
+ valid: boolean;
270
+ tooltipFeedback: boolean;
271
+ required: boolean;
272
+ readonly: boolean;
273
+ ariaLabel: Function;
274
+ autoSubmit: boolean;
275
+ linear: boolean;
276
+ masked: boolean;
277
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
278
+ export { COneTimePassword };
@@ -0,0 +1,391 @@
1
+ import { defineComponent, ref, computed, watch, h, nextTick } from 'vue';
2
+ import { CFormControlWrapper } from '../form/CFormControlWrapper.js';
3
+ import { COneTimePasswordInput } from './COneTimePasswordInput.js';
4
+ import { extractValidChars, isValidInput } from './utils.js';
5
+ import getNextActiveElement from '../../utils/getNextActiveElement.js';
6
+ import isRTL from '../../utils/isRTL.js';
7
+
8
+ const COneTimePassword = defineComponent({
9
+ name: 'COneTimePassword',
10
+ inheritAttrs: false,
11
+ props: {
12
+ /**
13
+ * Function to generate aria-label for each input field. Receives current index (0-based) and total number of inputs.
14
+ */
15
+ ariaLabel: {
16
+ type: Function,
17
+ default: (index, total) => `Digit ${index + 1} of ${total}`,
18
+ },
19
+ /**
20
+ * Automatically submit the form when all one time password fields are filled.
21
+ */
22
+ autoSubmit: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+ /**
27
+ * Disable all one time password (OTP) input fields.
28
+ */
29
+ disabled: {
30
+ type: Boolean,
31
+ default: false,
32
+ },
33
+ /**
34
+ * Initial value for uncontrolled Vue.js one time password input.
35
+ */
36
+ defaultValue: [String, Number],
37
+ /**
38
+ * Provide valuable, actionable feedback.
39
+ */
40
+ feedback: String,
41
+ /**
42
+ * Provide valuable, actionable feedback.
43
+ */
44
+ feedbackInvalid: String,
45
+ /**
46
+ * Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, `:invalid` and `:valid`.
47
+ */
48
+ feedbackValid: String,
49
+ /**
50
+ * A string of all className you want applied to the floating label wrapper.
51
+ */
52
+ floatingClassName: String,
53
+ /**
54
+ * Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, `:invalid` and `:valid`.
55
+ */
56
+ floatingLabel: String,
57
+ /**
58
+ * ID attribute for the hidden input field.
59
+ */
60
+ id: String,
61
+ /**
62
+ * Set component validation state to invalid.
63
+ */
64
+ invalid: Boolean,
65
+ /**
66
+ * Add a caption for a component.
67
+ */
68
+ label: String,
69
+ /**
70
+ * Enforce sequential input (users must fill fields in order).
71
+ */
72
+ linear: {
73
+ type: Boolean,
74
+ default: true,
75
+ },
76
+ /**
77
+ * Show input as password (masked characters).
78
+ */
79
+ masked: {
80
+ type: Boolean,
81
+ default: false,
82
+ },
83
+ /**
84
+ * The default name for a value passed using v-model.
85
+ */
86
+ modelValue: [String, Number],
87
+ /**
88
+ * Name attribute for the hidden input field.
89
+ */
90
+ name: String,
91
+ /**
92
+ * Placeholder text for input fields. Single character applies to all fields, longer strings apply character-by-character.
93
+ */
94
+ placeholder: String,
95
+ /**
96
+ * Make Vue.js OTP input component read-only.
97
+ */
98
+ readonly: {
99
+ type: Boolean,
100
+ default: false,
101
+ },
102
+ /**
103
+ * Makes the input field required for form validation.
104
+ */
105
+ required: {
106
+ type: Boolean,
107
+ default: false,
108
+ },
109
+ /**
110
+ * Sets the visual size of the Vue.js one time password (OTP) input. Use 'sm' for small or 'lg' for large input fields.
111
+ */
112
+ size: {
113
+ type: String,
114
+ validator: (value) => ['sm', 'lg'].includes(value),
115
+ },
116
+ /**
117
+ * Add helper text to the component.
118
+ */
119
+ text: String,
120
+ /**
121
+ * Display validation feedback in a styled tooltip.
122
+ */
123
+ tooltipFeedback: Boolean,
124
+ /**
125
+ * Input validation type: 'number' for digits only, or 'text' for free text.
126
+ */
127
+ type: {
128
+ type: String,
129
+ default: 'number',
130
+ validator: (value) => ['number', 'text'].includes(value),
131
+ },
132
+ /**
133
+ * Set component validation state to valid.
134
+ */
135
+ valid: Boolean,
136
+ /**
137
+ * The current value of the one time password input.
138
+ */
139
+ value: [String, Number],
140
+ },
141
+ emits: [
142
+ /**
143
+ * Callback triggered when the Vue.js one time password (OTP) value changes.
144
+ */
145
+ 'update:modelValue',
146
+ /**
147
+ * Callback triggered when the Vue.js one time password (OTP) value changes.
148
+ */
149
+ 'change',
150
+ /**
151
+ * Callback triggered when all Vue.js one time password (OTP) fields are filled.
152
+ */
153
+ 'complete',
154
+ ],
155
+ setup(props, { attrs, slots, emit }) {
156
+ const inputRefs = ref([]);
157
+ const hiddenInputRef = ref(null);
158
+ const inputValues = ref([]);
159
+ // Count valid OTP input children
160
+ const inputCount = computed(() => {
161
+ return inputRefs.value.filter((ref) => ref !== null).length;
162
+ });
163
+ // Initialize input values
164
+ const initializeValues = () => {
165
+ const initialValue = String(props.modelValue ?? props.value ?? props.defaultValue ?? '');
166
+ inputValues.value = Array.from({ length: inputCount.value }, (_, i) => initialValue[i] || '');
167
+ };
168
+ // Watch for changes in modelValue or value (controlled mode)
169
+ watch(() => props.modelValue ?? props.value, (newValue) => {
170
+ if (newValue !== undefined) {
171
+ const valueString = String(newValue);
172
+ inputValues.value = Array.from({ length: inputCount.value }, (_, i) => valueString[i] || '');
173
+ }
174
+ }, { immediate: true });
175
+ // Watch for changes in inputCount
176
+ watch(inputCount, initializeValues, { immediate: true });
177
+ // Update hidden input and trigger events
178
+ const updateValue = (newValues) => {
179
+ const newValue = newValues.join('');
180
+ if (hiddenInputRef.value) {
181
+ hiddenInputRef.value.value = newValue;
182
+ }
183
+ emit('update:modelValue', newValue);
184
+ emit('change', newValue);
185
+ if (newValue.length === inputCount.value) {
186
+ emit('complete', newValue);
187
+ if (props.autoSubmit) {
188
+ nextTick(() => {
189
+ const form = hiddenInputRef.value?.closest('form');
190
+ if (form && typeof form.requestSubmit === 'function') {
191
+ form.requestSubmit();
192
+ }
193
+ });
194
+ }
195
+ }
196
+ };
197
+ const handleInputChange = (index, event) => {
198
+ const target = event.target;
199
+ const inputValue = target.value;
200
+ if (inputValue.length === 1 && !isValidInput(inputValue, props.type)) {
201
+ return;
202
+ }
203
+ const newValues = [...inputValues.value];
204
+ newValues[index] = inputValue.length === 1 ? inputValue : '';
205
+ inputValues.value = newValues;
206
+ updateValue(newValues);
207
+ if (inputValue.length === 1) {
208
+ const nextInput = getNextActiveElement(inputRefs.value.filter(Boolean), target, true, false);
209
+ nextInput?.focus();
210
+ }
211
+ };
212
+ const handleInputFocus = (event) => {
213
+ const target = event.target;
214
+ if (target.value) {
215
+ setTimeout(() => {
216
+ target.select();
217
+ }, 0);
218
+ return;
219
+ }
220
+ if (props.linear) {
221
+ const firstEmptyInput = inputRefs.value.find((input) => !input?.value);
222
+ if (firstEmptyInput && firstEmptyInput !== target) {
223
+ firstEmptyInput.focus();
224
+ }
225
+ }
226
+ };
227
+ const handleKeyDown = (event) => {
228
+ const { key, target } = event;
229
+ if (key === 'Backspace' && target.value === '') {
230
+ const newValues = [...inputValues.value];
231
+ const prevInput = getNextActiveElement(inputRefs.value.filter(Boolean), target, false, false);
232
+ if (prevInput) {
233
+ const prevIndex = inputRefs.value.indexOf(prevInput);
234
+ if (prevIndex !== -1) {
235
+ newValues[prevIndex] = '';
236
+ inputValues.value = newValues;
237
+ updateValue(newValues);
238
+ prevInput.focus();
239
+ }
240
+ }
241
+ return;
242
+ }
243
+ if (key === 'ArrowRight') {
244
+ if (props.linear && target.value === '') {
245
+ return;
246
+ }
247
+ const shouldMoveNext = !isRTL(target);
248
+ const nextInput = getNextActiveElement(inputRefs.value.filter(Boolean), target, shouldMoveNext, false);
249
+ nextInput?.focus();
250
+ return;
251
+ }
252
+ if (key === 'ArrowLeft') {
253
+ const shouldMoveNext = isRTL(target);
254
+ const prevInput = getNextActiveElement(inputRefs.value.filter(Boolean), target, shouldMoveNext, false);
255
+ prevInput?.focus();
256
+ }
257
+ };
258
+ const handlePaste = (index, event) => {
259
+ event.preventDefault();
260
+ const pastedData = event.clipboardData?.getData('text') || '';
261
+ const validChars = extractValidChars(pastedData, props.type);
262
+ if (!validChars) {
263
+ return;
264
+ }
265
+ const newValues = [...inputValues.value];
266
+ const startIndex = index;
267
+ for (let i = 0; i < validChars.length && startIndex + i < inputCount.value; i++) {
268
+ newValues[startIndex + i] = validChars[i];
269
+ }
270
+ inputValues.value = newValues;
271
+ updateValue(newValues);
272
+ // Focus the next empty input or the last filled input
273
+ const nextEmptyIndex = startIndex + validChars.length;
274
+ if (nextEmptyIndex < inputCount.value) {
275
+ inputRefs.value[nextEmptyIndex]?.focus();
276
+ }
277
+ else {
278
+ inputRefs.value[inputRefs.value.length - 1]?.focus();
279
+ }
280
+ };
281
+ return () => {
282
+ if (!slots.default) {
283
+ return null;
284
+ }
285
+ const children = slots.default();
286
+ let inputIndex = 0;
287
+ const processedChildren = children?.map((child) => {
288
+ if (child.type && child.type.name === 'COneTimePasswordInput') {
289
+ const currentInputIndex = inputIndex++;
290
+ return h(COneTimePasswordInput, {
291
+ ...child.props,
292
+ key: `otp-input-${currentInputIndex}`,
293
+ type: props.masked ? 'password' : 'text',
294
+ class: [
295
+ {
296
+ 'is-invalid': props.invalid,
297
+ 'is-valid': props.valid,
298
+ },
299
+ child.props?.class,
300
+ ],
301
+ id: child.props?.id || (props.id ? `${props.id}-${currentInputIndex}` : undefined),
302
+ name: child.props?.name || (props.name ? `${props.name}-${currentInputIndex}` : undefined),
303
+ placeholder: child.props?.placeholder ||
304
+ (props.placeholder && props.placeholder.length > 1
305
+ ? props.placeholder[currentInputIndex]
306
+ : props.placeholder),
307
+ value: inputValues.value[currentInputIndex] || '',
308
+ tabindex: currentInputIndex === 0 ? 0 : inputValues.value[currentInputIndex - 1] ? 0 : -1,
309
+ disabled: props.disabled || child.props?.disabled,
310
+ readonly: props.readonly || child.props?.readonly,
311
+ required: props.required || child.props?.required,
312
+ 'aria-label': child.props?.['aria-label'] || props.ariaLabel(currentInputIndex, inputCount.value),
313
+ inputmode: props.type === 'number' ? 'numeric' : 'text',
314
+ pattern: props.type === 'number' ? '[0-9]*' : '.*',
315
+ onInput: (event) => {
316
+ handleInputChange(currentInputIndex, event);
317
+ },
318
+ onFocus: handleInputFocus,
319
+ onKeydown: (event) => {
320
+ handleKeyDown(event);
321
+ },
322
+ onPaste: (event) => {
323
+ handlePaste(currentInputIndex, event);
324
+ },
325
+ ref: (el) => {
326
+ // Get the actual DOM element - handle both direct elements and component instances
327
+ if (el) {
328
+ // If it's a component instance, get the DOM element
329
+ const domElement = el.$el || el;
330
+ // Ensure it's actually an HTMLInputElement
331
+ if (domElement && domElement.tagName === 'INPUT') {
332
+ inputRefs.value[currentInputIndex] = domElement;
333
+ }
334
+ else {
335
+ inputRefs.value[currentInputIndex] = el;
336
+ }
337
+ }
338
+ else {
339
+ inputRefs.value[currentInputIndex] = null;
340
+ }
341
+ },
342
+ });
343
+ }
344
+ return child;
345
+ });
346
+ return h(CFormControlWrapper, {
347
+ ...(typeof attrs['aria-describedby'] === 'string' && {
348
+ describedby: attrs['aria-describedby'],
349
+ }),
350
+ feedback: props.feedback,
351
+ feedbackInvalid: props.feedbackInvalid,
352
+ feedbackValid: props.feedbackValid,
353
+ floatingClassName: props.floatingClassName,
354
+ floatingLabel: props.floatingLabel,
355
+ id: props.id,
356
+ invalid: props.invalid,
357
+ label: props.label,
358
+ text: props.text,
359
+ tooltipFeedback: props.tooltipFeedback,
360
+ valid: props.valid,
361
+ }, {
362
+ default: () => [
363
+ h('div', {
364
+ class: [
365
+ 'form-otp',
366
+ {
367
+ [`form-otp-${props.size}`]: props.size,
368
+ },
369
+ attrs.class,
370
+ ],
371
+ role: 'group',
372
+ ...attrs,
373
+ }, [
374
+ ...processedChildren,
375
+ h('input', {
376
+ type: 'hidden',
377
+ id: props.id,
378
+ name: props.name,
379
+ value: inputValues.value.join(''),
380
+ disabled: props.disabled,
381
+ ref: hiddenInputRef,
382
+ }),
383
+ ]),
384
+ ],
385
+ });
386
+ };
387
+ },
388
+ });
389
+
390
+ export { COneTimePassword };
391
+ //# sourceMappingURL=COneTimePassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"COneTimePassword.js","sources":["../../../../src/components/one-time-password-input/COneTimePassword.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAMA,MAAM,gBAAgB,GAAG,eAAe,CAAC;AACvC,IAAA,IAAI,EAAE,kBAAkB;AACxB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,KAAK,EAAE;AACL;;AAEG;AACH,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,OAAO,EAAE,CAAC,KAAa,EAAE,KAAa,KAAK,CAAA,MAAA,EAAS,KAAK,GAAG,CAAC,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE;AAC5E,SAAA;AACD;;AAEG;AACH,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAK;AACf,SAAA;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