@lanaco/lnc-react-ui 4.0.3 → 4.0.5

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.
Files changed (61) hide show
  1. package/dist/Avatar.cjs +1 -1
  2. package/dist/Avatar.js +5 -6
  3. package/dist/Button.cjs +2 -2
  4. package/dist/Button.js +0 -1
  5. package/dist/CheckBoxInput.js +2 -2
  6. package/dist/ColorInput.js +18 -18
  7. package/dist/ConfirmationForm.cjs +5 -5
  8. package/dist/ConfirmationForm.js +16 -16
  9. package/dist/DataView.cjs +1 -1
  10. package/dist/DataView.js +35 -35
  11. package/dist/DecimalInput.js +41 -41
  12. package/dist/DoubleRangeSlider.js +30 -30
  13. package/dist/DragAndDropFile.js +162 -162
  14. package/dist/DragDropFiles.js +29 -29
  15. package/dist/Drawer.js +46 -46
  16. package/dist/Dropdown.js +36 -36
  17. package/dist/DropdownItem.js +19 -19
  18. package/dist/DropdownLookup.js +34 -34
  19. package/dist/DropdownMenu.js +43 -43
  20. package/dist/FileInput.js +21 -21
  21. package/dist/FlexGridItem.js +13 -13
  22. package/dist/Grid.cjs +1 -2
  23. package/dist/Grid.js +36 -8
  24. package/dist/GridItem.cjs +1 -1
  25. package/dist/GridItem.js +27 -7
  26. package/dist/Icon.cjs +2 -2
  27. package/dist/Icon.js +5 -6
  28. package/dist/IconButton.cjs +5 -5
  29. package/dist/IconButton.js +24 -25
  30. package/dist/Kanban.js +446 -446
  31. package/dist/MenuItem.js +33 -33
  32. package/dist/Modal.js +38 -38
  33. package/dist/MultiSelectDropdown.js +2 -2
  34. package/dist/MultiSelectDropdownLookup.js +2 -2
  35. package/dist/NestedDropdownItem.js +43 -43
  36. package/dist/NestedMenuItem.js +44 -44
  37. package/dist/NumberInput.js +12 -12
  38. package/dist/PageLayout.cjs +2 -2
  39. package/dist/PageLayout.js +18 -18
  40. package/dist/PasswordInput.js +40 -40
  41. package/dist/RadioGroup.js +11 -11
  42. package/dist/RadioInput.js +6 -6
  43. package/dist/RangeSlider.js +25 -25
  44. package/dist/SearchBar.js +73 -73
  45. package/dist/Sidebar.js +11 -11
  46. package/dist/SwipeableDrawer.js +16 -16
  47. package/dist/TabItem.js +25 -25
  48. package/dist/Tabs.js +32 -26
  49. package/dist/TextAreaInput.js +30 -30
  50. package/dist/TextInput.js +22 -22
  51. package/dist/ThemeProvider.js +83 -83
  52. package/dist/TimeInput.js +4 -4
  53. package/dist/Toggle.cjs +1 -1
  54. package/dist/Toggle.js +0 -1
  55. package/dist/TreeMenu.js +56 -56
  56. package/dist/style.css +1 -5
  57. package/package.json +1 -1
  58. package/bundle-visualization.html +0 -4842
  59. package/custom-addons/ThemeSelector.js +0 -111
  60. package/custom-addons/register.js +0 -16
  61. package/custom-addons/theme-selector.css +0 -17
package/dist/MenuItem.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as m, Fragment as V, jsxs as G } from "react/jsx-runtime";
2
- import H, { useRef as J, useState as Q, useEffect as W } from "react";
2
+ import { forwardRef as H, useRef as J, useState as Q, useEffect as W } from "react";
3
3
  import { P as o } from "./index-BYnWp42a.js";
4
4
  import { n as X } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
5
  import k from "./Icon.js";
@@ -78,7 +78,7 @@ const ee = X.div`
78
78
  )};
79
79
  `}
80
80
  }
81
- `, C = H.forwardRef((n, a) => {
81
+ `, C = H((n, a) => {
82
82
  const {
83
83
  value: g,
84
84
  active: c = null,
@@ -94,7 +94,7 @@ const ee = X.div`
94
94
  },
95
95
  onClick: w = () => {
96
96
  },
97
- onKeyDown: _ = () => {
97
+ onKeyDown: x = () => {
98
98
  },
99
99
  onMouseEnter: le = () => {
100
100
  },
@@ -105,58 +105,58 @@ const ee = X.div`
105
105
  onItemSelected: N = () => {
106
106
  },
107
107
  //----------------
108
- className: x = "",
109
- style: A = {},
110
- color: S = "primary",
111
- iconProps: T,
112
- __TYPE__: te = "MENU_ITEM",
108
+ className: A = "",
109
+ style: S = {},
110
+ color: T = "primary",
111
+ iconProps: _,
112
+ __TYPE__: se = "MENU_ITEM",
113
113
  children: O,
114
114
  ...P
115
- } = n, D = { theme: I(), color: S, style: A }, u = J(), [F, y] = Q(c ?? !1);
115
+ } = n, D = { theme: I(), color: T, style: S }, u = J(), [F, y] = Q(c ?? !1);
116
116
  W(() => {
117
117
  y(c);
118
118
  }, [c]);
119
119
  const j = (e) => {
120
120
  r == !1 && (d && f && f(), N(e, g)), w(w);
121
- }, R = (e) => {
122
- y(!0), p(e);
123
121
  }, B = (e) => {
124
- c == null && y(!1), $(e);
122
+ y(!0), p(e);
125
123
  }, K = (e) => {
126
- e.preventDefault(), e.key == "ArrowDown" ? h(a ? a.current : u.current) : e.key == "ArrowUp" ? b(a ? a.current : u.current) : (e.key == "Enter" || e.keyCode == 32) && r == !1 && (d && f && f(), N(e, g)), _(e);
124
+ c == null && y(!1), $(e);
125
+ }, R = (e) => {
126
+ e.preventDefault(), e.key == "ArrowDown" ? h(a ? a.current : u.current) : e.key == "ArrowUp" ? b(a ? a.current : u.current) : (e.key == "Enter" || e.keyCode == 32) && r == !1 && (d && f && f(), N(e, g)), x(e);
127
127
  }, h = (e) => {
128
128
  if (e != null && e.nextSibling) {
129
129
  let l = z(e);
130
130
  if (l != null && l.node && (l == null ? void 0 : l.type) == "item")
131
131
  l.node.focus();
132
132
  else if (l != null && l.node && (l == null ? void 0 : l.type) == "nested") {
133
- let s = U(l.node);
134
- s && s.focus();
135
- } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && h(e.parentElement);
136
- } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && h(e.parentElement);
133
+ let t = U(l.node);
134
+ t && t.focus();
135
+ } else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && h(e.parentElement);
136
+ } else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && h(e.parentElement);
137
137
  }, b = (e) => {
138
138
  if (e != null && e.previousSibling) {
139
139
  let l = L(e);
140
140
  if (l != null && l.node && (l == null ? void 0 : l.type) == "item")
141
141
  l.node.focus();
142
142
  else if (l != null && l.node && (l == null ? void 0 : l.type) == "nested") {
143
- let s = q(l.node);
144
- s && s.focus();
145
- } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && b(e.parentElement);
146
- } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && b(e.parentElement);
143
+ let t = q(l.node);
144
+ t && t.focus();
145
+ } else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && b(e.parentElement);
146
+ } else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && b(e.parentElement);
147
147
  }, z = (e) => {
148
148
  for (; e = e.nextSibling; ) {
149
- if (t(e, "menu-item-lnc"))
149
+ if (s(e, "menu-item-lnc"))
150
150
  return { node: e, type: "item" };
151
- if (t(e, "nested-item-lnc"))
151
+ if (s(e, "nested-item-lnc"))
152
152
  return { node: e, type: "nested" };
153
153
  }
154
154
  return null;
155
155
  }, L = (e) => {
156
156
  for (; e = e.previousSibling; ) {
157
- if (t(e, "menu-item-lnc"))
157
+ if (s(e, "menu-item-lnc"))
158
158
  return { node: e, type: "item" };
159
- if (t(e, "nested-item-lnc"))
159
+ if (s(e, "nested-item-lnc"))
160
160
  return { node: e, type: "nested" };
161
161
  }
162
162
  return null;
@@ -166,27 +166,27 @@ const ee = X.div`
166
166
  }, q = (e) => {
167
167
  var l;
168
168
  return (l = Array.from(e.querySelectorAll(".menu-item-lnc"))) == null ? void 0 : l.pop();
169
- }, t = (e, l) => {
170
- var s = " " + e.className + " ", Y = " " + l + " ";
171
- return s.indexOf(Y) != -1;
169
+ }, s = (e, l) => {
170
+ var t = " " + e.className + " ", Y = " " + l + " ";
171
+ return t.indexOf(Y) != -1;
172
172
  };
173
173
  return /* @__PURE__ */ m(V, { children: /* @__PURE__ */ G(
174
174
  ee,
175
175
  {
176
176
  ref: a || u,
177
- className: "menu-item-lnc " + (d ? "nested-menu-item-lnc " : "") + (M ? "spread-nested-item-lnc " : "") + x,
177
+ className: "menu-item-lnc " + (d ? "nested-menu-item-lnc " : "") + (M ? "spread-nested-item-lnc " : "") + A,
178
178
  ...D,
179
179
  disabled: r,
180
180
  tabIndex: 0,
181
- onKeyDown: K,
182
- onFocus: R,
183
- onBlur: B,
181
+ onKeyDown: R,
182
+ onFocus: B,
183
+ onBlur: K,
184
184
  onClick: j,
185
185
  isActive: F,
186
186
  showNested: M,
187
187
  ...P,
188
188
  children: [
189
- E && /* @__PURE__ */ m(k, { icon: E, className: "menu-icon-lnc", ...T }),
189
+ E && /* @__PURE__ */ m(k, { icon: E, className: "menu-icon-lnc", ..._ }),
190
190
  /* @__PURE__ */ m("div", { children: O }),
191
191
  d && /* @__PURE__ */ m(k, { icon: "angle-down", className: "sub-menu-icon-lnc" })
192
192
  ]
package/dist/Modal.js CHANGED
@@ -1,14 +1,14 @@
1
- import { jsx as t, Fragment as w, jsxs as S } from "react/jsx-runtime";
2
- import U, { useRef as W, useState as X, useImperativeHandle as V } from "react";
1
+ import { jsx as t, Fragment as L, jsxs as D } from "react/jsx-runtime";
2
+ import { forwardRef as U, useRef as W, useState as X, useImperativeHandle as V } from "react";
3
3
  import { P as o } from "./index-BYnWp42a.js";
4
- import { n as O } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
+ import { n as w } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
5
  import q from "./Icon.js";
6
- import { a as L } from "./utils-C52T57HO.js";
6
+ import { a as O } from "./utils-C52T57HO.js";
7
7
  import { r as J } from "./index--Kmch3aI.js";
8
8
  import { m as z } from "./motion-ecIGZGwI.js";
9
9
  import { u as K } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
10
- import { A as D } from "./index-BUChtubz.js";
11
- const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FULL" ? `calc(100dvh - ${h} - ${u})` : `calc(100dvh - ${h} - ${u} - ${a})` : r ? e == "FULL" ? `calc(100dvh - ${h})` : `calc(100dvh - ${h} - ${a})` : n ? e == "FULL" ? `calc(100dvh - ${u})` : `calc(100dvh - ${u} - ${a})` : e == "FULL" ? "100dvh" : `calc(100dvh - ${a})`, Y = (e) => e == "FULL" ? "100vw" : `calc(100vw - ${a})`, Z = (e, r, n) => e == "FULL" ? "0" : `${r ? "0" : "16px"} 0 ${n ? "0" : "16px"} 0`, P = O(z.div)`
10
+ import { A as R } from "./index-BUChtubz.js";
11
+ const f = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FULL" ? `calc(100dvh - ${h} - ${f})` : `calc(100dvh - ${h} - ${f} - ${a})` : r ? e == "FULL" ? `calc(100dvh - ${h})` : `calc(100dvh - ${h} - ${a})` : n ? e == "FULL" ? `calc(100dvh - ${f})` : `calc(100dvh - ${f} - ${a})` : e == "FULL" ? "100dvh" : `calc(100dvh - ${a})`, Y = (e) => e == "FULL" ? "100vw" : `calc(100vw - ${a})`, Z = (e, r, n) => e == "FULL" ? "0" : `${r ? "0" : "16px"} 0 ${n ? "0" : "16px"} 0`, P = w(z.div)`
12
12
  position: ${(e) => e.scrollOverlay == !0 ? "absolute" : "fixed"};
13
13
  top: 0;
14
14
  left: 0;
@@ -17,12 +17,12 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
17
17
  background: ${(e) => e.scrollOverlay === !0 ? "transparent" : e.overlayColor};
18
18
  z-index: ${(e) => e.zIndex};
19
19
  display: flex;
20
- `, ee = O(z.div)`
20
+ `, ee = w(z.div)`
21
21
  position: relative;
22
22
  width: 50%;
23
23
  background-color: white;
24
24
  ${(e) => e.scrollOverlay == !1 ? "position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);" : "height: fit-content; margin-right: auto; margin-left: auto;"}
25
- background-color: ${(e) => L(e.theme, "Modal", "default", "enabled", "bg")};
25
+ background-color: ${(e) => O(e.theme, "Modal", "default", "enabled", "bg")};
26
26
  z-index: ${(e) => e.zIndex};
27
27
  width: ${(e) => ne[e.size.toUpperCase()]};
28
28
  max-width: ${(e) => Y(e.size.toUpperCase())};
@@ -44,7 +44,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
44
44
  margin: 0;
45
45
  }
46
46
  & .lnc-modal-footer {
47
- max-height: ${u};
47
+ max-height: ${f};
48
48
  overflow: hidden;
49
49
  padding-top: 1rem;
50
50
  }
@@ -64,12 +64,12 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
64
64
  margin: ${(e) => Z(e.size, e.header, e.footer)};
65
65
  padding: 0 ${a} 0 ${a};
66
66
  }
67
- `, oe = O.div`
67
+ `, oe = w.div`
68
68
  position: absolute;
69
69
  cursor: pointer;
70
70
  top: 1.375rem;
71
71
  right: 1.375rem;
72
- color: ${(e) => L(
72
+ color: ${(e) => O(
73
73
  e.theme,
74
74
  "Modal",
75
75
  "primary",
@@ -87,7 +87,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
87
87
  }
88
88
 
89
89
  &:hover {
90
- background-color: ${(e) => L(
90
+ background-color: ${(e) => O(
91
91
  e.theme,
92
92
  "Modal",
93
93
  "primary",
@@ -97,7 +97,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
97
97
  )};
98
98
  }
99
99
  &:focus {
100
- background-color: ${(e) => L(
100
+ background-color: ${(e) => O(
101
101
  e.theme,
102
102
  "Modal",
103
103
  "primary",
@@ -106,7 +106,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
106
106
  "cancelBtnBgOpacity"
107
107
  )};
108
108
  }
109
- `, te = O(z.div)`
109
+ `, te = w(z.div)`
110
110
  display: ${(e) => e.scrollOverlay === !0 ? "block" : "none"};
111
111
  position: fixed;
112
112
  top: 0;
@@ -115,7 +115,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
115
115
  width: 100%;
116
116
  background-color: ${(e) => e.overlayColor};
117
117
  z-index: 3;
118
- `, re = U.forwardRef((e, r) => {
118
+ `, re = U((e, r) => {
119
119
  const {
120
120
  portalElement: n = document.body,
121
121
  isOpen: c = !1,
@@ -133,7 +133,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
133
133
  size: y = "fluid",
134
134
  clickOutsideToClose: $ = !0,
135
135
  className: v = "",
136
- style: _ = {},
136
+ style: G = {},
137
137
  overlayProps: M,
138
138
  overlayAnimation: k = {
139
139
  animate: { opacity: 1 },
@@ -153,14 +153,14 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
153
153
  },
154
154
  children: B,
155
155
  rest: T
156
- } = e, I = W(), [N, R] = X(c);
157
- let E = { theme: K(), size: y, zIndex: C, className: v, style: _ };
158
- const j = (f) => {
159
- f.target === f.currentTarget && $ && b(f);
156
+ } = e, I = W(), [N, E] = X(c);
157
+ let j = { theme: K(), size: y, zIndex: C, className: v, style: G };
158
+ const A = (u) => {
159
+ u.target === u.currentTarget && $ && b(u);
160
160
  };
161
161
  V(r, () => ({
162
162
  open() {
163
- G();
163
+ _();
164
164
  },
165
165
  close() {
166
166
  b();
@@ -169,24 +169,24 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
169
169
  return N;
170
170
  }
171
171
  }));
172
- const G = (f) => {
173
- R(!0), g(f);
174
- }, b = (f) => {
175
- R(!1), x(f);
172
+ const _ = (u) => {
173
+ E(!0), g(u);
174
+ }, b = (u) => {
175
+ E(!1), x(u);
176
176
  };
177
- return /* @__PURE__ */ t(w, { children: N && /* @__PURE__ */ t(w, { children: n ? /* @__PURE__ */ t(w, { children: J.createPortal(
177
+ return /* @__PURE__ */ t(L, { children: N && /* @__PURE__ */ t(L, { children: n ? /* @__PURE__ */ t(L, { children: J.createPortal(
178
178
  /* @__PURE__ */ t(
179
- A,
179
+ H,
180
180
  {
181
181
  ref: I,
182
182
  overlay: s,
183
183
  scrollOverlay: i,
184
- onClickOutsideModal: j,
184
+ onClickOutsideModal: A,
185
185
  overlayColor: m,
186
186
  overlayProps: M,
187
187
  overlayAnimation: k,
188
188
  modalAnimation: F,
189
- themeProps: E,
189
+ themeProps: j,
190
190
  showCloseButton: p,
191
191
  close: b,
192
192
  header: d,
@@ -198,17 +198,17 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
198
198
  ),
199
199
  n
200
200
  ) }) : /* @__PURE__ */ t(
201
- A,
201
+ H,
202
202
  {
203
203
  ref: I,
204
204
  overlay: s,
205
205
  scrollOverlay: i,
206
- onClickOutsideModal: j,
206
+ onClickOutsideModal: A,
207
207
  overlayColor: m,
208
208
  overlayProps: M,
209
209
  overlayAnimation: k,
210
210
  modalAnimation: F,
211
- themeProps: E,
211
+ themeProps: j,
212
212
  showCloseButton: p,
213
213
  close: b,
214
214
  header: d,
@@ -218,7 +218,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
218
218
  children: B
219
219
  }
220
220
  ) }) });
221
- }), A = U.forwardRef(
221
+ }), H = U(
222
222
  ({
223
223
  overlay: e,
224
224
  scrollOverlay: r,
@@ -235,7 +235,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
235
235
  isOpen: C,
236
236
  children: y,
237
237
  ...$
238
- }, v) => /* @__PURE__ */ t(D, { children: e ? /* @__PURE__ */ S(w, { children: [
238
+ }, v) => /* @__PURE__ */ t(R, { children: e ? /* @__PURE__ */ D(L, { children: [
239
239
  /* @__PURE__ */ t(
240
240
  te,
241
241
  {
@@ -257,7 +257,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
257
257
  ...d,
258
258
  ...l,
259
259
  children: /* @__PURE__ */ t(
260
- H,
260
+ S,
261
261
  {
262
262
  ref: v,
263
263
  themeProps: s,
@@ -274,7 +274,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
274
274
  }
275
275
  )
276
276
  ] }) : /* @__PURE__ */ t(
277
- H,
277
+ S,
278
278
  {
279
279
  ref: v,
280
280
  themeProps: s,
@@ -287,7 +287,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
287
287
  children: y
288
288
  }
289
289
  ) })
290
- ), H = U.forwardRef(
290
+ ), S = U(
291
291
  ({
292
292
  themeProps: e,
293
293
  scrollOverlay: r,
@@ -298,7 +298,7 @@ const u = "5rem", h = "3.8rem", a = "1.5rem", Q = (e, r, n) => r && n ? e == "FU
298
298
  footer: i,
299
299
  children: s,
300
300
  ...m
301
- }, p) => /* @__PURE__ */ t(D, { children: /* @__PURE__ */ S(
301
+ }, p) => /* @__PURE__ */ t(R, { children: /* @__PURE__ */ D(
302
302
  ee,
303
303
  {
304
304
  ref: p,
@@ -1,11 +1,11 @@
1
1
  import { jsx as O } from "react/jsx-runtime";
2
2
  import { P as e } from "./index-BYnWp42a.js";
3
- import y, { useCallback as h } from "react";
3
+ import { forwardRef as y, useCallback as h } from "react";
4
4
  import { a as M } from "./CustomStyles-BUSJ8bZt.js";
5
5
  import { d as S } from "./index-CNBqQrtK.js";
6
6
  import C from "./Dropdown.js";
7
7
  import { u as I } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
- const w = y.forwardRef((l, t) => {
8
+ const w = y((l, t) => {
9
9
  const {
10
10
  // options,
11
11
  styles: n,
@@ -1,11 +1,11 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { P as e } from "./index-BYnWp42a.js";
3
- import y, { useCallback as h } from "react";
3
+ import { forwardRef as y, useCallback as h } from "react";
4
4
  import { a as M } from "./CustomStyles-BUSJ8bZt.js";
5
5
  import { d as S } from "./index-CNBqQrtK.js";
6
6
  import C from "./DropdownLookup.js";
7
7
  import { u as I } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
- const T = y.forwardRef((l, t) => {
8
+ const T = y((l, t) => {
9
9
  const {
10
10
  // defaultOptions,
11
11
  // cacheOptions,
@@ -1,23 +1,23 @@
1
- import { jsxs as b, Fragment as l, jsx as m } from "react/jsx-runtime";
2
- import o, { useState as x } from "react";
1
+ import { jsxs as w, Fragment as p, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as b, useState as x, cloneElement as l, Children as P, isValidElement as O } from "react";
3
3
  import { P as t } from "./index-BYnWp42a.js";
4
- import { n as P } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
- import { a as O } from "./utils-C52T57HO.js";
6
- import { m as h } from "./motion-ecIGZGwI.js";
7
- import { u as D } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
- import { A as j } from "./index-BUChtubz.js";
9
- const Y = P(h.div)`
4
+ import { n as h } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
+ import { a as D } from "./utils-C52T57HO.js";
6
+ import { m as j } from "./motion-ecIGZGwI.js";
7
+ import { u as Y } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
+ import { A as C } from "./index-BUChtubz.js";
9
+ const z = h(j.div)`
10
10
  margin-left: 0.3rem;
11
11
  padding-left: 0.3rem;
12
- border-left: ${(r) => `2px solid ${O(
13
- r.theme,
12
+ border-left: ${(o) => `2px solid ${D(
13
+ o.theme,
14
14
  "MenuItem",
15
- r.color,
15
+ o.color,
16
16
  "focus",
17
17
  "background"
18
18
  )}`};
19
19
  border-radius: 2px;
20
- `, d = o.forwardRef((r, C) => {
20
+ `, d = b((o, A) => {
21
21
  const {
22
22
  __TYPE__: R = "NESTED_ITEM",
23
23
  item: f,
@@ -26,7 +26,7 @@ const Y = P(h.div)`
26
26
  },
27
27
  //--------------------
28
28
  defaultOpen: u = !1,
29
- animation: _ = {
29
+ animation: E = {
30
30
  animate: { opacity: 1, height: "auto" },
31
31
  exit: { opacity: 0, height: 0 },
32
32
  initial: { opacity: 0, height: 0 },
@@ -37,41 +37,41 @@ const Y = P(h.div)`
37
37
  height: { duration: 0.15 }
38
38
  }
39
39
  },
40
- className: E = "",
41
- style: y = {},
42
- color: n = "primary",
43
- size: a = "small",
44
- children: g,
45
- ...T
46
- } = r, N = D(), [s, I] = x(u), M = () => {
47
- I(!s);
48
- }, S = o.cloneElement(f, {
40
+ className: _ = "",
41
+ style: g = {},
42
+ color: r = "primary",
43
+ size: s = "small",
44
+ children: y,
45
+ ...N
46
+ } = o, T = Y(), [n, I] = x(u), M = l(f, {
49
47
  isNested: !0,
50
- showNested: s,
51
- toggleNested: M,
52
- color: n,
53
- size: a
54
- }), w = o.Children.map(g, (e, z) => {
55
- var i, p;
56
- return o.isValidElement(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((i = e == null ? void 0 : e.type) == null ? void 0 : i.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((p = e == null ? void 0 : e.type) == null ? void 0 : p.displayName) === "NESTED_ITEM") ? o.cloneElement(e, {
57
- color: e.props.color ? e.props.color : n,
58
- size: a,
48
+ showNested: n,
49
+ toggleNested: () => {
50
+ I(!n);
51
+ },
52
+ color: r,
53
+ size: s
54
+ }), S = P.map(y, (e, V) => {
55
+ var m, i;
56
+ return O(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((i = e == null ? void 0 : e.type) == null ? void 0 : i.displayName) === "NESTED_ITEM") ? l(e, {
57
+ color: e.props.color ? e.props.color : r,
58
+ size: s,
59
59
  onItemSelected: c
60
60
  }) : e;
61
61
  });
62
- return /* @__PURE__ */ b(l, { children: [
63
- /* @__PURE__ */ m(l, { children: S }),
64
- /* @__PURE__ */ m(j, { children: s && /* @__PURE__ */ m(
65
- Y,
62
+ return /* @__PURE__ */ w(p, { children: [
63
+ /* @__PURE__ */ a(p, { children: M }),
64
+ /* @__PURE__ */ a(C, { children: n && /* @__PURE__ */ a(
65
+ z,
66
66
  {
67
- ..._,
68
- theme: N,
69
- color: n,
70
- size: a,
71
- className: "nested-item-lnc " + E,
72
- style: y,
73
- ...T,
74
- children: w
67
+ ...E,
68
+ theme: T,
69
+ color: r,
70
+ size: s,
71
+ className: "nested-item-lnc " + _,
72
+ style: g,
73
+ ...N,
74
+ children: S
75
75
  }
76
76
  ) })
77
77
  ] });
@@ -1,15 +1,15 @@
1
- import { jsxs as O, Fragment as u, jsx as i } from "react/jsx-runtime";
2
- import n, { useState as P } from "react";
1
+ import { jsxs as x, Fragment as l, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as O, useState as P, cloneElement as u, Children as h, isValidElement as z } from "react";
3
3
  import { P as t } from "./index-BYnWp42a.js";
4
- import { n as h } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
- import { a as z } from "./utils-C52T57HO.js";
6
- import { m as $ } from "./motion-ecIGZGwI.js";
7
- import { u as j } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
- import { A as D } from "./index-BUChtubz.js";
9
- const Y = h($.div)`
4
+ import { n as $ } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
+ import { a as j } from "./utils-C52T57HO.js";
6
+ import { m as D } from "./motion-ecIGZGwI.js";
7
+ import { u as Y } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
+ import { A as C } from "./index-BUChtubz.js";
9
+ const A = $(D.div)`
10
10
  ${(o) => o.tuckIn == !0 && `margin-left: ${o.tuckInSize};`}
11
11
  ${(o) => o.tuckIn == !0 && `padding-left: ${o.tuckInSize};`}
12
- ${(o) => o.tuckIn == !0 && `border-left: 2px solid ${z(
12
+ ${(o) => o.tuckIn == !0 && `border-left: 2px solid ${j(
13
13
  o.theme,
14
14
  "MenuItem",
15
15
  o.color,
@@ -18,17 +18,17 @@ const Y = h($.div)`
18
18
  "backgroundOpacity"
19
19
  )};`}
20
20
  border-radius: 2px;
21
- `, c = n.forwardRef((o, p) => {
21
+ `, c = O((o, p) => {
22
22
  const {
23
23
  item: d,
24
24
  //------------------
25
25
  onItemSelected: f = () => {
26
26
  },
27
27
  //--------------------
28
- defaultOpen: _ = !1,
29
- tuckIn: E = !0,
30
- tuckInSize: y = "0.3rem",
31
- animation: g = {
28
+ defaultOpen: g = !1,
29
+ tuckIn: y = !0,
30
+ tuckInSize: E = "0.3rem",
31
+ animation: _ = {
32
32
  animate: { opacity: 1, height: "auto" },
33
33
  exit: { opacity: 0, height: 0 },
34
34
  initial: { opacity: 0, height: 0 },
@@ -40,46 +40,46 @@ const Y = h($.div)`
40
40
  }
41
41
  },
42
42
  className: I = "",
43
- style: T = {},
44
- color: a = "primary",
45
- size: s = "small",
46
- __TYPE__: C = "NESTED_ITEM",
47
- children: N,
43
+ style: N = {},
44
+ color: r = "primary",
45
+ size: a = "small",
46
+ __TYPE__: R = "NESTED_ITEM",
47
+ children: T,
48
48
  ...S
49
- } = o, k = j(), [r, M] = P(_), b = () => {
50
- M(!r);
51
- }, w = n.cloneElement(d, {
49
+ } = o, k = Y(), [n, M] = P(g), b = u(d, {
52
50
  isNested: !0,
53
- showNested: r,
54
- toggleNested: b,
55
- color: a,
56
- size: s
57
- }), x = n.Children.map(N, (e, R) => {
58
- var m, l;
59
- if (n.isValidElement(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((l = e == null ? void 0 : e.type) == null ? void 0 : l.displayName) === "NESTED_ITEM"))
60
- return n.cloneElement(e, {
61
- color: e.props.color ? e.props.color : a,
62
- size: s,
51
+ showNested: n,
52
+ toggleNested: () => {
53
+ M(!n);
54
+ },
55
+ color: r,
56
+ size: a
57
+ }), w = h.map(T, (e, V) => {
58
+ var i, m;
59
+ if (z(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((i = e == null ? void 0 : e.type) == null ? void 0 : i.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "NESTED_ITEM"))
60
+ return u(e, {
61
+ color: e.props.color ? e.props.color : r,
62
+ size: a,
63
63
  onItemSelected: f
64
64
  });
65
65
  });
66
- return /* @__PURE__ */ O(u, { children: [
67
- /* @__PURE__ */ i(u, { children: w }),
68
- /* @__PURE__ */ i(D, { children: r && /* @__PURE__ */ i(
69
- Y,
66
+ return /* @__PURE__ */ x(l, { children: [
67
+ /* @__PURE__ */ s(l, { children: b }),
68
+ /* @__PURE__ */ s(C, { children: n && /* @__PURE__ */ s(
69
+ A,
70
70
  {
71
71
  theme: k,
72
- tuckIn: E,
73
- tuckInSize: y,
74
- color: a,
75
- size: s,
72
+ tuckIn: y,
73
+ tuckInSize: E,
74
+ color: r,
75
+ size: a,
76
76
  className: "nested-item-lnc " + I,
77
- style: T,
77
+ style: N,
78
78
  ref: p,
79
- show: r,
80
- ...g,
79
+ show: n,
80
+ ..._,
81
81
  ...S,
82
- children: x
82
+ children: w
83
83
  }
84
84
  ) })
85
85
  ] });