@volverjs/ui-vue 0.0.9-beta.7 → 0.0.9-beta.8
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/VvAlert/VvAlert.es.js +7 -6
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +6 -6
- package/dist/components/VvAlert/index.d.ts +3 -3
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +7 -6
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +65 -2
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +71 -3
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/VvCombobox/VvCombobox.es.js +62 -56
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +4 -4
- package/dist/components/VvInputText/VvInputText.es.js +61 -2
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvRadio/VvRadio.es.js +65 -2
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +71 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.es.js +61 -2
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +4 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +61 -2
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
- package/dist/components/common/HintSlot.d.ts +4 -3
- package/dist/components/index.es.js +104 -67
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.d.ts +1 -2
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/package.json +21 -21
- 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/VvAlert/VvAlert.vue +5 -1
- package/src/components/VvAlert/index.ts +3 -3
- package/src/components/VvCheckbox/VvCheckbox.vue +8 -1
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +8 -1
- package/src/components/VvCombobox/VvCombobox.vue +1 -1
- package/src/components/VvInputText/VvInputText.vue +8 -1
- package/src/components/VvRadio/VvRadio.vue +8 -1
- package/src/components/VvRadioGroup/VvRadioGroup.vue +8 -1
- package/src/components/VvSelect/VvSelect.vue +8 -1
- package/src/components/VvTextarea/VvTextarea.vue +8 -1
- package/src/components/common/HintSlot.ts +7 -2
- package/src/composables/index.ts +1 -3
|
@@ -34,7 +34,11 @@
|
|
|
34
34
|
<slot name="header">
|
|
35
35
|
<!-- @slot Before title slot -->
|
|
36
36
|
<slot name="title::before" />
|
|
37
|
-
<strong
|
|
37
|
+
<strong
|
|
38
|
+
v-if="$slots.title || title"
|
|
39
|
+
:id="hasTitleId"
|
|
40
|
+
class="vv-alert__title"
|
|
41
|
+
>
|
|
38
42
|
<!-- @slot Title slot -->
|
|
39
43
|
<slot name="title">
|
|
40
44
|
{{ title }}
|
|
@@ -40,7 +40,7 @@ export const VvAlertProps = {
|
|
|
40
40
|
*/
|
|
41
41
|
title: {
|
|
42
42
|
type: String,
|
|
43
|
-
default:
|
|
43
|
+
default: undefined,
|
|
44
44
|
},
|
|
45
45
|
/**
|
|
46
46
|
* The alert content
|
|
@@ -49,7 +49,7 @@ export const VvAlertProps = {
|
|
|
49
49
|
*/
|
|
50
50
|
content: {
|
|
51
51
|
type: String,
|
|
52
|
-
default:
|
|
52
|
+
default: undefined,
|
|
53
53
|
},
|
|
54
54
|
/**
|
|
55
55
|
* The alert footer
|
|
@@ -58,7 +58,7 @@ export const VvAlertProps = {
|
|
|
58
58
|
*/
|
|
59
59
|
footer: {
|
|
60
60
|
type: String,
|
|
61
|
-
default:
|
|
61
|
+
default: undefined,
|
|
62
62
|
},
|
|
63
63
|
/**
|
|
64
64
|
* The alert role
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
const emit = defineEmits(VvCheckboxEvents)
|
|
14
14
|
const slots = useSlots()
|
|
15
15
|
|
|
16
|
+
// props merged with volver defaults (now only for labels)
|
|
17
|
+
const propsDefaults = useDefaults<typeof VvCheckboxProps>(
|
|
18
|
+
'VvCheckbox',
|
|
19
|
+
VvCheckboxProps,
|
|
20
|
+
props,
|
|
21
|
+
)
|
|
22
|
+
|
|
16
23
|
// data
|
|
17
24
|
const {
|
|
18
25
|
id,
|
|
@@ -150,7 +157,7 @@
|
|
|
150
157
|
hasHintLabelOrSlot,
|
|
151
158
|
hasInvalidLabelOrSlot,
|
|
152
159
|
hintSlotScope,
|
|
153
|
-
} = HintSlotFactory(
|
|
160
|
+
} = HintSlotFactory(propsDefaults, slots)
|
|
154
161
|
</script>
|
|
155
162
|
|
|
156
163
|
<template>
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
const emit = defineEmits(VvCheckboxGroupEvents)
|
|
18
18
|
const slots = useSlots()
|
|
19
19
|
|
|
20
|
+
// props merged with volver defaults (now only for labels)
|
|
21
|
+
const propsDefaults = useDefaults<typeof VvCheckboxGroupProps>(
|
|
22
|
+
'VvCheckboxGroup',
|
|
23
|
+
VvCheckboxGroupProps,
|
|
24
|
+
props,
|
|
25
|
+
)
|
|
26
|
+
|
|
20
27
|
// data
|
|
21
28
|
const modelValue = useVModel(props, 'modelValue', emit)
|
|
22
29
|
const { disabled, readonly, vertical, valid, invalid, modifiers } =
|
|
@@ -56,7 +63,7 @@
|
|
|
56
63
|
value: getOptionValue(option),
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
|
-
const { HintSlot, hintSlotScope } = HintSlotFactory(
|
|
66
|
+
const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots)
|
|
60
67
|
</script>
|
|
61
68
|
|
|
62
69
|
<template>
|
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
const emit = defineEmits(VvInputTextEvents)
|
|
23
23
|
const slots = useSlots()
|
|
24
24
|
|
|
25
|
+
// props merged with volver defaults (now only for labels)
|
|
26
|
+
const propsDefaults = useDefaults<typeof VvInputTextProps>(
|
|
27
|
+
'VvInputText',
|
|
28
|
+
VvInputTextProps,
|
|
29
|
+
props,
|
|
30
|
+
)
|
|
31
|
+
|
|
25
32
|
// template refs
|
|
26
33
|
const inputEl = ref()
|
|
27
34
|
const innerEl = ref()
|
|
@@ -278,7 +285,7 @@
|
|
|
278
285
|
hasHintLabelOrSlot,
|
|
279
286
|
hasInvalidLabelOrSlot,
|
|
280
287
|
hintSlotScope,
|
|
281
|
-
} = HintSlotFactory(
|
|
288
|
+
} = HintSlotFactory(propsDefaults, slots)
|
|
282
289
|
const PasswordInputActions = VvInputTextActionsFactory(
|
|
283
290
|
INPUT_TYPES.PASSWORD,
|
|
284
291
|
props,
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
const emit = defineEmits(VvRadioEvents)
|
|
14
14
|
const slots = useSlots()
|
|
15
15
|
|
|
16
|
+
// props merged with volver defaults (now only for labels)
|
|
17
|
+
const propsDefaults = useDefaults<typeof VvRadioProps>(
|
|
18
|
+
'VvRadio',
|
|
19
|
+
VvRadioProps,
|
|
20
|
+
props,
|
|
21
|
+
)
|
|
22
|
+
|
|
16
23
|
// data
|
|
17
24
|
const { id, disabled, readonly, modelValue, valid, invalid } =
|
|
18
25
|
useGroupProps(props, emit)
|
|
@@ -77,7 +84,7 @@
|
|
|
77
84
|
hasHintLabelOrSlot,
|
|
78
85
|
hasInvalidLabelOrSlot,
|
|
79
86
|
hintSlotScope,
|
|
80
|
-
} = HintSlotFactory(
|
|
87
|
+
} = HintSlotFactory(propsDefaults, slots)
|
|
81
88
|
</script>
|
|
82
89
|
|
|
83
90
|
<template>
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
const emit = defineEmits(VvRadioGroupEvents)
|
|
18
18
|
const slots = useSlots()
|
|
19
19
|
|
|
20
|
+
// props merged with volver defaults (now only for labels)
|
|
21
|
+
const propsDefaults = useDefaults<typeof VvRadioGroupProps>(
|
|
22
|
+
'VvRadioGroup',
|
|
23
|
+
VvRadioGroupProps,
|
|
24
|
+
props,
|
|
25
|
+
)
|
|
26
|
+
|
|
20
27
|
// data
|
|
21
28
|
const modelValue = useVModel(props, 'modelValue', emit)
|
|
22
29
|
const { disabled, readonly, vertical, valid, invalid, modifiers } =
|
|
@@ -58,7 +65,7 @@
|
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
// hint
|
|
61
|
-
const { HintSlot, hintSlotScope } = HintSlotFactory(
|
|
68
|
+
const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots)
|
|
62
69
|
</script>
|
|
63
70
|
|
|
64
71
|
<template>
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
const emit = defineEmits(VvSelectEmits)
|
|
17
17
|
const slots = useSlots()
|
|
18
18
|
|
|
19
|
+
// props merged with volver defaults (now only for labels)
|
|
20
|
+
const propsDefaults = useDefaults<typeof VvSelectProps>(
|
|
21
|
+
'VvSelect',
|
|
22
|
+
VvSelectProps,
|
|
23
|
+
props,
|
|
24
|
+
)
|
|
25
|
+
|
|
19
26
|
// template refs
|
|
20
27
|
const select = ref()
|
|
21
28
|
|
|
@@ -25,7 +32,7 @@
|
|
|
25
32
|
hasHintLabelOrSlot,
|
|
26
33
|
hasInvalidLabelOrSlot,
|
|
27
34
|
hintSlotScope,
|
|
28
|
-
} = HintSlotFactory(
|
|
35
|
+
} = HintSlotFactory(propsDefaults, slots)
|
|
29
36
|
|
|
30
37
|
// data
|
|
31
38
|
const {
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
const emit = defineEmits(VvTextareaEvents)
|
|
16
16
|
const slots = useSlots()
|
|
17
17
|
|
|
18
|
+
// props merged with volver defaults (now only for labels)
|
|
19
|
+
const propsDefaults = useDefaults<typeof VvTextareaProps>(
|
|
20
|
+
'VvTextarea',
|
|
21
|
+
VvTextareaProps,
|
|
22
|
+
props,
|
|
23
|
+
)
|
|
24
|
+
|
|
18
25
|
// template refs
|
|
19
26
|
const textarea = ref()
|
|
20
27
|
|
|
@@ -91,7 +98,7 @@
|
|
|
91
98
|
hasHintLabelOrSlot,
|
|
92
99
|
hasInvalidLabelOrSlot,
|
|
93
100
|
hintSlotScope,
|
|
94
|
-
} = HintSlotFactory(
|
|
101
|
+
} = HintSlotFactory(propsDefaults, slots)
|
|
95
102
|
|
|
96
103
|
// styles
|
|
97
104
|
const bemCssClasses = useModifiers(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Slots } from 'vue'
|
|
2
|
+
import type { Ref } from 'vue'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Merge array of string
|
|
@@ -19,7 +20,7 @@ export type HintSlotProps = Readonly<
|
|
|
19
20
|
default: ''
|
|
20
21
|
required: true
|
|
21
22
|
}
|
|
22
|
-
modelValue:
|
|
23
|
+
modelValue: unknown
|
|
23
24
|
valid: BooleanConstructor
|
|
24
25
|
validLabel: (StringConstructor | ArrayConstructor)[]
|
|
25
26
|
invalid: BooleanConstructor
|
|
@@ -35,7 +36,11 @@ export type HintSlotProps = Readonly<
|
|
|
35
36
|
* @param {Slots} parentSlots vue slots
|
|
36
37
|
* @returns {Component} vue component
|
|
37
38
|
*/
|
|
38
|
-
export function HintSlotFactory(
|
|
39
|
+
export function HintSlotFactory(
|
|
40
|
+
propsOrRef: HintSlotProps | Ref<HintSlotProps>,
|
|
41
|
+
slots: Slots,
|
|
42
|
+
) {
|
|
43
|
+
const props = unref(propsOrRef)
|
|
39
44
|
// label
|
|
40
45
|
const invalidLabel = computed(() => joinLines(props.invalidLabel))
|
|
41
46
|
const validLabel = computed(() => joinLines(props.validLabel))
|
package/src/composables/index.ts
CHANGED