vueless 0.0.262 → 0.0.264
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui.container-accordion/composables/attrs.composable.js +5 -5
- package/ui.container-card/composable/attrs.composable.js +5 -5
- package/ui.container-col/composables/attrs.composable.js +9 -5
- package/ui.container-divider/composables/attrs.composable.js +5 -5
- package/ui.container-group/composables/attrs.composable.js +9 -5
- package/ui.container-modal/composables/attrs.composable.js +5 -5
- package/ui.container-modal-confirm/composable/attrs.composable.js +8 -11
- package/ui.container-page/composables/attrs.composable.js +5 -5
- package/ui.container-row/composables/attrs.composable.js +9 -5
- package/ui.text-alert/composables/attrs.composable.js +9 -12
- package/ui.text-badge/composables/attrs.composable.js +9 -12
- package/ui.text-block/composables/attrs.composable.js +5 -5
- package/ui.text-empty/composables/attrs.composable.js +9 -5
- package/ui.text-file/composables/attrs.composable.js +9 -5
- package/ui.text-file/index.stories.js +4 -2
- package/ui.text-files/composables/attrs.composable.js +8 -4
- package/ui.text-files/index.stories.js +4 -2
- package/ui.text-header/composables/attrs.composable.js +10 -12
- package/ui.text-money/composables/attrs.composable.js +9 -12
- package/ui.text-notify/composables/attrs.composable.js +9 -5
- package/ui.text-notify/index.stories.js +4 -2
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props, { isOpened }) {
|
|
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,16 +14,16 @@ export default function useAttrs(props, { isOpened }) {
|
|
|
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
|
isOpened: isOpened.value,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
return
|
|
26
|
+
return value;
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
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, { isMobileBreakpoint }) {
|
|
8
|
-
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,15 +15,15 @@ export default function useAttrs(props, { isMobileBreakpoint }) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
18
|
+
let value = config.value[key];
|
|
19
19
|
|
|
20
|
-
if (value
|
|
21
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
22
|
...props,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
return
|
|
26
|
+
return value;
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -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, hasSlotContent, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,16 +15,16 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
18
|
+
let value = config.value[key];
|
|
19
19
|
|
|
20
|
-
if (value
|
|
21
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
22
|
...props,
|
|
23
23
|
label: Boolean(props.label),
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
return
|
|
27
|
+
return value;
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -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
|
}
|
|
@@ -7,7 +7,7 @@ import { computed } from "vue";
|
|
|
7
7
|
import useBreakpoint from "../../composable.breakpoint";
|
|
8
8
|
|
|
9
9
|
export default function useAttrs(props) {
|
|
10
|
-
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
10
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
11
11
|
defaultConfig,
|
|
12
12
|
() => props.config,
|
|
13
13
|
);
|
|
@@ -18,15 +18,15 @@ export default function useAttrs(props) {
|
|
|
18
18
|
if (isSystemKey(key)) continue;
|
|
19
19
|
|
|
20
20
|
const classes = computed(() => {
|
|
21
|
-
|
|
21
|
+
let value = config.value[key];
|
|
22
22
|
|
|
23
|
-
if (value
|
|
24
|
-
|
|
23
|
+
if (isCVA(value)) {
|
|
24
|
+
value = cva(value)({
|
|
25
25
|
...props,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
return
|
|
29
|
+
return value;
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -4,7 +4,7 @@ import { cva } from "../../service.ui/index.js";
|
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props) {
|
|
7
|
-
const { config, getAttrs, hasSlotContent, getColor, setColor, isSystemKey } = useUI(
|
|
7
|
+
const { config, getAttrs, hasSlotContent, getColor, setColor, isSystemKey, isCVA } = useUI(
|
|
8
8
|
defaultConfig,
|
|
9
9
|
() => props.config,
|
|
10
10
|
);
|
|
@@ -14,19 +14,16 @@ 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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}),
|
|
25
|
-
props.color,
|
|
26
|
-
);
|
|
19
|
+
if (isCVA(value)) {
|
|
20
|
+
value = cva(value)({
|
|
21
|
+
...props,
|
|
22
|
+
color: getColor(props.color),
|
|
23
|
+
});
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
return
|
|
26
|
+
return setColor(value, props.color);
|
|
30
27
|
});
|
|
31
28
|
|
|
32
29
|
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, { isMobileBreakpoint }) {
|
|
8
|
-
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,15 +15,15 @@ export default function useAttrs(props, { isMobileBreakpoint }) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
18
|
+
let value = config.value[key];
|
|
19
19
|
|
|
20
|
-
if (value
|
|
21
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
22
|
...props,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
return
|
|
26
|
+
return value;
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -4,22 +4,25 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props) {
|
|
7
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
7
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
8
|
+
defaultConfig,
|
|
9
|
+
() => props.config,
|
|
10
|
+
);
|
|
8
11
|
const attrs = {};
|
|
9
12
|
|
|
10
13
|
for (const key in defaultConfig) {
|
|
11
14
|
if (isSystemKey(key)) continue;
|
|
12
15
|
|
|
13
16
|
const classes = computed(() => {
|
|
14
|
-
|
|
17
|
+
let value = config.value[key];
|
|
15
18
|
|
|
16
|
-
if (value
|
|
17
|
-
|
|
19
|
+
if (isCVA(value)) {
|
|
20
|
+
value = cva(value)({
|
|
18
21
|
...props,
|
|
19
22
|
});
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
return
|
|
25
|
+
return value;
|
|
23
26
|
});
|
|
24
27
|
|
|
25
28
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -28,5 +31,6 @@ export default function useAttrs(props) {
|
|
|
28
31
|
return {
|
|
29
32
|
...attrs,
|
|
30
33
|
config,
|
|
34
|
+
hasSlotContent,
|
|
31
35
|
};
|
|
32
36
|
}
|
|
@@ -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, hasSlotContent, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, hasSlotContent, getColor, setColor, isSystemKey, 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 });
|
|
@@ -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, hasSlotContent, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, hasSlotContent, getColor, setColor, isSystemKey, 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 });
|
|
@@ -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, hasSlotContent, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,15 +15,15 @@ export default function useAttrs(props) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
18
|
+
let value = config.value[key];
|
|
19
19
|
|
|
20
|
-
if (value
|
|
21
|
-
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
22
|
...props,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
return
|
|
26
|
+
return value;
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -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,23 +5,26 @@ import { cva } from "../../service.ui";
|
|
|
5
5
|
import defaultConfig from "../configs/default.config";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props, { focus }) {
|
|
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
|
focus: Boolean(focus.value),
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
return
|
|
27
|
+
return value;
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -30,5 +33,6 @@ export default function useAttrs(props, { focus }) {
|
|
|
30
33
|
return {
|
|
31
34
|
...attrs,
|
|
32
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
33
37
|
};
|
|
34
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes, getSlotsFragment } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UFile from "../ui.text-file";
|
|
4
4
|
|
|
@@ -21,7 +21,9 @@ export default {
|
|
|
21
21
|
const DefaultTemplate = (args) => ({
|
|
22
22
|
components: { UFile },
|
|
23
23
|
setup() {
|
|
24
|
-
|
|
24
|
+
const slots = getSlotNames(UFile.name);
|
|
25
|
+
|
|
26
|
+
return { args, slots };
|
|
25
27
|
},
|
|
26
28
|
template: `
|
|
27
29
|
<UFile v-bind="args">
|
|
@@ -5,23 +5,26 @@ import { cva } from "../../service.ui";
|
|
|
5
5
|
import defaultConfig from "../configs/default.config";
|
|
6
6
|
|
|
7
7
|
export default function useAttrs(props) {
|
|
8
|
-
const { getAttrs, config, isSystemKey } = useUI(
|
|
8
|
+
const { getAttrs, config, 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
|
|
20
|
+
if (isCVA(value)) {
|
|
18
21
|
return cva(value)({
|
|
19
22
|
...props,
|
|
20
23
|
label: Boolean(props.label),
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
return
|
|
27
|
+
return value;
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -30,5 +33,6 @@ export default function useAttrs(props) {
|
|
|
30
33
|
return {
|
|
31
34
|
...attrs,
|
|
32
35
|
config,
|
|
36
|
+
hasSlotContent,
|
|
33
37
|
};
|
|
34
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes, getSlotsFragment } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UFiles from "../ui.text-files";
|
|
4
4
|
|
|
@@ -24,7 +24,9 @@ export default {
|
|
|
24
24
|
const DefaultTemplate = (args) => ({
|
|
25
25
|
components: { UFiles },
|
|
26
26
|
setup() {
|
|
27
|
-
|
|
27
|
+
const slots = getSlotNames(UFiles.name);
|
|
28
|
+
|
|
29
|
+
return { args, slots };
|
|
28
30
|
},
|
|
29
31
|
template: `
|
|
30
32
|
<UFiles v-bind="args">
|
|
@@ -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 function useAttrs(props) {
|
|
8
|
-
const { config, hasSlotContent, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, hasSlotContent, getAttrs, getColor, setColor, isSystemKey, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,19 +15,16 @@ export 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 });
|
|
@@ -4,22 +4,25 @@ import defaultConfig from "../configs/default.config";
|
|
|
4
4
|
import { cva } from "../../service.ui";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props) {
|
|
7
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
7
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
8
|
+
defaultConfig,
|
|
9
|
+
() => props.config,
|
|
10
|
+
);
|
|
8
11
|
const attrs = {};
|
|
9
12
|
|
|
10
13
|
for (const key in defaultConfig) {
|
|
11
14
|
if (isSystemKey(key)) continue;
|
|
12
15
|
|
|
13
16
|
const classes = computed(() => {
|
|
14
|
-
|
|
17
|
+
let value = config.value[key];
|
|
15
18
|
|
|
16
|
-
if (value
|
|
17
|
-
|
|
19
|
+
if (isCVA(value)) {
|
|
20
|
+
value = cva(value)({
|
|
18
21
|
...props,
|
|
19
22
|
});
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
return
|
|
25
|
+
return value;
|
|
23
26
|
});
|
|
24
27
|
|
|
25
28
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -28,5 +31,6 @@ export default function useAttrs(props) {
|
|
|
28
31
|
return {
|
|
29
32
|
...attrs,
|
|
30
33
|
config,
|
|
34
|
+
hasSlotContent,
|
|
31
35
|
};
|
|
32
36
|
}
|
|
@@ -4,7 +4,7 @@ import UNotify from "../ui.text-notify";
|
|
|
4
4
|
import UButton from "../ui.button";
|
|
5
5
|
import UCol from "../ui.container-col";
|
|
6
6
|
|
|
7
|
-
import { getArgTypes, getSlotsFragment } from "../service.storybook";
|
|
7
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The `UNotify` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.text-notify)
|
|
@@ -36,7 +36,9 @@ const DefaultTemplate = (args) => ({
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
const slots = getSlotNames(UNotify.name);
|
|
40
|
+
|
|
41
|
+
return { args, slots, onClick };
|
|
40
42
|
},
|
|
41
43
|
template: `
|
|
42
44
|
<UNotify class="m-4" v-bind="args">
|