@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/trigger/index.js CHANGED
@@ -1,38 +1,38 @@
1
- import { jsx as D, jsxs as $e } from "react/jsx-runtime";
2
- import ut from "../dist/react-transition-group/src/CSSTransition.js";
1
+ import { jsx as P, jsxs as xe } from "react/jsx-runtime";
2
+ import no from "../dist/react-transition-group/src/CSSTransition.js";
3
3
  import "../dist/react-transition-group/src/ReplaceTransition.js";
4
4
  import "../dist/react-transition-group/src/SwitchTransition.js";
5
5
  import "../dist/react-transition-group/chunk/CPfP7aNL.js";
6
6
  import "../dist/react-transition-group/src/TransitionGroup.js";
7
- import ct from "lodash/isArray";
8
- import S from "lodash/isFunction";
9
- import { forwardRef as lt, useContext as pt, useRef as R, useState as at, Children as He, useCallback as be, cloneElement as Ie, useImperativeHandle as ft, useLayoutEffect as dt, useEffect as g, Fragment as mt } from "react";
10
- import { createPortal as gt } from "react-dom";
7
+ import ro from "lodash/isArray";
8
+ import D from "lodash/isFunction";
9
+ import { forwardRef as io, useContext as so, useRef as L, useState as uo, Children as Me, useCallback as Se, cloneElement as Oe, useImperativeHandle as co, useLayoutEffect as lo, useEffect as g, Fragment as po } from "react";
10
+ import { createPortal as ao } from "react-dom";
11
11
  import "../config-provider/ConfigProvider.js";
12
- import Y from "@unicom-cloud/utils/class-name";
13
- import { on as oe, off as ne, getScrollElements as yt, isScrollElement as Tt, contains as Le } from "../components/common/utils/dom.js";
14
- import { supportRef as Ct } from "../components/common/utils/is.js";
15
- import { Esc as Be } from "@unicom-cloud/utils/constant/keyboardCode";
16
- import { mergeProps as ht } from "../components/common/utils/mergeProps.js";
17
- import { pickDataAttributes as Et } from "../components/common/utils/pick.js";
18
- import { callbackOriginRef as Dt, findDOMNode_ as wt } from "../components/common/utils/reactDOM.js";
19
- import { resizeObserverEffect as re } from "../components/common/utils/resizeObserverEffect.js";
20
- import { throttleByRaf as Ve } from "../components/common/utils/throttleByRaf.js";
21
- import Pt, { getBoundingClientRect as xt } from "./getPopupStyle.js";
22
- import Mt from "../config-provider/context.js";
23
- import { isPlainObject as ie } from "@unicom-cloud/utils/is";
24
- function St(d, I) {
12
+ import R from "@unicom-cloud/utils/class-name";
13
+ import { on as G, off as J, getScrollElements as fo, isScrollElement as mo, contains as ve } from "../components/common/utils/dom.js";
14
+ import { supportRef as go } from "../components/common/utils/is.js";
15
+ import { Esc as be } from "@unicom-cloud/utils/constant/keyboardCode";
16
+ import { mergeProps as yo } from "../components/common/utils/mergeProps.js";
17
+ import { pickDataAttributes as To } from "../components/common/utils/pick.js";
18
+ import { callbackOriginRef as Co, findDOMNode_ as Po } from "../components/common/utils/reactDOM.js";
19
+ import { resizeObserver as Z } from "../components/common/utils/resizeObserver.js";
20
+ import { throttleByRaf as Ne } from "../components/common/utils/throttleByRaf.js";
21
+ import ho, { getBoundingClientRect as Eo } from "./getPopupStyle.js";
22
+ import wo from "../config-provider/context.js";
23
+ import { isPlainObject as ee } from "@unicom-cloud/utils/is";
24
+ function Do(d, $) {
25
25
  if (!d)
26
26
  return {};
27
- const { width: y, height: T, left: C, right: K } = xt(d, I);
27
+ const { width: y, height: x, left: T, right: A } = Eo(d, $);
28
28
  return {
29
29
  width: y,
30
- height: T,
31
- left: C,
32
- right: K
30
+ height: x,
31
+ left: T,
32
+ right: A
33
33
  };
34
34
  }
35
- const eo = [
35
+ const Go = [
36
36
  "onClick",
37
37
  "onMouseEnter",
38
38
  "onMouseLeave",
@@ -42,13 +42,13 @@ const eo = [
42
42
  "onContextMenu",
43
43
  "onKeyDown"
44
44
  ];
45
- function Ot(d, I) {
46
- const y = {}, T = { ...d };
47
- return I.forEach((C) => {
48
- d && C in d && (y[C] = d[C], delete T[C]);
49
- }), { picked: y, omitted: T };
45
+ function xo(d, $) {
46
+ const y = {}, x = { ...d };
47
+ return $.forEach((T) => {
48
+ d && T in d && (y[T] = d[T], delete x[T]);
49
+ }), { picked: y, omitted: x };
50
50
  }
51
- const vt = {
51
+ const Mo = {
52
52
  blurToHide: !0,
53
53
  // clickToClose: true,
54
54
  classNames: "fadeIn",
@@ -69,30 +69,29 @@ const vt = {
69
69
  autoFitPosition: !0,
70
70
  updateOnScroll: !0
71
71
  };
72
- function Nt(d, I) {
73
- var Se, Oe;
74
- const y = pt(Mt), { getPrefixCls: T, zIndex: C, rtl: K } = y, i = c(d), {
75
- children: se,
76
- style: A,
77
- className: ke,
78
- arrowProps: h,
79
- disabled: O,
80
- popup: ue,
81
- classNames: Q,
82
- duration: Re,
83
- unmountOnExit: ce,
84
- alignPoint: Ae,
85
- autoAlignPopupWidth: Fe,
86
- position: ze,
87
- childrenPrefix: w,
72
+ function So(d, $) {
73
+ const y = so(wo), { getPrefixCls: x, zIndex: T, rtl: A } = y, i = u(d), {
74
+ children: oe,
75
+ style: te,
76
+ className: $e,
77
+ arrowProps: _,
78
+ disabled: M,
79
+ popup: ne,
80
+ classNames: z,
81
+ duration: ke,
82
+ unmountOnExit: re,
83
+ alignPoint: He,
84
+ autoAlignPopupWidth: Ie,
85
+ position: Le,
86
+ childrenPrefix: h,
88
87
  showArrow: _e,
89
- popupStyle: le,
90
- __onExit: W,
91
- __onExited: X
88
+ popupStyle: ie,
89
+ __onExit: Be,
90
+ __onExited: Ve
92
91
  } = i;
93
- if (!ue)
92
+ if (!ne)
94
93
  return null;
95
- const pe = se || se === 0, a = R(null), v = R(null), ae = R(null), fe = R(null), n = R({
94
+ const se = oe || oe === 0, a = L(null), S = L(null), ue = L(null), ce = L(null), t = L({
96
95
  rootElement: void 0,
97
96
  triggerDestoried: !1,
98
97
  // 标志 popup 是否被销毁
@@ -113,121 +112,119 @@ function Nt(d, I) {
113
112
  // 保存当前节点到弹出容器间的所有滚动元素
114
113
  delayTimeoutID: -1,
115
114
  updatePositionTimeoutID: -1
116
- }), [U, N] = at({ popupVisible: !1, popupStyle: {} }), j = i.popupVisible, Ye = U.popupVisible, u = j ?? Ye, l = {}, q = {
115
+ }), [Y, O] = uo({ popupVisible: !1, popupStyle: {} }), K = i.popupVisible, Fe = Y.popupVisible, s = K ?? Fe, l = {}, Q = {
117
116
  onMouseDown() {
118
- n.current.hasPopupMouseDown = !0, setTimeout(() => {
119
- n.current.hasPopupMouseDown = !1;
117
+ t.current.hasPopupMouseDown = !0, setTimeout(() => {
118
+ t.current.hasPopupMouseDown = !1;
120
119
  }, 0);
121
120
  }
122
121
  };
123
- V() && !O ? (l.onMouseEnter = qe, l.onMouseLeave = Ee, Z() && (l.onClick = De), Ae && (l.onMouseMove = Ge), We() || (q.onMouseEnter = Je, q.onMouseLeave = Ze)) : (l.onMouseEnter = x("onMouseEnter"), l.onMouseLeave = x("onMouseLeave")), me() && !O ? (l.onContextMenu = et, l.onClick = De) : l.onContextMenu = x("onContextMenu"), de() && !O ? l.onClick = tt : l.onClick = l.onClick || x("onClick"), J() && !O ? (l.onFocus = ot, ge() && (l.onBlur = nt)) : (l.onFocus = x("onFocus"), l.onBlur = x("onBlur")), O ? l.onKeyDown = x("onKeyDown") : l.onKeyDown = Ue;
124
- const L = z(), B = He.only(ue());
125
- L.props.className && (l.className = L.props.className), w && u && (l.className = Y(l.className, `${w}-open`)), J() && (l.tabIndex = O ? -1 : 0);
126
- const $ = T == null ? void 0 : T("trigger"), Ke = Y(
127
- $,
128
- w,
129
- `${$}-position-${ze}`,
130
- { [`${$}-rtl`]: K },
131
- ke
122
+ I() && !M ? (l.onMouseEnter = We, l.onMouseLeave = ye, U() && (l.onClick = Te), He && (l.onMouseMove = Xe), ze() || (Q.onMouseEnter = Ue, Q.onMouseLeave = je)) : (l.onMouseEnter = w("onMouseEnter"), l.onMouseLeave = w("onMouseLeave")), pe() && !M ? (l.onContextMenu = qe, l.onClick = Te) : l.onContextMenu = w("onContextMenu"), le() && !M ? l.onClick = Ge : l.onClick = l.onClick || w("onClick"), X() && !M ? (l.onFocus = Je, ae() && (l.onBlur = Ze)) : (l.onFocus = w("onFocus"), l.onBlur = w("onBlur")), M ? l.onKeyDown = w("onKeyDown") : l.onKeyDown = Ke;
123
+ const k = V(), H = Me.only(ne());
124
+ k.props.className && (l.className = k.props.className), h && s && (l.className = R(l.className, `${h}-open`)), X() && (l.tabIndex = M ? -1 : 0);
125
+ const v = x?.("trigger"), Re = R(
126
+ v,
127
+ h,
128
+ `${v}-position-${Le}`,
129
+ { [`${v}-rtl`]: A },
130
+ $e
132
131
  );
133
- function c(e) {
134
- const { componentConfig: t } = y ?? {};
135
- return ht(
136
- ie(e) ? e : d,
137
- vt,
138
- (t == null ? void 0 : t.Trigger) ?? {},
139
- ct(e) ? e : void 0
132
+ function u(e) {
133
+ const { componentConfig: o } = y ?? {};
134
+ return yo(
135
+ ee(e) ? e : d,
136
+ Mo,
137
+ o?.Trigger ?? {},
138
+ ro(e) ? e : void 0
140
139
  );
141
140
  }
142
- function H() {
143
- var t, o;
144
- const e = wt(
145
- ((t = i.getTargetDOMNode) == null ? void 0 : t.call(i)) || ((o = i.getRootElement) == null ? void 0 : o.call(i)) || n.current.child
141
+ function b() {
142
+ const e = Po(
143
+ i.getTargetDOMNode?.() || i.getRootElement?.() || t.current.child
146
144
  );
147
- return n.current.rootElement = e, e;
145
+ return t.current.rootElement = e, e;
148
146
  }
149
- const G = be(
150
- Ve(() => {
151
- b();
147
+ const W = Se(
148
+ Ne(() => {
149
+ N();
152
150
  }),
153
- [u]
151
+ [s]
154
152
  );
155
- function de() {
156
- const { trigger: e } = c(["trigger"]);
153
+ function le() {
154
+ const { trigger: e } = u(["trigger"]);
157
155
  return [].concat(e).indexOf("click") > -1;
158
156
  }
159
- function J() {
160
- const { trigger: e } = c(["trigger"]);
157
+ function X() {
158
+ const { trigger: e } = u(["trigger"]);
161
159
  return [].concat(e).indexOf("focus") > -1;
162
160
  }
163
- function V() {
164
- const { trigger: e } = c(["trigger"]);
161
+ function I() {
162
+ const { trigger: e } = u(["trigger"]);
165
163
  return [].concat(e).indexOf("hover") > -1;
166
164
  }
167
- function me() {
168
- const { trigger: e } = c(["trigger"]);
165
+ function pe() {
166
+ const { trigger: e } = u(["trigger"]);
169
167
  return [].concat(e).indexOf("contextMenu") > -1;
170
168
  }
171
- function Qe() {
172
- return V() && c(["mouseLeaveToClose"]).mouseLeaveToClose;
169
+ function Ae() {
170
+ return I() && u(["mouseLeaveToClose"]).mouseLeaveToClose;
173
171
  }
174
- function We() {
175
- return V() && !c(["popupHoverStay"]).popupHoverStay;
172
+ function ze() {
173
+ return I() && !u(["popupHoverStay"]).popupHoverStay;
176
174
  }
177
- function Z() {
178
- if (de() || me()) {
179
- const { clickToClose: e = !0 } = c(["clickToClose"]);
175
+ function U() {
176
+ if (le() || pe()) {
177
+ const { clickToClose: e = !0 } = u(["clickToClose"]);
180
178
  return e;
181
179
  }
182
- return V() && i.clickToClose;
180
+ return I() && i.clickToClose;
183
181
  }
184
- function ge() {
185
- return J() && c(["blurToHide"]).blurToHide;
182
+ function ae() {
183
+ return X() && u(["blurToHide"]).blurToHide;
186
184
  }
187
- function Xe() {
188
- n.current.updatePositionTimeoutID && (n.current.updatePositionTimeoutID.cancel ? n.current.updatePositionTimeoutID.cancel() : (clearTimeout(n.current.updatePositionTimeoutID), n.current.updatePositionTimeoutID = null)), P();
185
+ function Ye() {
186
+ t.current.updatePositionTimeoutID && (t.current.updatePositionTimeoutID.cancel ? t.current.updatePositionTimeoutID.cancel() : (clearTimeout(t.current.updatePositionTimeoutID), t.current.updatePositionTimeoutID = null)), E();
189
187
  }
190
- function ye(e) {
191
- var k, ve;
192
- const t = a.current;
193
- if (!t)
188
+ function fe(e) {
189
+ const o = a.current;
190
+ if (!o)
194
191
  return {};
195
- const { showArrow: o, classNames: r } = c([
192
+ const { showArrow: n, classNames: r } = u([
196
193
  "showArrow",
197
194
  "classNames"
198
195
  ]);
199
- let s = o && ((k = n.current.arrowStyle) == null ? void 0 : k.top) || 0, p = o && ((ve = n.current.arrowStyle) == null ? void 0 : ve.left) || 0;
200
- s = s ? `${s}px` : "", p = p ? `${p}px` : "";
201
- const M = {
196
+ let c = n && t.current.arrowStyle?.top || 0, p = n && t.current.arrowStyle?.left || 0;
197
+ c = c ? `${c}px` : "", p = p ? `${p}px` : "";
198
+ const we = {
202
199
  top: `${p || "50%"} 100% 0`,
203
200
  tl: `${p || "15px"} 100% 0`,
204
- tr: `${p || `${t.clientWidth - 15}px`} 100% 0`,
201
+ tr: `${p || `${o.clientWidth - 15}px`} 100% 0`,
205
202
  bottom: `${p || "50%"} 0 0`,
206
203
  bl: `${p || "15px"} 0 0`,
207
- br: `${p || `${t.clientWidth - 15}px`} 0 0`,
208
- left: `100% ${s || "50%"} 0`,
209
- lt: `100% ${s || "15px"} 0`,
210
- lb: `100% ${s || `${t.clientHeight - 15}px`} 0`,
211
- right: `0 ${s || "50%"} 0`,
212
- rt: `0 ${s || "15px"} 0`,
213
- rb: `0 ${s || `${t.clientHeight - 15}px`} 0`
204
+ br: `${p || `${o.clientWidth - 15}px`} 0 0`,
205
+ left: `100% ${c || "50%"} 0`,
206
+ lt: `100% ${c || "15px"} 0`,
207
+ lb: `100% ${c || `${o.clientHeight - 15}px`} 0`,
208
+ right: `0 ${c || "50%"} 0`,
209
+ rt: `0 ${c || "15px"} 0`,
210
+ rb: `0 ${c || `${o.clientHeight - 15}px`} 0`
214
211
  };
215
212
  if (r && r.indexOf("zoom") > -1)
216
213
  return {
217
- transformOrigin: M[e]
214
+ transformOrigin: we[e]
218
215
  };
219
216
  if (r === "slideDynamicOrigin") {
220
- let Ne = "0% 0%";
221
- return ["top", "tl", "tr"].indexOf(e) > -1 && (Ne = "100% 100%"), {
222
- transformOrigin: Ne
217
+ let De = "0% 0%";
218
+ return ["top", "tl", "tr"].indexOf(e) > -1 && (De = "100% 100%"), {
219
+ transformOrigin: De
223
220
  };
224
221
  }
225
222
  return {};
226
223
  }
227
- function Te() {
228
- if (c(["classNames"]).classNames !== "slideDynamicOrigin")
224
+ function de() {
225
+ if (u(["classNames"]).classNames !== "slideDynamicOrigin")
229
226
  return "";
230
- switch (n.current.realPosition) {
227
+ switch (t.current.realPosition) {
231
228
  case "bottom":
232
229
  case "bl":
233
230
  case "br":
@@ -240,144 +237,140 @@ function Nt(d, I) {
240
237
  return "";
241
238
  }
242
239
  }
243
- function ee() {
244
- var k;
245
- if (!v.current)
240
+ function j() {
241
+ if (!S.current)
246
242
  return {};
247
- const e = a.current, t = H();
248
- if (!(t != null && t.offsetParent) && !((k = t == null ? void 0 : t.getClientRects()) != null && k.length))
249
- return U.popupStyle;
250
- const { style: o, arrowStyle: r, realPosition: s } = Pt(
243
+ const e = a.current, o = b();
244
+ if (!o?.offsetParent && !o?.getClientRects()?.length)
245
+ return Y.popupStyle;
246
+ const { style: n, arrowStyle: r, realPosition: c } = ho(
251
247
  i,
252
248
  e,
253
- t,
254
- v.current,
255
- n.current.mouseLocation
249
+ o,
250
+ S.current,
251
+ t.current.mouseLocation
256
252
  );
257
- n.current.arrowStyle = r || {};
258
- const p = s || i.position;
259
- return n.current.realPosition = p, {
260
- ...o,
261
- ...ye(p)
253
+ t.current.arrowStyle = r || {};
254
+ const p = c || i.position;
255
+ return t.current.realPosition = p, {
256
+ ...n,
257
+ ...fe(p)
262
258
  };
263
259
  }
264
- function E(e) {
265
- const t = ee();
266
- N((o) => {
267
- const r = { ...o };
268
- return r.popupStyle = t, r;
269
- }), S(e) && setTimeout(() => {
260
+ function C(e) {
261
+ const o = j();
262
+ O((n) => {
263
+ const r = { ...n };
264
+ return r.popupStyle = o, r;
265
+ }), D(e) && setTimeout(() => {
270
266
  e();
271
267
  }, 0);
272
268
  }
273
- const F = be(Ve(E), [
274
- u
269
+ const B = Se(Ne(C), [
270
+ s
275
271
  ]);
276
- function b(e = 0, t) {
277
- if (u) {
272
+ function N(e = 0, o) {
273
+ if (s) {
278
274
  if (e < 4) {
279
- n.current.updatePositionTimeoutID = F(t);
275
+ t.current.updatePositionTimeoutID = B(o);
280
276
  return;
281
277
  }
282
- n.current.updatePositionTimeoutID = setTimeout(() => {
283
- const o = ee();
284
- N((r) => {
285
- const s = { ...r };
286
- return s.popupStyle = o, s;
287
- }), S(t) && setTimeout(() => {
288
- t();
278
+ t.current.updatePositionTimeoutID = setTimeout(() => {
279
+ const n = j();
280
+ O((r) => {
281
+ const c = { ...r };
282
+ return c.popupStyle = n, c;
283
+ }), D(o) && setTimeout(() => {
284
+ o();
289
285
  }, 0);
290
286
  }, e);
291
287
  }
292
288
  }
293
- function f(e, t = 0, o) {
294
- const r = c(["onVisibleChange", "popupVisible"]);
295
- e !== u ? Ce(t, () => {
296
- var s;
297
- (s = r.onVisibleChange) == null || s.call(r, e), "popupVisible" in r ? o == null || o() : (N((p) => {
298
- const M = { ...p };
299
- return M.popupVisible = !!e, M;
289
+ function f(e, o = 0, n) {
290
+ const r = u(["onVisibleChange", "popupVisible"]);
291
+ e !== s ? me(o, () => {
292
+ r.onVisibleChange?.(e), "popupVisible" in r ? n?.() : (O((c) => {
293
+ const p = { ...c };
294
+ return p.popupVisible = !!e, p;
300
295
  }), setTimeout(e ? () => {
301
- E(o);
296
+ C(n);
302
297
  } : () => {
303
- o == null || o();
298
+ n?.();
304
299
  }, 0));
305
- }) : o == null || o();
300
+ }) : n?.();
306
301
  }
307
- function Ce(e, t) {
308
- e ? (P(), n.current.delayTimeoutID = setTimeout(() => {
309
- t(), P();
310
- }, e)) : t();
302
+ function me(e, o) {
303
+ e ? (E(), t.current.delayTimeoutID = setTimeout(() => {
304
+ o(), E();
305
+ }, e)) : o();
311
306
  }
312
- function P() {
313
- n.current.delayTimeoutID && (clearTimeout(n.current.delayTimeoutID), n.current.delayTimeoutID = null);
307
+ function E() {
308
+ t.current.delayTimeoutID && (clearTimeout(t.current.delayTimeoutID), t.current.delayTimeoutID = null);
314
309
  }
315
- function he(e) {
316
- var r;
317
- const t = c(["onClickOutside", "clickOutsideToClose"]);
318
- let o = Le(a.current, e.target);
319
- o || (o = Le(H(), e.target)), o || (o = !!n.current.hasPopupMouseDown), o || ((r = t.onClickOutside) == null || r.call(t), t.clickOutsideToClose && (ge() || V() || f(!1)));
310
+ function ge(e) {
311
+ const o = u(["onClickOutside", "clickOutsideToClose"]);
312
+ let n = ve(a.current, e.target);
313
+ n ||= ve(b(), e.target), n ||= !!t.current.hasPopupMouseDown, n || (o.onClickOutside?.(), o.clickOutsideToClose && (ae() || I() || f(!1)));
320
314
  }
321
- function Ue(e) {
322
- const t = e.key;
323
- m("onKeyDown", e), t === Be.key && je(e);
315
+ function Ke(e) {
316
+ const o = e.key;
317
+ m("onKeyDown", e), o === be.key && Qe(e);
324
318
  }
325
- function je(e) {
326
- const { escToClose: t } = c(["escToClose"]);
327
- t && e && e.key === Be.key && u && f(!1);
319
+ function Qe(e) {
320
+ const { escToClose: o } = u(["escToClose"]);
321
+ o && e && e.key === be.key && s && f(!1);
328
322
  }
329
- function qe(e) {
330
- const { mouseEnterDelay: t } = c(["mouseEnterDelay"]);
331
- m("onMouseEnter", e), P(), f(!0, t || 0);
323
+ function We(e) {
324
+ const { mouseEnterDelay: o } = u(["mouseEnterDelay"]);
325
+ m("onMouseEnter", e), E(), f(!0, o || 0);
332
326
  }
333
- function Ge(e) {
334
- m("onMouseMove", e), te(e), u && F();
327
+ function Xe(e) {
328
+ m("onMouseMove", e), q(e), s && B();
335
329
  }
336
- function Ee(e) {
337
- const { mouseLeaveDelay: t } = c(["mouseLeaveDelay"]);
338
- P(), m("onMouseLeave", e), Qe() && u && f(!1, t || 0);
330
+ function ye(e) {
331
+ const { mouseLeaveDelay: o } = u(["mouseLeaveDelay"]);
332
+ E(), m("onMouseLeave", e), Ae() && s && f(!1, o || 0);
339
333
  }
340
- function Je() {
341
- P();
334
+ function Ue() {
335
+ E();
342
336
  }
343
- function Ze(e) {
344
- Ee(e);
337
+ function je(e) {
338
+ ye(e);
345
339
  }
346
- function te(e) {
347
- c(["alignPoint"]).alignPoint && (n.current.mouseLocation = {
340
+ function q(e) {
341
+ u(["alignPoint"]).alignPoint && (t.current.mouseLocation = {
348
342
  clientX: e.clientX,
349
343
  clientY: e.clientY
350
344
  });
351
345
  }
352
- function et(e) {
353
- e.preventDefault(), m("onContextMenu", e), te(e), u ? c(["alignPoint"]).alignPoint && F() : f(!0, 0);
346
+ function qe(e) {
347
+ e.preventDefault(), m("onContextMenu", e), q(e), s ? u(["alignPoint"]).alignPoint && B() : f(!0, 0);
354
348
  }
355
- function De(e) {
356
- u && (n.current.mousedownToHide = !0), m("onClick", e), Z() && u && f(!u, 0);
349
+ function Te(e) {
350
+ s && (t.current.mousedownToHide = !0), m("onClick", e), U() && s && f(!s, 0);
357
351
  }
358
- function tt(e) {
359
- u && (n.current.mousedownToHide = !0), m("onClick", e), te(e), !(!Z() && u) && f(!u, 0);
352
+ function Ge(e) {
353
+ s && (t.current.mousedownToHide = !0), m("onClick", e), q(e), !(!U() && s) && f(!s, 0);
360
354
  }
361
- function ot(e) {
362
- const { focusDelay: t } = c(["focusDelay"]), o = () => {
355
+ function Je(e) {
356
+ const { focusDelay: o } = u(["focusDelay"]), n = () => {
363
357
  m("onFocus", e);
364
358
  };
365
- P(), n.current.mousedownToHide || (u ? o == null || o() : f(!0, t || 0, o)), n.current.mousedownToHide = !1;
359
+ E(), t.current.mousedownToHide || (s ? n?.() : f(!0, o || 0, n)), t.current.mousedownToHide = !1;
366
360
  }
367
- function nt(e) {
361
+ function Ze(e) {
368
362
  f(!1, 200, () => m("onBlur", e));
369
363
  }
370
- function we() {
371
- u && c(["autoFixPosition"]).autoFixPosition && b();
364
+ function Ce() {
365
+ s && u(["autoFixPosition"]).autoFixPosition && N();
372
366
  }
373
- function z() {
374
- var s;
375
- const { children: e } = i, t = e, o = t && typeof t != "string" && t.type;
367
+ function V() {
368
+ const { children: e } = i, o = e, n = o && typeof o != "string" && o.type;
376
369
  let r = e;
377
- if (["string", "number"].indexOf(typeof e) > -1 || He.count(e) > 1)
378
- r = /* @__PURE__ */ D("span", { children: e });
379
- else if (t && o && (o.__PQB_BUTTON === !0 || o.__PQB_CHECKBOX === !0 || o.__PQB_SWITCH === !0 || o.__PQB_RADIO === !0 || o === "button") && t.props.disabled) {
380
- const { picked: p, omitted: M } = Ot(t.props.style, [
370
+ if (["string", "number"].indexOf(typeof e) > -1 || Me.count(e) > 1)
371
+ r = /* @__PURE__ */ P("span", { children: e });
372
+ else if (o && n && (n.__PQB_BUTTON === !0 || n.__PQB_CHECKBOX === !0 || n.__PQB_SWITCH === !0 || n.__PQB_RADIO === !0 || n === "button") && o.props.disabled) {
373
+ const { picked: c, omitted: p } = xo(o.props.style, [
381
374
  "position",
382
375
  "left",
383
376
  "right",
@@ -387,14 +380,14 @@ function Nt(d, I) {
387
380
  "display",
388
381
  "zIndex"
389
382
  ]);
390
- r = /* @__PURE__ */ D(
383
+ r = /* @__PURE__ */ P(
391
384
  "span",
392
385
  {
393
- className: (s = t.props) == null ? void 0 : s.className,
394
- style: { display: "inline-block", ...p, cursor: "not-allowed" },
395
- children: Ie(t, {
386
+ className: o.props?.className,
387
+ style: { display: "inline-block", ...c, cursor: "not-allowed" },
388
+ children: Oe(o, {
396
389
  style: {
397
- ...M,
390
+ ...p,
398
391
  pointerEvents: "none"
399
392
  },
400
393
  className: void 0
@@ -402,201 +395,199 @@ function Nt(d, I) {
402
395
  }
403
396
  );
404
397
  }
405
- return r || /* @__PURE__ */ D("span", {});
398
+ return r || /* @__PURE__ */ P("span", {});
406
399
  }
407
- function m(e, t) {
408
- const o = z(), r = o && o.props && o.props[e], s = c([e])[e];
409
- S(r) && r(t), S(s) && s(t);
400
+ function m(e, o) {
401
+ const n = V(), r = n && n.props && n.props[e], c = u([e])[e];
402
+ D(r) && r(o), D(c) && c(o);
410
403
  }
411
- function x(e) {
412
- const t = z(), o = t && t.props && t.props[e], r = c([e])[e];
413
- return S(r) && S(o) ? (s) => {
414
- o(s), r(s);
415
- } : o || r;
404
+ function w(e) {
405
+ const o = V(), n = o && o.props && o.props[e], r = u([e])[e];
406
+ return D(r) && D(n) ? (c) => {
407
+ n(c), r(c);
408
+ } : n || r;
416
409
  }
417
410
  function Pe() {
418
- const e = c(["containerScrollToClose", "updateOnScroll"]);
419
- e.containerScrollToClose ? f(!1) : e.updateOnScroll && b();
411
+ const e = u(["containerScrollToClose", "updateOnScroll"]);
412
+ e.containerScrollToClose ? f(!1) : e.updateOnScroll && N();
420
413
  }
421
- function rt() {
422
- var e;
423
- n.current.scrollElements || (n.current.scrollElements = yt(
424
- H()
414
+ function eo() {
415
+ t.current.scrollElements || (t.current.scrollElements = fo(
416
+ b()
425
417
  // refPopupContainer.current.parentNode as HTMLElement,
426
- ), Array.isArray(n.current.scrollElements) && (i.containerScrollToClose && ((e = v.current) == null ? void 0 : e.parentNode) === document.body && n.current.scrollElements.indexOf(document.body) === -1 && Tt(document.documentElement) && n.current.scrollElements.push(window), n.current.scrollElements.forEach((t) => {
427
- oe(t, "scroll", Pe);
418
+ ), Array.isArray(t.current.scrollElements) && (i.containerScrollToClose && S.current?.parentNode === document.body && t.current.scrollElements.indexOf(document.body) === -1 && mo(document.documentElement) && t.current.scrollElements.push(window), t.current.scrollElements.forEach((e) => {
419
+ G(e, "scroll", Pe);
428
420
  })));
429
421
  }
430
- function xe() {
431
- n.current.scrollElements && (n.current.scrollElements.forEach((e) => {
432
- ne(e, "scroll", Pe);
433
- }), n.current.scrollElements = null);
422
+ function he() {
423
+ t.current.scrollElements && (t.current.scrollElements.forEach((e) => {
424
+ J(e, "scroll", Pe);
425
+ }), t.current.scrollElements = null);
434
426
  }
435
- ft(I, () => ({
436
- getRootDOMNode: H,
437
- getRootElement: H,
427
+ co($, () => ({
428
+ getRootDOMNode: b,
429
+ getRootElement: b,
438
430
  getPopupElement() {
439
431
  return a.current;
440
432
  },
441
- getChild: z,
442
- getPopupStyle: ee,
443
- getTransformTranslate: Te,
444
- getTransformOrigin: ye,
445
- updateThrottleByRaf: F,
446
- update: E,
447
- updatePopupStyle: E,
448
- updatePopupPosition: b,
449
- handleUpdatePosition: G,
433
+ getChild: V,
434
+ getPopupStyle: j,
435
+ getTransformTranslate: de,
436
+ getTransformOrigin: fe,
437
+ updateThrottleByRaf: B,
438
+ update: C,
439
+ updatePopupStyle: C,
440
+ updatePopupPosition: N,
441
+ handleUpdatePosition: W,
450
442
  setPopupVisible: f,
451
- delayToDo: Ce
452
- })), dt(() => (E(), () => {
443
+ delayToDo: me
444
+ })), lo(() => (C(), () => {
453
445
  }), [
454
446
  a.current,
455
- ae.current,
456
- fe.current,
457
- n.current.rootElement
447
+ ue.current,
448
+ ce.current,
449
+ t.current.rootElement
458
450
  ]), g(() => {
459
- var o;
460
- const e = (o = v.current) == null ? void 0 : o.parentNode, t = re([e], b);
451
+ const e = S.current?.parentNode, o = Z([e], N);
461
452
  return () => {
462
- t();
453
+ o();
463
454
  };
464
- }, [(Se = v.current) == null ? void 0 : Se.parentNode]), g(() => {
465
- const e = a.current, t = re([e], we);
455
+ }, [S.current?.parentNode]), g(() => {
456
+ const e = a.current, o = Z([e], Ce);
466
457
  return () => {
467
- t();
458
+ o();
468
459
  };
469
460
  }, [a.current]), g(() => {
470
- const e = n.current.rootElement, t = re([e], we);
461
+ const e = t.current.rootElement, o = Z([e], Ce);
471
462
  return () => {
472
- t();
463
+ o();
473
464
  };
474
- }, [n.current.rootElement]), g(() => {
475
- const e = n.current.rootElement;
476
- return u && (n.current.childrenDomSize = St(e, {
465
+ }, [t.current.rootElement]), g(() => {
466
+ const e = t.current.rootElement;
467
+ return s && (t.current.childrenDomSize = Do(e, {
477
468
  boundaryDistance: i.alignPoint ? void 0 : i.boundaryDistance,
478
469
  position: i.position
479
470
  })), () => {
480
471
  };
481
472
  }, [
482
- n.current.rootElement,
473
+ t.current.rootElement,
483
474
  i.alignPoint,
484
475
  i.boundaryDistance,
485
476
  i.position
486
- ]), g(() => (u && (i.updateOnScroll || i.containerScrollToClose ? rt() : (b(), xe())), () => {
487
- xe();
477
+ ]), g(() => (s && (i.updateOnScroll || i.containerScrollToClose ? eo() : (N(), he())), () => {
478
+ he();
488
479
  }), [
489
- u,
480
+ s,
490
481
  i.updateOnScroll,
491
482
  i.containerScrollToClose
492
483
  ]), g(() => {
493
- const { clickOutsideToClose: e, getDocument: t } = c([
484
+ const { clickOutsideToClose: e, getDocument: o } = u([
494
485
  "clickOutsideToClose",
495
486
  "getDocument"
496
- ]), o = (t == null ? void 0 : t()) || window.document, r = {
487
+ ]), n = o?.() || window.document, r = {
497
488
  // clickOutside 必须监听mousedown。
498
489
  // 1. 如果事件目标元素在click后被移除,document.onclick被触发时已经没有该元素,会错误触发clickOutside逻辑,隐藏popup。
499
490
  // 2. 点击label标签,会触发对应input元素的点击事件,导致触发clickOutside,隐藏popup。
500
- capture: ie(e) ? e.capture : !1
491
+ capture: ee(e) ? e.capture : !1
501
492
  };
502
- return u && (oe(o, "mousedown", he, r), oe(window, "resize", G)), () => {
503
- ne(o, "mousedown", he, r), ne(window, "resize", G);
493
+ return s && (G(n, "mousedown", ge, r), G(window, "resize", W)), () => {
494
+ J(n, "mousedown", ge, r), J(window, "resize", W);
504
495
  };
505
- }, [u]), g(() => ("defaultPopupVisible" in i && N((e) => {
506
- const t = { ...e };
507
- return t.popupVisible = !!(i != null && i.defaultPopupVisible), t;
496
+ }, [s]), g(() => ("defaultPopupVisible" in i && O((e) => {
497
+ const o = { ...e };
498
+ return o.popupVisible = !!i?.defaultPopupVisible, o;
508
499
  }), () => {
509
- }), []), g(() => ("popupVisible" in i && N((e) => {
510
- const t = { ...e };
511
- return t.popupVisible = !!j, t;
500
+ }), []), g(() => ("popupVisible" in i && O((e) => {
501
+ const o = { ...e };
502
+ return o.popupVisible = !!K, o;
512
503
  }), () => {
513
- }), [j]), g(() => () => {
514
- Xe();
504
+ }), [K]), g(() => () => {
505
+ Ye();
515
506
  }, []);
516
- const it = pe && Ie(L, {
507
+ const oo = se && Oe(k, {
517
508
  ...l,
518
- ref: Ct(L) ? (e) => {
519
- n.current.child = e, Dt(L, e);
509
+ ref: go(k) ? (e) => {
510
+ t.current.child = e, Co(k, e);
520
511
  } : void 0
521
- }), st = /* @__PURE__ */ D(
522
- ut,
512
+ }), to = /* @__PURE__ */ P(
513
+ no,
523
514
  {
524
- in: !!u,
525
- timeout: Re,
526
- classNames: Q,
527
- unmountOnExit: ce,
515
+ in: !!s,
516
+ timeout: ke,
517
+ classNames: z,
518
+ unmountOnExit: re,
528
519
  appear: !0,
529
520
  mountOnEnter: !0,
530
521
  onEnter: () => {
531
- n.current.triggerDestoried = !1;
522
+ t.current.triggerDestoried = !1;
532
523
  const e = a.current;
533
- e && (e.style.display = "initial", e.style.pointerEvents = "none", Q === "slideDynamicOrigin" && (e.style.transform = Te()), E());
524
+ e && (e.style.display = "initial", e.style.pointerEvents = "none", z === "slideDynamicOrigin" && (e.style.transform = de()), C());
534
525
  },
535
526
  onEntering: () => {
536
527
  const e = a.current;
537
- e && (Q === "slideDynamicOrigin" && (e.style.transform = ""), E());
528
+ e && (z === "slideDynamicOrigin" && (e.style.transform = ""), C());
538
529
  },
539
530
  onEntered: () => {
540
531
  const e = a.current;
541
- e && (e.style.pointerEvents = "auto", E());
532
+ e && (e.style.pointerEvents = "auto", C());
542
533
  },
543
534
  onExit: () => {
544
535
  const e = a.current;
545
- e && (e.style.pointerEvents = "none", W == null || W(e));
536
+ e && (e.style.pointerEvents = "none", Be?.(e));
546
537
  },
547
538
  onExited: () => {
548
539
  const e = a.current;
549
- e && (e.style.display = "none", ce && (n.current.triggerDestoried = !0), N((t) => {
550
- const o = { ...t };
551
- return o.popupStyle = {}, o;
552
- }), X == null || X(e));
540
+ e && (e.style.display = "none", re && (t.current.triggerDestoried = !0), O((o) => {
541
+ const n = { ...o };
542
+ return n.popupStyle = {}, n;
543
+ }), Ve?.(e));
553
544
  },
554
545
  nodeRef: a,
555
- children: /* @__PURE__ */ $e(
546
+ children: /* @__PURE__ */ xe(
556
547
  "span",
557
548
  {
558
549
  ref: a,
559
- "trigger-placement": n.current.realPosition,
560
- ...Et(i),
550
+ "trigger-placement": t.current.realPosition,
551
+ ...To(i),
561
552
  style: {
562
- width: Fe && (A == null ? void 0 : A.width) === void 0 ? (Oe = n.current.childrenDomSize) == null ? void 0 : Oe.width : "",
563
- ...U.popupStyle,
553
+ width: Ie && te?.width === void 0 ? t.current.childrenDomSize?.width : "",
554
+ ...Y.popupStyle,
564
555
  position: "absolute",
565
- zIndex: C || "",
566
- ...A
556
+ zIndex: T || "",
557
+ ...te
567
558
  // display
568
559
  },
569
- ...q,
570
- className: Ke,
560
+ ...Q,
561
+ className: Re,
571
562
  children: [
572
- ie(le) ? /* @__PURE__ */ D(
573
- B.type,
563
+ ee(ie) ? /* @__PURE__ */ P(
564
+ H.type,
574
565
  {
575
- ref: B.ref,
576
- ...B.props,
577
- style: { ...B.props.style, ...le }
566
+ ref: H.ref,
567
+ ...H.props,
568
+ style: { ...H.props.style, ...ie }
578
569
  }
579
- ) : B,
580
- (_e || h) && /* @__PURE__ */ D(
570
+ ) : H,
571
+ (_e || _) && /* @__PURE__ */ P(
581
572
  "div",
582
573
  {
583
- ref: ae,
584
- className: Y(`${$}-arrow-container`, {
585
- [`${w}-arrow-container`]: w
574
+ ref: ue,
575
+ className: R(`${v}-arrow-container`, {
576
+ [`${h}-arrow-container`]: h
586
577
  }),
587
- children: /* @__PURE__ */ D(
578
+ children: /* @__PURE__ */ P(
588
579
  "div",
589
580
  {
590
- ref: fe,
591
- ...h,
592
- className: Y(
593
- `${$}-arrow`,
581
+ ref: ce,
582
+ ..._,
583
+ className: R(
584
+ `${v}-arrow`,
594
585
  {
595
- [`${w}-arrow`]: w
586
+ [`${h}-arrow`]: h
596
587
  },
597
- h == null ? void 0 : h.className
588
+ _?.className
598
589
  ),
599
- style: { ...n.current.arrowStyle, ...h == null ? void 0 : h.style }
590
+ style: { ...t.current.arrowStyle, ..._?.style }
600
591
  }
601
592
  )
602
593
  }
@@ -606,26 +597,26 @@ function Nt(d, I) {
606
597
  )
607
598
  }
608
599
  );
609
- let _, Me = u;
610
- if (Me || (Me = !!a.current && !n.current.triggerDestoried), Me) {
600
+ let F, Ee = s;
601
+ if (Ee ||= !!a.current && !t.current.triggerDestoried, Ee) {
611
602
  const e = i.getPopupContainer || y.getPopupContainer;
612
- if (S(e)) {
613
- const t = e(H());
614
- t && (_ = gt(
615
- /* @__PURE__ */ D("div", { ref: v, className: `${$}-container`, children: st }),
616
- t
603
+ if (D(e)) {
604
+ const o = e(b());
605
+ o && (F = ao(
606
+ /* @__PURE__ */ P("div", { ref: S, className: `${v}-container`, children: to }),
607
+ o
617
608
  // popupVisible ? 1 : 0,
618
609
  ));
619
610
  }
620
611
  }
621
- return pe && (_ = /* @__PURE__ */ $e(mt, { children: [
622
- it,
623
- _
624
- ] })), _;
612
+ return se && (F = /* @__PURE__ */ xe(po, { children: [
613
+ oo,
614
+ F
615
+ ] })), F;
625
616
  }
626
- const $t = lt(Nt);
627
- $t.displayName = "Trigger";
617
+ const Oo = io(So);
618
+ Oo.displayName = "Trigger";
628
619
  export {
629
- eo as EventsByTriggerNeed,
630
- $t as default
620
+ Go as EventsByTriggerNeed,
621
+ Oo as default
631
622
  };