@desource/phone-mask-vue 0.2.0 → 0.2.1
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 +9 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/phone-mask-vue.css +64 -64
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -667,7 +667,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
667
667
|
const usedLocale = vue.computed(() => {
|
|
668
668
|
if (props.locale) return props.locale;
|
|
669
669
|
if (typeof navigator !== "undefined") {
|
|
670
|
-
return navigator.language ||
|
|
670
|
+
return navigator.language || "en";
|
|
671
671
|
}
|
|
672
672
|
return "en";
|
|
673
673
|
});
|
|
@@ -1106,7 +1106,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
return target;
|
|
1108
1108
|
};
|
|
1109
|
-
const PhoneInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1109
|
+
const PhoneInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a8e96716"]]);
|
|
1110
1110
|
function getNavigatorLang() {
|
|
1111
1111
|
if (typeof navigator !== "undefined") {
|
|
1112
1112
|
return navigator.language || "";
|
package/dist/index.js
CHANGED
|
@@ -666,7 +666,7 @@ var lib = (function(exports, vue) {
|
|
|
666
666
|
const usedLocale = vue.computed(() => {
|
|
667
667
|
if (props.locale) return props.locale;
|
|
668
668
|
if (typeof navigator !== "undefined") {
|
|
669
|
-
return navigator.language ||
|
|
669
|
+
return navigator.language || "en";
|
|
670
670
|
}
|
|
671
671
|
return "en";
|
|
672
672
|
});
|
|
@@ -1105,7 +1105,7 @@ var lib = (function(exports, vue) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
return target;
|
|
1107
1107
|
};
|
|
1108
|
-
const PhoneInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1108
|
+
const PhoneInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a8e96716"]]);
|
|
1109
1109
|
function getNavigatorLang() {
|
|
1110
1110
|
if (typeof navigator !== "undefined") {
|
|
1111
1111
|
return navigator.language || "";
|
package/dist/index.mjs
CHANGED
|
@@ -665,7 +665,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
665
665
|
const usedLocale = computed(() => {
|
|
666
666
|
if (props.locale) return props.locale;
|
|
667
667
|
if (typeof navigator !== "undefined") {
|
|
668
|
-
return navigator.language ||
|
|
668
|
+
return navigator.language || "en";
|
|
669
669
|
}
|
|
670
670
|
return "en";
|
|
671
671
|
});
|
|
@@ -1104,7 +1104,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
return target;
|
|
1106
1106
|
};
|
|
1107
|
-
const PhoneInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1107
|
+
const PhoneInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a8e96716"]]);
|
|
1108
1108
|
function getNavigatorLang() {
|
|
1109
1109
|
if (typeof navigator !== "undefined") {
|
|
1110
1110
|
return navigator.language || "";
|
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-a8e96716],
|
|
81
|
+
.phone-dropdown[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716]: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-a8e96716] {
|
|
98
98
|
border-color: var(--pi-warning);
|
|
99
99
|
}
|
|
100
|
-
.phone-input.is-incomplete[data-v-
|
|
100
|
+
.phone-input.is-incomplete[data-v-a8e96716]: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-a8e96716] {
|
|
104
104
|
border-color: var(--pi-success);
|
|
105
105
|
}
|
|
106
|
-
.phone-input.is-complete[data-v-
|
|
106
|
+
.phone-input.is-complete[data-v-a8e96716]: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-a8e96716] {
|
|
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-a8e96716] {
|
|
114
114
|
cursor: default;
|
|
115
115
|
}
|
|
116
|
-
.phone-input.size-compact[data-v-
|
|
116
|
+
.phone-input.size-compact[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716] {
|
|
129
129
|
all: initial;
|
|
130
130
|
display: block;
|
|
131
131
|
}
|
|
132
|
-
.pi-selector[data-v-
|
|
132
|
+
.pi-selector[data-v-a8e96716] {
|
|
133
133
|
flex-shrink: 0;
|
|
134
134
|
}
|
|
135
|
-
.pi-selector-btn[data-v-
|
|
135
|
+
.pi-selector-btn[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
147
147
|
cursor: default;
|
|
148
148
|
}
|
|
149
|
-
.pi-selector-btn[data-v-
|
|
149
|
+
.pi-selector-btn[data-v-a8e96716]: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-a8e96716] {
|
|
154
154
|
opacity: 0.5;
|
|
155
155
|
}
|
|
156
|
-
.pi-flag[data-v-
|
|
156
|
+
.pi-flag[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716] {
|
|
167
167
|
transform: rotate(180deg);
|
|
168
168
|
}
|
|
169
|
-
.pi-input-wrap[data-v-
|
|
169
|
+
.pi-input-wrap[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716]: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-a8e96716]: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-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716]: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-a8e96716]:active:not(:disabled) {
|
|
217
217
|
transform: scale(0.95);
|
|
218
218
|
}
|
|
219
|
-
.pi-btn[data-v-
|
|
219
|
+
.pi-btn[data-v-a8e96716]: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-a8e96716] {
|
|
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-a8e96716] {
|
|
228
228
|
flex-shrink: 0;
|
|
229
229
|
}
|
|
230
|
-
.phone-dropdown[data-v-
|
|
230
|
+
.phone-dropdown[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716]:focus {
|
|
251
251
|
border-color: var(--pi-border-focus);
|
|
252
252
|
}
|
|
253
|
-
.pi-options[data-v-
|
|
253
|
+
.pi-options[data-v-a8e96716] {
|
|
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-a8e96716]::-webkit-scrollbar {
|
|
261
261
|
width: 8px;
|
|
262
262
|
}
|
|
263
|
-
.pi-options[data-v-
|
|
263
|
+
.pi-options[data-v-a8e96716]::-webkit-scrollbar-track {
|
|
264
264
|
background: transparent;
|
|
265
265
|
}
|
|
266
|
-
.pi-options[data-v-
|
|
266
|
+
.pi-options[data-v-a8e96716]::-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-a8e96716]::-webkit-scrollbar-thumb:hover {
|
|
271
271
|
background: var(--pi-border-hover);
|
|
272
272
|
}
|
|
273
|
-
.pi-option[data-v-
|
|
273
|
+
.pi-option[data-v-a8e96716] {
|
|
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-a8e96716]:hover, .pi-option.is-focused[data-v-a8e96716] {
|
|
282
282
|
background: var(--pi-disabled-bg);
|
|
283
283
|
}
|
|
284
|
-
.pi-option.is-selected[data-v-
|
|
284
|
+
.pi-option.is-selected[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
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-a8e96716] {
|
|
295
295
|
color: var(--pi-muted);
|
|
296
296
|
font-size: 0.875em;
|
|
297
297
|
}
|
|
298
|
-
.pi-empty[data-v-
|
|
298
|
+
.pi-empty[data-v-a8e96716] {
|
|
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-a8e96716],
|
|
305
|
+
.fade-leave-active[data-v-a8e96716] {
|
|
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-a8e96716],
|
|
309
|
+
.fade-leave-to[data-v-a8e96716] {
|
|
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-a8e96716],
|
|
314
|
+
.fade-scale-leave-active[data-v-a8e96716] {
|
|
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-a8e96716],
|
|
318
|
+
.fade-scale-leave-to[data-v-a8e96716] {
|
|
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-a8e96716],
|
|
323
|
+
.dropdown-leave-active[data-v-a8e96716] {
|
|
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-a8e96716],
|
|
327
|
+
.dropdown-leave-to[data-v-a8e96716] {
|
|
328
328
|
opacity: 0;
|
|
329
329
|
transform: translateY(-8px);
|
|
330
330
|
}
|
|
331
|
-
.sr-only[data-v-
|
|
331
|
+
.sr-only[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
344
344
|
--pi-padding: 8px;
|
|
345
345
|
--pi-actions-size: 24px;
|
|
346
346
|
}
|
|
347
|
-
.size-compact[data-v-
|
|
347
|
+
.size-compact[data-v-a8e96716] {
|
|
348
348
|
--pi-actions-size: 20px;
|
|
349
349
|
}
|
|
350
|
-
.phone-dropdown[data-v-
|
|
350
|
+
.phone-dropdown[data-v-a8e96716] {
|
|
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-a8e96716] {
|
|
358
358
|
animation-duration: 0.01ms !important;
|
|
359
359
|
animation-iteration-count: 1 !important;
|
|
360
360
|
transition-duration: 0.01ms !important;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desource/phone-mask-vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "🔌 Vue 3 component & directive for international phone number masking. Powered by @desource/phone-mask with Google libphonenumber sync.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"README.md"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@desource/phone-mask": "0.2.
|
|
56
|
+
"@desource/phone-mask": "0.2.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@vitejs/plugin-vue": "^6.0.1",
|