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,681 +0,0 @@
1
- import * as f from "react";
2
- import { forwardRef as Pe, useRef as xe, useImperativeHandle as Se } from "react";
3
- import { c as R } from "./index-NQd_zMf0.js";
4
- import { x as Te, _ as $e, e as je, h as Ne, m as te, r as Re, d as Q, C as oe, u as Ae, D as Ve } from "./index-1KQbTQJ2.js";
5
- import { T as Ee } from "./index-L-MzVDcK.js";
6
- import { u as Ie } from "./useMergedState-qUafLuUa.js";
7
- import { u as ke, z as De } from "./motion-0ToOu81j.js";
8
- import { g as Le } from "./motion-NQme0FJ_.js";
9
- import { g as Be, a as ze } from "./roundedArrow-p1Pmd9av.js";
10
- import { i as He, a as Xe, c as Ye } from "./reactNode-R20zZQk1.js";
11
- import { N as Me } from "./Compact-fdEKV_mF.js";
12
- import { i as We } from "./zoom-Ps8y0jNW.js";
13
- import { g as Fe, i as Ue } from "./colors-opGg9oSz.js";
14
- function re(o) {
15
- var e = o.children, n = o.prefixCls, t = o.id, r = o.overlayInnerStyle, a = o.className, i = o.style;
16
- return /* @__PURE__ */ f.createElement("div", {
17
- className: R("".concat(n, "-content"), a),
18
- style: i
19
- }, /* @__PURE__ */ f.createElement("div", {
20
- className: "".concat(n, "-inner"),
21
- id: t,
22
- role: "tooltip",
23
- style: r
24
- }, typeof e == "function" ? e() : e));
25
- }
26
- var S = {
27
- shiftX: 64,
28
- adjustY: 1
29
- }, T = {
30
- adjustX: 1,
31
- shiftY: !0
32
- }, b = [0, 0], Ze = {
33
- left: {
34
- points: ["cr", "cl"],
35
- overflow: T,
36
- offset: [-4, 0],
37
- targetOffset: b
38
- },
39
- right: {
40
- points: ["cl", "cr"],
41
- overflow: T,
42
- offset: [4, 0],
43
- targetOffset: b
44
- },
45
- top: {
46
- points: ["bc", "tc"],
47
- overflow: S,
48
- offset: [0, -4],
49
- targetOffset: b
50
- },
51
- bottom: {
52
- points: ["tc", "bc"],
53
- overflow: S,
54
- offset: [0, 4],
55
- targetOffset: b
56
- },
57
- topLeft: {
58
- points: ["bl", "tl"],
59
- overflow: S,
60
- offset: [0, -4],
61
- targetOffset: b
62
- },
63
- leftTop: {
64
- points: ["tr", "tl"],
65
- overflow: T,
66
- offset: [-4, 0],
67
- targetOffset: b
68
- },
69
- topRight: {
70
- points: ["br", "tr"],
71
- overflow: S,
72
- offset: [0, -4],
73
- targetOffset: b
74
- },
75
- rightTop: {
76
- points: ["tl", "tr"],
77
- overflow: T,
78
- offset: [4, 0],
79
- targetOffset: b
80
- },
81
- bottomRight: {
82
- points: ["tr", "br"],
83
- overflow: S,
84
- offset: [0, 4],
85
- targetOffset: b
86
- },
87
- rightBottom: {
88
- points: ["bl", "br"],
89
- overflow: T,
90
- offset: [4, 0],
91
- targetOffset: b
92
- },
93
- bottomLeft: {
94
- points: ["tl", "bl"],
95
- overflow: S,
96
- offset: [0, 4],
97
- targetOffset: b
98
- },
99
- leftBottom: {
100
- points: ["br", "bl"],
101
- overflow: T,
102
- offset: [-4, 0],
103
- targetOffset: b
104
- }
105
- }, qe = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow"], Ge = function(e, n) {
106
- var t = e.overlayClassName, r = e.trigger, a = r === void 0 ? ["hover"] : r, i = e.mouseEnterDelay, l = i === void 0 ? 0 : i, c = e.mouseLeaveDelay, m = c === void 0 ? 0.1 : c, u = e.overlayStyle, s = e.prefixCls, p = s === void 0 ? "rc-tooltip" : s, v = e.children, g = e.onVisibleChange, h = e.afterVisibleChange, $ = e.transitionName, A = e.animation, j = e.motion, V = e.placement, E = V === void 0 ? "right" : V, C = e.align, z = C === void 0 ? {} : C, N = e.destroyTooltipOnHide, H = N === void 0 ? !1 : N, O = e.defaultVisible, I = e.getTooltipContainer, k = e.overlayInnerStyle;
107
- e.arrowContent;
108
- var X = e.overlay, Y = e.id, _ = e.showArrow, M = _ === void 0 ? !0 : _, W = Te(e, qe), P = xe(null);
109
- Se(n, function() {
110
- return P.current;
111
- });
112
- var D = $e({}, W);
113
- "visible" in e && (D.popupVisible = e.visible);
114
- var F = function() {
115
- return /* @__PURE__ */ f.createElement(re, {
116
- key: "content",
117
- prefixCls: p,
118
- id: Y,
119
- overlayInnerStyle: k
120
- }, X);
121
- };
122
- return /* @__PURE__ */ f.createElement(Ee, je({
123
- popupClassName: t,
124
- prefixCls: p,
125
- popup: F,
126
- action: a,
127
- builtinPlacements: Ze,
128
- popupPlacement: E,
129
- ref: P,
130
- popupAlign: z,
131
- getPopupContainer: I,
132
- onPopupVisibleChange: g,
133
- afterPopupVisibleChange: h,
134
- popupTransitionName: $,
135
- popupAnimation: A,
136
- popupMotion: j,
137
- defaultPopupVisible: O,
138
- autoDestroy: H,
139
- mouseLeaveDelay: m,
140
- popupStyle: u,
141
- mouseEnterDelay: l,
142
- arrow: M
143
- }, D), v);
144
- };
145
- const Je = /* @__PURE__ */ Pe(Ge), ae = 8;
146
- function ne(o) {
147
- const {
148
- contentRadius: e,
149
- limitVerticalRadius: n
150
- } = o, t = e > 12 ? e + 2 : 12;
151
- return {
152
- arrowOffsetHorizontal: t,
153
- arrowOffsetVertical: n ? ae : t
154
- };
155
- }
156
- function B(o, e) {
157
- return o ? e : {};
158
- }
159
- function Ke(o, e, n) {
160
- const {
161
- componentCls: t,
162
- boxShadowPopoverArrow: r,
163
- arrowOffsetVertical: a,
164
- arrowOffsetHorizontal: i
165
- } = o, {
166
- arrowDistance: l = 0,
167
- arrowPlacement: c = {
168
- left: !0,
169
- right: !0,
170
- top: !0,
171
- bottom: !0
172
- }
173
- } = n || {};
174
- return {
175
- [t]: Object.assign(Object.assign(Object.assign(Object.assign({
176
- // ============================ Basic ============================
177
- [`${t}-arrow`]: [Object.assign(Object.assign({
178
- position: "absolute",
179
- zIndex: 1,
180
- display: "block"
181
- }, Be(o, e, r)), {
182
- "&:before": {
183
- background: e
184
- }
185
- })]
186
- }, B(!!c.top, {
187
- [[`&-placement-top > ${t}-arrow`, `&-placement-topLeft > ${t}-arrow`, `&-placement-topRight > ${t}-arrow`].join(",")]: {
188
- bottom: l,
189
- transform: "translateY(100%) rotate(180deg)"
190
- },
191
- [`&-placement-top > ${t}-arrow`]: {
192
- left: {
193
- _skip_check_: !0,
194
- value: "50%"
195
- },
196
- transform: "translateX(-50%) translateY(100%) rotate(180deg)"
197
- },
198
- [`&-placement-topLeft > ${t}-arrow`]: {
199
- left: {
200
- _skip_check_: !0,
201
- value: i
202
- }
203
- },
204
- [`&-placement-topRight > ${t}-arrow`]: {
205
- right: {
206
- _skip_check_: !0,
207
- value: i
208
- }
209
- }
210
- })), B(!!c.bottom, {
211
- [[`&-placement-bottom > ${t}-arrow`, `&-placement-bottomLeft > ${t}-arrow`, `&-placement-bottomRight > ${t}-arrow`].join(",")]: {
212
- top: l,
213
- transform: "translateY(-100%)"
214
- },
215
- [`&-placement-bottom > ${t}-arrow`]: {
216
- left: {
217
- _skip_check_: !0,
218
- value: "50%"
219
- },
220
- transform: "translateX(-50%) translateY(-100%)"
221
- },
222
- [`&-placement-bottomLeft > ${t}-arrow`]: {
223
- left: {
224
- _skip_check_: !0,
225
- value: i
226
- }
227
- },
228
- [`&-placement-bottomRight > ${t}-arrow`]: {
229
- right: {
230
- _skip_check_: !0,
231
- value: i
232
- }
233
- }
234
- })), B(!!c.left, {
235
- [[`&-placement-left > ${t}-arrow`, `&-placement-leftTop > ${t}-arrow`, `&-placement-leftBottom > ${t}-arrow`].join(",")]: {
236
- right: {
237
- _skip_check_: !0,
238
- value: l
239
- },
240
- transform: "translateX(100%) rotate(90deg)"
241
- },
242
- [`&-placement-left > ${t}-arrow`]: {
243
- top: {
244
- _skip_check_: !0,
245
- value: "50%"
246
- },
247
- transform: "translateY(-50%) translateX(100%) rotate(90deg)"
248
- },
249
- [`&-placement-leftTop > ${t}-arrow`]: {
250
- top: a
251
- },
252
- [`&-placement-leftBottom > ${t}-arrow`]: {
253
- bottom: a
254
- }
255
- })), B(!!c.right, {
256
- [[`&-placement-right > ${t}-arrow`, `&-placement-rightTop > ${t}-arrow`, `&-placement-rightBottom > ${t}-arrow`].join(",")]: {
257
- left: {
258
- _skip_check_: !0,
259
- value: l
260
- },
261
- transform: "translateX(-100%) rotate(-90deg)"
262
- },
263
- [`&-placement-right > ${t}-arrow`]: {
264
- top: {
265
- _skip_check_: !0,
266
- value: "50%"
267
- },
268
- transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
269
- },
270
- [`&-placement-rightTop > ${t}-arrow`]: {
271
- top: a
272
- },
273
- [`&-placement-rightBottom > ${t}-arrow`]: {
274
- bottom: a
275
- }
276
- }))
277
- };
278
- }
279
- function Qe(o, e, n, t) {
280
- if (t === !1)
281
- return {
282
- adjustX: !1,
283
- adjustY: !1
284
- };
285
- const r = t && typeof t == "object" ? t : {}, a = {};
286
- switch (o) {
287
- case "top":
288
- case "bottom":
289
- a.shiftX = e.arrowOffsetHorizontal * 2 + n, a.shiftY = !0, a.adjustY = !0;
290
- break;
291
- case "left":
292
- case "right":
293
- a.shiftY = e.arrowOffsetVertical * 2 + n, a.shiftX = !0, a.adjustX = !0;
294
- break;
295
- }
296
- const i = Object.assign(Object.assign({}, a), r);
297
- return i.shiftX || (i.adjustX = !0), i.shiftY || (i.adjustY = !0), i;
298
- }
299
- const ee = {
300
- left: {
301
- points: ["cr", "cl"]
302
- },
303
- right: {
304
- points: ["cl", "cr"]
305
- },
306
- top: {
307
- points: ["bc", "tc"]
308
- },
309
- bottom: {
310
- points: ["tc", "bc"]
311
- },
312
- topLeft: {
313
- points: ["bl", "tl"]
314
- },
315
- leftTop: {
316
- points: ["tr", "tl"]
317
- },
318
- topRight: {
319
- points: ["br", "tr"]
320
- },
321
- rightTop: {
322
- points: ["tl", "tr"]
323
- },
324
- bottomRight: {
325
- points: ["tr", "br"]
326
- },
327
- rightBottom: {
328
- points: ["bl", "br"]
329
- },
330
- bottomLeft: {
331
- points: ["tl", "bl"]
332
- },
333
- leftBottom: {
334
- points: ["br", "bl"]
335
- }
336
- }, et = {
337
- topLeft: {
338
- points: ["bl", "tc"]
339
- },
340
- leftTop: {
341
- points: ["tr", "cl"]
342
- },
343
- topRight: {
344
- points: ["br", "tc"]
345
- },
346
- rightTop: {
347
- points: ["tl", "cr"]
348
- },
349
- bottomRight: {
350
- points: ["tr", "bc"]
351
- },
352
- rightBottom: {
353
- points: ["bl", "cr"]
354
- },
355
- bottomLeft: {
356
- points: ["tl", "bc"]
357
- },
358
- leftBottom: {
359
- points: ["br", "cl"]
360
- }
361
- }, tt = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]);
362
- function ot(o) {
363
- const {
364
- arrowWidth: e,
365
- autoAdjustOverflow: n,
366
- arrowPointAtCenter: t,
367
- offset: r,
368
- borderRadius: a,
369
- visibleFirst: i
370
- } = o, l = e / 2, c = {};
371
- return Object.keys(ee).forEach((m) => {
372
- const u = t && et[m] || ee[m], s = Object.assign(Object.assign({}, u), {
373
- offset: [0, 0],
374
- dynamicInset: !0
375
- });
376
- switch (c[m] = s, tt.has(m) && (s.autoArrow = !1), m) {
377
- case "top":
378
- case "topLeft":
379
- case "topRight":
380
- s.offset[1] = -l - r;
381
- break;
382
- case "bottom":
383
- case "bottomLeft":
384
- case "bottomRight":
385
- s.offset[1] = l + r;
386
- break;
387
- case "left":
388
- case "leftTop":
389
- case "leftBottom":
390
- s.offset[0] = -l - r;
391
- break;
392
- case "right":
393
- case "rightTop":
394
- case "rightBottom":
395
- s.offset[0] = l + r;
396
- break;
397
- }
398
- const p = ne({
399
- contentRadius: a,
400
- limitVerticalRadius: !0
401
- });
402
- if (t)
403
- switch (m) {
404
- case "topLeft":
405
- case "bottomLeft":
406
- s.offset[0] = -p.arrowOffsetHorizontal - l;
407
- break;
408
- case "topRight":
409
- case "bottomRight":
410
- s.offset[0] = p.arrowOffsetHorizontal + l;
411
- break;
412
- case "leftTop":
413
- case "rightTop":
414
- s.offset[1] = -p.arrowOffsetHorizontal - l;
415
- break;
416
- case "leftBottom":
417
- case "rightBottom":
418
- s.offset[1] = p.arrowOffsetHorizontal + l;
419
- break;
420
- }
421
- s.overflow = Qe(m, p, e, n), i && (s.htmlRegion = "visibleFirst");
422
- }), c;
423
- }
424
- const rt = (o) => {
425
- const {
426
- componentCls: e,
427
- // ant-tooltip
428
- tooltipMaxWidth: n,
429
- tooltipColor: t,
430
- tooltipBg: r,
431
- tooltipBorderRadius: a,
432
- zIndexPopup: i,
433
- controlHeight: l,
434
- boxShadowSecondary: c,
435
- paddingSM: m,
436
- paddingXS: u
437
- } = o;
438
- return [
439
- {
440
- [e]: Object.assign(Object.assign(Object.assign(Object.assign({}, Re(o)), {
441
- position: "absolute",
442
- zIndex: i,
443
- display: "block",
444
- width: "max-content",
445
- maxWidth: n,
446
- visibility: "visible",
447
- transformOrigin: "var(--arrow-x, 50%) var(--arrow-y, 50%)",
448
- "&-hidden": {
449
- display: "none"
450
- },
451
- "--antd-arrow-background-color": r,
452
- // Wrapper for the tooltip content
453
- [`${e}-inner`]: {
454
- minWidth: l,
455
- minHeight: l,
456
- padding: `${Q(o.calc(m).div(2).equal())} ${Q(u)}`,
457
- color: t,
458
- textAlign: "start",
459
- textDecoration: "none",
460
- wordWrap: "break-word",
461
- backgroundColor: r,
462
- borderRadius: a,
463
- boxShadow: c,
464
- boxSizing: "border-box"
465
- },
466
- // Limit left and right placement radius
467
- [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
468
- [`${e}-inner`]: {
469
- borderRadius: o.min(a, ae)
470
- }
471
- },
472
- [`${e}-content`]: {
473
- position: "relative"
474
- }
475
- }), Fe(o, (s, p) => {
476
- let {
477
- darkColor: v
478
- } = p;
479
- return {
480
- [`&${e}-${s}`]: {
481
- [`${e}-inner`]: {
482
- backgroundColor: v
483
- },
484
- [`${e}-arrow`]: {
485
- "--antd-arrow-background-color": v
486
- }
487
- }
488
- };
489
- })), {
490
- // RTL
491
- "&-rtl": {
492
- direction: "rtl"
493
- }
494
- })
495
- },
496
- // Arrow Style
497
- Ke(o, "var(--antd-arrow-background-color)"),
498
- // Pure Render
499
- {
500
- [`${e}-pure`]: {
501
- position: "relative",
502
- maxWidth: "none",
503
- margin: o.sizePopupArrow
504
- }
505
- }
506
- ];
507
- }, at = (o) => Object.assign(Object.assign({
508
- zIndexPopup: o.zIndexPopupBase + 70
509
- }, ne({
510
- contentRadius: o.borderRadius,
511
- limitVerticalRadius: !0
512
- })), ze(te(o, {
513
- borderRadiusOuter: Math.min(o.borderRadiusOuter, 4)
514
- }))), ie = function(o) {
515
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
516
- return Ne("Tooltip", (t) => {
517
- const {
518
- borderRadius: r,
519
- colorTextLightSolid: a,
520
- colorBgSpotlight: i
521
- } = t, l = te(t, {
522
- // default variables
523
- tooltipMaxWidth: 250,
524
- tooltipColor: a,
525
- tooltipBorderRadius: r,
526
- tooltipBg: i
527
- });
528
- return [rt(l), We(t, "zoom-big-fast")];
529
- }, at, {
530
- resetStyle: !1,
531
- // Popover use Tooltip as internal component. We do not need to handle this.
532
- injectStyle: e
533
- })(o);
534
- };
535
- function le(o, e) {
536
- const n = Ue(e), t = R({
537
- [`${o}-${e}`]: e && n
538
- }), r = {}, a = {};
539
- return e && !n && (r.background = e, a["--antd-arrow-background-color"] = e), {
540
- className: t,
541
- overlayStyle: r,
542
- arrowStyle: a
543
- };
544
- }
545
- const nt = (o) => {
546
- const {
547
- prefixCls: e,
548
- className: n,
549
- placement: t = "top",
550
- title: r,
551
- color: a,
552
- overlayInnerStyle: i
553
- } = o, {
554
- getPrefixCls: l
555
- } = f.useContext(oe), c = l("tooltip", e), [m, u, s] = ie(c), p = le(c, a), v = p.arrowStyle, g = Object.assign(Object.assign({}, i), p.overlayStyle), h = R(u, s, c, `${c}-pure`, `${c}-placement-${t}`, n, p.className);
556
- return m(/* @__PURE__ */ f.createElement("div", {
557
- className: h,
558
- style: v
559
- }, /* @__PURE__ */ f.createElement("div", {
560
- className: `${c}-arrow`
561
- }), /* @__PURE__ */ f.createElement(re, Object.assign({}, o, {
562
- className: u,
563
- prefixCls: c,
564
- overlayInnerStyle: g
565
- }), r)));
566
- }, it = nt;
567
- var lt = function(o, e) {
568
- var n = {};
569
- for (var t in o)
570
- Object.prototype.hasOwnProperty.call(o, t) && e.indexOf(t) < 0 && (n[t] = o[t]);
571
- if (o != null && typeof Object.getOwnPropertySymbols == "function")
572
- for (var r = 0, t = Object.getOwnPropertySymbols(o); r < t.length; r++)
573
- e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(o, t[r]) && (n[t[r]] = o[t[r]]);
574
- return n;
575
- };
576
- const G = /* @__PURE__ */ f.forwardRef((o, e) => {
577
- var n, t;
578
- const {
579
- prefixCls: r,
580
- openClassName: a,
581
- getTooltipContainer: i,
582
- overlayClassName: l,
583
- color: c,
584
- overlayInnerStyle: m,
585
- children: u,
586
- afterOpenChange: s,
587
- afterVisibleChange: p,
588
- destroyTooltipOnHide: v,
589
- arrow: g = !0,
590
- title: h,
591
- overlay: $,
592
- builtinPlacements: A,
593
- arrowPointAtCenter: j = !1,
594
- autoAdjustOverflow: V = !0
595
- } = o, E = !!g, [, C] = Ae(), {
596
- getPopupContainer: z,
597
- getPrefixCls: N,
598
- direction: H
599
- } = f.useContext(oe), O = Ve("Tooltip"), I = f.useRef(null), k = () => {
600
- var d;
601
- (d = I.current) === null || d === void 0 || d.forceAlign();
602
- };
603
- f.useImperativeHandle(e, () => ({
604
- forceAlign: k,
605
- forcePopupAlign: () => {
606
- O.deprecated(!1, "forcePopupAlign", "forceAlign"), k();
607
- }
608
- })), process.env.NODE_ENV !== "production" && ([["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"], ["arrowPointAtCenter", "arrow={{ pointAtCenter: true }}"]].forEach((d) => {
609
- let [w, y] = d;
610
- O.deprecated(!(w in o), w, y);
611
- }), process.env.NODE_ENV !== "production" && O(!v || typeof v == "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && O(!g || typeof g == "boolean" || !("arrowPointAtCenter" in g), "deprecated", "`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));
612
- const [X, Y] = Ie(!1, {
613
- value: (n = o.open) !== null && n !== void 0 ? n : o.visible,
614
- defaultValue: (t = o.defaultOpen) !== null && t !== void 0 ? t : o.defaultVisible
615
- }), _ = !h && !$ && h !== 0, M = (d) => {
616
- var w, y;
617
- Y(_ ? !1 : d), _ || ((w = o.onOpenChange) === null || w === void 0 || w.call(o, d), (y = o.onVisibleChange) === null || y === void 0 || y.call(o, d));
618
- }, W = f.useMemo(() => {
619
- var d, w;
620
- let y = j;
621
- return typeof g == "object" && (y = (w = (d = g.pointAtCenter) !== null && d !== void 0 ? d : g.arrowPointAtCenter) !== null && w !== void 0 ? w : j), A || ot({
622
- arrowPointAtCenter: y,
623
- autoAdjustOverflow: V,
624
- arrowWidth: E ? C.sizePopupArrow : 0,
625
- borderRadius: C.borderRadius,
626
- offset: C.marginXXS,
627
- visibleFirst: !0
628
- });
629
- }, [j, g, A, C]), P = f.useMemo(() => h === 0 ? h : $ || h || "", [$, h]), D = /* @__PURE__ */ f.createElement(Me, null, typeof P == "function" ? P() : P), {
630
- getPopupContainer: F,
631
- placement: J = "top",
632
- mouseEnterDelay: se = 0.1,
633
- mouseLeaveDelay: ce = 0.1,
634
- overlayStyle: fe,
635
- rootClassName: pe
636
- } = o, K = lt(o, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName"]), x = N("tooltip", r), me = N(), ue = o["data-popover-inject"];
637
- let U = X;
638
- !("open" in o) && !("visible" in o) && _ && (U = !1);
639
- const Z = He(u) && !Xe(u) ? u : /* @__PURE__ */ f.createElement("span", null, u), L = Z.props, de = !L.className || typeof L.className == "string" ? R(L.className, a || `${x}-open`) : L.className, [ge, be, ve] = ie(x, !ue), q = le(x, c), he = q.arrowStyle, we = Object.assign(Object.assign({}, m), q.overlayStyle), ye = R(l, {
640
- [`${x}-rtl`]: H === "rtl"
641
- }, q.className, pe, be, ve), [Ce, Oe] = ke("Tooltip", K.zIndex), _e = /* @__PURE__ */ f.createElement(Je, Object.assign({}, K, {
642
- zIndex: Ce,
643
- showArrow: E,
644
- placement: J,
645
- mouseEnterDelay: se,
646
- mouseLeaveDelay: ce,
647
- prefixCls: x,
648
- overlayClassName: ye,
649
- overlayStyle: Object.assign(Object.assign({}, he), fe),
650
- getTooltipContainer: F || i || z,
651
- ref: I,
652
- builtinPlacements: W,
653
- overlay: D,
654
- visible: U,
655
- onVisibleChange: M,
656
- afterVisibleChange: s ?? p,
657
- overlayInnerStyle: we,
658
- arrowContent: /* @__PURE__ */ f.createElement("span", {
659
- className: `${x}-arrow-content`
660
- }),
661
- motion: {
662
- motionName: Le(me, "zoom-big-fast", o.transitionName),
663
- motionDeadline: 1e3
664
- },
665
- destroyTooltipOnHide: !!v
666
- }), U ? Ye(Z, {
667
- className: de
668
- }) : Z);
669
- return ge(/* @__PURE__ */ f.createElement(De.Provider, {
670
- value: Oe
671
- }, _e));
672
- });
673
- process.env.NODE_ENV !== "production" && (G.displayName = "Tooltip");
674
- G._InternalPanelDoNotUseOrYouWillBeFired = it;
675
- const yt = G;
676
- export {
677
- yt as T,
678
- ne as a,
679
- ot as b,
680
- Ke as g
681
- };