@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.
- package/Affix.js +1 -1
- package/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +56 -56
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +125 -129
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useId.js +8 -8
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +9 -7
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +684 -675
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +222 -230
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +226 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +96 -99
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +60 -65
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +107 -107
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +337 -346
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/config-provider/interface.d.ts +6 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +77 -73
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +48 -49
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
package/descriptions/index.js
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import C from "lodash/isArray";
|
|
3
3
|
import V from "lodash/isNumber";
|
|
4
4
|
import q from "lodash/isPlainObject";
|
|
5
5
|
import { useContext as B, useState as G, useRef as J, useEffect as K, Fragment as x } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
7
|
import Q from "../components/common/hooks/useMergeProps.js";
|
|
8
8
|
import U from "@unicom-cloud/utils/class-name";
|
|
9
|
-
import { responsiveObserve as
|
|
9
|
+
import { responsiveObserve as P, responsiveArray as k } from "../utils/responsiveObserve.js";
|
|
10
10
|
import W from "../config-provider/context.js";
|
|
11
|
-
const
|
|
11
|
+
const z = (u) => C(u) ? u.reduce((f, h) => f + (h.span || 1), 0) : 0, X = {
|
|
12
12
|
layout: "horizontal",
|
|
13
13
|
column: 3,
|
|
14
14
|
tableLayout: "auto"
|
|
15
15
|
};
|
|
16
|
-
function Y(
|
|
16
|
+
function Y(u) {
|
|
17
17
|
const {
|
|
18
|
-
getPrefixCls:
|
|
19
|
-
componentConfig:
|
|
20
|
-
rtl:
|
|
18
|
+
getPrefixCls: f,
|
|
19
|
+
componentConfig: h,
|
|
20
|
+
rtl: I,
|
|
21
21
|
size: d
|
|
22
|
-
} = B(W),
|
|
23
|
-
|
|
22
|
+
} = B(W), w = Q(
|
|
23
|
+
u,
|
|
24
24
|
X,
|
|
25
|
-
|
|
25
|
+
h?.Descriptions
|
|
26
26
|
), {
|
|
27
|
-
style:
|
|
28
|
-
className:
|
|
29
|
-
column:
|
|
27
|
+
style: D,
|
|
28
|
+
className: L,
|
|
29
|
+
column: p,
|
|
30
30
|
title: v,
|
|
31
31
|
data: b,
|
|
32
|
-
border:
|
|
32
|
+
border: O,
|
|
33
33
|
labelStyle: y,
|
|
34
34
|
valueStyle: $,
|
|
35
35
|
colon: N,
|
|
36
|
-
layout:
|
|
37
|
-
size:
|
|
38
|
-
tableLayout:
|
|
39
|
-
} =
|
|
40
|
-
K(() => (
|
|
41
|
-
for (let t = 0; t <
|
|
42
|
-
const e =
|
|
43
|
-
if (
|
|
36
|
+
layout: m,
|
|
37
|
+
size: g,
|
|
38
|
+
tableLayout: j
|
|
39
|
+
} = w, n = f?.("descriptions"), [A, E] = G(), S = J(null);
|
|
40
|
+
K(() => (S.current = P.subscribe((s) => {
|
|
41
|
+
for (let t = 0; t < k.length; t++) {
|
|
42
|
+
const e = k[t];
|
|
43
|
+
if (s[e]) {
|
|
44
44
|
E(e);
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}), () => {
|
|
49
|
-
|
|
49
|
+
P.unsubscribe(S.current);
|
|
50
50
|
}), []);
|
|
51
51
|
let l = 3;
|
|
52
|
-
q(
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
52
|
+
q(p) && (l = p[A] || 3), V(p) && p > 0 && (l = p);
|
|
53
|
+
const i = [];
|
|
54
|
+
if (C(b) && b.length > 0 && l) {
|
|
55
55
|
b.forEach((e) => {
|
|
56
|
-
const
|
|
57
|
-
a === 0 ?
|
|
56
|
+
const o = i[i.length - 1], a = z(o);
|
|
57
|
+
a === 0 ? i.push([
|
|
58
58
|
{
|
|
59
59
|
...e,
|
|
60
60
|
span: e.span ? e.span > l ? l : e.span : 1
|
|
61
61
|
}
|
|
62
|
-
]) : a === l ?
|
|
62
|
+
]) : a === l ? i.push([
|
|
63
63
|
{
|
|
64
64
|
...e,
|
|
65
65
|
span: e.span ? e.span > l ? l : e.span : 1
|
|
66
66
|
}
|
|
67
|
-
]) :
|
|
67
|
+
]) : o.push({
|
|
68
68
|
...e,
|
|
69
69
|
span: e.span ? e.span + a > l ? l - a : e.span : 1
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
|
-
const
|
|
73
|
-
t < l && (
|
|
72
|
+
const s = i[i.length - 1], t = z(s);
|
|
73
|
+
t < l && (s[s.length - 1].span = s[s.length - 1].span + l - t);
|
|
74
74
|
}
|
|
75
|
-
function F(
|
|
75
|
+
function F(s, t) {
|
|
76
76
|
return /* @__PURE__ */ c(x, { children: [
|
|
77
|
-
/* @__PURE__ */ r("tr", { className: `${
|
|
77
|
+
/* @__PURE__ */ r("tr", { className: `${n}-row`, children: s.map((e, o) => {
|
|
78
78
|
const a = e.span > 1 ? { colSpan: e.span } : {};
|
|
79
79
|
return /* @__PURE__ */ c(
|
|
80
80
|
"td",
|
|
81
81
|
{
|
|
82
|
-
className: `${
|
|
82
|
+
className: `${n}-item-label`,
|
|
83
83
|
...a,
|
|
84
84
|
style: y,
|
|
85
85
|
children: [
|
|
@@ -87,57 +87,57 @@ function Y(f) {
|
|
|
87
87
|
N
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
|
-
`${e.key ||
|
|
90
|
+
`${e.key || o}_label`
|
|
91
91
|
);
|
|
92
92
|
}) }),
|
|
93
|
-
/* @__PURE__ */ r("tr", { className: `${
|
|
93
|
+
/* @__PURE__ */ r("tr", { className: `${n}-row`, children: s.map((e, o) => {
|
|
94
94
|
const a = e.span > 1 ? { colSpan: e.span } : {};
|
|
95
95
|
return /* @__PURE__ */ r(
|
|
96
96
|
"td",
|
|
97
97
|
{
|
|
98
|
-
className: `${
|
|
98
|
+
className: `${n}-item-value`,
|
|
99
99
|
...a,
|
|
100
100
|
style: $,
|
|
101
101
|
children: e.value
|
|
102
102
|
},
|
|
103
|
-
`${e.key ||
|
|
103
|
+
`${e.key || o}_value`
|
|
104
104
|
);
|
|
105
105
|
}) })
|
|
106
106
|
] }, t);
|
|
107
107
|
}
|
|
108
|
-
function H(
|
|
109
|
-
return /* @__PURE__ */ r("tr", { className: `${
|
|
108
|
+
function H(s, t) {
|
|
109
|
+
return /* @__PURE__ */ r("tr", { className: `${n}-row`, children: s.map((e, o) => {
|
|
110
110
|
const a = e.span > 1 ? { colSpan: e.span * 2 - 1 } : {};
|
|
111
111
|
return /* @__PURE__ */ c(x, { children: [
|
|
112
|
-
/* @__PURE__ */ c("td", { className: `${
|
|
112
|
+
/* @__PURE__ */ c("td", { className: `${n}-item-label`, style: y, children: [
|
|
113
113
|
e.label,
|
|
114
114
|
N
|
|
115
115
|
] }),
|
|
116
116
|
/* @__PURE__ */ r(
|
|
117
117
|
"td",
|
|
118
118
|
{
|
|
119
|
-
className: `${
|
|
119
|
+
className: `${n}-item-value`,
|
|
120
120
|
...a,
|
|
121
121
|
style: $,
|
|
122
122
|
children: e.value
|
|
123
123
|
}
|
|
124
124
|
)
|
|
125
|
-
] }, e.key ||
|
|
125
|
+
] }, e.key || o);
|
|
126
126
|
}) }, t);
|
|
127
127
|
}
|
|
128
|
-
function M(
|
|
129
|
-
return /* @__PURE__ */ r("tr", { className: `${
|
|
128
|
+
function M(s, t) {
|
|
129
|
+
return /* @__PURE__ */ r("tr", { className: `${n}-row`, children: s.map((e, o) => {
|
|
130
130
|
const a = e.span > 1 ? { colSpan: e.span } : {};
|
|
131
131
|
return /* @__PURE__ */ c(
|
|
132
132
|
"td",
|
|
133
133
|
{
|
|
134
134
|
...a,
|
|
135
|
-
className: `${
|
|
135
|
+
className: `${n}-item`,
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ c(
|
|
138
138
|
"div",
|
|
139
139
|
{
|
|
140
|
-
className: `${
|
|
140
|
+
className: `${n}-item-label-inline`,
|
|
141
141
|
style: y,
|
|
142
142
|
children: [
|
|
143
143
|
e.label,
|
|
@@ -148,34 +148,34 @@ function Y(f) {
|
|
|
148
148
|
/* @__PURE__ */ r(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
151
|
-
className: `${
|
|
151
|
+
className: `${n}-item-value-inline`,
|
|
152
152
|
style: $,
|
|
153
153
|
children: e.value
|
|
154
154
|
}
|
|
155
155
|
)
|
|
156
156
|
]
|
|
157
157
|
},
|
|
158
|
-
e.key ||
|
|
158
|
+
e.key || o
|
|
159
159
|
);
|
|
160
160
|
}) }, t);
|
|
161
161
|
}
|
|
162
|
-
function R(
|
|
163
|
-
return
|
|
162
|
+
function R(s, t) {
|
|
163
|
+
return m === "inline-vertical" || m === "inline-horizontal" ? M(s, t) : m === "vertical" ? F(s, t) : H(s, t);
|
|
164
164
|
}
|
|
165
165
|
const T = U(
|
|
166
|
-
|
|
166
|
+
n,
|
|
167
167
|
{
|
|
168
|
-
[`${
|
|
169
|
-
[`${
|
|
170
|
-
[`${
|
|
171
|
-
[`${
|
|
172
|
-
[`${
|
|
168
|
+
[`${n}-border`]: O,
|
|
169
|
+
[`${n}-layout-${m}`]: m,
|
|
170
|
+
[`${n}-size-${g || d}`]: g || d,
|
|
171
|
+
[`${n}-table-layout-fixed`]: j === "fixed",
|
|
172
|
+
[`${n}-rtl`]: I
|
|
173
173
|
},
|
|
174
|
-
|
|
174
|
+
L
|
|
175
175
|
);
|
|
176
|
-
return /* @__PURE__ */ c("div", { className: T, style:
|
|
177
|
-
v && /* @__PURE__ */ r("div", { className: `${
|
|
178
|
-
/* @__PURE__ */ r("div", { className: `${
|
|
176
|
+
return /* @__PURE__ */ c("div", { className: T, style: D, children: [
|
|
177
|
+
v && /* @__PURE__ */ r("div", { className: `${n}-title`, children: v }),
|
|
178
|
+
/* @__PURE__ */ r("div", { className: `${n}-body`, children: /* @__PURE__ */ r("table", { className: `${n}-table`, cellPadding: 0, cellSpacing: 0, children: /* @__PURE__ */ r("tbody", { children: i.map((s, t) => R(s, t)) }) }) })
|
|
179
179
|
] });
|
|
180
180
|
}
|
|
181
181
|
Y.displayName = "Descriptions";
|
package/details/index.js
CHANGED
|
@@ -1,83 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import v from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
|
+
import F from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
4
|
+
import P from "@unicom-cloud/icons/IconUiDown";
|
|
5
|
+
import b from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
|
+
import c from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
7
|
+
import { forwardRef as j, useContext as S, useState as k } from "react";
|
|
8
8
|
import "../config-provider/ConfigProvider.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
9
|
+
import E from "../components/common/hooks/useMergeProps.js";
|
|
10
|
+
import m from "@unicom-cloud/utils/class-name";
|
|
11
|
+
import M from "../config-provider/context.js";
|
|
12
|
+
const R = {
|
|
13
13
|
type: "default"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
const { getPrefixCls:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
function T(p, f) {
|
|
16
|
+
const { getPrefixCls: d, componentConfig: u, rtl: C } = S(M), N = E(
|
|
17
|
+
p,
|
|
18
|
+
R,
|
|
19
|
+
u?.Details
|
|
20
20
|
), {
|
|
21
|
-
style:
|
|
22
|
-
className:
|
|
23
|
-
type:
|
|
24
|
-
title:
|
|
25
|
-
content:
|
|
26
|
-
icon:
|
|
27
|
-
banner:
|
|
28
|
-
...
|
|
29
|
-
} =
|
|
30
|
-
default: /* @__PURE__ */ o(
|
|
31
|
-
info: /* @__PURE__ */ o(
|
|
32
|
-
success: /* @__PURE__ */ o(
|
|
33
|
-
warning: /* @__PURE__ */ o(
|
|
34
|
-
error: /* @__PURE__ */ o(
|
|
35
|
-
}[
|
|
21
|
+
style: $,
|
|
22
|
+
className: g,
|
|
23
|
+
type: t,
|
|
24
|
+
title: s,
|
|
25
|
+
content: r,
|
|
26
|
+
icon: x,
|
|
27
|
+
banner: h,
|
|
28
|
+
...y
|
|
29
|
+
} = N, e = d?.("details"), [I, w] = k({}), n = x || {
|
|
30
|
+
default: /* @__PURE__ */ o(c, {}),
|
|
31
|
+
info: /* @__PURE__ */ o(c, {}),
|
|
32
|
+
success: /* @__PURE__ */ o(v, {}),
|
|
33
|
+
warning: /* @__PURE__ */ o(b, {}),
|
|
34
|
+
error: /* @__PURE__ */ o(F, {})
|
|
35
|
+
}[t], D = m(
|
|
36
36
|
e,
|
|
37
|
-
`${e}-${
|
|
37
|
+
`${e}-${t}`,
|
|
38
38
|
{
|
|
39
|
-
[`${e}-banner`]:
|
|
39
|
+
[`${e}-banner`]: h,
|
|
40
40
|
[`${e}-rtl`]: C
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
g
|
|
43
43
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ a(
|
|
45
45
|
"details",
|
|
46
46
|
{
|
|
47
|
-
ref:
|
|
48
|
-
style:
|
|
49
|
-
className:
|
|
47
|
+
ref: f,
|
|
48
|
+
style: $,
|
|
49
|
+
className: D,
|
|
50
50
|
role: "details",
|
|
51
|
-
onToggle: (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const m = { ...F };
|
|
56
|
-
return m.open = (p = a.target) == null ? void 0 : p.open, m;
|
|
51
|
+
onToggle: (i) => {
|
|
52
|
+
i.target?.open, w((U) => {
|
|
53
|
+
const l = { ...U };
|
|
54
|
+
return l.open = i.target?.open, l;
|
|
57
55
|
});
|
|
58
56
|
},
|
|
59
|
-
...
|
|
57
|
+
...y,
|
|
60
58
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
/* @__PURE__ */ a("summary", { className: `${e}-summary-wrapper`, children: [
|
|
60
|
+
n && /* @__PURE__ */ o("div", { className: `${e}-icon`, children: n }),
|
|
61
|
+
s && /* @__PURE__ */ o("div", { className: `${e}-title`, children: s }),
|
|
64
62
|
/* @__PURE__ */ o(
|
|
65
|
-
|
|
63
|
+
P,
|
|
66
64
|
{
|
|
67
|
-
className:
|
|
65
|
+
className: m(
|
|
68
66
|
`${e}-collapse-icon`,
|
|
69
|
-
|
|
67
|
+
I.open && `${e}-collapse-icon-open`
|
|
70
68
|
)
|
|
71
69
|
}
|
|
72
70
|
)
|
|
73
71
|
] }),
|
|
74
|
-
/* @__PURE__ */ o("div", { className: `${e}-content-wrapper`, children:
|
|
72
|
+
/* @__PURE__ */ o("div", { className: `${e}-content-wrapper`, children: r && /* @__PURE__ */ o("div", { className: `${e}-content`, children: r }) })
|
|
75
73
|
]
|
|
76
74
|
}
|
|
77
75
|
);
|
|
78
76
|
}
|
|
79
|
-
const
|
|
80
|
-
|
|
77
|
+
const _ = j(T);
|
|
78
|
+
_.displayName = "Details";
|
|
81
79
|
export {
|
|
82
|
-
|
|
80
|
+
_ as default
|
|
83
81
|
};
|
package/development/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import t from "@unicom-cloud/utils/class-name";
|
|
3
3
|
import { forwardRef as s, useContext as l, useEffect as r, useImperativeHandle as f } from "react";
|
|
4
4
|
import i from "../components/common/development/index.js";
|
|
5
5
|
import "../config-provider/ConfigProvider.js";
|
|
6
6
|
import c from "../config-provider/context.js";
|
|
7
|
-
function C(e,
|
|
8
|
-
const { getPrefixCls:
|
|
7
|
+
function C(e, m) {
|
|
8
|
+
const { getPrefixCls: n, componentConfig: p } = l(c), o = n?.("development");
|
|
9
9
|
return r(() => () => {
|
|
10
|
-
}, []), f(
|
|
10
|
+
}, []), f(m, () => ({})), /* @__PURE__ */ a(
|
|
11
11
|
i,
|
|
12
12
|
{
|
|
13
13
|
...e,
|
|
14
|
-
className:
|
|
15
|
-
iconClassName:
|
|
16
|
-
labelClassName:
|
|
14
|
+
className: t(o, e.className),
|
|
15
|
+
iconClassName: t(`${o}-icon`, e.iconClassName),
|
|
16
|
+
labelClassName: t(`${o}-label`, e.labelClassName)
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const g = s(C);
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
g as default
|
|
23
23
|
};
|
|
@@ -86,7 +86,7 @@ const q = {
|
|
|
86
86
|
new e("#E8EBEE")
|
|
87
87
|
]
|
|
88
88
|
}, K = i.map((n, s, F) => {
|
|
89
|
-
const r = n.name, a =
|
|
89
|
+
const r = n.name, a = r?.en ?? r?.zh ?? r, u = n.value;
|
|
90
90
|
return {
|
|
91
91
|
key: a,
|
|
92
92
|
name: r,
|
|
@@ -58,7 +58,7 @@ class p {
|
|
|
58
58
|
return (this._not ? t : !t) && this.addError(e), this;
|
|
59
59
|
}
|
|
60
60
|
collect(t) {
|
|
61
|
-
t
|
|
61
|
+
t?.(this.error);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
class R extends p {
|
|
@@ -155,12 +155,12 @@ class A extends p {
|
|
|
155
155
|
if (t)
|
|
156
156
|
return o = t(this.obj, this.addError.bind(this)), o && o.then ? (e && o.then(
|
|
157
157
|
() => {
|
|
158
|
-
e
|
|
158
|
+
e?.(this.error);
|
|
159
159
|
},
|
|
160
160
|
(a) => {
|
|
161
161
|
console.error(a);
|
|
162
162
|
}
|
|
163
|
-
), [o, this]) : (e
|
|
163
|
+
), [o, this]) : (e?.(this.error), this.error);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
class D extends p {
|
|
@@ -387,8 +387,8 @@ class J {
|
|
|
387
387
|
}), o.length > 0 ? Promise.all(o.map((s) => s.function)).then(() => {
|
|
388
388
|
o.forEach((s) => {
|
|
389
389
|
s._this.error && g(s.key, s._this.error);
|
|
390
|
-
}), e
|
|
391
|
-
}) : e
|
|
390
|
+
}), e?.(a);
|
|
391
|
+
}) : e?.(a);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
export {
|
package/divider/index.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, useContext as $ } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
4
|
import u from "../components/common/hooks/useMergeProps.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import C from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import N from "../config-provider/context.js";
|
|
7
|
+
const h = {
|
|
8
8
|
type: "horizontal",
|
|
9
9
|
orientation: "center"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const { getPrefixCls:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
), { children: e, style: p, className: c, type:
|
|
11
|
+
function v(i, n) {
|
|
12
|
+
const { getPrefixCls: a, componentConfig: m } = $(N), l = u(
|
|
13
|
+
i,
|
|
14
|
+
h,
|
|
15
|
+
m?.Divider
|
|
16
|
+
), { children: e, style: p, className: c, type: r, orientation: o, ...f } = l, t = a?.("divider"), d = C(
|
|
17
17
|
t,
|
|
18
|
-
`${t}-${
|
|
18
|
+
`${t}-${r}`,
|
|
19
19
|
{
|
|
20
20
|
[`${t}-with-text`]: e,
|
|
21
|
-
[`${t}-with-text-${
|
|
21
|
+
[`${t}-with-text-${o}`]: e && o
|
|
22
22
|
},
|
|
23
23
|
c
|
|
24
24
|
);
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ s(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
role: "separator",
|
|
29
|
-
ref:
|
|
30
|
-
className:
|
|
29
|
+
ref: n,
|
|
30
|
+
className: d,
|
|
31
31
|
style: p,
|
|
32
|
-
...
|
|
33
|
-
children: e &&
|
|
32
|
+
...f,
|
|
33
|
+
children: e && r === "horizontal" ? /* @__PURE__ */ s("span", { className: `${t}-text ${t}-text-${o}`, children: e }) : null
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const g = x(v);
|
|
38
|
+
g.displayName = "Divider";
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
g as default
|
|
41
41
|
};
|
package/draggable/Item.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useState as f, useEffect as u } from "react";
|
|
3
|
+
import T from "@unicom-cloud/utils/class-name";
|
|
4
|
+
function I(c) {
|
|
5
5
|
const {
|
|
6
6
|
prefixCls: r,
|
|
7
|
-
style:
|
|
8
|
-
children:
|
|
9
|
-
direction:
|
|
10
|
-
disabled:
|
|
7
|
+
style: m,
|
|
8
|
+
children: D,
|
|
9
|
+
direction: v,
|
|
10
|
+
disabled: P,
|
|
11
11
|
droppable: i = !0,
|
|
12
|
-
onDrop:
|
|
13
|
-
onDragStart:
|
|
14
|
-
onDragEnd:
|
|
15
|
-
onDragOver:
|
|
16
|
-
onDragLeave:
|
|
17
|
-
} =
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
}, []),
|
|
21
|
-
a === "dragged" && (
|
|
22
|
-
}, [a]), /* @__PURE__ */
|
|
12
|
+
onDrop: $,
|
|
13
|
+
onDragStart: h,
|
|
14
|
+
onDragEnd: O,
|
|
15
|
+
onDragOver: b,
|
|
16
|
+
onDragLeave: w
|
|
17
|
+
} = c, p = d(null), s = d(null), [a, o] = f("none"), [S, n] = f(!1), [g, l] = f(null);
|
|
18
|
+
return u(() => () => {
|
|
19
|
+
s.current && clearTimeout(s.current);
|
|
20
|
+
}, []), u(() => {
|
|
21
|
+
a === "dragged" && (s.current = setTimeout(() => o("none"), 1e3));
|
|
22
|
+
}, [a]), /* @__PURE__ */ x(
|
|
23
23
|
"li",
|
|
24
24
|
{
|
|
25
25
|
draggable: !0,
|
|
26
|
-
ref:
|
|
27
|
-
style:
|
|
28
|
-
className:
|
|
26
|
+
ref: p,
|
|
27
|
+
style: m,
|
|
28
|
+
className: T(`${r}-item`, {
|
|
29
29
|
[`${r}-item-${a}`]: a !== "none",
|
|
30
|
-
[`${r}-item-gap-${
|
|
31
|
-
[`${r}-item-disabled`]:
|
|
32
|
-
[`${r}-item-dragover`]:
|
|
30
|
+
[`${r}-item-gap-${g}`]: g,
|
|
31
|
+
[`${r}-item-disabled`]: P,
|
|
32
|
+
[`${r}-item-dragover`]: S
|
|
33
33
|
}),
|
|
34
34
|
onDragStart: (t) => {
|
|
35
35
|
t.stopPropagation(), o("dragging");
|
|
@@ -38,30 +38,30 @@ function N(h) {
|
|
|
38
38
|
} catch (e) {
|
|
39
39
|
console.error(e);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
h?.(t);
|
|
42
42
|
},
|
|
43
43
|
onDragEnd: (t) => {
|
|
44
|
-
t.stopPropagation(), n(!1), o("dragged"),
|
|
44
|
+
t.stopPropagation(), n(!1), o("dragged"), O?.(t);
|
|
45
45
|
},
|
|
46
46
|
onDragOver: (t) => {
|
|
47
47
|
if (i) {
|
|
48
48
|
t.stopPropagation(), t.preventDefault();
|
|
49
|
-
const e =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
), n(!0),
|
|
49
|
+
const e = p.current.getBoundingClientRect();
|
|
50
|
+
l(
|
|
51
|
+
v === "vertical" ? t.pageY > window.pageYOffset + e.top + e.height / 2 ? "bottom" : "top" : t.pageX > window.pageXOffset + e.left + e.width / 2 ? "right" : "left"
|
|
52
|
+
), n(!0), b?.(t);
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
onDragLeave: (t) => {
|
|
56
|
-
i && (t.stopPropagation(), n(!1),
|
|
56
|
+
i && (t.stopPropagation(), n(!1), w?.(t));
|
|
57
57
|
},
|
|
58
58
|
onDrop: (t) => {
|
|
59
|
-
i && (t.stopPropagation(), t.preventDefault(), n(!1),
|
|
59
|
+
i && (t.stopPropagation(), t.preventDefault(), n(!1), l(null), o("none"), $?.(t, g));
|
|
60
60
|
},
|
|
61
|
-
children:
|
|
61
|
+
children: D
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
I as default
|
|
67
67
|
};
|