jcicl 1.1.5 → 1.2.2
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/Button/Button.d.ts +1 -0
- package/Button/Button.js +73 -70
- package/DesktopStepper/DesktopStepper.d.ts +24 -0
- package/DesktopStepper/DesktopStepper.js +204 -0
- package/DesktopStepper/index.d.ts +1 -0
- package/DesktopStepper/index.js +5 -0
- package/FieldGroup/FieldGroup.js +15 -12
- package/FieldVisibilityWrapper/FieldVisibilityWrapper.d.ts +11 -0
- package/FieldVisibilityWrapper/FieldVisibilityWrapper.js +48 -0
- package/FieldVisibilityWrapper/index.d.ts +1 -0
- package/FieldVisibilityWrapper/index.js +4 -0
- package/FormContext/createFormContext.js +91 -72
- package/FormContext/types.d.ts +8 -0
- package/FormFields/FormFields.d.ts +2 -2
- package/FormFields/FormFields.js +18 -18
- package/FormInput/FormInput.d.ts +4 -0
- package/FormInput/FormInput.js +39 -14
- package/LabeledCheckbox/LabeledCheckbox.js +4 -4
- package/LabeledCurrencyInput/LabeledCurrencyInput.js +33 -33
- package/LabeledInput/LabeledInput.d.ts +2 -0
- package/LabeledInput/LabeledInput.js +16 -14
- package/LabeledRadio/LabeledRadio.js +12 -12
- package/Nav/Nav.js +174 -151
- package/SelectableItemCard/SelectableItemCard.d.ts +9 -0
- package/SelectableItemCard/SelectableItemCard.js +24 -0
- package/SelectableItemCard/index.d.ts +1 -0
- package/SelectableItemCard/index.js +4 -0
- package/Stepper/Stepper.js +184 -226
- package/Table/Table.js +236 -234
- package/Tabs/Tabs.d.ts +42 -0
- package/Tabs/Tabs.js +121 -0
- package/Tabs/index.d.ts +1 -0
- package/Tabs/index.js +4 -0
- package/api.d.ts +16 -5
- package/api.js +42 -28
- package/assets/style.css +1 -1
- package/assets/tailwind.css +2 -2
- package/constants.js +1 -1
- package/formatters.d.ts +1 -0
- package/formatters.js +30 -17
- package/index.d.ts +2 -0
- package/index.js +64 -62
- package/package.json +1 -1
- package/problemDetails.d.ts +20 -0
- package/problemDetails.js +19 -0
- package/utils.d.ts +2 -2
- package/utils.js +35 -29
- package/validators.d.ts +8 -0
- package/validators.js +19 -9
|
@@ -174,7 +174,7 @@ function co(o, a) {
|
|
|
174
174
|
}
|
|
175
175
|
const O = /* @__PURE__ */ n(R, {
|
|
176
176
|
checked: !0
|
|
177
|
-
}), N = /* @__PURE__ */ n(R, {}),
|
|
177
|
+
}), N = /* @__PURE__ */ n(R, {}), g = /* @__PURE__ */ l.forwardRef(function(a, t) {
|
|
178
178
|
const s = W({
|
|
179
179
|
props: a,
|
|
180
180
|
name: "MuiRadio"
|
|
@@ -184,9 +184,9 @@ const O = /* @__PURE__ */ n(R, {
|
|
|
184
184
|
color: p = "primary",
|
|
185
185
|
icon: $ = N,
|
|
186
186
|
name: E,
|
|
187
|
-
onChange:
|
|
187
|
+
onChange: M,
|
|
188
188
|
size: b = "medium",
|
|
189
|
-
className:
|
|
189
|
+
className: F,
|
|
190
190
|
disabled: U,
|
|
191
191
|
disableRipple: D = !1,
|
|
192
192
|
...L
|
|
@@ -201,9 +201,9 @@ const O = /* @__PURE__ */ n(R, {
|
|
|
201
201
|
size: b
|
|
202
202
|
}, k = ro(v), c = so();
|
|
203
203
|
let h = r;
|
|
204
|
-
const V = Q(
|
|
205
|
-
let
|
|
206
|
-
return c && (typeof h > "u" && (h = co(c.value, s.value)), typeof
|
|
204
|
+
const V = Q(M, c && c.onChange);
|
|
205
|
+
let y = E;
|
|
206
|
+
return c && (typeof h > "u" && (h = co(c.value, s.value)), typeof y > "u" && (y = c.name)), /* @__PURE__ */ n(io, {
|
|
207
207
|
type: "radio",
|
|
208
208
|
icon: /* @__PURE__ */ l.cloneElement($, {
|
|
209
209
|
fontSize: N.props.fontSize ?? b
|
|
@@ -214,15 +214,15 @@ const O = /* @__PURE__ */ n(R, {
|
|
|
214
214
|
disabled: i,
|
|
215
215
|
ownerState: v,
|
|
216
216
|
classes: k,
|
|
217
|
-
name:
|
|
217
|
+
name: y,
|
|
218
218
|
checked: h,
|
|
219
219
|
onChange: V,
|
|
220
220
|
ref: t,
|
|
221
|
-
className: H(k.root,
|
|
221
|
+
className: H(k.root, F),
|
|
222
222
|
...L
|
|
223
223
|
});
|
|
224
224
|
});
|
|
225
|
-
process.env.NODE_ENV !== "production" && (
|
|
225
|
+
process.env.NODE_ENV !== "production" && (g.propTypes = {
|
|
226
226
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
227
227
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
228
228
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -309,7 +309,7 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
|
309
309
|
*/
|
|
310
310
|
value: e.any
|
|
311
311
|
});
|
|
312
|
-
const j = G("div", { shouldForwardProp: (o) => !["customTheme"].includes(o) })(({ displayMode: o, customTheme: a }) => ({
|
|
312
|
+
const j = G("div", { shouldForwardProp: (o) => !["customTheme", "displayMode"].includes(o) })(({ displayMode: o, customTheme: a }) => ({
|
|
313
313
|
...S`
|
|
314
314
|
display: flex;
|
|
315
315
|
flex-wrap: nowrap;
|
|
@@ -353,14 +353,14 @@ const j = G("div", { shouldForwardProp: (o) => !["customTheme"].includes(o) })((
|
|
|
353
353
|
}) => {
|
|
354
354
|
const p = _();
|
|
355
355
|
return r ? /* @__PURE__ */ u(j, { displayMode: t, className: "jcLabeledRadio", customTheme: p, children: [
|
|
356
|
-
/* @__PURE__ */ n(
|
|
356
|
+
/* @__PURE__ */ n(g, { ...d }),
|
|
357
357
|
!s && /* @__PURE__ */ n("span", { className: "jcRadioLabel", children: o })
|
|
358
358
|
] }) : /* @__PURE__ */ u(j, { displayMode: t, className: "jcLabeledRadio", customTheme: p, children: [
|
|
359
359
|
!s && /* @__PURE__ */ u("span", { className: "jcRadioLabel", children: [
|
|
360
360
|
o,
|
|
361
361
|
a && ":"
|
|
362
362
|
] }),
|
|
363
|
-
/* @__PURE__ */ n(
|
|
363
|
+
/* @__PURE__ */ n(g, { ...d })
|
|
364
364
|
] });
|
|
365
365
|
};
|
|
366
366
|
export {
|
package/Nav/Nav.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
import { jsx as d, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { _ as h, n as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { _ } from "../.chunks/TransitionGroupContext.js";
|
|
7
|
-
import { B as
|
|
8
|
-
var B = 100,
|
|
2
|
+
import j, { useRef as I, useEffect as K, useCallback as S, useState as F, isValidElement as ee, cloneElement as re } from "react";
|
|
3
|
+
import { _ as h, n as _, i as te } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
import oe from "../theme.js";
|
|
5
|
+
import ae from "../ScrollContainer/ScrollContainer.js";
|
|
6
|
+
import { _ as M } from "../.chunks/TransitionGroupContext.js";
|
|
7
|
+
import { B as ne } from "../.chunks/ButtonBase.js";
|
|
8
|
+
var B = 100, ie = (e) => {
|
|
9
9
|
var {
|
|
10
|
-
h:
|
|
11
|
-
s:
|
|
12
|
-
l:
|
|
10
|
+
h: t,
|
|
11
|
+
s: r,
|
|
12
|
+
l: o,
|
|
13
13
|
a
|
|
14
|
-
} =
|
|
15
|
-
return "hsla(" +
|
|
16
|
-
},
|
|
14
|
+
} = le(e);
|
|
15
|
+
return "hsla(" + t + ", " + r + "%, " + o + "%, " + a + ")";
|
|
16
|
+
}, le = (e) => {
|
|
17
17
|
var {
|
|
18
|
-
h:
|
|
19
|
-
s:
|
|
20
|
-
v:
|
|
18
|
+
h: t,
|
|
19
|
+
s: r,
|
|
20
|
+
v: o,
|
|
21
21
|
a
|
|
22
|
-
} =
|
|
22
|
+
} = e, l = (200 - r) * o / B;
|
|
23
23
|
return {
|
|
24
|
-
h:
|
|
25
|
-
s: l > 0 && l < 200 ?
|
|
24
|
+
h: t,
|
|
25
|
+
s: l > 0 && l < 200 ? r * o / B / (l <= B ? l : 200 - l) * B : 0,
|
|
26
26
|
l: l / 2,
|
|
27
27
|
a
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
function
|
|
31
|
-
var
|
|
30
|
+
function L(e) {
|
|
31
|
+
var t = I(e);
|
|
32
32
|
return K(() => {
|
|
33
|
-
|
|
34
|
-
}),
|
|
33
|
+
t.current = e;
|
|
34
|
+
}), S((r, o) => t.current && t.current(r, o), []);
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
!
|
|
38
|
-
}, W = function(
|
|
39
|
-
return
|
|
40
|
-
}, Y = (
|
|
41
|
-
var
|
|
36
|
+
var R = (e) => "touches" in e, H = (e) => {
|
|
37
|
+
!R(e) && e.preventDefault && e.preventDefault();
|
|
38
|
+
}, W = function(t, r, o) {
|
|
39
|
+
return r === void 0 && (r = 0), o === void 0 && (o = 1), t > o ? o : t < r ? r : t;
|
|
40
|
+
}, Y = (e, t) => {
|
|
41
|
+
var r = e.getBoundingClientRect(), o = R(t) ? t.touches[0] : t;
|
|
42
42
|
return {
|
|
43
|
-
left: W((
|
|
44
|
-
top: W((
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
47
|
-
x:
|
|
48
|
-
y:
|
|
43
|
+
left: W((o.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
44
|
+
top: W((o.pageY - (r.top + window.pageYOffset)) / r.height),
|
|
45
|
+
width: r.width,
|
|
46
|
+
height: r.height,
|
|
47
|
+
x: o.pageX - (r.left + window.pageXOffset),
|
|
48
|
+
y: o.pageY - (r.top + window.pageYOffset)
|
|
49
49
|
};
|
|
50
|
-
},
|
|
50
|
+
}, se = ["prefixCls", "className", "onMove", "onDown"], Q = /* @__PURE__ */ j.forwardRef((e, t) => {
|
|
51
51
|
var {
|
|
52
|
-
prefixCls:
|
|
53
|
-
className:
|
|
52
|
+
prefixCls: r = "w-color-interactive",
|
|
53
|
+
className: o,
|
|
54
54
|
onMove: a,
|
|
55
55
|
onDown: l
|
|
56
|
-
} =
|
|
57
|
-
if (
|
|
58
|
-
var m =
|
|
56
|
+
} = e, c = M(e, se), u = I(null), f = I(!1), [v, b] = F(!1), A = L(a), s = L(l), E = (i) => f.current && !R(i) ? !1 : (f.current = R(i), !0), g = S((i) => {
|
|
57
|
+
if (H(i), !!u.current) {
|
|
58
|
+
var m = R(i) ? i.touches.length > 0 : i.buttons > 0;
|
|
59
59
|
if (!m) {
|
|
60
60
|
b(!1);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
A == null || A(Y(u.current, i), i);
|
|
64
64
|
}
|
|
65
|
-
}, [
|
|
65
|
+
}, [A]), p = S(() => b(!1), []), n = S((i) => {
|
|
66
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
67
|
}, [g, p]);
|
|
68
68
|
K(() => (n(v), () => {
|
|
69
69
|
n(!1);
|
|
70
70
|
}), [v, g, p, n]);
|
|
71
|
-
var y =
|
|
71
|
+
var y = S((i) => {
|
|
72
72
|
var m = document.activeElement;
|
|
73
|
-
m == null || m.blur(),
|
|
73
|
+
m == null || m.blur(), H(i.nativeEvent), E(i.nativeEvent) && u.current && (s == null || s(Y(u.current, i.nativeEvent), i.nativeEvent), b(!0));
|
|
74
74
|
}, [s]);
|
|
75
75
|
return /* @__PURE__ */ d("div", h({}, c, {
|
|
76
|
-
className: [
|
|
76
|
+
className: [r, o || ""].filter(Boolean).join(" "),
|
|
77
77
|
style: h({}, c.style, {
|
|
78
78
|
touchAction: "none"
|
|
79
79
|
}),
|
|
@@ -84,17 +84,17 @@ var P = (r) => "touches" in r, L = (r) => {
|
|
|
84
84
|
}));
|
|
85
85
|
});
|
|
86
86
|
Q.displayName = "Interactive";
|
|
87
|
-
var
|
|
87
|
+
var de = ["className", "prefixCls", "left", "top", "style", "fillProps"], ce = (e) => {
|
|
88
88
|
var {
|
|
89
|
-
className:
|
|
90
|
-
prefixCls:
|
|
91
|
-
left:
|
|
89
|
+
className: t,
|
|
90
|
+
prefixCls: r,
|
|
91
|
+
left: o,
|
|
92
92
|
top: a,
|
|
93
93
|
style: l,
|
|
94
94
|
fillProps: c
|
|
95
|
-
} =
|
|
95
|
+
} = e, u = M(e, de), f = h({}, l, {
|
|
96
96
|
position: "absolute",
|
|
97
|
-
left:
|
|
97
|
+
left: o,
|
|
98
98
|
top: a
|
|
99
99
|
}), v = h({
|
|
100
100
|
width: 18,
|
|
@@ -103,22 +103,22 @@ var ie = ["className", "prefixCls", "left", "top", "style", "fillProps"], le = (
|
|
|
103
103
|
borderRadius: "50%",
|
|
104
104
|
backgroundColor: "var(--alpha-pointer-background-color)"
|
|
105
105
|
}, c == null ? void 0 : c.style, {
|
|
106
|
-
transform:
|
|
106
|
+
transform: o ? "translate(-9px, -1px)" : "translate(-1px, -9px)"
|
|
107
107
|
});
|
|
108
108
|
return /* @__PURE__ */ d("div", h({
|
|
109
|
-
className:
|
|
109
|
+
className: r + "-pointer " + (t || ""),
|
|
110
110
|
style: f
|
|
111
111
|
}, u, {
|
|
112
112
|
children: /* @__PURE__ */ d("div", h({
|
|
113
|
-
className:
|
|
113
|
+
className: r + "-fill"
|
|
114
114
|
}, c, {
|
|
115
115
|
style: v
|
|
116
116
|
}))
|
|
117
117
|
}));
|
|
118
|
-
},
|
|
118
|
+
}, he = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"], pe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==", $ = /* @__PURE__ */ j.forwardRef((e, t) => {
|
|
119
119
|
var {
|
|
120
|
-
prefixCls:
|
|
121
|
-
className:
|
|
120
|
+
prefixCls: r = "w-color-alpha",
|
|
121
|
+
className: o,
|
|
122
122
|
hsva: a,
|
|
123
123
|
background: l,
|
|
124
124
|
bgProps: c = {},
|
|
@@ -126,16 +126,16 @@ var ie = ["className", "prefixCls", "left", "top", "style", "fillProps"], le = (
|
|
|
126
126
|
pointerProps: f = {},
|
|
127
127
|
radius: v = 0,
|
|
128
128
|
width: b,
|
|
129
|
-
height:
|
|
129
|
+
height: A = 16,
|
|
130
130
|
direction: s = "horizontal",
|
|
131
|
-
style:
|
|
131
|
+
style: E,
|
|
132
132
|
onChange: g,
|
|
133
133
|
pointer: p
|
|
134
|
-
} =
|
|
134
|
+
} = e, n = M(e, he), y = (x) => {
|
|
135
135
|
g && g(h({}, a, {
|
|
136
136
|
a: s === "horizontal" ? x.left : x.top
|
|
137
137
|
}), x);
|
|
138
|
-
}, i =
|
|
138
|
+
}, i = ie(Object.assign({}, a, {
|
|
139
139
|
a: 1
|
|
140
140
|
})), m = "linear-gradient(to " + (s === "horizontal" ? "right" : "bottom") + ", rgba(244, 67, 54, 0) 0%, " + i + " 100%)", w = {};
|
|
141
141
|
s === "horizontal" ? w.left = a.a * 100 + "%" : w.top = a.a * 100 + "%";
|
|
@@ -144,55 +144,55 @@ var ie = ["className", "prefixCls", "left", "top", "style", "fillProps"], le = (
|
|
|
144
144
|
"--alpha-pointer-background-color": "rgb(248, 248, 248)",
|
|
145
145
|
"--alpha-pointer-box-shadow": "rgb(0 0 0 / 37%) 0px 1px 4px 0px",
|
|
146
146
|
borderRadius: v,
|
|
147
|
-
background: "url(" +
|
|
147
|
+
background: "url(" + pe + ") left center",
|
|
148
148
|
backgroundColor: "var(--alpha-background-color)"
|
|
149
149
|
}, {
|
|
150
150
|
width: b,
|
|
151
|
-
height:
|
|
152
|
-
},
|
|
151
|
+
height: A
|
|
152
|
+
}, E, {
|
|
153
153
|
position: "relative"
|
|
154
|
-
}),
|
|
155
|
-
var
|
|
154
|
+
}), N = S((x) => {
|
|
155
|
+
var P = 0.01, D = a.a, C = D;
|
|
156
156
|
switch (x.key) {
|
|
157
157
|
case "ArrowLeft":
|
|
158
|
-
s === "horizontal" && (
|
|
158
|
+
s === "horizontal" && (C = Math.max(0, D - P), x.preventDefault());
|
|
159
159
|
break;
|
|
160
160
|
case "ArrowRight":
|
|
161
|
-
s === "horizontal" && (
|
|
161
|
+
s === "horizontal" && (C = Math.min(1, D + P), x.preventDefault());
|
|
162
162
|
break;
|
|
163
163
|
case "ArrowUp":
|
|
164
|
-
s === "vertical" && (
|
|
164
|
+
s === "vertical" && (C = Math.max(0, D - P), x.preventDefault());
|
|
165
165
|
break;
|
|
166
166
|
case "ArrowDown":
|
|
167
|
-
s === "vertical" && (
|
|
167
|
+
s === "vertical" && (C = Math.min(1, D + P), x.preventDefault());
|
|
168
168
|
break;
|
|
169
169
|
default:
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
173
|
-
var
|
|
174
|
-
left: s === "horizontal" ?
|
|
175
|
-
top: s === "vertical" ?
|
|
172
|
+
if (C !== D) {
|
|
173
|
+
var q = {
|
|
174
|
+
left: s === "horizontal" ? C : a.a,
|
|
175
|
+
top: s === "vertical" ? C : a.a,
|
|
176
176
|
width: 0,
|
|
177
177
|
height: 0,
|
|
178
178
|
x: 0,
|
|
179
179
|
y: 0
|
|
180
180
|
};
|
|
181
181
|
g && g(h({}, a, {
|
|
182
|
-
a:
|
|
183
|
-
}),
|
|
182
|
+
a: C
|
|
183
|
+
}), q);
|
|
184
184
|
}
|
|
185
|
-
}, [a, s, g]),
|
|
185
|
+
}, [a, s, g]), Z = S((x) => {
|
|
186
186
|
x.target.focus();
|
|
187
187
|
}, []), T = p && typeof p == "function" ? p(h({
|
|
188
|
-
prefixCls:
|
|
189
|
-
}, f, w)) : /* @__PURE__ */ d(
|
|
190
|
-
prefixCls:
|
|
188
|
+
prefixCls: r
|
|
189
|
+
}, f, w)) : /* @__PURE__ */ d(ce, h({}, f, {
|
|
190
|
+
prefixCls: r
|
|
191
191
|
}, w));
|
|
192
192
|
return /* @__PURE__ */ z("div", h({}, n, {
|
|
193
|
-
className: [
|
|
193
|
+
className: [r, r + "-" + s, o || ""].filter(Boolean).join(" "),
|
|
194
194
|
style: k,
|
|
195
|
-
ref:
|
|
195
|
+
ref: t,
|
|
196
196
|
children: [/* @__PURE__ */ d("div", h({}, c, {
|
|
197
197
|
style: h({
|
|
198
198
|
inset: 0,
|
|
@@ -209,24 +209,24 @@ var ie = ["className", "prefixCls", "left", "top", "style", "fillProps"], le = (
|
|
|
209
209
|
}),
|
|
210
210
|
onMove: y,
|
|
211
211
|
onDown: y,
|
|
212
|
-
onClick:
|
|
213
|
-
onKeyDown:
|
|
212
|
+
onClick: Z,
|
|
213
|
+
onKeyDown: N,
|
|
214
214
|
children: T
|
|
215
215
|
}))]
|
|
216
216
|
}));
|
|
217
217
|
});
|
|
218
218
|
$.displayName = "Alpha";
|
|
219
|
-
var
|
|
219
|
+
var ue = ["prefixCls", "className", "hue", "onChange", "direction"], J = /* @__PURE__ */ j.forwardRef((e, t) => {
|
|
220
220
|
var {
|
|
221
|
-
prefixCls:
|
|
222
|
-
className:
|
|
221
|
+
prefixCls: r = "w-color-hue",
|
|
222
|
+
className: o,
|
|
223
223
|
hue: a = 0,
|
|
224
224
|
onChange: l,
|
|
225
225
|
direction: c = "horizontal"
|
|
226
|
-
} =
|
|
226
|
+
} = e, u = M(e, ue);
|
|
227
227
|
return /* @__PURE__ */ d($, h({
|
|
228
|
-
ref:
|
|
229
|
-
className:
|
|
228
|
+
ref: t,
|
|
229
|
+
className: r + " " + (o || "")
|
|
230
230
|
}, u, {
|
|
231
231
|
direction: c,
|
|
232
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%)",
|
|
@@ -243,20 +243,24 @@ var ce = ["prefixCls", "className", "hue", "onChange", "direction"], F = /* @__P
|
|
|
243
243
|
}
|
|
244
244
|
}));
|
|
245
245
|
});
|
|
246
|
-
|
|
247
|
-
const G =
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
J.displayName = "Hue";
|
|
247
|
+
const fe = 36, G = (e) => {
|
|
248
|
+
if (!ee(e)) return e;
|
|
249
|
+
const t = e;
|
|
250
|
+
return re(t, { size: t.props.size ?? fe });
|
|
251
|
+
}, O = _(ne, {
|
|
252
|
+
shouldForwardProp: (e) => te(e)
|
|
253
|
+
})(({ active: e, isTablet: t, highlight1: r, highlight3: o, iconColor: a, isMobile: l, shadowSecondary: c }) => ({
|
|
250
254
|
display: "flex",
|
|
251
|
-
flexDirection:
|
|
255
|
+
flexDirection: t ? "row" : "column",
|
|
252
256
|
alignItems: "center",
|
|
253
|
-
justifyContent:
|
|
257
|
+
justifyContent: t ? "flex-start" : "center",
|
|
254
258
|
width: "100%",
|
|
255
|
-
padding:
|
|
259
|
+
padding: t ? "16px" : "0 8px 8px 8px",
|
|
256
260
|
transition: "313ms all ease-in-out",
|
|
257
|
-
backgroundColor:
|
|
258
|
-
boxShadow:
|
|
259
|
-
...
|
|
261
|
+
backgroundColor: e && !l ? r : "transparent",
|
|
262
|
+
boxShadow: e ? a : "none",
|
|
263
|
+
...t && {
|
|
260
264
|
gap: "0.5rem"
|
|
261
265
|
},
|
|
262
266
|
...l && {
|
|
@@ -264,13 +268,21 @@ const G = M(oe, {
|
|
|
264
268
|
},
|
|
265
269
|
"&:hover, :focus-visible": {
|
|
266
270
|
svg: {
|
|
267
|
-
...!
|
|
268
|
-
backgroundColor:
|
|
271
|
+
...!t && {
|
|
272
|
+
backgroundColor: r
|
|
269
273
|
}
|
|
270
274
|
},
|
|
271
|
-
|
|
275
|
+
// Round the hover highlight back into a circle for lucide icons. Scoped to
|
|
276
|
+
// hover so the resting box stays square (no clipping); `overflow: visible`
|
|
277
|
+
// below keeps the icon itself from being cut by the rounded background.
|
|
278
|
+
"svg.lucide": {
|
|
279
|
+
...!t && {
|
|
280
|
+
borderRadius: "50%"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
...t && {
|
|
272
284
|
boxShadow: c,
|
|
273
|
-
backgroundColor:
|
|
285
|
+
backgroundColor: o
|
|
274
286
|
}
|
|
275
287
|
},
|
|
276
288
|
svg: {
|
|
@@ -283,29 +295,40 @@ const G = M(oe, {
|
|
|
283
295
|
alignItems: "center",
|
|
284
296
|
justifyContent: "center",
|
|
285
297
|
transition: "313ms all ease-in-out",
|
|
286
|
-
...l &&
|
|
287
|
-
backgroundColor:
|
|
298
|
+
...l && e && {
|
|
299
|
+
backgroundColor: r
|
|
288
300
|
}
|
|
289
301
|
},
|
|
302
|
+
// Lucide icons are stroke-drawn (fill="none"); filling them paints a solid
|
|
303
|
+
// blob. Drive their color via stroke and leave fill unset. Keep the resting
|
|
304
|
+
// box square; `overflow: visible` stops the (rounded, on hover) background box
|
|
305
|
+
// from clipping the stroke near the corners. Higher specificity than the `svg`
|
|
306
|
+
// rule above, so it wins.
|
|
307
|
+
"svg.lucide": {
|
|
308
|
+
fill: "none",
|
|
309
|
+
stroke: a,
|
|
310
|
+
borderRadius: "unset",
|
|
311
|
+
overflow: "visible"
|
|
312
|
+
},
|
|
290
313
|
span: {
|
|
291
314
|
fontFamily: "Roboto, sans-serif",
|
|
292
315
|
fontSize: "12px",
|
|
293
316
|
fontWeight: "bold",
|
|
294
317
|
color: a,
|
|
295
318
|
textAlign: "center",
|
|
296
|
-
...
|
|
319
|
+
...t && {
|
|
297
320
|
fontSize: "1.5rem",
|
|
298
321
|
fontWeight: "500"
|
|
299
322
|
}
|
|
300
323
|
}
|
|
301
|
-
})),
|
|
324
|
+
})), U = _(J)`
|
|
302
325
|
div:first-of-type {
|
|
303
326
|
border-radius: inherit !important;
|
|
304
327
|
}
|
|
305
328
|
.w-color-alpha-pointer > .w-color-alpha-fill {
|
|
306
329
|
border-radius: 50% !important;
|
|
307
330
|
}
|
|
308
|
-
`,
|
|
331
|
+
`, V = _("div")(({ isTablet: e }) => ({
|
|
309
332
|
display: "block",
|
|
310
333
|
padding: "16px",
|
|
311
334
|
span: {
|
|
@@ -314,49 +337,49 @@ const G = M(oe, {
|
|
|
314
337
|
fontSize: "12px",
|
|
315
338
|
fontWeight: "bold",
|
|
316
339
|
cursor: "default",
|
|
317
|
-
...
|
|
340
|
+
...e && {
|
|
318
341
|
fontSize: "1.5rem",
|
|
319
342
|
fontWeight: "500"
|
|
320
343
|
}
|
|
321
344
|
}
|
|
322
|
-
})), X =
|
|
345
|
+
})), X = _("div")(({ navWidth: e, isTablet: t, isMobile: r, shadowSecondary: o }) => ({
|
|
323
346
|
display: "flex",
|
|
324
|
-
flexDirection:
|
|
347
|
+
flexDirection: r ? "row" : "column",
|
|
325
348
|
backgroundColor: "transparent",
|
|
326
349
|
alignItems: "stretch",
|
|
327
|
-
justifyContent:
|
|
350
|
+
justifyContent: r ? "space-between" : "flex-start",
|
|
328
351
|
maxHeight: "100%",
|
|
329
352
|
flexShrink: 0,
|
|
330
|
-
gap:
|
|
331
|
-
width:
|
|
353
|
+
gap: t ? 0 : "1rem",
|
|
354
|
+
width: e,
|
|
332
355
|
boxSizing: "border-box",
|
|
333
|
-
...
|
|
334
|
-
boxShadow:
|
|
356
|
+
...r && {
|
|
357
|
+
boxShadow: o,
|
|
335
358
|
zIndex: 1313,
|
|
336
359
|
padding: "4px 8px"
|
|
337
360
|
}
|
|
338
|
-
})),
|
|
339
|
-
navItems:
|
|
340
|
-
activeRoute:
|
|
341
|
-
navWidth:
|
|
342
|
-
isTablet:
|
|
361
|
+
})), Ae = ({
|
|
362
|
+
navItems: e,
|
|
363
|
+
activeRoute: t,
|
|
364
|
+
navWidth: r = `${oe.constants.navDefaultWidth}px`,
|
|
365
|
+
isTablet: o,
|
|
343
366
|
isMobile: a,
|
|
344
367
|
themeColors: l
|
|
345
368
|
}) => {
|
|
346
|
-
const [c, u] =
|
|
369
|
+
const [c, u] = F(""), f = (p, n) => {
|
|
347
370
|
u(p), n();
|
|
348
|
-
}, { highlightPrimary: v, highlightTertiary: b, iconPrimary:
|
|
349
|
-
return a ? /* @__PURE__ */ d(X, { isTablet: !1, navWidth: "100%", isMobile: !0, shadowSecondary: s, children:
|
|
371
|
+
}, { highlightPrimary: v, highlightTertiary: b, iconPrimary: A, shadowSecondary: s, scrollColor: E } = l, g = { navWidth: r, isTablet: o, shadowSecondary: s };
|
|
372
|
+
return a ? /* @__PURE__ */ d(X, { isTablet: !1, navWidth: "100%", isMobile: !0, shadowSecondary: s, children: e.map(({ icon: p, label: n = "", onClick: y = () => {
|
|
350
373
|
}, hue: i = void 0, onChange: m, ...w }) => {
|
|
351
|
-
const k =
|
|
352
|
-
return n == "Hue" ? /* @__PURE__ */ z(
|
|
374
|
+
const k = t ? t === n : c === n;
|
|
375
|
+
return n == "Hue" ? /* @__PURE__ */ z(V, { ...w, active: k, isTablet: o, children: [
|
|
353
376
|
/* @__PURE__ */ d("div", { style: { display: "flex" }, children: /* @__PURE__ */ d("span", { children: "Select Theme Color" }) }),
|
|
354
377
|
/* @__PURE__ */ d("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ d(
|
|
355
|
-
|
|
378
|
+
U,
|
|
356
379
|
{
|
|
357
380
|
hue: i,
|
|
358
|
-
onChange: (
|
|
359
|
-
m && m(
|
|
381
|
+
onChange: (N) => {
|
|
382
|
+
m && m(N);
|
|
360
383
|
},
|
|
361
384
|
style: {
|
|
362
385
|
width: "96%",
|
|
@@ -367,42 +390,42 @@ const G = M(oe, {
|
|
|
367
390
|
}
|
|
368
391
|
) })
|
|
369
392
|
] }, n) : /* @__PURE__ */ z(
|
|
370
|
-
|
|
393
|
+
O,
|
|
371
394
|
{
|
|
372
395
|
...w,
|
|
373
396
|
active: k,
|
|
374
397
|
onClick: () => f(n, y),
|
|
375
|
-
isTablet:
|
|
398
|
+
isTablet: o,
|
|
376
399
|
highlight1: v,
|
|
377
400
|
highlight3: b,
|
|
378
|
-
iconColor:
|
|
401
|
+
iconColor: A,
|
|
379
402
|
shadowSecondary: s,
|
|
380
403
|
isMobile: !0,
|
|
381
404
|
children: [
|
|
382
|
-
p,
|
|
405
|
+
G(p),
|
|
383
406
|
/* @__PURE__ */ d("span", { children: n })
|
|
384
407
|
]
|
|
385
408
|
},
|
|
386
409
|
n
|
|
387
410
|
);
|
|
388
411
|
}) }) : /* @__PURE__ */ d(
|
|
389
|
-
|
|
412
|
+
ae,
|
|
390
413
|
{
|
|
391
|
-
scrollColor:
|
|
414
|
+
scrollColor: E,
|
|
392
415
|
direction: "vertical",
|
|
393
|
-
width:
|
|
394
|
-
styles: { minWidth:
|
|
395
|
-
children: /* @__PURE__ */ d(X, { ...g, children:
|
|
416
|
+
width: r,
|
|
417
|
+
styles: { minWidth: r },
|
|
418
|
+
children: /* @__PURE__ */ d(X, { ...g, children: e.map(({ icon: p, label: n = "", onClick: y = () => {
|
|
396
419
|
}, hue: i = void 0, onChange: m, ...w }) => {
|
|
397
|
-
const k =
|
|
398
|
-
return n == "Hue" ? /* @__PURE__ */ z(
|
|
420
|
+
const k = t ? t === n : c === n;
|
|
421
|
+
return n == "Hue" ? /* @__PURE__ */ z(V, { ...w, active: k, isTablet: o, children: [
|
|
399
422
|
/* @__PURE__ */ d("div", { style: { display: "flex" }, children: /* @__PURE__ */ d("span", { children: "Custom Theme" }) }),
|
|
400
423
|
/* @__PURE__ */ d("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ d(
|
|
401
|
-
|
|
424
|
+
U,
|
|
402
425
|
{
|
|
403
426
|
hue: i,
|
|
404
|
-
onChange: (
|
|
405
|
-
m && m(
|
|
427
|
+
onChange: (N) => {
|
|
428
|
+
m && m(N);
|
|
406
429
|
},
|
|
407
430
|
style: {
|
|
408
431
|
width: "96%",
|
|
@@ -413,18 +436,18 @@ const G = M(oe, {
|
|
|
413
436
|
}
|
|
414
437
|
) })
|
|
415
438
|
] }, n) : /* @__PURE__ */ z(
|
|
416
|
-
|
|
439
|
+
O,
|
|
417
440
|
{
|
|
418
441
|
...w,
|
|
419
442
|
active: k,
|
|
420
443
|
onClick: () => f(n, y),
|
|
421
|
-
isTablet:
|
|
444
|
+
isTablet: o,
|
|
422
445
|
highlight1: v,
|
|
423
446
|
highlight3: b,
|
|
424
|
-
iconColor:
|
|
447
|
+
iconColor: A,
|
|
425
448
|
shadowSecondary: s,
|
|
426
449
|
children: [
|
|
427
|
-
p,
|
|
450
|
+
G(p),
|
|
428
451
|
/* @__PURE__ */ d("span", { children: n })
|
|
429
452
|
]
|
|
430
453
|
},
|
|
@@ -435,6 +458,6 @@ const G = M(oe, {
|
|
|
435
458
|
);
|
|
436
459
|
};
|
|
437
460
|
export {
|
|
438
|
-
|
|
439
|
-
|
|
461
|
+
Ae as Nav,
|
|
462
|
+
Ae as default
|
|
440
463
|
};
|