@unicom-cloud/ui 0.8.75 → 0.8.77

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 (286) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +3 -5
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +3 -3
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +6 -2
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +3 -4
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +2 -3
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +5 -6
  31. package/Mentions.js +3 -4
  32. package/Menu.js +1 -1
  33. package/Message.js +1 -1
  34. package/Modal.js +1 -1
  35. package/Notice.js +1 -1
  36. package/Notification.js +1 -1
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +2 -2
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +5 -4
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +5 -6
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/SpeechSynthesis.js +4 -3
  52. package/Spin.js +1 -1
  53. package/Statistic.js +1 -1
  54. package/Steps.js +1 -1
  55. package/Switch.js +1 -1
  56. package/Table.js +15 -16
  57. package/Tabs.js +1 -1
  58. package/Tag.js +1 -1
  59. package/Tooltip.js +2 -2
  60. package/Transfer.js +3 -4
  61. package/Tree.js +2 -3
  62. package/TreeSelect.js +3 -3
  63. package/Trigger.js +1 -1
  64. package/Typography.js +3 -3
  65. package/affix/index.js +86 -82
  66. package/alert/index.js +1 -1
  67. package/anchor/Anchor.js +1 -1
  68. package/anchor/Link.js +1 -1
  69. package/auto-complete/index.js +13 -147
  70. package/avatar/Avatar.js +1 -1
  71. package/avatar/Group.js +1 -1
  72. package/back-top/index.js +1 -1
  73. package/badge/index.js +1 -1
  74. package/breadcrumb/index.js +2 -2
  75. package/button/Group.js +1 -1
  76. package/button/index.js +1 -1
  77. package/calendar/index.js +12 -318
  78. package/card/Grid.js +1 -1
  79. package/card/Meta.js +1 -1
  80. package/card/index.js +1 -1
  81. package/carousel/Arrow.js +1 -1
  82. package/carousel/Indicator.js +1 -1
  83. package/carousel/index.js +1 -1
  84. package/cascader/Cascader.js +4 -4
  85. package/cascader/index.js +1 -1
  86. package/cascader/util.js +8 -8
  87. package/checkbox/Checkbox.js +7 -4
  88. package/checkbox/Group.js +5 -5
  89. package/checkbox/GroupBlock.js +8 -0
  90. package/checkbox/index.js +7 -2
  91. package/chunk/{BbqvFW5R.js → 9TSjT7x_.js} +112 -112
  92. package/chunk/ATwvJ8j2.js +6 -0
  93. package/chunk/{Dv6USvVF.js → BC5fEyWK.js} +2 -1
  94. package/chunk/{WVoGhvMI.js → BPQXH_5i.js} +32 -31
  95. package/chunk/{BPD5iNdA.js → CB4jGw4K.js} +22 -18
  96. package/chunk/{B8hkFIar.js → CBgu99gQ.js} +1 -1
  97. package/chunk/CBzE-PUr.js +23 -0
  98. package/chunk/CNcLypMY.js +723 -0
  99. package/chunk/{CPlPBkN7.js → C_4I3haT.js} +1 -1
  100. package/chunk/{0mWCmQHr.js → CjqvxJml.js} +2 -2
  101. package/chunk/Cwm8LL5p.js +7818 -0
  102. package/chunk/D0ZWT7db.js +5 -0
  103. package/chunk/{CWlklVfi.js → tpmioyz1.js} +1 -1
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +2 -2
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +1 -1
  108. package/color-picker/InputAlpha.js +1 -1
  109. package/color-picker/InputHex.js +2 -2
  110. package/color-picker/InputRgb.js +2 -2
  111. package/color-picker/Palette.js +2 -2
  112. package/color-picker/Panel.js +15 -266
  113. package/color-picker/colors.js +4 -4
  114. package/color-picker/index.js +13 -268
  115. package/color-picker/utils.js +1 -1
  116. package/comment/index.js +1 -1
  117. package/config-provider/ConfigProvider.js +4 -6
  118. package/config-provider/context.js +3 -2
  119. package/config-provider/index.js +4 -5
  120. package/copy/index.js +1 -1
  121. package/date-picker/Picker.js +1 -1
  122. package/date-picker/PickerRange.js +2 -2
  123. package/date-picker/index.js +1 -1
  124. package/descriptions/index.js +1 -1
  125. package/divider/index.js +1 -1
  126. package/draggable/index.js +1 -1
  127. package/drawer/Drawer.js +30 -21
  128. package/dropdown/Button.js +1 -1
  129. package/dropdown/index.js +1 -1
  130. package/empty/index.js +1 -1
  131. package/form/Form.js +10 -10
  132. package/form/FormItem.js +1 -1
  133. package/form/context.js +1 -1
  134. package/grid/Col.js +1 -1
  135. package/grid/Row.js +1 -1
  136. package/grid/grid-item.js +1 -1
  137. package/grid/grid.js +1 -1
  138. package/hooks/index.js +1 -1
  139. package/hooks/useWindowSize.js +1 -1
  140. package/icon/index.js +1 -1
  141. package/icon-hover/index.js +1 -1
  142. package/image/Image.js +2 -2
  143. package/image/ImagePreview.js +2 -2
  144. package/image/ImagePreviewArrow.js +1 -1
  145. package/image/ImagePreviewGroup.js +1 -1
  146. package/image/index.js +1 -1
  147. package/index.js +453 -463
  148. package/input/Group.js +1 -1
  149. package/input/Input.js +1 -1
  150. package/input/InputElement.js +1 -1
  151. package/input/Password.js +1 -1
  152. package/input/Search.js +1 -1
  153. package/input/Textarea.js +1 -1
  154. package/input-number/index.js +1 -1
  155. package/input-tag/InputTag.js +1 -1
  156. package/layout/Content.js +1 -1
  157. package/layout/Footer.js +1 -1
  158. package/layout/Header.js +1 -1
  159. package/layout/Sider.js +1 -1
  160. package/layout/index.js +1 -1
  161. package/link/index.js +1 -1
  162. package/list/Item.js +1 -1
  163. package/list/Meta.js +1 -1
  164. package/list/index.js +17 -267
  165. package/mentions/index.js +11 -144
  166. package/menu/Menu.js +2 -2
  167. package/menu/OverflowWrap.js +1 -1
  168. package/menu/index.js +2 -2
  169. package/message/index.js +1 -1
  170. package/message/useMessage.js +1 -1
  171. package/modal/Confirm.js +2 -2
  172. package/modal/Modal.js +2 -2
  173. package/modal/index.js +1 -1
  174. package/notice/index.js +1 -1
  175. package/notification/index.js +1 -1
  176. package/notification/useNotification.js +1 -1
  177. package/overflow-ellipsis/OverflowItem.js +1 -1
  178. package/overflow-ellipsis/index.js +1 -1
  179. package/package.json +1 -1
  180. package/page-header/index.js +1 -1
  181. package/pagination/PageItem.js +1 -1
  182. package/pagination/PageJumper.js +1 -1
  183. package/pagination/PageOption.js +5 -45
  184. package/pagination/Pagination.js +11 -243
  185. package/pagination/index.js +2 -2
  186. package/picker/Input.js +1 -1
  187. package/picker/InputRange.js +1 -1
  188. package/popconfirm/index.js +1 -1
  189. package/popover/index.js +1 -1
  190. package/progress/index.js +1 -1
  191. package/radio/Group.js +5 -5
  192. package/radio/GroupBlock.js +9 -0
  193. package/radio/Radio.js +6 -5
  194. package/radio/index.js +4 -3
  195. package/rate/index.js +1 -1
  196. package/resize-box/ResizeTrigger.js +1 -1
  197. package/resize-box/Split.js +1 -1
  198. package/resize-box/SplitGroup.js +1 -1
  199. package/resize-box/index.js +1 -1
  200. package/result/index.js +1 -1
  201. package/select/Option.js +6 -93
  202. package/select/Select.js +23 -546
  203. package/select/index.js +3 -3
  204. package/select/util.js +18 -139
  205. package/select-view/Core.js +1 -1
  206. package/skeleton/index.js +1 -1
  207. package/slider/Button.js +1 -1
  208. package/slider/index.js +1 -1
  209. package/space/index.js +1 -1
  210. package/speech-synthesis/index.js +4 -3
  211. package/spin/DotLoading.js +1 -1
  212. package/spin/index.js +1 -1
  213. package/statistic/Countdown.js +1 -1
  214. package/statistic/index.js +1 -1
  215. package/steps/index.js +1 -1
  216. package/style/variables.less +0 -484
  217. package/style.css +1 -1
  218. package/switch/index.js +1 -1
  219. package/table/Table.js +2 -3
  220. package/table/index.js +15 -109
  221. package/tabs/Tab.js +2 -2
  222. package/tabs/TabContent.js +2 -2
  223. package/tabs/TabPane.js +1 -1
  224. package/tabs/index.js +2 -2
  225. package/tag/index.js +1 -1
  226. package/time-picker/Picker.js +1 -1
  227. package/time-picker/TimePicker.js +1 -1
  228. package/timeline/Item.js +1 -1
  229. package/timeline/Timeline.js +1 -1
  230. package/tooltip/index.js +2 -2
  231. package/transfer/Item.js +9 -104
  232. package/transfer/List.js +13 -184
  233. package/transfer/index.js +13 -180
  234. package/tree/Animation.js +2 -2
  235. package/tree/Node.js +3 -4
  236. package/tree/NodeList.js +6 -80
  237. package/tree/Tree.js +17 -578
  238. package/tree/index.js +2 -3
  239. package/tree-select/List.js +6 -122
  240. package/tree-select/Select.js +22 -392
  241. package/tree-select/index.js +3 -3
  242. package/trigger/index.js +1 -1
  243. package/types/checkbox/Checkbox.d.ts +5 -2
  244. package/types/checkbox/GroupBlock.d.ts +7 -0
  245. package/types/checkbox/index.d.ts +2 -1
  246. package/types/config-provider/ConfigProvider.d.ts +0 -27
  247. package/types/config-provider/interface.d.ts +3 -1
  248. package/types/index.d.ts +2 -2
  249. package/types/menu/context.d.ts +1 -1
  250. package/types/radio/GroupBlock.d.ts +7 -0
  251. package/types/radio/Radio.d.ts +5 -3
  252. package/types/utils/constant.d.ts +2 -1
  253. package/types/utils/index.d.ts +1 -0
  254. package/types/utils/setDarkTheme.d.ts +2 -3
  255. package/types/utils/setPrimaryColor.d.ts +2 -0
  256. package/typography/Base.js +1 -1
  257. package/typography/Ellipsis.js +9 -22
  258. package/typography/Paragraph.js +1 -1
  259. package/typography/Typography.js +1 -1
  260. package/typography/index.js +10 -276
  261. package/upload/TriggerNode.js +1 -1
  262. package/upload/Upload.js +1 -1
  263. package/upload/Uploader.js +43 -44
  264. package/upload/request.js +1 -1
  265. package/upload/request_.js +1 -1
  266. package/utils/caseName.js +1 -1
  267. package/utils/color.js +1 -1
  268. package/utils/constant.js +7 -5
  269. package/utils/contextHolder.js +1 -1
  270. package/utils/dom.js +1 -1
  271. package/utils/index.js +199 -195
  272. package/utils/setDarkTheme.js +34 -5
  273. package/utils/setPrimaryColor.js +26 -0
  274. package/utils/tinycolor.js +1 -1
  275. package/verification-code/VerificationCode.js +1 -1
  276. package/version/index.js +1 -1
  277. package/watermark/Watermark.js +1 -1
  278. package/chunk/BViFMHr-.js +0 -1820
  279. package/chunk/BsWphzcT.js +0 -20
  280. package/chunk/BxZ39GzB.js +0 -209
  281. package/chunk/C9XYyypq.js +0 -713
  282. package/chunk/CIkPwQlq.js +0 -6
  283. package/chunk/DFcz9ZPP.js +0 -1020
  284. package/chunk/DeCsZrXb.js +0 -310
  285. package/chunk/DskaI8QL.js +0 -25
  286. package/chunk/EL5Jmjgr.js +0 -170
package/chunk/DeCsZrXb.js DELETED
@@ -1,310 +0,0 @@
1
- import { jsx as l, jsxs as L, Fragment as Q } from "react/jsx-runtime";
2
- import W from "@unicom-cloud/icons/IconUiCaretDown";
3
- import X from "@unicom-cloud/icons/IconUiDragDotVertical";
4
- import Z from "@unicom-cloud/icons/IconUiFile";
5
- import ee from "@unicom-cloud/icons/IconUiLoading";
6
- import p from "lodash/isFunction";
7
- import ne, { useContext as _, useRef as j, useEffect as U, useMemo as Y, forwardRef as te, useState as ie, useCallback as S } from "react";
8
- import { C as ae } from "./BxZ39GzB.js";
9
- import { a as B, I as re } from "./C9XYyypq.js";
10
- import { p as O } from "./CUFsOxJ2.js";
11
- import oe from "../utils/throttleByRaf.js";
12
- import se from "lodash/isNumber";
13
- import { P as le } from "./BpYX5PN4.js";
14
- import ce from "../virtual-list/VirtualList.js";
15
- import { TreeContext as V } from "../tree/Context.js";
16
- function de(e) {
17
- return e.key || e._key;
18
- }
19
- const ge = (e) => {
20
- var w;
21
- const g = _(V), { getPrefixCls: t } = _(B), C = t("tree-node"), { expandedKeys: N, currentExpandKeys: o } = g.getTreeState(), h = e.expanded, x = j(e.childrenData);
22
- x.current = e.childrenData, U(() => () => {
23
- var a;
24
- (a = g.onExpandEnd) == null || a.call(g, e._key);
25
- }, []);
26
- const $ = Y(() => {
27
- const a = [], d = (u) => {
28
- u.forEach((f) => {
29
- const s = g.getFieldInfo(f);
30
- a.push(s), s.children && s.children.length && d(s.children);
31
- });
32
- };
33
- return d(x.current || []), a;
34
- }, [h]), b = Y(() => {
35
- const a = [];
36
- if ($.length) {
37
- const d = new Set(N || []);
38
- $.forEach((u) => {
39
- var k;
40
- let f;
41
- const s = {
42
- ...g.key2nodeProps[u.key]
43
- };
44
- if (h)
45
- f = s.parentKey === e._key || ((k = s.pathParentKeys) == null ? void 0 : k.every((v) => d.has(v)));
46
- else if (s.pathParentKeys) {
47
- const v = s.pathParentKeys.indexOf(e._key);
48
- f = s.pathParentKeys.slice(v + 1).every((E) => d.has(E));
49
- }
50
- f && a.push({
51
- ...s,
52
- key: u.key
53
- });
54
- });
55
- }
56
- return g.getNodeProps(a);
57
- }, [$, e._key, h, N]);
58
- let m = (w = g.virtualListProps) == null ? void 0 : w.height;
59
- return m = se(m) ? m : 0, U(() => {
60
- o.indexOf(e._key) > -1 && b.length === 0 && g.onExpandEnd(e._key);
61
- }, [b, o]), /* @__PURE__ */ l(
62
- le,
63
- {
64
- in: o.indexOf(e._key) > -1 && b.length > 0,
65
- unmountOnExit: !0,
66
- classNames: "tree-slide-expand",
67
- timeout: {
68
- enter: 200,
69
- exit: 0
70
- },
71
- onEnter: (a) => {
72
- if (!a) return;
73
- const d = a.scrollHeight;
74
- a.style.height = h ? 0 : `${Math.min(m || d, a.scrollHeight)}px`;
75
- },
76
- onEntering: (a) => {
77
- if (!a) return;
78
- const d = a.scrollHeight;
79
- a.style.height = h ? `${Math.min(m || d, d)}px` : 0;
80
- },
81
- onEntered: (a) => {
82
- a && (a.style.height = e.expanded ? "" : 0, g.onExpandEnd(e._key));
83
- },
84
- onExit: (a) => {
85
- a && (a.style.display = "none");
86
- },
87
- children: /* @__PURE__ */ l(
88
- ce,
89
- {
90
- itemKey: de,
91
- className: `${C}-list`,
92
- isStaticItemHeight: !1,
93
- ...g.virtualListProps,
94
- data: b,
95
- "aria-hidden": !0,
96
- style: { overflow: "hidden" },
97
- children: (a) => {
98
- const { key: d, ...u } = a ?? {};
99
- return /* @__PURE__ */ l(he, { ...u }, d);
100
- }
101
- }
102
- )
103
- }
104
- );
105
- };
106
- function fe(e, g) {
107
- const t = _(V), { getPrefixCls: C } = _(B), N = j(), [o, h] = ie({
108
- isAllowDrop: !0,
109
- isDragOver: !1,
110
- dragPosition: 0,
111
- isDragging: !1
112
- }), {
113
- _key: x = "",
114
- title: $,
115
- icon: b,
116
- checkable: m,
117
- selected: w,
118
- disabled: a,
119
- disableCheckbox: d,
120
- isLeaf: u,
121
- draggable: f,
122
- expanded: s,
123
- showLine: k,
124
- loading: v,
125
- selectable: E = !0
126
- } = e, r = C("tree-node"), z = O(
127
- r,
128
- {
129
- [`${r}-selected`]: w,
130
- [`${r}-is-leaf`]: u,
131
- [`${r}-expanded`]: s,
132
- [`${r}-disabled-selectable`]: !E,
133
- [`${r}-disabled`]: a,
134
- [`${r}-draggable`]: f
135
- },
136
- e.className
137
- ), D = (() => {
138
- const n = p(t.icons) ? t.icons(e) : t.icons, i = p(e.icons) ? e.icons(e) : e.icons;
139
- return { ...n, ...i };
140
- })(), H = S(
141
- (n) => {
142
- var i;
143
- n !== s && ((i = t.onExpand) == null || i.call(t, n, x));
144
- },
145
- [s, t.onExpand]
146
- ), K = S(async () => {
147
- var c;
148
- const { isLeaf: n, expanded: i } = e;
149
- n || (!((c = e.childrenData) != null && c.length) && p(t.loadMore) && !i ? await t.loadMore(e) : H(!i));
150
- }, [e, H, t.loadMore]), G = () => {
151
- if (v)
152
- return "loadingIcon" in D ? D.loadingIcon : /* @__PURE__ */ l(ee, {});
153
- let n = null, i = !1;
154
- if (u)
155
- k && (n = "switcherIcon" in D ? D.switcherIcon : /* @__PURE__ */ l(Z, {}), i = !0);
156
- else {
157
- const c = k ? /* @__PURE__ */ l("span", { className: `${r}-${s ? "minus" : "plus"}-icon` }) : /* @__PURE__ */ l(W, {});
158
- n = "switcherIcon" in D ? D.switcherIcon : c, i = !k;
159
- }
160
- if (n)
161
- return n = /* @__PURE__ */ l(
162
- "span",
163
- {
164
- className: `${r}-switcher-icon`,
165
- "aria-label": s ? "fold button" : "expand button",
166
- role: "button",
167
- tabIndex: 0,
168
- onClick: K,
169
- children: n
170
- }
171
- ), i ? /* @__PURE__ */ l(re, { prefix: r, children: n }) : n;
172
- }, I = S(
173
- oe((n) => {
174
- var F;
175
- const i = N.current;
176
- if (!i)
177
- return;
178
- const c = i.getBoundingClientRect(), P = window.pageYOffset + c.top, y = n.pageY, R = c.height / 4, M = y - P, T = M < R ? -1 : M < c.height - R ? 0 : 1, J = t.allowDrop(e, T);
179
- h({
180
- ...o,
181
- isAllowDrop: J,
182
- isDragOver: !0,
183
- dragPosition: T
184
- }), (F = t.onNodeDragOver) == null || F.call(t, n, e, T);
185
- }),
186
- [t.onNodeDragOver]
187
- );
188
- function A(n, i) {
189
- var y;
190
- const { disableCheckbox: c, disabled: P } = e;
191
- c || P || (y = t.onCheck) == null || y.call(t, n, x, i);
192
- }
193
- return /* @__PURE__ */ L(Q, { children: [
194
- /* @__PURE__ */ L(
195
- "div",
196
- {
197
- style: e.style,
198
- className: z,
199
- ref: g,
200
- role: "treeitem",
201
- "aria-disabled": a,
202
- "aria-expanded": s,
203
- "aria-level": e._level,
204
- children: [
205
- /* @__PURE__ */ l("span", { className: `${r}-indent`, "aria-hidden": !0, children: [...Array(e._level)].map((n, i) => /* @__PURE__ */ l(
206
- "span",
207
- {
208
- className: O(`${r}-indent-block`, {
209
- [`${r}-indent-block-lineless`]: e._lineless && e._lineless[i]
210
- })
211
- },
212
- i
213
- )) }),
214
- /* @__PURE__ */ l(
215
- "span",
216
- {
217
- className: O(`${r}-switcher`, {
218
- [`${r}-switcher-expanded`]: s
219
- }),
220
- children: G()
221
- }
222
- ),
223
- m ? /* @__PURE__ */ l(
224
- ae,
225
- {
226
- disabled: d || a,
227
- value: x,
228
- indeterminate: e.indeterminated,
229
- checked: e.checked,
230
- onChange: A
231
- }
232
- ) : null,
233
- /* @__PURE__ */ L(
234
- "span",
235
- {
236
- "aria-grabbed": o.isDragging,
237
- ref: N,
238
- className: O(`${r}-title`, {
239
- [`${r}-title-draggable`]: f,
240
- [`${r}-title-gap-top`]: o.isDragOver && o.isAllowDrop && o.dragPosition < 0,
241
- [`${r}-title-gap-bottom`]: o.isDragOver && o.isAllowDrop && o.dragPosition > 0,
242
- [`${r}-title-highlight`]: !o.isDragging && o.isDragOver && o.isAllowDrop && o.dragPosition === 0,
243
- [`${r}-title-dragging`]: o.isDragging,
244
- [`${r}-title-block`]: e.blockNode
245
- }),
246
- onClick: (n) => {
247
- const {
248
- onSelect: i,
249
- onSelect_: c,
250
- // 潘启宝添加
251
- actionOnClick: P
252
- } = t;
253
- if (!e.disabled) {
254
- const y = [].concat(P);
255
- E && y.indexOf("select") > -1 && (i == null || i(x, n)), c == null || c(e), y.indexOf("expand") > -1 && K(), m && y.indexOf("check") > -1 && A(!e.checked, n);
256
- }
257
- },
258
- draggable: f,
259
- onDrop: (n) => {
260
- var i;
261
- n.stopPropagation(), n.preventDefault(), (i = t.onNodeDrop) == null || i.call(t, n, e, o.dragPosition), I.cancel(), h({
262
- ...o,
263
- isDragOver: !1,
264
- dragPosition: 0
265
- });
266
- },
267
- onDragStart: (n) => {
268
- var i;
269
- if (f) {
270
- n.stopPropagation(), h({ ...o, isDragging: !0 });
271
- try {
272
- n.dataTransfer.setData("text/plain", "");
273
- } catch (c) {
274
- console.error(c);
275
- }
276
- (i = t.onNodeDragStart) == null || i.call(t, n, e);
277
- }
278
- },
279
- onDragEnd: (n) => {
280
- var i;
281
- f && (n.stopPropagation(), I.cancel(), h({ ...o, isDragOver: !1, isDragging: !1 }), (i = t.onNodeDragEnd) == null || i.call(t, n, e));
282
- },
283
- onDragOver: (n) => {
284
- n.preventDefault(), n.stopPropagation(), n.persist(), I(n);
285
- },
286
- onDragLeave: (n) => {
287
- var i;
288
- f && (n.stopPropagation(), I.cancel(), h({ ...o, isDragOver: !1 }), (i = t.onNodeDragLeave) == null || i.call(t, n, e));
289
- },
290
- children: [
291
- b && /* @__PURE__ */ l("span", { className: `${r}-icon ${r}-custom-icon`, children: b }),
292
- /* @__PURE__ */ l("span", { className: `${r}-title-text`, children: p(t.renderTitle) ? t.renderTitle(e) : $ }),
293
- f && /* @__PURE__ */ l("span", { className: `${r}-icon ${r}-drag-icon`, children: "dragIcon" in D ? D.dragIcon : /* @__PURE__ */ l(X, {}) })
294
- ]
295
- }
296
- ),
297
- p(t.renderExtra) && t.renderExtra(e)
298
- ]
299
- }
300
- ),
301
- t.animation && /* @__PURE__ */ l(ge, { ...e })
302
- ] });
303
- }
304
- const q = te(fe);
305
- q.displayName = "TreeNode";
306
- const he = ne.memo(q);
307
- export {
308
- he as N,
309
- ge as T
310
- };
package/chunk/DskaI8QL.js DELETED
@@ -1,25 +0,0 @@
1
- import { T as c } from "./CIkPwQlq.js";
2
- const t = "dark";
3
- function d(e, s) {
4
- e.classList.add(s);
5
- }
6
- function a(e, s) {
7
- e.classList.remove(s);
8
- }
9
- function i(e) {
10
- const {
11
- element: s = window.document.body,
12
- className: o = c,
13
- mode: n = t
14
- } = e ?? {};
15
- return n === t ? d(s, o) : a(s, o), () => {
16
- a(s, o);
17
- };
18
- }
19
- function r(e) {
20
- i({ ...e, mode: "light" });
21
- }
22
- export {
23
- r,
24
- i as s
25
- };
package/chunk/EL5Jmjgr.js DELETED
@@ -1,170 +0,0 @@
1
- import { jsx as i, jsxs as z, Fragment as H } from "react/jsx-runtime";
2
- import _ from "lodash/isFunction";
3
- import L from "lodash/isNil";
4
- import Q, { createContext as S, useContext as G, useRef as T } from "react";
5
- import { a as j, I as q } from "./C9XYyypq.js";
6
- import { u as A } from "./BFTV6myl.js";
7
- import { u as D } from "./DeV0v__J.js";
8
- import { p as F } from "./CUFsOxJ2.js";
9
- import { o as E } from "./BKKEev13.js";
10
- import J from "lodash/isArray";
11
- import K from "lodash/isPlainObject";
12
- import { pickTriggerPropsFromRest as U } from "../utils/constant.js";
13
- import { a as W } from "./ClqoGc3r.js";
14
- const I = {
15
- type: "radio"
16
- }, X = {
17
- type: "radio",
18
- mode: "outline",
19
- direction: "horizontal"
20
- }, y = S(I), de = ({ children: b }) => /* @__PURE__ */ i(y.Provider, { value: I, children: b });
21
- function M(b) {
22
- const {
23
- getPrefixCls: g,
24
- size: N,
25
- componentConfig: d,
26
- rtl: R
27
- } = G(j), e = A(
28
- b,
29
- X,
30
- d == null ? void 0 : d["Radio.Group"]
31
- ), {
32
- style: a,
33
- className: o,
34
- name: c,
35
- children: m,
36
- direction: p,
37
- type: k,
38
- mode: $,
39
- options: v,
40
- disabled: t
41
- } = e, [l, P] = D(void 0, {
42
- defaultValue: e.defaultValue,
43
- value: e.value
44
- }), x = e.size || N, n = g("radio"), V = F(
45
- `${n}-group`,
46
- {
47
- [`${n}-group-type-button`]: k !== "radio",
48
- [`${n}-size-${x}`]: !!x,
49
- [`${n}-mode-${$}`]: !!$,
50
- [`${n}-group-disabled`]: t,
51
- [`${n}-group-direction-vertical`]: p === "vertical",
52
- [`${n}-group-rtl`]: R
53
- },
54
- o
55
- ), u = {
56
- onChangeValue: (s, f) => {
57
- const { onChange: h } = e;
58
- s !== l && ("value" in e || P(s), h == null || h(s, f));
59
- },
60
- type: k,
61
- value: l,
62
- disabled: t,
63
- group: !0,
64
- name: c
65
- };
66
- return /* @__PURE__ */ i(y.Provider, { value: u, children: /* @__PURE__ */ i(
67
- "div",
68
- {
69
- className: V,
70
- role: "radiogroup",
71
- style: a,
72
- ...U(e),
73
- ...W(e),
74
- children: v && J(v) ? v.map((s, f) => {
75
- const { value: h, label: O, disabled: w, ...B } = s;
76
- return K(s) ? /* @__PURE__ */ i(
77
- C,
78
- {
79
- ...B,
80
- disabled: t || w,
81
- value: h,
82
- children: O
83
- },
84
- h
85
- ) : /* @__PURE__ */ i(C, { value: s, disabled: t, children: s }, f);
86
- }) : m
87
- }
88
- ) });
89
- }
90
- M.displayName = "RadioGroup";
91
- function C(b) {
92
- const g = T(null), { getPrefixCls: N, componentConfig: d, rtl: R } = G(j), e = A(
93
- b,
94
- {},
95
- d == null ? void 0 : d.Radio
96
- ), a = G(y), o = N("radio"), c = { ...e };
97
- a.group && (c.checked = a.value === e.value, c.disabled = "disabled" in e ? e.disabled : a.disabled);
98
- const { disabled: m, children: p, value: k, style: $, className: v, ...t } = c, [l, P] = D(!1, {
99
- value: c.checked,
100
- defaultValue: c.defaultChecked
101
- }), x = F(
102
- `${o}${a.type === "button" ? "-button" : ""}`,
103
- {
104
- [`${o}-checked`]: l,
105
- [`${o}-disabled`]: m,
106
- [`${o}-rtl`]: R
107
- },
108
- v
109
- ), n = (r) => {
110
- var f;
111
- const { onChange: u, value: s } = c;
112
- m || (a.group ? (f = a.onChangeValue) == null || f.call(a, s, r) : !("checked" in e) && !l && P(!0), !l && (u == null || u(!0, r)));
113
- }, V = Q.useCallback(
114
- (r) => {
115
- var u;
116
- _(e.children) && (r.preventDefault(), g.current && g.current.click()), (u = t.onClick) == null || u.call(t, r);
117
- },
118
- [e.children, t.onClick]
119
- );
120
- return /* @__PURE__ */ z(
121
- "label",
122
- {
123
- ...E(t, ["checked", "onChange"]),
124
- onClick: V,
125
- style: $,
126
- className: x,
127
- children: [
128
- /* @__PURE__ */ i(
129
- "input",
130
- {
131
- ref: g,
132
- disabled: m,
133
- value: k || "",
134
- type: "radio",
135
- ...a.name ? { name: a.name } : {},
136
- checked: l,
137
- onChange: (r) => {
138
- r.persist(), n(r);
139
- },
140
- onClick: (r) => {
141
- r.stopPropagation();
142
- }
143
- }
144
- ),
145
- _(p) ? p({ checked: l }) : a.type === "radio" ? /* @__PURE__ */ z(H, { children: [
146
- /* @__PURE__ */ i(
147
- q,
148
- {
149
- prefix: o,
150
- className: `${o}-mask-wrapper`,
151
- disabled: l || m,
152
- children: /* @__PURE__ */ i("div", { className: `${o}-mask` })
153
- }
154
- ),
155
- !L(p) && /* @__PURE__ */ i("span", { className: `${o}-text`, children: p })
156
- ] }) : a.type === "button" && /* @__PURE__ */ i("span", { className: `${o}-button-inner`, children: p })
157
- ]
158
- }
159
- );
160
- }
161
- C.__PQB_RADIO = !0;
162
- C.displayName = "Radio";
163
- C.Group = M;
164
- C.GroupContext = y;
165
- export {
166
- de as C,
167
- M as G,
168
- C as R,
169
- y as a
170
- };