mediacube-ui-v2 0.0.290 → 0.0.291
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/dist/composables/useTheme.js +11 -40
- package/dist/composables/useTheme2.js +10 -36
- package/dist/index.js +22 -21
- package/dist/types/composables/useTheme.d.ts +138 -6
- package/package.json +1 -1
|
@@ -1,43 +1,14 @@
|
|
|
1
|
-
import { inject as m } from "vue";
|
|
2
|
-
import { Colors as
|
|
3
|
-
import { UiThemes as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
get() {
|
|
12
|
-
return e?.colors?.value || c;
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
components: {
|
|
16
|
-
enumerable: !0,
|
|
17
|
-
get() {
|
|
18
|
-
return e.theme ? (
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
e?.themes?.value?.[e.theme]?.components ?? n.light.components
|
|
21
|
-
) : n.light.components;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
component: {
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
get() {
|
|
27
|
-
const t = e.theme ? (
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
e?.themes?.value?.[e.theme]?.components ?? n.light.components
|
|
30
|
-
) : n.light.components;
|
|
31
|
-
return o && t?.[o] ? t[o] : {};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
function i(o) {
|
|
38
|
-
const e = m("dsOptions", {}), t = o ?? "";
|
|
39
|
-
return r.has(t) || r.set(t, h(t, e)), r.get(t);
|
|
1
|
+
import { inject as s, reactive as m } from "vue";
|
|
2
|
+
import { Colors as r } from "../types/styles/Colors.js";
|
|
3
|
+
import { UiThemes as c } from "../types/styles/ColorTheme.js";
|
|
4
|
+
function f(t) {
|
|
5
|
+
const o = s("dsOptions", {}), e = o.theme ? o.themes?.[o.theme]?.components : c.light.components, n = t ? e[t] : {};
|
|
6
|
+
return m({
|
|
7
|
+
colors: o.colors || r,
|
|
8
|
+
components: e,
|
|
9
|
+
component: n
|
|
10
|
+
});
|
|
40
11
|
}
|
|
41
12
|
export {
|
|
42
|
-
|
|
13
|
+
f as useTheme
|
|
43
14
|
};
|
|
@@ -1,40 +1,14 @@
|
|
|
1
|
-
import { inject as m } from "vue";
|
|
2
|
-
import { Colors as
|
|
3
|
-
import { UiThemes as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
colors:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return e?.colors?.value || c;
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
components: {
|
|
14
|
-
enumerable: !0,
|
|
15
|
-
get() {
|
|
16
|
-
return e.theme ? (
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
e?.themes?.value?.[e.theme]?.components ?? n.light.components
|
|
19
|
-
) : n.light.components;
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
component: {
|
|
23
|
-
enumerable: !0,
|
|
24
|
-
get() {
|
|
25
|
-
const t = e.theme ? (
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
e?.themes?.value?.[e.theme]?.components ?? n.light.components
|
|
28
|
-
) : n.light.components;
|
|
29
|
-
return o && t?.[o] ? t[o] : {};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { inject as s, reactive as m } from "vue";
|
|
2
|
+
import { Colors as r } from "../types/styles/Colors.js";
|
|
3
|
+
import { UiThemes as c } from "../types/styles/ColorTheme.js";
|
|
4
|
+
function f(t) {
|
|
5
|
+
const o = s("dsOptions", {}), e = o.theme ? o.themes?.[o.theme]?.components : c.light.components, n = t ? e[t] : {};
|
|
6
|
+
return m({
|
|
7
|
+
colors: o.colors || r,
|
|
8
|
+
components: e,
|
|
9
|
+
component: n
|
|
32
10
|
});
|
|
33
11
|
}
|
|
34
|
-
function i(o) {
|
|
35
|
-
const e = m("dsOptions", {}), t = o ?? "";
|
|
36
|
-
return r.has(t) || r.set(t, h(t, e)), r.get(t);
|
|
37
|
-
}
|
|
38
12
|
export {
|
|
39
|
-
|
|
13
|
+
f as useTheme
|
|
40
14
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const o = {
|
|
1
|
+
import { setStoredAppContext as s } from "./storedAppContext.js";
|
|
2
|
+
import { Themes as l } from "./enums/Themes2.js";
|
|
3
|
+
import { UiThemes as a, ThemesColors as h } from "./types/styles/ColorTheme.js";
|
|
4
|
+
import c from "./assets/img/no_user.png.js";
|
|
5
|
+
import { useHelper as d } from "./composables/useHelper2.js";
|
|
6
|
+
import { createProxy as r } from "./utils/proxy2.js";
|
|
7
|
+
const n = d(), C = {
|
|
8
|
+
install(o, e = {}) {
|
|
9
|
+
const t = {
|
|
11
10
|
drawerComponents: {},
|
|
12
11
|
modalComponents: {},
|
|
13
12
|
toasts: {},
|
|
14
|
-
defaultAvatar:
|
|
15
|
-
colors:
|
|
16
|
-
themes:
|
|
17
|
-
theme:
|
|
13
|
+
defaultAvatar: c,
|
|
14
|
+
colors: h,
|
|
15
|
+
themes: a,
|
|
16
|
+
theme: l.Light,
|
|
18
17
|
meta: {
|
|
19
18
|
router_push: null
|
|
20
19
|
}
|
|
21
|
-
}
|
|
22
|
-
|
|
20
|
+
};
|
|
21
|
+
n.deepMerge(t.themes, e.themes);
|
|
22
|
+
const m = {
|
|
23
|
+
...t,
|
|
23
24
|
...e,
|
|
24
|
-
colors: e.colors ?
|
|
25
|
-
themes:
|
|
26
|
-
meta: e.meta ?
|
|
25
|
+
colors: e.colors ? r(t.colors, e.colors) : t.colors,
|
|
26
|
+
themes: e.themes ? r(t.themes, e.themes) : t.themes,
|
|
27
|
+
meta: e.meta ? r(t.meta, e.meta) : t.meta
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
+
o.config.globalProperties.$dsOptions = m, o.provide("dsOptions", m), s(o._context ?? null);
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
C as default
|
|
33
34
|
};
|
|
@@ -1,7 +1,139 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare function useTheme(component?: string): {
|
|
2
|
+
colors: Record<string, string> | {
|
|
3
|
+
main: string;
|
|
4
|
+
purple: string;
|
|
5
|
+
"hover-purple": string;
|
|
6
|
+
"light-purple": string;
|
|
7
|
+
"bg-purple": string;
|
|
8
|
+
"lighter-purple": string;
|
|
9
|
+
black: string;
|
|
10
|
+
"outline-light": string;
|
|
11
|
+
"dark-gray": string;
|
|
12
|
+
gray: string;
|
|
13
|
+
"outline-gray": string;
|
|
14
|
+
"hover-gray": string;
|
|
15
|
+
"light-gray": string;
|
|
16
|
+
"bg-gray": string;
|
|
17
|
+
white: string;
|
|
18
|
+
"hover-blue": string;
|
|
19
|
+
blue: string;
|
|
20
|
+
"light-blue": string;
|
|
21
|
+
"lighter-blue": string;
|
|
22
|
+
"dark-orange": string;
|
|
23
|
+
orange: string;
|
|
24
|
+
yellow: string;
|
|
25
|
+
"dark-red": string;
|
|
26
|
+
red: string;
|
|
27
|
+
"bright-pink": string;
|
|
28
|
+
"pale-pink": string;
|
|
29
|
+
"dark-green": string;
|
|
30
|
+
green: string;
|
|
31
|
+
toxic: string;
|
|
32
|
+
ultraviolet: string;
|
|
33
|
+
pinkish: string;
|
|
34
|
+
azure: string;
|
|
35
|
+
turquoise: string;
|
|
36
|
+
"darken-turquoise": string;
|
|
37
|
+
transparent: string;
|
|
38
|
+
};
|
|
39
|
+
components: {
|
|
40
|
+
badge: {
|
|
41
|
+
variation: string;
|
|
42
|
+
};
|
|
43
|
+
button: {
|
|
44
|
+
variation: string;
|
|
45
|
+
};
|
|
46
|
+
chip: {
|
|
47
|
+
variation: string;
|
|
48
|
+
textColor: string;
|
|
49
|
+
};
|
|
50
|
+
cropper: {
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
53
|
+
datepicker: {
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
draggable: {
|
|
57
|
+
variation: string;
|
|
58
|
+
};
|
|
59
|
+
checkbox: {
|
|
60
|
+
color: string;
|
|
61
|
+
};
|
|
62
|
+
radio: {
|
|
63
|
+
color: string;
|
|
64
|
+
};
|
|
65
|
+
range: {
|
|
66
|
+
color: string;
|
|
67
|
+
};
|
|
68
|
+
select: {
|
|
69
|
+
color: string;
|
|
70
|
+
selected: string;
|
|
71
|
+
};
|
|
72
|
+
fieldText: {
|
|
73
|
+
color: string;
|
|
74
|
+
};
|
|
75
|
+
fieldToggle: {
|
|
76
|
+
color: string;
|
|
77
|
+
bg: string;
|
|
78
|
+
};
|
|
79
|
+
bottomLoader: {
|
|
80
|
+
border: string;
|
|
81
|
+
};
|
|
82
|
+
noData: {
|
|
83
|
+
link: string;
|
|
84
|
+
};
|
|
85
|
+
notification: {
|
|
86
|
+
variation: string;
|
|
87
|
+
};
|
|
88
|
+
progress: {
|
|
89
|
+
color: string;
|
|
90
|
+
helpText: string;
|
|
91
|
+
};
|
|
92
|
+
separator: {
|
|
93
|
+
color: string;
|
|
94
|
+
};
|
|
95
|
+
spinDigit: {
|
|
96
|
+
color: string;
|
|
97
|
+
};
|
|
98
|
+
spinNumber: {
|
|
99
|
+
color: string;
|
|
100
|
+
};
|
|
101
|
+
title: {
|
|
102
|
+
color: string;
|
|
103
|
+
};
|
|
104
|
+
tooltip: {
|
|
105
|
+
color: string;
|
|
106
|
+
textColor: string;
|
|
107
|
+
};
|
|
108
|
+
dropdown: {
|
|
109
|
+
itemColor: string;
|
|
110
|
+
};
|
|
111
|
+
filter: {
|
|
112
|
+
color: string;
|
|
113
|
+
chipColor: string;
|
|
114
|
+
button: string;
|
|
115
|
+
};
|
|
116
|
+
overlay: {
|
|
117
|
+
bg: string;
|
|
118
|
+
border: string;
|
|
119
|
+
};
|
|
120
|
+
sidebar: {
|
|
121
|
+
chip: string;
|
|
122
|
+
activeLink: string;
|
|
123
|
+
};
|
|
124
|
+
tab: {
|
|
125
|
+
count: string;
|
|
126
|
+
};
|
|
127
|
+
tabs: {
|
|
128
|
+
color: string;
|
|
129
|
+
accentColor: string;
|
|
130
|
+
};
|
|
131
|
+
tableCard: {
|
|
132
|
+
backLink: string;
|
|
133
|
+
};
|
|
134
|
+
toast: {
|
|
135
|
+
variation: string;
|
|
136
|
+
};
|
|
137
|
+
} | undefined;
|
|
138
|
+
component: any;
|
|
5
139
|
};
|
|
6
|
-
export declare function useTheme(component?: string): ThemeReactive;
|
|
7
|
-
export {};
|