@volverjs/ui-vue 0.0.9-beta.15 → 0.0.9-beta.17
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/components/VvDialog/VvDialog.es.js +8 -4
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +12 -0
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +9 -0
- package/dist/components/VvInputText/index.d.ts +7 -0
- package/dist/components/index.es.js +20 -4
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/stories/InputText/InputText.settings.d.ts +48 -0
- package/package.json +1 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvDialog/VvDialog.vue +6 -2
- package/src/components/VvInputText/VvInputText.vue +5 -0
- package/src/components/VvInputText/index.ts +7 -0
- package/src/stories/InputText/InputText.settings.ts +48 -1
|
@@ -49,12 +49,16 @@
|
|
|
49
49
|
const transitioName = computed(() => `vv-dialog--${props.transition}`)
|
|
50
50
|
const dialogTransitionHandlers = {
|
|
51
51
|
'before-enter': () => {
|
|
52
|
-
dialogEl.value?.
|
|
52
|
+
if (!dialogEl.value?.open) {
|
|
53
|
+
dialogEl.value?.showModal()
|
|
54
|
+
}
|
|
53
55
|
emit('open')
|
|
54
56
|
emit('before-enter')
|
|
55
57
|
},
|
|
56
58
|
'after-leave': () => {
|
|
57
|
-
dialogEl.value?.
|
|
59
|
+
if (dialogEl.value?.open) {
|
|
60
|
+
dialogEl.value?.close()
|
|
61
|
+
}
|
|
58
62
|
emit('close')
|
|
59
63
|
emit('after-leave')
|
|
60
64
|
},
|
|
@@ -83,6 +83,11 @@
|
|
|
83
83
|
const isFocused = computed(
|
|
84
84
|
() => focused.value && !props.disabled && !props.readonly,
|
|
85
85
|
)
|
|
86
|
+
watch(isFocused, (newValue) => {
|
|
87
|
+
if (newValue && propsDefaults.value.selectOnFocus && inputEl.value) {
|
|
88
|
+
inputEl.value.select()
|
|
89
|
+
}
|
|
90
|
+
})
|
|
86
91
|
|
|
87
92
|
// visibility
|
|
88
93
|
const isVisible = useElementVisibility(inputEl)
|
|
@@ -196,6 +196,13 @@ export const VvInputTextProps = {
|
|
|
196
196
|
unit: {
|
|
197
197
|
type: String,
|
|
198
198
|
},
|
|
199
|
+
/**
|
|
200
|
+
* Select input text on focus
|
|
201
|
+
*/
|
|
202
|
+
selectOnFocus: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
default: false,
|
|
205
|
+
},
|
|
199
206
|
}
|
|
200
207
|
|
|
201
208
|
export type VvInputTextPropsTypes = ExtractPropTypes<typeof VvInputTextProps>
|
|
@@ -176,7 +176,6 @@ export const argTypes = {
|
|
|
176
176
|
},
|
|
177
177
|
mask: {
|
|
178
178
|
description: 'Input mask, only for text type',
|
|
179
|
-
|
|
180
179
|
control: {
|
|
181
180
|
type: 'text',
|
|
182
181
|
},
|
|
@@ -213,6 +212,54 @@ export const argTypes = {
|
|
|
213
212
|
},
|
|
214
213
|
},
|
|
215
214
|
},
|
|
215
|
+
autoWidth: {
|
|
216
|
+
description: 'Adjust input width to content',
|
|
217
|
+
control: {
|
|
218
|
+
type: 'boolean',
|
|
219
|
+
},
|
|
220
|
+
table: {
|
|
221
|
+
defaultValue: {
|
|
222
|
+
summary: false,
|
|
223
|
+
},
|
|
224
|
+
type: {
|
|
225
|
+
summary: 'boolean',
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
hideActions: {
|
|
230
|
+
description: 'Hide type number, password and search actions',
|
|
231
|
+
control: {
|
|
232
|
+
type: 'boolean',
|
|
233
|
+
},
|
|
234
|
+
table: {
|
|
235
|
+
defaultValue: {
|
|
236
|
+
summary: false,
|
|
237
|
+
},
|
|
238
|
+
type: {
|
|
239
|
+
summary: 'boolean',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
unit: {
|
|
244
|
+
description: 'Add unit label to input',
|
|
245
|
+
control: {
|
|
246
|
+
type: 'text',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
selectOnFocus: {
|
|
250
|
+
description: 'Select input text on focus',
|
|
251
|
+
control: {
|
|
252
|
+
type: 'boolean',
|
|
253
|
+
},
|
|
254
|
+
table: {
|
|
255
|
+
defaultValue: {
|
|
256
|
+
summary: false,
|
|
257
|
+
},
|
|
258
|
+
type: {
|
|
259
|
+
summary: 'boolean',
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
},
|
|
216
263
|
before: {
|
|
217
264
|
control: {
|
|
218
265
|
type: 'text',
|