@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
@@ -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 });