@desource/phone-mask-vue 0.3.0 → 1.1.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.
- package/CHANGELOG.md +65 -0
- package/README.md +157 -11
- package/dist/index.cjs +868 -978
- package/dist/index.js +868 -978
- package/dist/index.mjs +869 -979
- package/dist/phone-mask-vue.css +64 -64
- package/dist/types/components/PhoneInput.vue.d.ts +7 -7
- package/dist/types/components/PhoneInput.vue.d.ts.map +1 -1
- package/dist/types/composables/internal/useCopyAction.d.ts +14 -0
- package/dist/types/composables/internal/useCopyAction.d.ts.map +1 -0
- package/dist/types/composables/internal/useCountry.d.ts +22 -0
- package/dist/types/composables/internal/useCountry.d.ts.map +1 -0
- package/dist/types/composables/internal/useCountrySelector.d.ts +30 -0
- package/dist/types/composables/internal/useCountrySelector.d.ts.map +1 -0
- package/dist/types/composables/internal/useFormatter.d.ts +46 -0
- package/dist/types/composables/internal/useFormatter.d.ts.map +1 -0
- package/dist/types/composables/internal/useInputHandlers.d.ts +20 -0
- package/dist/types/composables/internal/useInputHandlers.d.ts.map +1 -0
- package/dist/types/composables/internal/useTheme.d.ts +10 -0
- package/dist/types/composables/internal/useTheme.d.ts.map +1 -0
- package/dist/types/composables/internal/useValidationHint.d.ts +6 -0
- package/dist/types/composables/internal/useValidationHint.d.ts.map +1 -0
- package/dist/types/composables/usePhoneMask.d.ts +8 -0
- package/dist/types/composables/usePhoneMask.d.ts.map +1 -0
- package/dist/types/composables/{useClipboard.d.ts → utility/useClipboard.d.ts} +1 -2
- package/dist/types/composables/utility/useClipboard.d.ts.map +1 -0
- package/dist/types/composables/utility/useTimer.d.ts +9 -0
- package/dist/types/composables/utility/useTimer.d.ts.map +1 -0
- package/dist/types/directives/vPhoneMask.d.ts +1 -2
- package/dist/types/directives/vPhoneMask.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +33 -9
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +17 -11
- package/dist/types/composables/useClipboard.d.ts.map +0 -1
- package/dist/types/composables/useCountrySelector.d.ts +0 -21
- package/dist/types/composables/useCountrySelector.d.ts.map +0 -1
- package/dist/types/composables/useMask.d.ts +0 -20
- package/dist/types/composables/useMask.d.ts.map +0 -1
- package/dist/types/composables/usePhoneFormatter.d.ts +0 -16
- package/dist/types/composables/usePhoneFormatter.d.ts.map +0 -1
- package/dist/types/consts.d.ts +0 -4
- package/dist/types/consts.d.ts.map +0 -1
package/dist/phone-mask-vue.css
CHANGED
|
@@ -77,62 +77,62 @@
|
|
|
77
77
|
.phone-input input:disabled,
|
|
78
78
|
.phone-dropdown input:disabled {
|
|
79
79
|
cursor: not-allowed;
|
|
80
|
-
}.phone-input[data-v-
|
|
81
|
-
.phone-dropdown[data-v-
|
|
80
|
+
}.phone-input[data-v-d730aa54],
|
|
81
|
+
.phone-dropdown[data-v-d730aa54] {
|
|
82
82
|
font-size: var(--pi-font-size);
|
|
83
83
|
background: var(--pi-bg);
|
|
84
84
|
color: var(--pi-fg);
|
|
85
85
|
border-radius: var(--pi-radius);
|
|
86
86
|
border: 1px solid var(--pi-border);
|
|
87
87
|
}
|
|
88
|
-
.phone-input[data-v-
|
|
88
|
+
.phone-input[data-v-d730aa54] {
|
|
89
89
|
position: relative;
|
|
90
90
|
display: flex;
|
|
91
91
|
align-items: stretch;
|
|
92
92
|
width: 100%;
|
|
93
93
|
}
|
|
94
|
-
.phone-input[data-v-
|
|
94
|
+
.phone-input[data-v-d730aa54]:focus-within {
|
|
95
95
|
outline: var(--pi-focus-ring);
|
|
96
96
|
}
|
|
97
|
-
.phone-input.is-incomplete[data-v-
|
|
97
|
+
.phone-input.is-incomplete[data-v-d730aa54] {
|
|
98
98
|
border-color: var(--pi-warning);
|
|
99
99
|
}
|
|
100
|
-
.phone-input.is-incomplete[data-v-
|
|
100
|
+
.phone-input.is-incomplete[data-v-d730aa54]:focus-within {
|
|
101
101
|
outline: var(--pi-focus-ring-warning);
|
|
102
102
|
}
|
|
103
|
-
.phone-input.is-complete[data-v-
|
|
103
|
+
.phone-input.is-complete[data-v-d730aa54] {
|
|
104
104
|
border-color: var(--pi-success);
|
|
105
105
|
}
|
|
106
|
-
.phone-input.is-complete[data-v-
|
|
106
|
+
.phone-input.is-complete[data-v-d730aa54]:focus-within {
|
|
107
107
|
outline: var(--pi-focus-ring-success);
|
|
108
108
|
}
|
|
109
|
-
.phone-input.is-disabled[data-v-
|
|
109
|
+
.phone-input.is-disabled[data-v-d730aa54] {
|
|
110
110
|
background: var(--pi-disabled-bg);
|
|
111
111
|
color: var(--pi-disabled-fg);
|
|
112
112
|
}
|
|
113
|
-
.phone-input.is-readonly[data-v-
|
|
113
|
+
.phone-input.is-readonly[data-v-d730aa54] {
|
|
114
114
|
cursor: default;
|
|
115
115
|
}
|
|
116
|
-
.phone-input.size-compact[data-v-
|
|
116
|
+
.phone-input.size-compact[data-v-d730aa54] {
|
|
117
117
|
--pi-font-size: 14px;
|
|
118
118
|
--pi-height: 36px;
|
|
119
119
|
--pi-padding: 10px;
|
|
120
120
|
--pi-actions-size: 24px;
|
|
121
121
|
}
|
|
122
|
-
.phone-input.size-large[data-v-
|
|
122
|
+
.phone-input.size-large[data-v-d730aa54] {
|
|
123
123
|
--pi-font-size: 18px;
|
|
124
124
|
--pi-height: 52px;
|
|
125
125
|
--pi-padding: 16px;
|
|
126
126
|
--pi-actions-size: 32px;
|
|
127
127
|
}
|
|
128
|
-
.phone-input.is-unstyled[data-v-
|
|
128
|
+
.phone-input.is-unstyled[data-v-d730aa54] {
|
|
129
129
|
all: initial;
|
|
130
130
|
display: block;
|
|
131
131
|
}
|
|
132
|
-
.pi-selector[data-v-
|
|
132
|
+
.pi-selector[data-v-d730aa54] {
|
|
133
133
|
flex-shrink: 0;
|
|
134
134
|
}
|
|
135
|
-
.pi-selector-btn[data-v-
|
|
135
|
+
.pi-selector-btn[data-v-d730aa54] {
|
|
136
136
|
display: flex;
|
|
137
137
|
align-items: center;
|
|
138
138
|
gap: 6px;
|
|
@@ -143,36 +143,36 @@
|
|
|
143
143
|
border-radius: var(--pi-radius) 0 0 var(--pi-radius);
|
|
144
144
|
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
145
145
|
}
|
|
146
|
-
.pi-selector-btn.no-dropdown[data-v-
|
|
146
|
+
.pi-selector-btn.no-dropdown[data-v-d730aa54] {
|
|
147
147
|
cursor: default;
|
|
148
148
|
}
|
|
149
|
-
.pi-selector-btn[data-v-
|
|
149
|
+
.pi-selector-btn[data-v-d730aa54]:focus-visible {
|
|
150
150
|
border-color: var(--pi-border-focus);
|
|
151
151
|
outline: none;
|
|
152
152
|
}
|
|
153
|
-
.pi-selector-btn:disabled > .pi-flag[data-v-
|
|
153
|
+
.pi-selector-btn:disabled > .pi-flag[data-v-d730aa54] {
|
|
154
154
|
opacity: 0.5;
|
|
155
155
|
}
|
|
156
|
-
.pi-flag[data-v-
|
|
156
|
+
.pi-flag[data-v-d730aa54] {
|
|
157
157
|
font-size: 1.25em;
|
|
158
158
|
line-height: 1;
|
|
159
159
|
display: inline-flex;
|
|
160
160
|
}
|
|
161
|
-
.pi-chevron[data-v-
|
|
161
|
+
.pi-chevron[data-v-d730aa54] {
|
|
162
162
|
margin-left: 2px;
|
|
163
163
|
color: var(--pi-muted);
|
|
164
164
|
transition: transform 200ms ease;
|
|
165
165
|
}
|
|
166
|
-
.pi-chevron.is-open[data-v-
|
|
166
|
+
.pi-chevron.is-open[data-v-d730aa54] {
|
|
167
167
|
transform: rotate(180deg);
|
|
168
168
|
}
|
|
169
|
-
.pi-input-wrap[data-v-
|
|
169
|
+
.pi-input-wrap[data-v-d730aa54] {
|
|
170
170
|
flex: 1;
|
|
171
171
|
position: relative;
|
|
172
172
|
display: flex;
|
|
173
173
|
align-items: center;
|
|
174
174
|
}
|
|
175
|
-
.pi-input[data-v-
|
|
175
|
+
.pi-input[data-v-d730aa54] {
|
|
176
176
|
flex: 1;
|
|
177
177
|
width: 100%;
|
|
178
178
|
padding-left: var(--pi-padding);
|
|
@@ -181,14 +181,14 @@
|
|
|
181
181
|
border-radius: 0 var(--pi-radius) var(--pi-radius) 0;
|
|
182
182
|
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
183
183
|
}
|
|
184
|
-
.pi-input[data-v-
|
|
184
|
+
.pi-input[data-v-d730aa54]:hover:not(:disabled):not(:read-only) {
|
|
185
185
|
border-color: var(--pi-border-hover);
|
|
186
186
|
}
|
|
187
|
-
.pi-input[data-v-
|
|
187
|
+
.pi-input[data-v-d730aa54]:focus {
|
|
188
188
|
border-color: var(--pi-border-focus);
|
|
189
189
|
position: relative;
|
|
190
190
|
}
|
|
191
|
-
.pi-actions[data-v-
|
|
191
|
+
.pi-actions[data-v-d730aa54] {
|
|
192
192
|
position: absolute;
|
|
193
193
|
right: 2px;
|
|
194
194
|
top: 50%;
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
align-items: center;
|
|
198
198
|
gap: 2px;
|
|
199
199
|
}
|
|
200
|
-
.pi-btn[data-v-
|
|
200
|
+
.pi-btn[data-v-d730aa54] {
|
|
201
201
|
display: flex;
|
|
202
202
|
align-items: center;
|
|
203
203
|
justify-content: center;
|
|
@@ -209,36 +209,36 @@
|
|
|
209
209
|
border-radius: 9999px;
|
|
210
210
|
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
211
211
|
}
|
|
212
|
-
.pi-btn[data-v-
|
|
212
|
+
.pi-btn[data-v-d730aa54]:hover {
|
|
213
213
|
background: var(--pi-disabled-bg);
|
|
214
214
|
color: var(--pi-fg);
|
|
215
215
|
}
|
|
216
|
-
.pi-btn[data-v-
|
|
216
|
+
.pi-btn[data-v-d730aa54]:active:not(:disabled) {
|
|
217
217
|
transform: scale(0.95);
|
|
218
218
|
}
|
|
219
|
-
.pi-btn[data-v-
|
|
219
|
+
.pi-btn[data-v-d730aa54]:focus {
|
|
220
220
|
outline: 1px solid var(--pi-border-focus);
|
|
221
221
|
outline-offset: -1px;
|
|
222
222
|
}
|
|
223
|
-
.pi-btn.is-copied[data-v-
|
|
223
|
+
.pi-btn.is-copied[data-v-d730aa54] {
|
|
224
224
|
color: var(--pi-success);
|
|
225
225
|
border-color: var(--pi-success);
|
|
226
226
|
}
|
|
227
|
-
.pi-btn svg[data-v-
|
|
227
|
+
.pi-btn svg[data-v-d730aa54] {
|
|
228
228
|
flex-shrink: 0;
|
|
229
229
|
}
|
|
230
|
-
.phone-dropdown[data-v-
|
|
230
|
+
.phone-dropdown[data-v-d730aa54] {
|
|
231
231
|
position: absolute;
|
|
232
232
|
z-index: 9999;
|
|
233
233
|
max-width: 400px;
|
|
234
234
|
box-shadow: var(--pi-shadow-lg);
|
|
235
235
|
overflow: hidden;
|
|
236
236
|
}
|
|
237
|
-
.pi-search-wrap[data-v-
|
|
237
|
+
.pi-search-wrap[data-v-d730aa54] {
|
|
238
238
|
padding: 8px;
|
|
239
239
|
border-bottom: 1px solid var(--pi-border);
|
|
240
240
|
}
|
|
241
|
-
.pi-search[data-v-
|
|
241
|
+
.pi-search[data-v-d730aa54] {
|
|
242
242
|
width: 100%;
|
|
243
243
|
padding: 8px 12px;
|
|
244
244
|
font-size: 0.875em;
|
|
@@ -247,30 +247,30 @@
|
|
|
247
247
|
background: var(--pi-bg);
|
|
248
248
|
transition: border-color 150ms ease;
|
|
249
249
|
}
|
|
250
|
-
.pi-search[data-v-
|
|
250
|
+
.pi-search[data-v-d730aa54]:focus {
|
|
251
251
|
border-color: var(--pi-border-focus);
|
|
252
252
|
}
|
|
253
|
-
.pi-options[data-v-
|
|
253
|
+
.pi-options[data-v-d730aa54] {
|
|
254
254
|
max-height: 300px;
|
|
255
255
|
overflow-y: auto;
|
|
256
256
|
padding: 4px 0;
|
|
257
257
|
margin: 0;
|
|
258
258
|
list-style: none;
|
|
259
259
|
}
|
|
260
|
-
.pi-options[data-v-
|
|
260
|
+
.pi-options[data-v-d730aa54]::-webkit-scrollbar {
|
|
261
261
|
width: 8px;
|
|
262
262
|
}
|
|
263
|
-
.pi-options[data-v-
|
|
263
|
+
.pi-options[data-v-d730aa54]::-webkit-scrollbar-track {
|
|
264
264
|
background: transparent;
|
|
265
265
|
}
|
|
266
|
-
.pi-options[data-v-
|
|
266
|
+
.pi-options[data-v-d730aa54]::-webkit-scrollbar-thumb {
|
|
267
267
|
background: var(--pi-border);
|
|
268
268
|
border-radius: 4px;
|
|
269
269
|
}
|
|
270
|
-
.pi-options[data-v-
|
|
270
|
+
.pi-options[data-v-d730aa54]::-webkit-scrollbar-thumb:hover {
|
|
271
271
|
background: var(--pi-border-hover);
|
|
272
272
|
}
|
|
273
|
-
.pi-option[data-v-
|
|
273
|
+
.pi-option[data-v-d730aa54] {
|
|
274
274
|
display: flex;
|
|
275
275
|
align-items: center;
|
|
276
276
|
gap: 8px;
|
|
@@ -278,57 +278,57 @@
|
|
|
278
278
|
cursor: pointer;
|
|
279
279
|
transition: background-color 100ms ease;
|
|
280
280
|
}
|
|
281
|
-
.pi-option[data-v-
|
|
281
|
+
.pi-option[data-v-d730aa54]:hover, .pi-option.is-focused[data-v-d730aa54] {
|
|
282
282
|
background: var(--pi-disabled-bg);
|
|
283
283
|
}
|
|
284
|
-
.pi-option.is-selected[data-v-
|
|
284
|
+
.pi-option.is-selected[data-v-d730aa54] {
|
|
285
285
|
background: var(--pi-border);
|
|
286
286
|
font-weight: 500;
|
|
287
287
|
}
|
|
288
|
-
.pi-opt-name[data-v-
|
|
288
|
+
.pi-opt-name[data-v-d730aa54] {
|
|
289
289
|
flex: 1;
|
|
290
290
|
overflow: hidden;
|
|
291
291
|
text-overflow: ellipsis;
|
|
292
292
|
white-space: nowrap;
|
|
293
293
|
}
|
|
294
|
-
.pi-opt-code[data-v-
|
|
294
|
+
.pi-opt-code[data-v-d730aa54] {
|
|
295
295
|
color: var(--pi-muted);
|
|
296
296
|
font-size: 0.875em;
|
|
297
297
|
}
|
|
298
|
-
.pi-empty[data-v-
|
|
298
|
+
.pi-empty[data-v-d730aa54] {
|
|
299
299
|
padding: 12px;
|
|
300
300
|
text-align: center;
|
|
301
301
|
color: var(--pi-muted);
|
|
302
302
|
font-size: 0.875em;
|
|
303
303
|
}
|
|
304
|
-
.fade-enter-active[data-v-
|
|
305
|
-
.fade-leave-active[data-v-
|
|
304
|
+
.fade-enter-active[data-v-d730aa54],
|
|
305
|
+
.fade-leave-active[data-v-d730aa54] {
|
|
306
306
|
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
307
307
|
}
|
|
308
|
-
.fade-enter-from[data-v-
|
|
309
|
-
.fade-leave-to[data-v-
|
|
308
|
+
.fade-enter-from[data-v-d730aa54],
|
|
309
|
+
.fade-leave-to[data-v-d730aa54] {
|
|
310
310
|
opacity: 0;
|
|
311
311
|
transform: translateY(-50%) translateX(8px);
|
|
312
312
|
}
|
|
313
|
-
.fade-scale-enter-active[data-v-
|
|
314
|
-
.fade-scale-leave-active[data-v-
|
|
313
|
+
.fade-scale-enter-active[data-v-d730aa54],
|
|
314
|
+
.fade-scale-leave-active[data-v-d730aa54] {
|
|
315
315
|
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
316
316
|
}
|
|
317
|
-
.fade-scale-enter-from[data-v-
|
|
318
|
-
.fade-scale-leave-to[data-v-
|
|
317
|
+
.fade-scale-enter-from[data-v-d730aa54],
|
|
318
|
+
.fade-scale-leave-to[data-v-d730aa54] {
|
|
319
319
|
opacity: 0;
|
|
320
320
|
transform: scale(0.8);
|
|
321
321
|
}
|
|
322
|
-
.dropdown-enter-active[data-v-
|
|
323
|
-
.dropdown-leave-active[data-v-
|
|
322
|
+
.dropdown-enter-active[data-v-d730aa54],
|
|
323
|
+
.dropdown-leave-active[data-v-d730aa54] {
|
|
324
324
|
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
325
325
|
}
|
|
326
|
-
.dropdown-enter-from[data-v-
|
|
327
|
-
.dropdown-leave-to[data-v-
|
|
326
|
+
.dropdown-enter-from[data-v-d730aa54],
|
|
327
|
+
.dropdown-leave-to[data-v-d730aa54] {
|
|
328
328
|
opacity: 0;
|
|
329
329
|
transform: translateY(-8px);
|
|
330
330
|
}
|
|
331
|
-
.sr-only[data-v-
|
|
331
|
+
.sr-only[data-v-d730aa54] {
|
|
332
332
|
position: absolute;
|
|
333
333
|
width: 1px;
|
|
334
334
|
height: 1px;
|
|
@@ -340,21 +340,21 @@
|
|
|
340
340
|
border: 0;
|
|
341
341
|
}
|
|
342
342
|
@media (max-width: 480px) {
|
|
343
|
-
.phone-input[data-v-
|
|
343
|
+
.phone-input[data-v-d730aa54] {
|
|
344
344
|
--pi-padding: 8px;
|
|
345
345
|
--pi-actions-size: 24px;
|
|
346
346
|
}
|
|
347
|
-
.size-compact[data-v-
|
|
347
|
+
.size-compact[data-v-d730aa54] {
|
|
348
348
|
--pi-actions-size: 20px;
|
|
349
349
|
}
|
|
350
|
-
.phone-dropdown[data-v-
|
|
350
|
+
.phone-dropdown[data-v-d730aa54] {
|
|
351
351
|
left: 0;
|
|
352
352
|
right: 0;
|
|
353
353
|
max-width: none;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
@media (prefers-reduced-motion: reduce) {
|
|
357
|
-
[data-v-
|
|
357
|
+
[data-v-d730aa54] {
|
|
358
358
|
animation-duration: 0.01ms !important;
|
|
359
359
|
animation-iteration-count: 1 !important;
|
|
360
360
|
transition-duration: 0.01ms !important;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PhoneInputExposed, PhoneInputProps, PhoneInputSlots } from '../types';
|
|
1
|
+
import type { PhoneInputExposed, PhoneInputProps, PhoneInputSlots, PhoneNumber } from '../types';
|
|
2
2
|
type __VLS_Props = PhoneInputProps;
|
|
3
3
|
type __VLS_Slots = PhoneInputSlots;
|
|
4
4
|
type __VLS_ModelProps = {
|
|
@@ -6,9 +6,9 @@ type __VLS_ModelProps = {
|
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, PhoneInputExposed, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
-
"update:modelValue": (value: string
|
|
9
|
+
"update:modelValue": (value: string) => any;
|
|
10
10
|
} & {
|
|
11
|
-
change: (value:
|
|
11
|
+
change: (value: PhoneNumber) => any;
|
|
12
12
|
"country-change": (country: import("@desource/phone-mask").MaskFull) => any;
|
|
13
13
|
"validation-change": (isValid: boolean) => any;
|
|
14
14
|
focus: (event: FocusEvent) => any;
|
|
@@ -16,18 +16,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, Phone
|
|
|
16
16
|
copy: (value: string) => any;
|
|
17
17
|
clear: () => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
-
onChange?: ((value:
|
|
19
|
+
onChange?: ((value: PhoneNumber) => any) | undefined;
|
|
20
20
|
"onCountry-change"?: ((country: import("@desource/phone-mask").MaskFull) => any) | undefined;
|
|
21
21
|
"onValidation-change"?: ((isValid: boolean) => any) | undefined;
|
|
22
22
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
23
23
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
24
24
|
onCopy?: ((value: string) => any) | undefined;
|
|
25
25
|
onClear?: (() => any) | undefined;
|
|
26
|
-
"onUpdate:modelValue"?: ((value: string
|
|
26
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
detect: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
theme: import("..").PhoneInputTheme;
|
|
30
|
+
size: import("..").PhoneInputSize;
|
|
31
31
|
disabled: boolean;
|
|
32
32
|
readonly: boolean;
|
|
33
33
|
showCopy: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PhoneInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PhoneInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PhoneInput.vue"],"names":[],"mappings":"AA4yBA,OAAO,KAAK,EAAmB,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAElH,KAAK,WAAW,GAAG,eAAe,CAAC;AAgBnC,KAAK,WAAW,GAAG,eAAe,CAAC;AA6JnC,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAmBF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAkcxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
interface UseCopyActionOptions {
|
|
3
|
+
fullFormatted: Ref<string>;
|
|
4
|
+
liveRef?: Ref<HTMLElement | null>;
|
|
5
|
+
onCopy?: (value: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useCopyAction({ liveRef, fullFormatted, onCopy }: UseCopyActionOptions): {
|
|
8
|
+
copied: Ref<boolean, boolean>;
|
|
9
|
+
copyAriaLabel: import("vue").ComputedRef<string>;
|
|
10
|
+
copyButtonTitle: import("vue").ComputedRef<"Copied" | "Copy phone number">;
|
|
11
|
+
onCopyClick: () => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=useCopyAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyAction.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useCopyAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAIzC,UAAU,oBAAoB;IAC5B,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAID,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,oBAAoB;;;;;EA8BrF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, ComputedRef } from 'vue';
|
|
2
|
+
import { type MaskFull } from '@desource/phone-mask';
|
|
3
|
+
export interface UseCountryOptions {
|
|
4
|
+
/** Country ISO code (e.g., 'US', 'DE', 'GB') */
|
|
5
|
+
country?: MaybeRefOrGetter<string | undefined>;
|
|
6
|
+
/** Locale for country names (default: navigator.language) */
|
|
7
|
+
locale?: MaybeRefOrGetter<string | undefined>;
|
|
8
|
+
/** Auto-detect country from IP/locale (default: false) */
|
|
9
|
+
detect?: MaybeRefOrGetter<boolean | undefined>;
|
|
10
|
+
/** Callback when country changes */
|
|
11
|
+
onCountryChange?: (country: MaskFull) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface UseCountryReturn {
|
|
14
|
+
/** Current country data */
|
|
15
|
+
country: ComputedRef<MaskFull>;
|
|
16
|
+
/** Change country programmatically */
|
|
17
|
+
setCountry: (countryCode?: string | null) => boolean;
|
|
18
|
+
/** Computed locale value */
|
|
19
|
+
locale: ComputedRef<string>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useCountry({ country: countryOption, locale: localeOption, detect, onCountryChange }?: UseCountryOptions): UseCountryReturn;
|
|
22
|
+
//# sourceMappingURL=useCountry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCountry.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useCountry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,OAAO,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,6DAA6D;IAC7D,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9C,0DAA0D;IAC1D,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC/C,oCAAoC;IACpC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B,sCAAsC;IACtC,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC;IACrD,4BAA4B;IAC5B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,YAAY,EACpB,MAAM,EACN,eAAe,EAChB,GAAE,iBAAsB,GAAG,gBAAgB,CAiD3C"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, ShallowRef, CSSProperties } from 'vue';
|
|
2
|
+
import { type CountryKey } from '@desource/phone-mask';
|
|
3
|
+
interface UseCountrySelectorOptions {
|
|
4
|
+
rootRef: ShallowRef<HTMLDivElement | null>;
|
|
5
|
+
dropdownRef: ShallowRef<HTMLDivElement | null>;
|
|
6
|
+
searchRef: ShallowRef<HTMLInputElement | null>;
|
|
7
|
+
selectorRef: ShallowRef<HTMLDivElement | null>;
|
|
8
|
+
locale: MaybeRefOrGetter<string>;
|
|
9
|
+
onSelectCountry: (code: CountryKey) => void;
|
|
10
|
+
countryOption?: MaybeRefOrGetter<string | undefined>;
|
|
11
|
+
inactive?: MaybeRefOrGetter<boolean | undefined>;
|
|
12
|
+
onAfterSelect?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useCountrySelector({ rootRef, dropdownRef, searchRef, selectorRef, locale, countryOption, inactive, onSelectCountry, onAfterSelect }: UseCountrySelectorOptions): {
|
|
15
|
+
dropdownOpen: import("vue").Ref<boolean, boolean>;
|
|
16
|
+
search: import("vue").Ref<string, string>;
|
|
17
|
+
focusedIndex: import("vue").Ref<number, number>;
|
|
18
|
+
dropdownStyle: ShallowRef<CSSProperties, CSSProperties>;
|
|
19
|
+
filteredCountries: import("vue").ComputedRef<import("@desource/phone-mask").MaskFull[]>;
|
|
20
|
+
hasDropdown: import("vue").ComputedRef<boolean>;
|
|
21
|
+
openDropdown: () => void;
|
|
22
|
+
closeDropdown: () => void;
|
|
23
|
+
toggleDropdown: () => void;
|
|
24
|
+
selectCountry: (code: CountryKey) => void;
|
|
25
|
+
setFocusedIndex: (index: number) => void;
|
|
26
|
+
handleSearchChange: (e: Event) => void;
|
|
27
|
+
handleSearchKeydown: (e: KeyboardEvent) => void;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=useCountrySelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCountrySelector.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useCountrySelector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEnF,UAAU,yBAAyB;IACjC,OAAO,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3C,WAAW,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC/C,SAAS,EAAE,UAAU,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC/C,WAAW,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5C,aAAa,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACjD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,EACN,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACd,EAAE,yBAAyB;;;;;;;;;;0BAqCG,UAAU;6BA3BP,MAAM;4BAmCP,KAAK;6BAmDJ,aAAa;EA6D9C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, ComputedRef } from 'vue';
|
|
2
|
+
import { type MaskFull, type FormatterHelpers } from '@desource/phone-mask';
|
|
3
|
+
import type { PhoneNumber } from '../../types';
|
|
4
|
+
/** Configuration options for the useFormatter composable */
|
|
5
|
+
export interface UseFormatterOptions {
|
|
6
|
+
/** Pre-resolved country data */
|
|
7
|
+
country: MaybeRefOrGetter<MaskFull>;
|
|
8
|
+
/**
|
|
9
|
+
* Controlled value (digits only, without country code).
|
|
10
|
+
* The parent is responsible for managing state via onChange callback.
|
|
11
|
+
*/
|
|
12
|
+
value: MaybeRefOrGetter<string>;
|
|
13
|
+
/** Callback when the digits value changes. */
|
|
14
|
+
onChange: (digits: string) => void;
|
|
15
|
+
/** Callback when the phone number changes. */
|
|
16
|
+
onPhoneChange?: (value: PhoneNumber) => void;
|
|
17
|
+
/** Callback when validation state (isComplete) changes */
|
|
18
|
+
onValidationChange?: (isComplete: boolean) => void;
|
|
19
|
+
}
|
|
20
|
+
/** Return type for useFormatter composable */
|
|
21
|
+
export interface UseFormatterReturn {
|
|
22
|
+
/** Raw digits without formatting */
|
|
23
|
+
digits: ComputedRef<string>;
|
|
24
|
+
/** Phone formatter instance */
|
|
25
|
+
formatter: ComputedRef<FormatterHelpers>;
|
|
26
|
+
/** Placeholder from formatter */
|
|
27
|
+
displayPlaceholder: ComputedRef<string>;
|
|
28
|
+
/** Formatted display string */
|
|
29
|
+
displayValue: ComputedRef<string>;
|
|
30
|
+
/** Full phone number with country code */
|
|
31
|
+
full: ComputedRef<string>;
|
|
32
|
+
/** Full phone number formatted */
|
|
33
|
+
fullFormatted: ComputedRef<string>;
|
|
34
|
+
/** Whether the phone number is complete */
|
|
35
|
+
isComplete: ComputedRef<boolean>;
|
|
36
|
+
/** Whether the input is empty */
|
|
37
|
+
isEmpty: ComputedRef<boolean>;
|
|
38
|
+
/** Whether to show validation warning */
|
|
39
|
+
shouldShowWarn: ComputedRef<boolean>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Composable for phone number formatting and derived computations.
|
|
43
|
+
* Receives pre-resolved country data; country management is handled by the caller.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useFormatter({ country, value, onChange, onPhoneChange, onValidationChange }: UseFormatterOptions): UseFormatterReturn;
|
|
46
|
+
//# sourceMappingURL=useFormatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormatter.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useFormatter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,EAAuC,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEjH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IAClC,gCAAgC;IAChC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC;;;OAGG;IACH,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD;AAED,8CAA8C;AAC9C,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,+BAA+B;IAC/B,SAAS,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACzC,iCAAiC;IACjC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,+BAA+B;IAC/B,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,0CAA0C;IAC1C,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,kCAAkC;IAClC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,2CAA2C;IAC3C,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,iCAAiC;IACjC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,yCAAyC;IACzC,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,aAAa,EACb,kBAAkB,EACnB,EAAE,mBAAmB,GAAG,kBAAkB,CAiD1C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { type FormatterHelpers } from '@desource/phone-mask';
|
|
3
|
+
export interface UseInputHandlersOptions {
|
|
4
|
+
formatter: MaybeRefOrGetter<FormatterHelpers>;
|
|
5
|
+
digits: MaybeRefOrGetter<string>;
|
|
6
|
+
inactive?: MaybeRefOrGetter<boolean>;
|
|
7
|
+
onChange?: (newDigits: string) => void;
|
|
8
|
+
scheduleValidationHint?: (delay: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface UseInputHandlersReturn {
|
|
11
|
+
handleBeforeInput: (e: InputEvent) => void;
|
|
12
|
+
handleInput: (e: Event) => void;
|
|
13
|
+
handleKeydown: (e: KeyboardEvent) => void;
|
|
14
|
+
handlePaste: (e: ClipboardEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Vue composable that provides event handlers for phone input masking.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useInputHandlers(options: UseInputHandlersOptions): UseInputHandlersReturn;
|
|
20
|
+
//# sourceMappingURL=useInputHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputHandlers.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useInputHandlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC9C,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAChC,aAAa,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C;AAKD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,sBAAsB,CAsDzF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { Theme } from '../../types';
|
|
3
|
+
interface UseThemeOptions {
|
|
4
|
+
theme: MaybeRefOrGetter<Theme>;
|
|
5
|
+
}
|
|
6
|
+
export declare function useTheme({ theme }: UseThemeOptions): {
|
|
7
|
+
themeClass: import("vue").ComputedRef<string>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,UAAU,eAAe;IACvB,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CAChC;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe;;EAiClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValidationHint.d.ts","sourceRoot":"","sources":["../../../../src/composables/internal/useValidationHint.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB;;;oCAUQ,MAAM;EAQ9C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UsePhoneMaskOptions, UsePhoneMaskReturn } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Vue composable for phone number masking.
|
|
4
|
+
* Provides low-level phone masking functionality for custom input implementations.
|
|
5
|
+
* Works in controlled mode — caller manages value state via onChange callback.
|
|
6
|
+
*/
|
|
7
|
+
export declare function usePhoneMask(options: UsePhoneMaskOptions): UsePhoneMaskReturn;
|
|
8
|
+
//# sourceMappingURL=usePhoneMask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePhoneMask.d.ts","sourceRoot":"","sources":["../../../src/composables/usePhoneMask.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAExE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAwF7E"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export declare function useClipboard(): {
|
|
1
|
+
export declare function useClipboard(delay?: number): {
|
|
2
2
|
copied: import("vue").Ref<boolean, boolean>;
|
|
3
3
|
isCopying: import("vue").Ref<boolean, boolean>;
|
|
4
4
|
copy: (text: string) => Promise<boolean>;
|
|
5
|
-
onUnmount: () => void;
|
|
6
5
|
};
|
|
7
6
|
//# sourceMappingURL=useClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../../../src/composables/utility/useClipboard.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,KAAK,SAAQ;;;iBAKd,MAAM;EAqBjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable for managing timers with automatic cleanup
|
|
3
|
+
* @returns Object with set and clear methods for timer control
|
|
4
|
+
*/
|
|
5
|
+
export declare function useTimer(): {
|
|
6
|
+
set: (callback: () => void, delay: number) => void;
|
|
7
|
+
clear: () => void;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useTimer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTimer.d.ts","sourceRoot":"","sources":["../../../../src/composables/utility/useTimer.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,QAAQ;oBAUC,MAAM,IAAI,SAAS,MAAM;;EASjD"}
|
|
@@ -4,7 +4,6 @@ import type { PMaskDirectiveOptions, PMaskDirectiveState, DirectiveHTMLInputElem
|
|
|
4
4
|
* Update country and reformat existing input.
|
|
5
5
|
* Updates formatter, placeholder, truncates digits if needed, and triggers callbacks
|
|
6
6
|
*/
|
|
7
|
-
declare function
|
|
7
|
+
export declare function setCountry(el: HTMLInputElement, state: PMaskDirectiveState, newCountryCode: string): void;
|
|
8
8
|
export declare const vPhoneMask: Directive<DirectiveHTMLInputElement, string | PMaskDirectiveOptions | undefined>;
|
|
9
|
-
export { updateCountry as setCountry };
|
|
10
9
|
//# sourceMappingURL=vPhoneMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vPhoneMask.d.ts","sourceRoot":"","sources":["../../../src/directives/vPhoneMask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"vPhoneMask.d.ts","sourceRoot":"","sources":["../../../src/directives/vPhoneMask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,KAAK,CAAC;AAgB/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAiFtG;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAczG;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,CAAC,yBAAyB,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAkEvG,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { countPlaceholders, formatDigitsWithMap, pickMaskVariant, removeCountryCodePrefix, toArray } from '@desource/phone-mask';
|
|
2
2
|
import type { App } from 'vue';
|
|
3
3
|
import PhoneInput from './components/PhoneInput.vue';
|
|
4
|
-
import { vPhoneMask, setCountry as
|
|
5
|
-
import type { PhoneNumber as PMaskPhoneNumber } from './types';
|
|
4
|
+
import { vPhoneMask as phoneMaskDirective, setCountry as setPhoneMaskCountry } from './directives/vPhoneMask';
|
|
6
5
|
type TPhoneInputComponent = typeof PhoneInput;
|
|
7
|
-
type TPhoneMaskDirective = typeof
|
|
8
|
-
type TPhoneMaskSetCountryType = typeof
|
|
6
|
+
type TPhoneMaskDirective = typeof phoneMaskDirective;
|
|
7
|
+
type TPhoneMaskSetCountryType = typeof setPhoneMaskCountry;
|
|
9
8
|
declare function install(app: App): void;
|
|
10
|
-
export { PhoneInput,
|
|
9
|
+
export { PhoneInput, install, type TPhoneInputComponent, type TPhoneMaskDirective, type TPhoneMaskSetCountryType };
|
|
10
|
+
export { vPhoneMask, setCountry as vPhoneMaskSetCountry } from './directives/vPhoneMask';
|
|
11
|
+
export { usePhoneMask } from './composables/usePhoneMask';
|
|
12
|
+
export type { PhoneNumber as PMaskPhoneNumber, Size as PhoneInputSize, Theme as PhoneInputTheme, UsePhoneMaskOptions, UsePhoneMaskReturn } from './types';
|
|
11
13
|
declare const _default: {
|
|
12
14
|
install: typeof install;
|
|
13
15
|
};
|