gasp-components 1.0.10 → 1.0.12
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/UploadOutlined-9WKjHsqa.js +878 -0
- package/dist/components/ag-grid-table/index.js +57877 -38314
- package/dist/components/button/index.js +18 -18
- package/dist/components/checklist/checklist-item.js +3 -3
- package/dist/components/checklist/index.js +5 -5
- package/dist/components/date-picker/index.js +9 -5022
- package/dist/components/dragger/index.js +28 -28
- package/dist/components/dropdown/index.js +10 -11
- package/dist/components/form/index.js +8 -9
- package/dist/components/form-item/index.js +10 -10
- package/dist/components/input/index.js +8 -8
- package/dist/components/modal/index.js +18 -20
- package/dist/components/password-input/index.js +2 -2
- package/dist/components/progress/index.js +16 -18
- package/dist/components/progress-circle/index.js +3 -3
- package/dist/components/radio-button/index.js +8 -8
- package/dist/components/result-popup/index.js +13 -14
- package/dist/components/select/index.js +1 -1
- package/dist/components/side-menu/index.js +2 -2
- package/dist/components/side-menu/menu-item.js +4 -6
- package/dist/components/steps/index.js +9 -9
- package/dist/components/table/index.js +16 -9298
- package/dist/components/tabs/index.js +10 -10
- package/dist/components/tabs/tab.js +7 -8
- package/dist/components/tag/index.js +9 -258
- package/dist/components/timeline-horizontal/index.js +7 -7
- package/dist/components/upload/index.js +62 -77
- package/dist/index-WlPrqxgY.js +87 -0
- package/dist/main.js +69 -457
- package/package.json +1 -1
- package/dist/CheckCircleFilled-xt-0R96Z.js +0 -16
- package/dist/CheckOutlined-EgxCAgj_.js +0 -16
- package/dist/CloseCircleFilled-bIgIULWb.js +0 -16
- package/dist/CloseOutlined-Q3kC3EZS.js +0 -16
- package/dist/Compact-fdEKV_mF.js +0 -180
- package/dist/ExclamationCircleFilled-XzDBEGmA.js +0 -16
- package/dist/KeyCode-qFRXB1-n.js +0 -517
- package/dist/LoadingOutlined-6Ipqn0og.js +0 -16
- package/dist/Overflow-JFdXKgCr.js +0 -231
- package/dist/PurePanel-hLGnXbul.js +0 -60
- package/dist/SearchOutlined-rJTFGXUi.js +0 -16
- package/dist/TextArea-n3dknzTq.js +0 -716
- package/dist/UploadOutlined-D8jfLEgv.js +0 -27
- package/dist/asyncToGenerator-t4sKr8R4.js +0 -340
- package/dist/button-LN5ZDad8.js +0 -819
- package/dist/collapse-ilv4Tji1.js +0 -20
- package/dist/colors-opGg9oSz.js +0 -25
- package/dist/compact-item-jjuVmDBH.js +0 -61
- package/dist/context-h3WSVDPz.js +0 -2087
- package/dist/createFormattedComponent-FcpICAm8.js +0 -3260
- package/dist/index--6VfGMUo.js +0 -402
- package/dist/index-0mpuHoS5.js +0 -996
- package/dist/index-1KQbTQJ2.js +0 -4405
- package/dist/index-5Uo03BMk.js +0 -681
- package/dist/index-BFgxz47K.js +0 -89
- package/dist/index-D3LMPWyJ.js +0 -1437
- package/dist/index-DVS_nWxv.js +0 -3026
- package/dist/index-ELHBhuK9.js +0 -100
- package/dist/index-Fn8q8B3V.js +0 -107
- package/dist/index-GgkQrebz.js +0 -950
- package/dist/index-L-MzVDcK.js +0 -616
- package/dist/index-M3WnMjiA.js +0 -230
- package/dist/index-NQd_zMf0.js +0 -69
- package/dist/index-ZT64Ec6u.js +0 -267
- package/dist/index-aawDqn9q.js +0 -3337
- package/dist/index-k04G4nlS.js +0 -1416
- package/dist/index-s3u4YBl4.js +0 -8
- package/dist/index-vtDVJV8q.js +0 -19571
- package/dist/isVisible-Qi9l15Ty.js +0 -232
- package/dist/motion-0ToOu81j.js +0 -226
- package/dist/motion-NQme0FJ_.js +0 -32
- package/dist/omit-ylWA0ZLZ.js +0 -10
- package/dist/pickAttrs-zaQzRTqh.js +0 -42
- package/dist/progress-a1_pwKVT.js +0 -722
- package/dist/reactNode-R20zZQk1.js +0 -18
- package/dist/responsiveObserver-V1_1G14X.js +0 -71
- package/dist/roundedArrow-p1Pmd9av.js +0 -64
- package/dist/row-sPFiFm0C.js +0 -230
- package/dist/slide-mFXPRHku.js +0 -265
- package/dist/styleChecker-pZ3k2IiY.js +0 -37
- package/dist/useCSSVarCls-GwZT_WiF.js +0 -9
- package/dist/useClosable-4G12n4Bp.js +0 -15
- package/dist/useLocale-eThlLZJw.js +0 -16
- package/dist/useMergedState-qUafLuUa.js +0 -23
- package/dist/useVariants-s0IcneBD.js +0 -25
- package/dist/zoom-Ps8y0jNW.js +0 -174
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as m, Fragment as h, jsx as
|
|
1
|
+
import { jsxs as m, Fragment as h, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as p, useEffect as k } from "react";
|
|
3
3
|
import { Tab as x } from "./tab.js";
|
|
4
|
-
import
|
|
4
|
+
import b from "classnames";
|
|
5
5
|
import { tabsContext as u } from "./context.js";
|
|
6
6
|
const C = ({
|
|
7
7
|
items: n,
|
|
8
8
|
current: t,
|
|
9
9
|
onChange: r,
|
|
10
|
-
className:
|
|
10
|
+
className: a,
|
|
11
11
|
tabClassName: d
|
|
12
12
|
}) => {
|
|
13
|
-
const [c,
|
|
13
|
+
const [c, o] = p(), f = n.reduce((e, l) => ({
|
|
14
14
|
...e,
|
|
15
|
-
[
|
|
15
|
+
[l.key]: l.content
|
|
16
16
|
}), {});
|
|
17
17
|
k(() => {
|
|
18
|
-
t &&
|
|
19
|
-
}, [t,
|
|
18
|
+
t && o(t);
|
|
19
|
+
}, [t, o]);
|
|
20
20
|
const i = (e) => {
|
|
21
|
-
|
|
21
|
+
o(e), r && r(e);
|
|
22
22
|
};
|
|
23
23
|
return /* @__PURE__ */ m(h, { children: [
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ s("div", { className: b(a, "flex bg-white"), children: n.map((e) => /* @__PURE__ */ s(
|
|
25
25
|
u.Provider,
|
|
26
26
|
{
|
|
27
27
|
value: {
|
|
28
28
|
selected: c === e.key,
|
|
29
29
|
checked: e.checked || !1
|
|
30
30
|
},
|
|
31
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ s(
|
|
32
32
|
x,
|
|
33
33
|
{
|
|
34
34
|
className: d,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { jsx as l, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import s, { useContext as i } from "react";
|
|
3
3
|
import { tabsContext as u } from "./context.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const D = ({
|
|
4
|
+
import r from "classnames";
|
|
5
|
+
import { theme as x, Typography as f } from "antd";
|
|
6
|
+
import { libTheme as g } from "../../theme.js";
|
|
7
|
+
const v = ({
|
|
9
8
|
className: c,
|
|
10
9
|
icon: a,
|
|
11
10
|
title: o,
|
|
12
11
|
onClick: m
|
|
13
12
|
}) => {
|
|
14
13
|
const { selected: e, checked: t } = i(u), n = a && s.cloneElement(a, {
|
|
15
|
-
color: t ? x.getDesignToken(
|
|
14
|
+
color: t ? x.getDesignToken(g).colorSuccess : "#BDBDBD"
|
|
16
15
|
}), p = typeof o == "string" ? s.cloneElement(
|
|
17
16
|
/* @__PURE__ */ l(
|
|
18
|
-
|
|
17
|
+
f.Text,
|
|
19
18
|
{
|
|
20
19
|
className: r("font-medium", {
|
|
21
20
|
"text-dodgerBlue": e || t,
|
|
@@ -57,5 +56,5 @@ const D = ({
|
|
|
57
56
|
);
|
|
58
57
|
};
|
|
59
58
|
export {
|
|
60
|
-
|
|
59
|
+
v as Tab
|
|
61
60
|
};
|
|
@@ -1,266 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { u as J } from "../../useClosable-4G12n4Bp.js";
|
|
7
|
-
import { h as K, r as Y, d as B, m as Z, T as ee, C as H, B as _, D as oe } from "../../index-1KQbTQJ2.js";
|
|
8
|
-
import { W as re } from "../../index-ZT64Ec6u.js";
|
|
9
|
-
const te = (e) => {
|
|
10
|
-
const {
|
|
11
|
-
paddingXXS: r,
|
|
12
|
-
lineWidth: n,
|
|
13
|
-
tagPaddingHorizontal: o,
|
|
14
|
-
componentCls: t,
|
|
15
|
-
calc: c
|
|
16
|
-
} = e, s = c(o).sub(n).equal(), p = c(r).sub(n).equal();
|
|
17
|
-
return {
|
|
18
|
-
// Result
|
|
19
|
-
[t]: Object.assign(Object.assign({}, Y(e)), {
|
|
20
|
-
display: "inline-block",
|
|
21
|
-
height: "auto",
|
|
22
|
-
marginInlineEnd: e.marginXS,
|
|
23
|
-
paddingInline: s,
|
|
24
|
-
fontSize: e.tagFontSize,
|
|
25
|
-
lineHeight: e.tagLineHeight,
|
|
26
|
-
whiteSpace: "nowrap",
|
|
27
|
-
background: e.defaultBg,
|
|
28
|
-
border: `${B(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
|
|
29
|
-
borderRadius: e.borderRadiusSM,
|
|
30
|
-
opacity: 1,
|
|
31
|
-
transition: `all ${e.motionDurationMid}`,
|
|
32
|
-
textAlign: "start",
|
|
33
|
-
position: "relative",
|
|
34
|
-
// RTL
|
|
35
|
-
[`&${t}-rtl`]: {
|
|
36
|
-
direction: "rtl"
|
|
37
|
-
},
|
|
38
|
-
"&, a, a:hover": {
|
|
39
|
-
color: e.defaultColor
|
|
40
|
-
},
|
|
41
|
-
[`${t}-close-icon`]: {
|
|
42
|
-
marginInlineStart: p,
|
|
43
|
-
fontSize: e.tagIconSize,
|
|
44
|
-
color: e.colorTextDescription,
|
|
45
|
-
cursor: "pointer",
|
|
46
|
-
transition: `all ${e.motionDurationMid}`,
|
|
47
|
-
"&:hover": {
|
|
48
|
-
color: e.colorTextHeading
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
[`&${t}-has-color`]: {
|
|
52
|
-
borderColor: "transparent",
|
|
53
|
-
[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
|
|
54
|
-
color: e.colorTextLightSolid
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"&-checkable": {
|
|
58
|
-
backgroundColor: "transparent",
|
|
59
|
-
borderColor: "transparent",
|
|
60
|
-
cursor: "pointer",
|
|
61
|
-
[`&:not(${t}-checkable-checked):hover`]: {
|
|
62
|
-
color: e.colorPrimary,
|
|
63
|
-
backgroundColor: e.colorFillSecondary
|
|
64
|
-
},
|
|
65
|
-
"&:active, &-checked": {
|
|
66
|
-
color: e.colorTextLightSolid
|
|
67
|
-
},
|
|
68
|
-
"&-checked": {
|
|
69
|
-
backgroundColor: e.colorPrimary,
|
|
70
|
-
"&:hover": {
|
|
71
|
-
backgroundColor: e.colorPrimaryHover
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"&:active": {
|
|
75
|
-
backgroundColor: e.colorPrimaryActive
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"&-hidden": {
|
|
79
|
-
display: "none"
|
|
80
|
-
},
|
|
81
|
-
// To ensure that a space will be placed between character and `Icon`.
|
|
82
|
-
[`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
|
|
83
|
-
marginInlineStart: s
|
|
84
|
-
}
|
|
85
|
-
}),
|
|
86
|
-
[`${t}-borderless`]: {
|
|
87
|
-
borderColor: "transparent",
|
|
88
|
-
background: e.tagBorderlessBg
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}, T = (e) => {
|
|
92
|
-
const {
|
|
93
|
-
lineWidth: r,
|
|
94
|
-
fontSizeIcon: n,
|
|
95
|
-
calc: o
|
|
96
|
-
} = e, t = e.fontSizeSM;
|
|
97
|
-
return Z(e, {
|
|
98
|
-
tagFontSize: t,
|
|
99
|
-
tagLineHeight: B(o(e.lineHeightSM).mul(t).equal()),
|
|
100
|
-
tagIconSize: o(n).sub(o(r).mul(2)).equal(),
|
|
101
|
-
// Tag icon is much smaller
|
|
102
|
-
tagPaddingHorizontal: 8,
|
|
103
|
-
// Fixed padding.
|
|
104
|
-
tagBorderlessBg: e.colorFillTertiary
|
|
105
|
-
});
|
|
106
|
-
}, O = (e) => ({
|
|
107
|
-
defaultBg: new ee(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
|
|
108
|
-
defaultColor: e.colorText
|
|
109
|
-
}), W = K("Tag", (e) => {
|
|
110
|
-
const r = T(e);
|
|
111
|
-
return te(r);
|
|
112
|
-
}, O);
|
|
113
|
-
var ne = function(e, r) {
|
|
114
|
-
var n = {};
|
|
115
|
-
for (var o in e)
|
|
116
|
-
Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
117
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
118
|
-
for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
|
|
119
|
-
r.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (n[o[t]] = e[o[t]]);
|
|
120
|
-
return n;
|
|
121
|
-
};
|
|
122
|
-
const le = /* @__PURE__ */ l.forwardRef((e, r) => {
|
|
123
|
-
const {
|
|
124
|
-
prefixCls: n,
|
|
125
|
-
style: o,
|
|
126
|
-
className: t,
|
|
127
|
-
checked: c,
|
|
128
|
-
onChange: s,
|
|
129
|
-
onClick: p
|
|
130
|
-
} = e, i = ne(e, ["prefixCls", "style", "className", "checked", "onChange", "onClick"]), {
|
|
131
|
-
getPrefixCls: f,
|
|
132
|
-
tag: d
|
|
133
|
-
} = l.useContext(H), h = (S) => {
|
|
134
|
-
s == null || s(!c), p == null || p(S);
|
|
135
|
-
}, m = f("tag", n), [g, y, v] = W(m), u = x(m, `${m}-checkable`, {
|
|
136
|
-
[`${m}-checkable-checked`]: c
|
|
137
|
-
}, d == null ? void 0 : d.className, t, y, v);
|
|
138
|
-
return g(/* @__PURE__ */ l.createElement("span", Object.assign({}, i, {
|
|
139
|
-
ref: r,
|
|
140
|
-
style: Object.assign(Object.assign({}, o), d == null ? void 0 : d.style),
|
|
141
|
-
className: u,
|
|
142
|
-
onClick: h
|
|
143
|
-
})));
|
|
144
|
-
}), se = le, ae = (e) => U(e, (r, n) => {
|
|
145
|
-
let {
|
|
146
|
-
textColor: o,
|
|
147
|
-
lightBorderColor: t,
|
|
148
|
-
lightColor: c,
|
|
149
|
-
darkColor: s
|
|
150
|
-
} = n;
|
|
151
|
-
return {
|
|
152
|
-
[`${e.componentCls}${e.componentCls}-${r}`]: {
|
|
153
|
-
color: o,
|
|
154
|
-
background: c,
|
|
155
|
-
borderColor: t,
|
|
156
|
-
// Inverse color
|
|
157
|
-
"&-inverse": {
|
|
158
|
-
color: e.colorTextLightSolid,
|
|
159
|
-
background: s,
|
|
160
|
-
borderColor: s
|
|
161
|
-
},
|
|
162
|
-
[`&${e.componentCls}-borderless`]: {
|
|
163
|
-
borderColor: "transparent"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
}), ce = _(["Tag", "preset"], (e) => {
|
|
168
|
-
const r = T(e);
|
|
169
|
-
return ae(r);
|
|
170
|
-
}, O);
|
|
171
|
-
function ie(e) {
|
|
172
|
-
return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
|
|
173
|
-
}
|
|
174
|
-
const b = (e, r, n) => {
|
|
175
|
-
const o = ie(n);
|
|
176
|
-
return {
|
|
177
|
-
[`${e.componentCls}${e.componentCls}-${r}`]: {
|
|
178
|
-
color: e[`color${n}`],
|
|
179
|
-
background: e[`color${o}Bg`],
|
|
180
|
-
borderColor: e[`color${o}Border`],
|
|
181
|
-
[`&${e.componentCls}-borderless`]: {
|
|
182
|
-
borderColor: "transparent"
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
}, de = _(["Tag", "status"], (e) => {
|
|
187
|
-
const r = T(e);
|
|
188
|
-
return [b(r, "success", "Success"), b(r, "processing", "Info"), b(r, "error", "Error"), b(r, "warning", "Warning")];
|
|
189
|
-
}, O);
|
|
190
|
-
var ge = function(e, r) {
|
|
191
|
-
var n = {};
|
|
192
|
-
for (var o in e)
|
|
193
|
-
Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
194
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
195
|
-
for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
|
|
196
|
-
r.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (n[o[t]] = e[o[t]]);
|
|
197
|
-
return n;
|
|
198
|
-
};
|
|
199
|
-
const ue = (e, r) => {
|
|
200
|
-
const {
|
|
201
|
-
prefixCls: n,
|
|
202
|
-
className: o,
|
|
203
|
-
rootClassName: t,
|
|
204
|
-
style: c,
|
|
205
|
-
children: s,
|
|
206
|
-
icon: p,
|
|
207
|
-
color: i,
|
|
208
|
-
onClose: f,
|
|
209
|
-
closeIcon: d,
|
|
210
|
-
closable: h,
|
|
211
|
-
bordered: m = !0
|
|
212
|
-
} = e, g = ge(e, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "closeIcon", "closable", "bordered"]), {
|
|
213
|
-
getPrefixCls: y,
|
|
214
|
-
direction: v,
|
|
215
|
-
tag: u
|
|
216
|
-
} = l.useContext(H), [S, N] = l.useState(!0);
|
|
217
|
-
process.env.NODE_ENV !== "production" && oe("Tag").deprecated(!("visible" in g), "visible", "visible && <Tag />"), l.useEffect(() => {
|
|
218
|
-
"visible" in g && N(g.visible);
|
|
219
|
-
}, [g.visible]);
|
|
220
|
-
const j = Q(i), E = G(i), $ = j || E, V = Object.assign(Object.assign({
|
|
221
|
-
backgroundColor: i && !$ ? i : void 0
|
|
222
|
-
}, u == null ? void 0 : u.style), c), a = y("tag", n), [D, F, M] = W(a), L = x(a, u == null ? void 0 : u.className, {
|
|
223
|
-
[`${a}-${i}`]: $,
|
|
224
|
-
[`${a}-has-color`]: i && !$,
|
|
225
|
-
[`${a}-hidden`]: !S,
|
|
226
|
-
[`${a}-rtl`]: v === "rtl",
|
|
227
|
-
[`${a}-borderless`]: !m
|
|
228
|
-
}, o, t, F, M), I = (C) => {
|
|
229
|
-
C.stopPropagation(), f == null || f(C), !C.defaultPrevented && N(!1);
|
|
230
|
-
}, [, R] = J(h, d, (C) => C === null ? /* @__PURE__ */ l.createElement(X, {
|
|
231
|
-
className: `${a}-close-icon`,
|
|
232
|
-
onClick: I
|
|
233
|
-
}) : /* @__PURE__ */ l.createElement("span", {
|
|
234
|
-
className: `${a}-close-icon`,
|
|
235
|
-
onClick: I
|
|
236
|
-
}, C), null, !1), k = typeof g.onClick == "function" || s && s.type === "a", w = p || null, q = w ? /* @__PURE__ */ l.createElement(l.Fragment, null, w, s && /* @__PURE__ */ l.createElement("span", null, s)) : s, z = /* @__PURE__ */ l.createElement("span", Object.assign({}, g, {
|
|
237
|
-
ref: r,
|
|
238
|
-
className: L,
|
|
239
|
-
style: V
|
|
240
|
-
}), q, R, j && /* @__PURE__ */ l.createElement(ce, {
|
|
241
|
-
key: "preset",
|
|
242
|
-
prefixCls: a
|
|
243
|
-
}), E && /* @__PURE__ */ l.createElement(de, {
|
|
244
|
-
key: "status",
|
|
245
|
-
prefixCls: a
|
|
246
|
-
}));
|
|
247
|
-
return D(k ? /* @__PURE__ */ l.createElement(re, {
|
|
248
|
-
component: "Tag"
|
|
249
|
-
}, z) : z);
|
|
250
|
-
}, P = /* @__PURE__ */ l.forwardRef(ue);
|
|
251
|
-
process.env.NODE_ENV !== "production" && (P.displayName = "Tag");
|
|
252
|
-
P.CheckableTag = se;
|
|
253
|
-
const pe = P, Se = ({ children: e, className: r, ...n }) => /* @__PURE__ */ A(
|
|
254
|
-
pe,
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as o } from "antd";
|
|
3
|
+
import s from "classnames";
|
|
4
|
+
const f = ({ children: e, className: t, ...r }) => /* @__PURE__ */ m(
|
|
5
|
+
o,
|
|
255
6
|
{
|
|
256
|
-
...
|
|
257
|
-
className:
|
|
258
|
-
|
|
7
|
+
...r,
|
|
8
|
+
className: s(
|
|
9
|
+
t,
|
|
259
10
|
"flex items-center justify-center border-0 rounded-md p-2 font-medium text-xs text-center"
|
|
260
11
|
),
|
|
261
12
|
children: e
|
|
262
13
|
}
|
|
263
14
|
);
|
|
264
15
|
export {
|
|
265
|
-
|
|
16
|
+
f as Tag
|
|
266
17
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as s } from "antd";
|
|
3
|
+
import r from "classnames";
|
|
4
|
+
import c from "react";
|
|
5
5
|
const m = ({
|
|
6
6
|
items: t = []
|
|
7
|
-
}) => /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */ l("div", { className: "flex justify-between", children: t.map((e, a) => /* @__PURE__ */
|
|
9
|
-
typeof e.label == "string" ? /* @__PURE__ */ l(
|
|
7
|
+
}) => /* @__PURE__ */ o("div", { className: "relative", children: [
|
|
8
|
+
/* @__PURE__ */ l("div", { className: "flex justify-between", children: t.map((e, a) => /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-y-3", children: [
|
|
9
|
+
typeof e.label == "string" ? /* @__PURE__ */ l(s.Text, { className: "font-semibold text-xs", children: e.label }) : c.cloneElement(e.label, {
|
|
10
10
|
className: r([
|
|
11
11
|
e.label.props.className,
|
|
12
12
|
"font-semibold text-xs"
|
|
@@ -1,127 +1,112 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return N(c, o) && N(r, n);
|
|
13
|
-
}
|
|
14
|
-
function M(e) {
|
|
15
|
-
var s = O(), o = s.formatMessage, r = s.textComponent, c = r === void 0 ? f.Fragment : r, n = e.id, h = e.description, p = e.defaultMessage, t = e.values, i = e.children, a = e.tagName, m = a === void 0 ? c : a, d = e.ignoreTag, T = { id: n, description: h, defaultMessage: p }, u = o(T, t, {
|
|
16
|
-
ignoreTag: d
|
|
17
|
-
});
|
|
18
|
-
return typeof i == "function" ? i(Array.isArray(u) ? u : [u]) : m ? f.createElement(m, null, f.Children.toArray(u)) : f.createElement(f.Fragment, null, u);
|
|
19
|
-
}
|
|
20
|
-
M.displayName = "FormattedMessage";
|
|
21
|
-
var w = f.memo(M, C);
|
|
22
|
-
w.displayName = "MemoizedFormattedMessage";
|
|
23
|
-
const D = w, S = ({
|
|
24
|
-
multiple: e = !1,
|
|
25
|
-
onChange: s,
|
|
26
|
-
value: o
|
|
1
|
+
import { jsxs as c, jsx as r, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as p } from "antd";
|
|
3
|
+
import h from "classnames";
|
|
4
|
+
import { useState as N, useRef as v, useEffect as x } from "react";
|
|
5
|
+
import w from "../../icons/file-icon/index.js";
|
|
6
|
+
import { FormattedNumberParts as F, FormattedMessage as k } from "react-intl";
|
|
7
|
+
import { D as j, U as u } from "../../UploadOutlined-9WKjHsqa.js";
|
|
8
|
+
const B = ({
|
|
9
|
+
multiple: l = !1,
|
|
10
|
+
onChange: a,
|
|
11
|
+
value: f
|
|
27
12
|
}) => {
|
|
28
|
-
const [
|
|
13
|
+
const [s, d] = N([]), o = v(null), g = (e) => {
|
|
29
14
|
var i;
|
|
30
|
-
(i =
|
|
31
|
-
...
|
|
32
|
-
...Array.from(Array(
|
|
33
|
-
(
|
|
34
|
-
var
|
|
35
|
-
return (
|
|
15
|
+
(i = e.target.files) != null && i.length && d(l ? [
|
|
16
|
+
...s,
|
|
17
|
+
...Array.from(Array(e.target.files.length)).map(
|
|
18
|
+
(t, m) => {
|
|
19
|
+
var n;
|
|
20
|
+
return (n = e.target.files) == null ? void 0 : n.item(m);
|
|
36
21
|
}
|
|
37
22
|
)
|
|
38
|
-
] : Array.from(Array(
|
|
39
|
-
(
|
|
40
|
-
var
|
|
41
|
-
return (
|
|
23
|
+
] : Array.from(Array(e.target.files.length)).map(
|
|
24
|
+
(t, m) => {
|
|
25
|
+
var n;
|
|
26
|
+
return (n = e.target.files) == null ? void 0 : n.item(m);
|
|
42
27
|
}
|
|
43
28
|
));
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
...
|
|
48
|
-
...
|
|
29
|
+
}, y = (e, i) => {
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
const t = [
|
|
32
|
+
...s.slice(0, i),
|
|
33
|
+
...s.slice(i + 1)
|
|
49
34
|
];
|
|
50
|
-
|
|
35
|
+
d(t), a && a(t.length === 0 ? null : t), o.current && (o.current.value = "");
|
|
51
36
|
};
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
|
|
37
|
+
return x(() => {
|
|
38
|
+
f && f.length > 0 && d(f);
|
|
39
|
+
}, [f]), x(() => {
|
|
40
|
+
s.length > 0 && a && a(s);
|
|
41
|
+
}, [s, a]), /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-4", children: [
|
|
42
|
+
s.map((e, i) => /* @__PURE__ */ c(
|
|
58
43
|
"div",
|
|
59
44
|
{
|
|
60
|
-
className:
|
|
45
|
+
className: h(
|
|
61
46
|
"max-w-[258px] relative group flex items-center gap-x-3 py-2 pe-2 ps-4 bg-lightBlue rounded-2xl hover:cursor-pointer",
|
|
62
|
-
{ "basis-full": !
|
|
47
|
+
{ "basis-full": !l, "basis-1/3": l }
|
|
63
48
|
),
|
|
64
49
|
role: "button",
|
|
65
50
|
onClick: () => {
|
|
66
|
-
var
|
|
67
|
-
return (
|
|
51
|
+
var t;
|
|
52
|
+
return (t = o.current) == null ? void 0 : t.click();
|
|
68
53
|
},
|
|
69
54
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ r(
|
|
71
56
|
"div",
|
|
72
57
|
{
|
|
73
58
|
className: "absolute opacity-0 group-hover:opacity-100 transition-opacity -left-2 -top-2 flex items-center justify-center text-ghostWhite bg-coral rounded-full w-6 h-6",
|
|
74
|
-
onClick: (
|
|
75
|
-
children: /* @__PURE__ */
|
|
59
|
+
onClick: (t) => y(t, i),
|
|
60
|
+
children: /* @__PURE__ */ r(j, { size: 4 })
|
|
76
61
|
}
|
|
77
62
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
63
|
+
/* @__PURE__ */ r(u, { className: "flex-1 text-slateGray" }),
|
|
64
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col items-end gap-y-1", children: [
|
|
65
|
+
/* @__PURE__ */ r(p.Text, { className: "text-xs font-semibold text-ellipsis overflow-hidden whitespace-nowrap max-w-[170px]", children: e.name }),
|
|
66
|
+
/* @__PURE__ */ r(p.Text, { className: "text-xs", children: /* @__PURE__ */ r(F, { value: e.size, children: (t) => /* @__PURE__ */ c(b, { children: [
|
|
67
|
+
t[0].value,
|
|
83
68
|
" Kb"
|
|
84
69
|
] }) }) })
|
|
85
70
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ r(w, {})
|
|
87
72
|
]
|
|
88
73
|
},
|
|
89
|
-
|
|
74
|
+
e.name
|
|
90
75
|
)),
|
|
91
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ c(
|
|
92
77
|
"div",
|
|
93
78
|
{
|
|
94
|
-
className:
|
|
79
|
+
className: h(
|
|
95
80
|
"max-w-[258px] flex flex-col items-center justify-center py-2 bg-lightBlue rounded-2xl hover:cursor-pointer",
|
|
96
81
|
{
|
|
97
|
-
hidden: !
|
|
98
|
-
"basis-full": !
|
|
99
|
-
"basis-1/3":
|
|
82
|
+
hidden: !l && s.length > 0,
|
|
83
|
+
"basis-full": !l,
|
|
84
|
+
"basis-1/3": l
|
|
100
85
|
}
|
|
101
86
|
),
|
|
102
87
|
role: "button",
|
|
103
88
|
onClick: () => {
|
|
104
|
-
var
|
|
105
|
-
return (
|
|
89
|
+
var e;
|
|
90
|
+
return (e = o.current) == null ? void 0 : e.click();
|
|
106
91
|
},
|
|
107
92
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ r(
|
|
109
94
|
"input",
|
|
110
95
|
{
|
|
111
|
-
ref:
|
|
96
|
+
ref: o,
|
|
112
97
|
type: "file",
|
|
113
|
-
multiple:
|
|
98
|
+
multiple: l,
|
|
114
99
|
className: "!hidden",
|
|
115
|
-
onChange:
|
|
100
|
+
onChange: g
|
|
116
101
|
}
|
|
117
102
|
),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ r(u, {}),
|
|
104
|
+
/* @__PURE__ */ r(p.Text, { children: /* @__PURE__ */ r(k, { id: "upload_file" }) })
|
|
120
105
|
]
|
|
121
106
|
}
|
|
122
107
|
)
|
|
123
108
|
] });
|
|
124
109
|
};
|
|
125
110
|
export {
|
|
126
|
-
|
|
111
|
+
B as Upload
|
|
127
112
|
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { theme as g, Typography as x, Space as m } from "antd";
|
|
3
|
+
import c from "classnames";
|
|
4
|
+
import n, { useContext as y, createContext as f, useState as v } from "react";
|
|
5
|
+
import N from "./icons/dashboard-icon/index.js";
|
|
6
|
+
import { libTheme as k } from "./theme.js";
|
|
7
|
+
const d = ({
|
|
8
|
+
icon: t = /* @__PURE__ */ o(N, {}),
|
|
9
|
+
content: l,
|
|
10
|
+
onClick: s,
|
|
11
|
+
className: a
|
|
12
|
+
}) => {
|
|
13
|
+
const r = y(i), e = c(
|
|
14
|
+
"text-sm leading-none",
|
|
15
|
+
{
|
|
16
|
+
"text-dodgerBlue": r,
|
|
17
|
+
"font-bold": r
|
|
18
|
+
},
|
|
19
|
+
typeof l == "string" ? null : l.props.className
|
|
20
|
+
), h = n.cloneElement(t, {
|
|
21
|
+
color: r ? g.getDesignToken(k).colorPrimary : "#64748B"
|
|
22
|
+
}), u = typeof l == "string" ? n.cloneElement(
|
|
23
|
+
/* @__PURE__ */ o(x.Text, { className: e, children: l })
|
|
24
|
+
) : n.cloneElement(l, {
|
|
25
|
+
...l.props,
|
|
26
|
+
className: e
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ p(
|
|
29
|
+
m,
|
|
30
|
+
{
|
|
31
|
+
size: 16,
|
|
32
|
+
onClick: s,
|
|
33
|
+
className: c(
|
|
34
|
+
"w-full leading-[0px] py-3 px-4 rounded-xl hover:cursor-pointer transition-colors duration-300 hover:bg-ghostWhite",
|
|
35
|
+
{
|
|
36
|
+
"bg-ghostWhite": r
|
|
37
|
+
},
|
|
38
|
+
a
|
|
39
|
+
),
|
|
40
|
+
children: [
|
|
41
|
+
h,
|
|
42
|
+
u
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}, i = f(!1), M = ({ items: t, footerItems: l }) => {
|
|
47
|
+
const [s, a] = v();
|
|
48
|
+
return /* @__PURE__ */ p("div", { className: "w-full h-full flex flex-col gap-y-2", children: [
|
|
49
|
+
t.map(({ onClick: r, ...e }) => /* @__PURE__ */ o(
|
|
50
|
+
i.Provider,
|
|
51
|
+
{
|
|
52
|
+
value: s === e.key,
|
|
53
|
+
children: /* @__PURE__ */ o(
|
|
54
|
+
d,
|
|
55
|
+
{
|
|
56
|
+
...e,
|
|
57
|
+
onClick: () => {
|
|
58
|
+
a(e.key), r && r();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
},
|
|
63
|
+
e.key
|
|
64
|
+
)),
|
|
65
|
+
/* @__PURE__ */ o(m, { direction: "vertical", className: "mt-auto", children: l == null ? void 0 : l.map(({ onClick: r, ...e }) => /* @__PURE__ */ o(
|
|
66
|
+
i.Provider,
|
|
67
|
+
{
|
|
68
|
+
value: s === e.key,
|
|
69
|
+
children: /* @__PURE__ */ o(
|
|
70
|
+
d,
|
|
71
|
+
{
|
|
72
|
+
...e,
|
|
73
|
+
onClick: () => {
|
|
74
|
+
a(e.key), r && r();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
},
|
|
79
|
+
e.key
|
|
80
|
+
)) })
|
|
81
|
+
] });
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
i as H,
|
|
85
|
+
M as S,
|
|
86
|
+
d as a
|
|
87
|
+
};
|