vueless 0.0.268 → 0.0.270
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.form-calendar/composables/attrs.composable.js +9 -5
- package/ui.form-checkbox/composables/attrs.composable.js +13 -15
- package/ui.form-checkbox-group/composables/attrs.composable.js +9 -5
- package/ui.form-checkbox-multi-state/composables/attrs.composable.js +9 -5
- package/ui.form-color-picker/composables/attrs.composable.js +10 -12
- package/ui.form-date-picker/composables/attrs.composable.js +9 -5
- package/ui.form-date-picker-range/composables/attrs.composable.js +9 -5
- package/ui.form-input/composables/attrs.composable.js +5 -14
- package/ui.form-input-file/composables/attrs.composable.js +5 -5
- package/ui.form-input-money/composables/attrs.composable.js +9 -5
- package/ui.form-input-money/index.stories.js +3 -3
- package/ui.form-input-number/composables/attrs.composable.js +9 -5
- package/ui.form-input-number/index.stories.js +5 -8
- package/ui.form-input-rating/composables/attrs.composable.js +5 -5
- package/ui.form-input-search/composables/attrs.composable.js +5 -5
- package/ui.form-label/composables/attrs.composable.js +5 -5
- package/ui.form-radio/composables/attrs.composable.js +13 -15
- package/ui.form-radio-group/composables/attrs.composable.js +9 -5
- package/ui.form-select/composables/attrs.composable.js +5 -5
- package/ui.form-switch/composables/attrs.composable.js +11 -13
- package/ui.form-textarea/composables/attrs.composable.js +5 -5
- package/ui.form-textarea/index.stories.js +1 -1
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -6,22 +6,25 @@ import { computed } from "vue";
|
|
|
6
6
|
import defaultConfig from "../configs/default.config";
|
|
7
7
|
|
|
8
8
|
export default function useAttrs(props) {
|
|
9
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
9
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
10
|
+
defaultConfig,
|
|
11
|
+
() => props.config,
|
|
12
|
+
);
|
|
10
13
|
const attrs = {};
|
|
11
14
|
|
|
12
15
|
for (const key in defaultConfig) {
|
|
13
16
|
if (isSystemKey(key)) continue;
|
|
14
17
|
|
|
15
18
|
const classes = computed(() => {
|
|
16
|
-
|
|
19
|
+
let value = config.value[key];
|
|
17
20
|
|
|
18
|
-
if (value
|
|
19
|
-
|
|
21
|
+
if (isCVA(value)) {
|
|
22
|
+
value = cva(value)({
|
|
20
23
|
...props,
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
return
|
|
27
|
+
return value;
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -68,5 +71,6 @@ export default function useAttrs(props) {
|
|
|
68
71
|
return {
|
|
69
72
|
...attrs,
|
|
70
73
|
config,
|
|
74
|
+
hasSlotContent,
|
|
71
75
|
};
|
|
72
76
|
}
|
|
@@ -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, { checkboxColor, checkboxSize }) {
|
|
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,22 +15,19 @@ export default function useAttrs(props, { checkboxColor, checkboxSize }) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
checkboxColor.value,
|
|
30
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
size: checkboxSize.value,
|
|
24
|
+
label: Boolean(props.label),
|
|
25
|
+
error: Boolean(props.error),
|
|
26
|
+
color: getColor(checkboxColor.value),
|
|
27
|
+
});
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
return
|
|
30
|
+
return setColor(value, checkboxColor.value);
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -39,5 +36,6 @@ export default function useAttrs(props, { checkboxColor, checkboxSize }) {
|
|
|
39
36
|
return {
|
|
40
37
|
...attrs,
|
|
41
38
|
config,
|
|
39
|
+
hasSlotContent,
|
|
42
40
|
};
|
|
43
41
|
}
|
|
@@ -4,22 +4,25 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
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,22 +4,25 @@ import defaultConfig from "../configs/default.config";
|
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props, { selected }) {
|
|
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 });
|
|
@@ -42,5 +45,6 @@ export default function useAttrs(props, { selected }) {
|
|
|
42
45
|
return {
|
|
43
46
|
...attrs,
|
|
44
47
|
config,
|
|
48
|
+
hasSlotContent,
|
|
45
49
|
};
|
|
46
50
|
}
|
|
@@ -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, setColor, getColor, isSystemKey } = useUI(
|
|
8
|
+
const { config, getAttrs, setColor, getColor, 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
|
}
|
|
@@ -6,24 +6,27 @@ import defaultConfig from "../configs/default.config";
|
|
|
6
6
|
import { POSITION } from "../../composable.autoPosition";
|
|
7
7
|
|
|
8
8
|
export default function useAttrs(props, { isShownCalendar, isTop, isRight }) {
|
|
9
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
9
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
10
|
+
defaultConfig,
|
|
11
|
+
() => props.config,
|
|
12
|
+
);
|
|
10
13
|
const attrs = {};
|
|
11
14
|
|
|
12
15
|
for (const key in defaultConfig) {
|
|
13
16
|
if (isSystemKey(key)) continue;
|
|
14
17
|
|
|
15
18
|
const classes = computed(() => {
|
|
16
|
-
|
|
19
|
+
let value = config.value[key];
|
|
17
20
|
|
|
18
|
-
if (value
|
|
19
|
-
|
|
21
|
+
if (isCVA(value)) {
|
|
22
|
+
value = cva(value)({
|
|
20
23
|
...props,
|
|
21
24
|
openDirectionY: isTop.value ? POSITION.top : POSITION.bottom,
|
|
22
25
|
openDirectionX: isRight.value ? POSITION.right : POSITION.left,
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
return
|
|
29
|
+
return value;
|
|
27
30
|
});
|
|
28
31
|
|
|
29
32
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -82,5 +85,6 @@ export default function useAttrs(props, { isShownCalendar, isTop, isRight }) {
|
|
|
82
85
|
return {
|
|
83
86
|
...attrs,
|
|
84
87
|
config,
|
|
88
|
+
hasSlotContent,
|
|
85
89
|
};
|
|
86
90
|
}
|
|
@@ -7,22 +7,25 @@ import defaultConfig from "../configs/default.config";
|
|
|
7
7
|
import { POSITION } from "../../composable.autoPosition";
|
|
8
8
|
|
|
9
9
|
export default function useAttrs(props, { isShownMenu, isTop, isRight }) {
|
|
10
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
10
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
11
|
+
defaultConfig,
|
|
12
|
+
() => props.config,
|
|
13
|
+
);
|
|
11
14
|
const attrs = {};
|
|
12
15
|
|
|
13
16
|
for (const key in defaultConfig) {
|
|
14
17
|
if (isSystemKey(key)) continue;
|
|
15
18
|
|
|
16
19
|
const classes = computed(() => {
|
|
17
|
-
|
|
20
|
+
let value = config.value[key];
|
|
18
21
|
|
|
19
|
-
if (value
|
|
20
|
-
|
|
22
|
+
if (isCVA(value)) {
|
|
23
|
+
value = cva(value)({
|
|
21
24
|
...props,
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
return
|
|
28
|
+
return value;
|
|
26
29
|
});
|
|
27
30
|
|
|
28
31
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -123,5 +126,6 @@ export default function useAttrs(props, { isShownMenu, isTop, isRight }) {
|
|
|
123
126
|
return {
|
|
124
127
|
...attrs,
|
|
125
128
|
config,
|
|
129
|
+
hasSlotContent,
|
|
126
130
|
};
|
|
127
131
|
}
|
|
@@ -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) {
|
|
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,29 +14,20 @@ 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
|
error: Boolean(props.error),
|
|
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 });
|
|
31
|
-
|
|
32
|
-
// if (key === "input") {
|
|
33
|
-
// const inputAttrs = attrs[`${key}Attrs`];
|
|
34
|
-
//
|
|
35
|
-
// attrs[`${key}Attrs`] = computed(() => ({
|
|
36
|
-
// ...inputAttrs.value,
|
|
37
|
-
// class: cx([inputAttrs.value.class]),
|
|
38
|
-
// }));
|
|
39
|
-
// }
|
|
40
31
|
}
|
|
41
32
|
|
|
42
33
|
return {
|
|
@@ -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, isSystemKey, hasSlotContent } = useUI(
|
|
8
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
11
|
);
|
|
@@ -15,17 +15,17 @@ 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
|
error: Boolean(props.error),
|
|
24
24
|
label: Boolean(props.label),
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
return
|
|
28
|
+
return value;
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -4,22 +4,25 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
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
|
}
|
|
@@ -12,10 +12,10 @@ export default {
|
|
|
12
12
|
component: UInputMoney,
|
|
13
13
|
args: {
|
|
14
14
|
label: "Label",
|
|
15
|
-
inputValue: 245000.42,
|
|
16
15
|
},
|
|
17
16
|
argTypes: {
|
|
18
17
|
...getArgTypes(UInputMoney.name),
|
|
18
|
+
modelValue: { control: { type: "number" } },
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -29,7 +29,7 @@ const DefaultTemplate = (args) => ({
|
|
|
29
29
|
template: `
|
|
30
30
|
<UInputMoney
|
|
31
31
|
v-bind="args"
|
|
32
|
-
v-model="args.
|
|
32
|
+
v-model="args.modelValue"
|
|
33
33
|
>
|
|
34
34
|
${args.slotTemplate || getSlotsFragment()}
|
|
35
35
|
</UInputMoney>
|
|
@@ -58,7 +58,7 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
export const Default = DefaultTemplate.bind({});
|
|
61
|
-
Default.args = {};
|
|
61
|
+
Default.args = { modelValue: 245000.42 };
|
|
62
62
|
|
|
63
63
|
export const sizes = EnumVariantTemplate.bind({});
|
|
64
64
|
sizes.args = { enum: "size" };
|
|
@@ -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
|
}
|
|
@@ -10,9 +10,12 @@ export default {
|
|
|
10
10
|
id: "3050",
|
|
11
11
|
title: "Form Inputs & Controls / Input Number",
|
|
12
12
|
component: UInputNumber,
|
|
13
|
+
args: {
|
|
14
|
+
modelValue: 1,
|
|
15
|
+
},
|
|
13
16
|
argTypes: {
|
|
14
17
|
...getArgTypes(UInputNumber.name),
|
|
15
|
-
|
|
18
|
+
modelValue: { control: { type: "number" } },
|
|
16
19
|
},
|
|
17
20
|
};
|
|
18
21
|
|
|
@@ -23,13 +26,8 @@ const DefaultTemplate = (args) => ({
|
|
|
23
26
|
|
|
24
27
|
return { args, slots };
|
|
25
28
|
},
|
|
26
|
-
data() {
|
|
27
|
-
return {
|
|
28
|
-
count: 1,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
29
|
template: `
|
|
32
|
-
<UInputNumber v-bind="args" v-model="
|
|
30
|
+
<UInputNumber v-bind="args" v-model="args.modelValue">
|
|
33
31
|
${args.slotTemplate || getSlotsFragment()}
|
|
34
32
|
</UInputNumber>
|
|
35
33
|
`,
|
|
@@ -68,7 +66,6 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
68
66
|
|
|
69
67
|
export const Default = DefaultTemplate.bind({});
|
|
70
68
|
Default.args = {
|
|
71
|
-
value: 1,
|
|
72
69
|
step: 1,
|
|
73
70
|
min: 1,
|
|
74
71
|
max: 100,
|
|
@@ -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) {
|
|
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 });
|
|
@@ -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) {
|
|
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 });
|
|
@@ -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
|
error: Boolean(props.error),
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
return
|
|
27
|
+
return value;
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -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, { radioColor, radioSize }) {
|
|
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,22 +15,19 @@ export default function useAttrs(props, { radioColor, radioSize }) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
radioColor.value,
|
|
30
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
size: radioSize.value,
|
|
24
|
+
label: Boolean(props.label),
|
|
25
|
+
error: Boolean(props.error),
|
|
26
|
+
color: getColor(radioColor.value),
|
|
27
|
+
});
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
return
|
|
30
|
+
return setColor(value, radioColor.value);
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
@@ -39,5 +36,6 @@ export default function useAttrs(props, { radioColor, radioSize }) {
|
|
|
39
36
|
return {
|
|
40
37
|
...attrs,
|
|
41
38
|
config,
|
|
39
|
+
hasSlotContent,
|
|
42
40
|
};
|
|
43
41
|
}
|
|
@@ -6,22 +6,25 @@ import useUI from "../../composable.ui";
|
|
|
6
6
|
import defaultConfig from "../configs/default.config";
|
|
7
7
|
|
|
8
8
|
export default function useAttrs(props) {
|
|
9
|
-
const { config, getAttrs, isSystemKey } = useUI(
|
|
9
|
+
const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
|
|
10
|
+
defaultConfig,
|
|
11
|
+
() => props.config,
|
|
12
|
+
);
|
|
10
13
|
const attrs = {};
|
|
11
14
|
|
|
12
15
|
for (const key in defaultConfig) {
|
|
13
16
|
if (isSystemKey(key)) continue;
|
|
14
17
|
|
|
15
18
|
const classes = computed(() => {
|
|
16
|
-
|
|
19
|
+
let value = config.value[key];
|
|
17
20
|
|
|
18
|
-
if (value
|
|
19
|
-
|
|
21
|
+
if (isCVA(value)) {
|
|
22
|
+
value = cva(value)({
|
|
20
23
|
...props,
|
|
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
|
}
|
|
@@ -4,7 +4,7 @@ import { cva, cx } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props, { isTop, isOpen, selectedLabel: selectedLabelValue }) {
|
|
7
|
-
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
7
|
+
const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
|
|
8
8
|
defaultConfig,
|
|
9
9
|
() => props.config,
|
|
10
10
|
);
|
|
@@ -22,17 +22,17 @@ export default function useAttrs(props, { isTop, isOpen, selectedLabel: selected
|
|
|
22
22
|
if (isSystemKey(key)) continue;
|
|
23
23
|
|
|
24
24
|
const classes = computed(() => {
|
|
25
|
-
|
|
25
|
+
let value = config.value[key];
|
|
26
26
|
|
|
27
|
-
if (value
|
|
28
|
-
|
|
27
|
+
if (isCVA(value)) {
|
|
28
|
+
value = cva(value)({
|
|
29
29
|
...props,
|
|
30
30
|
error: Boolean(props.error),
|
|
31
31
|
label: Boolean(props.label),
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
return
|
|
35
|
+
return value;
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
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, { checked }) {
|
|
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,20 +15,17 @@ export default function useAttrs(props, { checked }) {
|
|
|
15
15
|
if (isSystemKey(key)) continue;
|
|
16
16
|
|
|
17
17
|
const classes = computed(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (value
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
props.color,
|
|
28
|
-
);
|
|
18
|
+
let value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (isCVA(value)) {
|
|
21
|
+
value = cva(value)({
|
|
22
|
+
...props,
|
|
23
|
+
color: getColor(props.color),
|
|
24
|
+
checked: Boolean(checked.value),
|
|
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 });
|
|
@@ -37,5 +34,6 @@ export default function useAttrs(props, { checked }) {
|
|
|
37
34
|
return {
|
|
38
35
|
...attrs,
|
|
39
36
|
config,
|
|
37
|
+
hasSlotContent,
|
|
40
38
|
};
|
|
41
39
|
}
|
|
@@ -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,17 +15,17 @@ 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
|
error: Boolean(props.error),
|
|
24
24
|
label: Boolean(props.label),
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
return
|
|
28
|
+
return value;
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|