gasp-components 1.0.10 → 1.0.11

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 (86) hide show
  1. package/dist/UploadOutlined-9WKjHsqa.js +878 -0
  2. package/dist/components/ag-grid-table/index.js +57877 -38314
  3. package/dist/components/button/index.js +18 -18
  4. package/dist/components/checklist/checklist-item.js +3 -3
  5. package/dist/components/checklist/index.js +5 -5
  6. package/dist/components/date-picker/index.js +9 -5022
  7. package/dist/components/dragger/index.js +28 -28
  8. package/dist/components/dropdown/index.js +10 -11
  9. package/dist/components/form/index.js +8 -9
  10. package/dist/components/form-item/index.js +10 -10
  11. package/dist/components/input/index.js +8 -8
  12. package/dist/components/modal/index.js +18 -20
  13. package/dist/components/password-input/index.js +2 -2
  14. package/dist/components/progress/index.js +16 -18
  15. package/dist/components/progress-circle/index.js +3 -3
  16. package/dist/components/radio-button/index.js +8 -8
  17. package/dist/components/result-popup/index.js +13 -14
  18. package/dist/components/select/index.js +1 -1
  19. package/dist/components/side-menu/index.js +2 -2
  20. package/dist/components/side-menu/menu-item.js +4 -6
  21. package/dist/components/steps/index.js +9 -9
  22. package/dist/components/table/index.js +16 -9298
  23. package/dist/components/tabs/index.js +10 -10
  24. package/dist/components/tabs/tab.js +7 -8
  25. package/dist/components/tag/index.js +9 -258
  26. package/dist/components/timeline-horizontal/index.js +7 -7
  27. package/dist/components/upload/index.js +62 -77
  28. package/dist/index-WlPrqxgY.js +87 -0
  29. package/dist/main.js +69 -457
  30. package/package.json +1 -1
  31. package/dist/CheckCircleFilled-xt-0R96Z.js +0 -16
  32. package/dist/CheckOutlined-EgxCAgj_.js +0 -16
  33. package/dist/CloseCircleFilled-bIgIULWb.js +0 -16
  34. package/dist/CloseOutlined-Q3kC3EZS.js +0 -16
  35. package/dist/Compact-fdEKV_mF.js +0 -180
  36. package/dist/ExclamationCircleFilled-XzDBEGmA.js +0 -16
  37. package/dist/KeyCode-qFRXB1-n.js +0 -517
  38. package/dist/LoadingOutlined-6Ipqn0og.js +0 -16
  39. package/dist/Overflow-JFdXKgCr.js +0 -231
  40. package/dist/PurePanel-hLGnXbul.js +0 -60
  41. package/dist/SearchOutlined-rJTFGXUi.js +0 -16
  42. package/dist/TextArea-n3dknzTq.js +0 -716
  43. package/dist/UploadOutlined-D8jfLEgv.js +0 -27
  44. package/dist/asyncToGenerator-t4sKr8R4.js +0 -340
  45. package/dist/button-LN5ZDad8.js +0 -819
  46. package/dist/collapse-ilv4Tji1.js +0 -20
  47. package/dist/colors-opGg9oSz.js +0 -25
  48. package/dist/compact-item-jjuVmDBH.js +0 -61
  49. package/dist/context-h3WSVDPz.js +0 -2087
  50. package/dist/createFormattedComponent-FcpICAm8.js +0 -3260
  51. package/dist/index--6VfGMUo.js +0 -402
  52. package/dist/index-0mpuHoS5.js +0 -996
  53. package/dist/index-1KQbTQJ2.js +0 -4405
  54. package/dist/index-5Uo03BMk.js +0 -681
  55. package/dist/index-BFgxz47K.js +0 -89
  56. package/dist/index-D3LMPWyJ.js +0 -1437
  57. package/dist/index-DVS_nWxv.js +0 -3026
  58. package/dist/index-ELHBhuK9.js +0 -100
  59. package/dist/index-Fn8q8B3V.js +0 -107
  60. package/dist/index-GgkQrebz.js +0 -950
  61. package/dist/index-L-MzVDcK.js +0 -616
  62. package/dist/index-M3WnMjiA.js +0 -230
  63. package/dist/index-NQd_zMf0.js +0 -69
  64. package/dist/index-ZT64Ec6u.js +0 -267
  65. package/dist/index-aawDqn9q.js +0 -3337
  66. package/dist/index-k04G4nlS.js +0 -1416
  67. package/dist/index-s3u4YBl4.js +0 -8
  68. package/dist/index-vtDVJV8q.js +0 -19571
  69. package/dist/isVisible-Qi9l15Ty.js +0 -232
  70. package/dist/motion-0ToOu81j.js +0 -226
  71. package/dist/motion-NQme0FJ_.js +0 -32
  72. package/dist/omit-ylWA0ZLZ.js +0 -10
  73. package/dist/pickAttrs-zaQzRTqh.js +0 -42
  74. package/dist/progress-a1_pwKVT.js +0 -722
  75. package/dist/reactNode-R20zZQk1.js +0 -18
  76. package/dist/responsiveObserver-V1_1G14X.js +0 -71
  77. package/dist/roundedArrow-p1Pmd9av.js +0 -64
  78. package/dist/row-sPFiFm0C.js +0 -230
  79. package/dist/slide-mFXPRHku.js +0 -265
  80. package/dist/styleChecker-pZ3k2IiY.js +0 -37
  81. package/dist/useCSSVarCls-GwZT_WiF.js +0 -9
  82. package/dist/useClosable-4G12n4Bp.js +0 -15
  83. package/dist/useLocale-eThlLZJw.js +0 -16
  84. package/dist/useMergedState-qUafLuUa.js +0 -23
  85. package/dist/useVariants-s0IcneBD.js +0 -25
  86. package/dist/zoom-Ps8y0jNW.js +0 -174
@@ -1,230 +0,0 @@
1
- import * as o from "react";
2
- import { useContext as V, useMemo as ee, useState as te, useRef as ne } from "react";
3
- import { c as B } from "./index-NQd_zMf0.js";
4
- import { C as D, D as oe, e as G, G as q } from "./index-1KQbTQJ2.js";
5
- import { F as L } from "./context-h3WSVDPz.js";
6
- import { u as se } from "./index-GgkQrebz.js";
7
- import { u as ie, I as A, T as re } from "./TextArea-n3dknzTq.js";
8
- import { A as Q } from "./isVisible-Qi9l15Ty.js";
9
- import { o as ae } from "./omit-ylWA0ZLZ.js";
10
- import { S as ce } from "./SearchOutlined-rJTFGXUi.js";
11
- import { c as F } from "./reactNode-R20zZQk1.js";
12
- import { B as le } from "./button-LN5ZDad8.js";
13
- import { a as ue, b as fe } from "./Compact-fdEKV_mF.js";
14
- const de = (e) => {
15
- const {
16
- getPrefixCls: r,
17
- direction: n
18
- } = V(D), {
19
- prefixCls: t,
20
- className: s
21
- } = e, c = r("input-group", t), b = r("input"), [l, g] = se(b), E = B(c, {
22
- [`${c}-lg`]: e.size === "large",
23
- [`${c}-sm`]: e.size === "small",
24
- [`${c}-compact`]: e.compact,
25
- [`${c}-rtl`]: n === "rtl"
26
- }, g, s), v = V(L), d = ee(() => Object.assign(Object.assign({}, v), {
27
- isFormItemInput: !1
28
- }), [v]);
29
- return process.env.NODE_ENV !== "production" && oe("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), l(/* @__PURE__ */ o.createElement("span", {
30
- className: E,
31
- style: e.style,
32
- onMouseEnter: e.onMouseEnter,
33
- onMouseLeave: e.onMouseLeave,
34
- onFocus: e.onFocus,
35
- onBlur: e.onBlur
36
- }, /* @__PURE__ */ o.createElement(L.Provider, {
37
- value: d
38
- }, e.children)));
39
- }, me = de;
40
- var pe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
41
- const ve = pe;
42
- var U = function(r, n) {
43
- return /* @__PURE__ */ o.createElement(Q, G({}, r, {
44
- ref: n,
45
- icon: ve
46
- }));
47
- };
48
- process.env.NODE_ENV !== "production" && (U.displayName = "EyeInvisibleOutlined");
49
- const Ce = /* @__PURE__ */ o.forwardRef(U);
50
- var ye = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
51
- const be = ye;
52
- var W = function(r, n) {
53
- return /* @__PURE__ */ o.createElement(Q, G({}, r, {
54
- ref: n,
55
- icon: be
56
- }));
57
- };
58
- process.env.NODE_ENV !== "production" && (W.displayName = "EyeOutlined");
59
- const ge = /* @__PURE__ */ o.forwardRef(W);
60
- var Ee = function(e, r) {
61
- var n = {};
62
- for (var t in e)
63
- Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (n[t] = e[t]);
64
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
65
- for (var s = 0, t = Object.getOwnPropertySymbols(e); s < t.length; s++)
66
- r.indexOf(t[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[s]) && (n[t[s]] = e[t[s]]);
67
- return n;
68
- };
69
- const xe = (e) => e ? /* @__PURE__ */ o.createElement(ge, null) : /* @__PURE__ */ o.createElement(Ce, null), Oe = {
70
- click: "onClick",
71
- hover: "onMouseOver"
72
- }, H = /* @__PURE__ */ o.forwardRef((e, r) => {
73
- const {
74
- visibilityToggle: n = !0
75
- } = e, t = typeof n == "object" && n.visible !== void 0, [s, c] = te(() => t ? n.visible : !1), b = ne(null);
76
- o.useEffect(() => {
77
- t && c(n.visible);
78
- }, [t, n]);
79
- const l = ie(b), g = () => {
80
- const {
81
- disabled: w
82
- } = e;
83
- w || (s && l(), c((u) => {
84
- var f;
85
- const O = !u;
86
- return typeof n == "object" && ((f = n.onVisibleChange) === null || f === void 0 || f.call(n, O)), O;
87
- }));
88
- }, E = (w) => {
89
- const {
90
- action: u = "click",
91
- iconRender: f = xe
92
- } = e, O = Oe[u] || "", h = f(s), S = {
93
- [O]: g,
94
- className: `${w}-icon`,
95
- key: "passwordIcon",
96
- onMouseDown: (z) => {
97
- z.preventDefault();
98
- },
99
- onMouseUp: (z) => {
100
- z.preventDefault();
101
- }
102
- };
103
- return /* @__PURE__ */ o.cloneElement(/* @__PURE__ */ o.isValidElement(h) ? h : /* @__PURE__ */ o.createElement("span", null, h), S);
104
- }, {
105
- className: v,
106
- prefixCls: d,
107
- inputPrefixCls: P,
108
- size: m
109
- } = e, N = Ee(e, ["className", "prefixCls", "inputPrefixCls", "size"]), {
110
- getPrefixCls: j
111
- } = o.useContext(D), M = j("input", P), x = j("input-password", d), I = n && E(x), p = B(x, v, {
112
- [`${x}-${m}`]: !!m
113
- }), R = Object.assign(Object.assign({}, ae(N, ["suffix", "iconRender", "visibilityToggle"])), {
114
- type: s ? "text" : "password",
115
- className: p,
116
- prefixCls: M,
117
- suffix: I
118
- });
119
- return m && (R.size = m), /* @__PURE__ */ o.createElement(A, Object.assign({
120
- ref: q(r, b)
121
- }, R));
122
- });
123
- process.env.NODE_ENV !== "production" && (H.displayName = "Input.Password");
124
- const he = H;
125
- var Pe = function(e, r) {
126
- var n = {};
127
- for (var t in e)
128
- Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (n[t] = e[t]);
129
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
130
- for (var s = 0, t = Object.getOwnPropertySymbols(e); s < t.length; s++)
131
- r.indexOf(t[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[s]) && (n[t[s]] = e[t[s]]);
132
- return n;
133
- };
134
- const J = /* @__PURE__ */ o.forwardRef((e, r) => {
135
- const {
136
- prefixCls: n,
137
- inputPrefixCls: t,
138
- className: s,
139
- size: c,
140
- suffix: b,
141
- enterButton: l = !1,
142
- addonAfter: g,
143
- loading: E,
144
- disabled: v,
145
- onSearch: d,
146
- onChange: P,
147
- onCompositionStart: m,
148
- onCompositionEnd: N
149
- } = e, j = Pe(e, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]), {
150
- getPrefixCls: M,
151
- direction: x
152
- } = o.useContext(D), I = o.useRef(!1), p = M("input-search", n), R = M("input", t), {
153
- compactSize: w
154
- } = ue(p, x), u = fe((i) => {
155
- var a;
156
- return (a = c ?? w) !== null && a !== void 0 ? a : i;
157
- }), f = o.useRef(null), O = (i) => {
158
- i && i.target && i.type === "click" && d && d(i.target.value, i, {
159
- source: "clear"
160
- }), P && P(i);
161
- }, h = (i) => {
162
- var a;
163
- document.activeElement === ((a = f.current) === null || a === void 0 ? void 0 : a.input) && i.preventDefault();
164
- }, S = (i) => {
165
- var a, y;
166
- d && d((y = (a = f.current) === null || a === void 0 ? void 0 : a.input) === null || y === void 0 ? void 0 : y.value, i, {
167
- source: "input"
168
- });
169
- }, z = (i) => {
170
- I.current || E || S(i);
171
- }, K = typeof l == "boolean" ? /* @__PURE__ */ o.createElement(ce, null) : null, k = `${p}-button`;
172
- let _;
173
- const C = l || {}, T = C.type && C.type.__ANT_BUTTON === !0;
174
- T || C.type === "button" ? _ = F(C, Object.assign({
175
- onMouseDown: h,
176
- onClick: (i) => {
177
- var a, y;
178
- (y = (a = C == null ? void 0 : C.props) === null || a === void 0 ? void 0 : a.onClick) === null || y === void 0 || y.call(a, i), S(i);
179
- },
180
- key: "enterButton"
181
- }, T ? {
182
- className: k,
183
- size: u
184
- } : {})) : _ = /* @__PURE__ */ o.createElement(le, {
185
- className: k,
186
- type: l ? "primary" : void 0,
187
- size: u,
188
- disabled: v,
189
- key: "enterButton",
190
- onMouseDown: h,
191
- onClick: S,
192
- loading: E,
193
- icon: K
194
- }, l), g && (_ = [_, F(g, {
195
- key: "addonAfter"
196
- })]);
197
- const X = B(p, {
198
- [`${p}-rtl`]: x === "rtl",
199
- [`${p}-${u}`]: !!u,
200
- [`${p}-with-button`]: !!l
201
- }, s), Y = (i) => {
202
- I.current = !0, m == null || m(i);
203
- }, Z = (i) => {
204
- I.current = !1, N == null || N(i);
205
- };
206
- return /* @__PURE__ */ o.createElement(A, Object.assign({
207
- ref: q(f, r),
208
- onPressEnter: z
209
- }, j, {
210
- size: u,
211
- onCompositionStart: Y,
212
- onCompositionEnd: Z,
213
- prefixCls: R,
214
- addonAfter: _,
215
- suffix: b,
216
- onChange: O,
217
- className: X,
218
- disabled: v
219
- }));
220
- });
221
- process.env.NODE_ENV !== "production" && (J.displayName = "Search");
222
- const Ne = J, $ = A;
223
- process.env.NODE_ENV !== "production" && ($.displayName = "Input");
224
- $.Group = me;
225
- $.Search = Ne;
226
- $.TextArea = re;
227
- $.Password = he;
228
- export {
229
- $ as I
230
- };
@@ -1,69 +0,0 @@
1
- var l = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function a(t) {
3
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
4
- }
5
- function p(t) {
6
- if (t.__esModule)
7
- return t;
8
- var s = t.default;
9
- if (typeof s == "function") {
10
- var r = function o() {
11
- return this instanceof o ? Reflect.construct(s, arguments, this.constructor) : s.apply(this, arguments);
12
- };
13
- r.prototype = s.prototype;
14
- } else
15
- r = {};
16
- return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(o) {
17
- var u = Object.getOwnPropertyDescriptor(t, o);
18
- Object.defineProperty(r, o, u.get ? u : {
19
- enumerable: !0,
20
- get: function() {
21
- return t[o];
22
- }
23
- });
24
- }), r;
25
- }
26
- var i = { exports: {} };
27
- /*!
28
- Copyright (c) 2018 Jed Watson.
29
- Licensed under the MIT License (MIT), see
30
- http://jedwatson.github.io/classnames
31
- */
32
- (function(t) {
33
- (function() {
34
- var s = {}.hasOwnProperty;
35
- function r() {
36
- for (var e = "", n = 0; n < arguments.length; n++) {
37
- var f = arguments[n];
38
- f && (e = u(e, o(f)));
39
- }
40
- return e;
41
- }
42
- function o(e) {
43
- if (typeof e == "string" || typeof e == "number")
44
- return e;
45
- if (typeof e != "object")
46
- return "";
47
- if (Array.isArray(e))
48
- return r.apply(null, e);
49
- if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]"))
50
- return e.toString();
51
- var n = "";
52
- for (var f in e)
53
- s.call(e, f) && e[f] && (n = u(n, f));
54
- return n;
55
- }
56
- function u(e, n) {
57
- return n ? e ? e + " " + n : e + n : e;
58
- }
59
- t.exports ? (r.default = r, t.exports = r) : window.classNames = r;
60
- })();
61
- })(i);
62
- var c = i.exports;
63
- const d = /* @__PURE__ */ a(c);
64
- export {
65
- l as a,
66
- p as b,
67
- d as c,
68
- a as g
69
- };
@@ -1,267 +0,0 @@
1
- import { c as L } from "./index-NQd_zMf0.js";
2
- import { _ as K, g as Y, E as J, y as R, F as Q, C as k, u as X, s as Z, G as ee } from "./index-1KQbTQJ2.js";
3
- import { u as te, i as oe } from "./isVisible-Qi9l15Ty.js";
4
- import * as a from "react";
5
- import O, { useContext as ne, useRef as re } from "react";
6
- import { c as se } from "./reactNode-R20zZQk1.js";
7
- import { _ as $, a as E } from "./asyncToGenerator-t4sKr8R4.js";
8
- import { R as ae } from "./index-vtDVJV8q.js";
9
- var h = K({}, ae), ie = h.version, ue = h.render, ce = h.unmountComponentAtNode, g;
10
- try {
11
- var le = Number((ie || "").split(".")[0]);
12
- le >= 18 && (g = h.createRoot);
13
- } catch {
14
- }
15
- function x(e) {
16
- var t = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
17
- t && Y(t) === "object" && (t.usingClientEntryPoint = e);
18
- }
19
- var y = "__rc_react_root__";
20
- function de(e, t) {
21
- x(!0);
22
- var o = t[y] || g(t);
23
- x(!1), o.render(e), t[y] = o;
24
- }
25
- function fe(e, t) {
26
- ue(e, t);
27
- }
28
- function me(e, t) {
29
- if (g) {
30
- de(e, t);
31
- return;
32
- }
33
- fe(e, t);
34
- }
35
- function pe(e) {
36
- return w.apply(this, arguments);
37
- }
38
- function w() {
39
- return w = $(/* @__PURE__ */ E().mark(function e(t) {
40
- return E().wrap(function(n) {
41
- for (; ; )
42
- switch (n.prev = n.next) {
43
- case 0:
44
- return n.abrupt("return", Promise.resolve().then(function() {
45
- var r;
46
- (r = t[y]) === null || r === void 0 || r.unmount(), delete t[y];
47
- }));
48
- case 1:
49
- case "end":
50
- return n.stop();
51
- }
52
- }, e);
53
- })), w.apply(this, arguments);
54
- }
55
- function ve(e) {
56
- ce(e);
57
- }
58
- function be(e) {
59
- return N.apply(this, arguments);
60
- }
61
- function N() {
62
- return N = $(/* @__PURE__ */ E().mark(function e(t) {
63
- return E().wrap(function(n) {
64
- for (; ; )
65
- switch (n.prev = n.next) {
66
- case 0:
67
- if (g === void 0) {
68
- n.next = 2;
69
- break;
70
- }
71
- return n.abrupt("return", pe(t));
72
- case 2:
73
- ve(t);
74
- case 3:
75
- case "end":
76
- return n.stop();
77
- }
78
- }, e);
79
- })), N.apply(this, arguments);
80
- }
81
- const he = (e) => {
82
- const {
83
- componentCls: t,
84
- colorPrimary: o
85
- } = e;
86
- return {
87
- [t]: {
88
- position: "absolute",
89
- background: "transparent",
90
- pointerEvents: "none",
91
- boxSizing: "border-box",
92
- color: `var(--wave-color, ${o})`,
93
- boxShadow: "0 0 0 0 currentcolor",
94
- opacity: 0.2,
95
- // =================== Motion ===================
96
- "&.wave-motion-appear": {
97
- transition: [`box-shadow 0.4s ${e.motionEaseOutCirc}`, `opacity 2s ${e.motionEaseOutCirc}`].join(","),
98
- "&-active": {
99
- boxShadow: "0 0 0 6px currentcolor",
100
- opacity: 0
101
- },
102
- "&.wave-quick": {
103
- transition: [`box-shadow 0.3s ${e.motionEaseInOut}`, `opacity 0.35s ${e.motionEaseInOut}`].join(",")
104
- }
105
- }
106
- }
107
- };
108
- }, _e = J("Wave", (e) => [he(e)]);
109
- function Re(e) {
110
- const t = (e || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
111
- return t && t[1] && t[2] && t[3] ? !(t[1] === t[2] && t[2] === t[3]) : !0;
112
- }
113
- function C(e) {
114
- return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && Re(e) && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
115
- e !== "transparent";
116
- }
117
- function Ee(e) {
118
- const {
119
- borderTopColor: t,
120
- borderColor: o,
121
- backgroundColor: n
122
- } = getComputedStyle(e);
123
- return C(t) ? t : C(o) ? o : C(n) ? n : null;
124
- }
125
- const A = "ant-wave-target";
126
- function S(e) {
127
- return Number.isNaN(e) ? 0 : e;
128
- }
129
- const ye = (e) => {
130
- const {
131
- className: t,
132
- target: o,
133
- component: n
134
- } = e, r = a.useRef(null), [c, d] = a.useState(null), [f, _] = a.useState([]), [l, s] = a.useState(0), [m, p] = a.useState(0), [D, U] = a.useState(0), [j, B] = a.useState(0), [F, P] = a.useState(!1), W = {
135
- left: l,
136
- top: m,
137
- width: D,
138
- height: j,
139
- borderRadius: f.map((u) => `${u}px`).join(" ")
140
- };
141
- c && (W["--wave-color"] = c);
142
- function T() {
143
- const u = getComputedStyle(o);
144
- d(Ee(o));
145
- const i = u.position === "static", {
146
- borderLeftWidth: b,
147
- borderTopWidth: v
148
- } = u;
149
- s(i ? o.offsetLeft : S(-parseFloat(b))), p(i ? o.offsetTop : S(-parseFloat(v))), U(o.offsetWidth), B(o.offsetHeight);
150
- const {
151
- borderTopLeftRadius: z,
152
- borderTopRightRadius: G,
153
- borderBottomLeftRadius: M,
154
- borderBottomRightRadius: V
155
- } = u;
156
- _([z, G, V, M].map((H) => S(parseFloat(H))));
157
- }
158
- if (a.useEffect(() => {
159
- if (o) {
160
- const u = R(() => {
161
- T(), P(!0);
162
- });
163
- let i;
164
- return typeof ResizeObserver < "u" && (i = new ResizeObserver(T), i.observe(o)), () => {
165
- R.cancel(u), i == null || i.disconnect();
166
- };
167
- }
168
- }, []), !F)
169
- return null;
170
- const q = (n === "Checkbox" || n === "Radio") && (o == null ? void 0 : o.classList.contains(A));
171
- return /* @__PURE__ */ a.createElement(Q, {
172
- visible: !0,
173
- motionAppear: !0,
174
- motionName: "wave-motion",
175
- motionDeadline: 5e3,
176
- onAppearEnd: (u, i) => {
177
- var b;
178
- if (i.deadline || i.propertyName === "opacity") {
179
- const v = (b = r.current) === null || b === void 0 ? void 0 : b.parentElement;
180
- be(v).then(() => {
181
- v == null || v.remove();
182
- });
183
- }
184
- return !1;
185
- }
186
- }, (u) => {
187
- let {
188
- className: i
189
- } = u;
190
- return /* @__PURE__ */ a.createElement("div", {
191
- ref: r,
192
- className: L(t, {
193
- "wave-quick": q
194
- }, i),
195
- style: W
196
- });
197
- });
198
- }, ge = (e, t) => {
199
- var o;
200
- const {
201
- component: n
202
- } = t;
203
- if (n === "Checkbox" && !(!((o = e.querySelector("input")) === null || o === void 0) && o.checked))
204
- return;
205
- const r = document.createElement("div");
206
- r.style.position = "absolute", r.style.left = "0px", r.style.top = "0px", e == null || e.insertBefore(r, e == null ? void 0 : e.firstChild), me(/* @__PURE__ */ a.createElement(ye, Object.assign({}, t, {
207
- target: e
208
- })), r);
209
- }, Ce = ge;
210
- function Se(e, t, o) {
211
- const {
212
- wave: n
213
- } = a.useContext(k), [, r, c] = X(), d = te((l) => {
214
- const s = e.current;
215
- if (n != null && n.disabled || !s)
216
- return;
217
- const m = s.querySelector(`.${A}`) || s, {
218
- showEffect: p
219
- } = n || {};
220
- (p || Ce)(m, {
221
- className: t,
222
- token: r,
223
- component: o,
224
- event: l,
225
- hashId: c
226
- });
227
- }), f = a.useRef();
228
- return (l) => {
229
- R.cancel(f.current), f.current = R(() => {
230
- d(l);
231
- });
232
- };
233
- }
234
- const I = (e) => {
235
- const {
236
- children: t,
237
- disabled: o,
238
- component: n
239
- } = e, {
240
- getPrefixCls: r
241
- } = ne(k), c = re(null), d = r("wave"), [, f] = _e(d), _ = Se(c, L(d, f), n);
242
- if (O.useEffect(() => {
243
- const s = c.current;
244
- if (!s || s.nodeType !== 1 || o)
245
- return;
246
- const m = (p) => {
247
- !oe(p.target) || // No need wave
248
- !s.getAttribute || s.getAttribute("disabled") || s.disabled || s.className.includes("disabled") || s.className.includes("-leave") || _(p);
249
- };
250
- return s.addEventListener("click", m, !0), () => {
251
- s.removeEventListener("click", m, !0);
252
- };
253
- }, [o]), !/* @__PURE__ */ O.isValidElement(t))
254
- return t ?? null;
255
- const l = Z(t) ? ee(t.ref, c) : c;
256
- return se(t, {
257
- ref: l
258
- });
259
- };
260
- process.env.NODE_ENV !== "production" && (I.displayName = "Wave");
261
- const ke = I;
262
- export {
263
- A as T,
264
- ke as W,
265
- me as r,
266
- be as u
267
- };