@lotte-innovate/ui-component-test 0.2.66 → 0.2.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/Box/index.js +0 -1
- package/dist/lib/components/Box/index.mjs +0 -1
- package/dist/lib/components/Box/index.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.js +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbItem.js +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbList.js +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbList.mjs +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.js +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs +0 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -1
- package/dist/lib/components/Container/index.js +0 -1
- package/dist/lib/components/Container/index.mjs +0 -1
- package/dist/lib/components/Container/index.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.js +0 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs +0 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +1 -2
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs +1 -2
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +1 -2
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs +1 -2
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
- 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/Dialog/DialogTrigger.js +0 -1
- package/dist/lib/components/Dialog/DialogTrigger.mjs +0 -1
- package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +0 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs +0 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +1 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs +1 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +0 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs +0 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
- package/dist/lib/components/Editor/index.js +1 -20
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/components/Flex/index.js +0 -1
- package/dist/lib/components/Flex/index.mjs +0 -1
- package/dist/lib/components/Flex/index.mjs.map +1 -1
- package/dist/lib/components/Gnb/GnbLogo.js +0 -1
- package/dist/lib/components/Gnb/GnbLogo.mjs +0 -1
- package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
- package/dist/lib/components/GridLayout/index.js +0 -1
- package/dist/lib/components/GridLayout/index.mjs +0 -1
- package/dist/lib/components/GridLayout/index.mjs.map +1 -1
- package/dist/lib/components/HoverCard/HoverCardTrigger.js +0 -1
- package/dist/lib/components/HoverCard/HoverCardTrigger.mjs +0 -1
- package/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarMenu.js +0 -1
- package/dist/lib/components/Menubar/MenubarMenu.mjs +0 -1
- package/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSeparator.js +1 -2
- package/dist/lib/components/Menubar/MenubarSeparator.mjs +1 -2
- package/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSub.js +0 -1
- package/dist/lib/components/Menubar/MenubarSub.mjs +0 -1
- package/dist/lib/components/Menubar/MenubarSub.mjs.map +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/ModalFooter.js +0 -1
- package/dist/lib/components/Modal/ModalFooter.mjs +0 -1
- package/dist/lib/components/Modal/ModalFooter.mjs.map +1 -1
- package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
- package/dist/lib/components/Modal/ModalTrigger.js +0 -1
- package/dist/lib/components/Modal/ModalTrigger.mjs +0 -1
- package/dist/lib/components/Modal/ModalTrigger.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs +0 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +0 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs +0 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
- package/dist/lib/components/Popover/PopoverTrigger.js +0 -1
- package/dist/lib/components/Popover/PopoverTrigger.mjs +0 -1
- package/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +0 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs +0 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
- package/dist/lib/components/Timeline/TimelineConnector.js +0 -1
- package/dist/lib/components/Timeline/TimelineConnector.mjs +0 -1
- package/dist/lib/components/Timeline/TimelineConnector.mjs.map +1 -1
- package/dist/lib/components/Timeline/TimelineContent.js +0 -1
- package/dist/lib/components/Timeline/TimelineContent.mjs +0 -1
- package/dist/lib/components/Timeline/TimelineContent.mjs.map +1 -1
- package/dist/lib/components/Timeline/TimelineDescription.js +0 -1
- package/dist/lib/components/Timeline/TimelineDescription.mjs +0 -1
- package/dist/lib/components/Timeline/TimelineDescription.mjs.map +1 -1
- package/dist/lib/components/Timeline/TimelineHeader.js +0 -1
- package/dist/lib/components/Timeline/TimelineHeader.mjs +0 -1
- package/dist/lib/components/Timeline/TimelineHeader.mjs.map +1 -1
- package/dist/lib/components/Timeline/TimelineItem.js +0 -1
- package/dist/lib/components/Timeline/TimelineItem.mjs +0 -1
- package/dist/lib/components/Timeline/TimelineItem.mjs.map +1 -1
- package/dist/lib/components/Tree/index.js +0 -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 +12 -10
- package/dist/lib/utils/useDarkMode.mjs +1 -1
- package/dist/lib/utils/useWindowSize.js +3 -1
- package/dist/lib/utils/useWindowSize.mjs +1 -1
- package/dist/lib/utils/useWindowSize.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -23,28 +23,30 @@ export var useDarkMode = function (isRAxes) {
|
|
23
23
|
y: { grid: { color: slateDarkA[8] } },
|
24
24
|
};
|
25
25
|
}
|
26
|
-
var _a = useState(
|
26
|
+
var _a = useState(false), isDarkMode = _a[0], setIsDarkMode = _a[1];
|
27
27
|
var _b = useState({
|
28
28
|
linescale: {},
|
29
29
|
}), defaultOptions = _b[0], setDefaultOptions = _b[1];
|
30
|
-
function checkDarkMode() {
|
31
|
-
return document.body.classList.contains('dark');
|
32
|
-
}
|
33
30
|
useEffect(function () {
|
34
|
-
|
35
|
-
|
31
|
+
var _a, _b;
|
32
|
+
setIsDarkMode((_a = document === null || document === void 0 ? void 0 : document.body) === null || _a === void 0 ? void 0 : _a.classList.contains('dark'));
|
33
|
+
setDefaultOptions({
|
34
|
+
linescale: !((_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.classList.contains('dark')) ? lightmode : darkmode,
|
35
|
+
});
|
36
36
|
var mutationObserver = new MutationObserver(function (mutations) {
|
37
37
|
mutations.forEach(function (mutation) {
|
38
38
|
if (mutation.attributeName === 'class') {
|
39
|
-
setIsDarkMode(
|
40
|
-
setDefaultOptions({
|
39
|
+
setIsDarkMode(document === null || document === void 0 ? void 0 : document.body.classList.contains('dark'));
|
40
|
+
setDefaultOptions({
|
41
|
+
linescale: !(document === null || document === void 0 ? void 0 : document.body.classList.contains('dark')) ? lightmode : darkmode,
|
42
|
+
});
|
41
43
|
}
|
42
44
|
});
|
43
45
|
});
|
44
|
-
mutationObserver.observe(document.body, { attributes: true });
|
46
|
+
document && mutationObserver.observe(document === null || document === void 0 ? void 0 : document.body, { attributes: true });
|
45
47
|
return function () {
|
46
48
|
mutationObserver.disconnect();
|
47
49
|
};
|
48
|
-
}, []);
|
50
|
+
}, [darkmode, lightmode, setIsDarkMode]);
|
49
51
|
return [isDarkMode, defaultOptions];
|
50
52
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{slateA as
|
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
|
@@ -4,6 +4,8 @@ export function useWindowSize() {
|
|
4
4
|
var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];
|
5
5
|
useEffect(function () {
|
6
6
|
function handleResize() {
|
7
|
+
if (!window)
|
8
|
+
return;
|
7
9
|
var width = 130 + window.innerWidth * 0.15;
|
8
10
|
width = Math.max(width, MIN_SIZE);
|
9
11
|
width = Math.min(width, 300);
|
@@ -12,6 +14,6 @@ export function useWindowSize() {
|
|
12
14
|
window.addEventListener('resize', handleResize);
|
13
15
|
handleResize();
|
14
16
|
return function () { return window.removeEventListener('resize', handleResize); };
|
15
|
-
}, []);
|
17
|
+
}, [window]);
|
16
18
|
return size;
|
17
19
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{useState as n,useEffect as e}from"react";function
|
1
|
+
import{useState as n,useEffect as e}from"react";function i(){var i=n(250),r=i[0],t=i[1];return e((function(){function n(){if(window){var n=130+.15*window.innerWidth;n=Math.max(n,250),n=Math.min(n,300),t(n)}}return window.addEventListener("resize",n),n(),function(){return window.removeEventListener("resize",n)}}),[window]),r}export{i as useWindowSize};
|
2
2
|
//# sourceMappingURL=useWindowSize.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useWindowSize.mjs","sources":["../../lib/utils/useWindowSize.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nvar MIN_SIZE = 250;\nexport function useWindowSize() {\n var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];\n useEffect(function () {\n function handleResize() {\n var width = 130 + window.innerWidth * 0.15;\n width = Math.max(width, MIN_SIZE);\n width = Math.min(width, 300);\n setSize(width);\n }\n window.addEventListener('resize', handleResize);\n handleResize();\n return function () { return window.removeEventListener('resize', handleResize); };\n }, []);\n return size;\n}\n"],"names":["useWindowSize","_a","useState","size","setSize","useEffect","handleResize","
|
1
|
+
{"version":3,"file":"useWindowSize.mjs","sources":["../../lib/utils/useWindowSize.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nvar MIN_SIZE = 250;\nexport function useWindowSize() {\n var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];\n useEffect(function () {\n function handleResize() {\n if (!window)\n return;\n var width = 130 + window.innerWidth * 0.15;\n width = Math.max(width, MIN_SIZE);\n width = Math.min(width, 300);\n setSize(width);\n }\n window.addEventListener('resize', handleResize);\n handleResize();\n return function () { return window.removeEventListener('resize', handleResize); };\n }, [window]);\n return size;\n}\n"],"names":["useWindowSize","_a","useState","size","setSize","useEffect","handleResize","window","width","innerWidth","Math","max","min","addEventListener","removeEventListener"],"mappings":"gDAEO,SAASA,IACZ,IAAIC,EAAKC,EAFE,KAEkBC,EAAOF,EAAG,GAAIG,EAAUH,EAAG,GAcxD,OAbAI,GAAU,WACN,SAASC,IACL,GAAKC,OAAL,CAEA,IAAIC,EAAQ,IAA0B,IAApBD,OAAOE,WACzBD,EAAQE,KAAKC,IAAIH,EARd,KASHA,EAAQE,KAAKE,IAAIJ,EAAO,KACxBJ,EAAQI,EAJG,CAKd,CAGD,OAFAD,OAAOM,iBAAiB,SAAUP,GAClCA,IACO,WAAc,OAAOC,OAAOO,oBAAoB,SAAUR,GACzE,GAAO,CAACC,SACGJ,CACX"}
|