vueless 0.0.253 → 0.0.255
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/package.json +1 -1
- package/ui.button/index.stories.js +1 -1
- package/ui.button-link/index.stories.js +1 -1
- package/ui.button-toggle/index.stories.js +2 -2
- package/ui.button-toggle-item/index.stories.js +6 -2
- package/ui.container-card/index.stories.js +1 -1
- package/ui.dropdown-button/index.stories.js +3 -6
- package/ui.form-calendar/index.stories.js +4 -4
- package/ui.form-checkbox/index.stories.js +13 -26
- package/ui.form-checkbox-group/index.stories.js +28 -74
- package/ui.form-checkbox-multi-state/index.stories.js +17 -13
- package/ui.form-color-picker/index.stories.js +17 -13
- package/ui.form-date-picker/configs/default.config.js +1 -0
- package/ui.form-date-picker/index.stories.js +37 -51
- package/ui.form-date-picker-range/index.stories.js +23 -32
- package/ui.form-input/index.stories.js +1 -1
- package/ui.form-input-file/index.stories.js +1 -1
- package/ui.form-input-money/index.stories.js +1 -1
- package/ui.form-input-number/index.stories.js +3 -3
- package/ui.form-input-search/index.stories.js +1 -1
- package/ui.form-label/index.stories.js +28 -51
- package/ui.form-radio/index.stories.js +5 -17
- package/ui.form-radio-group/index.stories.js +45 -96
- package/ui.form-select/index.stories.js +62 -159
- package/ui.form-switch/index.stories.js +17 -33
- package/ui.form-textarea/index.stories.js +1 -3
- package/ui.image-icon/index.stories.js +1 -1
- package/ui.navigation-progress/index.stories.js +1 -1
- package/ui.navigation-tabs/index.stories.js +3 -3
- package/ui.text-badge/index.stories.js +2 -2
- package/ui.text-block/index.stories.js +2 -2
- package/ui.text-empty/index.stories.js +1 -1
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -53,10 +53,10 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
53
53
|
<URow>
|
|
54
54
|
<ULink
|
|
55
55
|
v-for="(option, index) in options"
|
|
56
|
+
:key="index"
|
|
56
57
|
v-bind="args"
|
|
57
58
|
:[args.enum]="option"
|
|
58
59
|
:label="prefixedOptions[index]"
|
|
59
|
-
:key="index"
|
|
60
60
|
/>
|
|
61
61
|
</URow>
|
|
62
62
|
`,
|
|
@@ -37,8 +37,8 @@ const DefaultTemplate = (args) => ({
|
|
|
37
37
|
},
|
|
38
38
|
template: `
|
|
39
39
|
<UToggle
|
|
40
|
-
v-model="value"
|
|
41
40
|
v-bind="args"
|
|
41
|
+
v-model="value"
|
|
42
42
|
:options="OPTIONS"
|
|
43
43
|
>
|
|
44
44
|
${args.slotTemplate || getSlotsFragment()}
|
|
@@ -62,8 +62,8 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
62
62
|
<UToggle
|
|
63
63
|
v-for="(option, index) in options"
|
|
64
64
|
:key="index"
|
|
65
|
-
v-model="value"
|
|
66
65
|
v-bind="args"
|
|
66
|
+
v-model="value"
|
|
67
67
|
:[args.enum]="option"
|
|
68
68
|
:label="option"
|
|
69
69
|
:options="[
|
|
@@ -28,8 +28,12 @@ const DefaultTemplate = (args) => ({
|
|
|
28
28
|
return { args, slots };
|
|
29
29
|
},
|
|
30
30
|
template: `
|
|
31
|
-
<UToggleItem
|
|
32
|
-
|
|
31
|
+
<UToggleItem
|
|
32
|
+
v-bind="args"
|
|
33
|
+
v-model="args.modelValue"
|
|
34
|
+
name="toggle"
|
|
35
|
+
>
|
|
36
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
33
37
|
</UToggleItem>
|
|
34
38
|
`,
|
|
35
39
|
});
|
|
@@ -40,10 +40,7 @@ const DefaultTemplate = (args) => ({
|
|
|
40
40
|
return { args, slots };
|
|
41
41
|
},
|
|
42
42
|
template: `
|
|
43
|
-
<UDropdownButton
|
|
44
|
-
v-bind="args"
|
|
45
|
-
v-model="args.modelValue"
|
|
46
|
-
>
|
|
43
|
+
<UDropdownButton v-bind="args">
|
|
47
44
|
${args.slotTemplate || getSlotsFragment()}
|
|
48
45
|
</UDropdownButton>
|
|
49
46
|
`,
|
|
@@ -83,12 +80,12 @@ const VariantColorsTemplate = (args, { argTypes } = {}) => ({
|
|
|
83
80
|
<UCol>
|
|
84
81
|
<URow v-for="(variant, index) in variants" :key="index">
|
|
85
82
|
<UDropdownButton
|
|
86
|
-
v-for="(color,
|
|
83
|
+
v-for="(color, index) in colors"
|
|
84
|
+
:key="index"
|
|
87
85
|
v-bind="args"
|
|
88
86
|
:color="color"
|
|
89
87
|
:variant="variant"
|
|
90
88
|
:label="color"
|
|
91
|
-
:key="idx"
|
|
92
89
|
/>
|
|
93
90
|
</URow>
|
|
94
91
|
</UCol>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes, getSlotNames,
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UCalendar from "../ui.form-calendar";
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ const DefaultTemplate = (args) => ({
|
|
|
36
36
|
},
|
|
37
37
|
template: `
|
|
38
38
|
<UCalendar v-bind="args" v-model="value">
|
|
39
|
-
${
|
|
39
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
40
40
|
</UCalendar>
|
|
41
41
|
|
|
42
42
|
<div class="mt-4">
|
|
@@ -52,8 +52,8 @@ export const Range = DefaultTemplate.bind({});
|
|
|
52
52
|
Range.args = {
|
|
53
53
|
range: true,
|
|
54
54
|
value: {
|
|
55
|
-
from: new Date(
|
|
56
|
-
to: new Date(
|
|
55
|
+
from: new Date(new Date().setDate(new Date().getDate() - new Date().getDay())),
|
|
56
|
+
to: new Date(new Date().setDate(new Date().getDate() + (6 - new Date().getDay()))),
|
|
57
57
|
},
|
|
58
58
|
};
|
|
59
59
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes, getSlotNames,
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UCheckbox from "../ui.form-checkbox";
|
|
4
4
|
import UCheckboxGroup from "../ui.form-checkbox-group";
|
|
@@ -14,23 +14,23 @@ export default {
|
|
|
14
14
|
component: UCheckbox,
|
|
15
15
|
args: {
|
|
16
16
|
label: "Label",
|
|
17
|
-
value: {},
|
|
18
17
|
},
|
|
19
18
|
argTypes: {
|
|
20
19
|
...getArgTypes(UCheckbox.name),
|
|
20
|
+
modelValue: { control: { type: "boolean" } },
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const DefaultTemplate = (args) => ({
|
|
25
|
-
components: { UCheckbox },
|
|
25
|
+
components: { UCheckbox, UBadge },
|
|
26
26
|
setup() {
|
|
27
27
|
const slots = getSlotNames(UCheckbox.name);
|
|
28
28
|
|
|
29
29
|
return { args, slots };
|
|
30
30
|
},
|
|
31
31
|
template: `
|
|
32
|
-
<UCheckbox v-bind="args" v-model="args.
|
|
33
|
-
${
|
|
32
|
+
<UCheckbox v-bind="args" v-model="args.modelValue">
|
|
33
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
34
34
|
</UCheckbox>
|
|
35
35
|
`,
|
|
36
36
|
});
|
|
@@ -89,48 +89,35 @@ const ValueTypesTemplate = (args) => ({
|
|
|
89
89
|
`,
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
const
|
|
92
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
93
93
|
components: { UCheckbox, UCol },
|
|
94
94
|
setup() {
|
|
95
95
|
return {
|
|
96
96
|
args,
|
|
97
|
-
|
|
97
|
+
options: argTypes[args.enum].options,
|
|
98
98
|
};
|
|
99
99
|
},
|
|
100
100
|
template: `
|
|
101
101
|
<UCol gap="xl">
|
|
102
102
|
<UCheckbox
|
|
103
|
-
v-for="(
|
|
103
|
+
v-for="(option, index) in options"
|
|
104
104
|
:key="index"
|
|
105
105
|
v-bind="args"
|
|
106
|
-
|
|
107
|
-
:
|
|
108
|
-
:label="size"
|
|
106
|
+
:[args.enum]="option"
|
|
107
|
+
:label="option"
|
|
109
108
|
/>
|
|
110
109
|
</UCol>
|
|
111
110
|
`,
|
|
112
111
|
});
|
|
113
112
|
|
|
114
|
-
const SlotTemplate = (args) => ({
|
|
115
|
-
components: { UCheckbox, UBadge },
|
|
116
|
-
setup() {
|
|
117
|
-
return { args };
|
|
118
|
-
},
|
|
119
|
-
template: `
|
|
120
|
-
<UCheckbox v-bind="args" v-model="args.value" description="hello">
|
|
121
|
-
${args.slotTemplate}
|
|
122
|
-
</UCheckbox>
|
|
123
|
-
`,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
113
|
export const Default = DefaultTemplate.bind({});
|
|
127
114
|
Default.args = {};
|
|
128
115
|
|
|
129
116
|
export const CustomValues = ValueTypesTemplate.bind({});
|
|
130
117
|
CustomValues.args = {};
|
|
131
118
|
|
|
132
|
-
export const Sizes =
|
|
133
|
-
Sizes.args = {};
|
|
119
|
+
export const Sizes = EnumVariantTemplate.bind({});
|
|
120
|
+
Sizes.args = { enum: "size" };
|
|
134
121
|
|
|
135
122
|
export const Disabled = DefaultTemplate.bind({});
|
|
136
123
|
Disabled.args = { disabled: true };
|
|
@@ -138,7 +125,7 @@ Disabled.args = { disabled: true };
|
|
|
138
125
|
export const Description = DefaultTemplate.bind({});
|
|
139
126
|
Description.args = { description: "Some description" };
|
|
140
127
|
|
|
141
|
-
export const slotFooter =
|
|
128
|
+
export const slotFooter = DefaultTemplate.bind({});
|
|
142
129
|
slotFooter.args = {
|
|
143
130
|
slotTemplate: `
|
|
144
131
|
<template #footer>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UCheckboxGroup from "../ui.form-checkbox-group";
|
|
4
4
|
import UCheckbox from "../ui.form-checkbox";
|
|
@@ -29,7 +29,9 @@ export default {
|
|
|
29
29
|
const DefaultTemplate = (args) => ({
|
|
30
30
|
components: { UCheckboxGroup, UCheckbox, UAlert, URow },
|
|
31
31
|
setup() {
|
|
32
|
-
|
|
32
|
+
const slots = getSlotNames(UCheckboxGroup.name);
|
|
33
|
+
|
|
34
|
+
return { args, slots };
|
|
33
35
|
},
|
|
34
36
|
data() {
|
|
35
37
|
return {
|
|
@@ -39,9 +41,7 @@ const DefaultTemplate = (args) => ({
|
|
|
39
41
|
template: `
|
|
40
42
|
<URow class="!flex-col">
|
|
41
43
|
<UCheckboxGroup v-bind="args" v-model="value">
|
|
42
|
-
|
|
43
|
-
<UCheckbox v-bind="radio"/>
|
|
44
|
-
</template>
|
|
44
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
45
45
|
</UCheckboxGroup>
|
|
46
46
|
|
|
47
47
|
<URow>
|
|
@@ -53,25 +53,29 @@ const DefaultTemplate = (args) => ({
|
|
|
53
53
|
`,
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
const
|
|
57
|
-
components: { UCheckboxGroup,
|
|
56
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
57
|
+
components: { UCheckboxGroup, URow },
|
|
58
58
|
setup() {
|
|
59
59
|
return { args };
|
|
60
60
|
},
|
|
61
61
|
data() {
|
|
62
62
|
return {
|
|
63
63
|
value: args.value,
|
|
64
|
+
options: argTypes[args.enum].options,
|
|
64
65
|
};
|
|
65
66
|
},
|
|
66
67
|
template: `
|
|
67
68
|
<URow class="!flex-col">
|
|
68
|
-
<UCheckboxGroup
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
<UCheckboxGroup
|
|
70
|
+
v-for="(option, index) in options"
|
|
71
|
+
:key="option"
|
|
72
|
+
v-bind="args"
|
|
73
|
+
v-model="value"
|
|
74
|
+
:label="option"
|
|
75
|
+
:[args.enum]="option"
|
|
76
|
+
:options="args.options"
|
|
77
|
+
name="option"
|
|
78
|
+
/>
|
|
75
79
|
</URow>
|
|
76
80
|
`,
|
|
77
81
|
});
|
|
@@ -79,7 +83,11 @@ const OptionsTemplate = (args) => ({
|
|
|
79
83
|
export const Default = DefaultTemplate.bind({});
|
|
80
84
|
Default.args = {
|
|
81
85
|
name: "Default",
|
|
82
|
-
|
|
86
|
+
slotTemplate: `
|
|
87
|
+
<template v-for="(radio, index) in args.options" :key="index">
|
|
88
|
+
<UCheckbox v-bind="radio"/>
|
|
89
|
+
</template>
|
|
90
|
+
`,
|
|
83
91
|
options: [
|
|
84
92
|
{ name: "Default", label: "String", value: "One" },
|
|
85
93
|
{ name: "Default", label: "Boolean", value: false },
|
|
@@ -97,7 +105,7 @@ Default.args = {
|
|
|
97
105
|
],
|
|
98
106
|
};
|
|
99
107
|
|
|
100
|
-
export const Options =
|
|
108
|
+
export const Options = DefaultTemplate.bind({});
|
|
101
109
|
Options.args = {
|
|
102
110
|
name: "Options",
|
|
103
111
|
options: [
|
|
@@ -109,68 +117,14 @@ Options.args = {
|
|
|
109
117
|
],
|
|
110
118
|
};
|
|
111
119
|
|
|
112
|
-
const ColorsTemplate = (args, { argTypes } = {}) => ({
|
|
113
|
-
components: { UCheckboxGroup, URow },
|
|
114
|
-
setup() {
|
|
115
|
-
return { args };
|
|
116
|
-
},
|
|
117
|
-
data() {
|
|
118
|
-
return {
|
|
119
|
-
value: args.value,
|
|
120
|
-
colors: argTypes.color.options,
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
template: `
|
|
124
|
-
<URow class="!flex-col">
|
|
125
|
-
<UCheckboxGroup
|
|
126
|
-
v-bind="args"
|
|
127
|
-
v-for="color in colors"
|
|
128
|
-
:key="color"
|
|
129
|
-
:label="color"
|
|
130
|
-
:color="color"
|
|
131
|
-
:options="args.options"
|
|
132
|
-
name="color"
|
|
133
|
-
v-model="value"
|
|
134
|
-
/>
|
|
135
|
-
</URow>
|
|
136
|
-
`,
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
140
|
-
components: { UCheckboxGroup, URow },
|
|
141
|
-
setup() {
|
|
142
|
-
return { args };
|
|
143
|
-
},
|
|
144
|
-
data() {
|
|
145
|
-
return {
|
|
146
|
-
value: args.value,
|
|
147
|
-
sizes: argTypes.size.options,
|
|
148
|
-
};
|
|
149
|
-
},
|
|
150
|
-
template: `
|
|
151
|
-
<URow class="!flex-col">
|
|
152
|
-
<UCheckboxGroup
|
|
153
|
-
v-bind="args"
|
|
154
|
-
v-for="size in sizes"
|
|
155
|
-
:key="size"
|
|
156
|
-
:label="size"
|
|
157
|
-
:size="size"
|
|
158
|
-
:options="args.options"
|
|
159
|
-
name="size"
|
|
160
|
-
v-model="value"
|
|
161
|
-
/>
|
|
162
|
-
</URow>
|
|
163
|
-
`,
|
|
164
|
-
});
|
|
165
|
-
|
|
166
120
|
export const disabled = DefaultTemplate.bind({});
|
|
167
121
|
disabled.args = { name: "Disabled", disabled: true };
|
|
168
122
|
|
|
169
123
|
export const error = DefaultTemplate.bind({});
|
|
170
124
|
error.args = { name: "Error", error: "some error" };
|
|
171
125
|
|
|
172
|
-
export const Colors =
|
|
173
|
-
Colors.args = { name: "Colors" };
|
|
126
|
+
export const Colors = EnumVariantTemplate.bind({});
|
|
127
|
+
Colors.args = { enum: "color", name: "Colors" };
|
|
174
128
|
|
|
175
|
-
export const Sizes =
|
|
176
|
-
Sizes.args = { name: "Sizes" };
|
|
129
|
+
export const Sizes = EnumVariantTemplate.bind({});
|
|
130
|
+
Sizes.args = { enum: "size", name: "Sizes" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UCheckboxMultiState from "../ui.form-checkbox-multi-state";
|
|
4
4
|
import URow from "../ui.container-row";
|
|
@@ -11,7 +11,6 @@ export default {
|
|
|
11
11
|
title: "Form Inputs & Controls / Checkbox Multistate",
|
|
12
12
|
component: UCheckboxMultiState,
|
|
13
13
|
args: {
|
|
14
|
-
modelValue: false,
|
|
15
14
|
options: [
|
|
16
15
|
{ value: false, label: "empty", icon: "", description: "checkbox empty" },
|
|
17
16
|
{ value: true, label: "selected", icon: "check", description: "checkbox selected" },
|
|
@@ -20,36 +19,41 @@ export default {
|
|
|
20
19
|
},
|
|
21
20
|
argTypes: {
|
|
22
21
|
...getArgTypes(UCheckboxMultiState.name),
|
|
22
|
+
modelValue: { control: { type: "boolean" } },
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const DefaultTemplate = (args) => ({
|
|
27
27
|
components: { UCheckboxMultiState },
|
|
28
28
|
setup() {
|
|
29
|
-
|
|
29
|
+
const slots = getSlotNames(UCheckboxMultiState.name);
|
|
30
|
+
|
|
31
|
+
return { args, slots };
|
|
30
32
|
},
|
|
31
33
|
template: `
|
|
32
|
-
<UCheckboxMultiState v-bind="args" v-model="args.
|
|
34
|
+
<UCheckboxMultiState v-bind="args" v-model="args.modelValue">
|
|
35
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
36
|
+
</UCheckboxMultiState>
|
|
33
37
|
`,
|
|
34
38
|
});
|
|
35
39
|
|
|
36
|
-
const
|
|
40
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
37
41
|
components: { UCheckboxMultiState, URow },
|
|
38
42
|
setup() {
|
|
39
43
|
return {
|
|
40
44
|
args,
|
|
41
|
-
|
|
45
|
+
options: argTypes[args.enum].options,
|
|
42
46
|
};
|
|
43
47
|
},
|
|
44
48
|
template: `
|
|
45
49
|
<URow>
|
|
46
50
|
<UCheckboxMultiState
|
|
47
|
-
v-for="(
|
|
48
|
-
v-bind="args"
|
|
49
|
-
:size="size"
|
|
50
|
-
v-model="args.value"
|
|
51
|
-
:label="size"
|
|
51
|
+
v-for="(option, index) in options"
|
|
52
52
|
:key="index"
|
|
53
|
+
v-bind="args"
|
|
54
|
+
v-model="args.modelValue"
|
|
55
|
+
:[args.enum]="option"
|
|
56
|
+
:label="option"
|
|
53
57
|
/>
|
|
54
58
|
</URow>
|
|
55
59
|
`,
|
|
@@ -58,5 +62,5 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
58
62
|
export const Default = DefaultTemplate.bind({});
|
|
59
63
|
Default.args = {};
|
|
60
64
|
|
|
61
|
-
export const sizes =
|
|
62
|
-
sizes.args = {};
|
|
65
|
+
export const sizes = EnumVariantTemplate.bind({});
|
|
66
|
+
sizes.args = { enum: "size" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
import UColorPicker from "../ui.form-color-picker";
|
|
3
3
|
import UCol from "../ui.container-col";
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
component: UColorPicker,
|
|
12
12
|
args: {
|
|
13
13
|
label: "Label",
|
|
14
|
-
|
|
14
|
+
modelValue: "",
|
|
15
15
|
},
|
|
16
16
|
argTypes: {
|
|
17
17
|
...getArgTypes(UColorPicker.name),
|
|
@@ -21,30 +21,34 @@ export default {
|
|
|
21
21
|
const DefaultTemplate = (args) => ({
|
|
22
22
|
components: { UColorPicker },
|
|
23
23
|
setup() {
|
|
24
|
-
|
|
24
|
+
const slots = getSlotNames(UColorPicker.name);
|
|
25
|
+
|
|
26
|
+
return { args, slots };
|
|
25
27
|
},
|
|
26
28
|
template: `
|
|
27
|
-
<UColorPicker v-bind="args" v-model="args.
|
|
29
|
+
<UColorPicker v-bind="args" v-model="args.modelValue">
|
|
30
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
31
|
+
</UColorPicker>
|
|
28
32
|
`,
|
|
29
33
|
});
|
|
30
34
|
|
|
31
|
-
const
|
|
35
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
32
36
|
components: { UCol, UColorPicker },
|
|
33
37
|
setup() {
|
|
34
38
|
return {
|
|
35
39
|
args,
|
|
36
|
-
|
|
40
|
+
options: argTypes[args.enum].options,
|
|
37
41
|
};
|
|
38
42
|
},
|
|
39
43
|
template: `
|
|
40
44
|
<UCol>
|
|
41
45
|
<UColorPicker
|
|
42
|
-
v-for="(
|
|
43
|
-
v-bind="args"
|
|
44
|
-
:size="size"
|
|
46
|
+
v-for="(option, index) in options"
|
|
45
47
|
:key="index"
|
|
46
|
-
|
|
47
|
-
v-model="args.
|
|
48
|
+
v-bind="args"
|
|
49
|
+
v-model="args.modelValue"
|
|
50
|
+
:[args.enum]="option"
|
|
51
|
+
:name="option"
|
|
48
52
|
/>
|
|
49
53
|
</UCol>
|
|
50
54
|
`,
|
|
@@ -53,8 +57,8 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
53
57
|
export const Default = DefaultTemplate.bind({});
|
|
54
58
|
Default.args = {};
|
|
55
59
|
|
|
56
|
-
export const Sizes =
|
|
57
|
-
Sizes.args = {};
|
|
60
|
+
export const Sizes = EnumVariantTemplate.bind({});
|
|
61
|
+
Sizes.args = { enum: "size" };
|
|
58
62
|
|
|
59
63
|
export const Description = DefaultTemplate.bind({});
|
|
60
64
|
Description.args = { description: "Description" };
|