@gobolt/genesis 0.0.7 → 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 +18 -2
- package/dist/{AntdIcon-Bsnbyy6g.js → AntdIcon-BoLh1dP8.js} +37 -35
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-DXCxlIQL.js} +2 -2
- package/dist/CloseOutlined-ClXDNn82.js +13 -0
- package/dist/{Compact-CJBo3f0u.js → Compact-CGY560JF.js} +45 -53
- package/dist/{ContextIsolator-CGkdKtc3.js → ContextIsolator-D5x2Ih51.js} +2 -2
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-C0Kj5KQV.js} +2 -2
- package/dist/{CheckOutlined-DAynWe12.js → KeyCode-DM2sFh3-.js} +10 -20
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/Overflow-PBZD-PFm.js +360 -0
- package/dist/PurePanel-BqPLRtc2.js +203 -0
- package/dist/SearchOutlined-BP3Z2K6j.js +13 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-DKwCct3i.js} +26 -16
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-BNV2qdrP.js → button-CDQgO1OK.js} +200 -197
- package/dist/collapse-Dtpt-6W_.js +20 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +103 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +18 -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 +4 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +34 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +11 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +22 -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 +23 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +4 -0
- package/dist/components/Breadcrumb/styles.d.ts +27 -0
- package/dist/components/Breadcrumb/styles.js +2436 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/Button.js +22 -0
- package/dist/components/Button/__tests__/Button.test.js +16 -0
- package/dist/components/Button/styles.d.ts +16 -0
- package/dist/components/{atoms/button → Button}/styles.js +12 -12
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +40 -0
- package/dist/components/{atoms/checkbox → Checkbox}/__tests__/Checkbox.test.js +1 -1
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +5 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +97 -96
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +8 -0
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +40 -0
- package/dist/components/ErrorBoundaryFallback/index.d.ts +2 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +22 -21
- package/dist/components/Form/Form.d.ts +26 -0
- package/dist/components/Form/Form.js +8 -0
- package/dist/components/Form/__stories__/FormStory.js +93 -0
- 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 +4 -0
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +19 -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 +24 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -0
- package/dist/components/Input/styles.js +529 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +78 -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 +42 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +4 -0
- package/dist/components/Message/styles.d.ts +8 -0
- package/dist/components/Message/styles.js +41 -0
- package/dist/components/Notification/Notification.d.ts +17 -0
- package/dist/components/Notification/Notification.js +1370 -0
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -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 +15 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +4 -0
- package/dist/components/Notification/styles.d.ts +16 -0
- package/dist/components/Notification/styles.js +65 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +28 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +33 -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 +30 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +4 -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/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/Select.js +36 -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/{atoms/select → Select}/__tests__/Select.test.js +1165 -1140
- package/dist/components/Select/styles.d.ts +32 -0
- package/dist/components/{atoms/select → Select}/styles.js +1517 -1651
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +19 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +16 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +18 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +4 -0
- package/dist/components/Toast/styles.d.ts +10 -0
- package/dist/components/Toast/styles.js +54 -0
- package/dist/components/Typography/Typography.d.ts +15 -0
- package/dist/components/Typography/Typography.js +8 -0
- package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +23 -0
- package/dist/components/Typography/index.js +4 -0
- package/dist/components/Typography/styles.d.ts +21 -0
- package/dist/components/Typography/styles.js +48 -0
- package/dist/components/index.d.ts +26 -14
- package/dist/components/index.js +23 -13
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-BMW3aJEf.js} +162 -161
- package/dist/genesis/GenesisThemeBreakdown.js +54 -24
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +3 -4
- package/dist/genesis/styles.js +1095 -2186
- package/dist/{index-C7kFNqp2.js → index-1CBpubM3.js} +36 -36
- package/dist/{index-3MWkSVA1.js → index-BZAhCB_K.js} +6 -5
- package/dist/{index-D1v_7IIx.js → index-C0SmxWLS.js} +95 -94
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/{index-VDH3iLaC.js → index-CfDY25LP.js} +298 -309
- package/dist/{index-SAAXFt-P.js → index-DPW8XdWj.js} +255 -249
- package/dist/{index-BQO27mgE.js → index-bKlRxQp4.js} +52 -51
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-A-IfeFoT.js} +34 -33
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-D2FWSwU3.js} +1 -1
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-B0YTfcV1.js} +16 -26
- package/dist/providers/GenesisProvider.js +9 -5
- package/dist/providers/ThemeProvider.d.ts +2 -2
- package/dist/providers/ThemeProvider.js +4 -1
- package/dist/providers/ToastProvider.d.ts +13 -0
- package/dist/providers/ToastProvider.js +20 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +4 -4
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/{setup-CMYVZCPF.js → setup-BvfREoHl.js} +6948 -6940
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +22 -16
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +21 -15
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +17 -17
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +13 -29
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +461 -277
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/{Form-Cylpi4M4.js → styles-CT_fyXBd.js} +417 -424
- package/dist/test/setup.js +2 -1
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/{useVariants-CEpw6Ww6.js → useVariants-DvhXfgJY.js} +9 -8
- package/dist/warning-C63HNL9U.js +789 -0
- package/package.json +10 -4
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/components/atoms/button/Button.d.ts +0 -12
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/styles.d.ts +0 -12
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- 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/styles.js +0 -415
- package/dist/components/atoms/select/Select.d.ts +0 -11
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/styles.d.ts +0 -15
- package/dist/components/atoms/typography/Typography.d.ts +0 -11
- 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.d.ts +0 -10
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.d.ts +0 -1
- package/dist/components/molecules/form/Form.d.ts +0 -15
- 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-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -35
- /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}/__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}/index.js +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/{atoms/checkbox → Checkbox}/index.js +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.js +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.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/input → Input}/index.js +0 -0
- /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/select → Select}/index.js +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
|
@@ -1,205 +1,25 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { d as jn } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { u as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
"100%": {
|
|
25
|
-
transform: "translate3d(0, 0, 0)",
|
|
26
|
-
transformOrigin: "0 0",
|
|
27
|
-
opacity: 1
|
|
28
|
-
}
|
|
29
|
-
}), eo = new hn("antMoveDownOut", {
|
|
30
|
-
"0%": {
|
|
31
|
-
transform: "translate3d(0, 0, 0)",
|
|
32
|
-
transformOrigin: "0 0",
|
|
33
|
-
opacity: 1
|
|
34
|
-
},
|
|
35
|
-
"100%": {
|
|
36
|
-
transform: "translate3d(0, 100%, 0)",
|
|
37
|
-
transformOrigin: "0 0",
|
|
38
|
-
opacity: 0
|
|
39
|
-
}
|
|
40
|
-
}), no = new hn("antMoveLeftIn", {
|
|
41
|
-
"0%": {
|
|
42
|
-
transform: "translate3d(-100%, 0, 0)",
|
|
43
|
-
transformOrigin: "0 0",
|
|
44
|
-
opacity: 0
|
|
45
|
-
},
|
|
46
|
-
"100%": {
|
|
47
|
-
transform: "translate3d(0, 0, 0)",
|
|
48
|
-
transformOrigin: "0 0",
|
|
49
|
-
opacity: 1
|
|
50
|
-
}
|
|
51
|
-
}), to = new hn("antMoveLeftOut", {
|
|
52
|
-
"0%": {
|
|
53
|
-
transform: "translate3d(0, 0, 0)",
|
|
54
|
-
transformOrigin: "0 0",
|
|
55
|
-
opacity: 1
|
|
56
|
-
},
|
|
57
|
-
"100%": {
|
|
58
|
-
transform: "translate3d(-100%, 0, 0)",
|
|
59
|
-
transformOrigin: "0 0",
|
|
60
|
-
opacity: 0
|
|
61
|
-
}
|
|
62
|
-
}), ro = new hn("antMoveRightIn", {
|
|
63
|
-
"0%": {
|
|
64
|
-
transform: "translate3d(100%, 0, 0)",
|
|
65
|
-
transformOrigin: "0 0",
|
|
66
|
-
opacity: 0
|
|
67
|
-
},
|
|
68
|
-
"100%": {
|
|
69
|
-
transform: "translate3d(0, 0, 0)",
|
|
70
|
-
transformOrigin: "0 0",
|
|
71
|
-
opacity: 1
|
|
72
|
-
}
|
|
73
|
-
}), oo = new hn("antMoveRightOut", {
|
|
74
|
-
"0%": {
|
|
75
|
-
transform: "translate3d(0, 0, 0)",
|
|
76
|
-
transformOrigin: "0 0",
|
|
77
|
-
opacity: 1
|
|
78
|
-
},
|
|
79
|
-
"100%": {
|
|
80
|
-
transform: "translate3d(100%, 0, 0)",
|
|
81
|
-
transformOrigin: "0 0",
|
|
82
|
-
opacity: 0
|
|
83
|
-
}
|
|
84
|
-
}), ao = new hn("antMoveUpIn", {
|
|
85
|
-
"0%": {
|
|
86
|
-
transform: "translate3d(0, -100%, 0)",
|
|
87
|
-
transformOrigin: "0 0",
|
|
88
|
-
opacity: 0
|
|
89
|
-
},
|
|
90
|
-
"100%": {
|
|
91
|
-
transform: "translate3d(0, 0, 0)",
|
|
92
|
-
transformOrigin: "0 0",
|
|
93
|
-
opacity: 1
|
|
94
|
-
}
|
|
95
|
-
}), io = new hn("antMoveUpOut", {
|
|
96
|
-
"0%": {
|
|
97
|
-
transform: "translate3d(0, 0, 0)",
|
|
98
|
-
transformOrigin: "0 0",
|
|
99
|
-
opacity: 1
|
|
100
|
-
},
|
|
101
|
-
"100%": {
|
|
102
|
-
transform: "translate3d(0, -100%, 0)",
|
|
103
|
-
transformOrigin: "0 0",
|
|
104
|
-
opacity: 0
|
|
105
|
-
}
|
|
106
|
-
}), lo = {
|
|
107
|
-
"move-up": {
|
|
108
|
-
inKeyframes: ao,
|
|
109
|
-
outKeyframes: io
|
|
110
|
-
},
|
|
111
|
-
"move-down": {
|
|
112
|
-
inKeyframes: kr,
|
|
113
|
-
outKeyframes: eo
|
|
114
|
-
},
|
|
115
|
-
"move-left": {
|
|
116
|
-
inKeyframes: no,
|
|
117
|
-
outKeyframes: to
|
|
118
|
-
},
|
|
119
|
-
"move-right": {
|
|
120
|
-
inKeyframes: ro,
|
|
121
|
-
outKeyframes: oo
|
|
122
|
-
}
|
|
123
|
-
}, Et = (e, n) => {
|
|
124
|
-
const {
|
|
125
|
-
antCls: t
|
|
126
|
-
} = e, r = `${t}-${n}`, {
|
|
127
|
-
inKeyframes: a,
|
|
128
|
-
outKeyframes: i
|
|
129
|
-
} = lo[n];
|
|
130
|
-
return [Mr(r, a, i, e.motionDurationMid), {
|
|
131
|
-
[`
|
|
132
|
-
${r}-enter,
|
|
133
|
-
${r}-appear
|
|
134
|
-
`]: {
|
|
135
|
-
opacity: 0,
|
|
136
|
-
animationTimingFunction: e.motionEaseOutCirc
|
|
137
|
-
},
|
|
138
|
-
[`${r}-leave`]: {
|
|
139
|
-
animationTimingFunction: e.motionEaseInOutCirc
|
|
140
|
-
}
|
|
141
|
-
}];
|
|
142
|
-
};
|
|
143
|
-
function uo(e) {
|
|
144
|
-
return (n) => /* @__PURE__ */ o.createElement(br, {
|
|
145
|
-
theme: {
|
|
146
|
-
token: {
|
|
147
|
-
motion: !1,
|
|
148
|
-
zIndexPopupBase: 0
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}, /* @__PURE__ */ o.createElement(e, Object.assign({}, n)));
|
|
152
|
-
}
|
|
153
|
-
const co = (e, n, t, r, a) => uo((l) => {
|
|
154
|
-
const {
|
|
155
|
-
prefixCls: u,
|
|
156
|
-
style: d
|
|
157
|
-
} = l, f = o.useRef(null), [v, s] = o.useState(0), [h, c] = o.useState(0), [g, m] = Bn(!1, {
|
|
158
|
-
value: l.open
|
|
159
|
-
}), {
|
|
160
|
-
getPrefixCls: S
|
|
161
|
-
} = o.useContext(jn), w = S("select", u);
|
|
162
|
-
o.useEffect(() => {
|
|
163
|
-
if (m(!0), typeof ResizeObserver < "u") {
|
|
164
|
-
const y = new ResizeObserver((p) => {
|
|
165
|
-
const C = p[0].target;
|
|
166
|
-
s(C.offsetHeight + 8), c(C.offsetWidth);
|
|
167
|
-
}), N = setInterval(() => {
|
|
168
|
-
var p;
|
|
169
|
-
const C = `.${w}-dropdown`, _ = (p = f.current) === null || p === void 0 ? void 0 : p.querySelector(C);
|
|
170
|
-
_ && (clearInterval(N), y.observe(_));
|
|
171
|
-
}, 10);
|
|
172
|
-
return () => {
|
|
173
|
-
clearInterval(N), y.disconnect();
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}, []);
|
|
177
|
-
let b = Object.assign(Object.assign({}, l), {
|
|
178
|
-
style: Object.assign(Object.assign({}, d), {
|
|
179
|
-
margin: 0
|
|
180
|
-
}),
|
|
181
|
-
open: g,
|
|
182
|
-
visible: g,
|
|
183
|
-
getPopupContainer: () => f.current
|
|
184
|
-
});
|
|
185
|
-
Object.assign(b, {
|
|
186
|
-
[n]: {
|
|
187
|
-
overflow: {
|
|
188
|
-
adjustX: !1,
|
|
189
|
-
adjustY: !1
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
const x = {
|
|
194
|
-
paddingBottom: v,
|
|
195
|
-
position: "relative",
|
|
196
|
-
minWidth: h
|
|
197
|
-
};
|
|
198
|
-
return /* @__PURE__ */ o.createElement("div", {
|
|
199
|
-
ref: f,
|
|
200
|
-
style: x
|
|
201
|
-
}, /* @__PURE__ */ o.createElement(e, Object.assign({}, b)));
|
|
202
|
-
});
|
|
3
|
+
import On, { useState as Ln, useRef as he, useEffect as Qn, useMemo as gr, useContext as pr } from "react";
|
|
4
|
+
import { c as Be, d as pn, f as te, j as hr, _ as ee, h as ae, a as on, e as Cn, w as Ue, k as br, n as wt, F as Vn } from "../../warning-C63HNL9U.js";
|
|
5
|
+
import { t as Sr, a5 as wr, x as qe, j as yr, n as Mn, w as un, f as Cr, e as Ir, k as Er, b as yt, r as Ct, Z as xr, E as ot, g as Ft, m as Dn, C as at, v as it, o as lt, Y as Zn, q as He, H as At, D as $r } from "../../index-oK7z6jnz.js";
|
|
6
|
+
import { u as Jn, o as jt, t as kn } from "../../isVisible-A-IfeFoT.js";
|
|
7
|
+
import { T as Rr, b as Or, u as Mr, g as Dr } from "../../index-CfDY25LP.js";
|
|
8
|
+
import { K as W } from "../../KeyCode-DM2sFh3-.js";
|
|
9
|
+
import { p as Fn } from "../../pickAttrs-B0YTfcV1.js";
|
|
10
|
+
import { F as Nr, s as Pr, a as _r, b as Tr, c as Lr, i as It } from "../../Overflow-PBZD-PFm.js";
|
|
11
|
+
import { R as Wt } from "../../index-bKlRxQp4.js";
|
|
12
|
+
import { i as Et, R as Hr, g as zr } from "../../PurePanel-BqPLRtc2.js";
|
|
13
|
+
import { u as Br, a as Vr, g as Fr } from "../../useVariants-DvhXfgJY.js";
|
|
14
|
+
import { u as ut } from "../../useLocale-DT-z_vQ6.js";
|
|
15
|
+
import { u as Ar, F as jr } from "../../context-BMW3aJEf.js";
|
|
16
|
+
import { b as Wr, a as Kr } from "../../Compact-CGY560JF.js";
|
|
17
|
+
import { g as Xr } from "../../compact-item-DH13cl8A.js";
|
|
18
|
+
import { R as Ur } from "../../CheckOutlined-CeTKr6II.js";
|
|
19
|
+
import { R as Gr } from "../../CloseCircleFilled-DXCxlIQL.js";
|
|
20
|
+
import { R as Yr } from "../../CloseOutlined-ClXDNn82.js";
|
|
21
|
+
import { R as qr } from "../../LoadingOutlined-8EnJdZ7I.js";
|
|
22
|
+
import { R as Qr } from "../../SearchOutlined-BP3Z2K6j.js";
|
|
203
23
|
var Wn = function(n) {
|
|
204
24
|
var t = n.className, r = n.customizeIcon, a = n.customizeIconProps, i = n.children, l = n.onMouseDown, u = n.onClick, d = typeof r == "function" ? r(a) : r;
|
|
205
25
|
return /* @__PURE__ */ o.createElement("span", {
|
|
@@ -215,33 +35,33 @@ var Wn = function(n) {
|
|
|
215
35
|
onClick: u,
|
|
216
36
|
"aria-hidden": !0
|
|
217
37
|
}, d !== void 0 ? d : /* @__PURE__ */ o.createElement("span", {
|
|
218
|
-
className:
|
|
38
|
+
className: Be(t.split(/\s+/).map(function(f) {
|
|
219
39
|
return "".concat(f, "-icon");
|
|
220
40
|
}))
|
|
221
41
|
}, i));
|
|
222
|
-
},
|
|
223
|
-
var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f =
|
|
42
|
+
}, Zr = function(n, t, r, a, i) {
|
|
43
|
+
var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f = On.useMemo(function() {
|
|
224
44
|
if (pn(a) === "object")
|
|
225
45
|
return a.clearIcon;
|
|
226
46
|
if (i)
|
|
227
47
|
return i;
|
|
228
|
-
}, [a, i]), v =
|
|
48
|
+
}, [a, i]), v = On.useMemo(function() {
|
|
229
49
|
return !!(!l && a && (r.length || u) && !(d === "combobox" && u === ""));
|
|
230
50
|
}, [a, l, r.length, u, d]);
|
|
231
51
|
return {
|
|
232
52
|
allowClear: v,
|
|
233
|
-
clearIcon: /* @__PURE__ */
|
|
53
|
+
clearIcon: /* @__PURE__ */ On.createElement(Wn, {
|
|
234
54
|
className: "".concat(n, "-clear"),
|
|
235
55
|
onMouseDown: t,
|
|
236
56
|
customizeIcon: f
|
|
237
57
|
}, "×")
|
|
238
58
|
};
|
|
239
|
-
},
|
|
240
|
-
function
|
|
241
|
-
return o.useContext(
|
|
59
|
+
}, Kt = /* @__PURE__ */ o.createContext(null);
|
|
60
|
+
function Jr() {
|
|
61
|
+
return o.useContext(Kt);
|
|
242
62
|
}
|
|
243
|
-
function
|
|
244
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t =
|
|
63
|
+
function kr() {
|
|
64
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t = te(n, 2), r = t[0], a = t[1], i = o.useRef(null), l = function() {
|
|
245
65
|
window.clearTimeout(i.current);
|
|
246
66
|
};
|
|
247
67
|
o.useEffect(function() {
|
|
@@ -254,7 +74,7 @@ function mo() {
|
|
|
254
74
|
};
|
|
255
75
|
return [r, u, l];
|
|
256
76
|
}
|
|
257
|
-
function
|
|
77
|
+
function Xt() {
|
|
258
78
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = o.useRef(null), t = o.useRef(null);
|
|
259
79
|
o.useEffect(function() {
|
|
260
80
|
return function() {
|
|
@@ -270,7 +90,7 @@ function Kt() {
|
|
|
270
90
|
return n.current;
|
|
271
91
|
}, r];
|
|
272
92
|
}
|
|
273
|
-
function
|
|
93
|
+
function eo(e, n, t, r) {
|
|
274
94
|
var a = o.useRef(null);
|
|
275
95
|
a.current = {
|
|
276
96
|
open: n,
|
|
@@ -293,177 +113,180 @@ function vo(e, n, t, r) {
|
|
|
293
113
|
};
|
|
294
114
|
}, []);
|
|
295
115
|
}
|
|
296
|
-
function
|
|
116
|
+
function no(e) {
|
|
297
117
|
return (
|
|
298
118
|
// Undefined for Edge bug:
|
|
299
119
|
// https://github.com/ant-design/ant-design/issues/51292
|
|
300
120
|
e && // Other keys
|
|
301
121
|
![
|
|
302
122
|
// System function button
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
123
|
+
W.ESC,
|
|
124
|
+
W.SHIFT,
|
|
125
|
+
W.BACKSPACE,
|
|
126
|
+
W.TAB,
|
|
127
|
+
W.WIN_KEY,
|
|
128
|
+
W.ALT,
|
|
129
|
+
W.META,
|
|
130
|
+
W.WIN_KEY_RIGHT,
|
|
131
|
+
W.CTRL,
|
|
132
|
+
W.SEMICOLON,
|
|
133
|
+
W.EQUALS,
|
|
134
|
+
W.CAPS_LOCK,
|
|
135
|
+
W.CONTEXT_MENU,
|
|
316
136
|
// F1-F12
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
137
|
+
W.F1,
|
|
138
|
+
W.F2,
|
|
139
|
+
W.F3,
|
|
140
|
+
W.F4,
|
|
141
|
+
W.F5,
|
|
142
|
+
W.F6,
|
|
143
|
+
W.F7,
|
|
144
|
+
W.F8,
|
|
145
|
+
W.F9,
|
|
146
|
+
W.F10,
|
|
147
|
+
W.F11,
|
|
148
|
+
W.F12
|
|
329
149
|
].includes(e)
|
|
330
150
|
);
|
|
331
151
|
}
|
|
332
|
-
var
|
|
333
|
-
var r, a = n.prefixCls, i = n.id, l = n.inputElement, u = n.disabled, d = n.tabIndex, f = n.autoFocus, v = n.autoComplete, s = n.editable,
|
|
334
|
-
return
|
|
152
|
+
var to = function(n, t) {
|
|
153
|
+
var r, a = n.prefixCls, i = n.id, l = n.inputElement, u = n.disabled, d = n.tabIndex, f = n.autoFocus, v = n.autoComplete, s = n.editable, b = n.activeDescendantId, c = n.value, g = n.maxLength, m = n.onKeyDown, S = n.onMouseDown, w = n.onChange, h = n.onPaste, I = n.onCompositionStart, y = n.onCompositionEnd, T = n.onBlur, p = n.open, E = n.attrs, z = l || /* @__PURE__ */ o.createElement("input", null), V = z, q = V.ref, _ = V.props, A = _.onKeyDown, U = _.onChange, Q = _.onMouseDown, G = _.onCompositionStart, j = _.onCompositionEnd, ne = _.onBlur, Z = _.style;
|
|
154
|
+
return hr(!("maxLength" in z.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), z = /* @__PURE__ */ o.cloneElement(z, ee(ee(ee({
|
|
335
155
|
type: "search"
|
|
336
|
-
},
|
|
156
|
+
}, _), {}, {
|
|
337
157
|
// Override over origin props
|
|
338
158
|
id: i,
|
|
339
|
-
ref:
|
|
159
|
+
ref: Sr(t, q),
|
|
340
160
|
disabled: u,
|
|
341
161
|
tabIndex: d,
|
|
342
162
|
autoComplete: v || "off",
|
|
343
163
|
autoFocus: f,
|
|
344
|
-
className:
|
|
164
|
+
className: Be("".concat(a, "-selection-search-input"), (r = z) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
|
|
345
165
|
role: "combobox",
|
|
346
|
-
"aria-expanded":
|
|
166
|
+
"aria-expanded": p || !1,
|
|
347
167
|
"aria-haspopup": "listbox",
|
|
348
168
|
"aria-owns": "".concat(i, "_list"),
|
|
349
169
|
"aria-autocomplete": "list",
|
|
350
170
|
"aria-controls": "".concat(i, "_list"),
|
|
351
|
-
"aria-activedescendant":
|
|
352
|
-
},
|
|
171
|
+
"aria-activedescendant": p ? b : void 0
|
|
172
|
+
}, E), {}, {
|
|
353
173
|
value: s ? c : "",
|
|
354
174
|
maxLength: g,
|
|
355
175
|
readOnly: !s,
|
|
356
176
|
unselectable: s ? null : "on",
|
|
357
|
-
style: ee(ee({},
|
|
177
|
+
style: ee(ee({}, Z), {}, {
|
|
358
178
|
opacity: s ? null : 0
|
|
359
179
|
}),
|
|
360
|
-
onKeyDown: function(
|
|
361
|
-
m(
|
|
180
|
+
onKeyDown: function(x) {
|
|
181
|
+
m(x), A && A(x);
|
|
362
182
|
},
|
|
363
|
-
onMouseDown: function(
|
|
364
|
-
S(
|
|
183
|
+
onMouseDown: function(x) {
|
|
184
|
+
S(x), Q && Q(x);
|
|
365
185
|
},
|
|
366
|
-
onChange: function(
|
|
367
|
-
w(
|
|
186
|
+
onChange: function(x) {
|
|
187
|
+
w(x), U && U(x);
|
|
368
188
|
},
|
|
369
|
-
onCompositionStart: function(
|
|
370
|
-
x
|
|
189
|
+
onCompositionStart: function(x) {
|
|
190
|
+
I(x), G && G(x);
|
|
371
191
|
},
|
|
372
|
-
onCompositionEnd: function(
|
|
373
|
-
y(
|
|
192
|
+
onCompositionEnd: function(x) {
|
|
193
|
+
y(x), j && j(x);
|
|
374
194
|
},
|
|
375
|
-
onPaste:
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
195
|
+
onPaste: h,
|
|
196
|
+
onBlur: function(x) {
|
|
197
|
+
T(x), ne && ne(x);
|
|
198
|
+
}
|
|
199
|
+
})), z;
|
|
200
|
+
}, ct = /* @__PURE__ */ o.forwardRef(to);
|
|
201
|
+
process.env.NODE_ENV !== "production" && (ct.displayName = "Input");
|
|
202
|
+
function st(e) {
|
|
380
203
|
return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
|
|
381
204
|
}
|
|
382
|
-
var
|
|
383
|
-
function
|
|
205
|
+
var ro = typeof window < "u" && window.document && window.document.documentElement, oo = process.env.NODE_ENV !== "test" && ro;
|
|
206
|
+
function ao(e) {
|
|
384
207
|
return e != null;
|
|
385
208
|
}
|
|
386
|
-
function
|
|
209
|
+
function io(e) {
|
|
387
210
|
return !e && e !== 0;
|
|
388
211
|
}
|
|
389
|
-
function
|
|
212
|
+
function xt(e) {
|
|
390
213
|
return ["string", "number"].includes(pn(e));
|
|
391
214
|
}
|
|
392
|
-
function
|
|
215
|
+
function Ut(e) {
|
|
393
216
|
var n = void 0;
|
|
394
|
-
return e && (
|
|
217
|
+
return e && (xt(e.title) ? n = e.title.toString() : xt(e.label) && (n = e.label.toString())), n;
|
|
395
218
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
219
|
+
function lo(e, n) {
|
|
220
|
+
oo ? o.useLayoutEffect(e, n) : o.useEffect(e, n);
|
|
398
221
|
}
|
|
399
|
-
function
|
|
222
|
+
function uo(e) {
|
|
400
223
|
var n;
|
|
401
224
|
return (n = e.key) !== null && n !== void 0 ? n : e.value;
|
|
402
225
|
}
|
|
403
|
-
var
|
|
226
|
+
var $t = function(n) {
|
|
404
227
|
n.preventDefault(), n.stopPropagation();
|
|
405
|
-
},
|
|
406
|
-
var t = n.id, r = n.prefixCls, a = n.values, i = n.open, l = n.searchValue, u = n.autoClearSearchValue, d = n.inputRef, f = n.placeholder, v = n.disabled, s = n.mode,
|
|
407
|
-
return "+ ".concat(
|
|
408
|
-
} : y, p = n.tagRender,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}, [
|
|
412
|
-
var
|
|
228
|
+
}, co = function(n) {
|
|
229
|
+
var t = n.id, r = n.prefixCls, a = n.values, i = n.open, l = n.searchValue, u = n.autoClearSearchValue, d = n.inputRef, f = n.placeholder, v = n.disabled, s = n.mode, b = n.showSearch, c = n.autoFocus, g = n.autoComplete, m = n.activeDescendantId, S = n.tabIndex, w = n.removeIcon, h = n.maxTagCount, I = n.maxTagTextLength, y = n.maxTagPlaceholder, T = y === void 0 ? function(K) {
|
|
230
|
+
return "+ ".concat(K.length, " ...");
|
|
231
|
+
} : y, p = n.tagRender, E = n.onToggleOpen, z = n.onRemove, V = n.onInputChange, q = n.onInputPaste, _ = n.onInputKeyDown, A = n.onInputMouseDown, U = n.onInputCompositionStart, Q = n.onInputCompositionEnd, G = n.onInputBlur, j = o.useRef(null), ne = Ln(0), Z = te(ne, 2), Y = Z[0], x = Z[1], M = Ln(!1), fe = te(M, 2), ie = fe[0], J = fe[1], se = "".concat(r, "-selection"), ye = i || s === "multiple" && u === !1 || s === "tags" ? l : "", ge = s === "tags" || s === "multiple" && u === !1 || b && (i || ie);
|
|
232
|
+
lo(function() {
|
|
233
|
+
x(j.current.scrollWidth);
|
|
234
|
+
}, [ye]);
|
|
235
|
+
var Re = function($, F, le, me, re) {
|
|
413
236
|
return /* @__PURE__ */ o.createElement("span", {
|
|
414
|
-
title:
|
|
415
|
-
className:
|
|
237
|
+
title: Ut($),
|
|
238
|
+
className: Be("".concat(se, "-item"), ae({}, "".concat(se, "-item-disabled"), le))
|
|
416
239
|
}, /* @__PURE__ */ o.createElement("span", {
|
|
417
|
-
className: "".concat(
|
|
418
|
-
},
|
|
419
|
-
className: "".concat(
|
|
420
|
-
onMouseDown:
|
|
421
|
-
onClick:
|
|
240
|
+
className: "".concat(se, "-item-content")
|
|
241
|
+
}, F), me && /* @__PURE__ */ o.createElement(Wn, {
|
|
242
|
+
className: "".concat(se, "-item-remove"),
|
|
243
|
+
onMouseDown: $t,
|
|
244
|
+
onClick: re,
|
|
422
245
|
customizeIcon: w
|
|
423
246
|
}, "×"));
|
|
424
|
-
},
|
|
425
|
-
var
|
|
426
|
-
|
|
247
|
+
}, ce = function($, F, le, me, re, we) {
|
|
248
|
+
var ze = function(Ne) {
|
|
249
|
+
$t(Ne), E(!i);
|
|
427
250
|
};
|
|
428
251
|
return /* @__PURE__ */ o.createElement("span", {
|
|
429
|
-
onMouseDown:
|
|
252
|
+
onMouseDown: ze
|
|
430
253
|
}, p({
|
|
431
|
-
label:
|
|
432
|
-
value:
|
|
433
|
-
disabled:
|
|
434
|
-
closable:
|
|
435
|
-
onClose:
|
|
436
|
-
isMaxTag: !!
|
|
254
|
+
label: F,
|
|
255
|
+
value: $,
|
|
256
|
+
disabled: le,
|
|
257
|
+
closable: me,
|
|
258
|
+
onClose: re,
|
|
259
|
+
isMaxTag: !!we
|
|
437
260
|
}));
|
|
438
|
-
},
|
|
439
|
-
var
|
|
440
|
-
if (typeof
|
|
441
|
-
var
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
var
|
|
445
|
-
|
|
261
|
+
}, pe = function($) {
|
|
262
|
+
var F = $.disabled, le = $.label, me = $.value, re = !v && !F, we = le;
|
|
263
|
+
if (typeof I == "number" && (typeof le == "string" || typeof le == "number")) {
|
|
264
|
+
var ze = String(we);
|
|
265
|
+
ze.length > I && (we = "".concat(ze.slice(0, I), "..."));
|
|
266
|
+
}
|
|
267
|
+
var xe = function(de) {
|
|
268
|
+
de && de.stopPropagation(), z($);
|
|
446
269
|
};
|
|
447
|
-
return typeof p == "function" ?
|
|
448
|
-
},
|
|
270
|
+
return typeof p == "function" ? ce(me, we, F, re, xe) : Re($, we, F, re, xe);
|
|
271
|
+
}, R = function($) {
|
|
449
272
|
if (!a.length)
|
|
450
273
|
return null;
|
|
451
|
-
var
|
|
452
|
-
return typeof p == "function" ?
|
|
453
|
-
title:
|
|
454
|
-
},
|
|
455
|
-
},
|
|
456
|
-
className: "".concat(
|
|
274
|
+
var F = typeof T == "function" ? T($) : T;
|
|
275
|
+
return typeof p == "function" ? ce(void 0, F, !1, !1, void 0, !0) : Re({
|
|
276
|
+
title: F
|
|
277
|
+
}, F, !1);
|
|
278
|
+
}, C = /* @__PURE__ */ o.createElement("div", {
|
|
279
|
+
className: "".concat(se, "-search"),
|
|
457
280
|
style: {
|
|
458
|
-
width:
|
|
281
|
+
width: Y
|
|
459
282
|
},
|
|
460
283
|
onFocus: function() {
|
|
461
|
-
|
|
284
|
+
J(!0);
|
|
462
285
|
},
|
|
463
286
|
onBlur: function() {
|
|
464
|
-
|
|
287
|
+
J(!1);
|
|
465
288
|
}
|
|
466
|
-
}, /* @__PURE__ */ o.createElement(
|
|
289
|
+
}, /* @__PURE__ */ o.createElement(ct, {
|
|
467
290
|
ref: d,
|
|
468
291
|
open: i,
|
|
469
292
|
prefixCls: r,
|
|
@@ -472,53 +295,54 @@ var xt = function(n) {
|
|
|
472
295
|
disabled: v,
|
|
473
296
|
autoFocus: c,
|
|
474
297
|
autoComplete: g,
|
|
475
|
-
editable:
|
|
298
|
+
editable: ge,
|
|
476
299
|
activeDescendantId: m,
|
|
477
|
-
value:
|
|
478
|
-
onKeyDown:
|
|
479
|
-
onMouseDown:
|
|
480
|
-
onChange:
|
|
481
|
-
onPaste:
|
|
482
|
-
onCompositionStart:
|
|
483
|
-
onCompositionEnd:
|
|
300
|
+
value: ye,
|
|
301
|
+
onKeyDown: _,
|
|
302
|
+
onMouseDown: A,
|
|
303
|
+
onChange: V,
|
|
304
|
+
onPaste: q,
|
|
305
|
+
onCompositionStart: U,
|
|
306
|
+
onCompositionEnd: Q,
|
|
307
|
+
onBlur: G,
|
|
484
308
|
tabIndex: S,
|
|
485
309
|
attrs: Fn(n, !0)
|
|
486
310
|
}), /* @__PURE__ */ o.createElement("span", {
|
|
487
|
-
ref:
|
|
488
|
-
className: "".concat(
|
|
311
|
+
ref: j,
|
|
312
|
+
className: "".concat(se, "-search-mirror"),
|
|
489
313
|
"aria-hidden": !0
|
|
490
|
-
},
|
|
491
|
-
prefixCls: "".concat(
|
|
314
|
+
}, ye, " ")), D = /* @__PURE__ */ o.createElement(Nr, {
|
|
315
|
+
prefixCls: "".concat(se, "-overflow"),
|
|
492
316
|
data: a,
|
|
493
|
-
renderItem:
|
|
494
|
-
renderRest:
|
|
495
|
-
suffix:
|
|
496
|
-
itemKey:
|
|
497
|
-
maxCount:
|
|
317
|
+
renderItem: pe,
|
|
318
|
+
renderRest: R,
|
|
319
|
+
suffix: C,
|
|
320
|
+
itemKey: uo,
|
|
321
|
+
maxCount: h
|
|
498
322
|
});
|
|
499
323
|
return /* @__PURE__ */ o.createElement("span", {
|
|
500
|
-
className: "".concat(
|
|
501
|
-
},
|
|
502
|
-
className: "".concat(
|
|
324
|
+
className: "".concat(se, "-wrap")
|
|
325
|
+
}, D, !a.length && !ye && /* @__PURE__ */ o.createElement("span", {
|
|
326
|
+
className: "".concat(se, "-placeholder")
|
|
503
327
|
}, f));
|
|
504
|
-
},
|
|
505
|
-
var t = n.inputElement, r = n.prefixCls, a = n.id, i = n.inputRef, l = n.disabled, u = n.autoFocus, d = n.autoComplete, f = n.activeDescendantId, v = n.mode, s = n.open,
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}, [
|
|
509
|
-
var
|
|
510
|
-
return
|
|
328
|
+
}, so = function(n) {
|
|
329
|
+
var t = n.inputElement, r = n.prefixCls, a = n.id, i = n.inputRef, l = n.disabled, u = n.autoFocus, d = n.autoComplete, f = n.activeDescendantId, v = n.mode, s = n.open, b = n.values, c = n.placeholder, g = n.tabIndex, m = n.showSearch, S = n.searchValue, w = n.activeValue, h = n.maxLength, I = n.onInputKeyDown, y = n.onInputMouseDown, T = n.onInputChange, p = n.onInputPaste, E = n.onInputCompositionStart, z = n.onInputCompositionEnd, V = n.onInputBlur, q = n.title, _ = o.useState(!1), A = te(_, 2), U = A[0], Q = A[1], G = v === "combobox", j = G || m, ne = b[0], Z = S || "";
|
|
330
|
+
G && w && !U && (Z = w), o.useEffect(function() {
|
|
331
|
+
G && Q(!1);
|
|
332
|
+
}, [G, w]);
|
|
333
|
+
var Y = v !== "combobox" && !s && !m ? !1 : !!Z, x = q === void 0 ? Ut(ne) : q, M = o.useMemo(function() {
|
|
334
|
+
return ne ? null : /* @__PURE__ */ o.createElement("span", {
|
|
511
335
|
className: "".concat(r, "-selection-placeholder"),
|
|
512
|
-
style:
|
|
336
|
+
style: Y ? {
|
|
513
337
|
visibility: "hidden"
|
|
514
338
|
} : void 0
|
|
515
339
|
}, c);
|
|
516
|
-
}, [
|
|
340
|
+
}, [ne, Y, c, r]);
|
|
517
341
|
return /* @__PURE__ */ o.createElement("span", {
|
|
518
342
|
className: "".concat(r, "-selection-wrap")
|
|
519
343
|
}, /* @__PURE__ */ o.createElement("span", {
|
|
520
344
|
className: "".concat(r, "-selection-search")
|
|
521
|
-
}, /* @__PURE__ */ o.createElement(
|
|
345
|
+
}, /* @__PURE__ */ o.createElement(ct, {
|
|
522
346
|
ref: i,
|
|
523
347
|
prefixCls: r,
|
|
524
348
|
id: a,
|
|
@@ -527,91 +351,93 @@ var xt = function(n) {
|
|
|
527
351
|
disabled: l,
|
|
528
352
|
autoFocus: u,
|
|
529
353
|
autoComplete: d,
|
|
530
|
-
editable:
|
|
354
|
+
editable: j,
|
|
531
355
|
activeDescendantId: f,
|
|
532
356
|
value: Z,
|
|
533
|
-
onKeyDown:
|
|
357
|
+
onKeyDown: I,
|
|
534
358
|
onMouseDown: y,
|
|
535
|
-
onChange: function(
|
|
536
|
-
|
|
359
|
+
onChange: function(ie) {
|
|
360
|
+
Q(!0), T(ie);
|
|
537
361
|
},
|
|
538
362
|
onPaste: p,
|
|
539
|
-
onCompositionStart:
|
|
540
|
-
onCompositionEnd:
|
|
363
|
+
onCompositionStart: E,
|
|
364
|
+
onCompositionEnd: z,
|
|
365
|
+
onBlur: V,
|
|
541
366
|
tabIndex: g,
|
|
542
367
|
attrs: Fn(n, !0),
|
|
543
|
-
maxLength:
|
|
544
|
-
})), !
|
|
368
|
+
maxLength: G ? h : void 0
|
|
369
|
+
})), !G && ne ? /* @__PURE__ */ o.createElement("span", {
|
|
545
370
|
className: "".concat(r, "-selection-item"),
|
|
546
|
-
title:
|
|
547
|
-
style:
|
|
371
|
+
title: x,
|
|
372
|
+
style: Y ? {
|
|
548
373
|
visibility: "hidden"
|
|
549
374
|
} : void 0
|
|
550
|
-
},
|
|
551
|
-
},
|
|
552
|
-
var r =
|
|
375
|
+
}, ne.label) : null, M);
|
|
376
|
+
}, fo = function(n, t) {
|
|
377
|
+
var r = he(null), a = he(!1), i = n.prefixCls, l = n.open, u = n.mode, d = n.showSearch, f = n.tokenWithEnter, v = n.disabled, s = n.prefix, b = n.autoClearSearchValue, c = n.onSearch, g = n.onSearchSubmit, m = n.onToggleOpen, S = n.onInputKeyDown, w = n.onInputBlur, h = n.domRef;
|
|
553
378
|
o.useImperativeHandle(t, function() {
|
|
554
379
|
return {
|
|
555
|
-
focus: function(
|
|
556
|
-
r.current.focus(
|
|
380
|
+
focus: function(x) {
|
|
381
|
+
r.current.focus(x);
|
|
557
382
|
},
|
|
558
383
|
blur: function() {
|
|
559
384
|
r.current.blur();
|
|
560
385
|
}
|
|
561
386
|
};
|
|
562
387
|
});
|
|
563
|
-
var
|
|
564
|
-
var
|
|
565
|
-
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
c(
|
|
570
|
-
},
|
|
388
|
+
var I = Xt(0), y = te(I, 2), T = y[0], p = y[1], E = function(x) {
|
|
389
|
+
var M = x.which, fe = r.current instanceof HTMLTextAreaElement;
|
|
390
|
+
!fe && l && (M === W.UP || M === W.DOWN) && x.preventDefault(), S && S(x), M === W.ENTER && u === "tags" && !a.current && !l && (g == null || g(x.target.value)), !(fe && !l && ~[W.UP, W.DOWN, W.LEFT, W.RIGHT].indexOf(M)) && no(M) && m(!0);
|
|
391
|
+
}, z = function() {
|
|
392
|
+
p(!0);
|
|
393
|
+
}, V = he(null), q = function(x) {
|
|
394
|
+
c(x, !0, a.current) !== !1 && m(!0);
|
|
395
|
+
}, _ = function() {
|
|
571
396
|
a.current = !0;
|
|
572
|
-
},
|
|
573
|
-
a.current = !1, u !== "combobox" &&
|
|
574
|
-
}, U = function(
|
|
575
|
-
var
|
|
576
|
-
if (f &&
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
},
|
|
582
|
-
var
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
var
|
|
586
|
-
if (
|
|
587
|
-
var
|
|
588
|
-
|
|
397
|
+
}, A = function(x) {
|
|
398
|
+
a.current = !1, u !== "combobox" && q(x.target.value);
|
|
399
|
+
}, U = function(x) {
|
|
400
|
+
var M = x.target.value;
|
|
401
|
+
if (f && V.current && /[\r\n]/.test(V.current)) {
|
|
402
|
+
var fe = V.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
|
|
403
|
+
M = M.replace(fe, V.current);
|
|
404
|
+
}
|
|
405
|
+
V.current = null, q(M);
|
|
406
|
+
}, Q = function(x) {
|
|
407
|
+
var M = x.clipboardData, fe = M == null ? void 0 : M.getData("text");
|
|
408
|
+
V.current = fe || "";
|
|
409
|
+
}, G = function(x) {
|
|
410
|
+
var M = x.target;
|
|
411
|
+
if (M !== r.current) {
|
|
412
|
+
var fe = document.body.style.msTouchAction !== void 0;
|
|
413
|
+
fe ? setTimeout(function() {
|
|
589
414
|
r.current.focus();
|
|
590
415
|
}) : r.current.focus();
|
|
591
416
|
}
|
|
592
|
-
},
|
|
593
|
-
var
|
|
594
|
-
|
|
595
|
-
},
|
|
417
|
+
}, j = function(x) {
|
|
418
|
+
var M = T();
|
|
419
|
+
x.target !== r.current && !M && !(u === "combobox" && v) && x.preventDefault(), (u !== "combobox" && (!d || !M) || !l) && (l && b !== !1 && c("", !0, !1), m());
|
|
420
|
+
}, ne = {
|
|
596
421
|
inputRef: r,
|
|
597
|
-
onInputKeyDown:
|
|
598
|
-
onInputMouseDown:
|
|
422
|
+
onInputKeyDown: E,
|
|
423
|
+
onInputMouseDown: z,
|
|
599
424
|
onInputChange: U,
|
|
600
|
-
onInputPaste:
|
|
601
|
-
onInputCompositionStart:
|
|
602
|
-
onInputCompositionEnd:
|
|
603
|
-
|
|
425
|
+
onInputPaste: Q,
|
|
426
|
+
onInputCompositionStart: _,
|
|
427
|
+
onInputCompositionEnd: A,
|
|
428
|
+
onInputBlur: w
|
|
429
|
+
}, Z = u === "multiple" || u === "tags" ? /* @__PURE__ */ o.createElement(co, on({}, n, ne)) : /* @__PURE__ */ o.createElement(so, on({}, n, ne));
|
|
604
430
|
return /* @__PURE__ */ o.createElement("div", {
|
|
605
|
-
ref:
|
|
431
|
+
ref: h,
|
|
606
432
|
className: "".concat(i, "-selector"),
|
|
607
|
-
onClick:
|
|
608
|
-
onMouseDown:
|
|
433
|
+
onClick: G,
|
|
434
|
+
onMouseDown: j
|
|
609
435
|
}, s && /* @__PURE__ */ o.createElement("div", {
|
|
610
436
|
className: "".concat(i, "-prefix")
|
|
611
437
|
}, s), Z);
|
|
612
|
-
},
|
|
613
|
-
process.env.NODE_ENV !== "production" && (
|
|
614
|
-
var
|
|
438
|
+
}, Gt = /* @__PURE__ */ o.forwardRef(fo);
|
|
439
|
+
process.env.NODE_ENV !== "production" && (Gt.displayName = "Selector");
|
|
440
|
+
var mo = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], vo = function(n) {
|
|
615
441
|
var t = n === !0 ? 0 : 1;
|
|
616
442
|
return {
|
|
617
443
|
bottomLeft: {
|
|
@@ -651,57 +477,57 @@ var Oo = ["prefixCls", "disabled", "visible", "children", "popupElement", "anima
|
|
|
651
477
|
htmlRegion: "scroll"
|
|
652
478
|
}
|
|
653
479
|
};
|
|
654
|
-
},
|
|
480
|
+
}, go = function(n, t) {
|
|
655
481
|
var r = n.prefixCls;
|
|
656
482
|
n.disabled;
|
|
657
|
-
var a = n.visible, i = n.children, l = n.popupElement, u = n.animation, d = n.transitionName, f = n.dropdownStyle, v = n.dropdownClassName, s = n.direction,
|
|
658
|
-
S && (
|
|
659
|
-
var
|
|
660
|
-
return g ||
|
|
661
|
-
}, [g, m]),
|
|
662
|
-
return
|
|
663
|
-
}, [m,
|
|
664
|
-
|
|
483
|
+
var a = n.visible, i = n.children, l = n.popupElement, u = n.animation, d = n.transitionName, f = n.dropdownStyle, v = n.dropdownClassName, s = n.direction, b = s === void 0 ? "ltr" : s, c = n.placement, g = n.builtinPlacements, m = n.dropdownMatchSelectWidth, S = n.dropdownRender, w = n.dropdownAlign, h = n.getPopupContainer, I = n.empty, y = n.getTriggerDOMNode, T = n.onPopupVisibleChange, p = n.onPopupMouseEnter, E = Cn(n, mo), z = "".concat(r, "-dropdown"), V = l;
|
|
484
|
+
S && (V = S(l));
|
|
485
|
+
var q = o.useMemo(function() {
|
|
486
|
+
return g || vo(m);
|
|
487
|
+
}, [g, m]), _ = u ? "".concat(z, "-").concat(u) : d, A = typeof m == "number", U = o.useMemo(function() {
|
|
488
|
+
return A ? null : m === !1 ? "minWidth" : "width";
|
|
489
|
+
}, [m, A]), Q = f;
|
|
490
|
+
A && (Q = ee(ee({}, Q), {}, {
|
|
665
491
|
width: m
|
|
666
492
|
}));
|
|
667
|
-
var
|
|
493
|
+
var G = o.useRef(null);
|
|
668
494
|
return o.useImperativeHandle(t, function() {
|
|
669
495
|
return {
|
|
670
496
|
getPopupElement: function() {
|
|
671
|
-
var
|
|
672
|
-
return (
|
|
497
|
+
var ne;
|
|
498
|
+
return (ne = G.current) === null || ne === void 0 ? void 0 : ne.popupElement;
|
|
673
499
|
}
|
|
674
500
|
};
|
|
675
|
-
}), /* @__PURE__ */ o.createElement(
|
|
676
|
-
showAction:
|
|
677
|
-
hideAction:
|
|
678
|
-
popupPlacement: c || (
|
|
679
|
-
builtinPlacements:
|
|
680
|
-
prefixCls:
|
|
681
|
-
popupTransitionName:
|
|
501
|
+
}), /* @__PURE__ */ o.createElement(Rr, on({}, E, {
|
|
502
|
+
showAction: T ? ["click"] : [],
|
|
503
|
+
hideAction: T ? ["click"] : [],
|
|
504
|
+
popupPlacement: c || (b === "rtl" ? "bottomRight" : "bottomLeft"),
|
|
505
|
+
builtinPlacements: q,
|
|
506
|
+
prefixCls: z,
|
|
507
|
+
popupTransitionName: _,
|
|
682
508
|
popup: /* @__PURE__ */ o.createElement("div", {
|
|
683
509
|
onMouseEnter: p
|
|
684
|
-
},
|
|
685
|
-
ref:
|
|
686
|
-
stretch:
|
|
510
|
+
}, V),
|
|
511
|
+
ref: G,
|
|
512
|
+
stretch: U,
|
|
687
513
|
popupAlign: w,
|
|
688
514
|
popupVisible: a,
|
|
689
|
-
getPopupContainer:
|
|
690
|
-
popupClassName:
|
|
691
|
-
popupStyle:
|
|
515
|
+
getPopupContainer: h,
|
|
516
|
+
popupClassName: Be(v, ae({}, "".concat(z, "-empty"), I)),
|
|
517
|
+
popupStyle: Q,
|
|
692
518
|
getTriggerDOMNode: y,
|
|
693
|
-
onPopupVisibleChange:
|
|
519
|
+
onPopupVisibleChange: T
|
|
694
520
|
}), i);
|
|
695
|
-
},
|
|
696
|
-
process.env.NODE_ENV !== "production" && (
|
|
697
|
-
function
|
|
521
|
+
}, Yt = /* @__PURE__ */ o.forwardRef(go);
|
|
522
|
+
process.env.NODE_ENV !== "production" && (Yt.displayName = "SelectTrigger");
|
|
523
|
+
function Rt(e, n) {
|
|
698
524
|
var t = e.key, r;
|
|
699
525
|
return "value" in e && (r = e.value), t ?? (r !== void 0 ? r : "rc-index-key-".concat(n));
|
|
700
526
|
}
|
|
701
|
-
function
|
|
527
|
+
function et(e) {
|
|
702
528
|
return typeof e < "u" && !Number.isNaN(e);
|
|
703
529
|
}
|
|
704
|
-
function
|
|
530
|
+
function qt(e, n) {
|
|
705
531
|
var t = e || {}, r = t.label, a = t.value, i = t.options, l = t.groupLabel, u = r || (n ? "children" : "label");
|
|
706
532
|
return {
|
|
707
533
|
label: u,
|
|
@@ -710,15 +536,15 @@ function Yt(e, n) {
|
|
|
710
536
|
groupLabel: l || u
|
|
711
537
|
};
|
|
712
538
|
}
|
|
713
|
-
function
|
|
714
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [], i =
|
|
715
|
-
function v(s,
|
|
539
|
+
function po(e) {
|
|
540
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [], i = qt(t, !1), l = i.label, u = i.value, d = i.options, f = i.groupLabel;
|
|
541
|
+
function v(s, b) {
|
|
716
542
|
Array.isArray(s) && s.forEach(function(c) {
|
|
717
|
-
if (
|
|
543
|
+
if (b || !(d in c)) {
|
|
718
544
|
var g = c[u];
|
|
719
545
|
a.push({
|
|
720
|
-
key:
|
|
721
|
-
groupOption:
|
|
546
|
+
key: Rt(c, a.length),
|
|
547
|
+
groupOption: b,
|
|
722
548
|
data: c,
|
|
723
549
|
label: c[l],
|
|
724
550
|
value: g
|
|
@@ -726,7 +552,7 @@ function Mo(e) {
|
|
|
726
552
|
} else {
|
|
727
553
|
var m = c[f];
|
|
728
554
|
m === void 0 && r && (m = c.label), a.push({
|
|
729
|
-
key:
|
|
555
|
+
key: Rt(c, a.length),
|
|
730
556
|
group: !0,
|
|
731
557
|
data: c,
|
|
732
558
|
label: m
|
|
@@ -736,7 +562,7 @@ function Mo(e) {
|
|
|
736
562
|
}
|
|
737
563
|
return v(e, !1), a;
|
|
738
564
|
}
|
|
739
|
-
function
|
|
565
|
+
function nt(e) {
|
|
740
566
|
var n = ee({}, e);
|
|
741
567
|
return "props" in n || Object.defineProperty(n, "props", {
|
|
742
568
|
get: function() {
|
|
@@ -744,21 +570,21 @@ function et(e) {
|
|
|
744
570
|
}
|
|
745
571
|
}), n;
|
|
746
572
|
}
|
|
747
|
-
var
|
|
573
|
+
var ho = function(n, t, r) {
|
|
748
574
|
if (!t || !t.length)
|
|
749
575
|
return null;
|
|
750
576
|
var a = !1, i = function u(d, f) {
|
|
751
|
-
var v =
|
|
577
|
+
var v = wr(f), s = v[0], b = v.slice(1);
|
|
752
578
|
if (!s)
|
|
753
579
|
return [d];
|
|
754
580
|
var c = d.split(s);
|
|
755
581
|
return a = a || c.length > 1, c.reduce(function(g, m) {
|
|
756
|
-
return [].concat(
|
|
582
|
+
return [].concat(qe(g), qe(u(m, b)));
|
|
757
583
|
}, []).filter(Boolean);
|
|
758
584
|
}, l = i(n, t);
|
|
759
585
|
return a ? typeof r < "u" ? l.slice(0, r) : l : null;
|
|
760
|
-
},
|
|
761
|
-
function
|
|
586
|
+
}, dt = /* @__PURE__ */ o.createContext(null);
|
|
587
|
+
function bo(e) {
|
|
762
588
|
var n = e.visible, t = e.values;
|
|
763
589
|
if (!n)
|
|
764
590
|
return null;
|
|
@@ -777,266 +603,269 @@ function No(e) {
|
|
|
777
603
|
return ["number", "string"].includes(pn(i)) ? i : l;
|
|
778
604
|
}).join(", ")), t.length > r ? ", ..." : null);
|
|
779
605
|
}
|
|
780
|
-
var
|
|
606
|
+
var So = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], wo = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], An = function(n) {
|
|
781
607
|
return n === "tags" || n === "multiple";
|
|
782
|
-
},
|
|
783
|
-
var t, r = e.id, a = e.prefixCls, i = e.className, l = e.showSearch, u = e.tagRender, d = e.direction, f = e.omitDomProps, v = e.displayValues, s = e.onDisplayValuesChange,
|
|
784
|
-
|
|
785
|
-
delete
|
|
786
|
-
}), f == null || f.forEach(function(
|
|
787
|
-
delete
|
|
608
|
+
}, Qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
609
|
+
var t, r = e.id, a = e.prefixCls, i = e.className, l = e.showSearch, u = e.tagRender, d = e.direction, f = e.omitDomProps, v = e.displayValues, s = e.onDisplayValuesChange, b = e.emptyOptions, c = e.notFoundContent, g = c === void 0 ? "Not Found" : c, m = e.onClear, S = e.mode, w = e.disabled, h = e.loading, I = e.getInputElement, y = e.getRawInputElement, T = e.open, p = e.defaultOpen, E = e.onDropdownVisibleChange, z = e.activeValue, V = e.onActiveValueChange, q = e.activeDescendantId, _ = e.searchValue, A = e.autoClearSearchValue, U = e.onSearch, Q = e.onSearchSplit, G = e.tokenSeparators, j = e.allowClear, ne = e.prefix, Z = e.suffixIcon, Y = e.clearIcon, x = e.OptionList, M = e.animation, fe = e.transitionName, ie = e.dropdownStyle, J = e.dropdownClassName, se = e.dropdownMatchSelectWidth, ye = e.dropdownRender, ge = e.dropdownAlign, Re = e.placement, ce = e.builtinPlacements, pe = e.getPopupContainer, R = e.showAction, C = R === void 0 ? [] : R, D = e.onFocus, K = e.onBlur, $ = e.onKeyUp, F = e.onKeyDown, le = e.onMouseDown, me = Cn(e, So), re = An(S), we = (l !== void 0 ? l : re) || S === "combobox", ze = ee({}, me);
|
|
610
|
+
wo.forEach(function(ue) {
|
|
611
|
+
delete ze[ue];
|
|
612
|
+
}), f == null || f.forEach(function(ue) {
|
|
613
|
+
delete ze[ue];
|
|
788
614
|
});
|
|
789
|
-
var
|
|
615
|
+
var xe = o.useState(!1), Ne = te(xe, 2), de = Ne[0], Ge = Ne[1];
|
|
790
616
|
o.useEffect(function() {
|
|
791
|
-
|
|
617
|
+
Ge(Or());
|
|
792
618
|
}, []);
|
|
793
|
-
var
|
|
619
|
+
var Ye = o.useRef(null), Se = o.useRef(null), Oe = o.useRef(null), Ce = o.useRef(null), $e = o.useRef(null), Pe = o.useRef(!1), en = kr(), je = te(en, 3), Fe = je[0], Ie = je[1], hn = je[2];
|
|
794
620
|
o.useImperativeHandle(n, function() {
|
|
795
|
-
var
|
|
621
|
+
var ue, X;
|
|
796
622
|
return {
|
|
797
|
-
focus: (
|
|
798
|
-
blur: (
|
|
623
|
+
focus: (ue = Ce.current) === null || ue === void 0 ? void 0 : ue.focus,
|
|
624
|
+
blur: (X = Ce.current) === null || X === void 0 ? void 0 : X.blur,
|
|
799
625
|
scrollTo: function(Xe) {
|
|
800
|
-
var
|
|
801
|
-
return (
|
|
626
|
+
var Le;
|
|
627
|
+
return (Le = $e.current) === null || Le === void 0 ? void 0 : Le.scrollTo(Xe);
|
|
802
628
|
},
|
|
803
|
-
nativeElement:
|
|
629
|
+
nativeElement: Ye.current || Se.current
|
|
804
630
|
};
|
|
805
631
|
});
|
|
806
|
-
var
|
|
807
|
-
var
|
|
632
|
+
var Ae = o.useMemo(function() {
|
|
633
|
+
var ue;
|
|
808
634
|
if (S !== "combobox")
|
|
809
|
-
return
|
|
810
|
-
var
|
|
811
|
-
return typeof
|
|
812
|
-
}, [
|
|
813
|
-
|
|
814
|
-
|
|
635
|
+
return _;
|
|
636
|
+
var X = (ue = v[0]) === null || ue === void 0 ? void 0 : ue.value;
|
|
637
|
+
return typeof X == "string" || typeof X == "number" ? String(X) : "";
|
|
638
|
+
}, [_, S, v]), _e = S === "combobox" && typeof I == "function" && I() || null, De = typeof y == "function" && y(), Nn = yr(Se, De == null || (t = De.props) === null || t === void 0 ? void 0 : t.ref), En = o.useState(!1), dn = te(En, 2), bn = dn[0], xn = dn[1];
|
|
639
|
+
Mn(function() {
|
|
640
|
+
xn(!0);
|
|
815
641
|
}, []);
|
|
816
|
-
var
|
|
642
|
+
var cn = Jn(!1, {
|
|
817
643
|
defaultValue: p,
|
|
818
|
-
value:
|
|
819
|
-
}),
|
|
820
|
-
(w ||
|
|
821
|
-
var
|
|
822
|
-
var
|
|
823
|
-
w || (
|
|
824
|
-
}, [w,
|
|
825
|
-
return (
|
|
644
|
+
value: T
|
|
645
|
+
}), Qe = te(cn, 2), fn = Qe[0], mn = Qe[1], Me = bn ? fn : !1, vn = !g && b;
|
|
646
|
+
(w || vn && Me && S === "combobox") && (Me = !1);
|
|
647
|
+
var an = vn ? !1 : Me, N = o.useCallback(function(ue) {
|
|
648
|
+
var X = ue !== void 0 ? ue : !Me;
|
|
649
|
+
w || (mn(X), Me !== X && (E == null || E(X)));
|
|
650
|
+
}, [w, Me, mn, E]), B = o.useMemo(function() {
|
|
651
|
+
return (G || []).some(function(ue) {
|
|
826
652
|
return [`
|
|
827
653
|
`, `\r
|
|
828
|
-
`].includes(
|
|
654
|
+
`].includes(ue);
|
|
829
655
|
});
|
|
830
|
-
}, [
|
|
831
|
-
if (!(
|
|
832
|
-
var
|
|
833
|
-
|
|
834
|
-
var
|
|
835
|
-
return S !== "combobox" &&
|
|
656
|
+
}, [G]), L = o.useContext(dt) || {}, H = L.maxCount, oe = L.rawValues, be = function(X, Ke, Xe) {
|
|
657
|
+
if (!(re && et(H) && (oe == null ? void 0 : oe.size) >= H)) {
|
|
658
|
+
var Le = !0, Ve = X;
|
|
659
|
+
V == null || V(null);
|
|
660
|
+
var sn = ho(X, G, et(H) ? H - oe.size : void 0), ln = Xe ? null : sn;
|
|
661
|
+
return S !== "combobox" && ln && (Ve = "", Q == null || Q(ln), N(!1), Le = !1), U && Ae !== Ve && U(Ve, {
|
|
836
662
|
source: Ke ? "typing" : "effect"
|
|
837
|
-
}),
|
|
663
|
+
}), Le;
|
|
838
664
|
}
|
|
839
|
-
},
|
|
840
|
-
!
|
|
665
|
+
}, Ze = function(X) {
|
|
666
|
+
!X || !X.trim() || U(X, {
|
|
841
667
|
source: "submit"
|
|
842
668
|
});
|
|
843
669
|
};
|
|
844
670
|
o.useEffect(function() {
|
|
845
|
-
!
|
|
846
|
-
}, [
|
|
847
|
-
|
|
671
|
+
!Me && !re && S !== "combobox" && be("", !1, !1);
|
|
672
|
+
}, [Me]), o.useEffect(function() {
|
|
673
|
+
fn && w && mn(!1), w && !Pe.current && Ie(!1);
|
|
848
674
|
}, [w]);
|
|
849
|
-
var
|
|
850
|
-
var Ke =
|
|
851
|
-
if (
|
|
852
|
-
for (var
|
|
853
|
-
var
|
|
854
|
-
if (!
|
|
855
|
-
|
|
675
|
+
var We = Xt(), nn = te(We, 2), Ee = nn[0], tn = nn[1], Je = o.useRef(!1), Pn = function(X) {
|
|
676
|
+
var Ke = Ee(), Xe = X.key, Le = Xe === "Enter";
|
|
677
|
+
if (Le && (S !== "combobox" && X.preventDefault(), Me || N(!0)), tn(!!Ae), Xe === "Backspace" && !Ke && re && !Ae && v.length) {
|
|
678
|
+
for (var Ve = qe(v), sn = null, ln = Ve.length - 1; ln >= 0; ln -= 1) {
|
|
679
|
+
var wn = Ve[ln];
|
|
680
|
+
if (!wn.disabled) {
|
|
681
|
+
Ve.splice(ln, 1), sn = wn;
|
|
856
682
|
break;
|
|
857
683
|
}
|
|
858
684
|
}
|
|
859
|
-
|
|
685
|
+
sn && s(Ve, {
|
|
860
686
|
type: "remove",
|
|
861
|
-
values: [
|
|
687
|
+
values: [sn]
|
|
862
688
|
});
|
|
863
689
|
}
|
|
864
|
-
for (var
|
|
865
|
-
|
|
866
|
-
if (
|
|
867
|
-
var
|
|
868
|
-
(
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
},
|
|
872
|
-
for (var Ke = arguments.length, Xe = new Array(Ke > 1 ? Ke - 1 : 0),
|
|
873
|
-
Xe[
|
|
874
|
-
if (
|
|
875
|
-
var
|
|
876
|
-
(
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
},
|
|
690
|
+
for (var Rn = arguments.length, yn = new Array(Rn > 1 ? Rn - 1 : 0), zn = 1; zn < Rn; zn++)
|
|
691
|
+
yn[zn - 1] = arguments[zn];
|
|
692
|
+
if (Me && (!Le || !Je.current)) {
|
|
693
|
+
var Bn;
|
|
694
|
+
Le && (Je.current = !0), (Bn = $e.current) === null || Bn === void 0 || Bn.onKeyDown.apply(Bn, [X].concat(yn));
|
|
695
|
+
}
|
|
696
|
+
F == null || F.apply(void 0, [X].concat(yn));
|
|
697
|
+
}, Hn = function(X) {
|
|
698
|
+
for (var Ke = arguments.length, Xe = new Array(Ke > 1 ? Ke - 1 : 0), Le = 1; Le < Ke; Le++)
|
|
699
|
+
Xe[Le - 1] = arguments[Le];
|
|
700
|
+
if (Me) {
|
|
701
|
+
var Ve;
|
|
702
|
+
(Ve = $e.current) === null || Ve === void 0 || Ve.onKeyUp.apply(Ve, [X].concat(Xe));
|
|
703
|
+
}
|
|
704
|
+
X.key === "Enter" && (Je.current = !1), $ == null || $.apply(void 0, [X].concat(Xe));
|
|
705
|
+
}, rn = function(X) {
|
|
880
706
|
var Ke = v.filter(function(Xe) {
|
|
881
|
-
return Xe !==
|
|
707
|
+
return Xe !== X;
|
|
882
708
|
});
|
|
883
709
|
s(Ke, {
|
|
884
710
|
type: "remove",
|
|
885
|
-
values: [
|
|
711
|
+
values: [X]
|
|
886
712
|
});
|
|
887
|
-
},
|
|
888
|
-
|
|
889
|
-
},
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
713
|
+
}, ke = function() {
|
|
714
|
+
Je.current = !1;
|
|
715
|
+
}, P = o.useRef(!1), O = function() {
|
|
716
|
+
Ie(!0), w || (D && !P.current && D.apply(void 0, arguments), C.includes("focus") && N(!0)), P.current = !0;
|
|
717
|
+
}, k = function() {
|
|
718
|
+
Pe.current = !0, Ie(!1, function() {
|
|
719
|
+
P.current = !1, Pe.current = !1, N(!1);
|
|
720
|
+
}), !w && (Ae && (S === "tags" ? U(Ae, {
|
|
893
721
|
source: "submit"
|
|
894
|
-
}) : S === "multiple" &&
|
|
722
|
+
}) : S === "multiple" && U("", {
|
|
895
723
|
source: "blur"
|
|
896
|
-
})),
|
|
897
|
-
},
|
|
724
|
+
})), K && K.apply(void 0, arguments));
|
|
725
|
+
}, ve = [];
|
|
898
726
|
o.useEffect(function() {
|
|
899
727
|
return function() {
|
|
900
|
-
|
|
901
|
-
return clearTimeout(
|
|
902
|
-
}),
|
|
728
|
+
ve.forEach(function(ue) {
|
|
729
|
+
return clearTimeout(ue);
|
|
730
|
+
}), ve.splice(0, ve.length);
|
|
903
731
|
};
|
|
904
732
|
}, []);
|
|
905
|
-
var
|
|
906
|
-
var Ke, Xe =
|
|
907
|
-
if (
|
|
908
|
-
var
|
|
909
|
-
var
|
|
910
|
-
if (
|
|
911
|
-
var
|
|
912
|
-
(
|
|
733
|
+
var Te = function(X) {
|
|
734
|
+
var Ke, Xe = X.target, Le = (Ke = Oe.current) === null || Ke === void 0 ? void 0 : Ke.getPopupElement();
|
|
735
|
+
if (Le && Le.contains(Xe)) {
|
|
736
|
+
var Ve = setTimeout(function() {
|
|
737
|
+
var Rn = ve.indexOf(Ve);
|
|
738
|
+
if (Rn !== -1 && ve.splice(Rn, 1), hn(), !de && !Le.contains(document.activeElement)) {
|
|
739
|
+
var yn;
|
|
740
|
+
(yn = Ce.current) === null || yn === void 0 || yn.focus();
|
|
913
741
|
}
|
|
914
742
|
});
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
for (var
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
},
|
|
921
|
-
function
|
|
922
|
-
|
|
743
|
+
ve.push(Ve);
|
|
744
|
+
}
|
|
745
|
+
for (var sn = arguments.length, ln = new Array(sn > 1 ? sn - 1 : 0), wn = 1; wn < sn; wn++)
|
|
746
|
+
ln[wn - 1] = arguments[wn];
|
|
747
|
+
le == null || le.apply(void 0, [X].concat(ln));
|
|
748
|
+
}, $n = o.useState({}), Sn = te($n, 2), Kn = Sn[1];
|
|
749
|
+
function Xn() {
|
|
750
|
+
Kn({});
|
|
923
751
|
}
|
|
924
|
-
var
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
}),
|
|
928
|
-
var
|
|
929
|
-
return [
|
|
930
|
-
},
|
|
931
|
-
var
|
|
752
|
+
var _n;
|
|
753
|
+
De && (_n = function(X) {
|
|
754
|
+
N(X);
|
|
755
|
+
}), eo(function() {
|
|
756
|
+
var ue;
|
|
757
|
+
return [Ye.current, (ue = Oe.current) === null || ue === void 0 ? void 0 : ue.getPopupElement()];
|
|
758
|
+
}, an, N, !!De);
|
|
759
|
+
var Tn = o.useMemo(function() {
|
|
932
760
|
return ee(ee({}, e), {}, {
|
|
933
761
|
notFoundContent: g,
|
|
934
|
-
open:
|
|
935
|
-
triggerOpen:
|
|
762
|
+
open: Me,
|
|
763
|
+
triggerOpen: an,
|
|
936
764
|
id: r,
|
|
937
|
-
showSearch:
|
|
938
|
-
multiple:
|
|
939
|
-
toggleOpen:
|
|
765
|
+
showSearch: we,
|
|
766
|
+
multiple: re,
|
|
767
|
+
toggleOpen: N
|
|
940
768
|
});
|
|
941
|
-
}, [e, g,
|
|
942
|
-
|
|
943
|
-
className:
|
|
944
|
-
customizeIcon:
|
|
769
|
+
}, [e, g, an, Me, r, we, re, N]), pt = !!Z || h, ht;
|
|
770
|
+
pt && (ht = /* @__PURE__ */ o.createElement(Wn, {
|
|
771
|
+
className: Be("".concat(a, "-arrow"), ae({}, "".concat(a, "-arrow-loading"), h)),
|
|
772
|
+
customizeIcon: Z,
|
|
945
773
|
customizeIconProps: {
|
|
946
|
-
loading:
|
|
947
|
-
searchValue:
|
|
948
|
-
open:
|
|
949
|
-
focused:
|
|
950
|
-
showSearch:
|
|
774
|
+
loading: h,
|
|
775
|
+
searchValue: Ae,
|
|
776
|
+
open: Me,
|
|
777
|
+
focused: Fe,
|
|
778
|
+
showSearch: we
|
|
951
779
|
}
|
|
952
780
|
}));
|
|
953
|
-
var
|
|
954
|
-
var
|
|
955
|
-
m == null || m(), (
|
|
781
|
+
var sr = function() {
|
|
782
|
+
var X;
|
|
783
|
+
m == null || m(), (X = Ce.current) === null || X === void 0 || X.focus(), s([], {
|
|
956
784
|
type: "clear",
|
|
957
785
|
values: v
|
|
958
|
-
}),
|
|
959
|
-
},
|
|
960
|
-
ref:
|
|
961
|
-
}),
|
|
962
|
-
ref:
|
|
786
|
+
}), be("", !1, !1);
|
|
787
|
+
}, bt = Zr(a, sr, v, j, Y, w, Ae, S), dr = bt.allowClear, fr = bt.clearIcon, mr = /* @__PURE__ */ o.createElement(x, {
|
|
788
|
+
ref: $e
|
|
789
|
+
}), vr = Be(a, i, ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({}, "".concat(a, "-focused"), Fe), "".concat(a, "-multiple"), re), "".concat(a, "-single"), !re), "".concat(a, "-allow-clear"), j), "".concat(a, "-show-arrow"), pt), "".concat(a, "-disabled"), w), "".concat(a, "-loading"), h), "".concat(a, "-open"), Me), "".concat(a, "-customize-input"), _e), "".concat(a, "-show-search"), we)), St = /* @__PURE__ */ o.createElement(Yt, {
|
|
790
|
+
ref: Oe,
|
|
963
791
|
disabled: w,
|
|
964
792
|
prefixCls: a,
|
|
965
|
-
visible:
|
|
966
|
-
popupElement:
|
|
967
|
-
animation:
|
|
968
|
-
transitionName:
|
|
969
|
-
dropdownStyle:
|
|
970
|
-
dropdownClassName:
|
|
793
|
+
visible: an,
|
|
794
|
+
popupElement: mr,
|
|
795
|
+
animation: M,
|
|
796
|
+
transitionName: fe,
|
|
797
|
+
dropdownStyle: ie,
|
|
798
|
+
dropdownClassName: J,
|
|
971
799
|
direction: d,
|
|
972
|
-
dropdownMatchSelectWidth:
|
|
973
|
-
dropdownRender:
|
|
974
|
-
dropdownAlign:
|
|
975
|
-
placement:
|
|
976
|
-
builtinPlacements:
|
|
977
|
-
getPopupContainer:
|
|
978
|
-
empty:
|
|
979
|
-
getTriggerDOMNode: function(
|
|
800
|
+
dropdownMatchSelectWidth: se,
|
|
801
|
+
dropdownRender: ye,
|
|
802
|
+
dropdownAlign: ge,
|
|
803
|
+
placement: Re,
|
|
804
|
+
builtinPlacements: ce,
|
|
805
|
+
getPopupContainer: pe,
|
|
806
|
+
empty: b,
|
|
807
|
+
getTriggerDOMNode: function(X) {
|
|
980
808
|
return (
|
|
981
809
|
// TODO: This is workaround and should be removed in `rc-select`
|
|
982
810
|
// And use new standard `nativeElement` for ref.
|
|
983
811
|
// But we should update `rc-resize-observer` first.
|
|
984
|
-
|
|
812
|
+
Se.current || X
|
|
985
813
|
);
|
|
986
814
|
},
|
|
987
|
-
onPopupVisibleChange:
|
|
988
|
-
onPopupMouseEnter:
|
|
989
|
-
},
|
|
990
|
-
ref:
|
|
991
|
-
}) : /* @__PURE__ */ o.createElement(
|
|
992
|
-
domRef:
|
|
815
|
+
onPopupVisibleChange: _n,
|
|
816
|
+
onPopupMouseEnter: Xn
|
|
817
|
+
}, De ? /* @__PURE__ */ o.cloneElement(De, {
|
|
818
|
+
ref: Nn
|
|
819
|
+
}) : /* @__PURE__ */ o.createElement(Gt, on({}, e, {
|
|
820
|
+
domRef: Se,
|
|
993
821
|
prefixCls: a,
|
|
994
|
-
inputElement:
|
|
995
|
-
ref:
|
|
822
|
+
inputElement: _e,
|
|
823
|
+
ref: Ce,
|
|
996
824
|
id: r,
|
|
997
|
-
prefix:
|
|
998
|
-
showSearch:
|
|
999
|
-
autoClearSearchValue:
|
|
825
|
+
prefix: ne,
|
|
826
|
+
showSearch: we,
|
|
827
|
+
autoClearSearchValue: A,
|
|
1000
828
|
mode: S,
|
|
1001
|
-
activeDescendantId:
|
|
829
|
+
activeDescendantId: q,
|
|
1002
830
|
tagRender: u,
|
|
1003
831
|
values: v,
|
|
1004
|
-
open:
|
|
1005
|
-
onToggleOpen:
|
|
1006
|
-
activeValue:
|
|
1007
|
-
searchValue:
|
|
1008
|
-
onSearch:
|
|
1009
|
-
onSearchSubmit:
|
|
1010
|
-
onRemove:
|
|
1011
|
-
tokenWithEnter: B
|
|
832
|
+
open: Me,
|
|
833
|
+
onToggleOpen: N,
|
|
834
|
+
activeValue: z,
|
|
835
|
+
searchValue: Ae,
|
|
836
|
+
onSearch: be,
|
|
837
|
+
onSearchSubmit: Ze,
|
|
838
|
+
onRemove: rn,
|
|
839
|
+
tokenWithEnter: B,
|
|
840
|
+
onInputBlur: ke
|
|
1012
841
|
}))), Un;
|
|
1013
|
-
return
|
|
1014
|
-
className:
|
|
1015
|
-
},
|
|
1016
|
-
ref:
|
|
1017
|
-
onMouseDown:
|
|
1018
|
-
onKeyDown:
|
|
1019
|
-
onKeyUp:
|
|
1020
|
-
onFocus:
|
|
1021
|
-
onBlur:
|
|
1022
|
-
}), /* @__PURE__ */ o.createElement(
|
|
1023
|
-
visible:
|
|
842
|
+
return De ? Un = St : Un = /* @__PURE__ */ o.createElement("div", on({
|
|
843
|
+
className: vr
|
|
844
|
+
}, ze, {
|
|
845
|
+
ref: Ye,
|
|
846
|
+
onMouseDown: Te,
|
|
847
|
+
onKeyDown: Pn,
|
|
848
|
+
onKeyUp: Hn,
|
|
849
|
+
onFocus: O,
|
|
850
|
+
onBlur: k
|
|
851
|
+
}), /* @__PURE__ */ o.createElement(bo, {
|
|
852
|
+
visible: Fe && !Me,
|
|
1024
853
|
values: v
|
|
1025
|
-
}),
|
|
1026
|
-
value:
|
|
854
|
+
}), St, ht, dr && fr), /* @__PURE__ */ o.createElement(Kt.Provider, {
|
|
855
|
+
value: Tn
|
|
1027
856
|
}, Un);
|
|
1028
857
|
});
|
|
1029
|
-
process.env.NODE_ENV !== "production" && (
|
|
1030
|
-
var
|
|
858
|
+
process.env.NODE_ENV !== "production" && (Qt.displayName = "BaseSelect");
|
|
859
|
+
var ft = function() {
|
|
1031
860
|
return null;
|
|
1032
861
|
};
|
|
1033
|
-
|
|
1034
|
-
var
|
|
862
|
+
ft.isSelectOptGroup = !0;
|
|
863
|
+
var mt = function() {
|
|
1035
864
|
return null;
|
|
1036
865
|
};
|
|
1037
|
-
|
|
1038
|
-
var
|
|
1039
|
-
var t = e.height, r = e.offsetY, a = e.offsetX, i = e.children, l = e.prefixCls, u = e.onInnerResize, d = e.innerProps, f = e.rtl, v = e.extra, s = {},
|
|
866
|
+
mt.isSelectOption = !0;
|
|
867
|
+
var Zt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
868
|
+
var t = e.height, r = e.offsetY, a = e.offsetX, i = e.children, l = e.prefixCls, u = e.onInnerResize, d = e.innerProps, f = e.rtl, v = e.extra, s = {}, b = {
|
|
1040
869
|
display: "flex",
|
|
1041
870
|
flexDirection: "column"
|
|
1042
871
|
};
|
|
@@ -1044,23 +873,23 @@ var Qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
|
1044
873
|
height: t,
|
|
1045
874
|
position: "relative",
|
|
1046
875
|
overflow: "hidden"
|
|
1047
|
-
},
|
|
876
|
+
}, b = ee(ee({}, b), {}, ae(ae(ae(ae(ae({
|
|
1048
877
|
transform: "translateY(".concat(r, "px)")
|
|
1049
878
|
}, f ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ o.createElement("div", {
|
|
1050
879
|
style: s
|
|
1051
|
-
}, /* @__PURE__ */ o.createElement(
|
|
880
|
+
}, /* @__PURE__ */ o.createElement(Wt, {
|
|
1052
881
|
onResize: function(g) {
|
|
1053
882
|
var m = g.offsetHeight;
|
|
1054
883
|
m && u && u();
|
|
1055
884
|
}
|
|
1056
|
-
}, /* @__PURE__ */ o.createElement("div",
|
|
1057
|
-
style:
|
|
1058
|
-
className:
|
|
885
|
+
}, /* @__PURE__ */ o.createElement("div", on({
|
|
886
|
+
style: b,
|
|
887
|
+
className: Be(ae({}, "".concat(l, "-holder-inner"), l)),
|
|
1059
888
|
ref: n
|
|
1060
889
|
}, d), i, v)));
|
|
1061
890
|
});
|
|
1062
|
-
|
|
1063
|
-
function
|
|
891
|
+
Zt.displayName = "Filler";
|
|
892
|
+
function yo(e) {
|
|
1064
893
|
var n = e.children, t = e.setRef, r = o.useCallback(function(a) {
|
|
1065
894
|
t(a);
|
|
1066
895
|
}, []);
|
|
@@ -1068,24 +897,24 @@ function To(e) {
|
|
|
1068
897
|
ref: r
|
|
1069
898
|
});
|
|
1070
899
|
}
|
|
1071
|
-
function
|
|
900
|
+
function Co(e, n, t, r, a, i, l, u) {
|
|
1072
901
|
var d = u.getKey;
|
|
1073
902
|
return e.slice(n, t + 1).map(function(f, v) {
|
|
1074
|
-
var s = n + v,
|
|
903
|
+
var s = n + v, b = l(f, s, {
|
|
1075
904
|
style: {
|
|
1076
905
|
width: r
|
|
1077
906
|
},
|
|
1078
907
|
offsetX: a
|
|
1079
908
|
}), c = d(f);
|
|
1080
|
-
return /* @__PURE__ */ o.createElement(
|
|
909
|
+
return /* @__PURE__ */ o.createElement(yo, {
|
|
1081
910
|
key: c,
|
|
1082
911
|
setRef: function(m) {
|
|
1083
912
|
return i(f, m);
|
|
1084
913
|
}
|
|
1085
|
-
},
|
|
914
|
+
}, b);
|
|
1086
915
|
});
|
|
1087
916
|
}
|
|
1088
|
-
function
|
|
917
|
+
function Io(e, n, t) {
|
|
1089
918
|
var r = e.length, a = n.length, i, l;
|
|
1090
919
|
if (r === 0 && a === 0)
|
|
1091
920
|
return null;
|
|
@@ -1097,9 +926,9 @@ function Lo(e, n, t) {
|
|
|
1097
926
|
return g !== void 0 ? t(g) : u;
|
|
1098
927
|
}
|
|
1099
928
|
for (var f = null, v = Math.abs(r - a) !== 1, s = 0; s < l.length; s += 1) {
|
|
1100
|
-
var
|
|
1101
|
-
if (
|
|
1102
|
-
f = s, v = v ||
|
|
929
|
+
var b = d(i[s]), c = d(l[s]);
|
|
930
|
+
if (b !== c) {
|
|
931
|
+
f = s, v = v || b !== d(l[s + 1]);
|
|
1103
932
|
break;
|
|
1104
933
|
}
|
|
1105
934
|
}
|
|
@@ -1108,22 +937,22 @@ function Lo(e, n, t) {
|
|
|
1108
937
|
multiple: v
|
|
1109
938
|
};
|
|
1110
939
|
}
|
|
1111
|
-
function
|
|
1112
|
-
var r = o.useState(e), a =
|
|
940
|
+
function Eo(e, n, t) {
|
|
941
|
+
var r = o.useState(e), a = te(r, 2), i = a[0], l = a[1], u = o.useState(null), d = te(u, 2), f = d[0], v = d[1];
|
|
1113
942
|
return o.useEffect(function() {
|
|
1114
|
-
var s =
|
|
943
|
+
var s = Io(i || [], e, n);
|
|
1115
944
|
(s == null ? void 0 : s.index) !== void 0 && v(e[s.index]), l(e);
|
|
1116
945
|
}, [e]), [f];
|
|
1117
946
|
}
|
|
1118
|
-
var
|
|
1119
|
-
const
|
|
1120
|
-
var a =
|
|
947
|
+
var Ot = (typeof navigator > "u" ? "undefined" : pn(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
|
|
948
|
+
const Jt = function(e, n, t, r) {
|
|
949
|
+
var a = he(!1), i = he(null);
|
|
1121
950
|
function l() {
|
|
1122
951
|
clearTimeout(i.current), a.current = !0, i.current = setTimeout(function() {
|
|
1123
952
|
a.current = !1;
|
|
1124
953
|
}, 50);
|
|
1125
954
|
}
|
|
1126
|
-
var u =
|
|
955
|
+
var u = he({
|
|
1127
956
|
top: e,
|
|
1128
957
|
bottom: n,
|
|
1129
958
|
left: t,
|
|
@@ -1139,66 +968,66 @@ const Zt = function(e, n, t, r) {
|
|
|
1139
968
|
return v && s ? (clearTimeout(i.current), a.current = !1) : (!s || a.current) && l(), !a.current && s;
|
|
1140
969
|
};
|
|
1141
970
|
};
|
|
1142
|
-
function
|
|
1143
|
-
var u =
|
|
1144
|
-
function h
|
|
1145
|
-
if (
|
|
1146
|
-
var y =
|
|
971
|
+
function xo(e, n, t, r, a, i, l) {
|
|
972
|
+
var u = he(0), d = he(null), f = he(null), v = he(!1), s = Jt(n, t, r, a);
|
|
973
|
+
function b(h, I) {
|
|
974
|
+
if (un.cancel(d.current), !s(!1, I)) {
|
|
975
|
+
var y = h;
|
|
1147
976
|
if (!y._virtualHandled)
|
|
1148
977
|
y._virtualHandled = !0;
|
|
1149
978
|
else
|
|
1150
979
|
return;
|
|
1151
|
-
u.current +=
|
|
1152
|
-
var
|
|
1153
|
-
l(u.current *
|
|
980
|
+
u.current += I, f.current = I, Ot || y.preventDefault(), d.current = un(function() {
|
|
981
|
+
var T = v.current ? 10 : 1;
|
|
982
|
+
l(u.current * T, !1), u.current = 0;
|
|
1154
983
|
});
|
|
1155
984
|
}
|
|
1156
985
|
}
|
|
1157
|
-
function c(
|
|
1158
|
-
l(
|
|
986
|
+
function c(h, I) {
|
|
987
|
+
l(I, !0), Ot || h.preventDefault();
|
|
1159
988
|
}
|
|
1160
|
-
var g =
|
|
1161
|
-
function S(
|
|
989
|
+
var g = he(null), m = he(null);
|
|
990
|
+
function S(h) {
|
|
1162
991
|
if (e) {
|
|
1163
|
-
|
|
992
|
+
un.cancel(m.current), m.current = un(function() {
|
|
1164
993
|
g.current = null;
|
|
1165
994
|
}, 2);
|
|
1166
|
-
var
|
|
1167
|
-
(g.current === "sx" || !g.current &&
|
|
1168
|
-
var
|
|
1169
|
-
g.current === null && (g.current = i &&
|
|
995
|
+
var I = h.deltaX, y = h.deltaY, T = h.shiftKey, p = I, E = y;
|
|
996
|
+
(g.current === "sx" || !g.current && T && y && !I) && (p = y, E = 0, g.current = "sx");
|
|
997
|
+
var z = Math.abs(p), V = Math.abs(E);
|
|
998
|
+
g.current === null && (g.current = i && z > V ? "x" : "y"), g.current === "y" ? b(h, E) : c(h, p);
|
|
1170
999
|
}
|
|
1171
1000
|
}
|
|
1172
|
-
function w(
|
|
1173
|
-
e && (v.current =
|
|
1001
|
+
function w(h) {
|
|
1002
|
+
e && (v.current = h.detail === f.current);
|
|
1174
1003
|
}
|
|
1175
1004
|
return [S, w];
|
|
1176
1005
|
}
|
|
1177
|
-
function
|
|
1006
|
+
function $o(e, n, t, r) {
|
|
1178
1007
|
var a = o.useMemo(function() {
|
|
1179
1008
|
return [/* @__PURE__ */ new Map(), []];
|
|
1180
|
-
}, [e, t.id, r]), i =
|
|
1181
|
-
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v,
|
|
1182
|
-
if (
|
|
1009
|
+
}, [e, t.id, r]), i = te(a, 2), l = i[0], u = i[1], d = function(v) {
|
|
1010
|
+
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v, b = l.get(v), c = l.get(s);
|
|
1011
|
+
if (b === void 0 || c === void 0)
|
|
1183
1012
|
for (var g = e.length, m = u.length; m < g; m += 1) {
|
|
1184
|
-
var S, w = e[m],
|
|
1185
|
-
l.set(
|
|
1186
|
-
var
|
|
1187
|
-
if (u[m] = (u[m - 1] || 0) +
|
|
1013
|
+
var S, w = e[m], h = n(w);
|
|
1014
|
+
l.set(h, m);
|
|
1015
|
+
var I = (S = t.get(h)) !== null && S !== void 0 ? S : r;
|
|
1016
|
+
if (u[m] = (u[m - 1] || 0) + I, h === v && (b = m), h === s && (c = m), b !== void 0 && c !== void 0)
|
|
1188
1017
|
break;
|
|
1189
1018
|
}
|
|
1190
1019
|
return {
|
|
1191
|
-
top: u[
|
|
1020
|
+
top: u[b - 1] || 0,
|
|
1192
1021
|
bottom: u[c]
|
|
1193
1022
|
};
|
|
1194
1023
|
};
|
|
1195
1024
|
return d;
|
|
1196
1025
|
}
|
|
1197
|
-
var
|
|
1026
|
+
var Ro = /* @__PURE__ */ function() {
|
|
1198
1027
|
function e() {
|
|
1199
1028
|
Ir(this, e), ae(this, "maps", void 0), ae(this, "id", 0), ae(this, "diffKeys", /* @__PURE__ */ new Set()), this.maps = /* @__PURE__ */ Object.create(null);
|
|
1200
1029
|
}
|
|
1201
|
-
return
|
|
1030
|
+
return Cr(e, [{
|
|
1202
1031
|
key: "set",
|
|
1203
1032
|
value: function(t, r) {
|
|
1204
1033
|
this.maps[t] = r, this.id += 1, this.diffKeys.add(t);
|
|
@@ -1224,12 +1053,12 @@ var Fo = /* @__PURE__ */ function() {
|
|
|
1224
1053
|
}
|
|
1225
1054
|
}]), e;
|
|
1226
1055
|
}();
|
|
1227
|
-
function
|
|
1056
|
+
function Mt(e) {
|
|
1228
1057
|
var n = parseFloat(e);
|
|
1229
1058
|
return isNaN(n) ? 0 : n;
|
|
1230
1059
|
}
|
|
1231
|
-
function
|
|
1232
|
-
var r = o.useState(0), a =
|
|
1060
|
+
function Oo(e, n, t) {
|
|
1061
|
+
var r = o.useState(0), a = te(r, 2), i = a[0], l = a[1], u = he(/* @__PURE__ */ new Map()), d = he(new Ro()), f = he(0);
|
|
1233
1062
|
function v() {
|
|
1234
1063
|
f.current += 1;
|
|
1235
1064
|
}
|
|
@@ -1237,13 +1066,14 @@ function Ao(e, n, t) {
|
|
|
1237
1066
|
var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1238
1067
|
v();
|
|
1239
1068
|
var g = function() {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1069
|
+
var w = !1;
|
|
1070
|
+
u.current.forEach(function(h, I) {
|
|
1071
|
+
if (h && h.offsetParent) {
|
|
1072
|
+
var y = Er(h), T = y.offsetHeight, p = getComputedStyle(y), E = p.marginTop, z = p.marginBottom, V = Mt(E), q = Mt(z), _ = T + V + q;
|
|
1073
|
+
d.current.get(I) !== _ && (d.current.set(I, _), w = !0);
|
|
1244
1074
|
}
|
|
1245
|
-
}), l(function(
|
|
1246
|
-
return
|
|
1075
|
+
}), w && l(function(h) {
|
|
1076
|
+
return h + 1;
|
|
1247
1077
|
});
|
|
1248
1078
|
};
|
|
1249
1079
|
if (c)
|
|
@@ -1256,25 +1086,25 @@ function Ao(e, n, t) {
|
|
|
1256
1086
|
});
|
|
1257
1087
|
}
|
|
1258
1088
|
}
|
|
1259
|
-
function
|
|
1089
|
+
function b(c, g) {
|
|
1260
1090
|
var m = e(c);
|
|
1261
1091
|
u.current.get(m), g ? (u.current.set(m, g), s()) : u.current.delete(m);
|
|
1262
1092
|
}
|
|
1263
1093
|
return Qn(function() {
|
|
1264
1094
|
return v;
|
|
1265
|
-
}, []), [
|
|
1095
|
+
}, []), [b, s, d.current, i];
|
|
1266
1096
|
}
|
|
1267
|
-
var
|
|
1268
|
-
function
|
|
1269
|
-
var r =
|
|
1097
|
+
var Dt = 14 / 15;
|
|
1098
|
+
function Mo(e, n, t) {
|
|
1099
|
+
var r = he(!1), a = he(0), i = he(0), l = he(null), u = he(null), d, f = function(c) {
|
|
1270
1100
|
if (r.current) {
|
|
1271
|
-
var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g, w = i.current - m,
|
|
1272
|
-
|
|
1273
|
-
var
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
var y = Math.floor(
|
|
1277
|
-
(!t(
|
|
1101
|
+
var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g, w = i.current - m, h = Math.abs(S) > Math.abs(w);
|
|
1102
|
+
h ? a.current = g : i.current = m;
|
|
1103
|
+
var I = t(h, h ? S : w, !1, c);
|
|
1104
|
+
I && c.preventDefault(), clearInterval(u.current), I && (u.current = setInterval(function() {
|
|
1105
|
+
h ? S *= Dt : w *= Dt;
|
|
1106
|
+
var y = Math.floor(h ? S : w);
|
|
1107
|
+
(!t(h, y, !0) || Math.abs(y) <= 0.1) && clearInterval(u.current);
|
|
1278
1108
|
}, 16));
|
|
1279
1109
|
}
|
|
1280
1110
|
}, v = function() {
|
|
@@ -1288,31 +1118,31 @@ function jo(e, n, t) {
|
|
|
1288
1118
|
};
|
|
1289
1119
|
d = function() {
|
|
1290
1120
|
l.current && (l.current.removeEventListener("touchmove", f), l.current.removeEventListener("touchend", v));
|
|
1291
|
-
},
|
|
1121
|
+
}, Mn(function() {
|
|
1292
1122
|
return e && n.current.addEventListener("touchstart", s, {
|
|
1293
1123
|
passive: !0
|
|
1294
1124
|
}), function() {
|
|
1295
|
-
var
|
|
1296
|
-
(
|
|
1125
|
+
var b;
|
|
1126
|
+
(b = n.current) === null || b === void 0 || b.removeEventListener("touchstart", s), d(), clearInterval(u.current);
|
|
1297
1127
|
};
|
|
1298
1128
|
}, [e]);
|
|
1299
1129
|
}
|
|
1300
|
-
function
|
|
1130
|
+
function Nt(e) {
|
|
1301
1131
|
return Math.floor(Math.pow(e, 0.5));
|
|
1302
1132
|
}
|
|
1303
|
-
function
|
|
1133
|
+
function tt(e, n) {
|
|
1304
1134
|
var t = "touches" in e ? e.touches[0] : e;
|
|
1305
1135
|
return t[n ? "pageX" : "pageY"] - window[n ? "scrollX" : "scrollY"];
|
|
1306
1136
|
}
|
|
1307
|
-
function
|
|
1137
|
+
function Do(e, n, t) {
|
|
1308
1138
|
o.useEffect(function() {
|
|
1309
1139
|
var r = n.current;
|
|
1310
1140
|
if (e && r) {
|
|
1311
1141
|
var a = !1, i, l, u = function() {
|
|
1312
|
-
|
|
1313
|
-
}, d = function
|
|
1314
|
-
u(), i =
|
|
1315
|
-
t(l),
|
|
1142
|
+
un.cancel(i);
|
|
1143
|
+
}, d = function b() {
|
|
1144
|
+
u(), i = un(function() {
|
|
1145
|
+
t(l), b();
|
|
1316
1146
|
});
|
|
1317
1147
|
}, f = function(c) {
|
|
1318
1148
|
var g = c;
|
|
@@ -1321,13 +1151,13 @@ function Wo(e, n, t) {
|
|
|
1321
1151
|
a = !1, u();
|
|
1322
1152
|
}, s = function(c) {
|
|
1323
1153
|
if (a) {
|
|
1324
|
-
var g =
|
|
1154
|
+
var g = tt(c, !1), m = r.getBoundingClientRect(), S = m.top, w = m.bottom;
|
|
1325
1155
|
if (g <= S) {
|
|
1326
|
-
var
|
|
1327
|
-
l = -
|
|
1156
|
+
var h = S - g;
|
|
1157
|
+
l = -Nt(h), d();
|
|
1328
1158
|
} else if (g >= w) {
|
|
1329
|
-
var
|
|
1330
|
-
l =
|
|
1159
|
+
var I = g - w;
|
|
1160
|
+
l = Nt(I), d();
|
|
1331
1161
|
} else
|
|
1332
1162
|
u();
|
|
1333
1163
|
}
|
|
@@ -1338,69 +1168,69 @@ function Wo(e, n, t) {
|
|
|
1338
1168
|
}
|
|
1339
1169
|
}, [e]);
|
|
1340
1170
|
}
|
|
1341
|
-
var
|
|
1342
|
-
function
|
|
1343
|
-
var d = o.useRef(), f = o.useState(null), v =
|
|
1344
|
-
return
|
|
1345
|
-
if (s && s.times <
|
|
1171
|
+
var Pt = 10;
|
|
1172
|
+
function No(e, n, t, r, a, i, l, u) {
|
|
1173
|
+
var d = o.useRef(), f = o.useState(null), v = te(f, 2), s = v[0], b = v[1];
|
|
1174
|
+
return Mn(function() {
|
|
1175
|
+
if (s && s.times < Pt) {
|
|
1346
1176
|
if (!e.current) {
|
|
1347
|
-
|
|
1348
|
-
return ee({},
|
|
1177
|
+
b(function(Y) {
|
|
1178
|
+
return ee({}, Y);
|
|
1349
1179
|
});
|
|
1350
1180
|
return;
|
|
1351
1181
|
}
|
|
1352
1182
|
i();
|
|
1353
|
-
var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset, w = e.current.clientHeight,
|
|
1183
|
+
var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset, w = e.current.clientHeight, h = !1, I = c, y = null;
|
|
1354
1184
|
if (w) {
|
|
1355
|
-
for (var
|
|
1356
|
-
var
|
|
1357
|
-
|
|
1358
|
-
var
|
|
1359
|
-
|
|
1185
|
+
for (var T = c || g, p = 0, E = 0, z = 0, V = Math.min(n.length - 1, m), q = 0; q <= V; q += 1) {
|
|
1186
|
+
var _ = a(n[q]);
|
|
1187
|
+
E = p;
|
|
1188
|
+
var A = t.get(_);
|
|
1189
|
+
z = E + (A === void 0 ? r : A), p = z;
|
|
1360
1190
|
}
|
|
1361
|
-
for (var
|
|
1362
|
-
var
|
|
1191
|
+
for (var U = T === "top" ? S : w - S, Q = V; Q >= 0; Q -= 1) {
|
|
1192
|
+
var G = a(n[Q]), j = t.get(G);
|
|
1363
1193
|
if (j === void 0) {
|
|
1364
|
-
|
|
1194
|
+
h = !0;
|
|
1365
1195
|
break;
|
|
1366
1196
|
}
|
|
1367
|
-
if (
|
|
1197
|
+
if (U -= j, U <= 0)
|
|
1368
1198
|
break;
|
|
1369
1199
|
}
|
|
1370
|
-
switch (
|
|
1200
|
+
switch (T) {
|
|
1371
1201
|
case "top":
|
|
1372
|
-
y =
|
|
1202
|
+
y = E - S;
|
|
1373
1203
|
break;
|
|
1374
1204
|
case "bottom":
|
|
1375
|
-
y =
|
|
1205
|
+
y = z - w + S;
|
|
1376
1206
|
break;
|
|
1377
1207
|
default: {
|
|
1378
|
-
var
|
|
1379
|
-
|
|
1208
|
+
var ne = e.current.scrollTop, Z = ne + w;
|
|
1209
|
+
E < ne ? I = "top" : z > Z && (I = "bottom");
|
|
1380
1210
|
}
|
|
1381
1211
|
}
|
|
1382
|
-
y !== null && l(y), y !== s.lastTop && (
|
|
1212
|
+
y !== null && l(y), y !== s.lastTop && (h = !0);
|
|
1383
1213
|
}
|
|
1384
|
-
|
|
1214
|
+
h && b(ee(ee({}, s), {}, {
|
|
1385
1215
|
times: s.times + 1,
|
|
1386
|
-
targetAlign:
|
|
1216
|
+
targetAlign: I,
|
|
1387
1217
|
lastTop: y
|
|
1388
1218
|
}));
|
|
1389
|
-
} else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) ===
|
|
1219
|
+
} else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) === Pt && Ue(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
|
|
1390
1220
|
}, [s, e.current]), function(c) {
|
|
1391
1221
|
if (c == null) {
|
|
1392
1222
|
u();
|
|
1393
1223
|
return;
|
|
1394
1224
|
}
|
|
1395
|
-
if (
|
|
1225
|
+
if (un.cancel(d.current), typeof c == "number")
|
|
1396
1226
|
l(c);
|
|
1397
1227
|
else if (c && pn(c) === "object") {
|
|
1398
1228
|
var g, m = c.align;
|
|
1399
|
-
"index" in c ? g = c.index : g = n.findIndex(function(
|
|
1400
|
-
return a(
|
|
1229
|
+
"index" in c ? g = c.index : g = n.findIndex(function(h) {
|
|
1230
|
+
return a(h) === c.key;
|
|
1401
1231
|
});
|
|
1402
1232
|
var S = c.offset, w = S === void 0 ? 0 : S;
|
|
1403
|
-
|
|
1233
|
+
b({
|
|
1404
1234
|
times: 0,
|
|
1405
1235
|
index: g,
|
|
1406
1236
|
offset: w,
|
|
@@ -1409,572 +1239,574 @@ function Ko(e, n, t, r, a, i, l, u) {
|
|
|
1409
1239
|
}
|
|
1410
1240
|
};
|
|
1411
1241
|
}
|
|
1412
|
-
var
|
|
1413
|
-
var t = e.prefixCls, r = e.rtl, a = e.scrollOffset, i = e.scrollRange, l = e.onStartMove, u = e.onStopMove, d = e.onScroll, f = e.horizontal, v = e.spinSize, s = e.containerSize,
|
|
1414
|
-
clearTimeout(Z.current),
|
|
1415
|
-
|
|
1416
|
-
}, 3e3);
|
|
1417
|
-
},
|
|
1418
|
-
if (a === 0 ||
|
|
1242
|
+
var rt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
1243
|
+
var t = e.prefixCls, r = e.rtl, a = e.scrollOffset, i = e.scrollRange, l = e.onStartMove, u = e.onStopMove, d = e.onScroll, f = e.horizontal, v = e.spinSize, s = e.containerSize, b = e.style, c = e.thumbStyle, g = e.showScrollBar, m = o.useState(!1), S = te(m, 2), w = S[0], h = S[1], I = o.useState(null), y = te(I, 2), T = y[0], p = y[1], E = o.useState(null), z = te(E, 2), V = z[0], q = z[1], _ = !r, A = o.useRef(), U = o.useRef(), Q = o.useState(g), G = te(Q, 2), j = G[0], ne = G[1], Z = o.useRef(), Y = function() {
|
|
1244
|
+
g === !0 || g === !1 || (clearTimeout(Z.current), ne(!0), Z.current = setTimeout(function() {
|
|
1245
|
+
ne(!1);
|
|
1246
|
+
}, 3e3));
|
|
1247
|
+
}, x = i - s || 0, M = s - v || 0, fe = o.useMemo(function() {
|
|
1248
|
+
if (a === 0 || x === 0)
|
|
1419
1249
|
return 0;
|
|
1420
|
-
var
|
|
1421
|
-
return
|
|
1422
|
-
}, [a,
|
|
1423
|
-
|
|
1424
|
-
},
|
|
1425
|
-
top:
|
|
1426
|
-
dragging:
|
|
1427
|
-
pageY:
|
|
1428
|
-
startTop:
|
|
1250
|
+
var R = a / x;
|
|
1251
|
+
return R * M;
|
|
1252
|
+
}, [a, x, M]), ie = function(C) {
|
|
1253
|
+
C.stopPropagation(), C.preventDefault();
|
|
1254
|
+
}, J = o.useRef({
|
|
1255
|
+
top: fe,
|
|
1256
|
+
dragging: w,
|
|
1257
|
+
pageY: T,
|
|
1258
|
+
startTop: V
|
|
1429
1259
|
});
|
|
1430
|
-
|
|
1431
|
-
top:
|
|
1432
|
-
dragging:
|
|
1433
|
-
pageY:
|
|
1434
|
-
startTop:
|
|
1260
|
+
J.current = {
|
|
1261
|
+
top: fe,
|
|
1262
|
+
dragging: w,
|
|
1263
|
+
pageY: T,
|
|
1264
|
+
startTop: V
|
|
1435
1265
|
};
|
|
1436
|
-
var
|
|
1437
|
-
|
|
1266
|
+
var se = function(C) {
|
|
1267
|
+
h(!0), p(tt(C, f)), q(J.current.top), l(), C.stopPropagation(), C.preventDefault();
|
|
1438
1268
|
};
|
|
1439
1269
|
o.useEffect(function() {
|
|
1440
|
-
var
|
|
1441
|
-
|
|
1442
|
-
},
|
|
1443
|
-
return
|
|
1270
|
+
var R = function($) {
|
|
1271
|
+
$.preventDefault();
|
|
1272
|
+
}, C = A.current, D = U.current;
|
|
1273
|
+
return C.addEventListener("touchstart", R, {
|
|
1444
1274
|
passive: !1
|
|
1445
|
-
}),
|
|
1275
|
+
}), D.addEventListener("touchstart", se, {
|
|
1446
1276
|
passive: !1
|
|
1447
1277
|
}), function() {
|
|
1448
|
-
|
|
1278
|
+
C.removeEventListener("touchstart", R), D.removeEventListener("touchstart", se);
|
|
1449
1279
|
};
|
|
1450
1280
|
}, []);
|
|
1451
|
-
var
|
|
1452
|
-
|
|
1453
|
-
var
|
|
1454
|
-
|
|
1455
|
-
if (
|
|
1456
|
-
var
|
|
1457
|
-
var
|
|
1458
|
-
|
|
1459
|
-
var
|
|
1460
|
-
if (
|
|
1461
|
-
var
|
|
1462
|
-
!
|
|
1463
|
-
var
|
|
1464
|
-
|
|
1465
|
-
d(
|
|
1281
|
+
var ye = o.useRef();
|
|
1282
|
+
ye.current = x;
|
|
1283
|
+
var ge = o.useRef();
|
|
1284
|
+
ge.current = M, o.useEffect(function() {
|
|
1285
|
+
if (w) {
|
|
1286
|
+
var R, C = function($) {
|
|
1287
|
+
var F = J.current, le = F.dragging, me = F.pageY, re = F.startTop;
|
|
1288
|
+
un.cancel(R);
|
|
1289
|
+
var we = A.current.getBoundingClientRect(), ze = s / (f ? we.width : we.height);
|
|
1290
|
+
if (le) {
|
|
1291
|
+
var xe = (tt($, f) - me) * ze, Ne = re;
|
|
1292
|
+
!_ && f ? Ne -= xe : Ne += xe;
|
|
1293
|
+
var de = ye.current, Ge = ge.current, Ye = Ge ? Ne / Ge : 0, Se = Math.ceil(Ye * de);
|
|
1294
|
+
Se = Math.max(Se, 0), Se = Math.min(Se, de), R = un(function() {
|
|
1295
|
+
d(Se, f);
|
|
1466
1296
|
});
|
|
1467
1297
|
}
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1298
|
+
}, D = function() {
|
|
1299
|
+
h(!1), u();
|
|
1470
1300
|
};
|
|
1471
|
-
return window.addEventListener("mousemove",
|
|
1301
|
+
return window.addEventListener("mousemove", C, {
|
|
1472
1302
|
passive: !0
|
|
1473
|
-
}), window.addEventListener("touchmove",
|
|
1303
|
+
}), window.addEventListener("touchmove", C, {
|
|
1474
1304
|
passive: !0
|
|
1475
|
-
}), window.addEventListener("mouseup",
|
|
1305
|
+
}), window.addEventListener("mouseup", D, {
|
|
1476
1306
|
passive: !0
|
|
1477
|
-
}), window.addEventListener("touchend",
|
|
1307
|
+
}), window.addEventListener("touchend", D, {
|
|
1478
1308
|
passive: !0
|
|
1479
1309
|
}), function() {
|
|
1480
|
-
window.removeEventListener("mousemove",
|
|
1310
|
+
window.removeEventListener("mousemove", C), window.removeEventListener("touchmove", C), window.removeEventListener("mouseup", D), window.removeEventListener("touchend", D), un.cancel(R);
|
|
1481
1311
|
};
|
|
1482
1312
|
}
|
|
1483
|
-
}, [
|
|
1484
|
-
return
|
|
1313
|
+
}, [w]), o.useEffect(function() {
|
|
1314
|
+
return Y(), function() {
|
|
1485
1315
|
clearTimeout(Z.current);
|
|
1486
1316
|
};
|
|
1487
1317
|
}, [a]), o.useImperativeHandle(n, function() {
|
|
1488
1318
|
return {
|
|
1489
|
-
delayHidden:
|
|
1319
|
+
delayHidden: Y
|
|
1490
1320
|
};
|
|
1491
1321
|
});
|
|
1492
|
-
var
|
|
1322
|
+
var Re = "".concat(t, "-scrollbar"), ce = {
|
|
1493
1323
|
position: "absolute",
|
|
1494
|
-
visibility:
|
|
1495
|
-
},
|
|
1324
|
+
visibility: j ? null : "hidden"
|
|
1325
|
+
}, pe = {
|
|
1496
1326
|
position: "absolute",
|
|
1497
1327
|
background: "rgba(0, 0, 0, 0.5)",
|
|
1498
1328
|
borderRadius: 99,
|
|
1499
1329
|
cursor: "pointer",
|
|
1500
1330
|
userSelect: "none"
|
|
1501
1331
|
};
|
|
1502
|
-
return f ? (
|
|
1503
|
-
ref:
|
|
1504
|
-
className:
|
|
1505
|
-
style: ee(ee({},
|
|
1506
|
-
onMouseDown:
|
|
1507
|
-
onMouseMove:
|
|
1332
|
+
return f ? (ce.height = 8, ce.left = 0, ce.right = 0, ce.bottom = 0, pe.height = "100%", pe.width = v, _ ? pe.left = fe : pe.right = fe) : (ce.width = 8, ce.top = 0, ce.bottom = 0, _ ? ce.right = 0 : ce.left = 0, pe.width = "100%", pe.height = v, pe.top = fe), /* @__PURE__ */ o.createElement("div", {
|
|
1333
|
+
ref: A,
|
|
1334
|
+
className: Be(Re, ae(ae(ae({}, "".concat(Re, "-horizontal"), f), "".concat(Re, "-vertical"), !f), "".concat(Re, "-visible"), j)),
|
|
1335
|
+
style: ee(ee({}, ce), b),
|
|
1336
|
+
onMouseDown: ie,
|
|
1337
|
+
onMouseMove: Y
|
|
1508
1338
|
}, /* @__PURE__ */ o.createElement("div", {
|
|
1509
1339
|
ref: U,
|
|
1510
|
-
className:
|
|
1511
|
-
style: ee(ee({},
|
|
1512
|
-
onMouseDown:
|
|
1340
|
+
className: Be("".concat(Re, "-thumb"), ae({}, "".concat(Re, "-thumb-moving"), w)),
|
|
1341
|
+
style: ee(ee({}, pe), c),
|
|
1342
|
+
onMouseDown: se
|
|
1513
1343
|
}));
|
|
1514
1344
|
});
|
|
1515
|
-
process.env.NODE_ENV !== "production" && (
|
|
1516
|
-
var
|
|
1517
|
-
function
|
|
1345
|
+
process.env.NODE_ENV !== "production" && (rt.displayName = "ScrollBar");
|
|
1346
|
+
var Po = 20;
|
|
1347
|
+
function _t() {
|
|
1518
1348
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = e / n * e;
|
|
1519
|
-
return isNaN(t) && (t = 0), t = Math.max(t,
|
|
1349
|
+
return isNaN(t) && (t = 0), t = Math.max(t, Po), Math.floor(t);
|
|
1520
1350
|
}
|
|
1521
|
-
var
|
|
1351
|
+
var _o = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], To = [], Lo = {
|
|
1522
1352
|
overflowY: "auto",
|
|
1523
1353
|
overflowAnchor: "none"
|
|
1524
1354
|
};
|
|
1525
|
-
function
|
|
1526
|
-
var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className, i = e.height, l = e.itemHeight, u = e.fullHeight, d = u === void 0 ? !0 : u, f = e.style, v = e.data, s = e.children,
|
|
1527
|
-
return typeof
|
|
1528
|
-
}, [
|
|
1529
|
-
return Object.values(
|
|
1530
|
-
return
|
|
1355
|
+
function Ho(e, n) {
|
|
1356
|
+
var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className, i = e.height, l = e.itemHeight, u = e.fullHeight, d = u === void 0 ? !0 : u, f = e.style, v = e.data, s = e.children, b = e.itemKey, c = e.virtual, g = e.direction, m = e.scrollWidth, S = e.component, w = S === void 0 ? "div" : S, h = e.onScroll, I = e.onVirtualScroll, y = e.onVisibleChange, T = e.innerProps, p = e.extraRender, E = e.styles, z = e.showScrollBar, V = z === void 0 ? "optional" : z, q = Cn(e, _o), _ = o.useCallback(function(P) {
|
|
1357
|
+
return typeof b == "function" ? b(P) : P == null ? void 0 : P[b];
|
|
1358
|
+
}, [b]), A = Oo(_), U = te(A, 4), Q = U[0], G = U[1], j = U[2], ne = U[3], Z = !!(c !== !1 && i && l), Y = o.useMemo(function() {
|
|
1359
|
+
return Object.values(j.maps).reduce(function(P, O) {
|
|
1360
|
+
return P + O;
|
|
1531
1361
|
}, 0);
|
|
1532
|
-
}, [
|
|
1533
|
-
|
|
1534
|
-
},
|
|
1535
|
-
|
|
1536
|
-
},
|
|
1537
|
-
getKey:
|
|
1362
|
+
}, [j.id, j.maps]), x = Z && v && (Math.max(l * v.length, Y) > i || !!m), M = g === "rtl", fe = Be(r, ae({}, "".concat(r, "-rtl"), M), a), ie = v || To, J = he(), se = he(), ye = he(), ge = Ln(0), Re = te(ge, 2), ce = Re[0], pe = Re[1], R = Ln(0), C = te(R, 2), D = C[0], K = C[1], $ = Ln(!1), F = te($, 2), le = F[0], me = F[1], re = function() {
|
|
1363
|
+
me(!0);
|
|
1364
|
+
}, we = function() {
|
|
1365
|
+
me(!1);
|
|
1366
|
+
}, ze = {
|
|
1367
|
+
getKey: _
|
|
1538
1368
|
};
|
|
1539
|
-
function
|
|
1540
|
-
|
|
1369
|
+
function xe(P) {
|
|
1370
|
+
pe(function(O) {
|
|
1541
1371
|
var k;
|
|
1542
|
-
typeof
|
|
1543
|
-
var
|
|
1544
|
-
return
|
|
1372
|
+
typeof P == "function" ? k = P(O) : k = P;
|
|
1373
|
+
var ve = xn(k);
|
|
1374
|
+
return J.current.scrollTop = ve, ve;
|
|
1545
1375
|
});
|
|
1546
1376
|
}
|
|
1547
|
-
var
|
|
1377
|
+
var Ne = he({
|
|
1548
1378
|
start: 0,
|
|
1549
|
-
end:
|
|
1550
|
-
}),
|
|
1551
|
-
|
|
1552
|
-
var
|
|
1553
|
-
if (!
|
|
1379
|
+
end: ie.length
|
|
1380
|
+
}), de = he(), Ge = Eo(ie, _), Ye = te(Ge, 1), Se = Ye[0];
|
|
1381
|
+
de.current = Se;
|
|
1382
|
+
var Oe = o.useMemo(function() {
|
|
1383
|
+
if (!Z)
|
|
1554
1384
|
return {
|
|
1555
1385
|
scrollHeight: void 0,
|
|
1556
1386
|
start: 0,
|
|
1557
|
-
end:
|
|
1387
|
+
end: ie.length - 1,
|
|
1558
1388
|
offset: void 0
|
|
1559
1389
|
};
|
|
1560
|
-
if (!
|
|
1561
|
-
var
|
|
1390
|
+
if (!x) {
|
|
1391
|
+
var P;
|
|
1562
1392
|
return {
|
|
1563
|
-
scrollHeight: ((
|
|
1393
|
+
scrollHeight: ((P = se.current) === null || P === void 0 ? void 0 : P.offsetHeight) || 0,
|
|
1564
1394
|
start: 0,
|
|
1565
|
-
end:
|
|
1395
|
+
end: ie.length - 1,
|
|
1566
1396
|
offset: void 0
|
|
1567
1397
|
};
|
|
1568
1398
|
}
|
|
1569
|
-
for (var
|
|
1570
|
-
var Kn =
|
|
1571
|
-
|
|
1399
|
+
for (var O = 0, k, ve, Te, $n = ie.length, Sn = 0; Sn < $n; Sn += 1) {
|
|
1400
|
+
var Kn = ie[Sn], Xn = _(Kn), _n = j.get(Xn), Tn = O + (_n === void 0 ? l : _n);
|
|
1401
|
+
Tn >= ce && k === void 0 && (k = Sn, ve = O), Tn > ce + i && Te === void 0 && (Te = Sn), O = Tn;
|
|
1572
1402
|
}
|
|
1573
|
-
return k === void 0 && (k = 0,
|
|
1574
|
-
scrollHeight:
|
|
1403
|
+
return k === void 0 && (k = 0, ve = 0, Te = Math.ceil(i / l)), Te === void 0 && (Te = ie.length - 1), Te = Math.min(Te + 1, ie.length - 1), {
|
|
1404
|
+
scrollHeight: O,
|
|
1575
1405
|
start: k,
|
|
1576
|
-
end:
|
|
1577
|
-
offset:
|
|
1406
|
+
end: Te,
|
|
1407
|
+
offset: ve
|
|
1578
1408
|
};
|
|
1579
|
-
}, [
|
|
1580
|
-
|
|
1581
|
-
var
|
|
1582
|
-
if (
|
|
1583
|
-
var
|
|
1584
|
-
if (k ===
|
|
1585
|
-
var
|
|
1586
|
-
|
|
1587
|
-
return
|
|
1409
|
+
}, [x, Z, ce, ie, ne, i]), Ce = Oe.scrollHeight, $e = Oe.start, Pe = Oe.end, en = Oe.offset;
|
|
1410
|
+
Ne.current.start = $e, Ne.current.end = Pe, o.useLayoutEffect(function() {
|
|
1411
|
+
var P = j.getRecord();
|
|
1412
|
+
if (P.size === 1) {
|
|
1413
|
+
var O = Array.from(P)[0], k = _(ie[$e]);
|
|
1414
|
+
if (k === O) {
|
|
1415
|
+
var ve = j.get(O), Te = ve - l;
|
|
1416
|
+
xe(function($n) {
|
|
1417
|
+
return $n + Te;
|
|
1588
1418
|
});
|
|
1589
1419
|
}
|
|
1590
1420
|
}
|
|
1591
|
-
|
|
1592
|
-
}, [
|
|
1593
|
-
var
|
|
1421
|
+
j.resetRecord();
|
|
1422
|
+
}, [Ce]);
|
|
1423
|
+
var je = o.useState({
|
|
1594
1424
|
width: 0,
|
|
1595
1425
|
height: i
|
|
1596
|
-
}),
|
|
1597
|
-
|
|
1598
|
-
width:
|
|
1599
|
-
height:
|
|
1426
|
+
}), Fe = te(je, 2), Ie = Fe[0], hn = Fe[1], Ae = function(O) {
|
|
1427
|
+
hn({
|
|
1428
|
+
width: O.offsetWidth,
|
|
1429
|
+
height: O.offsetHeight
|
|
1600
1430
|
});
|
|
1601
|
-
},
|
|
1602
|
-
return
|
|
1603
|
-
}, [
|
|
1604
|
-
return
|
|
1605
|
-
}, [
|
|
1606
|
-
|
|
1607
|
-
function
|
|
1608
|
-
var
|
|
1609
|
-
return Number.isNaN(
|
|
1431
|
+
}, _e = he(), De = he(), Nn = o.useMemo(function() {
|
|
1432
|
+
return _t(Ie.width, m);
|
|
1433
|
+
}, [Ie.width, m]), En = o.useMemo(function() {
|
|
1434
|
+
return _t(Ie.height, Ce);
|
|
1435
|
+
}, [Ie.height, Ce]), dn = Ce - i, bn = he(dn);
|
|
1436
|
+
bn.current = dn;
|
|
1437
|
+
function xn(P) {
|
|
1438
|
+
var O = P;
|
|
1439
|
+
return Number.isNaN(bn.current) || (O = Math.min(O, bn.current)), O = Math.max(O, 0), O;
|
|
1610
1440
|
}
|
|
1611
|
-
var
|
|
1441
|
+
var cn = ce <= 0, Qe = ce >= dn, fn = D <= 0, mn = D >= m, Me = Jt(cn, Qe, fn, mn), vn = function() {
|
|
1612
1442
|
return {
|
|
1613
|
-
x:
|
|
1614
|
-
y:
|
|
1443
|
+
x: M ? -D : D,
|
|
1444
|
+
y: ce
|
|
1615
1445
|
};
|
|
1616
|
-
},
|
|
1617
|
-
if (
|
|
1618
|
-
var
|
|
1619
|
-
(
|
|
1446
|
+
}, an = he(vn()), N = yt(function(P) {
|
|
1447
|
+
if (I) {
|
|
1448
|
+
var O = ee(ee({}, vn()), P);
|
|
1449
|
+
(an.current.x !== O.x || an.current.y !== O.y) && (I(O), an.current = O);
|
|
1620
1450
|
}
|
|
1621
1451
|
});
|
|
1622
|
-
function
|
|
1623
|
-
var k =
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}),
|
|
1452
|
+
function B(P, O) {
|
|
1453
|
+
var k = P;
|
|
1454
|
+
O ? (Ct.flushSync(function() {
|
|
1455
|
+
K(k);
|
|
1456
|
+
}), N()) : xe(k);
|
|
1627
1457
|
}
|
|
1628
|
-
function P
|
|
1629
|
-
var
|
|
1630
|
-
|
|
1458
|
+
function L(P) {
|
|
1459
|
+
var O = P.currentTarget.scrollTop;
|
|
1460
|
+
O !== ce && xe(O), h == null || h(P), N();
|
|
1631
1461
|
}
|
|
1632
|
-
var
|
|
1633
|
-
var k =
|
|
1634
|
-
return k = Math.max(k, 0), k = Math.min(k,
|
|
1635
|
-
},
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
var
|
|
1639
|
-
return
|
|
1462
|
+
var H = function(O) {
|
|
1463
|
+
var k = O, ve = m ? m - Ie.width : 0;
|
|
1464
|
+
return k = Math.max(k, 0), k = Math.min(k, ve), k;
|
|
1465
|
+
}, oe = yt(function(P, O) {
|
|
1466
|
+
O ? (Ct.flushSync(function() {
|
|
1467
|
+
K(function(k) {
|
|
1468
|
+
var ve = k + (M ? -P : P);
|
|
1469
|
+
return H(ve);
|
|
1640
1470
|
});
|
|
1641
|
-
}),
|
|
1642
|
-
var
|
|
1643
|
-
return
|
|
1471
|
+
}), N()) : xe(function(k) {
|
|
1472
|
+
var ve = k + P;
|
|
1473
|
+
return ve;
|
|
1644
1474
|
});
|
|
1645
|
-
}),
|
|
1646
|
-
|
|
1647
|
-
var
|
|
1648
|
-
return
|
|
1475
|
+
}), be = xo(Z, cn, Qe, fn, mn, !!m, oe), Ze = te(be, 2), We = Ze[0], nn = Ze[1];
|
|
1476
|
+
Mo(Z, J, function(P, O, k, ve) {
|
|
1477
|
+
var Te = ve;
|
|
1478
|
+
return Me(P, O, k) ? !1 : !Te || !Te._virtualHandled ? (Te && (Te._virtualHandled = !0), We({
|
|
1649
1479
|
preventDefault: function() {
|
|
1650
1480
|
},
|
|
1651
|
-
deltaX:
|
|
1652
|
-
deltaY:
|
|
1481
|
+
deltaX: P ? O : 0,
|
|
1482
|
+
deltaY: P ? 0 : O
|
|
1653
1483
|
}), !0) : !1;
|
|
1654
|
-
}),
|
|
1655
|
-
|
|
1656
|
-
return
|
|
1484
|
+
}), Do(x, J, function(P) {
|
|
1485
|
+
xe(function(O) {
|
|
1486
|
+
return O + P;
|
|
1657
1487
|
});
|
|
1658
|
-
}),
|
|
1659
|
-
function
|
|
1660
|
-
var
|
|
1661
|
-
|
|
1488
|
+
}), Mn(function() {
|
|
1489
|
+
function P(k) {
|
|
1490
|
+
var ve = cn && k.detail < 0, Te = Qe && k.detail > 0;
|
|
1491
|
+
Z && !ve && !Te && k.preventDefault();
|
|
1662
1492
|
}
|
|
1663
|
-
var
|
|
1664
|
-
return
|
|
1493
|
+
var O = J.current;
|
|
1494
|
+
return O.addEventListener("wheel", We, {
|
|
1665
1495
|
passive: !1
|
|
1666
|
-
}),
|
|
1496
|
+
}), O.addEventListener("DOMMouseScroll", nn, {
|
|
1667
1497
|
passive: !0
|
|
1668
|
-
}),
|
|
1498
|
+
}), O.addEventListener("MozMousePixelScroll", P, {
|
|
1669
1499
|
passive: !1
|
|
1670
1500
|
}), function() {
|
|
1671
|
-
|
|
1501
|
+
O.removeEventListener("wheel", We), O.removeEventListener("DOMMouseScroll", nn), O.removeEventListener("MozMousePixelScroll", P);
|
|
1672
1502
|
};
|
|
1673
|
-
}, [
|
|
1503
|
+
}, [Z, cn, Qe]), Mn(function() {
|
|
1674
1504
|
if (m) {
|
|
1675
|
-
var
|
|
1676
|
-
|
|
1677
|
-
x:
|
|
1505
|
+
var P = H(D);
|
|
1506
|
+
K(P), N({
|
|
1507
|
+
x: P
|
|
1678
1508
|
});
|
|
1679
1509
|
}
|
|
1680
|
-
}, [
|
|
1681
|
-
var
|
|
1682
|
-
var
|
|
1683
|
-
(
|
|
1684
|
-
},
|
|
1685
|
-
return
|
|
1686
|
-
},
|
|
1510
|
+
}, [Ie.width, m]);
|
|
1511
|
+
var Ee = function() {
|
|
1512
|
+
var O, k;
|
|
1513
|
+
(O = _e.current) === null || O === void 0 || O.delayHidden(), (k = De.current) === null || k === void 0 || k.delayHidden();
|
|
1514
|
+
}, tn = No(J, ie, j, l, _, function() {
|
|
1515
|
+
return G(!0);
|
|
1516
|
+
}, xe, Ee);
|
|
1687
1517
|
o.useImperativeHandle(n, function() {
|
|
1688
1518
|
return {
|
|
1689
|
-
nativeElement:
|
|
1690
|
-
getScrollInfo:
|
|
1691
|
-
scrollTo: function(
|
|
1692
|
-
function k(
|
|
1693
|
-
return
|
|
1519
|
+
nativeElement: ye.current,
|
|
1520
|
+
getScrollInfo: vn,
|
|
1521
|
+
scrollTo: function(O) {
|
|
1522
|
+
function k(ve) {
|
|
1523
|
+
return ve && pn(ve) === "object" && ("left" in ve || "top" in ve);
|
|
1694
1524
|
}
|
|
1695
|
-
k(
|
|
1525
|
+
k(O) ? (O.left !== void 0 && K(H(O.left)), tn(O.top)) : tn(O);
|
|
1696
1526
|
}
|
|
1697
1527
|
};
|
|
1698
|
-
}),
|
|
1528
|
+
}), Mn(function() {
|
|
1699
1529
|
if (y) {
|
|
1700
|
-
var
|
|
1701
|
-
y(
|
|
1702
|
-
}
|
|
1703
|
-
}, [
|
|
1704
|
-
var
|
|
1705
|
-
start:
|
|
1706
|
-
end:
|
|
1707
|
-
virtual:
|
|
1708
|
-
offsetX:
|
|
1709
|
-
offsetY:
|
|
1710
|
-
rtl:
|
|
1711
|
-
getSize:
|
|
1712
|
-
}),
|
|
1713
|
-
i && (
|
|
1714
|
-
var
|
|
1715
|
-
return
|
|
1716
|
-
ref:
|
|
1530
|
+
var P = ie.slice($e, Pe + 1);
|
|
1531
|
+
y(P, ie);
|
|
1532
|
+
}
|
|
1533
|
+
}, [$e, Pe, ie]);
|
|
1534
|
+
var Je = $o(ie, _, j, l), Pn = p == null ? void 0 : p({
|
|
1535
|
+
start: $e,
|
|
1536
|
+
end: Pe,
|
|
1537
|
+
virtual: x,
|
|
1538
|
+
offsetX: D,
|
|
1539
|
+
offsetY: en,
|
|
1540
|
+
rtl: M,
|
|
1541
|
+
getSize: Je
|
|
1542
|
+
}), Hn = Co(ie, $e, Pe, m, D, Q, s, ze), rn = null;
|
|
1543
|
+
i && (rn = ee(ae({}, d ? "height" : "maxHeight", i), Lo), Z && (rn.overflowY = "hidden", m && (rn.overflowX = "hidden"), le && (rn.pointerEvents = "none")));
|
|
1544
|
+
var ke = {};
|
|
1545
|
+
return M && (ke.dir = "rtl"), /* @__PURE__ */ o.createElement("div", on({
|
|
1546
|
+
ref: ye,
|
|
1717
1547
|
style: ee(ee({}, f), {}, {
|
|
1718
1548
|
position: "relative"
|
|
1719
1549
|
}),
|
|
1720
|
-
className:
|
|
1721
|
-
},
|
|
1722
|
-
onResize:
|
|
1550
|
+
className: fe
|
|
1551
|
+
}, ke, q), /* @__PURE__ */ o.createElement(Wt, {
|
|
1552
|
+
onResize: Ae
|
|
1723
1553
|
}, /* @__PURE__ */ o.createElement(w, {
|
|
1724
1554
|
className: "".concat(r, "-holder"),
|
|
1725
|
-
style:
|
|
1726
|
-
ref:
|
|
1727
|
-
onScroll:
|
|
1728
|
-
onMouseEnter:
|
|
1729
|
-
}, /* @__PURE__ */ o.createElement(
|
|
1555
|
+
style: rn,
|
|
1556
|
+
ref: J,
|
|
1557
|
+
onScroll: L,
|
|
1558
|
+
onMouseEnter: Ee
|
|
1559
|
+
}, /* @__PURE__ */ o.createElement(Zt, {
|
|
1730
1560
|
prefixCls: r,
|
|
1731
|
-
height:
|
|
1732
|
-
offsetX:
|
|
1733
|
-
offsetY:
|
|
1561
|
+
height: Ce,
|
|
1562
|
+
offsetX: D,
|
|
1563
|
+
offsetY: en,
|
|
1734
1564
|
scrollWidth: m,
|
|
1735
|
-
onInnerResize:
|
|
1736
|
-
ref:
|
|
1737
|
-
innerProps:
|
|
1738
|
-
rtl:
|
|
1739
|
-
extra:
|
|
1740
|
-
},
|
|
1741
|
-
ref:
|
|
1565
|
+
onInnerResize: G,
|
|
1566
|
+
ref: se,
|
|
1567
|
+
innerProps: T,
|
|
1568
|
+
rtl: M,
|
|
1569
|
+
extra: Pn
|
|
1570
|
+
}, Hn))), x && Ce > i && /* @__PURE__ */ o.createElement(rt, {
|
|
1571
|
+
ref: _e,
|
|
1742
1572
|
prefixCls: r,
|
|
1743
|
-
scrollOffset:
|
|
1744
|
-
scrollRange:
|
|
1745
|
-
rtl:
|
|
1746
|
-
onScroll:
|
|
1747
|
-
onStartMove:
|
|
1748
|
-
onStopMove:
|
|
1749
|
-
spinSize:
|
|
1750
|
-
containerSize:
|
|
1751
|
-
style:
|
|
1752
|
-
thumbStyle:
|
|
1753
|
-
|
|
1754
|
-
|
|
1573
|
+
scrollOffset: ce,
|
|
1574
|
+
scrollRange: Ce,
|
|
1575
|
+
rtl: M,
|
|
1576
|
+
onScroll: B,
|
|
1577
|
+
onStartMove: re,
|
|
1578
|
+
onStopMove: we,
|
|
1579
|
+
spinSize: En,
|
|
1580
|
+
containerSize: Ie.height,
|
|
1581
|
+
style: E == null ? void 0 : E.verticalScrollBar,
|
|
1582
|
+
thumbStyle: E == null ? void 0 : E.verticalScrollBarThumb,
|
|
1583
|
+
showScrollBar: V
|
|
1584
|
+
}), x && m > Ie.width && /* @__PURE__ */ o.createElement(rt, {
|
|
1585
|
+
ref: De,
|
|
1755
1586
|
prefixCls: r,
|
|
1756
|
-
scrollOffset:
|
|
1587
|
+
scrollOffset: D,
|
|
1757
1588
|
scrollRange: m,
|
|
1758
|
-
rtl:
|
|
1759
|
-
onScroll:
|
|
1760
|
-
onStartMove:
|
|
1761
|
-
onStopMove:
|
|
1762
|
-
spinSize:
|
|
1763
|
-
containerSize:
|
|
1589
|
+
rtl: M,
|
|
1590
|
+
onScroll: B,
|
|
1591
|
+
onStartMove: re,
|
|
1592
|
+
onStopMove: we,
|
|
1593
|
+
spinSize: Nn,
|
|
1594
|
+
containerSize: Ie.width,
|
|
1764
1595
|
horizontal: !0,
|
|
1765
|
-
style:
|
|
1766
|
-
thumbStyle:
|
|
1596
|
+
style: E == null ? void 0 : E.horizontalScrollBar,
|
|
1597
|
+
thumbStyle: E == null ? void 0 : E.horizontalScrollBarThumb,
|
|
1598
|
+
showScrollBar: V
|
|
1767
1599
|
}));
|
|
1768
1600
|
}
|
|
1769
|
-
var
|
|
1770
|
-
|
|
1771
|
-
function
|
|
1601
|
+
var kt = /* @__PURE__ */ o.forwardRef(Ho);
|
|
1602
|
+
kt.displayName = "List";
|
|
1603
|
+
function zo() {
|
|
1772
1604
|
return /(mac\sos|macintosh)/i.test(navigator.appVersion);
|
|
1773
1605
|
}
|
|
1774
|
-
var
|
|
1775
|
-
function
|
|
1606
|
+
var Bo = ["disabled", "title", "children", "style", "className"];
|
|
1607
|
+
function Tt(e) {
|
|
1776
1608
|
return typeof e == "string" || typeof e == "number";
|
|
1777
1609
|
}
|
|
1778
|
-
var
|
|
1779
|
-
var r =
|
|
1610
|
+
var Vo = function(n, t) {
|
|
1611
|
+
var r = Jr(), a = r.prefixCls, i = r.id, l = r.open, u = r.multiple, d = r.mode, f = r.searchValue, v = r.toggleOpen, s = r.notFoundContent, b = r.onPopupScroll, c = o.useContext(dt), g = c.maxCount, m = c.flattenOptions, S = c.onActiveValue, w = c.defaultActiveFirstOption, h = c.onSelect, I = c.menuItemSelectedIcon, y = c.rawValues, T = c.fieldNames, p = c.virtual, E = c.direction, z = c.listHeight, V = c.listItemHeight, q = c.optionRender, _ = "".concat(a, "-item"), A = xr(function() {
|
|
1780
1612
|
return m;
|
|
1781
|
-
}, [l, m], function(
|
|
1782
|
-
return
|
|
1783
|
-
}),
|
|
1784
|
-
return u &&
|
|
1785
|
-
}, [u, g, y == null ? void 0 : y.size]),
|
|
1786
|
-
|
|
1787
|
-
}, j = function(
|
|
1788
|
-
var
|
|
1789
|
-
(
|
|
1790
|
-
index:
|
|
1791
|
-
} :
|
|
1792
|
-
},
|
|
1793
|
-
return d === "combobox" ? !1 : y.has(
|
|
1794
|
-
}, [d,
|
|
1795
|
-
for (var
|
|
1796
|
-
var
|
|
1797
|
-
if (!
|
|
1798
|
-
return
|
|
1613
|
+
}, [l, m], function(R, C) {
|
|
1614
|
+
return C[0] && R[1] !== C[1];
|
|
1615
|
+
}), U = o.useRef(null), Q = o.useMemo(function() {
|
|
1616
|
+
return u && et(g) && (y == null ? void 0 : y.size) >= g;
|
|
1617
|
+
}, [u, g, y == null ? void 0 : y.size]), G = function(C) {
|
|
1618
|
+
C.preventDefault();
|
|
1619
|
+
}, j = function(C) {
|
|
1620
|
+
var D;
|
|
1621
|
+
(D = U.current) === null || D === void 0 || D.scrollTo(typeof C == "number" ? {
|
|
1622
|
+
index: C
|
|
1623
|
+
} : C);
|
|
1624
|
+
}, ne = o.useCallback(function(R) {
|
|
1625
|
+
return d === "combobox" ? !1 : y.has(R);
|
|
1626
|
+
}, [d, qe(y).toString(), y.size]), Z = function(C) {
|
|
1627
|
+
for (var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, K = A.length, $ = 0; $ < K; $ += 1) {
|
|
1628
|
+
var F = (C + $ * D + K) % K, le = A[F] || {}, me = le.group, re = le.data;
|
|
1629
|
+
if (!me && !(re != null && re.disabled) && (ne(re.value) || !Q))
|
|
1630
|
+
return F;
|
|
1799
1631
|
}
|
|
1800
1632
|
return -1;
|
|
1801
|
-
},
|
|
1802
|
-
return
|
|
1803
|
-
}),
|
|
1804
|
-
var
|
|
1805
|
-
|
|
1806
|
-
var
|
|
1807
|
-
source:
|
|
1808
|
-
},
|
|
1809
|
-
if (
|
|
1810
|
-
S(null, -1,
|
|
1633
|
+
}, Y = o.useState(function() {
|
|
1634
|
+
return Z(0);
|
|
1635
|
+
}), x = te(Y, 2), M = x[0], fe = x[1], ie = function(C) {
|
|
1636
|
+
var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1637
|
+
fe(C);
|
|
1638
|
+
var K = {
|
|
1639
|
+
source: D ? "keyboard" : "mouse"
|
|
1640
|
+
}, $ = A[C];
|
|
1641
|
+
if (!$) {
|
|
1642
|
+
S(null, -1, K);
|
|
1811
1643
|
return;
|
|
1812
1644
|
}
|
|
1813
|
-
S(
|
|
1645
|
+
S($.value, C, K);
|
|
1814
1646
|
};
|
|
1815
1647
|
Qn(function() {
|
|
1816
|
-
|
|
1817
|
-
}, [
|
|
1818
|
-
var
|
|
1819
|
-
return d === "combobox" ? String(
|
|
1820
|
-
}, [d, f,
|
|
1648
|
+
ie(w !== !1 ? Z(0) : -1);
|
|
1649
|
+
}, [A.length, f]);
|
|
1650
|
+
var J = o.useCallback(function(R) {
|
|
1651
|
+
return d === "combobox" ? String(R).toLowerCase() === f.toLowerCase() : y.has(R);
|
|
1652
|
+
}, [d, f, qe(y).toString(), y.size]);
|
|
1821
1653
|
Qn(function() {
|
|
1822
|
-
var
|
|
1654
|
+
var R = setTimeout(function() {
|
|
1823
1655
|
if (!u && l && y.size === 1) {
|
|
1824
|
-
var
|
|
1825
|
-
var
|
|
1826
|
-
return
|
|
1656
|
+
var D = Array.from(y)[0], K = A.findIndex(function($) {
|
|
1657
|
+
var F = $.data;
|
|
1658
|
+
return F.value === D;
|
|
1827
1659
|
});
|
|
1828
|
-
|
|
1660
|
+
K !== -1 && (ie(K), j(K));
|
|
1829
1661
|
}
|
|
1830
1662
|
});
|
|
1831
1663
|
if (l) {
|
|
1832
|
-
var
|
|
1833
|
-
(
|
|
1664
|
+
var C;
|
|
1665
|
+
(C = U.current) === null || C === void 0 || C.scrollTo(void 0);
|
|
1834
1666
|
}
|
|
1835
1667
|
return function() {
|
|
1836
|
-
return clearTimeout(
|
|
1668
|
+
return clearTimeout(R);
|
|
1837
1669
|
};
|
|
1838
1670
|
}, [l, f]);
|
|
1839
|
-
var
|
|
1840
|
-
|
|
1841
|
-
selected: !y.has(
|
|
1671
|
+
var se = function(C) {
|
|
1672
|
+
C !== void 0 && h(C, {
|
|
1673
|
+
selected: !y.has(C)
|
|
1842
1674
|
}), u || v(!1);
|
|
1843
1675
|
};
|
|
1844
1676
|
if (o.useImperativeHandle(t, function() {
|
|
1845
1677
|
return {
|
|
1846
|
-
onKeyDown: function(
|
|
1847
|
-
var
|
|
1848
|
-
switch (
|
|
1849
|
-
case
|
|
1850
|
-
case
|
|
1851
|
-
case
|
|
1852
|
-
case
|
|
1853
|
-
var
|
|
1854
|
-
if (
|
|
1855
|
-
var
|
|
1856
|
-
j(
|
|
1678
|
+
onKeyDown: function(C) {
|
|
1679
|
+
var D = C.which, K = C.ctrlKey;
|
|
1680
|
+
switch (D) {
|
|
1681
|
+
case W.N:
|
|
1682
|
+
case W.P:
|
|
1683
|
+
case W.UP:
|
|
1684
|
+
case W.DOWN: {
|
|
1685
|
+
var $ = 0;
|
|
1686
|
+
if (D === W.UP ? $ = -1 : D === W.DOWN ? $ = 1 : zo() && K && (D === W.N ? $ = 1 : D === W.P && ($ = -1)), $ !== 0) {
|
|
1687
|
+
var F = Z(M + $, $);
|
|
1688
|
+
j(F), ie(F, !0);
|
|
1857
1689
|
}
|
|
1858
1690
|
break;
|
|
1859
1691
|
}
|
|
1860
|
-
case
|
|
1861
|
-
case
|
|
1862
|
-
var
|
|
1863
|
-
|
|
1692
|
+
case W.TAB:
|
|
1693
|
+
case W.ENTER: {
|
|
1694
|
+
var le, me = A[M];
|
|
1695
|
+
me && !(me != null && (le = me.data) !== null && le !== void 0 && le.disabled) && !Q ? se(me.value) : se(void 0), l && C.preventDefault();
|
|
1864
1696
|
break;
|
|
1865
1697
|
}
|
|
1866
|
-
case
|
|
1867
|
-
v(!1), l &&
|
|
1698
|
+
case W.ESC:
|
|
1699
|
+
v(!1), l && C.stopPropagation();
|
|
1868
1700
|
}
|
|
1869
1701
|
},
|
|
1870
1702
|
onKeyUp: function() {
|
|
1871
1703
|
},
|
|
1872
|
-
scrollTo: function(
|
|
1873
|
-
j(
|
|
1704
|
+
scrollTo: function(C) {
|
|
1705
|
+
j(C);
|
|
1874
1706
|
}
|
|
1875
1707
|
};
|
|
1876
|
-
}),
|
|
1708
|
+
}), A.length === 0)
|
|
1877
1709
|
return /* @__PURE__ */ o.createElement("div", {
|
|
1878
1710
|
role: "listbox",
|
|
1879
1711
|
id: "".concat(i, "_list"),
|
|
1880
|
-
className: "".concat(
|
|
1881
|
-
onMouseDown:
|
|
1712
|
+
className: "".concat(_, "-empty"),
|
|
1713
|
+
onMouseDown: G
|
|
1882
1714
|
}, s);
|
|
1883
|
-
var
|
|
1884
|
-
return
|
|
1885
|
-
}),
|
|
1886
|
-
return
|
|
1715
|
+
var ye = Object.keys(T).map(function(R) {
|
|
1716
|
+
return T[R];
|
|
1717
|
+
}), ge = function(C) {
|
|
1718
|
+
return C.label;
|
|
1887
1719
|
};
|
|
1888
|
-
function
|
|
1889
|
-
var
|
|
1720
|
+
function Re(R, C) {
|
|
1721
|
+
var D = R.group;
|
|
1890
1722
|
return {
|
|
1891
|
-
role:
|
|
1892
|
-
id: "".concat(i, "_list_").concat(
|
|
1723
|
+
role: D ? "presentation" : "option",
|
|
1724
|
+
id: "".concat(i, "_list_").concat(C)
|
|
1893
1725
|
};
|
|
1894
1726
|
}
|
|
1895
|
-
var
|
|
1896
|
-
var
|
|
1897
|
-
if (!
|
|
1727
|
+
var ce = function(C) {
|
|
1728
|
+
var D = A[C];
|
|
1729
|
+
if (!D)
|
|
1898
1730
|
return null;
|
|
1899
|
-
var
|
|
1900
|
-
return
|
|
1901
|
-
"aria-label": typeof
|
|
1902
|
-
},
|
|
1903
|
-
key:
|
|
1904
|
-
},
|
|
1905
|
-
"aria-selected":
|
|
1906
|
-
}),
|
|
1907
|
-
},
|
|
1731
|
+
var K = D.data || {}, $ = K.value, F = D.group, le = Fn(K, !0), me = ge(D);
|
|
1732
|
+
return D ? /* @__PURE__ */ o.createElement("div", on({
|
|
1733
|
+
"aria-label": typeof me == "string" && !F ? me : null
|
|
1734
|
+
}, le, {
|
|
1735
|
+
key: C
|
|
1736
|
+
}, Re(D, C), {
|
|
1737
|
+
"aria-selected": J($)
|
|
1738
|
+
}), $) : null;
|
|
1739
|
+
}, pe = {
|
|
1908
1740
|
role: "listbox",
|
|
1909
1741
|
id: "".concat(i, "_list")
|
|
1910
1742
|
};
|
|
1911
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, p && /* @__PURE__ */ o.createElement("div",
|
|
1743
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, p && /* @__PURE__ */ o.createElement("div", on({}, pe, {
|
|
1912
1744
|
style: {
|
|
1913
1745
|
height: 0,
|
|
1914
1746
|
width: 0,
|
|
1915
1747
|
overflow: "hidden"
|
|
1916
1748
|
}
|
|
1917
|
-
}),
|
|
1749
|
+
}), ce(M - 1), ce(M), ce(M + 1)), /* @__PURE__ */ o.createElement(kt, {
|
|
1918
1750
|
itemKey: "key",
|
|
1919
|
-
ref:
|
|
1920
|
-
data:
|
|
1921
|
-
height:
|
|
1922
|
-
itemHeight:
|
|
1751
|
+
ref: U,
|
|
1752
|
+
data: A,
|
|
1753
|
+
height: z,
|
|
1754
|
+
itemHeight: V,
|
|
1923
1755
|
fullHeight: !1,
|
|
1924
|
-
onMouseDown:
|
|
1925
|
-
onScroll:
|
|
1756
|
+
onMouseDown: G,
|
|
1757
|
+
onScroll: b,
|
|
1926
1758
|
virtual: p,
|
|
1927
|
-
direction:
|
|
1928
|
-
innerProps: p ? null :
|
|
1929
|
-
}, function(
|
|
1930
|
-
var
|
|
1931
|
-
if (
|
|
1932
|
-
var
|
|
1759
|
+
direction: E,
|
|
1760
|
+
innerProps: p ? null : pe
|
|
1761
|
+
}, function(R, C) {
|
|
1762
|
+
var D = R.group, K = R.groupOption, $ = R.data, F = R.label, le = R.value, me = $.key;
|
|
1763
|
+
if (D) {
|
|
1764
|
+
var re, we = (re = $.title) !== null && re !== void 0 ? re : Tt(F) ? F.toString() : void 0;
|
|
1933
1765
|
return /* @__PURE__ */ o.createElement("div", {
|
|
1934
|
-
className:
|
|
1935
|
-
title:
|
|
1936
|
-
},
|
|
1937
|
-
}
|
|
1938
|
-
var
|
|
1939
|
-
|
|
1940
|
-
var
|
|
1941
|
-
return
|
|
1942
|
-
"aria-selected":
|
|
1943
|
-
className:
|
|
1944
|
-
title:
|
|
1766
|
+
className: Be(_, "".concat(_, "-group"), $.className),
|
|
1767
|
+
title: we
|
|
1768
|
+
}, F !== void 0 ? F : me);
|
|
1769
|
+
}
|
|
1770
|
+
var ze = $.disabled, xe = $.title;
|
|
1771
|
+
$.children;
|
|
1772
|
+
var Ne = $.style, de = $.className, Ge = Cn($, Bo), Ye = jt(Ge, ye), Se = ne(le), Oe = ze || !Se && Q, Ce = "".concat(_, "-option"), $e = Be(_, Ce, de, ae(ae(ae(ae({}, "".concat(Ce, "-grouped"), K), "".concat(Ce, "-active"), M === C && !Oe), "".concat(Ce, "-disabled"), Oe), "".concat(Ce, "-selected"), Se)), Pe = ge(R), en = !I || typeof I == "function" || Se, je = typeof Pe == "number" ? Pe : Pe || le, Fe = Tt(je) ? je.toString() : void 0;
|
|
1773
|
+
return xe !== void 0 && (Fe = xe), /* @__PURE__ */ o.createElement("div", on({}, Fn(Ye), p ? {} : Re(R, C), {
|
|
1774
|
+
"aria-selected": J(le),
|
|
1775
|
+
className: $e,
|
|
1776
|
+
title: Fe,
|
|
1945
1777
|
onMouseMove: function() {
|
|
1946
|
-
|
|
1778
|
+
M === C || Oe || ie(C);
|
|
1947
1779
|
},
|
|
1948
1780
|
onClick: function() {
|
|
1949
|
-
|
|
1781
|
+
Oe || se(le);
|
|
1950
1782
|
},
|
|
1951
|
-
style:
|
|
1783
|
+
style: Ne
|
|
1952
1784
|
}), /* @__PURE__ */ o.createElement("div", {
|
|
1953
|
-
className: "".concat(
|
|
1954
|
-
}, typeof
|
|
1955
|
-
index:
|
|
1956
|
-
}) :
|
|
1957
|
-
className: "".concat(
|
|
1958
|
-
customizeIcon:
|
|
1785
|
+
className: "".concat(Ce, "-content")
|
|
1786
|
+
}, typeof q == "function" ? q(R, {
|
|
1787
|
+
index: C
|
|
1788
|
+
}) : je), /* @__PURE__ */ o.isValidElement(I) || Se, en && /* @__PURE__ */ o.createElement(Wn, {
|
|
1789
|
+
className: "".concat(_, "-option-state"),
|
|
1790
|
+
customizeIcon: I,
|
|
1959
1791
|
customizeIconProps: {
|
|
1960
|
-
value:
|
|
1961
|
-
disabled:
|
|
1962
|
-
isSelected:
|
|
1792
|
+
value: le,
|
|
1793
|
+
disabled: Oe,
|
|
1794
|
+
isSelected: Se
|
|
1963
1795
|
}
|
|
1964
|
-
},
|
|
1796
|
+
}, Se ? "✓" : null));
|
|
1965
1797
|
}));
|
|
1966
|
-
},
|
|
1967
|
-
process.env.NODE_ENV !== "production" && (
|
|
1968
|
-
const
|
|
1798
|
+
}, er = /* @__PURE__ */ o.forwardRef(Vo);
|
|
1799
|
+
process.env.NODE_ENV !== "production" && (er.displayName = "OptionList");
|
|
1800
|
+
const Fo = function(e, n) {
|
|
1969
1801
|
var t = o.useRef({
|
|
1970
1802
|
values: /* @__PURE__ */ new Map(),
|
|
1971
1803
|
options: /* @__PURE__ */ new Map()
|
|
1972
1804
|
}), r = o.useMemo(function() {
|
|
1973
1805
|
var i = t.current, l = i.values, u = i.options, d = e.map(function(s) {
|
|
1974
1806
|
if (s.label === void 0) {
|
|
1975
|
-
var
|
|
1807
|
+
var b;
|
|
1976
1808
|
return ee(ee({}, s), {}, {
|
|
1977
|
-
label: (
|
|
1809
|
+
label: (b = l.get(s.value)) === null || b === void 0 ? void 0 : b.label
|
|
1978
1810
|
});
|
|
1979
1811
|
}
|
|
1980
1812
|
return s;
|
|
@@ -1988,82 +1820,82 @@ const ko = function(e, n) {
|
|
|
1988
1820
|
return [r, a];
|
|
1989
1821
|
};
|
|
1990
1822
|
function Gn(e, n) {
|
|
1991
|
-
return
|
|
1823
|
+
return st(e).join("").toUpperCase().includes(n);
|
|
1992
1824
|
}
|
|
1993
|
-
const
|
|
1825
|
+
const Ao = function(e, n, t, r, a) {
|
|
1994
1826
|
return o.useMemo(function() {
|
|
1995
1827
|
if (!t || r === !1)
|
|
1996
1828
|
return e;
|
|
1997
1829
|
var i = n.options, l = n.label, u = n.value, d = [], f = typeof r == "function", v = t.toUpperCase(), s = f ? r : function(c, g) {
|
|
1998
1830
|
return a ? Gn(g[a], v) : g[i] ? Gn(g[l !== "children" ? l : "label"], v) : Gn(g[u], v);
|
|
1999
|
-
},
|
|
2000
|
-
return
|
|
1831
|
+
}, b = f ? function(c) {
|
|
1832
|
+
return nt(c);
|
|
2001
1833
|
} : function(c) {
|
|
2002
1834
|
return c;
|
|
2003
1835
|
};
|
|
2004
1836
|
return e.forEach(function(c) {
|
|
2005
1837
|
if (c[i]) {
|
|
2006
|
-
var g = s(t,
|
|
1838
|
+
var g = s(t, b(c));
|
|
2007
1839
|
if (g)
|
|
2008
1840
|
d.push(c);
|
|
2009
1841
|
else {
|
|
2010
1842
|
var m = c[i].filter(function(S) {
|
|
2011
|
-
return s(t,
|
|
1843
|
+
return s(t, b(S));
|
|
2012
1844
|
});
|
|
2013
1845
|
m.length && d.push(ee(ee({}, c), {}, ae({}, i, m)));
|
|
2014
1846
|
}
|
|
2015
1847
|
return;
|
|
2016
1848
|
}
|
|
2017
|
-
s(t,
|
|
1849
|
+
s(t, b(c)) && d.push(c);
|
|
2018
1850
|
}), d;
|
|
2019
1851
|
}, [e, r, a, t, n]);
|
|
2020
1852
|
};
|
|
2021
|
-
var
|
|
2022
|
-
function
|
|
1853
|
+
var Lt = 0, jo = process.env.NODE_ENV !== "test" && br();
|
|
1854
|
+
function Wo() {
|
|
2023
1855
|
var e;
|
|
2024
|
-
return
|
|
1856
|
+
return jo ? (e = Lt, Lt += 1) : e = "TEST_OR_SSR", e;
|
|
2025
1857
|
}
|
|
2026
|
-
function
|
|
2027
|
-
var n = o.useState(), t =
|
|
1858
|
+
function Ko(e) {
|
|
1859
|
+
var n = o.useState(), t = te(n, 2), r = t[0], a = t[1];
|
|
2028
1860
|
return o.useEffect(function() {
|
|
2029
|
-
a("rc_select_".concat(
|
|
1861
|
+
a("rc_select_".concat(Wo()));
|
|
2030
1862
|
}, []), e || r;
|
|
2031
1863
|
}
|
|
2032
|
-
var
|
|
2033
|
-
function
|
|
2034
|
-
var n = e, t = n.key, r = n.props, a = r.children, i = r.value, l =
|
|
1864
|
+
var Xo = ["children", "value"], Uo = ["children"];
|
|
1865
|
+
function Go(e) {
|
|
1866
|
+
var n = e, t = n.key, r = n.props, a = r.children, i = r.value, l = Cn(r, Xo);
|
|
2035
1867
|
return ee({
|
|
2036
1868
|
key: t,
|
|
2037
1869
|
value: i !== void 0 ? i : t,
|
|
2038
1870
|
children: a
|
|
2039
1871
|
}, l);
|
|
2040
1872
|
}
|
|
2041
|
-
function
|
|
1873
|
+
function vt(e) {
|
|
2042
1874
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2043
|
-
return
|
|
1875
|
+
return kn(e).map(function(t, r) {
|
|
2044
1876
|
if (!/* @__PURE__ */ o.isValidElement(t) || !t.type)
|
|
2045
1877
|
return null;
|
|
2046
|
-
var a = t, i = a.type.isSelectOptGroup, l = a.key, u = a.props, d = u.children, f =
|
|
2047
|
-
return n || !i ?
|
|
1878
|
+
var a = t, i = a.type.isSelectOptGroup, l = a.key, u = a.props, d = u.children, f = Cn(u, Uo);
|
|
1879
|
+
return n || !i ? Go(t) : ee(ee({
|
|
2048
1880
|
key: "__RC_SELECT_GRP__".concat(l === null ? r : l, "__"),
|
|
2049
1881
|
label: l
|
|
2050
1882
|
}, f), {}, {
|
|
2051
|
-
options:
|
|
1883
|
+
options: vt(d)
|
|
2052
1884
|
});
|
|
2053
1885
|
}).filter(function(t) {
|
|
2054
1886
|
return t;
|
|
2055
1887
|
});
|
|
2056
1888
|
}
|
|
2057
|
-
var
|
|
1889
|
+
var Yo = function(n, t, r, a, i) {
|
|
2058
1890
|
return o.useMemo(function() {
|
|
2059
1891
|
var l = n, u = !n;
|
|
2060
|
-
u && (l =
|
|
1892
|
+
u && (l = vt(t));
|
|
2061
1893
|
var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), v = function(c, g, m) {
|
|
2062
1894
|
m && typeof m == "string" && c.set(g[m], g);
|
|
2063
|
-
}, s = function
|
|
1895
|
+
}, s = function b(c) {
|
|
2064
1896
|
for (var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, m = 0; m < c.length; m += 1) {
|
|
2065
1897
|
var S = c[m];
|
|
2066
|
-
!S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S, i)) :
|
|
1898
|
+
!S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S, i)) : b(S[r.options], !0);
|
|
2067
1899
|
}
|
|
2068
1900
|
};
|
|
2069
1901
|
return s(l), {
|
|
@@ -2073,7 +1905,7 @@ var la = function(n, t, r, a, i) {
|
|
|
2073
1905
|
};
|
|
2074
1906
|
}, [n, t, r, a, i]);
|
|
2075
1907
|
};
|
|
2076
|
-
function
|
|
1908
|
+
function Ht(e) {
|
|
2077
1909
|
var n = o.useRef();
|
|
2078
1910
|
n.current = e;
|
|
2079
1911
|
var t = o.useCallback(function() {
|
|
@@ -2081,43 +1913,43 @@ function zt(e) {
|
|
|
2081
1913
|
}, []);
|
|
2082
1914
|
return t;
|
|
2083
1915
|
}
|
|
2084
|
-
function
|
|
2085
|
-
var n = e.mode, t = e.options, r = e.children, a = e.backfill, i = e.allowClear, l = e.placeholder, u = e.getInputElement, d = e.showSearch, f = e.onSearch, v = e.defaultOpen, s = e.autoFocus,
|
|
2086
|
-
if (Ue(n !== "tags" ||
|
|
1916
|
+
function qo(e) {
|
|
1917
|
+
var n = e.mode, t = e.options, r = e.children, a = e.backfill, i = e.allowClear, l = e.placeholder, u = e.getInputElement, d = e.showSearch, f = e.onSearch, v = e.defaultOpen, s = e.autoFocus, b = e.labelInValue, c = e.value, g = e.inputValue, m = e.optionLabelProp, S = An(n), w = d !== void 0 ? d : S || n === "combobox", h = t || vt(r);
|
|
1918
|
+
if (Ue(n !== "tags" || h.every(function(p) {
|
|
2087
1919
|
return !p.disabled;
|
|
2088
1920
|
}), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), n === "tags" || n === "combobox") {
|
|
2089
|
-
var
|
|
2090
|
-
return p.options ? p.options.some(function(
|
|
2091
|
-
return typeof ("value" in
|
|
1921
|
+
var I = h.some(function(p) {
|
|
1922
|
+
return p.options ? p.options.some(function(E) {
|
|
1923
|
+
return typeof ("value" in E ? E.value : E.key) == "number";
|
|
2092
1924
|
}) : typeof ("value" in p ? p.value : p.key) == "number";
|
|
2093
1925
|
});
|
|
2094
|
-
Ue(!
|
|
1926
|
+
Ue(!I, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
|
|
2095
1927
|
}
|
|
2096
1928
|
if (Ue(n !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(n === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(n === "combobox" || !u, "`getInputElement` only work with `combobox` mode."), wt(n !== "combobox" || !u || !i || !l, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), f && !w && n !== "combobox" && n !== "tags" && Ue(!1, "`onSearch` should work with `showSearch` instead of use alone."), wt(!v || s, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), c != null) {
|
|
2097
|
-
var y =
|
|
2098
|
-
Ue(!
|
|
1929
|
+
var y = st(c);
|
|
1930
|
+
Ue(!b || y.every(function(p) {
|
|
2099
1931
|
return pn(p) === "object" && ("key" in p || "value" in p);
|
|
2100
1932
|
}), "`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"), Ue(!S || Array.isArray(c), "`value` should be array when `mode` is `multiple` or `tags`");
|
|
2101
1933
|
}
|
|
2102
1934
|
if (r) {
|
|
2103
|
-
var
|
|
2104
|
-
|
|
1935
|
+
var T = null;
|
|
1936
|
+
kn(r).some(function(p) {
|
|
2105
1937
|
if (!/* @__PURE__ */ o.isValidElement(p) || !p.type)
|
|
2106
1938
|
return !1;
|
|
2107
|
-
var
|
|
2108
|
-
if (
|
|
1939
|
+
var E = p, z = E.type;
|
|
1940
|
+
if (z.isSelectOption)
|
|
2109
1941
|
return !1;
|
|
2110
|
-
if (
|
|
2111
|
-
var
|
|
2112
|
-
return !/* @__PURE__ */ o.isValidElement(
|
|
1942
|
+
if (z.isSelectOptGroup) {
|
|
1943
|
+
var V = kn(p.props.children).every(function(q) {
|
|
1944
|
+
return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (T = q.type, !1);
|
|
2113
1945
|
});
|
|
2114
|
-
return !
|
|
1946
|
+
return !V;
|
|
2115
1947
|
}
|
|
2116
|
-
return
|
|
2117
|
-
}),
|
|
1948
|
+
return T = z, !0;
|
|
1949
|
+
}), T && Ue(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(T.displayName || T.name || T, "`.")), Ue(g === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
|
|
2118
1950
|
}
|
|
2119
1951
|
}
|
|
2120
|
-
function
|
|
1952
|
+
function Qo(e, n) {
|
|
2121
1953
|
if (e) {
|
|
2122
1954
|
var t = function r(a) {
|
|
2123
1955
|
for (var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l = 0; l < a.length; l++) {
|
|
@@ -2131,241 +1963,241 @@ function ca(e, n) {
|
|
|
2131
1963
|
t(e);
|
|
2132
1964
|
}
|
|
2133
1965
|
}
|
|
2134
|
-
var
|
|
2135
|
-
function
|
|
1966
|
+
var Zo = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], Jo = ["inputValue"];
|
|
1967
|
+
function ko(e) {
|
|
2136
1968
|
return !e || pn(e) !== "object";
|
|
2137
1969
|
}
|
|
2138
|
-
var
|
|
2139
|
-
var t = e.id, r = e.mode, a = e.prefixCls, i = a === void 0 ? "rc-select" : a, l = e.backfill, u = e.fieldNames, d = e.inputValue, f = e.searchValue, v = e.onSearch, s = e.autoClearSearchValue,
|
|
1970
|
+
var nr = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
1971
|
+
var t = e.id, r = e.mode, a = e.prefixCls, i = a === void 0 ? "rc-select" : a, l = e.backfill, u = e.fieldNames, d = e.inputValue, f = e.searchValue, v = e.onSearch, s = e.autoClearSearchValue, b = s === void 0 ? !0 : s, c = e.onSelect, g = e.onDeselect, m = e.dropdownMatchSelectWidth, S = m === void 0 ? !0 : m, w = e.filterOption, h = e.filterSort, I = e.optionFilterProp, y = e.optionLabelProp, T = e.options, p = e.optionRender, E = e.children, z = e.defaultActiveFirstOption, V = e.menuItemSelectedIcon, q = e.virtual, _ = e.direction, A = e.listHeight, U = A === void 0 ? 200 : A, Q = e.listItemHeight, G = Q === void 0 ? 20 : Q, j = e.labelRender, ne = e.value, Z = e.defaultValue, Y = e.labelInValue, x = e.onChange, M = e.maxCount, fe = Cn(e, Zo), ie = Ko(t), J = An(r), se = !!(!T && E), ye = o.useMemo(function() {
|
|
2140
1972
|
return w === void 0 && r === "combobox" ? !1 : w;
|
|
2141
|
-
}, [w, r]),
|
|
1973
|
+
}, [w, r]), ge = o.useMemo(
|
|
2142
1974
|
function() {
|
|
2143
|
-
return
|
|
1975
|
+
return qt(u, se);
|
|
2144
1976
|
},
|
|
2145
1977
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2146
1978
|
[
|
|
2147
1979
|
// We stringify fieldNames to avoid unnecessary re-renders.
|
|
2148
1980
|
JSON.stringify(u),
|
|
2149
|
-
|
|
1981
|
+
se
|
|
2150
1982
|
]
|
|
2151
1983
|
/* eslint-enable react-hooks/exhaustive-deps */
|
|
2152
|
-
),
|
|
1984
|
+
), Re = Jn("", {
|
|
2153
1985
|
value: f !== void 0 ? f : d,
|
|
2154
1986
|
postState: function(B) {
|
|
2155
1987
|
return B || "";
|
|
2156
1988
|
}
|
|
2157
|
-
}),
|
|
2158
|
-
var B =
|
|
2159
|
-
return B.map(function(
|
|
2160
|
-
var H,
|
|
2161
|
-
if (
|
|
2162
|
-
H =
|
|
1989
|
+
}), ce = te(Re, 2), pe = ce[0], R = ce[1], C = Yo(T, E, ge, I, y), D = C.valueOptions, K = C.labelOptions, $ = C.options, F = o.useCallback(function(N) {
|
|
1990
|
+
var B = st(N);
|
|
1991
|
+
return B.map(function(L) {
|
|
1992
|
+
var H, oe, be, Ze, We;
|
|
1993
|
+
if (ko(L))
|
|
1994
|
+
H = L;
|
|
2163
1995
|
else {
|
|
2164
|
-
var
|
|
2165
|
-
|
|
1996
|
+
var nn;
|
|
1997
|
+
be = L.key, oe = L.label, H = (nn = L.value) !== null && nn !== void 0 ? nn : be;
|
|
2166
1998
|
}
|
|
2167
|
-
var
|
|
2168
|
-
if (
|
|
1999
|
+
var Ee = D.get(H);
|
|
2000
|
+
if (Ee) {
|
|
2169
2001
|
var tn;
|
|
2170
|
-
if (
|
|
2171
|
-
var
|
|
2172
|
-
|
|
2002
|
+
if (oe === void 0 && (oe = Ee == null ? void 0 : Ee[y || ge.label]), be === void 0 && (be = (tn = Ee == null ? void 0 : Ee.key) !== null && tn !== void 0 ? tn : H), Ze = Ee == null ? void 0 : Ee.disabled, We = Ee == null ? void 0 : Ee.title, process.env.NODE_ENV !== "production" && !y) {
|
|
2003
|
+
var Je = Ee == null ? void 0 : Ee[ge.label];
|
|
2004
|
+
Je !== void 0 && !/* @__PURE__ */ o.isValidElement(Je) && !/* @__PURE__ */ o.isValidElement(oe) && Je !== oe && Ue(!1, "`label` of `value` is not same as `label` in Select options.");
|
|
2173
2005
|
}
|
|
2174
2006
|
}
|
|
2175
2007
|
return {
|
|
2176
|
-
label:
|
|
2008
|
+
label: oe,
|
|
2177
2009
|
value: H,
|
|
2178
|
-
key:
|
|
2179
|
-
disabled:
|
|
2180
|
-
title:
|
|
2010
|
+
key: be,
|
|
2011
|
+
disabled: Ze,
|
|
2012
|
+
title: We
|
|
2181
2013
|
};
|
|
2182
2014
|
});
|
|
2183
|
-
}, [
|
|
2184
|
-
value:
|
|
2185
|
-
}),
|
|
2186
|
-
var
|
|
2187
|
-
return r === "combobox" &&
|
|
2188
|
-
}, [
|
|
2189
|
-
if (!r &&
|
|
2190
|
-
var
|
|
2191
|
-
if (
|
|
2015
|
+
}, [ge, y, D]), le = Jn(Z, {
|
|
2016
|
+
value: ne
|
|
2017
|
+
}), me = te(le, 2), re = me[0], we = me[1], ze = o.useMemo(function() {
|
|
2018
|
+
var N, B = J && re === null ? [] : re, L = F(B);
|
|
2019
|
+
return r === "combobox" && io((N = L[0]) === null || N === void 0 ? void 0 : N.value) ? [] : L;
|
|
2020
|
+
}, [re, F, r, J]), xe = Fo(ze, D), Ne = te(xe, 2), de = Ne[0], Ge = Ne[1], Ye = o.useMemo(function() {
|
|
2021
|
+
if (!r && de.length === 1) {
|
|
2022
|
+
var N = de[0];
|
|
2023
|
+
if (N.value === null && (N.label === null || N.label === void 0))
|
|
2192
2024
|
return [];
|
|
2193
2025
|
}
|
|
2194
|
-
return
|
|
2195
|
-
var
|
|
2026
|
+
return de.map(function(B) {
|
|
2027
|
+
var L;
|
|
2196
2028
|
return ee(ee({}, B), {}, {
|
|
2197
|
-
label: (
|
|
2029
|
+
label: (L = typeof j == "function" ? j(B) : B.label) !== null && L !== void 0 ? L : B.value
|
|
2198
2030
|
});
|
|
2199
2031
|
});
|
|
2200
|
-
}, [r,
|
|
2201
|
-
return new Set(
|
|
2202
|
-
return
|
|
2032
|
+
}, [r, de, j]), Se = o.useMemo(function() {
|
|
2033
|
+
return new Set(de.map(function(N) {
|
|
2034
|
+
return N.value;
|
|
2203
2035
|
}));
|
|
2204
|
-
}, [
|
|
2036
|
+
}, [de]);
|
|
2205
2037
|
o.useEffect(function() {
|
|
2206
2038
|
if (r === "combobox") {
|
|
2207
|
-
var
|
|
2208
|
-
|
|
2209
|
-
}
|
|
2210
|
-
}, [
|
|
2211
|
-
var
|
|
2212
|
-
var
|
|
2213
|
-
return ae(ae({},
|
|
2214
|
-
}),
|
|
2039
|
+
var N, B = (N = de[0]) === null || N === void 0 ? void 0 : N.value;
|
|
2040
|
+
R(ao(B) ? String(B) : "");
|
|
2041
|
+
}
|
|
2042
|
+
}, [de]);
|
|
2043
|
+
var Oe = Ht(function(N, B) {
|
|
2044
|
+
var L = B ?? N;
|
|
2045
|
+
return ae(ae({}, ge.value, N), ge.label, L);
|
|
2046
|
+
}), Ce = o.useMemo(function() {
|
|
2215
2047
|
if (r !== "tags")
|
|
2216
|
-
return
|
|
2217
|
-
var
|
|
2218
|
-
return
|
|
2048
|
+
return $;
|
|
2049
|
+
var N = qe($), B = function(H) {
|
|
2050
|
+
return D.has(H);
|
|
2219
2051
|
};
|
|
2220
|
-
return
|
|
2221
|
-
return
|
|
2222
|
-
}).forEach(function(
|
|
2223
|
-
var H =
|
|
2224
|
-
B(H) ||
|
|
2225
|
-
}),
|
|
2226
|
-
}, [
|
|
2227
|
-
return r !== "tags" || !
|
|
2228
|
-
return
|
|
2229
|
-
}) ||
|
|
2230
|
-
return
|
|
2231
|
-
}) ?
|
|
2232
|
-
}, [
|
|
2233
|
-
var
|
|
2234
|
-
return
|
|
2235
|
-
searchValue:
|
|
2052
|
+
return qe(de).sort(function(L, H) {
|
|
2053
|
+
return L.value < H.value ? -1 : 1;
|
|
2054
|
+
}).forEach(function(L) {
|
|
2055
|
+
var H = L.value;
|
|
2056
|
+
B(H) || N.push(Oe(H, L.label));
|
|
2057
|
+
}), N;
|
|
2058
|
+
}, [Oe, $, D, de, r]), $e = Ao(Ce, ge, pe, ye, I), Pe = o.useMemo(function() {
|
|
2059
|
+
return r !== "tags" || !pe || $e.some(function(N) {
|
|
2060
|
+
return N[I || "value"] === pe;
|
|
2061
|
+
}) || $e.some(function(N) {
|
|
2062
|
+
return N[ge.value] === pe;
|
|
2063
|
+
}) ? $e : [Oe(pe)].concat(qe($e));
|
|
2064
|
+
}, [Oe, I, r, $e, pe, ge]), en = function N(B) {
|
|
2065
|
+
var L = qe(B).sort(function(H, oe) {
|
|
2066
|
+
return h(H, oe, {
|
|
2067
|
+
searchValue: pe
|
|
2236
2068
|
});
|
|
2237
2069
|
});
|
|
2238
|
-
return
|
|
2070
|
+
return L.map(function(H) {
|
|
2239
2071
|
return Array.isArray(H.options) ? ee(ee({}, H), {}, {
|
|
2240
|
-
options: H.options.length > 0 ?
|
|
2072
|
+
options: H.options.length > 0 ? N(H.options) : H.options
|
|
2241
2073
|
}) : H;
|
|
2242
2074
|
});
|
|
2243
|
-
},
|
|
2244
|
-
return
|
|
2245
|
-
}, [
|
|
2246
|
-
return
|
|
2247
|
-
fieldNames:
|
|
2248
|
-
childrenAsData:
|
|
2075
|
+
}, je = o.useMemo(function() {
|
|
2076
|
+
return h ? en(Pe) : Pe;
|
|
2077
|
+
}, [Pe, h, pe]), Fe = o.useMemo(function() {
|
|
2078
|
+
return po(je, {
|
|
2079
|
+
fieldNames: ge,
|
|
2080
|
+
childrenAsData: se
|
|
2249
2081
|
});
|
|
2250
|
-
}, [
|
|
2251
|
-
var
|
|
2252
|
-
if (
|
|
2253
|
-
(
|
|
2254
|
-
var
|
|
2255
|
-
return ((
|
|
2082
|
+
}, [je, ge, se]), Ie = function(B) {
|
|
2083
|
+
var L = F(B);
|
|
2084
|
+
if (we(L), x && // Trigger event only when value changed
|
|
2085
|
+
(L.length !== de.length || L.some(function(be, Ze) {
|
|
2086
|
+
var We;
|
|
2087
|
+
return ((We = de[Ze]) === null || We === void 0 ? void 0 : We.value) !== (be == null ? void 0 : be.value);
|
|
2256
2088
|
}))) {
|
|
2257
|
-
var H =
|
|
2258
|
-
return
|
|
2259
|
-
}),
|
|
2260
|
-
return
|
|
2089
|
+
var H = Y ? L : L.map(function(be) {
|
|
2090
|
+
return be.value;
|
|
2091
|
+
}), oe = L.map(function(be) {
|
|
2092
|
+
return nt(Ge(be.value));
|
|
2261
2093
|
});
|
|
2262
|
-
|
|
2094
|
+
x(
|
|
2263
2095
|
// Value
|
|
2264
|
-
|
|
2096
|
+
J ? H : H[0],
|
|
2265
2097
|
// Option
|
|
2266
|
-
|
|
2098
|
+
J ? oe : oe[0]
|
|
2267
2099
|
);
|
|
2268
2100
|
}
|
|
2269
|
-
},
|
|
2270
|
-
var
|
|
2271
|
-
|
|
2272
|
-
}, [l, r]),
|
|
2273
|
-
var
|
|
2274
|
-
var
|
|
2275
|
-
return [
|
|
2276
|
-
label:
|
|
2101
|
+
}, hn = o.useState(null), Ae = te(hn, 2), _e = Ae[0], De = Ae[1], Nn = o.useState(0), En = te(Nn, 2), dn = En[0], bn = En[1], xn = z !== void 0 ? z : r !== "combobox", cn = o.useCallback(function(N, B) {
|
|
2102
|
+
var L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, H = L.source, oe = H === void 0 ? "keyboard" : H;
|
|
2103
|
+
bn(B), l && r === "combobox" && N !== null && oe === "keyboard" && De(String(N));
|
|
2104
|
+
}, [l, r]), Qe = function(B, L, H) {
|
|
2105
|
+
var oe = function() {
|
|
2106
|
+
var rn, ke = Ge(B);
|
|
2107
|
+
return [Y ? {
|
|
2108
|
+
label: ke == null ? void 0 : ke[ge.label],
|
|
2277
2109
|
value: B,
|
|
2278
|
-
key: (
|
|
2279
|
-
} : B,
|
|
2110
|
+
key: (rn = ke == null ? void 0 : ke.key) !== null && rn !== void 0 ? rn : B
|
|
2111
|
+
} : B, nt(ke)];
|
|
2280
2112
|
};
|
|
2281
|
-
if (
|
|
2282
|
-
var
|
|
2283
|
-
c(
|
|
2284
|
-
} else if (!
|
|
2285
|
-
var
|
|
2286
|
-
g(
|
|
2287
|
-
}
|
|
2288
|
-
},
|
|
2289
|
-
var
|
|
2290
|
-
H ?
|
|
2291
|
-
return
|
|
2292
|
-
}),
|
|
2293
|
-
}),
|
|
2294
|
-
|
|
2295
|
-
var H =
|
|
2296
|
-
(H === "remove" || H === "clear") &&
|
|
2297
|
-
|
|
2113
|
+
if (L && c) {
|
|
2114
|
+
var be = oe(), Ze = te(be, 2), We = Ze[0], nn = Ze[1];
|
|
2115
|
+
c(We, nn);
|
|
2116
|
+
} else if (!L && g && H !== "clear") {
|
|
2117
|
+
var Ee = oe(), tn = te(Ee, 2), Je = tn[0], Pn = tn[1];
|
|
2118
|
+
g(Je, Pn);
|
|
2119
|
+
}
|
|
2120
|
+
}, fn = Ht(function(N, B) {
|
|
2121
|
+
var L, H = J ? B.selected : !0;
|
|
2122
|
+
H ? L = J ? [].concat(qe(de), [N]) : [N] : L = de.filter(function(oe) {
|
|
2123
|
+
return oe.value !== N;
|
|
2124
|
+
}), Ie(L), Qe(N, H), r === "combobox" ? De("") : (!An || b) && (R(""), De(""));
|
|
2125
|
+
}), mn = function(B, L) {
|
|
2126
|
+
Ie(B);
|
|
2127
|
+
var H = L.type, oe = L.values;
|
|
2128
|
+
(H === "remove" || H === "clear") && oe.forEach(function(be) {
|
|
2129
|
+
Qe(be.value, !1, H);
|
|
2298
2130
|
});
|
|
2299
|
-
},
|
|
2300
|
-
if (
|
|
2131
|
+
}, Me = function(B, L) {
|
|
2132
|
+
if (R(B), De(null), L.source === "submit") {
|
|
2301
2133
|
var H = (B || "").trim();
|
|
2302
2134
|
if (H) {
|
|
2303
|
-
var
|
|
2304
|
-
|
|
2135
|
+
var oe = Array.from(new Set([].concat(qe(Se), [H])));
|
|
2136
|
+
Ie(oe), Qe(H, !0), R("");
|
|
2305
2137
|
}
|
|
2306
2138
|
return;
|
|
2307
2139
|
}
|
|
2308
|
-
|
|
2309
|
-
},
|
|
2310
|
-
var
|
|
2311
|
-
r !== "tags" && (
|
|
2312
|
-
var
|
|
2313
|
-
return
|
|
2314
|
-
}).filter(function(
|
|
2315
|
-
return
|
|
2140
|
+
L.source !== "blur" && (r === "combobox" && Ie(B), v == null || v(B));
|
|
2141
|
+
}, vn = function(B) {
|
|
2142
|
+
var L = B;
|
|
2143
|
+
r !== "tags" && (L = B.map(function(oe) {
|
|
2144
|
+
var be = K.get(oe);
|
|
2145
|
+
return be == null ? void 0 : be.value;
|
|
2146
|
+
}).filter(function(oe) {
|
|
2147
|
+
return oe !== void 0;
|
|
2316
2148
|
}));
|
|
2317
|
-
var H = Array.from(new Set([].concat(
|
|
2318
|
-
|
|
2319
|
-
|
|
2149
|
+
var H = Array.from(new Set([].concat(qe(Se), qe(L))));
|
|
2150
|
+
Ie(H), H.forEach(function(oe) {
|
|
2151
|
+
Qe(oe, !0);
|
|
2320
2152
|
});
|
|
2321
|
-
},
|
|
2322
|
-
var
|
|
2323
|
-
return ee(ee({},
|
|
2324
|
-
flattenOptions:
|
|
2325
|
-
onActiveValue:
|
|
2326
|
-
defaultActiveFirstOption:
|
|
2327
|
-
onSelect:
|
|
2328
|
-
menuItemSelectedIcon:
|
|
2329
|
-
rawValues:
|
|
2330
|
-
fieldNames:
|
|
2331
|
-
virtual:
|
|
2332
|
-
direction:
|
|
2333
|
-
listHeight:
|
|
2334
|
-
listItemHeight:
|
|
2335
|
-
childrenAsData:
|
|
2336
|
-
maxCount:
|
|
2153
|
+
}, an = o.useMemo(function() {
|
|
2154
|
+
var N = q !== !1 && S !== !1;
|
|
2155
|
+
return ee(ee({}, C), {}, {
|
|
2156
|
+
flattenOptions: Fe,
|
|
2157
|
+
onActiveValue: cn,
|
|
2158
|
+
defaultActiveFirstOption: xn,
|
|
2159
|
+
onSelect: fn,
|
|
2160
|
+
menuItemSelectedIcon: V,
|
|
2161
|
+
rawValues: Se,
|
|
2162
|
+
fieldNames: ge,
|
|
2163
|
+
virtual: N,
|
|
2164
|
+
direction: _,
|
|
2165
|
+
listHeight: U,
|
|
2166
|
+
listItemHeight: G,
|
|
2167
|
+
childrenAsData: se,
|
|
2168
|
+
maxCount: M,
|
|
2337
2169
|
optionRender: p
|
|
2338
2170
|
});
|
|
2339
|
-
}, [
|
|
2340
|
-
return process.env.NODE_ENV !== "production" && (
|
|
2341
|
-
value:
|
|
2342
|
-
}, /* @__PURE__ */ o.createElement(
|
|
2171
|
+
}, [M, C, Fe, cn, xn, fn, V, Se, ge, q, S, _, U, G, se, p]);
|
|
2172
|
+
return process.env.NODE_ENV !== "production" && (qo(e), Qo($, ge)), /* @__PURE__ */ o.createElement(dt.Provider, {
|
|
2173
|
+
value: an
|
|
2174
|
+
}, /* @__PURE__ */ o.createElement(Qt, on({}, fe, {
|
|
2343
2175
|
// >>> MISC
|
|
2344
|
-
id:
|
|
2176
|
+
id: ie,
|
|
2345
2177
|
prefixCls: i,
|
|
2346
2178
|
ref: n,
|
|
2347
|
-
omitDomProps:
|
|
2179
|
+
omitDomProps: Jo,
|
|
2348
2180
|
mode: r,
|
|
2349
|
-
displayValues:
|
|
2350
|
-
onDisplayValuesChange:
|
|
2351
|
-
direction:
|
|
2352
|
-
searchValue:
|
|
2353
|
-
onSearch:
|
|
2354
|
-
autoClearSearchValue:
|
|
2355
|
-
onSearchSplit:
|
|
2181
|
+
displayValues: Ye,
|
|
2182
|
+
onDisplayValuesChange: mn,
|
|
2183
|
+
direction: _,
|
|
2184
|
+
searchValue: pe,
|
|
2185
|
+
onSearch: Me,
|
|
2186
|
+
autoClearSearchValue: b,
|
|
2187
|
+
onSearchSplit: vn,
|
|
2356
2188
|
dropdownMatchSelectWidth: S,
|
|
2357
|
-
OptionList:
|
|
2358
|
-
emptyOptions: !
|
|
2359
|
-
activeValue:
|
|
2360
|
-
activeDescendantId: "".concat(
|
|
2189
|
+
OptionList: er,
|
|
2190
|
+
emptyOptions: !Fe.length,
|
|
2191
|
+
activeValue: _e,
|
|
2192
|
+
activeDescendantId: "".concat(ie, "_list_").concat(dn)
|
|
2361
2193
|
})));
|
|
2362
2194
|
});
|
|
2363
|
-
process.env.NODE_ENV !== "production" && (
|
|
2364
|
-
var
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
const
|
|
2368
|
-
const [, e] = ot(), [n] =
|
|
2195
|
+
process.env.NODE_ENV !== "production" && (nr.displayName = "Select");
|
|
2196
|
+
var gt = nr;
|
|
2197
|
+
gt.Option = mt;
|
|
2198
|
+
gt.OptGroup = ft;
|
|
2199
|
+
const tr = () => {
|
|
2200
|
+
const [, e] = ot(), [n] = ut("Empty"), r = new Vn(e.colorBgBase).toHsl().l < 0.5 ? {
|
|
2369
2201
|
opacity: 0.65
|
|
2370
2202
|
} : {};
|
|
2371
2203
|
return /* @__PURE__ */ o.createElement("svg", {
|
|
@@ -2414,9 +2246,9 @@ const nr = () => {
|
|
|
2414
2246
|
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
|
|
2415
2247
|
}))));
|
|
2416
2248
|
};
|
|
2417
|
-
process.env.NODE_ENV !== "production" && (
|
|
2418
|
-
const
|
|
2419
|
-
const [, e] = ot(), [n] =
|
|
2249
|
+
process.env.NODE_ENV !== "production" && (tr.displayName = "EmptyImage");
|
|
2250
|
+
const rr = () => {
|
|
2251
|
+
const [, e] = ot(), [n] = ut("Empty"), {
|
|
2420
2252
|
colorFill: t,
|
|
2421
2253
|
colorFillTertiary: r,
|
|
2422
2254
|
colorFillQuaternary: a,
|
|
@@ -2425,7 +2257,7 @@ const tr = () => {
|
|
|
2425
2257
|
borderColor: l,
|
|
2426
2258
|
shadowColor: u,
|
|
2427
2259
|
contentColor: d
|
|
2428
|
-
} =
|
|
2260
|
+
} = gr(() => ({
|
|
2429
2261
|
borderColor: new Vn(t).onBackground(i).toHexString(),
|
|
2430
2262
|
shadowColor: new Vn(r).onBackground(i).toHexString(),
|
|
2431
2263
|
contentColor: new Vn(a).onBackground(i).toHexString()
|
|
@@ -2455,8 +2287,8 @@ const tr = () => {
|
|
|
2455
2287
|
fill: d
|
|
2456
2288
|
}))));
|
|
2457
2289
|
};
|
|
2458
|
-
process.env.NODE_ENV !== "production" && (
|
|
2459
|
-
const
|
|
2290
|
+
process.env.NODE_ENV !== "production" && (rr.displayName = "SimpleImage");
|
|
2291
|
+
const ea = (e) => {
|
|
2460
2292
|
const {
|
|
2461
2293
|
componentCls: n,
|
|
2462
2294
|
margin: t,
|
|
@@ -2511,85 +2343,85 @@ const ma = (e) => {
|
|
|
2511
2343
|
}
|
|
2512
2344
|
}
|
|
2513
2345
|
};
|
|
2514
|
-
},
|
|
2346
|
+
}, na = Ft("Empty", (e) => {
|
|
2515
2347
|
const {
|
|
2516
2348
|
componentCls: n,
|
|
2517
2349
|
controlHeightLG: t,
|
|
2518
2350
|
calc: r
|
|
2519
|
-
} = e, a =
|
|
2351
|
+
} = e, a = Dn(e, {
|
|
2520
2352
|
emptyImgCls: `${n}-img`,
|
|
2521
2353
|
emptyImgHeight: r(t).mul(2.5).equal(),
|
|
2522
2354
|
emptyImgHeightMD: t,
|
|
2523
2355
|
emptyImgHeightSM: r(t).mul(0.875).equal()
|
|
2524
2356
|
});
|
|
2525
|
-
return [
|
|
2357
|
+
return [ea(a)];
|
|
2526
2358
|
});
|
|
2527
|
-
var
|
|
2359
|
+
var ta = function(e, n) {
|
|
2528
2360
|
var t = {};
|
|
2529
2361
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
|
|
2530
2362
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
2531
2363
|
n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
|
|
2532
2364
|
return t;
|
|
2533
2365
|
};
|
|
2534
|
-
const
|
|
2366
|
+
const or = /* @__PURE__ */ o.createElement(tr, null), ar = /* @__PURE__ */ o.createElement(rr, null), gn = (e) => {
|
|
2535
2367
|
var n, t, r, a, i, l, u, d;
|
|
2536
2368
|
const {
|
|
2537
2369
|
className: f,
|
|
2538
2370
|
rootClassName: v,
|
|
2539
2371
|
prefixCls: s,
|
|
2540
|
-
image:
|
|
2372
|
+
image: b = or,
|
|
2541
2373
|
description: c,
|
|
2542
2374
|
children: g,
|
|
2543
2375
|
imageStyle: m,
|
|
2544
2376
|
style: S,
|
|
2545
2377
|
classNames: w,
|
|
2546
|
-
styles:
|
|
2547
|
-
} = e,
|
|
2378
|
+
styles: h
|
|
2379
|
+
} = e, I = ta(e, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]), {
|
|
2548
2380
|
getPrefixCls: y,
|
|
2549
|
-
direction:
|
|
2381
|
+
direction: T,
|
|
2550
2382
|
empty: p
|
|
2551
|
-
} = o.useContext(
|
|
2552
|
-
let
|
|
2553
|
-
if (typeof
|
|
2554
|
-
alt:
|
|
2555
|
-
src:
|
|
2556
|
-
}) :
|
|
2557
|
-
const
|
|
2383
|
+
} = o.useContext(at), E = y("empty", s), [z, V, q] = na(E), [_] = ut("Empty"), A = typeof c < "u" ? c : _ == null ? void 0 : _.description, U = typeof A == "string" ? A : "empty";
|
|
2384
|
+
let Q = null;
|
|
2385
|
+
if (typeof b == "string" ? Q = /* @__PURE__ */ o.createElement("img", {
|
|
2386
|
+
alt: U,
|
|
2387
|
+
src: b
|
|
2388
|
+
}) : Q = b, process.env.NODE_ENV !== "production") {
|
|
2389
|
+
const G = it("Empty");
|
|
2558
2390
|
[["imageStyle", "styles: { image: {} }"]].forEach((j) => {
|
|
2559
|
-
let [
|
|
2560
|
-
|
|
2391
|
+
let [ne, Z] = j;
|
|
2392
|
+
G.deprecated(!(ne in e), ne, Z);
|
|
2561
2393
|
});
|
|
2562
2394
|
}
|
|
2563
|
-
return
|
|
2564
|
-
className:
|
|
2565
|
-
[`${
|
|
2566
|
-
[`${
|
|
2395
|
+
return z(/* @__PURE__ */ o.createElement("div", Object.assign({
|
|
2396
|
+
className: Be(V, q, E, p == null ? void 0 : p.className, {
|
|
2397
|
+
[`${E}-normal`]: b === ar,
|
|
2398
|
+
[`${E}-rtl`]: T === "rtl"
|
|
2567
2399
|
}, f, v, (n = p == null ? void 0 : p.classNames) === null || n === void 0 ? void 0 : n.root, w == null ? void 0 : w.root),
|
|
2568
|
-
style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style),
|
|
2569
|
-
},
|
|
2570
|
-
className:
|
|
2571
|
-
style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image),
|
|
2572
|
-
},
|
|
2573
|
-
className:
|
|
2574
|
-
style: Object.assign(Object.assign({}, (l = p == null ? void 0 : p.styles) === null || l === void 0 ? void 0 : l.description),
|
|
2575
|
-
},
|
|
2576
|
-
className:
|
|
2577
|
-
style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer),
|
|
2400
|
+
style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style), h == null ? void 0 : h.root), S)
|
|
2401
|
+
}, I), /* @__PURE__ */ o.createElement("div", {
|
|
2402
|
+
className: Be(`${E}-image`, (r = p == null ? void 0 : p.classNames) === null || r === void 0 ? void 0 : r.image, w == null ? void 0 : w.image),
|
|
2403
|
+
style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image), h == null ? void 0 : h.image)
|
|
2404
|
+
}, Q), A && /* @__PURE__ */ o.createElement("div", {
|
|
2405
|
+
className: Be(`${E}-description`, (i = p == null ? void 0 : p.classNames) === null || i === void 0 ? void 0 : i.description, w == null ? void 0 : w.description),
|
|
2406
|
+
style: Object.assign(Object.assign({}, (l = p == null ? void 0 : p.styles) === null || l === void 0 ? void 0 : l.description), h == null ? void 0 : h.description)
|
|
2407
|
+
}, A), g && /* @__PURE__ */ o.createElement("div", {
|
|
2408
|
+
className: Be(`${E}-footer`, (u = p == null ? void 0 : p.classNames) === null || u === void 0 ? void 0 : u.footer, w == null ? void 0 : w.footer),
|
|
2409
|
+
style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer), h == null ? void 0 : h.footer)
|
|
2578
2410
|
}, g)));
|
|
2579
2411
|
};
|
|
2580
|
-
gn.PRESENTED_IMAGE_DEFAULT =
|
|
2581
|
-
gn.PRESENTED_IMAGE_SIMPLE =
|
|
2412
|
+
gn.PRESENTED_IMAGE_DEFAULT = or;
|
|
2413
|
+
gn.PRESENTED_IMAGE_SIMPLE = ar;
|
|
2582
2414
|
process.env.NODE_ENV !== "production" && (gn.displayName = "Empty");
|
|
2583
|
-
const
|
|
2415
|
+
const ra = (e) => {
|
|
2584
2416
|
const {
|
|
2585
2417
|
componentName: n
|
|
2586
2418
|
} = e, {
|
|
2587
2419
|
getPrefixCls: t
|
|
2588
|
-
} =
|
|
2420
|
+
} = pr(at), r = t("empty");
|
|
2589
2421
|
switch (n) {
|
|
2590
2422
|
case "Table":
|
|
2591
2423
|
case "List":
|
|
2592
|
-
return /* @__PURE__ */
|
|
2424
|
+
return /* @__PURE__ */ On.createElement(gn, {
|
|
2593
2425
|
image: gn.PRESENTED_IMAGE_SIMPLE
|
|
2594
2426
|
});
|
|
2595
2427
|
case "Select":
|
|
@@ -2597,16 +2429,16 @@ const pa = (e) => {
|
|
|
2597
2429
|
case "Cascader":
|
|
2598
2430
|
case "Transfer":
|
|
2599
2431
|
case "Mentions":
|
|
2600
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ On.createElement(gn, {
|
|
2601
2433
|
image: gn.PRESENTED_IMAGE_SIMPLE,
|
|
2602
2434
|
className: `${r}-small`
|
|
2603
2435
|
});
|
|
2604
2436
|
case "Table.filter":
|
|
2605
2437
|
return null;
|
|
2606
2438
|
default:
|
|
2607
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ On.createElement(gn, null);
|
|
2608
2440
|
}
|
|
2609
|
-
},
|
|
2441
|
+
}, oa = (e) => {
|
|
2610
2442
|
const t = {
|
|
2611
2443
|
overflow: {
|
|
2612
2444
|
adjustX: !0,
|
|
@@ -2635,10 +2467,10 @@ const pa = (e) => {
|
|
|
2635
2467
|
})
|
|
2636
2468
|
};
|
|
2637
2469
|
};
|
|
2638
|
-
function
|
|
2639
|
-
return e ||
|
|
2470
|
+
function aa(e, n) {
|
|
2471
|
+
return e || oa(n);
|
|
2640
2472
|
}
|
|
2641
|
-
const
|
|
2473
|
+
const zt = (e) => {
|
|
2642
2474
|
const {
|
|
2643
2475
|
optionHeight: n,
|
|
2644
2476
|
optionFontSize: t,
|
|
@@ -2656,14 +2488,14 @@ const Lt = (e) => {
|
|
|
2656
2488
|
lineHeight: r,
|
|
2657
2489
|
boxSizing: "border-box"
|
|
2658
2490
|
};
|
|
2659
|
-
},
|
|
2491
|
+
}, ia = (e) => {
|
|
2660
2492
|
const {
|
|
2661
2493
|
antCls: n,
|
|
2662
2494
|
componentCls: t
|
|
2663
2495
|
} = e, r = `${t}-item`, a = `&${n}-slide-up-enter${n}-slide-up-enter-active`, i = `&${n}-slide-up-appear${n}-slide-up-appear-active`, l = `&${n}-slide-up-leave${n}-slide-up-leave-active`, u = `${t}-dropdown-placement-`, d = `${r}-option-selected`;
|
|
2664
2496
|
return [
|
|
2665
2497
|
{
|
|
2666
|
-
[`${t}-dropdown`]: Object.assign(Object.assign({},
|
|
2498
|
+
[`${t}-dropdown`]: Object.assign(Object.assign({}, lt(e)), {
|
|
2667
2499
|
position: "absolute",
|
|
2668
2500
|
top: -9999,
|
|
2669
2501
|
zIndex: e.zIndexPopup,
|
|
@@ -2683,7 +2515,7 @@ const Lt = (e) => {
|
|
|
2683
2515
|
${a}${u}bottomLeft,
|
|
2684
2516
|
${i}${u}bottomLeft
|
|
2685
2517
|
`]: {
|
|
2686
|
-
animationName:
|
|
2518
|
+
animationName: Pr
|
|
2687
2519
|
},
|
|
2688
2520
|
[`
|
|
2689
2521
|
${a}${u}topLeft,
|
|
@@ -2691,21 +2523,21 @@ const Lt = (e) => {
|
|
|
2691
2523
|
${a}${u}topRight,
|
|
2692
2524
|
${i}${u}topRight
|
|
2693
2525
|
`]: {
|
|
2694
|
-
animationName:
|
|
2526
|
+
animationName: _r
|
|
2695
2527
|
},
|
|
2696
2528
|
[`${l}${u}bottomLeft`]: {
|
|
2697
|
-
animationName:
|
|
2529
|
+
animationName: Tr
|
|
2698
2530
|
},
|
|
2699
2531
|
[`
|
|
2700
2532
|
${l}${u}topLeft,
|
|
2701
2533
|
${l}${u}topRight
|
|
2702
2534
|
`]: {
|
|
2703
|
-
animationName:
|
|
2535
|
+
animationName: Lr
|
|
2704
2536
|
},
|
|
2705
2537
|
"&-hidden": {
|
|
2706
2538
|
display: "none"
|
|
2707
2539
|
},
|
|
2708
|
-
[r]: Object.assign(Object.assign({},
|
|
2540
|
+
[r]: Object.assign(Object.assign({}, zt(e)), {
|
|
2709
2541
|
cursor: "pointer",
|
|
2710
2542
|
transition: `background ${e.motionDurationSlow} ease`,
|
|
2711
2543
|
borderRadius: e.borderRadiusSM,
|
|
@@ -2748,7 +2580,7 @@ const Lt = (e) => {
|
|
|
2748
2580
|
paddingInlineStart: e.calc(e.controlPaddingHorizontal).mul(2).equal()
|
|
2749
2581
|
}
|
|
2750
2582
|
},
|
|
2751
|
-
"&-empty": Object.assign(Object.assign({},
|
|
2583
|
+
"&-empty": Object.assign(Object.assign({}, zt(e)), {
|
|
2752
2584
|
color: e.colorTextDisabled
|
|
2753
2585
|
})
|
|
2754
2586
|
}),
|
|
@@ -2768,12 +2600,12 @@ const Lt = (e) => {
|
|
|
2768
2600
|
})
|
|
2769
2601
|
},
|
|
2770
2602
|
// Follow code may reuse in other components
|
|
2771
|
-
|
|
2772
|
-
|
|
2603
|
+
It(e, "slide-up"),
|
|
2604
|
+
It(e, "slide-down"),
|
|
2773
2605
|
Et(e, "move-up"),
|
|
2774
2606
|
Et(e, "move-down")
|
|
2775
2607
|
];
|
|
2776
|
-
},
|
|
2608
|
+
}, la = (e) => {
|
|
2777
2609
|
const {
|
|
2778
2610
|
multipleSelectItemHeight: n,
|
|
2779
2611
|
paddingXXS: t,
|
|
@@ -2783,17 +2615,17 @@ const Lt = (e) => {
|
|
|
2783
2615
|
return {
|
|
2784
2616
|
basePadding: i,
|
|
2785
2617
|
containerPadding: l,
|
|
2786
|
-
itemHeight:
|
|
2787
|
-
itemLineHeight:
|
|
2618
|
+
itemHeight: He(n),
|
|
2619
|
+
itemLineHeight: He(e.calc(n).sub(e.calc(e.lineWidth).mul(2)).equal())
|
|
2788
2620
|
};
|
|
2789
|
-
},
|
|
2621
|
+
}, ua = (e) => {
|
|
2790
2622
|
const {
|
|
2791
2623
|
multipleSelectItemHeight: n,
|
|
2792
2624
|
selectHeight: t,
|
|
2793
2625
|
lineWidth: r
|
|
2794
2626
|
} = e;
|
|
2795
2627
|
return e.calc(t).sub(n).div(2).sub(r).equal();
|
|
2796
|
-
},
|
|
2628
|
+
}, ca = (e) => {
|
|
2797
2629
|
const {
|
|
2798
2630
|
componentCls: n,
|
|
2799
2631
|
iconCls: t,
|
|
@@ -2852,7 +2684,7 @@ const Lt = (e) => {
|
|
|
2852
2684
|
// fix whitespace wrapping. custom tags display all whitespace within.
|
|
2853
2685
|
textOverflow: "ellipsis"
|
|
2854
2686
|
},
|
|
2855
|
-
"&-remove": Object.assign(Object.assign({},
|
|
2687
|
+
"&-remove": Object.assign(Object.assign({}, At()), {
|
|
2856
2688
|
display: "inline-flex",
|
|
2857
2689
|
alignItems: "center",
|
|
2858
2690
|
color: d,
|
|
@@ -2870,13 +2702,13 @@ const Lt = (e) => {
|
|
|
2870
2702
|
}
|
|
2871
2703
|
}
|
|
2872
2704
|
};
|
|
2873
|
-
},
|
|
2705
|
+
}, sa = (e, n) => {
|
|
2874
2706
|
const {
|
|
2875
2707
|
componentCls: t,
|
|
2876
2708
|
INTERNAL_FIXED_ITEM_MARGIN: r
|
|
2877
|
-
} = e, a = `${t}-selection-overflow`, i = e.multipleSelectItemHeight, l =
|
|
2709
|
+
} = e, a = `${t}-selection-overflow`, i = e.multipleSelectItemHeight, l = ua(e), u = n ? `${t}-${n}` : "", d = la(e);
|
|
2878
2710
|
return {
|
|
2879
|
-
[`${t}-multiple${u}`]: Object.assign(Object.assign({},
|
|
2711
|
+
[`${t}-multiple${u}`]: Object.assign(Object.assign({}, ca(e)), {
|
|
2880
2712
|
// ========================= Selector =========================
|
|
2881
2713
|
[`${t}-selector`]: {
|
|
2882
2714
|
display: "flex",
|
|
@@ -2894,8 +2726,8 @@ const Lt = (e) => {
|
|
|
2894
2726
|
"&:after": {
|
|
2895
2727
|
display: "inline-block",
|
|
2896
2728
|
width: 0,
|
|
2897
|
-
margin: `${
|
|
2898
|
-
lineHeight:
|
|
2729
|
+
margin: `${He(r)} 0`,
|
|
2730
|
+
lineHeight: He(i),
|
|
2899
2731
|
visibility: "hidden",
|
|
2900
2732
|
content: '"\\a0"'
|
|
2901
2733
|
}
|
|
@@ -2903,13 +2735,13 @@ const Lt = (e) => {
|
|
|
2903
2735
|
// ======================== Selections ========================
|
|
2904
2736
|
[`${t}-selection-item`]: {
|
|
2905
2737
|
height: d.itemHeight,
|
|
2906
|
-
lineHeight:
|
|
2738
|
+
lineHeight: He(d.itemLineHeight)
|
|
2907
2739
|
},
|
|
2908
2740
|
// ========================== Wrap ===========================
|
|
2909
2741
|
[`${t}-selection-wrap`]: {
|
|
2910
2742
|
alignSelf: "flex-start",
|
|
2911
2743
|
"&:after": {
|
|
2912
|
-
lineHeight:
|
|
2744
|
+
lineHeight: He(i),
|
|
2913
2745
|
marginBlock: r
|
|
2914
2746
|
}
|
|
2915
2747
|
},
|
|
@@ -2941,7 +2773,7 @@ const Lt = (e) => {
|
|
|
2941
2773
|
"\n &-input,\n &-mirror\n ": {
|
|
2942
2774
|
height: i,
|
|
2943
2775
|
fontFamily: e.fontFamily,
|
|
2944
|
-
lineHeight:
|
|
2776
|
+
lineHeight: He(i),
|
|
2945
2777
|
transition: `all ${e.motionDurationSlow}`
|
|
2946
2778
|
},
|
|
2947
2779
|
"&-input": {
|
|
@@ -2992,17 +2824,17 @@ function Yn(e, n) {
|
|
|
2992
2824
|
}
|
|
2993
2825
|
}
|
|
2994
2826
|
};
|
|
2995
|
-
return [
|
|
2827
|
+
return [sa(e, n), a];
|
|
2996
2828
|
}
|
|
2997
|
-
const
|
|
2829
|
+
const da = (e) => {
|
|
2998
2830
|
const {
|
|
2999
2831
|
componentCls: n
|
|
3000
|
-
} = e, t =
|
|
2832
|
+
} = e, t = Dn(e, {
|
|
3001
2833
|
selectHeight: e.controlHeightSM,
|
|
3002
2834
|
multipleSelectItemHeight: e.multipleItemHeightSM,
|
|
3003
2835
|
borderRadius: e.borderRadiusSM,
|
|
3004
2836
|
borderRadiusSM: e.borderRadiusXS
|
|
3005
|
-
}), r =
|
|
2837
|
+
}), r = Dn(e, {
|
|
3006
2838
|
fontSize: e.fontSizeLG,
|
|
3007
2839
|
selectHeight: e.controlHeightLG,
|
|
3008
2840
|
multipleSelectItemHeight: e.multipleItemHeightLG,
|
|
@@ -3041,7 +2873,7 @@ function qn(e, n) {
|
|
|
3041
2873
|
fontSize: e.fontSize,
|
|
3042
2874
|
height: e.controlHeight,
|
|
3043
2875
|
// ========================= Selector =========================
|
|
3044
|
-
[`${t}-selector`]: Object.assign(Object.assign({},
|
|
2876
|
+
[`${t}-selector`]: Object.assign(Object.assign({}, lt(e, !0)), {
|
|
3045
2877
|
display: "flex",
|
|
3046
2878
|
borderRadius: a,
|
|
3047
2879
|
flex: "1 1 auto",
|
|
@@ -3060,7 +2892,7 @@ function qn(e, n) {
|
|
|
3060
2892
|
`]: {
|
|
3061
2893
|
display: "block",
|
|
3062
2894
|
padding: 0,
|
|
3063
|
-
lineHeight:
|
|
2895
|
+
lineHeight: He(i),
|
|
3064
2896
|
transition: `all ${e.motionDurationSlow}, visibility 0s`,
|
|
3065
2897
|
alignSelf: "center"
|
|
3066
2898
|
},
|
|
@@ -3101,12 +2933,12 @@ function qn(e, n) {
|
|
|
3101
2933
|
width: "100%",
|
|
3102
2934
|
height: "100%",
|
|
3103
2935
|
alignItems: "center",
|
|
3104
|
-
padding: `0 ${
|
|
2936
|
+
padding: `0 ${He(r)}`,
|
|
3105
2937
|
[`${t}-selection-search-input`]: {
|
|
3106
2938
|
height: i
|
|
3107
2939
|
},
|
|
3108
2940
|
"&:after": {
|
|
3109
|
-
lineHeight:
|
|
2941
|
+
lineHeight: He(i)
|
|
3110
2942
|
}
|
|
3111
2943
|
}
|
|
3112
2944
|
},
|
|
@@ -3123,7 +2955,7 @@ function qn(e, n) {
|
|
|
3123
2955
|
position: "absolute",
|
|
3124
2956
|
insetInlineStart: 0,
|
|
3125
2957
|
insetInlineEnd: 0,
|
|
3126
|
-
padding: `0 ${
|
|
2958
|
+
padding: `0 ${He(r)}`,
|
|
3127
2959
|
"&:after": {
|
|
3128
2960
|
display: "none"
|
|
3129
2961
|
}
|
|
@@ -3133,7 +2965,7 @@ function qn(e, n) {
|
|
|
3133
2965
|
}
|
|
3134
2966
|
};
|
|
3135
2967
|
}
|
|
3136
|
-
function
|
|
2968
|
+
function fa(e) {
|
|
3137
2969
|
const {
|
|
3138
2970
|
componentCls: n
|
|
3139
2971
|
} = e, t = e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();
|
|
@@ -3141,7 +2973,7 @@ function xa(e) {
|
|
|
3141
2973
|
qn(e),
|
|
3142
2974
|
// ======================== Small ========================
|
|
3143
2975
|
// Shared
|
|
3144
|
-
qn(
|
|
2976
|
+
qn(Dn(e, {
|
|
3145
2977
|
controlHeight: e.controlHeightSM,
|
|
3146
2978
|
borderRadius: e.borderRadiusSM
|
|
3147
2979
|
}), "sm"),
|
|
@@ -3150,7 +2982,7 @@ function xa(e) {
|
|
|
3150
2982
|
[`${n}-single${n}-sm`]: {
|
|
3151
2983
|
[`&:not(${n}-customize-input)`]: {
|
|
3152
2984
|
[`${n}-selector`]: {
|
|
3153
|
-
padding: `0 ${
|
|
2985
|
+
padding: `0 ${He(t)}`
|
|
3154
2986
|
},
|
|
3155
2987
|
// With arrow should provides `padding-right` to show the arrow
|
|
3156
2988
|
[`&${n}-show-arrow ${n}-selection-search`]: {
|
|
@@ -3167,14 +2999,14 @@ function xa(e) {
|
|
|
3167
2999
|
},
|
|
3168
3000
|
// ======================== Large ========================
|
|
3169
3001
|
// Shared
|
|
3170
|
-
qn(
|
|
3002
|
+
qn(Dn(e, {
|
|
3171
3003
|
controlHeight: e.singleItemHeightLG,
|
|
3172
3004
|
fontSize: e.fontSizeLG,
|
|
3173
3005
|
borderRadius: e.borderRadiusLG
|
|
3174
3006
|
}), "lg")
|
|
3175
3007
|
];
|
|
3176
3008
|
}
|
|
3177
|
-
const
|
|
3009
|
+
const ma = (e) => {
|
|
3178
3010
|
const {
|
|
3179
3011
|
fontSize: n,
|
|
3180
3012
|
lineHeight: t,
|
|
@@ -3187,22 +3019,22 @@ const Oa = (e) => {
|
|
|
3187
3019
|
zIndexPopupBase: f,
|
|
3188
3020
|
colorText: v,
|
|
3189
3021
|
fontWeightStrong: s,
|
|
3190
|
-
controlItemBgActive:
|
|
3022
|
+
controlItemBgActive: b,
|
|
3191
3023
|
controlItemBgHover: c,
|
|
3192
3024
|
colorBgContainer: g,
|
|
3193
3025
|
colorFillSecondary: m,
|
|
3194
3026
|
colorBgContainerDisabled: S,
|
|
3195
3027
|
colorTextDisabled: w,
|
|
3196
|
-
colorPrimaryHover:
|
|
3197
|
-
colorPrimary:
|
|
3028
|
+
colorPrimaryHover: h,
|
|
3029
|
+
colorPrimary: I,
|
|
3198
3030
|
controlOutline: y
|
|
3199
|
-
} = e,
|
|
3031
|
+
} = e, T = u * 2, p = r * 2, E = Math.min(a - T, a - p), z = Math.min(i - T, i - p), V = Math.min(l - T, l - p);
|
|
3200
3032
|
return {
|
|
3201
3033
|
INTERNAL_FIXED_ITEM_MARGIN: Math.floor(u / 2),
|
|
3202
3034
|
zIndexPopup: f + 50,
|
|
3203
3035
|
optionSelectedColor: v,
|
|
3204
3036
|
optionSelectedFontWeight: s,
|
|
3205
|
-
optionSelectedBg:
|
|
3037
|
+
optionSelectedBg: b,
|
|
3206
3038
|
optionActiveBg: c,
|
|
3207
3039
|
optionPadding: `${(a - n * t) / 2}px ${d}px`,
|
|
3208
3040
|
optionFontSize: n,
|
|
@@ -3213,19 +3045,19 @@ const Oa = (e) => {
|
|
|
3213
3045
|
singleItemHeightLG: l,
|
|
3214
3046
|
multipleItemBg: m,
|
|
3215
3047
|
multipleItemBorderColor: "transparent",
|
|
3216
|
-
multipleItemHeight:
|
|
3217
|
-
multipleItemHeightSM:
|
|
3218
|
-
multipleItemHeightLG:
|
|
3048
|
+
multipleItemHeight: E,
|
|
3049
|
+
multipleItemHeightSM: z,
|
|
3050
|
+
multipleItemHeightLG: V,
|
|
3219
3051
|
multipleSelectorBgDisabled: S,
|
|
3220
3052
|
multipleItemColorDisabled: w,
|
|
3221
3053
|
multipleItemBorderColorDisabled: "transparent",
|
|
3222
3054
|
showArrowPaddingInlineEnd: Math.ceil(e.fontSize * 1.25),
|
|
3223
|
-
hoverBorderColor:
|
|
3224
|
-
activeBorderColor:
|
|
3055
|
+
hoverBorderColor: h,
|
|
3056
|
+
activeBorderColor: I,
|
|
3225
3057
|
activeOutlineColor: y,
|
|
3226
3058
|
selectAffixPadding: u
|
|
3227
3059
|
};
|
|
3228
|
-
},
|
|
3060
|
+
}, ir = (e, n) => {
|
|
3229
3061
|
const {
|
|
3230
3062
|
componentCls: t,
|
|
3231
3063
|
antCls: r,
|
|
@@ -3233,7 +3065,7 @@ const Oa = (e) => {
|
|
|
3233
3065
|
} = e;
|
|
3234
3066
|
return {
|
|
3235
3067
|
[`&:not(${t}-customize-input) ${t}-selector`]: {
|
|
3236
|
-
border: `${
|
|
3068
|
+
border: `${He(e.lineWidth)} ${e.lineType} ${n.borderColor}`,
|
|
3237
3069
|
background: e.selectorBg
|
|
3238
3070
|
},
|
|
3239
3071
|
[`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
|
|
@@ -3242,7 +3074,7 @@ const Oa = (e) => {
|
|
|
3242
3074
|
},
|
|
3243
3075
|
[`${t}-focused& ${t}-selector`]: {
|
|
3244
3076
|
borderColor: n.activeBorderColor,
|
|
3245
|
-
boxShadow: `0 0 0 ${
|
|
3077
|
+
boxShadow: `0 0 0 ${He(a)} ${n.activeOutlineColor}`,
|
|
3246
3078
|
outline: 0
|
|
3247
3079
|
},
|
|
3248
3080
|
[`${t}-prefix`]: {
|
|
@@ -3250,23 +3082,23 @@ const Oa = (e) => {
|
|
|
3250
3082
|
}
|
|
3251
3083
|
}
|
|
3252
3084
|
};
|
|
3253
|
-
},
|
|
3254
|
-
[`&${e.componentCls}-status-${n.status}`]: Object.assign({},
|
|
3255
|
-
}),
|
|
3256
|
-
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
3085
|
+
}, Bt = (e, n) => ({
|
|
3086
|
+
[`&${e.componentCls}-status-${n.status}`]: Object.assign({}, ir(e, n))
|
|
3087
|
+
}), va = (e) => ({
|
|
3088
|
+
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, ir(e, {
|
|
3257
3089
|
borderColor: e.colorBorder,
|
|
3258
3090
|
hoverBorderHover: e.hoverBorderColor,
|
|
3259
3091
|
activeBorderColor: e.activeBorderColor,
|
|
3260
3092
|
activeOutlineColor: e.activeOutlineColor,
|
|
3261
3093
|
color: e.colorText
|
|
3262
|
-
})),
|
|
3094
|
+
})), Bt(e, {
|
|
3263
3095
|
status: "error",
|
|
3264
3096
|
borderColor: e.colorError,
|
|
3265
3097
|
hoverBorderHover: e.colorErrorHover,
|
|
3266
3098
|
activeBorderColor: e.colorError,
|
|
3267
3099
|
activeOutlineColor: e.colorErrorOutline,
|
|
3268
3100
|
color: e.colorError
|
|
3269
|
-
})),
|
|
3101
|
+
})), Bt(e, {
|
|
3270
3102
|
status: "warning",
|
|
3271
3103
|
borderColor: e.colorWarning,
|
|
3272
3104
|
hoverBorderHover: e.colorWarningHover,
|
|
@@ -3282,10 +3114,10 @@ const Oa = (e) => {
|
|
|
3282
3114
|
},
|
|
3283
3115
|
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3284
3116
|
background: e.multipleItemBg,
|
|
3285
|
-
border: `${
|
|
3117
|
+
border: `${He(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
|
|
3286
3118
|
}
|
|
3287
3119
|
})
|
|
3288
|
-
}),
|
|
3120
|
+
}), lr = (e, n) => {
|
|
3289
3121
|
const {
|
|
3290
3122
|
componentCls: t,
|
|
3291
3123
|
antCls: r
|
|
@@ -3293,7 +3125,7 @@ const Oa = (e) => {
|
|
|
3293
3125
|
return {
|
|
3294
3126
|
[`&:not(${t}-customize-input) ${t}-selector`]: {
|
|
3295
3127
|
background: n.bg,
|
|
3296
|
-
border: `${
|
|
3128
|
+
border: `${He(e.lineWidth)} ${e.lineType} transparent`,
|
|
3297
3129
|
color: n.color
|
|
3298
3130
|
},
|
|
3299
3131
|
[`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
|
|
@@ -3308,9 +3140,9 @@ const Oa = (e) => {
|
|
|
3308
3140
|
}
|
|
3309
3141
|
};
|
|
3310
3142
|
}, Vt = (e, n) => ({
|
|
3311
|
-
[`&${e.componentCls}-status-${n.status}`]: Object.assign({},
|
|
3312
|
-
}),
|
|
3313
|
-
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
3143
|
+
[`&${e.componentCls}-status-${n.status}`]: Object.assign({}, lr(e, n))
|
|
3144
|
+
}), ga = (e) => ({
|
|
3145
|
+
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, lr(e, {
|
|
3314
3146
|
bg: e.colorFillTertiary,
|
|
3315
3147
|
hoverBg: e.colorFillSecondary,
|
|
3316
3148
|
activeBorderColor: e.activeBorderColor,
|
|
@@ -3337,14 +3169,14 @@ const Oa = (e) => {
|
|
|
3337
3169
|
},
|
|
3338
3170
|
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3339
3171
|
background: e.colorBgContainer,
|
|
3340
|
-
border: `${
|
|
3172
|
+
border: `${He(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
|
|
3341
3173
|
}
|
|
3342
3174
|
})
|
|
3343
|
-
}),
|
|
3175
|
+
}), pa = (e) => ({
|
|
3344
3176
|
"&-borderless": {
|
|
3345
3177
|
[`${e.componentCls}-selector`]: {
|
|
3346
3178
|
background: "transparent",
|
|
3347
|
-
border: `${
|
|
3179
|
+
border: `${He(e.lineWidth)} ${e.lineType} transparent`
|
|
3348
3180
|
},
|
|
3349
3181
|
[`&${e.componentCls}-disabled`]: {
|
|
3350
3182
|
[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
|
|
@@ -3353,7 +3185,7 @@ const Oa = (e) => {
|
|
|
3353
3185
|
},
|
|
3354
3186
|
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3355
3187
|
background: e.multipleItemBg,
|
|
3356
|
-
border: `${
|
|
3188
|
+
border: `${He(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
|
|
3357
3189
|
},
|
|
3358
3190
|
// Status
|
|
3359
3191
|
[`&${e.componentCls}-status-error`]: {
|
|
@@ -3367,9 +3199,9 @@ const Oa = (e) => {
|
|
|
3367
3199
|
}
|
|
3368
3200
|
}
|
|
3369
3201
|
}
|
|
3370
|
-
}),
|
|
3371
|
-
[e.componentCls]: Object.assign(Object.assign(Object.assign({},
|
|
3372
|
-
}),
|
|
3202
|
+
}), ha = (e) => ({
|
|
3203
|
+
[e.componentCls]: Object.assign(Object.assign(Object.assign({}, va(e)), ga(e)), pa(e))
|
|
3204
|
+
}), ba = (e) => {
|
|
3373
3205
|
const {
|
|
3374
3206
|
componentCls: n
|
|
3375
3207
|
} = e;
|
|
@@ -3394,7 +3226,7 @@ const Oa = (e) => {
|
|
|
3394
3226
|
}
|
|
3395
3227
|
}
|
|
3396
3228
|
};
|
|
3397
|
-
},
|
|
3229
|
+
}, Sa = (e) => {
|
|
3398
3230
|
const {
|
|
3399
3231
|
componentCls: n
|
|
3400
3232
|
} = e;
|
|
@@ -3413,7 +3245,7 @@ const Oa = (e) => {
|
|
|
3413
3245
|
}
|
|
3414
3246
|
}
|
|
3415
3247
|
};
|
|
3416
|
-
},
|
|
3248
|
+
}, wa = (e) => {
|
|
3417
3249
|
const {
|
|
3418
3250
|
antCls: n,
|
|
3419
3251
|
componentCls: t,
|
|
@@ -3421,11 +3253,11 @@ const Oa = (e) => {
|
|
|
3421
3253
|
iconCls: a
|
|
3422
3254
|
} = e;
|
|
3423
3255
|
return {
|
|
3424
|
-
[t]: Object.assign(Object.assign({},
|
|
3256
|
+
[t]: Object.assign(Object.assign({}, lt(e)), {
|
|
3425
3257
|
position: "relative",
|
|
3426
3258
|
display: "inline-flex",
|
|
3427
3259
|
cursor: "pointer",
|
|
3428
|
-
[`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({},
|
|
3260
|
+
[`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({}, ba(e)), Sa(e)),
|
|
3429
3261
|
// ======================== Selection ========================
|
|
3430
3262
|
[`${t}-selection-item`]: Object.assign(Object.assign({
|
|
3431
3263
|
flex: 1,
|
|
@@ -3445,7 +3277,7 @@ const Oa = (e) => {
|
|
|
3445
3277
|
pointerEvents: "none"
|
|
3446
3278
|
}),
|
|
3447
3279
|
// ========================== Arrow ==========================
|
|
3448
|
-
[`${t}-arrow`]: Object.assign(Object.assign({},
|
|
3280
|
+
[`${t}-arrow`]: Object.assign(Object.assign({}, At()), {
|
|
3449
3281
|
position: "absolute",
|
|
3450
3282
|
top: "50%",
|
|
3451
3283
|
insetInlineStart: "auto",
|
|
@@ -3541,7 +3373,7 @@ const Oa = (e) => {
|
|
|
3541
3373
|
}
|
|
3542
3374
|
}
|
|
3543
3375
|
};
|
|
3544
|
-
},
|
|
3376
|
+
}, ya = (e) => {
|
|
3545
3377
|
const {
|
|
3546
3378
|
componentCls: n
|
|
3547
3379
|
} = e;
|
|
@@ -3558,13 +3390,13 @@ const Oa = (e) => {
|
|
|
3558
3390
|
// == LTR ==
|
|
3559
3391
|
// =====================================================
|
|
3560
3392
|
// Base
|
|
3561
|
-
|
|
3393
|
+
wa(e),
|
|
3562
3394
|
// Single
|
|
3563
|
-
|
|
3395
|
+
fa(e),
|
|
3564
3396
|
// Multiple
|
|
3565
|
-
|
|
3397
|
+
da(e),
|
|
3566
3398
|
// Dropdown
|
|
3567
|
-
|
|
3399
|
+
ia(e),
|
|
3568
3400
|
// =====================================================
|
|
3569
3401
|
// == RTL ==
|
|
3570
3402
|
// =====================================================
|
|
@@ -3576,36 +3408,29 @@ const Oa = (e) => {
|
|
|
3576
3408
|
// =====================================================
|
|
3577
3409
|
// == Space Compact ==
|
|
3578
3410
|
// =====================================================
|
|
3579
|
-
|
|
3411
|
+
Xr(e, {
|
|
3580
3412
|
borderElCls: `${n}-selector`,
|
|
3581
3413
|
focusElCls: `${n}-focused`
|
|
3582
3414
|
})
|
|
3583
3415
|
];
|
|
3584
|
-
},
|
|
3416
|
+
}, Ca = Ft("Select", (e, n) => {
|
|
3585
3417
|
let {
|
|
3586
3418
|
rootPrefixCls: t
|
|
3587
3419
|
} = n;
|
|
3588
|
-
const r =
|
|
3420
|
+
const r = Dn(e, {
|
|
3589
3421
|
rootPrefixCls: t,
|
|
3590
3422
|
inputPaddingHorizontalBase: e.calc(e.paddingSM).sub(1).equal(),
|
|
3591
3423
|
multipleSelectItemHeight: e.multipleItemHeight,
|
|
3592
3424
|
selectHeight: e.controlHeight
|
|
3593
3425
|
});
|
|
3594
|
-
return [
|
|
3595
|
-
},
|
|
3426
|
+
return [ya(r), ha(r)];
|
|
3427
|
+
}, ma, {
|
|
3596
3428
|
unitless: {
|
|
3597
3429
|
optionLineHeight: !0,
|
|
3598
3430
|
optionSelectedFontWeight: !0
|
|
3599
3431
|
}
|
|
3600
3432
|
});
|
|
3601
|
-
|
|
3602
|
-
return /* @__PURE__ */ o.createElement(Jr, Ze({}, n, {
|
|
3603
|
-
ref: t,
|
|
3604
|
-
icon: La
|
|
3605
|
-
}));
|
|
3606
|
-
}, lr = /* @__PURE__ */ o.forwardRef(Ha);
|
|
3607
|
-
process.env.NODE_ENV !== "production" && (lr.displayName = "DownOutlined");
|
|
3608
|
-
function Va(e) {
|
|
3433
|
+
function Ia(e) {
|
|
3609
3434
|
let {
|
|
3610
3435
|
suffixIcon: n,
|
|
3611
3436
|
clearIcon: t,
|
|
@@ -3618,45 +3443,45 @@ function Va(e) {
|
|
|
3618
3443
|
showSuffixIcon: f,
|
|
3619
3444
|
feedbackIcon: v,
|
|
3620
3445
|
showArrow: s,
|
|
3621
|
-
componentName:
|
|
3446
|
+
componentName: b
|
|
3622
3447
|
} = e;
|
|
3623
|
-
process.env.NODE_ENV !== "production" &&
|
|
3624
|
-
const c = t ?? /* @__PURE__ */ o.createElement(
|
|
3448
|
+
process.env.NODE_ENV !== "production" && it(b).deprecated(!t, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
3449
|
+
const c = t ?? /* @__PURE__ */ o.createElement(Gr, null), g = (h) => n === null && !u && !s ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, f !== !1 && h, u && v);
|
|
3625
3450
|
let m = null;
|
|
3626
3451
|
if (n !== void 0)
|
|
3627
3452
|
m = g(n);
|
|
3628
3453
|
else if (i)
|
|
3629
|
-
m = g(/* @__PURE__ */ o.createElement(
|
|
3454
|
+
m = g(/* @__PURE__ */ o.createElement(qr, {
|
|
3630
3455
|
spin: !0
|
|
3631
3456
|
}));
|
|
3632
3457
|
else {
|
|
3633
|
-
const
|
|
3634
|
-
m = (
|
|
3458
|
+
const h = `${d}-suffix`;
|
|
3459
|
+
m = (I) => {
|
|
3635
3460
|
let {
|
|
3636
3461
|
open: y,
|
|
3637
|
-
showSearch:
|
|
3638
|
-
} =
|
|
3639
|
-
return g(y &&
|
|
3640
|
-
className:
|
|
3641
|
-
}) : /* @__PURE__ */ o.createElement(
|
|
3642
|
-
className:
|
|
3462
|
+
showSearch: T
|
|
3463
|
+
} = I;
|
|
3464
|
+
return g(y && T ? /* @__PURE__ */ o.createElement(Qr, {
|
|
3465
|
+
className: h
|
|
3466
|
+
}) : /* @__PURE__ */ o.createElement(Hr, {
|
|
3467
|
+
className: h
|
|
3643
3468
|
}));
|
|
3644
3469
|
};
|
|
3645
3470
|
}
|
|
3646
3471
|
let S = null;
|
|
3647
|
-
r !== void 0 ? S = r : l ? S = /* @__PURE__ */ o.createElement(
|
|
3472
|
+
r !== void 0 ? S = r : l ? S = /* @__PURE__ */ o.createElement(Ur, null) : S = null;
|
|
3648
3473
|
let w = null;
|
|
3649
|
-
return a !== void 0 ? w = a : w = /* @__PURE__ */ o.createElement(
|
|
3474
|
+
return a !== void 0 ? w = a : w = /* @__PURE__ */ o.createElement(Yr, null), {
|
|
3650
3475
|
clearIcon: c,
|
|
3651
3476
|
suffixIcon: m,
|
|
3652
3477
|
itemIcon: S,
|
|
3653
3478
|
removeIcon: w
|
|
3654
3479
|
};
|
|
3655
3480
|
}
|
|
3656
|
-
function
|
|
3481
|
+
function Ea(e, n) {
|
|
3657
3482
|
return n !== void 0 ? n : e !== null;
|
|
3658
3483
|
}
|
|
3659
|
-
var
|
|
3484
|
+
var xa = function(e, n) {
|
|
3660
3485
|
var t = {};
|
|
3661
3486
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
|
|
3662
3487
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
@@ -3675,194 +3500,235 @@ const ur = "SECRET_COMBOBOX_MODE_DO_NOT_USE", cr = (e, n) => {
|
|
|
3675
3500
|
dropdownClassName: f,
|
|
3676
3501
|
listHeight: v = 256,
|
|
3677
3502
|
placement: s,
|
|
3678
|
-
listItemHeight:
|
|
3503
|
+
listItemHeight: b,
|
|
3679
3504
|
size: c,
|
|
3680
3505
|
disabled: g,
|
|
3681
3506
|
notFoundContent: m,
|
|
3682
3507
|
status: S,
|
|
3683
3508
|
builtinPlacements: w,
|
|
3684
|
-
dropdownMatchSelectWidth:
|
|
3685
|
-
popupMatchSelectWidth:
|
|
3509
|
+
dropdownMatchSelectWidth: h,
|
|
3510
|
+
popupMatchSelectWidth: I,
|
|
3686
3511
|
direction: y,
|
|
3687
|
-
style:
|
|
3512
|
+
style: T,
|
|
3688
3513
|
allowClear: p,
|
|
3689
|
-
variant:
|
|
3690
|
-
dropdownStyle:
|
|
3691
|
-
transitionName:
|
|
3692
|
-
tagRender:
|
|
3693
|
-
maxCount:
|
|
3694
|
-
prefix:
|
|
3695
|
-
} = e,
|
|
3696
|
-
getPopupContainer:
|
|
3697
|
-
getPrefixCls:
|
|
3514
|
+
variant: E,
|
|
3515
|
+
dropdownStyle: z,
|
|
3516
|
+
transitionName: V,
|
|
3517
|
+
tagRender: q,
|
|
3518
|
+
maxCount: _,
|
|
3519
|
+
prefix: A
|
|
3520
|
+
} = e, U = xa(e, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix"]), {
|
|
3521
|
+
getPopupContainer: Q,
|
|
3522
|
+
getPrefixCls: G,
|
|
3698
3523
|
renderEmpty: j,
|
|
3699
|
-
direction:
|
|
3700
|
-
virtual:
|
|
3701
|
-
popupMatchSelectWidth:
|
|
3702
|
-
popupOverflow:
|
|
3703
|
-
select:
|
|
3704
|
-
} = o.useContext(
|
|
3705
|
-
compactSize:
|
|
3706
|
-
compactItemClassnames:
|
|
3707
|
-
} =
|
|
3524
|
+
direction: ne,
|
|
3525
|
+
virtual: Z,
|
|
3526
|
+
popupMatchSelectWidth: Y,
|
|
3527
|
+
popupOverflow: x,
|
|
3528
|
+
select: M
|
|
3529
|
+
} = o.useContext(at), [, fe] = ot(), ie = b ?? (fe == null ? void 0 : fe.controlHeight), J = G("select", r), se = G(), ye = y ?? ne, {
|
|
3530
|
+
compactSize: ge,
|
|
3531
|
+
compactItemClassnames: Re
|
|
3532
|
+
} = Wr(J, ye), [ce, pe] = Br("select", E, a), R = Ar(J), [C, D, K] = Ca(J, R), $ = o.useMemo(() => {
|
|
3708
3533
|
const {
|
|
3709
|
-
mode:
|
|
3534
|
+
mode: _e
|
|
3710
3535
|
} = e;
|
|
3711
|
-
if (
|
|
3712
|
-
return
|
|
3713
|
-
}, [e.mode]),
|
|
3714
|
-
status:
|
|
3715
|
-
hasFeedback:
|
|
3716
|
-
isFormItemInput:
|
|
3717
|
-
feedbackIcon:
|
|
3718
|
-
} = o.useContext(
|
|
3719
|
-
let
|
|
3720
|
-
m !== void 0 ?
|
|
3536
|
+
if (_e !== "combobox")
|
|
3537
|
+
return _e === ur ? "combobox" : _e;
|
|
3538
|
+
}, [e.mode]), F = $ === "multiple" || $ === "tags", le = Ea(e.suffixIcon, e.showArrow), me = (t = I ?? h) !== null && t !== void 0 ? t : Y, {
|
|
3539
|
+
status: re,
|
|
3540
|
+
hasFeedback: we,
|
|
3541
|
+
isFormItemInput: ze,
|
|
3542
|
+
feedbackIcon: xe
|
|
3543
|
+
} = o.useContext(jr), Ne = Fr(re, S);
|
|
3544
|
+
let de;
|
|
3545
|
+
m !== void 0 ? de = m : $ === "combobox" ? de = null : de = (j == null ? void 0 : j("Select")) || /* @__PURE__ */ o.createElement(ra, {
|
|
3721
3546
|
componentName: "Select"
|
|
3722
3547
|
});
|
|
3723
3548
|
const {
|
|
3724
|
-
suffixIcon:
|
|
3725
|
-
itemIcon:
|
|
3726
|
-
removeIcon:
|
|
3727
|
-
clearIcon:
|
|
3728
|
-
} =
|
|
3729
|
-
multiple:
|
|
3730
|
-
hasFeedback:
|
|
3731
|
-
feedbackIcon:
|
|
3732
|
-
showSuffixIcon:
|
|
3733
|
-
prefixCls:
|
|
3549
|
+
suffixIcon: Ge,
|
|
3550
|
+
itemIcon: Ye,
|
|
3551
|
+
removeIcon: Se,
|
|
3552
|
+
clearIcon: Oe
|
|
3553
|
+
} = Ia(Object.assign(Object.assign({}, U), {
|
|
3554
|
+
multiple: F,
|
|
3555
|
+
hasFeedback: we,
|
|
3556
|
+
feedbackIcon: xe,
|
|
3557
|
+
showSuffixIcon: le,
|
|
3558
|
+
prefixCls: J,
|
|
3734
3559
|
componentName: "Select"
|
|
3735
|
-
})),
|
|
3736
|
-
clearIcon:
|
|
3737
|
-
} : p,
|
|
3738
|
-
[`${
|
|
3739
|
-
}, l,
|
|
3740
|
-
var
|
|
3741
|
-
return (
|
|
3742
|
-
}),
|
|
3743
|
-
[`${
|
|
3744
|
-
[`${
|
|
3745
|
-
[`${
|
|
3746
|
-
[`${
|
|
3747
|
-
[`${
|
|
3748
|
-
},
|
|
3560
|
+
})), Ce = p === !0 ? {
|
|
3561
|
+
clearIcon: Oe
|
|
3562
|
+
} : p, $e = jt(U, ["suffixIcon", "itemIcon"]), Pe = Be(d || f, {
|
|
3563
|
+
[`${J}-dropdown-${ye}`]: ye === "rtl"
|
|
3564
|
+
}, l, K, R, D), en = Kr((_e) => {
|
|
3565
|
+
var De;
|
|
3566
|
+
return (De = c ?? ge) !== null && De !== void 0 ? De : _e;
|
|
3567
|
+
}), je = o.useContext($r), Fe = g ?? je, Ie = Be({
|
|
3568
|
+
[`${J}-lg`]: en === "large",
|
|
3569
|
+
[`${J}-sm`]: en === "small",
|
|
3570
|
+
[`${J}-rtl`]: ye === "rtl",
|
|
3571
|
+
[`${J}-${ce}`]: pe,
|
|
3572
|
+
[`${J}-in-form-item`]: ze
|
|
3573
|
+
}, Vr(J, Ne, we), Re, M == null ? void 0 : M.className, i, l, K, R, D), hn = o.useMemo(() => s !== void 0 ? s : ye === "rtl" ? "bottomRight" : "bottomLeft", [s, ye]);
|
|
3749
3574
|
if (process.env.NODE_ENV !== "production") {
|
|
3750
|
-
const
|
|
3751
|
-
|
|
3575
|
+
const _e = it("Select");
|
|
3576
|
+
_e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(h === void 0, "dropdownMatchSelectWidth", "popupMatchSelectWidth"), process.env.NODE_ENV !== "production" && _e(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."), _e.deprecated(!("bordered" in e), "bordered", "variant"), process.env.NODE_ENV !== "production" && _e(!(typeof _ < "u" && !F), "usage", "`maxCount` only works with mode `multiple` or `tags`");
|
|
3752
3577
|
}
|
|
3753
|
-
const [
|
|
3754
|
-
return
|
|
3578
|
+
const [Ae] = Mr("SelectLike", z == null ? void 0 : z.zIndex);
|
|
3579
|
+
return C(/* @__PURE__ */ o.createElement(gt, Object.assign({
|
|
3755
3580
|
ref: n,
|
|
3756
|
-
virtual:
|
|
3757
|
-
showSearch:
|
|
3758
|
-
},
|
|
3759
|
-
style: Object.assign(Object.assign({},
|
|
3760
|
-
dropdownMatchSelectWidth:
|
|
3761
|
-
transitionName:
|
|
3762
|
-
builtinPlacements:
|
|
3581
|
+
virtual: Z,
|
|
3582
|
+
showSearch: M == null ? void 0 : M.showSearch
|
|
3583
|
+
}, $e, {
|
|
3584
|
+
style: Object.assign(Object.assign({}, M == null ? void 0 : M.style), T),
|
|
3585
|
+
dropdownMatchSelectWidth: me,
|
|
3586
|
+
transitionName: Dr(se, "slide-up", V),
|
|
3587
|
+
builtinPlacements: aa(w, x),
|
|
3763
3588
|
listHeight: v,
|
|
3764
|
-
listItemHeight:
|
|
3765
|
-
mode:
|
|
3766
|
-
prefixCls:
|
|
3767
|
-
placement:
|
|
3768
|
-
direction:
|
|
3769
|
-
prefix:
|
|
3770
|
-
suffixIcon:
|
|
3771
|
-
menuItemSelectedIcon:
|
|
3772
|
-
removeIcon:
|
|
3773
|
-
allowClear:
|
|
3774
|
-
notFoundContent:
|
|
3775
|
-
className:
|
|
3776
|
-
getPopupContainer: u ||
|
|
3777
|
-
dropdownClassName:
|
|
3778
|
-
disabled:
|
|
3779
|
-
dropdownStyle: Object.assign(Object.assign({},
|
|
3780
|
-
zIndex:
|
|
3589
|
+
listItemHeight: ie,
|
|
3590
|
+
mode: $,
|
|
3591
|
+
prefixCls: J,
|
|
3592
|
+
placement: hn,
|
|
3593
|
+
direction: ye,
|
|
3594
|
+
prefix: A,
|
|
3595
|
+
suffixIcon: Ge,
|
|
3596
|
+
menuItemSelectedIcon: Ye,
|
|
3597
|
+
removeIcon: Se,
|
|
3598
|
+
allowClear: Ce,
|
|
3599
|
+
notFoundContent: de,
|
|
3600
|
+
className: Ie,
|
|
3601
|
+
getPopupContainer: u || Q,
|
|
3602
|
+
dropdownClassName: Pe,
|
|
3603
|
+
disabled: Fe,
|
|
3604
|
+
dropdownStyle: Object.assign(Object.assign({}, z), {
|
|
3605
|
+
zIndex: Ae
|
|
3781
3606
|
}),
|
|
3782
|
-
maxCount:
|
|
3783
|
-
tagRender:
|
|
3607
|
+
maxCount: F ? _ : void 0,
|
|
3608
|
+
tagRender: F ? q : void 0
|
|
3784
3609
|
})));
|
|
3785
3610
|
};
|
|
3786
3611
|
process.env.NODE_ENV !== "production" && (cr.displayName = "Select");
|
|
3787
|
-
const
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
process.env.NODE_ENV !== "production" && (
|
|
3793
|
-
const
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
border-width: 1px;
|
|
3612
|
+
const In = /* @__PURE__ */ o.forwardRef(cr), $a = zr(In, "dropdownAlign");
|
|
3613
|
+
In.SECRET_COMBOBOX_MODE_DO_NOT_USE = ur;
|
|
3614
|
+
In.Option = mt;
|
|
3615
|
+
In.OptGroup = ft;
|
|
3616
|
+
In._InternalPanelDoNotUseOrYouWillBeFired = $a;
|
|
3617
|
+
process.env.NODE_ENV !== "production" && (In.displayName = "Select");
|
|
3618
|
+
const Qa = jn.div`
|
|
3619
|
+
position: relative;
|
|
3620
|
+
border: 2px solid transparent;
|
|
3621
|
+
background-color: transparent;
|
|
3622
|
+
border-radius: 8px;
|
|
3623
|
+
padding: 1px;
|
|
3624
|
+
width: auto;
|
|
3801
3625
|
|
|
3802
|
-
|
|
3803
|
-
|
|
3626
|
+
${({ $isFocused: e, theme: n, type: t = "primary" }) => e && `
|
|
3627
|
+
border: 2px solid ${n.colors[t].focussed.ringColor};
|
|
3628
|
+
background-color: transparent;
|
|
3629
|
+
border-radius: 8px;
|
|
3630
|
+
padding: 1px;
|
|
3631
|
+
`}
|
|
3804
3632
|
|
|
3805
|
-
|
|
3806
|
-
|
|
3633
|
+
.ant-select-dropdown {
|
|
3634
|
+
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
3635
|
+
}
|
|
3636
|
+
`, Ra = (e) => `all ${e.motion.veryfast}s ease-in-out`, Oa = ({ colors: e, sizing: n, typography: t, borderRadius: r }, a, i) => `
|
|
3637
|
+
&.ant-select {
|
|
3638
|
+
color: ${e.input};
|
|
3639
|
+
font-size: ${n.Size4}px;
|
|
3640
|
+
line-height: ${n.Size6}px;
|
|
3641
|
+
letter-spacing: 0;
|
|
3642
|
+
font-weight: 400;
|
|
3643
|
+
border-width: 1px;
|
|
3807
3644
|
|
|
3808
|
-
|
|
3809
|
-
|
|
3645
|
+
width: 100%;
|
|
3646
|
+
min-width: 250px;
|
|
3647
|
+
height: 32px;
|
|
3810
3648
|
|
|
3649
|
+
background-color: ${e[a][i].backgroundColor};
|
|
3650
|
+
border-radius: ${r.BorderRadiusMd}px;
|
|
3651
|
+
gap: ${n.Size2}px;
|
|
3811
3652
|
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3653
|
+
&:active {
|
|
3654
|
+
background-color: ${e[a].pressed.backgroundColor};
|
|
3655
|
+
border-color: ${e[a].pressed.borderColor};
|
|
3656
|
+
}
|
|
3816
3657
|
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3658
|
+
// Remove focus styles
|
|
3659
|
+
&:focus, &:focus-visible {
|
|
3660
|
+
background-color: transparent;
|
|
3661
|
+
border-color: transparent;
|
|
3662
|
+
outline: none;
|
|
3663
|
+
box-shadow: none;
|
|
3664
|
+
}
|
|
3821
3665
|
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3666
|
+
.ant-select-arrow {
|
|
3667
|
+
color: #000000;
|
|
3668
|
+
-webkit-font-smoothing: antialiased;
|
|
3669
|
+
-moz-osx-font-smoothing: grayscale;
|
|
3670
|
+
text-rendering: optimizeLegibility;
|
|
3671
|
+
}
|
|
3826
3672
|
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3673
|
+
&:disabled,
|
|
3674
|
+
&.ant-select-disabled {
|
|
3675
|
+
color: ${e.inputs.onsurface.disabled};
|
|
3676
|
+
background-color: ${e.inputs.surface.disabled};
|
|
3677
|
+
border-color: ${e.inputs.surface.border};
|
|
3678
|
+
|
|
3679
|
+
.ant-select-selector {
|
|
3680
|
+
background-color: ${e.inputs.surface.disabled};
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
.ant-select-arrow {
|
|
3684
|
+
color: ${e.inputs.onsurface["icon-disabled"]};
|
|
3830
3685
|
}
|
|
3831
3686
|
}
|
|
3832
|
-
|
|
3687
|
+
}
|
|
3688
|
+
`, Za = jn.div`
|
|
3833
3689
|
.ant-select-item-option {
|
|
3834
|
-
transition:
|
|
3690
|
+
transition: ${({ theme: e, type: n }) => Ra(e)};
|
|
3691
|
+
border-radius: 0px;
|
|
3835
3692
|
|
|
3836
3693
|
&:hover {
|
|
3837
|
-
background-color: ${({ theme: e, type: n }) => e.colors
|
|
3838
|
-
color: ${({ theme: e, type: n }) => e.colors[
|
|
3694
|
+
background-color: ${({ theme: e, type: n }) => e.colors.surface.secondary};
|
|
3695
|
+
color: ${({ theme: e, type: n }) => e.colors.onsurface["copy-dark"]};
|
|
3839
3696
|
}
|
|
3840
3697
|
|
|
3841
3698
|
&.ant-select-item-option-selected {
|
|
3842
3699
|
background-color: ${({ theme: e, type: n }) => e.colors[n].hover.backgroundColor};
|
|
3843
3700
|
color: ${({ theme: e, type: n }) => e.colors[n].active.color};
|
|
3701
|
+
font-weight: 400;
|
|
3702
|
+
border-radius: 0px;
|
|
3844
3703
|
|
|
3845
3704
|
&:hover {
|
|
3846
3705
|
background-color: ${({ theme: e, type: n }) => e.colors[n].hover.backgroundColor};
|
|
3847
3706
|
color: ${({ theme: e, type: n }) => e.colors[n].hover.color};
|
|
3707
|
+
border-radius: 0px;
|
|
3848
3708
|
}
|
|
3849
3709
|
}
|
|
3850
3710
|
}
|
|
3851
|
-
`,
|
|
3711
|
+
`, Ja = jn.div`
|
|
3852
3712
|
.ant-select-dropdown {
|
|
3853
|
-
|
|
3854
|
-
|
|
3713
|
+
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
3714
|
+
transition: all ${({ theme: e }) => `${e.motion.veryfast}s`}
|
|
3715
|
+
cubic-bezier(0.645, 0.045, 0.355, 1) !important;
|
|
3716
|
+
}
|
|
3855
3717
|
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3718
|
+
&.ant-slide-up-enter,
|
|
3719
|
+
&.ant-slide-up-appear {
|
|
3720
|
+
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
&.ant-slide-up-leave {
|
|
3724
|
+
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
3860
3725
|
}
|
|
3861
|
-
`,
|
|
3862
|
-
${({ theme: e, type: n = "primary", state: t = "active" }) =>
|
|
3726
|
+
`, ka = jn(In)`
|
|
3727
|
+
${({ theme: e, type: n = "primary", state: t = "active" }) => Oa(e, n, t)}
|
|
3863
3728
|
`;
|
|
3864
3729
|
export {
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3730
|
+
ka as Select,
|
|
3731
|
+
Ja as SelectDropdown,
|
|
3732
|
+
Qa as SelectWrapper,
|
|
3733
|
+
Za as StyledMenuItem
|
|
3868
3734
|
};
|