vueless 0.0.209 → 0.0.210
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.loader/composables/attrs.composable.js +34 -37
- package/ui.loader/index.vue +1 -1
- package/ui.loader-rendering/composables/attrs.composable.js +27 -19
- package/ui.loader-rendering/configs/default.config.js +1 -0
- package/ui.loader-rendering/index.vue +8 -3
- package/ui.loader-top/composables/attrs.composable.js +28 -19
- package/ui.loader-top/index.vue +1 -1
- package/ui.other-dot/composables/attrs.composable.js +28 -20
- package/ui.other-dot/index.vue +1 -1
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -4,49 +4,46 @@ import { cva, cx } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
|
-
export function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor } = useUI(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const cvaLoader = cva({
|
|
12
|
-
base: loader.base,
|
|
13
|
-
variants: loader.variants,
|
|
14
|
-
compoundVariants: loader.compoundVariants,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const cvaEllipse = cva({
|
|
18
|
-
base: ellipse.base,
|
|
19
|
-
variants: ellipse.variants,
|
|
20
|
-
compoundVariants: ellipse.compoundVariants,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const loaderClasses = computed(() =>
|
|
24
|
-
cvaLoader({
|
|
25
|
-
size: props.size,
|
|
26
|
-
}),
|
|
7
|
+
export default function useAttrs(props) {
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
27
11
|
);
|
|
12
|
+
const attrs = {};
|
|
28
13
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
for (const key in defaultConfig) {
|
|
15
|
+
if (isSystemKey(key)) continue;
|
|
16
|
+
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
const value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (value.variants || value.compoundVariants) {
|
|
21
|
+
return setColor(
|
|
22
|
+
cva(value)({
|
|
23
|
+
...props,
|
|
24
|
+
color: getColor(props.color),
|
|
25
|
+
}),
|
|
26
|
+
props.color,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return "";
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
if (key === "ellipse") {
|
|
36
|
+
const ellipseAttrs = attrs[`${key}Attrs`];
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
attrs[`${key}Attrs`] = computed(() => (classes) => ({
|
|
39
|
+
...ellipseAttrs,
|
|
40
|
+
class: cx([ellipseAttrs.value.class, classes]),
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
46
44
|
|
|
47
45
|
return {
|
|
48
|
-
|
|
49
|
-
ellipseAttrs,
|
|
46
|
+
...attrs,
|
|
50
47
|
config,
|
|
51
48
|
};
|
|
52
49
|
}
|
package/ui.loader/index.vue
CHANGED
|
@@ -16,7 +16,7 @@ import UIService from "../service.ui";
|
|
|
16
16
|
|
|
17
17
|
import { ULoader } from "./constants";
|
|
18
18
|
import defaultConfig from "./configs/default.config";
|
|
19
|
-
import
|
|
19
|
+
import useAttrs from "./composables/attrs.composable";
|
|
20
20
|
|
|
21
21
|
/* Should be a string for correct web-types gen */
|
|
22
22
|
defineOptions({ name: "ULoader", inheritAttrs: false });
|
|
@@ -4,29 +4,37 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
|
|
5
5
|
import defaultConfig from "../configs/default.config";
|
|
6
6
|
|
|
7
|
-
export function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor } = useUI(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const cvaWrapper = cva({
|
|
12
|
-
base: wrapper.base,
|
|
13
|
-
variants: wrapper.variants,
|
|
14
|
-
compoundVariants: wrapper.compoundVariants,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const wrapperClasses = computed(() =>
|
|
18
|
-
setColor(
|
|
19
|
-
cvaWrapper({
|
|
20
|
-
color: getColor(props.color),
|
|
21
|
-
}),
|
|
22
|
-
props.color,
|
|
23
|
-
),
|
|
7
|
+
export default function useAttrs(props) {
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
24
11
|
);
|
|
12
|
+
const attrs = {};
|
|
25
13
|
|
|
26
|
-
const
|
|
14
|
+
for (const key in defaultConfig) {
|
|
15
|
+
if (isSystemKey(key)) continue;
|
|
16
|
+
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
const value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (value.variants || value.compoundVariants) {
|
|
21
|
+
return setColor(
|
|
22
|
+
cva(value)({
|
|
23
|
+
...props,
|
|
24
|
+
color: getColor(props.color),
|
|
25
|
+
}),
|
|
26
|
+
props.color,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return "";
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
34
|
+
}
|
|
27
35
|
|
|
28
36
|
return {
|
|
29
|
-
|
|
37
|
+
...attrs,
|
|
30
38
|
config,
|
|
31
39
|
};
|
|
32
40
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Transition v-bind="config.transition">
|
|
3
3
|
<div v-if="showLoader" v-bind="wrapperAttrs">
|
|
4
|
-
<ULoader
|
|
4
|
+
<ULoader
|
|
5
|
+
:loading="showLoader"
|
|
6
|
+
size="lg"
|
|
7
|
+
:color="color === 'white' ? 'grayscale' : 'white'"
|
|
8
|
+
v-bind="loaderAttrs"
|
|
9
|
+
/>
|
|
5
10
|
</div>
|
|
6
11
|
</Transition>
|
|
7
12
|
</template>
|
|
@@ -14,7 +19,7 @@ import ULoader from "../ui.loader";
|
|
|
14
19
|
|
|
15
20
|
import { ULoaderRendering } from "./constants";
|
|
16
21
|
import defaultConfig from "./configs/default.config";
|
|
17
|
-
import
|
|
22
|
+
import useAttrs from "./composables/attrs.composable";
|
|
18
23
|
import { useLoaderRendering } from "./composables/useLoaderRendering";
|
|
19
24
|
|
|
20
25
|
/* Should be a string for correct web-types gen */
|
|
@@ -39,7 +44,7 @@ const props = defineProps({
|
|
|
39
44
|
},
|
|
40
45
|
});
|
|
41
46
|
|
|
42
|
-
const { wrapperAttrs, config } = useAttrs(props);
|
|
47
|
+
const { wrapperAttrs, loaderAttrs, config } = useAttrs(props);
|
|
43
48
|
const { isLoading, loaderRenderingOn, loaderRenderingOff } = useLoaderRendering();
|
|
44
49
|
|
|
45
50
|
onMounted(() => {
|
|
@@ -4,28 +4,37 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
|
-
export function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor } = useUI(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const cvaProgress = cva({
|
|
12
|
-
base: progress.base,
|
|
13
|
-
variants: progress.variants,
|
|
14
|
-
compoundVariants: progress.compoundVariants,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const progressClasses = computed(() =>
|
|
18
|
-
setColor(
|
|
19
|
-
cvaProgress({
|
|
20
|
-
color: getColor(props.color),
|
|
21
|
-
}),
|
|
22
|
-
props.color,
|
|
23
|
-
),
|
|
7
|
+
export default function useAttrs(props) {
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
24
11
|
);
|
|
12
|
+
const attrs = {};
|
|
25
13
|
|
|
26
|
-
const
|
|
14
|
+
for (const key in defaultConfig) {
|
|
15
|
+
if (isSystemKey(key)) continue;
|
|
16
|
+
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
const value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (value.variants || value.compoundVariants) {
|
|
21
|
+
return setColor(
|
|
22
|
+
cva(value)({
|
|
23
|
+
...props,
|
|
24
|
+
color: getColor(props.color),
|
|
25
|
+
}),
|
|
26
|
+
props.color,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return "";
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
34
|
+
}
|
|
27
35
|
|
|
28
36
|
return {
|
|
29
|
-
|
|
37
|
+
...attrs,
|
|
38
|
+
config,
|
|
30
39
|
};
|
|
31
40
|
}
|
package/ui.loader-top/index.vue
CHANGED
|
@@ -13,7 +13,7 @@ import { useLoaderTop } from "./composables/useLoaderTop";
|
|
|
13
13
|
|
|
14
14
|
import { ULoaderTop, MAXIMUM, SPEED } from "./constants";
|
|
15
15
|
import defaultConfig from "./configs/default.config";
|
|
16
|
-
import
|
|
16
|
+
import useAttrs from "./composables/attrs.composable";
|
|
17
17
|
|
|
18
18
|
/* Should be a string for correct web-types gen */
|
|
19
19
|
defineOptions({ name: "ULoaderTop", inheritAttrs: false });
|
|
@@ -4,29 +4,37 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
|
-
export function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs, getColor, setColor } = useUI(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const cvaWrapper = cva({
|
|
12
|
-
base: wrapper.base,
|
|
13
|
-
variants: wrapper.variants,
|
|
14
|
-
compoundVariants: wrapper.compoundVariants,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const wrapperClasses = computed(() =>
|
|
18
|
-
setColor(
|
|
19
|
-
cvaWrapper({
|
|
20
|
-
size: props.size,
|
|
21
|
-
color: getColor(props.color),
|
|
22
|
-
}),
|
|
23
|
-
props.color,
|
|
24
|
-
),
|
|
7
|
+
export default function useAttrs(props) {
|
|
8
|
+
const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
|
|
9
|
+
defaultConfig,
|
|
10
|
+
() => props.config,
|
|
25
11
|
);
|
|
12
|
+
const attrs = {};
|
|
26
13
|
|
|
27
|
-
const
|
|
14
|
+
for (const key in defaultConfig) {
|
|
15
|
+
if (isSystemKey(key)) continue;
|
|
16
|
+
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
const value = config.value[key];
|
|
19
|
+
|
|
20
|
+
if (value.variants || value.compoundVariants) {
|
|
21
|
+
return setColor(
|
|
22
|
+
cva(value)({
|
|
23
|
+
...props,
|
|
24
|
+
color: getColor(props.color),
|
|
25
|
+
}),
|
|
26
|
+
props.color,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return "";
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
34
|
+
}
|
|
28
35
|
|
|
29
36
|
return {
|
|
30
|
-
|
|
37
|
+
...attrs,
|
|
38
|
+
config,
|
|
31
39
|
};
|
|
32
40
|
}
|
package/ui.other-dot/index.vue
CHANGED
|
@@ -7,7 +7,7 @@ import UIService from "../service.ui";
|
|
|
7
7
|
|
|
8
8
|
import { UDot } from "./constants";
|
|
9
9
|
import defaultConfig from "./configs/default.config";
|
|
10
|
-
import
|
|
10
|
+
import useAttrs from "./composables/attrs.composable";
|
|
11
11
|
|
|
12
12
|
/* Should be a string for correct web-types gen */
|
|
13
13
|
defineOptions({ name: "UDot", inheritAttrs: false });
|