jcicl 0.0.343 → 1.0.1
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/.chunks/AppHeader.js +222 -0
- package/.chunks/ButtonBase.js +1 -1
- package/.chunks/Portal.js +1 -1
- package/.chunks/TransitionGroupContext.js +2 -2
- package/AppContainer/AppContainer.js +161 -154
- package/AppHeader/AppHeader.js +11 -219
- package/AppHeader/index.js +2 -2
- package/Button/Button.js +76 -67
- package/DefaultTemplate/DefaultTemplate.js +93 -98
- package/LabeledDropdown/LabeledDropdown.js +67 -67
- package/LabeledInput/LabeledInput.js +15 -13
- package/LabeledTextArea/LabeledTextArea.js +5 -5
- package/Nav/Nav.d.ts +5 -0
- package/Nav/Nav.js +390 -89
- package/Search/Search.js +29 -27
- package/Table/Table.d.ts +2 -2
- package/Table/Table.js +474 -426
- package/ThemeContext.d.ts +3 -0
- package/ThemeContext.js +10 -0
- package/index.js +5 -5
- package/package.json +2 -1
- package/theme.d.ts +79 -1
- package/theme.js +52 -10
- package/themeUtils.d.ts +35 -0
- package/themeUtils.js +88 -0
package/Nav/Nav.js
CHANGED
|
@@ -1,41 +1,281 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as d, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import H, { useRef as j, useEffect as K, useCallback as D, useState as V } from "react";
|
|
3
|
+
import { _ as h, n as M, i as q } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
import ee from "../theme.js";
|
|
5
|
+
import re from "../ScrollContainer/ScrollContainer.js";
|
|
6
|
+
import { _ } from "../.chunks/TransitionGroupContext.js";
|
|
7
|
+
import { B as oe } from "../.chunks/ButtonBase.js";
|
|
8
|
+
var B = 100, te = (r) => {
|
|
9
|
+
var {
|
|
10
|
+
h: o,
|
|
11
|
+
s: e,
|
|
12
|
+
l: t,
|
|
13
|
+
a
|
|
14
|
+
} = ae(r);
|
|
15
|
+
return "hsla(" + o + ", " + e + "%, " + t + "%, " + a + ")";
|
|
16
|
+
}, ae = (r) => {
|
|
17
|
+
var {
|
|
18
|
+
h: o,
|
|
19
|
+
s: e,
|
|
20
|
+
v: t,
|
|
21
|
+
a
|
|
22
|
+
} = r, l = (200 - e) * t / B;
|
|
23
|
+
return {
|
|
24
|
+
h: o,
|
|
25
|
+
s: l > 0 && l < 200 ? e * t / B / (l <= B ? l : 200 - l) * B : 0,
|
|
26
|
+
l: l / 2,
|
|
27
|
+
a
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
function I(r) {
|
|
31
|
+
var o = j(r);
|
|
32
|
+
return K(() => {
|
|
33
|
+
o.current = r;
|
|
34
|
+
}), D((e, t) => o.current && o.current(e, t), []);
|
|
35
|
+
}
|
|
36
|
+
var P = (r) => "touches" in r, L = (r) => {
|
|
37
|
+
!P(r) && r.preventDefault && r.preventDefault();
|
|
38
|
+
}, W = function(o, e, t) {
|
|
39
|
+
return e === void 0 && (e = 0), t === void 0 && (t = 1), o > t ? t : o < e ? e : o;
|
|
40
|
+
}, Y = (r, o) => {
|
|
41
|
+
var e = r.getBoundingClientRect(), t = P(o) ? o.touches[0] : o;
|
|
42
|
+
return {
|
|
43
|
+
left: W((t.pageX - (e.left + window.pageXOffset)) / e.width),
|
|
44
|
+
top: W((t.pageY - (e.top + window.pageYOffset)) / e.height),
|
|
45
|
+
width: e.width,
|
|
46
|
+
height: e.height,
|
|
47
|
+
x: t.pageX - (e.left + window.pageXOffset),
|
|
48
|
+
y: t.pageY - (e.top + window.pageYOffset)
|
|
49
|
+
};
|
|
50
|
+
}, ne = ["prefixCls", "className", "onMove", "onDown"], Q = /* @__PURE__ */ H.forwardRef((r, o) => {
|
|
51
|
+
var {
|
|
52
|
+
prefixCls: e = "w-color-interactive",
|
|
53
|
+
className: t,
|
|
54
|
+
onMove: a,
|
|
55
|
+
onDown: l
|
|
56
|
+
} = r, c = _(r, ne), u = j(null), f = j(!1), [v, b] = V(!1), C = I(a), s = I(l), N = (i) => f.current && !P(i) ? !1 : (f.current = P(i), !0), g = D((i) => {
|
|
57
|
+
if (L(i), !!u.current) {
|
|
58
|
+
var m = P(i) ? i.touches.length > 0 : i.buttons > 0;
|
|
59
|
+
if (!m) {
|
|
60
|
+
b(!1);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
C == null || C(Y(u.current, i), i);
|
|
64
|
+
}
|
|
65
|
+
}, [C]), p = D(() => b(!1), []), n = D((i) => {
|
|
66
|
+
i ? (window.addEventListener(f.current ? "touchmove" : "mousemove", g), window.addEventListener(f.current ? "touchend" : "mouseup", p)) : (window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", p), window.removeEventListener("touchmove", g), window.removeEventListener("touchend", p));
|
|
67
|
+
}, [g, p]);
|
|
68
|
+
K(() => (n(v), () => {
|
|
69
|
+
n(!1);
|
|
70
|
+
}), [v, g, p, n]);
|
|
71
|
+
var y = D((i) => {
|
|
72
|
+
var m = document.activeElement;
|
|
73
|
+
m == null || m.blur(), L(i.nativeEvent), N(i.nativeEvent) && u.current && (s == null || s(Y(u.current, i.nativeEvent), i.nativeEvent), b(!0));
|
|
74
|
+
}, [s]);
|
|
75
|
+
return /* @__PURE__ */ d("div", h({}, c, {
|
|
76
|
+
className: [e, t || ""].filter(Boolean).join(" "),
|
|
77
|
+
style: h({}, c.style, {
|
|
78
|
+
touchAction: "none"
|
|
79
|
+
}),
|
|
80
|
+
ref: u,
|
|
81
|
+
tabIndex: 0,
|
|
82
|
+
onMouseDown: y,
|
|
83
|
+
onTouchStart: y
|
|
84
|
+
}));
|
|
85
|
+
});
|
|
86
|
+
Q.displayName = "Interactive";
|
|
87
|
+
var ie = ["className", "prefixCls", "left", "top", "style", "fillProps"], le = (r) => {
|
|
88
|
+
var {
|
|
89
|
+
className: o,
|
|
90
|
+
prefixCls: e,
|
|
91
|
+
left: t,
|
|
92
|
+
top: a,
|
|
93
|
+
style: l,
|
|
94
|
+
fillProps: c
|
|
95
|
+
} = r, u = _(r, ie), f = h({}, l, {
|
|
96
|
+
position: "absolute",
|
|
97
|
+
left: t,
|
|
98
|
+
top: a
|
|
99
|
+
}), v = h({
|
|
100
|
+
width: 18,
|
|
101
|
+
height: 18,
|
|
102
|
+
boxShadow: "var(--alpha-pointer-box-shadow)",
|
|
103
|
+
borderRadius: "50%",
|
|
104
|
+
backgroundColor: "var(--alpha-pointer-background-color)"
|
|
105
|
+
}, c == null ? void 0 : c.style, {
|
|
106
|
+
transform: t ? "translate(-9px, -1px)" : "translate(-1px, -9px)"
|
|
107
|
+
});
|
|
108
|
+
return /* @__PURE__ */ d("div", h({
|
|
109
|
+
className: e + "-pointer " + (o || ""),
|
|
110
|
+
style: f
|
|
111
|
+
}, u, {
|
|
112
|
+
children: /* @__PURE__ */ d("div", h({
|
|
113
|
+
className: e + "-fill"
|
|
114
|
+
}, c, {
|
|
115
|
+
style: v
|
|
116
|
+
}))
|
|
117
|
+
}));
|
|
118
|
+
}, se = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"], de = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==", $ = /* @__PURE__ */ H.forwardRef((r, o) => {
|
|
119
|
+
var {
|
|
120
|
+
prefixCls: e = "w-color-alpha",
|
|
121
|
+
className: t,
|
|
122
|
+
hsva: a,
|
|
123
|
+
background: l,
|
|
124
|
+
bgProps: c = {},
|
|
125
|
+
innerProps: u = {},
|
|
126
|
+
pointerProps: f = {},
|
|
127
|
+
radius: v = 0,
|
|
128
|
+
width: b,
|
|
129
|
+
height: C = 16,
|
|
130
|
+
direction: s = "horizontal",
|
|
131
|
+
style: N,
|
|
132
|
+
onChange: g,
|
|
133
|
+
pointer: p
|
|
134
|
+
} = r, n = _(r, se), y = (x) => {
|
|
135
|
+
g && g(h({}, a, {
|
|
136
|
+
a: s === "horizontal" ? x.left : x.top
|
|
137
|
+
}), x);
|
|
138
|
+
}, i = te(Object.assign({}, a, {
|
|
139
|
+
a: 1
|
|
140
|
+
})), m = "linear-gradient(to " + (s === "horizontal" ? "right" : "bottom") + ", rgba(244, 67, 54, 0) 0%, " + i + " 100%)", w = {};
|
|
141
|
+
s === "horizontal" ? w.left = a.a * 100 + "%" : w.top = a.a * 100 + "%";
|
|
142
|
+
var k = h({
|
|
143
|
+
"--alpha-background-color": "#fff",
|
|
144
|
+
"--alpha-pointer-background-color": "rgb(248, 248, 248)",
|
|
145
|
+
"--alpha-pointer-box-shadow": "rgb(0 0 0 / 37%) 0px 1px 4px 0px",
|
|
146
|
+
borderRadius: v,
|
|
147
|
+
background: "url(" + de + ") left center",
|
|
148
|
+
backgroundColor: "var(--alpha-background-color)"
|
|
149
|
+
}, {
|
|
150
|
+
width: b,
|
|
151
|
+
height: C
|
|
152
|
+
}, N, {
|
|
153
|
+
position: "relative"
|
|
154
|
+
}), E = D((x) => {
|
|
155
|
+
var R = 0.01, S = a.a, A = S;
|
|
156
|
+
switch (x.key) {
|
|
157
|
+
case "ArrowLeft":
|
|
158
|
+
s === "horizontal" && (A = Math.max(0, S - R), x.preventDefault());
|
|
159
|
+
break;
|
|
160
|
+
case "ArrowRight":
|
|
161
|
+
s === "horizontal" && (A = Math.min(1, S + R), x.preventDefault());
|
|
162
|
+
break;
|
|
163
|
+
case "ArrowUp":
|
|
164
|
+
s === "vertical" && (A = Math.max(0, S - R), x.preventDefault());
|
|
165
|
+
break;
|
|
166
|
+
case "ArrowDown":
|
|
167
|
+
s === "vertical" && (A = Math.min(1, S + R), x.preventDefault());
|
|
168
|
+
break;
|
|
169
|
+
default:
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (A !== S) {
|
|
173
|
+
var Z = {
|
|
174
|
+
left: s === "horizontal" ? A : a.a,
|
|
175
|
+
top: s === "vertical" ? A : a.a,
|
|
176
|
+
width: 0,
|
|
177
|
+
height: 0,
|
|
178
|
+
x: 0,
|
|
179
|
+
y: 0
|
|
180
|
+
};
|
|
181
|
+
g && g(h({}, a, {
|
|
182
|
+
a: A
|
|
183
|
+
}), Z);
|
|
184
|
+
}
|
|
185
|
+
}, [a, s, g]), J = D((x) => {
|
|
186
|
+
x.target.focus();
|
|
187
|
+
}, []), T = p && typeof p == "function" ? p(h({
|
|
188
|
+
prefixCls: e
|
|
189
|
+
}, f, w)) : /* @__PURE__ */ d(le, h({}, f, {
|
|
190
|
+
prefixCls: e
|
|
191
|
+
}, w));
|
|
192
|
+
return /* @__PURE__ */ z("div", h({}, n, {
|
|
193
|
+
className: [e, e + "-" + s, t || ""].filter(Boolean).join(" "),
|
|
194
|
+
style: k,
|
|
195
|
+
ref: o,
|
|
196
|
+
children: [/* @__PURE__ */ d("div", h({}, c, {
|
|
197
|
+
style: h({
|
|
198
|
+
inset: 0,
|
|
199
|
+
position: "absolute",
|
|
200
|
+
background: l || m,
|
|
201
|
+
borderRadius: v
|
|
202
|
+
}, c.style)
|
|
203
|
+
})), /* @__PURE__ */ d(Q, h({}, u, {
|
|
204
|
+
style: h({}, u.style, {
|
|
205
|
+
inset: 0,
|
|
206
|
+
zIndex: 1,
|
|
207
|
+
position: "absolute",
|
|
208
|
+
outline: "none"
|
|
209
|
+
}),
|
|
210
|
+
onMove: y,
|
|
211
|
+
onDown: y,
|
|
212
|
+
onClick: J,
|
|
213
|
+
onKeyDown: E,
|
|
214
|
+
children: T
|
|
215
|
+
}))]
|
|
216
|
+
}));
|
|
217
|
+
});
|
|
218
|
+
$.displayName = "Alpha";
|
|
219
|
+
var ce = ["prefixCls", "className", "hue", "onChange", "direction"], F = /* @__PURE__ */ H.forwardRef((r, o) => {
|
|
220
|
+
var {
|
|
221
|
+
prefixCls: e = "w-color-hue",
|
|
222
|
+
className: t,
|
|
223
|
+
hue: a = 0,
|
|
224
|
+
onChange: l,
|
|
225
|
+
direction: c = "horizontal"
|
|
226
|
+
} = r, u = _(r, ce);
|
|
227
|
+
return /* @__PURE__ */ d($, h({
|
|
228
|
+
ref: o,
|
|
229
|
+
className: e + " " + (t || "")
|
|
230
|
+
}, u, {
|
|
231
|
+
direction: c,
|
|
232
|
+
background: "linear-gradient(to " + (c === "horizontal" ? "right" : "bottom") + ", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",
|
|
233
|
+
hsva: {
|
|
234
|
+
h: a,
|
|
235
|
+
s: 100,
|
|
236
|
+
v: 100,
|
|
237
|
+
a: a / 360
|
|
238
|
+
},
|
|
239
|
+
onChange: (f, v) => {
|
|
240
|
+
l && l({
|
|
241
|
+
h: c === "horizontal" ? 360 * v.left : 360 * v.top
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}));
|
|
245
|
+
});
|
|
246
|
+
F.displayName = "Hue";
|
|
247
|
+
const G = M(oe, {
|
|
248
|
+
shouldForwardProp: (r) => q(r)
|
|
249
|
+
})(({ active: r, isTablet: o, highlight1: e, highlight3: t, iconColor: a, isMobile: l, shadowSecondary: c }) => ({
|
|
10
250
|
display: "flex",
|
|
11
|
-
flexDirection:
|
|
251
|
+
flexDirection: o ? "row" : "column",
|
|
12
252
|
alignItems: "center",
|
|
13
|
-
justifyContent:
|
|
253
|
+
justifyContent: o ? "flex-start" : "center",
|
|
14
254
|
width: "100%",
|
|
15
|
-
padding:
|
|
255
|
+
padding: o ? "16px" : "0 8px 8px 8px",
|
|
16
256
|
transition: "313ms all ease-in-out",
|
|
17
|
-
backgroundColor:
|
|
18
|
-
boxShadow:
|
|
19
|
-
...
|
|
257
|
+
backgroundColor: r && !l ? e : "transparent",
|
|
258
|
+
boxShadow: r ? a : "none",
|
|
259
|
+
...o && {
|
|
20
260
|
gap: "0.5rem"
|
|
21
261
|
},
|
|
22
|
-
...
|
|
262
|
+
...l && {
|
|
23
263
|
padding: 0
|
|
24
264
|
},
|
|
25
265
|
"&:hover, :focus-visible": {
|
|
26
266
|
svg: {
|
|
27
|
-
...!
|
|
28
|
-
backgroundColor:
|
|
267
|
+
...!o && {
|
|
268
|
+
backgroundColor: e
|
|
29
269
|
}
|
|
30
270
|
},
|
|
31
|
-
...
|
|
32
|
-
boxShadow:
|
|
33
|
-
backgroundColor:
|
|
271
|
+
...o && {
|
|
272
|
+
boxShadow: c,
|
|
273
|
+
backgroundColor: t
|
|
34
274
|
}
|
|
35
275
|
},
|
|
36
276
|
svg: {
|
|
37
277
|
fontSize: "2.1rem",
|
|
38
|
-
fill:
|
|
278
|
+
fill: a,
|
|
39
279
|
backgroundColor: "transparent",
|
|
40
280
|
borderRadius: "50%",
|
|
41
281
|
padding: "8px",
|
|
@@ -43,97 +283,158 @@ const C = v(D, {
|
|
|
43
283
|
alignItems: "center",
|
|
44
284
|
justifyContent: "center",
|
|
45
285
|
transition: "313ms all ease-in-out",
|
|
46
|
-
...
|
|
47
|
-
backgroundColor:
|
|
286
|
+
...l && r && {
|
|
287
|
+
backgroundColor: e
|
|
48
288
|
}
|
|
49
289
|
},
|
|
50
290
|
span: {
|
|
51
291
|
fontFamily: "Roboto, sans-serif",
|
|
52
292
|
fontSize: "12px",
|
|
53
293
|
fontWeight: "bold",
|
|
54
|
-
color:
|
|
294
|
+
color: a,
|
|
55
295
|
textAlign: "center",
|
|
56
|
-
...
|
|
296
|
+
...o && {
|
|
57
297
|
fontSize: "1.5rem",
|
|
58
298
|
fontWeight: "500"
|
|
59
299
|
}
|
|
60
300
|
}
|
|
61
|
-
})),
|
|
301
|
+
})), O = M(F)`
|
|
302
|
+
div:first-of-type {
|
|
303
|
+
border-radius: inherit !important;
|
|
304
|
+
}
|
|
305
|
+
.w-color-alpha-pointer > .w-color-alpha-fill {
|
|
306
|
+
border-radius: 50% !important;
|
|
307
|
+
}
|
|
308
|
+
`, U = M("div")(({ isTablet: r }) => ({
|
|
309
|
+
display: "block",
|
|
310
|
+
padding: "16px",
|
|
311
|
+
span: {
|
|
312
|
+
paddingBottom: "15px",
|
|
313
|
+
fontFamily: "Roboto, sans-serif",
|
|
314
|
+
fontSize: "12px",
|
|
315
|
+
fontWeight: "bold",
|
|
316
|
+
cursor: "default",
|
|
317
|
+
...r && {
|
|
318
|
+
fontSize: "1.5rem",
|
|
319
|
+
fontWeight: "500"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
})), X = M("div")(({ navWidth: r, isTablet: o, isMobile: e, shadowSecondary: t }) => ({
|
|
62
323
|
display: "flex",
|
|
63
|
-
flexDirection:
|
|
324
|
+
flexDirection: e ? "row" : "column",
|
|
64
325
|
backgroundColor: "transparent",
|
|
65
|
-
alignItems: "
|
|
66
|
-
justifyContent:
|
|
326
|
+
alignItems: "stretch",
|
|
327
|
+
justifyContent: e ? "space-between" : "flex-start",
|
|
67
328
|
maxHeight: "100%",
|
|
68
329
|
flexShrink: 0,
|
|
69
|
-
gap:
|
|
70
|
-
width:
|
|
330
|
+
gap: o ? 0 : "1rem",
|
|
331
|
+
width: r,
|
|
71
332
|
boxSizing: "border-box",
|
|
72
|
-
...
|
|
73
|
-
boxShadow:
|
|
333
|
+
...e && {
|
|
334
|
+
boxShadow: t,
|
|
74
335
|
zIndex: 1313,
|
|
75
336
|
padding: "4px 8px"
|
|
76
337
|
}
|
|
77
|
-
})),
|
|
78
|
-
navItems:
|
|
79
|
-
activeRoute:
|
|
80
|
-
navWidth:
|
|
81
|
-
isTablet:
|
|
82
|
-
isMobile:
|
|
83
|
-
themeColors:
|
|
338
|
+
})), xe = ({
|
|
339
|
+
navItems: r,
|
|
340
|
+
activeRoute: o,
|
|
341
|
+
navWidth: e = `${ee.constants.navDefaultWidth}px`,
|
|
342
|
+
isTablet: t,
|
|
343
|
+
isMobile: a,
|
|
344
|
+
themeColors: l
|
|
84
345
|
}) => {
|
|
85
|
-
const [
|
|
86
|
-
|
|
87
|
-
}, { highlightPrimary:
|
|
88
|
-
return
|
|
89
|
-
}, ...
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
346
|
+
const [c, u] = V(""), f = (p, n) => {
|
|
347
|
+
u(p), n();
|
|
348
|
+
}, { highlightPrimary: v, highlightTertiary: b, iconPrimary: C, shadowSecondary: s, scrollColor: N } = l, g = { navWidth: e, isTablet: t, shadowSecondary: s };
|
|
349
|
+
return a ? /* @__PURE__ */ d(X, { isTablet: !1, navWidth: "100%", isMobile: !0, shadowSecondary: s, children: r.map(({ icon: p, label: n = "", onClick: y = () => {
|
|
350
|
+
}, hue: i = void 0, onChange: m, ...w }) => {
|
|
351
|
+
const k = o ? o === n : c === n;
|
|
352
|
+
return n == "Hue" ? /* @__PURE__ */ z(U, { ...w, active: k, isTablet: t, children: [
|
|
353
|
+
/* @__PURE__ */ d("div", { style: { display: "flex" }, children: /* @__PURE__ */ d("span", { children: "Select Theme Color" }) }),
|
|
354
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ d(
|
|
355
|
+
O,
|
|
356
|
+
{
|
|
357
|
+
hue: i,
|
|
358
|
+
onChange: (E) => {
|
|
359
|
+
m && m(E);
|
|
360
|
+
},
|
|
361
|
+
style: {
|
|
362
|
+
width: "96%",
|
|
363
|
+
cursor: "pointer",
|
|
364
|
+
borderRadius: "20px",
|
|
365
|
+
boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.25)"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
) })
|
|
369
|
+
] }, n) : /* @__PURE__ */ z(
|
|
370
|
+
G,
|
|
371
|
+
{
|
|
372
|
+
...w,
|
|
373
|
+
active: k,
|
|
374
|
+
onClick: () => f(n, y),
|
|
375
|
+
isTablet: t,
|
|
376
|
+
highlight1: v,
|
|
377
|
+
highlight3: b,
|
|
378
|
+
iconColor: C,
|
|
379
|
+
shadowSecondary: s,
|
|
380
|
+
isMobile: !0,
|
|
381
|
+
children: [
|
|
382
|
+
p,
|
|
383
|
+
/* @__PURE__ */ d("span", { children: n })
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
n
|
|
387
|
+
);
|
|
388
|
+
}) }) : /* @__PURE__ */ d(
|
|
389
|
+
re,
|
|
109
390
|
{
|
|
110
|
-
scrollColor:
|
|
391
|
+
scrollColor: N,
|
|
111
392
|
direction: "vertical",
|
|
112
|
-
width:
|
|
113
|
-
styles: { minWidth:
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
}, ...
|
|
116
|
-
|
|
117
|
-
{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
393
|
+
width: e,
|
|
394
|
+
styles: { minWidth: e },
|
|
395
|
+
children: /* @__PURE__ */ d(X, { ...g, children: r.map(({ icon: p, label: n = "", onClick: y = () => {
|
|
396
|
+
}, hue: i = void 0, onChange: m, ...w }) => {
|
|
397
|
+
const k = o ? o === n : c === n;
|
|
398
|
+
return n == "Hue" ? /* @__PURE__ */ z(U, { ...w, active: k, isTablet: t, children: [
|
|
399
|
+
/* @__PURE__ */ d("div", { style: { display: "flex" }, children: /* @__PURE__ */ d("span", { children: "Custom Theme" }) }),
|
|
400
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ d(
|
|
401
|
+
O,
|
|
402
|
+
{
|
|
403
|
+
hue: i,
|
|
404
|
+
onChange: (E) => {
|
|
405
|
+
m && m(E);
|
|
406
|
+
},
|
|
407
|
+
style: {
|
|
408
|
+
width: "96%",
|
|
409
|
+
cursor: "pointer",
|
|
410
|
+
borderRadius: "20px",
|
|
411
|
+
boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.25)"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
) })
|
|
415
|
+
] }, n) : /* @__PURE__ */ z(
|
|
416
|
+
G,
|
|
417
|
+
{
|
|
418
|
+
...w,
|
|
419
|
+
active: k,
|
|
420
|
+
onClick: () => f(n, y),
|
|
421
|
+
isTablet: t,
|
|
422
|
+
highlight1: v,
|
|
423
|
+
highlight3: b,
|
|
424
|
+
iconColor: C,
|
|
425
|
+
shadowSecondary: s,
|
|
426
|
+
children: [
|
|
427
|
+
p,
|
|
428
|
+
/* @__PURE__ */ d("span", { children: n })
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
n
|
|
432
|
+
);
|
|
433
|
+
}) })
|
|
133
434
|
}
|
|
134
435
|
);
|
|
135
436
|
};
|
|
136
437
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
438
|
+
xe as Nav,
|
|
439
|
+
xe as default
|
|
139
440
|
};
|
package/Search/Search.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import { useState as S } from "react";
|
|
3
3
|
import { n as s } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
4
|
import { c as l } from "../.chunks/emotion-react.browser.esm.js";
|
|
5
5
|
import e from "../theme.js";
|
|
6
|
-
import
|
|
6
|
+
import y from "../Icon/Icon.js";
|
|
7
7
|
import { Button as p } from "../Button/Button.js";
|
|
8
8
|
import { c as m } from "../.chunks/createSvgIcon.js";
|
|
9
|
-
import { T as
|
|
10
|
-
const F = m(/* @__PURE__ */
|
|
9
|
+
import { T as z } from "../.chunks/TextField.js";
|
|
10
|
+
const F = m(/* @__PURE__ */ o("path", {
|
|
11
11
|
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
|
|
12
|
-
}), "Search"),
|
|
12
|
+
}), "Search"), C = m(/* @__PURE__ */ o("path", {
|
|
13
13
|
d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"
|
|
14
|
-
}), "FilterList"), k = s("div")(() => ({
|
|
14
|
+
}), "FilterList"), j = ["borderColor", "borderFocusColor", "shadowTertiary"], k = s("div")(() => ({
|
|
15
15
|
...l`
|
|
16
16
|
position: relative;
|
|
17
17
|
width: 100%;
|
|
@@ -19,11 +19,13 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
align-items: center;
|
|
21
21
|
`
|
|
22
|
-
})),
|
|
22
|
+
})), I = s(z, {
|
|
23
|
+
shouldForwardProp: (r) => !j.includes(r)
|
|
24
|
+
})(({ borderColor: r, borderFocusColor: i, shadowTertiary: a }) => ({
|
|
23
25
|
backgroundColor: e.colors.white,
|
|
24
26
|
borderRadius: "1rem",
|
|
25
27
|
height: "2rem",
|
|
26
|
-
border: `1px solid ${
|
|
28
|
+
border: `1px solid ${r}`,
|
|
27
29
|
transition: "313ms all ease-out",
|
|
28
30
|
zIndex: 1327,
|
|
29
31
|
".MuiInputBase-root": {
|
|
@@ -74,7 +76,7 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
74
76
|
boxShadow: a
|
|
75
77
|
},
|
|
76
78
|
"&:focus-visible": {
|
|
77
|
-
borderColor:
|
|
79
|
+
borderColor: r,
|
|
78
80
|
borderWidth: "2px"
|
|
79
81
|
},
|
|
80
82
|
fieldset: {
|
|
@@ -91,7 +93,7 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
91
93
|
padding: "2px"
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
|
-
})),
|
|
96
|
+
})), M = s("div")(({ open: r }) => ({
|
|
95
97
|
...l`
|
|
96
98
|
box-sizing: border-box;
|
|
97
99
|
position: absolute;
|
|
@@ -103,10 +105,10 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
103
105
|
gap: 1rem;
|
|
104
106
|
background-color: ${e.colors.white};
|
|
105
107
|
box-shadow: ${e.boxShadows.midnight};
|
|
106
|
-
padding: ${
|
|
108
|
+
padding: ${r ? "2rem 1rem 1rem 1rem" : 0};
|
|
107
109
|
transition: 313ms all ease-in-out;
|
|
108
110
|
display: grid;
|
|
109
|
-
grid-template-rows: ${
|
|
111
|
+
grid-template-rows: ${r ? "1fr" : "0fr"};
|
|
110
112
|
|
|
111
113
|
.jcFiltersWrapper {
|
|
112
114
|
overflow: hidden;
|
|
@@ -116,7 +118,7 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
116
118
|
width: calc(100% - 6px);
|
|
117
119
|
}
|
|
118
120
|
`
|
|
119
|
-
})),
|
|
121
|
+
})), R = s("div")(() => ({
|
|
120
122
|
...l`
|
|
121
123
|
display: grid;
|
|
122
124
|
grid-template-columns: repeat(3, 1fr);
|
|
@@ -140,8 +142,8 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
140
142
|
justify-self: center;
|
|
141
143
|
}
|
|
142
144
|
`
|
|
143
|
-
})),
|
|
144
|
-
borderColor:
|
|
145
|
+
})), D = ({
|
|
146
|
+
borderColor: r = e.colors.green,
|
|
145
147
|
// border primary
|
|
146
148
|
borderFocusColor: i = e.colors.darkGreen,
|
|
147
149
|
// icon primary
|
|
@@ -152,14 +154,14 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
152
154
|
}) => {
|
|
153
155
|
const [c, g] = S(!1), u = (n) => {
|
|
154
156
|
n.preventDefault(), n.key === "Enter" && d && d();
|
|
155
|
-
}, x = { borderColor:
|
|
157
|
+
}, x = { borderColor: r, borderFocusColor: i, shadowTertiary: a, ...h }, b = t && t.length > 0;
|
|
156
158
|
return /* @__PURE__ */ v(k, { className: "jcInputContainer", children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
159
|
+
/* @__PURE__ */ o(
|
|
160
|
+
I,
|
|
159
161
|
{
|
|
160
162
|
slotProps: {
|
|
161
163
|
input: {
|
|
162
|
-
startAdornment: /* @__PURE__ */
|
|
164
|
+
startAdornment: /* @__PURE__ */ o(
|
|
163
165
|
p,
|
|
164
166
|
{
|
|
165
167
|
variant: "icon",
|
|
@@ -168,15 +170,15 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
168
170
|
color: i,
|
|
169
171
|
highlightColor: "transparent",
|
|
170
172
|
className: "searchIcon",
|
|
171
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ o(F, {})
|
|
172
174
|
}
|
|
173
175
|
),
|
|
174
|
-
endAdornment: b && /* @__PURE__ */
|
|
175
|
-
|
|
176
|
+
endAdornment: b && /* @__PURE__ */ o(
|
|
177
|
+
y,
|
|
176
178
|
{
|
|
177
179
|
onClick: () => g(!c),
|
|
178
|
-
icon: /* @__PURE__ */
|
|
179
|
-
backgroundColor:
|
|
180
|
+
icon: /* @__PURE__ */ o(C, {}),
|
|
181
|
+
backgroundColor: r,
|
|
180
182
|
iconColor: e.colors.white,
|
|
181
183
|
size: 28,
|
|
182
184
|
padding: 3
|
|
@@ -189,10 +191,10 @@ const F = m(/* @__PURE__ */ r("path", {
|
|
|
189
191
|
onKeyUp: u
|
|
190
192
|
}
|
|
191
193
|
),
|
|
192
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ o(M, { open: c, className: "jcFiltersContainer", children: /* @__PURE__ */ o(R, { className: "jcFiltersWrapper", children: t == null ? void 0 : t.map(({ name: n, onClick: f, active: w }) => /* @__PURE__ */ o(p, { className: "jcFiltersButton", variant: "filter", onClick: f, active: w, children: n }, n)) }) })
|
|
193
195
|
] });
|
|
194
196
|
};
|
|
195
197
|
export {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
D as Search,
|
|
199
|
+
D as default
|
|
198
200
|
};
|
package/Table/Table.d.ts
CHANGED