@unicom-cloud/ui 0.8.81 → 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 +2 -2
- 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/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- 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/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- 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/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
- 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 +410 -408
- 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/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- 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/time-picker/util.js +5 -5
- 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 +9 -8
- 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 +13 -13
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/utils/tween.js +1 -1
- 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/picker/InputRange.js
CHANGED
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { a as uc, I as $c } from "../chunk/
|
|
6
|
-
import
|
|
1
|
+
import { jsxs as E, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import nc from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import w from "lodash/isArray";
|
|
4
|
+
import { forwardRef as sc, useContext as fc, useRef as z, useState as mc, useImperativeHandle as ic } from "react";
|
|
5
|
+
import { a as uc, I as $c } from "../chunk/Cplu5dtQ.js";
|
|
6
|
+
import G from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { Enter as hc, Tab as yc } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
8
|
-
import { o as
|
|
9
|
-
function
|
|
10
|
-
allowClear:
|
|
11
|
-
error:
|
|
12
|
-
status:
|
|
13
|
-
style:
|
|
14
|
-
className:
|
|
15
|
-
disabled:
|
|
16
|
-
placeholder:
|
|
8
|
+
import { o as Nc } from "../chunk/BKKEev13.js";
|
|
9
|
+
function Cc({
|
|
10
|
+
allowClear: J,
|
|
11
|
+
error: Q,
|
|
12
|
+
status: V,
|
|
13
|
+
style: X,
|
|
14
|
+
className: Y,
|
|
15
|
+
disabled: f,
|
|
16
|
+
placeholder: R = [],
|
|
17
17
|
value: m = [],
|
|
18
|
-
popupVisible:
|
|
18
|
+
popupVisible: Z,
|
|
19
19
|
format: i,
|
|
20
|
-
size:
|
|
21
|
-
onClear:
|
|
22
|
-
editable:
|
|
23
|
-
inputValue:
|
|
20
|
+
size: _,
|
|
21
|
+
onClear: T,
|
|
22
|
+
editable: I,
|
|
23
|
+
inputValue: K,
|
|
24
24
|
onPressEnter: u,
|
|
25
25
|
onPressTab: $,
|
|
26
26
|
onChange: h,
|
|
27
|
-
separator:
|
|
28
|
-
suffixIcon:
|
|
29
|
-
changeFocusedInputIndex:
|
|
30
|
-
focusedInputIndex:
|
|
31
|
-
isPlaceholder:
|
|
27
|
+
separator: x,
|
|
28
|
+
suffixIcon: p,
|
|
29
|
+
changeFocusedInputIndex: j,
|
|
30
|
+
focusedInputIndex: n,
|
|
31
|
+
isPlaceholder: P,
|
|
32
32
|
prefix: y,
|
|
33
|
-
inputProps:
|
|
34
|
-
onBlur:
|
|
35
|
-
...
|
|
36
|
-
},
|
|
33
|
+
inputProps: t = [],
|
|
34
|
+
onBlur: N,
|
|
35
|
+
...cc
|
|
36
|
+
}, ec) {
|
|
37
37
|
const {
|
|
38
|
-
getPrefixCls:
|
|
39
|
-
size:
|
|
40
|
-
locale:
|
|
41
|
-
rtl:
|
|
42
|
-
} =
|
|
43
|
-
ic(
|
|
38
|
+
getPrefixCls: C,
|
|
39
|
+
size: oc,
|
|
40
|
+
locale: g,
|
|
41
|
+
rtl: ac
|
|
42
|
+
} = fc(uc), k = z(null), v = z(null), O = z(null), [S, H] = mc([!1, !1]), F = w(f) ? f[0] : f, D = w(f) ? f[1] : f;
|
|
43
|
+
ic(ec, () => ({
|
|
44
44
|
focus(c) {
|
|
45
|
-
var
|
|
46
|
-
(
|
|
45
|
+
var a, r;
|
|
46
|
+
(n === 0 && !F || n === 1 && !D) && ((r = (a = ((typeof c == "number" ? c : n) === 0 ? k : v).current) == null ? void 0 : a.focus) == null || r.call(a));
|
|
47
47
|
},
|
|
48
48
|
blur() {
|
|
49
|
-
var c, o, e,
|
|
50
|
-
|
|
49
|
+
var c, o, e, a;
|
|
50
|
+
n === 0 && ((o = (c = k.current) == null ? void 0 : c.blur) == null || o.call(c)), n === 1 && ((a = (e = v.current) == null ? void 0 : e.blur) == null || a.call(e));
|
|
51
51
|
},
|
|
52
|
-
getRootDOMNode: () =>
|
|
52
|
+
getRootDOMNode: () => O.current
|
|
53
53
|
}));
|
|
54
|
-
function S(c, o) {
|
|
55
|
-
var e, l;
|
|
56
|
-
(l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onClick) == null || l.call(e, c), s !== o && R(o);
|
|
57
|
-
}
|
|
58
|
-
function H(c, o) {
|
|
59
|
-
var l, r;
|
|
60
|
-
const e = c.key;
|
|
61
|
-
(r = (l = a == null ? void 0 : a[o]) == null ? void 0 : l.onKeyDown) == null || r.call(l, c), e === hc.key && (u == null || u()), e === yc.key && ($ == null || $(c));
|
|
62
|
-
}
|
|
63
54
|
function b(c, o) {
|
|
64
|
-
var e,
|
|
65
|
-
|
|
55
|
+
var e, a;
|
|
56
|
+
(a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onClick) == null || a.call(e, c), n !== o && j(o);
|
|
66
57
|
}
|
|
67
58
|
function A(c, o) {
|
|
68
|
-
var
|
|
69
|
-
|
|
59
|
+
var a, r;
|
|
60
|
+
const e = c.key;
|
|
61
|
+
(r = (a = t == null ? void 0 : t[o]) == null ? void 0 : a.onKeyDown) == null || r.call(a, c), e === hc.key && (u == null || u()), e === yc.key && ($ == null || $(c));
|
|
70
62
|
}
|
|
71
63
|
function L(c, o) {
|
|
72
|
-
var e,
|
|
73
|
-
(
|
|
64
|
+
var e, a;
|
|
65
|
+
c.stopPropagation(), (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onChange) == null || a.call(e, c), h == null || h(c);
|
|
66
|
+
}
|
|
67
|
+
function M(c, o) {
|
|
68
|
+
var e, a;
|
|
69
|
+
H((r) => (r[o] = !1, [...r])), (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onBlur) == null || a.call(e, c), N == null || N(c);
|
|
70
|
+
}
|
|
71
|
+
function U(c, o) {
|
|
72
|
+
var e, a;
|
|
73
|
+
(o === 0 || o === 1) && (H((r) => (r[o] = !0, [...r])), n !== o && j(o, !0)), (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onFocus) == null || a.call(e, c);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
`${
|
|
78
|
-
`${
|
|
75
|
+
const l = C == null ? void 0 : C("picker"), tc = _ || oc, lc = S[0] || S[1] || !!Z, W = V || (Q ? "error" : void 0), rc = G(
|
|
76
|
+
l,
|
|
77
|
+
`${l}-range`,
|
|
78
|
+
`${l}-size-${tc}`,
|
|
79
79
|
{
|
|
80
|
-
[`${
|
|
81
|
-
[`${
|
|
82
|
-
[`${
|
|
83
|
-
[`${
|
|
84
|
-
[`${
|
|
80
|
+
[`${l}-focused`]: lc,
|
|
81
|
+
[`${l}-disabled`]: F && D,
|
|
82
|
+
[`${l}-${W}`]: W,
|
|
83
|
+
[`${l}-rtl`]: ac,
|
|
84
|
+
[`${l}-has-prefix`]: y
|
|
85
85
|
},
|
|
86
|
-
|
|
87
|
-
),
|
|
88
|
-
const o = m[c] ? m[c].locale(
|
|
89
|
-
return
|
|
90
|
-
},
|
|
91
|
-
function
|
|
92
|
-
return
|
|
93
|
-
[`${
|
|
94
|
-
[`${
|
|
86
|
+
Y
|
|
87
|
+
), d = (c) => {
|
|
88
|
+
const o = m[c] ? m[c].locale(g == null ? void 0 : g.dayjsLocale).format(w(i) ? i[c] : i) : "";
|
|
89
|
+
return K && c === n ? K : o;
|
|
90
|
+
}, q = I ? {} : { readOnly: !0 };
|
|
91
|
+
function B(c) {
|
|
92
|
+
return G(`${l}-input`, {
|
|
93
|
+
[`${l}-input-active`]: n === c,
|
|
94
|
+
[`${l}-input-placeholder`]: P && n === c
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ E(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
|
-
style:
|
|
101
|
-
ref:
|
|
100
|
+
style: X,
|
|
101
|
+
ref: O,
|
|
102
102
|
className: rc,
|
|
103
|
-
...
|
|
103
|
+
...Nc(cc, ["onChange", "onPressEnter"]),
|
|
104
104
|
children: [
|
|
105
|
-
y && /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
y && /* @__PURE__ */ s("div", { className: `${l}-prefix`, children: y }),
|
|
106
|
+
/* @__PURE__ */ s("div", { className: B(0), children: /* @__PURE__ */ s(
|
|
107
107
|
"input",
|
|
108
108
|
{
|
|
109
|
-
ref:
|
|
110
|
-
...
|
|
111
|
-
disabled:
|
|
112
|
-
placeholder:
|
|
113
|
-
value:
|
|
114
|
-
onChange: (c) =>
|
|
115
|
-
onKeyDown: (c) =>
|
|
116
|
-
onClick: (c) =>
|
|
117
|
-
onBlur: (c) =>
|
|
118
|
-
onFocus: (c) =>
|
|
119
|
-
...
|
|
109
|
+
ref: k,
|
|
110
|
+
...t[0],
|
|
111
|
+
disabled: F,
|
|
112
|
+
placeholder: R[0],
|
|
113
|
+
value: d(0),
|
|
114
|
+
onChange: (c) => L(c, 0),
|
|
115
|
+
onKeyDown: (c) => A(c, 0),
|
|
116
|
+
onClick: (c) => b(c, 0),
|
|
117
|
+
onBlur: (c) => M(c, 0),
|
|
118
|
+
onFocus: (c) => U(c, 0),
|
|
119
|
+
...q
|
|
120
120
|
}
|
|
121
121
|
) }),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ s("span", { className: `${l}-separator`, children: x || "-" }),
|
|
123
|
+
/* @__PURE__ */ s("div", { className: B(1), children: /* @__PURE__ */ s(
|
|
124
124
|
"input",
|
|
125
125
|
{
|
|
126
|
-
ref:
|
|
127
|
-
...
|
|
128
|
-
disabled:
|
|
129
|
-
placeholder:
|
|
130
|
-
value:
|
|
131
|
-
onChange: (c) =>
|
|
132
|
-
onKeyDown: (c) =>
|
|
133
|
-
onClick: (c) =>
|
|
134
|
-
onBlur: (c) =>
|
|
135
|
-
onFocus: (c) =>
|
|
136
|
-
...
|
|
126
|
+
ref: v,
|
|
127
|
+
...t[1],
|
|
128
|
+
disabled: D,
|
|
129
|
+
placeholder: R[1],
|
|
130
|
+
value: d(1),
|
|
131
|
+
onChange: (c) => L(c, 1),
|
|
132
|
+
onKeyDown: (c) => A(c, 1),
|
|
133
|
+
onClick: (c) => b(c, 1),
|
|
134
|
+
onBlur: (c) => M(c, 1),
|
|
135
|
+
onFocus: (c) => U(c, 1),
|
|
136
|
+
...q
|
|
137
137
|
}
|
|
138
138
|
) }),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
139
|
+
/* @__PURE__ */ E("div", { className: `${l}-suffix`, children: [
|
|
140
|
+
J && m.length === 2 && /* @__PURE__ */ s(
|
|
141
141
|
$c,
|
|
142
142
|
{
|
|
143
|
-
prefix:
|
|
144
|
-
onClick:
|
|
145
|
-
className: `${
|
|
146
|
-
children: /* @__PURE__ */
|
|
143
|
+
prefix: l,
|
|
144
|
+
onClick: T,
|
|
145
|
+
className: `${l}-clear-icon`,
|
|
146
|
+
children: /* @__PURE__ */ s(nc, {})
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ s("span", { className: `${l}-suffix-icon`, children: p })
|
|
150
150
|
] })
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
|
-
const Kc =
|
|
155
|
+
const Kc = sc(Cc);
|
|
156
156
|
export {
|
|
157
157
|
Kc as default
|
|
158
158
|
};
|
package/popconfirm/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as h, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import J from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
3
|
-
import
|
|
3
|
+
import V from "lodash/isFunction";
|
|
4
4
|
import K from "lodash/isNil";
|
|
5
5
|
import { forwardRef as Q, useContext as X, useState as Y, useImperativeHandle as Z, useEffect as _ } from "react";
|
|
6
|
-
import
|
|
7
|
-
import { a as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
6
|
+
import k from "../button/index.js";
|
|
7
|
+
import { a as oo } from "../chunk/Cplu5dtQ.js";
|
|
8
|
+
import { u as eo } from "../chunk/BFTV6myl.js";
|
|
9
|
+
import { u as no } from "../chunk/CXPOj2uy.js";
|
|
10
|
+
import to from "../tooltip/index.js";
|
|
11
|
+
import io from "@unicom-cloud/utils/class-name";
|
|
12
|
+
const ro = {
|
|
13
13
|
position: "top",
|
|
14
14
|
okType: "primary",
|
|
15
15
|
icon: /* @__PURE__ */ t(J, {}),
|
|
@@ -18,25 +18,25 @@ const re = {
|
|
|
18
18
|
trigger: "click",
|
|
19
19
|
escToClose: !0
|
|
20
20
|
};
|
|
21
|
-
function
|
|
22
|
-
const { getPrefixCls:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
function so(y, C) {
|
|
22
|
+
const { getPrefixCls: a, locale: P, componentConfig: p, rtl: $ } = X(oo), o = eo(
|
|
23
|
+
y,
|
|
24
|
+
ro,
|
|
25
|
+
p == null ? void 0 : p.Popconfirm
|
|
26
26
|
), {
|
|
27
27
|
style: v,
|
|
28
28
|
className: E,
|
|
29
|
-
children:
|
|
29
|
+
children: m,
|
|
30
30
|
position: H,
|
|
31
31
|
getPopupContainer: B,
|
|
32
32
|
blurToHide: F,
|
|
33
33
|
unmountOnExit: O,
|
|
34
34
|
trigger: j,
|
|
35
35
|
escToClose: w,
|
|
36
|
-
onVisibleChange:
|
|
36
|
+
onVisibleChange: f,
|
|
37
37
|
triggerProps: r,
|
|
38
|
-
title:
|
|
39
|
-
icon:
|
|
38
|
+
title: u,
|
|
39
|
+
icon: g,
|
|
40
40
|
okText: z,
|
|
41
41
|
cancelText: I,
|
|
42
42
|
okType: L,
|
|
@@ -44,87 +44,87 @@ function se(k, h) {
|
|
|
44
44
|
cancelButtonProps: S,
|
|
45
45
|
content: s,
|
|
46
46
|
...R
|
|
47
|
-
} =
|
|
48
|
-
defaultValue:
|
|
49
|
-
value:
|
|
50
|
-
}), [
|
|
51
|
-
"popupVisible" in
|
|
52
|
-
},
|
|
53
|
-
|
|
47
|
+
} = o, [d, U] = no(!1, {
|
|
48
|
+
defaultValue: o.defaultPopupVisible,
|
|
49
|
+
value: o.popupVisible
|
|
50
|
+
}), [x, c] = Y(!1), e = a == null ? void 0 : a("popconfirm"), N = !K(s), T = (n) => {
|
|
51
|
+
"popupVisible" in o || U(n), r && r.onVisibleChange && r.onVisibleChange(n), f == null || f(n);
|
|
52
|
+
}, l = () => {
|
|
53
|
+
T(!1);
|
|
54
54
|
}, W = (n) => {
|
|
55
55
|
var i;
|
|
56
|
-
|
|
56
|
+
l(), (i = o.onCancel) == null || i.call(o, n);
|
|
57
57
|
}, q = (n) => {
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
i != null && i.then && (
|
|
58
|
+
var b;
|
|
59
|
+
const i = (b = o.onOk) == null ? void 0 : b.call(o, n);
|
|
60
|
+
i != null && i.then && (c(!0), i.then(
|
|
61
61
|
() => {
|
|
62
|
-
|
|
62
|
+
l();
|
|
63
63
|
},
|
|
64
64
|
(D) => {
|
|
65
|
-
|
|
65
|
+
c(!1), console.error(D);
|
|
66
66
|
}
|
|
67
|
-
)), i ||
|
|
67
|
+
)), i || l();
|
|
68
68
|
}, A = () => {
|
|
69
|
-
const n = /* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ t(
|
|
69
|
+
const n = /* @__PURE__ */ h(G, { children: [
|
|
70
|
+
/* @__PURE__ */ t(k, { onClick: W, size: "mini", ...S, children: I || P.Popconfirm.cancelText }),
|
|
71
71
|
/* @__PURE__ */ t(
|
|
72
|
-
|
|
72
|
+
k,
|
|
73
73
|
{
|
|
74
|
-
loading:
|
|
74
|
+
loading: x,
|
|
75
75
|
onClick: q,
|
|
76
76
|
size: "mini",
|
|
77
77
|
type: L,
|
|
78
78
|
...M,
|
|
79
|
-
children: z ||
|
|
79
|
+
children: z || P.Popconfirm.okText
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
] });
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
86
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
83
|
+
return /* @__PURE__ */ h("div", { className: `${e}-wrapper`, children: [
|
|
84
|
+
/* @__PURE__ */ h("div", { className: `${e}-title`, children: [
|
|
85
|
+
g && /* @__PURE__ */ t("span", { className: `${e}-title-icon`, children: g }),
|
|
86
|
+
/* @__PURE__ */ t("div", { className: `${e}-title-text`, children: V(u) ? u() : u })
|
|
87
87
|
] }),
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
88
|
+
N && /* @__PURE__ */ t("div", { className: `${e}-inner-content`, children: V(s) ? s() : s }),
|
|
89
|
+
/* @__PURE__ */ t("div", { className: `${e}-btn`, children: n })
|
|
90
90
|
] });
|
|
91
91
|
};
|
|
92
|
-
return Z(
|
|
93
|
-
close:
|
|
94
|
-
})), _(() => (!
|
|
95
|
-
|
|
96
|
-
}), [
|
|
97
|
-
|
|
92
|
+
return Z(C, () => ({
|
|
93
|
+
close: l
|
|
94
|
+
})), _(() => (!d && x && c(!1), () => {
|
|
95
|
+
c(!1);
|
|
96
|
+
}), [d]), /* @__PURE__ */ t(
|
|
97
|
+
to,
|
|
98
98
|
{
|
|
99
99
|
...R,
|
|
100
|
-
ref:
|
|
100
|
+
ref: C,
|
|
101
101
|
style: {
|
|
102
102
|
maxWidth: 350,
|
|
103
103
|
...v
|
|
104
104
|
},
|
|
105
|
-
className:
|
|
106
|
-
[`${
|
|
107
|
-
[`${
|
|
105
|
+
className: io(E, {
|
|
106
|
+
[`${e}-rtl`]: $,
|
|
107
|
+
[`${e}-has-content`]: N
|
|
108
108
|
}),
|
|
109
|
-
prefixCls:
|
|
109
|
+
prefixCls: e,
|
|
110
110
|
getPopupContainer: B,
|
|
111
111
|
position: H,
|
|
112
112
|
trigger: j,
|
|
113
113
|
escToClose: w,
|
|
114
|
-
popupVisible:
|
|
114
|
+
popupVisible: d,
|
|
115
115
|
content: A,
|
|
116
116
|
unmountOnExit: O,
|
|
117
117
|
blurToHide: F,
|
|
118
118
|
popupHoverStay: !0,
|
|
119
119
|
triggerProps: r,
|
|
120
|
-
onVisibleChange:
|
|
121
|
-
childrenPrefix:
|
|
122
|
-
children: typeof
|
|
120
|
+
onVisibleChange: T,
|
|
121
|
+
childrenPrefix: e,
|
|
122
|
+
children: typeof m == "string" ? /* @__PURE__ */ t("span", { children: m }) : m
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
|
|
126
|
+
const co = Q(so);
|
|
127
|
+
co.displayName = "Popconfirm";
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
co as default
|
|
130
130
|
};
|
package/popover/index.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { jsxs as j, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as j, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c from "lodash/isFunction";
|
|
3
3
|
import { forwardRef as O, useContext as R } from "react";
|
|
4
|
-
import { a as T } from "../chunk/
|
|
4
|
+
import { a as T } from "../chunk/Cplu5dtQ.js";
|
|
5
5
|
import { u as w } from "../chunk/BFTV6myl.js";
|
|
6
6
|
import F from "../tooltip/index.js";
|
|
7
7
|
import H from "@unicom-cloud/utils/class-name";
|
|
8
|
-
import { c } from "../chunk/ClM74To2.js";
|
|
8
|
+
import { c as u } from "../chunk/ClM74To2.js";
|
|
9
9
|
const M = {
|
|
10
10
|
position: "top",
|
|
11
11
|
trigger: "hover",
|
|
12
12
|
unmountOnExit: !0
|
|
13
13
|
};
|
|
14
|
-
function S(
|
|
15
|
-
const { getPrefixCls:
|
|
16
|
-
|
|
14
|
+
function S(d, f) {
|
|
15
|
+
const { getPrefixCls: t, componentConfig: n, rtl: g } = R(T), a = w(
|
|
16
|
+
d,
|
|
17
17
|
M,
|
|
18
|
-
|
|
18
|
+
n == null ? void 0 : n.Popover
|
|
19
19
|
), {
|
|
20
|
-
style:
|
|
21
|
-
className:
|
|
22
|
-
children:
|
|
23
|
-
position:
|
|
20
|
+
style: h,
|
|
21
|
+
className: v,
|
|
22
|
+
children: r,
|
|
23
|
+
position: C,
|
|
24
24
|
getPopupContainer: x,
|
|
25
|
-
trigger:
|
|
26
|
-
defaultPopupVisible:
|
|
25
|
+
trigger: N,
|
|
26
|
+
defaultPopupVisible: P,
|
|
27
27
|
popupVisible: b,
|
|
28
|
-
triggerProps:
|
|
28
|
+
triggerProps: i,
|
|
29
29
|
unmountOnExit: y,
|
|
30
30
|
onVisibleChange: V,
|
|
31
|
-
content:
|
|
32
|
-
title:
|
|
31
|
+
content: s,
|
|
32
|
+
title: p,
|
|
33
33
|
...$
|
|
34
|
-
} =
|
|
34
|
+
} = a, o = t == null ? void 0 : t("popover"), l = c(p) ? p() : p, m = c(s) ? s() : s, E = u(l, !0) && u(m, !0) ? null : /* @__PURE__ */ j(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
|
-
className: H(`${
|
|
38
|
-
[`${
|
|
37
|
+
className: H(`${o}-inner`, {
|
|
38
|
+
[`${o}-inner-rtl`]: g
|
|
39
39
|
}),
|
|
40
40
|
children: [
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */
|
|
41
|
+
l ? /* @__PURE__ */ e("div", { className: `${o}-title`, children: l }) : null,
|
|
42
|
+
/* @__PURE__ */ e("div", { className: `${o}-inner-content`, children: m })
|
|
43
43
|
]
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ e(
|
|
47
47
|
F,
|
|
48
48
|
{
|
|
49
49
|
...$,
|
|
50
|
-
ref:
|
|
50
|
+
ref: f,
|
|
51
51
|
style: {
|
|
52
52
|
maxWidth: 350,
|
|
53
|
-
...
|
|
53
|
+
...h
|
|
54
54
|
},
|
|
55
|
-
className:
|
|
56
|
-
prefixCls:
|
|
55
|
+
className: v,
|
|
56
|
+
prefixCls: o,
|
|
57
57
|
getPopupContainer: x,
|
|
58
|
-
position:
|
|
59
|
-
trigger:
|
|
58
|
+
position: C,
|
|
59
|
+
trigger: N,
|
|
60
60
|
content: E,
|
|
61
61
|
popupHoverStay: !0,
|
|
62
62
|
unmountOnExit: y,
|
|
63
|
-
triggerProps:
|
|
64
|
-
defaultPopupVisible:
|
|
65
|
-
onVisibleChange: V || (
|
|
66
|
-
childrenPrefix:
|
|
67
|
-
..."popupVisible" in
|
|
68
|
-
children: typeof
|
|
63
|
+
triggerProps: i,
|
|
64
|
+
defaultPopupVisible: P,
|
|
65
|
+
onVisibleChange: V || (i ? i.onVisibleChange : void 0),
|
|
66
|
+
childrenPrefix: o,
|
|
67
|
+
..."popupVisible" in a ? { popupVisible: b } : {},
|
|
68
|
+
children: typeof r == "string" ? /* @__PURE__ */ e("span", { children: r }) : r
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|