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.
Files changed (31) hide show
  1. package/dist/assets/index.css +1 -0
  2. package/dist/assets/main.css +1 -0
  3. package/dist/components/ag-grid-table/index.js +3 -2
  4. package/dist/components/button/index.js +23 -34
  5. package/dist/components/checklist/checklist-item.js +11 -16
  6. package/dist/components/checklist/index.js +7 -13
  7. package/dist/components/date-picker/index.js +2 -9
  8. package/dist/components/dragger/index.js +64 -91
  9. package/dist/components/dropdown/index.js +12 -40
  10. package/dist/components/form/index.js +18 -45
  11. package/dist/components/form-item/index.js +23 -50
  12. package/dist/components/input/index.js +11 -32
  13. package/dist/components/modal/index.js +27 -52
  14. package/dist/components/password-input/index.js +8 -29
  15. package/dist/components/progress/index.js +22 -53
  16. package/dist/components/progress-circle/index.js +12 -32
  17. package/dist/components/radio-button/index.js +13 -40
  18. package/dist/components/radio-button-group/index.js +23 -52
  19. package/dist/components/result-popup/index.js +21 -59
  20. package/dist/components/select/index.js +12 -40
  21. package/dist/components/side-menu/index.js +3 -35
  22. package/dist/components/side-menu/menu-item.js +2 -29
  23. package/dist/components/table/index.js +2 -17
  24. package/dist/components/tabs/index.js +28 -58
  25. package/dist/components/tabs/tab.js +30 -57
  26. package/dist/components/tag/index.js +2 -6
  27. package/dist/components/timeline-horizontal/index.js +19 -46
  28. package/dist/components/upload/index.js +52 -79
  29. package/dist/main.js +193 -255
  30. package/package.json +4 -2
  31. package/dist/assets/style.css +0 -1
@@ -1,87 +1,60 @@
1
- import { jsxs as u, jsx as s, Fragment as _ } from "react/jsx-runtime";
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 p from "react";
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
- import "../../index-1KQbTQJ2.js";
11
- import "../../index-vtDVJV8q.js";
12
- import "../../CheckOutlined-EgxCAgj_.js";
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 i = O(), n = i.formatMessage, a = i.textComponent, m = a === void 0 ? p.Fragment : a, l = e.id, g = e.description, h = e.defaultMessage, t = e.values, o = e.children, r = e.tagName, d = r === void 0 ? m : r, c = e.ignoreTag, T = { id: l, description: g, defaultMessage: h }, f = n(T, t, {
43
- ignoreTag: c
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 o == "function" ? o(Array.isArray(f) ? f : [f]) : d ? p.createElement(d, null, p.Children.toArray(f)) : p.createElement(p.Fragment, null, f);
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 = p.memo(M, C);
21
+ var w = f.memo(M, C);
49
22
  w.displayName = "MemoizedFormattedMessage";
50
- const D = w, he = ({
23
+ const D = w, S = ({
51
24
  multiple: e = !1,
52
- onChange: i,
53
- value: n
25
+ onChange: s,
26
+ value: o
54
27
  }) => {
55
- const [a, m] = A([]), l = k(null), g = (t) => {
56
- var o;
57
- (o = t.target.files) != null && o.length && m(e ? [
58
- ...a,
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
- (r, d) => {
61
- var c;
62
- return (c = t.target.files) == null ? void 0 : c.item(d);
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
- (r, d) => {
67
- var c;
68
- return (c = t.target.files) == null ? void 0 : c.item(d);
39
+ (a, m) => {
40
+ var d;
41
+ return (d = t.target.files) == null ? void 0 : d.item(m);
69
42
  }
70
43
  ));
71
- }, h = (t, o) => {
44
+ }, p = (t, i) => {
72
45
  t.stopPropagation();
73
- const r = [
74
- ...a.slice(0, o),
75
- ...a.slice(o + 1)
46
+ const a = [
47
+ ...r.slice(0, i),
48
+ ...r.slice(i + 1)
76
49
  ];
77
- m(r), i && i(r.length === 0 ? null : r), l.current && (l.current.value = "");
50
+ c(a), s && s(a.length === 0 ? null : a), n.current && (n.current.value = "");
78
51
  };
79
52
  return y(() => {
80
- n && n.length > 0 && m(n);
81
- }, [n]), y(() => {
82
- a.length > 0 && i && i(a);
83
- }, [a, i]), /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-4", children: [
84
- a.map((t, o) => /* @__PURE__ */ u(
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 r;
94
- return (r = l.current) == null ? void 0 : r.click();
66
+ var a;
67
+ return (a = n.current) == null ? void 0 : a.click();
95
68
  },
96
69
  children: [
97
- /* @__PURE__ */ s(
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: (r) => h(r, o),
102
- children: /* @__PURE__ */ s(z, { size: 4 })
74
+ onClick: (a) => p(a, i),
75
+ children: /* @__PURE__ */ l(z, { size: 4 })
103
76
  }
104
77
  ),
105
- /* @__PURE__ */ s(F, { className: "flex-1 text-slateGray" }),
106
- /* @__PURE__ */ u("div", { className: "flex flex-col items-end gap-y-1", children: [
107
- /* @__PURE__ */ s(x.Text, { className: "text-xs font-semibold text-ellipsis overflow-hidden whitespace-nowrap max-w-[170px]", children: t.name }),
108
- /* @__PURE__ */ s(x.Text, { className: "text-xs", children: /* @__PURE__ */ s(j, { value: t.size, children: (r) => /* @__PURE__ */ u(_, { children: [
109
- r[0].value,
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__ */ s(E, {})
86
+ /* @__PURE__ */ l(E, {})
114
87
  ]
115
88
  },
116
89
  t.name
117
90
  )),
118
- /* @__PURE__ */ u(
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 && a.length > 0,
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 = l.current) == null ? void 0 : t.click();
105
+ return (t = n.current) == null ? void 0 : t.click();
133
106
  },
134
107
  children: [
135
- /* @__PURE__ */ s(
108
+ /* @__PURE__ */ l(
136
109
  "input",
137
110
  {
138
- ref: l,
111
+ ref: n,
139
112
  type: "file",
140
113
  multiple: e,
141
114
  className: "!hidden",
142
- onChange: g
115
+ onChange: h
143
116
  }
144
117
  ),
145
- /* @__PURE__ */ s(F, {}),
146
- /* @__PURE__ */ s(x.Text, { children: /* @__PURE__ */ s(D, { id: "upload_file" }) })
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
- he as Upload
126
+ S as Upload
154
127
  };