vlite3 1.4.14 → 1.4.15
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { buildThemeVariables as k, buildThemeStyleBlock as
|
|
3
|
-
import { THEME_STYLES_KEY as
|
|
4
|
-
import { isDarkColor as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, useId as c, computed as o, provide as v, openBlock as i, createElementBlock as f, normalizeStyle as p, normalizeClass as C, createBlock as h, resolveDynamicComponent as y, withCtx as S, createTextVNode as b, toDisplayString as g, renderSlot as T } from "vue";
|
|
2
|
+
import { buildThemeVariables as k, buildThemeStyleBlock as B, buildCardOverrideStyles as _ } from "./themeVars.js";
|
|
3
|
+
import { THEME_STYLES_KEY as E } from "../../composables/useThemeStyles.js";
|
|
4
|
+
import { isDarkColor as x } from "../../utils/colorUtils.js";
|
|
5
|
+
const V = /* @__PURE__ */ m({
|
|
6
6
|
__name: "ThemeProvider",
|
|
7
7
|
props: {
|
|
8
8
|
bgColor: { default: void 0 },
|
|
@@ -14,38 +14,35 @@ const P = /* @__PURE__ */ p({
|
|
|
14
14
|
maxWidth: { default: void 0 },
|
|
15
15
|
rootClass: { default: void 0 }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const e =
|
|
19
|
-
() =>
|
|
20
|
-
),
|
|
21
|
-
() => e.bgColor ? _(e.bgColor,
|
|
17
|
+
setup(r) {
|
|
18
|
+
const e = r, t = `vlite-theme-provider-${c()}`, a = o(() => e.bgColor ? x(e.bgColor) : !1), l = o(() => k(e)), d = o(
|
|
19
|
+
() => B(l.value, t)
|
|
20
|
+
), s = o(
|
|
21
|
+
() => e.bgColor ? _(e.bgColor, a.value, `#${t}`) : ""
|
|
22
|
+
), n = o(
|
|
23
|
+
() => [d.value, s.value].filter(Boolean).join(`
|
|
24
|
+
`)
|
|
22
25
|
);
|
|
23
|
-
return
|
|
26
|
+
return v(E, l), (u, D) => (i(), f("div", {
|
|
24
27
|
id: t,
|
|
25
|
-
class:
|
|
28
|
+
class: C([
|
|
26
29
|
"vlite-theme-provider",
|
|
27
|
-
|
|
30
|
+
r.rootClass,
|
|
28
31
|
"transition-colors duration-300",
|
|
29
|
-
{ dark:
|
|
32
|
+
{ dark: a.value }
|
|
30
33
|
]),
|
|
31
|
-
style:
|
|
34
|
+
style: p(l.value)
|
|
32
35
|
}, [
|
|
33
|
-
(
|
|
34
|
-
default:
|
|
35
|
-
|
|
36
|
+
(i(), h(y("style"), null, {
|
|
37
|
+
default: S(() => [
|
|
38
|
+
b(g(n.value), 1)
|
|
36
39
|
]),
|
|
37
40
|
_: 1
|
|
38
41
|
})),
|
|
39
|
-
(
|
|
40
|
-
default: n(() => [
|
|
41
|
-
u(m(v.value), 1)
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
})),
|
|
45
|
-
g(f.$slots, "default")
|
|
42
|
+
T(u.$slots, "default")
|
|
46
43
|
], 6));
|
|
47
44
|
}
|
|
48
45
|
});
|
|
49
46
|
export {
|
|
50
|
-
|
|
47
|
+
V as default
|
|
51
48
|
};
|
|
@@ -351,7 +351,9 @@ function U(r, o) {
|
|
|
351
351
|
for (const [e, f] of Object.entries(r)) {
|
|
352
352
|
if (!e.startsWith("--") && e !== "font-size") continue;
|
|
353
353
|
const c = O(f);
|
|
354
|
-
c && l.push(
|
|
354
|
+
c && l.push(
|
|
355
|
+
c.includes("!important") ? ` ${e}: ${c};` : ` ${e}: ${c} !important;`
|
|
356
|
+
);
|
|
355
357
|
}
|
|
356
358
|
return l.length === 0 ? "" : `#${o} {
|
|
357
359
|
${l.join(`
|
package/package.json
CHANGED
|
File without changes
|