@desource/phone-mask-vue 1.1.1 → 1.2.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 +27 -0
- package/dist/index.cjs +1 -1299
- package/dist/index.mjs +1 -1299
- package/dist/phone-mask-vue.css +2 -362
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/index.js +0 -1301
package/dist/phone-mask-vue.css
CHANGED
|
@@ -1,362 +1,2 @@
|
|
|
1
|
-
.phone-input,
|
|
2
|
-
|
|
3
|
-
--pi-bg: #ffffff;
|
|
4
|
-
--pi-fg: #111827;
|
|
5
|
-
--pi-muted: #6b7280;
|
|
6
|
-
--pi-border: #e5e7eb;
|
|
7
|
-
--pi-border-hover: #d1d5db;
|
|
8
|
-
--pi-border-focus: #3b82f6;
|
|
9
|
-
--pi-radius: 8px;
|
|
10
|
-
--pi-padding: 12px;
|
|
11
|
-
--pi-font-size: 16px;
|
|
12
|
-
--pi-height: 44px;
|
|
13
|
-
--pi-actions-size: 32px;
|
|
14
|
-
--pi-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
15
|
-
--pi-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
|
|
16
|
-
--pi-warning: #f59e0b;
|
|
17
|
-
--pi-warning-light: #fbbf24;
|
|
18
|
-
--pi-success: #10b981;
|
|
19
|
-
--pi-focus-ring: 3px solid rgb(59 130 246 / 0.15);
|
|
20
|
-
--pi-focus-ring-warning: 3px solid rgb(245 158 11 / 0.15);
|
|
21
|
-
--pi-focus-ring-success: 3px solid rgb(16 185 129 / 0.15);
|
|
22
|
-
--pi-disabled-bg: #f9fafb;
|
|
23
|
-
--pi-disabled-fg: #9ca3af;
|
|
24
|
-
}
|
|
25
|
-
.phone-input.theme-dark,
|
|
26
|
-
.phone-dropdown.theme-dark {
|
|
27
|
-
--pi-bg: #1f2937;
|
|
28
|
-
--pi-fg: #f9fafb;
|
|
29
|
-
--pi-muted: #9ca3af;
|
|
30
|
-
--pi-border: #374151;
|
|
31
|
-
--pi-border-hover: #4b5563;
|
|
32
|
-
--pi-border-focus: #60a5fa;
|
|
33
|
-
--pi-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
|
|
34
|
-
--pi-shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.2);
|
|
35
|
-
--pi-warning: #fbbf24;
|
|
36
|
-
--pi-warning-light: #fcd34d;
|
|
37
|
-
--pi-focus-ring: 3px solid rgb(96 165 250 / 0.2);
|
|
38
|
-
--pi-focus-ring-warning: 3px solid rgb(251 191 24 / 0.2);
|
|
39
|
-
--pi-focus-ring-success: 3px solid rgb(16 185 129 / 0.2);
|
|
40
|
-
--pi-disabled-bg: #374151;
|
|
41
|
-
}
|
|
42
|
-
.phone-input *,
|
|
43
|
-
.phone-input *::before,
|
|
44
|
-
.phone-input *::after,
|
|
45
|
-
.phone-dropdown *,
|
|
46
|
-
.phone-dropdown *::before,
|
|
47
|
-
.phone-dropdown *::after {
|
|
48
|
-
box-sizing: border-box;
|
|
49
|
-
}
|
|
50
|
-
.phone-input button,
|
|
51
|
-
.phone-input input,
|
|
52
|
-
.phone-dropdown button,
|
|
53
|
-
.phone-dropdown input {
|
|
54
|
-
margin: 0;
|
|
55
|
-
padding: 0;
|
|
56
|
-
border: none;
|
|
57
|
-
background: none;
|
|
58
|
-
font: inherit;
|
|
59
|
-
color: inherit;
|
|
60
|
-
}
|
|
61
|
-
.phone-input button,
|
|
62
|
-
.phone-dropdown button {
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
|
-
.phone-input button:disabled,
|
|
66
|
-
.phone-dropdown button:disabled {
|
|
67
|
-
cursor: not-allowed;
|
|
68
|
-
}
|
|
69
|
-
.phone-input input,
|
|
70
|
-
.phone-dropdown input {
|
|
71
|
-
outline: none;
|
|
72
|
-
}
|
|
73
|
-
.phone-input input::placeholder,
|
|
74
|
-
.phone-dropdown input::placeholder {
|
|
75
|
-
opacity: 0.5;
|
|
76
|
-
}
|
|
77
|
-
.phone-input input:disabled,
|
|
78
|
-
.phone-dropdown input:disabled {
|
|
79
|
-
cursor: not-allowed;
|
|
80
|
-
}.phone-input[data-v-d730aa54],
|
|
81
|
-
.phone-dropdown[data-v-d730aa54] {
|
|
82
|
-
font-size: var(--pi-font-size);
|
|
83
|
-
background: var(--pi-bg);
|
|
84
|
-
color: var(--pi-fg);
|
|
85
|
-
border-radius: var(--pi-radius);
|
|
86
|
-
border: 1px solid var(--pi-border);
|
|
87
|
-
}
|
|
88
|
-
.phone-input[data-v-d730aa54] {
|
|
89
|
-
position: relative;
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: stretch;
|
|
92
|
-
width: 100%;
|
|
93
|
-
}
|
|
94
|
-
.phone-input[data-v-d730aa54]:focus-within {
|
|
95
|
-
outline: var(--pi-focus-ring);
|
|
96
|
-
}
|
|
97
|
-
.phone-input.is-incomplete[data-v-d730aa54] {
|
|
98
|
-
border-color: var(--pi-warning);
|
|
99
|
-
}
|
|
100
|
-
.phone-input.is-incomplete[data-v-d730aa54]:focus-within {
|
|
101
|
-
outline: var(--pi-focus-ring-warning);
|
|
102
|
-
}
|
|
103
|
-
.phone-input.is-complete[data-v-d730aa54] {
|
|
104
|
-
border-color: var(--pi-success);
|
|
105
|
-
}
|
|
106
|
-
.phone-input.is-complete[data-v-d730aa54]:focus-within {
|
|
107
|
-
outline: var(--pi-focus-ring-success);
|
|
108
|
-
}
|
|
109
|
-
.phone-input.is-disabled[data-v-d730aa54] {
|
|
110
|
-
background: var(--pi-disabled-bg);
|
|
111
|
-
color: var(--pi-disabled-fg);
|
|
112
|
-
}
|
|
113
|
-
.phone-input.is-readonly[data-v-d730aa54] {
|
|
114
|
-
cursor: default;
|
|
115
|
-
}
|
|
116
|
-
.phone-input.size-compact[data-v-d730aa54] {
|
|
117
|
-
--pi-font-size: 14px;
|
|
118
|
-
--pi-height: 36px;
|
|
119
|
-
--pi-padding: 10px;
|
|
120
|
-
--pi-actions-size: 24px;
|
|
121
|
-
}
|
|
122
|
-
.phone-input.size-large[data-v-d730aa54] {
|
|
123
|
-
--pi-font-size: 18px;
|
|
124
|
-
--pi-height: 52px;
|
|
125
|
-
--pi-padding: 16px;
|
|
126
|
-
--pi-actions-size: 32px;
|
|
127
|
-
}
|
|
128
|
-
.phone-input.is-unstyled[data-v-d730aa54] {
|
|
129
|
-
all: initial;
|
|
130
|
-
display: block;
|
|
131
|
-
}
|
|
132
|
-
.pi-selector[data-v-d730aa54] {
|
|
133
|
-
flex-shrink: 0;
|
|
134
|
-
}
|
|
135
|
-
.pi-selector-btn[data-v-d730aa54] {
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
gap: 6px;
|
|
139
|
-
padding-left: var(--pi-padding);
|
|
140
|
-
padding-right: 0;
|
|
141
|
-
min-height: var(--pi-height);
|
|
142
|
-
border: 1px solid transparent;
|
|
143
|
-
border-radius: var(--pi-radius) 0 0 var(--pi-radius);
|
|
144
|
-
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
145
|
-
}
|
|
146
|
-
.pi-selector-btn.no-dropdown[data-v-d730aa54] {
|
|
147
|
-
cursor: default;
|
|
148
|
-
}
|
|
149
|
-
.pi-selector-btn[data-v-d730aa54]:focus-visible {
|
|
150
|
-
border-color: var(--pi-border-focus);
|
|
151
|
-
outline: none;
|
|
152
|
-
}
|
|
153
|
-
.pi-selector-btn:disabled > .pi-flag[data-v-d730aa54] {
|
|
154
|
-
opacity: 0.5;
|
|
155
|
-
}
|
|
156
|
-
.pi-flag[data-v-d730aa54] {
|
|
157
|
-
font-size: 1.25em;
|
|
158
|
-
line-height: 1;
|
|
159
|
-
display: inline-flex;
|
|
160
|
-
}
|
|
161
|
-
.pi-chevron[data-v-d730aa54] {
|
|
162
|
-
margin-left: 2px;
|
|
163
|
-
color: var(--pi-muted);
|
|
164
|
-
transition: transform 200ms ease;
|
|
165
|
-
}
|
|
166
|
-
.pi-chevron.is-open[data-v-d730aa54] {
|
|
167
|
-
transform: rotate(180deg);
|
|
168
|
-
}
|
|
169
|
-
.pi-input-wrap[data-v-d730aa54] {
|
|
170
|
-
flex: 1;
|
|
171
|
-
position: relative;
|
|
172
|
-
display: flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
}
|
|
175
|
-
.pi-input[data-v-d730aa54] {
|
|
176
|
-
flex: 1;
|
|
177
|
-
width: 100%;
|
|
178
|
-
padding-left: var(--pi-padding);
|
|
179
|
-
padding-right: calc((var(--pi-actions-size) + 2px) * var(--pi-actions-count) + var(--pi-padding));
|
|
180
|
-
min-height: var(--pi-height);
|
|
181
|
-
border-radius: 0 var(--pi-radius) var(--pi-radius) 0;
|
|
182
|
-
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
183
|
-
}
|
|
184
|
-
.pi-input[data-v-d730aa54]:hover:not(:disabled):not(:read-only) {
|
|
185
|
-
border-color: var(--pi-border-hover);
|
|
186
|
-
}
|
|
187
|
-
.pi-input[data-v-d730aa54]:focus {
|
|
188
|
-
border-color: var(--pi-border-focus);
|
|
189
|
-
position: relative;
|
|
190
|
-
}
|
|
191
|
-
.pi-actions[data-v-d730aa54] {
|
|
192
|
-
position: absolute;
|
|
193
|
-
right: 2px;
|
|
194
|
-
top: 50%;
|
|
195
|
-
transform: translateY(-50%);
|
|
196
|
-
display: inline-flex;
|
|
197
|
-
align-items: center;
|
|
198
|
-
gap: 2px;
|
|
199
|
-
}
|
|
200
|
-
.pi-btn[data-v-d730aa54] {
|
|
201
|
-
display: flex;
|
|
202
|
-
align-items: center;
|
|
203
|
-
justify-content: center;
|
|
204
|
-
width: var(--pi-actions-size);
|
|
205
|
-
height: var(--pi-actions-size);
|
|
206
|
-
background: transparent;
|
|
207
|
-
color: var(--pi-muted);
|
|
208
|
-
border: none;
|
|
209
|
-
border-radius: 9999px;
|
|
210
|
-
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
211
|
-
}
|
|
212
|
-
.pi-btn[data-v-d730aa54]:hover {
|
|
213
|
-
background: var(--pi-disabled-bg);
|
|
214
|
-
color: var(--pi-fg);
|
|
215
|
-
}
|
|
216
|
-
.pi-btn[data-v-d730aa54]:active:not(:disabled) {
|
|
217
|
-
transform: scale(0.95);
|
|
218
|
-
}
|
|
219
|
-
.pi-btn[data-v-d730aa54]:focus {
|
|
220
|
-
outline: 1px solid var(--pi-border-focus);
|
|
221
|
-
outline-offset: -1px;
|
|
222
|
-
}
|
|
223
|
-
.pi-btn.is-copied[data-v-d730aa54] {
|
|
224
|
-
color: var(--pi-success);
|
|
225
|
-
border-color: var(--pi-success);
|
|
226
|
-
}
|
|
227
|
-
.pi-btn svg[data-v-d730aa54] {
|
|
228
|
-
flex-shrink: 0;
|
|
229
|
-
}
|
|
230
|
-
.phone-dropdown[data-v-d730aa54] {
|
|
231
|
-
position: absolute;
|
|
232
|
-
z-index: 9999;
|
|
233
|
-
max-width: 400px;
|
|
234
|
-
box-shadow: var(--pi-shadow-lg);
|
|
235
|
-
overflow: hidden;
|
|
236
|
-
}
|
|
237
|
-
.pi-search-wrap[data-v-d730aa54] {
|
|
238
|
-
padding: 8px;
|
|
239
|
-
border-bottom: 1px solid var(--pi-border);
|
|
240
|
-
}
|
|
241
|
-
.pi-search[data-v-d730aa54] {
|
|
242
|
-
width: 100%;
|
|
243
|
-
padding: 8px 12px;
|
|
244
|
-
font-size: 0.875em;
|
|
245
|
-
border: 1px solid var(--pi-border);
|
|
246
|
-
border-radius: calc(var(--pi-radius) - 2px);
|
|
247
|
-
background: var(--pi-bg);
|
|
248
|
-
transition: border-color 150ms ease;
|
|
249
|
-
}
|
|
250
|
-
.pi-search[data-v-d730aa54]:focus {
|
|
251
|
-
border-color: var(--pi-border-focus);
|
|
252
|
-
}
|
|
253
|
-
.pi-options[data-v-d730aa54] {
|
|
254
|
-
max-height: 300px;
|
|
255
|
-
overflow-y: auto;
|
|
256
|
-
padding: 4px 0;
|
|
257
|
-
margin: 0;
|
|
258
|
-
list-style: none;
|
|
259
|
-
}
|
|
260
|
-
.pi-options[data-v-d730aa54]::-webkit-scrollbar {
|
|
261
|
-
width: 8px;
|
|
262
|
-
}
|
|
263
|
-
.pi-options[data-v-d730aa54]::-webkit-scrollbar-track {
|
|
264
|
-
background: transparent;
|
|
265
|
-
}
|
|
266
|
-
.pi-options[data-v-d730aa54]::-webkit-scrollbar-thumb {
|
|
267
|
-
background: var(--pi-border);
|
|
268
|
-
border-radius: 4px;
|
|
269
|
-
}
|
|
270
|
-
.pi-options[data-v-d730aa54]::-webkit-scrollbar-thumb:hover {
|
|
271
|
-
background: var(--pi-border-hover);
|
|
272
|
-
}
|
|
273
|
-
.pi-option[data-v-d730aa54] {
|
|
274
|
-
display: flex;
|
|
275
|
-
align-items: center;
|
|
276
|
-
gap: 8px;
|
|
277
|
-
padding: 8px 12px;
|
|
278
|
-
cursor: pointer;
|
|
279
|
-
transition: background-color 100ms ease;
|
|
280
|
-
}
|
|
281
|
-
.pi-option[data-v-d730aa54]:hover, .pi-option.is-focused[data-v-d730aa54] {
|
|
282
|
-
background: var(--pi-disabled-bg);
|
|
283
|
-
}
|
|
284
|
-
.pi-option.is-selected[data-v-d730aa54] {
|
|
285
|
-
background: var(--pi-border);
|
|
286
|
-
font-weight: 500;
|
|
287
|
-
}
|
|
288
|
-
.pi-opt-name[data-v-d730aa54] {
|
|
289
|
-
flex: 1;
|
|
290
|
-
overflow: hidden;
|
|
291
|
-
text-overflow: ellipsis;
|
|
292
|
-
white-space: nowrap;
|
|
293
|
-
}
|
|
294
|
-
.pi-opt-code[data-v-d730aa54] {
|
|
295
|
-
color: var(--pi-muted);
|
|
296
|
-
font-size: 0.875em;
|
|
297
|
-
}
|
|
298
|
-
.pi-empty[data-v-d730aa54] {
|
|
299
|
-
padding: 12px;
|
|
300
|
-
text-align: center;
|
|
301
|
-
color: var(--pi-muted);
|
|
302
|
-
font-size: 0.875em;
|
|
303
|
-
}
|
|
304
|
-
.fade-enter-active[data-v-d730aa54],
|
|
305
|
-
.fade-leave-active[data-v-d730aa54] {
|
|
306
|
-
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
307
|
-
}
|
|
308
|
-
.fade-enter-from[data-v-d730aa54],
|
|
309
|
-
.fade-leave-to[data-v-d730aa54] {
|
|
310
|
-
opacity: 0;
|
|
311
|
-
transform: translateY(-50%) translateX(8px);
|
|
312
|
-
}
|
|
313
|
-
.fade-scale-enter-active[data-v-d730aa54],
|
|
314
|
-
.fade-scale-leave-active[data-v-d730aa54] {
|
|
315
|
-
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
316
|
-
}
|
|
317
|
-
.fade-scale-enter-from[data-v-d730aa54],
|
|
318
|
-
.fade-scale-leave-to[data-v-d730aa54] {
|
|
319
|
-
opacity: 0;
|
|
320
|
-
transform: scale(0.8);
|
|
321
|
-
}
|
|
322
|
-
.dropdown-enter-active[data-v-d730aa54],
|
|
323
|
-
.dropdown-leave-active[data-v-d730aa54] {
|
|
324
|
-
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
325
|
-
}
|
|
326
|
-
.dropdown-enter-from[data-v-d730aa54],
|
|
327
|
-
.dropdown-leave-to[data-v-d730aa54] {
|
|
328
|
-
opacity: 0;
|
|
329
|
-
transform: translateY(-8px);
|
|
330
|
-
}
|
|
331
|
-
.sr-only[data-v-d730aa54] {
|
|
332
|
-
position: absolute;
|
|
333
|
-
width: 1px;
|
|
334
|
-
height: 1px;
|
|
335
|
-
padding: 0;
|
|
336
|
-
margin: -1px;
|
|
337
|
-
overflow: hidden;
|
|
338
|
-
clip: rect(0, 0, 0, 0);
|
|
339
|
-
white-space: nowrap;
|
|
340
|
-
border: 0;
|
|
341
|
-
}
|
|
342
|
-
@media (max-width: 480px) {
|
|
343
|
-
.phone-input[data-v-d730aa54] {
|
|
344
|
-
--pi-padding: 8px;
|
|
345
|
-
--pi-actions-size: 24px;
|
|
346
|
-
}
|
|
347
|
-
.size-compact[data-v-d730aa54] {
|
|
348
|
-
--pi-actions-size: 20px;
|
|
349
|
-
}
|
|
350
|
-
.phone-dropdown[data-v-d730aa54] {
|
|
351
|
-
left: 0;
|
|
352
|
-
right: 0;
|
|
353
|
-
max-width: none;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
@media (prefers-reduced-motion: reduce) {
|
|
357
|
-
[data-v-d730aa54] {
|
|
358
|
-
animation-duration: 0.01ms !important;
|
|
359
|
-
animation-iteration-count: 1 !important;
|
|
360
|
-
transition-duration: 0.01ms !important;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
1
|
+
.phone-input,.phone-dropdown{--pi-bg:#fff;--pi-fg:#111827;--pi-muted:#6b7280;--pi-border:#e5e7eb;--pi-border-hover:#d1d5db;--pi-border-focus:#3b82f6;--pi-radius:8px;--pi-padding:12px;--pi-font-size:16px;--pi-height:44px;--pi-actions-size:32px;--pi-shadow:0 1px 2px 0 #0000000d;--pi-shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d;--pi-warning:#f59e0b;--pi-warning-light:#fbbf24;--pi-success:#10b981;--pi-focus-ring:3px solid #3b82f626;--pi-focus-ring-warning:3px solid #f59e0b26;--pi-focus-ring-success:3px solid #10b98126;--pi-disabled-bg:#f9fafb;--pi-disabled-fg:#9ca3af}.phone-input.theme-dark,.phone-dropdown.theme-dark{--pi-bg:#1f2937;--pi-fg:#f9fafb;--pi-muted:#9ca3af;--pi-border:#374151;--pi-border-hover:#4b5563;--pi-border-focus:#60a5fa;--pi-shadow:0 1px 3px 0 #0000004d;--pi-shadow-lg:0 20px 25px -5px #0000004d, 0 10px 10px -5px #0003;--pi-warning:#fbbf24;--pi-warning-light:#fcd34d;--pi-focus-ring:3px solid #60a5fa33;--pi-focus-ring-warning:3px solid #fbbf1833;--pi-focus-ring-success:3px solid #10b98133;--pi-disabled-bg:#374151}.phone-input *,.phone-input :before,.phone-input :after,.phone-dropdown *,.phone-dropdown :before,.phone-dropdown :after{box-sizing:border-box}.phone-input button,.phone-input input,.phone-dropdown button,.phone-dropdown input{font:inherit;color:inherit;background:0 0;border:none;margin:0;padding:0}.phone-input button,.phone-dropdown button{cursor:pointer}.phone-input button:disabled,.phone-dropdown button:disabled{cursor:not-allowed}.phone-input input,.phone-dropdown input{outline:none}.phone-input input::placeholder,.phone-dropdown input::placeholder{opacity:.5}.phone-input input:disabled,.phone-dropdown input:disabled{cursor:not-allowed}.phone-input[data-v-d730aa54],.phone-dropdown[data-v-d730aa54]{font-size:var(--pi-font-size);background:var(--pi-bg);color:var(--pi-fg);border-radius:var(--pi-radius);border:1px solid var(--pi-border)}.phone-input[data-v-d730aa54]{align-items:stretch;width:100%;display:flex;position:relative}.phone-input[data-v-d730aa54]:focus-within{outline:var(--pi-focus-ring)}.phone-input.is-incomplete[data-v-d730aa54]{border-color:var(--pi-warning)}.phone-input.is-incomplete[data-v-d730aa54]:focus-within{outline:var(--pi-focus-ring-warning)}.phone-input.is-complete[data-v-d730aa54]{border-color:var(--pi-success)}.phone-input.is-complete[data-v-d730aa54]:focus-within{outline:var(--pi-focus-ring-success)}.phone-input.is-disabled[data-v-d730aa54]{background:var(--pi-disabled-bg);color:var(--pi-disabled-fg)}.phone-input.is-readonly[data-v-d730aa54]{cursor:default}.phone-input.size-compact[data-v-d730aa54]{--pi-font-size:14px;--pi-height:36px;--pi-padding:10px;--pi-actions-size:24px}.phone-input.size-large[data-v-d730aa54]{--pi-font-size:18px;--pi-height:52px;--pi-padding:16px;--pi-actions-size:32px}.phone-input.is-unstyled[data-v-d730aa54]{all:initial;display:block}.pi-selector[data-v-d730aa54]{flex-shrink:0}.pi-selector-btn[data-v-d730aa54]{padding-left:var(--pi-padding);min-height:var(--pi-height);border-radius:var(--pi-radius) 0 0 var(--pi-radius);border:1px solid #0000;align-items:center;gap:6px;padding-right:0;transition:all .15s cubic-bezier(.4,0,.2,1);display:flex}.pi-selector-btn.no-dropdown[data-v-d730aa54]{cursor:default}.pi-selector-btn[data-v-d730aa54]:focus-visible{border-color:var(--pi-border-focus);outline:none}.pi-selector-btn:disabled>.pi-flag[data-v-d730aa54]{opacity:.5}.pi-flag[data-v-d730aa54]{font-size:1.25em;line-height:1;display:inline-flex}.pi-chevron[data-v-d730aa54]{color:var(--pi-muted);margin-left:2px;transition:transform .2s}.pi-chevron.is-open[data-v-d730aa54]{transform:rotate(180deg)}.pi-input-wrap[data-v-d730aa54]{flex:1;align-items:center;display:flex;position:relative}.pi-input[data-v-d730aa54]{width:100%;padding-left:var(--pi-padding);padding-right:calc((var(--pi-actions-size) + 2px) * var(--pi-actions-count) + var(--pi-padding));min-height:var(--pi-height);border-radius:0 var(--pi-radius) var(--pi-radius) 0;flex:1;transition:all .15s cubic-bezier(.4,0,.2,1)}.pi-input[data-v-d730aa54]:hover:not(:disabled):not(:read-only){border-color:var(--pi-border-hover)}.pi-input[data-v-d730aa54]:focus{border-color:var(--pi-border-focus);position:relative}.pi-actions[data-v-d730aa54]{align-items:center;gap:2px;display:inline-flex;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.pi-btn[data-v-d730aa54]{width:var(--pi-actions-size);height:var(--pi-actions-size);color:var(--pi-muted);background:0 0;border:none;border-radius:9999px;justify-content:center;align-items:center;transition:all .15s cubic-bezier(.4,0,.2,1);display:flex}.pi-btn[data-v-d730aa54]:hover{background:var(--pi-disabled-bg);color:var(--pi-fg)}.pi-btn[data-v-d730aa54]:active:not(:disabled){transform:scale(.95)}.pi-btn[data-v-d730aa54]:focus{outline:1px solid var(--pi-border-focus);outline-offset:-1px}.pi-btn.is-copied[data-v-d730aa54]{color:var(--pi-success);border-color:var(--pi-success)}.pi-btn svg[data-v-d730aa54]{flex-shrink:0}.phone-dropdown[data-v-d730aa54]{z-index:9999;max-width:400px;box-shadow:var(--pi-shadow-lg);position:absolute;overflow:hidden}.pi-search-wrap[data-v-d730aa54]{border-bottom:1px solid var(--pi-border);padding:8px}.pi-search[data-v-d730aa54]{border:1px solid var(--pi-border);border-radius:calc(var(--pi-radius) - 2px);background:var(--pi-bg);width:100%;padding:8px 12px;font-size:.875em;transition:border-color .15s}.pi-search[data-v-d730aa54]:focus{border-color:var(--pi-border-focus)}.pi-options[data-v-d730aa54]{max-height:300px;margin:0;padding:4px 0;list-style:none;overflow-y:auto}.pi-options[data-v-d730aa54]::-webkit-scrollbar{width:8px}.pi-options[data-v-d730aa54]::-webkit-scrollbar-track{background:0 0}.pi-options[data-v-d730aa54]::-webkit-scrollbar-thumb{background:var(--pi-border);border-radius:4px}.pi-options[data-v-d730aa54]::-webkit-scrollbar-thumb:hover{background:var(--pi-border-hover)}.pi-option[data-v-d730aa54]{cursor:pointer;align-items:center;gap:8px;padding:8px 12px;transition:background-color .1s;display:flex}.pi-option[data-v-d730aa54]:hover,.pi-option.is-focused[data-v-d730aa54]{background:var(--pi-disabled-bg)}.pi-option.is-selected[data-v-d730aa54]{background:var(--pi-border);font-weight:500}.pi-opt-name[data-v-d730aa54]{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.pi-opt-code[data-v-d730aa54]{color:var(--pi-muted);font-size:.875em}.pi-empty[data-v-d730aa54]{text-align:center;color:var(--pi-muted);padding:12px;font-size:.875em}.fade-enter-active[data-v-d730aa54],.fade-leave-active[data-v-d730aa54]{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}.fade-enter-from[data-v-d730aa54],.fade-leave-to[data-v-d730aa54]{opacity:0;transform:translateY(-50%)translate(8px)}.fade-scale-enter-active[data-v-d730aa54],.fade-scale-leave-active[data-v-d730aa54]{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}.fade-scale-enter-from[data-v-d730aa54],.fade-scale-leave-to[data-v-d730aa54]{opacity:0;transform:scale(.8)}.dropdown-enter-active[data-v-d730aa54],.dropdown-leave-active[data-v-d730aa54]{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}.dropdown-enter-from[data-v-d730aa54],.dropdown-leave-to[data-v-d730aa54]{opacity:0;transform:translateY(-8px)}.sr-only[data-v-d730aa54]{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (width<=480px){.phone-input[data-v-d730aa54]{--pi-padding:8px;--pi-actions-size:24px}.size-compact[data-v-d730aa54]{--pi-actions-size:20px}.phone-dropdown[data-v-d730aa54]{max-width:none;left:0;right:0}}@media (prefers-reduced-motion:reduce){[data-v-d730aa54]{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { countPlaceholders, formatDigitsWithMap, pickMaskVariant, removeCountryCodePrefix
|
|
1
|
+
import { countPlaceholders, formatDigitsWithMap, pickMaskVariant, removeCountryCodePrefix } from '@desource/phone-mask';
|
|
2
2
|
import type { App } from 'vue';
|
|
3
3
|
import PhoneInput from './components/PhoneInput.vue';
|
|
4
4
|
import { vPhoneMask as phoneMaskDirective, setCountry as setPhoneMaskCountry } from './directives/vPhoneMask';
|
|
@@ -21,6 +21,5 @@ export declare const PMaskHelpers: {
|
|
|
21
21
|
formatDigitsWithMap: typeof formatDigitsWithMap;
|
|
22
22
|
pickMaskVariant: typeof pickMaskVariant;
|
|
23
23
|
removeCountryCodePrefix: typeof removeCountryCodePrefix;
|
|
24
|
-
toArray: typeof toArray;
|
|
25
24
|
};
|
|
26
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9G,KAAK,oBAAoB,GAAG,OAAO,UAAU,CAAC;AAC9C,KAAK,mBAAmB,GAAG,OAAO,kBAAkB,CAAC;AACrD,KAAK,wBAAwB,GAAG,OAAO,mBAAmB,CAAC;AAE3D,iBAAS,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAG/B;AAED,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,CAAC;AAEnH,OAAO,EAAE,UAAU,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,YAAY,EACV,WAAW,IAAI,gBAAgB,EAC/B,IAAI,IAAI,cAAc,EACtB,KAAK,IAAI,eAAe,EACxB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAC;;;;AAEjB,wBAEE;AAEF,YAAY,EACV,UAAU,IAAI,WAAW,EACzB,QAAQ,IAAI,SAAS,EACrB,WAAW,IAAI,YAAY,EAC3B,IAAI,IAAI,KAAK,EACb,OAAO,IAAI,QAAQ,EACnB,YAAY,IAAI,aAAa,EAC7B,eAAe,IAAI,gBAAgB,EACnC,QAAQ,IAAI,SAAS,EACrB,WAAW,IAAI,YAAY,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desource/phone-mask-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "🔌 Vue 3 component, composable, and directive for international phone number masking. Powered by @desource/phone-mask with Google libphonenumber sync.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -56,21 +56,22 @@
|
|
|
56
56
|
"vue": "^3.4.33"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@desource/phone-mask": "1.
|
|
59
|
+
"@desource/phone-mask": "1.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@testing-library/vue": "^8.1.0",
|
|
63
63
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
64
64
|
"vue": "^3.5.30",
|
|
65
|
-
"vue-tsc": "^3.2.
|
|
65
|
+
"vue-tsc": "^3.2.6"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"clean": "rimraf dist tsconfig.tsbuildinfo test-results coverage",
|
|
69
|
+
"clean:modules": "rimraf node_modules",
|
|
69
70
|
"dev": "vite demo",
|
|
70
71
|
"build": "pnpm clean && pnpm build:internal",
|
|
71
72
|
"build:internal": "pnpm build:lib && pnpm build:types",
|
|
72
73
|
"build:lib": "vite build",
|
|
73
|
-
"build:types": "vue-tsc
|
|
74
|
+
"build:types": "vue-tsc -p tsconfig.json",
|
|
74
75
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
75
76
|
"test:unit": "vitest run",
|
|
76
77
|
"test:unit:coverage": "vitest run --coverage.enabled --coverage.provider=v8 --coverage.reporter=lcov --coverage.reportsDirectory=coverage",
|