@unicom-cloud/ui 0.8.72 → 0.8.74
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 +3 -3
- package/BackTop.js +4 -4
- package/Badge.js +3 -3
- package/Breadcrumb.js +4 -4
- package/Button.js +2 -2
- package/Calendar.js +3 -3
- 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 +2 -2
- package/Comment.js +2 -2
- package/ConfigProvider.js +1 -1
- package/Copy.js +3 -3
- 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 +2 -2
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/InputNumber.js +2 -2
- package/Layout.js +2 -2
- package/Link.js +2 -2
- package/List.js +3 -3
- package/Mentions.js +3 -3
- package/Menu.js +1 -1
- package/Message.js +7 -6
- package/Modal.js +1 -1
- package/Notice.js +5 -5
- package/Notification.js +8 -7
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- 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/SelectView.js +5 -4
- package/Skeleton.js +2 -2
- package/Slider.js +4 -4
- package/Space.js +2 -2
- package/SpeechSynthesis.js +21 -21
- package/Spin.js +3 -3
- package/Statistic.js +3 -3
- package/Steps.js +2 -2
- package/Switch.js +8 -6
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +2 -2
- package/Tooltip.js +4 -4
- package/Transfer.js +3 -3
- package/Tree.js +1 -1
- package/Trigger.js +9 -8
- package/affix/index.js +3 -3
- package/alert/index.js +9 -9
- package/anchor/Anchor.js +62 -59
- package/anchor/Link.js +2 -2
- package/anchor/util.js +2 -2
- package/auto-complete/index.js +3 -3
- package/avatar/Avatar.js +2 -2
- package/avatar/Group.js +2 -2
- package/back-top/index.js +11 -11
- package/badge/Count.js +7 -7
- package/badge/index.js +52 -50
- package/breadcrumb/Item.js +6 -6
- package/breadcrumb/index.js +4 -4
- package/button/Group.js +2 -2
- package/button/index.js +2 -2
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +1 -1
- package/calendar/index.js +4 -4
- package/card/Grid.js +5 -5
- package/card/Meta.js +4 -4
- package/card/index.js +2 -2
- package/carousel/Arrow.js +2 -2
- package/carousel/Indicator.js +6 -6
- package/carousel/index.js +2 -2
- package/cascader/Cascader.js +5 -5
- 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/index.js +1 -1
- package/chunk/{6nKl68Er.js → 9we0Q8Kh.js} +4 -4
- package/chunk/{b1e8awfs.js → B0n0iRhF.js} +1 -1
- package/chunk/{Cf4qn5jY.js → BDZpJpz-.js} +3 -3
- package/chunk/BFmckYou.js +25 -0
- package/chunk/{fFjj2KuF.js → BJ9_azwQ.js} +493 -515
- package/chunk/{BnWo0OJ0.js → Bd9zhOZS.js} +9 -9
- package/chunk/{uKZyjtff.js → BhBEMwvI.js} +21 -20
- package/chunk/{Bfq4YEcr.js → Bmvhjhzq.js} +9 -8
- package/chunk/{CdAuhef7.js → BoUHPeG7.js} +2 -2
- package/chunk/BpYX5PN4.js +27 -0
- package/chunk/{CP7Ac47f.js → Bu8A2l60.js} +4 -4
- package/chunk/{URXCKjXr.js → C0pRaDCf.js} +23 -23
- package/chunk/CUFsOxJ2.js +10 -0
- package/chunk/CWjvjpyc.js +873 -0
- package/chunk/{ClaNycDy.js → Cc_-i0o_.js} +2 -2
- package/chunk/Coz3rCng.js +33 -0
- package/chunk/{BHL-PzAD.js → CplLA01W.js} +17 -17
- package/chunk/{Cgbja_v_.js → Crs3isAx.js} +14 -13
- package/chunk/{Ey4YJCkX.js → D0Dlbc2g.js} +2 -1
- package/chunk/{y9unmTx_.js → D5UfU6-H.js} +127 -127
- package/chunk/DAAff-FT.js +59 -0
- package/chunk/{rp1MtSd0.js → DJ8rDYjb.js} +4 -4
- package/chunk/{AwZqeapI.js → DRTWRsgI.js} +1 -1
- package/chunk/DU1RCDfh.js +29 -0
- package/chunk/{CAVVFFyZ.js → DdT3C0ih.js} +6 -8
- package/chunk/{CdaT1b_F.js → DeV0v__J.js} +2 -2
- package/chunk/{IUjEMHU1.js → Dn7KbmZ7.js} +194 -191
- package/chunk/{DpoumMDw.js → DohlrJ4S.js} +1 -1
- package/chunk/{BDHuWwhT.js → NmSLBKjp.js} +3 -3
- package/chunk/{DV7ywe_q.js → RS6OAxzv.js} +2 -2
- package/chunk/{Biupwn8l.js → ZrBrCzQX.js} +6 -5
- package/chunk/_L2dKF58.js +647 -0
- package/chunk/{BJ1soa2K.js → uEGHykhe.js} +18 -18
- package/chunk/{D090jlwP.js → xAb6ZgqS.js} +1 -1
- package/collapse/Collapse.js +4 -4
- package/collapse/Item.js +4 -4
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +2 -2
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +8 -8
- package/color-picker/InputRgb.js +6 -6
- package/color-picker/Palette.js +2 -2
- package/color-picker/Panel.js +17 -17
- package/color-picker/colors.js +20 -9
- package/color-picker/index.js +21 -21
- package/color-picker/utils.js +1 -1
- package/comment/index.js +6 -6
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +16 -16
- package/date-picker/Picker.js +2 -2
- package/date-picker/PickerRange.js +3 -3
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +3 -3
- package/divider/index.js +5 -5
- package/draggable/Item.js +1 -1
- package/draggable/index.js +9 -9
- package/drawer/Drawer.js +122 -112
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +5 -5
- package/empty/index.js +2 -2
- package/form/Control.js +1 -1
- package/form/Form.js +3 -3
- package/form/FormItem.js +3 -3
- package/form/FormLabel.js +9 -9
- package/form/promisify.js +9 -8
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +2 -2
- package/grid/Row.js +3 -3
- package/grid/grid-item.js +3 -3
- package/grid/grid.js +9 -9
- package/hooks/index.js +5 -5
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/useVerificationCode.js +2 -2
- package/icon/index.js +11 -11
- package/icon-hover/index.js +2 -2
- package/image/Image.js +6 -6
- package/image/ImageFooter.js +2 -2
- package/image/ImagePreview.js +10 -10
- package/image/ImagePreviewArrow.js +4 -4
- package/image/ImagePreviewGroup.js +2 -2
- package/image/ImagePreviewToolbar.js +1 -1
- package/image/TriggerForToolbar.js +4 -4
- package/image/index.js +1 -1
- package/index.js +585 -575
- package/input/Group.js +4 -4
- package/input/Input.js +5 -4
- package/input/InputElement.js +4 -4
- package/input/Password.js +3 -3
- package/input/Search.js +3 -3
- package/input/Textarea.js +7 -6
- package/input-number/index.js +2 -2
- package/input-tag/InputTag.js +53 -51
- package/layout/Content.js +2 -2
- package/layout/Footer.js +5 -5
- package/layout/Header.js +4 -4
- package/layout/Sider.js +4 -4
- package/layout/index.js +2 -2
- package/link/index.js +5 -5
- package/list/Item.js +2 -2
- package/list/Meta.js +4 -4
- package/list/index.js +3 -3
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +3 -3
- package/menu/Item.js +6 -6
- package/menu/ItemGroup.js +1 -1
- package/menu/Menu.js +4 -4
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +7 -6
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +9 -8
- package/modal/index.js +1 -1
- package/notice/index.js +5 -5
- package/notification/index.js +8 -7
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +6 -6
- package/overflow-ellipsis/index.js +8 -8
- package/package.json +1 -1
- package/page-header/index.js +2 -2
- package/pagination/PageItem.js +2 -2
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +24 -24
- package/picker/Input.js +7 -7
- package/picker/InputRange.js +9 -9
- package/popconfirm/index.js +3 -3
- package/popover/index.js +3 -3
- package/progress/CircleProgress.js +7 -7
- package/progress/LineProgess.js +1 -1
- package/progress/StepProgress.js +7 -7
- package/progress/index.js +8 -8
- package/radio/Group.js +4 -4
- package/radio/Radio.js +4 -4
- package/radio/index.js +2 -2
- package/rate/index.js +27 -27
- package/resize-box/ResizeTrigger.js +26 -25
- package/resize-box/Split.js +12 -12
- package/resize-box/SplitGroup.js +2 -2
- package/resize-box/index.js +3 -3
- package/result/index.js +9 -9
- package/select/Option.js +2 -2
- package/select/Select.js +6 -5
- package/select/util.js +12 -12
- package/select-view/Core.js +29 -29
- package/select-view/index.js +3 -2
- package/skeleton/Image.js +4 -4
- package/skeleton/Text.js +7 -7
- package/skeleton/index.js +2 -2
- package/slider/Button.js +3 -3
- package/slider/Dot.js +5 -5
- package/slider/Input.js +12 -12
- package/slider/Tick.js +7 -7
- package/slider/index.js +20 -20
- package/slider/util.js +8 -8
- package/space/index.js +12 -12
- package/speech-synthesis/index.js +21 -21
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +3 -3
- package/statistic/Countdown.js +7 -7
- package/statistic/index.js +20 -20
- package/steps/Step.js +1 -1
- package/steps/index.js +2 -2
- package/style/variables.less +1 -1
- package/style.css +1 -1
- package/switch/index.js +17 -15
- package/table/Table.js +4 -4
- package/table/index.js +4 -4
- package/tabs/Tab.js +4 -4
- package/tabs/TabContent.js +3 -3
- package/tabs/TabPane.js +2 -2
- package/tabs/index.js +2 -2
- package/tag/index.js +6 -6
- package/time-picker/Picker.js +2 -2
- package/time-picker/TimeColumn.js +7 -7
- package/time-picker/TimePicker.js +23 -23
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +2 -2
- package/timeline/Timeline.js +2 -2
- package/tooltip/index.js +4 -4
- package/transfer/Item.js +3 -3
- package/transfer/List.js +3 -3
- package/transfer/index.js +3 -3
- package/tree/Animation.js +3 -3
- package/tree/Node.js +4 -4
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +4 -4
- package/tree/index.js +1 -1
- package/tree-select/Select.js +25 -25
- package/trigger/getPopupStyle.js +2 -2
- package/trigger/index.js +8 -7
- package/types/badge/interface.d.ts +1 -0
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/drawer/interface.d.ts +10 -0
- package/types/index.d.ts +0 -7
- package/types/modal/Confirm.d.ts +1 -0
- package/types/utils/PqbCSSTransition.d.ts +3 -0
- package/types/utils/caseName.d.ts +1 -0
- package/types/utils/className.d.ts +1 -0
- package/types/utils/color.d.ts +1 -0
- package/types/utils/computeScrollIntoView.d.ts +1 -0
- package/types/utils/contextHolder.d.ts +1 -0
- package/types/utils/copy.d.ts +1 -0
- package/types/utils/fileToURL.d.ts +1 -0
- package/types/utils/fillNBSP.d.ts +1 -0
- package/types/utils/getHighlightText.d.ts +1 -0
- package/types/utils/getHotkeyHandler.d.ts +1 -0
- package/types/utils/getStringLength.d.ts +1 -0
- package/types/utils/include.d.ts +1 -0
- package/types/utils/index.d.ts +29 -25
- package/types/utils/is.d.ts +1 -1
- package/types/utils/keyboardCode.d.ts +1 -0
- package/types/utils/math.d.ts +1 -0
- package/types/utils/mergeProps.d.ts +1 -0
- package/types/utils/mergedToString.d.ts +1 -0
- package/types/utils/names.d.ts +497 -81
- package/types/utils/omit.d.ts +1 -0
- package/types/utils/pick.d.ts +1 -1
- package/types/utils/reactTransitionGroup.d.ts +1 -0
- package/types/utils/responsiveObserve.d.ts +1 -0
- package/types/utils/saveAs.d.ts +1 -0
- package/types/utils/screenfull.d.ts +1 -0
- package/types/utils/scrollIntoView.d.ts +1 -0
- package/types/utils/tinycolor.d.ts +1 -0
- package/types/utils/tree.d.ts +1 -0
- package/types/utils/tween.d.ts +1 -0
- package/types/utils/uuid.d.ts +1 -0
- package/types/utils/validate.d.ts +1 -0
- package/types/version/index.d.ts +1 -1
- package/typography/Base.js +7 -6
- package/typography/EditContent.js +1 -1
- package/typography/Ellipsis.js +28 -28
- package/typography/Paragraph.js +6 -6
- package/typography/Typography.js +5 -5
- package/typography/index.js +28 -28
- package/upload/TriggerNode.js +2 -2
- package/upload/Upload.js +62 -60
- package/upload/Uploader.js +21 -21
- package/upload/request_.js +4 -3
- package/utils/PqbCSSTransition.js +5 -0
- package/utils/caseName.js +3 -2
- package/utils/className.js +3 -2
- package/utils/color.js +4 -0
- package/utils/computeScrollIntoView.js +128 -0
- package/utils/contextHolder.js +3 -2
- package/utils/copy.js +4 -2
- package/utils/fileToURL.js +3 -2
- package/utils/fillNBSP.js +2 -1
- package/utils/getHighlightText.js +2 -1
- package/utils/getHotkeyHandler.js +2 -1
- package/utils/getStringLength.js +2 -1
- package/utils/include.js +2 -1
- package/utils/index.js +299 -256
- package/utils/is.js +104 -101
- package/utils/keyboardCode.js +2 -1
- package/utils/math.js +35 -0
- package/utils/mergeProps.js +2 -1
- package/utils/mergedToString.js +2 -1
- package/utils/names.js +332 -81
- package/utils/omit.js +2 -1
- package/utils/pick.js +1 -0
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/reactTransitionGroup.js +10 -0
- package/utils/responsiveObserve.js +2 -1
- package/utils/saveAs.js +3 -2
- package/utils/screenfull.js +2 -1
- package/utils/scrollIntoView.js +4 -2
- package/utils/tinycolor.js +30 -0
- package/utils/tree.js +87 -0
- package/utils/tween.js +6 -0
- package/utils/uuid.js +5 -0
- package/utils/validate.js +7 -0
- package/verification-code/VerificationCode.js +7 -7
- package/version/index.js +3 -3
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +6 -6
- package/chunk/B4JiMp8I.js +0 -764
- package/chunk/B6X4lnd0.js +0 -116
- package/chunk/BibHFOCF.js +0 -34
- package/chunk/CTxjmYmx.js +0 -19
- package/chunk/CVYWxu00.js +0 -155
- package/chunk/CbLaCJmG.js +0 -26
- package/chunk/D-TPB2Do.js +0 -56
- package/chunk/DVfOiRp-.js +0 -629
- package/chunk/DxxOUMSa.js +0 -98
- package/chunk/JPPo5nY_.js +0 -9
- package/types/utils/CSSTransition.d.ts +0 -2
- package/utils/CSSTransition.js +0 -4
package/select/util.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
+
import { y as F } from "../chunk/C0pRaDCf.js";
|
|
3
3
|
import _ from "lodash/get";
|
|
4
4
|
import T from "lodash/isArray";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import I from "lodash/isNil";
|
|
6
|
+
import N from "lodash/isNumber";
|
|
7
7
|
import L from "lodash/isPlainObject";
|
|
8
|
-
import
|
|
8
|
+
import U from "lodash/isString";
|
|
9
9
|
import u from "react";
|
|
10
|
-
import { f as
|
|
11
|
-
import { g as
|
|
10
|
+
import { f as j } from "../chunk/CftuXmo_.js";
|
|
11
|
+
import { g as z } from "../chunk/B7M-FGia.js";
|
|
12
12
|
import D from "./Option.js";
|
|
13
13
|
function se(r) {
|
|
14
14
|
var o;
|
|
15
15
|
(o = r == null ? void 0 : r.preventDefault) == null || o.call(r);
|
|
16
16
|
}
|
|
17
17
|
function Q(r, o) {
|
|
18
|
-
return o ? !T(r) ||
|
|
18
|
+
return o ? !T(r) || F(r) : I(r);
|
|
19
19
|
}
|
|
20
20
|
function oe(r, o, m) {
|
|
21
21
|
return m && (o ? r = Array.isArray(r) ? r.map(
|
|
@@ -77,18 +77,18 @@ function H({
|
|
|
77
77
|
typeof e.props.children != "string" && (g = !0);
|
|
78
78
|
}, O = (e, s) => {
|
|
79
79
|
s && T(e) && e.length && e.forEach((t) => {
|
|
80
|
-
(
|
|
80
|
+
(U(t) || N(t)) && (t = {
|
|
81
81
|
label: t,
|
|
82
82
|
value: t
|
|
83
83
|
});
|
|
84
|
-
const n = /* @__PURE__ */
|
|
84
|
+
const n = /* @__PURE__ */ B(
|
|
85
85
|
D,
|
|
86
86
|
{
|
|
87
87
|
_key: y(t),
|
|
88
88
|
value: t.value,
|
|
89
89
|
disabled: t.disabled === !0,
|
|
90
90
|
extra: t.extra,
|
|
91
|
-
children:
|
|
91
|
+
children: j(t.label)
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
A(n, s, t);
|
|
@@ -119,7 +119,7 @@ function H({
|
|
|
119
119
|
})
|
|
120
120
|
);
|
|
121
121
|
}), O(o, "options"), O(G, "userCreatedOptions"), {
|
|
122
|
-
childrenList:
|
|
122
|
+
childrenList: z({
|
|
123
123
|
nodeList: p,
|
|
124
124
|
pattern: i,
|
|
125
125
|
highlightClassName: `${E}-highlight`
|
package/select-view/Core.js
CHANGED
|
@@ -5,20 +5,20 @@ import eo from "@unicom-cloud/icons/IconUiDown";
|
|
|
5
5
|
import oo from "@unicom-cloud/icons/IconUiLoading";
|
|
6
6
|
import ro from "@unicom-cloud/icons/IconUiSearch";
|
|
7
7
|
import no from "lodash/isFunction";
|
|
8
|
-
import
|
|
9
|
-
import { a as to, I as so } from "../chunk/
|
|
8
|
+
import pe from "lodash/isUndefined";
|
|
9
|
+
import { a as to, I as so } from "../chunk/Crs3isAx.js";
|
|
10
10
|
import { u as ao } from "../chunk/CQ_WOOmf.js";
|
|
11
11
|
import { u as lo } from "../chunk/BsY85n3_.js";
|
|
12
12
|
import co from "../input-tag/InputTag.js";
|
|
13
13
|
import io from "../input/InputElement.js";
|
|
14
14
|
import uo from "../popover/index.js";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
15
|
+
import fe from "../tag/index.js";
|
|
16
|
+
import { p as k } from "../chunk/CUFsOxJ2.js";
|
|
17
17
|
import { f as me } from "../chunk/CftuXmo_.js";
|
|
18
|
-
import { i as
|
|
19
|
-
import "../chunk/
|
|
20
|
-
import { e as
|
|
21
|
-
import "../chunk/
|
|
18
|
+
import { i as po } from "../chunk/CYhxqVkn.js";
|
|
19
|
+
import "../chunk/DAAff-FT.js";
|
|
20
|
+
import { e as fo, t as mo } from "../chunk/BrOW642m.js";
|
|
21
|
+
import "../chunk/C0pRaDCf.js";
|
|
22
22
|
import C from "lodash/isPlainObject.js";
|
|
23
23
|
import he from "lodash/isNumber.js";
|
|
24
24
|
const J = "__pqb_value_tag_placeholder", I = {
|
|
@@ -47,7 +47,7 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
47
47
|
renderText: ee,
|
|
48
48
|
value: g,
|
|
49
49
|
inputValue: F,
|
|
50
|
-
popupVisible:
|
|
50
|
+
popupVisible: f,
|
|
51
51
|
maxTagCount: l,
|
|
52
52
|
isMultiple: w,
|
|
53
53
|
isEmptyValue: O,
|
|
@@ -66,29 +66,29 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
66
66
|
onRemoveCheckedItem: z,
|
|
67
67
|
onSort: B,
|
|
68
68
|
...Oe
|
|
69
|
-
} = v, N = ue(null), m = ue(null), { size: Re, getPrefixCls: re } = qe(to), [Me, ne] = de(I.NONE), [L, te] = de(!1), Ae = ao(), T = "showSearch" in v ? v.showSearch : w,
|
|
69
|
+
} = v, N = ue(null), m = ue(null), { size: Re, getPrefixCls: re } = qe(to), [Me, ne] = de(I.NONE), [L, te] = de(!1), Ae = ao(), T = "showSearch" in v ? v.showSearch : w, p = T || Ne, S = ve || Re, j = L || f, _e = C(T) && T.retainInputValue, b = !w && g !== void 0 ? ee(g).text : "", H = (e) => {
|
|
70
70
|
var o;
|
|
71
71
|
(o = e == null ? void 0 : e.preventDefault) == null || o.call(e);
|
|
72
72
|
}, G = (e) => {
|
|
73
|
-
const o =
|
|
73
|
+
const o = p ? N.current : m.current;
|
|
74
74
|
o && (e === "focus" ? o.focus() : o.blur());
|
|
75
75
|
}, y = (e, o) => {
|
|
76
|
-
|
|
76
|
+
p && o.target === m.current || (e === "focus" ? (te(!0), U == null || U(o)) : (te(!1), V == null || V(o)));
|
|
77
77
|
}, se = (e) => {
|
|
78
|
-
if (
|
|
78
|
+
if (p && e.currentTarget === m.current)
|
|
79
79
|
return;
|
|
80
|
-
e.key ===
|
|
80
|
+
e.key === fo.key && e.preventDefault(), A == null || A(e);
|
|
81
81
|
};
|
|
82
82
|
Xe(() => {
|
|
83
|
-
G(
|
|
84
|
-
}, [
|
|
83
|
+
G(f ? "focus" : "blur"), p && ne(f ? I.BEFORE : I.NONE);
|
|
84
|
+
}, [f]), Je(ge, () => ({
|
|
85
85
|
dom: m.current,
|
|
86
86
|
getRootDOMNode: () => m.current,
|
|
87
87
|
focus: G.bind(null, "focus"),
|
|
88
88
|
blur: G.bind(null, "blur"),
|
|
89
89
|
getWidth: () => m.current && m.current.clientWidth
|
|
90
90
|
}));
|
|
91
|
-
const Ue = "arrowIcon" in v ? Y === null ? null : /* @__PURE__ */ t("div", { className: `${r}-arrow-icon`, children: Y }) : /* @__PURE__ */ t("div", { className: `${r}-arrow-icon`, children: /* @__PURE__ */ t(eo, {}) }), Ve = $e ? /* @__PURE__ */ t("span", { className: `${r}-loading-icon`, children: /* @__PURE__ */ t(oo, {}) }) : Q ? /* @__PURE__ */ t("span", { className: `${r}-suffix-icon`, children: Q }) : v.showSearch &&
|
|
91
|
+
const Ue = "arrowIcon" in v ? Y === null ? null : /* @__PURE__ */ t("div", { className: `${r}-arrow-icon`, children: Y }) : /* @__PURE__ */ t("div", { className: `${r}-arrow-icon`, children: /* @__PURE__ */ t(eo, {}) }), Ve = $e ? /* @__PURE__ */ t("span", { className: `${r}-loading-icon`, children: /* @__PURE__ */ t(oo, {}) }) : Q ? /* @__PURE__ */ t("span", { className: `${r}-suffix-icon`, children: Q }) : v.showSearch && f ? /* @__PURE__ */ t("div", { className: `${r}-search-icon`, children: /* @__PURE__ */ t(ro, {}) }) : Ue, i = {
|
|
92
92
|
paste: De,
|
|
93
93
|
keyDown: se,
|
|
94
94
|
focus: (e) => {
|
|
@@ -113,14 +113,14 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
113
113
|
e = b;
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
|
-
const o = !!(j &&
|
|
116
|
+
const o = !!(j && p || O), s = {
|
|
117
117
|
style: { width: "100%" },
|
|
118
118
|
// _inputValue after renderText(value) may be rich text, but the value of <input> cannot be object
|
|
119
119
|
value: o && typeof e != "object" ? e : "",
|
|
120
120
|
// Allow placeholder to display the selected value first when searching
|
|
121
|
-
placeholder:
|
|
121
|
+
placeholder: p && b && typeof b != "object" ? b : Z
|
|
122
122
|
};
|
|
123
|
-
return
|
|
123
|
+
return p ? (s.onPaste = i.paste, s.onKeyDown = i.keyDown, s.onFocus = i.focus, s.onBlur = i.blur, s.onChange = i.change) : (s.tabIndex = -1, s.style.pointerEvents = "none"), /* @__PURE__ */ E("span", { className: `${r}-view-selector`, children: [
|
|
124
124
|
/* @__PURE__ */ t(
|
|
125
125
|
io,
|
|
126
126
|
{
|
|
@@ -150,11 +150,11 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
150
150
|
}, W = Qe(() => {
|
|
151
151
|
if (!w)
|
|
152
152
|
return [];
|
|
153
|
-
const e =
|
|
153
|
+
const e = pe(g) ? [] : [].concat(g);
|
|
154
154
|
return (he(ae) ? e.slice(0, ae) : e).map((P) => le(P));
|
|
155
155
|
}, [g, w, l, K]), Be = () => {
|
|
156
156
|
const e = C(l) ? l.count : l, o = C(l) && l.showPopover, s = re("input-tag"), P = (n) => C(l) && no(l.render) ? l.render(n) : e === "responsive" ? /* @__PURE__ */ E(
|
|
157
|
-
|
|
157
|
+
fe,
|
|
158
158
|
{
|
|
159
159
|
className: `${s}-tag`,
|
|
160
160
|
children: [
|
|
@@ -164,7 +164,7 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
164
164
|
]
|
|
165
165
|
},
|
|
166
166
|
J
|
|
167
|
-
) : `+${n}...`, x =
|
|
167
|
+
) : `+${n}...`, x = pe(g) ? [] : [].concat(g), He = () => {
|
|
168
168
|
for (let n = x.length - 1; n >= 0; n--) {
|
|
169
169
|
const c = x[n];
|
|
170
170
|
if (!K(c).disabled)
|
|
@@ -212,7 +212,7 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
212
212
|
a.index,
|
|
213
213
|
W.concat(c)
|
|
214
214
|
) : /* @__PURE__ */ Ye(
|
|
215
|
-
|
|
215
|
+
fe,
|
|
216
216
|
{
|
|
217
217
|
...d,
|
|
218
218
|
key: d.value,
|
|
@@ -297,7 +297,7 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
297
297
|
`${r}-${w ? "multiple" : "single"}`,
|
|
298
298
|
{
|
|
299
299
|
[`${r}-show-search`]: T,
|
|
300
|
-
[`${r}-open`]:
|
|
300
|
+
[`${r}-open`]: f,
|
|
301
301
|
[`${r}-size-${S}`]: S,
|
|
302
302
|
[`${r}-focused`]: j,
|
|
303
303
|
[`${r}-${ce}`]: ce,
|
|
@@ -313,10 +313,10 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
313
313
|
role: "combobox",
|
|
314
314
|
"aria-haspopup": "listbox",
|
|
315
315
|
"aria-autocomplete": "list",
|
|
316
|
-
"aria-expanded":
|
|
316
|
+
"aria-expanded": f,
|
|
317
317
|
"aria-disabled": h,
|
|
318
318
|
"aria-controls": Pe,
|
|
319
|
-
...
|
|
319
|
+
...po(Oe, ["onClick", "onMouseEnter", "onMouseLeave"]),
|
|
320
320
|
...ke,
|
|
321
321
|
ref: m,
|
|
322
322
|
tabIndex: h ? -1 : 0,
|
|
@@ -325,7 +325,7 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
325
325
|
className: je,
|
|
326
326
|
onKeyDown: se,
|
|
327
327
|
onFocus: (e) => {
|
|
328
|
-
!h && !oe && (
|
|
328
|
+
!h && !oe && (p ? N.current && N.current.focus() : y("focus", e));
|
|
329
329
|
},
|
|
330
330
|
onBlur: (e) => y("blur", e),
|
|
331
331
|
children: /* @__PURE__ */ E(
|
|
@@ -335,7 +335,7 @@ const J = "__pqb_value_tag_placeholder", I = {
|
|
|
335
335
|
className: k(`${r}-view`, {
|
|
336
336
|
[`${r}-view-with-prefix`]: R
|
|
337
337
|
}),
|
|
338
|
-
onClick: (e) =>
|
|
338
|
+
onClick: (e) => f && p && e.stopPropagation(),
|
|
339
339
|
children: [
|
|
340
340
|
R && /* @__PURE__ */ t(
|
|
341
341
|
"div",
|
package/select-view/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as p, jsxs as N } from "react/jsx-runtime";
|
|
2
2
|
import y, { useRef as V, useImperativeHandle as W } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../chunk/
|
|
3
|
+
import { p as b } from "../chunk/CUFsOxJ2.js";
|
|
4
|
+
import "../chunk/DAAff-FT.js";
|
|
5
5
|
import { a as x } from "../chunk/ClqoGc3r.js";
|
|
6
6
|
import C from "./Core.js";
|
|
7
|
+
import "../chunk/C0pRaDCf.js";
|
|
7
8
|
import S from "lodash/isPlainObject.js";
|
|
8
9
|
const R = (a, f) => {
|
|
9
10
|
const {
|
package/skeleton/Image.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
2
|
+
import { p } from "../chunk/CUFsOxJ2.js";
|
|
3
|
+
function f(m) {
|
|
4
4
|
const {
|
|
5
5
|
style: t,
|
|
6
6
|
shape: s = "square",
|
|
@@ -8,7 +8,7 @@ function n(m) {
|
|
|
8
8
|
position: i = "left",
|
|
9
9
|
className: o,
|
|
10
10
|
prefixCls: e
|
|
11
|
-
} = m, r =
|
|
11
|
+
} = m, r = p(
|
|
12
12
|
`${e}-image`,
|
|
13
13
|
{
|
|
14
14
|
[`${e}-image-${i}`]: i,
|
|
@@ -20,5 +20,5 @@ function n(m) {
|
|
|
20
20
|
return /* @__PURE__ */ l("div", { className: r, style: t });
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
f as default
|
|
24
24
|
};
|
package/skeleton/Text.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import m from "lodash/isArray";
|
|
3
|
+
import { p as u } from "../chunk/CUFsOxJ2.js";
|
|
4
4
|
function h(l) {
|
|
5
|
-
const { style: n, width: r = "60%", rows: s = 3, className: a, prefixCls: e } = l,
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
5
|
+
const { style: n, width: r = "60%", rows: s = 3, className: a, prefixCls: e } = l, c = u(`${e}-text`, a), o = [];
|
|
6
|
+
function f(t) {
|
|
7
|
+
if (m(r))
|
|
8
8
|
return r[t];
|
|
9
9
|
if (s - 1 === t)
|
|
10
10
|
return r;
|
|
@@ -15,12 +15,12 @@ function h(l) {
|
|
|
15
15
|
"li",
|
|
16
16
|
{
|
|
17
17
|
className: `${e}-text-row`,
|
|
18
|
-
style: { width:
|
|
18
|
+
style: { width: f(t) }
|
|
19
19
|
},
|
|
20
20
|
t
|
|
21
21
|
)
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */ i("ul", { className:
|
|
23
|
+
return /* @__PURE__ */ i("ul", { className: c, style: n, children: o });
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
26
|
h as default
|
package/skeleton/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as N } from "react/jsx-runtime";
|
|
2
2
|
import $ 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/Crs3isAx.js";
|
|
5
5
|
import { u as y } from "../chunk/BFTV6myl.js";
|
|
6
|
-
import {
|
|
6
|
+
import { p as R } from "../chunk/CUFsOxJ2.js";
|
|
7
7
|
import { a as w } from "../chunk/ClqoGc3r.js";
|
|
8
8
|
import A from "./Image.js";
|
|
9
9
|
import D from "./Text.js";
|
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/
|
|
6
|
+
import { a as Z } from "../chunk/Crs3isAx.js";
|
|
7
7
|
import { u as _ } from "../chunk/XTEsYGuF.js";
|
|
8
|
-
import { u as tt } from "../chunk/
|
|
8
|
+
import { u as tt } from "../chunk/DeV0v__J.js";
|
|
9
9
|
import et from "../trigger/index.js";
|
|
10
|
-
import {
|
|
10
|
+
import { p as L } from "../chunk/CUFsOxJ2.js";
|
|
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,8 +1,8 @@
|
|
|
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 p from "lodash/isPlainObject";
|
|
4
|
+
import u from "react";
|
|
5
|
+
import { p as v } from "../chunk/CUFsOxJ2.js";
|
|
6
6
|
import { formatPercent as g, getIntervalOffset as D, valueInRange as h } from "./util.js";
|
|
7
7
|
const w = function(e) {
|
|
8
8
|
const {
|
|
@@ -25,7 +25,7 @@ const w = function(e) {
|
|
|
25
25
|
onMouseDown: (c) => {
|
|
26
26
|
c.stopPropagation(), d(e.onMouseDown) && e.onMouseDown(parseFloat(t));
|
|
27
27
|
},
|
|
28
|
-
children:
|
|
28
|
+
children: p(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 = u.memo(w);
|
|
41
41
|
export {
|
|
42
42
|
b as default
|
|
43
43
|
};
|
package/slider/Input.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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 { p as R } from "../chunk/CUFsOxJ2.js";
|
|
5
5
|
const S = function(C) {
|
|
6
6
|
const {
|
|
7
7
|
value: u,
|
|
8
|
-
range:
|
|
8
|
+
range: a,
|
|
9
9
|
min: g,
|
|
10
10
|
max: I,
|
|
11
11
|
step: $,
|
|
12
12
|
disabled: j,
|
|
13
13
|
prefixCls: i,
|
|
14
|
-
onChange:
|
|
15
|
-
extra:
|
|
14
|
+
onChange: c,
|
|
15
|
+
extra: m = []
|
|
16
16
|
} = C, p = {
|
|
17
17
|
min: g,
|
|
18
18
|
max: I,
|
|
19
19
|
step: $,
|
|
20
20
|
disabled: j
|
|
21
|
-
}, [
|
|
21
|
+
}, [r, l] = V(u), n = m[0], t = a ? m[1] : m[0];
|
|
22
22
|
b(() => {
|
|
23
23
|
l(u);
|
|
24
24
|
}, [u]);
|
|
25
25
|
const f = (e) => {
|
|
26
|
-
|
|
26
|
+
c == null || c(e);
|
|
27
27
|
}, k = () => {
|
|
28
28
|
l([...u].sort((e, o) => e - o));
|
|
29
29
|
};
|
|
@@ -31,22 +31,22 @@ const S = function(C) {
|
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
className: R(`${i}-input`, {
|
|
34
|
-
[`${i}-input-group`]:
|
|
34
|
+
[`${i}-input-group`]: a
|
|
35
35
|
}),
|
|
36
36
|
onBlur: k,
|
|
37
37
|
children: [
|
|
38
|
-
|
|
38
|
+
a && [
|
|
39
39
|
/* @__PURE__ */ N(
|
|
40
40
|
d,
|
|
41
41
|
{
|
|
42
42
|
hideControl: !0,
|
|
43
43
|
...n,
|
|
44
44
|
...p,
|
|
45
|
-
value:
|
|
45
|
+
value: r[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, r[1]]), (s = n == null ? void 0 : n.onChange) == null || s.call(n, e, o));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
),
|
|
@@ -59,10 +59,10 @@ const S = function(C) {
|
|
|
59
59
|
...t,
|
|
60
60
|
...p,
|
|
61
61
|
key: 2,
|
|
62
|
-
value:
|
|
62
|
+
value: r[1],
|
|
63
63
|
onChange: (e, o) => {
|
|
64
64
|
var s;
|
|
65
|
-
isNaN(e) && e !== e || (f([
|
|
65
|
+
isNaN(e) && e !== e || (f([r[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,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { plus as M } from "../utils/math.js";
|
|
3
3
|
import A, { useMemo as R } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { p as $ } from "../chunk/CUFsOxJ2.js";
|
|
5
5
|
import { formatPercent as b, getIntervalOffset as y, valueInRange as I } from "./util.js";
|
|
6
6
|
function N(p) {
|
|
7
7
|
const {
|
|
@@ -17,9 +17,9 @@ 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:
|
|
20
|
+
const i = b(y(o, e));
|
|
21
|
+
c.set(i, {
|
|
22
|
+
offset: i,
|
|
23
23
|
isActive: I(o, v)
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -27,7 +27,7 @@ function N(p) {
|
|
|
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__ */ m("div", { className: `${r}-ticks`, children: k.map((t, s) => /* @__PURE__ */ m(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
className: $(`${r}-tick`, {
|
package/slider/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as R, jsxs as Ve } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { times as Ce, plus as Z, divide as ze } from "../utils/math.js";
|
|
3
3
|
import _ from "lodash/isArray";
|
|
4
4
|
import ee from "lodash/isFunction";
|
|
5
5
|
import te from "lodash/isPlainObject";
|
|
6
|
-
import
|
|
7
|
-
import { a as Ze } from "../chunk/
|
|
6
|
+
import Ge, { useMemo as ne, useCallback as T, forwardRef as He, useContext as Qe, useRef as B } from "react";
|
|
7
|
+
import { a as Ze } from "../chunk/Crs3isAx.js";
|
|
8
8
|
import { u as _e } from "../chunk/BFTV6myl.js";
|
|
9
|
-
import { u as et } from "../chunk/
|
|
9
|
+
import { u as et } from "../chunk/DeV0v__J.js";
|
|
10
10
|
import { u as tt } from "../chunk/a3hR6zLw.js";
|
|
11
|
-
import {
|
|
11
|
+
import { p as ve } from "../chunk/CUFsOxJ2.js";
|
|
12
12
|
import { on as we, off as be } from "../utils/dom.js";
|
|
13
13
|
import { o as nt } from "../chunk/BKKEev13.js";
|
|
14
14
|
import ot from "./Button.js";
|
|
@@ -18,7 +18,7 @@ import it from "./Mark.js";
|
|
|
18
18
|
import at from "./Tick.js";
|
|
19
19
|
import U from "lodash/isNumber";
|
|
20
20
|
import { rateToFloat as lt, getPrecision as ut, needSort as ct, sortNumberArray as ke, getIntervalOffset as Q, formatPercent as F, findNearestIndex as ft } from "./util.js";
|
|
21
|
-
import {
|
|
21
|
+
import { S as mt } from "../chunk/C0pRaDCf.js";
|
|
22
22
|
import gt from "lodash/isUndefined";
|
|
23
23
|
function dt(m) {
|
|
24
24
|
if (m.length < 2)
|
|
@@ -199,7 +199,7 @@ function vt(m, y) {
|
|
|
199
199
|
tt(() => {
|
|
200
200
|
X.current = W(K);
|
|
201
201
|
}, [K, W]), Y.current && (u = ke(u));
|
|
202
|
-
const
|
|
202
|
+
const J = u[u.length - 1], q = u[0], z = h && !c && (!O || u.length < 3), Re = ne(() => z && (_(h) || te(h)) ? _(h) ? [...h] : [{ ...h }, { ...h }] : [], [z, h]), k = f("slider"), re = B(null), se = B({
|
|
203
203
|
left: 0,
|
|
204
204
|
height: 0,
|
|
205
205
|
top: 0,
|
|
@@ -227,12 +227,12 @@ function vt(m, y) {
|
|
|
227
227
|
let [t, o] = [u[0], u[u.length - 1]];
|
|
228
228
|
return t > o && ([t, o] = [o, t]), O ? n >= t && n <= o : n <= o;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function G(n, t) {
|
|
231
231
|
const { left: o, top: V, width: C, height: S } = se.current;
|
|
232
232
|
let N = C, me = M ? o + C - n : n - o;
|
|
233
233
|
if (r && (N = S, me = M ? t - V : V + S - t), N <= 0)
|
|
234
234
|
return 0;
|
|
235
|
-
let A = Math.max(
|
|
235
|
+
let A = Math.max(ze(me, N), 0);
|
|
236
236
|
A = Math.min(1, A);
|
|
237
237
|
const Ue = P.find((he) => A >= he.beginOffset && A <= he.endOffset), {
|
|
238
238
|
begin: ge,
|
|
@@ -240,8 +240,8 @@ function vt(m, y) {
|
|
|
240
240
|
step: pe,
|
|
241
241
|
endOffset: We,
|
|
242
242
|
end: Ke
|
|
243
|
-
} = Ue, Xe = A - de, Ye = We - de,
|
|
244
|
-
return Z(ge, Ce(
|
|
243
|
+
} = Ue, Xe = A - de, Ye = We - de, Je = Xe / Ye * (Ke - ge), qe = Math.round(Je / pe);
|
|
244
|
+
return Z(ge, Ce(qe, pe));
|
|
245
245
|
}
|
|
246
246
|
function Te(n) {
|
|
247
247
|
let [t, o] = n;
|
|
@@ -270,7 +270,7 @@ function vt(m, y) {
|
|
|
270
270
|
}
|
|
271
271
|
function Ae(n) {
|
|
272
272
|
ue();
|
|
273
|
-
const t =
|
|
273
|
+
const t = G(n.clientX, n.clientY);
|
|
274
274
|
xe.draggableBar && Se(t) ? (ae.current = E(t), we(window, "mousemove", ce), we(window, "mouseup", fe)) : H(t);
|
|
275
275
|
}
|
|
276
276
|
function H(n) {
|
|
@@ -285,7 +285,7 @@ function vt(m, y) {
|
|
|
285
285
|
function Ee(n, t, o) {
|
|
286
286
|
ie.current = !0;
|
|
287
287
|
const V = u.slice(0);
|
|
288
|
-
V[o] =
|
|
288
|
+
V[o] = G(n, t), L(V, "mousemove");
|
|
289
289
|
}
|
|
290
290
|
function De() {
|
|
291
291
|
ie.current = !1, D();
|
|
@@ -297,7 +297,7 @@ function vt(m, y) {
|
|
|
297
297
|
o[t] = Pe(u[t], n), L(o);
|
|
298
298
|
}
|
|
299
299
|
function ce(n) {
|
|
300
|
-
const o = E(
|
|
300
|
+
const o = E(G(n.clientX, n.clientY)) - ae.current, V = u.map((C) => C + o);
|
|
301
301
|
V.every((C) => Oe(C)) && L(V, "mousemove");
|
|
302
302
|
}
|
|
303
303
|
function fe() {
|
|
@@ -342,8 +342,8 @@ function vt(m, y) {
|
|
|
342
342
|
{
|
|
343
343
|
className: `${k}-bar`,
|
|
344
344
|
style: Te([
|
|
345
|
-
Q(
|
|
346
|
-
Q(
|
|
345
|
+
Q(q, P),
|
|
346
|
+
Q(J, P)
|
|
347
347
|
])
|
|
348
348
|
}
|
|
349
349
|
),
|
|
@@ -353,7 +353,7 @@ function vt(m, y) {
|
|
|
353
353
|
intervalConfigs: P,
|
|
354
354
|
min: b,
|
|
355
355
|
max: s,
|
|
356
|
-
valueRange: [
|
|
356
|
+
valueRange: [q, J],
|
|
357
357
|
prefixCls: k,
|
|
358
358
|
vertical: r,
|
|
359
359
|
reverse: M
|
|
@@ -364,7 +364,7 @@ function vt(m, y) {
|
|
|
364
364
|
{
|
|
365
365
|
data: oe,
|
|
366
366
|
intervalConfigs: P,
|
|
367
|
-
valueRange: [
|
|
367
|
+
valueRange: [q, J],
|
|
368
368
|
vertical: r,
|
|
369
369
|
prefixCls: k,
|
|
370
370
|
reverse: M,
|
|
@@ -403,7 +403,7 @@ function vt(m, y) {
|
|
|
403
403
|
]
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
|
|
406
|
+
z && /* @__PURE__ */ R(
|
|
407
407
|
st,
|
|
408
408
|
{
|
|
409
409
|
min: b,
|
|
@@ -423,7 +423,7 @@ function vt(m, y) {
|
|
|
423
423
|
}
|
|
424
424
|
const Me = He(vt);
|
|
425
425
|
Me.displayName = "Slider";
|
|
426
|
-
const Ut =
|
|
426
|
+
const Ut = Ge.memo(Me);
|
|
427
427
|
export {
|
|
428
428
|
Ut as default
|
|
429
429
|
};
|
package/slider/util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { minus as s, times as d, plus as m, divide as l } from "../utils/math.js";
|
|
2
2
|
function I(t) {
|
|
3
3
|
const n = `${t}`.split(".")[1];
|
|
4
4
|
return n && n.length || 0;
|
|
@@ -10,7 +10,7 @@ function x(t, n) {
|
|
|
10
10
|
const e = Number(t);
|
|
11
11
|
if (n && !isNaN(e)) {
|
|
12
12
|
const [r, o] = n;
|
|
13
|
-
return
|
|
13
|
+
return l(s(e, r), s(o, r));
|
|
14
14
|
}
|
|
15
15
|
return 0;
|
|
16
16
|
}
|
|
@@ -21,18 +21,18 @@ function b(t, n) {
|
|
|
21
21
|
function g(t) {
|
|
22
22
|
return t || t === 0;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function v(t) {
|
|
25
25
|
const n = parseFloat(t), e = n > 1 ? (n / 100).toFixed(2) : n, r = parseFloat(e);
|
|
26
26
|
if (!isNaN(r) && r >= 0 && r <= 1)
|
|
27
27
|
return r;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function h(t, n) {
|
|
30
30
|
const e = n.find(
|
|
31
31
|
(r) => t >= r.begin && t <= r.end
|
|
32
32
|
);
|
|
33
33
|
if (e) {
|
|
34
|
-
const { beginOffset: r, begin: o, end:
|
|
35
|
-
return
|
|
34
|
+
const { beginOffset: r, begin: o, end: i, endOffset: f } = e, u = x(t, [o, i]), c = s(f, r), a = d(u, c);
|
|
35
|
+
return m(r, a);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
function N(t) {
|
|
@@ -52,12 +52,12 @@ function R(t, n) {
|
|
|
52
52
|
export {
|
|
53
53
|
R as findNearestIndex,
|
|
54
54
|
O as formatPercent,
|
|
55
|
-
|
|
55
|
+
h as getIntervalOffset,
|
|
56
56
|
x as getOffset,
|
|
57
57
|
I as getPrecision,
|
|
58
58
|
g as isNotEmpty,
|
|
59
59
|
F as needSort,
|
|
60
|
-
|
|
60
|
+
v as rateToFloat,
|
|
61
61
|
N as sortNumberArray,
|
|
62
62
|
b as valueInRange
|
|
63
63
|
};
|