vueless 0.0.202 → 0.0.203
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.text-file/composables/attrs.composable.js +23 -27
- package/ui.text-file/configs/default.config.js +2 -2
- package/ui.text-file/index.vue +1 -1
- package/ui.text-files/composables/attrs.composable.js +21 -15
- package/ui.text-files/configs/default.config.js +1 -1
- package/ui.text-files/index.vue +7 -3
- package/ui.text-notify/composables/attrs.composable.js +23 -21
- package/ui.text-notify/index.vue +1 -1
- package/web-types.json +3 -1
package/package.json
CHANGED
|
@@ -4,35 +4,31 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
|
|
5
5
|
import defaultConfig from "../configs/default.config";
|
|
6
6
|
|
|
7
|
-
export function useAttrs(props, { focus }) {
|
|
8
|
-
const { config, getAttrs } = useUI(defaultConfig, () => props.config);
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
export default function useAttrs(props, { focus }) {
|
|
8
|
+
const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
|
|
9
|
+
const attrs = {};
|
|
10
|
+
|
|
11
|
+
for (const key in defaultConfig) {
|
|
12
|
+
if (isSystemKey(key)) continue;
|
|
13
|
+
|
|
14
|
+
const classes = computed(() => {
|
|
15
|
+
const value = config.value[key];
|
|
16
|
+
|
|
17
|
+
if (value.variants || value.compoundVariants) {
|
|
18
|
+
return cva(value)({
|
|
19
|
+
...props,
|
|
20
|
+
focus: Boolean(focus.value),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return "";
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
28
|
+
}
|
|
29
29
|
|
|
30
30
|
return {
|
|
31
|
+
...attrs,
|
|
31
32
|
config,
|
|
32
|
-
fileAttrs,
|
|
33
|
-
infoAttrs,
|
|
34
|
-
iconAttrs,
|
|
35
|
-
labelAttrs,
|
|
36
|
-
imageAttrs,
|
|
37
33
|
};
|
|
38
34
|
}
|
package/ui.text-file/index.vue
CHANGED
|
@@ -31,7 +31,7 @@ import UIcon from "../ui.image-icon";
|
|
|
31
31
|
|
|
32
32
|
import UIService, { getRandomId } from "../service.ui";
|
|
33
33
|
|
|
34
|
-
import
|
|
34
|
+
import useAttrs from "./composables/attrs.composable";
|
|
35
35
|
import { UFile } from "./constants";
|
|
36
36
|
import defaultConfig from "./configs/default.config";
|
|
37
37
|
|
|
@@ -4,25 +4,31 @@ import { cva } from "../../service.ui";
|
|
|
4
4
|
|
|
5
5
|
import defaultConfig from "../configs/default.config";
|
|
6
6
|
|
|
7
|
-
export function useAttrs(props) {
|
|
8
|
-
const { getAttrs, config } = useUI(defaultConfig, () => props.config);
|
|
9
|
-
const
|
|
7
|
+
export default function useAttrs(props) {
|
|
8
|
+
const { getAttrs, config, isSystemKey } = useUI(defaultConfig, () => props.config);
|
|
9
|
+
const attrs = {};
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
variants: body.variants,
|
|
14
|
-
compoundVariants: body.compoundVariants,
|
|
15
|
-
});
|
|
11
|
+
for (const key in defaultConfig) {
|
|
12
|
+
if (isSystemKey(key)) continue;
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
const classes = computed(() => {
|
|
15
|
+
const value = config.value[key];
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
if (value.variants || value.compoundVariants) {
|
|
18
|
+
return cva(value)({
|
|
19
|
+
...props,
|
|
20
|
+
label: Boolean(props.label),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return "";
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
28
|
+
}
|
|
22
29
|
|
|
23
30
|
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
fileAttrs,
|
|
31
|
+
...attrs,
|
|
32
|
+
config,
|
|
27
33
|
};
|
|
28
34
|
}
|
package/ui.text-files/index.vue
CHANGED
|
@@ -14,12 +14,16 @@
|
|
|
14
14
|
:data-cy="`${dataCy}-item`"
|
|
15
15
|
>
|
|
16
16
|
<template #left="{ file: currentFile }">
|
|
17
|
-
<!-- @slot Use it to add something left.
|
|
17
|
+
<!-- @slot Use it to add something left.
|
|
18
|
+
@binding {object} file
|
|
19
|
+
-->
|
|
18
20
|
<slot name="left" :file="currentFile" />
|
|
19
21
|
</template>
|
|
20
22
|
|
|
21
23
|
<template #right="{ file: currentFile }">
|
|
22
|
-
<!-- @slot Use it to add something right.
|
|
24
|
+
<!-- @slot Use it to add something right.
|
|
25
|
+
@binding {object} file
|
|
26
|
+
-->
|
|
23
27
|
<slot name="right" :file="currentFile" />
|
|
24
28
|
</template>
|
|
25
29
|
</UFile>
|
|
@@ -35,7 +39,7 @@ import UIService from "../service.ui";
|
|
|
35
39
|
|
|
36
40
|
import { UFiles } from "./constants";
|
|
37
41
|
import defaultConfig from "./configs/default.config";
|
|
38
|
-
import
|
|
42
|
+
import useAttrs from "./composables/attrs.composable";
|
|
39
43
|
import { computed } from "vue";
|
|
40
44
|
|
|
41
45
|
/* Should be a string for correct web-types gen */
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import useUI from "../../composable.ui";
|
|
2
|
-
|
|
2
|
+
import { computed } from "vue";
|
|
3
3
|
import defaultConfig from "../configs/default.config";
|
|
4
|
+
import { cva } from "../../service.ui";
|
|
5
|
+
|
|
6
|
+
export default function useAttrs(props) {
|
|
7
|
+
const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
|
|
8
|
+
const attrs = {};
|
|
9
|
+
|
|
10
|
+
for (const key in defaultConfig) {
|
|
11
|
+
if (isSystemKey(key)) continue;
|
|
12
|
+
|
|
13
|
+
const classes = computed(() => {
|
|
14
|
+
const value = config.value[key];
|
|
15
|
+
|
|
16
|
+
if (value.variants || value.compoundVariants) {
|
|
17
|
+
return cva(value)({
|
|
18
|
+
...props,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
4
21
|
|
|
5
|
-
|
|
6
|
-
|
|
22
|
+
return "";
|
|
23
|
+
});
|
|
7
24
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const contentAttrs = getAttrs("content");
|
|
11
|
-
const labelAttrs = getAttrs("label");
|
|
12
|
-
const descriptionAttrs = getAttrs("description");
|
|
13
|
-
const successIconAttrs = getAttrs("successIcon");
|
|
14
|
-
const warningIconAttrs = getAttrs("warningIcon");
|
|
15
|
-
const errorIconAttrs = getAttrs("errorIcon");
|
|
16
|
-
const closeIconAttrs = getAttrs("closeIcon");
|
|
25
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
26
|
+
}
|
|
17
27
|
|
|
18
28
|
return {
|
|
29
|
+
...attrs,
|
|
19
30
|
config,
|
|
20
|
-
wrapperAttrs,
|
|
21
|
-
bodyAttrs,
|
|
22
|
-
contentAttrs,
|
|
23
|
-
labelAttrs,
|
|
24
|
-
descriptionAttrs,
|
|
25
|
-
successIconAttrs,
|
|
26
|
-
warningIconAttrs,
|
|
27
|
-
errorIconAttrs,
|
|
28
|
-
closeIconAttrs,
|
|
29
31
|
};
|
|
30
32
|
}
|
package/ui.text-notify/index.vue
CHANGED
|
@@ -83,7 +83,7 @@ import { merge } from "lodash-es";
|
|
|
83
83
|
import UIService, { globalComponentConfig, cx } from "../service.ui";
|
|
84
84
|
|
|
85
85
|
import { useLocale } from "../composable.locale";
|
|
86
|
-
import
|
|
86
|
+
import useAttrs from "./composables/attrs.composable";
|
|
87
87
|
|
|
88
88
|
import defaultConfig from "./configs/default.config";
|
|
89
89
|
import { UNotify, NOTIFY_TYPE, POSITION } from "./constants";
|
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.203",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -3331,6 +3331,7 @@
|
|
|
3331
3331
|
"description": "Use it to add something left.",
|
|
3332
3332
|
"bindings": [
|
|
3333
3333
|
{
|
|
3334
|
+
"type": "object",
|
|
3334
3335
|
"name": "file"
|
|
3335
3336
|
}
|
|
3336
3337
|
]
|
|
@@ -3341,6 +3342,7 @@
|
|
|
3341
3342
|
"description": "Use it to add something right.",
|
|
3342
3343
|
"bindings": [
|
|
3343
3344
|
{
|
|
3345
|
+
"type": "object",
|
|
3344
3346
|
"name": "file"
|
|
3345
3347
|
}
|
|
3346
3348
|
]
|