quasar 2.4.10 → 2.5.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/dist/api/BottomSheet.json +4 -0
- package/dist/api/Dialog.json +5 -1
- package/dist/api/LoadingBar.json +7 -0
- package/dist/api/Notify.json +20 -10
- package/dist/api/Platform.json +171 -0
- package/dist/api/QAjaxBar.json +13 -1
- package/dist/api/QBtnDropdown.json +4 -2
- package/dist/api/QCheckbox.json +27 -0
- package/dist/api/QEditor.json +4 -2
- package/dist/api/QExpansionItem.json +6 -3
- package/dist/api/QFab.json +4 -2
- package/dist/api/QFabAction.json +4 -2
- package/dist/api/QFile.json +4 -2
- package/dist/api/QImg.json +1 -2
- package/dist/api/QInnerLoading.json +2 -1
- package/dist/api/QInput.json +4 -2
- package/dist/api/QPagination.json +4 -2
- package/dist/api/QRadio.json +18 -0
- package/dist/api/QRange.json +9 -0
- package/dist/api/QScrollArea.json +13 -5
- package/dist/api/QSelect.json +6 -3
- package/dist/api/QSlider.json +9 -0
- package/dist/api/QSplitter.json +8 -4
- package/dist/api/QTable.json +9 -0
- package/dist/api/QTime.json +8 -2
- package/dist/api/QToggle.json +24 -24
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +39 -10
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +56 -23
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +32 -11
- package/dist/quasar.umd.js +276 -118
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/transforms/auto-import.json +39 -3
- package/dist/transforms/import-map.json +18 -0
- package/dist/types/api/slider.d.ts +6 -7
- package/dist/types/api/validation.d.ts +1 -1
- package/dist/types/api/vue-prop-types.ts +15 -0
- package/dist/types/api.d.ts +1 -0
- package/dist/types/index.d.ts +246 -188
- package/dist/types/utils/dom.d.ts +4 -2
- package/dist/types/utils.d.ts +3 -1
- package/dist/vetur/quasar-attributes.json +62 -42
- package/dist/vetur/quasar-tags.json +8 -3
- package/dist/web-types/web-types.json +103 -58
- package/package.json +13 -3
- package/src/components/ajax-bar/QAjaxBar.js +22 -12
- package/src/components/ajax-bar/QAjaxBar.json +16 -1
- package/src/components/avatar/__tests__/QAvatar.spec.js +121 -0
- package/src/components/badge/__tests__/QBadge.spec.js +74 -0
- package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
- package/src/components/btn/__tests__/QBtn.spec.js +55 -0
- package/src/components/btn/__tests__/use-btn.spec.js +189 -0
- package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
- package/src/components/checkbox/QCheckbox.js +34 -3
- package/src/components/checkbox/QCheckbox.json +17 -0
- package/src/components/checkbox/QCheckbox.sass +17 -5
- package/src/components/checkbox/use-checkbox.js +4 -0
- package/src/components/checkbox/use-checkbox.json +18 -0
- package/src/components/chip/__tests__/QChip.spec.js +155 -0
- package/src/components/date/__tests__/QDate.spec.js +189 -0
- package/src/components/date/__tests__/use-datetime.spec.js +83 -0
- package/src/components/dialog/QDialog.js +1 -1
- package/src/components/dialog/__tests__/QDialog.spec.js +129 -0
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/editor/QEditor.json +3 -1
- package/src/components/editor/__tests__/QEditor.spec.js +195 -0
- package/src/components/expansion-item/QExpansionItem.json +6 -3
- package/src/components/fab/use-fab.json +4 -2
- package/src/components/file/QFile.json +4 -2
- package/src/components/form/QForm.js +12 -2
- package/src/components/img/QImg.json +2 -3
- package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
- package/src/components/inner-loading/QInnerLoading.json +2 -1
- package/src/components/input/QInput.js +10 -1
- package/src/components/input/QInput.json +4 -2
- package/src/components/input/__tests__/QInput.spec.js +105 -0
- package/src/components/input/__tests__/use-mask.spec.js +29 -0
- package/src/components/menu/QMenu.js +2 -1
- package/src/components/menu/__tests__/QMenu.spec.js +610 -0
- package/src/components/menu/__tests__/WrapperOne.vue +51 -0
- package/src/components/menu/__tests__/WrapperTwo.vue +38 -0
- package/src/components/pagination/QPagination.json +4 -2
- package/src/components/radio/QRadio.js +26 -1
- package/src/components/radio/QRadio.json +16 -0
- package/src/components/radio/QRadio.sass +17 -6
- package/src/components/scroll-area/QScrollArea.js +21 -1
- package/src/components/scroll-area/QScrollArea.json +13 -5
- package/src/components/select/QSelect.js +13 -9
- package/src/components/select/QSelect.json +6 -3
- package/src/components/select/QSelect.sass +1 -0
- package/src/components/select/__tests__/QSelect.spec.js +2003 -0
- package/src/components/select/__tests__/WrapperOne.vue +28 -0
- package/src/components/slider/use-slider.json +9 -0
- package/src/components/splitter/QSplitter.json +8 -4
- package/src/components/stepper/QStep.js +19 -14
- package/src/components/stepper/QStepper.sass +3 -0
- package/src/components/table/QTable.json +9 -0
- package/src/components/table/__tests__/QTable.spec.js +635 -0
- package/src/components/table/__tests__/QTd.spec.js +35 -0
- package/src/components/table/__tests__/QTh.spec.js +27 -0
- package/src/components/table/__tests__/QTr.spec.js +27 -0
- package/src/components/tabs/QTabs.js +10 -2
- package/src/components/tabs/__tests__/QRouteTab.spec.js +9 -0
- package/src/components/tabs/__tests__/QTab.spec.js +79 -0
- package/src/components/tabs/__tests__/QTabs.spec.js +147 -0
- package/src/components/time/QTime.json +2 -2
- package/src/components/toggle/QToggle.js +5 -13
- package/src/components/toggle/QToggle.json +3 -12
- package/src/components/tree/QTree.js +5 -3
- package/src/components/uploader/__tests__/QUploader.spec.js +161 -0
- package/src/components/virtual-scroll/use-virtual-scroll.js +20 -9
- package/src/composables/private/__tests__/FieldWrapper.vue +39 -0
- package/src/composables/private/__tests__/use-anchor.spec.js +99 -0
- package/src/composables/private/__tests__/use-field.spec.js +351 -0
- package/src/composables/private/__tests__/use-file.spec.js +69 -0
- package/src/composables/private/__tests__/use-form.spec.js +11 -0
- package/src/composables/private/__tests__/use-fullscreen.spec.js +37 -0
- package/src/composables/private/__tests__/use-model-toggle.spec.js +306 -0
- package/src/composables/private/__tests__/use-portal.spec.js +4 -0
- package/src/composables/private/__tests__/use-router-link.spec.js +55 -0
- package/src/composables/private/__tests__/use-size.spec.js +37 -0
- package/src/composables/private/__tests__/use-transition.spec.js +108 -0
- package/src/composables/private/__tests__/use-validate.spec.js +111 -0
- package/src/composables/private/use-field.js +16 -9
- package/src/composables/private/use-fullscreen.js +1 -1
- package/src/composables/private/use-model-toggle.js +1 -1
- package/src/composables/private/use-validate.js +9 -5
- package/src/plugins/BottomSheet.json +1 -0
- package/src/plugins/Dialog.json +1 -0
- package/src/plugins/LoadingBar.js +3 -3
- package/src/plugins/LoadingBar.json +8 -0
- package/src/plugins/Meta.js +1 -1
- package/src/plugins/Notify.json +20 -10
- package/src/plugins/Platform.js +15 -8
- package/src/plugins/Platform.json +166 -0
- package/src/plugins/Screen.js +11 -8
- package/src/utils/date.js +5 -5
- package/src/utils/private/global-dialog.json +3 -0
- package/src/utils/private/vm.js +14 -8
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
describe('Editor API', () => {
|
|
2
|
+
describe('Props', () => {
|
|
3
|
+
describe('Category: behavior', () => {
|
|
4
|
+
describe('(prop): paragraph-tag', () => {
|
|
5
|
+
it.skip(' ', () => {
|
|
6
|
+
//
|
|
7
|
+
})
|
|
8
|
+
})
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
describe('Category: content', () => {
|
|
12
|
+
describe('(prop): placeholder', () => {
|
|
13
|
+
it.skip(' ', () => {
|
|
14
|
+
//
|
|
15
|
+
})
|
|
16
|
+
})
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
describe('Category: model', () => {
|
|
20
|
+
describe('(prop): model-value', () => {
|
|
21
|
+
it.skip(' ', () => {
|
|
22
|
+
//
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
describe('Category: state', () => {
|
|
28
|
+
describe('(prop): readonly', () => {
|
|
29
|
+
it.skip(' ', () => {
|
|
30
|
+
//
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
describe('(prop): disable', () => {
|
|
35
|
+
it.skip(' ', () => {
|
|
36
|
+
//
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
describe('Category: style', () => {
|
|
42
|
+
describe('(prop): square', () => {
|
|
43
|
+
it.skip(' ', () => {
|
|
44
|
+
//
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
describe('(prop): flat', () => {
|
|
49
|
+
it.skip(' ', () => {
|
|
50
|
+
//
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
describe('(prop): dense', () => {
|
|
55
|
+
it.skip(' ', () => {
|
|
56
|
+
//
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
describe('(prop): dark', () => {
|
|
61
|
+
it.skip(' ', () => {
|
|
62
|
+
//
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
describe('(prop): min-height', () => {
|
|
67
|
+
it.skip(' ', () => {
|
|
68
|
+
//
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
describe('(prop): max-height', () => {
|
|
73
|
+
it.skip(' ', () => {
|
|
74
|
+
//
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
describe('(prop): height', () => {
|
|
79
|
+
it.skip(' ', () => {
|
|
80
|
+
//
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
describe('(prop): content-style', () => {
|
|
85
|
+
it.skip(' ', () => {
|
|
86
|
+
//
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
describe('(prop): content-class', () => {
|
|
91
|
+
it.skip(' ', () => {
|
|
92
|
+
//
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
describe('Category: toolbar', () => {
|
|
98
|
+
describe('(prop): definitions', () => {
|
|
99
|
+
it.skip(' ', () => {
|
|
100
|
+
//
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
describe('(prop): fonts', () => {
|
|
105
|
+
it.skip(' ', () => {
|
|
106
|
+
//
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
describe('(prop): toolbar', () => {
|
|
111
|
+
it.skip(' ', () => {
|
|
112
|
+
//
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
describe('(prop): toolbar-color', () => {
|
|
117
|
+
it.skip(' ', () => {
|
|
118
|
+
//
|
|
119
|
+
})
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
describe('(prop): toolbar-text-color', () => {
|
|
123
|
+
it.skip(' ', () => {
|
|
124
|
+
//
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
describe('(prop): toolbar-toggle-color', () => {
|
|
129
|
+
it.skip(' ', () => {
|
|
130
|
+
//
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
describe('(prop): toolbar-bg', () => {
|
|
135
|
+
it.skip(' ', () => {
|
|
136
|
+
//
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
describe('Category: toolbar|style', () => {
|
|
142
|
+
describe('(prop): toolbar-outline', () => {
|
|
143
|
+
it.skip(' ', () => {
|
|
144
|
+
//
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
describe('(prop): toolbar-push', () => {
|
|
149
|
+
it.skip(' ', () => {
|
|
150
|
+
//
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
describe('(prop): toolbar-rounded', () => {
|
|
155
|
+
it.skip(' ', () => {
|
|
156
|
+
//
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
describe('Events', () => {
|
|
163
|
+
describe('(event): update:model-value', () => {
|
|
164
|
+
it.skip(' ', () => {
|
|
165
|
+
//
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
describe('Methods', () => {
|
|
171
|
+
describe('(method): runCmd', () => {
|
|
172
|
+
it.skip(' ', () => {
|
|
173
|
+
//
|
|
174
|
+
})
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
describe('(method): refreshToolbar', () => {
|
|
178
|
+
it.skip(' ', () => {
|
|
179
|
+
//
|
|
180
|
+
})
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
describe('(method): focus', () => {
|
|
184
|
+
it.skip(' ', () => {
|
|
185
|
+
//
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
describe('(method): getContentEl', () => {
|
|
190
|
+
it.skip(' ', () => {
|
|
191
|
+
//
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
})
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
"expand-icon-class": {
|
|
29
|
-
"type": [ "
|
|
29
|
+
"type": [ "String", "Array", "Object" ],
|
|
30
|
+
"tsType": "VueClassProp",
|
|
30
31
|
"desc": "Apply custom class(es) to the expand icon item section",
|
|
31
32
|
"examples": [ "text-purple" ],
|
|
32
33
|
"category": "style"
|
|
@@ -134,7 +135,8 @@
|
|
|
134
135
|
},
|
|
135
136
|
|
|
136
137
|
"header-style": {
|
|
137
|
-
"type": [ "
|
|
138
|
+
"type": [ "String", "Array", "Object" ],
|
|
139
|
+
"tsType": "VueStyleProp",
|
|
138
140
|
"desc": "Apply custom style to the header",
|
|
139
141
|
"examples": [
|
|
140
142
|
"background: '#ff0000'",
|
|
@@ -144,7 +146,8 @@
|
|
|
144
146
|
},
|
|
145
147
|
|
|
146
148
|
"header-class": {
|
|
147
|
-
"type": [ "
|
|
149
|
+
"type": [ "String", "Array", "Object" ],
|
|
150
|
+
"tsType": "VueClassProp",
|
|
148
151
|
"desc": "Apply custom class(es) to the header",
|
|
149
152
|
"examples": [
|
|
150
153
|
"my-custom-class",
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
|
|
89
89
|
"label-class": {
|
|
90
|
-
"type": [ "
|
|
90
|
+
"type": [ "String", "Array", "Object" ],
|
|
91
|
+
"tsType": "VueClassProp",
|
|
91
92
|
"desc": "Class definitions to be attributed to the label container",
|
|
92
93
|
"examples": [
|
|
93
94
|
"my-special-class",
|
|
@@ -97,7 +98,8 @@
|
|
|
97
98
|
},
|
|
98
99
|
|
|
99
100
|
"label-style": {
|
|
100
|
-
"type": [ "
|
|
101
|
+
"type": [ "String", "Array", "Object" ],
|
|
102
|
+
"tsType": "VueStyleProp",
|
|
101
103
|
"desc": "Style definitions to be attributed to the label container",
|
|
102
104
|
"examples": [
|
|
103
105
|
"background-color: #ff0000",
|
|
@@ -77,7 +77,8 @@
|
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
"input-class": {
|
|
80
|
-
"type": [ "
|
|
80
|
+
"type": [ "String", "Array", "Object" ],
|
|
81
|
+
"tsType": "VueClassProp",
|
|
81
82
|
"desc": "Class definitions to be attributed to the underlying selection container",
|
|
82
83
|
"examples": [
|
|
83
84
|
"my-special-class",
|
|
@@ -87,7 +88,8 @@
|
|
|
87
88
|
},
|
|
88
89
|
|
|
89
90
|
"input-style": {
|
|
90
|
-
"type": [ "
|
|
91
|
+
"type": [ "String", "Array", "Object" ],
|
|
92
|
+
"tsType": "VueStyleProp",
|
|
91
93
|
"desc": "Style definitions to be attributed to the underlying selection container",
|
|
92
94
|
"examples": [
|
|
93
95
|
"background-color: #ff0000",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ref, onMounted, getCurrentInstance, nextTick, provide } from 'vue'
|
|
1
|
+
import { h, ref, onActivated, onDeactivated, onMounted, getCurrentInstance, nextTick, provide } from 'vue'
|
|
2
2
|
|
|
3
3
|
import { createComponent } from '../../utils/private/create.js'
|
|
4
4
|
import { stopAndPrevent } from '../../utils/event.js'
|
|
@@ -144,7 +144,7 @@ export default createComponent({
|
|
|
144
144
|
const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
|
|
145
145
|
|| Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1)
|
|
146
146
|
|
|
147
|
-
target !== null && target !== void 0 && target.focus()
|
|
147
|
+
target !== null && target !== void 0 && target.focus({ preventScroll: true })
|
|
148
148
|
})
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -161,6 +161,16 @@ export default createComponent({
|
|
|
161
161
|
}
|
|
162
162
|
})
|
|
163
163
|
|
|
164
|
+
let shouldActivate = false
|
|
165
|
+
|
|
166
|
+
onDeactivated(() => {
|
|
167
|
+
shouldActivate = true
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
onActivated(() => {
|
|
171
|
+
shouldActivate === true && props.autofocus === true && focus()
|
|
172
|
+
})
|
|
173
|
+
|
|
164
174
|
onMounted(() => {
|
|
165
175
|
props.autofocus === true && focus()
|
|
166
176
|
})
|
|
@@ -53,13 +53,11 @@
|
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
"ratio": {
|
|
56
|
-
"type": [ "String", "Number" ],
|
|
57
56
|
"desc": "Force the component to maintain an aspect ratio",
|
|
58
57
|
"examples": [
|
|
59
58
|
"(Number format) :ratio=\"16/9\"",
|
|
60
59
|
"(String format) ratio=\"1\""
|
|
61
|
-
]
|
|
62
|
-
"category": "style"
|
|
60
|
+
]
|
|
63
61
|
},
|
|
64
62
|
|
|
65
63
|
"initial-ratio": {
|
|
@@ -162,6 +160,7 @@
|
|
|
162
160
|
|
|
163
161
|
"img-style": {
|
|
164
162
|
"type": "Object",
|
|
163
|
+
"tsType": "VueStyleObjectProp",
|
|
165
164
|
"desc": "Apply CSS to the native img element",
|
|
166
165
|
"examples": [ ":img-style=\"{ transform: 'rotate(45deg)' }\" "],
|
|
167
166
|
"category": "style"
|
|
@@ -41,7 +41,6 @@ export default createComponent({
|
|
|
41
41
|
const rootRef = ref(null)
|
|
42
42
|
|
|
43
43
|
let index = props.initialIndex || 0
|
|
44
|
-
let scrollPos = false
|
|
45
44
|
let localScrollTarget, poll
|
|
46
45
|
|
|
47
46
|
const classes = computed(() =>
|
|
@@ -180,8 +179,10 @@ export default createComponent({
|
|
|
180
179
|
watch(() => props.scrollTarget, updateScrollTarget)
|
|
181
180
|
watch(() => props.debounce, setDebounce)
|
|
182
181
|
|
|
182
|
+
let scrollPos = false
|
|
183
|
+
|
|
183
184
|
onActivated(() => {
|
|
184
|
-
if (
|
|
185
|
+
if (scrollPos !== false && localScrollTarget) {
|
|
185
186
|
setVerticalScrollPosition(localScrollTarget, scrollPos)
|
|
186
187
|
}
|
|
187
188
|
})
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
|
|
43
43
|
"label-style": {
|
|
44
|
-
"type": [ "
|
|
44
|
+
"type": [ "String", "Array", "Object" ],
|
|
45
|
+
"tsType": "VueStyleProp",
|
|
45
46
|
"desc": "Apply custom style to the label; Works along the 'label' prop only",
|
|
46
47
|
"examples": [
|
|
47
48
|
"font-size: 28px",
|
|
@@ -125,6 +125,15 @@ export default createComponent({
|
|
|
125
125
|
return attrs
|
|
126
126
|
})
|
|
127
127
|
|
|
128
|
+
// some browsers lose the native input value
|
|
129
|
+
// so we need to reattach it dynamically
|
|
130
|
+
// (like type="password" <-> type="text"; see #12078)
|
|
131
|
+
watch(() => props.type, () => {
|
|
132
|
+
if (inputRef.value) {
|
|
133
|
+
inputRef.value.value = props.modelValue
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
|
|
128
137
|
watch(() => props.modelValue, v => {
|
|
129
138
|
if (hasMask.value === true) {
|
|
130
139
|
if (stopValueWatcher === true) {
|
|
@@ -177,7 +186,7 @@ export default createComponent({
|
|
|
177
186
|
&& inputRef.value !== el
|
|
178
187
|
&& (el === null || el.id !== state.targetUid.value)
|
|
179
188
|
) {
|
|
180
|
-
inputRef.value.focus()
|
|
189
|
+
inputRef.value.focus({ preventScroll: true })
|
|
181
190
|
}
|
|
182
191
|
})
|
|
183
192
|
}
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
"input-class": {
|
|
56
|
-
"type": [ "
|
|
56
|
+
"type": [ "String", "Array", "Object" ],
|
|
57
|
+
"tsType": "VueClassProp",
|
|
57
58
|
"desc": "Class definitions to be attributed to the underlying input tag",
|
|
58
59
|
"examples": [
|
|
59
60
|
"my-special-class",
|
|
@@ -63,7 +64,8 @@
|
|
|
63
64
|
},
|
|
64
65
|
|
|
65
66
|
"input-style": {
|
|
66
|
-
"type": [ "
|
|
67
|
+
"type": [ "String", "Array", "Object" ],
|
|
68
|
+
"tsType": "VueStyleProp",
|
|
67
69
|
"desc": "Style definitions to be attributed to the underlying input tag",
|
|
68
70
|
"examples": [
|
|
69
71
|
"background-color: #ff0000",
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
describe('Input API', () => {
|
|
2
|
+
describe('Props', () => {
|
|
3
|
+
describe('Category: content', () => {
|
|
4
|
+
describe('(prop): shadow-text', () => {
|
|
5
|
+
it.skip(' ', () => {
|
|
6
|
+
//
|
|
7
|
+
})
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
describe('(prop): autogrow', () => {
|
|
11
|
+
it.skip(' ', () => {
|
|
12
|
+
//
|
|
13
|
+
})
|
|
14
|
+
})
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
describe('Category: general', () => {
|
|
18
|
+
describe('(prop): type', () => {
|
|
19
|
+
it.skip(' ', () => {
|
|
20
|
+
//
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
describe('Category: model', () => {
|
|
26
|
+
describe('(prop): model-value', () => {
|
|
27
|
+
it.skip(' ', () => {
|
|
28
|
+
//
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
describe('(prop): debounce', () => {
|
|
33
|
+
it.skip(' ', () => {
|
|
34
|
+
//
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
describe('(prop): maxlength', () => {
|
|
39
|
+
it.skip(' ', () => {
|
|
40
|
+
//
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
describe('Category: style', () => {
|
|
46
|
+
describe('(prop): input-class', () => {
|
|
47
|
+
it.skip(' ', () => {
|
|
48
|
+
//
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
describe('(prop): input-style', () => {
|
|
53
|
+
it.skip(' ', () => {
|
|
54
|
+
//
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
describe('Events', () => {
|
|
61
|
+
describe('(event): update:model-value', () => {
|
|
62
|
+
it.skip(' ', () => {
|
|
63
|
+
//
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
describe('(event): focus', () => {
|
|
68
|
+
it.skip(' ', () => {
|
|
69
|
+
//
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
describe('(event): blur', () => {
|
|
74
|
+
it.skip(' ', () => {
|
|
75
|
+
//
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
describe('Methods', () => {
|
|
81
|
+
describe('(method): focus', () => {
|
|
82
|
+
it.skip(' ', () => {
|
|
83
|
+
//
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
describe('(method): blur', () => {
|
|
88
|
+
it.skip(' ', () => {
|
|
89
|
+
//
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
describe('(method): select', () => {
|
|
94
|
+
it.skip(' ', () => {
|
|
95
|
+
//
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
describe('(method): getNativeElement', () => {
|
|
100
|
+
it.skip(' ', () => {
|
|
101
|
+
//
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
describe('use-mask API', () => {
|
|
2
|
+
describe('Props', () => {
|
|
3
|
+
describe('Category: behavior', () => {
|
|
4
|
+
describe('(prop): mask', () => {
|
|
5
|
+
it.skip(' ', () => {
|
|
6
|
+
//
|
|
7
|
+
})
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
describe('(prop): fill-mask', () => {
|
|
11
|
+
it.skip(' ', () => {
|
|
12
|
+
//
|
|
13
|
+
})
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
describe('(prop): reverse-fill-mask', () => {
|
|
17
|
+
it.skip(' ', () => {
|
|
18
|
+
//
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
describe('(prop): unmasked-value', () => {
|
|
23
|
+
it.skip(' ', () => {
|
|
24
|
+
//
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
})
|
|
@@ -181,7 +181,7 @@ export default createComponent({
|
|
|
181
181
|
|
|
182
182
|
if (node && node.contains(document.activeElement) !== true) {
|
|
183
183
|
node = node.querySelector('[autofocus], [data-autofocus]') || node
|
|
184
|
-
node.focus()
|
|
184
|
+
node.focus({ preventScroll: true })
|
|
185
185
|
}
|
|
186
186
|
})
|
|
187
187
|
}
|
|
@@ -309,6 +309,7 @@ export default createComponent({
|
|
|
309
309
|
// the focus is not in a vue child component
|
|
310
310
|
if (
|
|
311
311
|
handlesFocus.value === true
|
|
312
|
+
&& props.noFocus !== true
|
|
312
313
|
&& childHasFocus(innerRef.value, evt.target) !== true
|
|
313
314
|
) {
|
|
314
315
|
focus()
|