@dimailn/vuetify 2.7.2-alpha46 → 2.7.2-alpha47
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/dist/vuetify.js +98 -96
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VIcon/VIcon.js +73 -93
- package/es5/components/VIcon/VIcon.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +3 -1
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/framework.js +1 -1
- package/lib/components/VIcon/VIcon.js +50 -96
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +8 -5
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/framework.js +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +2 -2
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +1 -1
- package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +1 -1
- package/src/components/VCheckbox/__tests__/__snapshots__/VCheckbox.spec.ts.snap +16 -13
- package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +5 -0
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +33 -24
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +10 -5
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataFooter.spec.ts.snap +50 -29
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataIterator.spec.ts.snap +38 -23
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +670 -438
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTableHeader.spec.ts.snap +88 -53
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +4 -4
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +68 -0
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +40 -0
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +40 -0
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +4 -0
- package/src/components/VExpansionPanel/__tests__/__snapshots__/VExpansionPanel.spec.ts.snap +1 -1
- package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +43 -43
- package/src/components/VIcon/VIcon.ts +50 -98
- package/src/components/VIcon/__tests__/VIcon.spec.ts +26 -5
- package/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap +11 -4
- package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +18 -2
- package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +1 -1
- package/src/components/VMenu/VMenu.ts +10 -7
- package/src/components/VOverflowBtn/__tests__/__snapshots__/VOverflowBtn.spec.ts.snap +10 -10
- package/src/components/VPagination/__tests__/__snapshots__/VPagination.spec.ts.snap +16 -16
- package/src/components/VRadioGroup/__tests__/__snapshots__/VRadio.spec.ts.snap +13 -11
- package/src/components/VRadioGroup/__tests__/__snapshots__/VRadioGroup.spec.ts.snap +1 -1
- package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +19 -7
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +29 -9
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +6 -2
- package/src/components/VStepper/__tests__/__snapshots__/VStepperStep.spec.ts.snap +6 -5
- package/src/components/VTextField/__tests__/__snapshots__/VTextField.spec.ts.snap +14 -12
- package/src/components/VTimeline/__tests__/__snapshots__/VTimelineItem.spec.ts.snap +2 -1
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeview.spec.ts.snap +42 -21
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeviewNode.spec.ts.snap +5 -4
|
@@ -4,7 +4,7 @@ exports[`VFileInput.ts should be unclearable 1`] = `
|
|
|
4
4
|
<div class="v-input theme--light v-text-field v-file-input">
|
|
5
5
|
<div class="v-input__prepend-outer">
|
|
6
6
|
<div class="v-input__icon v-input__icon--prepend">
|
|
7
|
-
<button class="v-icon--link v-icon notranslate
|
|
7
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
8
8
|
aria-hidden="false"
|
|
9
9
|
type="button"
|
|
10
10
|
aria-label="File input prepended action"
|
|
@@ -16,7 +16,7 @@ exports[`VFileInput.ts should be unclearable 1`] = `
|
|
|
16
16
|
<div class="v-input__slot">
|
|
17
17
|
<div class="v-text-field__slot">
|
|
18
18
|
<label class="v-label theme--light"
|
|
19
|
-
for="input-
|
|
19
|
+
for="input-36"
|
|
20
20
|
aria-hidden="false"
|
|
21
21
|
style="left: 0px; position: absolute;"
|
|
22
22
|
>
|
|
@@ -24,7 +24,7 @@ exports[`VFileInput.ts should be unclearable 1`] = `
|
|
|
24
24
|
</label>
|
|
25
25
|
<div class="v-file-input__text">
|
|
26
26
|
</div>
|
|
27
|
-
<input id="input-
|
|
27
|
+
<input id="input-36"
|
|
28
28
|
type="file"
|
|
29
29
|
>
|
|
30
30
|
</div>
|
|
@@ -43,7 +43,7 @@ exports[`VFileInput.ts should display file size 1`] = `
|
|
|
43
43
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
44
44
|
<div class="v-input__prepend-outer">
|
|
45
45
|
<div class="v-input__icon v-input__icon--prepend">
|
|
46
|
-
<button class="v-icon--link v-icon notranslate
|
|
46
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
47
47
|
aria-hidden="false"
|
|
48
48
|
type="button"
|
|
49
49
|
aria-label="File input prepended action"
|
|
@@ -55,7 +55,7 @@ exports[`VFileInput.ts should display file size 1`] = `
|
|
|
55
55
|
<div class="v-input__slot">
|
|
56
56
|
<div class="v-text-field__slot">
|
|
57
57
|
<label class="v-label v-label--active theme--light"
|
|
58
|
-
for="input-
|
|
58
|
+
for="input-21"
|
|
59
59
|
aria-hidden="false"
|
|
60
60
|
style="left: 0px; position: absolute;"
|
|
61
61
|
>
|
|
@@ -64,13 +64,13 @@ exports[`VFileInput.ts should display file size 1`] = `
|
|
|
64
64
|
<div class="v-file-input__text">
|
|
65
65
|
test (2.1 MB)
|
|
66
66
|
</div>
|
|
67
|
-
<input id="input-
|
|
67
|
+
<input id="input-21"
|
|
68
68
|
type="file"
|
|
69
69
|
>
|
|
70
70
|
</div>
|
|
71
71
|
<div class="v-input__append-inner">
|
|
72
72
|
<div class="v-input__icon v-input__icon--clear">
|
|
73
|
-
<button class="v-icon--link v-icon notranslate
|
|
73
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
74
74
|
aria-hidden="false"
|
|
75
75
|
type="button"
|
|
76
76
|
aria-label="Clear File input"
|
|
@@ -94,7 +94,7 @@ exports[`VFileInput.ts should display file size 2`] = `
|
|
|
94
94
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
95
95
|
<div class="v-input__prepend-outer">
|
|
96
96
|
<div class="v-input__icon v-input__icon--prepend">
|
|
97
|
-
<button class="v-icon--link v-icon notranslate
|
|
97
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
98
98
|
aria-hidden="false"
|
|
99
99
|
type="button"
|
|
100
100
|
aria-label="File input prepended action"
|
|
@@ -106,7 +106,7 @@ exports[`VFileInput.ts should display file size 2`] = `
|
|
|
106
106
|
<div class="v-input__slot">
|
|
107
107
|
<div class="v-text-field__slot">
|
|
108
108
|
<label class="v-label v-label--active theme--light"
|
|
109
|
-
for="input-
|
|
109
|
+
for="input-21"
|
|
110
110
|
aria-hidden="false"
|
|
111
111
|
style="left: 0px; position: absolute;"
|
|
112
112
|
>
|
|
@@ -115,13 +115,13 @@ exports[`VFileInput.ts should display file size 2`] = `
|
|
|
115
115
|
<div class="v-file-input__text">
|
|
116
116
|
test (2.1 MB)
|
|
117
117
|
</div>
|
|
118
|
-
<input id="input-
|
|
118
|
+
<input id="input-21"
|
|
119
119
|
type="file"
|
|
120
120
|
>
|
|
121
121
|
</div>
|
|
122
122
|
<div class="v-input__append-inner">
|
|
123
123
|
<div class="v-input__icon v-input__icon--clear">
|
|
124
|
-
<button class="v-icon--link v-icon notranslate
|
|
124
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
125
125
|
aria-hidden="false"
|
|
126
126
|
type="button"
|
|
127
127
|
aria-label="Clear File input"
|
|
@@ -145,7 +145,7 @@ exports[`VFileInput.ts should display total size in counter 1`] = `
|
|
|
145
145
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
146
146
|
<div class="v-input__prepend-outer">
|
|
147
147
|
<div class="v-input__icon v-input__icon--prepend">
|
|
148
|
-
<button class="v-icon--link v-icon notranslate
|
|
148
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
149
149
|
aria-hidden="false"
|
|
150
150
|
type="button"
|
|
151
151
|
aria-label="File input prepended action"
|
|
@@ -157,7 +157,7 @@ exports[`VFileInput.ts should display total size in counter 1`] = `
|
|
|
157
157
|
<div class="v-input__slot">
|
|
158
158
|
<div class="v-text-field__slot">
|
|
159
159
|
<label class="v-label v-label--active theme--light"
|
|
160
|
-
for="input-
|
|
160
|
+
for="input-28"
|
|
161
161
|
aria-hidden="false"
|
|
162
162
|
style="left: 0px; position: absolute;"
|
|
163
163
|
>
|
|
@@ -166,13 +166,13 @@ exports[`VFileInput.ts should display total size in counter 1`] = `
|
|
|
166
166
|
<div class="v-file-input__text">
|
|
167
167
|
2 files
|
|
168
168
|
</div>
|
|
169
|
-
<input id="input-
|
|
169
|
+
<input id="input-28"
|
|
170
170
|
type="file"
|
|
171
171
|
>
|
|
172
172
|
</div>
|
|
173
173
|
<div class="v-input__append-inner">
|
|
174
174
|
<div class="v-input__icon v-input__icon--clear">
|
|
175
|
-
<button class="v-icon--link v-icon notranslate
|
|
175
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
176
176
|
aria-hidden="false"
|
|
177
177
|
type="button"
|
|
178
178
|
aria-label="Clear File input"
|
|
@@ -199,7 +199,7 @@ exports[`VFileInput.ts should display total size in counter 2`] = `
|
|
|
199
199
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
200
200
|
<div class="v-input__prepend-outer">
|
|
201
201
|
<div class="v-input__icon v-input__icon--prepend">
|
|
202
|
-
<button class="v-icon--link v-icon notranslate
|
|
202
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
203
203
|
aria-hidden="false"
|
|
204
204
|
type="button"
|
|
205
205
|
aria-label="File input prepended action"
|
|
@@ -211,7 +211,7 @@ exports[`VFileInput.ts should display total size in counter 2`] = `
|
|
|
211
211
|
<div class="v-input__slot">
|
|
212
212
|
<div class="v-text-field__slot">
|
|
213
213
|
<label class="v-label v-label--active theme--light"
|
|
214
|
-
for="input-
|
|
214
|
+
for="input-28"
|
|
215
215
|
aria-hidden="false"
|
|
216
216
|
style="left: 0px; position: absolute;"
|
|
217
217
|
>
|
|
@@ -220,13 +220,13 @@ exports[`VFileInput.ts should display total size in counter 2`] = `
|
|
|
220
220
|
<div class="v-file-input__text">
|
|
221
221
|
2 files
|
|
222
222
|
</div>
|
|
223
|
-
<input id="input-
|
|
223
|
+
<input id="input-28"
|
|
224
224
|
type="file"
|
|
225
225
|
>
|
|
226
226
|
</div>
|
|
227
227
|
<div class="v-input__append-inner">
|
|
228
228
|
<div class="v-input__icon v-input__icon--clear">
|
|
229
|
-
<button class="v-icon--link v-icon notranslate
|
|
229
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
230
230
|
aria-hidden="false"
|
|
231
231
|
type="button"
|
|
232
232
|
aria-label="Clear File input"
|
|
@@ -253,7 +253,7 @@ exports[`VFileInput.ts should render 1`] = `
|
|
|
253
253
|
<div class="v-input theme--light v-text-field v-file-input">
|
|
254
254
|
<div class="v-input__prepend-outer">
|
|
255
255
|
<div class="v-input__icon v-input__icon--prepend">
|
|
256
|
-
<button class="v-icon--link v-icon notranslate
|
|
256
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
257
257
|
aria-hidden="false"
|
|
258
258
|
type="button"
|
|
259
259
|
aria-label="File input prepended action"
|
|
@@ -296,7 +296,7 @@ exports[`VFileInput.ts should render chips 1`] = `
|
|
|
296
296
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
297
297
|
<div class="v-input__prepend-outer">
|
|
298
298
|
<div class="v-input__icon v-input__icon--prepend">
|
|
299
|
-
<button class="v-icon--link v-icon notranslate
|
|
299
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
300
300
|
aria-hidden="false"
|
|
301
301
|
type="button"
|
|
302
302
|
aria-label="File input prepended action"
|
|
@@ -308,7 +308,7 @@ exports[`VFileInput.ts should render chips 1`] = `
|
|
|
308
308
|
<div class="v-input__slot">
|
|
309
309
|
<div class="v-text-field__slot">
|
|
310
310
|
<label class="v-label v-label--active theme--light"
|
|
311
|
-
for="input-
|
|
311
|
+
for="input-81"
|
|
312
312
|
aria-hidden="false"
|
|
313
313
|
style="left: 0px; position: absolute;"
|
|
314
314
|
>
|
|
@@ -321,13 +321,13 @@ exports[`VFileInput.ts should render chips 1`] = `
|
|
|
321
321
|
</span>
|
|
322
322
|
</span>
|
|
323
323
|
</div>
|
|
324
|
-
<input id="input-
|
|
324
|
+
<input id="input-81"
|
|
325
325
|
type="file"
|
|
326
326
|
>
|
|
327
327
|
</div>
|
|
328
328
|
<div class="v-input__append-inner">
|
|
329
329
|
<div class="v-input__icon v-input__icon--clear">
|
|
330
|
-
<button class="v-icon--link v-icon notranslate
|
|
330
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
331
331
|
aria-hidden="false"
|
|
332
332
|
type="button"
|
|
333
333
|
aria-label="Clear File input"
|
|
@@ -351,7 +351,7 @@ exports[`VFileInput.ts should render counter 1`] = `
|
|
|
351
351
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
352
352
|
<div class="v-input__prepend-outer">
|
|
353
353
|
<div class="v-input__icon v-input__icon--prepend">
|
|
354
|
-
<button class="v-icon--link v-icon notranslate
|
|
354
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
355
355
|
aria-hidden="false"
|
|
356
356
|
type="button"
|
|
357
357
|
aria-label="File input prepended action"
|
|
@@ -363,7 +363,7 @@ exports[`VFileInput.ts should render counter 1`] = `
|
|
|
363
363
|
<div class="v-input__slot">
|
|
364
364
|
<div class="v-text-field__slot">
|
|
365
365
|
<label class="v-label v-label--active theme--light"
|
|
366
|
-
for="input-
|
|
366
|
+
for="input-13"
|
|
367
367
|
aria-hidden="false"
|
|
368
368
|
style="left: 0px; position: absolute;"
|
|
369
369
|
>
|
|
@@ -372,13 +372,13 @@ exports[`VFileInput.ts should render counter 1`] = `
|
|
|
372
372
|
<div class="v-file-input__text">
|
|
373
373
|
test
|
|
374
374
|
</div>
|
|
375
|
-
<input id="input-
|
|
375
|
+
<input id="input-13"
|
|
376
376
|
type="file"
|
|
377
377
|
>
|
|
378
378
|
</div>
|
|
379
379
|
<div class="v-input__append-inner">
|
|
380
380
|
<div class="v-input__icon v-input__icon--clear">
|
|
381
|
-
<button class="v-icon--link v-icon notranslate
|
|
381
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
382
382
|
aria-hidden="false"
|
|
383
383
|
type="button"
|
|
384
384
|
aria-label="Clear File input"
|
|
@@ -405,7 +405,7 @@ exports[`VFileInput.ts should render multiple 1`] = `
|
|
|
405
405
|
<div class="v-input theme--light v-text-field v-file-input">
|
|
406
406
|
<div class="v-input__prepend-outer">
|
|
407
407
|
<div class="v-input__icon v-input__icon--prepend">
|
|
408
|
-
<button class="v-icon--link v-icon notranslate
|
|
408
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
409
409
|
aria-hidden="false"
|
|
410
410
|
type="button"
|
|
411
411
|
aria-label="File input prepended action"
|
|
@@ -417,7 +417,7 @@ exports[`VFileInput.ts should render multiple 1`] = `
|
|
|
417
417
|
<div class="v-input__slot">
|
|
418
418
|
<div class="v-text-field__slot">
|
|
419
419
|
<label class="v-label theme--light"
|
|
420
|
-
for="input-
|
|
420
|
+
for="input-7"
|
|
421
421
|
aria-hidden="false"
|
|
422
422
|
style="left: 0px; position: absolute;"
|
|
423
423
|
>
|
|
@@ -425,7 +425,7 @@ exports[`VFileInput.ts should render multiple 1`] = `
|
|
|
425
425
|
</label>
|
|
426
426
|
<div class="v-file-input__text">
|
|
427
427
|
</div>
|
|
428
|
-
<input id="input-
|
|
428
|
+
<input id="input-7"
|
|
429
429
|
type="file"
|
|
430
430
|
multiple
|
|
431
431
|
>
|
|
@@ -449,7 +449,7 @@ exports[`VFileInput.ts should render small chips 1`] = `
|
|
|
449
449
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-file-input">
|
|
450
450
|
<div class="v-input__prepend-outer">
|
|
451
451
|
<div class="v-input__icon v-input__icon--prepend">
|
|
452
|
-
<button class="v-icon--link v-icon notranslate
|
|
452
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
453
453
|
aria-hidden="false"
|
|
454
454
|
type="button"
|
|
455
455
|
aria-label="File input prepended action"
|
|
@@ -461,7 +461,7 @@ exports[`VFileInput.ts should render small chips 1`] = `
|
|
|
461
461
|
<div class="v-input__slot">
|
|
462
462
|
<div class="v-text-field__slot">
|
|
463
463
|
<label class="v-label v-label--active theme--light"
|
|
464
|
-
for="input-
|
|
464
|
+
for="input-89"
|
|
465
465
|
aria-hidden="false"
|
|
466
466
|
style="left: 0px; position: absolute;"
|
|
467
467
|
>
|
|
@@ -474,13 +474,13 @@ exports[`VFileInput.ts should render small chips 1`] = `
|
|
|
474
474
|
</span>
|
|
475
475
|
</span>
|
|
476
476
|
</div>
|
|
477
|
-
<input id="input-
|
|
477
|
+
<input id="input-89"
|
|
478
478
|
type="file"
|
|
479
479
|
>
|
|
480
480
|
</div>
|
|
481
481
|
<div class="v-input__append-inner">
|
|
482
482
|
<div class="v-input__icon v-input__icon--clear">
|
|
483
|
-
<button class="v-icon--link v-icon notranslate
|
|
483
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-close theme--light"
|
|
484
484
|
aria-hidden="false"
|
|
485
485
|
type="button"
|
|
486
486
|
aria-label="Clear File input"
|
|
@@ -506,7 +506,7 @@ exports[`VFileInput.ts should render with hideInput prop like original Vuetify 1
|
|
|
506
506
|
>
|
|
507
507
|
<div class="v-input__prepend-outer">
|
|
508
508
|
<div class="v-input__icon v-input__icon--prepend">
|
|
509
|
-
<button class="v-icon--link v-icon notranslate
|
|
509
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
510
510
|
aria-hidden="false"
|
|
511
511
|
type="button"
|
|
512
512
|
aria-label="File input prepended action"
|
|
@@ -520,7 +520,7 @@ exports[`VFileInput.ts should render with hideInput prop like original Vuetify 1
|
|
|
520
520
|
<div class="v-input__slot">
|
|
521
521
|
<div class="v-text-field__slot">
|
|
522
522
|
<label class="v-label theme--light"
|
|
523
|
-
for="input-
|
|
523
|
+
for="input-145"
|
|
524
524
|
aria-hidden="false"
|
|
525
525
|
style="left: 0px; position: absolute;"
|
|
526
526
|
>
|
|
@@ -529,7 +529,7 @@ exports[`VFileInput.ts should render with hideInput prop like original Vuetify 1
|
|
|
529
529
|
<div class="v-file-input__text">
|
|
530
530
|
</div>
|
|
531
531
|
<input accept="image/*"
|
|
532
|
-
id="input-
|
|
532
|
+
id="input-145"
|
|
533
533
|
type="file"
|
|
534
534
|
>
|
|
535
535
|
</div>
|
|
@@ -554,7 +554,7 @@ exports[`VFileInput.ts should render without icon 1`] = `
|
|
|
554
554
|
<div class="v-input__slot">
|
|
555
555
|
<div class="v-text-field__slot">
|
|
556
556
|
<label class="v-label theme--light"
|
|
557
|
-
for="input-
|
|
557
|
+
for="input-97"
|
|
558
558
|
aria-hidden="false"
|
|
559
559
|
style="left: 0px; position: absolute;"
|
|
560
560
|
>
|
|
@@ -562,7 +562,7 @@ exports[`VFileInput.ts should render without icon 1`] = `
|
|
|
562
562
|
</label>
|
|
563
563
|
<div class="v-file-input__text">
|
|
564
564
|
</div>
|
|
565
|
-
<input id="input-
|
|
565
|
+
<input id="input-97"
|
|
566
566
|
type="file"
|
|
567
567
|
>
|
|
568
568
|
</div>
|
|
@@ -585,7 +585,7 @@ exports[`VFileInput.ts should set display none if hide-input prop is set 1`] = `
|
|
|
585
585
|
<div class="v-input theme--light v-text-field v-file-input">
|
|
586
586
|
<div class="v-input__prepend-outer">
|
|
587
587
|
<div class="v-input__icon v-input__icon--prepend">
|
|
588
|
-
<button class="v-icon--link v-icon notranslate
|
|
588
|
+
<button class="v-icon--link v-icon notranslate mdi mdi-paperclip theme--light"
|
|
589
589
|
aria-hidden="false"
|
|
590
590
|
type="button"
|
|
591
591
|
aria-label="File input prepended action"
|
|
@@ -599,7 +599,7 @@ exports[`VFileInput.ts should set display none if hide-input prop is set 1`] = `
|
|
|
599
599
|
<div class="v-input__slot">
|
|
600
600
|
<div class="v-text-field__slot">
|
|
601
601
|
<label class="v-label theme--light"
|
|
602
|
-
for="input-
|
|
602
|
+
for="input-127"
|
|
603
603
|
aria-hidden="false"
|
|
604
604
|
style="left: 0px; position: absolute;"
|
|
605
605
|
>
|
|
@@ -607,7 +607,7 @@ exports[`VFileInput.ts should set display none if hide-input prop is set 1`] = `
|
|
|
607
607
|
</label>
|
|
608
608
|
<div class="v-file-input__text">
|
|
609
609
|
</div>
|
|
610
|
-
<input id="input-
|
|
610
|
+
<input id="input-127"
|
|
611
611
|
type="file"
|
|
612
612
|
>
|
|
613
613
|
</div>
|
|
@@ -33,11 +33,20 @@ function isSvgPath (icon: string): boolean {
|
|
|
33
33
|
return (/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(icon) && /[\dz]$/i.test(icon) && icon.length > 4)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function
|
|
37
|
-
|
|
36
|
+
function readFirstText (node: any): string {
|
|
37
|
+
if (!node) return ''
|
|
38
|
+
if (typeof node === 'string') return node.trim()
|
|
39
|
+
if (typeof node.children === 'string') return node.children.trim()
|
|
40
|
+
if (Array.isArray(node.children)) {
|
|
41
|
+
for (const child of node.children) {
|
|
42
|
+
const text = readFirstText(child)
|
|
43
|
+
if (text) return text
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return ''
|
|
38
47
|
}
|
|
39
48
|
|
|
40
|
-
export
|
|
49
|
+
export default mixins(
|
|
41
50
|
BindsAttrs,
|
|
42
51
|
Colorable,
|
|
43
52
|
Sizeable,
|
|
@@ -56,7 +65,9 @@ export const VIconInternal = mixins(
|
|
|
56
65
|
type: String,
|
|
57
66
|
required: false,
|
|
58
67
|
default: 'i'
|
|
59
|
-
}
|
|
68
|
+
},
|
|
69
|
+
textContent: String,
|
|
70
|
+
innerHTML: String
|
|
60
71
|
},
|
|
61
72
|
|
|
62
73
|
computed: {
|
|
@@ -73,15 +84,16 @@ export const VIconInternal = mixins(
|
|
|
73
84
|
methods: {
|
|
74
85
|
getIcon (): VuetifyIcon {
|
|
75
86
|
let iconName = ''
|
|
76
|
-
if (this
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
if (this.textContent) iconName = this.textContent.trim()
|
|
88
|
+
else if (this.innerHTML) iconName = this.innerHTML.trim()
|
|
89
|
+
else {
|
|
90
|
+
const slotChildren = this.$slots.default?.() || []
|
|
91
|
+
for (const child of slotChildren) {
|
|
92
|
+
iconName = readFirstText(child)
|
|
93
|
+
if (iconName) break
|
|
83
94
|
}
|
|
84
95
|
}
|
|
96
|
+
|
|
85
97
|
return remapInternalIcon(this, iconName)
|
|
86
98
|
},
|
|
87
99
|
getSize (): string | undefined {
|
|
@@ -123,30 +135,20 @@ export const VIconInternal = mixins(
|
|
|
123
135
|
return data
|
|
124
136
|
},
|
|
125
137
|
applyColors (data: any): void {
|
|
138
|
+
data.class = normalizeClasses([data.class, this.themeClasses])
|
|
126
139
|
this.setTextColor(this.color, data)
|
|
127
140
|
},
|
|
128
141
|
getSvgWrapperData () {
|
|
129
142
|
const fontSize = this.getSize()
|
|
130
|
-
|
|
131
|
-
const defaultData = this.getDefaultData()
|
|
132
|
-
const normalizedClasses = normalizeClasses([defaultData.class, this.themeClasses])
|
|
133
|
-
|
|
134
143
|
const wrapperData: any = {
|
|
135
|
-
|
|
136
|
-
'aria-hidden': defaultData['aria-hidden'],
|
|
137
|
-
type: defaultData.type,
|
|
144
|
+
...this.getDefaultData(),
|
|
138
145
|
style: fontSize
|
|
139
146
|
? {
|
|
140
147
|
fontSize,
|
|
141
148
|
height: fontSize,
|
|
142
149
|
width: fontSize
|
|
143
150
|
}
|
|
144
|
-
: undefined
|
|
145
|
-
...this.listeners$
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (this.hasClickListener && this.disabled) {
|
|
149
|
-
wrapperData.disabled = true
|
|
151
|
+
: undefined
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
this.applyColors(wrapperData)
|
|
@@ -155,7 +157,7 @@ export const VIconInternal = mixins(
|
|
|
155
157
|
},
|
|
156
158
|
renderFontIcon (icon: string): VNode {
|
|
157
159
|
const newChildren: VNodeChildren = []
|
|
158
|
-
const
|
|
160
|
+
const data = this.getDefaultData()
|
|
159
161
|
|
|
160
162
|
let iconType = 'material-icons'
|
|
161
163
|
// Material Icon delimiter is _
|
|
@@ -171,33 +173,18 @@ export const VIconInternal = mixins(
|
|
|
171
173
|
if (isFontAwesome5(iconType)) iconType = ''
|
|
172
174
|
}
|
|
173
175
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (!isMaterialIcon) {
|
|
177
|
-
iconClasses[icon] = true
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const allClasses = normalizeClasses([defaultData.class, this.themeClasses, iconClasses])
|
|
176
|
+
data.class[iconType] = true
|
|
177
|
+
data.class[icon] = !isMaterialIcon
|
|
181
178
|
|
|
182
179
|
const fontSize = this.getSize()
|
|
183
|
-
|
|
184
|
-
class: classesToString(allClasses),
|
|
185
|
-
'aria-hidden': defaultData['aria-hidden'],
|
|
186
|
-
type: defaultData.type,
|
|
187
|
-
style: fontSize ? { fontSize } : undefined,
|
|
188
|
-
...this.listeners$
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (this.hasClickListener && this.disabled) {
|
|
192
|
-
fontData.disabled = true
|
|
193
|
-
}
|
|
180
|
+
if (fontSize) data.style = { fontSize }
|
|
194
181
|
|
|
195
|
-
this.applyColors(
|
|
182
|
+
this.applyColors(data)
|
|
196
183
|
|
|
197
184
|
const el = this.hasClickListener ? 'button' : getTagValue(this.tag)
|
|
198
185
|
return typeof el === 'string'
|
|
199
|
-
? h(el,
|
|
200
|
-
: h(el,
|
|
186
|
+
? h(el, data, newChildren)
|
|
187
|
+
: h(el, data, { default: () => newChildren })
|
|
201
188
|
},
|
|
202
189
|
renderSvgIcon (icon: string): VNode {
|
|
203
190
|
const size = this.getSize()
|
|
@@ -228,29 +215,29 @@ export const VIconInternal = mixins(
|
|
|
228
215
|
renderSvgIconComponent (
|
|
229
216
|
icon: VuetifyIconComponent
|
|
230
217
|
): VNode {
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
218
|
+
const data: any = {
|
|
219
|
+
class: {
|
|
220
|
+
'v-icon__component': true
|
|
221
|
+
}
|
|
222
|
+
}
|
|
236
223
|
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
style
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
: undefined,
|
|
246
|
-
...icon.props
|
|
224
|
+
const size = this.getSize()
|
|
225
|
+
if (size) {
|
|
226
|
+
data.style = {
|
|
227
|
+
fontSize: size,
|
|
228
|
+
height: size,
|
|
229
|
+
width: size
|
|
230
|
+
}
|
|
247
231
|
}
|
|
248
232
|
|
|
249
|
-
this.applyColors(
|
|
233
|
+
this.applyColors(data)
|
|
234
|
+
|
|
235
|
+
const component = icon.component
|
|
236
|
+
Object.assign(data, icon.props)
|
|
250
237
|
|
|
251
238
|
return h(this.hasClickListener ? 'button' : 'span', this.getSvgWrapperData(), {
|
|
252
239
|
default: () => [
|
|
253
|
-
h(
|
|
240
|
+
h(component, data)
|
|
254
241
|
]
|
|
255
242
|
})
|
|
256
243
|
}
|
|
@@ -269,38 +256,3 @@ export const VIconInternal = mixins(
|
|
|
269
256
|
return this.renderSvgIconComponent(icon)
|
|
270
257
|
}
|
|
271
258
|
})
|
|
272
|
-
|
|
273
|
-
export default defineComponent({
|
|
274
|
-
name: 'v-icon',
|
|
275
|
-
|
|
276
|
-
$_wrapperFor: VIconInternal,
|
|
277
|
-
|
|
278
|
-
functional: true,
|
|
279
|
-
|
|
280
|
-
mounted () {
|
|
281
|
-
this.$el.innerHTML = ''
|
|
282
|
-
},
|
|
283
|
-
|
|
284
|
-
render (): VNode {
|
|
285
|
-
const data = { ...this.$attrs }
|
|
286
|
-
|
|
287
|
-
// console.log(children && children[0]?.children)
|
|
288
|
-
return h(VIconInternal, data, {
|
|
289
|
-
default: () => {
|
|
290
|
-
let iconName = ''
|
|
291
|
-
|
|
292
|
-
// Support usage of v-text and v-html
|
|
293
|
-
// if (data.domProps) {
|
|
294
|
-
if (this.$.vnode.props?.textContent) {
|
|
295
|
-
iconName = this.$.vnode.props.textContent ||
|
|
296
|
-
this.$.vnode.props.innerHTML ||
|
|
297
|
-
iconName
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const children = this.$slots.default?.()
|
|
301
|
-
|
|
302
|
-
return iconName ? [iconName] : children && children[0]?.children
|
|
303
|
-
}
|
|
304
|
-
})
|
|
305
|
-
}
|
|
306
|
-
})
|
|
@@ -11,9 +11,6 @@ import {
|
|
|
11
11
|
enableAutoUnmount
|
|
12
12
|
} from '@vue/test-utils'
|
|
13
13
|
|
|
14
|
-
// Импортируем внутренний компонент для прямого тестирования
|
|
15
|
-
import { VIconInternal } from '../VIcon'
|
|
16
|
-
|
|
17
14
|
interface MountContext {
|
|
18
15
|
props?: Record<string, any>
|
|
19
16
|
attrs?: Record<string, any>
|
|
@@ -201,6 +198,30 @@ describe('VIcon', () => {
|
|
|
201
198
|
expect(wrapper.element.classList).toContain('mdi')
|
|
202
199
|
expect(wrapper.element.classList).toContain('mdi-chevron-left')
|
|
203
200
|
})
|
|
201
|
+
|
|
202
|
+
it('should not render raw $mdi token from v-text in Vue 3', () => {
|
|
203
|
+
const wrapper = mount(VIcon, {
|
|
204
|
+
attrs: { textContent: '$mdiReddit' },
|
|
205
|
+
global: {
|
|
206
|
+
mocks: {
|
|
207
|
+
$vuetify: {
|
|
208
|
+
theme: {
|
|
209
|
+
current: 'light',
|
|
210
|
+
dark: false
|
|
211
|
+
},
|
|
212
|
+
icons: {
|
|
213
|
+
component: null,
|
|
214
|
+
values: {
|
|
215
|
+
mdiReddit: 'M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
expect(wrapper.html()).not.toContain('$mdiReddit')
|
|
224
|
+
})
|
|
204
225
|
})
|
|
205
226
|
|
|
206
227
|
it('should use an <i> tag if none provided', () => {
|
|
@@ -266,8 +287,8 @@ describe('VIcon', () => {
|
|
|
266
287
|
it('should render an svg icon', async () => {
|
|
267
288
|
const svgPath = 'M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z'
|
|
268
289
|
|
|
269
|
-
// Тестируем напрямую внутренний компонент
|
|
270
|
-
const directWrapper = mount(
|
|
290
|
+
// Тестируем напрямую внутренний компонент VIcon
|
|
291
|
+
const directWrapper = mount(VIcon, {
|
|
271
292
|
slots: {
|
|
272
293
|
default: () => svgPath
|
|
273
294
|
},
|