@gobolt/genesis 0.0.7 → 0.0.8
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 +8 -2
- package/dist/AntdIcon-c395a1c4.js +204 -0
- package/dist/CheckOutlined-52d9ac25.js +29 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-ddc51e7e.js} +11 -8
- package/dist/CloseOutlined-14b8bba1.js +16 -0
- package/dist/Compact-c39ed20d.js +179 -0
- package/dist/ContextIsolator-b09b2c52.js +20 -0
- package/dist/DownOutlined-64a4732a.js +206 -0
- package/dist/EllipsisOutlined-60122660.js +1115 -0
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-23ef9812.js} +22 -16
- package/dist/InfoCircleFilled-c5f90c20.js +16 -0
- package/dist/Overflow-a570fa69.js +361 -0
- package/dist/RightOutlined-83515eb4.js +16 -0
- package/dist/SearchOutlined-a9014e08.js +16 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-20825221.js} +597 -582
- package/dist/{button-BNV2qdrP.js → button-fa1c119c.js} +287 -280
- package/dist/collapse-345bc884.js +20 -0
- package/dist/compact-item-b8f85aa6.js +75 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +102 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +72 -0
- package/dist/components/Badge/icons/ASN.d.ts +2 -0
- package/dist/components/Badge/icons/ASN.js +23 -0
- package/dist/components/Badge/icons/Appointment.d.ts +2 -0
- package/dist/components/Badge/icons/Appointment.js +23 -0
- package/dist/components/Badge/icons/Inventory.d.ts +2 -0
- package/dist/components/Badge/icons/Inventory.js +23 -0
- package/dist/components/Badge/icons/Parcel.d.ts +2 -0
- package/dist/components/Badge/icons/Parcel.js +23 -0
- package/dist/components/Badge/icons/Product.d.ts +2 -0
- package/dist/components/Badge/icons/Product.js +23 -0
- package/dist/components/Badge/icons/Route.d.ts +2 -0
- package/dist/components/Badge/icons/Route.js +23 -0
- package/dist/components/Badge/icons/Shipment.d.ts +2 -0
- package/dist/components/Badge/icons/Shipment.js +23 -0
- package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
- package/dist/components/Badge/icons/ShoppingCart.js +23 -0
- package/dist/components/Badge/icons/System.d.ts +2 -0
- package/dist/components/Badge/icons/System.js +23 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +23 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +35 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +27 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +70 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +27 -0
- package/dist/components/Breadcrumb/styles.d.ts +23 -0
- package/dist/components/Breadcrumb/styles.js +2457 -0
- package/dist/components/Button/Button.js +42 -0
- package/dist/components/Button/__tests__/Button.test.js +61 -0
- package/dist/components/Button/index.js +22 -0
- package/dist/components/{atoms/button → Button}/styles.js +30 -19
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +70 -0
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +64 -0
- package/dist/components/Checkbox/index.js +49 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +1 -3
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +165 -157
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +72 -0
- package/dist/components/ErrorBoundaryFallback/index.js +51 -0
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +3 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +38 -34
- package/dist/components/{molecules/form → Form}/Form.d.ts +2 -4
- package/dist/components/Form/Form.js +49 -0
- package/dist/components/Form/__stories__/FormStory.js +130 -0
- package/dist/components/Form/index.js +48 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +42 -0
- package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
- package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
- package/dist/components/Input/__tests__/Input.test.js +69 -0
- package/dist/components/Input/index.js +31 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -3
- package/dist/components/Input/styles.js +542 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +105 -0
- package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
- package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
- package/dist/components/Message/__tests__/Message.test.js +88 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +50 -0
- package/dist/components/Message/styles.d.ts +5 -0
- package/dist/components/Message/styles.js +35 -0
- package/dist/components/Notification/Notification.d.ts +16 -0
- package/dist/components/Notification/Notification.js +1436 -0
- package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
- package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/components/Notification/__tests__/Notification.test.js +76 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +61 -0
- package/dist/components/Notification/styles.d.ts +6 -0
- package/dist/components/Notification/styles.js +49 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +114 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +86 -0
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.js +85 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +58 -0
- package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioChecked.js +18 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
- package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
- package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioUnchecked.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
- package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
- package/dist/components/{atoms/select → Select}/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +48 -0
- package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
- package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
- package/dist/components/Select/__tests__/Select.test.js +101 -0
- package/dist/components/Select/index.js +30 -0
- package/dist/components/{atoms/select → Select}/styles.d.ts +4 -1
- package/dist/components/Select/styles.js +3723 -0
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +48 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +63 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +48 -0
- package/dist/components/Toast/styles.d.ts +5 -0
- package/dist/components/Toast/styles.js +39 -0
- package/dist/components/{atoms/typography → Typography}/Typography.d.ts +2 -1
- package/dist/components/Typography/Typography.js +48 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +60 -0
- package/dist/components/Typography/index.js +48 -0
- package/dist/components/Typography/styles.d.ts +7 -0
- package/dist/components/Typography/styles.js +55 -0
- package/dist/components/index.d.ts +18 -14
- package/dist/components/index.js +70 -14
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-3b8a39af.js} +547 -536
- package/dist/genesis/GenesisThemeBreakdown.js +69 -22
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +53 -4
- package/dist/genesis/styles.d.ts +2 -6
- package/dist/genesis/styles.js +1144 -2210
- package/dist/index-0a886e53.js +100 -0
- package/dist/{index-SAAXFt-P.js → index-0b9ee239.js} +347 -338
- package/dist/index-1a33c134.js +1389 -0
- package/dist/index-4003d75b.js +3748 -0
- package/dist/{index-D1v_7IIx.js → index-501fc13d.js} +369 -343
- package/dist/index-89035ea5.js +3242 -0
- package/dist/{index-BQO27mgE.js → index-8c8d2d0c.js} +123 -122
- package/dist/{index-C7kFNqp2.js → index-e2b72ca8.js} +107 -102
- package/dist/index.d.ts +1 -0
- package/dist/index.js +77 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-729780f5.js} +110 -82
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-b7491176.js} +103 -56
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-00ba4687.js} +16 -26
- package/dist/presets-83ccb923.js +787 -0
- package/dist/providers/GenesisProvider.d.ts +5 -0
- package/dist/providers/GenesisProvider.js +59 -5
- package/dist/providers/ThemeProvider.d.ts +2 -1
- package/dist/providers/ThemeProvider.js +16 -11
- package/dist/providers/ToastProvider.d.ts +6 -0
- package/dist/providers/ToastProvider.js +49 -0
- package/dist/providers/ToastWrapper.d.ts +7 -0
- package/dist/providers/ToastWrapper.js +56 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +51 -4
- package/dist/setup-aaca7b6f.js +21158 -0
- package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-02f500bc.js} +134 -72
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +54 -18
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +51 -15
- package/dist/styles/design-tokens/variables.d.ts +7 -7
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.js +4 -3
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +402 -263
- package/dist/styles/theme/global-styles.js +4 -3
- package/dist/styles/theme/index.js +5 -4
- package/dist/test/setup.js +46 -2
- package/dist/useVariants-a0d64298.js +30 -0
- package/dist/utils/isAllEnglishString.js +2 -1
- package/package.json +34 -28
- package/dist/AntdIcon-Bsnbyy6g.js +0 -200
- package/dist/CheckOutlined-DAynWe12.js +0 -527
- package/dist/Compact-CJBo3f0u.js +0 -185
- package/dist/ContextIsolator-CGkdKtc3.js +0 -20
- package/dist/Form-Cylpi4M4.js +0 -1815
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/compact-item-DH13cl8A.js +0 -61
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/index.js +0 -4
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +0 -18
- package/dist/components/atoms/checkbox/index.js +0 -4
- package/dist/components/atoms/index.d.ts +0 -1
- package/dist/components/atoms/index.js +0 -3
- package/dist/components/atoms/input/Input.js +0 -12
- package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
- package/dist/components/atoms/input/index.js +0 -4
- package/dist/components/atoms/input/styles.js +0 -415
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/__tests__/Select.test.js +0 -10735
- package/dist/components/atoms/select/index.js +0 -4
- package/dist/components/atoms/select/styles.js +0 -3868
- package/dist/components/atoms/typography/Typography.js +0 -44
- package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
- package/dist/components/atoms/typography/index.js +0 -4
- package/dist/components/atoms/typography/styles.d.ts +0 -11
- package/dist/components/atoms/typography/styles.js +0 -28
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.js +0 -4
- package/dist/components/molecules/error-boundary-fallback/styles.d.ts +0 -1
- package/dist/components/molecules/form/Form.js +0 -7
- package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
- package/dist/components/molecules/form/index.js +0 -4
- package/dist/index-3MWkSVA1.js +0 -96
- package/dist/index-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/index-VDH3iLaC.js +0 -884
- package/dist/setup-CMYVZCPF.js +0 -33883
- package/dist/useVariants-CEpw6Ww6.js +0 -29
- /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
- /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/Button.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
- /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/styles.d.ts +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/ErrorBoundaryFallback.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
- /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
- /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
- /package/dist/{presetColors-Cl8UP3Nw.js → presetColors-ccf8cb4c.js} +0 -0
- /package/dist/{reactNode-sKPeiqPL.js → reactNode-f4391605.js} +0 -0
|
@@ -0,0 +1,1389 @@
|
|
|
1
|
+
import { h as ja, f as Ga, B as qa, t as Za, z as Ja, v as da, n as J, s as Aa, k as Ua, A as xa, q as Xa, J as Ya, j as pa, b as Je, K as fa } from "./index-4003d75b.js";
|
|
2
|
+
import { h as la, k as gr, f as I, u as Ha, r as ma, w as et, _ as $, c as nr, a as Fa, j as rt, e as at } from "./presets-83ccb923.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import Wa from "react";
|
|
5
|
+
import { createPortal as tt } from "react-dom";
|
|
6
|
+
import { R as $a } from "./index-8c8d2d0c.js";
|
|
7
|
+
import { g as ha } from "./AntdIcon-c395a1c4.js";
|
|
8
|
+
import { i as nt } from "./isVisible-729780f5.js";
|
|
9
|
+
var Bt = /* @__PURE__ */ function() {
|
|
10
|
+
function e(a, r) {
|
|
11
|
+
Ga(this, e), la(this, "name", void 0), la(this, "style", void 0), la(this, "_keyframe", !0), this.name = a, this.style = r;
|
|
12
|
+
}
|
|
13
|
+
return ja(e, [{
|
|
14
|
+
key: "getName",
|
|
15
|
+
value: function() {
|
|
16
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
17
|
+
return r ? "".concat(r, "-").concat(this.name) : this.name;
|
|
18
|
+
}
|
|
19
|
+
}]), e;
|
|
20
|
+
}(), c = {
|
|
21
|
+
/**
|
|
22
|
+
* MAC_ENTER
|
|
23
|
+
*/
|
|
24
|
+
MAC_ENTER: 3,
|
|
25
|
+
/**
|
|
26
|
+
* BACKSPACE
|
|
27
|
+
*/
|
|
28
|
+
BACKSPACE: 8,
|
|
29
|
+
/**
|
|
30
|
+
* TAB
|
|
31
|
+
*/
|
|
32
|
+
TAB: 9,
|
|
33
|
+
/**
|
|
34
|
+
* NUMLOCK on FF/Safari Mac
|
|
35
|
+
*/
|
|
36
|
+
NUM_CENTER: 12,
|
|
37
|
+
// NUMLOCK on FF/Safari Mac
|
|
38
|
+
/**
|
|
39
|
+
* ENTER
|
|
40
|
+
*/
|
|
41
|
+
ENTER: 13,
|
|
42
|
+
/**
|
|
43
|
+
* SHIFT
|
|
44
|
+
*/
|
|
45
|
+
SHIFT: 16,
|
|
46
|
+
/**
|
|
47
|
+
* CTRL
|
|
48
|
+
*/
|
|
49
|
+
CTRL: 17,
|
|
50
|
+
/**
|
|
51
|
+
* ALT
|
|
52
|
+
*/
|
|
53
|
+
ALT: 18,
|
|
54
|
+
/**
|
|
55
|
+
* PAUSE
|
|
56
|
+
*/
|
|
57
|
+
PAUSE: 19,
|
|
58
|
+
/**
|
|
59
|
+
* CAPS_LOCK
|
|
60
|
+
*/
|
|
61
|
+
CAPS_LOCK: 20,
|
|
62
|
+
/**
|
|
63
|
+
* ESC
|
|
64
|
+
*/
|
|
65
|
+
ESC: 27,
|
|
66
|
+
/**
|
|
67
|
+
* SPACE
|
|
68
|
+
*/
|
|
69
|
+
SPACE: 32,
|
|
70
|
+
/**
|
|
71
|
+
* PAGE_UP
|
|
72
|
+
*/
|
|
73
|
+
PAGE_UP: 33,
|
|
74
|
+
// also NUM_NORTH_EAST
|
|
75
|
+
/**
|
|
76
|
+
* PAGE_DOWN
|
|
77
|
+
*/
|
|
78
|
+
PAGE_DOWN: 34,
|
|
79
|
+
// also NUM_SOUTH_EAST
|
|
80
|
+
/**
|
|
81
|
+
* END
|
|
82
|
+
*/
|
|
83
|
+
END: 35,
|
|
84
|
+
// also NUM_SOUTH_WEST
|
|
85
|
+
/**
|
|
86
|
+
* HOME
|
|
87
|
+
*/
|
|
88
|
+
HOME: 36,
|
|
89
|
+
// also NUM_NORTH_WEST
|
|
90
|
+
/**
|
|
91
|
+
* LEFT
|
|
92
|
+
*/
|
|
93
|
+
LEFT: 37,
|
|
94
|
+
// also NUM_WEST
|
|
95
|
+
/**
|
|
96
|
+
* UP
|
|
97
|
+
*/
|
|
98
|
+
UP: 38,
|
|
99
|
+
// also NUM_NORTH
|
|
100
|
+
/**
|
|
101
|
+
* RIGHT
|
|
102
|
+
*/
|
|
103
|
+
RIGHT: 39,
|
|
104
|
+
// also NUM_EAST
|
|
105
|
+
/**
|
|
106
|
+
* DOWN
|
|
107
|
+
*/
|
|
108
|
+
DOWN: 40,
|
|
109
|
+
// also NUM_SOUTH
|
|
110
|
+
/**
|
|
111
|
+
* PRINT_SCREEN
|
|
112
|
+
*/
|
|
113
|
+
PRINT_SCREEN: 44,
|
|
114
|
+
/**
|
|
115
|
+
* INSERT
|
|
116
|
+
*/
|
|
117
|
+
INSERT: 45,
|
|
118
|
+
// also NUM_INSERT
|
|
119
|
+
/**
|
|
120
|
+
* DELETE
|
|
121
|
+
*/
|
|
122
|
+
DELETE: 46,
|
|
123
|
+
// also NUM_DELETE
|
|
124
|
+
/**
|
|
125
|
+
* ZERO
|
|
126
|
+
*/
|
|
127
|
+
ZERO: 48,
|
|
128
|
+
/**
|
|
129
|
+
* ONE
|
|
130
|
+
*/
|
|
131
|
+
ONE: 49,
|
|
132
|
+
/**
|
|
133
|
+
* TWO
|
|
134
|
+
*/
|
|
135
|
+
TWO: 50,
|
|
136
|
+
/**
|
|
137
|
+
* THREE
|
|
138
|
+
*/
|
|
139
|
+
THREE: 51,
|
|
140
|
+
/**
|
|
141
|
+
* FOUR
|
|
142
|
+
*/
|
|
143
|
+
FOUR: 52,
|
|
144
|
+
/**
|
|
145
|
+
* FIVE
|
|
146
|
+
*/
|
|
147
|
+
FIVE: 53,
|
|
148
|
+
/**
|
|
149
|
+
* SIX
|
|
150
|
+
*/
|
|
151
|
+
SIX: 54,
|
|
152
|
+
/**
|
|
153
|
+
* SEVEN
|
|
154
|
+
*/
|
|
155
|
+
SEVEN: 55,
|
|
156
|
+
/**
|
|
157
|
+
* EIGHT
|
|
158
|
+
*/
|
|
159
|
+
EIGHT: 56,
|
|
160
|
+
/**
|
|
161
|
+
* NINE
|
|
162
|
+
*/
|
|
163
|
+
NINE: 57,
|
|
164
|
+
/**
|
|
165
|
+
* QUESTION_MARK
|
|
166
|
+
*/
|
|
167
|
+
QUESTION_MARK: 63,
|
|
168
|
+
// needs localization
|
|
169
|
+
/**
|
|
170
|
+
* A
|
|
171
|
+
*/
|
|
172
|
+
A: 65,
|
|
173
|
+
/**
|
|
174
|
+
* B
|
|
175
|
+
*/
|
|
176
|
+
B: 66,
|
|
177
|
+
/**
|
|
178
|
+
* C
|
|
179
|
+
*/
|
|
180
|
+
C: 67,
|
|
181
|
+
/**
|
|
182
|
+
* D
|
|
183
|
+
*/
|
|
184
|
+
D: 68,
|
|
185
|
+
/**
|
|
186
|
+
* E
|
|
187
|
+
*/
|
|
188
|
+
E: 69,
|
|
189
|
+
/**
|
|
190
|
+
* F
|
|
191
|
+
*/
|
|
192
|
+
F: 70,
|
|
193
|
+
/**
|
|
194
|
+
* G
|
|
195
|
+
*/
|
|
196
|
+
G: 71,
|
|
197
|
+
/**
|
|
198
|
+
* H
|
|
199
|
+
*/
|
|
200
|
+
H: 72,
|
|
201
|
+
/**
|
|
202
|
+
* I
|
|
203
|
+
*/
|
|
204
|
+
I: 73,
|
|
205
|
+
/**
|
|
206
|
+
* J
|
|
207
|
+
*/
|
|
208
|
+
J: 74,
|
|
209
|
+
/**
|
|
210
|
+
* K
|
|
211
|
+
*/
|
|
212
|
+
K: 75,
|
|
213
|
+
/**
|
|
214
|
+
* L
|
|
215
|
+
*/
|
|
216
|
+
L: 76,
|
|
217
|
+
/**
|
|
218
|
+
* M
|
|
219
|
+
*/
|
|
220
|
+
M: 77,
|
|
221
|
+
/**
|
|
222
|
+
* N
|
|
223
|
+
*/
|
|
224
|
+
N: 78,
|
|
225
|
+
/**
|
|
226
|
+
* O
|
|
227
|
+
*/
|
|
228
|
+
O: 79,
|
|
229
|
+
/**
|
|
230
|
+
* P
|
|
231
|
+
*/
|
|
232
|
+
P: 80,
|
|
233
|
+
/**
|
|
234
|
+
* Q
|
|
235
|
+
*/
|
|
236
|
+
Q: 81,
|
|
237
|
+
/**
|
|
238
|
+
* R
|
|
239
|
+
*/
|
|
240
|
+
R: 82,
|
|
241
|
+
/**
|
|
242
|
+
* S
|
|
243
|
+
*/
|
|
244
|
+
S: 83,
|
|
245
|
+
/**
|
|
246
|
+
* T
|
|
247
|
+
*/
|
|
248
|
+
T: 84,
|
|
249
|
+
/**
|
|
250
|
+
* U
|
|
251
|
+
*/
|
|
252
|
+
U: 85,
|
|
253
|
+
/**
|
|
254
|
+
* V
|
|
255
|
+
*/
|
|
256
|
+
V: 86,
|
|
257
|
+
/**
|
|
258
|
+
* W
|
|
259
|
+
*/
|
|
260
|
+
W: 87,
|
|
261
|
+
/**
|
|
262
|
+
* X
|
|
263
|
+
*/
|
|
264
|
+
X: 88,
|
|
265
|
+
/**
|
|
266
|
+
* Y
|
|
267
|
+
*/
|
|
268
|
+
Y: 89,
|
|
269
|
+
/**
|
|
270
|
+
* Z
|
|
271
|
+
*/
|
|
272
|
+
Z: 90,
|
|
273
|
+
/**
|
|
274
|
+
* META
|
|
275
|
+
*/
|
|
276
|
+
META: 91,
|
|
277
|
+
// WIN_KEY_LEFT
|
|
278
|
+
/**
|
|
279
|
+
* WIN_KEY_RIGHT
|
|
280
|
+
*/
|
|
281
|
+
WIN_KEY_RIGHT: 92,
|
|
282
|
+
/**
|
|
283
|
+
* CONTEXT_MENU
|
|
284
|
+
*/
|
|
285
|
+
CONTEXT_MENU: 93,
|
|
286
|
+
/**
|
|
287
|
+
* NUM_ZERO
|
|
288
|
+
*/
|
|
289
|
+
NUM_ZERO: 96,
|
|
290
|
+
/**
|
|
291
|
+
* NUM_ONE
|
|
292
|
+
*/
|
|
293
|
+
NUM_ONE: 97,
|
|
294
|
+
/**
|
|
295
|
+
* NUM_TWO
|
|
296
|
+
*/
|
|
297
|
+
NUM_TWO: 98,
|
|
298
|
+
/**
|
|
299
|
+
* NUM_THREE
|
|
300
|
+
*/
|
|
301
|
+
NUM_THREE: 99,
|
|
302
|
+
/**
|
|
303
|
+
* NUM_FOUR
|
|
304
|
+
*/
|
|
305
|
+
NUM_FOUR: 100,
|
|
306
|
+
/**
|
|
307
|
+
* NUM_FIVE
|
|
308
|
+
*/
|
|
309
|
+
NUM_FIVE: 101,
|
|
310
|
+
/**
|
|
311
|
+
* NUM_SIX
|
|
312
|
+
*/
|
|
313
|
+
NUM_SIX: 102,
|
|
314
|
+
/**
|
|
315
|
+
* NUM_SEVEN
|
|
316
|
+
*/
|
|
317
|
+
NUM_SEVEN: 103,
|
|
318
|
+
/**
|
|
319
|
+
* NUM_EIGHT
|
|
320
|
+
*/
|
|
321
|
+
NUM_EIGHT: 104,
|
|
322
|
+
/**
|
|
323
|
+
* NUM_NINE
|
|
324
|
+
*/
|
|
325
|
+
NUM_NINE: 105,
|
|
326
|
+
/**
|
|
327
|
+
* NUM_MULTIPLY
|
|
328
|
+
*/
|
|
329
|
+
NUM_MULTIPLY: 106,
|
|
330
|
+
/**
|
|
331
|
+
* NUM_PLUS
|
|
332
|
+
*/
|
|
333
|
+
NUM_PLUS: 107,
|
|
334
|
+
/**
|
|
335
|
+
* NUM_MINUS
|
|
336
|
+
*/
|
|
337
|
+
NUM_MINUS: 109,
|
|
338
|
+
/**
|
|
339
|
+
* NUM_PERIOD
|
|
340
|
+
*/
|
|
341
|
+
NUM_PERIOD: 110,
|
|
342
|
+
/**
|
|
343
|
+
* NUM_DIVISION
|
|
344
|
+
*/
|
|
345
|
+
NUM_DIVISION: 111,
|
|
346
|
+
/**
|
|
347
|
+
* F1
|
|
348
|
+
*/
|
|
349
|
+
F1: 112,
|
|
350
|
+
/**
|
|
351
|
+
* F2
|
|
352
|
+
*/
|
|
353
|
+
F2: 113,
|
|
354
|
+
/**
|
|
355
|
+
* F3
|
|
356
|
+
*/
|
|
357
|
+
F3: 114,
|
|
358
|
+
/**
|
|
359
|
+
* F4
|
|
360
|
+
*/
|
|
361
|
+
F4: 115,
|
|
362
|
+
/**
|
|
363
|
+
* F5
|
|
364
|
+
*/
|
|
365
|
+
F5: 116,
|
|
366
|
+
/**
|
|
367
|
+
* F6
|
|
368
|
+
*/
|
|
369
|
+
F6: 117,
|
|
370
|
+
/**
|
|
371
|
+
* F7
|
|
372
|
+
*/
|
|
373
|
+
F7: 118,
|
|
374
|
+
/**
|
|
375
|
+
* F8
|
|
376
|
+
*/
|
|
377
|
+
F8: 119,
|
|
378
|
+
/**
|
|
379
|
+
* F9
|
|
380
|
+
*/
|
|
381
|
+
F9: 120,
|
|
382
|
+
/**
|
|
383
|
+
* F10
|
|
384
|
+
*/
|
|
385
|
+
F10: 121,
|
|
386
|
+
/**
|
|
387
|
+
* F11
|
|
388
|
+
*/
|
|
389
|
+
F11: 122,
|
|
390
|
+
/**
|
|
391
|
+
* F12
|
|
392
|
+
*/
|
|
393
|
+
F12: 123,
|
|
394
|
+
/**
|
|
395
|
+
* NUMLOCK
|
|
396
|
+
*/
|
|
397
|
+
NUMLOCK: 144,
|
|
398
|
+
/**
|
|
399
|
+
* SEMICOLON
|
|
400
|
+
*/
|
|
401
|
+
SEMICOLON: 186,
|
|
402
|
+
// needs localization
|
|
403
|
+
/**
|
|
404
|
+
* DASH
|
|
405
|
+
*/
|
|
406
|
+
DASH: 189,
|
|
407
|
+
// needs localization
|
|
408
|
+
/**
|
|
409
|
+
* EQUALS
|
|
410
|
+
*/
|
|
411
|
+
EQUALS: 187,
|
|
412
|
+
// needs localization
|
|
413
|
+
/**
|
|
414
|
+
* COMMA
|
|
415
|
+
*/
|
|
416
|
+
COMMA: 188,
|
|
417
|
+
// needs localization
|
|
418
|
+
/**
|
|
419
|
+
* PERIOD
|
|
420
|
+
*/
|
|
421
|
+
PERIOD: 190,
|
|
422
|
+
// needs localization
|
|
423
|
+
/**
|
|
424
|
+
* SLASH
|
|
425
|
+
*/
|
|
426
|
+
SLASH: 191,
|
|
427
|
+
// needs localization
|
|
428
|
+
/**
|
|
429
|
+
* APOSTROPHE
|
|
430
|
+
*/
|
|
431
|
+
APOSTROPHE: 192,
|
|
432
|
+
// needs localization
|
|
433
|
+
/**
|
|
434
|
+
* SINGLE_QUOTE
|
|
435
|
+
*/
|
|
436
|
+
SINGLE_QUOTE: 222,
|
|
437
|
+
// needs localization
|
|
438
|
+
/**
|
|
439
|
+
* OPEN_SQUARE_BRACKET
|
|
440
|
+
*/
|
|
441
|
+
OPEN_SQUARE_BRACKET: 219,
|
|
442
|
+
// needs localization
|
|
443
|
+
/**
|
|
444
|
+
* BACKSLASH
|
|
445
|
+
*/
|
|
446
|
+
BACKSLASH: 220,
|
|
447
|
+
// needs localization
|
|
448
|
+
/**
|
|
449
|
+
* CLOSE_SQUARE_BRACKET
|
|
450
|
+
*/
|
|
451
|
+
CLOSE_SQUARE_BRACKET: 221,
|
|
452
|
+
// needs localization
|
|
453
|
+
/**
|
|
454
|
+
* WIN_KEY
|
|
455
|
+
*/
|
|
456
|
+
WIN_KEY: 224,
|
|
457
|
+
/**
|
|
458
|
+
* MAC_FF_META
|
|
459
|
+
*/
|
|
460
|
+
MAC_FF_META: 224,
|
|
461
|
+
// Firefox (Gecko) fires this for the meta key instead of 91
|
|
462
|
+
/**
|
|
463
|
+
* WIN_IME
|
|
464
|
+
*/
|
|
465
|
+
WIN_IME: 229,
|
|
466
|
+
// ======================== Function ========================
|
|
467
|
+
/**
|
|
468
|
+
* whether text and modified key is entered at the same time.
|
|
469
|
+
*/
|
|
470
|
+
isTextModifyingKeyEvent: function(a) {
|
|
471
|
+
var r = a.keyCode;
|
|
472
|
+
if (a.altKey && !a.ctrlKey || a.metaKey || // Function keys don't generate text
|
|
473
|
+
r >= c.F1 && r <= c.F12)
|
|
474
|
+
return !1;
|
|
475
|
+
switch (r) {
|
|
476
|
+
case c.ALT:
|
|
477
|
+
case c.CAPS_LOCK:
|
|
478
|
+
case c.CONTEXT_MENU:
|
|
479
|
+
case c.CTRL:
|
|
480
|
+
case c.DOWN:
|
|
481
|
+
case c.END:
|
|
482
|
+
case c.ESC:
|
|
483
|
+
case c.HOME:
|
|
484
|
+
case c.INSERT:
|
|
485
|
+
case c.LEFT:
|
|
486
|
+
case c.MAC_FF_META:
|
|
487
|
+
case c.META:
|
|
488
|
+
case c.NUMLOCK:
|
|
489
|
+
case c.NUM_CENTER:
|
|
490
|
+
case c.PAGE_DOWN:
|
|
491
|
+
case c.PAGE_UP:
|
|
492
|
+
case c.PAUSE:
|
|
493
|
+
case c.PRINT_SCREEN:
|
|
494
|
+
case c.RIGHT:
|
|
495
|
+
case c.SHIFT:
|
|
496
|
+
case c.UP:
|
|
497
|
+
case c.WIN_KEY:
|
|
498
|
+
case c.WIN_KEY_RIGHT:
|
|
499
|
+
return !1;
|
|
500
|
+
default:
|
|
501
|
+
return !0;
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
/**
|
|
505
|
+
* whether character is entered.
|
|
506
|
+
*/
|
|
507
|
+
isCharacterKey: function(a) {
|
|
508
|
+
if (a >= c.ZERO && a <= c.NINE || a >= c.NUM_ZERO && a <= c.NUM_MULTIPLY || a >= c.A && a <= c.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && a === 0)
|
|
509
|
+
return !0;
|
|
510
|
+
switch (a) {
|
|
511
|
+
case c.SPACE:
|
|
512
|
+
case c.QUESTION_MARK:
|
|
513
|
+
case c.NUM_PLUS:
|
|
514
|
+
case c.NUM_MINUS:
|
|
515
|
+
case c.NUM_PERIOD:
|
|
516
|
+
case c.NUM_DIVISION:
|
|
517
|
+
case c.SEMICOLON:
|
|
518
|
+
case c.DASH:
|
|
519
|
+
case c.EQUALS:
|
|
520
|
+
case c.COMMA:
|
|
521
|
+
case c.PERIOD:
|
|
522
|
+
case c.SLASH:
|
|
523
|
+
case c.APOSTROPHE:
|
|
524
|
+
case c.SINGLE_QUOTE:
|
|
525
|
+
case c.OPEN_SQUARE_BRACKET:
|
|
526
|
+
case c.BACKSLASH:
|
|
527
|
+
case c.CLOSE_SQUARE_BRACKET:
|
|
528
|
+
return !0;
|
|
529
|
+
default:
|
|
530
|
+
return !1;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
const za = /* @__PURE__ */ Wa.createContext(void 0);
|
|
535
|
+
process.env.NODE_ENV !== "production" && (za.displayName = "zIndexContext");
|
|
536
|
+
const ot = za, De = 100, it = 10, ut = De * it, st = ut + De, Oa = {
|
|
537
|
+
Modal: De,
|
|
538
|
+
Drawer: De,
|
|
539
|
+
Popover: De,
|
|
540
|
+
Popconfirm: De,
|
|
541
|
+
Tooltip: De,
|
|
542
|
+
Tour: De,
|
|
543
|
+
FloatButton: De
|
|
544
|
+
}, lt = {
|
|
545
|
+
SelectLike: 50,
|
|
546
|
+
Dropdown: 50,
|
|
547
|
+
DatePicker: 50,
|
|
548
|
+
Menu: 50,
|
|
549
|
+
ImagePreview: 1
|
|
550
|
+
};
|
|
551
|
+
function ct(e) {
|
|
552
|
+
return e in Oa;
|
|
553
|
+
}
|
|
554
|
+
const Kt = (e, a) => {
|
|
555
|
+
const [, r] = qa(), t = Wa.useContext(ot), o = ct(e);
|
|
556
|
+
let i;
|
|
557
|
+
if (a !== void 0)
|
|
558
|
+
i = [a, a];
|
|
559
|
+
else {
|
|
560
|
+
let s = t ?? 0;
|
|
561
|
+
o ? s += // Use preset token zIndex by default but not stack when has parent container
|
|
562
|
+
(t ? 0 : r.zIndexPopupBase) + // Container offset
|
|
563
|
+
Oa[e] : s += lt[e], i = [t === void 0 ? a : s, s];
|
|
564
|
+
}
|
|
565
|
+
if (process.env.NODE_ENV !== "production") {
|
|
566
|
+
const s = Za(e), d = r.zIndexPopupBase + st, m = i[0] || 0;
|
|
567
|
+
process.env.NODE_ENV !== "production" && s(a !== void 0 || m <= d, "usage", "`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.");
|
|
568
|
+
}
|
|
569
|
+
return i;
|
|
570
|
+
}, ca = () => ({
|
|
571
|
+
height: 0,
|
|
572
|
+
opacity: 0
|
|
573
|
+
}), Ea = (e) => {
|
|
574
|
+
const {
|
|
575
|
+
scrollHeight: a
|
|
576
|
+
} = e;
|
|
577
|
+
return {
|
|
578
|
+
height: a,
|
|
579
|
+
opacity: 1
|
|
580
|
+
};
|
|
581
|
+
}, vt = (e) => ({
|
|
582
|
+
height: e ? e.offsetHeight : 0
|
|
583
|
+
}), va = (e, a) => (a == null ? void 0 : a.deadline) === !0 || a.propertyName === "height", dt = function() {
|
|
584
|
+
return {
|
|
585
|
+
motionName: `${arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ja}-motion-collapse`,
|
|
586
|
+
onAppearStart: ca,
|
|
587
|
+
onEnterStart: ca,
|
|
588
|
+
onAppearActive: Ea,
|
|
589
|
+
onEnterActive: Ea,
|
|
590
|
+
onLeaveStart: vt,
|
|
591
|
+
onLeaveActive: ca,
|
|
592
|
+
onAppearEnd: va,
|
|
593
|
+
onEnterEnd: va,
|
|
594
|
+
onLeaveEnd: va,
|
|
595
|
+
motionDeadline: 500
|
|
596
|
+
};
|
|
597
|
+
}, Vt = (e, a, r) => r !== void 0 ? r : `${e}-${a}`, Qt = dt, ft = (e) => ({
|
|
598
|
+
animationDuration: e,
|
|
599
|
+
animationFillMode: "both"
|
|
600
|
+
}), mt = (e) => ({
|
|
601
|
+
animationDuration: e,
|
|
602
|
+
animationFillMode: "both"
|
|
603
|
+
}), jt = function(e, a, r, t) {
|
|
604
|
+
const i = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
|
|
605
|
+
return {
|
|
606
|
+
[`
|
|
607
|
+
${i}${e}-enter,
|
|
608
|
+
${i}${e}-appear
|
|
609
|
+
`]: Object.assign(Object.assign({}, ft(t)), {
|
|
610
|
+
animationPlayState: "paused"
|
|
611
|
+
}),
|
|
612
|
+
[`${i}${e}-leave`]: Object.assign(Object.assign({}, mt(t)), {
|
|
613
|
+
animationPlayState: "paused"
|
|
614
|
+
}),
|
|
615
|
+
[`
|
|
616
|
+
${i}${e}-enter${e}-enter-active,
|
|
617
|
+
${i}${e}-appear${e}-appear-active
|
|
618
|
+
`]: {
|
|
619
|
+
animationName: a,
|
|
620
|
+
animationPlayState: "running"
|
|
621
|
+
},
|
|
622
|
+
[`${i}${e}-leave${e}-leave-active`]: {
|
|
623
|
+
animationName: r,
|
|
624
|
+
animationPlayState: "running",
|
|
625
|
+
pointerEvents: "none"
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
var Ba = /* @__PURE__ */ n.createContext(null), Ma = [];
|
|
630
|
+
function ht(e, a) {
|
|
631
|
+
var r = n.useState(function() {
|
|
632
|
+
if (!gr())
|
|
633
|
+
return null;
|
|
634
|
+
var h = document.createElement("div");
|
|
635
|
+
return process.env.NODE_ENV !== "production" && a && h.setAttribute("data-debug", a), h;
|
|
636
|
+
}), t = I(r, 1), o = t[0], i = n.useRef(!1), s = n.useContext(Ba), d = n.useState(Ma), m = I(d, 2), g = m[0], T = m[1], y = s || (i.current ? void 0 : function(h) {
|
|
637
|
+
T(function(_) {
|
|
638
|
+
var M = [h].concat(da(_));
|
|
639
|
+
return M;
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
function C() {
|
|
643
|
+
o.parentElement || document.body.appendChild(o), i.current = !0;
|
|
644
|
+
}
|
|
645
|
+
function v() {
|
|
646
|
+
var h;
|
|
647
|
+
(h = o.parentElement) === null || h === void 0 || h.removeChild(o), i.current = !1;
|
|
648
|
+
}
|
|
649
|
+
return J(function() {
|
|
650
|
+
return e ? s ? s(C) : C() : v(), v;
|
|
651
|
+
}, [e]), J(function() {
|
|
652
|
+
g.length && (g.forEach(function(h) {
|
|
653
|
+
return h();
|
|
654
|
+
}), T(Ma));
|
|
655
|
+
}, [g]), [o, y];
|
|
656
|
+
}
|
|
657
|
+
function gt(e) {
|
|
658
|
+
var a = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), r = document.createElement("div");
|
|
659
|
+
r.id = a;
|
|
660
|
+
var t = r.style;
|
|
661
|
+
t.position = "absolute", t.left = "0", t.top = "0", t.width = "100px", t.height = "100px", t.overflow = "scroll";
|
|
662
|
+
var o, i;
|
|
663
|
+
if (e) {
|
|
664
|
+
var s = getComputedStyle(e);
|
|
665
|
+
t.scrollbarColor = s.scrollbarColor, t.scrollbarWidth = s.scrollbarWidth;
|
|
666
|
+
var d = getComputedStyle(e, "::-webkit-scrollbar"), m = parseInt(d.width, 10), g = parseInt(d.height, 10);
|
|
667
|
+
try {
|
|
668
|
+
var T = m ? "width: ".concat(d.width, ";") : "", y = g ? "height: ".concat(d.height, ";") : "";
|
|
669
|
+
Ha(`
|
|
670
|
+
#`.concat(a, `::-webkit-scrollbar {
|
|
671
|
+
`).concat(T, `
|
|
672
|
+
`).concat(y, `
|
|
673
|
+
}`), a);
|
|
674
|
+
} catch (h) {
|
|
675
|
+
console.error(h), o = m, i = g;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
document.body.appendChild(r);
|
|
679
|
+
var C = e && o && !isNaN(o) ? o : r.offsetWidth - r.clientWidth, v = e && i && !isNaN(i) ? i : r.offsetHeight - r.clientHeight;
|
|
680
|
+
return document.body.removeChild(r), ma(a), {
|
|
681
|
+
width: C,
|
|
682
|
+
height: v
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
function yt(e) {
|
|
686
|
+
return typeof document > "u" || !e || !(e instanceof Element) ? {
|
|
687
|
+
width: 0,
|
|
688
|
+
height: 0
|
|
689
|
+
} : gt(e);
|
|
690
|
+
}
|
|
691
|
+
function Ct() {
|
|
692
|
+
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
693
|
+
}
|
|
694
|
+
var Et = "rc-util-locker-".concat(Date.now()), Na = 0;
|
|
695
|
+
function Mt(e) {
|
|
696
|
+
var a = !!e, r = n.useState(function() {
|
|
697
|
+
return Na += 1, "".concat(Et, "_").concat(Na);
|
|
698
|
+
}), t = I(r, 1), o = t[0];
|
|
699
|
+
J(function() {
|
|
700
|
+
if (a) {
|
|
701
|
+
var i = yt(document.body).width, s = Ct();
|
|
702
|
+
Ha(`
|
|
703
|
+
html body {
|
|
704
|
+
overflow-y: hidden;
|
|
705
|
+
`.concat(s ? "width: calc(100% - ".concat(i, "px);") : "", `
|
|
706
|
+
}`), o);
|
|
707
|
+
} else
|
|
708
|
+
ma(o);
|
|
709
|
+
return function() {
|
|
710
|
+
ma(o);
|
|
711
|
+
};
|
|
712
|
+
}, [a, o]);
|
|
713
|
+
}
|
|
714
|
+
var Sa = !1;
|
|
715
|
+
function Nt(e) {
|
|
716
|
+
return typeof e == "boolean" && (Sa = e), Sa;
|
|
717
|
+
}
|
|
718
|
+
var wa = function(a) {
|
|
719
|
+
return a === !1 ? !1 : !gr() || !a ? null : typeof a == "string" ? document.querySelector(a) : typeof a == "function" ? a() : a;
|
|
720
|
+
}, ya = /* @__PURE__ */ n.forwardRef(function(e, a) {
|
|
721
|
+
var r = e.open, t = e.autoLock, o = e.getContainer, i = e.debug, s = e.autoDestroy, d = s === void 0 ? !0 : s, m = e.children, g = n.useState(r), T = I(g, 2), y = T[0], C = T[1], v = y || r;
|
|
722
|
+
process.env.NODE_ENV !== "production" && et(gr() || !r, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."), n.useEffect(function() {
|
|
723
|
+
(d || r) && C(r);
|
|
724
|
+
}, [r, d]);
|
|
725
|
+
var h = n.useState(function() {
|
|
726
|
+
return wa(o);
|
|
727
|
+
}), _ = I(h, 2), M = _[0], U = _[1];
|
|
728
|
+
n.useEffect(function() {
|
|
729
|
+
var Q = wa(o);
|
|
730
|
+
U(Q ?? null);
|
|
731
|
+
});
|
|
732
|
+
var k = ht(v && !M, i), N = I(k, 2), A = N[0], R = N[1], f = M ?? A;
|
|
733
|
+
Mt(t && r && gr() && (f === A || f === document.body));
|
|
734
|
+
var te = null;
|
|
735
|
+
if (m && Aa(m) && a) {
|
|
736
|
+
var de = m;
|
|
737
|
+
te = de.ref;
|
|
738
|
+
}
|
|
739
|
+
var ne = Ua(te, a);
|
|
740
|
+
if (!v || !gr() || M === void 0)
|
|
741
|
+
return null;
|
|
742
|
+
var fe = f === !1 || Nt(), oe = m;
|
|
743
|
+
return a && (oe = /* @__PURE__ */ n.cloneElement(m, {
|
|
744
|
+
ref: ne
|
|
745
|
+
})), /* @__PURE__ */ n.createElement(Ba.Provider, {
|
|
746
|
+
value: R
|
|
747
|
+
}, fe ? oe : /* @__PURE__ */ tt(oe, f));
|
|
748
|
+
});
|
|
749
|
+
process.env.NODE_ENV !== "production" && (ya.displayName = "Portal");
|
|
750
|
+
function St() {
|
|
751
|
+
var e = $({}, n);
|
|
752
|
+
return e.useId;
|
|
753
|
+
}
|
|
754
|
+
var Pa = 0, ba = St();
|
|
755
|
+
const wt = ba ? (
|
|
756
|
+
// Use React `useId`
|
|
757
|
+
function(a) {
|
|
758
|
+
var r = ba();
|
|
759
|
+
return a || (process.env.NODE_ENV === "test" ? "test-id" : r);
|
|
760
|
+
}
|
|
761
|
+
) : (
|
|
762
|
+
// Use compatible of `useId`
|
|
763
|
+
function(a) {
|
|
764
|
+
var r = n.useState("ssr-id"), t = I(r, 2), o = t[0], i = t[1];
|
|
765
|
+
return n.useEffect(function() {
|
|
766
|
+
var s = Pa;
|
|
767
|
+
Pa += 1, i("rc_unique_".concat(s));
|
|
768
|
+
}, []), a || (process.env.NODE_ENV === "test" ? "test-id" : o);
|
|
769
|
+
}
|
|
770
|
+
), Pt = function() {
|
|
771
|
+
if (typeof navigator > "u" || typeof window > "u")
|
|
772
|
+
return !1;
|
|
773
|
+
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
774
|
+
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
|
|
775
|
+
};
|
|
776
|
+
function bt(e) {
|
|
777
|
+
var a = e.prefixCls, r = e.align, t = e.arrow, o = e.arrowPos, i = t || {}, s = i.className, d = i.content, m = o.x, g = m === void 0 ? 0 : m, T = o.y, y = T === void 0 ? 0 : T, C = n.useRef();
|
|
778
|
+
if (!r || !r.points)
|
|
779
|
+
return null;
|
|
780
|
+
var v = {
|
|
781
|
+
position: "absolute"
|
|
782
|
+
};
|
|
783
|
+
if (r.autoArrow !== !1) {
|
|
784
|
+
var h = r.points[0], _ = r.points[1], M = h[0], U = h[1], k = _[0], N = _[1];
|
|
785
|
+
M === k || !["t", "b"].includes(M) ? v.top = y : M === "t" ? v.top = 0 : v.bottom = 0, U === N || !["l", "r"].includes(U) ? v.left = g : U === "l" ? v.left = 0 : v.right = 0;
|
|
786
|
+
}
|
|
787
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
788
|
+
ref: C,
|
|
789
|
+
className: nr("".concat(a, "-arrow"), s),
|
|
790
|
+
style: v
|
|
791
|
+
}, d);
|
|
792
|
+
}
|
|
793
|
+
function Tt(e) {
|
|
794
|
+
var a = e.prefixCls, r = e.open, t = e.zIndex, o = e.mask, i = e.motion;
|
|
795
|
+
return o ? /* @__PURE__ */ n.createElement(xa, Fa({}, i, {
|
|
796
|
+
motionAppear: !0,
|
|
797
|
+
visible: r,
|
|
798
|
+
removeOnLeave: !0
|
|
799
|
+
}), function(s) {
|
|
800
|
+
var d = s.className;
|
|
801
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
802
|
+
style: {
|
|
803
|
+
zIndex: t
|
|
804
|
+
},
|
|
805
|
+
className: nr("".concat(a, "-mask"), d)
|
|
806
|
+
});
|
|
807
|
+
}) : null;
|
|
808
|
+
}
|
|
809
|
+
var Ka = /* @__PURE__ */ n.memo(function(e) {
|
|
810
|
+
var a = e.children;
|
|
811
|
+
return a;
|
|
812
|
+
}, function(e, a) {
|
|
813
|
+
return a.cache;
|
|
814
|
+
});
|
|
815
|
+
process.env.NODE_ENV !== "production" && (Ka.displayName = "PopupContent");
|
|
816
|
+
var Va = /* @__PURE__ */ n.forwardRef(function(e, a) {
|
|
817
|
+
var r = e.popup, t = e.className, o = e.prefixCls, i = e.style, s = e.target, d = e.onVisibleChanged, m = e.open, g = e.keepDom, T = e.fresh, y = e.onClick, C = e.mask, v = e.arrow, h = e.arrowPos, _ = e.align, M = e.motion, U = e.maskMotion, k = e.forceRender, N = e.getPopupContainer, A = e.autoDestroy, R = e.portal, f = e.zIndex, te = e.onMouseEnter, de = e.onMouseLeave, ne = e.onPointerEnter, fe = e.onPointerDownCapture, oe = e.ready, Q = e.offsetX, Se = e.offsetY, me = e.offsetR, we = e.offsetB, j = e.onAlign, Pe = e.onPrepare, F = e.stretch, z = e.targetWidth, E = e.targetHeight, We = typeof r == "function" ? r() : r, ie = m || g, W = (N == null ? void 0 : N.length) > 0, S = n.useState(!N || !W), G = I(S, 2), $e = G[0], or = G[1];
|
|
818
|
+
if (J(function() {
|
|
819
|
+
!$e && W && s && or(!0);
|
|
820
|
+
}, [$e, W, s]), !$e)
|
|
821
|
+
return null;
|
|
822
|
+
var he = "auto", q = {
|
|
823
|
+
left: "-1000vw",
|
|
824
|
+
top: "-1000vh",
|
|
825
|
+
right: he,
|
|
826
|
+
bottom: he
|
|
827
|
+
};
|
|
828
|
+
if (oe || !m) {
|
|
829
|
+
var Ie, ze = _.points, X = _.dynamicInset || ((Ie = _._experimental) === null || Ie === void 0 ? void 0 : Ie.dynamicInset), ge = X && ze[0][1] === "r", ue = X && ze[0][0] === "b";
|
|
830
|
+
ge ? (q.right = me, q.left = he) : (q.left = Q, q.right = he), ue ? (q.bottom = we, q.top = he) : (q.top = Se, q.bottom = he);
|
|
831
|
+
}
|
|
832
|
+
var V = {};
|
|
833
|
+
return F && (F.includes("height") && E ? V.height = E : F.includes("minHeight") && E && (V.minHeight = E), F.includes("width") && z ? V.width = z : F.includes("minWidth") && z && (V.minWidth = z)), m || (V.pointerEvents = "none"), /* @__PURE__ */ n.createElement(R, {
|
|
834
|
+
open: k || ie,
|
|
835
|
+
getContainer: N && function() {
|
|
836
|
+
return N(s);
|
|
837
|
+
},
|
|
838
|
+
autoDestroy: A
|
|
839
|
+
}, /* @__PURE__ */ n.createElement(Tt, {
|
|
840
|
+
prefixCls: o,
|
|
841
|
+
open: m,
|
|
842
|
+
zIndex: f,
|
|
843
|
+
mask: C,
|
|
844
|
+
motion: U
|
|
845
|
+
}), /* @__PURE__ */ n.createElement($a, {
|
|
846
|
+
onResize: j,
|
|
847
|
+
disabled: !m
|
|
848
|
+
}, function(ir) {
|
|
849
|
+
return /* @__PURE__ */ n.createElement(xa, Fa({
|
|
850
|
+
motionAppear: !0,
|
|
851
|
+
motionEnter: !0,
|
|
852
|
+
motionLeave: !0,
|
|
853
|
+
removeOnLeave: !1,
|
|
854
|
+
forceRender: k,
|
|
855
|
+
leavedClassName: "".concat(o, "-hidden")
|
|
856
|
+
}, M, {
|
|
857
|
+
onAppearPrepare: Pe,
|
|
858
|
+
onEnterPrepare: Pe,
|
|
859
|
+
visible: m,
|
|
860
|
+
onVisibleChanged: function(Y) {
|
|
861
|
+
var ye;
|
|
862
|
+
M == null || (ye = M.onVisibleChanged) === null || ye === void 0 || ye.call(M, Y), d(Y);
|
|
863
|
+
}
|
|
864
|
+
}), function(Re, Y) {
|
|
865
|
+
var ye = Re.className, Oe = Re.style, O = nr(o, ye, t);
|
|
866
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
867
|
+
ref: Xa(ir, a, Y),
|
|
868
|
+
className: O,
|
|
869
|
+
style: $($($($({
|
|
870
|
+
"--arrow-x": "".concat(h.x || 0, "px"),
|
|
871
|
+
"--arrow-y": "".concat(h.y || 0, "px")
|
|
872
|
+
}, q), V), Oe), {}, {
|
|
873
|
+
boxSizing: "border-box",
|
|
874
|
+
zIndex: f
|
|
875
|
+
}, i),
|
|
876
|
+
onMouseEnter: te,
|
|
877
|
+
onMouseLeave: de,
|
|
878
|
+
onPointerEnter: ne,
|
|
879
|
+
onClick: y,
|
|
880
|
+
onPointerDownCapture: fe
|
|
881
|
+
}, v && /* @__PURE__ */ n.createElement(bt, {
|
|
882
|
+
prefixCls: o,
|
|
883
|
+
arrow: v,
|
|
884
|
+
arrowPos: h,
|
|
885
|
+
align: _
|
|
886
|
+
}), /* @__PURE__ */ n.createElement(Ka, {
|
|
887
|
+
cache: !m && !T
|
|
888
|
+
}, We));
|
|
889
|
+
});
|
|
890
|
+
}));
|
|
891
|
+
});
|
|
892
|
+
process.env.NODE_ENV !== "production" && (Va.displayName = "Popup");
|
|
893
|
+
var Qa = /* @__PURE__ */ n.forwardRef(function(e, a) {
|
|
894
|
+
var r = e.children, t = e.getTriggerDOMNode, o = Aa(r), i = n.useCallback(function(d) {
|
|
895
|
+
Ya(a, t ? t(d) : d);
|
|
896
|
+
}, [t]), s = Ua(i, pa(r));
|
|
897
|
+
return o ? /* @__PURE__ */ n.cloneElement(r, {
|
|
898
|
+
ref: s
|
|
899
|
+
}) : r;
|
|
900
|
+
});
|
|
901
|
+
process.env.NODE_ENV !== "production" && (Qa.displayName = "TriggerWrapper");
|
|
902
|
+
var Ta = /* @__PURE__ */ n.createContext(null);
|
|
903
|
+
function _a(e) {
|
|
904
|
+
return e ? Array.isArray(e) ? e : [e] : [];
|
|
905
|
+
}
|
|
906
|
+
function _t(e, a, r, t) {
|
|
907
|
+
return n.useMemo(function() {
|
|
908
|
+
var o = _a(r ?? a), i = _a(t ?? a), s = new Set(o), d = new Set(i);
|
|
909
|
+
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), d.has("hover") && (d.delete("hover"), d.add("click"))), [s, d];
|
|
910
|
+
}, [e, a, r, t]);
|
|
911
|
+
}
|
|
912
|
+
function Dt() {
|
|
913
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], r = arguments.length > 2 ? arguments[2] : void 0;
|
|
914
|
+
return r ? e[0] === a[0] : e[0] === a[0] && e[1] === a[1];
|
|
915
|
+
}
|
|
916
|
+
function It(e, a, r, t) {
|
|
917
|
+
for (var o = r.points, i = Object.keys(e), s = 0; s < i.length; s += 1) {
|
|
918
|
+
var d, m = i[s];
|
|
919
|
+
if (Dt((d = e[m]) === null || d === void 0 ? void 0 : d.points, o, t))
|
|
920
|
+
return "".concat(a, "-placement-").concat(m);
|
|
921
|
+
}
|
|
922
|
+
return "";
|
|
923
|
+
}
|
|
924
|
+
function Da(e, a, r, t) {
|
|
925
|
+
return a || (r ? {
|
|
926
|
+
motionName: "".concat(e, "-").concat(r)
|
|
927
|
+
} : t ? {
|
|
928
|
+
motionName: t
|
|
929
|
+
} : null);
|
|
930
|
+
}
|
|
931
|
+
function Cr(e) {
|
|
932
|
+
return e.ownerDocument.defaultView;
|
|
933
|
+
}
|
|
934
|
+
function ga(e) {
|
|
935
|
+
for (var a = [], r = e == null ? void 0 : e.parentElement, t = ["hidden", "scroll", "clip", "auto"]; r; ) {
|
|
936
|
+
var o = Cr(r).getComputedStyle(r), i = o.overflowX, s = o.overflowY, d = o.overflow;
|
|
937
|
+
[i, s, d].some(function(m) {
|
|
938
|
+
return t.includes(m);
|
|
939
|
+
}) && a.push(r), r = r.parentElement;
|
|
940
|
+
}
|
|
941
|
+
return a;
|
|
942
|
+
}
|
|
943
|
+
function yr(e) {
|
|
944
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
945
|
+
return Number.isNaN(e) ? a : e;
|
|
946
|
+
}
|
|
947
|
+
function hr(e) {
|
|
948
|
+
return yr(parseFloat(e), 0);
|
|
949
|
+
}
|
|
950
|
+
function Ia(e, a) {
|
|
951
|
+
var r = $({}, e);
|
|
952
|
+
return (a || []).forEach(function(t) {
|
|
953
|
+
if (!(t instanceof HTMLBodyElement || t instanceof HTMLHtmlElement)) {
|
|
954
|
+
var o = Cr(t).getComputedStyle(t), i = o.overflow, s = o.overflowClipMargin, d = o.borderTopWidth, m = o.borderBottomWidth, g = o.borderLeftWidth, T = o.borderRightWidth, y = t.getBoundingClientRect(), C = t.offsetHeight, v = t.clientHeight, h = t.offsetWidth, _ = t.clientWidth, M = hr(d), U = hr(m), k = hr(g), N = hr(T), A = yr(Math.round(y.width / h * 1e3) / 1e3), R = yr(Math.round(y.height / C * 1e3) / 1e3), f = (h - _ - k - N) * A, te = (C - v - M - U) * R, de = M * R, ne = U * R, fe = k * A, oe = N * A, Q = 0, Se = 0;
|
|
955
|
+
if (i === "clip") {
|
|
956
|
+
var me = hr(s);
|
|
957
|
+
Q = me * A, Se = me * R;
|
|
958
|
+
}
|
|
959
|
+
var we = y.x + fe - Q, j = y.y + de - Se, Pe = we + y.width + 2 * Q - fe - oe - f, F = j + y.height + 2 * Se - de - ne - te;
|
|
960
|
+
r.left = Math.max(r.left, we), r.top = Math.max(r.top, j), r.right = Math.min(r.right, Pe), r.bottom = Math.min(r.bottom, F);
|
|
961
|
+
}
|
|
962
|
+
}), r;
|
|
963
|
+
}
|
|
964
|
+
function Ra(e) {
|
|
965
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = "".concat(a), t = r.match(/^(.*)\%$/);
|
|
966
|
+
return t ? e * (parseFloat(t[1]) / 100) : parseFloat(r);
|
|
967
|
+
}
|
|
968
|
+
function La(e, a) {
|
|
969
|
+
var r = a || [], t = I(r, 2), o = t[0], i = t[1];
|
|
970
|
+
return [Ra(e.width, o), Ra(e.height, i)];
|
|
971
|
+
}
|
|
972
|
+
function ka() {
|
|
973
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
974
|
+
return [e[0], e[1]];
|
|
975
|
+
}
|
|
976
|
+
function tr(e, a) {
|
|
977
|
+
var r = a[0], t = a[1], o, i;
|
|
978
|
+
return r === "t" ? i = e.y : r === "b" ? i = e.y + e.height : i = e.y + e.height / 2, t === "l" ? o = e.x : t === "r" ? o = e.x + e.width : o = e.x + e.width / 2, {
|
|
979
|
+
x: o,
|
|
980
|
+
y: i
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
function Fe(e, a) {
|
|
984
|
+
var r = {
|
|
985
|
+
t: "b",
|
|
986
|
+
b: "t",
|
|
987
|
+
l: "r",
|
|
988
|
+
r: "l"
|
|
989
|
+
};
|
|
990
|
+
return e.map(function(t, o) {
|
|
991
|
+
return o === a ? r[t] || "c" : t;
|
|
992
|
+
}).join("");
|
|
993
|
+
}
|
|
994
|
+
function Rt(e, a, r, t, o, i, s) {
|
|
995
|
+
var d = n.useState({
|
|
996
|
+
ready: !1,
|
|
997
|
+
offsetX: 0,
|
|
998
|
+
offsetY: 0,
|
|
999
|
+
offsetR: 0,
|
|
1000
|
+
offsetB: 0,
|
|
1001
|
+
arrowX: 0,
|
|
1002
|
+
arrowY: 0,
|
|
1003
|
+
scaleX: 1,
|
|
1004
|
+
scaleY: 1,
|
|
1005
|
+
align: o[t] || {}
|
|
1006
|
+
}), m = I(d, 2), g = m[0], T = m[1], y = n.useRef(0), C = n.useMemo(function() {
|
|
1007
|
+
return a ? ga(a) : [];
|
|
1008
|
+
}, [a]), v = n.useRef({}), h = function() {
|
|
1009
|
+
v.current = {};
|
|
1010
|
+
};
|
|
1011
|
+
e || h();
|
|
1012
|
+
var _ = Je(function() {
|
|
1013
|
+
if (a && r && e) {
|
|
1014
|
+
let ae = function(ar, xe) {
|
|
1015
|
+
var He = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Er, mr = S.x + ar, Hr = S.y + xe, oa = mr + ge, ia = Hr + X, ua = Math.max(mr, He.left), u = Math.max(Hr, He.top), l = Math.min(oa, He.right), D = Math.min(ia, He.bottom);
|
|
1016
|
+
return Math.max(0, (l - ua) * (D - u));
|
|
1017
|
+
}, xr = function() {
|
|
1018
|
+
Qe = S.y + b, je = Qe + X, Te = S.x + w, Ye = Te + ge;
|
|
1019
|
+
};
|
|
1020
|
+
var k, N, A, R, f = a, te = f.ownerDocument, de = Cr(f), ne = de.getComputedStyle(f), fe = ne.width, oe = ne.height, Q = ne.position, Se = f.style.left, me = f.style.top, we = f.style.right, j = f.style.bottom, Pe = f.style.overflow, F = $($({}, o[t]), i), z = te.createElement("div");
|
|
1021
|
+
(k = f.parentElement) === null || k === void 0 || k.appendChild(z), z.style.left = "".concat(f.offsetLeft, "px"), z.style.top = "".concat(f.offsetTop, "px"), z.style.position = Q, z.style.height = "".concat(f.offsetHeight, "px"), z.style.width = "".concat(f.offsetWidth, "px"), f.style.left = "0", f.style.top = "0", f.style.right = "auto", f.style.bottom = "auto", f.style.overflow = "hidden";
|
|
1022
|
+
var E;
|
|
1023
|
+
if (Array.isArray(r))
|
|
1024
|
+
E = {
|
|
1025
|
+
x: r[0],
|
|
1026
|
+
y: r[1],
|
|
1027
|
+
width: 0,
|
|
1028
|
+
height: 0
|
|
1029
|
+
};
|
|
1030
|
+
else {
|
|
1031
|
+
var We, ie, W = r.getBoundingClientRect();
|
|
1032
|
+
W.x = (We = W.x) !== null && We !== void 0 ? We : W.left, W.y = (ie = W.y) !== null && ie !== void 0 ? ie : W.top, E = {
|
|
1033
|
+
x: W.x,
|
|
1034
|
+
y: W.y,
|
|
1035
|
+
width: W.width,
|
|
1036
|
+
height: W.height
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
var S = f.getBoundingClientRect();
|
|
1040
|
+
S.x = (N = S.x) !== null && N !== void 0 ? N : S.left, S.y = (A = S.y) !== null && A !== void 0 ? A : S.top;
|
|
1041
|
+
var G = te.documentElement, $e = G.clientWidth, or = G.clientHeight, he = G.scrollWidth, q = G.scrollHeight, Ie = G.scrollTop, ze = G.scrollLeft, X = S.height, ge = S.width, ue = E.height, V = E.width, ir = {
|
|
1042
|
+
left: 0,
|
|
1043
|
+
top: 0,
|
|
1044
|
+
right: $e,
|
|
1045
|
+
bottom: or
|
|
1046
|
+
}, Re = {
|
|
1047
|
+
left: -ze,
|
|
1048
|
+
top: -Ie,
|
|
1049
|
+
right: he - ze,
|
|
1050
|
+
bottom: q - Ie
|
|
1051
|
+
}, Y = F.htmlRegion, ye = "visible", Oe = "visibleFirst";
|
|
1052
|
+
Y !== "scroll" && Y !== Oe && (Y = ye);
|
|
1053
|
+
var O = Y === Oe, $r = Ia(Re, C), P = Ia(ir, C), Er = Y === ye ? P : $r, Be = O ? P : Er;
|
|
1054
|
+
f.style.left = "auto", f.style.top = "auto", f.style.right = "0", f.style.bottom = "0";
|
|
1055
|
+
var B = f.getBoundingClientRect();
|
|
1056
|
+
f.style.left = Se, f.style.top = me, f.style.right = we, f.style.bottom = j, f.style.overflow = Pe, (R = f.parentElement) === null || R === void 0 || R.removeChild(z);
|
|
1057
|
+
var Le = yr(Math.round(ge / parseFloat(fe) * 1e3) / 1e3), be = yr(Math.round(X / parseFloat(oe) * 1e3) / 1e3);
|
|
1058
|
+
if (Le === 0 || be === 0 || fa(r) && !nt(r))
|
|
1059
|
+
return;
|
|
1060
|
+
var zr = F.offset, Or = F.targetOffset, Mr = La(S, zr), se = I(Mr, 2), le = se[0], p = se[1], Br = La(E, Or), Ke = I(Br, 2), ee = Ke[0], ke = Ke[1];
|
|
1061
|
+
E.x -= ee, E.y -= ke;
|
|
1062
|
+
var Kr = F.points || [], Nr = I(Kr, 2), Vr = Nr[0], Qr = Nr[1], Ce = ka(Qr), Z = ka(Vr), ur = tr(E, Ce), K = tr(S, Z), Ae = $({}, F), w = ur.x - K.x + le, b = ur.y - K.y + p, ce = ae(w, b), Ve = ae(w, b, P), sr = tr(E, ["t", "l"]), re = tr(S, ["t", "l"]), Sr = tr(E, ["b", "r"]), lr = tr(S, ["b", "r"]), Ue = F.overflow || {}, wr = Ue.adjustX, jr = Ue.adjustY, cr = Ue.shiftX, Xe = Ue.shiftY, vr = function(xe) {
|
|
1063
|
+
return typeof xe == "boolean" ? xe : xe >= 0;
|
|
1064
|
+
}, Qe, je, Te, Ye;
|
|
1065
|
+
xr();
|
|
1066
|
+
var Ge = vr(jr), Pr = Z[0] === Ce[0];
|
|
1067
|
+
if (Ge && Z[0] === "t" && (je > Be.bottom || v.current.bt)) {
|
|
1068
|
+
var H = b;
|
|
1069
|
+
Pr ? H -= X - ue : H = sr.y - lr.y - p;
|
|
1070
|
+
var br = ae(w, H), Gr = ae(w, H, P);
|
|
1071
|
+
// Of course use larger one
|
|
1072
|
+
br > ce || br === ce && (!O || // Choose recommend one
|
|
1073
|
+
Gr >= Ve) ? (v.current.bt = !0, b = H, p = -p, Ae.points = [Fe(Z, 0), Fe(Ce, 0)]) : v.current.bt = !1;
|
|
1074
|
+
}
|
|
1075
|
+
if (Ge && Z[0] === "b" && (Qe < Be.top || v.current.tb)) {
|
|
1076
|
+
var qe = b;
|
|
1077
|
+
Pr ? qe += X - ue : qe = Sr.y - re.y - p;
|
|
1078
|
+
var Tr = ae(w, qe), qr = ae(w, qe, P);
|
|
1079
|
+
// Of course use larger one
|
|
1080
|
+
Tr > ce || Tr === ce && (!O || // Choose recommend one
|
|
1081
|
+
qr >= Ve) ? (v.current.tb = !0, b = qe, p = -p, Ae.points = [Fe(Z, 0), Fe(Ce, 0)]) : v.current.tb = !1;
|
|
1082
|
+
}
|
|
1083
|
+
var _r = vr(wr), Dr = Z[1] === Ce[1];
|
|
1084
|
+
if (_r && Z[1] === "l" && (Ye > Be.right || v.current.rl)) {
|
|
1085
|
+
var Ze = w;
|
|
1086
|
+
Dr ? Ze -= ge - V : Ze = sr.x - lr.x - le;
|
|
1087
|
+
var Ir = ae(Ze, b), pe = ae(Ze, b, P);
|
|
1088
|
+
// Of course use larger one
|
|
1089
|
+
Ir > ce || Ir === ce && (!O || // Choose recommend one
|
|
1090
|
+
pe >= Ve) ? (v.current.rl = !0, w = Ze, le = -le, Ae.points = [Fe(Z, 1), Fe(Ce, 1)]) : v.current.rl = !1;
|
|
1091
|
+
}
|
|
1092
|
+
if (_r && Z[1] === "r" && (Te < Be.left || v.current.lr)) {
|
|
1093
|
+
var _e = w;
|
|
1094
|
+
Dr ? _e += ge - V : _e = Sr.x - re.x - le;
|
|
1095
|
+
var Rr = ae(_e, b), Lr = ae(_e, b, P);
|
|
1096
|
+
// Of course use larger one
|
|
1097
|
+
Rr > ce || Rr === ce && (!O || // Choose recommend one
|
|
1098
|
+
Lr >= Ve) ? (v.current.lr = !0, w = _e, le = -le, Ae.points = [Fe(Z, 1), Fe(Ce, 1)]) : v.current.lr = !1;
|
|
1099
|
+
}
|
|
1100
|
+
xr();
|
|
1101
|
+
var Ee = cr === !0 ? 0 : cr;
|
|
1102
|
+
typeof Ee == "number" && (Te < P.left && (w -= Te - P.left - le, E.x + V < P.left + Ee && (w += E.x - P.left + V - Ee)), Ye > P.right && (w -= Ye - P.right - le, E.x > P.right - Ee && (w += E.x - P.right + Ee)));
|
|
1103
|
+
var ve = Xe === !0 ? 0 : Xe;
|
|
1104
|
+
typeof ve == "number" && (Qe < P.top && (b -= Qe - P.top - p, E.y + ue < P.top + ve && (b += E.y - P.top + ue - ve)), je > P.bottom && (b -= je - P.bottom - p, E.y > P.bottom - ve && (b += E.y - P.bottom + ve)));
|
|
1105
|
+
var er = S.x + w, rr = er + ge, Me = S.y + b, Zr = Me + X, kr = E.x, Jr = kr + V, dr = E.y, Xr = dr + ue, Yr = Math.max(er, kr), pr = Math.min(rr, Jr), Ar = (Yr + pr) / 2, ea = Ar - er, ra = Math.max(Me, dr), Ur = Math.min(Zr, Xr), aa = (ra + Ur) / 2, ta = aa - Me;
|
|
1106
|
+
s == null || s(a, Ae);
|
|
1107
|
+
var fr = B.right - S.x - (w + S.width), Ne = B.bottom - S.y - (b + S.height);
|
|
1108
|
+
Le === 1 && (w = Math.round(w), fr = Math.round(fr)), be === 1 && (b = Math.round(b), Ne = Math.round(Ne));
|
|
1109
|
+
var na = {
|
|
1110
|
+
ready: !0,
|
|
1111
|
+
offsetX: w / Le,
|
|
1112
|
+
offsetY: b / be,
|
|
1113
|
+
offsetR: fr / Le,
|
|
1114
|
+
offsetB: Ne / be,
|
|
1115
|
+
arrowX: ea / Le,
|
|
1116
|
+
arrowY: ta / be,
|
|
1117
|
+
scaleX: Le,
|
|
1118
|
+
scaleY: be,
|
|
1119
|
+
align: Ae
|
|
1120
|
+
};
|
|
1121
|
+
T(na);
|
|
1122
|
+
}
|
|
1123
|
+
}), M = function() {
|
|
1124
|
+
y.current += 1;
|
|
1125
|
+
var N = y.current;
|
|
1126
|
+
Promise.resolve().then(function() {
|
|
1127
|
+
y.current === N && _();
|
|
1128
|
+
});
|
|
1129
|
+
}, U = function() {
|
|
1130
|
+
T(function(N) {
|
|
1131
|
+
return $($({}, N), {}, {
|
|
1132
|
+
ready: !1
|
|
1133
|
+
});
|
|
1134
|
+
});
|
|
1135
|
+
};
|
|
1136
|
+
return J(U, [t]), J(function() {
|
|
1137
|
+
e || U();
|
|
1138
|
+
}, [e]), [g.ready, g.offsetX, g.offsetY, g.offsetR, g.offsetB, g.arrowX, g.arrowY, g.scaleX, g.scaleY, g.align, M];
|
|
1139
|
+
}
|
|
1140
|
+
function Lt(e, a, r, t, o) {
|
|
1141
|
+
J(function() {
|
|
1142
|
+
if (e && a && r) {
|
|
1143
|
+
let y = function() {
|
|
1144
|
+
t(), o();
|
|
1145
|
+
};
|
|
1146
|
+
var i = a, s = r, d = ga(i), m = ga(s), g = Cr(s), T = new Set([g].concat(da(d), da(m)));
|
|
1147
|
+
return T.forEach(function(C) {
|
|
1148
|
+
C.addEventListener("scroll", y, {
|
|
1149
|
+
passive: !0
|
|
1150
|
+
});
|
|
1151
|
+
}), g.addEventListener("resize", y, {
|
|
1152
|
+
passive: !0
|
|
1153
|
+
}), t(), function() {
|
|
1154
|
+
T.forEach(function(C) {
|
|
1155
|
+
C.removeEventListener("scroll", y), g.removeEventListener("resize", y);
|
|
1156
|
+
});
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
}, [e, a, r]);
|
|
1160
|
+
}
|
|
1161
|
+
function kt(e, a, r, t, o, i, s, d) {
|
|
1162
|
+
var m = n.useRef(e);
|
|
1163
|
+
m.current = e;
|
|
1164
|
+
var g = n.useRef(!1);
|
|
1165
|
+
n.useEffect(function() {
|
|
1166
|
+
if (a && t && (!o || i)) {
|
|
1167
|
+
var y = function() {
|
|
1168
|
+
g.current = !1;
|
|
1169
|
+
}, C = function(A) {
|
|
1170
|
+
var R;
|
|
1171
|
+
m.current && !s(((R = A.composedPath) === null || R === void 0 || (R = R.call(A)) === null || R === void 0 ? void 0 : R[0]) || A.target) && !g.current && d(!1);
|
|
1172
|
+
}, v = Cr(t);
|
|
1173
|
+
v.addEventListener("pointerdown", y, !0), v.addEventListener("mousedown", C, !0), v.addEventListener("contextmenu", C, !0);
|
|
1174
|
+
var h = ha(r);
|
|
1175
|
+
if (h && (h.addEventListener("mousedown", C, !0), h.addEventListener("contextmenu", C, !0)), process.env.NODE_ENV !== "production") {
|
|
1176
|
+
var _, M, U = r == null || (_ = r.getRootNode) === null || _ === void 0 ? void 0 : _.call(r), k = (M = t.getRootNode) === null || M === void 0 ? void 0 : M.call(t);
|
|
1177
|
+
rt(U === k, "trigger element and popup element should in same shadow root.");
|
|
1178
|
+
}
|
|
1179
|
+
return function() {
|
|
1180
|
+
v.removeEventListener("pointerdown", y, !0), v.removeEventListener("mousedown", C, !0), v.removeEventListener("contextmenu", C, !0), h && (h.removeEventListener("mousedown", C, !0), h.removeEventListener("contextmenu", C, !0));
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
}, [a, r, t, o, i]);
|
|
1184
|
+
function T() {
|
|
1185
|
+
g.current = !0;
|
|
1186
|
+
}
|
|
1187
|
+
return T;
|
|
1188
|
+
}
|
|
1189
|
+
var At = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
|
|
1190
|
+
function Ut() {
|
|
1191
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ya, a = /* @__PURE__ */ n.forwardRef(function(r, t) {
|
|
1192
|
+
var o = r.prefixCls, i = o === void 0 ? "rc-trigger-popup" : o, s = r.children, d = r.action, m = d === void 0 ? "hover" : d, g = r.showAction, T = r.hideAction, y = r.popupVisible, C = r.defaultPopupVisible, v = r.onPopupVisibleChange, h = r.afterPopupVisibleChange, _ = r.mouseEnterDelay, M = r.mouseLeaveDelay, U = M === void 0 ? 0.1 : M, k = r.focusDelay, N = r.blurDelay, A = r.mask, R = r.maskClosable, f = R === void 0 ? !0 : R, te = r.getPopupContainer, de = r.forceRender, ne = r.autoDestroy, fe = r.destroyPopupOnHide, oe = r.popup, Q = r.popupClassName, Se = r.popupStyle, me = r.popupPlacement, we = r.builtinPlacements, j = we === void 0 ? {} : we, Pe = r.popupAlign, F = r.zIndex, z = r.stretch, E = r.getPopupClassNameFromAlign, We = r.fresh, ie = r.alignPoint, W = r.onPopupClick, S = r.onPopupAlign, G = r.arrow, $e = r.popupMotion, or = r.maskMotion, he = r.popupTransitionName, q = r.popupAnimation, Ie = r.maskTransitionName, ze = r.maskAnimation, X = r.className, ge = r.getTriggerDOMNode, ue = at(r, At), V = ne || fe || !1, ir = n.useState(!1), Re = I(ir, 2), Y = Re[0], ye = Re[1];
|
|
1193
|
+
J(function() {
|
|
1194
|
+
ye(Pt());
|
|
1195
|
+
}, []);
|
|
1196
|
+
var Oe = n.useRef({}), O = n.useContext(Ta), $r = n.useMemo(function() {
|
|
1197
|
+
return {
|
|
1198
|
+
registerSubPopup: function(l, D) {
|
|
1199
|
+
Oe.current[l] = D, O == null || O.registerSubPopup(l, D);
|
|
1200
|
+
}
|
|
1201
|
+
};
|
|
1202
|
+
}, [O]), P = wt(), Er = n.useState(null), Be = I(Er, 2), B = Be[0], Le = Be[1], be = n.useRef(null), zr = Je(function(u) {
|
|
1203
|
+
be.current = u, fa(u) && B !== u && Le(u), O == null || O.registerSubPopup(P, u);
|
|
1204
|
+
}), Or = n.useState(null), Mr = I(Or, 2), se = Mr[0], le = Mr[1], p = n.useRef(null), Br = Je(function(u) {
|
|
1205
|
+
fa(u) && se !== u && (le(u), p.current = u);
|
|
1206
|
+
}), Ke = n.Children.only(s), ee = (Ke == null ? void 0 : Ke.props) || {}, ke = {}, Kr = Je(function(u) {
|
|
1207
|
+
var l, D, x = se;
|
|
1208
|
+
return (x == null ? void 0 : x.contains(u)) || ((l = ha(x)) === null || l === void 0 ? void 0 : l.host) === u || u === x || (B == null ? void 0 : B.contains(u)) || ((D = ha(B)) === null || D === void 0 ? void 0 : D.host) === u || u === B || Object.values(Oe.current).some(function(L) {
|
|
1209
|
+
return (L == null ? void 0 : L.contains(u)) || u === L;
|
|
1210
|
+
});
|
|
1211
|
+
}), Nr = Da(i, $e, q, he), Vr = Da(i, or, ze, Ie), Qr = n.useState(C || !1), Ce = I(Qr, 2), Z = Ce[0], ur = Ce[1], K = y ?? Z, Ae = Je(function(u) {
|
|
1212
|
+
y === void 0 && ur(u);
|
|
1213
|
+
});
|
|
1214
|
+
J(function() {
|
|
1215
|
+
ur(y || !1);
|
|
1216
|
+
}, [y]);
|
|
1217
|
+
var w = n.useRef(K);
|
|
1218
|
+
w.current = K;
|
|
1219
|
+
var b = n.useRef([]);
|
|
1220
|
+
b.current = [];
|
|
1221
|
+
var ce = Je(function(u) {
|
|
1222
|
+
var l;
|
|
1223
|
+
Ae(u), ((l = b.current[b.current.length - 1]) !== null && l !== void 0 ? l : K) !== u && (b.current.push(u), v == null || v(u));
|
|
1224
|
+
}), Ve = n.useRef(), sr = function() {
|
|
1225
|
+
clearTimeout(Ve.current);
|
|
1226
|
+
}, re = function(l) {
|
|
1227
|
+
var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1228
|
+
sr(), D === 0 ? ce(l) : Ve.current = setTimeout(function() {
|
|
1229
|
+
ce(l);
|
|
1230
|
+
}, D * 1e3);
|
|
1231
|
+
};
|
|
1232
|
+
n.useEffect(function() {
|
|
1233
|
+
return sr;
|
|
1234
|
+
}, []);
|
|
1235
|
+
var Sr = n.useState(!1), lr = I(Sr, 2), Ue = lr[0], wr = lr[1];
|
|
1236
|
+
J(function(u) {
|
|
1237
|
+
(!u || K) && wr(!0);
|
|
1238
|
+
}, [K]);
|
|
1239
|
+
var jr = n.useState(null), cr = I(jr, 2), Xe = cr[0], vr = cr[1], Qe = n.useState(null), je = I(Qe, 2), Te = je[0], Ye = je[1], Ge = function(l) {
|
|
1240
|
+
Ye([l.clientX, l.clientY]);
|
|
1241
|
+
}, Pr = Rt(K, B, ie && Te !== null ? Te : se, me, j, Pe, S), H = I(Pr, 11), br = H[0], Gr = H[1], qe = H[2], Tr = H[3], qr = H[4], _r = H[5], Dr = H[6], Ze = H[7], Ir = H[8], pe = H[9], _e = H[10], Rr = _t(Y, m, g, T), Lr = I(Rr, 2), Ee = Lr[0], ve = Lr[1], er = Ee.has("click"), rr = ve.has("click") || ve.has("contextMenu"), Me = Je(function() {
|
|
1242
|
+
Ue || _e();
|
|
1243
|
+
}), Zr = function() {
|
|
1244
|
+
w.current && ie && rr && re(!1);
|
|
1245
|
+
};
|
|
1246
|
+
Lt(K, se, B, Me, Zr), J(function() {
|
|
1247
|
+
Me();
|
|
1248
|
+
}, [Te, me]), J(function() {
|
|
1249
|
+
K && !(j != null && j[me]) && Me();
|
|
1250
|
+
}, [JSON.stringify(Pe)]);
|
|
1251
|
+
var kr = n.useMemo(function() {
|
|
1252
|
+
var u = It(j, i, pe, ie);
|
|
1253
|
+
return nr(u, E == null ? void 0 : E(pe));
|
|
1254
|
+
}, [pe, E, j, i, ie]);
|
|
1255
|
+
n.useImperativeHandle(t, function() {
|
|
1256
|
+
return {
|
|
1257
|
+
nativeElement: p.current,
|
|
1258
|
+
popupElement: be.current,
|
|
1259
|
+
forceAlign: Me
|
|
1260
|
+
};
|
|
1261
|
+
});
|
|
1262
|
+
var Jr = n.useState(0), dr = I(Jr, 2), Xr = dr[0], Yr = dr[1], pr = n.useState(0), Ar = I(pr, 2), ea = Ar[0], ra = Ar[1], Ur = function() {
|
|
1263
|
+
if (z && se) {
|
|
1264
|
+
var l = se.getBoundingClientRect();
|
|
1265
|
+
Yr(l.width), ra(l.height);
|
|
1266
|
+
}
|
|
1267
|
+
}, aa = function() {
|
|
1268
|
+
Ur(), Me();
|
|
1269
|
+
}, ta = function(l) {
|
|
1270
|
+
wr(!1), _e(), h == null || h(l);
|
|
1271
|
+
}, fr = function() {
|
|
1272
|
+
return new Promise(function(l) {
|
|
1273
|
+
Ur(), vr(function() {
|
|
1274
|
+
return l;
|
|
1275
|
+
});
|
|
1276
|
+
});
|
|
1277
|
+
};
|
|
1278
|
+
J(function() {
|
|
1279
|
+
Xe && (_e(), Xe(), vr(null));
|
|
1280
|
+
}, [Xe]);
|
|
1281
|
+
function Ne(u, l, D, x) {
|
|
1282
|
+
ke[u] = function(L) {
|
|
1283
|
+
var Fr;
|
|
1284
|
+
x == null || x(L), re(l, D);
|
|
1285
|
+
for (var sa = arguments.length, Ca = new Array(sa > 1 ? sa - 1 : 0), Wr = 1; Wr < sa; Wr++)
|
|
1286
|
+
Ca[Wr - 1] = arguments[Wr];
|
|
1287
|
+
(Fr = ee[u]) === null || Fr === void 0 || Fr.call.apply(Fr, [ee, L].concat(Ca));
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
(er || rr) && (ke.onClick = function(u) {
|
|
1291
|
+
var l;
|
|
1292
|
+
w.current && rr ? re(!1) : !w.current && er && (Ge(u), re(!0));
|
|
1293
|
+
for (var D = arguments.length, x = new Array(D > 1 ? D - 1 : 0), L = 1; L < D; L++)
|
|
1294
|
+
x[L - 1] = arguments[L];
|
|
1295
|
+
(l = ee.onClick) === null || l === void 0 || l.call.apply(l, [ee, u].concat(x));
|
|
1296
|
+
});
|
|
1297
|
+
var na = kt(K, rr, se, B, A, f, Kr, re), ae = Ee.has("hover"), xr = ve.has("hover"), ar, xe;
|
|
1298
|
+
ae && (Ne("onMouseEnter", !0, _, function(u) {
|
|
1299
|
+
Ge(u);
|
|
1300
|
+
}), Ne("onPointerEnter", !0, _, function(u) {
|
|
1301
|
+
Ge(u);
|
|
1302
|
+
}), ar = function(l) {
|
|
1303
|
+
(K || Ue) && B !== null && B !== void 0 && B.contains(l.target) && re(!0, _);
|
|
1304
|
+
}, ie && (ke.onMouseMove = function(u) {
|
|
1305
|
+
var l;
|
|
1306
|
+
(l = ee.onMouseMove) === null || l === void 0 || l.call(ee, u);
|
|
1307
|
+
})), xr && (Ne("onMouseLeave", !1, U), Ne("onPointerLeave", !1, U), xe = function() {
|
|
1308
|
+
re(!1, U);
|
|
1309
|
+
}), Ee.has("focus") && Ne("onFocus", !0, k), ve.has("focus") && Ne("onBlur", !1, N), Ee.has("contextMenu") && (ke.onContextMenu = function(u) {
|
|
1310
|
+
var l;
|
|
1311
|
+
w.current && ve.has("contextMenu") ? re(!1) : (Ge(u), re(!0)), u.preventDefault();
|
|
1312
|
+
for (var D = arguments.length, x = new Array(D > 1 ? D - 1 : 0), L = 1; L < D; L++)
|
|
1313
|
+
x[L - 1] = arguments[L];
|
|
1314
|
+
(l = ee.onContextMenu) === null || l === void 0 || l.call.apply(l, [ee, u].concat(x));
|
|
1315
|
+
}), X && (ke.className = nr(ee.className, X));
|
|
1316
|
+
var He = $($({}, ee), ke), mr = {}, Hr = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
|
|
1317
|
+
Hr.forEach(function(u) {
|
|
1318
|
+
ue[u] && (mr[u] = function() {
|
|
1319
|
+
for (var l, D = arguments.length, x = new Array(D), L = 0; L < D; L++)
|
|
1320
|
+
x[L] = arguments[L];
|
|
1321
|
+
(l = He[u]) === null || l === void 0 || l.call.apply(l, [He].concat(x)), ue[u].apply(ue, x);
|
|
1322
|
+
});
|
|
1323
|
+
});
|
|
1324
|
+
var oa = /* @__PURE__ */ n.cloneElement(Ke, $($({}, He), mr)), ia = {
|
|
1325
|
+
x: _r,
|
|
1326
|
+
y: Dr
|
|
1327
|
+
}, ua = G ? $({}, G !== !0 ? G : {}) : null;
|
|
1328
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement($a, {
|
|
1329
|
+
disabled: !K,
|
|
1330
|
+
ref: Br,
|
|
1331
|
+
onResize: aa
|
|
1332
|
+
}, /* @__PURE__ */ n.createElement(Qa, {
|
|
1333
|
+
getTriggerDOMNode: ge
|
|
1334
|
+
}, oa)), /* @__PURE__ */ n.createElement(Ta.Provider, {
|
|
1335
|
+
value: $r
|
|
1336
|
+
}, /* @__PURE__ */ n.createElement(Va, {
|
|
1337
|
+
portal: e,
|
|
1338
|
+
ref: zr,
|
|
1339
|
+
prefixCls: i,
|
|
1340
|
+
popup: oe,
|
|
1341
|
+
className: nr(Q, kr),
|
|
1342
|
+
style: Se,
|
|
1343
|
+
target: se,
|
|
1344
|
+
onMouseEnter: ar,
|
|
1345
|
+
onMouseLeave: xe,
|
|
1346
|
+
onPointerEnter: ar,
|
|
1347
|
+
zIndex: F,
|
|
1348
|
+
open: K,
|
|
1349
|
+
keepDom: Ue,
|
|
1350
|
+
fresh: We,
|
|
1351
|
+
onClick: W,
|
|
1352
|
+
onPointerDownCapture: na,
|
|
1353
|
+
mask: A,
|
|
1354
|
+
motion: Nr,
|
|
1355
|
+
maskMotion: Vr,
|
|
1356
|
+
onVisibleChanged: ta,
|
|
1357
|
+
onPrepare: fr,
|
|
1358
|
+
forceRender: de,
|
|
1359
|
+
autoDestroy: V,
|
|
1360
|
+
getPopupContainer: te,
|
|
1361
|
+
align: pe,
|
|
1362
|
+
arrow: ua,
|
|
1363
|
+
arrowPos: ia,
|
|
1364
|
+
ready: br,
|
|
1365
|
+
offsetX: Gr,
|
|
1366
|
+
offsetY: qe,
|
|
1367
|
+
offsetR: Tr,
|
|
1368
|
+
offsetB: qr,
|
|
1369
|
+
onAlign: Me,
|
|
1370
|
+
stretch: z,
|
|
1371
|
+
targetWidth: Xr / Ze,
|
|
1372
|
+
targetHeight: ea / Ir
|
|
1373
|
+
})));
|
|
1374
|
+
});
|
|
1375
|
+
return process.env.NODE_ENV !== "production" && (a.displayName = "Trigger"), a;
|
|
1376
|
+
}
|
|
1377
|
+
const Gt = Ut(ya);
|
|
1378
|
+
export {
|
|
1379
|
+
ut as C,
|
|
1380
|
+
Bt as K,
|
|
1381
|
+
Gt as T,
|
|
1382
|
+
c as a,
|
|
1383
|
+
Qt as b,
|
|
1384
|
+
Pt as c,
|
|
1385
|
+
Vt as g,
|
|
1386
|
+
jt as i,
|
|
1387
|
+
Kt as u,
|
|
1388
|
+
ot as z
|
|
1389
|
+
};
|