@lotte-innovate/ui-component-test 0.0.137 → 0.0.139
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/Datepicker/index.mjs +1 -1
- package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
- package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
- package/dist/lib/components/Modal/ModalAction.mjs +1 -1
- package/dist/lib/components/Modal/ModalCancel.mjs +1 -1
- package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
- package/dist/lib/components/Tree/index.mjs +2 -0
- package/dist/lib/components/Tree/index.mjs.map +1 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs +2 -0
- package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs.map +1 -0
- package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs +2 -0
- package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs.map +1 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/useDarkMode.js +1 -6
- package/dist/lib/utils/useDarkMode.mjs +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -27,11 +27,6 @@ export var useDarkMode = function (isRAxes) {
|
|
27
27
|
var _b = useState({
|
28
28
|
linescale: {},
|
29
29
|
}), defaultOptions = _b[0], setDefaultOptions = _b[1];
|
30
|
-
function checkDarkMode() {
|
31
|
-
if (!document)
|
32
|
-
return null;
|
33
|
-
return document.body.classList.contains('dark');
|
34
|
-
}
|
35
30
|
useEffect(function () {
|
36
31
|
var _a, _b;
|
37
32
|
setIsDarkMode((_a = document === null || document === void 0 ? void 0 : document.body) === null || _a === void 0 ? void 0 : _a.classList.contains('dark'));
|
@@ -52,6 +47,6 @@ export var useDarkMode = function (isRAxes) {
|
|
52
47
|
return function () {
|
53
48
|
mutationObserver.disconnect();
|
54
49
|
};
|
55
|
-
}, [
|
50
|
+
}, [darkmode, lightmode, setIsDarkMode]);
|
56
51
|
return [isDarkMode, defaultOptions];
|
57
52
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{slateA as o,slateDarkA as n}from"../color/alpha.mjs";import{useState as d,useEffect as c}from"react";var t=function(t){void 0===t&&(t=!1);var i={},r={};!0===t?(i={r:{grid:{color:o[8]}}},r={r:{grid:{color:n[8]},ticks:{backdropColor:"rgba(0, 0, 0, 0)"}}}):(i={x:{grid:{color:o[8]}},y:{grid:{color:o[8]}}},r={x:{grid:{color:n[8]}},y:{grid:{color:n[8]}}});var e=d(!1),l=e[0],u=e[1],a=d({linescale:{}}),s=a[0],m=a[1];return c((function(){var o,n;u(null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.classList.contains("dark")),m({linescale:(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.classList.contains("dark"))?r:i});var d=new MutationObserver((function(o){o.forEach((function(o){"class"===o.attributeName&&(u(null===document||void 0===document?void 0:document.body.classList.contains("dark")),m({linescale:(null===document||void 0===document?void 0:document.body.classList.contains("dark"))?r:i}))}))}));return document&&d.observe(null===document||void 0===document?void 0:document.body,{attributes:!0}),function(){d.disconnect()}}),[
|
2
|
+
import{slateA as o,slateDarkA as n}from"../color/alpha.mjs";import{useState as d,useEffect as c}from"react";var t=function(t){void 0===t&&(t=!1);var i={},r={};!0===t?(i={r:{grid:{color:o[8]}}},r={r:{grid:{color:n[8]},ticks:{backdropColor:"rgba(0, 0, 0, 0)"}}}):(i={x:{grid:{color:o[8]}},y:{grid:{color:o[8]}}},r={x:{grid:{color:n[8]}},y:{grid:{color:n[8]}}});var e=d(!1),l=e[0],u=e[1],a=d({linescale:{}}),s=a[0],m=a[1];return c((function(){var o,n;u(null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.classList.contains("dark")),m({linescale:(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.classList.contains("dark"))?r:i});var d=new MutationObserver((function(o){o.forEach((function(o){"class"===o.attributeName&&(u(null===document||void 0===document?void 0:document.body.classList.contains("dark")),m({linescale:(null===document||void 0===document?void 0:document.body.classList.contains("dark"))?r:i}))}))}));return document&&d.observe(null===document||void 0===document?void 0:document.body,{attributes:!0}),function(){d.disconnect()}}),[r,i,u]),[l,s]};export{t as useDarkMode};
|
3
3
|
//# sourceMappingURL=useDarkMode.mjs.map
|