@wmoney/ui-kit 1.0.4 → 1.0.6
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/README.md +29 -10
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/ThemeTokensProvider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12921,14 +12921,16 @@ function hx({ password: e }) {
|
|
|
12921
12921
|
//#endregion
|
|
12922
12922
|
//#region src/lib/ThemeTokensProvider.tsx
|
|
12923
12923
|
var gx = n(void 0), _x = () => o(gx), vx = ({ children: e, tokens: n }) => (t.useEffect(() => {
|
|
12924
|
-
if (n)
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12924
|
+
if (!n) return;
|
|
12925
|
+
let e = "wmoney-theme-tokens", t = document.getElementById(e);
|
|
12926
|
+
t || (t = document.createElement("style"), t.id = e, document.head.appendChild(t));
|
|
12927
|
+
let r = {
|
|
12928
|
+
light: ":root",
|
|
12929
|
+
dark: ".dark"
|
|
12930
|
+
}, i = Object.entries(n).map(([e, t]) => `${r[e] ?? ":root"} {\n${Object.entries(t).map(([e, t]) => ` --${e}: ${t};`).join("\n")}\n}`).join("\n");
|
|
12931
|
+
return t.textContent = i, () => {
|
|
12932
|
+
t?.remove();
|
|
12933
|
+
};
|
|
12932
12934
|
}, [n]), /* @__PURE__ */ h(gx.Provider, {
|
|
12933
12935
|
value: n,
|
|
12934
12936
|
children: e
|