@gobolt/genesis 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +35 -35
- 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
package/dist/index-0b9ee239.js
DELETED
|
@@ -1,955 +0,0 @@
|
|
|
1
|
-
import * as m from "react";
|
|
2
|
-
import { forwardRef as Lt, useRef as Dt, useImperativeHandle as kt } from "react";
|
|
3
|
-
import { c as S, e as Bt, _ as H, a as Mt } from "./presets-83ccb923.js";
|
|
4
|
-
import { K as w, i as Xt, T as Ht, u as Wt, g as Yt, z as Zt } from "./index-1a33c134.js";
|
|
5
|
-
import { u as Kt } from "./isVisible-729780f5.js";
|
|
6
|
-
import { C as qt } from "./ContextIsolator-b09b2c52.js";
|
|
7
|
-
import { p as W, g as Ft, m as mt, r as Ut, v as it, C as pt, B as Gt, t as Jt } from "./index-4003d75b.js";
|
|
8
|
-
import { i as Qt, c as te } from "./reactNode-f4391605.js";
|
|
9
|
-
import { P as G } from "./presetColors-ccf8cb4c.js";
|
|
10
|
-
function ee(e, o) {
|
|
11
|
-
return G.reduce((a, t) => {
|
|
12
|
-
const r = e[`${t}1`], s = e[`${t}3`], n = e[`${t}6`], i = e[`${t}7`];
|
|
13
|
-
return Object.assign(Object.assign({}, a), o(t, {
|
|
14
|
-
lightColor: r,
|
|
15
|
-
lightBorderColor: s,
|
|
16
|
-
darkColor: n,
|
|
17
|
-
textColor: i
|
|
18
|
-
}));
|
|
19
|
-
}, {});
|
|
20
|
-
}
|
|
21
|
-
const oe = new w("antZoomIn", {
|
|
22
|
-
"0%": {
|
|
23
|
-
transform: "scale(0.2)",
|
|
24
|
-
opacity: 0
|
|
25
|
-
},
|
|
26
|
-
"100%": {
|
|
27
|
-
transform: "scale(1)",
|
|
28
|
-
opacity: 1
|
|
29
|
-
}
|
|
30
|
-
}), re = new w("antZoomOut", {
|
|
31
|
-
"0%": {
|
|
32
|
-
transform: "scale(1)"
|
|
33
|
-
},
|
|
34
|
-
"100%": {
|
|
35
|
-
transform: "scale(0.2)",
|
|
36
|
-
opacity: 0
|
|
37
|
-
}
|
|
38
|
-
}), lt = new w("antZoomBigIn", {
|
|
39
|
-
"0%": {
|
|
40
|
-
transform: "scale(0.8)",
|
|
41
|
-
opacity: 0
|
|
42
|
-
},
|
|
43
|
-
"100%": {
|
|
44
|
-
transform: "scale(1)",
|
|
45
|
-
opacity: 1
|
|
46
|
-
}
|
|
47
|
-
}), ct = new w("antZoomBigOut", {
|
|
48
|
-
"0%": {
|
|
49
|
-
transform: "scale(1)"
|
|
50
|
-
},
|
|
51
|
-
"100%": {
|
|
52
|
-
transform: "scale(0.8)",
|
|
53
|
-
opacity: 0
|
|
54
|
-
}
|
|
55
|
-
}), ae = new w("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
|
-
}), ne = new w("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
|
-
}), se = new w("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
|
-
}), ie = new w("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
|
-
}), le = new w("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
|
-
}), ce = new w("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
|
-
}), fe = new w("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
|
-
}), me = new w("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
|
-
}), pe = {
|
|
136
|
-
zoom: {
|
|
137
|
-
inKeyframes: oe,
|
|
138
|
-
outKeyframes: re
|
|
139
|
-
},
|
|
140
|
-
"zoom-big": {
|
|
141
|
-
inKeyframes: lt,
|
|
142
|
-
outKeyframes: ct
|
|
143
|
-
},
|
|
144
|
-
"zoom-big-fast": {
|
|
145
|
-
inKeyframes: lt,
|
|
146
|
-
outKeyframes: ct
|
|
147
|
-
},
|
|
148
|
-
"zoom-left": {
|
|
149
|
-
inKeyframes: se,
|
|
150
|
-
outKeyframes: ie
|
|
151
|
-
},
|
|
152
|
-
"zoom-right": {
|
|
153
|
-
inKeyframes: le,
|
|
154
|
-
outKeyframes: ce
|
|
155
|
-
},
|
|
156
|
-
"zoom-up": {
|
|
157
|
-
inKeyframes: ae,
|
|
158
|
-
outKeyframes: ne
|
|
159
|
-
},
|
|
160
|
-
"zoom-down": {
|
|
161
|
-
inKeyframes: fe,
|
|
162
|
-
outKeyframes: me
|
|
163
|
-
}
|
|
164
|
-
}, ue = (e, o) => {
|
|
165
|
-
const {
|
|
166
|
-
antCls: a
|
|
167
|
-
} = e, t = `${a}-${o}`, {
|
|
168
|
-
inKeyframes: r,
|
|
169
|
-
outKeyframes: s
|
|
170
|
-
} = pe[o];
|
|
171
|
-
return [Xt(t, r, s, o === "zoom-big-fast" ? e.motionDurationFast : e.motionDurationMid), {
|
|
172
|
-
[`
|
|
173
|
-
${t}-enter,
|
|
174
|
-
${t}-appear
|
|
175
|
-
`]: {
|
|
176
|
-
transform: "scale(0)",
|
|
177
|
-
opacity: 0,
|
|
178
|
-
animationTimingFunction: e.motionEaseOutCirc,
|
|
179
|
-
"&-prepare": {
|
|
180
|
-
transform: "none"
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
[`${t}-leave`]: {
|
|
184
|
-
animationTimingFunction: e.motionEaseInOutCirc
|
|
185
|
-
}
|
|
186
|
-
}];
|
|
187
|
-
};
|
|
188
|
-
function ut(e) {
|
|
189
|
-
var o = e.children, a = e.prefixCls, t = e.id, r = e.overlayInnerStyle, s = e.bodyClassName, n = e.className, i = e.style;
|
|
190
|
-
return /* @__PURE__ */ m.createElement("div", {
|
|
191
|
-
className: S("".concat(a, "-content"), n),
|
|
192
|
-
style: i
|
|
193
|
-
}, /* @__PURE__ */ m.createElement("div", {
|
|
194
|
-
className: S("".concat(a, "-inner"), s),
|
|
195
|
-
id: t,
|
|
196
|
-
role: "tooltip",
|
|
197
|
-
style: r
|
|
198
|
-
}, typeof o == "function" ? o() : o));
|
|
199
|
-
}
|
|
200
|
-
var D = {
|
|
201
|
-
shiftX: 64,
|
|
202
|
-
adjustY: 1
|
|
203
|
-
}, k = {
|
|
204
|
-
adjustX: 1,
|
|
205
|
-
shiftY: !0
|
|
206
|
-
}, y = [0, 0], de = {
|
|
207
|
-
left: {
|
|
208
|
-
points: ["cr", "cl"],
|
|
209
|
-
overflow: k,
|
|
210
|
-
offset: [-4, 0],
|
|
211
|
-
targetOffset: y
|
|
212
|
-
},
|
|
213
|
-
right: {
|
|
214
|
-
points: ["cl", "cr"],
|
|
215
|
-
overflow: k,
|
|
216
|
-
offset: [4, 0],
|
|
217
|
-
targetOffset: y
|
|
218
|
-
},
|
|
219
|
-
top: {
|
|
220
|
-
points: ["bc", "tc"],
|
|
221
|
-
overflow: D,
|
|
222
|
-
offset: [0, -4],
|
|
223
|
-
targetOffset: y
|
|
224
|
-
},
|
|
225
|
-
bottom: {
|
|
226
|
-
points: ["tc", "bc"],
|
|
227
|
-
overflow: D,
|
|
228
|
-
offset: [0, 4],
|
|
229
|
-
targetOffset: y
|
|
230
|
-
},
|
|
231
|
-
topLeft: {
|
|
232
|
-
points: ["bl", "tl"],
|
|
233
|
-
overflow: D,
|
|
234
|
-
offset: [0, -4],
|
|
235
|
-
targetOffset: y
|
|
236
|
-
},
|
|
237
|
-
leftTop: {
|
|
238
|
-
points: ["tr", "tl"],
|
|
239
|
-
overflow: k,
|
|
240
|
-
offset: [-4, 0],
|
|
241
|
-
targetOffset: y
|
|
242
|
-
},
|
|
243
|
-
topRight: {
|
|
244
|
-
points: ["br", "tr"],
|
|
245
|
-
overflow: D,
|
|
246
|
-
offset: [0, -4],
|
|
247
|
-
targetOffset: y
|
|
248
|
-
},
|
|
249
|
-
rightTop: {
|
|
250
|
-
points: ["tl", "tr"],
|
|
251
|
-
overflow: k,
|
|
252
|
-
offset: [4, 0],
|
|
253
|
-
targetOffset: y
|
|
254
|
-
},
|
|
255
|
-
bottomRight: {
|
|
256
|
-
points: ["tr", "br"],
|
|
257
|
-
overflow: D,
|
|
258
|
-
offset: [0, 4],
|
|
259
|
-
targetOffset: y
|
|
260
|
-
},
|
|
261
|
-
rightBottom: {
|
|
262
|
-
points: ["bl", "br"],
|
|
263
|
-
overflow: k,
|
|
264
|
-
offset: [4, 0],
|
|
265
|
-
targetOffset: y
|
|
266
|
-
},
|
|
267
|
-
bottomLeft: {
|
|
268
|
-
points: ["tl", "bl"],
|
|
269
|
-
overflow: D,
|
|
270
|
-
offset: [0, 4],
|
|
271
|
-
targetOffset: y
|
|
272
|
-
},
|
|
273
|
-
leftBottom: {
|
|
274
|
-
points: ["br", "bl"],
|
|
275
|
-
overflow: k,
|
|
276
|
-
offset: [-4, 0],
|
|
277
|
-
targetOffset: y
|
|
278
|
-
}
|
|
279
|
-
}, ge = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow", "classNames", "styles"], be = function(o, a) {
|
|
280
|
-
var t = o.overlayClassName, r = o.trigger, s = r === void 0 ? ["hover"] : r, n = o.mouseEnterDelay, i = n === void 0 ? 0 : n, l = o.mouseLeaveDelay, p = l === void 0 ? 0.1 : l, v = o.overlayStyle, c = o.prefixCls, u = c === void 0 ? "rc-tooltip" : c, h = o.children, O = o.onVisibleChange, $ = o.afterVisibleChange, _ = o.transitionName, b = o.animation, g = o.motion, x = o.placement, j = x === void 0 ? "right" : x, z = o.align, J = z === void 0 ? {} : z, B = o.destroyTooltipOnHide, I = B === void 0 ? !1 : B, Q = o.defaultVisible, Y = o.getTooltipContainer, tt = o.overlayInnerStyle;
|
|
281
|
-
o.arrowContent;
|
|
282
|
-
var f = o.overlay, R = o.id, A = o.showArrow, Z = A === void 0 ? !0 : A, P = o.classNames, N = o.styles, M = Bt(o, ge), K = Dt(null);
|
|
283
|
-
kt(a, function() {
|
|
284
|
-
return K.current;
|
|
285
|
-
});
|
|
286
|
-
var q = H({}, M);
|
|
287
|
-
"visible" in o && (q.popupVisible = o.visible);
|
|
288
|
-
var X = function() {
|
|
289
|
-
return /* @__PURE__ */ m.createElement(ut, {
|
|
290
|
-
key: "content",
|
|
291
|
-
prefixCls: u,
|
|
292
|
-
id: R,
|
|
293
|
-
bodyClassName: P == null ? void 0 : P.body,
|
|
294
|
-
overlayInnerStyle: H(H({}, tt), N == null ? void 0 : N.body)
|
|
295
|
-
}, f);
|
|
296
|
-
};
|
|
297
|
-
return /* @__PURE__ */ m.createElement(Ht, Mt({
|
|
298
|
-
popupClassName: S(t, P == null ? void 0 : P.root),
|
|
299
|
-
prefixCls: u,
|
|
300
|
-
popup: X,
|
|
301
|
-
action: s,
|
|
302
|
-
builtinPlacements: de,
|
|
303
|
-
popupPlacement: j,
|
|
304
|
-
ref: K,
|
|
305
|
-
popupAlign: J,
|
|
306
|
-
getPopupContainer: Y,
|
|
307
|
-
onPopupVisibleChange: O,
|
|
308
|
-
afterPopupVisibleChange: $,
|
|
309
|
-
popupTransitionName: _,
|
|
310
|
-
popupAnimation: b,
|
|
311
|
-
popupMotion: g,
|
|
312
|
-
defaultPopupVisible: Q,
|
|
313
|
-
autoDestroy: I,
|
|
314
|
-
mouseLeaveDelay: p,
|
|
315
|
-
popupStyle: H(H({}, v), N == null ? void 0 : N.root),
|
|
316
|
-
mouseEnterDelay: i,
|
|
317
|
-
arrow: Z
|
|
318
|
-
}, q), h);
|
|
319
|
-
};
|
|
320
|
-
const ve = /* @__PURE__ */ Lt(be);
|
|
321
|
-
function he(e) {
|
|
322
|
-
const {
|
|
323
|
-
sizePopupArrow: o,
|
|
324
|
-
borderRadiusXS: a,
|
|
325
|
-
borderRadiusOuter: t
|
|
326
|
-
} = e, r = o / 2, s = 0, n = r, i = t * 1 / Math.sqrt(2), l = r - t * (1 - 1 / Math.sqrt(2)), p = r - a * (1 / Math.sqrt(2)), v = t * (Math.sqrt(2) - 1) + a * (1 / Math.sqrt(2)), c = 2 * r - p, u = v, h = 2 * r - i, O = l, $ = 2 * r - s, _ = n, b = r * Math.sqrt(2) + t * (Math.sqrt(2) - 2), g = t * (Math.sqrt(2) - 1), x = `polygon(${g}px 100%, 50% ${g}px, ${2 * r - g}px 100%, ${g}px 100%)`, j = `path('M ${s} ${n} A ${t} ${t} 0 0 0 ${i} ${l} L ${p} ${v} A ${a} ${a} 0 0 1 ${c} ${u} L ${h} ${O} A ${t} ${t} 0 0 0 ${$} ${_} Z')`;
|
|
327
|
-
return {
|
|
328
|
-
arrowShadowWidth: b,
|
|
329
|
-
arrowPath: j,
|
|
330
|
-
arrowPolygon: x
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
const ye = (e, o, a) => {
|
|
334
|
-
const {
|
|
335
|
-
sizePopupArrow: t,
|
|
336
|
-
arrowPolygon: r,
|
|
337
|
-
arrowPath: s,
|
|
338
|
-
arrowShadowWidth: n,
|
|
339
|
-
borderRadiusXS: i,
|
|
340
|
-
calc: l
|
|
341
|
-
} = e;
|
|
342
|
-
return {
|
|
343
|
-
pointerEvents: "none",
|
|
344
|
-
width: t,
|
|
345
|
-
height: t,
|
|
346
|
-
overflow: "hidden",
|
|
347
|
-
"&::before": {
|
|
348
|
-
position: "absolute",
|
|
349
|
-
bottom: 0,
|
|
350
|
-
insetInlineStart: 0,
|
|
351
|
-
width: t,
|
|
352
|
-
height: l(t).div(2).equal(),
|
|
353
|
-
background: o,
|
|
354
|
-
clipPath: {
|
|
355
|
-
_multi_value_: !0,
|
|
356
|
-
value: [r, s]
|
|
357
|
-
},
|
|
358
|
-
content: '""'
|
|
359
|
-
},
|
|
360
|
-
"&::after": {
|
|
361
|
-
content: '""',
|
|
362
|
-
position: "absolute",
|
|
363
|
-
width: n,
|
|
364
|
-
height: n,
|
|
365
|
-
bottom: 0,
|
|
366
|
-
insetInline: 0,
|
|
367
|
-
margin: "auto",
|
|
368
|
-
borderRadius: {
|
|
369
|
-
_skip_check_: !0,
|
|
370
|
-
value: `0 0 ${W(i)} 0`
|
|
371
|
-
},
|
|
372
|
-
transform: "translateY(50%) rotate(-135deg)",
|
|
373
|
-
boxShadow: a,
|
|
374
|
-
zIndex: 0,
|
|
375
|
-
background: "transparent"
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
}, dt = 8;
|
|
379
|
-
function gt(e) {
|
|
380
|
-
const {
|
|
381
|
-
contentRadius: o,
|
|
382
|
-
limitVerticalRadius: a
|
|
383
|
-
} = e, t = o > 12 ? o + 2 : 12;
|
|
384
|
-
return {
|
|
385
|
-
arrowOffsetHorizontal: t,
|
|
386
|
-
arrowOffsetVertical: a ? dt : t
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
function U(e, o) {
|
|
390
|
-
return e ? o : {};
|
|
391
|
-
}
|
|
392
|
-
function we(e, o, a) {
|
|
393
|
-
const {
|
|
394
|
-
componentCls: t,
|
|
395
|
-
boxShadowPopoverArrow: r,
|
|
396
|
-
arrowOffsetVertical: s,
|
|
397
|
-
arrowOffsetHorizontal: n
|
|
398
|
-
} = e, {
|
|
399
|
-
arrowDistance: i = 0,
|
|
400
|
-
arrowPlacement: l = {
|
|
401
|
-
left: !0,
|
|
402
|
-
right: !0,
|
|
403
|
-
top: !0,
|
|
404
|
-
bottom: !0
|
|
405
|
-
}
|
|
406
|
-
} = a || {};
|
|
407
|
-
return {
|
|
408
|
-
[t]: Object.assign(Object.assign(Object.assign(Object.assign({
|
|
409
|
-
// ============================ Basic ============================
|
|
410
|
-
[`${t}-arrow`]: [Object.assign(Object.assign({
|
|
411
|
-
position: "absolute",
|
|
412
|
-
zIndex: 1,
|
|
413
|
-
display: "block"
|
|
414
|
-
}, ye(e, o, r)), {
|
|
415
|
-
"&:before": {
|
|
416
|
-
background: o
|
|
417
|
-
}
|
|
418
|
-
})]
|
|
419
|
-
}, U(!!l.top, {
|
|
420
|
-
[[`&-placement-top > ${t}-arrow`, `&-placement-topLeft > ${t}-arrow`, `&-placement-topRight > ${t}-arrow`].join(",")]: {
|
|
421
|
-
bottom: i,
|
|
422
|
-
transform: "translateY(100%) rotate(180deg)"
|
|
423
|
-
},
|
|
424
|
-
[`&-placement-top > ${t}-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": n,
|
|
433
|
-
[`> ${t}-arrow`]: {
|
|
434
|
-
left: {
|
|
435
|
-
_skip_check_: !0,
|
|
436
|
-
value: n
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
"&-placement-topRight": {
|
|
441
|
-
"--arrow-offset-horizontal": `calc(100% - ${W(n)})`,
|
|
442
|
-
[`> ${t}-arrow`]: {
|
|
443
|
-
right: {
|
|
444
|
-
_skip_check_: !0,
|
|
445
|
-
value: n
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
})), U(!!l.bottom, {
|
|
450
|
-
[[`&-placement-bottom > ${t}-arrow`, `&-placement-bottomLeft > ${t}-arrow`, `&-placement-bottomRight > ${t}-arrow`].join(",")]: {
|
|
451
|
-
top: i,
|
|
452
|
-
transform: "translateY(-100%)"
|
|
453
|
-
},
|
|
454
|
-
[`&-placement-bottom > ${t}-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": n,
|
|
463
|
-
[`> ${t}-arrow`]: {
|
|
464
|
-
left: {
|
|
465
|
-
_skip_check_: !0,
|
|
466
|
-
value: n
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
"&-placement-bottomRight": {
|
|
471
|
-
"--arrow-offset-horizontal": `calc(100% - ${W(n)})`,
|
|
472
|
-
[`> ${t}-arrow`]: {
|
|
473
|
-
right: {
|
|
474
|
-
_skip_check_: !0,
|
|
475
|
-
value: n
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
})), U(!!l.left, {
|
|
480
|
-
[[`&-placement-left > ${t}-arrow`, `&-placement-leftTop > ${t}-arrow`, `&-placement-leftBottom > ${t}-arrow`].join(",")]: {
|
|
481
|
-
right: {
|
|
482
|
-
_skip_check_: !0,
|
|
483
|
-
value: i
|
|
484
|
-
},
|
|
485
|
-
transform: "translateX(100%) rotate(90deg)"
|
|
486
|
-
},
|
|
487
|
-
[`&-placement-left > ${t}-arrow`]: {
|
|
488
|
-
top: {
|
|
489
|
-
_skip_check_: !0,
|
|
490
|
-
value: "50%"
|
|
491
|
-
},
|
|
492
|
-
transform: "translateY(-50%) translateX(100%) rotate(90deg)"
|
|
493
|
-
},
|
|
494
|
-
[`&-placement-leftTop > ${t}-arrow`]: {
|
|
495
|
-
top: s
|
|
496
|
-
},
|
|
497
|
-
[`&-placement-leftBottom > ${t}-arrow`]: {
|
|
498
|
-
bottom: s
|
|
499
|
-
}
|
|
500
|
-
})), U(!!l.right, {
|
|
501
|
-
[[`&-placement-right > ${t}-arrow`, `&-placement-rightTop > ${t}-arrow`, `&-placement-rightBottom > ${t}-arrow`].join(",")]: {
|
|
502
|
-
left: {
|
|
503
|
-
_skip_check_: !0,
|
|
504
|
-
value: i
|
|
505
|
-
},
|
|
506
|
-
transform: "translateX(-100%) rotate(-90deg)"
|
|
507
|
-
},
|
|
508
|
-
[`&-placement-right > ${t}-arrow`]: {
|
|
509
|
-
top: {
|
|
510
|
-
_skip_check_: !0,
|
|
511
|
-
value: "50%"
|
|
512
|
-
},
|
|
513
|
-
transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
|
|
514
|
-
},
|
|
515
|
-
[`&-placement-rightTop > ${t}-arrow`]: {
|
|
516
|
-
top: s
|
|
517
|
-
},
|
|
518
|
-
[`&-placement-rightBottom > ${t}-arrow`]: {
|
|
519
|
-
bottom: s
|
|
520
|
-
}
|
|
521
|
-
}))
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
function Oe(e, o, a, t) {
|
|
525
|
-
if (t === !1)
|
|
526
|
-
return {
|
|
527
|
-
adjustX: !1,
|
|
528
|
-
adjustY: !1
|
|
529
|
-
};
|
|
530
|
-
const r = t && typeof t == "object" ? t : {}, s = {};
|
|
531
|
-
switch (e) {
|
|
532
|
-
case "top":
|
|
533
|
-
case "bottom":
|
|
534
|
-
s.shiftX = o.arrowOffsetHorizontal * 2 + a, s.shiftY = !0, s.adjustY = !0;
|
|
535
|
-
break;
|
|
536
|
-
case "left":
|
|
537
|
-
case "right":
|
|
538
|
-
s.shiftY = o.arrowOffsetVertical * 2 + a, s.shiftX = !0, s.adjustX = !0;
|
|
539
|
-
break;
|
|
540
|
-
}
|
|
541
|
-
const n = Object.assign(Object.assign({}, s), r);
|
|
542
|
-
return n.shiftX || (n.adjustX = !0), n.shiftY || (n.adjustY = !0), n;
|
|
543
|
-
}
|
|
544
|
-
const ft = {
|
|
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
|
-
}, Ce = {
|
|
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
|
-
}, $e = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]);
|
|
607
|
-
function _e(e) {
|
|
608
|
-
const {
|
|
609
|
-
arrowWidth: o,
|
|
610
|
-
autoAdjustOverflow: a,
|
|
611
|
-
arrowPointAtCenter: t,
|
|
612
|
-
offset: r,
|
|
613
|
-
borderRadius: s,
|
|
614
|
-
visibleFirst: n
|
|
615
|
-
} = e, i = o / 2, l = {};
|
|
616
|
-
return Object.keys(ft).forEach((p) => {
|
|
617
|
-
const v = t && Ce[p] || ft[p], c = Object.assign(Object.assign({}, v), {
|
|
618
|
-
offset: [0, 0],
|
|
619
|
-
dynamicInset: !0
|
|
620
|
-
});
|
|
621
|
-
switch (l[p] = c, $e.has(p) && (c.autoArrow = !1), p) {
|
|
622
|
-
case "top":
|
|
623
|
-
case "topLeft":
|
|
624
|
-
case "topRight":
|
|
625
|
-
c.offset[1] = -i - r;
|
|
626
|
-
break;
|
|
627
|
-
case "bottom":
|
|
628
|
-
case "bottomLeft":
|
|
629
|
-
case "bottomRight":
|
|
630
|
-
c.offset[1] = i + r;
|
|
631
|
-
break;
|
|
632
|
-
case "left":
|
|
633
|
-
case "leftTop":
|
|
634
|
-
case "leftBottom":
|
|
635
|
-
c.offset[0] = -i - r;
|
|
636
|
-
break;
|
|
637
|
-
case "right":
|
|
638
|
-
case "rightTop":
|
|
639
|
-
case "rightBottom":
|
|
640
|
-
c.offset[0] = i + r;
|
|
641
|
-
break;
|
|
642
|
-
}
|
|
643
|
-
const u = gt({
|
|
644
|
-
contentRadius: s,
|
|
645
|
-
limitVerticalRadius: !0
|
|
646
|
-
});
|
|
647
|
-
if (t)
|
|
648
|
-
switch (p) {
|
|
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 = Oe(p, u, o, a), n && (c.htmlRegion = "visibleFirst");
|
|
667
|
-
}), l;
|
|
668
|
-
}
|
|
669
|
-
const xe = (e) => {
|
|
670
|
-
const {
|
|
671
|
-
calc: o,
|
|
672
|
-
componentCls: a,
|
|
673
|
-
// ant-tooltip
|
|
674
|
-
tooltipMaxWidth: t,
|
|
675
|
-
tooltipColor: r,
|
|
676
|
-
tooltipBg: s,
|
|
677
|
-
tooltipBorderRadius: n,
|
|
678
|
-
zIndexPopup: i,
|
|
679
|
-
controlHeight: l,
|
|
680
|
-
boxShadowSecondary: p,
|
|
681
|
-
paddingSM: v,
|
|
682
|
-
paddingXS: c,
|
|
683
|
-
arrowOffsetHorizontal: u,
|
|
684
|
-
sizePopupArrow: h
|
|
685
|
-
} = e, O = o(n).add(h).add(u).equal(), $ = o(n).mul(2).add(h).equal();
|
|
686
|
-
return [
|
|
687
|
-
{
|
|
688
|
-
[a]: Object.assign(Object.assign(Object.assign(Object.assign({}, Ut(e)), {
|
|
689
|
-
position: "absolute",
|
|
690
|
-
zIndex: i,
|
|
691
|
-
display: "block",
|
|
692
|
-
width: "max-content",
|
|
693
|
-
maxWidth: t,
|
|
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
|
-
[`${a}-inner`]: {
|
|
704
|
-
minWidth: $,
|
|
705
|
-
minHeight: l,
|
|
706
|
-
padding: `${W(e.calc(v).div(2).equal())} ${W(c)}`,
|
|
707
|
-
color: r,
|
|
708
|
-
textAlign: "start",
|
|
709
|
-
textDecoration: "none",
|
|
710
|
-
wordWrap: "break-word",
|
|
711
|
-
backgroundColor: s,
|
|
712
|
-
borderRadius: n,
|
|
713
|
-
boxShadow: p,
|
|
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: O
|
|
719
|
-
},
|
|
720
|
-
// Limit left and right placement radius
|
|
721
|
-
[["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
|
|
722
|
-
[`${a}-inner`]: {
|
|
723
|
-
borderRadius: e.min(n, dt)
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
[`${a}-content`]: {
|
|
727
|
-
position: "relative"
|
|
728
|
-
}
|
|
729
|
-
}), ee(e, (_, b) => {
|
|
730
|
-
let {
|
|
731
|
-
darkColor: g
|
|
732
|
-
} = b;
|
|
733
|
-
return {
|
|
734
|
-
[`&${a}-${_}`]: {
|
|
735
|
-
[`${a}-inner`]: {
|
|
736
|
-
backgroundColor: g
|
|
737
|
-
},
|
|
738
|
-
[`${a}-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
|
-
we(e, "var(--antd-arrow-background-color)"),
|
|
752
|
-
// Pure Render
|
|
753
|
-
{
|
|
754
|
-
[`${a}-pure`]: {
|
|
755
|
-
position: "relative",
|
|
756
|
-
maxWidth: "none",
|
|
757
|
-
margin: e.sizePopupArrow
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
];
|
|
761
|
-
}, Pe = (e) => Object.assign(Object.assign({
|
|
762
|
-
zIndexPopup: e.zIndexPopupBase + 70
|
|
763
|
-
}, gt({
|
|
764
|
-
contentRadius: e.borderRadius,
|
|
765
|
-
limitVerticalRadius: !0
|
|
766
|
-
})), he(mt(e, {
|
|
767
|
-
borderRadiusOuter: Math.min(e.borderRadiusOuter, 4)
|
|
768
|
-
}))), bt = function(e) {
|
|
769
|
-
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
770
|
-
return Ft("Tooltip", (t) => {
|
|
771
|
-
const {
|
|
772
|
-
borderRadius: r,
|
|
773
|
-
colorTextLightSolid: s,
|
|
774
|
-
colorBgSpotlight: n
|
|
775
|
-
} = t, i = mt(t, {
|
|
776
|
-
// default variables
|
|
777
|
-
tooltipMaxWidth: 250,
|
|
778
|
-
tooltipColor: s,
|
|
779
|
-
tooltipBorderRadius: r,
|
|
780
|
-
tooltipBg: n
|
|
781
|
-
});
|
|
782
|
-
return [xe(i), ue(t, "zoom-big-fast")];
|
|
783
|
-
}, Pe, {
|
|
784
|
-
resetStyle: !1,
|
|
785
|
-
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
786
|
-
injectStyle: o
|
|
787
|
-
})(e);
|
|
788
|
-
}, Ne = G.map((e) => `${e}-inverse`);
|
|
789
|
-
function Te(e) {
|
|
790
|
-
return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [].concat(it(Ne), it(G)).includes(e) : G.includes(e);
|
|
791
|
-
}
|
|
792
|
-
function vt(e, o) {
|
|
793
|
-
const a = Te(o), t = S({
|
|
794
|
-
[`${e}-${o}`]: o && a
|
|
795
|
-
}), r = {}, s = {};
|
|
796
|
-
return o && !a && (r.background = o, s["--antd-arrow-background-color"] = o), {
|
|
797
|
-
className: t,
|
|
798
|
-
overlayStyle: r,
|
|
799
|
-
arrowStyle: s
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
const Se = (e) => {
|
|
803
|
-
const {
|
|
804
|
-
prefixCls: o,
|
|
805
|
-
className: a,
|
|
806
|
-
placement: t = "top",
|
|
807
|
-
title: r,
|
|
808
|
-
color: s,
|
|
809
|
-
overlayInnerStyle: n
|
|
810
|
-
} = e, {
|
|
811
|
-
getPrefixCls: i
|
|
812
|
-
} = m.useContext(pt), l = i("tooltip", o), [p, v, c] = bt(l), u = vt(l, s), h = u.arrowStyle, O = Object.assign(Object.assign({}, n), u.overlayStyle), $ = S(v, c, l, `${l}-pure`, `${l}-placement-${t}`, a, u.className);
|
|
813
|
-
return p(/* @__PURE__ */ m.createElement("div", {
|
|
814
|
-
className: $,
|
|
815
|
-
style: h
|
|
816
|
-
}, /* @__PURE__ */ m.createElement("div", {
|
|
817
|
-
className: `${l}-arrow`
|
|
818
|
-
}), /* @__PURE__ */ m.createElement(ut, Object.assign({}, e, {
|
|
819
|
-
className: v,
|
|
820
|
-
prefixCls: l,
|
|
821
|
-
overlayInnerStyle: O
|
|
822
|
-
}), r)));
|
|
823
|
-
}, je = Se;
|
|
824
|
-
var ze = globalThis && globalThis.__rest || function(e, o) {
|
|
825
|
-
var a = {};
|
|
826
|
-
for (var t in e)
|
|
827
|
-
Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (a[t] = e[t]);
|
|
828
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
829
|
-
for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
830
|
-
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (a[t[r]] = e[t[r]]);
|
|
831
|
-
return a;
|
|
832
|
-
};
|
|
833
|
-
const Ie = /* @__PURE__ */ m.forwardRef((e, o) => {
|
|
834
|
-
var a, t, r, s, n, i;
|
|
835
|
-
const {
|
|
836
|
-
prefixCls: l,
|
|
837
|
-
openClassName: p,
|
|
838
|
-
getTooltipContainer: v,
|
|
839
|
-
color: c,
|
|
840
|
-
overlayInnerStyle: u,
|
|
841
|
-
children: h,
|
|
842
|
-
afterOpenChange: O,
|
|
843
|
-
afterVisibleChange: $,
|
|
844
|
-
destroyTooltipOnHide: _,
|
|
845
|
-
arrow: b = !0,
|
|
846
|
-
title: g,
|
|
847
|
-
overlay: x,
|
|
848
|
-
builtinPlacements: j,
|
|
849
|
-
arrowPointAtCenter: z = !1,
|
|
850
|
-
autoAdjustOverflow: J = !0
|
|
851
|
-
} = e, B = !!b, [, I] = Gt(), {
|
|
852
|
-
getPopupContainer: Q,
|
|
853
|
-
getPrefixCls: Y,
|
|
854
|
-
direction: tt,
|
|
855
|
-
tooltip: f
|
|
856
|
-
} = m.useContext(pt), R = Jt("Tooltip"), A = m.useRef(null), Z = () => {
|
|
857
|
-
var d;
|
|
858
|
-
(d = A.current) === null || d === void 0 || d.forceAlign();
|
|
859
|
-
};
|
|
860
|
-
m.useImperativeHandle(o, () => {
|
|
861
|
-
var d;
|
|
862
|
-
return {
|
|
863
|
-
forceAlign: Z,
|
|
864
|
-
forcePopupAlign: () => {
|
|
865
|
-
R.deprecated(!1, "forcePopupAlign", "forceAlign"), Z();
|
|
866
|
-
},
|
|
867
|
-
nativeElement: (d = A.current) === null || d === void 0 ? void 0 : d.nativeElement
|
|
868
|
-
};
|
|
869
|
-
}), 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((d) => {
|
|
870
|
-
let [C, T] = d;
|
|
871
|
-
R.deprecated(!(C in e), C, T);
|
|
872
|
-
}), process.env.NODE_ENV !== "production" && R(!_ || typeof _ == "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && R(!b || typeof b == "boolean" || !("arrowPointAtCenter" in b), "deprecated", "`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));
|
|
873
|
-
const [P, N] = Kt(!1, {
|
|
874
|
-
value: (a = e.open) !== null && a !== void 0 ? a : e.visible,
|
|
875
|
-
defaultValue: (t = e.defaultOpen) !== null && t !== void 0 ? t : e.defaultVisible
|
|
876
|
-
}), M = !g && !x && g !== 0, K = (d) => {
|
|
877
|
-
var C, T;
|
|
878
|
-
N(M ? !1 : d), M || ((C = e.onOpenChange) === null || C === void 0 || C.call(e, d), (T = e.onVisibleChange) === null || T === void 0 || T.call(e, d));
|
|
879
|
-
}, q = m.useMemo(() => {
|
|
880
|
-
var d, C;
|
|
881
|
-
let T = z;
|
|
882
|
-
return typeof b == "object" && (T = (C = (d = b.pointAtCenter) !== null && d !== void 0 ? d : b.arrowPointAtCenter) !== null && C !== void 0 ? C : z), j || _e({
|
|
883
|
-
arrowPointAtCenter: T,
|
|
884
|
-
autoAdjustOverflow: J,
|
|
885
|
-
arrowWidth: B ? I.sizePopupArrow : 0,
|
|
886
|
-
borderRadius: I.borderRadius,
|
|
887
|
-
offset: I.marginXXS,
|
|
888
|
-
visibleFirst: !0
|
|
889
|
-
});
|
|
890
|
-
}, [z, b, j, I]), X = m.useMemo(() => g === 0 ? g : x || g || "", [x, g]), nt = /* @__PURE__ */ m.createElement(qt, {
|
|
891
|
-
space: !0
|
|
892
|
-
}, typeof X == "function" ? X() : X), {
|
|
893
|
-
getPopupContainer: ht,
|
|
894
|
-
placement: yt = "top",
|
|
895
|
-
mouseEnterDelay: wt = 0.1,
|
|
896
|
-
mouseLeaveDelay: Ot = 0.1,
|
|
897
|
-
overlayStyle: Ct,
|
|
898
|
-
rootClassName: $t,
|
|
899
|
-
overlayClassName: _t,
|
|
900
|
-
styles: E,
|
|
901
|
-
classNames: V
|
|
902
|
-
} = e, st = ze(e, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]), L = Y("tooltip", l), xt = Y(), Pt = e["data-popover-inject"];
|
|
903
|
-
let et = P;
|
|
904
|
-
!("open" in e) && !("visible" in e) && M && (et = !1);
|
|
905
|
-
const ot = /* @__PURE__ */ m.isValidElement(h) && !Qt(h) ? h : /* @__PURE__ */ m.createElement("span", null, h), F = ot.props, Nt = !F.className || typeof F.className == "string" ? S(F.className, p || `${L}-open`) : F.className, [Tt, St, jt] = bt(L, !Pt), rt = vt(L, c), zt = rt.arrowStyle, It = S(_t, {
|
|
906
|
-
[`${L}-rtl`]: tt === "rtl"
|
|
907
|
-
}, rt.className, $t, St, jt, f == null ? void 0 : f.className, (r = f == null ? void 0 : f.classNames) === null || r === void 0 ? void 0 : r.root, V == null ? void 0 : V.root), Rt = S((s = f == null ? void 0 : f.classNames) === null || s === void 0 ? void 0 : s.body, V == null ? void 0 : V.body), [At, Et] = Wt("Tooltip", st.zIndex), Vt = /* @__PURE__ */ m.createElement(ve, Object.assign({}, st, {
|
|
908
|
-
zIndex: At,
|
|
909
|
-
showArrow: B,
|
|
910
|
-
placement: yt,
|
|
911
|
-
mouseEnterDelay: wt,
|
|
912
|
-
mouseLeaveDelay: Ot,
|
|
913
|
-
prefixCls: L,
|
|
914
|
-
classNames: {
|
|
915
|
-
root: It,
|
|
916
|
-
body: Rt
|
|
917
|
-
},
|
|
918
|
-
styles: {
|
|
919
|
-
root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, zt), (n = f == null ? void 0 : f.styles) === null || n === void 0 ? void 0 : n.root), f == null ? void 0 : f.style), Ct), E == null ? void 0 : E.root),
|
|
920
|
-
body: Object.assign(Object.assign(Object.assign(Object.assign({}, (i = f == null ? void 0 : f.styles) === null || i === void 0 ? void 0 : i.body), u), E == null ? void 0 : E.body), rt.overlayStyle)
|
|
921
|
-
},
|
|
922
|
-
getTooltipContainer: ht || v || Q,
|
|
923
|
-
ref: A,
|
|
924
|
-
builtinPlacements: q,
|
|
925
|
-
overlay: nt,
|
|
926
|
-
visible: et,
|
|
927
|
-
onVisibleChange: K,
|
|
928
|
-
afterVisibleChange: O ?? $,
|
|
929
|
-
arrowContent: /* @__PURE__ */ m.createElement("span", {
|
|
930
|
-
className: `${L}-arrow-content`
|
|
931
|
-
}),
|
|
932
|
-
motion: {
|
|
933
|
-
motionName: Yt(xt, "zoom-big-fast", e.transitionName),
|
|
934
|
-
motionDeadline: 1e3
|
|
935
|
-
},
|
|
936
|
-
destroyTooltipOnHide: !!_
|
|
937
|
-
}), et ? te(ot, {
|
|
938
|
-
className: Nt
|
|
939
|
-
}) : ot);
|
|
940
|
-
return Tt(/* @__PURE__ */ m.createElement(Zt.Provider, {
|
|
941
|
-
value: Et
|
|
942
|
-
}, Vt));
|
|
943
|
-
}), at = Ie;
|
|
944
|
-
process.env.NODE_ENV !== "production" && (at.displayName = "Tooltip");
|
|
945
|
-
at._InternalPanelDoNotUseOrYouWillBeFired = je;
|
|
946
|
-
const Me = at;
|
|
947
|
-
export {
|
|
948
|
-
Me as T,
|
|
949
|
-
gt as a,
|
|
950
|
-
he as b,
|
|
951
|
-
_e as c,
|
|
952
|
-
we as g,
|
|
953
|
-
ue as i,
|
|
954
|
-
oe as z
|
|
955
|
-
};
|