@unicom-cloud/ui 0.8.93 → 0.8.95
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/Checkbox.js +5 -4
- package/Layout.js +8 -7
- package/Message.js +1 -1
- package/Notification.js +1 -1
- package/Switch.js +1 -1
- package/Tooltip.js +1 -1
- package/Trigger.js +1 -1
- package/back-top/index.js +8 -8
- package/badge/index.js +11 -11
- package/cascader/panel/List.js +1 -1
- package/cascader/panel/Option.js +7 -6
- package/cascader/panel/Search.js +17 -16
- package/checkbox/index.js +7 -6
- package/collapse/Item.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Mode.js +7 -6
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +1 -1
- package/color-picker/colors.js +1 -1
- package/color-picker/hooks/useColorPicker.js +1 -1
- package/color-picker/utils.js +1 -1
- package/components/common/empty/index.js +33 -13
- package/components/common/space/index.js +4 -3
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/components/common/utils/setPrimaryColor.js +21 -21
- package/components/common/utils/setTheme.js +23 -23
- package/dist/react-transition-group/src/CSSTransition.js +1 -1
- package/dist/react-transition-group/src/SwitchTransition.js +1 -1
- package/dist/tinycolor/chunk/{DGZSWe7E.js → BOzCVdr0.js} +43 -43
- package/dist/tinycolor/customize/index.js +1 -1
- package/dist/tween/src/tween.js +25 -24
- package/index.js +173 -173
- package/input-tag/InputTag.js +1 -1
- package/layout/index.js +11 -9
- package/message/index.js +1 -1
- package/notification/index.js +1 -1
- package/package.json +1 -1
- package/pagination/PageItem.js +52 -53
- package/pagination/Pagination.js +2 -1
- package/pagination/interface.js +4 -1
- package/select/Option.js +12 -11
- package/select/Select.js +1 -0
- package/statistic/index.js +16 -16
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +153 -153
- package/table/tbody/Tr.js +3 -2
- package/table/thead/Column.js +3 -2
- package/table/thead/index.js +3 -2
- package/tag/index.js +24 -24
- package/time-picker/util.js +4 -4
- package/tooltip/index.js +1 -1
- package/transfer/Item.js +17 -16
- package/transfer/List.js +12 -11
- package/tree/Node.js +43 -41
- package/tree/Tree.js +215 -211
- package/trigger/index.js +1 -1
- package/types/pc/affix/index.d.ts +1 -1
- package/types/pc/alert/index.d.ts +1 -1
- package/types/pc/anchor/Anchor.d.ts +1 -1
- package/types/pc/anchor/Link.d.ts +1 -1
- package/types/pc/anchor/context.d.ts +1 -1
- package/types/pc/auto-complete/index.d.ts +1 -1
- package/types/pc/avatar/Avatar.d.ts +1 -1
- package/types/pc/avatar/Group.d.ts +1 -1
- package/types/pc/avatar/context.d.ts +1 -1
- package/types/pc/back-top/index.d.ts +1 -1
- package/types/pc/badge/index.d.ts +2 -2
- package/types/pc/badge/interface.d.ts +1 -1
- package/types/pc/breadcrumb/Item.d.ts +1 -1
- package/types/pc/breadcrumb/index.d.ts +1 -1
- package/types/pc/button/Group.d.ts +1 -1
- package/types/pc/button/index.d.ts +1 -1
- package/types/pc/calendar/Month.d.ts +1 -1
- package/types/pc/calendar/Year.d.ts +1 -1
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/card/Grid.d.ts +1 -1
- package/types/pc/card/Meta.d.ts +1 -1
- package/types/pc/card/index.d.ts +1 -1
- package/types/pc/carousel/Arrow.d.ts +1 -1
- package/types/pc/carousel/Indicator.d.ts +1 -1
- package/types/pc/carousel/index.d.ts +2 -2
- package/types/pc/cascader/Cascader.d.ts +1 -1
- package/types/pc/cascader/util.d.ts +1 -1
- package/types/pc/checkbox/Checkbox.d.ts +1 -1
- package/types/pc/checkbox/Group.d.ts +1 -1
- package/types/pc/checkbox/GroupBlock.d.ts +1 -1
- package/types/pc/checkbox/index.d.ts +1 -1
- package/types/pc/collapse/Collapse.d.ts +1 -1
- package/types/pc/collapse/Item.d.ts +1 -1
- package/types/pc/color-picker/InputHex.d.ts +1 -1
- package/types/pc/color-picker/InputRgb.d.ts +1 -1
- package/types/pc/color-picker/Mode.d.ts +1 -1
- package/types/pc/color-picker/Palette.d.ts +1 -1
- package/types/pc/color-picker/index.d.ts +1 -1
- package/types/pc/color-picker/utils.d.ts +1 -1
- package/types/pc/comment/index.d.ts +1 -1
- package/types/pc/config-provider/ConfigProvider.d.ts +3 -2
- package/types/pc/config-provider/context.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +1 -1
- package/types/pc/copy/index.d.ts +1 -1
- package/types/pc/date-picker/Picker.d.ts +1 -2
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/date-picker/index.d.ts +1 -1
- package/types/pc/descriptions/index.d.ts +1 -1
- package/types/pc/details/index.d.ts +1 -1
- package/types/pc/divider/index.d.ts +1 -1
- package/types/pc/draggable/Item.d.ts +1 -1
- package/types/pc/draggable/index.d.ts +1 -1
- package/types/pc/drawer/Drawer.d.ts +2 -2
- package/types/pc/dropdown/Button.d.ts +1 -1
- package/types/pc/dropdown/index.d.ts +1 -1
- package/types/pc/empty/index.d.ts +1 -1
- package/types/pc/form/Control.d.ts +1 -1
- package/types/pc/form/Form.d.ts +1 -1
- package/types/pc/form/FormLabel.d.ts +1 -1
- package/types/pc/form/FormList.d.ts +1 -1
- package/types/pc/form/FormProvider.d.ts +1 -1
- package/types/pc/form/context.d.ts +1 -1
- package/types/pc/form/hook/useForm.d.ts +1 -1
- package/types/pc/form/index.d.ts +1 -1
- package/types/pc/form/interface.d.ts +2 -2
- package/types/pc/form/store.d.ts +3 -4
- package/types/pc/form/util.d.ts +3 -3
- package/types/pc/grid/Col.d.ts +1 -1
- package/types/pc/grid/Grid.d.ts +1 -1
- package/types/pc/grid/GridItem.d.ts +1 -1
- package/types/pc/grid/Row.d.ts +1 -1
- package/types/pc/grid/context.d.ts +1 -1
- package/types/pc/grid/util.d.ts +1 -1
- package/types/pc/hooks/use-watermark/index.d.ts +1 -1
- package/types/pc/icons/file/index.d.ts +1 -1
- package/types/pc/image/Image.d.ts +1 -1
- package/types/pc/image/ImageFooter.d.ts +1 -1
- package/types/pc/image/ImagePreview.d.ts +1 -1
- package/types/pc/image/ImagePreviewGroup.d.ts +1 -1
- package/types/pc/image/ImagePreviewToolbar.d.ts +1 -1
- package/types/pc/image/index.d.ts +1 -1
- package/types/pc/image/previewGroupContext.d.ts +1 -1
- package/types/pc/input/Button.d.ts +1 -1
- package/types/pc/input/Group.d.ts +1 -1
- package/types/pc/input/Input.d.ts +1 -1
- package/types/pc/input/InputElement.d.ts +1 -1
- package/types/pc/input/Password.d.ts +1 -1
- package/types/pc/input/Search.d.ts +1 -1
- package/types/pc/input/Textarea.d.ts +1 -1
- package/types/pc/input/index.d.ts +1 -1
- package/types/pc/input/useComposition.d.ts +1 -1
- package/types/pc/input-number/index.d.ts +1 -1
- package/types/pc/input-tag/InputTag.d.ts +2 -2
- package/types/pc/input-tag/interface.d.ts +2 -2
- package/types/pc/layout/Content.d.ts +1 -1
- package/types/pc/layout/Footer.d.ts +1 -1
- package/types/pc/layout/Header.d.ts +1 -1
- package/types/pc/layout/Sider.d.ts +1 -1
- package/types/pc/layout/index.d.ts +2 -2
- package/types/pc/link/index.d.ts +1 -1
- package/types/pc/list/Item.d.ts +1 -1
- package/types/pc/list/Meta.d.ts +1 -1
- package/types/pc/list/index.d.ts +2 -2
- package/types/pc/mentions/index.d.ts +1 -1
- package/types/pc/mentions/util.d.ts +1 -1
- package/types/pc/menu/Item.d.ts +1 -1
- package/types/pc/menu/ItemGroup.d.ts +1 -1
- package/types/pc/menu/Menu.d.ts +1 -1
- package/types/pc/menu/OverflowWrap.d.ts +1 -1
- package/types/pc/menu/context.d.ts +2 -2
- package/types/pc/menu/index.d.ts +1 -1
- package/types/pc/menu/interface.d.ts +1 -1
- package/types/pc/message/index.d.ts +2 -2
- package/types/pc/message/useMessage.d.ts +1 -1
- package/types/pc/modal/Modal.d.ts +2 -2
- package/types/pc/modal/config.d.ts +1 -1
- package/types/pc/notification/index.d.ts +2 -2
- package/types/pc/notification/useNotification.d.ts +1 -1
- package/types/pc/page-header/index.d.ts +2 -2
- package/types/pc/pagination/PageItem.d.ts +2 -47
- package/types/pc/pagination/Pagination.d.ts +1 -1
- package/types/pc/pagination/interface.d.ts +47 -0
- package/types/pc/popconfirm/index.d.ts +1 -1
- package/types/pc/popover/index.d.ts +1 -1
- package/types/pc/popover/interface.d.ts +1 -1
- package/types/pc/progress/CircleProgress.d.ts +1 -1
- package/types/pc/progress/index.d.ts +1 -1
- package/types/pc/radio/Group.d.ts +1 -1
- package/types/pc/radio/GroupBlock.d.ts +1 -1
- package/types/pc/radio/Radio.d.ts +1 -1
- package/types/pc/radio/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +1 -1
- package/types/pc/resize-box/Split.d.ts +1 -1
- package/types/pc/resize-box/SplitGroup.d.ts +1 -1
- package/types/pc/resize-box/index.d.ts +1 -1
- package/types/pc/result/index.d.ts +1 -1
- package/types/pc/select/OptGroup.d.ts +1 -1
- package/types/pc/select/Option.d.ts +1 -1
- package/types/pc/select/Select.d.ts +3 -2
- package/types/pc/select/index.d.ts +1 -1
- package/types/pc/select/util.d.ts +1 -1
- package/types/pc/select-view/Core.d.ts +1 -1
- package/types/pc/select-view/index.d.ts +1 -1
- package/types/pc/skeleton/Image.d.ts +1 -1
- package/types/pc/skeleton/Text.d.ts +1 -1
- package/types/pc/skeleton/index.d.ts +1 -1
- package/types/pc/slider/Button.d.ts +1 -1
- package/types/pc/slider/hook/useInterval.d.ts +1 -1
- package/types/pc/slider/index.d.ts +1 -1
- package/types/pc/space/index.d.ts +1 -1
- package/types/pc/space-/index.d.ts +1 -1
- package/types/pc/spin/index.d.ts +1 -1
- package/types/pc/statistic/Countdown.d.ts +1 -1
- package/types/pc/statistic/index.d.ts +2 -2
- package/types/pc/steps/Step.d.ts +1 -1
- package/types/pc/steps/index.d.ts +1 -1
- package/types/pc/switch/index.d.ts +2 -2
- package/types/pc/table/ColGroup.d.ts +1 -1
- package/types/pc/table/Table.d.ts +1 -1
- package/types/pc/table/constant.d.ts +1 -1
- package/types/pc/table/interface.d.ts +1 -1
- package/types/pc/table/util.d.ts +1 -1
- package/types/pc/tabs/Tab.d.ts +1 -1
- package/types/pc/tabs/TabPane.d.ts +1 -1
- package/types/pc/tabs/index.d.ts +1 -1
- package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
- package/types/pc/tabs/tab-header/index.d.ts +1 -1
- package/types/pc/tag/index.d.ts +1 -1
- package/types/pc/time-picker/Picker.d.ts +1 -1
- package/types/pc/time-picker/RangePicker.d.ts +1 -1
- package/types/pc/time-picker/TimePicker.d.ts +1 -1
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/timeline/Item.d.ts +1 -1
- package/types/pc/timeline/Timeline.d.ts +1 -1
- package/types/pc/timeline/index.d.ts +1 -1
- package/types/pc/tooltip/index.d.ts +2 -2
- package/types/pc/transfer/Item.d.ts +1 -1
- package/types/pc/transfer/List.d.ts +1 -1
- package/types/pc/transfer/index.d.ts +1 -1
- package/types/pc/tree/Animation.d.ts +1 -1
- package/types/pc/tree/Context.d.ts +1 -1
- package/types/pc/tree/Node.d.ts +1 -1
- package/types/pc/tree/Tree.d.ts +1 -1
- package/types/pc/tree/index.d.ts +2 -2
- package/types/pc/tree/interface.d.ts +19 -3
- package/types/pc/tree/util.d.ts +1 -1
- package/types/pc/tree-select/List.d.ts +1 -1
- package/types/pc/trigger/getPopupStyle.d.ts +1 -1
- package/types/pc/trigger/index.d.ts +2 -2
- package/types/pc/typography/EditContent.d.ts +1 -1
- package/types/pc/typography/Ellipsis.d.ts +1 -1
- package/types/pc/typography/Operations.d.ts +1 -1
- package/types/pc/typography/Paragraph.d.ts +1 -1
- package/types/pc/typography/Title.d.ts +1 -1
- package/types/pc/typography/Typography.d.ts +1 -1
- package/types/pc/typography/useCssEllipsis.d.ts +1 -1
- package/types/pc/typography/useEllipsis.d.ts +1 -1
- package/types/pc/upload/TriggerNode.d.ts +1 -1
- package/types/pc/upload/Upload.d.ts +2 -2
- package/types/pc/upload/Uploader.d.ts +1 -1
- package/types/pc/upload/request.d.ts +1 -1
- package/types/pc/upload/util.d.ts +1 -1
- package/types/pc/verification-code/VerificationCode.d.ts +1 -1
- package/types/pc/verification-code/index.d.ts +1 -1
- package/types/pc/watermark/Watermark.d.ts +1 -1
- package/types/pc/watermark/index.d.ts +2 -2
- package/typography/Ellipsis.js +7 -5
- package/upload/list/index.js +1 -1
- package/utils/color.js +1 -1
- package/utils/index.js +2 -2
- package/utils/reactTransitionGroup.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/version/index.js +1 -1
- /package/dist/react-transition-group/chunk/{CPfP7aNL.js → C6QwjD4L.js} +0 -0
package/pagination/PageItem.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import j from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import K from "@unicom-cloud/icons/IconUiMore";
|
|
4
|
+
import T from "@unicom-cloud/icons/IconUiRight";
|
|
5
5
|
import U, { useContext as N } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
7
|
import R from "../components/common/hooks/useKeyboardEvent.js";
|
|
8
8
|
import E from "@unicom-cloud/utils/class-name";
|
|
9
|
+
import { StepType as S } from "./interface.js";
|
|
9
10
|
import k from "../config-provider/context.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { locale: e } = N(k), v = R(), {
|
|
11
|
+
function _(t) {
|
|
12
|
+
var l, r, s;
|
|
13
|
+
const { locale: e } = N(k), P = R(), {
|
|
14
14
|
pageNum: i,
|
|
15
|
-
current:
|
|
15
|
+
current: v,
|
|
16
16
|
rootPrefixCls: a,
|
|
17
17
|
pageItemStyle: d,
|
|
18
18
|
activePageItemStyle: m,
|
|
19
19
|
itemRender: f
|
|
20
|
-
} = t,
|
|
20
|
+
} = t, p = `${a}-item`, x = v === i, b = E(p, x ? `${p}-active` : "");
|
|
21
21
|
let o = d;
|
|
22
|
-
|
|
23
|
-
const
|
|
22
|
+
x && (o = { ...o, ...m });
|
|
23
|
+
const I = x ? { "aria-current": !0 } : {}, C = (n) => {
|
|
24
24
|
const { pageNum: u, onClick: g, disabled: c } = t;
|
|
25
|
-
|
|
25
|
+
n.currentTarget.dataset.active !== "true" && (n.stopPropagation(), c || g == null || g(u));
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ y(
|
|
28
28
|
"li",
|
|
29
29
|
{
|
|
30
30
|
style: o,
|
|
31
|
-
className:
|
|
32
|
-
onClick:
|
|
31
|
+
className: b,
|
|
32
|
+
onClick: C,
|
|
33
33
|
tabIndex: t.disabled ? -1 : 0,
|
|
34
|
-
"aria-label": (s = (
|
|
35
|
-
...
|
|
36
|
-
...
|
|
34
|
+
"aria-label": (s = (r = (l = e == null ? void 0 : e.Pagination) == null ? void 0 : l.currentPage) == null ? void 0 : r.replace) == null ? void 0 : s.call(r, "{0}", i),
|
|
35
|
+
...P({ onPressEnter: C }),
|
|
36
|
+
...I,
|
|
37
37
|
children: f ? f(i, "page", i) : i
|
|
38
38
|
}
|
|
39
39
|
);
|
|
@@ -41,66 +41,66 @@ function L(t) {
|
|
|
41
41
|
function $(t, e) {
|
|
42
42
|
switch (t) {
|
|
43
43
|
case "prev":
|
|
44
|
-
return e && e.prev ? e.prev : /* @__PURE__ */
|
|
44
|
+
return e && e.prev ? e.prev : /* @__PURE__ */ y(j, {});
|
|
45
45
|
case "next":
|
|
46
|
-
return e && e.next ? e.next : /* @__PURE__ */
|
|
46
|
+
return e && e.next ? e.next : /* @__PURE__ */ y(T, {});
|
|
47
47
|
case "more":
|
|
48
|
-
return e && e.more ? e.more : /* @__PURE__ */
|
|
48
|
+
return e && e.more ? e.more : /* @__PURE__ */ y(K, {});
|
|
49
49
|
default:
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
const H = (t) => {
|
|
54
|
-
var s,
|
|
54
|
+
var s, n, u, g, c, h;
|
|
55
55
|
const { locale: e } = N(k), {
|
|
56
|
-
rootPrefixCls:
|
|
56
|
+
rootPrefixCls: P,
|
|
57
57
|
current: i,
|
|
58
|
-
allPages:
|
|
58
|
+
allPages: v,
|
|
59
59
|
jumpPage: a,
|
|
60
60
|
icons: d,
|
|
61
61
|
disabled: m,
|
|
62
62
|
pageItemStyle: f,
|
|
63
|
-
itemRender:
|
|
64
|
-
} = t,
|
|
63
|
+
itemRender: p
|
|
64
|
+
} = t, x = v > 0 ? 1 : 0, b = Math.min(v, Math.max(x, i + a)), o = `${P}-item ${P}-item-jumper`, I = E(o), C = () => {
|
|
65
65
|
var M;
|
|
66
|
-
!m && ((M = t.onClick) == null || M.call(t,
|
|
67
|
-
}, l = $("more", d),
|
|
68
|
-
return /* @__PURE__ */
|
|
66
|
+
!m && ((M = t.onClick) == null || M.call(t, b));
|
|
67
|
+
}, l = $("more", d), r = a > 0 ? (u = (n = (s = e == null ? void 0 : e.Pagination) == null ? void 0 : s.nextSomePages) == null ? void 0 : n.replace) == null ? void 0 : u.call(n, "{0}", a) : (h = (c = (g = e == null ? void 0 : e.Pagination) == null ? void 0 : g.prevSomePages) == null ? void 0 : c.replace) == null ? void 0 : h.call(c, "{0}", -a);
|
|
68
|
+
return /* @__PURE__ */ y(
|
|
69
69
|
"li",
|
|
70
70
|
{
|
|
71
71
|
style: f,
|
|
72
|
-
className:
|
|
73
|
-
onClick:
|
|
74
|
-
"aria-label":
|
|
75
|
-
children:
|
|
72
|
+
className: I,
|
|
73
|
+
onClick: C,
|
|
74
|
+
"aria-label": r,
|
|
75
|
+
children: p ? p(void 0, "more", l) : l
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}, O = (t) => {
|
|
79
|
-
const { locale: e, rtl:
|
|
80
|
-
rootPrefixCls:
|
|
79
|
+
const { locale: e, rtl: P } = N(k), i = R(), {
|
|
80
|
+
rootPrefixCls: v,
|
|
81
81
|
current: a,
|
|
82
82
|
allPages: d,
|
|
83
83
|
type: m,
|
|
84
84
|
icons: f,
|
|
85
|
-
disabled:
|
|
86
|
-
pageItemStyle:
|
|
87
|
-
itemRender:
|
|
88
|
-
} = t, o = `${
|
|
89
|
-
let
|
|
90
|
-
d === 0 ?
|
|
91
|
-
const s =
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
const u =
|
|
85
|
+
disabled: p,
|
|
86
|
+
pageItemStyle: x,
|
|
87
|
+
itemRender: b
|
|
88
|
+
} = t, o = `${v}-item`, [I, C] = P ? ["next", "prev"] : ["prev", "next"], l = m === S.previous ? $(I, f) : $(C, f);
|
|
89
|
+
let r = !1;
|
|
90
|
+
d === 0 ? r = !0 : m === S.previous ? r = a <= 1 : r = a === d;
|
|
91
|
+
const s = p || r;
|
|
92
|
+
let n = a + (m === S.previous ? -1 : 1);
|
|
93
|
+
n = Math.max(0, Math.min(d, n));
|
|
94
|
+
const u = S.previous === m ? "prev" : "next", g = E(o, `${o}-${u}`, {
|
|
95
95
|
[`${o}-disabled`]: s
|
|
96
96
|
}), c = () => {
|
|
97
|
-
var
|
|
98
|
-
s || (
|
|
97
|
+
var h;
|
|
98
|
+
s || (h = t.onClick) == null || h.call(t, n);
|
|
99
99
|
};
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ y(
|
|
101
101
|
"li",
|
|
102
102
|
{
|
|
103
|
-
style:
|
|
103
|
+
style: x,
|
|
104
104
|
className: g,
|
|
105
105
|
onClick: c,
|
|
106
106
|
tabIndex: s ? -1 : 0,
|
|
@@ -108,13 +108,12 @@ const H = (t) => {
|
|
|
108
108
|
...i({
|
|
109
109
|
onPressEnter: c
|
|
110
110
|
}),
|
|
111
|
-
children:
|
|
111
|
+
children: b ? b(void 0, u, l) : l
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
}, Q = U.memo(
|
|
114
|
+
}, Q = U.memo(_);
|
|
115
115
|
export {
|
|
116
116
|
H as JumpPager,
|
|
117
117
|
O as StepPager,
|
|
118
|
-
_ as StepType,
|
|
119
118
|
Q as default
|
|
120
119
|
};
|
package/pagination/Pagination.js
CHANGED
|
@@ -5,9 +5,10 @@ import Me from "../components/common/hooks/useMergeProps.js";
|
|
|
5
5
|
import Q from "../components/common/hooks/useMergeValue.js";
|
|
6
6
|
import je from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { pickDataAttributes as ke } from "../components/common/utils/pick.js";
|
|
8
|
-
import b, { StepPager as M,
|
|
8
|
+
import b, { StepPager as M, JumpPager as I } from "./PageItem.js";
|
|
9
9
|
import U from "./PageJumper.js";
|
|
10
10
|
import Je from "./PageOption.js";
|
|
11
|
+
import { StepType as m } from "./interface.js";
|
|
11
12
|
import Ae from "../config-provider/context.js";
|
|
12
13
|
const Ee = 1, Y = 10;
|
|
13
14
|
function T(f = Y, d) {
|
package/pagination/interface.js
CHANGED
package/select/Option.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsxs as j, jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import y from "react";
|
|
3
3
|
import E from "../checkbox/Checkbox.js";
|
|
4
|
+
import "../checkbox/Group.js";
|
|
4
5
|
import v from "@unicom-cloud/utils/class-name";
|
|
5
6
|
import { omit as L } from "../components/common/utils/omit.js";
|
|
6
|
-
function P(
|
|
7
|
+
function P(l, N) {
|
|
7
8
|
const {
|
|
8
9
|
style: _,
|
|
9
10
|
className: b,
|
|
@@ -22,22 +23,22 @@ function P(p, N) {
|
|
|
22
23
|
_onMouseLeave: d,
|
|
23
24
|
_onClick: m,
|
|
24
25
|
...o
|
|
25
|
-
} =
|
|
26
|
+
} = l, n = "value" in l ? h : `${C}`, i = "children" in l ? C : `${h}`, s = $ ? O.indexOf(n) !== -1 : O === n, u = {
|
|
26
27
|
style: _,
|
|
27
28
|
className: v(
|
|
28
29
|
`${e}-option`,
|
|
29
30
|
{
|
|
30
31
|
[`${e}-option-selected`]: s,
|
|
31
32
|
[`${e}-option-disabled`]: a,
|
|
32
|
-
[`${e}-option-hover`]:
|
|
33
|
-
[`${e}-option-empty`]: !
|
|
33
|
+
[`${e}-option-hover`]: n === M,
|
|
34
|
+
[`${e}-option-empty`]: !i && i !== 0 || typeof i == "string" && /^\s*$/.test(i),
|
|
34
35
|
[`${e}-option-rtl`]: x
|
|
35
36
|
},
|
|
36
37
|
b
|
|
37
38
|
),
|
|
38
39
|
onMouseEnter: (r) => {
|
|
39
40
|
var t;
|
|
40
|
-
c == null || c(
|
|
41
|
+
c == null || c(n), (t = o.onMouseEnter) == null || t.call(o, r);
|
|
41
42
|
},
|
|
42
43
|
onMouseLeave: (r) => {
|
|
43
44
|
var t;
|
|
@@ -45,7 +46,7 @@ function P(p, N) {
|
|
|
45
46
|
},
|
|
46
47
|
onClick: (r) => {
|
|
47
48
|
var t;
|
|
48
|
-
m == null || m(
|
|
49
|
+
m == null || m(n, a), (t = o.onClick) == null || t.call(o, r);
|
|
49
50
|
},
|
|
50
51
|
...L(o, [
|
|
51
52
|
"_key",
|
|
@@ -55,15 +56,15 @@ function P(p, N) {
|
|
|
55
56
|
"onMouseEnter",
|
|
56
57
|
"onMouseLeave"
|
|
57
58
|
])
|
|
58
|
-
},
|
|
59
|
+
}, p = {
|
|
59
60
|
ref: N,
|
|
60
61
|
role: "option",
|
|
61
62
|
"aria-selected": s
|
|
62
63
|
};
|
|
63
|
-
return w && Object.assign(
|
|
64
|
+
return w && Object.assign(p, { "data-user-created": !0 }), g && Object.assign(p, { "data-user-creating": !0 }), $ ? /* @__PURE__ */ j(
|
|
64
65
|
"li",
|
|
65
66
|
{
|
|
66
|
-
...
|
|
67
|
+
...p,
|
|
67
68
|
className: v(
|
|
68
69
|
`${e}-option-wrapper`,
|
|
69
70
|
{
|
|
@@ -83,10 +84,10 @@ function P(p, N) {
|
|
|
83
84
|
onChange: u.onClick
|
|
84
85
|
}
|
|
85
86
|
),
|
|
86
|
-
/* @__PURE__ */ f("span", { ...u, children:
|
|
87
|
+
/* @__PURE__ */ f("span", { ...u, children: i })
|
|
87
88
|
]
|
|
88
89
|
}
|
|
89
|
-
) : /* @__PURE__ */ f("li", { ...
|
|
90
|
+
) : /* @__PURE__ */ f("li", { ...p, ...u, children: i });
|
|
90
91
|
}
|
|
91
92
|
const R = y.forwardRef(P), S = R;
|
|
92
93
|
S.__PQB_SELECT_OPTION__ = !0;
|
package/select/Select.js
CHANGED
|
@@ -3,6 +3,7 @@ import D from "lodash/isArray";
|
|
|
3
3
|
import Ot from "lodash/isFunction";
|
|
4
4
|
import ht, { useContext as bt, useState as z, useMemo as Pe, useRef as C, useCallback as me, useEffect as V, useImperativeHandle as vt } from "react";
|
|
5
5
|
import yt from "../checkbox/Checkbox.js";
|
|
6
|
+
import "../checkbox/Group.js";
|
|
6
7
|
import "../config-provider/ConfigProvider.js";
|
|
7
8
|
import Ct from "../components/common/hooks/useId.js";
|
|
8
9
|
import Vt from "../components/common/hooks/useMergeProps.js";
|
package/statistic/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { quartOut as W } from "../dist/tween/src/easing.js";
|
|
|
4
4
|
import z from "dayjs";
|
|
5
5
|
import A from "lodash/isFunction";
|
|
6
6
|
import c from "lodash/isNumber";
|
|
7
|
-
import { forwardRef as B, useContext as G, useRef as
|
|
7
|
+
import { forwardRef as B, useContext as G, useRef as y, useState as J, useEffect as K, useImperativeHandle as Q, useMemo as X } from "react";
|
|
8
8
|
import "../config-provider/ConfigProvider.js";
|
|
9
9
|
import Y from "../components/common/hooks/useMergeProps.js";
|
|
10
10
|
import Z from "../skeleton/index.js";
|
|
@@ -31,11 +31,11 @@ function nt(R, U) {
|
|
|
31
31
|
suffix: u,
|
|
32
32
|
format: f,
|
|
33
33
|
renderFormat: F,
|
|
34
|
-
styleValue:
|
|
35
|
-
styleDecimal:
|
|
36
|
-
loading:
|
|
37
|
-
...
|
|
38
|
-
} = t, i =
|
|
34
|
+
styleValue: I,
|
|
35
|
+
styleDecimal: O,
|
|
36
|
+
loading: P,
|
|
37
|
+
..._
|
|
38
|
+
} = t, i = y(), g = y(), [e, v] = J(
|
|
39
39
|
"value" in t ? t.value : void 0
|
|
40
40
|
), r = m == null ? void 0 : m("statistic"), N = (n = t.countFrom, o = t.value) => {
|
|
41
41
|
const { countDuration: h } = t;
|
|
@@ -48,8 +48,8 @@ function nt(R, U) {
|
|
|
48
48
|
},
|
|
49
49
|
duration: h,
|
|
50
50
|
easing: W,
|
|
51
|
-
onUpdate: (
|
|
52
|
-
v(
|
|
51
|
+
onUpdate: (H) => {
|
|
52
|
+
v(H.value.toFixed(s));
|
|
53
53
|
},
|
|
54
54
|
onFinish: () => {
|
|
55
55
|
v(o);
|
|
@@ -62,7 +62,7 @@ function nt(R, U) {
|
|
|
62
62
|
countUp: N,
|
|
63
63
|
getRootDOMNode: () => g.current
|
|
64
64
|
}));
|
|
65
|
-
const { int:
|
|
65
|
+
const { int: k, decimal: x } = X(() => {
|
|
66
66
|
let n = e;
|
|
67
67
|
f && (n = z(e).format(f)), c(s) && s >= 0 && (n = Number(e).toFixed(s));
|
|
68
68
|
let o = String(n).split(".")[0];
|
|
@@ -71,16 +71,16 @@ function nt(R, U) {
|
|
|
71
71
|
int: o,
|
|
72
72
|
decimal: h
|
|
73
73
|
};
|
|
74
|
-
}, [f, w, s, e]),
|
|
74
|
+
}, [f, w, s, e]), E = A(F) ? F : (n, o) => o, b = c(Number(e)), C = /* @__PURE__ */ l(L, { children: [
|
|
75
75
|
p != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: p }) : null,
|
|
76
|
-
|
|
76
|
+
E(e, b ? k : e)
|
|
77
77
|
] });
|
|
78
78
|
return /* @__PURE__ */ l(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
81
|
className: tt(`${r}`, { [`${r}-rtl`]: j }, M),
|
|
82
82
|
style: q,
|
|
83
|
-
...et(
|
|
83
|
+
...et(_, ["value", "countUp", "countFrom", "countDuration"]),
|
|
84
84
|
ref: g,
|
|
85
85
|
children: [
|
|
86
86
|
S && /* @__PURE__ */ a("div", { className: `${r}-title`, children: S }),
|
|
@@ -89,15 +89,15 @@ function nt(R, U) {
|
|
|
89
89
|
Z,
|
|
90
90
|
{
|
|
91
91
|
animation: !0,
|
|
92
|
-
loading: !!
|
|
92
|
+
loading: !!P,
|
|
93
93
|
text: { rows: 1, width: "100%" },
|
|
94
|
-
children: /* @__PURE__ */ l("div", { className: `${r}-value`, style:
|
|
95
|
-
b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children:
|
|
94
|
+
children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: I, children: [
|
|
95
|
+
b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
|
|
96
96
|
x !== void 0 || u ? /* @__PURE__ */ l(
|
|
97
97
|
"span",
|
|
98
98
|
{
|
|
99
99
|
className: `${r}-value-decimal`,
|
|
100
|
-
style:
|
|
100
|
+
style: O,
|
|
101
101
|
children: [
|
|
102
102
|
c(Number(e)) && x !== void 0 && `.${x}`,
|
|
103
103
|
u != null ? /* @__PURE__ */ a("span", { className: `${r}-value-suffix`, children: u }) : null
|