@unicom-cloud/ui 0.8.96 → 0.8.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/OverflowEllipsis.js +1 -1
  5. package/PageHeader.js +1 -1
  6. package/QrCode.js +57 -0
  7. package/Tour.js +63 -0
  8. package/Trigger.js +1 -1
  9. package/_virtual/_commonjsHelpers.js +6 -0
  10. package/_virtual/index.js +7 -0
  11. package/_virtual/index2.js +4 -0
  12. package/affix/index.js +70 -72
  13. package/alert/index.js +56 -56
  14. package/anchor/Anchor.js +55 -55
  15. package/anchor/Link.js +34 -34
  16. package/anchor/util.js +5 -5
  17. package/auto-complete/index.js +116 -122
  18. package/avatar/Avatar.js +33 -33
  19. package/avatar/Group.js +26 -26
  20. package/back-top/index.js +58 -61
  21. package/badge/index.js +46 -46
  22. package/breadcrumb/Item.js +42 -43
  23. package/breadcrumb/index.js +47 -47
  24. package/button/Group.js +6 -6
  25. package/button/index.js +91 -91
  26. package/calendar/Month.js +75 -75
  27. package/calendar/Year.js +35 -35
  28. package/calendar/header/index.js +25 -25
  29. package/calendar/index.js +103 -103
  30. package/card/Grid.js +8 -8
  31. package/card/Meta.js +16 -16
  32. package/card/index.js +49 -49
  33. package/carousel/Arrow.js +19 -19
  34. package/carousel/Indicator.js +26 -26
  35. package/carousel/index.js +108 -108
  36. package/cascader/Cascader.js +178 -191
  37. package/cascader/base/node.js +133 -136
  38. package/cascader/base/store.js +82 -85
  39. package/cascader/panel/List.js +125 -129
  40. package/cascader/panel/Search.js +79 -81
  41. package/cascader/util.js +13 -13
  42. package/checkbox/Checkbox.js +94 -96
  43. package/checkbox/Group.js +54 -56
  44. package/checkbox/GroupBlock.js +28 -29
  45. package/collapse/Collapse.js +45 -45
  46. package/collapse/Item.js +53 -55
  47. package/color-picker/ControlBar.js +43 -43
  48. package/color-picker/InputAlpha.js +12 -12
  49. package/color-picker/InputHex.js +30 -31
  50. package/color-picker/InputRgb.js +24 -24
  51. package/color-picker/Palette.js +18 -18
  52. package/color-picker/Panel.js +122 -125
  53. package/color-picker/hooks/useColorPicker.js +85 -88
  54. package/color-picker/hooks/useControlBlock.js +38 -40
  55. package/color-picker/index.js +47 -47
  56. package/comment/index.js +29 -29
  57. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  58. package/components/common/hooks/useId.js +8 -8
  59. package/components/common/hooks/useInView.js +16 -16
  60. package/components/common/hooks/useIntersectionObserver.js +1 -1
  61. package/components/common/hooks/useKeyboardEvent.js +9 -10
  62. package/components/common/hooks/useOverflowHidden.js +1 -4
  63. package/components/common/hooks/usePersistCallback.js +7 -7
  64. package/components/common/hooks/useStateCallback.js +9 -10
  65. package/components/common/hooks/useWindowSize.js +8 -8
  66. package/components/common/space/index.js +9 -7
  67. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  68. package/components/common/utils/dom.js +27 -29
  69. package/components/common/utils/findScrollParent.js +17 -0
  70. package/components/common/utils/intersectionObserver.js +21 -0
  71. package/components/common/utils/is.js +99 -109
  72. package/components/common/utils/mutationObserver.js +19 -0
  73. package/components/common/utils/reactDOM.js +34 -34
  74. package/components/common/utils/resizeObserver.js +21 -0
  75. package/copy/index.js +38 -40
  76. package/date-picker/Picker.js +290 -295
  77. package/date-picker/RangePicker.js +367 -372
  78. package/date-picker/index.js +33 -35
  79. package/date-picker/panel/Body.js +46 -47
  80. package/date-picker/panel/Header.js +33 -33
  81. package/date-picker/panel/Shortcut.js +31 -31
  82. package/date-picker/panel/date/index.js +85 -85
  83. package/date-picker/panel/month/index.js +59 -59
  84. package/date-picker/panel/quarter/index.js +67 -70
  85. package/date-picker/panel/range/index.js +101 -101
  86. package/date-picker/panel/year/index.js +39 -39
  87. package/date-picker/util.js +17 -18
  88. package/descriptions/index.js +62 -62
  89. package/details/index.js +53 -55
  90. package/development/index.js +9 -9
  91. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  92. package/dist/validate/src/index.js +5 -5
  93. package/dist/validate/src/util.js +1 -1
  94. package/divider/index.js +21 -21
  95. package/draggable/Item.js +35 -35
  96. package/draggable/index.js +22 -22
  97. package/drawer/Drawer.js +142 -147
  98. package/dropdown/Button.js +48 -48
  99. package/dropdown/index.js +88 -92
  100. package/empty/index.js +16 -16
  101. package/form/Control.js +211 -225
  102. package/form/Form.js +109 -113
  103. package/form/FormItem.js +118 -120
  104. package/form/FormList.js +60 -66
  105. package/form/FormProvider.js +31 -34
  106. package/form/hook/useContext.js +17 -19
  107. package/form/hook/useState.js +22 -23
  108. package/form/hook/useWatch.js +26 -27
  109. package/form/promisify.js +14 -18
  110. package/form/store.js +304 -316
  111. package/form/util.js +14 -15
  112. package/grid/Col.js +64 -64
  113. package/grid/Grid.js +51 -51
  114. package/grid/GridItem.js +48 -48
  115. package/grid/Row.js +39 -39
  116. package/hooks/useVerificationCode.js +41 -43
  117. package/hooks/useWatermark.js +89 -92
  118. package/icon/index.js +23 -24
  119. package/icon-hover/index.js +16 -16
  120. package/icons/file.js +11 -11
  121. package/image/Image.js +140 -141
  122. package/image/ImagePreview.js +252 -255
  123. package/image/ImagePreviewArrow.js +25 -25
  124. package/image/ImagePreviewGroup.js +62 -62
  125. package/image/util/getScale.js +25 -28
  126. package/index.js +684 -675
  127. package/input/Button.js +48 -50
  128. package/input/Group.js +9 -9
  129. package/input/Input.js +145 -154
  130. package/input/InputElement.js +108 -115
  131. package/input/Password.js +38 -38
  132. package/input/Search.js +51 -55
  133. package/input/Textarea.js +80 -81
  134. package/input/useComposition.js +23 -23
  135. package/input-number/decimal.js +59 -62
  136. package/input-number/index.js +139 -141
  137. package/input-tag/InputTag.js +222 -230
  138. package/layout/Content.js +6 -6
  139. package/layout/Footer.js +8 -8
  140. package/layout/Header.js +7 -7
  141. package/layout/Sider.js +88 -90
  142. package/layout/index.js +30 -30
  143. package/link/index.js +45 -46
  144. package/liquid-fill/LiquidFill.js +226 -0
  145. package/liquid-fill/LiquidFill2.js +3 -0
  146. package/liquid-fill/index.js +4 -0
  147. package/list/Item.js +28 -28
  148. package/list/Meta.js +12 -12
  149. package/list/index.js +146 -148
  150. package/mentions/index.js +75 -76
  151. package/menu/Item.js +58 -58
  152. package/menu/Menu.js +125 -127
  153. package/menu/OverflowWrap.js +39 -40
  154. package/menu/sub-menu/Inline.js +45 -45
  155. package/menu/util.js +26 -28
  156. package/message/index.js +96 -99
  157. package/message/useMessage.js +26 -27
  158. package/modal/Confirm.js +47 -49
  159. package/modal/Modal.js +250 -257
  160. package/modal/use-modal/Hook.js +26 -28
  161. package/modal/use-modal/index.js +46 -49
  162. package/notice/index.js +89 -90
  163. package/notification/index.js +60 -65
  164. package/notification/withNotification.js +35 -35
  165. package/overflow-ellipsis/OverflowItem.js +19 -20
  166. package/overflow-ellipsis/index.js +45 -46
  167. package/package.json +1 -1
  168. package/page-header/index.js +45 -45
  169. package/pagination/PageItem.js +87 -91
  170. package/pagination/PageJumper.js +40 -41
  171. package/pagination/PageOption.js +31 -35
  172. package/pagination/Pagination.js +162 -163
  173. package/picker/Input.js +90 -96
  174. package/picker/InputRange.js +115 -122
  175. package/popconfirm/index.js +98 -100
  176. package/popover/index.js +28 -28
  177. package/portal/Portal.js +10 -11
  178. package/progress/index.js +36 -36
  179. package/qr-code/index.js +99 -0
  180. package/qr-code/interface.js +1 -0
  181. package/radio/Group.js +48 -48
  182. package/radio/GroupBlock.js +32 -33
  183. package/radio/Radio.js +62 -64
  184. package/rate/index.js +88 -88
  185. package/resize-box/ResizeTrigger.js +39 -39
  186. package/resize-box/Split.js +92 -96
  187. package/resize-box/SplitGroup.js +116 -122
  188. package/resize-box/index.js +112 -115
  189. package/result/index.js +44 -44
  190. package/select/Option.js +53 -56
  191. package/select/Select.js +365 -381
  192. package/select/util.js +95 -99
  193. package/select-view/Core.js +159 -160
  194. package/skeleton/index.js +23 -23
  195. package/slider/Button.js +84 -92
  196. package/slider/Input.js +47 -49
  197. package/slider/Tick.js +28 -31
  198. package/slider/index.js +107 -107
  199. package/space/index.js +26 -26
  200. package/space-/index.js +51 -51
  201. package/spin/DotLoading.js +8 -8
  202. package/spin/index.js +47 -47
  203. package/statistic/Countdown.js +37 -37
  204. package/statistic/index.js +58 -58
  205. package/steps/Step.js +42 -42
  206. package/steps/index.js +54 -54
  207. package/style.css +1 -1
  208. package/switch/index.js +77 -78
  209. package/table/ColGroup.js +36 -37
  210. package/table/Table.js +447 -450
  211. package/table/hook/useExpand.js +24 -24
  212. package/table/hook/useRowSelection.js +62 -62
  213. package/table/summary/Row.js +16 -17
  214. package/table/tbody/Td.js +119 -118
  215. package/table/tbody/Tr.js +119 -121
  216. package/table/tbody/index.js +62 -63
  217. package/table/th-resizable/index.js +30 -30
  218. package/table/thead/Column.js +148 -148
  219. package/table/thead/index.js +87 -88
  220. package/tabs/Tab.js +55 -55
  221. package/tabs/TabContent.js +8 -8
  222. package/tabs/TabPane.js +15 -15
  223. package/tabs/hook/useHeaderScroll.js +36 -36
  224. package/tabs/tab-header/TabInk.js +31 -33
  225. package/tabs/tab-header/TabNavIcon.js +34 -35
  226. package/tabs/tab-header/index.js +192 -195
  227. package/tag/index.js +94 -97
  228. package/time-picker/Picker.js +167 -172
  229. package/time-picker/RangePicker.js +28 -28
  230. package/time-picker/TimePicker.js +146 -146
  231. package/timeline/Item.js +46 -46
  232. package/timeline/Timeline.js +52 -52
  233. package/tooltip/index.js +89 -95
  234. package/tour/index.js +289 -0
  235. package/transfer/Item.js +54 -54
  236. package/transfer/List.js +134 -136
  237. package/transfer/index.js +91 -91
  238. package/tree/Animation.js +49 -52
  239. package/tree/Node.js +114 -122
  240. package/tree/NodeList.js +51 -51
  241. package/tree/Tree.js +386 -393
  242. package/tree-select/List.js +71 -72
  243. package/tree-select/Select.js +135 -143
  244. package/tree-select/hook/useKeyCache.js +39 -39
  245. package/tree-select/hook/useStateValue.js +12 -12
  246. package/trigger/getPopupStyle.js +60 -61
  247. package/trigger/index.js +337 -346
  248. package/types/common/space/interface.d.ts +1 -1
  249. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  250. package/types/common/utils/findScrollParent.d.ts +2 -0
  251. package/types/common/utils/index.d.ts +5 -0
  252. package/types/common/utils/intersectionObserver.d.ts +2 -0
  253. package/types/common/utils/mutationObserver.d.ts +2 -0
  254. package/types/common/utils/resizeObserver.d.ts +2 -0
  255. package/types/pc/config-provider/interface.d.ts +6 -0
  256. package/types/pc/index.d.ts +3 -0
  257. package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
  258. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  259. package/types/pc/liquid-fill/index.d.ts +2 -0
  260. package/types/pc/qr-code/index.d.ts +34 -0
  261. package/types/pc/qr-code/interface.d.ts +39 -0
  262. package/types/pc/table/interface.d.ts +2 -2
  263. package/types/pc/tour/index.d.ts +42 -0
  264. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  265. package/types/pc/utils/findScrollParent.d.ts +2 -0
  266. package/types/pc/utils/index.d.ts +5 -0
  267. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  268. package/types/pc/utils/mutationObserver.d.ts +2 -0
  269. package/types/pc/utils/names.d.ts +18 -0
  270. package/types/pc/utils/resizeObserver.d.ts +2 -0
  271. package/typography/Base.js +79 -81
  272. package/typography/EditContent.js +30 -33
  273. package/typography/Ellipsis.js +77 -73
  274. package/typography/Operations.js +50 -52
  275. package/typography/Paragraph.js +7 -7
  276. package/typography/Typography.js +7 -7
  277. package/typography/useEllipsis.js +105 -106
  278. package/upload/TriggerNode.js +69 -76
  279. package/upload/Upload.js +84 -87
  280. package/upload/Uploader.js +115 -118
  281. package/upload/list/PictureItem.js +61 -71
  282. package/upload/list/TextItem.js +61 -67
  283. package/upload/list/UploadProgress.js +42 -49
  284. package/upload/list/index.js +48 -49
  285. package/upload/request_.js +37 -38
  286. package/upload/util.js +39 -39
  287. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  288. package/utils/findScrollParent.js +4 -0
  289. package/utils/index.js +281 -278
  290. package/utils/intersectionObserver.js +4 -0
  291. package/utils/mutationObserver.js +4 -0
  292. package/utils/names.js +12 -0
  293. package/utils/resizeObserver.js +4 -0
  294. package/verification-code/VerificationCode.js +50 -51
  295. package/version/index.js +1 -1
  296. package/virtual-list/VirtualList.js +243 -244
  297. package/virtual-list/util/item.js +3 -4
  298. package/watermark/Watermark.js +27 -31
  299. package/components/common/utils/resizeObserverEffect.js +0 -23
  300. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  301. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  302. package/utils/resizeObserverEffect.js +0 -4
package/select/Select.js CHANGED
@@ -1,551 +1,535 @@
1
- import { jsx as _, jsxs as gt } from "react/jsx-runtime";
2
- import D from "lodash/isArray";
3
- import Ot from "lodash/isFunction";
4
- import ht, { useContext as bt, useState as z, useMemo as Pe, useRef as C, useCallback as me, useEffect as V, useImperativeHandle as vt } from "react";
5
- import yt from "../checkbox/Checkbox.js";
1
+ import { jsx as I, jsxs as ct } from "react/jsx-runtime";
2
+ import T from "lodash/isArray";
3
+ import ft from "lodash/isFunction";
4
+ import dt, { useContext as mt, useState as j, useMemo as Ae, useRef as v, useCallback as ne, useEffect as b, useImperativeHandle as gt } from "react";
5
+ import ht from "../checkbox/Checkbox.js";
6
6
  import "../checkbox/Group.js";
7
7
  import "../config-provider/ConfigProvider.js";
8
8
  import Ct from "../components/common/hooks/useId.js";
9
- import Vt from "../components/common/hooks/useMergeProps.js";
10
- import He from "../components/common/hooks/useMergeValue.js";
11
- import kt from "../select-view/index.js";
12
- import wt from "../trigger/index.js";
13
- import ge from "@unicom-cloud/utils/class-name";
14
- import { getHotkeyHandler as xt } from "../components/common/utils/getHotkeyHandler.js";
9
+ import Ot from "../components/common/hooks/useMergeProps.js";
10
+ import Pe from "../components/common/hooks/useMergeValue.js";
11
+ import vt from "../select-view/index.js";
12
+ import bt from "../trigger/index.js";
13
+ import re from "@unicom-cloud/utils/class-name";
14
+ import { getHotkeyHandler as yt } from "../components/common/utils/getHotkeyHandler.js";
15
15
  import "../components/common/utils/is.js";
16
- import { Esc as At, Enter as $e, Tab as Ge, ArrowUp as St, ArrowDown as It } from "@unicom-cloud/utils/constant/keyboardCode";
17
- import { omit as _t } from "../components/common/utils/omit.js";
18
- import { resizeObserverEffect as Et } from "../components/common/utils/resizeObserverEffect.js";
19
- import { warning as Ft } from "../components/common/utils/warning.js";
20
- import Mt from "../virtual-list/VirtualList.js";
21
- import Nt from "./OptGroup.js";
22
- import Tt from "./Option.js";
23
- import { getValidValue as je, flatChildren as Lt, isEmpty as Oe, preventDefaultEvent as Ut, isSelectOptGroup as Dt, isSelectOption as Rt } from "./util.js";
24
- import Pt from "../config-provider/context.js";
25
- import { isPlainObject as v } from "@unicom-cloud/utils/is";
26
- const Ke = "userCreatingOption", Ht = {
16
+ import { Esc as Vt, Enter as Ie, Tab as _e, ArrowUp as wt, ArrowDown as kt } from "@unicom-cloud/utils/constant/keyboardCode";
17
+ import { omit as xt } from "../components/common/utils/omit.js";
18
+ import { resizeObserver as St } from "../components/common/utils/resizeObserver.js";
19
+ import { warning as At } from "../components/common/utils/warning.js";
20
+ import Pt from "../virtual-list/VirtualList.js";
21
+ import It from "./OptGroup.js";
22
+ import _t from "./Option.js";
23
+ import { getValidValue as Ee, flatChildren as Et, isEmpty as oe, preventDefaultEvent as Mt, isSelectOptGroup as Ft, isSelectOption as Lt } from "./util.js";
24
+ import Nt from "../config-provider/context.js";
25
+ import { isPlainObject as C } from "@unicom-cloud/utils/is";
26
+ const Me = "userCreatingOption", Tt = {
27
27
  trigger: "click",
28
28
  bordered: !0,
29
29
  filterOption: !0,
30
30
  unmountOnExit: !0,
31
31
  defaultActiveFirstOption: !0,
32
32
  allowCheckAll: !0
33
- }, $t = { bottom: 4 };
34
- function Gt(We, qe) {
35
- var Re;
36
- const { getPrefixCls: B, renderEmpty: ze, componentConfig: J, rtl: be } = bt(Pt), u = Vt(
37
- We,
38
- Ht,
39
- J == null ? void 0 : J.Select
33
+ }, Ut = { bottom: 4 };
34
+ function Dt(Fe, Le) {
35
+ const { getPrefixCls: Ne, renderEmpty: Te, componentConfig: Ue, rtl: le } = mt(Nt), a = Ot(
36
+ Fe,
37
+ Tt,
38
+ Ue?.Select
40
39
  ), {
41
- children: ve,
42
- renderFormat: ye,
43
- defaultActiveFirstOption: Ce,
44
- disabled: Be,
45
- unmountOnExit: Je,
46
- notFoundContent: Qe,
47
- showSearch: Ve,
48
- tokenSeparators: Q,
49
- options: ke,
50
- filterOption: we,
51
- labelInValue: R,
52
- getPopupContainer: Xe,
53
- trigger: Ye,
54
- triggerElement: X,
55
- triggerProps: c,
56
- dropdownRender: xe,
57
- dropdownMenuStyle: Ae,
58
- dropdownMenuClassName: Se,
59
- virtualListProps: P,
40
+ children: se,
41
+ renderFormat: ae,
42
+ defaultActiveFirstOption: ue,
43
+ disabled: De,
44
+ unmountOnExit: Re,
45
+ notFoundContent: He,
46
+ showSearch: pe,
47
+ tokenSeparators: W,
48
+ options: ce,
49
+ filterOption: fe,
50
+ labelInValue: U,
51
+ getPopupContainer: $e,
52
+ trigger: Ge,
53
+ triggerElement: B,
54
+ triggerProps: y,
55
+ dropdownRender: de,
56
+ dropdownMenuStyle: me,
57
+ dropdownMenuClassName: ge,
58
+ virtualListProps: he,
60
59
  // events
61
- onChange: Ie,
62
- onSelect: Ze,
63
- onDeselect: et,
64
- onClear: Y,
65
- onSearch: Z,
66
- onFocus: tt,
67
- onBlur: ee,
68
- onPopupScroll: te,
69
- onVisibleChange: ne,
70
- onInputValueChange: re,
71
- onPaste: oe,
72
- onKeyDown: ie
73
- } = u;
74
- let { mode: le, allowCheckAll: _e, allowCreate: d } = u;
75
- le === "tags" && (le = "multiple", d = !0, Ft(
60
+ onChange: Ce,
61
+ onSelect: Ke,
62
+ onDeselect: je,
63
+ onClear: We,
64
+ onSearch: Be,
65
+ onFocus: qe,
66
+ onBlur: ze,
67
+ onPopupScroll: Je,
68
+ onVisibleChange: Qe,
69
+ onInputValueChange: Xe,
70
+ onPaste: Ye,
71
+ onKeyDown: Ze
72
+ } = a;
73
+ let { mode: q, allowCheckAll: Oe, allowCreate: c } = a;
74
+ q === "tags" && (q = "multiple", c = !0, At(
76
75
  !0,
77
76
  `[Pqb Select] The 'tags' mode will be removed in the next major version, please use {mode: "multiple", allowCreate: true} instead.`
78
77
  ));
79
- const m = B == null ? void 0 : B("select"), p = le === "multiple";
80
- p || (_e = !1);
81
- const [nt, se] = z(
82
- je(u.defaultValue, p, R)
83
- ), o = "value" in u ? je(u.value, p, R) : nt, [g, rt, ot] = He("", {
84
- value: "inputValue" in u ? u.inputValue || "" : void 0
85
- }), [O, it] = He(!1, {
86
- defaultValue: u.defaultPopupVisible,
87
- value: "popupVisible" in u ? u.popupVisible : c && "popupVisible" in c ? c.popupVisible : void 0
88
- }), [M, lt] = z(null), [N, st] = z([]), [h, E] = z(
89
- D(o) ? o[0] : o
78
+ const f = Ne?.("select"), u = q === "multiple";
79
+ u || (Oe = !1);
80
+ const [et, z] = j(
81
+ Ee(a.defaultValue, u, U)
82
+ ), n = "value" in a ? Ee(a.value, u, U) : et, [d, tt, nt] = Pe("", {
83
+ value: "inputValue" in a ? a.inputValue || "" : void 0
84
+ }), [m, rt] = Pe(!1, {
85
+ defaultValue: a.defaultPopupVisible,
86
+ value: "popupVisible" in a ? a.popupVisible : y && "popupVisible" in y ? y.popupVisible : void 0
87
+ }), [M, ot] = j(null), [F, it] = j([]), [g, _] = j(
88
+ T(n) ? n[0] : n
90
89
  ), {
91
- childrenList: ae,
92
- optionInfoMap: a,
93
- optionValueList: k,
90
+ childrenList: J,
91
+ optionInfoMap: p,
92
+ optionValueList: V,
94
93
  optionIndexListForArrowKey: x,
95
- hasOptGroup: at,
96
- hasComplexLabelInOptions: ut
97
- } = Pe(() => Lt(
98
- { children: ve, options: ke, filterOption: we },
94
+ hasOptGroup: lt,
95
+ hasComplexLabelInOptions: st
96
+ } = Ae(() => Et(
97
+ { children: se, options: ce, filterOption: fe },
99
98
  {
100
- prefixCls: m,
101
- inputValue: g,
102
- userCreatedOptions: N,
99
+ prefixCls: f,
100
+ inputValue: d,
101
+ userCreatedOptions: F,
103
102
  userCreatingOption: M
104
103
  }
105
104
  ), [
106
- ve,
107
- ke,
108
- we,
109
- g,
105
+ se,
106
+ ce,
107
+ fe,
108
+ d,
110
109
  M,
111
- N
112
- ]), ue = C(null), Ee = C(null), y = C(null), A = C([]), w = C(null), Fe = C(g), ce = C(null), H = C(0), pe = C(!1), Me = Ct(`${m}-popup-`), $ = Oe(o, p), Ne = Pe(() => {
113
- var e, t;
114
- if (Ce) {
115
- const n = D(o) ? o[0] : o, r = !$ && ((e = a.get(n)) == null ? void 0 : e._valid), l = ((t = a == null ? void 0 : a.get(k[0])) == null ? void 0 : t._origin) === Ke;
116
- return r && !l ? n : k[x[0]];
110
+ F
111
+ ]), Q = v(null), ve = v(null), O = v(null), S = v([]), w = v(null), be = v(d), X = v(null), D = v(0), Y = v(!1), ye = Ct(`${f}-popup-`), R = oe(n, u), Ve = Ae(() => {
112
+ if (ue) {
113
+ const e = T(n) ? n[0] : n, t = !R && p.get(e)?._valid, o = p?.get(V[0])?._origin === Me;
114
+ return t && !o ? e : V[x[0]];
117
115
  }
118
116
  }, [
119
- o,
120
- a,
121
- k,
117
+ n,
118
+ p,
119
+ V,
122
120
  x,
123
- Ce,
124
- $
125
- ]), G = me(
121
+ ue,
122
+ R
123
+ ]), H = ne(
126
124
  (e, t) => {
127
- var r;
128
- const n = a.get(e);
129
- ue.current && ((r = n == null ? void 0 : n.child) != null && r.props) && ue.current.scrollTo({
130
- key: n.child.props._key,
125
+ const o = p.get(e);
126
+ Q.current && o?.child?.props && Q.current.scrollTo({
127
+ key: o.child.props._key,
131
128
  options: t
132
129
  });
133
130
  },
134
- [a]
135
- ), j = me(
136
- (e, t = !1) => v(d) && typeof (d == null ? void 0 : d.formatter) == "function" ? d.formatter(e, t) : e,
137
- [d]
138
- ), S = (e, t) => {
139
- (e !== Fe.current || t !== ce.current) && (rt(e), Fe.current = e, ce.current = t, re == null || re(e, t));
140
- }, F = (e) => {
141
- var t;
142
- O !== e && (it(e), ne == null || ne(e), (t = c == null ? void 0 : c.onVisibleChange) == null || t.call(c, e));
131
+ [p]
132
+ ), $ = ne(
133
+ (e, t = !1) => C(c) && typeof c?.formatter == "function" ? c.formatter(e, t) : e,
134
+ [c]
135
+ ), A = (e, t) => {
136
+ (e !== be.current || t !== X.current) && (tt(e), be.current = e, X.current = t, Xe?.(e, t));
137
+ }, E = (e) => {
138
+ m !== e && (rt(e), Qe?.(e), y?.onVisibleChange?.(e));
143
139
  };
144
- V(() => {
145
- p ? Array.isArray(o) || se(o === void 0 ? [] : [o]) : Array.isArray(o) && se(o.length === 0 ? void 0 : o[0]);
146
- }, [p, o]), V(() => {
147
- if (O) {
148
- E(Ne);
149
- const e = D(o) ? o[0] : o;
150
- !$ && a.has(e) && setTimeout(() => G(e));
140
+ b(() => {
141
+ u ? Array.isArray(n) || z(n === void 0 ? [] : [n]) : Array.isArray(n) && z(n.length === 0 ? void 0 : n[0]);
142
+ }, [u, n]), b(() => {
143
+ if (m) {
144
+ _(Ve);
145
+ const e = T(n) ? n[0] : n;
146
+ !R && p.has(e) && setTimeout(() => H(e));
151
147
  }
152
- }, [O]), V(() => {
153
- (w.current === "up" || w.current === "down") && (G(h), w.current = "none");
154
- }, [h]), V(() => {
155
- E(Ne);
156
- }, [JSON.stringify(ae.map((e) => {
157
- var t;
158
- return (t = e == null ? void 0 : e.props) == null ? void 0 : t.value;
159
- }))]), V(() => {
160
- A.current = A.current.filter((e) => p ? D(o) && o.indexOf(e.value) > -1 : e.value === o);
161
- }, [o, p]), V(() => {
162
- if (d) {
148
+ }, [m]), b(() => {
149
+ (w.current === "up" || w.current === "down") && (H(g), w.current = "none");
150
+ }, [g]), b(() => {
151
+ _(Ve);
152
+ }, [JSON.stringify(J.map((e) => e?.props?.value))]), b(() => {
153
+ S.current = S.current.filter((e) => u ? T(n) && n.indexOf(e.value) > -1 : e.value === n);
154
+ }, [n, u]), b(() => {
155
+ if (c) {
163
156
  let e;
164
- if (Oe(o, p))
157
+ if (oe(n, u))
165
158
  e = [];
166
159
  else {
167
- const n = Array.isArray(o) ? o : [o], r = n.filter((i, f, b) => {
168
- var L;
169
- const s = a.get(i) || ((L = A.current.find((q) => q.value === i)) == null ? void 0 : L.option);
170
- return !s || s._origin === Ke;
171
- }).map((i) => j(i));
172
- e = N.filter((i) => {
173
- const f = v(i) ? i.value : i;
174
- return n.indexOf(f) !== -1;
160
+ const o = Array.isArray(n) ? n : [n], r = o.filter((i, l, h) => {
161
+ const k = p.get(i) || S.current.find((te) => te.value === i)?.option;
162
+ return !k || k._origin === Me;
163
+ }).map((i) => $(i));
164
+ e = F.filter((i) => {
165
+ const l = C(i) ? i.value : i;
166
+ return o.indexOf(l) !== -1;
175
167
  }).concat(
176
168
  r
177
169
  );
178
170
  }
179
- const t = (n) => n.map((r) => v(r) ? r.value : r).toString();
180
- t(e) !== t(N) && st(e);
171
+ const t = (o) => o.map((r) => C(r) ? r.value : r).toString();
172
+ t(e) !== t(F) && it(e);
181
173
  }
182
- }, [o, d, p, j]), V(() => {
183
- d && lt(
184
- g && !a.has(g) ? j(g, !0) : null
174
+ }, [n, c, u, $]), b(() => {
175
+ c && ot(
176
+ d && !p.has(d) ? $(d, !0) : null
185
177
  );
186
- }, [g, j]), V(() => {
187
- const { current: e } = ce;
188
- ot === g && (e === "manual" || e === "optionListHide") && (Z == null || Z(g, e));
189
- }, [g]);
190
- const T = me(
178
+ }, [d, $]), b(() => {
179
+ const { current: e } = X;
180
+ nt === d && (e === "manual" || e === "optionListHide") && Be?.(d, e);
181
+ }, [d]);
182
+ const L = ne(
191
183
  (e) => {
192
- const t = a.get(e);
184
+ const t = p.get(e);
193
185
  if (t) {
194
- const r = A.current.findIndex(
195
- (l) => l.value === e
186
+ const r = S.current.findIndex(
187
+ (s) => s.value === e
196
188
  );
197
- return r > -1 ? A.current.splice(r, 1, { value: e, option: t }) : A.current.push({ value: e, option: t }), t;
189
+ return r > -1 ? S.current.splice(r, 1, { value: e, option: t }) : S.current.push({ value: e, option: t }), t;
198
190
  }
199
- const n = A.current.find((r) => r.value === e);
200
- return n && n.option;
191
+ const o = S.current.find((r) => r.value === e);
192
+ return o && o.option;
201
193
  },
202
- [a]
203
- ), Te = (e) => {
194
+ [p]
195
+ ), we = (e) => {
204
196
  if (!x.length)
205
197
  return;
206
- if (h === void 0 || !a.has(h))
207
- return k[x[0]];
208
- const n = a.get(h)._index, r = x.indexOf(n), l = x.length;
209
- return k[x[((e === "up" ? r - 1 : r + 1) + l) % l]];
210
- }, K = (e, t = Oe(e, p)) => {
211
- let n = e;
212
- const r = e === void 0 ? void 0 : Array.isArray(e) ? e.map(T) : T(e);
213
- if (R && !t) {
214
- const l = (i, f) => {
215
- if (f)
216
- return f.children;
217
- const b = "value" in u ? u.value : "defaultValue" in u ? u.defaultValue : null;
218
- if (Array.isArray(b)) {
219
- for (const s of b)
220
- if (v(s) && s.value === i)
221
- return s.label;
222
- } else if (v(b) && b.value === i)
223
- return b.label;
198
+ if (g === void 0 || !p.has(g))
199
+ return V[x[0]];
200
+ const o = p.get(g)._index, r = x.indexOf(o), s = x.length;
201
+ return V[x[((e === "up" ? r - 1 : r + 1) + s) % s]];
202
+ }, G = (e, t = oe(e, u)) => {
203
+ let o = e;
204
+ const r = e === void 0 ? void 0 : Array.isArray(e) ? e.map(L) : L(e);
205
+ if (U && !t) {
206
+ const s = (i, l) => {
207
+ if (l)
208
+ return l.children;
209
+ const h = "value" in a ? a.value : "defaultValue" in a ? a.defaultValue : null;
210
+ if (Array.isArray(h)) {
211
+ for (const k of h)
212
+ if (C(k) && k.value === i)
213
+ return k.label;
214
+ } else if (C(h) && h.value === i)
215
+ return h.label;
224
216
  };
225
- Array.isArray(e) ? n = e.map((i, f) => ({
217
+ Array.isArray(e) ? o = e.map((i, l) => ({
226
218
  value: i,
227
- label: l(i, r[f])
228
- })) : n = {
219
+ label: s(i, r[l])
220
+ })) : o = {
229
221
  value: e,
230
- label: l(e, r)
222
+ label: s(e, r)
231
223
  };
232
224
  }
233
- return { option: r, value: n };
234
- }, I = (e) => {
235
- if (se(e), Ie) {
236
- const t = K(e);
237
- Ie(t.value, t.option);
225
+ return { option: r, value: o };
226
+ }, P = (e) => {
227
+ if (z(e), Ce) {
228
+ const t = G(e);
229
+ Ce(t.value, t.option);
238
230
  }
239
- }, Le = (e, t) => {
240
- if (t === "remove" || t === "add" && a.get(e)) {
241
- const n = t === "add" ? o.concat(e) : o.filter((l, i, f) => l !== e), r = t === "add" ? Ze : et;
242
- if (I(n), typeof r == "function") {
243
- const l = K(
231
+ }, ke = (e, t) => {
232
+ if (t === "remove" || t === "add" && p.get(e)) {
233
+ const o = t === "add" ? n.concat(e) : n.filter((s, i, l) => s !== e), r = t === "add" ? Ke : je;
234
+ if (P(o), typeof r == "function") {
235
+ const s = G(
244
236
  e,
245
237
  !1
246
238
  );
247
239
  r(
248
- l.value,
249
- l.option
240
+ s.value,
241
+ s.option
250
242
  );
251
243
  }
252
244
  }
253
- }, Ue = (e, t) => {
254
- t || (p ? (Le(
245
+ }, xe = (e, t) => {
246
+ t || (u ? (ke(
255
247
  e,
256
- o.indexOf(e) === -1 ? "add" : "remove"
257
- ), (!v(Ve) || !Ve.retainInputValueWhileSelect) && S("", "optionChecked")) : (e !== o && I(e), setTimeout(() => {
258
- F(!1);
248
+ n.indexOf(e) === -1 ? "add" : "remove"
249
+ ), (!C(pe) || !pe.retainInputValueWhileSelect) && A("", "optionChecked")) : (e !== n && P(e), setTimeout(() => {
250
+ E(!1);
259
251
  })));
260
- }, W = xt(
252
+ }, K = yt(
261
253
  /* @__PURE__ */ new Map([
262
- [At.key, () => F(!1)],
254
+ [Vt.key, () => E(!1)],
263
255
  [
264
- $e.key,
256
+ Ie.key,
265
257
  () => {
266
- if (O) {
267
- const e = a.get(h);
268
- e && Ue(h, e.disabled);
258
+ if (m) {
259
+ const e = p.get(g);
260
+ e && xe(g, e.disabled);
269
261
  } else
270
- F(!0);
262
+ E(!0);
271
263
  }
272
264
  ],
273
265
  [
274
- Ge.key,
266
+ _e.key,
275
267
  // 按tab键切换,关闭开启的弹出框
276
- () => F(!1)
268
+ () => E(!1)
277
269
  ],
278
270
  [
279
- St.key,
271
+ wt.key,
280
272
  () => {
281
- if (O)
282
- return w.current = "up", E(Te("up")), !1;
273
+ if (m)
274
+ return w.current = "up", _(we("up")), !1;
283
275
  }
284
276
  ],
285
277
  [
286
- It.key,
278
+ kt.key,
287
279
  () => {
288
- if (O)
289
- return w.current = "down", E(Te("down")), !1;
280
+ if (m)
281
+ return w.current = "down", _(we("down")), !1;
290
282
  }
291
283
  ]
292
284
  ])
293
- ), ct = () => {
294
- var f, b;
295
- const e = (c == null ? void 0 : c.autoAlignPopupWidth) === !1 && (!((f = c == null ? void 0 : c.style) != null && f.width) || ((b = c == null ? void 0 : c.style) == null ? void 0 : b.width) === "auto"), t = e && ut, n = "notFoundContent" in u ? Qe : ze("Select"), r = ae.length ? /* @__PURE__ */ _(
296
- Mt,
285
+ ), at = () => {
286
+ const e = y?.autoAlignPopupWidth === !1 && (!y?.style?.width || y?.style?.width === "auto"), t = e && st, o = "notFoundContent" in a ? He : Te("Select"), r = J.length ? /* @__PURE__ */ I(
287
+ Pt,
297
288
  {
298
- id: Me,
289
+ id: ye,
299
290
  role: "listbox",
300
- style: Ae,
301
- className: ge(`${m}-popup-inner`, Se),
302
- ref: ue,
303
- data: ae,
291
+ style: me,
292
+ className: re(`${f}-popup-inner`, ge),
293
+ ref: Q,
294
+ data: J,
304
295
  height: null,
305
- isStaticItemHeight: !at,
296
+ isStaticItemHeight: !lt,
306
297
  measureLongestItem: e,
307
- itemKey: (s) => s.props._key,
308
- onMouseDown: Ut,
298
+ itemKey: (l) => l.props._key,
299
+ onMouseDown: Mt,
309
300
  onMouseMove: () => {
310
301
  w.current = null;
311
302
  },
312
- onScroll: (s) => te == null ? void 0 : te(s.target),
313
- ...P,
314
- threshold: t ? null : P == null ? void 0 : P.threshold,
315
- children: (s) => {
316
- var L;
317
- if (Dt(s))
318
- return /* @__PURE__ */ _(s.type, { ...s.props, prefixCls: m });
319
- if (Rt(s)) {
320
- const q = (L = s.props) == null ? void 0 : L.value, ft = v(M) ? M.value : M, dt = N.map(
321
- (U) => v(U) ? U.value : U
322
- ), mt = {
323
- prefixCls: m,
324
- rtl: be,
325
- _valueActive: h,
326
- _valueSelect: o,
327
- _isMultipleMode: p,
328
- _isUserCreatingOption: d && ft === q,
329
- _isUserCreatedOption: d && dt.indexOf(q) > -1,
330
- _onClick: Ue,
331
- _onMouseEnter: (U) => {
332
- w.current === null && E(U);
303
+ onScroll: (l) => Je?.(l.target),
304
+ ...he,
305
+ threshold: t ? null : he?.threshold,
306
+ children: (l) => {
307
+ if (Ft(l))
308
+ return /* @__PURE__ */ I(l.type, { ...l.props, prefixCls: f });
309
+ if (Lt(l)) {
310
+ const h = l.props?.value, k = C(M) ? M.value : M, te = F.map(
311
+ (N) => C(N) ? N.value : N
312
+ ), pt = {
313
+ prefixCls: f,
314
+ rtl: le,
315
+ _valueActive: g,
316
+ _valueSelect: n,
317
+ _isMultipleMode: u,
318
+ _isUserCreatingOption: c && k === h,
319
+ _isUserCreatedOption: c && te.indexOf(h) > -1,
320
+ _onClick: xe,
321
+ _onMouseEnter: (N) => {
322
+ w.current === null && _(N);
333
323
  },
334
324
  _onMouseLeave: () => {
335
- w.current === null && E(void 0);
325
+ w.current === null && _(void 0);
336
326
  }
337
327
  };
338
- return s && /* @__PURE__ */ _(s.type, { ...s.props, ...mt });
328
+ return l && /* @__PURE__ */ I(l.type, { ...l.props, ...pt });
339
329
  }
340
- return s;
330
+ return l;
341
331
  }
342
332
  }
343
- ) : null, i = n && !(d && g) ? /* @__PURE__ */ _(
333
+ ) : null, i = o && !(c && d) ? /* @__PURE__ */ I(
344
334
  "div",
345
335
  {
346
- style: Ae,
347
- className: ge(`${m}-popup-inner`, Se),
348
- children: n
336
+ style: me,
337
+ className: re(`${f}-popup-inner`, ge),
338
+ children: o
349
339
  }
350
340
  ) : null;
351
- return /* @__PURE__ */ gt(
341
+ return /* @__PURE__ */ ct(
352
342
  "div",
353
343
  {
354
- className: ge(`${m}-popup`, {
355
- [`${m}-popup-hidden`]: r === null && i === null,
356
- [`${m}-popup-multiple`]: p
344
+ className: re(`${f}-popup`, {
345
+ [`${f}-popup-hidden`]: r === null && i === null,
346
+ [`${f}-popup-multiple`]: u
357
347
  }),
358
348
  tabIndex: -1,
359
- onKeyDown: (s) => W(s),
349
+ onKeyDown: (l) => K(l),
360
350
  children: [
361
- !!p && !!r && !!_e && // 潘启宝添加
362
- /* @__PURE__ */ _(
363
- yt,
351
+ !!u && !!r && !!Oe && // 潘启宝添加
352
+ /* @__PURE__ */ I(
353
+ ht,
364
354
  {
365
355
  "aria-hidden": "true",
366
- className: `${m}-checkbox ${m}-checkbox-all`,
367
- checked: k.length === o.length,
368
- indeterminate: k.length !== o.length && o.length !== 0,
369
- onChange: (s) => {
370
- I(s ? [...k] : []);
356
+ className: `${f}-checkbox ${f}-checkbox-all`,
357
+ checked: V.length === n.length,
358
+ indeterminate: V.length !== n.length && n.length !== 0,
359
+ onChange: (l) => {
360
+ P(l ? [...V] : []);
371
361
  },
372
362
  children: "全选"
373
363
  }
374
364
  ),
375
- typeof xe == "function" ? xe(r || i) : r || i
365
+ typeof de == "function" ? de(r || i) : r || i
376
366
  ]
377
367
  }
378
368
  );
379
- }, fe = (e) => {
380
- if (H.current = null, p && D(Q) && Q.length) {
381
- const t = e.split(new RegExp(`[${Q.join("")}]`));
369
+ }, Z = (e) => {
370
+ if (D.current = null, u && T(W) && W.length) {
371
+ const t = e.split(new RegExp(`[${W.join("")}]`));
382
372
  if (t.length > 1) {
383
- H.current = Date.now();
384
- const n = t.filter(
385
- (i, f) => i && t.indexOf(i) === f
386
- ), r = o.slice(0);
387
- let l = !1;
388
- n.forEach((i, f, b) => {
389
- r.indexOf(i) === -1 && (d || a.get(i)) && (r.push(i), l = !0);
390
- }), l && I(r);
373
+ D.current = Date.now();
374
+ const o = t.filter(
375
+ (i, l) => i && t.indexOf(i) === l
376
+ ), r = n.slice(0);
377
+ let s = !1;
378
+ o.forEach((i, l, h) => {
379
+ r.indexOf(i) === -1 && (c || p.get(i)) && (r.push(i), s = !0);
380
+ }), s && P(r);
391
381
  }
392
382
  }
393
- return !!H.current;
394
- }, pt = {
395
- onFocus: tt,
383
+ return !!D.current;
384
+ }, ut = {
385
+ onFocus: qe,
396
386
  onBlur: (e) => {
397
- ee == null || ee(e), !O && !pe.current && S("", "optionListHide");
387
+ ze?.(e), !m && !Y.current && A("", "optionListHide");
398
388
  },
399
389
  onKeyDown: (e) => {
400
390
  if (e.target.tagName === "INPUT" && e.target.value) {
401
- const t = e.key === Ge.key, n = e.key === $e.key;
402
- if (n || t) {
403
- const r = n ? `
391
+ const t = e.key === _e.key, o = e.key === Ie.key;
392
+ if (o || t) {
393
+ const r = o ? `
404
394
  ` : t ? " " : "";
405
- fe(e.target.value + r) && S("", "tokenSeparator");
395
+ Z(e.target.value + r) && A("", "tokenSeparator");
406
396
  }
407
397
  }
408
- W(e), ie == null || ie(e);
398
+ K(e), Ze?.(e);
409
399
  },
410
400
  onChangeInputValue: (e, { nativeEvent: { inputType: t } }) => {
411
- t !== "insertFromPaste" && fe(e), H.current ? S("", "tokenSeparator") : S(e, "manual"), !O && e && F(!0);
401
+ t !== "insertFromPaste" && Z(e), D.current ? A("", "tokenSeparator") : A(e, "manual"), !m && e && E(!0);
412
402
  },
413
403
  onPaste: (e) => {
414
- fe(e.clipboardData.getData("text")), oe == null || oe(e);
404
+ Z(e.clipboardData.getData("text")), Ye?.(e);
415
405
  },
416
406
  // Option Items
417
- onRemoveCheckedItem: (e, t, n) => {
418
- n.stopPropagation(), Le(o[t], "remove");
407
+ onRemoveCheckedItem: (e, t, o) => {
408
+ o.stopPropagation(), ke(n[t], "remove");
419
409
  },
420
410
  onClear: (e) => {
421
- if (e.stopPropagation(), p) {
422
- const t = o.filter((n, r, l) => {
423
- const i = a.get(n);
411
+ if (e.stopPropagation(), u) {
412
+ const t = n.filter((o, r, s) => {
413
+ const i = p.get(o);
424
414
  return i && i.disabled;
425
415
  });
426
- I(t);
416
+ P(t);
427
417
  } else
428
- I(void 0);
429
- S("", "manual"), Y == null || Y(O);
418
+ P(void 0);
419
+ A("", "manual"), We?.(m);
430
420
  }
431
421
  };
432
- vt(
433
- qe,
434
- () => {
435
- var e;
436
- return {
437
- dom: (e = y.current) == null ? void 0 : e.dom,
438
- focus() {
439
- y.current && y.current.focus();
440
- },
441
- blur() {
442
- y.current && y.current.blur();
443
- },
444
- hotkeyHandler: W,
445
- activeOptionValue: h,
446
- getOptionInfoByValue: T,
447
- getOptionInfoList: () => [...a.values()].filter((t) => t._valid),
448
- scrollIntoView: G,
449
- getRootDOMNode() {
450
- var t, n;
451
- return (n = (t = y.current) == null ? void 0 : t.getRootDOMNode) == null ? void 0 : n.call(t);
452
- }
453
- };
454
- },
422
+ gt(
423
+ Le,
424
+ () => ({
425
+ dom: O.current?.dom,
426
+ focus() {
427
+ O.current && O.current.focus();
428
+ },
429
+ blur() {
430
+ O.current && O.current.blur();
431
+ },
432
+ hotkeyHandler: K,
433
+ activeOptionValue: g,
434
+ getOptionInfoByValue: L,
435
+ getOptionInfoList: () => [...p.values()].filter((e) => e._valid),
436
+ scrollIntoView: H,
437
+ getRootDOMNode() {
438
+ return O.current?.getRootDOMNode?.();
439
+ }
440
+ }),
455
441
  [
456
- W,
457
- a,
458
- h,
459
- T,
460
- G
442
+ K,
443
+ p,
444
+ g,
445
+ L,
446
+ H
461
447
  ]
462
448
  );
463
- const De = (e) => /* @__PURE__ */ _(
464
- wt,
449
+ const Se = (e) => /* @__PURE__ */ I(
450
+ bt,
465
451
  {
466
- ref: Ee,
467
- popup: ct,
468
- trigger: Ye,
469
- disabled: Be,
470
- getPopupContainer: Xe,
452
+ ref: ve,
453
+ popup: at,
454
+ trigger: Ge,
455
+ disabled: De,
456
+ getPopupContainer: $e,
471
457
  classNames: "slideDynamicOrigin",
472
458
  autoAlignPopupWidth: !0,
473
- popupAlign: $t,
474
- popupVisible: O,
475
- unmountOnExit: Je,
476
- onVisibleChange: F,
459
+ popupAlign: Ut,
460
+ popupVisible: m,
461
+ unmountOnExit: Re,
462
+ onVisibleChange: E,
477
463
  __onExit: () => {
478
- pe.current = !0;
464
+ Y.current = !0;
479
465
  },
480
466
  __onExited: () => {
481
- pe.current = !1, S("", "optionListHide");
467
+ Y.current = !1, A("", "optionListHide");
482
468
  },
483
- ..._t(c, ["popupVisible", "onVisibleChange"]),
469
+ ...xt(y, ["popupVisible", "onVisibleChange"]),
484
470
  children: e
485
471
  }
486
- ), de = typeof X == "function" ? X(K(o)) : X;
487
- return V(() => {
488
- var t;
489
- const e = Et([(t = y.current) == null ? void 0 : t.dom], () => {
490
- var n, r;
491
- (r = (n = Ee.current) == null ? void 0 : n.updatePopupPosition) == null || r.call(n);
472
+ ), ee = typeof B == "function" ? B(G(n)) : B;
473
+ return b(() => {
474
+ const e = St([O.current?.dom], () => {
475
+ ve.current?.updatePopupPosition?.();
492
476
  });
493
477
  return () => {
494
478
  e();
495
479
  };
496
- }, [(Re = y.current) == null ? void 0 : Re.dom]), de != null ? De(de) : /* @__PURE__ */ _(
497
- kt,
480
+ }, [O.current?.dom]), ee != null ? Se(ee) : /* @__PURE__ */ I(
481
+ vt,
498
482
  {
499
- ...u,
500
- ...pt,
501
- ref: y,
502
- value: o,
503
- inputValue: g,
504
- popupVisible: O,
505
- rtl: be,
506
- prefixCls: m,
507
- allowCreate: !!d,
508
- ariaControls: Me,
509
- isEmptyValue: $,
510
- isMultiple: p,
511
- onSort: I,
483
+ ...a,
484
+ ...ut,
485
+ ref: O,
486
+ value: n,
487
+ inputValue: d,
488
+ popupVisible: m,
489
+ rtl: le,
490
+ prefixCls: f,
491
+ allowCreate: !!c,
492
+ ariaControls: ye,
493
+ isEmptyValue: R,
494
+ isMultiple: u,
495
+ onSort: P,
512
496
  renderText: (e) => {
513
- const t = T(e);
514
- let n = e;
515
- if (Ot(ye)) {
516
- const r = K(e, !1);
517
- n = ye(
497
+ const t = L(e);
498
+ let o = e;
499
+ if (ft(ae)) {
500
+ const r = G(e, !1);
501
+ o = ae(
518
502
  r.option || null,
519
503
  r.value
520
504
  );
521
505
  } else {
522
506
  let r = !1;
523
- if (R) {
524
- const l = u.value || u.defaultValue;
525
- if (Array.isArray(l)) {
526
- const i = l.find(
527
- (f) => v(f) && f.value === e
507
+ if (U) {
508
+ const s = a.value || a.defaultValue;
509
+ if (Array.isArray(s)) {
510
+ const i = s.find(
511
+ (l) => C(l) && l.value === e
528
512
  );
529
- i && (n = i.label, r = !0);
530
- } else v(l) && (n = l.label, r = !0);
513
+ i && (o = i.label, r = !0);
514
+ } else C(s) && (o = s.label, r = !0);
531
515
  }
532
- !r && t && "children" in t && (n = t.children);
516
+ !r && t && "children" in t && (o = t.children);
533
517
  }
534
518
  return {
535
- text: n,
519
+ text: o,
536
520
  disabled: t && t.disabled
537
521
  };
538
522
  },
539
- renderView: De
523
+ renderView: Se
540
524
  }
541
525
  );
542
526
  }
543
- const jt = ht.forwardRef(Gt), he = jt;
544
- he.displayName = "Select";
545
- he.Option = Tt;
546
- he.OptGroup = Nt;
527
+ const Rt = dt.forwardRef(Dt), ie = Rt;
528
+ ie.displayName = "Select";
529
+ ie.Option = _t;
530
+ ie.OptGroup = It;
547
531
  export {
548
- Tt as SelectOption,
549
- Nt as SelectOptionGroup,
550
- he as default
532
+ _t as SelectOption,
533
+ It as SelectOptionGroup,
534
+ ie as default
551
535
  };