vueless 0.0.237 → 0.0.239
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 +2 -2
- package/ui.button/index.stories.js +4 -4
- package/ui.container-col/Docs.mdx +16 -0
- package/ui.container-col/composables/attrs.composable.js +33 -0
- package/ui.container-col/configs/default.config.js +46 -0
- package/ui.container-col/constants/index.js +5 -0
- package/ui.container-col/index.stories.js +64 -0
- package/ui.container-col/index.vue +80 -0
- package/ui.container-divider/configs/default.config.js +1 -1
- package/ui.container-group/configs/default.config.js +0 -42
- package/ui.container-group/index.stories.js +7 -4
- package/ui.container-group/index.vue +3 -49
- package/ui.container-groups/index.stories.js +6 -3
- package/ui.container-row/index.stories.js +7 -7
- package/ui.container-row/index.vue +1 -1
- package/ui.dropdown-button/index.stories.js +4 -4
- package/ui.form-checkbox/index.stories.js +7 -7
- package/ui.form-color-picker/index.stories.js +4 -4
- package/ui.form-input/index.stories.js +4 -4
- package/ui.form-input/index.vue +12 -12
- package/ui.form-input-money/index.stories.js +4 -4
- package/ui.form-input-number/index.stories.js +4 -4
- package/ui.form-label/index.stories.js +4 -4
- package/ui.form-radio-group/index.stories.js +4 -4
- package/ui.form-select/configs/default.config.js +1 -1
- package/ui.form-switch/configs/default.config.js +3 -4
- package/ui.form-textarea/configs/default.config.js +1 -2
- package/ui.form-textarea/index.stories.js +4 -4
- package/ui.form-textarea/index.vue +13 -13
- package/ui.image-avatar/index.stories.js +10 -10
- package/ui.loader-rendering/index.stories.js +4 -4
- package/ui.loader-top/index.stories.js +4 -4
- package/ui.navigation-progress/index.stories.js +9 -9
- package/ui.other-dot/index.stories.js +7 -7
- package/ui.text-alert/index.stories.js +4 -4
- package/ui.text-badge/index.stories.js +4 -4
- package/ui.text-header/index.stories.js +4 -4
- package/ui.text-notify/index.stories.js +4 -4
- package/web-types.json +81 -47
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.239",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@release-it/bumper": "^6.0.1",
|
|
38
38
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
39
39
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
40
|
-
"@vueless/plugin-vite": "^0.0.
|
|
40
|
+
"@vueless/plugin-vite": "^0.0.44",
|
|
41
41
|
"@vueless/storybook": "^0.0.34",
|
|
42
42
|
"@vueless/web-types": "^0.0.13",
|
|
43
43
|
"autoprefixer": "^10.4.19",
|
|
@@ -3,7 +3,7 @@ import { getArgTypes, getSlotNames, allSlotsFragment } from "../service.storyboo
|
|
|
3
3
|
import UButton from "../ui.button";
|
|
4
4
|
import UIcon from "../ui.image-icon";
|
|
5
5
|
import URow from "../ui.container-row";
|
|
6
|
-
import
|
|
6
|
+
import UCol from "../ui.container-col";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The `UButton` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.button)
|
|
@@ -77,7 +77,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
const ColorTemplate = (args, { argTypes } = {}) => ({
|
|
80
|
-
components: { UButton, URow,
|
|
80
|
+
components: { UButton, URow, UCol },
|
|
81
81
|
setup() {
|
|
82
82
|
return {
|
|
83
83
|
args,
|
|
@@ -86,7 +86,7 @@ const ColorTemplate = (args, { argTypes } = {}) => ({
|
|
|
86
86
|
};
|
|
87
87
|
},
|
|
88
88
|
template: `
|
|
89
|
-
<
|
|
89
|
+
<UCol>
|
|
90
90
|
<URow v-for="(variant, index) in variants" :key="index">
|
|
91
91
|
<UButton
|
|
92
92
|
v-for="(color, index) in colors"
|
|
@@ -97,7 +97,7 @@ const ColorTemplate = (args, { argTypes } = {}) => ({
|
|
|
97
97
|
:key="index"
|
|
98
98
|
/>
|
|
99
99
|
</URow>
|
|
100
|
-
</
|
|
100
|
+
</UCol>
|
|
101
101
|
`,
|
|
102
102
|
});
|
|
103
103
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
|
+
import { getSource } from "../service.storybook";
|
|
3
|
+
|
|
4
|
+
import * as stories from "./index.stories";
|
|
5
|
+
import defaultConfig from "./configs/default.config?raw"
|
|
6
|
+
|
|
7
|
+
<Meta of={stories} />
|
|
8
|
+
<Title of={stories} />
|
|
9
|
+
<Subtitle of={stories} />
|
|
10
|
+
<Description of={stories} />
|
|
11
|
+
<Primary of={stories} />
|
|
12
|
+
<Controls of={stories.Default} />
|
|
13
|
+
<Stories of={stories} />
|
|
14
|
+
|
|
15
|
+
## Default config
|
|
16
|
+
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import useUI from "../../composable.ui";
|
|
2
|
+
import { cva } from "../../service.ui";
|
|
3
|
+
|
|
4
|
+
import defaultConfig from "../configs/default.config";
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
|
|
7
|
+
export default function useAttrs(props) {
|
|
8
|
+
const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
|
|
9
|
+
const attrs = {};
|
|
10
|
+
|
|
11
|
+
for (const key in defaultConfig) {
|
|
12
|
+
if (isSystemKey(key)) continue;
|
|
13
|
+
|
|
14
|
+
const classes = computed(() => {
|
|
15
|
+
const value = config.value[key];
|
|
16
|
+
|
|
17
|
+
if (value.variants || value.compoundVariants) {
|
|
18
|
+
return cva(value)({
|
|
19
|
+
...props,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return "";
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
...attrs,
|
|
31
|
+
config,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default /*tw*/ {
|
|
2
|
+
wrapper: {
|
|
3
|
+
base: "flex flex-col",
|
|
4
|
+
variants: {
|
|
5
|
+
reverse: {
|
|
6
|
+
false: "flex-col",
|
|
7
|
+
true: "flex-col-reverse",
|
|
8
|
+
},
|
|
9
|
+
wrap: {
|
|
10
|
+
true: "flex-wrap",
|
|
11
|
+
},
|
|
12
|
+
gap: {
|
|
13
|
+
none: "gap-0",
|
|
14
|
+
"2xs": "gap-1",
|
|
15
|
+
xs: "gap-2",
|
|
16
|
+
sm: "gap-3",
|
|
17
|
+
md: "gap-4",
|
|
18
|
+
lg: "gap-5",
|
|
19
|
+
xl: "gap-6",
|
|
20
|
+
"2xl": "gap-8",
|
|
21
|
+
},
|
|
22
|
+
align: {
|
|
23
|
+
end: "items-end",
|
|
24
|
+
start: "items-start",
|
|
25
|
+
center: "items-center",
|
|
26
|
+
stretch: "items-stretch",
|
|
27
|
+
baseline: "items-baseline",
|
|
28
|
+
},
|
|
29
|
+
justify: {
|
|
30
|
+
end: "justify-end",
|
|
31
|
+
start: "justify-start",
|
|
32
|
+
center: "justify-center",
|
|
33
|
+
around: "justify-around",
|
|
34
|
+
evenly: "justify-evenly",
|
|
35
|
+
between: "justify-between",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
gap: "md",
|
|
41
|
+
align: "start",
|
|
42
|
+
justify: "start",
|
|
43
|
+
wrap: false,
|
|
44
|
+
reverse: false,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getArgTypes } from "../service.storybook";
|
|
2
|
+
|
|
3
|
+
import UCol from "../ui.container-col";
|
|
4
|
+
import UInput from "../ui.form-input";
|
|
5
|
+
import UButton from "../ui.button";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The `UGroup` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.container-group)
|
|
9
|
+
*/
|
|
10
|
+
export default {
|
|
11
|
+
id: "5015",
|
|
12
|
+
title: "Containers / Col",
|
|
13
|
+
component: UCol,
|
|
14
|
+
args: {},
|
|
15
|
+
argTypes: {
|
|
16
|
+
...getArgTypes(UCol.name),
|
|
17
|
+
},
|
|
18
|
+
parameters: {
|
|
19
|
+
docs: {
|
|
20
|
+
story: {
|
|
21
|
+
iframeHeight: 360,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const defaultSlotTemplate = `
|
|
28
|
+
<template #default>
|
|
29
|
+
<UInput placeholder="Vasyl" label="Name" />
|
|
30
|
+
<UInput placeholder="Vasylenko" label="Surname" />
|
|
31
|
+
<UInput placeholder="Kyiv" label="Town" />
|
|
32
|
+
</template>
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
const DefaultTemplate = (args) => ({
|
|
36
|
+
components: { UCol, UInput, UButton },
|
|
37
|
+
setup() {
|
|
38
|
+
return { args };
|
|
39
|
+
},
|
|
40
|
+
template: `
|
|
41
|
+
<UCol v-bind="args">
|
|
42
|
+
${args.slotTemplate || defaultSlotTemplate}
|
|
43
|
+
</UCol>
|
|
44
|
+
`,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const Default = DefaultTemplate.bind({});
|
|
48
|
+
Default.args = {};
|
|
49
|
+
|
|
50
|
+
export const slotDefault = DefaultTemplate.bind({});
|
|
51
|
+
slotDefault.args = {
|
|
52
|
+
slotTemplate: `
|
|
53
|
+
<template #default>
|
|
54
|
+
<UInput placeholder="placeholder" label="Label" />
|
|
55
|
+
</template>
|
|
56
|
+
`,
|
|
57
|
+
};
|
|
58
|
+
slotDefault.parameters = {
|
|
59
|
+
docs: {
|
|
60
|
+
story: {
|
|
61
|
+
iframeHeight: 240,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-bind="wrapperAttrs" :data-cy="dataCy">
|
|
3
|
+
<!-- @slot Use it to add something inside. -->
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import UIService from "../service.ui";
|
|
10
|
+
|
|
11
|
+
import { UCol } from "./constants";
|
|
12
|
+
import defaultConfig from "./configs/default.config";
|
|
13
|
+
import useAttrs from "./composables/attrs.composable";
|
|
14
|
+
|
|
15
|
+
/* Should be a string for correct web-types gen */
|
|
16
|
+
defineOptions({ name: "UCol", inheritAttrs: false });
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
/**
|
|
20
|
+
* The distance between nested elements.
|
|
21
|
+
* @values none, 2xs, xs, sm, md, lg, xl, 2xl
|
|
22
|
+
*/
|
|
23
|
+
gap: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: UIService.get(defaultConfig, UCol).default.gap,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Nested items align (flex align-items).
|
|
30
|
+
* @values start, end, center, stretch, baseline
|
|
31
|
+
*/
|
|
32
|
+
align: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: UIService.get(defaultConfig, UCol).default.align,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Nested items horizontally align (flex justify-content).
|
|
39
|
+
* @values start, end, center, around, evenly, between
|
|
40
|
+
*/
|
|
41
|
+
justify: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: UIService.get(defaultConfig, UCol).default.justify,
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Reverse nested items order.
|
|
48
|
+
*/
|
|
49
|
+
reverse: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: UIService.get(defaultConfig, UCol).default.reverse,
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Allow items to wrap (flex flex-wrap).
|
|
56
|
+
*/
|
|
57
|
+
wrap: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: UIService.get(defaultConfig, UCol).default.wrap,
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*Component ui config object.
|
|
64
|
+
*/
|
|
65
|
+
config: {
|
|
66
|
+
type: Object,
|
|
67
|
+
default: () => ({}),
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Data-cy attribute for automated testing.
|
|
72
|
+
*/
|
|
73
|
+
dataCy: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: "",
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const { wrapperAttrs } = useAttrs(props);
|
|
80
|
+
</script>
|
|
@@ -12,49 +12,7 @@ export default /*tw*/ {
|
|
|
12
12
|
headerFallback: "flex items-center",
|
|
13
13
|
title: "{UHeader} pr-2",
|
|
14
14
|
underline: "{UDivider} pt-1.5",
|
|
15
|
-
content: {
|
|
16
|
-
base: "flex flex-col",
|
|
17
|
-
variants: {
|
|
18
|
-
reverse: {
|
|
19
|
-
false: "flex-col",
|
|
20
|
-
true: "flex-col-reverse",
|
|
21
|
-
},
|
|
22
|
-
wrap: {
|
|
23
|
-
true: "flex-wrap",
|
|
24
|
-
},
|
|
25
|
-
gap: {
|
|
26
|
-
none: "gap-0",
|
|
27
|
-
"2xs": "gap-1",
|
|
28
|
-
xs: "gap-2",
|
|
29
|
-
sm: "gap-3",
|
|
30
|
-
md: "gap-4",
|
|
31
|
-
lg: "gap-5",
|
|
32
|
-
xl: "gap-6",
|
|
33
|
-
"2xl": "gap-8",
|
|
34
|
-
},
|
|
35
|
-
align: {
|
|
36
|
-
end: "items-end",
|
|
37
|
-
start: "items-start",
|
|
38
|
-
center: "items-center",
|
|
39
|
-
stretch: "items-stretch",
|
|
40
|
-
baseline: "items-baseline",
|
|
41
|
-
},
|
|
42
|
-
justify: {
|
|
43
|
-
end: "justify-end",
|
|
44
|
-
start: "justify-start",
|
|
45
|
-
center: "justify-center",
|
|
46
|
-
around: "justify-around",
|
|
47
|
-
evenly: "justify-evenly",
|
|
48
|
-
between: "justify-between",
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
15
|
defaultVariants: {
|
|
53
|
-
gap: "md",
|
|
54
|
-
align: "start",
|
|
55
|
-
justify: "start",
|
|
56
|
-
wrap: false,
|
|
57
|
-
reverse: false,
|
|
58
16
|
upperlined: true,
|
|
59
17
|
underlined: false,
|
|
60
18
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getArgTypes } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UGroup from "../ui.container-group";
|
|
4
|
+
import UCol from "../ui.container-col";
|
|
4
5
|
import UInput from "../ui.form-input";
|
|
5
6
|
import UButton from "../ui.button";
|
|
6
7
|
|
|
@@ -28,14 +29,16 @@ export default {
|
|
|
28
29
|
|
|
29
30
|
const defaultSlotTemplate = `
|
|
30
31
|
<template #default>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
<UCol>
|
|
33
|
+
<UInput placeholder="Vasyl" label="Name" />
|
|
34
|
+
<UInput placeholder="Vasylenko" label="Surname" />
|
|
35
|
+
<UInput placeholder="Kyiv" label="Town" />
|
|
36
|
+
</UCol>
|
|
34
37
|
</template>
|
|
35
38
|
`;
|
|
36
39
|
|
|
37
40
|
const DefaultTemplate = (args) => ({
|
|
38
|
-
components: { UGroup, UInput, UButton },
|
|
41
|
+
components: { UGroup, UCol, UInput, UButton },
|
|
39
42
|
setup() {
|
|
40
43
|
return { args };
|
|
41
44
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div v-bind="wrapperAttrs" :data-cy="dataCy">
|
|
3
3
|
<template v-if="title">
|
|
4
4
|
<UDivider v-if="upperlined" size="xl" no-top-padding v-bind="upperlineAttrs" />
|
|
5
5
|
|
|
@@ -24,10 +24,8 @@
|
|
|
24
24
|
<UDivider v-if="underlined" size="xl" v-bind="underlineAttrs" />
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<slot />
|
|
30
|
-
</div>
|
|
27
|
+
<!-- @slot Use it to add something inside. -->
|
|
28
|
+
<slot />
|
|
31
29
|
</div>
|
|
32
30
|
</template>
|
|
33
31
|
|
|
@@ -52,49 +50,6 @@ const props = defineProps({
|
|
|
52
50
|
default: "",
|
|
53
51
|
},
|
|
54
52
|
|
|
55
|
-
/**
|
|
56
|
-
* The distance between nested elements.
|
|
57
|
-
* @values none, 2xs, xs, sm, md, lg, xl, 2xl
|
|
58
|
-
*/
|
|
59
|
-
gap: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: UIService.get(defaultConfig, UGroup).default.gap,
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Nested items align (flex align-items).
|
|
66
|
-
* @values start, end, center, stretch, baseline
|
|
67
|
-
*/
|
|
68
|
-
align: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: UIService.get(defaultConfig, UGroup).default.align,
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Nested items horizontally align (flex justify-content).
|
|
75
|
-
* @values start, end, center, around, evenly, between
|
|
76
|
-
*/
|
|
77
|
-
justify: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: UIService.get(defaultConfig, UGroup).default.justify,
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Reverse nested items order.
|
|
84
|
-
*/
|
|
85
|
-
reverse: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: UIService.get(defaultConfig, UGroup).default.reverse,
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Allow items to wrap (flex flex-wrap).
|
|
92
|
-
*/
|
|
93
|
-
wrap: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: UIService.get(defaultConfig, UGroup).default.wrap,
|
|
96
|
-
},
|
|
97
|
-
|
|
98
53
|
/**
|
|
99
54
|
* Show line above the header.
|
|
100
55
|
*/
|
|
@@ -129,7 +84,6 @@ const props = defineProps({
|
|
|
129
84
|
});
|
|
130
85
|
|
|
131
86
|
const {
|
|
132
|
-
contentAttrs,
|
|
133
87
|
headerAttrs,
|
|
134
88
|
wrapperAttrs,
|
|
135
89
|
headerFallbackAttrs,
|
|
@@ -2,6 +2,7 @@ import { getArgTypes } from "../service.storybook";
|
|
|
2
2
|
|
|
3
3
|
import UGroups from "../ui.container-groups";
|
|
4
4
|
import UGroup from "../ui.container-group";
|
|
5
|
+
import UCol from "../ui.container-col";
|
|
5
6
|
import UInput from "../ui.form-input";
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -26,14 +27,16 @@ export default {
|
|
|
26
27
|
const defaultSlotTemplate = `
|
|
27
28
|
<template #default>
|
|
28
29
|
<UGroup :upperlined="n !== 1" :title="'Group '+n" v-for="n in 3">
|
|
29
|
-
<
|
|
30
|
-
|
|
30
|
+
<UCol>
|
|
31
|
+
<UInput placeholder="input" label="Label" />
|
|
32
|
+
<UInput placeholder="input" label="Label" />
|
|
33
|
+
</UCol>
|
|
31
34
|
</UGroup>
|
|
32
35
|
</template>
|
|
33
36
|
`;
|
|
34
37
|
|
|
35
38
|
const DefaultTemplate = (args) => ({
|
|
36
|
-
components: { UGroups, UGroup, UInput },
|
|
39
|
+
components: { UGroups, UGroup, UCol, UInput },
|
|
37
40
|
setup() {
|
|
38
41
|
return { args };
|
|
39
42
|
},
|
|
@@ -2,7 +2,7 @@ import { getArgTypes } from "../service.storybook";
|
|
|
2
2
|
|
|
3
3
|
import URow from "../ui.container-row";
|
|
4
4
|
import UInput from "../ui.form-input";
|
|
5
|
-
import
|
|
5
|
+
import UCol from "../ui.container-col";
|
|
6
6
|
import UButton from "../ui.button";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -37,7 +37,7 @@ const DefaultTemplate = (args) => ({
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
const GapTemplate = (args, { argTypes } = {}) => ({
|
|
40
|
-
components: {
|
|
40
|
+
components: { UCol, URow, UInput },
|
|
41
41
|
setup() {
|
|
42
42
|
return {
|
|
43
43
|
args,
|
|
@@ -45,17 +45,17 @@ const GapTemplate = (args, { argTypes } = {}) => ({
|
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
47
|
template: `
|
|
48
|
-
<
|
|
48
|
+
<UCol gap="xl">
|
|
49
49
|
<URow v-for="(gap, index) in gaps" :key="index" v-bind="args" :gap="gap" align="center">
|
|
50
50
|
<UInput :label="gap" />
|
|
51
51
|
<UInput :label="gap" />
|
|
52
52
|
</URow>
|
|
53
|
-
</
|
|
53
|
+
</UCol>
|
|
54
54
|
`,
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
const AlignTemplate = (args, { argTypes } = {}) => ({
|
|
58
|
-
components: {
|
|
58
|
+
components: { UCol, URow, UInput, UButton },
|
|
59
59
|
setup() {
|
|
60
60
|
return {
|
|
61
61
|
args,
|
|
@@ -63,12 +63,12 @@ const AlignTemplate = (args, { argTypes } = {}) => ({
|
|
|
63
63
|
};
|
|
64
64
|
},
|
|
65
65
|
template: `
|
|
66
|
-
<
|
|
66
|
+
<UCol gap="xl">
|
|
67
67
|
<URow v-for="(align, index) in aligns" :key="index" v-bind="args" :align="align">
|
|
68
68
|
<UButton :label="align" size="xs" block />
|
|
69
69
|
<UInput label="Name" />
|
|
70
70
|
</URow>
|
|
71
|
-
</
|
|
71
|
+
</UCol>
|
|
72
72
|
`,
|
|
73
73
|
});
|
|
74
74
|
|
|
@@ -3,7 +3,7 @@ import { getArgTypes, getSlotNames, allSlotsFragment } from "../service.storyboo
|
|
|
3
3
|
import UDropdownButton from "../ui.dropdown-button";
|
|
4
4
|
import UDropdownItem from "../ui.dropdown-item";
|
|
5
5
|
import URow from "../ui.container-row";
|
|
6
|
-
import
|
|
6
|
+
import UCol from "../ui.container-col";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The `UDropdownButton` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.dropdown-button)
|
|
@@ -105,7 +105,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
const VariantColorsTemplate = (args, { argTypes } = {}) => ({
|
|
108
|
-
components: { UDropdownButton, URow,
|
|
108
|
+
components: { UDropdownButton, URow, UCol },
|
|
109
109
|
setup() {
|
|
110
110
|
return {
|
|
111
111
|
args,
|
|
@@ -114,7 +114,7 @@ const VariantColorsTemplate = (args, { argTypes } = {}) => ({
|
|
|
114
114
|
};
|
|
115
115
|
},
|
|
116
116
|
template: `
|
|
117
|
-
<
|
|
117
|
+
<UCol>
|
|
118
118
|
<URow v-for="(variant, index) in variants" :key="index">
|
|
119
119
|
<UDropdownButton
|
|
120
120
|
v-for="(color, idx) in colors"
|
|
@@ -125,7 +125,7 @@ const VariantColorsTemplate = (args, { argTypes } = {}) => ({
|
|
|
125
125
|
:key="idx"
|
|
126
126
|
/>
|
|
127
127
|
</URow>
|
|
128
|
-
</
|
|
128
|
+
</UCol>
|
|
129
129
|
`,
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -3,7 +3,7 @@ import { getArgTypes, getSlotNames, allSlotsFragment } from "../service.storyboo
|
|
|
3
3
|
import UCheckbox from "../ui.form-checkbox";
|
|
4
4
|
import UCheckboxGroup from "../ui.form-checkbox-group";
|
|
5
5
|
import UBadge from "../ui.text-badge";
|
|
6
|
-
import
|
|
6
|
+
import UCol from "../ui.container-col";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The `UCheckbox` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.form-checkbox)
|
|
@@ -36,7 +36,7 @@ const DefaultTemplate = (args) => ({
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
const ValueTypesTemplate = (args) => ({
|
|
39
|
-
components: { UCheckbox, UCheckboxGroup,
|
|
39
|
+
components: { UCheckbox, UCheckboxGroup, UCol },
|
|
40
40
|
setup() {
|
|
41
41
|
return { args };
|
|
42
42
|
},
|
|
@@ -48,7 +48,7 @@ const ValueTypesTemplate = (args) => ({
|
|
|
48
48
|
};
|
|
49
49
|
},
|
|
50
50
|
template: `
|
|
51
|
-
<
|
|
51
|
+
<UCol gap="xl">
|
|
52
52
|
<UCheckbox
|
|
53
53
|
v-bind="args"
|
|
54
54
|
v-model="defaultValue"
|
|
@@ -85,12 +85,12 @@ const ValueTypesTemplate = (args) => ({
|
|
|
85
85
|
{{ arrayValue }}
|
|
86
86
|
</span>
|
|
87
87
|
</div>
|
|
88
|
-
</
|
|
88
|
+
</UCol>
|
|
89
89
|
`,
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
93
|
-
components: { UCheckbox,
|
|
93
|
+
components: { UCheckbox, UCol },
|
|
94
94
|
setup() {
|
|
95
95
|
return {
|
|
96
96
|
args,
|
|
@@ -98,7 +98,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
98
98
|
};
|
|
99
99
|
},
|
|
100
100
|
template: `
|
|
101
|
-
<
|
|
101
|
+
<UCol gap="xl">
|
|
102
102
|
<UCheckbox
|
|
103
103
|
v-for="(size, index) in sizes"
|
|
104
104
|
:key="index"
|
|
@@ -107,7 +107,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
107
107
|
:size="size"
|
|
108
108
|
:label="size"
|
|
109
109
|
/>
|
|
110
|
-
</
|
|
110
|
+
</UCol>
|
|
111
111
|
`,
|
|
112
112
|
});
|
|
113
113
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getArgTypes } from "../service.storybook";
|
|
2
2
|
import UColorPicker from "../ui.form-color-picker";
|
|
3
|
-
import
|
|
3
|
+
import UCol from "../ui.container-col";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `UColorPicker` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.form-color-picker)
|
|
@@ -29,7 +29,7 @@ const DefaultTemplate = (args) => ({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
32
|
-
components: {
|
|
32
|
+
components: { UCol, UColorPicker },
|
|
33
33
|
setup() {
|
|
34
34
|
return {
|
|
35
35
|
args,
|
|
@@ -37,7 +37,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
template: `
|
|
40
|
-
<
|
|
40
|
+
<UCol>
|
|
41
41
|
<UColorPicker
|
|
42
42
|
v-for="(size, index) in sizes"
|
|
43
43
|
v-bind="args"
|
|
@@ -46,7 +46,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
46
46
|
:name="size"
|
|
47
47
|
v-model="args.value"
|
|
48
48
|
/>
|
|
49
|
-
</
|
|
49
|
+
</UCol>
|
|
50
50
|
`,
|
|
51
51
|
});
|
|
52
52
|
|