vueless 0.0.375 → 0.0.377
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.data-list/UDataList.vue +10 -5
- package/ui.data-list/useAttrs.js +4 -37
- package/ui.image-avatar/useAttrs.js +3 -26
- package/ui.image-icon/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 +5 -2
package/package.json
CHANGED
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
/>
|
|
40
40
|
</slot>
|
|
41
41
|
|
|
42
|
-
<div v-bind="
|
|
42
|
+
<div v-bind="isActive(element) ? labelAttrs : labelCrossedAttrs">
|
|
43
43
|
<!--
|
|
44
44
|
@slot Use it to modify label.
|
|
45
45
|
@binding {object} item
|
|
46
46
|
-->
|
|
47
|
-
<slot name="label" :item="element">
|
|
47
|
+
<slot name="label" :item="element" :active="isActive(element)">
|
|
48
48
|
{{ element[labelKey] }}
|
|
49
49
|
</slot>
|
|
50
50
|
</div>
|
|
@@ -113,9 +113,9 @@
|
|
|
113
113
|
@click-edit="onClickEdit"
|
|
114
114
|
@drag-sort="onDragEnd"
|
|
115
115
|
>
|
|
116
|
-
<template #label="{ item }">
|
|
117
|
-
<slot name="label" :item="item">
|
|
118
|
-
<div v-bind="labelAttrs" v-text="item[labelKey]" />
|
|
116
|
+
<template #label="{ item, active }">
|
|
117
|
+
<slot name="label" :item="item" :active="active">
|
|
118
|
+
<div v-bind="active ? labelCrossedAttrs : labelAttrs" v-text="item[labelKey]" />
|
|
119
119
|
</slot>
|
|
120
120
|
</template>
|
|
121
121
|
|
|
@@ -290,6 +290,7 @@ const {
|
|
|
290
290
|
itemWrapperAttrs,
|
|
291
291
|
itemAttrs,
|
|
292
292
|
labelAttrs,
|
|
293
|
+
labelCrossedAttrs,
|
|
293
294
|
customActionsAttrs,
|
|
294
295
|
deleteIconAttrs,
|
|
295
296
|
editIconAttrs,
|
|
@@ -311,6 +312,10 @@ const iconSize = computed(() => {
|
|
|
311
312
|
return sizes[props.size];
|
|
312
313
|
});
|
|
313
314
|
|
|
315
|
+
function isActive(element) {
|
|
316
|
+
return element.isActive === undefined || element.isActive;
|
|
317
|
+
}
|
|
318
|
+
|
|
314
319
|
function onDragMove(event) {
|
|
315
320
|
const isDisabledNestingItem = event.draggedContext.element.isDisabledNesting;
|
|
316
321
|
const isNestingAction = !event.relatedContext.element?.isDisabledNesting;
|
package/ui.data-list/useAttrs.js
CHANGED
|
@@ -1,48 +1,15 @@
|
|
|
1
1
|
import useUI from "../composables/useUI.js";
|
|
2
|
+
|
|
2
3
|
import defaultConfig from "./config.js";
|
|
3
|
-
import { computed } from "vue";
|
|
4
|
-
import { cva, cx } from "../utils/utilUI.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
|
-
});
|
|
27
|
-
|
|
28
|
-
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
29
|
-
|
|
30
|
-
if (key === "label") {
|
|
31
|
-
const labelAttrs = attrs[`${key}Attrs`];
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
32
7
|
|
|
33
|
-
|
|
34
|
-
...labelAttrs,
|
|
35
|
-
class: cx([
|
|
36
|
-
labelAttrs.value.class,
|
|
37
|
-
isActive !== undefined && !isActive ? config.value.labelCrossed : "",
|
|
38
|
-
]),
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
42
9
|
|
|
43
10
|
return {
|
|
44
|
-
...attrs,
|
|
45
11
|
config,
|
|
12
|
+
...keysAttrs,
|
|
46
13
|
hasSlotContent,
|
|
47
14
|
};
|
|
48
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,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/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.377",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -2252,6 +2252,9 @@
|
|
|
2252
2252
|
"bindings": [
|
|
2253
2253
|
{
|
|
2254
2254
|
"name": "item"
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"name": "active"
|
|
2255
2258
|
}
|
|
2256
2259
|
]
|
|
2257
2260
|
},
|
|
@@ -8006,7 +8009,7 @@
|
|
|
8006
8009
|
"description": "Tab value.",
|
|
8007
8010
|
"value": {
|
|
8008
8011
|
"kind": "expression",
|
|
8009
|
-
"type": "string"
|
|
8012
|
+
"type": "string|number"
|
|
8010
8013
|
},
|
|
8011
8014
|
"default": "\"\""
|
|
8012
8015
|
},
|