@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/skeleton/Text.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const { style:
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
return
|
|
9
|
-
if (
|
|
10
|
-
return
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import f from "lodash/isArray";
|
|
3
|
+
import u from "@unicom-cloud/utils/class-name";
|
|
4
|
+
function N(i) {
|
|
5
|
+
const { style: l, width: s = "60%", rows: e = 3, className: c, prefixCls: r } = i, m = u(`${r}-text`, c), o = [];
|
|
6
|
+
function n(t) {
|
|
7
|
+
if (f(s))
|
|
8
|
+
return s[t];
|
|
9
|
+
if (e - 1 === t)
|
|
10
|
+
return s;
|
|
11
11
|
}
|
|
12
|
-
for (let t = 0; t <
|
|
12
|
+
for (let t = 0; t < e; t++)
|
|
13
13
|
o.push(
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ a(
|
|
15
15
|
"li",
|
|
16
16
|
{
|
|
17
|
-
className: `${
|
|
18
|
-
style: { width:
|
|
17
|
+
className: `${r}-text-row`,
|
|
18
|
+
style: { width: n(t) }
|
|
19
19
|
},
|
|
20
20
|
t
|
|
21
21
|
)
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ a("ul", { className: m, style: l, children: o });
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
N as default
|
|
27
27
|
};
|
package/skeleton/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import C from "lodash/isPlainObject";
|
|
3
3
|
import S, { forwardRef as j, useContext as v } from "react";
|
|
4
|
-
import { a as b } from "../chunk/
|
|
4
|
+
import { a as b } from "../chunk/CQvM33Vg.js";
|
|
5
5
|
import { u as y } from "../chunk/BFTV6myl.js";
|
|
6
|
-
import
|
|
6
|
+
import R from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { a as w } from "../chunk/ClqoGc3r.js";
|
|
8
8
|
import A from "./Image.js";
|
|
9
9
|
import D from "./Text.js";
|
|
10
10
|
function c(o) {
|
|
11
|
-
return
|
|
11
|
+
return C(o) ? o : {};
|
|
12
12
|
}
|
|
13
13
|
const F = {
|
|
14
14
|
text: !0,
|
|
@@ -19,7 +19,7 @@ function I(o, l) {
|
|
|
19
19
|
o,
|
|
20
20
|
F,
|
|
21
21
|
r == null ? void 0 : r.Skeleton
|
|
22
|
-
), { style: d, className: u, animation: g, loading: x, image: i, text: a, children: h } = s, n = c(i),
|
|
22
|
+
), { style: d, className: u, animation: g, loading: x, image: i, text: a, children: h } = s, n = c(i), N = c(a), t = p("skeleton"), P = R(
|
|
23
23
|
t,
|
|
24
24
|
{
|
|
25
25
|
[`${t}-animate`]: g,
|
|
@@ -30,19 +30,19 @@ function I(o, l) {
|
|
|
30
30
|
function m() {
|
|
31
31
|
return i && /* @__PURE__ */ e("div", { className: `${t}-header`, children: /* @__PURE__ */ e(A, { prefixCls: t, ...n }) });
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return a && /* @__PURE__ */ e("div", { className: `${t}-content`, children: /* @__PURE__ */ e(D, { prefixCls: t, ...
|
|
33
|
+
function $() {
|
|
34
|
+
return a && /* @__PURE__ */ e("div", { className: `${t}-content`, children: /* @__PURE__ */ e(D, { prefixCls: t, ...N }) });
|
|
35
35
|
}
|
|
36
|
-
return /* @__PURE__ */ e(S.Fragment, { children: x ? /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ e(S.Fragment, { children: x ? /* @__PURE__ */ k(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
...w(s),
|
|
40
|
-
className:
|
|
40
|
+
className: P,
|
|
41
41
|
style: d,
|
|
42
42
|
ref: l,
|
|
43
43
|
children: [
|
|
44
44
|
n.position !== "right" && m(),
|
|
45
|
-
|
|
45
|
+
$(),
|
|
46
46
|
n.position === "right" && m()
|
|
47
47
|
]
|
|
48
48
|
}
|
package/slider/Button.js
CHANGED
|
@@ -3,11 +3,11 @@ import w from "lodash/isFunction";
|
|
|
3
3
|
import W from "lodash/isNumber";
|
|
4
4
|
import q from "lodash/isString";
|
|
5
5
|
import G, { useState as H, useContext as J, useMemo as B, useRef as g, useEffect as Q } from "react";
|
|
6
|
-
import { a as Z } from "../chunk/
|
|
7
|
-
import { u as _ } from "../chunk/
|
|
8
|
-
import { u as tt } from "../chunk/
|
|
6
|
+
import { a as Z } from "../chunk/CQvM33Vg.js";
|
|
7
|
+
import { u as _ } from "../chunk/BYdIoY50.js";
|
|
8
|
+
import { u as tt } from "../chunk/CXPOj2uy.js";
|
|
9
9
|
import et from "../trigger/index.js";
|
|
10
|
-
import
|
|
10
|
+
import L from "@unicom-cloud/utils/class-name";
|
|
11
11
|
import { on as u, off as a } from "../utils/dom.js";
|
|
12
12
|
const nt = { maxWidth: 350 }, ot = {
|
|
13
13
|
enter: 300,
|
package/slider/Dot.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import d from "lodash/isFunction";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import u from "lodash/isPlainObject";
|
|
4
|
+
import p from "react";
|
|
5
|
+
import v from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import { formatPercent as g, getIntervalOffset as D, valueInRange as h } from "./util.js";
|
|
7
7
|
const w = function(e) {
|
|
8
8
|
const {
|
|
9
|
-
data:
|
|
9
|
+
data: s = [],
|
|
10
10
|
valueRange: m = [],
|
|
11
11
|
vertical: l,
|
|
12
12
|
prefixCls: o,
|
|
13
|
-
reverse:
|
|
13
|
+
reverse: n,
|
|
14
14
|
intervalConfigs: f
|
|
15
15
|
} = e;
|
|
16
|
-
return
|
|
16
|
+
return s.length ? /* @__PURE__ */ a("div", { className: `${o}-dots`, children: s.map(({ key: t, content: r }) => {
|
|
17
17
|
const i = g(D(+t, f));
|
|
18
18
|
return /* @__PURE__ */ a(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
21
|
className: `${o}-dot-wrapper`,
|
|
22
22
|
style: {
|
|
23
|
-
...l ? { [
|
|
23
|
+
...l ? { [n ? "top" : "bottom"]: i } : { [n ? "right" : "left"]: i }
|
|
24
24
|
},
|
|
25
25
|
onMouseDown: (c) => {
|
|
26
26
|
c.stopPropagation(), d(e.onMouseDown) && e.onMouseDown(parseFloat(t));
|
|
27
27
|
},
|
|
28
|
-
children:
|
|
28
|
+
children: u(r) && r.dot ? r.dot : /* @__PURE__ */ a(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
className: v(`${o}-dot`, {
|
|
@@ -37,7 +37,7 @@ const w = function(e) {
|
|
|
37
37
|
t
|
|
38
38
|
);
|
|
39
39
|
}) }) : null;
|
|
40
|
-
}, b =
|
|
40
|
+
}, b = p.memo(w);
|
|
41
41
|
export {
|
|
42
42
|
b as default
|
|
43
43
|
};
|
package/slider/Input.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import { jsxs as y, jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import B, { useState as V, useEffect as b, createElement as N } from "react";
|
|
3
3
|
import { InputNumber as d } from "../input/Input.js";
|
|
4
|
-
import
|
|
4
|
+
import R from "@unicom-cloud/utils/class-name";
|
|
5
5
|
const S = function(C) {
|
|
6
6
|
const {
|
|
7
7
|
value: u,
|
|
8
|
-
range:
|
|
8
|
+
range: i,
|
|
9
9
|
min: g,
|
|
10
10
|
max: I,
|
|
11
11
|
step: $,
|
|
12
12
|
disabled: j,
|
|
13
|
-
prefixCls:
|
|
14
|
-
onChange:
|
|
15
|
-
extra:
|
|
16
|
-
} = C,
|
|
13
|
+
prefixCls: a,
|
|
14
|
+
onChange: m,
|
|
15
|
+
extra: r = []
|
|
16
|
+
} = C, l = {
|
|
17
17
|
min: g,
|
|
18
18
|
max: I,
|
|
19
19
|
step: $,
|
|
20
20
|
disabled: j
|
|
21
|
-
}, [
|
|
21
|
+
}, [c, p] = V(u), n = r[0], t = i ? r[1] : r[0];
|
|
22
22
|
b(() => {
|
|
23
|
-
|
|
23
|
+
p(u);
|
|
24
24
|
}, [u]);
|
|
25
25
|
const f = (e) => {
|
|
26
|
-
|
|
26
|
+
m == null || m(e);
|
|
27
27
|
}, k = () => {
|
|
28
|
-
|
|
28
|
+
p([...u].sort((e, o) => e - o));
|
|
29
29
|
};
|
|
30
30
|
return /* @__PURE__ */ y(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
-
className: R(`${
|
|
34
|
-
[`${
|
|
33
|
+
className: R(`${a}-input`, {
|
|
34
|
+
[`${a}-input-group`]: i
|
|
35
35
|
}),
|
|
36
36
|
onBlur: k,
|
|
37
37
|
children: [
|
|
38
|
-
|
|
38
|
+
i && [
|
|
39
39
|
/* @__PURE__ */ N(
|
|
40
40
|
d,
|
|
41
41
|
{
|
|
42
42
|
hideControl: !0,
|
|
43
43
|
...n,
|
|
44
|
-
...
|
|
45
|
-
value:
|
|
44
|
+
...l,
|
|
45
|
+
value: c[0],
|
|
46
46
|
key: 0,
|
|
47
47
|
onChange: (e, o) => {
|
|
48
48
|
var s;
|
|
49
|
-
isNaN(e) && e !== e || (f([e,
|
|
49
|
+
isNaN(e) && e !== e || (f([e, c[1]]), (s = n == null ? void 0 : n.onChange) == null || s.call(n, e, o));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */ h("div", { className: `${
|
|
53
|
+
/* @__PURE__ */ h("div", { className: `${a}-input-range`, children: /* @__PURE__ */ h("span", { className: `${a}-input-range-content` }) }, 1)
|
|
54
54
|
],
|
|
55
55
|
/* @__PURE__ */ N(
|
|
56
56
|
d,
|
|
57
57
|
{
|
|
58
58
|
hideControl: !0,
|
|
59
59
|
...t,
|
|
60
|
-
...
|
|
60
|
+
...l,
|
|
61
61
|
key: 2,
|
|
62
|
-
value:
|
|
62
|
+
value: c[1],
|
|
63
63
|
onChange: (e, o) => {
|
|
64
64
|
var s;
|
|
65
|
-
isNaN(e) && e !== e || (f([
|
|
65
|
+
isNaN(e) && e !== e || (f([c[0], e]), (s = t == null ? void 0 : t.onChange) == null || s.call(t, e, o));
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
)
|
package/slider/Tick.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { plus as M } from "
|
|
3
|
-
import A, { useMemo as
|
|
4
|
-
import
|
|
5
|
-
import { formatPercent as
|
|
6
|
-
function
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { plus as M } from "@unicom-cloud/utils/math";
|
|
3
|
+
import A, { useMemo as N } from "react";
|
|
4
|
+
import R from "@unicom-cloud/utils/class-name";
|
|
5
|
+
import { formatPercent as $, getIntervalOffset as b, valueInRange as y } from "./util.js";
|
|
6
|
+
function I(p) {
|
|
7
7
|
const {
|
|
8
8
|
min: l,
|
|
9
9
|
max: u,
|
|
@@ -17,20 +17,20 @@ function N(p) {
|
|
|
17
17
|
for (let a = 0; a <= x; a++) {
|
|
18
18
|
const o = M(a * s, f);
|
|
19
19
|
if (o <= l || o >= u) continue;
|
|
20
|
-
const
|
|
21
|
-
c.set(
|
|
22
|
-
offset:
|
|
23
|
-
isActive:
|
|
20
|
+
const m = $(b(o, e));
|
|
21
|
+
c.set(m, {
|
|
22
|
+
offset: m,
|
|
23
|
+
isActive: y(o, v)
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
}, k =
|
|
26
|
+
}, k = N(() => {
|
|
27
27
|
var t;
|
|
28
28
|
return c.clear(), (t = e == null ? void 0 : e.forEach) == null || t.call(e, (s) => h(s)), Array.from(c.values());
|
|
29
29
|
}, [e]);
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ i("div", { className: `${r}-ticks`, children: k.map((t, s) => /* @__PURE__ */ i(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
-
className:
|
|
33
|
+
className: R(`${r}-tick`, {
|
|
34
34
|
[`${r}-tick-active`]: t.isActive
|
|
35
35
|
}),
|
|
36
36
|
style: d ? { [n ? "top" : "bottom"]: t.offset } : { [n ? "right" : "left"]: t.offset }
|
|
@@ -38,7 +38,7 @@ function N(p) {
|
|
|
38
38
|
s
|
|
39
39
|
)) });
|
|
40
40
|
}
|
|
41
|
-
const O = A.memo(
|
|
41
|
+
const O = A.memo(I);
|
|
42
42
|
export {
|
|
43
43
|
O as default
|
|
44
44
|
};
|