vueless 0.0.374 → 0.0.376
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/composables/useUI.js +4 -2
- package/package.json +1 -1
- package/ui.form-input/useAttrs.js +8 -25
- package/ui.form-input-file/useAttrs.js +7 -25
- package/ui.form-input-money/useAttrs.js +4 -25
- package/ui.form-input-number/useAttrs.js +3 -25
- package/ui.form-input-rating/useAttrs.js +3 -25
- package/ui.form-input-search/useAttrs.js +4 -25
- package/ui.form-label/useAttrs.js +7 -25
- package/ui.form-radio/useAttrs.js +9 -27
- package/ui.form-radio-group/useAttrs.js +3 -26
- package/ui.loader/ULoader.vue +14 -24
- package/ui.loader/useAttrs.js +8 -35
- package/ui.loader-rendering/useAttrs.js +3 -26
- package/ui.loader-top/useAttrs.js +3 -26
- package/ui.navigation-pagination/useAttrs.js +26 -45
- package/ui.navigation-progress/UProgress.vue +2 -3
- package/ui.navigation-progress/useAttrs.js +10 -32
- package/ui.navigation-tab/UTab.vue +1 -1
- package/ui.navigation-tab/config.js +1 -3
- package/ui.navigation-tab/useAttrs.js +12 -21
- package/ui.navigation-tabs/useAttrs.js +3 -25
- package/ui.other-dot/useAttrs.js +3 -26
- package/web-types.json +2 -2
package/composables/useUI.js
CHANGED
|
@@ -62,17 +62,19 @@ export default function useUI(defaultConfig = {}, propsConfigGetter = null, topL
|
|
|
62
62
|
*/
|
|
63
63
|
function getClasses(key, mutatedProps = {}) {
|
|
64
64
|
return computed(() => {
|
|
65
|
+
const color = toValue(mutatedProps)?.color || props.color;
|
|
66
|
+
|
|
65
67
|
let value = config.value[key];
|
|
66
68
|
|
|
67
69
|
if (isCVA(value)) {
|
|
68
70
|
value = cva(value)({
|
|
69
71
|
...props,
|
|
70
72
|
...toValue(mutatedProps),
|
|
71
|
-
color:
|
|
73
|
+
color: color ? getColor(color) : null,
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
return
|
|
77
|
+
return color ? setColor(value, color) : value;
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
|
package/package.json
CHANGED
|
@@ -1,38 +1,21 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import useUI from "../composables/useUI.js";
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import defaultConfig from "./config.js";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props) {
|
|
7
|
-
const { config,
|
|
8
|
-
defaultConfig,
|
|
9
|
-
() => props.config,
|
|
10
|
-
);
|
|
11
|
-
const attrs = {};
|
|
12
|
-
|
|
13
|
-
for (const key in defaultConfig) {
|
|
14
|
-
if (isSystemKey(key)) continue;
|
|
15
|
-
|
|
16
|
-
const classes = computed(() => {
|
|
17
|
-
let value = config.value[key];
|
|
18
|
-
|
|
19
|
-
if (isCVA(value)) {
|
|
20
|
-
value = cva(value)({
|
|
21
|
-
...props,
|
|
22
|
-
error: Boolean(props.error),
|
|
23
|
-
label: Boolean(props.label),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
const mutatedProps = computed(() => ({
|
|
10
|
+
error: Boolean(props.error),
|
|
11
|
+
label: Boolean(props.label),
|
|
12
|
+
}));
|
|
29
13
|
|
|
30
|
-
|
|
31
|
-
}
|
|
14
|
+
const keysAttrs = getKeysAttrs(mutatedProps);
|
|
32
15
|
|
|
33
16
|
return {
|
|
34
|
-
...attrs,
|
|
35
17
|
config,
|
|
18
|
+
...keysAttrs,
|
|
36
19
|
hasSlotContent,
|
|
37
20
|
};
|
|
38
21
|
}
|
|
@@ -1,39 +1,21 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import useUI from "../composables/useUI.js";
|
|
3
|
-
import { cva } from "../utils/utilUI.js";
|
|
4
3
|
|
|
5
4
|
import defaultConfig from "./config.js";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const mutatedProps = computed(() => ({
|
|
10
|
+
error: Boolean(props.error),
|
|
11
|
+
label: Boolean(props.label),
|
|
12
|
+
}));
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
error: Boolean(props.error),
|
|
24
|
-
label: Boolean(props.label),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return value;
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
32
|
-
}
|
|
14
|
+
const keysAttrs = getKeysAttrs(mutatedProps);
|
|
33
15
|
|
|
34
16
|
return {
|
|
35
|
-
...attrs,
|
|
36
17
|
config,
|
|
18
|
+
...keysAttrs,
|
|
37
19
|
hasSlotContent,
|
|
38
20
|
};
|
|
39
21
|
}
|
|
@@ -1,36 +1,15 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
|
|
3
|
-
import { cva } from "../utils/utilUI.js";
|
|
2
|
+
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
4
|
|
|
6
5
|
export default function useAttrs(props) {
|
|
7
|
-
const { config,
|
|
8
|
-
defaultConfig,
|
|
9
|
-
() => props.config,
|
|
10
|
-
);
|
|
11
|
-
const attrs = {};
|
|
12
|
-
|
|
13
|
-
for (const key in defaultConfig) {
|
|
14
|
-
if (isSystemKey(key)) continue;
|
|
15
|
-
|
|
16
|
-
const classes = computed(() => {
|
|
17
|
-
let value = config.value[key];
|
|
18
|
-
|
|
19
|
-
if (isCVA(value)) {
|
|
20
|
-
value = cva(value)({
|
|
21
|
-
...props,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return value;
|
|
26
|
-
});
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
27
7
|
|
|
28
|
-
|
|
29
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
30
9
|
|
|
31
10
|
return {
|
|
32
|
-
...attrs,
|
|
33
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
34
13
|
hasSlotContent,
|
|
35
14
|
};
|
|
36
15
|
}
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva } from "../utils/utilUI.js";
|
|
3
2
|
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
4
|
|
|
7
5
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return value;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
30
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
31
9
|
|
|
32
10
|
return {
|
|
33
|
-
...attrs,
|
|
34
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
35
13
|
hasSlotContent,
|
|
36
14
|
};
|
|
37
15
|
}
|
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
1
|
import useUI from "../composables/useUI.js";
|
|
3
|
-
import { cva } from "../utils/utilUI.js";
|
|
4
2
|
import defaultConfig from "./config.js";
|
|
5
3
|
|
|
6
4
|
export default function useAttrs(props) {
|
|
7
|
-
const { config,
|
|
8
|
-
defaultConfig,
|
|
9
|
-
() => props.config,
|
|
10
|
-
);
|
|
11
|
-
const attrs = {};
|
|
5
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
if (isSystemKey(key)) continue;
|
|
15
|
-
|
|
16
|
-
const classes = computed(() => {
|
|
17
|
-
let value = config.value[key];
|
|
18
|
-
|
|
19
|
-
if (isCVA(value)) {
|
|
20
|
-
value = cva(value)({
|
|
21
|
-
...props,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return value;
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
29
|
-
}
|
|
7
|
+
const keysAttrs = getKeysAttrs();
|
|
30
8
|
|
|
31
9
|
return {
|
|
32
|
-
...attrs,
|
|
33
10
|
config,
|
|
11
|
+
...keysAttrs,
|
|
34
12
|
hasSlotContent,
|
|
35
13
|
};
|
|
36
14
|
}
|
|
@@ -1,36 +1,15 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
1
|
import useUI from "../composables/useUI.js";
|
|
3
|
-
|
|
2
|
+
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
4
|
|
|
6
5
|
export default function useAttrs(props) {
|
|
7
|
-
const { config,
|
|
8
|
-
defaultConfig,
|
|
9
|
-
() => props.config,
|
|
10
|
-
);
|
|
11
|
-
const attrs = {};
|
|
12
|
-
|
|
13
|
-
for (const key in defaultConfig) {
|
|
14
|
-
if (isSystemKey(key)) continue;
|
|
15
|
-
|
|
16
|
-
const classes = computed(() => {
|
|
17
|
-
let value = config.value[key];
|
|
18
|
-
|
|
19
|
-
if (isCVA(value)) {
|
|
20
|
-
value = cva(value)({
|
|
21
|
-
...props,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return value;
|
|
26
|
-
});
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
27
7
|
|
|
28
|
-
|
|
29
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
30
9
|
|
|
31
10
|
return {
|
|
32
|
-
...attrs,
|
|
33
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
34
13
|
hasSlotContent,
|
|
35
14
|
};
|
|
36
15
|
}
|
|
@@ -1,38 +1,20 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
1
2
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva } from "../utils/utilUI.js";
|
|
3
3
|
|
|
4
4
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
13
|
-
|
|
14
|
-
for (const key in defaultConfig) {
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
error: Boolean(props.error),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
const mutatedProps = computed(() => ({
|
|
10
|
+
error: Boolean(props.error),
|
|
11
|
+
}));
|
|
29
12
|
|
|
30
|
-
|
|
31
|
-
}
|
|
13
|
+
const keysAttrs = getKeysAttrs(mutatedProps);
|
|
32
14
|
|
|
33
15
|
return {
|
|
34
|
-
...attrs,
|
|
35
16
|
config,
|
|
17
|
+
...keysAttrs,
|
|
36
18
|
hasSlotContent,
|
|
37
19
|
};
|
|
38
20
|
}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import useUI from "../composables/useUI.js";
|
|
3
|
-
import { cva } from "../utils/utilUI.js";
|
|
4
3
|
|
|
5
4
|
import defaultConfig from "./config.js";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props, { radioColor, radioSize }) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const mutatedProps = computed(() => ({
|
|
10
|
+
color: radioColor.value,
|
|
11
|
+
size: radioSize.value,
|
|
12
|
+
label: Boolean(props.label),
|
|
13
|
+
error: Boolean(props.error),
|
|
14
|
+
}));
|
|
16
15
|
|
|
17
|
-
|
|
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
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return setColor(value, radioColor.value);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
34
|
-
}
|
|
16
|
+
const keysAttrs = getKeysAttrs(mutatedProps);
|
|
35
17
|
|
|
36
18
|
return {
|
|
37
|
-
...attrs,
|
|
38
19
|
config,
|
|
20
|
+
...keysAttrs,
|
|
39
21
|
hasSlotContent,
|
|
40
22
|
};
|
|
41
23
|
}
|
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
|
-
|
|
3
|
-
import { cva } from "../utils/utilUI.js";
|
|
4
1
|
import useUI from "../composables/useUI.js";
|
|
5
2
|
|
|
6
3
|
import defaultConfig from "./config.js";
|
|
7
4
|
|
|
8
5
|
export default function useAttrs(props) {
|
|
9
|
-
const { config,
|
|
10
|
-
defaultConfig,
|
|
11
|
-
() => props.config,
|
|
12
|
-
);
|
|
13
|
-
const attrs = {};
|
|
14
|
-
|
|
15
|
-
for (const key in defaultConfig) {
|
|
16
|
-
if (isSystemKey(key)) continue;
|
|
17
|
-
|
|
18
|
-
const classes = computed(() => {
|
|
19
|
-
let value = config.value[key];
|
|
20
|
-
|
|
21
|
-
if (isCVA(value)) {
|
|
22
|
-
value = cva(value)({
|
|
23
|
-
...props,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return value;
|
|
28
|
-
});
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
29
7
|
|
|
30
|
-
|
|
31
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
32
9
|
|
|
33
10
|
return {
|
|
34
|
-
...attrs,
|
|
35
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
36
13
|
hasSlotContent,
|
|
37
14
|
};
|
|
38
15
|
}
|
package/ui.loader/ULoader.vue
CHANGED
|
@@ -3,18 +3,13 @@
|
|
|
3
3
|
<div v-if="loading" v-bind="loaderAttrs">
|
|
4
4
|
<!-- @slot Use it to add something instead of the default loader. -->
|
|
5
5
|
<slot>
|
|
6
|
-
<div
|
|
7
|
-
v-for="ellipse in ELLIPSES_AMOUNT"
|
|
8
|
-
:key="ellipse"
|
|
9
|
-
v-bind="ellipseAttrs(ellipseClasses)"
|
|
10
|
-
/>
|
|
6
|
+
<div v-for="ellipse in ELLIPSES_AMOUNT" :key="ellipse" v-bind="ellipseAttrs" />
|
|
11
7
|
</slot>
|
|
12
8
|
</div>
|
|
13
9
|
</Transition>
|
|
14
10
|
</template>
|
|
15
11
|
|
|
16
12
|
<script setup>
|
|
17
|
-
import { computed } from "vue";
|
|
18
13
|
import { getDefault } from "../utils/utilUI.js";
|
|
19
14
|
|
|
20
15
|
import { ULoader, ELLIPSES_AMOUNT } from "./constants.js";
|
|
@@ -52,55 +47,50 @@ const props = defineProps({
|
|
|
52
47
|
});
|
|
53
48
|
|
|
54
49
|
const { loaderAttrs, ellipseAttrs, config } = useAttrs(props);
|
|
55
|
-
|
|
56
|
-
const ellipseClasses = computed(() => [
|
|
57
|
-
"vueless-loader-ellipse",
|
|
58
|
-
`vueless-loader-ellipse-${props.size}`,
|
|
59
|
-
]);
|
|
60
50
|
</script>
|
|
61
51
|
|
|
62
52
|
<style scoped lang="postcss">
|
|
63
53
|
.vueless-loader-ellipse {
|
|
64
54
|
&:nth-child(1) {
|
|
65
|
-
animation:
|
|
55
|
+
animation: ellipse-1 0.6s infinite;
|
|
66
56
|
}
|
|
67
57
|
|
|
68
58
|
&:nth-child(4) {
|
|
69
|
-
animation:
|
|
59
|
+
animation: ellipse-3 0.6s infinite;
|
|
70
60
|
}
|
|
71
61
|
|
|
72
62
|
&-sm {
|
|
73
63
|
&:nth-child(2) {
|
|
74
|
-
animation:
|
|
64
|
+
animation: ellipse-2-sm 0.6s infinite;
|
|
75
65
|
}
|
|
76
66
|
|
|
77
67
|
&:nth-child(3) {
|
|
78
|
-
animation:
|
|
68
|
+
animation: ellipse-2-sm 0.6s infinite;
|
|
79
69
|
}
|
|
80
70
|
}
|
|
81
71
|
|
|
82
72
|
&-md {
|
|
83
73
|
&:nth-child(2) {
|
|
84
|
-
animation:
|
|
74
|
+
animation: ellipse-2-md 0.6s infinite;
|
|
85
75
|
}
|
|
86
76
|
|
|
87
77
|
&:nth-child(3) {
|
|
88
|
-
animation:
|
|
78
|
+
animation: ellipse-2-md 0.6s infinite;
|
|
89
79
|
}
|
|
90
80
|
}
|
|
91
81
|
|
|
92
82
|
&-lg {
|
|
93
83
|
&:nth-child(2) {
|
|
94
|
-
animation:
|
|
84
|
+
animation: ellipse-2-lg 0.6s infinite;
|
|
95
85
|
}
|
|
96
86
|
|
|
97
87
|
&:nth-child(3) {
|
|
98
|
-
animation:
|
|
88
|
+
animation: ellipse-2-lg 0.6s infinite;
|
|
99
89
|
}
|
|
100
90
|
}
|
|
101
91
|
}
|
|
102
92
|
|
|
103
|
-
@keyframes
|
|
93
|
+
@keyframes ellipse-1 {
|
|
104
94
|
0% {
|
|
105
95
|
transform: scale(0);
|
|
106
96
|
}
|
|
@@ -109,7 +99,7 @@ const ellipseClasses = computed(() => [
|
|
|
109
99
|
}
|
|
110
100
|
}
|
|
111
101
|
|
|
112
|
-
@keyframes
|
|
102
|
+
@keyframes ellipse-3 {
|
|
113
103
|
0% {
|
|
114
104
|
transform: scale(1);
|
|
115
105
|
}
|
|
@@ -118,7 +108,7 @@ const ellipseClasses = computed(() => [
|
|
|
118
108
|
}
|
|
119
109
|
}
|
|
120
110
|
|
|
121
|
-
@keyframes
|
|
111
|
+
@keyframes ellipse-2-sm {
|
|
122
112
|
0% {
|
|
123
113
|
transform: translate(0, 0);
|
|
124
114
|
}
|
|
@@ -128,7 +118,7 @@ const ellipseClasses = computed(() => [
|
|
|
128
118
|
}
|
|
129
119
|
}
|
|
130
120
|
|
|
131
|
-
@keyframes
|
|
121
|
+
@keyframes ellipse-2-md {
|
|
132
122
|
0% {
|
|
133
123
|
transform: translate(0, 0);
|
|
134
124
|
}
|
|
@@ -138,7 +128,7 @@ const ellipseClasses = computed(() => [
|
|
|
138
128
|
}
|
|
139
129
|
}
|
|
140
130
|
|
|
141
|
-
@keyframes
|
|
131
|
+
@keyframes ellipse-2-lg {
|
|
142
132
|
0% {
|
|
143
133
|
transform: translate(0, 0);
|
|
144
134
|
}
|
package/ui.loader/useAttrs.js
CHANGED
|
@@ -1,47 +1,20 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
1
2
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva, cx } from "../utils/utilUI.js";
|
|
3
3
|
|
|
4
4
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
13
|
-
|
|
14
|
-
for (const key in defaultConfig) {
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
color: getColor(props.color),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return setColor(value, props.color);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
31
|
-
|
|
32
|
-
if (key === "ellipse") {
|
|
33
|
-
const ellipseAttrs = attrs[`${key}Attrs`];
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
9
|
+
const keysAttrs = getKeysAttrs({}, [], {
|
|
10
|
+
ellipse: {
|
|
11
|
+
extend: computed(() => ["vueless-loader-ellipse", `vueless-loader-ellipse-${props.size}`]),
|
|
12
|
+
},
|
|
13
|
+
});
|
|
41
14
|
|
|
42
15
|
return {
|
|
43
|
-
...attrs,
|
|
44
16
|
config,
|
|
17
|
+
...keysAttrs,
|
|
45
18
|
hasSlotContent,
|
|
46
19
|
};
|
|
47
20
|
}
|
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
1
|
import useUI from "../composables/useUI.js";
|
|
3
|
-
import { cva } from "../utils/utilUI.js";
|
|
4
2
|
|
|
5
3
|
import defaultConfig from "./config.js";
|
|
6
4
|
|
|
7
5
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
color: getColor(props.color),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return setColor(value, props.color);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
31
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
32
9
|
|
|
33
10
|
return {
|
|
34
|
-
...attrs,
|
|
35
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
36
13
|
hasSlotContent,
|
|
37
14
|
};
|
|
38
15
|
}
|
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva } from "../utils/utilUI.js";
|
|
3
2
|
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
4
|
|
|
7
5
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
color: getColor(props.color),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return setColor(value, props.color);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
31
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
32
9
|
|
|
33
10
|
return {
|
|
34
|
-
...attrs,
|
|
35
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
36
13
|
hasSlotContent,
|
|
37
14
|
};
|
|
38
15
|
}
|
|
@@ -1,60 +1,41 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
1
2
|
import useUI from "../composables/useUI.js";
|
|
2
3
|
|
|
3
4
|
import defaultConfig from "./config.js";
|
|
4
|
-
import { cva, cx } from "../utils/utilUI.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent, getExtendingKeysClasses } = useUI(
|
|
9
8
|
defaultConfig,
|
|
10
9
|
() => props.config,
|
|
11
10
|
);
|
|
12
11
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
key === "firstButton" ||
|
|
40
|
-
key === "lastButton" ||
|
|
41
|
-
key === "prevButton" ||
|
|
42
|
-
key === "nextButton" ||
|
|
43
|
-
key === "activeButton" ||
|
|
44
|
-
key === "inactiveButton"
|
|
45
|
-
) {
|
|
46
|
-
const keyAttrs = attrs[`${key}Attrs`];
|
|
47
|
-
|
|
48
|
-
attrs[`${key}Attrs`] = computed(() => ({
|
|
49
|
-
...keyAttrs.value,
|
|
50
|
-
class: cx([paginationButtonClasses.value, keyAttrs.value.class]),
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
12
|
+
const extendingKeys = ["paginationButton"];
|
|
13
|
+
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
14
|
+
|
|
15
|
+
const keysAttrs = getKeysAttrs({}, extendingKeys, {
|
|
16
|
+
firstButton: {
|
|
17
|
+
base: computed(() => [extendingKeysClasses.paginationButton.value]),
|
|
18
|
+
},
|
|
19
|
+
lastButton: {
|
|
20
|
+
base: computed(() => [extendingKeysClasses.paginationButton.value]),
|
|
21
|
+
},
|
|
22
|
+
prevButton: {
|
|
23
|
+
base: computed(() => [extendingKeysClasses.paginationButton.value]),
|
|
24
|
+
},
|
|
25
|
+
nextButton: {
|
|
26
|
+
base: computed(() => [extendingKeysClasses.paginationButton.value]),
|
|
27
|
+
},
|
|
28
|
+
activeButton: {
|
|
29
|
+
base: computed(() => [extendingKeysClasses.paginationButton.value]),
|
|
30
|
+
},
|
|
31
|
+
inactiveButton: {
|
|
32
|
+
base: computed(() => [extendingKeysClasses.paginationButton.value]),
|
|
33
|
+
},
|
|
34
|
+
});
|
|
54
35
|
|
|
55
36
|
return {
|
|
56
|
-
...attrs,
|
|
57
37
|
config,
|
|
38
|
+
...keysAttrs,
|
|
58
39
|
hasSlotContent,
|
|
59
40
|
};
|
|
60
41
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<progress v-bind="progressAttrs" :max="realMax" :value="value" />
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
|
-
<div v-if="isSteps" v-bind="stepAttrs
|
|
19
|
+
<div v-if="isSteps" v-bind="stepAttrs">
|
|
20
20
|
<template v-for="(step, index) in max" :key="index">
|
|
21
21
|
<!--
|
|
22
22
|
@slot Use it to add something instead of the progress step label.
|
|
@@ -133,8 +133,7 @@ const props = defineProps({
|
|
|
133
133
|
},
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs
|
|
137
|
-
useAttrs(props);
|
|
136
|
+
const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs } = useAttrs(props);
|
|
138
137
|
|
|
139
138
|
const isSteps = computed(() => Array.isArray(props.max));
|
|
140
139
|
|
|
@@ -1,48 +1,26 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
1
2
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva, cx } from "../utils/utilUI.js";
|
|
3
3
|
|
|
4
4
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent, getExtendingKeysClasses } = useUI(
|
|
9
8
|
defaultConfig,
|
|
10
9
|
() => props.config,
|
|
11
10
|
);
|
|
12
11
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
for (const key in defaultConfig) {
|
|
16
|
-
if (isSystemKey(key)) continue;
|
|
17
|
-
|
|
18
|
-
const classes = computed(() => {
|
|
19
|
-
let value = config.value[key];
|
|
20
|
-
|
|
21
|
-
if (isCVA(value)) {
|
|
22
|
-
value = cva(value)({
|
|
23
|
-
...props,
|
|
24
|
-
color: getColor(props.color),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return setColor(value, props.color);
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
32
|
-
|
|
33
|
-
if (key === "step") {
|
|
34
|
-
const stepAttrs = attrs[`${key}Attrs`];
|
|
12
|
+
const extendingKeys = ["stepFirst"];
|
|
13
|
+
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
35
14
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
15
|
+
const keysAttrs = getKeysAttrs({}, extendingKeys, {
|
|
16
|
+
step: {
|
|
17
|
+
base: computed(() => [!props.value && extendingKeysClasses.stepFirst.value]),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
42
20
|
|
|
43
21
|
return {
|
|
44
|
-
...attrs,
|
|
45
22
|
config,
|
|
23
|
+
...keysAttrs,
|
|
46
24
|
hasSlotContent,
|
|
47
25
|
};
|
|
48
26
|
}
|
|
@@ -10,11 +10,9 @@ export default /*tw*/ {
|
|
|
10
10
|
disabled: {
|
|
11
11
|
true: "text-gray-400 cursor-not-allowed",
|
|
12
12
|
},
|
|
13
|
-
selected: {
|
|
14
|
-
true: "border-b-2 text-brand-700 border-brand-700",
|
|
15
|
-
},
|
|
16
13
|
},
|
|
17
14
|
},
|
|
15
|
+
tabActive: "border-b-2 text-brand-700 border-brand-700",
|
|
18
16
|
defaults: {
|
|
19
17
|
size: "md",
|
|
20
18
|
disabled: false,
|
|
@@ -1,39 +1,30 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva } from "../utils/utilUI.js";
|
|
3
2
|
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
4
|
import { computed } from "vue";
|
|
6
5
|
|
|
7
6
|
export default function useAttrs(props, { selected, size }) {
|
|
8
|
-
const { config,
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent, getExtendingKeysClasses } = useUI(
|
|
9
8
|
defaultConfig,
|
|
10
9
|
() => props.config,
|
|
11
10
|
);
|
|
12
|
-
const attrs = {};
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const mutatedProps = computed(() => ({
|
|
13
|
+
size: size.value,
|
|
14
|
+
}));
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const extendingKeys = ["tabActive"];
|
|
17
|
+
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return value;
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
32
|
-
}
|
|
19
|
+
const keysAttrs = getKeysAttrs(mutatedProps, extendingKeys, {
|
|
20
|
+
tab: {
|
|
21
|
+
extend: computed(() => [selected.value && extendingKeysClasses.tabActive.value]),
|
|
22
|
+
},
|
|
23
|
+
});
|
|
33
24
|
|
|
34
25
|
return {
|
|
35
|
-
...attrs,
|
|
36
26
|
config,
|
|
27
|
+
...keysAttrs,
|
|
37
28
|
hasSlotContent,
|
|
38
29
|
};
|
|
39
30
|
}
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva } from "../utils/utilUI.js";
|
|
3
2
|
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
4
|
|
|
7
5
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return value;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
30
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
31
9
|
|
|
32
10
|
return {
|
|
33
|
-
...attrs,
|
|
34
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
35
13
|
hasSlotContent,
|
|
36
14
|
};
|
|
37
15
|
}
|
package/ui.other-dot/useAttrs.js
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
-
import { cva } from "../utils/utilUI.js";
|
|
3
2
|
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
|
-
import { computed } from "vue";
|
|
6
4
|
|
|
7
5
|
export default function useAttrs(props) {
|
|
8
|
-
const { config,
|
|
9
|
-
defaultConfig,
|
|
10
|
-
() => props.config,
|
|
11
|
-
);
|
|
12
|
-
const attrs = {};
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
if (isSystemKey(key)) continue;
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
let value = config.value[key];
|
|
19
|
-
|
|
20
|
-
if (isCVA(value)) {
|
|
21
|
-
value = cva(value)({
|
|
22
|
-
...props,
|
|
23
|
-
color: getColor(props.color),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return setColor(value, props.color);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
31
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
32
9
|
|
|
33
10
|
return {
|
|
34
|
-
...attrs,
|
|
35
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
36
13
|
hasSlotContent,
|
|
37
14
|
};
|
|
38
15
|
}
|
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.376",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -8006,7 +8006,7 @@
|
|
|
8006
8006
|
"description": "Tab value.",
|
|
8007
8007
|
"value": {
|
|
8008
8008
|
"kind": "expression",
|
|
8009
|
-
"type": "string"
|
|
8009
|
+
"type": "string|number"
|
|
8010
8010
|
},
|
|
8011
8011
|
"default": "\"\""
|
|
8012
8012
|
},
|