@unicom-cloud/ui 0.8.95 → 0.8.97

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 (326) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/Message.js +1 -1
  5. package/Notification.js +1 -1
  6. package/OverflowEllipsis.js +1 -1
  7. package/PageHeader.js +1 -1
  8. package/QrCode.js +57 -0
  9. package/Switch.js +1 -1
  10. package/Tour.js +63 -0
  11. package/Trigger.js +2 -2
  12. package/_virtual/_commonjsHelpers.js +6 -0
  13. package/_virtual/index.js +7 -0
  14. package/_virtual/index2.js +4 -0
  15. package/affix/index.js +70 -72
  16. package/alert/index.js +52 -51
  17. package/anchor/Anchor.js +55 -55
  18. package/anchor/Link.js +34 -34
  19. package/anchor/util.js +5 -5
  20. package/auto-complete/index.js +116 -122
  21. package/avatar/Avatar.js +33 -33
  22. package/avatar/Group.js +26 -26
  23. package/back-top/index.js +58 -61
  24. package/badge/index.js +46 -46
  25. package/breadcrumb/Item.js +42 -43
  26. package/breadcrumb/index.js +47 -47
  27. package/button/Group.js +6 -6
  28. package/button/index.js +91 -91
  29. package/calendar/Month.js +75 -75
  30. package/calendar/Year.js +35 -35
  31. package/calendar/header/index.js +25 -25
  32. package/calendar/index.js +103 -103
  33. package/card/Grid.js +8 -8
  34. package/card/Meta.js +16 -16
  35. package/card/index.js +49 -49
  36. package/carousel/Arrow.js +19 -19
  37. package/carousel/Indicator.js +26 -26
  38. package/carousel/index.js +108 -108
  39. package/cascader/Cascader.js +178 -191
  40. package/cascader/base/node.js +133 -136
  41. package/cascader/base/store.js +82 -85
  42. package/cascader/panel/List.js +126 -130
  43. package/cascader/panel/Search.js +79 -81
  44. package/cascader/util.js +13 -13
  45. package/checkbox/Checkbox.js +94 -96
  46. package/checkbox/Group.js +54 -56
  47. package/checkbox/GroupBlock.js +28 -29
  48. package/collapse/Collapse.js +45 -45
  49. package/collapse/Item.js +53 -55
  50. package/color-picker/ControlBar.js +43 -43
  51. package/color-picker/InputAlpha.js +12 -12
  52. package/color-picker/InputHex.js +30 -31
  53. package/color-picker/InputRgb.js +24 -24
  54. package/color-picker/Palette.js +18 -18
  55. package/color-picker/Panel.js +122 -125
  56. package/color-picker/hooks/useColorPicker.js +85 -88
  57. package/color-picker/hooks/useControlBlock.js +38 -40
  58. package/color-picker/index.js +47 -47
  59. package/comment/index.js +29 -29
  60. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  61. package/components/common/hooks/useForceUpdate.js +6 -2
  62. package/components/common/hooks/useId.js +4 -4
  63. package/components/common/hooks/useInView.js +16 -16
  64. package/components/common/hooks/useIntersectionObserver.js +1 -1
  65. package/components/common/hooks/useKeyboardEvent.js +9 -10
  66. package/components/common/hooks/useOverflowHidden.js +1 -4
  67. package/components/common/hooks/usePersistCallback.js +7 -7
  68. package/components/common/hooks/useStateCallback.js +9 -10
  69. package/components/common/hooks/useWindowSize.js +8 -8
  70. package/components/common/space/index.js +11 -10
  71. package/components/common/utils/PqbCSSTransition.js +1 -1
  72. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  73. package/components/common/utils/dom.js +27 -29
  74. package/components/common/utils/findScrollParent.js +17 -0
  75. package/components/common/utils/intersectionObserver.js +21 -0
  76. package/components/common/utils/is.js +99 -109
  77. package/components/common/utils/mutationObserver.js +19 -0
  78. package/components/common/utils/reactDOM.js +34 -34
  79. package/components/common/utils/resizeObserver.js +21 -0
  80. package/copy/index.js +38 -40
  81. package/date-picker/Picker.js +290 -295
  82. package/date-picker/RangePicker.js +367 -372
  83. package/date-picker/index.js +33 -35
  84. package/date-picker/panel/Body.js +46 -47
  85. package/date-picker/panel/Header.js +33 -33
  86. package/date-picker/panel/Shortcut.js +31 -31
  87. package/date-picker/panel/date/index.js +85 -85
  88. package/date-picker/panel/month/index.js +59 -59
  89. package/date-picker/panel/quarter/index.js +67 -70
  90. package/date-picker/panel/range/index.js +101 -101
  91. package/date-picker/panel/year/index.js +39 -39
  92. package/date-picker/util.js +17 -18
  93. package/descriptions/index.js +62 -62
  94. package/details/index.js +55 -56
  95. package/development/index.js +9 -9
  96. package/dist/react-transition-group/src/CSSTransition.js +1 -1
  97. package/dist/react-transition-group/src/SwitchTransition.js +1 -1
  98. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  99. package/dist/tween/src/tween.js +24 -25
  100. package/dist/validate/src/index.js +5 -5
  101. package/dist/validate/src/util.js +1 -1
  102. package/divider/index.js +21 -21
  103. package/draggable/Item.js +35 -35
  104. package/draggable/index.js +22 -22
  105. package/drawer/Drawer.js +142 -147
  106. package/dropdown/Button.js +48 -48
  107. package/dropdown/index.js +88 -92
  108. package/empty/index.js +16 -16
  109. package/form/Control.js +211 -225
  110. package/form/Form.js +109 -113
  111. package/form/FormItem.js +118 -120
  112. package/form/FormList.js +60 -66
  113. package/form/FormProvider.js +31 -34
  114. package/form/hook/useContext.js +17 -19
  115. package/form/hook/useState.js +22 -23
  116. package/form/hook/useWatch.js +26 -27
  117. package/form/promisify.js +14 -18
  118. package/form/store.js +304 -316
  119. package/form/util.js +14 -15
  120. package/grid/Col.js +64 -64
  121. package/grid/Grid.js +51 -51
  122. package/grid/GridItem.js +48 -48
  123. package/grid/Row.js +39 -39
  124. package/hooks/index.js +50 -52
  125. package/hooks/useVerificationCode.js +41 -43
  126. package/hooks/useWatermark.js +89 -92
  127. package/icon/index.js +23 -24
  128. package/icon-hover/index.js +16 -16
  129. package/icons/file.js +11 -11
  130. package/image/Image.js +140 -141
  131. package/image/ImagePreview.js +252 -255
  132. package/image/ImagePreviewArrow.js +25 -25
  133. package/image/ImagePreviewGroup.js +62 -62
  134. package/image/util/getScale.js +25 -28
  135. package/index.js +682 -679
  136. package/input/Button.js +48 -50
  137. package/input/Group.js +9 -9
  138. package/input/Input.js +145 -154
  139. package/input/InputElement.js +108 -115
  140. package/input/Password.js +38 -38
  141. package/input/Search.js +51 -55
  142. package/input/Textarea.js +80 -81
  143. package/input/useComposition.js +23 -23
  144. package/input-number/decimal.js +59 -62
  145. package/input-number/index.js +139 -141
  146. package/input-tag/InputTag.js +223 -231
  147. package/layout/Content.js +6 -6
  148. package/layout/Footer.js +8 -8
  149. package/layout/Header.js +7 -7
  150. package/layout/Sider.js +88 -90
  151. package/layout/index.js +30 -30
  152. package/link/index.js +45 -46
  153. package/liquid-fill/LiquidFill.js +189 -0
  154. package/liquid-fill/LiquidFill2.js +3 -0
  155. package/liquid-fill/index.js +4 -0
  156. package/liquid-fill/interface.js +1 -0
  157. package/list/Item.js +28 -28
  158. package/list/Meta.js +12 -12
  159. package/list/index.js +146 -148
  160. package/mentions/index.js +75 -76
  161. package/menu/Item.js +58 -58
  162. package/menu/Menu.js +125 -127
  163. package/menu/OverflowWrap.js +39 -40
  164. package/menu/sub-menu/Inline.js +45 -45
  165. package/menu/util.js +26 -28
  166. package/message/index.js +97 -100
  167. package/message/useMessage.js +26 -27
  168. package/modal/Confirm.js +47 -49
  169. package/modal/Modal.js +250 -257
  170. package/modal/use-modal/Hook.js +26 -28
  171. package/modal/use-modal/index.js +46 -49
  172. package/notice/index.js +89 -90
  173. package/notification/index.js +61 -66
  174. package/notification/withNotification.js +35 -35
  175. package/overflow-ellipsis/OverflowItem.js +19 -20
  176. package/overflow-ellipsis/index.js +45 -46
  177. package/package.json +1 -1
  178. package/page-header/index.js +45 -45
  179. package/pagination/PageItem.js +87 -91
  180. package/pagination/PageJumper.js +40 -41
  181. package/pagination/PageOption.js +31 -35
  182. package/pagination/Pagination.js +162 -163
  183. package/picker/Input.js +90 -96
  184. package/picker/InputRange.js +115 -122
  185. package/popconfirm/index.js +98 -100
  186. package/popover/index.js +28 -28
  187. package/portal/Portal.js +10 -11
  188. package/progress/index.js +36 -36
  189. package/qr-code/index.js +99 -0
  190. package/qr-code/interface.js +1 -0
  191. package/radio/Group.js +48 -48
  192. package/radio/GroupBlock.js +32 -33
  193. package/radio/Radio.js +62 -64
  194. package/rate/index.js +88 -88
  195. package/resize-box/ResizeTrigger.js +39 -39
  196. package/resize-box/Split.js +92 -96
  197. package/resize-box/SplitGroup.js +116 -122
  198. package/resize-box/index.js +112 -115
  199. package/result/index.js +44 -44
  200. package/select/Option.js +53 -56
  201. package/select/Select.js +365 -381
  202. package/select/util.js +95 -99
  203. package/select-view/Core.js +159 -160
  204. package/skeleton/index.js +23 -23
  205. package/slider/Button.js +84 -92
  206. package/slider/Input.js +47 -49
  207. package/slider/Tick.js +28 -31
  208. package/slider/index.js +108 -108
  209. package/slider/util.js +1 -1
  210. package/space/index.js +26 -26
  211. package/space-/index.js +51 -51
  212. package/spin/DotLoading.js +8 -8
  213. package/spin/index.js +47 -47
  214. package/statistic/Countdown.js +37 -37
  215. package/statistic/index.js +61 -61
  216. package/steps/Step.js +42 -42
  217. package/steps/index.js +54 -54
  218. package/style.css +1 -1
  219. package/switch/index.js +78 -79
  220. package/table/ColGroup.js +36 -37
  221. package/table/Table.js +447 -450
  222. package/table/hook/useExpand.js +24 -24
  223. package/table/hook/useRowSelection.js +62 -62
  224. package/table/summary/Row.js +16 -17
  225. package/table/tbody/Td.js +119 -118
  226. package/table/tbody/Tr.js +119 -121
  227. package/table/tbody/index.js +62 -63
  228. package/table/th-resizable/index.js +30 -30
  229. package/table/thead/Column.js +148 -148
  230. package/table/thead/index.js +87 -88
  231. package/tabs/Tab.js +55 -55
  232. package/tabs/TabContent.js +8 -8
  233. package/tabs/TabPane.js +15 -15
  234. package/tabs/hook/useHeaderScroll.js +36 -36
  235. package/tabs/tab-header/TabInk.js +31 -33
  236. package/tabs/tab-header/TabNavIcon.js +34 -35
  237. package/tabs/tab-header/index.js +192 -195
  238. package/tag/index.js +94 -97
  239. package/time-picker/Picker.js +167 -172
  240. package/time-picker/RangePicker.js +28 -28
  241. package/time-picker/TimePicker.js +146 -146
  242. package/time-picker/util.js +4 -4
  243. package/timeline/Item.js +46 -46
  244. package/timeline/Timeline.js +52 -52
  245. package/tooltip/index.js +89 -95
  246. package/tour/index.js +289 -0
  247. package/transfer/Item.js +54 -54
  248. package/transfer/List.js +134 -136
  249. package/transfer/index.js +91 -91
  250. package/tree/Animation.js +49 -52
  251. package/tree/Node.js +114 -122
  252. package/tree/NodeList.js +51 -51
  253. package/tree/Tree.js +386 -393
  254. package/tree-select/List.js +71 -72
  255. package/tree-select/Select.js +135 -143
  256. package/tree-select/hook/useKeyCache.js +39 -39
  257. package/tree-select/hook/useStateValue.js +12 -12
  258. package/trigger/getPopupStyle.js +60 -61
  259. package/trigger/index.js +338 -347
  260. package/types/common/space/interface.d.ts +1 -1
  261. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  262. package/types/common/utils/findScrollParent.d.ts +2 -0
  263. package/types/common/utils/index.d.ts +5 -0
  264. package/types/common/utils/intersectionObserver.d.ts +2 -0
  265. package/types/common/utils/math.d.ts +1 -1
  266. package/types/common/utils/mutationObserver.d.ts +2 -0
  267. package/types/common/utils/resizeObserver.d.ts +2 -0
  268. package/types/pc/alert/interface.d.ts +2 -2
  269. package/types/pc/details/interface.d.ts +2 -2
  270. package/types/pc/hooks/index.d.ts +0 -1
  271. package/types/pc/index.d.ts +3 -0
  272. package/types/pc/liquid-fill/LiquidFill.d.ts +30 -0
  273. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  274. package/types/pc/liquid-fill/index.d.ts +4 -0
  275. package/types/pc/liquid-fill/interface.d.ts +0 -0
  276. package/types/pc/qr-code/index.d.ts +34 -0
  277. package/types/pc/qr-code/interface.d.ts +39 -0
  278. package/types/pc/table/interface.d.ts +2 -2
  279. package/types/pc/tour/index.d.ts +42 -0
  280. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  281. package/types/pc/utils/findScrollParent.d.ts +2 -0
  282. package/types/pc/utils/index.d.ts +5 -0
  283. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  284. package/types/pc/utils/math.d.ts +1 -1
  285. package/types/pc/utils/mutationObserver.d.ts +2 -0
  286. package/types/pc/utils/names.d.ts +18 -0
  287. package/types/pc/utils/resizeObserver.d.ts +2 -0
  288. package/typography/Base.js +79 -81
  289. package/typography/EditContent.js +30 -33
  290. package/typography/Ellipsis.js +78 -75
  291. package/typography/Operations.js +50 -52
  292. package/typography/Paragraph.js +7 -7
  293. package/typography/Typography.js +7 -7
  294. package/typography/useEllipsis.js +105 -106
  295. package/upload/TriggerNode.js +69 -76
  296. package/upload/Upload.js +84 -87
  297. package/upload/Uploader.js +115 -118
  298. package/upload/list/PictureItem.js +61 -71
  299. package/upload/list/TextItem.js +61 -67
  300. package/upload/list/UploadProgress.js +42 -49
  301. package/upload/list/index.js +49 -50
  302. package/upload/request_.js +37 -38
  303. package/upload/util.js +39 -39
  304. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  305. package/utils/findScrollParent.js +4 -0
  306. package/utils/index.js +274 -275
  307. package/utils/intersectionObserver.js +4 -0
  308. package/utils/math.js +7 -11
  309. package/utils/mutationObserver.js +4 -0
  310. package/utils/names.js +12 -0
  311. package/utils/reactTransitionGroup.js +1 -1
  312. package/utils/resizeObserver.js +4 -0
  313. package/verification-code/VerificationCode.js +50 -51
  314. package/version/index.js +1 -1
  315. package/virtual-list/VirtualList.js +243 -244
  316. package/virtual-list/util/item.js +3 -4
  317. package/watermark/Watermark.js +27 -31
  318. package/components/common/hooks/useComputedState.js +0 -11
  319. package/components/common/utils/resizeObserverEffect.js +0 -23
  320. package/hooks/useComputedState.js +0 -4
  321. package/types/common/hooks/useComputedState.d.ts +0 -4
  322. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  323. package/types/pc/hooks/useComputedState.d.ts +0 -1
  324. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  325. package/utils/resizeObserverEffect.js +0 -4
  326. /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
@@ -1,11 +1,11 @@
1
- import { jsx as t, jsxs as P } from "react/jsx-runtime";
2
- import We, { useRef as de, useContext as qe, useState as pe, useEffect as Xe, useImperativeHandle as Je, useMemo as Qe, createElement as Ye } from "react";
1
+ import { jsx as t, jsxs as k } from "react/jsx-runtime";
2
+ import We, { useRef as ae, useContext as qe, useState as ce, useEffect as Xe, useImperativeHandle as Je, useMemo as Qe, createElement as Ye } from "react";
3
3
  import Ze from "@unicom-cloud/icons/IconUiClose";
4
4
  import eo from "@unicom-cloud/icons/IconUiDown";
5
5
  import oo from "@unicom-cloud/icons/IconUiLoading";
6
6
  import no from "@unicom-cloud/icons/IconUiSearch";
7
7
  import ro from "lodash/isFunction";
8
- import me from "lodash/isUndefined";
8
+ import le from "lodash/isUndefined";
9
9
  import "../config-provider/ConfigProvider.js";
10
10
  import to from "../components/common/hooks/useForceUpdate.js";
11
11
  import so from "../components/common/hooks/usePersistCallback.js";
@@ -13,148 +13,147 @@ import ao from "../icon-hover/index.js";
13
13
  import co from "../input-tag/InputTag.js";
14
14
  import lo from "../input/InputElement.js";
15
15
  import io from "../popover/index.js";
16
- import fe from "../tag/index.js";
17
- import D from "@unicom-cloud/utils/class-name";
18
- import { fillNBSP as he } from "../components/common/utils/fillNBSP.js";
16
+ import ie from "../tag/index.js";
17
+ import E from "@unicom-cloud/utils/class-name";
18
+ import { fillNBSP as ue } from "../components/common/utils/fillNBSP.js";
19
19
  import { include as uo } from "../components/common/utils/include.js";
20
20
  import "../components/common/utils/is.js";
21
- import { Enter as po, Backspace as mo } from "@unicom-cloud/utils/constant/keyboardCode";
21
+ import { Enter as mo, Backspace as po } from "@unicom-cloud/utils/constant/keyboardCode";
22
22
  import fo from "../config-provider/context.js";
23
- import { isPlainObject as C, isNumber as ge } from "@unicom-cloud/utils/is";
24
- const Q = "__pqb_value_tag_placeholder", I = {
23
+ import { isPlainObject as C, isNumber as de } from "@unicom-cloud/utils/is";
24
+ const K = "__pqb_value_tag_placeholder", w = {
25
25
  BEFORE: 0,
26
26
  EDITING: 1,
27
27
  NONE: 2
28
- }, Bo = We.forwardRef(function(N, be) {
28
+ }, _o = We.forwardRef(function(x, me) {
29
29
  const {
30
- id: xe,
31
- style: Ce,
32
- className: Ne,
33
- size: ve,
34
- bordered: we,
35
- allowClear: Ie,
36
- allowCreate: Te,
37
- status: $e,
38
- loading: Se,
30
+ id: pe,
31
+ style: fe,
32
+ className: he,
33
+ size: ge,
34
+ bordered: be,
35
+ allowClear: ve,
36
+ allowCreate: Ce,
37
+ status: xe,
38
+ loading: Ie,
39
39
  disabled: g,
40
- animation: ye,
40
+ animation: we,
41
41
  prefixCls: n,
42
- suffixIcon: Y,
43
- arrowIcon: Z,
44
- removeIcon: Ee,
45
- clearIcon: F,
46
- placeholder: ee,
47
- renderText: oe,
42
+ suffixIcon: G,
43
+ arrowIcon: W,
44
+ removeIcon: Ne,
45
+ clearIcon: D,
46
+ placeholder: q,
47
+ renderText: X,
48
48
  value: b,
49
- inputValue: O,
50
- popupVisible: m,
49
+ inputValue: F,
50
+ popupVisible: p,
51
51
  maxTagCount: c,
52
- isMultiple: v,
52
+ isMultiple: I,
53
53
  isEmptyValue: R,
54
- prefix: M,
55
- ariaControls: ke,
56
- renderTag: A,
57
- dragToSort: ne,
58
- rtl: Pe,
59
- htmlDataAttributes: De,
60
- onKeyDown: _,
61
- onChangeInputValue: U,
62
- onPaste: Fe,
63
- onClear: Oe,
64
- onFocus: B,
65
- onBlur: V,
66
- onRemoveCheckedItem: z,
67
- onSort: L,
68
- ...Re
69
- } = N, T = de(null), f = de(null), { size: Me, getPrefixCls: w } = qe(fo), [Ae, re] = pe(I.NONE), [j, te] = pe(!1), _e = to(), $ = "showSearch" in N ? N.showSearch : v, p = $ || Te, y = ve || Me, H = j || m, Ue = C($) && $.retainInputValue, x = !v && b !== void 0 ? oe(b).text : "", G = (e) => {
70
- var o;
71
- (o = e == null ? void 0 : e.preventDefault) == null || o.call(e);
72
- }, K = (e) => {
73
- const o = p ? T.current : f.current;
54
+ prefix: O,
55
+ ariaControls: Te,
56
+ renderTag: M,
57
+ dragToSort: J,
58
+ rtl: $e,
59
+ htmlDataAttributes: ye,
60
+ onKeyDown: Se,
61
+ onChangeInputValue: Pe,
62
+ onPaste: ke,
63
+ onClear: Ee,
64
+ onFocus: De,
65
+ onBlur: Fe,
66
+ onRemoveCheckedItem: Re,
67
+ onSort: A,
68
+ ...Oe
69
+ } = x, N = ae(null), f = ae(null), { size: Me, getPrefixCls: Q } = qe(fo), [Ae, Y] = ce(w.NONE), [B, Z] = ce(!1), Be = to(), T = "showSearch" in x ? x.showSearch : I, m = T || Ce, y = ge || Me, V = B || p, Ve = C(T) && T.retainInputValue, v = !I && b !== void 0 ? X(b).text : "", _ = (e) => {
70
+ e?.preventDefault?.();
71
+ }, U = (e) => {
72
+ const o = m ? N.current : f.current;
74
73
  o && (e === "focus" ? o.focus() : o.blur());
75
- }, E = (e, o) => {
76
- p && o.target === f.current || (e === "focus" ? (te(!0), B == null || B(o)) : (te(!1), V == null || V(o)));
77
- }, se = (e) => {
78
- if (p && e.currentTarget === f.current)
74
+ }, S = (e, o) => {
75
+ m && o.target === f.current || (e === "focus" ? (Z(!0), De?.(o)) : (Z(!1), Fe?.(o)));
76
+ }, ee = (e) => {
77
+ if (m && e.currentTarget === f.current)
79
78
  return;
80
- e.key === po.key && e.preventDefault(), _ == null || _(e);
79
+ e.key === mo.key && e.preventDefault(), Se?.(e);
81
80
  };
82
81
  Xe(() => {
83
- K(m ? "focus" : "blur"), p && re(m ? I.BEFORE : I.NONE);
84
- }, [m]), Je(be, () => ({
82
+ U(p ? "focus" : "blur"), m && Y(p ? w.BEFORE : w.NONE);
83
+ }, [p]), Je(me, () => ({
85
84
  dom: f.current,
86
85
  getRootDOMNode: () => f.current,
87
- focus: K.bind(null, "focus"),
88
- blur: K.bind(null, "blur"),
86
+ focus: U.bind(null, "focus"),
87
+ blur: U.bind(null, "blur"),
89
88
  getWidth: () => f.current && f.current.clientWidth
90
89
  }));
91
- const Be = "arrowIcon" in N ? Z === null ? null : /* @__PURE__ */ t("div", { className: `${n}-arrow-icon`, children: Z }) : /* @__PURE__ */ t("div", { className: `${n}-arrow-icon`, children: /* @__PURE__ */ t(eo, {}) }), Ve = Se ? /* @__PURE__ */ t("span", { className: `${n}-loading-icon`, children: /* @__PURE__ */ t(oo, {}) }) : Y ? /* @__PURE__ */ t("span", { className: `${n}-suffix-icon`, children: Y }) : N.showSearch && m ? /* @__PURE__ */ t("div", { className: `${n}-search-icon`, children: /* @__PURE__ */ t(no, {}) }) : Be, i = {
92
- paste: Fe,
93
- keyDown: se,
90
+ const _e = "arrowIcon" in x ? W === null ? null : /* @__PURE__ */ t("div", { className: `${n}-arrow-icon`, children: W }) : /* @__PURE__ */ t("div", { className: `${n}-arrow-icon`, children: /* @__PURE__ */ t(eo, {}) }), Ue = Ie ? /* @__PURE__ */ t("span", { className: `${n}-loading-icon`, children: /* @__PURE__ */ t(oo, {}) }) : G ? /* @__PURE__ */ t("span", { className: `${n}-suffix-icon`, children: G }) : x.showSearch && p ? /* @__PURE__ */ t("div", { className: `${n}-search-icon`, children: /* @__PURE__ */ t(no, {}) }) : _e, i = {
91
+ paste: ke,
92
+ keyDown: ee,
94
93
  focus: (e) => {
95
- e.stopPropagation(), E("focus", e);
94
+ e.stopPropagation(), S("focus", e);
96
95
  },
97
96
  blur: (e) => {
98
- e.stopPropagation(), E("blur", e);
97
+ e.stopPropagation(), S("blur", e);
99
98
  },
100
99
  change: (e, o) => {
101
- re(I.EDITING), U == null || U(e, o);
100
+ Y(w.EDITING), Pe?.(e, o);
102
101
  }
103
102
  }, ze = () => {
104
103
  let e;
105
104
  switch (Ae) {
106
- case I.BEFORE:
107
- e = O || (Ue ? x : "");
105
+ case w.BEFORE:
106
+ e = F || (Ve ? v : "");
108
107
  break;
109
- case I.EDITING:
110
- e = O || "";
108
+ case w.EDITING:
109
+ e = F || "";
111
110
  break;
112
111
  default:
113
- e = x;
112
+ e = v;
114
113
  break;
115
114
  }
116
- const o = !!(H && p || R), s = {
115
+ const o = !!(V && m || R), s = {
117
116
  style: { width: "100%" },
118
117
  // _inputValue after renderText(value) may be rich text, but the value of <input> cannot be object
119
118
  value: o && typeof e != "object" ? e : "",
120
119
  // Allow placeholder to display the selected value first when searching
121
- placeholder: p && x && typeof x != "object" ? x : ee
120
+ placeholder: m && v && typeof v != "object" ? v : q
122
121
  };
123
- return p ? (s.onPaste = i.paste, s.onKeyDown = i.keyDown, s.onFocus = i.focus, s.onBlur = i.blur, s.onChange = i.change) : (s.tabIndex = -1, s.style.pointerEvents = "none"), /* @__PURE__ */ P("span", { className: `${n}-view-selector`, children: [
122
+ return m ? (s.onPaste = i.paste, s.onKeyDown = i.keyDown, s.onFocus = i.focus, s.onBlur = i.blur, s.onChange = i.change) : (s.tabIndex = -1, s.style.pointerEvents = "none"), /* @__PURE__ */ k("span", { className: `${n}-view-selector`, children: [
124
123
  /* @__PURE__ */ t(
125
124
  lo,
126
125
  {
127
126
  "aria-hidden": !o || void 0,
128
- ref: T,
127
+ ref: N,
129
128
  disabled: g,
130
- className: D(`${n}-view-input`, {
129
+ className: E(`${n}-view-input`, {
131
130
  [`${n}-hidden`]: !o
132
131
  }),
133
132
  autoComplete: "off",
134
133
  ...s
135
134
  }
136
135
  ),
137
- o ? /* @__PURE__ */ t("span", { className: `${n}-view-value-mirror`, children: he(s.value ? e : s.placeholder) }) : null,
136
+ o ? /* @__PURE__ */ t("span", { className: `${n}-view-value-mirror`, children: ue(s.value ? e : s.placeholder) }) : null,
138
137
  /* @__PURE__ */ t(
139
138
  "span",
140
139
  {
141
140
  style: o ? { display: "none" } : {},
142
141
  className: `${n}-view-value`,
143
- children: he(R ? s.placeholder : e)
142
+ children: ue(R ? s.placeholder : e)
144
143
  }
145
144
  )
146
145
  ] });
147
- }, W = so(oe), ae = C(c) ? c.count : c, ce = (e) => {
148
- const o = W(e);
146
+ }, z = so(X), oe = C(c) ? c.count : c, ne = (e) => {
147
+ const o = z(e);
149
148
  return { value: e, label: o.text, closable: !o.disabled };
150
- }, q = Qe(() => {
151
- if (!v)
149
+ }, L = Qe(() => {
150
+ if (!I)
152
151
  return [];
153
- const e = me(b) ? [] : [].concat(b);
154
- return (ge(ae) ? e.slice(0, ae) : e).map((k, h, ie) => ce(k));
155
- }, [b, v, c, W]), Le = () => {
156
- const e = C(c) ? c.count : c, o = C(c) && c.showPopover, s = w == null ? void 0 : w("input-tag"), k = (r) => C(c) && ro(c.render) ? c.render(r) : e === "responsive" ? /* @__PURE__ */ P(
157
- fe,
152
+ const e = le(b) ? [] : [].concat(b);
153
+ return (de(oe) ? e.slice(0, oe) : e).map((P, h, te) => ne(P));
154
+ }, [b, I, c, z]), Le = () => {
155
+ const e = C(c) ? c.count : c, o = C(c) && c.showPopover, s = Q?.("input-tag"), P = (r) => C(c) && ro(c.render) ? c.render(r) : e === "responsive" ? /* @__PURE__ */ k(
156
+ ie,
158
157
  {
159
158
  className: `${s}-tag`,
160
159
  children: [
@@ -163,69 +162,69 @@ const Q = "__pqb_value_tag_placeholder", I = {
163
162
  "..."
164
163
  ]
165
164
  },
166
- Q
167
- ) : `+${r}...`, h = me(b) ? [] : [].concat(b), ie = () => {
165
+ K
166
+ ) : `+${r}...`, h = le(b) ? [] : [].concat(b), te = () => {
168
167
  for (let r = h.length - 1; r >= 0; r--) {
169
168
  const l = h[r];
170
- if (!W(l).disabled)
169
+ if (!z(l).disabled)
171
170
  return r;
172
171
  }
173
172
  return -1;
174
- }, X = {
173
+ }, j = {
175
174
  onPaste: i.paste,
176
175
  onKeyDown: i.keyDown,
177
176
  onFocus: i.focus,
178
177
  onBlur: i.blur,
179
178
  onInputChange: i.change,
180
179
  onRemove: (r, l, u) => {
181
- const S = u.key;
180
+ const $ = u.key;
182
181
  let a = -1;
183
- S === mo.key && (a = ie()) !== -1 && (r = h[a], l = a), c && _e(), z == null || z(r, l, u);
182
+ $ === po.key && (a = te()) !== -1 && (r = h[a], l = a), c && Be(), Re?.(r, l, u);
184
183
  }
185
- }, Ge = {
184
+ }, Ke = {
186
185
  suffix: null,
187
186
  prefix: null,
188
187
  addBefore: null,
189
188
  addAfter: null,
190
189
  allowClear: !1,
191
190
  labelInValue: !1
192
- }, ue = (() => {
193
- if (ge(e)) {
191
+ }, se = (() => {
192
+ if (de(e)) {
194
193
  const r = h.length - e;
195
194
  if (r > 0) {
196
195
  const l = {
197
- label: k(r),
196
+ label: P(r),
198
197
  closable: !1,
199
198
  // InputTag needs to extract value as key
200
- value: Q
199
+ value: K
201
200
  };
202
201
  if (o) {
203
202
  const u = h.map((a, d) => ({ val: a, index: d })).slice(e).map((a) => {
204
- const d = ce(a.val);
205
- return A ? A(
203
+ const d = ne(a.val);
204
+ return M ? M(
206
205
  {
207
206
  ...d,
208
- onClose: (J) => {
209
- X.onRemove(d.value, a.index, J);
207
+ onClose: (H) => {
208
+ j.onRemove(d.value, a.index, H);
210
209
  }
211
210
  },
212
211
  a.index,
213
- q.concat(l)
212
+ L.concat(l)
214
213
  ) : /* @__PURE__ */ Ye(
215
- fe,
214
+ ie,
216
215
  {
217
216
  ...d,
218
217
  key: d.value,
219
218
  className: `${s}-tag`,
220
- onClose: (J) => X.onRemove(d.value, a.index, J)
219
+ onClose: (H) => j.onRemove(d.value, a.index, H)
221
220
  },
222
221
  d.label
223
222
  );
224
- }), S = C(o) ? o : {};
223
+ }), $ = C(o) ? o : {};
225
224
  l.label = /* @__PURE__ */ t(
226
225
  io,
227
226
  {
228
- ...S,
227
+ ...$,
229
228
  content: !!u.length && /* @__PURE__ */ t(
230
229
  "div",
231
230
  {
@@ -242,70 +241,70 @@ const Q = "__pqb_value_tag_placeholder", I = {
242
241
  return l;
243
242
  }
244
243
  }
245
- })(), Ke = ue ? q.concat(ue) : q;
244
+ })(), Ge = se ? L.concat(se) : L;
246
245
  return /* @__PURE__ */ t(
247
246
  co,
248
247
  {
249
- ...Ge,
250
- className: H ? `${w == null ? void 0 : w("input-tag")}-focus` : "",
251
- ref: T,
248
+ ...Ke,
249
+ className: V ? `${Q?.("input-tag")}-focus` : "",
250
+ ref: N,
252
251
  disabled: g,
253
- dragToSort: ne,
254
- disableInput: !$,
255
- animation: ye,
256
- placeholder: ee,
257
- value: Ke,
258
- inputValue: O,
252
+ dragToSort: J,
253
+ disableInput: !T,
254
+ animation: we,
255
+ placeholder: q,
256
+ value: Ge,
257
+ inputValue: F,
259
258
  size: y,
260
259
  tagClassName: `${n}-tag`,
261
- renderTag: A,
262
- icon: { removeIcon: Ee },
260
+ renderTag: M,
261
+ icon: { removeIcon: Ne },
263
262
  maxTagCount: e === "responsive" ? {
264
263
  count: e,
265
- render: k,
264
+ render: P,
266
265
  popoverProps: C(o) ? o : o ? {} : { disabled: !0 }
267
266
  } : void 0,
268
267
  onChange: (r, l) => {
269
- if (L && l === "sort") {
268
+ if (A && l === "sort") {
270
269
  const u = r.indexOf(
271
- Q
270
+ K
272
271
  );
273
272
  if (u > -1) {
274
- const S = r.slice(0, u), a = r.slice(u + 1), d = h.slice(
273
+ const $ = r.slice(0, u), a = r.slice(u + 1), d = h.slice(
275
274
  r.length - 1 - h.length
276
275
  );
277
- L(S.concat(d, a));
276
+ A($.concat(d, a));
278
277
  } else
279
- L(r);
278
+ A(r);
280
279
  }
281
280
  },
282
- ...X
281
+ ...j
283
282
  }
284
283
  );
285
- }, le = $e || (N.error ? "error" : void 0), je = !g && !R && Ie ? /* @__PURE__ */ t(
284
+ }, re = xe || (x.error ? "error" : void 0), je = !g && !R && ve ? /* @__PURE__ */ t(
286
285
  ao,
287
286
  {
288
287
  size: y,
289
288
  className: `${n}-clear-icon`,
290
- onClick: Oe,
291
- onMouseDown: G,
292
- children: F ?? /* @__PURE__ */ t(Ze, {})
289
+ onClick: Ee,
290
+ onMouseDown: _,
291
+ children: D ?? /* @__PURE__ */ t(Ze, {})
293
292
  },
294
293
  "clearIcon"
295
- ) : null, He = D(
294
+ ) : null, He = E(
296
295
  n,
297
- `${n}-${v ? "multiple" : "single"}`,
296
+ `${n}-${I ? "multiple" : "single"}`,
298
297
  {
299
- [`${n}-show-search`]: $,
300
- [`${n}-open`]: m,
298
+ [`${n}-show-search`]: T,
299
+ [`${n}-open`]: p,
301
300
  [`${n}-size-${y}`]: y,
302
- [`${n}-focused`]: H,
303
- [`${n}-${le}`]: le,
301
+ [`${n}-focused`]: V,
302
+ [`${n}-${re}`]: re,
304
303
  [`${n}-disabled`]: g,
305
- [`${n}-no-border`]: !we,
306
- [`${n}-rtl`]: Pe
304
+ [`${n}-no-border`]: !be,
305
+ [`${n}-rtl`]: $e
307
306
  },
308
- Ne
307
+ he
309
308
  );
310
309
  return /* @__PURE__ */ t(
311
310
  "div",
@@ -313,49 +312,49 @@ const Q = "__pqb_value_tag_placeholder", I = {
313
312
  role: "combobox",
314
313
  "aria-haspopup": "listbox",
315
314
  "aria-autocomplete": "list",
316
- "aria-expanded": m,
315
+ "aria-expanded": p,
317
316
  "aria-disabled": g,
318
- "aria-controls": ke,
319
- ...uo(Re, ["onClick", "onMouseEnter", "onMouseLeave"]),
320
- ...De,
317
+ "aria-controls": Te,
318
+ ...uo(Oe, ["onClick", "onMouseEnter", "onMouseLeave"]),
319
+ ...ye,
321
320
  ref: f,
322
321
  tabIndex: g ? -1 : 0,
323
- id: xe,
324
- style: Ce,
322
+ id: pe,
323
+ style: fe,
325
324
  className: He,
326
- onKeyDown: se,
325
+ onKeyDown: ee,
327
326
  onFocus: (e) => {
328
- !g && !ne && (p ? T.current && T.current.focus() : E("focus", e));
327
+ !g && !J && (m ? N.current && N.current.focus() : S("focus", e));
329
328
  },
330
- onBlur: (e) => E("blur", e),
331
- children: /* @__PURE__ */ P(
329
+ onBlur: (e) => S("blur", e),
330
+ children: /* @__PURE__ */ k(
332
331
  "div",
333
332
  {
334
- title: typeof x == "string" ? x : void 0,
335
- className: D(`${n}-view`, {
336
- [`${n}-view-with-prefix`]: M
333
+ title: typeof v == "string" ? v : void 0,
334
+ className: E(`${n}-view`, {
335
+ [`${n}-view-with-prefix`]: O
337
336
  }),
338
- onClick: (e) => m && p && e.stopPropagation(),
337
+ onClick: (e) => p && m && e.stopPropagation(),
339
338
  children: [
340
- M && /* @__PURE__ */ t(
339
+ O && /* @__PURE__ */ t(
341
340
  "div",
342
341
  {
343
342
  "aria-hidden": "true",
344
- className: D(`${n}-prefix`),
345
- onMouseDown: (e) => j && G(e),
346
- children: M
343
+ className: E(`${n}-prefix`),
344
+ onMouseDown: (e) => B && _(e),
345
+ children: O
347
346
  }
348
347
  ),
349
- v ? Le() : ze(),
350
- /* @__PURE__ */ P(
348
+ I ? Le() : ze(),
349
+ /* @__PURE__ */ k(
351
350
  "div",
352
351
  {
353
352
  "aria-hidden": "true",
354
353
  className: `${n}-suffix`,
355
- onMouseDown: (e) => j && G(e),
354
+ onMouseDown: (e) => B && _(e),
356
355
  children: [
357
356
  je,
358
- Ve
357
+ Ue
359
358
  ]
360
359
  }
361
360
  )
@@ -366,5 +365,5 @@ const Q = "__pqb_value_tag_placeholder", I = {
366
365
  );
367
366
  });
368
367
  export {
369
- Bo as default
368
+ _o as default
370
369
  };
package/skeleton/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as e, jsxs as P } from "react/jsx-runtime";
2
- import C from "lodash/isPlainObject";
1
+ import { jsx as e, jsxs as $ } from "react/jsx-runtime";
2
+ import k from "lodash/isPlainObject";
3
3
  import S, { forwardRef as j, useContext as v } from "react";
4
4
  import "../config-provider/ConfigProvider.js";
5
5
  import b from "../components/common/hooks/useMergeProps.js";
@@ -8,43 +8,43 @@ import { pickDataAttributes as R } from "../components/common/utils/pick.js";
8
8
  import w from "./Image.js";
9
9
  import A from "./Text.js";
10
10
  import D from "../config-provider/context.js";
11
- function l(o) {
12
- return C(o) ? o : {};
11
+ function a(o) {
12
+ return k(o) ? o : {};
13
13
  }
14
14
  const F = {
15
15
  text: !0,
16
16
  loading: !0
17
17
  };
18
- function I(o, p) {
19
- const { getPrefixCls: r, componentConfig: n, rtl: d } = v(D), i = b(
18
+ function I(o, c) {
19
+ const { getPrefixCls: l, componentConfig: p, rtl: f } = v(D), n = b(
20
20
  o,
21
21
  F,
22
- n == null ? void 0 : n.Skeleton
23
- ), { style: f, className: u, animation: g, loading: x, image: a, text: m, children: h } = i, s = l(a), N = l(m), t = r == null ? void 0 : r("skeleton"), $ = y(
22
+ p?.Skeleton
23
+ ), { style: d, className: g, animation: u, loading: x, image: i, text: s, children: h } = n, r = a(i), C = a(s), t = l?.("skeleton"), N = y(
24
24
  t,
25
25
  {
26
- [`${t}-animate`]: g,
27
- [`${t}-rtl`]: d
26
+ [`${t}-animate`]: u,
27
+ [`${t}-rtl`]: f
28
28
  },
29
- u
29
+ g
30
30
  );
31
- function c() {
32
- return a && /* @__PURE__ */ e("div", { className: `${t}-header`, children: /* @__PURE__ */ e(w, { prefixCls: t, ...s }) });
31
+ function m() {
32
+ return i && /* @__PURE__ */ e("div", { className: `${t}-header`, children: /* @__PURE__ */ e(w, { prefixCls: t, ...r }) });
33
33
  }
34
- function k() {
35
- return m && /* @__PURE__ */ e("div", { className: `${t}-content`, children: /* @__PURE__ */ e(A, { prefixCls: t, ...N }) });
34
+ function P() {
35
+ return s && /* @__PURE__ */ e("div", { className: `${t}-content`, children: /* @__PURE__ */ e(A, { prefixCls: t, ...C }) });
36
36
  }
37
- return /* @__PURE__ */ e(S.Fragment, { children: x ? /* @__PURE__ */ P(
37
+ return /* @__PURE__ */ e(S.Fragment, { children: x ? /* @__PURE__ */ $(
38
38
  "div",
39
39
  {
40
- ...R(i),
41
- className: $,
42
- style: f,
43
- ref: p,
40
+ ...R(n),
41
+ className: N,
42
+ style: d,
43
+ ref: c,
44
44
  children: [
45
- s.position !== "right" && c(),
46
- k(),
47
- s.position === "right" && c()
45
+ r.position !== "right" && m(),
46
+ P(),
47
+ r.position === "right" && m()
48
48
  ]
49
49
  }
50
50
  ) : h });