@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/grid/Row.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as S, useContext as z, useState as G, useRef as H, useEffect as V } from "react";
|
|
3
|
-
import { a as B } from "../chunk/
|
|
3
|
+
import { a as B } from "../chunk/CQvM33Vg.js";
|
|
4
4
|
import { u as E } from "../chunk/BFTV6myl.js";
|
|
5
|
-
import
|
|
5
|
+
import L from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import { o as M } from "../chunk/BKKEev13.js";
|
|
7
7
|
import { responsiveObserve as x, responsiveArray as d } from "../utils/responsiveObserve.js";
|
|
8
8
|
import { RowContext as O } from "./context.js";
|
|
@@ -16,7 +16,7 @@ function q(b, A) {
|
|
|
16
16
|
b,
|
|
17
17
|
T,
|
|
18
18
|
i == null ? void 0 : i["Grid.Row"]
|
|
19
|
-
), { className: w, style:
|
|
19
|
+
), { className: w, style: $, children: C, div: a, align: u, justify: m, gutter: r, ...N } = R, [h, P] = G({
|
|
20
20
|
xs: !0,
|
|
21
21
|
sm: !0,
|
|
22
22
|
md: !0,
|
|
@@ -34,9 +34,9 @@ function q(b, A) {
|
|
|
34
34
|
let e = 0;
|
|
35
35
|
if (typeof t == "object")
|
|
36
36
|
for (let f = 0; f < d.length; f++) {
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
e = t[
|
|
37
|
+
const l = d[f];
|
|
38
|
+
if (h[l] && t[l] !== void 0) {
|
|
39
|
+
e = t[l];
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -46,34 +46,34 @@ function q(b, A) {
|
|
|
46
46
|
}
|
|
47
47
|
const s = j("row"), k = L(
|
|
48
48
|
{
|
|
49
|
-
[`${s}`]: !
|
|
50
|
-
[`${s}-align-${
|
|
49
|
+
[`${s}`]: !a,
|
|
50
|
+
[`${s}-align-${u}`]: u,
|
|
51
51
|
[`${s}-justify-${m}`]: m,
|
|
52
52
|
[`${s}-rtl`]: v
|
|
53
53
|
},
|
|
54
54
|
w
|
|
55
|
-
), o = {},
|
|
55
|
+
), o = {}, n = y(
|
|
56
56
|
Array.isArray(r) ? r[0] : r
|
|
57
57
|
), c = y(Array.isArray(r) ? r[1] : 0);
|
|
58
|
-
if ((
|
|
59
|
-
const t = -
|
|
58
|
+
if ((n || c) && !a) {
|
|
59
|
+
const t = -n / 2, e = -c / 2;
|
|
60
60
|
t && (o.marginLeft = t, o.marginRight = t), e && (o.marginTop = e, o.marginBottom = e);
|
|
61
61
|
}
|
|
62
62
|
return /* @__PURE__ */ g(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
ref: A,
|
|
66
|
-
...M(
|
|
66
|
+
...M(N, ["gutter"]),
|
|
67
67
|
style: {
|
|
68
|
-
|
|
68
|
+
...$,
|
|
69
69
|
...o
|
|
70
70
|
},
|
|
71
71
|
className: k,
|
|
72
72
|
children: /* @__PURE__ */ g(
|
|
73
73
|
O.Provider,
|
|
74
74
|
{
|
|
75
|
-
value: { gutter: [
|
|
76
|
-
children:
|
|
75
|
+
value: { gutter: [n, c], div: a },
|
|
76
|
+
children: C
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
}
|
package/grid/grid-item.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsx as Q } from "react/jsx-runtime";
|
|
|
2
2
|
import T from "lodash/isFunction";
|
|
3
3
|
import V from "lodash/isString";
|
|
4
4
|
import c, { forwardRef as k, useContext as l, useMemo as u, useEffect as q } from "react";
|
|
5
|
-
import { a as z } from "../chunk/
|
|
5
|
+
import { a as z } from "../chunk/CQvM33Vg.js";
|
|
6
6
|
import { u as A } from "../chunk/BFTV6myl.js";
|
|
7
|
-
import
|
|
7
|
+
import H from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { GridContext as J, GridDataCollectorContext as K } from "./context.js";
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as I } from "../chunk/xAb6ZgqS.js";
|
|
10
10
|
import { resolveItemData as L } from "./util.js";
|
|
11
11
|
const U = {
|
|
12
12
|
suffix: !1,
|
|
@@ -21,31 +21,31 @@ function W(_, g) {
|
|
|
21
21
|
), {
|
|
22
22
|
children: i,
|
|
23
23
|
className: y,
|
|
24
|
-
style:
|
|
25
|
-
offset:
|
|
24
|
+
style: N,
|
|
25
|
+
offset: D,
|
|
26
26
|
span: R,
|
|
27
|
-
__index__:
|
|
27
|
+
__index__: o
|
|
28
28
|
} = f, r = l(J), { collectItemData: E, removeItemData: P } = l(
|
|
29
29
|
K
|
|
30
|
-
), { colGap: m, cols: d, displayIndexList: p, overflow: x } = r, C =
|
|
31
|
-
[`${
|
|
32
|
-
[`${
|
|
30
|
+
), { colGap: m, cols: d, displayIndexList: p, overflow: x } = r, C = I(D, 0), n = I(R, 1), $ = S("grid-item"), w = p == null ? void 0 : p.includes(o), M = {
|
|
31
|
+
[`${$}`]: !0,
|
|
32
|
+
[`${$}-rtl`]: v
|
|
33
33
|
}, b = H(M, y), e = u(() => L(r.cols, {
|
|
34
34
|
suffix: !!f.suffix,
|
|
35
35
|
span: n,
|
|
36
36
|
offset: C
|
|
37
37
|
}), [r.cols, f.suffix, n, C]);
|
|
38
|
-
q(() => (E(
|
|
39
|
-
P(
|
|
40
|
-
}), [
|
|
38
|
+
q(() => (E(o, e), () => {
|
|
39
|
+
P(o);
|
|
40
|
+
}), [o, e]);
|
|
41
41
|
const F = u(() => {
|
|
42
|
-
const { offset: t, span:
|
|
42
|
+
const { offset: t, span: s } = e;
|
|
43
43
|
return t > 0 ? {
|
|
44
|
-
marginLeft: `calc((${`(100% - ${m * (
|
|
44
|
+
marginLeft: `calc((${`(100% - ${m * (s - 1)}px) / ${s}`} * ${t}) + ${m * t}px)`
|
|
45
45
|
} : {};
|
|
46
46
|
}, [e, m]), j = u(() => {
|
|
47
|
-
const { suffix: t, span:
|
|
48
|
-
return t ? `${d -
|
|
47
|
+
const { suffix: t, span: s } = e;
|
|
48
|
+
return t ? `${d - s + 1}` : `span ${s}`;
|
|
49
49
|
}, [e, d]), B = !w || n === 0 ? { display: "none" } : {}, O = {
|
|
50
50
|
gridColumn: `${j} / span ${n}`,
|
|
51
51
|
...F,
|
|
@@ -58,7 +58,7 @@ function W(_, g) {
|
|
|
58
58
|
className: b,
|
|
59
59
|
style: {
|
|
60
60
|
...O,
|
|
61
|
-
...
|
|
61
|
+
...N
|
|
62
62
|
},
|
|
63
63
|
children: T(i) ? i({ overflow: x }) : c.Children.map(i, (t) => t && r.collapsed && c.isValidElement(t) && !V(t.type) ? c.cloneElement(t, {
|
|
64
64
|
overflow: x,
|
package/grid/grid.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import L from "lodash/get";
|
|
3
3
|
import f, { forwardRef as h, useState as S, useContext as E } from "react";
|
|
4
|
-
import { a as T } from "../chunk/
|
|
4
|
+
import { a as T } from "../chunk/CQvM33Vg.js";
|
|
5
5
|
import { u as b } from "../chunk/BFTV6myl.js";
|
|
6
|
-
import
|
|
6
|
+
import j from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { GridDataCollectorContext as B, GridContext as Q } from "./context.js";
|
|
8
8
|
import { u as p } from "../chunk/xAb6ZgqS.js";
|
|
9
9
|
import { setItemVisible as V } from "./util.js";
|
|
@@ -15,12 +15,12 @@ const k = {
|
|
|
15
15
|
rowGap: 0
|
|
16
16
|
};
|
|
17
17
|
function q(u, x) {
|
|
18
|
-
const [
|
|
18
|
+
const [t, i] = S(
|
|
19
19
|
/* @__PURE__ */ new Map()
|
|
20
|
-
), { getPrefixCls: G, componentConfig:
|
|
20
|
+
), { getPrefixCls: G, componentConfig: s, rtl: w } = E(T), C = b(
|
|
21
21
|
u,
|
|
22
22
|
k,
|
|
23
|
-
|
|
23
|
+
s == null ? void 0 : s.Grid
|
|
24
24
|
), {
|
|
25
25
|
children: I,
|
|
26
26
|
className: g,
|
|
@@ -30,64 +30,64 @@ function q(u, x) {
|
|
|
30
30
|
rowGap: y,
|
|
31
31
|
collapsed: n,
|
|
32
32
|
collapsedRows: M
|
|
33
|
-
} = C,
|
|
33
|
+
} = C, r = p(_, 24), c = p(v, 0), N = {
|
|
34
34
|
gap: `${p(y, 0)}px ${c}px`,
|
|
35
|
-
gridTemplateColumns: `repeat(${
|
|
36
|
-
}, m = G("grid"),
|
|
35
|
+
gridTemplateColumns: `repeat(${r}, minmax(0px, 1fr))`
|
|
36
|
+
}, m = G("grid"), P = {
|
|
37
37
|
[`${m}`]: !0,
|
|
38
38
|
[`${m}-rtl`]: w
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
-
for (const [o, a] of
|
|
42
|
-
|
|
43
|
-
return
|
|
39
|
+
}, R = j(P, g), $ = (() => {
|
|
40
|
+
const e = [];
|
|
41
|
+
for (const [o, a] of t.entries())
|
|
42
|
+
e[o] = a;
|
|
43
|
+
return e;
|
|
44
44
|
})(), d = V({
|
|
45
|
-
cols:
|
|
45
|
+
cols: r,
|
|
46
46
|
collapsed: n,
|
|
47
47
|
collapsedRows: M,
|
|
48
|
-
itemDataList:
|
|
48
|
+
itemDataList: $
|
|
49
49
|
});
|
|
50
50
|
return /* @__PURE__ */ l(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
53
|
ref: x,
|
|
54
|
-
className:
|
|
54
|
+
className: R,
|
|
55
55
|
style: {
|
|
56
|
-
...
|
|
56
|
+
...N,
|
|
57
57
|
...D
|
|
58
58
|
},
|
|
59
59
|
children: /* @__PURE__ */ l(
|
|
60
60
|
B.Provider,
|
|
61
61
|
{
|
|
62
62
|
value: {
|
|
63
|
-
collectItemData(
|
|
64
|
-
|
|
63
|
+
collectItemData(e, o) {
|
|
64
|
+
t.set(e, o), i(new Map([...t]));
|
|
65
65
|
},
|
|
66
|
-
removeItemData(
|
|
67
|
-
|
|
66
|
+
removeItemData(e) {
|
|
67
|
+
t.delete(e), i(new Map([...t]));
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
children: /* @__PURE__ */ l(
|
|
71
71
|
Q.Provider,
|
|
72
72
|
{
|
|
73
73
|
value: {
|
|
74
|
-
cols:
|
|
74
|
+
cols: r,
|
|
75
75
|
colGap: c,
|
|
76
76
|
collapsed: n,
|
|
77
77
|
overflow: d.overflow,
|
|
78
78
|
displayIndexList: d.displayIndexList
|
|
79
79
|
},
|
|
80
|
-
children: f.Children.map(I, (
|
|
81
|
-
if (
|
|
80
|
+
children: f.Children.map(I, (e, o) => {
|
|
81
|
+
if (e) {
|
|
82
82
|
const a = {
|
|
83
83
|
__index__: o,
|
|
84
|
-
...
|
|
84
|
+
...e.props
|
|
85
85
|
};
|
|
86
|
-
return f.cloneElement(
|
|
86
|
+
return f.cloneElement(e, a);
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}).filter(
|
|
90
|
-
(
|
|
90
|
+
(e) => L(e, "type.__PQB_GRID_ITEM__")
|
|
91
91
|
)
|
|
92
92
|
}
|
|
93
93
|
)
|
package/hooks/index.js
CHANGED
|
@@ -4,21 +4,21 @@ import { u as a } from "../chunk/DxVvggX2.js";
|
|
|
4
4
|
import { u as m } from "../chunk/5_U1CBIu.js";
|
|
5
5
|
import { u as x } from "../chunk/CQ_WOOmf.js";
|
|
6
6
|
import { u as d } from "../chunk/B4YRLi8r.js";
|
|
7
|
-
import { u as c } from "../chunk/
|
|
7
|
+
import { u as c } from "../chunk/B4WG1mhs.js";
|
|
8
8
|
import { u as v } from "../chunk/C4OrxKE6.js";
|
|
9
|
-
import { u as I } from "../chunk/
|
|
9
|
+
import { u as I } from "../chunk/CCKr5jj1.js";
|
|
10
10
|
import { u as b } from "../chunk/oopARUrq.js";
|
|
11
11
|
import { u as P } from "../chunk/B2yFlXke.js";
|
|
12
|
-
import { u as h } from "../chunk/
|
|
12
|
+
import { u as h } from "../chunk/BYdIoY50.js";
|
|
13
13
|
import { u as W } from "../chunk/BL9DMeor.js";
|
|
14
14
|
import { u as z } from "../chunk/BXAeh0_V.js";
|
|
15
15
|
import { u as M } from "../chunk/BFTV6myl.js";
|
|
16
|
-
import { u as g } from "../chunk/
|
|
16
|
+
import { u as g } from "../chunk/CXPOj2uy.js";
|
|
17
17
|
import { u as F } from "../chunk/zmmqLCF4.js";
|
|
18
18
|
import { u as U } from "../chunk/DU1RCDfh.js";
|
|
19
|
-
import { u as H } from "../chunk/
|
|
19
|
+
import { u as H } from "../chunk/D-ap9qEk.js";
|
|
20
20
|
import { u as j } from "../chunk/BsY85n3_.js";
|
|
21
|
-
import { u as A } from "../chunk/
|
|
21
|
+
import { u as A } from "../chunk/rT6qmv-Y.js";
|
|
22
22
|
import { u as G } from "../chunk/VSe_Wq1g.js";
|
|
23
23
|
import { u as N } from "../chunk/Bg3uJGPu.js";
|
|
24
24
|
import { u as T } from "../chunk/CmZzBtA4.js";
|
package/hooks/useInView.js
CHANGED
package/hooks/useMergeValue.js
CHANGED
package/hooks/useOverrideRef.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
import h from "lodash/isEqualWith";
|
|
2
2
|
import { useMemo as d, useEffect as y } from "react";
|
|
3
|
-
import { u as D } from "../chunk/
|
|
4
|
-
import { d as V } from "../chunk/
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
3
|
+
import { u as D } from "../chunk/CXPOj2uy.js";
|
|
4
|
+
import { d as V } from "../chunk/ClM74To2.js";
|
|
5
|
+
import { Backspace as k } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
6
|
+
const E = 6;
|
|
7
7
|
function M(n) {
|
|
8
|
-
const [o, m] = D("", n), u = +n.length > 0 ? +n.length :
|
|
8
|
+
const [o, m] = D("", n), u = +n.length > 0 ? +n.length : E, c = d(() => {
|
|
9
9
|
const t = o ? String(o).split("") : [];
|
|
10
|
-
return new Array(u).fill("").map((
|
|
10
|
+
return new Array(u).fill("").map((i, e) => V(t[e]) ? String(t[e]) : "");
|
|
11
11
|
}, [o, u]), s = () => {
|
|
12
|
-
var e,
|
|
12
|
+
var e, a, l;
|
|
13
13
|
const t = ((e = n.getInputRefList) == null ? void 0 : e.call(n)) || [];
|
|
14
14
|
if ((t == null ? void 0 : t.indexOf(document.activeElement)) === -1)
|
|
15
15
|
return;
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
const r = Math.min(
|
|
19
|
-
(
|
|
16
|
+
const i = c.findIndex((r) => !r);
|
|
17
|
+
if (i > -1) {
|
|
18
|
+
const r = Math.min(i, t.length - 1);
|
|
19
|
+
(l = (a = t[r]) == null ? void 0 : a.focus) == null || l.call(a);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
y(() => {
|
|
23
23
|
s();
|
|
24
|
-
}, [JSON.stringify(
|
|
24
|
+
}, [JSON.stringify(c)]);
|
|
25
25
|
const f = (t) => {
|
|
26
|
-
var
|
|
27
|
-
h(t, o) || (m(t), (
|
|
28
|
-
}, g = (t,
|
|
26
|
+
var i, e;
|
|
27
|
+
h(t, o) || (m(t), (i = n.onChange) == null || i.call(n, t), t.length === u && ((e = n.onFinish) == null || e.call(n, t)));
|
|
28
|
+
}, g = (t, i) => {
|
|
29
29
|
t.preventDefault();
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const a = t.clipboardData.getData("text");
|
|
31
|
+
a && f(
|
|
32
|
+
c.slice(0, i).concat(a.split("")).join("")
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
35
|
return {
|
|
36
36
|
value: o,
|
|
37
|
-
filledValue:
|
|
37
|
+
filledValue: c,
|
|
38
38
|
setValue: f,
|
|
39
39
|
getInputProps: (t) => {
|
|
40
|
-
const
|
|
40
|
+
const i = String(c[t]);
|
|
41
41
|
return {
|
|
42
42
|
key: t,
|
|
43
|
-
value:
|
|
43
|
+
value: i,
|
|
44
44
|
onClick: (e) => {
|
|
45
|
-
e.preventDefault(),
|
|
45
|
+
e.preventDefault(), c[t] || s();
|
|
46
46
|
},
|
|
47
47
|
onKeyDown: (e) => {
|
|
48
|
-
if (e.key ===
|
|
49
|
-
if (
|
|
48
|
+
if (e.key === k.key) {
|
|
49
|
+
if (c[t + 1]) {
|
|
50
50
|
e.preventDefault();
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
53
|
+
let a = t;
|
|
54
|
+
c[t] || (a -= 1);
|
|
55
|
+
const l = [...c];
|
|
56
|
+
l[a] = "", f(l.join(""));
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
onChange: (e) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
const a = (e == null ? void 0 : e.trim()) || "", l = [...c];
|
|
61
|
+
l[t] = a.replace(i, "").split("").pop() || "", f(l.join(""));
|
|
62
62
|
},
|
|
63
63
|
onPaste: (e) => {
|
|
64
64
|
g(e, t);
|
package/icon/index.js
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { default as A } from "@unicom-cloud/icons/context";
|
|
3
|
+
import { default as j } from "@unicom-cloud/icons/useProps";
|
|
2
4
|
import i from "react";
|
|
3
|
-
import { C as
|
|
4
|
-
import
|
|
5
|
-
import { isServerRendering as
|
|
6
|
-
const
|
|
5
|
+
import { C as x } from "../chunk/CQvM33Vg.js";
|
|
6
|
+
import g from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import { isServerRendering as N } from "../utils/dom.js";
|
|
8
|
+
const h = [];
|
|
7
9
|
function P(p = {}) {
|
|
8
10
|
const { src: r, extraProps: u = {} } = p;
|
|
9
|
-
if (!
|
|
11
|
+
if (!N && typeof r == "string" && r.length && h.indexOf(r) === -1) {
|
|
10
12
|
const e = document.createElement("script");
|
|
11
|
-
e.setAttribute("src", r), e.setAttribute("data-namespace", r),
|
|
13
|
+
e.setAttribute("src", r), e.setAttribute("data-namespace", r), h.push(r), document.body.appendChild(e);
|
|
12
14
|
}
|
|
13
15
|
function f(e, d) {
|
|
14
|
-
const { type:
|
|
16
|
+
const { type: t, children: n, ...l } = e, o = i.useRef();
|
|
15
17
|
i.useImperativeHandle(d, () => o.current);
|
|
16
18
|
let s;
|
|
17
|
-
return
|
|
19
|
+
return t && (s = /* @__PURE__ */ a("use", { xlinkHref: `#${t}` })), n && (s = n), /* @__PURE__ */ a(
|
|
18
20
|
m,
|
|
19
21
|
{
|
|
20
|
-
type:
|
|
22
|
+
type: t,
|
|
21
23
|
...l,
|
|
22
24
|
...u,
|
|
23
25
|
ref: (c) => {
|
|
@@ -30,28 +32,30 @@ function P(p = {}) {
|
|
|
30
32
|
return f.displayName = "Iconfont", i.forwardRef(f);
|
|
31
33
|
}
|
|
32
34
|
const m = i.forwardRef(function(r, u) {
|
|
33
|
-
return /* @__PURE__ */ a(
|
|
34
|
-
const { className: d, spin:
|
|
35
|
+
return /* @__PURE__ */ a(x, { children: (e) => {
|
|
36
|
+
const { className: d, spin: t, children: n, type: l, ...o } = r, c = {
|
|
35
37
|
...{
|
|
36
38
|
width: "1em",
|
|
37
39
|
height: "1em",
|
|
38
40
|
fill: "currentColor"
|
|
39
41
|
},
|
|
40
42
|
...o
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
+
}, I = e == null ? void 0 : e.getPrefixCls("icon"), C = g(
|
|
44
|
+
I,
|
|
43
45
|
l,
|
|
44
46
|
{
|
|
45
|
-
[`${
|
|
47
|
+
[`${I}-loading`]: t
|
|
46
48
|
},
|
|
47
49
|
d
|
|
48
50
|
);
|
|
49
|
-
return c.className =
|
|
51
|
+
return c.className = C, /* @__PURE__ */ a("svg", { ...c, children: n });
|
|
50
52
|
} });
|
|
51
53
|
});
|
|
52
54
|
m.displayName = "Icon";
|
|
53
55
|
m.addFromIconFontCn = P;
|
|
54
56
|
export {
|
|
57
|
+
A as IconContext,
|
|
55
58
|
P as addFromIconFontCn,
|
|
56
|
-
m as default
|
|
59
|
+
m as default,
|
|
60
|
+
j as useIconProps
|
|
57
61
|
};
|
package/icon-hover/index.js
CHANGED
package/image/Image.js
CHANGED
|
@@ -5,15 +5,15 @@ import E from "lodash/isNumber";
|
|
|
5
5
|
import D from "lodash/isPlainObject";
|
|
6
6
|
import Ne from "lodash/isUndefined";
|
|
7
7
|
import Ve, { useContext as H, useMemo as p, useRef as J, useEffect as g } from "react";
|
|
8
|
-
import { a as xe } from "../chunk/
|
|
9
|
-
import { u as Le } from "../chunk/
|
|
10
|
-
import { u as ye } from "../chunk/
|
|
8
|
+
import { a as xe } from "../chunk/CQvM33Vg.js";
|
|
9
|
+
import { u as Le } from "../chunk/CCKr5jj1.js";
|
|
10
|
+
import { u as ye } from "../chunk/BYdIoY50.js";
|
|
11
11
|
import { u as Ee } from "../chunk/BFTV6myl.js";
|
|
12
|
-
import { u as Ge } from "../chunk/
|
|
13
|
-
import
|
|
12
|
+
import { u as Ge } from "../chunk/CXPOj2uy.js";
|
|
13
|
+
import Q from "@unicom-cloud/utils/class-name";
|
|
14
14
|
import { o as Re } from "../chunk/BKKEev13.js";
|
|
15
|
-
import { u as je, I as Se } from "../chunk/
|
|
16
|
-
import { P as W, u as Ue } from "../chunk/
|
|
15
|
+
import { u as je, I as Se } from "../chunk/DxYoPlum.js";
|
|
16
|
+
import { P as W, u as Ue } from "../chunk/yLRv5RIK.js";
|
|
17
17
|
import Fe from "./ImagePreviewGroup.js";
|
|
18
18
|
import { PreviewGroupContext as Me } from "./previewGroupContext.js";
|
|
19
19
|
let G = 0;
|
|
@@ -52,12 +52,12 @@ function ze(X, Y) {
|
|
|
52
52
|
lazyload: l,
|
|
53
53
|
...ae
|
|
54
54
|
} = re, le = ye(), {
|
|
55
|
-
previewGroup:
|
|
55
|
+
previewGroup: m,
|
|
56
56
|
handleVisibleChange: ce,
|
|
57
|
-
registerPreviewUrl:
|
|
58
|
-
registerPreviewProps:
|
|
57
|
+
registerPreviewUrl: me,
|
|
58
|
+
registerPreviewProps: ue,
|
|
59
59
|
setCurrentIndex: de
|
|
60
|
-
} = H(Me), o = p(() => D(P) ? P : {}, [P]), fe = p(() => D(l) ? l : {}, [l]), s = p(() => E(C) || E(z) ? (G = E(C) ? C : z, G) : G++, []), V = o.src || i, [x] = je({ title: w, description: U, actions: F }), { isLoading: K, isError: L, isLoaded: c, isBeforeLoad: pe, setStatus:
|
|
60
|
+
} = H(Me), o = p(() => D(P) ? P : {}, [P]), fe = p(() => D(l) ? l : {}, [l]), s = p(() => E(C) || E(z) ? (G = E(C) ? C : z, G) : G++, []), V = o.src || i, [x] = je({ title: w, description: U, actions: F }), { isLoading: K, isError: L, isLoaded: c, isBeforeLoad: pe, setStatus: u } = Ue("beforeLoad"), d = J(!1), [_, ge] = Ge(!1, {
|
|
61
61
|
defaultValue: o.defaultVisible,
|
|
62
62
|
value: o.visible
|
|
63
63
|
}), y = p(() => Re(o, [
|
|
@@ -80,13 +80,13 @@ function ze(X, Y) {
|
|
|
80
80
|
ie
|
|
81
81
|
), n = J();
|
|
82
82
|
function he(r) {
|
|
83
|
-
d.current = !0,
|
|
83
|
+
d.current = !0, u("loaded"), N == null || N(r);
|
|
84
84
|
}
|
|
85
85
|
function Pe(r) {
|
|
86
|
-
d.current = !0,
|
|
86
|
+
d.current = !0, u("error"), $ == null || $(r);
|
|
87
87
|
}
|
|
88
88
|
function k(r) {
|
|
89
|
-
a &&
|
|
89
|
+
a && m ? (de(s), ce(!0)) : a && B(!0), I == null || I(r);
|
|
90
90
|
}
|
|
91
91
|
function B(r) {
|
|
92
92
|
var A;
|
|
@@ -98,20 +98,20 @@ function ze(X, Y) {
|
|
|
98
98
|
...fe
|
|
99
99
|
});
|
|
100
100
|
g(() => {
|
|
101
|
-
d.current = !1, i ||
|
|
101
|
+
d.current = !1, i || u("error");
|
|
102
102
|
}, [i]), g(() => {
|
|
103
|
-
n.current && (T ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !d.current && !n.current.complete &&
|
|
103
|
+
n.current && (T ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !d.current && !n.current.complete && u("loading")) : u("lazyload"));
|
|
104
104
|
}, [i, T]), g(() => {
|
|
105
|
-
if (!
|
|
105
|
+
if (!m)
|
|
106
106
|
return;
|
|
107
|
-
const r =
|
|
107
|
+
const r = ue(s, y);
|
|
108
108
|
return () => r(s);
|
|
109
|
-
}, [s,
|
|
110
|
-
if (!
|
|
109
|
+
}, [s, m, y]), g(() => {
|
|
110
|
+
if (!m)
|
|
111
111
|
return;
|
|
112
|
-
const r =
|
|
112
|
+
const r = me(s, V, a);
|
|
113
113
|
return () => r(s);
|
|
114
|
-
}, [s,
|
|
114
|
+
}, [s, m, V, a]);
|
|
115
115
|
const be = /* @__PURE__ */ f("div", { className: `${e}-error`, children: [
|
|
116
116
|
/* @__PURE__ */ t("div", { className: `${e}-error-icon`, children: /* @__PURE__ */ t(Ce, {}) }),
|
|
117
117
|
b && /* @__PURE__ */ t("div", { className: `${e}-error-alt`, children: b })
|
package/image/ImageFooter.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@unicom-cloud/icons/IconUiMore";
|
|
3
|
-
import "
|
|
3
|
+
import "@unicom-cloud/utils/class-name";
|
|
4
4
|
import "./TriggerForToolbar.js";
|
|
5
|
-
import { I as e } from "../chunk/
|
|
5
|
+
import { I as e } from "../chunk/DxYoPlum.js";
|
|
6
6
|
export {
|
|
7
7
|
e as ImageFooter
|
|
8
8
|
};
|
package/image/ImagePreview.js
CHANGED
|
@@ -12,30 +12,30 @@ import "@unicom-cloud/icons/IconUiZoomIn";
|
|
|
12
12
|
import "@unicom-cloud/icons/IconUiZoomOut";
|
|
13
13
|
import "lodash/isUndefined";
|
|
14
14
|
import "react";
|
|
15
|
-
import "../chunk/
|
|
15
|
+
import "../chunk/CQvM33Vg.js";
|
|
16
16
|
import "lodash/isEqualWith";
|
|
17
|
-
import "../chunk/
|
|
18
|
-
import "../chunk/
|
|
19
|
-
import "
|
|
17
|
+
import "../chunk/CXPOj2uy.js";
|
|
18
|
+
import "../chunk/ClM74To2.js";
|
|
19
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
20
20
|
import "lodash/isNumber";
|
|
21
21
|
import "lodash/merge";
|
|
22
22
|
import "../utils/dom.js";
|
|
23
|
-
import "../chunk/
|
|
23
|
+
import "../chunk/B4WG1mhs.js";
|
|
24
24
|
import "../chunk/BFTV6myl.js";
|
|
25
25
|
import "../chunk/DU1RCDfh.js";
|
|
26
|
-
import "../chunk/
|
|
27
|
-
import "
|
|
26
|
+
import "../chunk/BZ3igxQN.js";
|
|
27
|
+
import "@unicom-cloud/utils/constant";
|
|
28
28
|
import "../chunk/a3hR6zLw.js";
|
|
29
29
|
import "lodash/debounce";
|
|
30
30
|
import "../portal/index.js";
|
|
31
|
-
import "../chunk/
|
|
32
|
-
import "
|
|
33
|
-
import "
|
|
31
|
+
import "../chunk/NPajzdOv.js";
|
|
32
|
+
import "@unicom-cloud/utils/class-name";
|
|
33
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
34
34
|
import "../chunk/CIRG541s.js";
|
|
35
35
|
import "./ImagePreviewArrow.js";
|
|
36
36
|
import "./ImagePreviewToolbar.js";
|
|
37
37
|
import "./previewGroupContext.js";
|
|
38
|
-
import { P as M } from "../chunk/
|
|
38
|
+
import { P as M } from "../chunk/yLRv5RIK.js";
|
|
39
39
|
export {
|
|
40
40
|
M as default
|
|
41
41
|
};
|