@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/DragDropFiles.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as t, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
-
import G,
|
|
2
|
+
import { forwardRef as G, useState as M, useEffect as U, useCallback as u } from "react";
|
|
3
3
|
import { P as e } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as V } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { a as
|
|
8
|
-
import
|
|
5
|
+
import E from "./DragAndDropFile.js";
|
|
6
|
+
import W from "./UploadedFile.js";
|
|
7
|
+
import { a as q, b as H } from "./utils-C52T57HO.js";
|
|
8
|
+
import J from "./FlexGrid.js";
|
|
9
9
|
import h from "./FlexGridItem.js";
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
10
|
+
import { u as K } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
11
|
+
const L = V.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
gap: 1rem;
|
|
15
15
|
|
|
16
|
-
border: ${(n) => `1px solid ${
|
|
16
|
+
border: ${(n) => `1px solid ${q(
|
|
17
17
|
n.theme,
|
|
18
18
|
"DragDropFiles",
|
|
19
19
|
n.color,
|
|
20
20
|
"enabled",
|
|
21
21
|
"border"
|
|
22
22
|
)}`};
|
|
23
|
-
border-radius: ${(n) =>
|
|
23
|
+
border-radius: ${(n) => H(n.theme, "regular")};
|
|
24
24
|
padding: 1.25rem 2.5rem;
|
|
25
25
|
|
|
26
26
|
& .file-item-lnc {
|
|
27
27
|
padding: 0.5rem 0.813rem;
|
|
28
28
|
height: 100%;
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`, Q = G((n, D) => {
|
|
31
31
|
const {
|
|
32
32
|
id: y = "",
|
|
33
33
|
disabled: b = !1,
|
|
@@ -49,37 +49,37 @@ const K = V.div`
|
|
|
49
49
|
},
|
|
50
50
|
onDropAccepted: f = () => {
|
|
51
51
|
},
|
|
52
|
-
onDrop:
|
|
52
|
+
onDrop: g = () => {
|
|
53
53
|
},
|
|
54
|
-
fileClick:
|
|
54
|
+
fileClick: v = () => {
|
|
55
55
|
},
|
|
56
|
-
onCancel:
|
|
56
|
+
onCancel: N = () => {
|
|
57
57
|
},
|
|
58
58
|
// ----------------------------------------
|
|
59
|
-
className:
|
|
60
|
-
style:
|
|
59
|
+
className: X = "",
|
|
60
|
+
style: Y = {},
|
|
61
61
|
color: i = "primary",
|
|
62
62
|
size: s = "small",
|
|
63
|
-
dragAndDropFileProps:
|
|
63
|
+
dragAndDropFileProps: P,
|
|
64
64
|
uploadedFileProps: a,
|
|
65
|
-
...
|
|
65
|
+
...R
|
|
66
66
|
} = n;
|
|
67
|
-
var j = { theme:
|
|
67
|
+
var j = { theme: K(), size: s, color: i };
|
|
68
68
|
const [r, c] = M([]);
|
|
69
69
|
U(() => {
|
|
70
70
|
c(p);
|
|
71
71
|
}, [p]);
|
|
72
|
-
const k =
|
|
73
|
-
|
|
74
|
-
}, []), I =
|
|
72
|
+
const k = u((o, l) => {
|
|
73
|
+
g && g(o, l);
|
|
74
|
+
}, []), I = u((o) => {
|
|
75
75
|
f && f(o);
|
|
76
76
|
}, []), B = (o) => {
|
|
77
77
|
var l;
|
|
78
78
|
(l = o.target) != null && l.files ? c([...r, ...o.target.files]) : o && c([...r, ...o]), m && m(o);
|
|
79
79
|
};
|
|
80
|
-
return /* @__PURE__ */ t(
|
|
80
|
+
return /* @__PURE__ */ t(L, { ref: D, ...j, ...R, children: /* @__PURE__ */ $(J, { direction: "RowReverse", children: [
|
|
81
81
|
/* @__PURE__ */ t(h, { M: (r == null ? void 0 : r.length) > 0 ? 6 : 12, children: /* @__PURE__ */ t(
|
|
82
|
-
|
|
82
|
+
E,
|
|
83
83
|
{
|
|
84
84
|
id: y,
|
|
85
85
|
disabled: b,
|
|
@@ -99,19 +99,19 @@ const K = V.div`
|
|
|
99
99
|
onDropAccepted: I,
|
|
100
100
|
color: i,
|
|
101
101
|
size: s,
|
|
102
|
-
...
|
|
102
|
+
...P
|
|
103
103
|
}
|
|
104
104
|
) }),
|
|
105
105
|
r == null ? void 0 : r.map((o, l) => /* @__PURE__ */ t(h, { M: 6, children: /* @__PURE__ */ t(
|
|
106
|
-
|
|
106
|
+
W,
|
|
107
107
|
{
|
|
108
108
|
fileName: o.name,
|
|
109
109
|
fileSize: o.size,
|
|
110
110
|
showFileSize: d,
|
|
111
111
|
color: i,
|
|
112
112
|
size: s,
|
|
113
|
-
onFileClick:
|
|
114
|
-
onCancel:
|
|
113
|
+
onFileClick: v,
|
|
114
|
+
onCancel: N,
|
|
115
115
|
...a,
|
|
116
116
|
className: "file-item-lnc " + (a == null ? void 0 : a.className)
|
|
117
117
|
},
|
|
@@ -119,7 +119,7 @@ const K = V.div`
|
|
|
119
119
|
) }, l))
|
|
120
120
|
] }) });
|
|
121
121
|
});
|
|
122
|
-
|
|
122
|
+
Q.propTypes = {
|
|
123
123
|
id: e.any,
|
|
124
124
|
disabled: e.bool,
|
|
125
125
|
preventDefault: e.bool,
|
|
@@ -171,5 +171,5 @@ L.propTypes = {
|
|
|
171
171
|
uploadedFileProps: e.any
|
|
172
172
|
};
|
|
173
173
|
export {
|
|
174
|
-
|
|
174
|
+
Q as default
|
|
175
175
|
};
|
package/dist/Drawer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import b, { useRef as T, useEffect as j, useMemo as B, forwardRef as M, useState as q, useImperativeHandle as F } from "react";
|
|
3
3
|
import { P as r } from "./index-BYnWp42a.js";
|
|
4
|
-
import { C as
|
|
5
|
-
import { a as Z, g as
|
|
6
|
-
import { u as
|
|
4
|
+
import { C as H } from "./emotion-react.browser.esm-CN-s34fZ.js";
|
|
5
|
+
import { a as Z, g as V } from "./utils-C52T57HO.js";
|
|
6
|
+
import { u as A } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
7
7
|
function $() {
|
|
8
8
|
return $ = Object.assign || function(n) {
|
|
9
9
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -14,7 +14,7 @@ function $() {
|
|
|
14
14
|
return n;
|
|
15
15
|
}, $.apply(this, arguments);
|
|
16
16
|
}
|
|
17
|
-
var
|
|
17
|
+
var G = function(e, o) {
|
|
18
18
|
var a = {
|
|
19
19
|
left: {
|
|
20
20
|
top: 0,
|
|
@@ -48,9 +48,9 @@ var A = function(e, o) {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
return a[e];
|
|
51
|
-
},
|
|
51
|
+
}, J = function(e) {
|
|
52
52
|
var o = e.open, a = e.onClose, w = a === void 0 ? function() {
|
|
53
|
-
} : a, _ = e.children, C = e.style,
|
|
53
|
+
} : a, _ = e.children, C = e.style, c = e.enableOverlay, d = c === void 0 ? !0 : c, u = e.overlayColor, O = u === void 0 ? "#000" : u, m = e.overlayOpacity, f = m === void 0 ? 0.4 : m, y = e.zIndex, v = y === void 0 ? 100 : y, g = e.duration, D = g === void 0 ? 500 : g, x = e.direction, l = e.size, E = l === void 0 ? 250 : l, i = e.className, h = e.customIdSuffix, p = e.lockBackgroundScroll, S = p === void 0 ? !1 : p, t = e.overlayClassName, N = t === void 0 ? "" : t, k = T(null);
|
|
54
54
|
j(function() {
|
|
55
55
|
var R = function() {
|
|
56
56
|
k.current = window.document.querySelector("body"), k.current && S && (k.current.style.overflow = o ? "hidden" : "");
|
|
@@ -58,85 +58,85 @@ var A = function(e, o) {
|
|
|
58
58
|
R();
|
|
59
59
|
}, [o]);
|
|
60
60
|
var s = B(function() {
|
|
61
|
-
return
|
|
62
|
-
}, [
|
|
61
|
+
return h || (Math.random() + 1).toString(36).substring(7);
|
|
62
|
+
}, [h]), z = {
|
|
63
63
|
backgroundColor: O.toString(),
|
|
64
|
-
opacity:
|
|
65
|
-
zIndex:
|
|
64
|
+
opacity: f,
|
|
65
|
+
zIndex: v
|
|
66
66
|
}, P = $({
|
|
67
|
-
zIndex:
|
|
67
|
+
zIndex: v + 1,
|
|
68
68
|
transitionDuration: D + "ms"
|
|
69
|
-
},
|
|
70
|
-
return
|
|
69
|
+
}, G(x, E), C);
|
|
70
|
+
return b.createElement("div", {
|
|
71
71
|
id: "EZDrawer" + s,
|
|
72
72
|
className: "EZDrawer"
|
|
73
|
-
},
|
|
73
|
+
}, b.createElement("input", {
|
|
74
74
|
type: "checkbox",
|
|
75
75
|
id: "EZDrawer__checkbox" + s,
|
|
76
76
|
className: "EZDrawer__checkbox",
|
|
77
77
|
onChange: w,
|
|
78
78
|
checked: o
|
|
79
|
-
}),
|
|
79
|
+
}), b.createElement("nav", {
|
|
80
80
|
role: "navigation",
|
|
81
81
|
id: "EZDrawer__container" + s,
|
|
82
82
|
style: P,
|
|
83
83
|
className: "EZDrawer__container " + i
|
|
84
|
-
}, _),
|
|
84
|
+
}, _), d && b.createElement("label", {
|
|
85
85
|
htmlFor: "EZDrawer__checkbox" + s,
|
|
86
86
|
id: "EZDrawer__overlay" + s,
|
|
87
87
|
className: "EZDrawer__overlay " + N,
|
|
88
88
|
style: z
|
|
89
89
|
}));
|
|
90
90
|
};
|
|
91
|
-
const
|
|
91
|
+
const K = M((n, e) => {
|
|
92
92
|
const {
|
|
93
93
|
direction: o = "right",
|
|
94
94
|
open: a = !1,
|
|
95
95
|
duration: w = 300,
|
|
96
96
|
overlayOpacity: _ = 0.4,
|
|
97
97
|
enableOverlay: C = !0,
|
|
98
|
-
zIndex:
|
|
98
|
+
zIndex: c = 100,
|
|
99
99
|
//----------------
|
|
100
|
-
onClose:
|
|
100
|
+
onClose: d = () => {
|
|
101
101
|
},
|
|
102
|
-
onOpen:
|
|
102
|
+
onOpen: u = () => {
|
|
103
103
|
},
|
|
104
104
|
//----------------
|
|
105
105
|
className: O = "",
|
|
106
|
-
style:
|
|
107
|
-
color:
|
|
108
|
-
size:
|
|
109
|
-
overlayColor:
|
|
110
|
-
width:
|
|
106
|
+
style: m = {},
|
|
107
|
+
color: f = "neutral",
|
|
108
|
+
size: y = "small",
|
|
109
|
+
overlayColor: v,
|
|
110
|
+
width: g = "unset",
|
|
111
111
|
children: D,
|
|
112
112
|
...x
|
|
113
|
-
} = n, l =
|
|
114
|
-
|
|
113
|
+
} = n, l = A(), [E, i] = q(!1);
|
|
114
|
+
F(e, () => ({
|
|
115
115
|
open() {
|
|
116
|
-
|
|
116
|
+
h();
|
|
117
117
|
},
|
|
118
118
|
close() {
|
|
119
|
-
|
|
119
|
+
p();
|
|
120
120
|
}
|
|
121
121
|
}));
|
|
122
|
-
const
|
|
123
|
-
i(!0),
|
|
124
|
-
},
|
|
125
|
-
i(!1),
|
|
122
|
+
const h = (t) => {
|
|
123
|
+
i(!0), u(t);
|
|
124
|
+
}, p = (t) => {
|
|
125
|
+
i(!1), d(t);
|
|
126
126
|
}, S = () => {
|
|
127
|
-
i(!1),
|
|
127
|
+
i(!1), d();
|
|
128
128
|
};
|
|
129
|
-
return /* @__PURE__ */ I(
|
|
130
|
-
|
|
129
|
+
return /* @__PURE__ */ I(H, { children: ({ css: t, cx: N }) => /* @__PURE__ */ I(
|
|
130
|
+
J,
|
|
131
131
|
{
|
|
132
132
|
open: E,
|
|
133
133
|
onClose: S,
|
|
134
134
|
direction: o,
|
|
135
|
-
zIndex:
|
|
135
|
+
zIndex: c,
|
|
136
136
|
duration: w,
|
|
137
137
|
overlayOpacity: _,
|
|
138
138
|
enableOverlay: C,
|
|
139
|
-
size:
|
|
139
|
+
size: g,
|
|
140
140
|
className: N(
|
|
141
141
|
"drawer-lnc " + O,
|
|
142
142
|
t`
|
|
@@ -144,28 +144,28 @@ const J = c.forwardRef((n, e) => {
|
|
|
144
144
|
background-color: ${Z(
|
|
145
145
|
l,
|
|
146
146
|
"Drawer",
|
|
147
|
-
|
|
147
|
+
f,
|
|
148
148
|
"enabled",
|
|
149
149
|
"background"
|
|
150
150
|
)} !important;
|
|
151
151
|
color: ${Z(
|
|
152
152
|
l,
|
|
153
153
|
"Drawer",
|
|
154
|
-
|
|
154
|
+
f,
|
|
155
155
|
"enabled",
|
|
156
156
|
"text"
|
|
157
157
|
)};
|
|
158
|
-
${
|
|
158
|
+
${V(l, "Drawer", y, "enabled")};
|
|
159
159
|
`
|
|
160
160
|
),
|
|
161
|
-
style:
|
|
162
|
-
overlayColor:
|
|
161
|
+
style: m,
|
|
162
|
+
overlayColor: v,
|
|
163
163
|
...x,
|
|
164
164
|
children: D
|
|
165
165
|
}
|
|
166
166
|
) });
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
K.propTypes = {
|
|
169
169
|
direction: r.oneOf(["top", "right", "left", "bottom"]),
|
|
170
170
|
open: r.bool,
|
|
171
171
|
/**
|
|
@@ -202,5 +202,5 @@ J.propTypes = {
|
|
|
202
202
|
])
|
|
203
203
|
};
|
|
204
204
|
export {
|
|
205
|
-
|
|
205
|
+
K as default
|
|
206
206
|
};
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as O } from "react/jsx-runtime";
|
|
2
2
|
import { P as e } from "./index-BYnWp42a.js";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
3
|
+
import * as S from "react";
|
|
4
|
+
import { forwardRef as l, useCallback as y } from "react";
|
|
5
|
+
import { u as M, S as h, a as x } from "./CustomStyles-BUSJ8bZt.js";
|
|
6
6
|
import { c as N } from "./CustomStyles-BUSJ8bZt.js";
|
|
7
|
-
import { _ as
|
|
7
|
+
import { _ as C, u as I } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
8
|
import "./index--Kmch3aI.js";
|
|
9
|
-
import { d as
|
|
10
|
-
var P = /* @__PURE__ */
|
|
11
|
-
var o =
|
|
12
|
-
return /* @__PURE__ */
|
|
9
|
+
import { d as T } from "./index-CNBqQrtK.js";
|
|
10
|
+
var P = /* @__PURE__ */ l(function(n, t) {
|
|
11
|
+
var o = M(n);
|
|
12
|
+
return /* @__PURE__ */ S.createElement(h, C({
|
|
13
13
|
ref: t
|
|
14
14
|
}, o));
|
|
15
|
-
}),
|
|
16
|
-
const
|
|
15
|
+
}), V = P;
|
|
16
|
+
const j = l((n, t) => {
|
|
17
17
|
const {
|
|
18
18
|
// options,
|
|
19
19
|
styles: o,
|
|
20
|
-
debounceTime:
|
|
21
|
-
name:
|
|
20
|
+
debounceTime: s = 180,
|
|
21
|
+
name: v,
|
|
22
22
|
// hideSelectedOptions,
|
|
23
23
|
// id,
|
|
24
24
|
// inputId,
|
|
25
25
|
// value,
|
|
26
26
|
// readOnly,
|
|
27
27
|
// tabIndex,
|
|
28
|
-
isSearchable:
|
|
29
|
-
isClearable:
|
|
28
|
+
isSearchable: r = !0,
|
|
29
|
+
isClearable: u = !0,
|
|
30
30
|
// isLoading,
|
|
31
31
|
// isRtl,
|
|
32
32
|
// isDisabled,
|
|
@@ -64,34 +64,34 @@ const V = S.forwardRef((n, t) => {
|
|
|
64
64
|
// onMenuClose,
|
|
65
65
|
// onBlur,
|
|
66
66
|
// onFocus,
|
|
67
|
-
size:
|
|
67
|
+
size: i = "small",
|
|
68
68
|
color: c = "primary",
|
|
69
|
-
className:
|
|
70
|
-
style:
|
|
69
|
+
className: m = "",
|
|
70
|
+
style: p = {},
|
|
71
71
|
// children,
|
|
72
|
-
...
|
|
73
|
-
} = n,
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
a == null || a(
|
|
77
|
-
},
|
|
78
|
-
), /* @__PURE__ */
|
|
79
|
-
|
|
72
|
+
...b
|
|
73
|
+
} = n, f = I();
|
|
74
|
+
return y(
|
|
75
|
+
T((d, g) => {
|
|
76
|
+
a == null || a(d, g);
|
|
77
|
+
}, s)
|
|
78
|
+
), /* @__PURE__ */ O(
|
|
79
|
+
V,
|
|
80
80
|
{
|
|
81
81
|
ref: t,
|
|
82
|
-
styles: o ||
|
|
83
|
-
size:
|
|
82
|
+
styles: o || x,
|
|
83
|
+
size: i,
|
|
84
84
|
color: c,
|
|
85
|
-
theme:
|
|
86
|
-
isSearchable:
|
|
87
|
-
isClearable:
|
|
88
|
-
className:
|
|
89
|
-
style:
|
|
90
|
-
...
|
|
85
|
+
theme: f,
|
|
86
|
+
isSearchable: r,
|
|
87
|
+
isClearable: u,
|
|
88
|
+
className: m,
|
|
89
|
+
style: p,
|
|
90
|
+
...b
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
});
|
|
94
|
-
|
|
94
|
+
j.propTypes = {
|
|
95
95
|
options: e.array,
|
|
96
96
|
styles: e.object,
|
|
97
97
|
debounceTime: e.number,
|
|
@@ -262,5 +262,5 @@ V.propTypes = {
|
|
|
262
262
|
};
|
|
263
263
|
export {
|
|
264
264
|
N as components,
|
|
265
|
-
|
|
265
|
+
j as default
|
|
266
266
|
};
|
package/dist/DropdownItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as d, Fragment as G, jsxs as H } from "react/jsx-runtime";
|
|
2
|
-
import J,
|
|
2
|
+
import { forwardRef as J, useRef as Q, useState as W, useEffect as X } from "react";
|
|
3
3
|
import { P as l } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as Z } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
5
|
import M from "./Icon.js";
|
|
@@ -90,7 +90,7 @@ const ne = Z.div`
|
|
|
90
90
|
`}
|
|
91
91
|
outline: none;
|
|
92
92
|
${(n) => n.disabled === !0 && N(n.theme)};
|
|
93
|
-
`, $ = J
|
|
93
|
+
`, $ = J((n, a) => {
|
|
94
94
|
const {
|
|
95
95
|
__TYPE__: oe = "MENU_ITEM",
|
|
96
96
|
active: f = !1,
|
|
@@ -102,11 +102,11 @@ const ne = Z.div`
|
|
|
102
102
|
//----------------
|
|
103
103
|
onFocus: C = () => {
|
|
104
104
|
},
|
|
105
|
-
onBlur:
|
|
105
|
+
onBlur: x = () => {
|
|
106
106
|
},
|
|
107
|
-
onClick:
|
|
107
|
+
onClick: A = () => {
|
|
108
108
|
},
|
|
109
|
-
onKeyDown:
|
|
109
|
+
onKeyDown: p = () => {
|
|
110
110
|
},
|
|
111
111
|
onMouseEnter: le = () => {
|
|
112
112
|
},
|
|
@@ -117,25 +117,25 @@ const ne = Z.div`
|
|
|
117
117
|
onItemSelected: v = () => {
|
|
118
118
|
},
|
|
119
119
|
//----------------
|
|
120
|
-
color:
|
|
121
|
-
className:
|
|
120
|
+
color: S,
|
|
121
|
+
className: _ = "",
|
|
122
122
|
style: O = {},
|
|
123
123
|
size: P = "small",
|
|
124
124
|
iconProps: D,
|
|
125
125
|
children: u,
|
|
126
126
|
...T
|
|
127
|
-
} = n, F = { theme: ee(), color:
|
|
127
|
+
} = n, F = { theme: ee(), color: S, style: O, size: P }, h = Q(), [z, b] = W(f);
|
|
128
128
|
X(() => {
|
|
129
129
|
b(f);
|
|
130
130
|
}, [f]);
|
|
131
|
-
const
|
|
132
|
-
m == !1 && (r && c && c(), v(e, w, u),
|
|
133
|
-
}, B = (e) => {
|
|
134
|
-
b(!0), C(e);
|
|
131
|
+
const B = (e) => {
|
|
132
|
+
m == !1 && (r && c && c(), v(e, w, u), A(e));
|
|
135
133
|
}, K = (e) => {
|
|
136
|
-
b(!
|
|
134
|
+
b(!0), C(e);
|
|
135
|
+
}, R = (e) => {
|
|
136
|
+
b(!1), x(e);
|
|
137
137
|
}, j = (e) => {
|
|
138
|
-
e.preventDefault(), e.key == "ArrowDown" ? g(a ? a.current : h.current) : e.key == "ArrowUp" ? y(a ? a.current : h.current) : e.key == "Enter" && m == !1 && (r && c && c(), v(e, w, u)),
|
|
138
|
+
e.preventDefault(), e.key == "ArrowDown" ? g(a ? a.current : h.current) : e.key == "ArrowUp" ? y(a ? a.current : h.current) : e.key == "Enter" && m == !1 && (r && c && c(), v(e, w, u)), p(e);
|
|
139
139
|
}, g = (e) => {
|
|
140
140
|
if (e != null && e.nextSibling) {
|
|
141
141
|
let o = L(e);
|
|
@@ -186,14 +186,14 @@ const ne = Z.div`
|
|
|
186
186
|
ne,
|
|
187
187
|
{
|
|
188
188
|
ref: a || h,
|
|
189
|
-
className: "menu-item-lnc " +
|
|
189
|
+
className: "menu-item-lnc " + _,
|
|
190
190
|
disabled: m,
|
|
191
191
|
tabIndex: 0,
|
|
192
192
|
onKeyDown: j,
|
|
193
|
-
onFocus:
|
|
194
|
-
onBlur:
|
|
195
|
-
onClick:
|
|
196
|
-
isActive:
|
|
193
|
+
onFocus: K,
|
|
194
|
+
onBlur: R,
|
|
195
|
+
onClick: B,
|
|
196
|
+
isActive: z,
|
|
197
197
|
showNested: k,
|
|
198
198
|
...F,
|
|
199
199
|
...T,
|
package/dist/DropdownLookup.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as de } from "react/jsx-runtime";
|
|
2
2
|
import { P as e } from "./index-BYnWp42a.js";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
3
|
+
import * as Oe from "react";
|
|
4
|
+
import { useRef as G, useState as a, useEffect as W, useCallback as j, forwardRef as J } from "react";
|
|
5
|
+
import { _ as me, u as be } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
6
|
+
import { _ as ge, b as s, h as Se, d as C, u as he, S as ve, a as ye } from "./CustomStyles-BUSJ8bZt.js";
|
|
7
|
+
import { _ as _e } from "./defineProperty-B5pLF6px.js";
|
|
8
8
|
import "./index--Kmch3aI.js";
|
|
9
|
-
import { d as
|
|
10
|
-
var
|
|
11
|
-
function
|
|
9
|
+
import { d as Ie } from "./index-CNBqQrtK.js";
|
|
10
|
+
var Ce = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
11
|
+
function Le(o) {
|
|
12
12
|
var r = o.defaultOptions, t = r === void 0 ? !1 : r, i = o.cacheOptions, l = i === void 0 ? !1 : i, d = o.loadOptions;
|
|
13
13
|
o.options;
|
|
14
|
-
var p = o.isLoading, L = p === void 0 ? !1 : p, h = o.onInputChange, v = o.filterOption, M = v === void 0 ? null : v, y =
|
|
15
|
-
l !==
|
|
14
|
+
var p = o.isLoading, L = p === void 0 ? !1 : p, h = o.onInputChange, v = o.filterOption, M = v === void 0 ? null : v, y = ge(o, Ce), _ = y.inputValue, u = G(void 0), O = G(!1), m = a(Array.isArray(t) ? t : void 0), f = s(m, 2), K = f[0], R = f[1], Q = a(typeof _ < "u" ? _ : ""), $ = s(Q, 2), w = $[0], P = $[1], U = a(t === !0), E = s(U, 2), X = E[0], b = E[1], Y = a(void 0), F = s(Y, 2), V = F[0], A = F[1], Z = a([]), z = s(Z, 2), ee = z[0], T = z[1], te = a(!1), B = s(te, 2), ne = B[0], I = B[1], oe = a({}), H = s(oe, 2), g = H[0], N = H[1], ae = a(void 0), k = s(ae, 2), se = k[0], ue = k[1], re = a(void 0), q = s(re, 2), ie = q[0], le = q[1];
|
|
15
|
+
l !== ie && (N({}), le(l)), t !== se && (R(Array.isArray(t) ? t : void 0), ue(t)), W(function() {
|
|
16
16
|
return O.current = !0, function() {
|
|
17
17
|
O.current = !1;
|
|
18
18
|
};
|
|
19
19
|
}, []);
|
|
20
|
-
var x =
|
|
20
|
+
var x = j(function(S, c) {
|
|
21
21
|
if (!d) return c();
|
|
22
22
|
var n = d(S, c);
|
|
23
23
|
n && typeof n.then == "function" && n.then(c, function() {
|
|
@@ -25,12 +25,12 @@ function Me(o) {
|
|
|
25
25
|
});
|
|
26
26
|
}, [d]);
|
|
27
27
|
W(function() {
|
|
28
|
-
t === !0 && x(
|
|
29
|
-
O.current && (
|
|
28
|
+
t === !0 && x(w, function(S) {
|
|
29
|
+
O.current && (R(S || []), b(!!u.current));
|
|
30
30
|
});
|
|
31
31
|
}, []);
|
|
32
|
-
var
|
|
33
|
-
var n =
|
|
32
|
+
var pe = j(function(S, c) {
|
|
33
|
+
var n = Se(S, c, h);
|
|
34
34
|
if (!n) {
|
|
35
35
|
u.current = void 0, P(""), A(""), T([]), b(!1), I(!1);
|
|
36
36
|
return;
|
|
@@ -38,26 +38,26 @@ function Me(o) {
|
|
|
38
38
|
if (l && g[n])
|
|
39
39
|
P(n), A(n), T(g[n]), b(!1), I(!1);
|
|
40
40
|
else {
|
|
41
|
-
var
|
|
41
|
+
var ce = u.current = {};
|
|
42
42
|
P(n), b(!0), I(!V), x(n, function(D) {
|
|
43
|
-
O &&
|
|
43
|
+
O && ce === u.current && (u.current = void 0, b(!1), A(n), T(D || []), I(!1), N(D ? C(C({}, g), {}, _e({}, n, D)) : g));
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
}, [l, x, V, g, h]),
|
|
46
|
+
}, [l, x, V, g, h]), fe = ne ? [] : w && V ? ee : K || [];
|
|
47
47
|
return C(C({}, y), {}, {
|
|
48
|
-
options:
|
|
49
|
-
isLoading:
|
|
50
|
-
onInputChange:
|
|
48
|
+
options: fe,
|
|
49
|
+
isLoading: X || L,
|
|
50
|
+
onInputChange: pe,
|
|
51
51
|
filterOption: M
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
var
|
|
55
|
-
var t =
|
|
56
|
-
return /* @__PURE__ */
|
|
54
|
+
var Me = /* @__PURE__ */ J(function(o, r) {
|
|
55
|
+
var t = Le(o), i = he(t);
|
|
56
|
+
return /* @__PURE__ */ Oe.createElement(ve, me({
|
|
57
57
|
ref: r
|
|
58
58
|
}, i));
|
|
59
|
-
}),
|
|
60
|
-
const
|
|
59
|
+
}), Pe = Me;
|
|
60
|
+
const Ve = J((o, r) => {
|
|
61
61
|
const {
|
|
62
62
|
// defaultOptions,
|
|
63
63
|
// cacheOptions,
|
|
@@ -116,16 +116,16 @@ const Ae = Oe.forwardRef((o, r) => {
|
|
|
116
116
|
style: M = {},
|
|
117
117
|
// children,
|
|
118
118
|
...y
|
|
119
|
-
} = o, _ =
|
|
120
|
-
|
|
119
|
+
} = o, _ = be(), u = j(
|
|
120
|
+
Ie((m, f) => {
|
|
121
121
|
p == null || p(m, f);
|
|
122
122
|
}, i)
|
|
123
123
|
);
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
|
|
124
|
+
return /* @__PURE__ */ de(
|
|
125
|
+
Pe,
|
|
126
126
|
{
|
|
127
127
|
ref: r,
|
|
128
|
-
styles: t ||
|
|
128
|
+
styles: t || ye,
|
|
129
129
|
size: L,
|
|
130
130
|
color: h,
|
|
131
131
|
theme: _,
|
|
@@ -140,7 +140,7 @@ const Ae = Oe.forwardRef((o, r) => {
|
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
142
|
});
|
|
143
|
-
|
|
143
|
+
Ve.propTypes = {
|
|
144
144
|
/**
|
|
145
145
|
* The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
|
|
146
146
|
*/
|
|
@@ -321,5 +321,5 @@ Ae.propTypes = {
|
|
|
321
321
|
size: e.oneOf(["small", "medium", "large"])
|
|
322
322
|
};
|
|
323
323
|
export {
|
|
324
|
-
|
|
324
|
+
Ve as default
|
|
325
325
|
};
|