@volverjs/ui-vue 0.0.1-beta.11 → 0.0.1-beta.12
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/VvBadge/VvBadge.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +165 -12
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +4 -4
- package/dist/components/VvBreadcrumb/VvBreadcrumb.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +4 -4
- package/dist/components/VvButton/VvButton.d.ts +2 -33
- package/dist/components/VvButton/VvButton.es.js +183 -198
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +9 -44
- package/dist/components/VvButton/useButtonGroupProps.d.ts +1 -6
- package/dist/components/VvButtonGroup/VvButtonGroup.d.ts +2 -26
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +68 -78
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +9 -69
- package/dist/components/VvDropdown/VvDropdown.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +4 -4
- package/dist/components/VvInputText/VvInputText.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvProgress/VvProgress.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.d.ts +5 -1
- package/dist/components/VvSelect/VvSelect.es.js +395 -207
- package/dist/components/VvSelect/VvSelect.umd.js +2 -2
- package/dist/components/VvSelect/VvSelect.vue.d.ts +12 -5
- package/dist/components/VvTextarea/VvTextarea.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
- package/dist/components/index.es.js +579 -610
- package/dist/components/index.umd.js +2 -2
- package/dist/composables/group/types/IButtonGroupState.d.ts +4 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +553 -585
- package/dist/index.umd.js +2 -2
- package/dist/props/index.d.ts +2 -1
- package/dist/stories/RadioGroup/RadioOption.test.d.ts +4 -0
- package/dist/stories/RadioGroup/RadioProperty.test.d.ts +1 -1
- package/dist/stories/RadioGroup/RadioSlots.test.d.ts +6 -0
- package/package.json +2 -2
- 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/VvBadge/VvBadge.ts +4 -2
- package/src/components/VvBadge/VvBadge.vue +8 -3
- package/src/components/VvButton/VvButton.ts +4 -34
- package/src/components/VvButton/VvButton.vue +3 -12
- package/src/components/VvButton/useButtonGroupProps.ts +3 -11
- package/src/components/VvButtonGroup/VvButtonGroup.ts +4 -17
- package/src/components/VvButtonGroup/VvButtonGroup.vue +5 -16
- package/src/components/VvSelect/VvSelect.ts +5 -1
- package/src/components/VvSelect/VvSelect.vue +7 -1
- package/src/composables/group/types/IButtonGroupState.ts +4 -0
- package/src/props/index.ts +3 -1
- package/src/stories/Badge/BadgeColor.stories.mdx +4 -4
- package/src/stories/Badge/BadgeModifiers.stories.mdx +65 -0
- package/src/stories/Button/ButtonActive.stories.mdx +27 -0
- package/src/stories/Button/ButtonDisabled.stories.mdx +28 -0
- package/src/stories/Button/ButtonIconPosition.stories.mdx +0 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +103 -46
- package/src/stories/Button/ButtonSelected.stories.mdx +30 -0
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +2 -2
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +2 -2
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +6 -6
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +7 -2
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +7 -19
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +7 -19
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +3 -17
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +10 -9
- package/src/stories/RadioGroup/RadioOption.test.ts +45 -0
- package/src/stories/RadioGroup/RadioProperty.test.ts +4 -4
- package/src/stories/RadioGroup/RadioSlots.test.ts +29 -0
- package/src/stories/Select/SelectNative.stories.mdx +45 -0
- package/src/stories/stories.scss +5 -27
- package/src/stories/Button/ButtonVariant.stories.mdx +0 -205
- package/src/stories/Button/test.js +0 -41
- package/src/stories/Radio/RadioTest.js +0 -90
- package/src/stories/RadioGroup/RadioOptionsTest.js +0 -78
- package/src/stories/RadioGroup/RadioPropertyTest.js +0 -131
- package/src/stories/RadioGroup/RadioSlotsTest.js +0 -20
|
@@ -9,12 +9,7 @@ declare const _default: {
|
|
|
9
9
|
loading: boolean;
|
|
10
10
|
loadingIcon: string;
|
|
11
11
|
loadingLabel: string;
|
|
12
|
-
block: boolean;
|
|
13
12
|
active: boolean;
|
|
14
|
-
rounded: boolean;
|
|
15
|
-
fullBleed: boolean;
|
|
16
|
-
action: boolean;
|
|
17
|
-
actionQuiet: boolean;
|
|
18
13
|
selected: boolean;
|
|
19
14
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
20
15
|
icon: StringConstructor;
|
|
@@ -41,16 +36,11 @@ declare const _default: {
|
|
|
41
36
|
type: import("vue").PropType<import("./VvButton").ButtonTarget>;
|
|
42
37
|
validator: (value: string) => boolean;
|
|
43
38
|
};
|
|
44
|
-
block: BooleanConstructor;
|
|
45
39
|
active: BooleanConstructor;
|
|
46
|
-
rounded: BooleanConstructor;
|
|
47
|
-
disabled: BooleanConstructor;
|
|
48
|
-
fullBleed: BooleanConstructor;
|
|
49
|
-
action: BooleanConstructor;
|
|
50
|
-
actionQuiet: BooleanConstructor;
|
|
51
40
|
selected: BooleanConstructor;
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
disabled: BooleanConstructor;
|
|
42
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
43
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "iconPosition" | "loading" | "loadingIcon" | "loadingLabel" | "active" | "selected">;
|
|
54
44
|
$attrs: {
|
|
55
45
|
[x: string]: unknown;
|
|
56
46
|
};
|
|
@@ -89,27 +79,17 @@ declare const _default: {
|
|
|
89
79
|
type: import("vue").PropType<import("./VvButton").ButtonTarget>;
|
|
90
80
|
validator: (value: string) => boolean;
|
|
91
81
|
};
|
|
92
|
-
block: BooleanConstructor;
|
|
93
82
|
active: BooleanConstructor;
|
|
94
|
-
rounded: BooleanConstructor;
|
|
95
|
-
disabled: BooleanConstructor;
|
|
96
|
-
fullBleed: BooleanConstructor;
|
|
97
|
-
action: BooleanConstructor;
|
|
98
|
-
actionQuiet: BooleanConstructor;
|
|
99
83
|
selected: BooleanConstructor;
|
|
100
|
-
|
|
84
|
+
disabled: BooleanConstructor;
|
|
85
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
101
86
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
102
87
|
disabled: boolean;
|
|
103
88
|
iconPosition: ButtonIconPosition;
|
|
104
89
|
loading: boolean;
|
|
105
90
|
loadingIcon: string;
|
|
106
91
|
loadingLabel: string;
|
|
107
|
-
block: boolean;
|
|
108
92
|
active: boolean;
|
|
109
|
-
rounded: boolean;
|
|
110
|
-
fullBleed: boolean;
|
|
111
|
-
action: boolean;
|
|
112
|
-
actionQuiet: boolean;
|
|
113
93
|
selected: boolean;
|
|
114
94
|
}, {}, string> & {
|
|
115
95
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -156,15 +136,10 @@ declare const _default: {
|
|
|
156
136
|
type: import("vue").PropType<import("./VvButton").ButtonTarget>;
|
|
157
137
|
validator: (value: string) => boolean;
|
|
158
138
|
};
|
|
159
|
-
block: BooleanConstructor;
|
|
160
139
|
active: BooleanConstructor;
|
|
161
|
-
rounded: BooleanConstructor;
|
|
162
|
-
disabled: BooleanConstructor;
|
|
163
|
-
fullBleed: BooleanConstructor;
|
|
164
|
-
action: BooleanConstructor;
|
|
165
|
-
actionQuiet: BooleanConstructor;
|
|
166
140
|
selected: BooleanConstructor;
|
|
167
|
-
|
|
141
|
+
disabled: BooleanConstructor;
|
|
142
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
168
143
|
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
169
144
|
__isFragment?: undefined;
|
|
170
145
|
__isTeleport?: undefined;
|
|
@@ -194,27 +169,17 @@ declare const _default: {
|
|
|
194
169
|
type: import("vue").PropType<import("./VvButton").ButtonTarget>;
|
|
195
170
|
validator: (value: string) => boolean;
|
|
196
171
|
};
|
|
197
|
-
block: BooleanConstructor;
|
|
198
172
|
active: BooleanConstructor;
|
|
199
|
-
rounded: BooleanConstructor;
|
|
200
|
-
disabled: BooleanConstructor;
|
|
201
|
-
fullBleed: BooleanConstructor;
|
|
202
|
-
action: BooleanConstructor;
|
|
203
|
-
actionQuiet: BooleanConstructor;
|
|
204
173
|
selected: BooleanConstructor;
|
|
205
|
-
|
|
174
|
+
disabled: BooleanConstructor;
|
|
175
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
206
176
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
207
177
|
disabled: boolean;
|
|
208
178
|
iconPosition: ButtonIconPosition;
|
|
209
179
|
loading: boolean;
|
|
210
180
|
loadingIcon: string;
|
|
211
181
|
loadingLabel: string;
|
|
212
|
-
block: boolean;
|
|
213
182
|
active: boolean;
|
|
214
|
-
rounded: boolean;
|
|
215
|
-
fullBleed: boolean;
|
|
216
|
-
action: boolean;
|
|
217
|
-
actionQuiet: boolean;
|
|
218
183
|
selected: boolean;
|
|
219
184
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
220
185
|
$slots: {
|
|
@@ -10,13 +10,8 @@ export declare function toButtonRefs(props: VvButtonPropsTypes): {
|
|
|
10
10
|
toggle: import("vue").WritableComputedRef<any>;
|
|
11
11
|
isInGroup: import("vue").ComputedRef<boolean>;
|
|
12
12
|
group: import("vue").Ref<IButtonGroupState> | undefined;
|
|
13
|
-
modifiers: import("vue").
|
|
14
|
-
action: import("vue").WritableComputedRef<any>;
|
|
15
|
-
actionQuiet: import("vue").WritableComputedRef<any>;
|
|
13
|
+
modifiers: import("vue").WritableComputedRef<any>;
|
|
16
14
|
selected: import("vue").Ref<boolean>;
|
|
17
|
-
block: import("vue").Ref<boolean>;
|
|
18
|
-
rounded: import("vue").WritableComputedRef<any>;
|
|
19
|
-
fullBleed: import("vue").Ref<boolean>;
|
|
20
15
|
iconPosition: import("vue").Ref<import("./VvButton").ButtonIconPosition>;
|
|
21
16
|
icon: import("vue").Ref<string | undefined> | undefined;
|
|
22
17
|
label: import("vue").Ref<string | undefined> | undefined;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export declare const VvButtonGroupProps: {
|
|
2
|
-
disabled: {
|
|
3
|
-
type: BooleanConstructor;
|
|
4
|
-
default: boolean;
|
|
5
|
-
};
|
|
6
2
|
/**
|
|
7
3
|
* True = show buttons vertically
|
|
8
4
|
*/
|
|
@@ -24,28 +20,6 @@ export declare const VvButtonGroupProps: {
|
|
|
24
20
|
type: BooleanConstructor;
|
|
25
21
|
default: boolean;
|
|
26
22
|
};
|
|
27
|
-
/**
|
|
28
|
-
* True = display as block
|
|
29
|
-
*/
|
|
30
|
-
block: {
|
|
31
|
-
type: BooleanConstructor;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* True = display btn-broup as rounded (first and last child .vv-button)
|
|
36
|
-
*/
|
|
37
|
-
rounded: {
|
|
38
|
-
type: BooleanConstructor;
|
|
39
|
-
default: boolean;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Button action mode
|
|
43
|
-
*/
|
|
44
|
-
action: BooleanConstructor;
|
|
45
|
-
/**
|
|
46
|
-
* Button action mode
|
|
47
|
-
*/
|
|
48
|
-
actionQuiet: BooleanConstructor;
|
|
49
23
|
/**
|
|
50
24
|
* Active button (name)
|
|
51
25
|
*/
|
|
@@ -53,5 +27,7 @@ export declare const VvButtonGroupProps: {
|
|
|
53
27
|
type: StringConstructor;
|
|
54
28
|
default: undefined;
|
|
55
29
|
};
|
|
30
|
+
disabled: BooleanConstructor;
|
|
31
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
56
32
|
};
|
|
57
33
|
export declare const VvButtonGroupEvents: string[];
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { isRef as
|
|
2
|
-
import { useVModel as
|
|
3
|
-
const
|
|
4
|
-
disabled:
|
|
1
|
+
import { isRef as p, provide as g, computed as d, unref as m, defineComponent as h, toRefs as A, ref as O, openBlock as B, createElementBlock as C, normalizeClass as b, renderSlot as k } from "vue";
|
|
2
|
+
import { useVModel as E } from "@vueuse/core";
|
|
3
|
+
const j = {
|
|
4
|
+
disabled: Boolean
|
|
5
|
+
}, _ = {
|
|
6
|
+
modifiers: [String, Array]
|
|
7
|
+
}, q = {
|
|
8
|
+
..._,
|
|
9
|
+
...j,
|
|
5
10
|
vertical: { type: Boolean, default: !1 },
|
|
6
11
|
compact: { type: Boolean, default: !1 },
|
|
7
12
|
toggle: { type: Boolean, default: !1 },
|
|
8
|
-
block: { type: Boolean, default: !1 },
|
|
9
|
-
rounded: { type: Boolean, default: !1 },
|
|
10
|
-
action: Boolean,
|
|
11
|
-
actionQuiet: Boolean,
|
|
12
13
|
modelValue: { type: String, default: void 0 }
|
|
13
|
-
},
|
|
14
|
-
function
|
|
14
|
+
}, x = ["update:modelValue"], S = Symbol("VV_BUTTON_GROUP");
|
|
15
|
+
function T(e) {
|
|
15
16
|
if (Object.keys(e).some(
|
|
16
|
-
(t) => t !== "key" && !
|
|
17
|
+
(t) => t !== "key" && !p(e[t])
|
|
17
18
|
))
|
|
18
19
|
throw Error("One or more groupState props aren't ref.");
|
|
19
|
-
|
|
20
|
+
g(
|
|
20
21
|
e.key,
|
|
21
|
-
|
|
22
|
+
d(() => e)
|
|
22
23
|
);
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
+
const y = {
|
|
25
26
|
equals(e, t, r) {
|
|
26
27
|
return r ? this.resolveFieldData(e, r) === this.resolveFieldData(t, r) : this.deepEquals(e, t);
|
|
27
28
|
},
|
|
@@ -29,36 +30,36 @@ const d = {
|
|
|
29
30
|
if (e === t)
|
|
30
31
|
return !0;
|
|
31
32
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
32
|
-
const r = Array.isArray(e),
|
|
33
|
-
let
|
|
34
|
-
if (r &&
|
|
33
|
+
const r = Array.isArray(e), n = Array.isArray(t);
|
|
34
|
+
let s, o, i;
|
|
35
|
+
if (r && n) {
|
|
35
36
|
if (o = e.length, o != t.length)
|
|
36
37
|
return !1;
|
|
37
|
-
for (
|
|
38
|
-
if (!this.deepEquals(e[
|
|
38
|
+
for (s = o; s-- !== 0; )
|
|
39
|
+
if (!this.deepEquals(e[s], t[s]))
|
|
39
40
|
return !1;
|
|
40
41
|
return !0;
|
|
41
42
|
}
|
|
42
|
-
if (r !=
|
|
43
|
+
if (r != n)
|
|
43
44
|
return !1;
|
|
44
45
|
const l = e instanceof Date, f = t instanceof Date;
|
|
45
46
|
if (l != f)
|
|
46
47
|
return !1;
|
|
47
48
|
if (l && f)
|
|
48
49
|
return e.getTime() == t.getTime();
|
|
49
|
-
const u = e instanceof RegExp,
|
|
50
|
-
if (u !=
|
|
50
|
+
const u = e instanceof RegExp, a = t instanceof RegExp;
|
|
51
|
+
if (u != a)
|
|
51
52
|
return !1;
|
|
52
|
-
if (u &&
|
|
53
|
+
if (u && a)
|
|
53
54
|
return e.toString() == t.toString();
|
|
54
|
-
const
|
|
55
|
-
if (o =
|
|
55
|
+
const c = Object.keys(e);
|
|
56
|
+
if (o = c.length, o !== Object.keys(t).length)
|
|
56
57
|
return !1;
|
|
57
|
-
for (
|
|
58
|
-
if (!Object.prototype.hasOwnProperty.call(t,
|
|
58
|
+
for (s = o; s-- !== 0; )
|
|
59
|
+
if (!Object.prototype.hasOwnProperty.call(t, c[s]))
|
|
59
60
|
return !1;
|
|
60
|
-
for (
|
|
61
|
-
if (i =
|
|
61
|
+
for (s = o; s-- !== 0; )
|
|
62
|
+
if (i = c[s], !this.deepEquals(e[i], t[i]))
|
|
62
63
|
return !1;
|
|
63
64
|
return !0;
|
|
64
65
|
}
|
|
@@ -70,13 +71,13 @@ const d = {
|
|
|
70
71
|
return e[t];
|
|
71
72
|
{
|
|
72
73
|
const r = t.split(".");
|
|
73
|
-
let
|
|
74
|
-
for (let
|
|
74
|
+
let n = e;
|
|
75
|
+
for (let s = 0, o = r.length; s < o; ++s) {
|
|
75
76
|
if (e == null)
|
|
76
77
|
return null;
|
|
77
|
-
|
|
78
|
+
n = n[r[s]];
|
|
78
79
|
}
|
|
79
|
-
return
|
|
80
|
+
return n;
|
|
80
81
|
}
|
|
81
82
|
} else
|
|
82
83
|
return null;
|
|
@@ -87,9 +88,9 @@ const d = {
|
|
|
87
88
|
findIndexInList(e, t) {
|
|
88
89
|
let r = -1;
|
|
89
90
|
if (t) {
|
|
90
|
-
for (let
|
|
91
|
-
if (this.equals(t[
|
|
92
|
-
r =
|
|
91
|
+
for (let n = 0; n < t.length; n++)
|
|
92
|
+
if (this.equals(t[n], e)) {
|
|
93
|
+
r = n;
|
|
93
94
|
break;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -116,21 +117,21 @@ const d = {
|
|
|
116
117
|
},
|
|
117
118
|
removeFromList(e, t) {
|
|
118
119
|
const r = this.findIndexInList(e, t);
|
|
119
|
-
return r > -1 ? t.filter((
|
|
120
|
+
return r > -1 ? t.filter((n, s) => s !== r) : t;
|
|
120
121
|
},
|
|
121
122
|
isString(e) {
|
|
122
123
|
return typeof e == "string" || e instanceof String;
|
|
123
124
|
},
|
|
124
125
|
propsToObject(e) {
|
|
125
126
|
return Object.keys(e).reduce((t, r) => {
|
|
126
|
-
var
|
|
127
|
-
return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (
|
|
127
|
+
var n, s, o, i, l;
|
|
128
|
+
return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (n = e[r]) != null && n.type && (Array.isArray(e[r].type) ? t[r] = ((s = e[r]) == null ? void 0 : s.default) || ((o = e[r]) == null ? void 0 : o.type[0]()) : t[r] = ((i = e[r]) == null ? void 0 : i.default) || ((l = e[r]) == null ? void 0 : l.type())), t;
|
|
128
129
|
}, {});
|
|
129
130
|
},
|
|
130
131
|
filterArray(e, t, r) {
|
|
131
|
-
return e.filter((
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
return e.filter((n) => t.some((s) => typeof s == "string" ? n[r] == s : this.equals(
|
|
133
|
+
n[r],
|
|
134
|
+
s[r]
|
|
134
135
|
)));
|
|
135
136
|
},
|
|
136
137
|
kebabCase(e) {
|
|
@@ -141,21 +142,21 @@ const d = {
|
|
|
141
142
|
)) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
|
-
function
|
|
145
|
+
function V(e, t) {
|
|
145
146
|
const r = { [`${e}`]: !0 };
|
|
146
147
|
return {
|
|
147
|
-
bemCssClasses:
|
|
148
|
-
const i =
|
|
148
|
+
bemCssClasses: d(() => Object.keys(t).reduce((s, o) => {
|
|
149
|
+
const i = m(t[o]) || !1;
|
|
149
150
|
if (!i)
|
|
150
|
-
return
|
|
151
|
+
return s;
|
|
151
152
|
if (o === "modifiers") {
|
|
152
153
|
const l = Array.isArray(i) ? i : [i];
|
|
153
154
|
return {
|
|
154
|
-
...
|
|
155
|
+
...s,
|
|
155
156
|
...l.reduce(
|
|
156
157
|
(f, u) => ({
|
|
157
158
|
...f,
|
|
158
|
-
[`${e}--${
|
|
159
|
+
[`${e}--${y.kebabCase(
|
|
159
160
|
u
|
|
160
161
|
)}`]: !0
|
|
161
162
|
}),
|
|
@@ -164,47 +165,36 @@ function T(e, t) {
|
|
|
164
165
|
};
|
|
165
166
|
} else
|
|
166
167
|
return {
|
|
167
|
-
...
|
|
168
|
-
[`${e}--${
|
|
168
|
+
...s,
|
|
169
|
+
[`${e}--${y.kebabCase(o)}`]: i
|
|
169
170
|
};
|
|
170
171
|
}, r) || {})
|
|
171
172
|
};
|
|
172
173
|
}
|
|
173
|
-
const
|
|
174
|
+
const R = /* @__PURE__ */ h({
|
|
174
175
|
__name: "VvButtonGroup",
|
|
175
|
-
props:
|
|
176
|
-
emits:
|
|
176
|
+
props: q,
|
|
177
|
+
emits: x,
|
|
177
178
|
setup(e, { emit: t }) {
|
|
178
|
-
const r = e,
|
|
179
|
-
|
|
180
|
-
vertical: o,
|
|
181
|
-
compact: i,
|
|
182
|
-
block: l,
|
|
183
|
-
rounded: f,
|
|
184
|
-
toggle: u,
|
|
185
|
-
action: c,
|
|
186
|
-
actionQuiet: a
|
|
187
|
-
} = O(r), { bemCssClasses: m } = T("vv-button-group", {
|
|
179
|
+
const r = e, n = E(r, "modelValue", t), { disabled: s, vertical: o, compact: i, toggle: l, modifiers: f } = A(r), { bemCssClasses: u } = V("vv-button-group", {
|
|
180
|
+
modifiers: f,
|
|
188
181
|
vertical: o,
|
|
189
|
-
compact: i
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
actionQuiet: a
|
|
200
|
-
}), (g, G) => (k(), b("div", {
|
|
201
|
-
class: C(p(m)),
|
|
182
|
+
compact: i
|
|
183
|
+
}), a = {
|
|
184
|
+
key: S,
|
|
185
|
+
modelValue: n,
|
|
186
|
+
disabled: s,
|
|
187
|
+
toggle: l,
|
|
188
|
+
modifiers: f != null && f.value ? f : O([])
|
|
189
|
+
};
|
|
190
|
+
return T(a), (c, D) => (B(), C("div", {
|
|
191
|
+
class: b(m(u)),
|
|
202
192
|
role: "group"
|
|
203
193
|
}, [
|
|
204
|
-
|
|
194
|
+
k(c.$slots, "default")
|
|
205
195
|
], 2));
|
|
206
196
|
}
|
|
207
197
|
});
|
|
208
198
|
export {
|
|
209
|
-
|
|
199
|
+
R as default
|
|
210
200
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core"],a):(o=typeof globalThis<"u"?globalThis:o||self,o.VvButtonGroup=a(o.vue,o.core))})(this,function(o,a){"use strict";const m={
|
|
1
|
+
(function(o,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core"],a):(o=typeof globalThis<"u"?globalThis:o||self,o.VvButtonGroup=a(o.vue,o.core))})(this,function(o,a){"use strict";const m={...{modifiers:[String,Array]},...{disabled:Boolean},vertical:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},toggle:{type:Boolean,default:!1},modelValue:{type:String,default:void 0}},g=["update:modelValue"],h=Symbol("VV_BUTTON_GROUP");function A(e){if(Object.keys(e).some(t=>t!=="key"&&!o.isRef(e[t])))throw Error("One or more groupState props aren't ref.");o.provide(e.key,o.computed(()=>e))}const p={equals(e,t,r){return r?this.resolveFieldData(e,r)===this.resolveFieldData(t,r):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=Array.isArray(e),s=Array.isArray(t);let n,i,f;if(r&&s){if(i=e.length,i!=t.length)return!1;for(n=i;n--!==0;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(r!=s)return!1;const l=e instanceof Date,u=t instanceof Date;if(l!=u)return!1;if(l&&u)return e.getTime()==t.getTime();const c=e instanceof RegExp,y=t instanceof RegExp;if(c!=y)return!1;if(c&&y)return e.toString()==t.toString();const d=Object.keys(e);if(i=d.length,i!==Object.keys(t).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=i;n--!==0;)if(f=d[n],!this.deepEquals(e[f],t[f]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const r=t.split(".");let s=e;for(let n=0,i=r.length;n<i;++n){if(e==null)return null;s=s[r[n]]}return s}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let r=-1;if(t){for(let s=0;s<t.length;s++)if(this.equals(t[s],e)){r=s;break}}return r},contains(e,t){if(e!=null&&t&&t.length){for(const r of t)if(this.equals(e,r))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([r])=>t(r)))},removeFromList(e,t){const r=this.findIndexInList(e,t);return r>-1?t.filter((s,n)=>n!==r):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,r)=>{var s,n,i,f,l;return this.isFunction(e[r])?t[r]=e[r]():Array.isArray(e[r])?t[r]=e[r][0]():(s=e[r])!=null&&s.type&&(Array.isArray(e[r].type)?t[r]=((n=e[r])==null?void 0:n.default)||((i=e[r])==null?void 0:i.type[0]()):t[r]=((f=e[r])==null?void 0:f.default)||((l=e[r])==null?void 0:l.type())),t},{})},filterArray(e,t,r){return e.filter(s=>t.some(n=>typeof n=="string"?s[r]==n:this.equals(s[r],n[r])))},kebabCase(e){var t,r;if(e)return(r=(t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:t.join("-"))==null?void 0:r.toLowerCase()}};function O(e,t){const r={[`${e}`]:!0};return{bemCssClasses:o.computed(()=>Object.keys(t).reduce((n,i)=>{const f=o.unref(t[i])||!1;if(!f)return n;if(i==="modifiers"){const l=Array.isArray(f)?f:[f];return{...n,...l.reduce((u,c)=>({...u,[`${e}--${p.kebabCase(c)}`]:!0}),{})}}else return{...n,[`${e}--${p.kebabCase(i)}`]:f}},r)||{})}}return o.defineComponent({__name:"VvButtonGroup",props:m,emits:g,setup(e,{emit:t}){const r=e,s=a.useVModel(r,"modelValue",t),{disabled:n,vertical:i,compact:f,toggle:l,modifiers:u}=o.toRefs(r),{bemCssClasses:c}=O("vv-button-group",{modifiers:u,vertical:i,compact:f}),y={key:h,modelValue:s,disabled:n,toggle:l,modifiers:u!=null&&u.value?u:o.ref([])};return A(y),(d,k)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(c)),role:"group"},[o.renderSlot(d.$slots,"default")],2))}})});
|
|
@@ -6,17 +6,9 @@ declare const _default: {
|
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
modelValue: string;
|
|
8
8
|
toggle: boolean;
|
|
9
|
-
block: boolean;
|
|
10
|
-
rounded: boolean;
|
|
11
|
-
action: boolean;
|
|
12
|
-
actionQuiet: boolean;
|
|
13
9
|
vertical: boolean;
|
|
14
10
|
compact: boolean;
|
|
15
11
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
-
disabled: {
|
|
17
|
-
type: BooleanConstructor;
|
|
18
|
-
default: boolean;
|
|
19
|
-
};
|
|
20
12
|
vertical: {
|
|
21
13
|
type: BooleanConstructor;
|
|
22
14
|
default: boolean;
|
|
@@ -29,23 +21,15 @@ declare const _default: {
|
|
|
29
21
|
type: BooleanConstructor;
|
|
30
22
|
default: boolean;
|
|
31
23
|
};
|
|
32
|
-
block: {
|
|
33
|
-
type: BooleanConstructor;
|
|
34
|
-
default: boolean;
|
|
35
|
-
};
|
|
36
|
-
rounded: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
action: BooleanConstructor;
|
|
41
|
-
actionQuiet: BooleanConstructor;
|
|
42
24
|
modelValue: {
|
|
43
25
|
type: StringConstructor;
|
|
44
26
|
default: undefined;
|
|
45
27
|
};
|
|
28
|
+
disabled: BooleanConstructor;
|
|
29
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
46
30
|
}>> & {
|
|
47
31
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
48
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "modelValue" | "toggle" | "
|
|
32
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "modelValue" | "toggle" | "vertical" | "compact">;
|
|
49
33
|
$attrs: {
|
|
50
34
|
[x: string]: unknown;
|
|
51
35
|
};
|
|
@@ -60,10 +44,6 @@ declare const _default: {
|
|
|
60
44
|
$emit: (event: string, ...args: any[]) => void;
|
|
61
45
|
$el: any;
|
|
62
46
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
63
|
-
disabled: {
|
|
64
|
-
type: BooleanConstructor;
|
|
65
|
-
default: boolean;
|
|
66
|
-
};
|
|
67
47
|
vertical: {
|
|
68
48
|
type: BooleanConstructor;
|
|
69
49
|
default: boolean;
|
|
@@ -76,30 +56,18 @@ declare const _default: {
|
|
|
76
56
|
type: BooleanConstructor;
|
|
77
57
|
default: boolean;
|
|
78
58
|
};
|
|
79
|
-
block: {
|
|
80
|
-
type: BooleanConstructor;
|
|
81
|
-
default: boolean;
|
|
82
|
-
};
|
|
83
|
-
rounded: {
|
|
84
|
-
type: BooleanConstructor;
|
|
85
|
-
default: boolean;
|
|
86
|
-
};
|
|
87
|
-
action: BooleanConstructor;
|
|
88
|
-
actionQuiet: BooleanConstructor;
|
|
89
59
|
modelValue: {
|
|
90
60
|
type: StringConstructor;
|
|
91
61
|
default: undefined;
|
|
92
62
|
};
|
|
63
|
+
disabled: BooleanConstructor;
|
|
64
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
93
65
|
}>> & {
|
|
94
66
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
95
67
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
|
|
96
68
|
disabled: boolean;
|
|
97
69
|
modelValue: string;
|
|
98
70
|
toggle: boolean;
|
|
99
|
-
block: boolean;
|
|
100
|
-
rounded: boolean;
|
|
101
|
-
action: boolean;
|
|
102
|
-
actionQuiet: boolean;
|
|
103
71
|
vertical: boolean;
|
|
104
72
|
compact: boolean;
|
|
105
73
|
}, {}, string> & {
|
|
@@ -123,10 +91,6 @@ declare const _default: {
|
|
|
123
91
|
$nextTick: typeof import("vue").nextTick;
|
|
124
92
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
125
93
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
126
|
-
disabled: {
|
|
127
|
-
type: BooleanConstructor;
|
|
128
|
-
default: boolean;
|
|
129
|
-
};
|
|
130
94
|
vertical: {
|
|
131
95
|
type: BooleanConstructor;
|
|
132
96
|
default: boolean;
|
|
@@ -139,20 +103,12 @@ declare const _default: {
|
|
|
139
103
|
type: BooleanConstructor;
|
|
140
104
|
default: boolean;
|
|
141
105
|
};
|
|
142
|
-
block: {
|
|
143
|
-
type: BooleanConstructor;
|
|
144
|
-
default: boolean;
|
|
145
|
-
};
|
|
146
|
-
rounded: {
|
|
147
|
-
type: BooleanConstructor;
|
|
148
|
-
default: boolean;
|
|
149
|
-
};
|
|
150
|
-
action: BooleanConstructor;
|
|
151
|
-
actionQuiet: BooleanConstructor;
|
|
152
106
|
modelValue: {
|
|
153
107
|
type: StringConstructor;
|
|
154
108
|
default: undefined;
|
|
155
109
|
};
|
|
110
|
+
disabled: BooleanConstructor;
|
|
111
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
156
112
|
}>> & {
|
|
157
113
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
158
114
|
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
@@ -160,10 +116,6 @@ declare const _default: {
|
|
|
160
116
|
__isTeleport?: undefined;
|
|
161
117
|
__isSuspense?: undefined;
|
|
162
118
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
163
|
-
disabled: {
|
|
164
|
-
type: BooleanConstructor;
|
|
165
|
-
default: boolean;
|
|
166
|
-
};
|
|
167
119
|
vertical: {
|
|
168
120
|
type: BooleanConstructor;
|
|
169
121
|
default: boolean;
|
|
@@ -176,30 +128,18 @@ declare const _default: {
|
|
|
176
128
|
type: BooleanConstructor;
|
|
177
129
|
default: boolean;
|
|
178
130
|
};
|
|
179
|
-
block: {
|
|
180
|
-
type: BooleanConstructor;
|
|
181
|
-
default: boolean;
|
|
182
|
-
};
|
|
183
|
-
rounded: {
|
|
184
|
-
type: BooleanConstructor;
|
|
185
|
-
default: boolean;
|
|
186
|
-
};
|
|
187
|
-
action: BooleanConstructor;
|
|
188
|
-
actionQuiet: BooleanConstructor;
|
|
189
131
|
modelValue: {
|
|
190
132
|
type: StringConstructor;
|
|
191
133
|
default: undefined;
|
|
192
134
|
};
|
|
135
|
+
disabled: BooleanConstructor;
|
|
136
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
193
137
|
}>> & {
|
|
194
138
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
195
139
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
|
|
196
140
|
disabled: boolean;
|
|
197
141
|
modelValue: string;
|
|
198
142
|
toggle: boolean;
|
|
199
|
-
block: boolean;
|
|
200
|
-
rounded: boolean;
|
|
201
|
-
action: boolean;
|
|
202
|
-
actionQuiet: boolean;
|
|
203
143
|
vertical: boolean;
|
|
204
144
|
compact: boolean;
|
|
205
145
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -31,7 +31,7 @@ declare const _default: {
|
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
|
-
modifiers: (
|
|
34
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
35
35
|
disabled: BooleanConstructor;
|
|
36
36
|
}>> & {
|
|
37
37
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -70,7 +70,7 @@ declare const _default: {
|
|
|
70
70
|
type: StringConstructor;
|
|
71
71
|
default: string;
|
|
72
72
|
};
|
|
73
|
-
modifiers: (
|
|
73
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
74
74
|
disabled: BooleanConstructor;
|
|
75
75
|
}>> & {
|
|
76
76
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -122,7 +122,7 @@ declare const _default: {
|
|
|
122
122
|
type: StringConstructor;
|
|
123
123
|
default: string;
|
|
124
124
|
};
|
|
125
|
-
modifiers: (
|
|
125
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
126
126
|
disabled: BooleanConstructor;
|
|
127
127
|
}>> & {
|
|
128
128
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -151,7 +151,7 @@ declare const _default: {
|
|
|
151
151
|
type: StringConstructor;
|
|
152
152
|
default: string;
|
|
153
153
|
};
|
|
154
|
-
modifiers: (
|
|
154
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
155
155
|
disabled: BooleanConstructor;
|
|
156
156
|
}>> & {
|
|
157
157
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const VvInputTextProps: {
|
|
|
56
56
|
default: boolean;
|
|
57
57
|
validator: (value: string) => boolean;
|
|
58
58
|
};
|
|
59
|
-
modifiers: (
|
|
59
|
+
modifiers: import("vue").PropType<string | string[]>;
|
|
60
60
|
loading: BooleanConstructor;
|
|
61
61
|
loadingLabel: StringConstructor;
|
|
62
62
|
hintLabel: {
|