@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.
Files changed (125) hide show
  1. package/dist/lib/components/Box/index.js +0 -1
  2. package/dist/lib/components/Box/index.mjs +0 -1
  3. package/dist/lib/components/Box/index.mjs.map +1 -1
  4. package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.js +0 -1
  5. package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs +0 -1
  6. package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -1
  7. package/dist/lib/components/Breadcrumb/BreadcrumbItem.js +0 -1
  8. package/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs +0 -1
  9. package/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
  10. package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +0 -1
  11. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +0 -1
  12. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  13. package/dist/lib/components/Breadcrumb/BreadcrumbList.js +0 -1
  14. package/dist/lib/components/Breadcrumb/BreadcrumbList.mjs +0 -1
  15. package/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -1
  16. package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +0 -1
  17. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +0 -1
  18. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  19. package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.js +0 -1
  20. package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs +0 -1
  21. package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -1
  22. package/dist/lib/components/Container/index.js +0 -1
  23. package/dist/lib/components/Container/index.mjs +0 -1
  24. package/dist/lib/components/Container/index.mjs.map +1 -1
  25. package/dist/lib/components/ContextMenu/ContextMenuGroup.js +0 -1
  26. package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs +0 -1
  27. package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
  28. package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +1 -2
  29. package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs +1 -2
  30. package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
  31. package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +1 -2
  32. package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs +1 -2
  33. package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
  34. package/dist/lib/components/Datepicker/index.mjs +1 -1
  35. package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
  36. package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
  37. package/dist/lib/components/Dialog/DialogTrigger.js +0 -1
  38. package/dist/lib/components/Dialog/DialogTrigger.mjs +0 -1
  39. package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
  40. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +0 -1
  41. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs +0 -1
  42. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
  43. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +1 -2
  44. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs +1 -2
  45. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
  46. package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +0 -1
  47. package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs +0 -1
  48. package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
  49. package/dist/lib/components/Editor/index.js +1 -20
  50. package/dist/lib/components/Editor/index.mjs +1 -1
  51. package/dist/lib/components/Flex/index.js +0 -1
  52. package/dist/lib/components/Flex/index.mjs +0 -1
  53. package/dist/lib/components/Flex/index.mjs.map +1 -1
  54. package/dist/lib/components/Gnb/GnbLogo.js +0 -1
  55. package/dist/lib/components/Gnb/GnbLogo.mjs +0 -1
  56. package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  57. package/dist/lib/components/GridLayout/index.js +0 -1
  58. package/dist/lib/components/GridLayout/index.mjs +0 -1
  59. package/dist/lib/components/GridLayout/index.mjs.map +1 -1
  60. package/dist/lib/components/HoverCard/HoverCardTrigger.js +0 -1
  61. package/dist/lib/components/HoverCard/HoverCardTrigger.mjs +0 -1
  62. package/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
  63. package/dist/lib/components/Menubar/MenubarMenu.js +0 -1
  64. package/dist/lib/components/Menubar/MenubarMenu.mjs +0 -1
  65. package/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
  66. package/dist/lib/components/Menubar/MenubarSeparator.js +1 -2
  67. package/dist/lib/components/Menubar/MenubarSeparator.mjs +1 -2
  68. package/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
  69. package/dist/lib/components/Menubar/MenubarSub.js +0 -1
  70. package/dist/lib/components/Menubar/MenubarSub.mjs +0 -1
  71. package/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
  72. package/dist/lib/components/Modal/ModalAction.mjs +1 -1
  73. package/dist/lib/components/Modal/ModalCancel.mjs +1 -1
  74. package/dist/lib/components/Modal/ModalFooter.js +0 -1
  75. package/dist/lib/components/Modal/ModalFooter.mjs +0 -1
  76. package/dist/lib/components/Modal/ModalFooter.mjs.map +1 -1
  77. package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
  78. package/dist/lib/components/Modal/ModalTrigger.js +0 -1
  79. package/dist/lib/components/Modal/ModalTrigger.mjs +0 -1
  80. package/dist/lib/components/Modal/ModalTrigger.mjs.map +1 -1
  81. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -1
  82. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs +0 -1
  83. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
  84. package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +0 -1
  85. package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs +0 -1
  86. package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
  87. package/dist/lib/components/Popover/PopoverTrigger.js +0 -1
  88. package/dist/lib/components/Popover/PopoverTrigger.mjs +0 -1
  89. package/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
  90. package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +0 -1
  91. package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs +0 -1
  92. package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
  93. package/dist/lib/components/Timeline/TimelineConnector.js +0 -1
  94. package/dist/lib/components/Timeline/TimelineConnector.mjs +0 -1
  95. package/dist/lib/components/Timeline/TimelineConnector.mjs.map +1 -1
  96. package/dist/lib/components/Timeline/TimelineContent.js +0 -1
  97. package/dist/lib/components/Timeline/TimelineContent.mjs +0 -1
  98. package/dist/lib/components/Timeline/TimelineContent.mjs.map +1 -1
  99. package/dist/lib/components/Timeline/TimelineDescription.js +0 -1
  100. package/dist/lib/components/Timeline/TimelineDescription.mjs +0 -1
  101. package/dist/lib/components/Timeline/TimelineDescription.mjs.map +1 -1
  102. package/dist/lib/components/Timeline/TimelineHeader.js +0 -1
  103. package/dist/lib/components/Timeline/TimelineHeader.mjs +0 -1
  104. package/dist/lib/components/Timeline/TimelineHeader.mjs.map +1 -1
  105. package/dist/lib/components/Timeline/TimelineItem.js +0 -1
  106. package/dist/lib/components/Timeline/TimelineItem.mjs +0 -1
  107. package/dist/lib/components/Timeline/TimelineItem.mjs.map +1 -1
  108. package/dist/lib/components/Tree/index.js +0 -1
  109. package/dist/lib/components/Tree/index.mjs +2 -0
  110. package/dist/lib/components/Tree/index.mjs.map +1 -0
  111. package/dist/lib/components/index.d.ts +1 -0
  112. package/dist/lib/components/index.js +2 -0
  113. package/dist/lib/index.mjs +1 -1
  114. package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs +2 -0
  115. package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs.map +1 -0
  116. package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs +2 -0
  117. package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs.map +1 -0
  118. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  119. package/dist/lib/utils/useDarkMode.js +12 -10
  120. package/dist/lib/utils/useDarkMode.mjs +1 -1
  121. package/dist/lib/utils/useWindowSize.js +3 -1
  122. package/dist/lib/utils/useWindowSize.mjs +1 -1
  123. package/dist/lib/utils/useWindowSize.mjs.map +1 -1
  124. package/dist/tsconfig.tsbuildinfo +1 -1
  125. 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(checkDarkMode()), isDarkMode = _a[0], setIsDarkMode = _a[1];
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
- setIsDarkMode(checkDarkMode());
35
- setDefaultOptions({ linescale: !checkDarkMode() ? lightmode : darkmode });
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(checkDarkMode());
40
- setDefaultOptions({ linescale: !checkDarkMode() ? lightmode : darkmode });
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 r,slateDarkA as o}from"../color/alpha.mjs";import{useState as c,useEffect as t}from"react";var n=function(n){void 0===n&&(n=!1);var i={},e={};!0===n?(i={r:{grid:{color:r[8]}}},e={r:{grid:{color:o[8]},ticks:{backdropColor:"rgba(0, 0, 0, 0)"}}}):(i={x:{grid:{color:r[8]}},y:{grid:{color:r[8]}}},e={x:{grid:{color:o[8]}},y:{grid:{color:o[8]}}});var a=c(b()),l=a[0],s=a[1],d=c({linescale:{}}),u=d[0],f=d[1];function b(){return document.body.classList.contains("dark")}return t((function(){s(b()),f({linescale:b()?e:i});var r=new MutationObserver((function(r){r.forEach((function(r){"class"===r.attributeName&&(s(b()),f({linescale:b()?e:i}))}))}));return r.observe(document.body,{attributes:!0}),function(){r.disconnect()}}),[]),[l,u]};export{n as useDarkMode};
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 r(){var r=n(250),t=r[0],i=r[1];return e((function(){function n(){var n=130+.15*window.innerWidth;n=Math.max(n,250),n=Math.min(n,300),i(n)}return window.addEventListener("resize",n),n(),function(){return window.removeEventListener("resize",n)}}),[]),t}export{r as useWindowSize};
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","width","window","innerWidth","Math","max","min","addEventListener","removeEventListener"],"mappings":"gDAEO,SAASA,IACZ,IAAIC,EAAKC,EAFE,KAEkBC,EAAOF,EAAG,GAAIG,EAAUH,EAAG,GAYxD,OAXAI,GAAU,WACN,SAASC,IACL,IAAIC,EAAQ,IAA0B,IAApBC,OAAOC,WACzBF,EAAQG,KAAKC,IAAIJ,EANd,KAOHA,EAAQG,KAAKE,IAAIL,EAAO,KACxBH,EAAQG,EACX,CAGD,OAFAC,OAAOK,iBAAiB,SAAUP,GAClCA,IACO,WAAc,OAAOE,OAAOM,oBAAoB,SAAUR,GACpE,GAAE,IACIH,CACX"}
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"}