@gobolt/genesis 0.0.8 → 0.0.10
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/README.md +10 -0
- package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
- package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
- package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
- package/dist/ContextIsolator-D5x2Ih51.js +20 -0
- package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
- package/dist/KeyCode-DM2sFh3-.js +517 -0
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
- package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
- package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
- package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
- package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
- package/dist/compact-item-DH13cl8A.js +61 -0
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.js +63 -62
- package/dist/components/Badge/__tests__/Badge.test.js +11 -65
- package/dist/components/Badge/index.js +2 -21
- package/dist/components/Badge/styles.js +7 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
- package/dist/components/Breadcrumb/index.js +2 -25
- package/dist/components/Breadcrumb/styles.d.ts +10 -6
- package/dist/components/Breadcrumb/styles.js +787 -808
- package/dist/components/Button/Button.d.ts +6 -4
- package/dist/components/Button/Button.js +20 -40
- package/dist/components/Button/__tests__/Button.test.js +9 -54
- package/dist/components/Button/index.js +2 -20
- package/dist/components/Button/styles.d.ts +9 -5
- package/dist/components/Button/styles.js +19 -30
- package/dist/components/Checkbox/Checkbox.js +8 -38
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
- package/dist/components/Checkbox/index.js +2 -47
- package/dist/components/Checkbox/styles.d.ts +8 -1
- package/dist/components/Checkbox/styles.js +181 -188
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
- package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
- package/dist/components/ErrorBoundaryFallback/index.js +2 -49
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
- package/dist/components/Form/Form.d.ts +18 -5
- package/dist/components/Form/Form.js +4 -45
- package/dist/components/Form/__stories__/FormStory.js +44 -81
- package/dist/components/Form/__tests__/form.test.d.ts +1 -0
- package/dist/components/Form/__tests__/form.test.js +18 -0
- package/dist/components/Form/index.js +2 -46
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/Input/Input.js +6 -29
- package/dist/components/Input/__tests__/Input.test.js +21 -66
- package/dist/components/Input/index.js +2 -29
- package/dist/components/Input/styles.d.ts +5 -2
- package/dist/components/Input/styles.js +319 -332
- package/dist/components/Message/Message.d.ts +4 -4
- package/dist/components/Message/Message.js +53 -80
- package/dist/components/Message/__tests__/Message.test.js +24 -70
- package/dist/components/Message/index.js +2 -48
- package/dist/components/Message/styles.d.ts +4 -1
- package/dist/components/Message/styles.js +24 -18
- package/dist/components/Notification/Notification.d.ts +11 -10
- package/dist/components/Notification/Notification.js +306 -372
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -0
- package/dist/components/Notification/__tests__/Notification.test.js +8 -69
- package/dist/components/Notification/index.js +2 -59
- package/dist/components/Notification/styles.d.ts +13 -3
- package/dist/components/Notification/styles.js +36 -20
- package/dist/components/Radio/Radio.js +20 -106
- package/dist/components/Radio/RadioGroup.js +18 -71
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +2 -56
- package/dist/components/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +9 -4
- package/dist/components/Select/Select.js +29 -41
- package/dist/components/Select/__tests__/Select.test.js +10752 -93
- package/dist/components/Select/index.js +2 -28
- package/dist/components/Select/styles.d.ts +20 -6
- package/dist/components/Select/styles.js +1381 -1370
- package/dist/components/Toast/Toast.d.ts +4 -4
- package/dist/components/Toast/Toast.js +8 -37
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +10 -55
- package/dist/components/Toast/index.js +2 -46
- package/dist/components/Toast/styles.d.ts +6 -1
- package/dist/components/Toast/styles.js +36 -21
- package/dist/components/Typography/Typography.d.ts +7 -4
- package/dist/components/Typography/Typography.js +2 -42
- package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +19 -56
- package/dist/components/Typography/index.js +2 -46
- package/dist/components/Typography/styles.d.ts +18 -4
- package/dist/components/Typography/styles.js +36 -43
- package/dist/components/index.d.ts +13 -5
- package/dist/components/index.js +24 -70
- package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
- package/dist/genesis/GenesisThemeBreakdown.js +38 -55
- package/dist/genesis/GenesisThemeDemo.js +3 -53
- package/dist/genesis/styles.d.ts +6 -2
- package/dist/genesis/styles.js +496 -521
- package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
- package/dist/index-BZAhCB_K.js +97 -0
- package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/index-CfDY25LP.js +873 -0
- package/dist/index-DPW8XdWj.js +952 -0
- package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -77
- package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
- package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
- package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
- package/dist/providers/GenesisProvider.d.ts +0 -5
- package/dist/providers/GenesisProvider.js +9 -59
- package/dist/providers/ThemeProvider.d.ts +1 -2
- package/dist/providers/ThemeProvider.js +11 -13
- package/dist/providers/ToastProvider.d.ts +11 -4
- package/dist/providers/ToastProvider.js +10 -39
- package/dist/providers/index.d.ts +2 -3
- package/dist/providers/index.js +4 -51
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/setup-BvfREoHl.js +33891 -0
- package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +10 -10
- package/dist/styles/design-tokens/variables.js +1 -1
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +14 -31
- package/dist/styles/theme/genesis-theme.js +257 -212
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/styles/theme/index.js +4 -5
- package/dist/styles-CT_fyXBd.js +1808 -0
- package/dist/test/setup.js +3 -46
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/useVariants-DvhXfgJY.js +30 -0
- package/dist/utils/isAllEnglishString.js +1 -2
- package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
- package/package.json +51 -43
- package/dist/CheckOutlined-52d9ac25.js +0 -29
- package/dist/ContextIsolator-b09b2c52.js +0 -20
- package/dist/EllipsisOutlined-60122660.js +0 -1115
- package/dist/InfoCircleFilled-c5f90c20.js +0 -16
- package/dist/RightOutlined-83515eb4.js +0 -16
- package/dist/compact-item-b8f85aa6.js +0 -75
- package/dist/index-0a886e53.js +0 -100
- package/dist/index-0b9ee239.js +0 -955
- package/dist/index-1a33c134.js +0 -1389
- package/dist/index-4003d75b.js +0 -3748
- package/dist/index-89035ea5.js +0 -3242
- package/dist/providers/ToastWrapper.d.ts +0 -7
- package/dist/providers/ToastWrapper.js +0 -56
- package/dist/setup-aaca7b6f.js +0 -21158
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -36
- package/dist/useVariants-a0d64298.js +0 -30
- /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
- /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { forwardRef as De, useRef as ke, useImperativeHandle as Be } from "react";
|
|
3
|
+
import { c as T, e as Me, _ as L, a as He } from "./warning-C63HNL9U.js";
|
|
4
|
+
import { K as O, i as Xe, T as We, u as Ye, g as Ze, z as Ke } from "./index-CfDY25LP.js";
|
|
5
|
+
import { u as qe } from "./isVisible-A-IfeFoT.js";
|
|
6
|
+
import { C as Fe } from "./ContextIsolator-D5x2Ih51.js";
|
|
7
|
+
import { q as D, g as Ue, m as de, o as Ge, x as ce, C as pe, E as Je, v as Qe } from "./index-oK7z6jnz.js";
|
|
8
|
+
import { i as et, c as tt } from "./reactNode-sKPeiqPL.js";
|
|
9
|
+
import { P as Z } from "./presetColors-Cl8UP3Nw.js";
|
|
10
|
+
function ot(t, o) {
|
|
11
|
+
return Z.reduce((r, e) => {
|
|
12
|
+
const n = t[`${e}1`], s = t[`${e}3`], a = t[`${e}6`], i = t[`${e}7`];
|
|
13
|
+
return Object.assign(Object.assign({}, r), o(e, {
|
|
14
|
+
lightColor: n,
|
|
15
|
+
lightBorderColor: s,
|
|
16
|
+
darkColor: a,
|
|
17
|
+
textColor: i
|
|
18
|
+
}));
|
|
19
|
+
}, {});
|
|
20
|
+
}
|
|
21
|
+
const nt = new O("antZoomIn", {
|
|
22
|
+
"0%": {
|
|
23
|
+
transform: "scale(0.2)",
|
|
24
|
+
opacity: 0
|
|
25
|
+
},
|
|
26
|
+
"100%": {
|
|
27
|
+
transform: "scale(1)",
|
|
28
|
+
opacity: 1
|
|
29
|
+
}
|
|
30
|
+
}), rt = new O("antZoomOut", {
|
|
31
|
+
"0%": {
|
|
32
|
+
transform: "scale(1)"
|
|
33
|
+
},
|
|
34
|
+
"100%": {
|
|
35
|
+
transform: "scale(0.2)",
|
|
36
|
+
opacity: 0
|
|
37
|
+
}
|
|
38
|
+
}), fe = new O("antZoomBigIn", {
|
|
39
|
+
"0%": {
|
|
40
|
+
transform: "scale(0.8)",
|
|
41
|
+
opacity: 0
|
|
42
|
+
},
|
|
43
|
+
"100%": {
|
|
44
|
+
transform: "scale(1)",
|
|
45
|
+
opacity: 1
|
|
46
|
+
}
|
|
47
|
+
}), me = new O("antZoomBigOut", {
|
|
48
|
+
"0%": {
|
|
49
|
+
transform: "scale(1)"
|
|
50
|
+
},
|
|
51
|
+
"100%": {
|
|
52
|
+
transform: "scale(0.8)",
|
|
53
|
+
opacity: 0
|
|
54
|
+
}
|
|
55
|
+
}), at = new O("antZoomUpIn", {
|
|
56
|
+
"0%": {
|
|
57
|
+
transform: "scale(0.8)",
|
|
58
|
+
transformOrigin: "50% 0%",
|
|
59
|
+
opacity: 0
|
|
60
|
+
},
|
|
61
|
+
"100%": {
|
|
62
|
+
transform: "scale(1)",
|
|
63
|
+
transformOrigin: "50% 0%"
|
|
64
|
+
}
|
|
65
|
+
}), st = new O("antZoomUpOut", {
|
|
66
|
+
"0%": {
|
|
67
|
+
transform: "scale(1)",
|
|
68
|
+
transformOrigin: "50% 0%"
|
|
69
|
+
},
|
|
70
|
+
"100%": {
|
|
71
|
+
transform: "scale(0.8)",
|
|
72
|
+
transformOrigin: "50% 0%",
|
|
73
|
+
opacity: 0
|
|
74
|
+
}
|
|
75
|
+
}), it = new O("antZoomLeftIn", {
|
|
76
|
+
"0%": {
|
|
77
|
+
transform: "scale(0.8)",
|
|
78
|
+
transformOrigin: "0% 50%",
|
|
79
|
+
opacity: 0
|
|
80
|
+
},
|
|
81
|
+
"100%": {
|
|
82
|
+
transform: "scale(1)",
|
|
83
|
+
transformOrigin: "0% 50%"
|
|
84
|
+
}
|
|
85
|
+
}), lt = new O("antZoomLeftOut", {
|
|
86
|
+
"0%": {
|
|
87
|
+
transform: "scale(1)",
|
|
88
|
+
transformOrigin: "0% 50%"
|
|
89
|
+
},
|
|
90
|
+
"100%": {
|
|
91
|
+
transform: "scale(0.8)",
|
|
92
|
+
transformOrigin: "0% 50%",
|
|
93
|
+
opacity: 0
|
|
94
|
+
}
|
|
95
|
+
}), ct = new O("antZoomRightIn", {
|
|
96
|
+
"0%": {
|
|
97
|
+
transform: "scale(0.8)",
|
|
98
|
+
transformOrigin: "100% 50%",
|
|
99
|
+
opacity: 0
|
|
100
|
+
},
|
|
101
|
+
"100%": {
|
|
102
|
+
transform: "scale(1)",
|
|
103
|
+
transformOrigin: "100% 50%"
|
|
104
|
+
}
|
|
105
|
+
}), ft = new O("antZoomRightOut", {
|
|
106
|
+
"0%": {
|
|
107
|
+
transform: "scale(1)",
|
|
108
|
+
transformOrigin: "100% 50%"
|
|
109
|
+
},
|
|
110
|
+
"100%": {
|
|
111
|
+
transform: "scale(0.8)",
|
|
112
|
+
transformOrigin: "100% 50%",
|
|
113
|
+
opacity: 0
|
|
114
|
+
}
|
|
115
|
+
}), mt = new O("antZoomDownIn", {
|
|
116
|
+
"0%": {
|
|
117
|
+
transform: "scale(0.8)",
|
|
118
|
+
transformOrigin: "50% 100%",
|
|
119
|
+
opacity: 0
|
|
120
|
+
},
|
|
121
|
+
"100%": {
|
|
122
|
+
transform: "scale(1)",
|
|
123
|
+
transformOrigin: "50% 100%"
|
|
124
|
+
}
|
|
125
|
+
}), ut = new O("antZoomDownOut", {
|
|
126
|
+
"0%": {
|
|
127
|
+
transform: "scale(1)",
|
|
128
|
+
transformOrigin: "50% 100%"
|
|
129
|
+
},
|
|
130
|
+
"100%": {
|
|
131
|
+
transform: "scale(0.8)",
|
|
132
|
+
transformOrigin: "50% 100%",
|
|
133
|
+
opacity: 0
|
|
134
|
+
}
|
|
135
|
+
}), dt = {
|
|
136
|
+
zoom: {
|
|
137
|
+
inKeyframes: nt,
|
|
138
|
+
outKeyframes: rt
|
|
139
|
+
},
|
|
140
|
+
"zoom-big": {
|
|
141
|
+
inKeyframes: fe,
|
|
142
|
+
outKeyframes: me
|
|
143
|
+
},
|
|
144
|
+
"zoom-big-fast": {
|
|
145
|
+
inKeyframes: fe,
|
|
146
|
+
outKeyframes: me
|
|
147
|
+
},
|
|
148
|
+
"zoom-left": {
|
|
149
|
+
inKeyframes: it,
|
|
150
|
+
outKeyframes: lt
|
|
151
|
+
},
|
|
152
|
+
"zoom-right": {
|
|
153
|
+
inKeyframes: ct,
|
|
154
|
+
outKeyframes: ft
|
|
155
|
+
},
|
|
156
|
+
"zoom-up": {
|
|
157
|
+
inKeyframes: at,
|
|
158
|
+
outKeyframes: st
|
|
159
|
+
},
|
|
160
|
+
"zoom-down": {
|
|
161
|
+
inKeyframes: mt,
|
|
162
|
+
outKeyframes: ut
|
|
163
|
+
}
|
|
164
|
+
}, pt = (t, o) => {
|
|
165
|
+
const {
|
|
166
|
+
antCls: r
|
|
167
|
+
} = t, e = `${r}-${o}`, {
|
|
168
|
+
inKeyframes: n,
|
|
169
|
+
outKeyframes: s
|
|
170
|
+
} = dt[o];
|
|
171
|
+
return [Xe(e, n, s, o === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
|
|
172
|
+
[`
|
|
173
|
+
${e}-enter,
|
|
174
|
+
${e}-appear
|
|
175
|
+
`]: {
|
|
176
|
+
transform: "scale(0)",
|
|
177
|
+
opacity: 0,
|
|
178
|
+
animationTimingFunction: t.motionEaseOutCirc,
|
|
179
|
+
"&-prepare": {
|
|
180
|
+
transform: "none"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
[`${e}-leave`]: {
|
|
184
|
+
animationTimingFunction: t.motionEaseInOutCirc
|
|
185
|
+
}
|
|
186
|
+
}];
|
|
187
|
+
};
|
|
188
|
+
function ge(t) {
|
|
189
|
+
var o = t.children, r = t.prefixCls, e = t.id, n = t.overlayInnerStyle, s = t.bodyClassName, a = t.className, i = t.style;
|
|
190
|
+
return /* @__PURE__ */ f.createElement("div", {
|
|
191
|
+
className: T("".concat(r, "-content"), a),
|
|
192
|
+
style: i
|
|
193
|
+
}, /* @__PURE__ */ f.createElement("div", {
|
|
194
|
+
className: T("".concat(r, "-inner"), s),
|
|
195
|
+
id: e,
|
|
196
|
+
role: "tooltip",
|
|
197
|
+
style: n
|
|
198
|
+
}, typeof o == "function" ? o() : o));
|
|
199
|
+
}
|
|
200
|
+
var E = {
|
|
201
|
+
shiftX: 64,
|
|
202
|
+
adjustY: 1
|
|
203
|
+
}, V = {
|
|
204
|
+
adjustX: 1,
|
|
205
|
+
shiftY: !0
|
|
206
|
+
}, v = [0, 0], gt = {
|
|
207
|
+
left: {
|
|
208
|
+
points: ["cr", "cl"],
|
|
209
|
+
overflow: V,
|
|
210
|
+
offset: [-4, 0],
|
|
211
|
+
targetOffset: v
|
|
212
|
+
},
|
|
213
|
+
right: {
|
|
214
|
+
points: ["cl", "cr"],
|
|
215
|
+
overflow: V,
|
|
216
|
+
offset: [4, 0],
|
|
217
|
+
targetOffset: v
|
|
218
|
+
},
|
|
219
|
+
top: {
|
|
220
|
+
points: ["bc", "tc"],
|
|
221
|
+
overflow: E,
|
|
222
|
+
offset: [0, -4],
|
|
223
|
+
targetOffset: v
|
|
224
|
+
},
|
|
225
|
+
bottom: {
|
|
226
|
+
points: ["tc", "bc"],
|
|
227
|
+
overflow: E,
|
|
228
|
+
offset: [0, 4],
|
|
229
|
+
targetOffset: v
|
|
230
|
+
},
|
|
231
|
+
topLeft: {
|
|
232
|
+
points: ["bl", "tl"],
|
|
233
|
+
overflow: E,
|
|
234
|
+
offset: [0, -4],
|
|
235
|
+
targetOffset: v
|
|
236
|
+
},
|
|
237
|
+
leftTop: {
|
|
238
|
+
points: ["tr", "tl"],
|
|
239
|
+
overflow: V,
|
|
240
|
+
offset: [-4, 0],
|
|
241
|
+
targetOffset: v
|
|
242
|
+
},
|
|
243
|
+
topRight: {
|
|
244
|
+
points: ["br", "tr"],
|
|
245
|
+
overflow: E,
|
|
246
|
+
offset: [0, -4],
|
|
247
|
+
targetOffset: v
|
|
248
|
+
},
|
|
249
|
+
rightTop: {
|
|
250
|
+
points: ["tl", "tr"],
|
|
251
|
+
overflow: V,
|
|
252
|
+
offset: [4, 0],
|
|
253
|
+
targetOffset: v
|
|
254
|
+
},
|
|
255
|
+
bottomRight: {
|
|
256
|
+
points: ["tr", "br"],
|
|
257
|
+
overflow: E,
|
|
258
|
+
offset: [0, 4],
|
|
259
|
+
targetOffset: v
|
|
260
|
+
},
|
|
261
|
+
rightBottom: {
|
|
262
|
+
points: ["bl", "br"],
|
|
263
|
+
overflow: V,
|
|
264
|
+
offset: [4, 0],
|
|
265
|
+
targetOffset: v
|
|
266
|
+
},
|
|
267
|
+
bottomLeft: {
|
|
268
|
+
points: ["tl", "bl"],
|
|
269
|
+
overflow: E,
|
|
270
|
+
offset: [0, 4],
|
|
271
|
+
targetOffset: v
|
|
272
|
+
},
|
|
273
|
+
leftBottom: {
|
|
274
|
+
points: ["br", "bl"],
|
|
275
|
+
overflow: V,
|
|
276
|
+
offset: [-4, 0],
|
|
277
|
+
targetOffset: v
|
|
278
|
+
}
|
|
279
|
+
}, bt = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow", "classNames", "styles"], ht = function(o, r) {
|
|
280
|
+
var e = o.overlayClassName, n = o.trigger, s = n === void 0 ? ["hover"] : n, a = o.mouseEnterDelay, i = a === void 0 ? 0 : a, l = o.mouseLeaveDelay, m = l === void 0 ? 0.1 : l, h = o.overlayStyle, c = o.prefixCls, u = c === void 0 ? "rc-tooltip" : c, y = o.children, C = o.onVisibleChange, _ = o.afterVisibleChange, x = o.transitionName, b = o.animation, g = o.motion, N = o.placement, I = N === void 0 ? "right" : N, A = o.align, K = A === void 0 ? {} : A, q = o.destroyTooltipOnHide, F = q === void 0 ? !1 : q, U = o.defaultVisible, G = o.getTooltipContainer, J = o.overlayInnerStyle;
|
|
281
|
+
o.arrowContent;
|
|
282
|
+
var Q = o.overlay, ee = o.id, k = o.showArrow, S = k === void 0 ? !0 : k, w = o.classNames, P = o.styles, B = Me(o, bt), z = ke(null);
|
|
283
|
+
Be(r, function() {
|
|
284
|
+
return z.current;
|
|
285
|
+
});
|
|
286
|
+
var M = L({}, B);
|
|
287
|
+
"visible" in o && (M.popupVisible = o.visible);
|
|
288
|
+
var H = function() {
|
|
289
|
+
return /* @__PURE__ */ f.createElement(ge, {
|
|
290
|
+
key: "content",
|
|
291
|
+
prefixCls: u,
|
|
292
|
+
id: ee,
|
|
293
|
+
bodyClassName: w == null ? void 0 : w.body,
|
|
294
|
+
overlayInnerStyle: L(L({}, J), P == null ? void 0 : P.body)
|
|
295
|
+
}, Q);
|
|
296
|
+
};
|
|
297
|
+
return /* @__PURE__ */ f.createElement(We, He({
|
|
298
|
+
popupClassName: T(e, w == null ? void 0 : w.root),
|
|
299
|
+
prefixCls: u,
|
|
300
|
+
popup: H,
|
|
301
|
+
action: s,
|
|
302
|
+
builtinPlacements: gt,
|
|
303
|
+
popupPlacement: I,
|
|
304
|
+
ref: z,
|
|
305
|
+
popupAlign: K,
|
|
306
|
+
getPopupContainer: G,
|
|
307
|
+
onPopupVisibleChange: C,
|
|
308
|
+
afterPopupVisibleChange: _,
|
|
309
|
+
popupTransitionName: x,
|
|
310
|
+
popupAnimation: b,
|
|
311
|
+
popupMotion: g,
|
|
312
|
+
defaultPopupVisible: U,
|
|
313
|
+
autoDestroy: F,
|
|
314
|
+
mouseLeaveDelay: m,
|
|
315
|
+
popupStyle: L(L({}, h), P == null ? void 0 : P.root),
|
|
316
|
+
mouseEnterDelay: i,
|
|
317
|
+
arrow: S
|
|
318
|
+
}, M), y);
|
|
319
|
+
};
|
|
320
|
+
const yt = /* @__PURE__ */ De(ht);
|
|
321
|
+
function wt(t) {
|
|
322
|
+
const {
|
|
323
|
+
sizePopupArrow: o,
|
|
324
|
+
borderRadiusXS: r,
|
|
325
|
+
borderRadiusOuter: e
|
|
326
|
+
} = t, n = o / 2, s = 0, a = n, i = e * 1 / Math.sqrt(2), l = n - e * (1 - 1 / Math.sqrt(2)), m = n - r * (1 / Math.sqrt(2)), h = e * (Math.sqrt(2) - 1) + r * (1 / Math.sqrt(2)), c = 2 * n - m, u = h, y = 2 * n - i, C = l, _ = 2 * n - s, x = a, b = n * Math.sqrt(2) + e * (Math.sqrt(2) - 2), g = e * (Math.sqrt(2) - 1), N = `polygon(${g}px 100%, 50% ${g}px, ${2 * n - g}px 100%, ${g}px 100%)`, I = `path('M ${s} ${a} A ${e} ${e} 0 0 0 ${i} ${l} L ${m} ${h} A ${r} ${r} 0 0 1 ${c} ${u} L ${y} ${C} A ${e} ${e} 0 0 0 ${_} ${x} Z')`;
|
|
327
|
+
return {
|
|
328
|
+
arrowShadowWidth: b,
|
|
329
|
+
arrowPath: I,
|
|
330
|
+
arrowPolygon: N
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
const vt = (t, o, r) => {
|
|
334
|
+
const {
|
|
335
|
+
sizePopupArrow: e,
|
|
336
|
+
arrowPolygon: n,
|
|
337
|
+
arrowPath: s,
|
|
338
|
+
arrowShadowWidth: a,
|
|
339
|
+
borderRadiusXS: i,
|
|
340
|
+
calc: l
|
|
341
|
+
} = t;
|
|
342
|
+
return {
|
|
343
|
+
pointerEvents: "none",
|
|
344
|
+
width: e,
|
|
345
|
+
height: e,
|
|
346
|
+
overflow: "hidden",
|
|
347
|
+
"&::before": {
|
|
348
|
+
position: "absolute",
|
|
349
|
+
bottom: 0,
|
|
350
|
+
insetInlineStart: 0,
|
|
351
|
+
width: e,
|
|
352
|
+
height: l(e).div(2).equal(),
|
|
353
|
+
background: o,
|
|
354
|
+
clipPath: {
|
|
355
|
+
_multi_value_: !0,
|
|
356
|
+
value: [n, s]
|
|
357
|
+
},
|
|
358
|
+
content: '""'
|
|
359
|
+
},
|
|
360
|
+
"&::after": {
|
|
361
|
+
content: '""',
|
|
362
|
+
position: "absolute",
|
|
363
|
+
width: a,
|
|
364
|
+
height: a,
|
|
365
|
+
bottom: 0,
|
|
366
|
+
insetInline: 0,
|
|
367
|
+
margin: "auto",
|
|
368
|
+
borderRadius: {
|
|
369
|
+
_skip_check_: !0,
|
|
370
|
+
value: `0 0 ${D(i)} 0`
|
|
371
|
+
},
|
|
372
|
+
transform: "translateY(50%) rotate(-135deg)",
|
|
373
|
+
boxShadow: r,
|
|
374
|
+
zIndex: 0,
|
|
375
|
+
background: "transparent"
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
}, be = 8;
|
|
379
|
+
function he(t) {
|
|
380
|
+
const {
|
|
381
|
+
contentRadius: o,
|
|
382
|
+
limitVerticalRadius: r
|
|
383
|
+
} = t, e = o > 12 ? o + 2 : 12;
|
|
384
|
+
return {
|
|
385
|
+
arrowOffsetHorizontal: e,
|
|
386
|
+
arrowOffsetVertical: r ? be : e
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
function Y(t, o) {
|
|
390
|
+
return t ? o : {};
|
|
391
|
+
}
|
|
392
|
+
function Ot(t, o, r) {
|
|
393
|
+
const {
|
|
394
|
+
componentCls: e,
|
|
395
|
+
boxShadowPopoverArrow: n,
|
|
396
|
+
arrowOffsetVertical: s,
|
|
397
|
+
arrowOffsetHorizontal: a
|
|
398
|
+
} = t, {
|
|
399
|
+
arrowDistance: i = 0,
|
|
400
|
+
arrowPlacement: l = {
|
|
401
|
+
left: !0,
|
|
402
|
+
right: !0,
|
|
403
|
+
top: !0,
|
|
404
|
+
bottom: !0
|
|
405
|
+
}
|
|
406
|
+
} = r || {};
|
|
407
|
+
return {
|
|
408
|
+
[e]: Object.assign(Object.assign(Object.assign(Object.assign({
|
|
409
|
+
// ============================ Basic ============================
|
|
410
|
+
[`${e}-arrow`]: [Object.assign(Object.assign({
|
|
411
|
+
position: "absolute",
|
|
412
|
+
zIndex: 1,
|
|
413
|
+
display: "block"
|
|
414
|
+
}, vt(t, o, n)), {
|
|
415
|
+
"&:before": {
|
|
416
|
+
background: o
|
|
417
|
+
}
|
|
418
|
+
})]
|
|
419
|
+
}, Y(!!l.top, {
|
|
420
|
+
[[`&-placement-top > ${e}-arrow`, `&-placement-topLeft > ${e}-arrow`, `&-placement-topRight > ${e}-arrow`].join(",")]: {
|
|
421
|
+
bottom: i,
|
|
422
|
+
transform: "translateY(100%) rotate(180deg)"
|
|
423
|
+
},
|
|
424
|
+
[`&-placement-top > ${e}-arrow`]: {
|
|
425
|
+
left: {
|
|
426
|
+
_skip_check_: !0,
|
|
427
|
+
value: "50%"
|
|
428
|
+
},
|
|
429
|
+
transform: "translateX(-50%) translateY(100%) rotate(180deg)"
|
|
430
|
+
},
|
|
431
|
+
"&-placement-topLeft": {
|
|
432
|
+
"--arrow-offset-horizontal": a,
|
|
433
|
+
[`> ${e}-arrow`]: {
|
|
434
|
+
left: {
|
|
435
|
+
_skip_check_: !0,
|
|
436
|
+
value: a
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"&-placement-topRight": {
|
|
441
|
+
"--arrow-offset-horizontal": `calc(100% - ${D(a)})`,
|
|
442
|
+
[`> ${e}-arrow`]: {
|
|
443
|
+
right: {
|
|
444
|
+
_skip_check_: !0,
|
|
445
|
+
value: a
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
})), Y(!!l.bottom, {
|
|
450
|
+
[[`&-placement-bottom > ${e}-arrow`, `&-placement-bottomLeft > ${e}-arrow`, `&-placement-bottomRight > ${e}-arrow`].join(",")]: {
|
|
451
|
+
top: i,
|
|
452
|
+
transform: "translateY(-100%)"
|
|
453
|
+
},
|
|
454
|
+
[`&-placement-bottom > ${e}-arrow`]: {
|
|
455
|
+
left: {
|
|
456
|
+
_skip_check_: !0,
|
|
457
|
+
value: "50%"
|
|
458
|
+
},
|
|
459
|
+
transform: "translateX(-50%) translateY(-100%)"
|
|
460
|
+
},
|
|
461
|
+
"&-placement-bottomLeft": {
|
|
462
|
+
"--arrow-offset-horizontal": a,
|
|
463
|
+
[`> ${e}-arrow`]: {
|
|
464
|
+
left: {
|
|
465
|
+
_skip_check_: !0,
|
|
466
|
+
value: a
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"&-placement-bottomRight": {
|
|
471
|
+
"--arrow-offset-horizontal": `calc(100% - ${D(a)})`,
|
|
472
|
+
[`> ${e}-arrow`]: {
|
|
473
|
+
right: {
|
|
474
|
+
_skip_check_: !0,
|
|
475
|
+
value: a
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
})), Y(!!l.left, {
|
|
480
|
+
[[`&-placement-left > ${e}-arrow`, `&-placement-leftTop > ${e}-arrow`, `&-placement-leftBottom > ${e}-arrow`].join(",")]: {
|
|
481
|
+
right: {
|
|
482
|
+
_skip_check_: !0,
|
|
483
|
+
value: i
|
|
484
|
+
},
|
|
485
|
+
transform: "translateX(100%) rotate(90deg)"
|
|
486
|
+
},
|
|
487
|
+
[`&-placement-left > ${e}-arrow`]: {
|
|
488
|
+
top: {
|
|
489
|
+
_skip_check_: !0,
|
|
490
|
+
value: "50%"
|
|
491
|
+
},
|
|
492
|
+
transform: "translateY(-50%) translateX(100%) rotate(90deg)"
|
|
493
|
+
},
|
|
494
|
+
[`&-placement-leftTop > ${e}-arrow`]: {
|
|
495
|
+
top: s
|
|
496
|
+
},
|
|
497
|
+
[`&-placement-leftBottom > ${e}-arrow`]: {
|
|
498
|
+
bottom: s
|
|
499
|
+
}
|
|
500
|
+
})), Y(!!l.right, {
|
|
501
|
+
[[`&-placement-right > ${e}-arrow`, `&-placement-rightTop > ${e}-arrow`, `&-placement-rightBottom > ${e}-arrow`].join(",")]: {
|
|
502
|
+
left: {
|
|
503
|
+
_skip_check_: !0,
|
|
504
|
+
value: i
|
|
505
|
+
},
|
|
506
|
+
transform: "translateX(-100%) rotate(-90deg)"
|
|
507
|
+
},
|
|
508
|
+
[`&-placement-right > ${e}-arrow`]: {
|
|
509
|
+
top: {
|
|
510
|
+
_skip_check_: !0,
|
|
511
|
+
value: "50%"
|
|
512
|
+
},
|
|
513
|
+
transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
|
|
514
|
+
},
|
|
515
|
+
[`&-placement-rightTop > ${e}-arrow`]: {
|
|
516
|
+
top: s
|
|
517
|
+
},
|
|
518
|
+
[`&-placement-rightBottom > ${e}-arrow`]: {
|
|
519
|
+
bottom: s
|
|
520
|
+
}
|
|
521
|
+
}))
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
function Ct(t, o, r, e) {
|
|
525
|
+
if (e === !1)
|
|
526
|
+
return {
|
|
527
|
+
adjustX: !1,
|
|
528
|
+
adjustY: !1
|
|
529
|
+
};
|
|
530
|
+
const n = e && typeof e == "object" ? e : {}, s = {};
|
|
531
|
+
switch (t) {
|
|
532
|
+
case "top":
|
|
533
|
+
case "bottom":
|
|
534
|
+
s.shiftX = o.arrowOffsetHorizontal * 2 + r, s.shiftY = !0, s.adjustY = !0;
|
|
535
|
+
break;
|
|
536
|
+
case "left":
|
|
537
|
+
case "right":
|
|
538
|
+
s.shiftY = o.arrowOffsetVertical * 2 + r, s.shiftX = !0, s.adjustX = !0;
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
const a = Object.assign(Object.assign({}, s), n);
|
|
542
|
+
return a.shiftX || (a.adjustX = !0), a.shiftY || (a.adjustY = !0), a;
|
|
543
|
+
}
|
|
544
|
+
const ue = {
|
|
545
|
+
left: {
|
|
546
|
+
points: ["cr", "cl"]
|
|
547
|
+
},
|
|
548
|
+
right: {
|
|
549
|
+
points: ["cl", "cr"]
|
|
550
|
+
},
|
|
551
|
+
top: {
|
|
552
|
+
points: ["bc", "tc"]
|
|
553
|
+
},
|
|
554
|
+
bottom: {
|
|
555
|
+
points: ["tc", "bc"]
|
|
556
|
+
},
|
|
557
|
+
topLeft: {
|
|
558
|
+
points: ["bl", "tl"]
|
|
559
|
+
},
|
|
560
|
+
leftTop: {
|
|
561
|
+
points: ["tr", "tl"]
|
|
562
|
+
},
|
|
563
|
+
topRight: {
|
|
564
|
+
points: ["br", "tr"]
|
|
565
|
+
},
|
|
566
|
+
rightTop: {
|
|
567
|
+
points: ["tl", "tr"]
|
|
568
|
+
},
|
|
569
|
+
bottomRight: {
|
|
570
|
+
points: ["tr", "br"]
|
|
571
|
+
},
|
|
572
|
+
rightBottom: {
|
|
573
|
+
points: ["bl", "br"]
|
|
574
|
+
},
|
|
575
|
+
bottomLeft: {
|
|
576
|
+
points: ["tl", "bl"]
|
|
577
|
+
},
|
|
578
|
+
leftBottom: {
|
|
579
|
+
points: ["br", "bl"]
|
|
580
|
+
}
|
|
581
|
+
}, $t = {
|
|
582
|
+
topLeft: {
|
|
583
|
+
points: ["bl", "tc"]
|
|
584
|
+
},
|
|
585
|
+
leftTop: {
|
|
586
|
+
points: ["tr", "cl"]
|
|
587
|
+
},
|
|
588
|
+
topRight: {
|
|
589
|
+
points: ["br", "tc"]
|
|
590
|
+
},
|
|
591
|
+
rightTop: {
|
|
592
|
+
points: ["tl", "cr"]
|
|
593
|
+
},
|
|
594
|
+
bottomRight: {
|
|
595
|
+
points: ["tr", "bc"]
|
|
596
|
+
},
|
|
597
|
+
rightBottom: {
|
|
598
|
+
points: ["bl", "cr"]
|
|
599
|
+
},
|
|
600
|
+
bottomLeft: {
|
|
601
|
+
points: ["tl", "bc"]
|
|
602
|
+
},
|
|
603
|
+
leftBottom: {
|
|
604
|
+
points: ["br", "cl"]
|
|
605
|
+
}
|
|
606
|
+
}, _t = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]);
|
|
607
|
+
function xt(t) {
|
|
608
|
+
const {
|
|
609
|
+
arrowWidth: o,
|
|
610
|
+
autoAdjustOverflow: r,
|
|
611
|
+
arrowPointAtCenter: e,
|
|
612
|
+
offset: n,
|
|
613
|
+
borderRadius: s,
|
|
614
|
+
visibleFirst: a
|
|
615
|
+
} = t, i = o / 2, l = {};
|
|
616
|
+
return Object.keys(ue).forEach((m) => {
|
|
617
|
+
const h = e && $t[m] || ue[m], c = Object.assign(Object.assign({}, h), {
|
|
618
|
+
offset: [0, 0],
|
|
619
|
+
dynamicInset: !0
|
|
620
|
+
});
|
|
621
|
+
switch (l[m] = c, _t.has(m) && (c.autoArrow = !1), m) {
|
|
622
|
+
case "top":
|
|
623
|
+
case "topLeft":
|
|
624
|
+
case "topRight":
|
|
625
|
+
c.offset[1] = -i - n;
|
|
626
|
+
break;
|
|
627
|
+
case "bottom":
|
|
628
|
+
case "bottomLeft":
|
|
629
|
+
case "bottomRight":
|
|
630
|
+
c.offset[1] = i + n;
|
|
631
|
+
break;
|
|
632
|
+
case "left":
|
|
633
|
+
case "leftTop":
|
|
634
|
+
case "leftBottom":
|
|
635
|
+
c.offset[0] = -i - n;
|
|
636
|
+
break;
|
|
637
|
+
case "right":
|
|
638
|
+
case "rightTop":
|
|
639
|
+
case "rightBottom":
|
|
640
|
+
c.offset[0] = i + n;
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
const u = he({
|
|
644
|
+
contentRadius: s,
|
|
645
|
+
limitVerticalRadius: !0
|
|
646
|
+
});
|
|
647
|
+
if (e)
|
|
648
|
+
switch (m) {
|
|
649
|
+
case "topLeft":
|
|
650
|
+
case "bottomLeft":
|
|
651
|
+
c.offset[0] = -u.arrowOffsetHorizontal - i;
|
|
652
|
+
break;
|
|
653
|
+
case "topRight":
|
|
654
|
+
case "bottomRight":
|
|
655
|
+
c.offset[0] = u.arrowOffsetHorizontal + i;
|
|
656
|
+
break;
|
|
657
|
+
case "leftTop":
|
|
658
|
+
case "rightTop":
|
|
659
|
+
c.offset[1] = -u.arrowOffsetHorizontal * 2 + i;
|
|
660
|
+
break;
|
|
661
|
+
case "leftBottom":
|
|
662
|
+
case "rightBottom":
|
|
663
|
+
c.offset[1] = u.arrowOffsetHorizontal * 2 - i;
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
c.overflow = Ct(m, u, o, r), a && (c.htmlRegion = "visibleFirst");
|
|
667
|
+
}), l;
|
|
668
|
+
}
|
|
669
|
+
const Pt = (t) => {
|
|
670
|
+
const {
|
|
671
|
+
calc: o,
|
|
672
|
+
componentCls: r,
|
|
673
|
+
// ant-tooltip
|
|
674
|
+
tooltipMaxWidth: e,
|
|
675
|
+
tooltipColor: n,
|
|
676
|
+
tooltipBg: s,
|
|
677
|
+
tooltipBorderRadius: a,
|
|
678
|
+
zIndexPopup: i,
|
|
679
|
+
controlHeight: l,
|
|
680
|
+
boxShadowSecondary: m,
|
|
681
|
+
paddingSM: h,
|
|
682
|
+
paddingXS: c,
|
|
683
|
+
arrowOffsetHorizontal: u,
|
|
684
|
+
sizePopupArrow: y
|
|
685
|
+
} = t, C = o(a).add(y).add(u).equal(), _ = o(a).mul(2).add(y).equal();
|
|
686
|
+
return [
|
|
687
|
+
{
|
|
688
|
+
[r]: Object.assign(Object.assign(Object.assign(Object.assign({}, Ge(t)), {
|
|
689
|
+
position: "absolute",
|
|
690
|
+
zIndex: i,
|
|
691
|
+
display: "block",
|
|
692
|
+
width: "max-content",
|
|
693
|
+
maxWidth: e,
|
|
694
|
+
visibility: "visible",
|
|
695
|
+
// When use `autoArrow`, origin will follow the arrow position
|
|
696
|
+
"--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
|
|
697
|
+
transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
|
|
698
|
+
"&-hidden": {
|
|
699
|
+
display: "none"
|
|
700
|
+
},
|
|
701
|
+
"--antd-arrow-background-color": s,
|
|
702
|
+
// Wrapper for the tooltip content
|
|
703
|
+
[`${r}-inner`]: {
|
|
704
|
+
minWidth: _,
|
|
705
|
+
minHeight: l,
|
|
706
|
+
padding: `${D(t.calc(h).div(2).equal())} ${D(c)}`,
|
|
707
|
+
color: n,
|
|
708
|
+
textAlign: "start",
|
|
709
|
+
textDecoration: "none",
|
|
710
|
+
wordWrap: "break-word",
|
|
711
|
+
backgroundColor: s,
|
|
712
|
+
borderRadius: a,
|
|
713
|
+
boxShadow: m,
|
|
714
|
+
boxSizing: "border-box"
|
|
715
|
+
},
|
|
716
|
+
// Align placement should have another min width
|
|
717
|
+
[["&-placement-topLeft", "&-placement-topRight", "&-placement-bottomLeft", "&-placement-bottomRight"].join(",")]: {
|
|
718
|
+
minWidth: C
|
|
719
|
+
},
|
|
720
|
+
// Limit left and right placement radius
|
|
721
|
+
[["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
|
|
722
|
+
[`${r}-inner`]: {
|
|
723
|
+
borderRadius: t.min(a, be)
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
[`${r}-content`]: {
|
|
727
|
+
position: "relative"
|
|
728
|
+
}
|
|
729
|
+
}), ot(t, (x, b) => {
|
|
730
|
+
let {
|
|
731
|
+
darkColor: g
|
|
732
|
+
} = b;
|
|
733
|
+
return {
|
|
734
|
+
[`&${r}-${x}`]: {
|
|
735
|
+
[`${r}-inner`]: {
|
|
736
|
+
backgroundColor: g
|
|
737
|
+
},
|
|
738
|
+
[`${r}-arrow`]: {
|
|
739
|
+
"--antd-arrow-background-color": g
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
})), {
|
|
744
|
+
// RTL
|
|
745
|
+
"&-rtl": {
|
|
746
|
+
direction: "rtl"
|
|
747
|
+
}
|
|
748
|
+
})
|
|
749
|
+
},
|
|
750
|
+
// Arrow Style
|
|
751
|
+
Ot(t, "var(--antd-arrow-background-color)"),
|
|
752
|
+
// Pure Render
|
|
753
|
+
{
|
|
754
|
+
[`${r}-pure`]: {
|
|
755
|
+
position: "relative",
|
|
756
|
+
maxWidth: "none",
|
|
757
|
+
margin: t.sizePopupArrow
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
];
|
|
761
|
+
}, Nt = (t) => Object.assign(Object.assign({
|
|
762
|
+
zIndexPopup: t.zIndexPopupBase + 70
|
|
763
|
+
}, he({
|
|
764
|
+
contentRadius: t.borderRadius,
|
|
765
|
+
limitVerticalRadius: !0
|
|
766
|
+
})), wt(de(t, {
|
|
767
|
+
borderRadiusOuter: Math.min(t.borderRadiusOuter, 4)
|
|
768
|
+
}))), ye = function(t) {
|
|
769
|
+
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
770
|
+
return Ue("Tooltip", (e) => {
|
|
771
|
+
const {
|
|
772
|
+
borderRadius: n,
|
|
773
|
+
colorTextLightSolid: s,
|
|
774
|
+
colorBgSpotlight: a
|
|
775
|
+
} = e, i = de(e, {
|
|
776
|
+
// default variables
|
|
777
|
+
tooltipMaxWidth: 250,
|
|
778
|
+
tooltipColor: s,
|
|
779
|
+
tooltipBorderRadius: n,
|
|
780
|
+
tooltipBg: a
|
|
781
|
+
});
|
|
782
|
+
return [Pt(i), pt(e, "zoom-big-fast")];
|
|
783
|
+
}, Nt, {
|
|
784
|
+
resetStyle: !1,
|
|
785
|
+
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
786
|
+
injectStyle: o
|
|
787
|
+
})(t);
|
|
788
|
+
}, St = Z.map((t) => `${t}-inverse`);
|
|
789
|
+
function jt(t) {
|
|
790
|
+
return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [].concat(ce(St), ce(Z)).includes(t) : Z.includes(t);
|
|
791
|
+
}
|
|
792
|
+
function we(t, o) {
|
|
793
|
+
const r = jt(o), e = T({
|
|
794
|
+
[`${t}-${o}`]: o && r
|
|
795
|
+
}), n = {}, s = {};
|
|
796
|
+
return o && !r && (n.background = o, s["--antd-arrow-background-color"] = o), {
|
|
797
|
+
className: e,
|
|
798
|
+
overlayStyle: n,
|
|
799
|
+
arrowStyle: s
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
const Tt = (t) => {
|
|
803
|
+
const {
|
|
804
|
+
prefixCls: o,
|
|
805
|
+
className: r,
|
|
806
|
+
placement: e = "top",
|
|
807
|
+
title: n,
|
|
808
|
+
color: s,
|
|
809
|
+
overlayInnerStyle: a
|
|
810
|
+
} = t, {
|
|
811
|
+
getPrefixCls: i
|
|
812
|
+
} = f.useContext(pe), l = i("tooltip", o), [m, h, c] = ye(l), u = we(l, s), y = u.arrowStyle, C = Object.assign(Object.assign({}, a), u.overlayStyle), _ = T(h, c, l, `${l}-pure`, `${l}-placement-${e}`, r, u.className);
|
|
813
|
+
return m(/* @__PURE__ */ f.createElement("div", {
|
|
814
|
+
className: _,
|
|
815
|
+
style: y
|
|
816
|
+
}, /* @__PURE__ */ f.createElement("div", {
|
|
817
|
+
className: `${l}-arrow`
|
|
818
|
+
}), /* @__PURE__ */ f.createElement(ge, Object.assign({}, t, {
|
|
819
|
+
className: h,
|
|
820
|
+
prefixCls: l,
|
|
821
|
+
overlayInnerStyle: C
|
|
822
|
+
}), n)));
|
|
823
|
+
};
|
|
824
|
+
var zt = function(t, o) {
|
|
825
|
+
var r = {};
|
|
826
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (r[e] = t[e]);
|
|
827
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, e = Object.getOwnPropertySymbols(t); n < e.length; n++)
|
|
828
|
+
o.indexOf(e[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[n]) && (r[e[n]] = t[e[n]]);
|
|
829
|
+
return r;
|
|
830
|
+
};
|
|
831
|
+
const It = /* @__PURE__ */ f.forwardRef((t, o) => {
|
|
832
|
+
var r, e, n, s, a, i;
|
|
833
|
+
const {
|
|
834
|
+
prefixCls: l,
|
|
835
|
+
openClassName: m,
|
|
836
|
+
getTooltipContainer: h,
|
|
837
|
+
color: c,
|
|
838
|
+
overlayInnerStyle: u,
|
|
839
|
+
children: y,
|
|
840
|
+
afterOpenChange: C,
|
|
841
|
+
afterVisibleChange: _,
|
|
842
|
+
destroyTooltipOnHide: x,
|
|
843
|
+
arrow: b = !0,
|
|
844
|
+
title: g,
|
|
845
|
+
overlay: N,
|
|
846
|
+
builtinPlacements: I,
|
|
847
|
+
arrowPointAtCenter: A = !1,
|
|
848
|
+
autoAdjustOverflow: K = !0,
|
|
849
|
+
motion: q,
|
|
850
|
+
getPopupContainer: F,
|
|
851
|
+
placement: U = "top",
|
|
852
|
+
mouseEnterDelay: G = 0.1,
|
|
853
|
+
mouseLeaveDelay: J = 0.1,
|
|
854
|
+
overlayStyle: Q,
|
|
855
|
+
rootClassName: ee,
|
|
856
|
+
overlayClassName: k,
|
|
857
|
+
styles: S,
|
|
858
|
+
classNames: w
|
|
859
|
+
} = t, P = zt(t, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "arrow", "title", "overlay", "builtinPlacements", "arrowPointAtCenter", "autoAdjustOverflow", "motion", "getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]), B = !!b, [, z] = Je(), {
|
|
860
|
+
getPopupContainer: M,
|
|
861
|
+
getPrefixCls: H,
|
|
862
|
+
direction: ie,
|
|
863
|
+
tooltip: d
|
|
864
|
+
} = f.useContext(pe), X = Qe("Tooltip"), te = f.useRef(null), le = () => {
|
|
865
|
+
var p;
|
|
866
|
+
(p = te.current) === null || p === void 0 || p.forceAlign();
|
|
867
|
+
};
|
|
868
|
+
f.useImperativeHandle(o, () => {
|
|
869
|
+
var p;
|
|
870
|
+
return {
|
|
871
|
+
forceAlign: le,
|
|
872
|
+
forcePopupAlign: () => {
|
|
873
|
+
X.deprecated(!1, "forcePopupAlign", "forceAlign"), le();
|
|
874
|
+
},
|
|
875
|
+
nativeElement: (p = te.current) === null || p === void 0 ? void 0 : p.nativeElement
|
|
876
|
+
};
|
|
877
|
+
}), process.env.NODE_ENV !== "production" && ([["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"], ["arrowPointAtCenter", "arrow={{ pointAtCenter: true }}"], ["overlayStyle", "styles={{ root: {} }}"], ["overlayInnerStyle", "styles={{ body: {} }}"], ["overlayClassName", "classNames={{ root: {} }}"]].forEach((p) => {
|
|
878
|
+
let [$, j] = p;
|
|
879
|
+
X.deprecated(!($ in t), $, j);
|
|
880
|
+
}), process.env.NODE_ENV !== "production" && X(!x || typeof x == "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && X(!b || typeof b == "boolean" || !("arrowPointAtCenter" in b), "deprecated", "`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));
|
|
881
|
+
const [Oe, Ce] = qe(!1, {
|
|
882
|
+
value: (r = t.open) !== null && r !== void 0 ? r : t.visible,
|
|
883
|
+
defaultValue: (e = t.defaultOpen) !== null && e !== void 0 ? e : t.defaultVisible
|
|
884
|
+
}), oe = !g && !N && g !== 0, $e = (p) => {
|
|
885
|
+
var $, j;
|
|
886
|
+
Ce(oe ? !1 : p), oe || (($ = t.onOpenChange) === null || $ === void 0 || $.call(t, p), (j = t.onVisibleChange) === null || j === void 0 || j.call(t, p));
|
|
887
|
+
}, _e = f.useMemo(() => {
|
|
888
|
+
var p, $;
|
|
889
|
+
let j = A;
|
|
890
|
+
return typeof b == "object" && (j = ($ = (p = b.pointAtCenter) !== null && p !== void 0 ? p : b.arrowPointAtCenter) !== null && $ !== void 0 ? $ : A), I || xt({
|
|
891
|
+
arrowPointAtCenter: j,
|
|
892
|
+
autoAdjustOverflow: K,
|
|
893
|
+
arrowWidth: B ? z.sizePopupArrow : 0,
|
|
894
|
+
borderRadius: z.borderRadius,
|
|
895
|
+
offset: z.marginXXS,
|
|
896
|
+
visibleFirst: !0
|
|
897
|
+
});
|
|
898
|
+
}, [A, b, I, z]), ne = f.useMemo(() => g === 0 ? g : N || g || "", [N, g]), xe = /* @__PURE__ */ f.createElement(Fe, {
|
|
899
|
+
space: !0
|
|
900
|
+
}, typeof ne == "function" ? ne() : ne), R = H("tooltip", l), Pe = H(), Ne = t["data-popover-inject"];
|
|
901
|
+
let re = Oe;
|
|
902
|
+
!("open" in t) && !("visible" in t) && oe && (re = !1);
|
|
903
|
+
const ae = /* @__PURE__ */ f.isValidElement(y) && !et(y) ? y : /* @__PURE__ */ f.createElement("span", null, y), W = ae.props, Se = !W.className || typeof W.className == "string" ? T(W.className, m || `${R}-open`) : W.className, [je, Te, ze] = ye(R, !Ne), se = we(R, c), Ie = se.arrowStyle, Ae = T(k, {
|
|
904
|
+
[`${R}-rtl`]: ie === "rtl"
|
|
905
|
+
}, se.className, ee, Te, ze, d == null ? void 0 : d.className, (n = d == null ? void 0 : d.classNames) === null || n === void 0 ? void 0 : n.root, w == null ? void 0 : w.root), Re = T((s = d == null ? void 0 : d.classNames) === null || s === void 0 ? void 0 : s.body, w == null ? void 0 : w.body), [Ee, Ve] = Ye("Tooltip", P.zIndex), Le = /* @__PURE__ */ f.createElement(yt, Object.assign({}, P, {
|
|
906
|
+
zIndex: Ee,
|
|
907
|
+
showArrow: B,
|
|
908
|
+
placement: U,
|
|
909
|
+
mouseEnterDelay: G,
|
|
910
|
+
mouseLeaveDelay: J,
|
|
911
|
+
prefixCls: R,
|
|
912
|
+
classNames: {
|
|
913
|
+
root: Ae,
|
|
914
|
+
body: Re
|
|
915
|
+
},
|
|
916
|
+
styles: {
|
|
917
|
+
root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Ie), (a = d == null ? void 0 : d.styles) === null || a === void 0 ? void 0 : a.root), d == null ? void 0 : d.style), Q), S == null ? void 0 : S.root),
|
|
918
|
+
body: Object.assign(Object.assign(Object.assign(Object.assign({}, (i = d == null ? void 0 : d.styles) === null || i === void 0 ? void 0 : i.body), u), S == null ? void 0 : S.body), se.overlayStyle)
|
|
919
|
+
},
|
|
920
|
+
getTooltipContainer: F || h || M,
|
|
921
|
+
ref: te,
|
|
922
|
+
builtinPlacements: _e,
|
|
923
|
+
overlay: xe,
|
|
924
|
+
visible: re,
|
|
925
|
+
onVisibleChange: $e,
|
|
926
|
+
afterVisibleChange: C ?? _,
|
|
927
|
+
arrowContent: /* @__PURE__ */ f.createElement("span", {
|
|
928
|
+
className: `${R}-arrow-content`
|
|
929
|
+
}),
|
|
930
|
+
motion: {
|
|
931
|
+
motionName: Ze(Pe, "zoom-big-fast", t.transitionName),
|
|
932
|
+
motionDeadline: 1e3
|
|
933
|
+
},
|
|
934
|
+
destroyTooltipOnHide: !!x
|
|
935
|
+
}), re ? tt(ae, {
|
|
936
|
+
className: Se
|
|
937
|
+
}) : ae);
|
|
938
|
+
return je(/* @__PURE__ */ f.createElement(Ke.Provider, {
|
|
939
|
+
value: Ve
|
|
940
|
+
}, Le));
|
|
941
|
+
}), ve = It;
|
|
942
|
+
process.env.NODE_ENV !== "production" && (ve.displayName = "Tooltip");
|
|
943
|
+
ve._InternalPanelDoNotUseOrYouWillBeFired = Tt;
|
|
944
|
+
export {
|
|
945
|
+
ve as T,
|
|
946
|
+
he as a,
|
|
947
|
+
wt as b,
|
|
948
|
+
xt as c,
|
|
949
|
+
Ot as g,
|
|
950
|
+
pt as i,
|
|
951
|
+
nt as z
|
|
952
|
+
};
|