gasp-components 1.0.7 → 1.0.9
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/assets/index.css +1 -0
- package/dist/assets/main.css +1 -0
- package/dist/components/ag-grid-table/index.js +3 -2
- package/dist/components/button/index.js +23 -34
- package/dist/components/checklist/checklist-item.js +11 -16
- package/dist/components/checklist/index.js +7 -13
- package/dist/components/date-picker/index.js +2 -9
- package/dist/components/dragger/index.js +64 -91
- package/dist/components/dropdown/index.js +12 -40
- package/dist/components/form/index.js +18 -45
- package/dist/components/form-item/index.js +23 -50
- package/dist/components/input/index.js +11 -32
- package/dist/components/modal/index.js +27 -52
- package/dist/components/password-input/index.js +8 -29
- package/dist/components/progress/index.js +22 -53
- package/dist/components/progress-circle/index.js +12 -32
- package/dist/components/radio-button/index.js +13 -40
- package/dist/components/radio-button-group/index.js +23 -52
- package/dist/components/result-popup/index.js +21 -59
- package/dist/components/select/index.js +12 -40
- package/dist/components/side-menu/index.js +3 -35
- package/dist/components/side-menu/menu-item.js +2 -29
- package/dist/components/table/index.js +2 -17
- package/dist/components/tabs/index.js +28 -58
- package/dist/components/tabs/tab.js +30 -57
- package/dist/components/tag/index.js +2 -6
- package/dist/components/timeline-horizontal/index.js +19 -46
- package/dist/components/upload/index.js +52 -79
- package/dist/main.js +193 -255
- package/package.json +4 -2
- package/dist/assets/style.css +0 -1
|
@@ -1,87 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as g, jsx as l, Fragment as _ } from "react/jsx-runtime";
|
|
2
2
|
import { c as v } from "../../index-NQd_zMf0.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as f from "react";
|
|
4
4
|
import { useState as A, useRef as k, useEffect as y } from "react";
|
|
5
5
|
import E from "../../icons/file-icon/index.js";
|
|
6
6
|
import "../../index-s3u4YBl4.js";
|
|
7
7
|
import { T as x } from "../../index-0mpuHoS5.js";
|
|
8
8
|
import { _ as b, s as N, u as O, F as j } from "../../createFormattedComponent-FcpICAm8.js";
|
|
9
9
|
import { D as z, U as F } from "../../UploadOutlined-D8jfLEgv.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import "../../isVisible-Qi9l15Ty.js";
|
|
14
|
-
import "../../index--6VfGMUo.js";
|
|
15
|
-
import "../../Compact-fdEKV_mF.js";
|
|
16
|
-
import "../../useMergedState-qUafLuUa.js";
|
|
17
|
-
import "../../omit-ylWA0ZLZ.js";
|
|
18
|
-
import "../../styleChecker-pZ3k2IiY.js";
|
|
19
|
-
import "../../KeyCode-qFRXB1-n.js";
|
|
20
|
-
import "../../useLocale-eThlLZJw.js";
|
|
21
|
-
import "../../index-5Uo03BMk.js";
|
|
22
|
-
import "../../index-L-MzVDcK.js";
|
|
23
|
-
import "../../motion-0ToOu81j.js";
|
|
24
|
-
import "../../motion-NQme0FJ_.js";
|
|
25
|
-
import "../../roundedArrow-p1Pmd9av.js";
|
|
26
|
-
import "../../reactNode-R20zZQk1.js";
|
|
27
|
-
import "../../zoom-Ps8y0jNW.js";
|
|
28
|
-
import "../../colors-opGg9oSz.js";
|
|
29
|
-
import "../../TextArea-n3dknzTq.js";
|
|
30
|
-
import "../../CloseCircleFilled-bIgIULWb.js";
|
|
31
|
-
import "../../useVariants-s0IcneBD.js";
|
|
32
|
-
import "../../context-h3WSVDPz.js";
|
|
33
|
-
import "../../asyncToGenerator-t4sKr8R4.js";
|
|
34
|
-
import "../../index-GgkQrebz.js";
|
|
35
|
-
import "../../compact-item-jjuVmDBH.js";
|
|
36
|
-
import "../../useCSSVarCls-GwZT_WiF.js";
|
|
37
|
-
function C(e, i) {
|
|
38
|
-
var n = e.values, a = b(e, ["values"]), m = i.values, l = b(i, ["values"]);
|
|
39
|
-
return N(m, n) && N(a, l);
|
|
10
|
+
function C(e, s) {
|
|
11
|
+
var o = e.values, r = b(e, ["values"]), c = s.values, n = b(s, ["values"]);
|
|
12
|
+
return N(c, o) && N(r, n);
|
|
40
13
|
}
|
|
41
14
|
function M(e) {
|
|
42
|
-
var
|
|
43
|
-
ignoreTag:
|
|
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
|
|
44
17
|
});
|
|
45
|
-
return typeof
|
|
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);
|
|
46
19
|
}
|
|
47
20
|
M.displayName = "FormattedMessage";
|
|
48
|
-
var w =
|
|
21
|
+
var w = f.memo(M, C);
|
|
49
22
|
w.displayName = "MemoizedFormattedMessage";
|
|
50
|
-
const D = w,
|
|
23
|
+
const D = w, S = ({
|
|
51
24
|
multiple: e = !1,
|
|
52
|
-
onChange:
|
|
53
|
-
value:
|
|
25
|
+
onChange: s,
|
|
26
|
+
value: o
|
|
54
27
|
}) => {
|
|
55
|
-
const [
|
|
56
|
-
var
|
|
57
|
-
(
|
|
58
|
-
...
|
|
28
|
+
const [r, c] = A([]), n = k(null), h = (t) => {
|
|
29
|
+
var i;
|
|
30
|
+
(i = t.target.files) != null && i.length && c(e ? [
|
|
31
|
+
...r,
|
|
59
32
|
...Array.from(Array(t.target.files.length)).map(
|
|
60
|
-
(
|
|
61
|
-
var
|
|
62
|
-
return (
|
|
33
|
+
(a, m) => {
|
|
34
|
+
var d;
|
|
35
|
+
return (d = t.target.files) == null ? void 0 : d.item(m);
|
|
63
36
|
}
|
|
64
37
|
)
|
|
65
38
|
] : Array.from(Array(t.target.files.length)).map(
|
|
66
|
-
(
|
|
67
|
-
var
|
|
68
|
-
return (
|
|
39
|
+
(a, m) => {
|
|
40
|
+
var d;
|
|
41
|
+
return (d = t.target.files) == null ? void 0 : d.item(m);
|
|
69
42
|
}
|
|
70
43
|
));
|
|
71
|
-
},
|
|
44
|
+
}, p = (t, i) => {
|
|
72
45
|
t.stopPropagation();
|
|
73
|
-
const
|
|
74
|
-
...
|
|
75
|
-
...
|
|
46
|
+
const a = [
|
|
47
|
+
...r.slice(0, i),
|
|
48
|
+
...r.slice(i + 1)
|
|
76
49
|
];
|
|
77
|
-
|
|
50
|
+
c(a), s && s(a.length === 0 ? null : a), n.current && (n.current.value = "");
|
|
78
51
|
};
|
|
79
52
|
return y(() => {
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
|
|
83
|
-
}, [
|
|
84
|
-
|
|
53
|
+
o && o.length > 0 && c(o);
|
|
54
|
+
}, [o]), y(() => {
|
|
55
|
+
r.length > 0 && s && s(r);
|
|
56
|
+
}, [r, s]), /* @__PURE__ */ g("div", { className: "flex flex-wrap gap-4", children: [
|
|
57
|
+
r.map((t, i) => /* @__PURE__ */ g(
|
|
85
58
|
"div",
|
|
86
59
|
{
|
|
87
60
|
className: v(
|
|
@@ -90,38 +63,38 @@ const D = w, he = ({
|
|
|
90
63
|
),
|
|
91
64
|
role: "button",
|
|
92
65
|
onClick: () => {
|
|
93
|
-
var
|
|
94
|
-
return (
|
|
66
|
+
var a;
|
|
67
|
+
return (a = n.current) == null ? void 0 : a.click();
|
|
95
68
|
},
|
|
96
69
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ l(
|
|
98
71
|
"div",
|
|
99
72
|
{
|
|
100
73
|
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",
|
|
101
|
-
onClick: (
|
|
102
|
-
children: /* @__PURE__ */
|
|
74
|
+
onClick: (a) => p(a, i),
|
|
75
|
+
children: /* @__PURE__ */ l(z, { size: 4 })
|
|
103
76
|
}
|
|
104
77
|
),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
|
|
78
|
+
/* @__PURE__ */ l(F, { className: "flex-1 text-slateGray" }),
|
|
79
|
+
/* @__PURE__ */ g("div", { className: "flex flex-col items-end gap-y-1", children: [
|
|
80
|
+
/* @__PURE__ */ l(x.Text, { className: "text-xs font-semibold text-ellipsis overflow-hidden whitespace-nowrap max-w-[170px]", children: t.name }),
|
|
81
|
+
/* @__PURE__ */ l(x.Text, { className: "text-xs", children: /* @__PURE__ */ l(j, { value: t.size, children: (a) => /* @__PURE__ */ g(_, { children: [
|
|
82
|
+
a[0].value,
|
|
110
83
|
" Kb"
|
|
111
84
|
] }) }) })
|
|
112
85
|
] }),
|
|
113
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ l(E, {})
|
|
114
87
|
]
|
|
115
88
|
},
|
|
116
89
|
t.name
|
|
117
90
|
)),
|
|
118
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ g(
|
|
119
92
|
"div",
|
|
120
93
|
{
|
|
121
94
|
className: v(
|
|
122
95
|
"max-w-[258px] flex flex-col items-center justify-center py-2 bg-lightBlue rounded-2xl hover:cursor-pointer",
|
|
123
96
|
{
|
|
124
|
-
hidden: !e &&
|
|
97
|
+
hidden: !e && r.length > 0,
|
|
125
98
|
"basis-full": !e,
|
|
126
99
|
"basis-1/3": e
|
|
127
100
|
}
|
|
@@ -129,26 +102,26 @@ const D = w, he = ({
|
|
|
129
102
|
role: "button",
|
|
130
103
|
onClick: () => {
|
|
131
104
|
var t;
|
|
132
|
-
return (t =
|
|
105
|
+
return (t = n.current) == null ? void 0 : t.click();
|
|
133
106
|
},
|
|
134
107
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ l(
|
|
136
109
|
"input",
|
|
137
110
|
{
|
|
138
|
-
ref:
|
|
111
|
+
ref: n,
|
|
139
112
|
type: "file",
|
|
140
113
|
multiple: e,
|
|
141
114
|
className: "!hidden",
|
|
142
|
-
onChange:
|
|
115
|
+
onChange: h
|
|
143
116
|
}
|
|
144
117
|
),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ l(F, {}),
|
|
119
|
+
/* @__PURE__ */ l(x.Text, { children: /* @__PURE__ */ l(D, { id: "upload_file" }) })
|
|
147
120
|
]
|
|
148
121
|
}
|
|
149
122
|
)
|
|
150
123
|
] });
|
|
151
124
|
};
|
|
152
125
|
export {
|
|
153
|
-
|
|
126
|
+
S as Upload
|
|
154
127
|
};
|