vueless 0.0.264 → 0.0.266
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 +3 -4
- package/constants/index.js +1 -1
- package/package.json +1 -1
- package/service.ui/index.js +4 -0
- package/ui.container-modal/configs/default.config.js +0 -1
- package/ui.container-modal/index.vue +2 -11
- package/ui.container-modal-confirm/configs/default.config.js +3 -2
- package/ui.container-modal-confirm/index.vue +18 -17
- package/ui.data-list/composables/attrs.composable.js +5 -5
- package/ui.data-table/composables/attrs.composable.js +5 -5
- package/ui.image-avatar/composables/attrs.composable.js +10 -12
- package/ui.image-icon/composables/attrs.composable.js +10 -12
- package/ui.loader/composables/attrs.composable.js +10 -12
- package/ui.loader-rendering/composables/attrs.composable.js +10 -12
- package/ui.loader-top/composables/attrs.composable.js +10 -12
- package/ui.navigation-pagination/composables/attrs.composable.js +9 -5
- package/ui.navigation-progress/composables/attrs.composable.js +10 -12
- package/ui.navigation-progress/index.stories.js +10 -13
- package/ui.navigation-progress/index.vue +1 -1
- package/ui.navigation-tab/composables/attrs.composable.js +9 -5
- package/ui.navigation-tabs/composables/attrs.composable.js +9 -5
- package/ui.other-dot/composables/attrs.composable.js +10 -12
- package/ui.other-dot/index.stories.js +1 -1
- package/web-types.json +16 -25
package/composable.ui/index.js
CHANGED
|
@@ -198,7 +198,6 @@ function mergeConfigs({
|
|
|
198
198
|
safelistColors,
|
|
199
199
|
defaultVariants,
|
|
200
200
|
compoundVariants,
|
|
201
|
-
iconNameCapitalize,
|
|
202
201
|
iconName,
|
|
203
202
|
} = SYSTEM_CONFIG_KEY;
|
|
204
203
|
|
|
@@ -235,7 +234,7 @@ function mergeConfigs({
|
|
|
235
234
|
|
|
236
235
|
const isObject = isObjectComposedConfig || isObjectGlobalConfig || isObjectPropsConfig;
|
|
237
236
|
const isEmpty = composedConfig[key] === null;
|
|
238
|
-
const isIconName = key.
|
|
237
|
+
const isIconName = key.toLowerCase().includes(iconName.toLowerCase());
|
|
239
238
|
const isI18n = key === i18n;
|
|
240
239
|
|
|
241
240
|
if (key === "variants" && !isVariants) {
|
|
@@ -403,8 +402,8 @@ function isSystemKey(key) {
|
|
|
403
402
|
|
|
404
403
|
return (
|
|
405
404
|
isExactKey ||
|
|
406
|
-
key.includes(SYSTEM_CONFIG_KEY.iconName) ||
|
|
407
|
-
key.includes(SYSTEM_CONFIG_KEY.
|
|
405
|
+
key.toLowerCase().includes(SYSTEM_CONFIG_KEY.iconName.toLowerCase()) ||
|
|
406
|
+
key.toLowerCase().includes(SYSTEM_CONFIG_KEY.transition.toLowerCase())
|
|
408
407
|
);
|
|
409
408
|
}
|
|
410
409
|
|
package/constants/index.js
CHANGED
package/package.json
CHANGED
package/service.ui/index.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div v-bind="headerLeftFallbackAttrs">
|
|
26
26
|
<ULink
|
|
27
27
|
v-if="isShownArrowButton"
|
|
28
|
-
size="
|
|
28
|
+
size="sm"
|
|
29
29
|
color="gray"
|
|
30
30
|
:route="backRoute"
|
|
31
31
|
v-bind="backLinkAttrs"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
{{ backRoute.title }}
|
|
42
42
|
</ULink>
|
|
43
43
|
|
|
44
|
-
<UHeader
|
|
44
|
+
<UHeader :label="title" v-bind="titleAttrs" />
|
|
45
45
|
<div v-if="description" v-bind="descriptionAttrs" v-text="description" />
|
|
46
46
|
</div>
|
|
47
47
|
</slot>
|
|
@@ -137,15 +137,6 @@ const props = defineProps({
|
|
|
137
137
|
default: "",
|
|
138
138
|
},
|
|
139
139
|
|
|
140
|
-
/**
|
|
141
|
-
* The color of the title.
|
|
142
|
-
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
143
|
-
*/
|
|
144
|
-
titleColor: {
|
|
145
|
-
type: String,
|
|
146
|
-
default: UIService.get(defaultConfig, UModal).default.titleColor,
|
|
147
|
-
},
|
|
148
|
-
|
|
149
140
|
/**
|
|
150
141
|
* Sets modal description.
|
|
151
142
|
*/
|
|
@@ -4,12 +4,13 @@ export default /*tw*/ {
|
|
|
4
4
|
confirmButton: "{UButton} w-full",
|
|
5
5
|
cancelButton: "{UButton} w-full",
|
|
6
6
|
i18n: {
|
|
7
|
+
confirm: "Confirm",
|
|
7
8
|
cancel: "Cancel",
|
|
8
9
|
},
|
|
9
10
|
defaultVariants: {
|
|
10
|
-
color: "brand",
|
|
11
11
|
width: "sm",
|
|
12
|
-
|
|
12
|
+
confirmColor: "brand",
|
|
13
13
|
confirmDisabled: false,
|
|
14
|
+
cancelButton: true,
|
|
14
15
|
},
|
|
15
16
|
};
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
<div v-else v-bind="footerLeftFallbackAttrs">
|
|
35
35
|
<UButton
|
|
36
|
-
:label="confirmLabel"
|
|
37
|
-
:color="
|
|
36
|
+
:label="confirmLabel || currentLocale.confirm"
|
|
37
|
+
:color="confirmColor"
|
|
38
38
|
:disabled="confirmDisabled"
|
|
39
39
|
:data-cy="`${dataCy}-accept`"
|
|
40
40
|
v-bind="confirmButtonAttrs"
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
v-if="cancelButton"
|
|
46
46
|
:label="currentLocale.cancel"
|
|
47
47
|
variant="thirdary"
|
|
48
|
+
color="gray"
|
|
48
49
|
filled
|
|
49
50
|
:data-cy="`${dataCy}-close`"
|
|
50
51
|
v-bind="cancelButtonAttrs"
|
|
@@ -78,7 +79,7 @@ defineOptions({ name: "UModalConfirm", inheritAttrs: false });
|
|
|
78
79
|
|
|
79
80
|
const props = defineProps({
|
|
80
81
|
/**
|
|
81
|
-
* Change modal state (
|
|
82
|
+
* Change modal state (shown / hidden).
|
|
82
83
|
*/
|
|
83
84
|
modelValue: {
|
|
84
85
|
type: Boolean,
|
|
@@ -86,7 +87,7 @@ const props = defineProps({
|
|
|
86
87
|
},
|
|
87
88
|
|
|
88
89
|
/**
|
|
89
|
-
*
|
|
90
|
+
* Modal title.
|
|
90
91
|
*/
|
|
91
92
|
title: {
|
|
92
93
|
type: String,
|
|
@@ -94,13 +95,22 @@ const props = defineProps({
|
|
|
94
95
|
},
|
|
95
96
|
|
|
96
97
|
/**
|
|
97
|
-
*
|
|
98
|
+
* Confirm button label.
|
|
98
99
|
*/
|
|
99
100
|
confirmLabel: {
|
|
100
101
|
type: String,
|
|
101
102
|
default: "",
|
|
102
103
|
},
|
|
103
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Confirm button color.
|
|
107
|
+
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
108
|
+
*/
|
|
109
|
+
confirmColor: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: UIService.get(defaultConfig, UModalConfirm).default.confirmColor,
|
|
112
|
+
},
|
|
113
|
+
|
|
104
114
|
/**
|
|
105
115
|
* Set the disabled accept-button.
|
|
106
116
|
*/
|
|
@@ -118,16 +128,7 @@ const props = defineProps({
|
|
|
118
128
|
},
|
|
119
129
|
|
|
120
130
|
/**
|
|
121
|
-
*
|
|
122
|
-
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
123
|
-
*/
|
|
124
|
-
color: {
|
|
125
|
-
type: String,
|
|
126
|
-
default: UIService.get(defaultConfig, UModalConfirm).default.color,
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Set width for modal.
|
|
131
|
+
* Modal width.
|
|
131
132
|
* @values xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl
|
|
132
133
|
*/
|
|
133
134
|
width: {
|
|
@@ -136,7 +137,7 @@ const props = defineProps({
|
|
|
136
137
|
},
|
|
137
138
|
|
|
138
139
|
/**
|
|
139
|
-
*
|
|
140
|
+
* Component ui config object.
|
|
140
141
|
*/
|
|
141
142
|
config: {
|
|
142
143
|
type: Object,
|
|
@@ -144,7 +145,7 @@ const props = defineProps({
|
|
|
144
145
|
},
|
|
145
146
|
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Data-cy attribute for automated testing.
|
|
148
149
|
*/
|
|
149
150
|
dataCy: {
|
|
150
151
|
type: String,
|
|
@@ -4,7 +4,7 @@ import { computed } from "vue";
|
|
|
4
4
|
import { cva, cx } from "../../service.ui";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props) {
|
|
7
|
-
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
7
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
8
8
|
defaultConfig,
|
|
9
9
|
() => props.config,
|
|
10
10
|
);
|
|
@@ -14,15 +14,15 @@ export default function useAttrs(props) {
|
|
|
14
14
|
if (isSystemKey(key)) continue;
|
|
15
15
|
|
|
16
16
|
const classes = computed(() => {
|
|
17
|
-
|
|
17
|
+
let value = config.value[key];
|
|
18
18
|
|
|
19
|
-
if (value
|
|
20
|
-
|
|
19
|
+
if (isCVA(value)) {
|
|
20
|
+
value = cva(value)({
|
|
21
21
|
...props,
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
return
|
|
25
|
+
return value;
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -7,7 +7,7 @@ export default function useAttrs(
|
|
|
7
7
|
props,
|
|
8
8
|
{ tableRows, isShownActionsHeader, isHeaderSticky, isFooterSticky },
|
|
9
9
|
) {
|
|
10
|
-
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
10
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
11
11
|
defaultConfig,
|
|
12
12
|
() => props.config,
|
|
13
13
|
);
|
|
@@ -31,16 +31,16 @@ export default function useAttrs(
|
|
|
31
31
|
if (isSystemKey(key)) continue;
|
|
32
32
|
|
|
33
33
|
const classes = computed(() => {
|
|
34
|
-
|
|
34
|
+
let value = config.value[key];
|
|
35
35
|
|
|
36
|
-
if (value
|
|
37
|
-
|
|
36
|
+
if (isCVA(value)) {
|
|
37
|
+
value = cva(value)({
|
|
38
38
|
...props,
|
|
39
39
|
compact: Boolean(props.compact),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
return
|
|
43
|
+
return value;
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
props.color,
|
|
27
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
});
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
return
|
|
27
|
+
return setColor(value, props.color);
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
|
|
|
36
33
|
return {
|
|
37
34
|
...attrs,
|
|
38
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
39
37
|
};
|
|
40
38
|
}
|
|
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
props.color,
|
|
27
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
});
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
return
|
|
27
|
+
return setColor(value, props.color);
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
|
|
|
36
33
|
return {
|
|
37
34
|
...attrs,
|
|
38
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
39
37
|
};
|
|
40
38
|
}
|
|
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
props.color,
|
|
27
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
});
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
return
|
|
27
|
+
return setColor(value, props.color);
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -45,5 +42,6 @@ export default function useAttrs(props) {
|
|
|
45
42
|
return {
|
|
46
43
|
...attrs,
|
|
47
44
|
config,
|
|
45
|
+
hasSlotContent,
|
|
48
46
|
};
|
|
49
47
|
}
|
|
@@ -5,7 +5,7 @@ import { cva } from "../../service.ui";
|
|
|
5
5
|
import defaultConfig from "../configs/default.config";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
props.color,
|
|
27
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
});
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
return
|
|
27
|
+
return setColor(value, props.color);
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
|
|
|
36
33
|
return {
|
|
37
34
|
...attrs,
|
|
38
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
39
37
|
};
|
|
40
38
|
}
|
|
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
props.color,
|
|
27
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
});
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
return
|
|
27
|
+
return setColor(value, props.color);
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
|
|
|
36
33
|
return {
|
|
37
34
|
...attrs,
|
|
38
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
39
37
|
};
|
|
40
38
|
}
|
|
@@ -5,22 +5,25 @@ import { cva, cx } from "../../service.ui";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
11
|
+
);
|
|
9
12
|
const attrs = {};
|
|
10
13
|
|
|
11
14
|
for (const key in defaultConfig) {
|
|
12
15
|
if (isSystemKey(key)) continue;
|
|
13
16
|
|
|
14
17
|
const classes = computed(() => {
|
|
15
|
-
|
|
18
|
+
let value = config.value[key];
|
|
16
19
|
|
|
17
|
-
if (value
|
|
18
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
19
22
|
...props,
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
return
|
|
26
|
+
return value;
|
|
24
27
|
});
|
|
25
28
|
|
|
26
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -51,5 +54,6 @@ export default function useAttrs(props) {
|
|
|
51
54
|
return {
|
|
52
55
|
...attrs,
|
|
53
56
|
config,
|
|
57
|
+
hasSlotContent,
|
|
54
58
|
};
|
|
55
59
|
}
|
|
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -16,19 +16,16 @@ export default function useAttrs(props) {
|
|
|
16
16
|
if (isSystemKey(key)) continue;
|
|
17
17
|
|
|
18
18
|
const classes = computed(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (value
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
props.color,
|
|
28
|
-
);
|
|
19
|
+
let value = config.value[key];
|
|
20
|
+
|
|
21
|
+
if (isCVA(value)) {
|
|
22
|
+
value = cva(value)({
|
|
23
|
+
...props,
|
|
24
|
+
color: getColor(props.color),
|
|
25
|
+
});
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
return
|
|
28
|
+
return setColor(value, props.color);
|
|
32
29
|
});
|
|
33
30
|
|
|
34
31
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -46,5 +43,6 @@ export default function useAttrs(props) {
|
|
|
46
43
|
return {
|
|
47
44
|
...attrs,
|
|
48
45
|
config,
|
|
46
|
+
hasSlotContent,
|
|
49
47
|
};
|
|
50
48
|
}
|
|
@@ -51,19 +51,16 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
51
51
|
return { args, updateProgress, options: argTypes[args.enum].options };
|
|
52
52
|
},
|
|
53
53
|
template: `
|
|
54
|
-
<UCol
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
|
|
66
|
-
</UCol>
|
|
54
|
+
<UCol>
|
|
55
|
+
<UProgress
|
|
56
|
+
v-for="(option, index) in options"
|
|
57
|
+
:key="index"
|
|
58
|
+
v-bind="args"
|
|
59
|
+
:[args.enum]="option"
|
|
60
|
+
:value="args.progress"
|
|
61
|
+
/>
|
|
62
|
+
<UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
|
|
63
|
+
</UCol>
|
|
67
64
|
`,
|
|
68
65
|
});
|
|
69
66
|
|
|
@@ -5,24 +5,27 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props, { selected, size }) {
|
|
8
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
11
|
+
);
|
|
9
12
|
const attrs = {};
|
|
10
13
|
|
|
11
14
|
for (const key in defaultConfig) {
|
|
12
15
|
if (isSystemKey(key)) continue;
|
|
13
16
|
|
|
14
17
|
const classes = computed(() => {
|
|
15
|
-
|
|
18
|
+
let value = config.value[key];
|
|
16
19
|
|
|
17
|
-
if (value
|
|
18
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
19
22
|
...props,
|
|
20
23
|
size: size.value,
|
|
21
24
|
selected: selected.value,
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
return
|
|
28
|
+
return value;
|
|
26
29
|
});
|
|
27
30
|
|
|
28
31
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -31,5 +34,6 @@ export default function useAttrs(props, { selected, size }) {
|
|
|
31
34
|
return {
|
|
32
35
|
...attrs,
|
|
33
36
|
config,
|
|
37
|
+
hasSlotContent,
|
|
34
38
|
};
|
|
35
39
|
}
|
|
@@ -5,22 +5,25 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
11
|
+
);
|
|
9
12
|
const attrs = {};
|
|
10
13
|
|
|
11
14
|
for (const key in defaultConfig) {
|
|
12
15
|
if (isSystemKey(key)) continue;
|
|
13
16
|
|
|
14
17
|
const classes = computed(() => {
|
|
15
|
-
|
|
18
|
+
let value = config.value[key];
|
|
16
19
|
|
|
17
|
-
if (value
|
|
18
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
19
22
|
...props,
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
return
|
|
26
|
+
return value;
|
|
24
27
|
});
|
|
25
28
|
|
|
26
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -29,5 +32,6 @@ export default function useAttrs(props) {
|
|
|
29
32
|
return {
|
|
30
33
|
...attrs,
|
|
31
34
|
config,
|
|
35
|
+
hasSlotContent,
|
|
32
36
|
};
|
|
33
37
|
}
|
|
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
|
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
props.color,
|
|
27
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
});
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
return
|
|
27
|
+
return setColor(value, props.color);
|
|
31
28
|
});
|
|
32
29
|
|
|
33
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
|
|
|
36
33
|
return {
|
|
37
34
|
...attrs,
|
|
38
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
39
37
|
};
|
|
40
38
|
}
|
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.266",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -5523,15 +5523,6 @@
|
|
|
5523
5523
|
},
|
|
5524
5524
|
"default": "\"\""
|
|
5525
5525
|
},
|
|
5526
|
-
{
|
|
5527
|
-
"name": "titleColor",
|
|
5528
|
-
"description": "The color of the title.",
|
|
5529
|
-
"value": {
|
|
5530
|
-
"kind": "expression",
|
|
5531
|
-
"type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'"
|
|
5532
|
-
},
|
|
5533
|
-
"default": "brand"
|
|
5534
|
-
},
|
|
5535
5526
|
{
|
|
5536
5527
|
"name": "description",
|
|
5537
5528
|
"description": "Sets modal description.",
|
|
@@ -5709,7 +5700,7 @@
|
|
|
5709
5700
|
"attributes": [
|
|
5710
5701
|
{
|
|
5711
5702
|
"name": "modelValue",
|
|
5712
|
-
"description": "Change modal state (
|
|
5703
|
+
"description": "Change modal state (shown / hidden).",
|
|
5713
5704
|
"value": {
|
|
5714
5705
|
"kind": "expression",
|
|
5715
5706
|
"type": "boolean"
|
|
@@ -5718,7 +5709,7 @@
|
|
|
5718
5709
|
},
|
|
5719
5710
|
{
|
|
5720
5711
|
"name": "title",
|
|
5721
|
-
"description": "
|
|
5712
|
+
"description": "Modal title.",
|
|
5722
5713
|
"value": {
|
|
5723
5714
|
"kind": "expression",
|
|
5724
5715
|
"type": "string"
|
|
@@ -5727,13 +5718,22 @@
|
|
|
5727
5718
|
},
|
|
5728
5719
|
{
|
|
5729
5720
|
"name": "confirmLabel",
|
|
5730
|
-
"description": "
|
|
5721
|
+
"description": "Confirm button label.",
|
|
5731
5722
|
"value": {
|
|
5732
5723
|
"kind": "expression",
|
|
5733
5724
|
"type": "string"
|
|
5734
5725
|
},
|
|
5735
5726
|
"default": "\"\""
|
|
5736
5727
|
},
|
|
5728
|
+
{
|
|
5729
|
+
"name": "confirmColor",
|
|
5730
|
+
"description": "Confirm button color.",
|
|
5731
|
+
"value": {
|
|
5732
|
+
"kind": "expression",
|
|
5733
|
+
"type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'"
|
|
5734
|
+
},
|
|
5735
|
+
"default": "brand"
|
|
5736
|
+
},
|
|
5737
5737
|
{
|
|
5738
5738
|
"name": "confirmDisabled",
|
|
5739
5739
|
"description": "Set the disabled accept-button.",
|
|
@@ -5752,18 +5752,9 @@
|
|
|
5752
5752
|
},
|
|
5753
5753
|
"default": "true"
|
|
5754
5754
|
},
|
|
5755
|
-
{
|
|
5756
|
-
"name": "color",
|
|
5757
|
-
"description": "Buttons and modal title color.",
|
|
5758
|
-
"value": {
|
|
5759
|
-
"kind": "expression",
|
|
5760
|
-
"type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'"
|
|
5761
|
-
},
|
|
5762
|
-
"default": "brand"
|
|
5763
|
-
},
|
|
5764
5755
|
{
|
|
5765
5756
|
"name": "width",
|
|
5766
|
-
"description": "
|
|
5757
|
+
"description": "Modal width.",
|
|
5767
5758
|
"value": {
|
|
5768
5759
|
"kind": "expression",
|
|
5769
5760
|
"type": "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl'"
|
|
@@ -5772,7 +5763,7 @@
|
|
|
5772
5763
|
},
|
|
5773
5764
|
{
|
|
5774
5765
|
"name": "config",
|
|
5775
|
-
"description": "
|
|
5766
|
+
"description": "Component ui config object.",
|
|
5776
5767
|
"value": {
|
|
5777
5768
|
"kind": "expression",
|
|
5778
5769
|
"type": "object"
|
|
@@ -5781,7 +5772,7 @@
|
|
|
5781
5772
|
},
|
|
5782
5773
|
{
|
|
5783
5774
|
"name": "dataCy",
|
|
5784
|
-
"description": "
|
|
5775
|
+
"description": "Data-cy attribute for automated testing.",
|
|
5785
5776
|
"value": {
|
|
5786
5777
|
"kind": "expression",
|
|
5787
5778
|
"type": "string"
|