@volverjs/ui-vue 0.0.10-beta.50 → 0.0.10-beta.51
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/VvCombobox/VvCombobox.es.js +450 -438
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +3 -1
- package/dist/components/VvCombobox/index.d.ts +8 -0
- package/dist/components/VvInputText/VvInputText.es.js +11 -4
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +8 -8
- package/dist/components/VvInputText/index.d.ts +4 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +544 -530
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +8 -8
- package/dist/components/VvTextarea/index.d.ts +4 -4
- package/dist/components/index.es.js +217 -199
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +17 -11
- 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/VvCombobox/VvCombobox.vue +4 -2
- package/src/components/VvCombobox/index.ts +2 -0
- package/src/components/VvInputText/VvInputText.vue +1 -0
- package/src/components/VvTextarea/VvTextarea.vue +2 -2
- package/src/props/index.ts +12 -5
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends string | Option">
|
|
2
2
|
import type { Ref } from 'vue'
|
|
3
|
-
import type { Option } from '../../types/generic'
|
|
4
3
|
import { toRefs } from 'vue'
|
|
5
|
-
import {
|
|
4
|
+
import type { Option } from '../../types/generic'
|
|
6
5
|
import { DropdownRole } from '../../constants'
|
|
7
6
|
import HintSlotFactory from '../common/HintSlot'
|
|
8
7
|
import VvBadge from '../VvBadge/VvBadge.vue'
|
|
@@ -12,6 +11,7 @@ import VvDropdownOptgroup from '../VvDropdown/VvDropdownOptgroup.vue'
|
|
|
12
11
|
import VvDropdownOption from '../VvDropdown/VvDropdownOption.vue'
|
|
13
12
|
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
14
13
|
import VvSelect from '../VvSelect/VvSelect.vue'
|
|
14
|
+
import { type VvComboboxEvents, useVvComboboxProps } from '.'
|
|
15
15
|
|
|
16
16
|
// props, emit and slots
|
|
17
17
|
// WARNING: This is a provisiaonal implementation, it may change in the future
|
|
@@ -124,6 +124,7 @@ const {
|
|
|
124
124
|
iconPosition,
|
|
125
125
|
modifiers,
|
|
126
126
|
disabled,
|
|
127
|
+
required,
|
|
127
128
|
readonly,
|
|
128
129
|
loading,
|
|
129
130
|
valid,
|
|
@@ -198,6 +199,7 @@ const bemCssClasses = useModifiers(
|
|
|
198
199
|
modifiers,
|
|
199
200
|
computed(() => ({
|
|
200
201
|
'disabled': disabled.value,
|
|
202
|
+
'required': required.value,
|
|
201
203
|
'loading': isLoading.value,
|
|
202
204
|
'readonly': readonly.value,
|
|
203
205
|
'icon-before': hasIconBefore.value !== undefined,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
ModifiersProps,
|
|
15
15
|
OptionsProps,
|
|
16
16
|
ReadonlyProps,
|
|
17
|
+
RequiredProps,
|
|
17
18
|
TabindexProps,
|
|
18
19
|
ValidProps,
|
|
19
20
|
} from '../../props'
|
|
@@ -44,6 +45,7 @@ export const VvComboboxProps = {
|
|
|
44
45
|
...FloatingLabelProps,
|
|
45
46
|
...DropdownProps,
|
|
46
47
|
...LabelProps,
|
|
48
|
+
...RequiredProps,
|
|
47
49
|
/**
|
|
48
50
|
* Dropdown show / hide transition name
|
|
49
51
|
*/
|
|
@@ -402,6 +402,7 @@ const bemCssClasses = useModifiers(
|
|
|
402
402
|
'invalid': invalid.value,
|
|
403
403
|
'loading': loading.value,
|
|
404
404
|
'disabled': props.disabled,
|
|
405
|
+
'required': props.required,
|
|
405
406
|
'readonly': props.readonly,
|
|
406
407
|
'icon-before': !!hasIconBefore.value,
|
|
407
408
|
'icon-after': !!iconAfter.value,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { TextareaHTMLAttributes } from 'vue'
|
|
3
|
-
import { VvTextareaEvents, VvTextareaProps } from '.'
|
|
4
3
|
import HintSlotFactory from '../common/HintSlot'
|
|
5
4
|
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
5
|
+
import { VvTextareaEvents, VvTextareaProps } from '.'
|
|
6
6
|
|
|
7
7
|
// props, emit and slots
|
|
8
8
|
const props = defineProps(VvTextareaProps)
|
|
@@ -168,7 +168,7 @@ export default {
|
|
|
168
168
|
<template>
|
|
169
169
|
<div :class="bemCssClasses">
|
|
170
170
|
<label v-if="label" :for="hasId" class="vv-textarea__label">
|
|
171
|
-
{{ label }}
|
|
171
|
+
{{ label }} <span v-if="required">*</span>
|
|
172
172
|
</label>
|
|
173
173
|
<div class="vv-textarea__wrapper">
|
|
174
174
|
<!-- @slot Slot to replace icon before textarea -->
|
package/src/props/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
1
2
|
import type { VvIconProps } from '@/components/VvIcon'
|
|
2
3
|
import type {
|
|
3
4
|
AutoPlacementOptions,
|
|
@@ -8,7 +9,6 @@ import type {
|
|
|
8
9
|
} from '@/types/floating-ui'
|
|
9
10
|
import type { Option } from '@/types/generic'
|
|
10
11
|
import type { NavItem } from '@/types/nav'
|
|
11
|
-
import type { PropType } from 'vue'
|
|
12
12
|
import {
|
|
13
13
|
ActionTag,
|
|
14
14
|
ButtonType,
|
|
@@ -96,6 +96,16 @@ export const DisabledProps = {
|
|
|
96
96
|
},
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
export const RequiredProps = {
|
|
100
|
+
/**
|
|
101
|
+
* Whether the form control is required
|
|
102
|
+
*/
|
|
103
|
+
required: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false,
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
|
|
99
109
|
export const SelectedProps = {
|
|
100
110
|
/**
|
|
101
111
|
* Whether the item is selected
|
|
@@ -442,10 +452,7 @@ export const InputTextareaProps = {
|
|
|
442
452
|
* Available for all input types except color
|
|
443
453
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
444
454
|
*/
|
|
445
|
-
|
|
446
|
-
type: Boolean,
|
|
447
|
-
default: false,
|
|
448
|
-
},
|
|
455
|
+
...RequiredProps,
|
|
449
456
|
}
|
|
450
457
|
|
|
451
458
|
export const CheckboxRadioProps = {
|