@unicom-cloud/ui 0.8.78 → 0.8.80
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 +3 -3
- package/Alert.js +3 -3
- package/AutoComplete.js +5 -5
- package/BackTop.js +5 -5
- package/Badge.js +3 -3
- package/Breadcrumb.js +4 -4
- package/Button.js +2 -2
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +3 -3
- package/Comment.js +2 -2
- package/ConfigProvider.js +1 -1
- package/Copy.js +4 -4
- package/DatePicker.js +1 -1
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Dropdown.js +5 -5
- package/Empty.js +2 -2
- package/Icon.js +9 -5
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/InputNumber.js +3 -3
- package/Layout.js +2 -2
- package/Link.js +3 -3
- package/List.js +4 -4
- package/Mentions.js +5 -5
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +9 -8
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +3 -3
- package/Pagination.js +1 -1
- package/Popconfirm.js +3 -3
- package/Popover.js +3 -3
- package/Progress.js +2 -2
- package/Radio.js +1 -1
- package/Rate.js +3 -3
- package/ResizeBox.js +3 -3
- package/Result.js +2 -2
- package/Select.js +1 -1
- package/SelectView.js +5 -6
- package/Skeleton.js +2 -2
- package/Slider.js +4 -4
- package/Space.js +2 -2
- package/SpeechSynthesis.js +18 -20
- package/Spin.js +3 -3
- package/Statistic.js +3 -3
- package/Steps.js +2 -2
- package/Switch.js +7 -8
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +3 -3
- package/Tooltip.js +3 -3
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +9 -10
- package/Typography.js +1 -1
- package/affix/index.js +17 -17
- package/alert/index.js +13 -13
- package/anchor/Anchor.js +40 -40
- package/anchor/Link.js +14 -14
- package/anchor/util.js +2 -2
- package/auto-complete/index.js +5 -5
- package/avatar/Avatar.js +17 -17
- package/avatar/Group.js +13 -13
- package/back-top/index.js +18 -18
- package/badge/Count.js +13 -13
- package/badge/index.js +21 -21
- package/breadcrumb/Item.js +25 -25
- package/breadcrumb/index.js +12 -12
- package/button/Group.js +6 -6
- package/button/index.js +30 -30
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +1 -1
- package/calendar/index.js +4 -4
- package/card/Grid.js +13 -13
- package/card/Meta.js +13 -13
- package/card/index.js +29 -29
- package/carousel/Arrow.js +6 -6
- package/carousel/Indicator.js +27 -27
- package/carousel/index.js +24 -24
- package/cascader/Cascader.js +8 -8
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +4 -4
- package/checkbox/Group.js +4 -4
- package/checkbox/GroupBlock.js +3 -3
- package/checkbox/index.js +2 -2
- package/chunk/{ZrBrCzQX.js → B4WG1mhs.js} +6 -7
- package/chunk/{CjqvxJml.js → BG7YGUsx.js} +32 -32
- package/chunk/BYdIoY50.js +17 -0
- package/chunk/{Cc_-i0o_.js → BZ3igxQN.js} +6 -7
- package/chunk/{uEGHykhe.js → BZ9g7J4R.js} +1 -1
- package/chunk/BsUZRQDT.js +23 -0
- package/chunk/{CBgu99gQ.js → C5X4hOkx.js} +130 -130
- package/chunk/{B0n0iRhF.js → CCKr5jj1.js} +1 -1
- package/chunk/{CNcLypMY.js → CQvM33Vg.js} +190 -189
- package/chunk/CXPOj2uy.js +19 -0
- package/chunk/{DAAff-FT.js → ClM74To2.js} +9 -10
- package/chunk/{RS6OAxzv.js → D-ap9qEk.js} +2 -2
- package/chunk/{Cwm8LL5p.js → D73Vr7fa.js} +7197 -7202
- package/chunk/{tpmioyz1.js → DEiyXzBZ.js} +28 -28
- package/chunk/{CplLA01W.js → DEuVgCzp.js} +45 -52
- package/chunk/{BPQXH_5i.js → DYspELhF.js} +43 -43
- package/chunk/DxYoPlum.js +50 -0
- package/chunk/{BpYX5PN4.js → NPajzdOv.js} +2 -2
- package/chunk/{BBkdXHrJ.js → rT6qmv-Y.js} +1 -1
- package/chunk/{BhBEMwvI.js → uKZyjtff.js} +20 -21
- package/chunk/{BC5fEyWK.js → yLRv5RIK.js} +61 -61
- package/chunk/{C_4I3haT.js → yhU2zeeu.js} +96 -96
- package/collapse/Collapse.js +4 -4
- package/collapse/Item.js +4 -4
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +22 -22
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +4 -4
- package/color-picker/index.js +3 -3
- package/comment/index.js +18 -18
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +2 -2
- package/copy/index.js +23 -23
- package/date-picker/Picker.js +41 -41
- package/date-picker/PickerRange.js +3 -3
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +28 -28
- package/divider/index.js +15 -15
- package/draggable/Item.js +11 -11
- package/draggable/index.js +15 -15
- package/drawer/Drawer.js +31 -31
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +22 -22
- package/empty/index.js +2 -2
- package/form/Control.js +46 -46
- package/form/Form.js +12 -12
- package/form/FormItem.js +12 -12
- package/form/FormLabel.js +11 -11
- package/form/context.js +7 -6
- package/form/promisify.js +9 -10
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +38 -38
- package/grid/Row.js +15 -15
- package/grid/grid-item.js +17 -17
- package/grid/grid.js +28 -28
- package/hooks/index.js +6 -6
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/useVerificationCode.js +30 -30
- package/icon/index.js +20 -16
- package/icon-hover/index.js +2 -2
- package/image/Image.js +22 -22
- package/image/ImageFooter.js +2 -2
- package/image/ImagePreview.js +11 -11
- package/image/ImagePreviewArrow.js +16 -16
- package/image/ImagePreviewGroup.js +2 -2
- package/image/ImagePreviewToolbar.js +7 -7
- package/image/TriggerForToolbar.js +7 -7
- package/image/index.js +1 -1
- package/index.js +539 -572
- package/input/Group.js +10 -10
- package/input/Input.js +213 -214
- package/input/InputElement.js +10 -11
- package/input/Password.js +4 -4
- package/input/Search.js +3 -3
- package/input/Textarea.js +7 -8
- package/input/useComposition.js +6 -6
- package/input-number/index.js +3 -3
- package/input-tag/InputTag.js +110 -111
- package/layout/Content.js +4 -4
- package/layout/Footer.js +6 -6
- package/layout/Header.js +8 -8
- package/layout/Sider.js +29 -29
- package/layout/index.js +16 -16
- package/link/index.js +27 -27
- package/list/Item.js +5 -5
- package/list/Meta.js +11 -11
- package/list/index.js +4 -4
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +5 -5
- package/menu/Item.js +11 -11
- package/menu/ItemGroup.js +8 -8
- package/menu/Menu.js +5 -5
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +3 -3
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +7 -7
- package/modal/index.js +1 -1
- package/notice/index.js +9 -8
- package/notification/index.js +3 -3
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +6 -6
- package/overflow-ellipsis/index.js +27 -27
- package/package.json +1 -1
- package/page-header/index.js +3 -3
- package/pagination/PageItem.js +7 -7
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +3 -3
- package/pagination/Pagination.js +4 -4
- package/pagination/index.js +1 -1
- package/picker/Input.js +7 -7
- package/picker/InputRange.js +77 -77
- package/popconfirm/index.js +11 -11
- package/popover/index.js +21 -21
- package/progress/CircleProgress.js +14 -14
- package/progress/LineProgess.js +14 -14
- package/progress/StepProgress.js +9 -9
- package/progress/index.js +26 -26
- package/radio/Group.js +4 -4
- package/radio/GroupBlock.js +3 -3
- package/radio/Radio.js +4 -4
- package/radio/index.js +2 -2
- package/rate/index.js +16 -16
- package/resize-box/ResizeTrigger.js +27 -28
- package/resize-box/Split.js +21 -21
- package/resize-box/SplitGroup.js +40 -40
- package/resize-box/index.js +23 -23
- package/result/index.js +29 -29
- package/select/Option.js +2 -2
- package/select/Select.js +11 -12
- package/select/index.js +2 -2
- package/select/util.js +5 -5
- package/select-view/Core.js +104 -106
- package/select-view/index.js +22 -23
- package/skeleton/Image.js +14 -14
- package/skeleton/Text.js +16 -16
- package/skeleton/index.js +11 -11
- package/slider/Button.js +4 -4
- package/slider/Dot.js +9 -9
- package/slider/Input.js +20 -20
- package/slider/Tick.js +14 -14
- package/slider/index.js +103 -103
- package/slider/util.js +3 -3
- package/space/index.js +14 -14
- package/speech-synthesis/index.js +26 -28
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +16 -16
- package/statistic/Countdown.js +17 -17
- package/statistic/index.js +40 -40
- package/steps/Step.js +8 -8
- package/steps/index.js +17 -17
- package/switch/index.js +32 -33
- package/table/Table.js +5 -5
- package/table/index.js +1 -1
- package/tabs/Tab.js +4 -4
- package/tabs/TabContent.js +3 -3
- package/tabs/TabPane.js +11 -11
- package/tabs/index.js +2 -2
- package/tabs/util.js +1 -1
- package/tag/index.js +16 -16
- package/time-picker/Picker.js +50 -50
- package/time-picker/TimeColumn.js +8 -8
- package/time-picker/TimePicker.js +32 -32
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +15 -15
- package/timeline/Timeline.js +24 -24
- package/tooltip/index.js +23 -23
- package/transfer/Item.js +4 -4
- package/transfer/List.js +4 -4
- package/transfer/index.js +4 -4
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +4 -4
- package/tree/index.js +1 -1
- package/tree-select/List.js +2 -2
- package/tree-select/Select.js +8 -9
- package/tree-select/index.js +2 -2
- package/trigger/getPopupStyle.js +18 -19
- package/trigger/index.js +32 -33
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/icon/index.d.ts +3 -1
- package/types/index.d.ts +1 -1
- package/types/menu/context.d.ts +1 -1
- package/typography/Base.js +33 -35
- package/typography/EditContent.js +16 -16
- package/typography/Ellipsis.js +25 -26
- package/typography/Operations.js +1 -1
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +8 -8
- package/upload/Upload.js +64 -65
- package/upload/Uploader.js +12 -12
- package/upload/request.js +13 -12
- package/upload/request_.js +5 -6
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/caseName.js +4 -3
- package/utils/className.js +4 -3
- package/utils/constant.js +3 -3
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +5 -4
- package/utils/fileToURL.js +4 -3
- package/utils/index.js +262 -299
- package/utils/is.js +78 -115
- package/utils/keyboardCode.js +4 -26
- package/utils/math.js +10 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/saveAs.js +4 -3
- package/utils/screenfull.js +4 -3
- package/utils/scrollIntoView.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/tree.js +7 -83
- package/utils/tween.js +1 -1
- package/utils/validate.js +1 -1
- package/verification-code/VerificationCode.js +25 -25
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +8 -8
- package/chunk/ATwvJ8j2.js +0 -6
- package/chunk/BFmckYou.js +0 -25
- package/chunk/Bl7BnD1R.js +0 -119
- package/chunk/Bmvhjhzq.js +0 -24
- package/chunk/BrOW642m.js +0 -130
- package/chunk/C0pRaDCf.js +0 -96
- package/chunk/CBzE-PUr.js +0 -23
- package/chunk/CUFsOxJ2.js +0 -10
- package/chunk/Ce1j9KTi.js +0 -6
- package/chunk/D0Dlbc2g.js +0 -41
- package/chunk/DRTWRsgI.js +0 -34
- package/chunk/DeV0v__J.js +0 -20
- package/chunk/DohlrJ4S.js +0 -50
- package/chunk/XTEsYGuF.js +0 -17
- package/chunk/yl4BU7Sd.js +0 -1068
package/modal/index.js
CHANGED
package/notice/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
+
import "@unicom-cloud/icons/context";
|
|
2
3
|
import "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
4
|
import "@unicom-cloud/icons/IconUiClose";
|
|
4
5
|
import "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
5
6
|
import "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
7
|
import "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
7
8
|
import "@unicom-cloud/icons/IconUiLoading";
|
|
8
|
-
import "@unicom-cloud/icons/context";
|
|
9
9
|
import "react";
|
|
10
|
-
import { e as
|
|
10
|
+
import { e as w } from "../chunk/CQvM33Vg.js";
|
|
11
11
|
import "lodash/isEqualWith";
|
|
12
|
-
import "../chunk/
|
|
12
|
+
import "../chunk/ClM74To2.js";
|
|
13
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
13
14
|
import "lodash/isNumber";
|
|
14
15
|
import "lodash/merge";
|
|
15
16
|
import "../utils/dom.js";
|
|
16
|
-
import "../chunk/
|
|
17
|
+
import "../chunk/B4WG1mhs.js";
|
|
17
18
|
import "../chunk/BFTV6myl.js";
|
|
18
|
-
import "../chunk/
|
|
19
|
-
import "
|
|
19
|
+
import "../chunk/BZ3igxQN.js";
|
|
20
|
+
import "@unicom-cloud/utils/constant";
|
|
20
21
|
import "lodash/debounce";
|
|
21
|
-
import "
|
|
22
|
+
import "@unicom-cloud/utils/class-name";
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
w as default
|
|
24
25
|
};
|
package/notification/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import "lodash/isUndefined";
|
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "react-dom/client";
|
|
8
|
-
import { N as g, g as u, n as N, c as d } from "../chunk/
|
|
9
|
-
import "../chunk/
|
|
10
|
-
import "
|
|
8
|
+
import { N as g, g as u, n as N, c as d } from "../chunk/CQvM33Vg.js";
|
|
9
|
+
import "../chunk/NPajzdOv.js";
|
|
10
|
+
import "@unicom-cloud/utils/class-name";
|
|
11
11
|
import "./withNotification.js";
|
|
12
12
|
export {
|
|
13
13
|
g as default,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import u from "lodash/isFunction";
|
|
3
|
-
import { useContext as a, useRef as
|
|
4
|
-
import { a as
|
|
5
|
-
import
|
|
3
|
+
import { useContext as a, useRef as l, useEffect as i } from "react";
|
|
4
|
+
import { a as d } from "../chunk/CQvM33Vg.js";
|
|
5
|
+
import x from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import { r as h } from "../chunk/CIRG541s.js";
|
|
7
|
-
function
|
|
8
|
-
const { getPrefixCls: f } = a(
|
|
7
|
+
function w(e) {
|
|
8
|
+
const { getPrefixCls: f } = a(d), n = f("overflow-item"), r = l();
|
|
9
9
|
i(() => {
|
|
10
10
|
if (!u(e.onResize)) return;
|
|
11
11
|
const m = h([r.current], (t) => {
|
|
@@ -31,5 +31,5 @@ function E(e) {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
w as default
|
|
35
35
|
};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { a as z } from "../chunk/
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as $, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as j, useState as i, useLayoutEffect as k, useRef as b, useEffect as E } from "react";
|
|
3
|
+
import { a as z } from "../chunk/CQvM33Vg.js";
|
|
4
|
+
import I from "@unicom-cloud/utils/class-name";
|
|
5
5
|
import { r as M } from "../chunk/CIRG541s.js";
|
|
6
6
|
import v from "./OverflowItem.js";
|
|
7
7
|
function q(u) {
|
|
8
|
-
const { getPrefixCls: O } =
|
|
9
|
-
|
|
8
|
+
const { getPrefixCls: O } = j(z), f = O("overflow"), { items: a, suffixItems: g } = u, y = u.ellipsisNode || (({ ellipsisCount: e }) => `+${e}`), [d, N] = i(), [m, W] = i(), [l, h] = i({}), [x, w] = i({}), p = a.length - m, _ = p > 0 ? y({ ellipsisCount: p }) : null;
|
|
9
|
+
k(() => {
|
|
10
10
|
const e = Object.values(l).length;
|
|
11
|
-
let
|
|
11
|
+
let r = Object.values(x).reduce((t, o) => t + ((o == null ? void 0 : o.width) || 0), 0), s = e;
|
|
12
12
|
Object.keys(l).some((t, o) => {
|
|
13
13
|
const n = l[t];
|
|
14
|
-
if (n &&
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
}),
|
|
14
|
+
if (n && r + n.width > d)
|
|
15
|
+
return s = o, !0;
|
|
16
|
+
r += (n == null ? void 0 : n.width) || 0;
|
|
17
|
+
}), W(Math.max(s, 0));
|
|
18
18
|
}, [l, d, x]);
|
|
19
19
|
const c = b();
|
|
20
20
|
return E(() => {
|
|
21
|
-
const e = M([c.current], (
|
|
22
|
-
var
|
|
23
|
-
|
|
21
|
+
const e = M([c.current], (r) => {
|
|
22
|
+
var s, t;
|
|
23
|
+
N(((t = (s = r == null ? void 0 : r[0]) == null ? void 0 : s.target) == null ? void 0 : t.clientWidth) || 0);
|
|
24
24
|
});
|
|
25
25
|
return () => {
|
|
26
26
|
e();
|
|
27
27
|
};
|
|
28
|
-
}, [c.current]), /* @__PURE__ */
|
|
29
|
-
a.map((e,
|
|
30
|
-
const
|
|
28
|
+
}, [c.current]), /* @__PURE__ */ $("div", { ref: c, className: I(f, u.className), children: [
|
|
29
|
+
a.map((e, r) => {
|
|
30
|
+
const s = `${(e == null ? void 0 : e.key) || r}_overflow_item_${r}`;
|
|
31
31
|
return /* @__PURE__ */ C(
|
|
32
32
|
v,
|
|
33
33
|
{
|
|
34
34
|
onResize: (t) => {
|
|
35
|
-
|
|
35
|
+
h((o) => (o[s] = { node: t, width: t.clientWidth }, o));
|
|
36
36
|
},
|
|
37
37
|
unregister: () => {
|
|
38
|
-
|
|
38
|
+
h((t) => (delete t[s], t));
|
|
39
39
|
},
|
|
40
|
-
hidden:
|
|
40
|
+
hidden: m < r + 1,
|
|
41
41
|
children: e
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
s
|
|
44
44
|
);
|
|
45
45
|
}),
|
|
46
|
-
[
|
|
46
|
+
[_, ...g].map((e, r) => {
|
|
47
47
|
if (!e)
|
|
48
48
|
return null;
|
|
49
|
-
const
|
|
49
|
+
const s = `${(e == null ? void 0 : e.key) || r}_overflow_suffix_item`;
|
|
50
50
|
return /* @__PURE__ */ C(
|
|
51
51
|
v,
|
|
52
52
|
{
|
|
53
53
|
className: `${f}-suffix-item`,
|
|
54
54
|
onResize: (t) => {
|
|
55
|
-
|
|
55
|
+
w((o) => ({
|
|
56
56
|
...o,
|
|
57
|
-
[`${
|
|
57
|
+
[`${s}`]: { node: t, width: t.clientWidth }
|
|
58
58
|
}));
|
|
59
59
|
},
|
|
60
60
|
unregister: () => {
|
|
61
|
-
|
|
61
|
+
w((t) => (delete t[s], {
|
|
62
62
|
...t
|
|
63
63
|
}));
|
|
64
64
|
},
|
|
65
65
|
children: e
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
s
|
|
68
68
|
);
|
|
69
69
|
})
|
|
70
70
|
] });
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.80","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/page-header/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import B from "@unicom-cloud/icons/IconUiLeft";
|
|
|
3
3
|
import _ from "@unicom-cloud/icons/IconUiRight";
|
|
4
4
|
import T, { useContext as W, useState as j, useRef as z, useImperativeHandle as K, useEffect as U } from "react";
|
|
5
5
|
import D from "../breadcrumb/index.js";
|
|
6
|
-
import { a as F, I as L } from "../chunk/
|
|
7
|
-
import { u as M } from "../chunk/
|
|
6
|
+
import { a as F, I as L } from "../chunk/CQvM33Vg.js";
|
|
7
|
+
import { u as M } from "../chunk/BYdIoY50.js";
|
|
8
8
|
import { u as O } from "../chunk/BFTV6myl.js";
|
|
9
|
-
import
|
|
9
|
+
import p from "@unicom-cloud/utils/class-name";
|
|
10
10
|
import { o as S } from "../chunk/BKKEev13.js";
|
|
11
11
|
import { r as q } from "../chunk/CIRG541s.js";
|
|
12
12
|
function $(b, g) {
|
package/pagination/PageItem.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx as I } from "react/jsx-runtime";
|
|
|
2
2
|
import S from "@unicom-cloud/icons/IconUiLeft";
|
|
3
3
|
import j from "@unicom-cloud/icons/IconUiMore";
|
|
4
4
|
import K from "@unicom-cloud/icons/IconUiRight";
|
|
5
|
-
import U, { useContext as
|
|
6
|
-
import { a as
|
|
7
|
-
import { u as R } from "../chunk/
|
|
8
|
-
import
|
|
5
|
+
import U, { useContext as N } from "react";
|
|
6
|
+
import { a as E } from "../chunk/CQvM33Vg.js";
|
|
7
|
+
import { u as R } from "../chunk/BYdIoY50.js";
|
|
8
|
+
import k from "@unicom-cloud/utils/class-name";
|
|
9
9
|
var _ = /* @__PURE__ */ ((t) => (t[t.previous = 0] = "previous", t[t.next = 1] = "next", t))(_ || {});
|
|
10
10
|
function L(t) {
|
|
11
11
|
var m, n, s;
|
|
12
|
-
const { locale: e } = E
|
|
12
|
+
const { locale: e } = N(E), v = R(), {
|
|
13
13
|
pageNum: i,
|
|
14
14
|
current: b,
|
|
15
15
|
rootPrefixCls: a,
|
|
@@ -51,7 +51,7 @@ function $(t, e) {
|
|
|
51
51
|
}
|
|
52
52
|
const G = (t) => {
|
|
53
53
|
var s, r, u, g, c, y;
|
|
54
|
-
const { locale: e } = E
|
|
54
|
+
const { locale: e } = N(E), {
|
|
55
55
|
rootPrefixCls: v,
|
|
56
56
|
current: i,
|
|
57
57
|
allPages: b,
|
|
@@ -75,7 +75,7 @@ const G = (t) => {
|
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
77
|
}, H = (t) => {
|
|
78
|
-
const { locale: e, rtl: v } = E
|
|
78
|
+
const { locale: e, rtl: v } = N(E), i = R(), {
|
|
79
79
|
rootPrefixCls: b,
|
|
80
80
|
current: a,
|
|
81
81
|
allPages: d,
|
package/pagination/PageJumper.js
CHANGED
|
@@ -3,7 +3,7 @@ import I from "lodash/isFunction";
|
|
|
3
3
|
import J from "lodash/isPlainObject";
|
|
4
4
|
import N from "lodash/isUndefined";
|
|
5
5
|
import { useContext as E, useState as R, useRef as T, useEffect as w } from "react";
|
|
6
|
-
import { a as z } from "../chunk/
|
|
6
|
+
import { a as z } from "../chunk/CQvM33Vg.js";
|
|
7
7
|
import B from "../input/Input.js";
|
|
8
8
|
function A(n) {
|
|
9
9
|
var d, g;
|
package/pagination/PageOption.js
CHANGED
package/pagination/Pagination.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../chunk/
|
|
3
|
+
import "../chunk/CQvM33Vg.js";
|
|
4
4
|
import "../chunk/BFTV6myl.js";
|
|
5
|
-
import "../chunk/
|
|
6
|
-
import "
|
|
5
|
+
import "../chunk/CXPOj2uy.js";
|
|
6
|
+
import "@unicom-cloud/utils/class-name";
|
|
7
7
|
import "../chunk/ClqoGc3r.js";
|
|
8
8
|
import "./PageItem.js";
|
|
9
9
|
import "./PageJumper.js";
|
|
10
|
-
import { P as s } from "../chunk/
|
|
10
|
+
import { P as s } from "../chunk/D73Vr7fa.js";
|
|
11
11
|
export {
|
|
12
12
|
s as default
|
|
13
13
|
};
|
package/pagination/index.js
CHANGED
package/picker/Input.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsxs as C, jsx as f } from "react/jsx-runtime";
|
|
|
2
2
|
import X from "@unicom-cloud/icons/IconUiClose";
|
|
3
3
|
import Y from "lodash/isArray";
|
|
4
4
|
import { forwardRef as Z, useContext as _, useRef as I, useState as E, useImperativeHandle as P } from "react";
|
|
5
|
-
import { a as p, I as ee } from "../chunk/
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { a as p, I as ee } from "../chunk/CQvM33Vg.js";
|
|
6
|
+
import k from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import { Enter as ce } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
8
8
|
import { o as le } from "../chunk/BKKEev13.js";
|
|
9
9
|
function ae({
|
|
10
10
|
style: v,
|
|
@@ -48,8 +48,8 @@ function ae({
|
|
|
48
48
|
getRootDOMNode: () => y.current
|
|
49
49
|
}));
|
|
50
50
|
function G(c) {
|
|
51
|
-
var
|
|
52
|
-
(
|
|
51
|
+
var h;
|
|
52
|
+
(h = e == null ? void 0 : e.onKeyDown) == null || h.call(e, c), c.key === ce.key && (d == null || d());
|
|
53
53
|
}
|
|
54
54
|
function J(c) {
|
|
55
55
|
var a;
|
|
@@ -57,14 +57,14 @@ function ae({
|
|
|
57
57
|
}
|
|
58
58
|
let s = "";
|
|
59
59
|
$ !== void 0 ? s = $ : o && !Y(o) && (s = typeof m == "function" ? m(o) : o.locale(M.dayjsLocale).format(m));
|
|
60
|
-
const Q = S ? {} : { readOnly: !0 }, l = g || A("picker"),
|
|
60
|
+
const Q = S ? {} : { readOnly: !0 }, l = g || A("picker"), N = D || (F ? "error" : void 0), T = W || u, V = k(
|
|
61
61
|
l,
|
|
62
62
|
`${l}-size-${q}`,
|
|
63
63
|
{
|
|
64
64
|
[`${l}-focused`]: T,
|
|
65
65
|
[`${l}-disabled`]: i,
|
|
66
66
|
[`${l}-has-prefix`]: t,
|
|
67
|
-
[`${l}-${
|
|
67
|
+
[`${l}-${N}`]: N,
|
|
68
68
|
[`${l}-rtl`]: U
|
|
69
69
|
},
|
|
70
70
|
z
|
package/picker/InputRange.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as q, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as q, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import sc from "@unicom-cloud/icons/IconUiClose";
|
|
3
3
|
import F from "lodash/isArray";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { a as uc, I as $c } from "../chunk/
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
4
|
+
import { forwardRef as fc, useContext as nc, useRef as D, useState as mc, useImperativeHandle as ic } from "react";
|
|
5
|
+
import { a as uc, I as $c } from "../chunk/CQvM33Vg.js";
|
|
6
|
+
import B from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import { Enter as hc, Tab as yc } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
8
8
|
import { o as Cc } from "../chunk/BKKEev13.js";
|
|
9
|
-
function
|
|
10
|
-
allowClear:
|
|
11
|
-
error:
|
|
12
|
-
status:
|
|
13
|
-
style:
|
|
14
|
-
className:
|
|
15
|
-
disabled:
|
|
9
|
+
function Nc({
|
|
10
|
+
allowClear: E,
|
|
11
|
+
error: G,
|
|
12
|
+
status: J,
|
|
13
|
+
style: Q,
|
|
14
|
+
className: V,
|
|
15
|
+
disabled: n,
|
|
16
16
|
placeholder: w = [],
|
|
17
|
-
value:
|
|
18
|
-
popupVisible:
|
|
19
|
-
format:
|
|
20
|
-
size:
|
|
21
|
-
onClear:
|
|
22
|
-
editable:
|
|
17
|
+
value: m = [],
|
|
18
|
+
popupVisible: X,
|
|
19
|
+
format: i,
|
|
20
|
+
size: Y,
|
|
21
|
+
onClear: Z,
|
|
22
|
+
editable: _,
|
|
23
23
|
inputValue: z,
|
|
24
24
|
onPressEnter: u,
|
|
25
25
|
onPressTab: $,
|
|
@@ -27,10 +27,10 @@ function gc({
|
|
|
27
27
|
separator: T,
|
|
28
28
|
suffixIcon: I,
|
|
29
29
|
changeFocusedInputIndex: R,
|
|
30
|
-
focusedInputIndex:
|
|
30
|
+
focusedInputIndex: s,
|
|
31
31
|
isPlaceholder: x,
|
|
32
32
|
prefix: y,
|
|
33
|
-
inputProps:
|
|
33
|
+
inputProps: a = [],
|
|
34
34
|
onBlur: C,
|
|
35
35
|
...p
|
|
36
36
|
}, P) {
|
|
@@ -39,120 +39,120 @@ function gc({
|
|
|
39
39
|
size: ec,
|
|
40
40
|
locale: oc,
|
|
41
41
|
rtl: lc
|
|
42
|
-
} =
|
|
43
|
-
|
|
42
|
+
} = nc(uc), N = D(null), g = D(null), K = D(null), [j, O] = mc([!1, !1]), k = F(n) ? n[0] : n, v = F(n) ? n[1] : n;
|
|
43
|
+
ic(P, () => ({
|
|
44
44
|
focus(c) {
|
|
45
45
|
var l, r;
|
|
46
|
-
(
|
|
46
|
+
(s === 0 && !k || s === 1 && !v) && ((r = (l = ((typeof c == "number" ? c : s) === 0 ? N : g).current) == null ? void 0 : l.focus) == null || r.call(l));
|
|
47
47
|
},
|
|
48
48
|
blur() {
|
|
49
49
|
var c, o, e, l;
|
|
50
|
-
|
|
50
|
+
s === 0 && ((o = (c = N.current) == null ? void 0 : c.blur) == null || o.call(c)), s === 1 && ((l = (e = g.current) == null ? void 0 : e.blur) == null || l.call(e));
|
|
51
51
|
},
|
|
52
52
|
getRootDOMNode: () => K.current
|
|
53
53
|
}));
|
|
54
54
|
function S(c, o) {
|
|
55
55
|
var e, l;
|
|
56
|
-
(l = (e =
|
|
56
|
+
(l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onClick) == null || l.call(e, c), s !== o && R(o);
|
|
57
57
|
}
|
|
58
58
|
function H(c, o) {
|
|
59
59
|
var l, r;
|
|
60
60
|
const e = c.key;
|
|
61
|
-
(r = (l =
|
|
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
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function b(c, o) {
|
|
64
64
|
var e, l;
|
|
65
|
-
c.stopPropagation(), (l = (e =
|
|
65
|
+
c.stopPropagation(), (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onChange) == null || l.call(e, c), h == null || h(c);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function A(c, o) {
|
|
68
68
|
var e, l;
|
|
69
|
-
O((r) => (r[o] = !1, [...r])), (l = (e =
|
|
69
|
+
O((r) => (r[o] = !1, [...r])), (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onBlur) == null || l.call(e, c), C == null || C(c);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function L(c, o) {
|
|
72
72
|
var e, l;
|
|
73
|
-
(o === 0 || o === 1) && (O((r) => (r[o] = !0, [...r])),
|
|
73
|
+
(o === 0 || o === 1) && (O((r) => (r[o] = !0, [...r])), s !== o && R(o, !0)), (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onFocus) == null || l.call(e, c);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
`${
|
|
78
|
-
`${
|
|
75
|
+
const t = cc("picker"), ac = Y || ec, tc = j[0] || j[1] || !!X, M = J || (G ? "error" : void 0), rc = B(
|
|
76
|
+
t,
|
|
77
|
+
`${t}-range`,
|
|
78
|
+
`${t}-size-${ac}`,
|
|
79
79
|
{
|
|
80
|
-
[`${
|
|
81
|
-
[`${
|
|
82
|
-
[`${
|
|
83
|
-
[`${
|
|
84
|
-
[`${
|
|
80
|
+
[`${t}-focused`]: tc,
|
|
81
|
+
[`${t}-disabled`]: k && v,
|
|
82
|
+
[`${t}-${M}`]: M,
|
|
83
|
+
[`${t}-rtl`]: lc,
|
|
84
|
+
[`${t}-has-prefix`]: y
|
|
85
85
|
},
|
|
86
|
-
|
|
87
|
-
),
|
|
88
|
-
const o =
|
|
89
|
-
return z && c ===
|
|
90
|
-
},
|
|
86
|
+
V
|
|
87
|
+
), U = (c) => {
|
|
88
|
+
const o = m[c] ? m[c].locale(oc.dayjsLocale).format(F(i) ? i[c] : i) : "";
|
|
89
|
+
return z && c === s ? z : o;
|
|
90
|
+
}, W = _ ? {} : { readOnly: !0 };
|
|
91
91
|
function d(c) {
|
|
92
|
-
return B(`${
|
|
93
|
-
[`${
|
|
94
|
-
[`${
|
|
92
|
+
return B(`${t}-input`, {
|
|
93
|
+
[`${t}-input-active`]: s === c,
|
|
94
|
+
[`${t}-input-placeholder`]: x && s === c
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
return /* @__PURE__ */ q(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
|
-
style:
|
|
100
|
+
style: Q,
|
|
101
101
|
ref: K,
|
|
102
102
|
className: rc,
|
|
103
103
|
...Cc(p, ["onChange", "onPressEnter"]),
|
|
104
104
|
children: [
|
|
105
|
-
y && /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
y && /* @__PURE__ */ f("div", { className: `${t}-prefix`, children: y }),
|
|
106
|
+
/* @__PURE__ */ f("div", { className: d(0), children: /* @__PURE__ */ f(
|
|
107
107
|
"input",
|
|
108
108
|
{
|
|
109
|
-
ref:
|
|
110
|
-
...
|
|
109
|
+
ref: N,
|
|
110
|
+
...a[0],
|
|
111
111
|
disabled: k,
|
|
112
112
|
placeholder: w[0],
|
|
113
|
-
value:
|
|
114
|
-
onChange: (c) =>
|
|
113
|
+
value: U(0),
|
|
114
|
+
onChange: (c) => b(c, 0),
|
|
115
115
|
onKeyDown: (c) => H(c, 0),
|
|
116
116
|
onClick: (c) => S(c, 0),
|
|
117
|
-
onBlur: (c) =>
|
|
118
|
-
onFocus: (c) =>
|
|
119
|
-
...
|
|
117
|
+
onBlur: (c) => A(c, 0),
|
|
118
|
+
onFocus: (c) => L(c, 0),
|
|
119
|
+
...W
|
|
120
120
|
}
|
|
121
121
|
) }),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ f("span", { className: `${t}-separator`, children: T || "-" }),
|
|
123
|
+
/* @__PURE__ */ f("div", { className: d(1), children: /* @__PURE__ */ f(
|
|
124
124
|
"input",
|
|
125
125
|
{
|
|
126
|
-
ref:
|
|
127
|
-
...
|
|
126
|
+
ref: g,
|
|
127
|
+
...a[1],
|
|
128
128
|
disabled: v,
|
|
129
129
|
placeholder: w[1],
|
|
130
|
-
value:
|
|
131
|
-
onChange: (c) =>
|
|
130
|
+
value: U(1),
|
|
131
|
+
onChange: (c) => b(c, 1),
|
|
132
132
|
onKeyDown: (c) => H(c, 1),
|
|
133
133
|
onClick: (c) => S(c, 1),
|
|
134
|
-
onBlur: (c) =>
|
|
135
|
-
onFocus: (c) =>
|
|
136
|
-
...
|
|
134
|
+
onBlur: (c) => A(c, 1),
|
|
135
|
+
onFocus: (c) => L(c, 1),
|
|
136
|
+
...W
|
|
137
137
|
}
|
|
138
138
|
) }),
|
|
139
|
-
/* @__PURE__ */ q("div", { className: `${
|
|
140
|
-
|
|
139
|
+
/* @__PURE__ */ q("div", { className: `${t}-suffix`, children: [
|
|
140
|
+
E && m.length === 2 && /* @__PURE__ */ f(
|
|
141
141
|
$c,
|
|
142
142
|
{
|
|
143
|
-
prefix:
|
|
144
|
-
onClick:
|
|
145
|
-
className: `${
|
|
146
|
-
children: /* @__PURE__ */
|
|
143
|
+
prefix: t,
|
|
144
|
+
onClick: Z,
|
|
145
|
+
className: `${t}-clear-icon`,
|
|
146
|
+
children: /* @__PURE__ */ f(sc, {})
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ f("span", { className: `${t}-suffix-icon`, children: I })
|
|
150
150
|
] })
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
|
-
const Kc =
|
|
155
|
+
const Kc = fc(Nc);
|
|
156
156
|
export {
|
|
157
157
|
Kc as default
|
|
158
158
|
};
|
package/popconfirm/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as t, jsxs as d, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import J from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
3
|
-
import
|
|
3
|
+
import b 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
6
|
import V from "../button/index.js";
|
|
7
|
-
import { a as ee } from "../chunk/
|
|
7
|
+
import { a as ee } from "../chunk/CQvM33Vg.js";
|
|
8
8
|
import { u as oe } from "../chunk/BFTV6myl.js";
|
|
9
|
-
import { u as ne } from "../chunk/
|
|
9
|
+
import { u as ne } from "../chunk/CXPOj2uy.js";
|
|
10
10
|
import te from "../tooltip/index.js";
|
|
11
|
-
import
|
|
11
|
+
import ie from "@unicom-cloud/utils/class-name";
|
|
12
12
|
const re = {
|
|
13
13
|
position: "top",
|
|
14
14
|
okType: "primary",
|
|
@@ -47,16 +47,16 @@ function se(k, h) {
|
|
|
47
47
|
} = e, [u, U] = ne(!1, {
|
|
48
48
|
defaultValue: e.defaultPopupVisible,
|
|
49
49
|
value: e.popupVisible
|
|
50
|
-
}), [g, l] = Y(!1), o = y("popconfirm"), x = !K(s),
|
|
50
|
+
}), [g, l] = Y(!1), o = y("popconfirm"), x = !K(s), N = (n) => {
|
|
51
51
|
"popupVisible" in e || U(n), r && r.onVisibleChange && r.onVisibleChange(n), m == null || m(n);
|
|
52
52
|
}, c = () => {
|
|
53
|
-
|
|
53
|
+
N(!1);
|
|
54
54
|
}, W = (n) => {
|
|
55
55
|
var i;
|
|
56
56
|
c(), (i = e.onCancel) == null || i.call(e, n);
|
|
57
57
|
}, q = (n) => {
|
|
58
|
-
var
|
|
59
|
-
let i = (
|
|
58
|
+
var T;
|
|
59
|
+
let i = (T = e.onOk) == null ? void 0 : T.call(e, n);
|
|
60
60
|
i != null && i.then && (l(!0), i.then(
|
|
61
61
|
() => {
|
|
62
62
|
c();
|
|
@@ -83,9 +83,9 @@ function se(k, h) {
|
|
|
83
83
|
return /* @__PURE__ */ d("div", { className: `${o}-wrapper`, children: [
|
|
84
84
|
/* @__PURE__ */ d("div", { className: `${o}-title`, children: [
|
|
85
85
|
P && /* @__PURE__ */ t("span", { className: `${o}-title-icon`, children: P }),
|
|
86
|
-
/* @__PURE__ */ t("div", { className: `${o}-title-text`, children:
|
|
86
|
+
/* @__PURE__ */ t("div", { className: `${o}-title-text`, children: b(f) ? f() : f })
|
|
87
87
|
] }),
|
|
88
|
-
x && /* @__PURE__ */ t("div", { className: `${o}-inner-content`, children:
|
|
88
|
+
x && /* @__PURE__ */ t("div", { className: `${o}-inner-content`, children: b(s) ? s() : s }),
|
|
89
89
|
/* @__PURE__ */ t("div", { className: `${o}-btn`, children: n })
|
|
90
90
|
] });
|
|
91
91
|
};
|
|
@@ -117,7 +117,7 @@ function se(k, h) {
|
|
|
117
117
|
blurToHide: F,
|
|
118
118
|
popupHoverStay: !0,
|
|
119
119
|
triggerProps: r,
|
|
120
|
-
onVisibleChange:
|
|
120
|
+
onVisibleChange: N,
|
|
121
121
|
childrenPrefix: o,
|
|
122
122
|
children: typeof p == "string" ? /* @__PURE__ */ t("span", { children: p }) : p
|
|
123
123
|
}
|