@lanaco/lnc-react-ui 4.0.3 → 4.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.
Files changed (66) 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/Chip.cjs +1 -1
  7. package/dist/Chip.js +10 -9
  8. package/dist/ColorInput.js +18 -18
  9. package/dist/ConfirmationForm.cjs +5 -5
  10. package/dist/ConfirmationForm.js +16 -16
  11. package/dist/DataView.cjs +1 -1
  12. package/dist/DataView.js +35 -35
  13. package/dist/DecimalInput.js +41 -41
  14. package/dist/DoubleRangeSlider.js +30 -30
  15. package/dist/DragAndDropFile.js +162 -162
  16. package/dist/DragDropFiles.js +29 -29
  17. package/dist/Drawer.js +46 -46
  18. package/dist/Dropdown.js +36 -36
  19. package/dist/DropdownItem.js +19 -19
  20. package/dist/DropdownLookup.js +34 -34
  21. package/dist/DropdownMenu.js +43 -43
  22. package/dist/FileInput.js +21 -21
  23. package/dist/FlexGridItem.js +13 -13
  24. package/dist/Grid.cjs +1 -2
  25. package/dist/Grid.js +36 -8
  26. package/dist/GridItem.cjs +1 -1
  27. package/dist/GridItem.js +27 -7
  28. package/dist/Icon.cjs +2 -2
  29. package/dist/Icon.js +5 -6
  30. package/dist/IconButton.cjs +5 -5
  31. package/dist/IconButton.js +24 -25
  32. package/dist/Kanban.js +446 -446
  33. package/dist/MenuItem.cjs +2 -2
  34. package/dist/MenuItem.js +59 -58
  35. package/dist/Modal.js +38 -38
  36. package/dist/MultiSelectDropdown.js +2 -2
  37. package/dist/MultiSelectDropdownLookup.js +2 -2
  38. package/dist/NestedDropdownItem.js +43 -43
  39. package/dist/NestedMenuItem.js +44 -44
  40. package/dist/NotificationContainer.cjs +2 -2
  41. package/dist/NotificationContainer.js +24 -23
  42. package/dist/NumberInput.js +12 -12
  43. package/dist/PageLayout.cjs +2 -2
  44. package/dist/PageLayout.js +18 -18
  45. package/dist/PasswordInput.js +40 -40
  46. package/dist/RadioGroup.js +11 -11
  47. package/dist/RadioInput.js +6 -6
  48. package/dist/RangeSlider.js +25 -25
  49. package/dist/SearchBar.js +73 -73
  50. package/dist/Sidebar.js +11 -11
  51. package/dist/SwipeableDrawer.js +16 -16
  52. package/dist/TabItem.js +25 -25
  53. package/dist/Tabs.js +32 -26
  54. package/dist/TextAreaInput.js +30 -30
  55. package/dist/TextInput.js +22 -22
  56. package/dist/ThemeProvider.js +83 -83
  57. package/dist/TimeInput.js +4 -4
  58. package/dist/Toggle.cjs +1 -1
  59. package/dist/Toggle.js +0 -1
  60. package/dist/TreeMenu.js +56 -56
  61. package/dist/style.css +1 -5
  62. package/package.json +1 -1
  63. package/bundle-visualization.html +0 -4842
  64. package/custom-addons/ThemeSelector.js +0 -111
  65. package/custom-addons/register.js +0 -16
  66. package/custom-addons/theme-selector.css +0 -17
package/dist/TreeMenu.js CHANGED
@@ -1,86 +1,86 @@
1
- import { jsxs as x, jsx as l } from "react/jsx-runtime";
2
- import t, { useRef as C } from "react";
1
+ import { jsxs as C, jsx as N } from "react/jsx-runtime";
2
+ import { forwardRef as D, useRef as Y, Children as l, isValidElement as M, cloneElement as u } from "react";
3
3
  import { P as s } from "./index-BYnWp42a.js";
4
- import { n as P } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
- const D = P.div`
4
+ import { n as G } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
+ const U = G.div`
6
6
  padding: 0.25rem;
7
- gap: ${(r) => r.itemsGap};
7
+ gap: ${(t) => t.itemsGap};
8
8
  display: flex;
9
9
  flex-direction: column;
10
- ${(r) => r.widthFitContent == !1 && "min-width: 12.5rem"};
10
+ ${(t) => t.widthFitContent == !1 && "min-width: 12.5rem"};
11
11
  height: 100%;
12
12
  justify-content: space-between;
13
13
  & > .start-menu-items-lnc,
14
14
  > .end-menu-items-lnc {
15
15
  display: flex;
16
16
  flex-direction: column;
17
- gap: ${(r) => r.itemsGap};
17
+ gap: ${(t) => t.itemsGap};
18
18
  }
19
- `, Y = t.forwardRef((r, n) => {
19
+ `, b = D((t, r) => {
20
20
  const {
21
- widthFitContent: N = !1,
22
- itemsGap: M = "0.25rem",
21
+ widthFitContent: I = !1,
22
+ itemsGap: S = "0.25rem",
23
23
  //----------------
24
- onItemSelected: f = () => {
24
+ onItemSelected: E = () => {
25
25
  },
26
26
  //----------------
27
- className: I = "",
28
- style: S = {},
29
- color: o = "primary",
30
- size: p = "small",
27
+ className: g = "",
28
+ style: j = {},
29
+ color: n = "primary",
30
+ size: o = "small",
31
31
  children: _,
32
- ...g
33
- } = r, u = C(), j = t.Children.map(_, (e, i) => {
34
- var a, m, E, T, y;
35
- if (t.isValidElement(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((a = e == null ? void 0 : e.type) == null ? void 0 : a.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "NESTED_ITEM"))
36
- return i == 0 && e.props.justifyToEnd !== !0 ? (e.props.ref && (u.current = n), t.cloneElement(e, {
37
- ref: n || u,
32
+ ...w
33
+ } = t, f = Y(), x = l.map(_, (e, T) => {
34
+ var p, a, m, i, y;
35
+ if (M(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((p = e == null ? void 0 : e.type) == null ? void 0 : p.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((a = e == null ? void 0 : e.type) == null ? void 0 : a.displayName) === "NESTED_ITEM"))
36
+ return T == 0 && e.props.justifyToEnd !== !0 ? (e.props.ref && (f.current = r), u(e, {
37
+ ref: r || f,
38
38
  //needed to focus on navigation
39
- color: o,
40
- size: p,
41
- onItemSelected: f
42
- })) : e.props.justifyToEnd !== !0 || e.props.__TYPE__ == "NESTED_ITEM" || ((E = e == null ? void 0 : e.type) == null ? void 0 : E.displayName) === "NESTED_ITEM" ? t.cloneElement(e, {
43
- color: o,
44
- size: p,
45
- onItemSelected: f
39
+ color: n,
40
+ size: o,
41
+ onItemSelected: E
42
+ })) : e.props.justifyToEnd !== !0 || e.props.__TYPE__ == "NESTED_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "NESTED_ITEM" ? u(e, {
43
+ color: n,
44
+ size: o,
45
+ onItemSelected: E
46
46
  }) : void 0;
47
- if (((T = e.props) == null ? void 0 : T.justifyToEnd) == !1 || !((y = e.props) != null && y.justifyToEnd))
47
+ if (((i = e.props) == null ? void 0 : i.justifyToEnd) == !1 || !((y = e.props) != null && y.justifyToEnd))
48
48
  return e;
49
- }), w = t.Children.map(_, (e, i) => {
50
- var a, m, E;
51
- if (t.isValidElement(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((a = e == null ? void 0 : e.type) == null ? void 0 : a.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "NESTED_ITEM") && e.props.justifyToEnd == !0)
52
- return i == 0 ? (e.props.ref && (u.current = n), t.cloneElement(e, {
53
- ref: n || u,
49
+ }), P = l.map(_, (e, T) => {
50
+ var p, a, m;
51
+ if (M(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((p = e == null ? void 0 : e.type) == null ? void 0 : p.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((a = e == null ? void 0 : e.type) == null ? void 0 : a.displayName) === "NESTED_ITEM") && e.props.justifyToEnd == !0)
52
+ return T == 0 ? (e.props.ref && (f.current = r), u(e, {
53
+ ref: r || f,
54
54
  //needed to focus on navigation
55
- color: e.props.color ? e.props.color : o,
56
- size: p,
57
- onItemSelected: f
58
- })) : t.cloneElement(e, {
59
- color: e.props.color ? e.props.color : o,
60
- size: p,
61
- onItemSelected: f
55
+ color: e.props.color ? e.props.color : n,
56
+ size: o,
57
+ onItemSelected: E
58
+ })) : u(e, {
59
+ color: e.props.color ? e.props.color : n,
60
+ size: o,
61
+ onItemSelected: E
62
62
  });
63
- if (((E = e.props) == null ? void 0 : E.justifyToEnd) == !0) return e;
63
+ if (((m = e.props) == null ? void 0 : m.justifyToEnd) == !0) return e;
64
64
  });
65
- return /* @__PURE__ */ x(
66
- D,
65
+ return /* @__PURE__ */ C(
66
+ U,
67
67
  {
68
- ref: n,
69
- widthFitContent: N,
70
- itemsGap: M,
71
- size: p,
72
- color: o,
73
- className: "lnc-ui-treemenu " + I,
74
- style: S,
75
- ...g,
68
+ ref: r,
69
+ widthFitContent: I,
70
+ itemsGap: S,
71
+ size: o,
72
+ color: n,
73
+ className: "lnc-ui-treemenu " + g,
74
+ style: j,
75
+ ...w,
76
76
  children: [
77
- /* @__PURE__ */ l("div", { className: "nested-item-lnc start-menu-items-lnc", children: j }),
78
- /* @__PURE__ */ l("div", { className: "nested-item-lnc end-menu-items-lnc", children: w })
77
+ /* @__PURE__ */ N("div", { className: "nested-item-lnc start-menu-items-lnc", children: x }),
78
+ /* @__PURE__ */ N("div", { className: "nested-item-lnc end-menu-items-lnc", children: P })
79
79
  ]
80
80
  }
81
81
  );
82
82
  });
83
- Y.propTypes = {
83
+ b.propTypes = {
84
84
  widthFitContent: s.bool,
85
85
  /**
86
86
  * Gap between Menu Items
@@ -104,5 +104,5 @@ Y.propTypes = {
104
104
  size: s.oneOf(["small", "medium", "large"])
105
105
  };
106
106
  export {
107
- Y as default
107
+ b as default
108
108
  };