@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.
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +5 -6
- package/dist/Button.cjs +2 -2
- package/dist/Button.js +0 -1
- package/dist/CheckBoxInput.js +2 -2
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +10 -9
- package/dist/ColorInput.js +18 -18
- package/dist/ConfirmationForm.cjs +5 -5
- package/dist/ConfirmationForm.js +16 -16
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +35 -35
- package/dist/DecimalInput.js +41 -41
- package/dist/DoubleRangeSlider.js +30 -30
- package/dist/DragAndDropFile.js +162 -162
- package/dist/DragDropFiles.js +29 -29
- package/dist/Drawer.js +46 -46
- package/dist/Dropdown.js +36 -36
- package/dist/DropdownItem.js +19 -19
- package/dist/DropdownLookup.js +34 -34
- package/dist/DropdownMenu.js +43 -43
- package/dist/FileInput.js +21 -21
- package/dist/FlexGridItem.js +13 -13
- package/dist/Grid.cjs +1 -2
- package/dist/Grid.js +36 -8
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +27 -7
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +5 -6
- package/dist/IconButton.cjs +5 -5
- package/dist/IconButton.js +24 -25
- package/dist/Kanban.js +446 -446
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.js +59 -58
- package/dist/Modal.js +38 -38
- package/dist/MultiSelectDropdown.js +2 -2
- package/dist/MultiSelectDropdownLookup.js +2 -2
- package/dist/NestedDropdownItem.js +43 -43
- package/dist/NestedMenuItem.js +44 -44
- package/dist/NotificationContainer.cjs +2 -2
- package/dist/NotificationContainer.js +24 -23
- package/dist/NumberInput.js +12 -12
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +18 -18
- package/dist/PasswordInput.js +40 -40
- package/dist/RadioGroup.js +11 -11
- package/dist/RadioInput.js +6 -6
- package/dist/RangeSlider.js +25 -25
- package/dist/SearchBar.js +73 -73
- package/dist/Sidebar.js +11 -11
- package/dist/SwipeableDrawer.js +16 -16
- package/dist/TabItem.js +25 -25
- package/dist/Tabs.js +32 -26
- package/dist/TextAreaInput.js +30 -30
- package/dist/TextInput.js +22 -22
- package/dist/ThemeProvider.js +83 -83
- package/dist/TimeInput.js +4 -4
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +0 -1
- package/dist/TreeMenu.js +56 -56
- package/dist/style.css +1 -5
- package/package.json +1 -1
- package/bundle-visualization.html +0 -4842
- package/custom-addons/ThemeSelector.js +0 -111
- package/custom-addons/register.js +0 -16
- package/custom-addons/theme-selector.css +0 -17
package/dist/TreeMenu.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
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
|
|
5
|
-
const
|
|
4
|
+
import { n as G } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
const U = G.div`
|
|
6
6
|
padding: 0.25rem;
|
|
7
|
-
gap: ${(
|
|
7
|
+
gap: ${(t) => t.itemsGap};
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
|
-
${(
|
|
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: ${(
|
|
17
|
+
gap: ${(t) => t.itemsGap};
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`, b = D((t, r) => {
|
|
20
20
|
const {
|
|
21
|
-
widthFitContent:
|
|
22
|
-
itemsGap:
|
|
21
|
+
widthFitContent: I = !1,
|
|
22
|
+
itemsGap: S = "0.25rem",
|
|
23
23
|
//----------------
|
|
24
|
-
onItemSelected:
|
|
24
|
+
onItemSelected: E = () => {
|
|
25
25
|
},
|
|
26
26
|
//----------------
|
|
27
|
-
className:
|
|
28
|
-
style:
|
|
29
|
-
color:
|
|
30
|
-
size:
|
|
27
|
+
className: g = "",
|
|
28
|
+
style: j = {},
|
|
29
|
+
color: n = "primary",
|
|
30
|
+
size: o = "small",
|
|
31
31
|
children: _,
|
|
32
|
-
...
|
|
33
|
-
} =
|
|
34
|
-
var a, m,
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
37
|
-
ref:
|
|
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:
|
|
40
|
-
size:
|
|
41
|
-
onItemSelected:
|
|
42
|
-
})) : e.props.justifyToEnd !== !0 || e.props.__TYPE__ == "NESTED_ITEM" || ((
|
|
43
|
-
color:
|
|
44
|
-
size:
|
|
45
|
-
onItemSelected:
|
|
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 (((
|
|
47
|
+
if (((i = e.props) == null ? void 0 : i.justifyToEnd) == !1 || !((y = e.props) != null && y.justifyToEnd))
|
|
48
48
|
return e;
|
|
49
|
-
}),
|
|
50
|
-
var a, m
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
53
|
-
ref:
|
|
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 :
|
|
56
|
-
size:
|
|
57
|
-
onItemSelected:
|
|
58
|
-
})) :
|
|
59
|
-
color: e.props.color ? e.props.color :
|
|
60
|
-
size:
|
|
61
|
-
onItemSelected:
|
|
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 (((
|
|
63
|
+
if (((m = e.props) == null ? void 0 : m.justifyToEnd) == !0) return e;
|
|
64
64
|
});
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
return /* @__PURE__ */ C(
|
|
66
|
+
U,
|
|
67
67
|
{
|
|
68
|
-
ref:
|
|
69
|
-
widthFitContent:
|
|
70
|
-
itemsGap:
|
|
71
|
-
size:
|
|
72
|
-
color:
|
|
73
|
-
className: "lnc-ui-treemenu " +
|
|
74
|
-
style:
|
|
75
|
-
...
|
|
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__ */
|
|
78
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
107
|
+
b as default
|
|
108
108
|
};
|