vueless 0.0.115 → 0.0.117
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 +2 -2
- package/package.json +1 -1
- package/ui.container-accordion/Docs.mdx +16 -0
- package/ui.container-group/composables/attrs.composable.js +6 -1
- package/ui.container-group/configs/default.config.js +19 -5
- package/ui.container-group/index.stories.js +9 -10
- package/ui.container-group/index.vue +15 -6
- package/ui.container-groups/composables/attrs.composable.js +19 -2
- package/ui.container-groups/configs/default.config.js +24 -1
- package/ui.container-groups/constants/index.js +5 -0
- package/ui.container-groups/index.stories.js +13 -13
- package/ui.container-groups/index.vue +24 -2
- package/ui.container-row/index.stories.js +10 -9
- package/ui.container-row/index.vue +3 -3
- package/ui.data-list/Docs.mdx +16 -0
- package/ui.form-checkbox/index.stories.js +2 -2
- package/ui.form-color-picker/Docs.mdx +16 -0
- package/ui.form-date-picker-range/Docs.mdx +16 -0
- package/ui.form-input/index.stories.js +1 -1
- package/ui.form-input-file/Docs.mdx +16 -0
- package/ui.form-input-money/index.stories.js +1 -1
- package/ui.form-input-number/index.stories.js +1 -1
- package/ui.form-input-rating/Docs.mdx +16 -0
- package/ui.form-input-search/Docs.mdx +16 -0
- package/ui.form-switch/Docs.mdx +16 -0
- package/ui.form-textarea/index.stories.js +1 -1
- package/ui.image-avatar/Docs.mdx +16 -0
- package/ui.image-avatar/index.stories.js +2 -2
- package/ui.image-icon/index.vue +6 -9
- package/ui.image-logo/Docs.mdx +16 -0
- package/ui.loader/Docs.mdx +16 -0
- package/ui.navigation-pagination/Docs.mdx +16 -0
- package/ui.navigation-progress/Docs.mdx +16 -0
- package/ui.navigation-stepper/Docs.mdx +16 -0
- package/ui.navigation-tab/Docs.mdx +16 -0
- package/ui.navigation-tabs/Docs.mdx +16 -0
- package/ui.other-dot/Docs.mdx +16 -0
- package/ui.text-alert/Docs.mdx +16 -0
- package/ui.text-block/Docs.mdx +16 -0
- package/ui.text-file/Docs.mdx +16 -0
- package/ui.text-files/Docs.mdx +16 -0
- package/web-types.json +38 -11
package/composable.ui/index.js
CHANGED
|
@@ -149,8 +149,8 @@ function mergeConfigs({
|
|
|
149
149
|
config = {},
|
|
150
150
|
isReplace = false,
|
|
151
151
|
}) {
|
|
152
|
-
globalConfig = globalConfig || {};
|
|
153
|
-
propsConfig = propsConfig || {};
|
|
152
|
+
globalConfig = cloneDeep(globalConfig || {});
|
|
153
|
+
propsConfig = cloneDeep(propsConfig || {});
|
|
154
154
|
|
|
155
155
|
const isGlobalConfig = Object.keys(globalConfig).length;
|
|
156
156
|
const isPropsConfig = Object.keys(propsConfig).length;
|
package/package.json
CHANGED
|
@@ -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 />
|
|
@@ -20,7 +20,12 @@ export function useAttrs(props) {
|
|
|
20
20
|
compoundVariants: header.compoundVariants,
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
const contentClasses = computed(() =>
|
|
23
|
+
const contentClasses = computed(() =>
|
|
24
|
+
cvaContent({
|
|
25
|
+
gap: props.gap,
|
|
26
|
+
align: props.align,
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
24
29
|
|
|
25
30
|
const headerClasses = computed(() => cvaHeader({ underlined: props.underlined }));
|
|
26
31
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
wrapper: "",
|
|
2
|
+
wrapper: "w-full",
|
|
3
3
|
upperline: "",
|
|
4
4
|
header: {
|
|
5
5
|
base: "flex items-center justify-between",
|
|
@@ -13,16 +13,30 @@ export default /*tw*/ {
|
|
|
13
13
|
title: "pr-2",
|
|
14
14
|
underline: "pt-1.5",
|
|
15
15
|
content: {
|
|
16
|
+
base: "flex flex-col",
|
|
16
17
|
variants: {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
gap: {
|
|
19
|
+
none: "space-y-0",
|
|
20
|
+
"2xs": "space-y-1",
|
|
21
|
+
xs: "space-y-2",
|
|
22
|
+
sm: "space-y-3",
|
|
19
23
|
md: "space-y-4",
|
|
20
|
-
lg: "space-y-
|
|
24
|
+
lg: "space-y-5",
|
|
25
|
+
xl: "space-y-6",
|
|
26
|
+
"2xl": "space-y-8",
|
|
27
|
+
},
|
|
28
|
+
align: {
|
|
29
|
+
end: "items-end",
|
|
30
|
+
start: "items-start",
|
|
31
|
+
center: "items-center",
|
|
32
|
+
stretch: "items-stretch",
|
|
33
|
+
baseline: "items-baseline",
|
|
21
34
|
},
|
|
22
35
|
},
|
|
23
36
|
},
|
|
24
37
|
defaultVariants: {
|
|
25
|
-
|
|
38
|
+
gap: "md",
|
|
39
|
+
align: "start",
|
|
26
40
|
upperlined: true,
|
|
27
41
|
underlined: false,
|
|
28
42
|
},
|
|
@@ -10,15 +10,6 @@ export default {
|
|
|
10
10
|
component: UGroup,
|
|
11
11
|
args: {
|
|
12
12
|
title: "Form group",
|
|
13
|
-
slotTemplate: `
|
|
14
|
-
<template #default>
|
|
15
|
-
<UInput placeholder="Vasyl" label="Name" />
|
|
16
|
-
|
|
17
|
-
<UInput placeholder="Vasylenko" label="Surname" />
|
|
18
|
-
|
|
19
|
-
<UInput placeholder="Kyiv" label="Town" />
|
|
20
|
-
</template>
|
|
21
|
-
`,
|
|
22
13
|
},
|
|
23
14
|
argTypes: {
|
|
24
15
|
...getArgTypes(UGroup.name),
|
|
@@ -32,6 +23,14 @@ export default {
|
|
|
32
23
|
},
|
|
33
24
|
};
|
|
34
25
|
|
|
26
|
+
const defaultSlotTemplate = `
|
|
27
|
+
<template #default>
|
|
28
|
+
<UInput placeholder="Vasyl" label="Name" />
|
|
29
|
+
<UInput placeholder="Vasylenko" label="Surname" />
|
|
30
|
+
<UInput placeholder="Kyiv" label="Town" />
|
|
31
|
+
</template>
|
|
32
|
+
`;
|
|
33
|
+
|
|
35
34
|
const DefaultTemplate = (args) => ({
|
|
36
35
|
components: { UGroup, UInput, UButton },
|
|
37
36
|
setup() {
|
|
@@ -39,7 +38,7 @@ const DefaultTemplate = (args) => ({
|
|
|
39
38
|
},
|
|
40
39
|
template: `
|
|
41
40
|
<UGroup v-bind="args">
|
|
42
|
-
${args.slotTemplate}
|
|
41
|
+
${args.slotTemplate || defaultSlotTemplate}
|
|
43
42
|
</UGroup>
|
|
44
43
|
`,
|
|
45
44
|
});
|
|
@@ -53,12 +53,21 @@ const props = defineProps({
|
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* The distance between nested
|
|
57
|
-
* @values sm, md, lg
|
|
56
|
+
* The distance between nested elements.
|
|
57
|
+
* @values none, 2xs, xs, sm, md, lg, xl, 2xl
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
gap: {
|
|
60
60
|
type: String,
|
|
61
|
-
default: UIService.get(defaultConfig, UGroup).default.
|
|
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,
|
|
62
71
|
},
|
|
63
72
|
|
|
64
73
|
/**
|
|
@@ -78,7 +87,7 @@ const props = defineProps({
|
|
|
78
87
|
},
|
|
79
88
|
|
|
80
89
|
/**
|
|
81
|
-
*
|
|
90
|
+
*Component ui config object.
|
|
82
91
|
*/
|
|
83
92
|
config: {
|
|
84
93
|
type: Object,
|
|
@@ -86,7 +95,7 @@ const props = defineProps({
|
|
|
86
95
|
},
|
|
87
96
|
|
|
88
97
|
/**
|
|
89
|
-
*
|
|
98
|
+
* Data-cy attribute for automated testing.
|
|
90
99
|
*/
|
|
91
100
|
dataCy: {
|
|
92
101
|
type: String,
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
|
|
3
|
+
import { cva } from "../../service.ui";
|
|
1
4
|
import useUI from "../../composable.ui";
|
|
2
5
|
import defaultConfig from "../configs/default.config";
|
|
3
6
|
|
|
4
7
|
export function useAttrs(props) {
|
|
5
|
-
const { getAttrs } = useUI(defaultConfig, () => props.config);
|
|
8
|
+
const { config, getAttrs } = useUI(defaultConfig, () => props.config);
|
|
9
|
+
const { wrapper } = config.value;
|
|
10
|
+
|
|
11
|
+
const cvaWrapper = cva({
|
|
12
|
+
base: wrapper.base,
|
|
13
|
+
variants: wrapper.variants,
|
|
14
|
+
compoundVariants: wrapper.compoundVariants,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const wrapperClasses = computed(() =>
|
|
18
|
+
cvaWrapper({
|
|
19
|
+
gap: props.gap,
|
|
20
|
+
align: props.align,
|
|
21
|
+
}),
|
|
22
|
+
);
|
|
6
23
|
|
|
7
|
-
const wrapperAttrs = getAttrs("wrapper");
|
|
24
|
+
const wrapperAttrs = getAttrs("wrapper", { classes: wrapperClasses });
|
|
8
25
|
|
|
9
26
|
return {
|
|
10
27
|
wrapperAttrs,
|
|
@@ -1,3 +1,26 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
wrapper:
|
|
2
|
+
wrapper: {
|
|
3
|
+
base: "flex flex-col",
|
|
4
|
+
variants: {
|
|
5
|
+
gap: {
|
|
6
|
+
none: "space-y-0",
|
|
7
|
+
xs: "space-y-10",
|
|
8
|
+
sm: "space-y-12",
|
|
9
|
+
md: "space-y-14",
|
|
10
|
+
lg: "space-y-16",
|
|
11
|
+
xl: "space-y-20",
|
|
12
|
+
},
|
|
13
|
+
align: {
|
|
14
|
+
end: "items-end",
|
|
15
|
+
start: "items-start",
|
|
16
|
+
center: "items-center",
|
|
17
|
+
stretch: "items-stretch",
|
|
18
|
+
baseline: "items-baseline",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
gap: "md",
|
|
24
|
+
align: "start",
|
|
25
|
+
},
|
|
3
26
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getArgTypes } from "../service.storybook";
|
|
2
2
|
|
|
3
|
-
import UGroup from "../ui.container-group";
|
|
4
3
|
import UGroups from "../ui.container-groups";
|
|
4
|
+
import UGroup from "../ui.container-group";
|
|
5
5
|
import UInput from "../ui.form-input";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
@@ -20,26 +20,26 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
const defaultSlotTemplate = `
|
|
24
|
+
<template #default>
|
|
25
|
+
<UGroup :upperlined="n !== 1" :title="'Group '+n" v-for="n in 3">
|
|
26
|
+
<UInput placeholder="input" label="Label" />
|
|
27
|
+
<UInput placeholder="input" label="Label" />
|
|
28
|
+
</UGroup>
|
|
29
|
+
</template>
|
|
30
|
+
`;
|
|
31
|
+
|
|
23
32
|
const DefaultTemplate = (args) => ({
|
|
24
33
|
components: { UGroups, UGroup, UInput },
|
|
25
34
|
setup() {
|
|
26
35
|
return { args };
|
|
27
36
|
},
|
|
28
37
|
template: `
|
|
29
|
-
<UGroups>
|
|
30
|
-
${args.slotTemplate}
|
|
38
|
+
<UGroups v-bind="args">
|
|
39
|
+
${args.slotTemplate || defaultSlotTemplate}
|
|
31
40
|
</UGroups>
|
|
32
41
|
`,
|
|
33
42
|
});
|
|
34
43
|
|
|
35
44
|
export const Default = DefaultTemplate.bind({});
|
|
36
|
-
Default.args = {
|
|
37
|
-
slotTemplate: `
|
|
38
|
-
<template #default>
|
|
39
|
-
<UGroup :upperlined="n !== 1" :title="'Group '+n" v-for="n in 3">
|
|
40
|
-
<UInput placeholder="input" label="Label" />
|
|
41
|
-
<UInput placeholder="input" label="Label" />
|
|
42
|
-
</UGroup>
|
|
43
|
-
</template>
|
|
44
|
-
`,
|
|
45
|
-
};
|
|
45
|
+
Default.args = {};
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
|
+
import UIService from "../service.ui";
|
|
10
|
+
|
|
11
|
+
import { UGroups } from "./constants";
|
|
12
|
+
import defaultConfig from "./configs/default.config";
|
|
9
13
|
import { useAttrs } from "./composables/attrs.composable";
|
|
10
14
|
|
|
11
15
|
/* Should be a string for correct web-types gen */
|
|
@@ -13,7 +17,25 @@ defineOptions({ name: "UGroups", inheritAttrs: false });
|
|
|
13
17
|
|
|
14
18
|
const props = defineProps({
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
20
|
+
* The distance between nested elements.
|
|
21
|
+
* @values none, xs, sm, md, lg, xl
|
|
22
|
+
*/
|
|
23
|
+
gap: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: UIService.get(defaultConfig, UGroups).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, UGroups).default.align,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Component ui config object.
|
|
17
39
|
*/
|
|
18
40
|
config: {
|
|
19
41
|
type: Object,
|
|
@@ -21,7 +43,7 @@ const props = defineProps({
|
|
|
21
43
|
},
|
|
22
44
|
|
|
23
45
|
/**
|
|
24
|
-
*
|
|
46
|
+
* Data-cy attribute for automated testing.
|
|
25
47
|
*/
|
|
26
48
|
dataCy: {
|
|
27
49
|
type: String,
|
|
@@ -14,6 +14,13 @@ export default {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
const defaultSlotTemplate = `
|
|
18
|
+
<template #default>
|
|
19
|
+
<UInput label="Name" />
|
|
20
|
+
<UButton label="Submit" size="xs" block />
|
|
21
|
+
</template>
|
|
22
|
+
`;
|
|
23
|
+
|
|
17
24
|
const DefaultTemplate = (args) => ({
|
|
18
25
|
components: { URow, UInput, UButton },
|
|
19
26
|
setup() {
|
|
@@ -21,13 +28,7 @@ const DefaultTemplate = (args) => ({
|
|
|
21
28
|
},
|
|
22
29
|
template: `
|
|
23
30
|
<URow v-bind="args">
|
|
24
|
-
${
|
|
25
|
-
args.slotTemplate ||
|
|
26
|
-
`
|
|
27
|
-
<UInput label="Name" />
|
|
28
|
-
<UButton label="Submit" size="xs" block />
|
|
29
|
-
`
|
|
30
|
-
}
|
|
31
|
+
${args.slotTemplate || defaultSlotTemplate}
|
|
31
32
|
</URow>
|
|
32
33
|
`,
|
|
33
34
|
});
|
|
@@ -41,7 +42,7 @@ const GapTemplate = (args, { argTypes } = {}) => ({
|
|
|
41
42
|
};
|
|
42
43
|
},
|
|
43
44
|
template: `
|
|
44
|
-
<UGroup
|
|
45
|
+
<UGroup gap="xl">
|
|
45
46
|
<URow v-for="(gap, index) in gaps" :key="index" v-bind="args" :gap="gap" align="center">
|
|
46
47
|
<UInput :label="gap" />
|
|
47
48
|
<UInput :label="gap" />
|
|
@@ -59,7 +60,7 @@ const AlignTemplate = (args, { argTypes } = {}) => ({
|
|
|
59
60
|
};
|
|
60
61
|
},
|
|
61
62
|
template: `
|
|
62
|
-
<UGroup
|
|
63
|
+
<UGroup gap="xl">
|
|
63
64
|
<URow v-for="(align, index) in aligns" :key="index" v-bind="args" :align="align">
|
|
64
65
|
<UButton :label="align" size="xs" block />
|
|
65
66
|
<UInput label="Name" />
|
|
@@ -26,7 +26,7 @@ const props = defineProps({
|
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Nested items align (flex align-items).
|
|
30
30
|
* @values start, end, center, stretch, baseline
|
|
31
31
|
*/
|
|
32
32
|
align: {
|
|
@@ -43,7 +43,7 @@ const props = defineProps({
|
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Component ui config object.
|
|
47
47
|
*/
|
|
48
48
|
config: {
|
|
49
49
|
type: Object,
|
|
@@ -51,7 +51,7 @@ const props = defineProps({
|
|
|
51
51
|
},
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Data-cy attribute for automated testing.
|
|
55
55
|
*/
|
|
56
56
|
dataCy: {
|
|
57
57
|
type: String,
|
|
@@ -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 />
|
|
@@ -47,7 +47,7 @@ const ValueTypesTemplate = (args) => ({
|
|
|
47
47
|
};
|
|
48
48
|
},
|
|
49
49
|
template: `
|
|
50
|
-
<UGroup
|
|
50
|
+
<UGroup gap="xl">
|
|
51
51
|
<UCheckbox
|
|
52
52
|
v-bind="args"
|
|
53
53
|
v-model="defaultValue"
|
|
@@ -97,7 +97,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
97
97
|
};
|
|
98
98
|
},
|
|
99
99
|
template: `
|
|
100
|
-
<UGroup
|
|
100
|
+
<UGroup gap="xl">
|
|
101
101
|
<UCheckbox
|
|
102
102
|
v-for="(size, index) in sizes"
|
|
103
103
|
:key="index"
|
|
@@ -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,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,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,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,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,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,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 />
|
|
@@ -32,7 +32,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
32
32
|
};
|
|
33
33
|
},
|
|
34
34
|
template: `
|
|
35
|
-
<UGroup
|
|
35
|
+
<UGroup gap="xl">
|
|
36
36
|
<URow>
|
|
37
37
|
<UAvatar
|
|
38
38
|
v-for="(size, index) in sizes"
|
|
@@ -64,7 +64,7 @@ const ColorsTemplate = (args, { argTypes } = {}) => ({
|
|
|
64
64
|
};
|
|
65
65
|
},
|
|
66
66
|
template: `
|
|
67
|
-
<UGroup
|
|
67
|
+
<UGroup gap="xl">
|
|
68
68
|
<URow>
|
|
69
69
|
<UAvatar
|
|
70
70
|
v-for="(color, index) in colors"
|
package/ui.image-icon/index.vue
CHANGED
|
@@ -137,23 +137,20 @@ const emit = defineEmits(["click", "focus", "blur"]);
|
|
|
137
137
|
const { config, wrapperAttrs, containerAttrs, iconAttrs } = useAttrs(props);
|
|
138
138
|
|
|
139
139
|
const generatedIcons = computed(() => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
eager: true,
|
|
145
|
-
query: "?component",
|
|
146
|
-
}),
|
|
140
|
+
return (
|
|
141
|
+
Object.entries(
|
|
142
|
+
import.meta.glob(`../assets/icons/**/*.svg`, { eager: true, query: "?component" }),
|
|
143
|
+
) || []
|
|
147
144
|
);
|
|
148
145
|
});
|
|
149
146
|
|
|
150
147
|
const dynamicComponent = computed(() => {
|
|
151
148
|
const FILL_SUFFIX = "-fill";
|
|
152
149
|
|
|
153
|
-
const
|
|
150
|
+
const isDefaultIcon = Boolean(generatedIcons.value.find(([path]) => path.includes(props.name)));
|
|
154
151
|
const userLibrary = config.value.defaultVariants.library;
|
|
155
152
|
|
|
156
|
-
const library = props.internal &&
|
|
153
|
+
const library = props.internal && isDefaultIcon ? "vueless" : userLibrary;
|
|
157
154
|
const weight = config.value.defaultVariants.weight;
|
|
158
155
|
const style = config.value.defaultVariants.style;
|
|
159
156
|
const isFill = props.name.endsWith(FILL_SUFFIX);
|
|
@@ -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,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,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,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,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,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,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,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,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,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,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,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 />
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.117",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -2907,14 +2907,23 @@
|
|
|
2907
2907
|
"default": "\"\""
|
|
2908
2908
|
},
|
|
2909
2909
|
{
|
|
2910
|
-
"name": "
|
|
2911
|
-
"description": "The distance between nested
|
|
2910
|
+
"name": "gap",
|
|
2911
|
+
"description": "The distance between nested elements.",
|
|
2912
2912
|
"value": {
|
|
2913
2913
|
"kind": "expression",
|
|
2914
|
-
"type": "'sm' | 'md' | 'lg'"
|
|
2914
|
+
"type": "'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'"
|
|
2915
2915
|
},
|
|
2916
2916
|
"default": "md"
|
|
2917
2917
|
},
|
|
2918
|
+
{
|
|
2919
|
+
"name": "align",
|
|
2920
|
+
"description": "Nested items align (flex align-items).",
|
|
2921
|
+
"value": {
|
|
2922
|
+
"kind": "expression",
|
|
2923
|
+
"type": "'start' | 'end' | 'center' | 'stretch' | 'baseline'"
|
|
2924
|
+
},
|
|
2925
|
+
"default": "start"
|
|
2926
|
+
},
|
|
2918
2927
|
{
|
|
2919
2928
|
"name": "upperlined",
|
|
2920
2929
|
"description": "Show line above the header.",
|
|
@@ -2935,7 +2944,7 @@
|
|
|
2935
2944
|
},
|
|
2936
2945
|
{
|
|
2937
2946
|
"name": "config",
|
|
2938
|
-
"description": "
|
|
2947
|
+
"description": "Component ui config object.",
|
|
2939
2948
|
"value": {
|
|
2940
2949
|
"kind": "expression",
|
|
2941
2950
|
"type": "object"
|
|
@@ -2944,7 +2953,7 @@
|
|
|
2944
2953
|
},
|
|
2945
2954
|
{
|
|
2946
2955
|
"name": "dataCy",
|
|
2947
|
-
"description": "
|
|
2956
|
+
"description": "Data-cy attribute for automated testing.",
|
|
2948
2957
|
"value": {
|
|
2949
2958
|
"kind": "expression",
|
|
2950
2959
|
"type": "string"
|
|
@@ -2983,9 +2992,27 @@
|
|
|
2983
2992
|
"name": "UGroups",
|
|
2984
2993
|
"description": "",
|
|
2985
2994
|
"attributes": [
|
|
2995
|
+
{
|
|
2996
|
+
"name": "gap",
|
|
2997
|
+
"description": "The distance between nested elements.",
|
|
2998
|
+
"value": {
|
|
2999
|
+
"kind": "expression",
|
|
3000
|
+
"type": "'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
3001
|
+
},
|
|
3002
|
+
"default": "md"
|
|
3003
|
+
},
|
|
3004
|
+
{
|
|
3005
|
+
"name": "align",
|
|
3006
|
+
"description": "Nested items align (flex align-items).",
|
|
3007
|
+
"value": {
|
|
3008
|
+
"kind": "expression",
|
|
3009
|
+
"type": "'start' | 'end' | 'center' | 'stretch' | 'baseline'"
|
|
3010
|
+
},
|
|
3011
|
+
"default": "start"
|
|
3012
|
+
},
|
|
2986
3013
|
{
|
|
2987
3014
|
"name": "config",
|
|
2988
|
-
"description": "
|
|
3015
|
+
"description": "Component ui config object.",
|
|
2989
3016
|
"value": {
|
|
2990
3017
|
"kind": "expression",
|
|
2991
3018
|
"type": "object"
|
|
@@ -2994,7 +3021,7 @@
|
|
|
2994
3021
|
},
|
|
2995
3022
|
{
|
|
2996
3023
|
"name": "dataCy",
|
|
2997
|
-
"description": "
|
|
3024
|
+
"description": "Data-cy attribute for automated testing.",
|
|
2998
3025
|
"value": {
|
|
2999
3026
|
"kind": "expression",
|
|
3000
3027
|
"type": "string"
|
|
@@ -5840,7 +5867,7 @@
|
|
|
5840
5867
|
},
|
|
5841
5868
|
{
|
|
5842
5869
|
"name": "align",
|
|
5843
|
-
"description": "
|
|
5870
|
+
"description": "Nested items align (flex align-items).",
|
|
5844
5871
|
"value": {
|
|
5845
5872
|
"kind": "expression",
|
|
5846
5873
|
"type": "'start' | 'end' | 'center' | 'stretch' | 'baseline'"
|
|
@@ -5858,7 +5885,7 @@
|
|
|
5858
5885
|
},
|
|
5859
5886
|
{
|
|
5860
5887
|
"name": "config",
|
|
5861
|
-
"description": "
|
|
5888
|
+
"description": "Component ui config object.",
|
|
5862
5889
|
"value": {
|
|
5863
5890
|
"kind": "expression",
|
|
5864
5891
|
"type": "object"
|
|
@@ -5867,7 +5894,7 @@
|
|
|
5867
5894
|
},
|
|
5868
5895
|
{
|
|
5869
5896
|
"name": "dataCy",
|
|
5870
|
-
"description": "
|
|
5897
|
+
"description": "Data-cy attribute for automated testing.",
|
|
5871
5898
|
"value": {
|
|
5872
5899
|
"kind": "expression",
|
|
5873
5900
|
"type": "string"
|