@unicom-cloud/ui 0.8.80 → 0.8.82
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/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +24 -24
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{D73Vr7fa.js → w221i0nK.js} +2871 -2870
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -4
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +404 -402
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +61 -61
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +2 -2
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +6 -6
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/utils/contextHolder.js +3 -3
- package/utils/index.js +1 -1
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/input/InputElement.js
CHANGED
|
@@ -3,7 +3,7 @@ import Y from "@unicom-cloud/icons/IconUiClose";
|
|
|
3
3
|
import Z from "lodash/isFunction";
|
|
4
4
|
import _, { useState as ee, useRef as I, useImperativeHandle as te, useEffect as O } from "react";
|
|
5
5
|
import { u as oe } from "../chunk/BYdIoY50.js";
|
|
6
|
-
import { I as ne } from "../chunk/
|
|
6
|
+
import { I as ne } from "../chunk/Cplu5dtQ.js";
|
|
7
7
|
import k from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { f as re } from "../chunk/CftuXmo_.js";
|
|
9
9
|
import "../chunk/ClM74To2.js";
|
package/input/Password.js
CHANGED
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "@unicom-cloud/icons/IconUiEye";
|
|
3
3
|
import "@unicom-cloud/icons/IconUiEyeInvisible";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../chunk/
|
|
5
|
+
import "../chunk/Cplu5dtQ.js";
|
|
6
6
|
import "../chunk/BYdIoY50.js";
|
|
7
7
|
import "../chunk/CXPOj2uy.js";
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
package/input/Search.js
CHANGED
|
@@ -4,7 +4,7 @@ import "@unicom-cloud/icons/IconUiSearch";
|
|
|
4
4
|
import "lodash/isPlainObject";
|
|
5
5
|
import "react";
|
|
6
6
|
import "../button/index.js";
|
|
7
|
-
import "../chunk/
|
|
7
|
+
import "../chunk/Cplu5dtQ.js";
|
|
8
8
|
import "../chunk/CXPOj2uy.js";
|
|
9
9
|
import "@unicom-cloud/utils/class-name";
|
|
10
10
|
import "../chunk/BKKEev13.js";
|
package/input/Textarea.js
CHANGED
package/input-number/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import "@unicom-cloud/icons/IconUiPlus";
|
|
|
5
5
|
import "@unicom-cloud/icons/IconUiUp";
|
|
6
6
|
import "lodash/isNumber";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../chunk/
|
|
8
|
+
import "../chunk/Cplu5dtQ.js";
|
|
9
9
|
import "../chunk/BFTV6myl.js";
|
|
10
10
|
import { InputNumber as I } from "../input/Input.js";
|
|
11
11
|
import "@unicom-cloud/utils/class-name";
|
package/input-tag/InputTag.js
CHANGED
|
@@ -3,7 +3,7 @@ import Ge from "@unicom-cloud/icons/IconUiClose";
|
|
|
3
3
|
import { b as Ke } from "../chunk/BJ9_azwQ.js";
|
|
4
4
|
import Te from "lodash/isArray";
|
|
5
5
|
import Ce, { useContext as qe, useRef as C, useState as Xe, useImperativeHandle as Ye, useMemo as Je, useEffect as Qe } from "react";
|
|
6
|
-
import { a as Ze, I as et } from "../chunk/
|
|
6
|
+
import { a as Ze, I as et } from "../chunk/Cplu5dtQ.js";
|
|
7
7
|
import tt from "../draggable/index.js";
|
|
8
8
|
import { u as ot } from "../chunk/BFTV6myl.js";
|
|
9
9
|
import { u as be } from "../chunk/CXPOj2uy.js";
|
|
@@ -18,10 +18,10 @@ import "../chunk/ClM74To2.js";
|
|
|
18
18
|
import { Backspace as it } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
19
19
|
import { o as ut } from "../chunk/BKKEev13.js";
|
|
20
20
|
import { P as ye } from "../chunk/NPajzdOv.js";
|
|
21
|
-
import { isPlainObject as
|
|
21
|
+
import { isPlainObject as Ve } from "@unicom-cloud/utils/is";
|
|
22
22
|
const X = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slice(2)}`, T = (n) => n == null, M = (n) => {
|
|
23
23
|
n.target.tagName !== "INPUT" && n.preventDefault();
|
|
24
|
-
}, Ie = (n) => Te(n) ? n.map((c) =>
|
|
24
|
+
}, Ie = (n) => Te(n) ? n.map((c) => Ve(c) ? {
|
|
25
25
|
...c,
|
|
26
26
|
label: "label" in c ? c.label : c.value,
|
|
27
27
|
value: c.value,
|
|
@@ -30,30 +30,30 @@ const X = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slic
|
|
|
30
30
|
label: c,
|
|
31
31
|
value: c
|
|
32
32
|
}) : [], dt = (n) => {
|
|
33
|
-
const c = C(0),
|
|
33
|
+
const c = C(0), f = C(n.length);
|
|
34
34
|
return Qe(() => {
|
|
35
|
-
c.current = n.length === 0 &&
|
|
35
|
+
c.current = n.length === 0 && f.current > 0 ? X : 0, f.current = n.length;
|
|
36
36
|
}, [n]), c;
|
|
37
37
|
}, $e = ({
|
|
38
38
|
prefixCls: n,
|
|
39
39
|
children: c,
|
|
40
|
-
animation:
|
|
41
|
-
}) => /* @__PURE__ */ i("div", { className: `${n}-inner`, children:
|
|
40
|
+
animation: f
|
|
41
|
+
}) => /* @__PURE__ */ i("div", { className: `${n}-inner`, children: f ? /* @__PURE__ */ i(Ke, { component: null, children: c }) : c }), mt = {
|
|
42
42
|
animation: !0,
|
|
43
|
-
validate: (n, c) => n && c.every((
|
|
43
|
+
validate: (n, c) => n && c.every((f) => f.value !== n)
|
|
44
44
|
};
|
|
45
45
|
function gt(n, c) {
|
|
46
46
|
const {
|
|
47
|
-
getPrefixCls:
|
|
48
|
-
size:
|
|
47
|
+
getPrefixCls: f,
|
|
48
|
+
size: we,
|
|
49
49
|
componentConfig: E,
|
|
50
50
|
rtl: Y
|
|
51
|
-
} = qe(Ze),
|
|
51
|
+
} = qe(Ze), d = ot(
|
|
52
52
|
n,
|
|
53
53
|
mt,
|
|
54
54
|
E == null ? void 0 : E.InputTag
|
|
55
55
|
), {
|
|
56
|
-
className:
|
|
56
|
+
className: Pe,
|
|
57
57
|
style: Se,
|
|
58
58
|
placeholder: De,
|
|
59
59
|
error: Re,
|
|
@@ -65,20 +65,20 @@ function gt(n, c) {
|
|
|
65
65
|
disableInput: Ee,
|
|
66
66
|
animation: J,
|
|
67
67
|
saveOnBlur: ke,
|
|
68
|
-
dragToSort:
|
|
68
|
+
dragToSort: ze,
|
|
69
69
|
icon: N,
|
|
70
70
|
prefix: Q,
|
|
71
71
|
suffix: Z,
|
|
72
72
|
addBefore: ee,
|
|
73
73
|
addAfter: te,
|
|
74
74
|
tokenSeparators: k,
|
|
75
|
-
validate:
|
|
75
|
+
validate: V,
|
|
76
76
|
renderTag: oe,
|
|
77
77
|
tagClassName: ae,
|
|
78
78
|
maxTagCount: m,
|
|
79
|
-
onInputChange:
|
|
80
|
-
onKeyDown:
|
|
81
|
-
onPaste:
|
|
79
|
+
onInputChange: z,
|
|
80
|
+
onKeyDown: O,
|
|
81
|
+
onPaste: x,
|
|
82
82
|
onChange: F,
|
|
83
83
|
onFocus: j,
|
|
84
84
|
onBlur: H,
|
|
@@ -86,13 +86,13 @@ function gt(n, c) {
|
|
|
86
86
|
onRemove: L,
|
|
87
87
|
onClear: B,
|
|
88
88
|
onClick: re,
|
|
89
|
-
...
|
|
90
|
-
} =
|
|
91
|
-
defaultValue: "defaultValue" in
|
|
92
|
-
value: "value" in
|
|
89
|
+
...Oe
|
|
90
|
+
} = d, o = f == null ? void 0 : f("input-tag"), w = "size" in d ? d.size : we, b = typeof m == "object" ? m.count : m, y = C(), U = C(null), G = C(), [P, se] = Xe(!1), [a, xe] = be([], {
|
|
91
|
+
defaultValue: "defaultValue" in d ? Ie(d.defaultValue) : void 0,
|
|
92
|
+
value: "value" in d ? Ie(d.value) : void 0
|
|
93
93
|
}), [I, S] = be("", {
|
|
94
|
-
value:
|
|
95
|
-
}), Fe = dt(a), je = !!(
|
|
94
|
+
value: d.inputValue
|
|
95
|
+
}), Fe = dt(a), je = !!(ze && !g && !h);
|
|
96
96
|
Ye(c, () => {
|
|
97
97
|
var e, t;
|
|
98
98
|
return {
|
|
@@ -102,7 +102,7 @@ function gt(n, c) {
|
|
|
102
102
|
};
|
|
103
103
|
}, []);
|
|
104
104
|
const $ = (e, t) => {
|
|
105
|
-
h || g || ("value" in
|
|
105
|
+
h || g || ("value" in d || xe(e), F == null || F(Me ? e : e.map((r) => r == null ? void 0 : r.value), t));
|
|
106
106
|
}, ne = (e, t, r) => {
|
|
107
107
|
L == null || L(e, t, r), $(
|
|
108
108
|
[...a.slice(0, t), ...a.slice(t + 1)],
|
|
@@ -126,7 +126,7 @@ function gt(n, c) {
|
|
|
126
126
|
])
|
|
127
127
|
), le = async () => {
|
|
128
128
|
try {
|
|
129
|
-
const e = typeof
|
|
129
|
+
const e = typeof V == "function" ? await V(I, a) : !0;
|
|
130
130
|
e && ($(
|
|
131
131
|
a.concat({
|
|
132
132
|
value: e === !0 ? I : e,
|
|
@@ -179,7 +179,7 @@ function gt(n, c) {
|
|
|
179
179
|
const t = typeof m == "object" && m.render ? m.render : () => /* @__PURE__ */ _("span", { className: `${o}-tag-ellipsis`, children: [
|
|
180
180
|
"+",
|
|
181
181
|
e
|
|
182
|
-
] }), r =
|
|
182
|
+
] }), r = Ve(m) && m.popoverProps;
|
|
183
183
|
return /* @__PURE__ */ i(
|
|
184
184
|
st,
|
|
185
185
|
{
|
|
@@ -204,7 +204,7 @@ function gt(n, c) {
|
|
|
204
204
|
const r = [];
|
|
205
205
|
await Promise.all(
|
|
206
206
|
t.map(async (s) => {
|
|
207
|
-
const l = s ? typeof
|
|
207
|
+
const l = s ? typeof V == "function" ? await V(s, a) : !0 : !1;
|
|
208
208
|
l && r.push({
|
|
209
209
|
value: l === !0 ? s : l,
|
|
210
210
|
label: s
|
|
@@ -216,11 +216,11 @@ function gt(n, c) {
|
|
|
216
216
|
}, pe = _e && !h && !g && a.length ? /* @__PURE__ */ i(
|
|
217
217
|
et,
|
|
218
218
|
{
|
|
219
|
-
size:
|
|
219
|
+
size: w,
|
|
220
220
|
className: `${o}-clear-icon`,
|
|
221
221
|
onClick: (e) => {
|
|
222
222
|
var t;
|
|
223
|
-
e.stopPropagation(), $([], "clear"),
|
|
223
|
+
e.stopPropagation(), $([], "clear"), P || (t = y.current) == null || t.focus(), B == null || B();
|
|
224
224
|
},
|
|
225
225
|
children: N && N.clearIcon || /* @__PURE__ */ i(Ge, {})
|
|
226
226
|
},
|
|
@@ -251,7 +251,7 @@ function gt(n, c) {
|
|
|
251
251
|
at,
|
|
252
252
|
{
|
|
253
253
|
autoComplete: "off",
|
|
254
|
-
size:
|
|
254
|
+
size: w,
|
|
255
255
|
disabled: fe,
|
|
256
256
|
readOnly: g,
|
|
257
257
|
ref: y,
|
|
@@ -273,40 +273,40 @@ function gt(n, c) {
|
|
|
273
273
|
},
|
|
274
274
|
value: I,
|
|
275
275
|
onChange: (e, t) => {
|
|
276
|
-
|
|
276
|
+
z == null || z(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), U.current ? S("") : S(e);
|
|
277
277
|
},
|
|
278
278
|
onKeyDown: (e) => {
|
|
279
|
-
He(e),
|
|
279
|
+
He(e), O == null || O(e);
|
|
280
280
|
},
|
|
281
281
|
onPaste: (e) => {
|
|
282
|
-
|
|
282
|
+
x == null || x(e), ue(e.clipboardData.getData("text"));
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
)
|
|
286
286
|
},
|
|
287
287
|
ft
|
|
288
288
|
)
|
|
289
|
-
], We = !T(Q), de = !T(Z) || !T(pe), me = !T(ee), ge = !T(te), D = me || ge, ve =
|
|
290
|
-
[`${o}-size-${
|
|
289
|
+
], We = !T(Q), de = !T(Z) || !T(pe), me = !T(ee), ge = !T(te), D = me || ge, ve = d.status || (Re ? "error" : void 0), he = A(o, {
|
|
290
|
+
[`${o}-size-${w}`]: w,
|
|
291
291
|
[`${o}-disabled`]: h,
|
|
292
292
|
[`${o}-${ve}`]: ve,
|
|
293
|
-
[`${o}-focus`]:
|
|
293
|
+
[`${o}-focus`]: P,
|
|
294
294
|
[`${o}-readonly`]: g,
|
|
295
295
|
[`${o}-has-suffix`]: de,
|
|
296
296
|
[`${o}-has-placeholder`]: !a.length,
|
|
297
297
|
[`${o}-rtl`]: Y
|
|
298
|
-
}), R = { style: Se, className:
|
|
298
|
+
}), R = { style: Se, className: Pe }, Ne = /* @__PURE__ */ i(
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
|
-
...ut(
|
|
301
|
+
...ut(Oe, ["status", "size", "defaultValue", "value", "inputValue"]),
|
|
302
302
|
...D ? {} : R,
|
|
303
303
|
className: D ? he : A(he, R.className),
|
|
304
304
|
onMouseDown: (e) => {
|
|
305
|
-
|
|
305
|
+
P && M(e);
|
|
306
306
|
},
|
|
307
307
|
onClick: (e) => {
|
|
308
308
|
var t;
|
|
309
|
-
!
|
|
309
|
+
!P && ((t = y.current) == null || t.focus()), re && re(e);
|
|
310
310
|
},
|
|
311
311
|
ref: D ? void 0 : G,
|
|
312
312
|
children: /* @__PURE__ */ _("div", { className: `${o}-view`, children: [
|
package/layout/Content.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f, useContext as i } from "react";
|
|
3
|
-
import { a as l } from "../chunk/
|
|
3
|
+
import { a as l } from "../chunk/Cplu5dtQ.js";
|
|
4
4
|
import p from "@unicom-cloud/utils/class-name";
|
|
5
|
-
function
|
|
6
|
-
const { className: s, children:
|
|
7
|
-
return /* @__PURE__ */ c("main", { ref:
|
|
5
|
+
function u(o, n) {
|
|
6
|
+
const { className: s, children: a, ...e } = o, { getPrefixCls: t } = i(l), m = t == null ? void 0 : t("layout-content"), r = p(m, s);
|
|
7
|
+
return /* @__PURE__ */ c("main", { ref: n, ...e, className: r, children: a });
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const C = f(u);
|
|
10
|
+
C.displayName = "LayoutContent";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
C as default
|
|
13
13
|
};
|
package/layout/Footer.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { a as i } from "../chunk/
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useContext as l } from "react";
|
|
3
|
+
import { a as i } from "../chunk/Cplu5dtQ.js";
|
|
4
4
|
import p from "@unicom-cloud/utils/class-name";
|
|
5
|
-
function u(
|
|
6
|
-
const { className: e, children:
|
|
7
|
-
return /* @__PURE__ */
|
|
5
|
+
function u(t, s) {
|
|
6
|
+
const { className: e, children: r, ...a } = t, { getPrefixCls: o } = l(i), m = o == null ? void 0 : o("layout-footer"), n = p(m, e);
|
|
7
|
+
return /* @__PURE__ */ c("footer", { ref: s, ...a, className: n, children: r });
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const N = f(u);
|
|
10
|
+
N.displayName = "LayoutFooter";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
N as default
|
|
13
13
|
};
|
package/layout/Header.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { a as
|
|
4
|
-
import
|
|
5
|
-
function p(
|
|
6
|
-
const { getPrefixCls:
|
|
7
|
-
return /* @__PURE__ */ c("header", { ref:
|
|
2
|
+
import { forwardRef as d, useContext as f } from "react";
|
|
3
|
+
import { a as l } from "../chunk/Cplu5dtQ.js";
|
|
4
|
+
import i from "@unicom-cloud/utils/class-name";
|
|
5
|
+
function p(a, o) {
|
|
6
|
+
const { getPrefixCls: e } = f(l), { className: s, children: r, ...t } = a, m = e == null ? void 0 : e("layout-header"), n = i(m, s);
|
|
7
|
+
return /* @__PURE__ */ c("header", { ref: o, ...t, className: n, children: r });
|
|
8
8
|
}
|
|
9
|
-
const u =
|
|
9
|
+
const u = d(p);
|
|
10
10
|
u.displayName = "LayoutHeader";
|
|
11
11
|
export {
|
|
12
12
|
u as default
|
package/layout/Sider.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createContext as
|
|
7
|
-
import { a as ie } from "../chunk/
|
|
1
|
+
import { jsx as n, jsxs as X } from "react/jsx-runtime";
|
|
2
|
+
import q from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import A from "@unicom-cloud/icons/IconUiRight";
|
|
4
|
+
import Y from "lodash/isArray";
|
|
5
|
+
import y from "lodash/isNumber";
|
|
6
|
+
import { createContext as Z, forwardRef as P, useContext as ee, useState as re, useRef as F, useEffect as H, useMemo as te } from "react";
|
|
7
|
+
import { a as ie } from "../chunk/Cplu5dtQ.js";
|
|
8
8
|
import { u as se } from "../chunk/CXPOj2uy.js";
|
|
9
9
|
import oe from "../resize-box/index.js";
|
|
10
|
-
import
|
|
11
|
-
import { responsiveMap as ne, responsiveObserve as
|
|
12
|
-
const le =
|
|
10
|
+
import L from "@unicom-cloud/utils/class-name";
|
|
11
|
+
import { responsiveMap as ne, responsiveObserve as V } from "../utils/responsiveObserve.js";
|
|
12
|
+
const le = Z({
|
|
13
13
|
siderCollapsed: !1,
|
|
14
14
|
collapsedWidth: 64
|
|
15
15
|
}), ae = /* @__PURE__ */ (() => {
|
|
@@ -17,74 +17,74 @@ const le = Y({
|
|
|
17
17
|
return (m = "") => (i += 1, `${m}${i}`);
|
|
18
18
|
})();
|
|
19
19
|
function ce(i, m) {
|
|
20
|
-
var
|
|
20
|
+
var j;
|
|
21
21
|
const {
|
|
22
|
-
children:
|
|
23
|
-
className:
|
|
24
|
-
style:
|
|
25
|
-
theme:
|
|
22
|
+
children: E,
|
|
23
|
+
className: G,
|
|
24
|
+
style: O,
|
|
25
|
+
theme: R = "light",
|
|
26
26
|
trigger: f,
|
|
27
|
-
reverseArrow:
|
|
27
|
+
reverseArrow: W,
|
|
28
28
|
collapsedWidth: r = 48,
|
|
29
29
|
width: g = 200,
|
|
30
30
|
collapsible: h,
|
|
31
31
|
resizeDirections: c,
|
|
32
32
|
onSiderMount: v,
|
|
33
|
-
onSiderUnmount:
|
|
34
|
-
breakpoint:
|
|
35
|
-
onBreakpoint:
|
|
33
|
+
onSiderUnmount: $,
|
|
34
|
+
breakpoint: _,
|
|
35
|
+
onBreakpoint: Q,
|
|
36
36
|
onCollapse: d,
|
|
37
37
|
resizeBoxProps: t = {}
|
|
38
|
-
} = i,
|
|
38
|
+
} = i, I = ae("pqb-sider-"), { getPrefixCls: b } = ee(ie), s = b == null ? void 0 : b("layout-sider"), [e, k] = se(!1, {
|
|
39
39
|
value: "collapsed" in i ? i.collapsed : void 0,
|
|
40
40
|
defaultValue: i.defaultCollapsed
|
|
41
|
-
}),
|
|
42
|
-
e ?
|
|
43
|
-
),
|
|
44
|
-
|
|
45
|
-
breakpoint:
|
|
41
|
+
}), C = y(g) ? `${g}px` : String(g), U = y(r) ? `${r}` : String(r), [p, M] = re(
|
|
42
|
+
e ? U : C
|
|
43
|
+
), N = F(null), T = F(null);
|
|
44
|
+
T.current = {
|
|
45
|
+
breakpoint: _,
|
|
46
46
|
collapsed: e,
|
|
47
47
|
onCollapse: d,
|
|
48
|
-
onBreakpoint:
|
|
49
|
-
},
|
|
48
|
+
onBreakpoint: Q
|
|
49
|
+
}, H(() => (v == null || v(I), h && _ in ne && (N.current = V.subscribe(
|
|
50
50
|
(o, l) => {
|
|
51
|
-
const { breakpoint: a, collapsed:
|
|
51
|
+
const { breakpoint: a, collapsed: K, onCollapse: x, onBreakpoint: w } = T.current;
|
|
52
52
|
if (!l || l === a) {
|
|
53
53
|
const u = !o[a];
|
|
54
|
-
u !==
|
|
54
|
+
u !== K && (k(u), x == null || x(u, "responsive")), w == null || w(u);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
)), () => {
|
|
58
|
-
|
|
59
|
-
}), []),
|
|
60
|
-
const o =
|
|
61
|
-
|
|
62
|
-
}, [e,
|
|
63
|
-
const
|
|
64
|
-
const o = f || (e ?
|
|
58
|
+
$ == null || $(I), N.current && V.unsubscribe(N.current);
|
|
59
|
+
}), []), H(() => {
|
|
60
|
+
const o = y(r) ? `${r}px` : String(r);
|
|
61
|
+
M(e ? o : C);
|
|
62
|
+
}, [e, C, r]);
|
|
63
|
+
const S = c && Y(c) || ((j = t.directions) == null ? void 0 : j.length), z = S ? oe : "aside", B = () => {
|
|
64
|
+
const o = f || (e ? W ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(A, {}) : W ? /* @__PURE__ */ n(A, {}) : /* @__PURE__ */ n(q, {}));
|
|
65
65
|
return h && f !== null ? /* @__PURE__ */ n(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
style: { width: p },
|
|
69
|
-
className:
|
|
70
|
-
[`${s}-trigger-light`]:
|
|
69
|
+
className: L(`${s}-trigger`, {
|
|
70
|
+
[`${s}-trigger-light`]: R === "light"
|
|
71
71
|
}),
|
|
72
72
|
onClick: () => {
|
|
73
|
-
|
|
73
|
+
k(!e), d == null || d(!e, "clickTrigger");
|
|
74
74
|
},
|
|
75
75
|
children: o
|
|
76
76
|
}
|
|
77
77
|
) : null;
|
|
78
|
-
},
|
|
78
|
+
}, J = te(() => S ? {
|
|
79
79
|
component: "aside",
|
|
80
80
|
...t,
|
|
81
81
|
width: p,
|
|
82
82
|
directions: c,
|
|
83
83
|
onMoving: (o, l) => {
|
|
84
84
|
var a;
|
|
85
|
-
|
|
85
|
+
M(`${l.width}px`), (a = t == null ? void 0 : t.onMoving) == null || a.call(t, o, l);
|
|
86
86
|
}
|
|
87
|
-
} : {}, [
|
|
87
|
+
} : {}, [S, c, p, t]);
|
|
88
88
|
return /* @__PURE__ */ n(
|
|
89
89
|
le.Provider,
|
|
90
90
|
{
|
|
@@ -92,37 +92,37 @@ function ce(i, m) {
|
|
|
92
92
|
siderCollapsed: e,
|
|
93
93
|
collapsedWidth: r
|
|
94
94
|
},
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
|
|
95
|
+
children: /* @__PURE__ */ X(
|
|
96
|
+
z,
|
|
97
97
|
{
|
|
98
98
|
ref: m,
|
|
99
99
|
style: {
|
|
100
100
|
width: p,
|
|
101
|
-
...
|
|
101
|
+
...O
|
|
102
102
|
},
|
|
103
|
-
className:
|
|
103
|
+
className: L(
|
|
104
104
|
s,
|
|
105
105
|
{
|
|
106
|
-
[`${s}-light`]:
|
|
106
|
+
[`${s}-light`]: R === "light",
|
|
107
107
|
[`${s}-has-trigger`]: f !== null && h,
|
|
108
108
|
[`${s}-collapsed`]: e
|
|
109
109
|
},
|
|
110
|
-
|
|
110
|
+
G
|
|
111
111
|
),
|
|
112
|
-
...
|
|
112
|
+
...J,
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */ n("div", { className: `${s}-children`, children:
|
|
115
|
-
|
|
114
|
+
/* @__PURE__ */ n("div", { className: `${s}-children`, children: E }),
|
|
115
|
+
B()
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
const de =
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
const de = P(ce), D = de;
|
|
123
|
+
D.displayName = "LayoutSider";
|
|
124
|
+
D.__PQB_SIGN__ = "sider";
|
|
125
125
|
export {
|
|
126
126
|
le as SiderContext,
|
|
127
|
-
|
|
127
|
+
D as default
|
|
128
128
|
};
|
package/layout/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { a as H } from "../chunk/
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
function
|
|
12
|
-
const { getPrefixCls:
|
|
13
|
-
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import p from "lodash/get";
|
|
3
|
+
import u, { forwardRef as g, useContext as x, useState as F } from "react";
|
|
4
|
+
import { a as H } from "../chunk/Cplu5dtQ.js";
|
|
5
|
+
import { u as R } from "../chunk/BFTV6myl.js";
|
|
6
|
+
import h from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import w from "./Content.js";
|
|
8
|
+
import M from "./Footer.js";
|
|
9
|
+
import $ from "./Header.js";
|
|
10
|
+
import b from "./Sider.js";
|
|
11
|
+
function j(f, c) {
|
|
12
|
+
const { getPrefixCls: e, componentConfig: r } = x(H), d = R(
|
|
13
|
+
f,
|
|
14
14
|
{},
|
|
15
|
-
|
|
16
|
-
), { className:
|
|
17
|
-
|
|
15
|
+
r == null ? void 0 : r.Layout
|
|
16
|
+
), { className: y, hasSider: a, children: l, ...C } = d, [s, m] = F([]), i = e == null ? void 0 : e("layout"), L = h(
|
|
17
|
+
i,
|
|
18
18
|
{
|
|
19
|
-
[`${
|
|
19
|
+
[`${i}-has-sider`]: typeof a == "boolean" ? a : s.length > 0
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
y
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
const S =
|
|
25
|
-
return o && S === "sider" ?
|
|
26
|
-
onSiderMount: (
|
|
27
|
-
onSiderUnmount: (
|
|
23
|
+
return /* @__PURE__ */ _("section", { ref: c, ...C, className: L, children: u.Children.map(l, (o) => {
|
|
24
|
+
const S = p(o, "type.__PQB_SIGN__") || p(o, "props.sign");
|
|
25
|
+
return o && S === "sider" ? u.cloneElement(o, {
|
|
26
|
+
onSiderMount: (n) => m([...s, n]),
|
|
27
|
+
onSiderUnmount: (n) => m(s.filter((N) => N !== n))
|
|
28
28
|
}) : o;
|
|
29
29
|
}) });
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const B = g(j), t = B;
|
|
32
32
|
t.displayName = "Layout";
|
|
33
|
-
t.Sider =
|
|
34
|
-
t.Header =
|
|
35
|
-
t.Footer =
|
|
36
|
-
t.Content =
|
|
33
|
+
t.Sider = b;
|
|
34
|
+
t.Header = $;
|
|
35
|
+
t.Footer = M;
|
|
36
|
+
t.Content = w;
|
|
37
37
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
w as LayoutContent,
|
|
39
|
+
M as LayoutFooter,
|
|
40
|
+
$ as LayoutHeader,
|
|
41
|
+
b as LayoutSider,
|
|
42
42
|
t as default
|
|
43
43
|
};
|