vueless 0.0.254 → 0.0.256
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/composable.ui/index.js +21 -4
- package/package.json +1 -1
- package/ui.button/composables/attrs.composable.js +11 -14
- package/ui.button/index.stories.js +1 -1
- package/ui.button-link/composables/attrs.composable.js +8 -11
- package/ui.button-link/index.stories.js +1 -1
- package/ui.button-toggle/composables/attrs.composable.js +5 -5
- package/ui.button-toggle/index.stories.js +2 -2
- package/ui.button-toggle-item/composables/attrs.composable.js +5 -5
- 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-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 +3 -3
- package/ui.form-date-picker/index.stories.js +11 -15
- 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-group/index.stories.js +6 -14
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import USwitch from "../ui.form-switch";
|
|
4
4
|
import UIcon from "../ui.image-icon";
|
|
@@ -22,50 +22,34 @@ export default {
|
|
|
22
22
|
const DefaultTemplate = (args) => ({
|
|
23
23
|
components: { USwitch, UIcon },
|
|
24
24
|
setup() {
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
template: `
|
|
28
|
-
<USwitch v-bind="args" v-model="args.value" />
|
|
29
|
-
`,
|
|
30
|
-
});
|
|
25
|
+
const slots = getSlotNames(USwitch.name);
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
components: { USwitch, URow },
|
|
34
|
-
setup() {
|
|
35
|
-
return {
|
|
36
|
-
args,
|
|
37
|
-
colors: argTypes.color.options,
|
|
38
|
-
};
|
|
27
|
+
return { args, slots };
|
|
39
28
|
},
|
|
40
29
|
template: `
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
v-bind="args"
|
|
45
|
-
:color="color"
|
|
46
|
-
v-model="args.value"
|
|
47
|
-
:key="index"
|
|
48
|
-
/>
|
|
49
|
-
</URow>
|
|
30
|
+
<USwitch v-bind="args" v-model="args.modelValue">
|
|
31
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
32
|
+
</USwitch>
|
|
50
33
|
`,
|
|
51
34
|
});
|
|
52
35
|
|
|
53
|
-
const
|
|
36
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
54
37
|
components: { USwitch, URow },
|
|
55
38
|
setup() {
|
|
56
39
|
return {
|
|
57
40
|
args,
|
|
58
|
-
|
|
41
|
+
options: argTypes[args.enum].options,
|
|
59
42
|
};
|
|
60
43
|
},
|
|
61
44
|
template: `
|
|
62
45
|
<URow>
|
|
63
46
|
<USwitch
|
|
64
|
-
v-for="(
|
|
65
|
-
v-bind="args"
|
|
66
|
-
:size="size"
|
|
67
|
-
v-model="args.value"
|
|
47
|
+
v-for="(option, index) in options"
|
|
68
48
|
:key="index"
|
|
49
|
+
v-bind="args"
|
|
50
|
+
v-model="args.modelValue"
|
|
51
|
+
:[args.enum]="option"
|
|
52
|
+
:label="option"
|
|
69
53
|
/>
|
|
70
54
|
</URow>
|
|
71
55
|
`,
|
|
@@ -80,14 +64,14 @@ label.args = { label: "Some label" };
|
|
|
80
64
|
export const description = DefaultTemplate.bind({});
|
|
81
65
|
description.args = { label: "Label", description: "Some description" };
|
|
82
66
|
|
|
83
|
-
export const colors =
|
|
84
|
-
colors.args = { modelValue: true };
|
|
67
|
+
export const colors = EnumVariantTemplate.bind({});
|
|
68
|
+
colors.args = { enum: "color", modelValue: true };
|
|
85
69
|
|
|
86
70
|
export const toggleLabel = DefaultTemplate.bind({});
|
|
87
71
|
toggleLabel.args = { toggleLabel: true };
|
|
88
72
|
|
|
89
|
-
export const sizes =
|
|
90
|
-
sizes.args = { color: "yellow" };
|
|
73
|
+
export const sizes = EnumVariantTemplate.bind({});
|
|
74
|
+
sizes.args = { enum: "size", color: "yellow" };
|
|
91
75
|
|
|
92
76
|
export const icon = DefaultTemplate.bind({});
|
|
93
77
|
icon.args = { toggleIcon: true, color: "yellow" };
|
|
@@ -30,7 +30,7 @@ const DefaultTemplate = (args) => ({
|
|
|
30
30
|
return { args, slots };
|
|
31
31
|
},
|
|
32
32
|
template: `
|
|
33
|
-
<UTabs v-
|
|
33
|
+
<UTabs v-bind="args" v-model="args.modelValue">
|
|
34
34
|
${args.slotTemplate || getSlotsFragment()}
|
|
35
35
|
</UTabs>
|
|
36
36
|
`,
|
|
@@ -47,11 +47,11 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
47
47
|
template: `
|
|
48
48
|
<div class="space-y-16">
|
|
49
49
|
<UTabs
|
|
50
|
-
v-model="args.modelValue"
|
|
51
50
|
v-for="(option, index) in options"
|
|
51
|
+
:key="index"
|
|
52
52
|
v-bind="args"
|
|
53
|
+
v-model="args.modelValue"
|
|
53
54
|
:[args.enum]="option"
|
|
54
|
-
:key="index"
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
`,
|
|
@@ -48,11 +48,11 @@ const ColorsTemplate = (args, { argTypes } = {}) => ({
|
|
|
48
48
|
<URow v-for="(variant, index) in variants" :key="index">
|
|
49
49
|
<UBadge
|
|
50
50
|
v-for="(color, index) in colors"
|
|
51
|
+
:key="index"
|
|
51
52
|
v-bind="args"
|
|
52
53
|
:color="color"
|
|
53
54
|
:variant="variant"
|
|
54
55
|
:label="color"
|
|
55
|
-
:key="index"
|
|
56
56
|
/>
|
|
57
57
|
</URow>
|
|
58
58
|
</UCol>
|
|
@@ -72,10 +72,10 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
72
72
|
<URow>
|
|
73
73
|
<UBadge
|
|
74
74
|
v-for="(option, index) in options"
|
|
75
|
+
:key="index"
|
|
75
76
|
v-bind="args"
|
|
76
77
|
:[args.enum]="option"
|
|
77
78
|
:label="getText(option)"
|
|
78
|
-
:key="index"
|
|
79
79
|
/>
|
|
80
80
|
</URow>
|
|
81
81
|
`,
|
|
@@ -50,9 +50,9 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
50
50
|
<URow>
|
|
51
51
|
<UText
|
|
52
52
|
v-for="(option, index) in options"
|
|
53
|
-
:[args.enum]="option"
|
|
54
|
-
v-bind="args"
|
|
55
53
|
:key="index"
|
|
54
|
+
v-bind="args"
|
|
55
|
+
:[args.enum]="option"
|
|
56
56
|
>
|
|
57
57
|
${args.slotTemplate || defaultTemplate}
|
|
58
58
|
</UText>
|