@unicom-cloud/ui 0.8.66 → 0.8.67
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 +79 -79
- package/Alert.js +46 -46
- package/Anchor.js +1 -1
- package/AutoComplete.js +74 -74
- package/Avatar.js +36 -36
- package/BackTop.js +35 -35
- package/Badge.js +55 -55
- package/Breadcrumb.js +42 -42
- package/Button.js +24 -24
- package/Calendar.js +230 -230
- package/Card.js +18 -18
- package/Carousel.js +165 -165
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +26 -26
- package/Comment.js +18 -18
- package/ConfigProvider.js +2 -2
- package/Copy.js +28 -27
- package/DatePicker.js +872 -871
- package/Descriptions.js +34 -34
- package/Divider.js +19 -19
- package/Draggable.js +27 -26
- package/Drawer.js +1 -1
- package/Dropdown.js +110 -110
- package/Empty.js +3 -3
- package/Form.js +984 -945
- package/Grid.js +34 -34
- package/Icon.js +16 -16
- package/IconHover.js +2 -2
- package/Image.js +2 -2
- package/Input.js +7 -6
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +24 -24
- package/Link.js +30 -30
- package/List.js +95 -95
- package/Mentions.js +85 -84
- package/Menu.js +2 -2
- package/Message.js +7 -6
- package/Modal.js +1 -1
- package/Notice.js +14 -3
- package/Notification.js +9 -7
- package/OverflowEllipsis.js +64 -62
- package/PageHeader.js +73 -73
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +60 -60
- package/Popover.js +31 -31
- package/Portal.js +23 -31
- package/Progress.js +22 -22
- package/Radio.js +2 -2
- package/Rate.js +24 -24
- package/ResizeBox.js +274 -271
- package/Result.js +3 -3
- package/Select.js +4 -4
- package/SelectView.js +257 -238
- package/Skeleton.js +46 -46
- package/Slider.js +286 -283
- package/Space.js +28 -28
- package/SpeechSynthesis.js +62 -55
- package/Spin.js +23 -23
- package/Statistic.js +80 -80
- package/Steps.js +67 -67
- package/Switch.js +47 -47
- package/Table.js +1445 -1380
- package/Tabs.js +5 -5
- package/Tag.js +45 -45
- package/TimePicker.js +154 -154
- package/Timeline.js +2 -2
- package/Tooltip.js +80 -79
- package/Transfer.js +103 -102
- package/Tree.js +3 -2
- package/TreeSelect.js +2 -2
- package/Trigger.js +699 -772
- package/Typography.js +756 -6
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{BHgJ5Y3T.js → -UuKKT0Z.js} +29 -29
- package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
- package/chunk/B5gK1Idp.js +19 -0
- package/chunk/B7FlazNB.js +24 -0
- package/chunk/{DTBtQQ2H.js → BBvWDeuZ.js} +67 -67
- package/chunk/BCftTxEy.js +626 -0
- package/chunk/{CZOP_ZHJ.js → BGny4zSb.js} +60 -60
- package/chunk/BHF15Dog.js +98 -0
- package/chunk/BJQ5UNa-.js +1585 -0
- package/chunk/BP9sYyk9.js +8 -0
- package/chunk/BUdtVdnv.js +38 -0
- package/chunk/BVQlOzTS.js +11 -0
- package/chunk/B__a_gb_.js +519 -0
- package/chunk/BbEYToV1.js +10 -0
- package/chunk/BbdDQAnm.js +15 -0
- package/chunk/BdUcgWdu.js +11 -0
- package/chunk/BfbXSG70.js +26 -0
- package/chunk/BndfNLK4.js +186 -0
- package/chunk/BoMCZV6K.js +1098 -0
- package/chunk/Br0B6y1T.js +18 -0
- package/chunk/BrOW642m.js +130 -0
- package/chunk/BxUs8_Cr.js +9 -0
- package/chunk/{CcV4wQB1.js → C42LIMP9.js} +244 -242
- package/chunk/C4YkFMzC.js +778 -0
- package/chunk/{Bh23P4l7.js → C9Wcraj7.js} +21 -21
- package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
- package/chunk/CJ_o9tZM.js +5 -0
- package/chunk/{DNAigumg.js → CK5m7rLl.js} +36 -36
- package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
- package/chunk/CLiqJm_T.js +10 -0
- package/chunk/{BnSVm1YC.js → CNmmhbCn.js} +32 -32
- package/chunk/{BFipyA67.js → CP0odX99.js} +51 -51
- package/chunk/CPT-OZH2.js +14 -0
- package/chunk/CVSF8p0O.js +698 -0
- package/chunk/C_agcwLN.js +31 -0
- package/chunk/{jhQQCFMn.js → C_gJWGGh.js} +201 -201
- package/chunk/{Bc7t9jkb.js → CaasmWg_.js} +11 -11
- package/chunk/Ce1j9KTi.js +6 -0
- package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
- package/chunk/CkNSv2U7.js +56 -0
- package/chunk/Cp2f70gB.js +9 -0
- package/chunk/CpegYjdC.js +16 -0
- package/chunk/CucI3KZr.js +20 -0
- package/chunk/CwoFBTYz.js +11 -0
- package/chunk/D2KPqPhV.js +17 -0
- package/chunk/D7NyvE5f.js +17 -0
- package/chunk/D8oTPQ2H.js +384 -0
- package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
- package/chunk/{DnvO8A0Z.js → DFrfrmfK.js} +120 -119
- package/chunk/DGTIZ_0O.js +6 -0
- package/chunk/DJfpiZn_.js +25 -0
- package/chunk/DKr2_PYd.js +34 -0
- package/chunk/DNUz6zgo.js +11 -0
- package/chunk/DRtM649q.js +11 -0
- package/chunk/DS_mUWn6.js +41 -0
- package/chunk/DU6bs_19.js +10 -0
- package/chunk/DWdbwz22.js +10 -0
- package/chunk/DcveZuqd.js +6 -0
- package/chunk/DdVFknul.js +24 -0
- package/chunk/DgRfikwe.js +16 -0
- package/chunk/{znkyQ-HR.js → DkyR2EfG.js} +66 -66
- package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
- package/chunk/DnrZEnQ_.js +27 -0
- package/chunk/DsRSHWtX.js +1025 -0
- package/chunk/Dz5BdmXo.js +270 -0
- package/chunk/EANe01DF.js +1030 -0
- package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
- package/chunk/GoNx5R4F.js +873 -0
- package/chunk/HDUQku8d.js +20 -0
- package/chunk/HrAP__Hi.js +25 -0
- package/chunk/JPPo5nY_.js +9 -0
- package/chunk/{Du-bw6qA.js → SLWP34OR.js} +90 -85
- package/chunk/VVKtwaGf.js +278 -0
- package/chunk/WPNpLxSI.js +16 -0
- package/chunk/{CPvvjMwZ.js → WpO_DsK4.js} +49 -48
- package/chunk/fdU3ang6.js +14 -0
- package/chunk/{DQAot004.js → fkclKOAL.js} +298 -292
- package/chunk/flvYlqx3.js +22 -0
- package/chunk/kTDayEpF.js +288 -0
- package/chunk/{CssIjN1g.js → pZoNQ75H.js} +31 -31
- package/chunk/qFf1w_Jq.js +8 -0
- package/chunk/{CHnFKgbk.js → w-kM1L5W.js} +155 -155
- package/hooks/index.js +53 -49
- package/hooks/useComputedState.js +2 -10
- package/hooks/useCreate.js +2 -7
- package/hooks/useForceUpdate.js +2 -7
- package/hooks/useId.js +2 -10
- package/hooks/useInView.js +2 -30
- package/hooks/useIntersectionObserver.js +2 -23
- package/hooks/useInterval.js +2 -17
- package/hooks/useIsFirstRender.js +2 -9
- package/hooks/useIsomorphicLayoutEffect.js +2 -5
- package/hooks/useKeyboardEvent.js +2 -16
- package/hooks/useMedia.js +2 -15
- package/hooks/useMergeProps.js +2 -18
- package/hooks/useMergeValue.js +2 -19
- package/hooks/useOnlineStatus.js +4 -0
- package/hooks/useOverflowHidden.js +2 -25
- package/hooks/useOverrideRef.js +2 -13
- package/hooks/usePersistCallback.js +2 -13
- package/hooks/usePrefersColorSchemeDark.js +4 -0
- package/hooks/usePrevious.js +2 -9
- package/hooks/useRefs.js +2 -9
- package/hooks/useResizeObserver.js +2 -15
- package/hooks/useStateCallback.js +2 -15
- package/hooks/useStateWithPromise.js +2 -24
- package/hooks/useUpdateEffect.js +2 -9
- package/hooks/useVerificationCode.js +73 -0
- package/hooks/useWatch.js +2 -10
- package/hooks/{use-watermark.js → useWatermark.js} +27 -26
- package/hooks/useWindowSize.js +2 -20
- package/index.js +571 -584
- package/locale/en-US.js +4 -2
- package/locale/interface.js +1 -4
- package/locale/ja-JP.js +3 -1
- package/locale/tr-TR.js +1 -1
- package/locale/zh-CN.js +3 -1
- package/locale/zh-HK.js +3 -1
- package/locale/zh-TW.js +3 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -1
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
- package/types/form/Control-old.d.ts +56 -0
- package/types/form/Control.d.ts +6 -54
- package/types/form/FormItem.d.ts +1 -1
- package/types/form/store.d.ts +0 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/useComputedState.d.ts +1 -4
- package/types/hooks/useCreate.d.ts +1 -2
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useId.d.ts +1 -2
- package/types/hooks/useInView.d.ts +1 -11
- package/types/hooks/useIntersectionObserver.d.ts +1 -7
- package/types/hooks/useInterval.d.ts +1 -2
- package/types/hooks/useIsFirstRender.d.ts +1 -2
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
- package/types/hooks/useKeyboardEvent.d.ts +1 -8
- package/types/hooks/useMedia.d.ts +1 -2
- package/types/hooks/useMergeProps.d.ts +1 -5
- package/types/hooks/useMergeValue.d.ts +1 -6
- package/types/hooks/useOnlineStatus.d.ts +1 -0
- package/types/hooks/useOverflowHidden.d.ts +1 -5
- package/types/hooks/useOverrideRef.d.ts +1 -6
- package/types/hooks/usePersistCallback.d.ts +1 -2
- package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
- package/types/hooks/usePrevious.d.ts +1 -3
- package/types/hooks/useRefs.d.ts +1 -2
- package/types/hooks/useResizeObserver.d.ts +1 -6
- package/types/hooks/useStateCallback.d.ts +1 -5
- package/types/hooks/useStateWithPromise.d.ts +1 -2
- package/types/hooks/useUpdateEffect.d.ts +1 -3
- package/types/hooks/useWatch.d.ts +1 -3
- package/types/hooks/useWindowSize.d.ts +1 -5
- package/types/image/interface.d.ts +1 -0
- package/types/index.d.ts +157 -86
- package/types/input/Input.d.ts +1 -1
- package/types/input/Textarea.d.ts +2 -2
- package/types/locale/en-US.d.ts +2 -0
- package/types/locale/interface.d.ts +1 -2
- package/types/locale/ja-JP.d.ts +2 -0
- package/types/locale/zh-CN.d.ts +2 -0
- package/types/locale/zh-HK.d.ts +2 -0
- package/types/locale/zh-TW.d.ts +2 -0
- package/types/menu/context.d.ts +1 -1
- package/types/message/index.d.ts +14 -14
- package/types/message/interface.d.ts +2 -0
- package/types/modal/config.d.ts +0 -1
- package/types/modal/interface.d.ts +0 -1
- package/types/notice/index.d.ts +2 -27
- package/types/notification/index.d.ts +15 -16
- package/types/notification/interface.d.ts +2 -0
- package/types/notification/withNotification.d.ts +2 -0
- package/types/select/util.d.ts +1 -2
- package/types/select-view/interface.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +1 -1
- package/types/table/constant.d.ts +2 -0
- package/types/table/hook/useThResizable.d.ts +7 -0
- package/types/table/index.d.ts +10 -1
- package/types/table/style/index.d.ts +1 -0
- package/types/table/th-resizable/index.d.ts +2 -0
- package/types/table/thead/Column.d.ts +1 -2
- package/types/tree/Tree.d.ts +12 -67
- package/types/tree-select/Select.d.ts +2 -2
- package/types/trigger/index.d.ts +2 -120
- package/types/trigger/interface.d.ts +2 -1
- package/types/utils/CSSTransition.d.ts +2 -3
- package/types/utils/caseName.d.ts +1 -1
- package/types/utils/className.d.ts +1 -1
- package/types/utils/constant.d.ts +2 -2
- package/types/utils/copy.d.ts +1 -1
- package/types/utils/dayjs.d.ts +1 -21
- package/types/utils/dom.d.ts +1 -6
- package/types/utils/fileToURL.d.ts +1 -1
- package/types/utils/fillNBSP.d.ts +1 -1
- package/types/utils/getHighlightText.d.ts +1 -5
- package/types/utils/getHotkeyHandler.d.ts +1 -8
- package/types/utils/getStringLength.d.ts +1 -1
- package/types/utils/include.d.ts +1 -1
- package/types/utils/index.d.ts +3 -4
- package/types/utils/is.d.ts +1 -16
- package/types/utils/keyboardCode.d.ts +3 -0
- package/types/utils/lodash.d.ts +1 -17
- package/types/utils/mergeProps.d.ts +1 -1
- package/types/utils/mergedToString.d.ts +1 -1
- package/types/utils/omit.d.ts +1 -1
- package/types/utils/pad.d.ts +1 -2
- package/types/utils/pick.d.ts +2 -4
- package/types/utils/reactDOM.d.ts +1 -7
- package/types/utils/resizeObserverEffect.d.ts +2 -0
- package/types/utils/saveAs.d.ts +1 -1
- package/types/utils/screenfull.d.ts +2 -0
- package/types/utils/scrollIntoView.d.ts +1 -2
- package/types/utils/style.d.ts +1 -3
- package/types/utils/throttleByRaf.d.ts +1 -5
- package/types/utils/throttleByRaf2.d.ts +1 -0
- package/types/utils/warning.d.ts +1 -2
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +2 -6
- package/utils/className.js +2 -2
- package/utils/constant.js +8 -9
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/dayjs.js +14 -173
- package/utils/dom.js +33 -29
- package/utils/fillNBSP.js +2 -4
- package/utils/getHighlightText.js +2 -38
- package/utils/getHotkeyHandler.js +2 -25
- package/utils/getStringLength.js +2 -7
- package/utils/include.js +2 -7
- package/utils/index.js +237 -240
- package/utils/is.js +116 -156
- package/utils/keyboardCode.js +27 -0
- package/utils/mergeProps.js +2 -9
- package/utils/mergedToString.js +2 -13
- package/utils/omit.js +2 -9
- package/utils/pad.js +12 -12
- package/utils/pick.js +4 -15
- package/utils/reactDOM.js +3 -54
- package/utils/resizeObserverEffect.js +4 -0
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +4 -0
- package/utils/scrollIntoView.js +2 -21
- package/utils/style.js +12 -11
- package/utils/throttleByRaf.js +13 -12
- package/utils/throttleByRaf2.js +5 -0
- package/utils/warning.js +5 -4
- package/NotificationBase.js +0 -53
- package/chunk/-zpSUpGE.js +0 -1501
- package/chunk/BAWsPQBM.js +0 -11
- package/chunk/BIT0j3HT.js +0 -269
- package/chunk/BbLKnaNO.js +0 -871
- package/chunk/Bfhv56O2.js +0 -638
- package/chunk/C2lIz2F9.js +0 -60
- package/chunk/C6QWSzsM.js +0 -376
- package/chunk/CVkHTbic.js +0 -995
- package/chunk/CeGEvXby.js +0 -278
- package/chunk/D3NFxdmG.js +0 -518
- package/chunk/DApXtulb.js +0 -1102
- package/chunk/DPByB1ab.js +0 -698
- package/chunk/DV1Ab_cG.js +0 -284
- package/chunk/dBnNCOIU.js +0 -778
- package/chunk/it8qlDZ3.js +0 -1032
- package/chunk/l0sNRNKZ.js +0 -1
- package/chunk/te_43YrB.js +0 -776
- package/hooks/use-verification-code.js +0 -73
- package/types/notification-base/index.d.ts +0 -15
- package/types/notification-base/style/index.d.ts +0 -2
- package/types/trigger/Portal.d.ts +0 -7
- package/types/utils/keyCode.d.ts +0 -45
- package/types/utils/raf.d.ts +0 -3
- package/types/utils/throttleByRafV2.d.ts +0 -5
- package/utils/keyCode.js +0 -12
- package/utils/raf.js +0 -19
- package/utils/throttleByRafV2.js +0 -16
package/Card.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import h, { useContext as y } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { a as x } from "./chunk/BJQ5UNa-.js";
|
|
4
|
+
import { c as q } from "./chunk/B5gK1Idp.js";
|
|
5
5
|
import A from "./Spin.js";
|
|
6
|
-
import {
|
|
6
|
+
import { m as p } from "./chunk/JPPo5nY_.js";
|
|
7
7
|
function B(c, m) {
|
|
8
8
|
const { children: f, style: i, className: r, hoverable: l } = c, { getPrefixCls: n } = y(x), o = n("card-grid");
|
|
9
9
|
return /* @__PURE__ */ a(
|
|
@@ -23,7 +23,7 @@ function B(c, m) {
|
|
|
23
23
|
const g = h.forwardRef(B);
|
|
24
24
|
g.displayName = "CardGrid";
|
|
25
25
|
function D(c, m) {
|
|
26
|
-
const { className: f, title: i, avatar: r, description: l, actionList: n, ...o } = c, { getPrefixCls:
|
|
26
|
+
const { className: f, title: i, avatar: r, description: l, actionList: n, ...o } = c, { getPrefixCls: v } = y(x), t = v("card-meta"), $ = p(t, f);
|
|
27
27
|
return /* @__PURE__ */ d("div", { ...o, ref: m, className: $, children: [
|
|
28
28
|
i || l ? /* @__PURE__ */ d("div", { className: `${t}-content`, children: [
|
|
29
29
|
i && /* @__PURE__ */ a("div", { className: `${t}-title`, children: i }),
|
|
@@ -56,19 +56,19 @@ function I(c, m) {
|
|
|
56
56
|
r == null ? void 0 : r.Card
|
|
57
57
|
), {
|
|
58
58
|
className: o,
|
|
59
|
-
children:
|
|
59
|
+
children: v,
|
|
60
60
|
bordered: t,
|
|
61
61
|
loading: $,
|
|
62
62
|
hoverable: z,
|
|
63
63
|
size: S,
|
|
64
64
|
title: C,
|
|
65
|
-
extra:
|
|
66
|
-
cover:
|
|
67
|
-
actions:
|
|
65
|
+
extra: N,
|
|
66
|
+
cover: R,
|
|
67
|
+
actions: u,
|
|
68
68
|
headerStyle: j,
|
|
69
69
|
bodyStyle: E,
|
|
70
70
|
...L
|
|
71
|
-
} = n, e = f("card"),
|
|
71
|
+
} = n, e = f("card"), w = u && u.length ? /* @__PURE__ */ a("div", { className: `${e}-actions`, children: /* @__PURE__ */ a("div", { className: `${e}-actions-right`, children: u.map((s, k) => /* @__PURE__ */ a(
|
|
72
72
|
"span",
|
|
73
73
|
{
|
|
74
74
|
className: `${e}-actions-item`,
|
|
@@ -76,15 +76,15 @@ function I(c, m) {
|
|
|
76
76
|
},
|
|
77
77
|
`action-${k}`
|
|
78
78
|
)) }) }) : null;
|
|
79
|
-
let
|
|
79
|
+
let G = !1, P = !1;
|
|
80
80
|
const F = h.Children.map(
|
|
81
|
-
|
|
81
|
+
v,
|
|
82
82
|
(s) => {
|
|
83
83
|
if (s && s.type) {
|
|
84
84
|
if (s.type === g)
|
|
85
|
-
|
|
85
|
+
G = !0;
|
|
86
86
|
else if (s.type === b)
|
|
87
|
-
return
|
|
87
|
+
return P = !0, h.cloneElement(s, { actionList: w });
|
|
88
88
|
}
|
|
89
89
|
return s;
|
|
90
90
|
}
|
|
@@ -101,13 +101,13 @@ function I(c, m) {
|
|
|
101
101
|
[`${e}-loading`]: $,
|
|
102
102
|
[`${e}-bordered`]: t,
|
|
103
103
|
[`${e}-hoverable`]: z,
|
|
104
|
-
[`${e}-contain-grid`]:
|
|
104
|
+
[`${e}-contain-grid`]: G,
|
|
105
105
|
[`${e}-rtl`]: l
|
|
106
106
|
},
|
|
107
107
|
o
|
|
108
108
|
),
|
|
109
109
|
children: [
|
|
110
|
-
C ||
|
|
110
|
+
C || N ? /* @__PURE__ */ d(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
113
|
className: p(`${e}-header`, {
|
|
@@ -116,14 +116,14 @@ function I(c, m) {
|
|
|
116
116
|
style: j,
|
|
117
117
|
children: [
|
|
118
118
|
C && /* @__PURE__ */ a("div", { className: `${e}-header-title`, children: C }),
|
|
119
|
-
|
|
119
|
+
N && /* @__PURE__ */ a("div", { className: `${e}-header-extra`, children: N })
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
) : null,
|
|
123
|
-
|
|
123
|
+
R ? /* @__PURE__ */ a("div", { className: `${e}-cover`, children: R }) : null,
|
|
124
124
|
/* @__PURE__ */ d("div", { className: `${e}-body`, style: E, children: [
|
|
125
125
|
$ ? i || /* @__PURE__ */ a(A, {}) : F,
|
|
126
|
-
|
|
126
|
+
P ? null : w
|
|
127
127
|
] })
|
|
128
128
|
]
|
|
129
129
|
}
|
package/Carousel.js
CHANGED
|
@@ -1,118 +1,119 @@
|
|
|
1
1
|
import { jsx as s, jsxs as oe } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import we from "./
|
|
8
|
-
import Pe from "./
|
|
9
|
-
import be from "
|
|
10
|
-
import Te from "@unicom-cloud/icons/
|
|
11
|
-
import Se from "@unicom-cloud/icons/
|
|
12
|
-
import We from "@unicom-cloud/icons/
|
|
13
|
-
import
|
|
14
|
-
|
|
2
|
+
import S, { useContext as G, useRef as B, useState as T, useEffect as K, useImperativeHandle as Ce } from "react";
|
|
3
|
+
import { a as J } from "./chunk/BJQ5UNa-.js";
|
|
4
|
+
import { o as Ie } from "./chunk/Br0B6y1T.js";
|
|
5
|
+
import { c as Ne } from "./chunk/B5gK1Idp.js";
|
|
6
|
+
import { m as y } from "./chunk/JPPo5nY_.js";
|
|
7
|
+
import { c as we } from "./chunk/BdUcgWdu.js";
|
|
8
|
+
import { l as Pe } from "./chunk/flvYlqx3.js";
|
|
9
|
+
import be from "./utils/warning.js";
|
|
10
|
+
import Te from "@unicom-cloud/icons/IconUiDown";
|
|
11
|
+
import Se from "@unicom-cloud/icons/IconUiLeft";
|
|
12
|
+
import We from "@unicom-cloud/icons/IconUiRight";
|
|
13
|
+
import Ae from "@unicom-cloud/icons/IconUiUp";
|
|
14
|
+
import { h as Re } from "./chunk/D2KPqPhV.js";
|
|
15
|
+
function Ee(W, w) {
|
|
15
16
|
const {
|
|
16
|
-
className:
|
|
17
|
+
className: A,
|
|
17
18
|
direction: c = "horizontal",
|
|
18
|
-
showArrow:
|
|
19
|
+
showArrow: h = "always",
|
|
19
20
|
prev: l,
|
|
20
21
|
next: p,
|
|
21
|
-
icons:
|
|
22
|
-
} =
|
|
23
|
-
`${
|
|
22
|
+
icons: d
|
|
23
|
+
} = W, P = Re(), { getPrefixCls: m } = G(J), n = m("carousel"), $ = y(
|
|
24
|
+
`${n}-arrow`,
|
|
24
25
|
{
|
|
25
|
-
[`${
|
|
26
|
+
[`${n}-arrow-hover`]: h === "hover"
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
),
|
|
29
|
-
return /* @__PURE__ */ oe("div", { ref:
|
|
28
|
+
A
|
|
29
|
+
), C = d && Object.prototype.hasOwnProperty.call(d, "prev") ? d.prev : c === "horizontal" ? /* @__PURE__ */ s(Se, {}) : /* @__PURE__ */ s(Ae, {}), t = d && Object.prototype.hasOwnProperty.call(d, "next") ? d.next : c === "horizontal" ? /* @__PURE__ */ s(We, {}) : /* @__PURE__ */ s(Te, {});
|
|
30
|
+
return /* @__PURE__ */ oe("div", { ref: w, className: $, children: [
|
|
30
31
|
/* @__PURE__ */ s(
|
|
31
32
|
"div",
|
|
32
33
|
{
|
|
33
|
-
className: `${
|
|
34
|
+
className: `${n}-arrow-${c === "vertical" ? "top" : "left"}`,
|
|
34
35
|
onClick: l,
|
|
35
36
|
role: "button",
|
|
36
37
|
tabIndex: 0,
|
|
37
|
-
...
|
|
38
|
-
children:
|
|
38
|
+
...P({ onPressEnter: l }),
|
|
39
|
+
children: C
|
|
39
40
|
}
|
|
40
41
|
),
|
|
41
42
|
/* @__PURE__ */ s(
|
|
42
43
|
"div",
|
|
43
44
|
{
|
|
44
|
-
className: `${
|
|
45
|
+
className: `${n}-arrow-${c === "vertical" ? "bottom" : "right"}`,
|
|
45
46
|
onClick: p,
|
|
46
47
|
role: "button",
|
|
47
48
|
tabIndex: 0,
|
|
48
|
-
...
|
|
49
|
-
children:
|
|
49
|
+
...P({ onPressEnter: p }),
|
|
50
|
+
children: t
|
|
50
51
|
}
|
|
51
52
|
)
|
|
52
53
|
] });
|
|
53
54
|
}
|
|
54
|
-
const
|
|
55
|
-
|
|
55
|
+
const je = S.forwardRef(
|
|
56
|
+
Ee
|
|
56
57
|
);
|
|
57
|
-
function
|
|
58
|
-
const { getPrefixCls:
|
|
58
|
+
function De(W, w) {
|
|
59
|
+
const { getPrefixCls: A } = G(J), {
|
|
59
60
|
className: c,
|
|
60
|
-
type:
|
|
61
|
+
type: h = "line",
|
|
61
62
|
count: l = 2,
|
|
62
63
|
activeIndex: p = 0,
|
|
63
|
-
position:
|
|
64
|
-
trigger:
|
|
64
|
+
position: d = "bottom",
|
|
65
|
+
trigger: P = "click",
|
|
65
66
|
onSelectIndex: m
|
|
66
|
-
} =
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
67
|
+
} = W, n = A("carousel-indicator"), $ = [];
|
|
68
|
+
if (h === "slider") {
|
|
69
|
+
const t = 100 / l;
|
|
69
70
|
$.push(
|
|
70
71
|
/* @__PURE__ */ s(
|
|
71
72
|
"span",
|
|
72
73
|
{
|
|
73
|
-
style: { width: `${
|
|
74
|
-
className:
|
|
74
|
+
style: { width: `${t}%`, left: `${p * t}%` },
|
|
75
|
+
className: y(`${n}-item`, `${n}-item-active`)
|
|
75
76
|
},
|
|
76
77
|
0
|
|
77
78
|
)
|
|
78
79
|
);
|
|
79
80
|
} else
|
|
80
|
-
for (let
|
|
81
|
+
for (let t = 0; t < l; t++)
|
|
81
82
|
$.push(
|
|
82
83
|
/* @__PURE__ */ s(
|
|
83
84
|
"span",
|
|
84
85
|
{
|
|
85
|
-
"data-index":
|
|
86
|
-
className:
|
|
87
|
-
[`${
|
|
86
|
+
"data-index": t,
|
|
87
|
+
className: y(`${n}-item`, {
|
|
88
|
+
[`${n}-item-active`]: t === p
|
|
88
89
|
})
|
|
89
90
|
},
|
|
90
|
-
|
|
91
|
+
t
|
|
91
92
|
)
|
|
92
93
|
);
|
|
93
|
-
const
|
|
94
|
-
ref:
|
|
95
|
-
className:
|
|
96
|
-
|
|
97
|
-
`${
|
|
98
|
-
`${
|
|
94
|
+
const C = {
|
|
95
|
+
ref: w,
|
|
96
|
+
className: y(
|
|
97
|
+
n,
|
|
98
|
+
`${n}-${h}`,
|
|
99
|
+
`${n}-${d}`,
|
|
99
100
|
c
|
|
100
101
|
),
|
|
101
|
-
[
|
|
102
|
-
if (
|
|
103
|
-
if (
|
|
104
|
-
const { x:
|
|
102
|
+
[P === "click" ? "onClick" : "onMouseMove"]: (t) => {
|
|
103
|
+
if (t.preventDefault(), h === "slider") {
|
|
104
|
+
if (t.target === t.currentTarget) {
|
|
105
|
+
const { x: g, width: M } = t.currentTarget.getBoundingClientRect(), L = ~~((t.nativeEvent.clientX - g) / M * l);
|
|
105
106
|
L !== p && m(L);
|
|
106
107
|
}
|
|
107
108
|
} else {
|
|
108
|
-
const
|
|
109
|
-
|
|
109
|
+
const g = t.target.getAttribute("data-index");
|
|
110
|
+
g && +g !== p && m(+g);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
|
-
return /* @__PURE__ */ s("div", { ...
|
|
114
|
+
return /* @__PURE__ */ s("div", { ...C, children: $ });
|
|
114
115
|
}
|
|
115
|
-
const
|
|
116
|
+
const Me = S.forwardRef(De), ke = 3e3, Le = {
|
|
116
117
|
animation: "slide",
|
|
117
118
|
indicatorType: "dot",
|
|
118
119
|
indicatorPosition: "bottom",
|
|
@@ -122,22 +123,22 @@ const je = W.forwardRef(Me), De = 3e3, ke = {
|
|
|
122
123
|
moveSpeed: 500,
|
|
123
124
|
timingFunc: "cubic-bezier(0.34, 0.69, 0.1, 1)"
|
|
124
125
|
};
|
|
125
|
-
function
|
|
126
|
-
const { getPrefixCls:
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
function Oe(W, w) {
|
|
127
|
+
const { getPrefixCls: A, componentConfig: c, rtl: h } = G(J), l = Ne(
|
|
128
|
+
W,
|
|
129
|
+
Le,
|
|
129
130
|
c == null ? void 0 : c.Carousel
|
|
130
131
|
), {
|
|
131
132
|
style: p,
|
|
132
|
-
className:
|
|
133
|
-
children:
|
|
133
|
+
className: d,
|
|
134
|
+
children: P,
|
|
134
135
|
currentIndex: m,
|
|
135
|
-
animation:
|
|
136
|
+
animation: n,
|
|
136
137
|
trigger: $,
|
|
137
|
-
direction:
|
|
138
|
-
moveSpeed:
|
|
139
|
-
timingFunc:
|
|
140
|
-
indicatorType:
|
|
138
|
+
direction: C,
|
|
139
|
+
moveSpeed: t,
|
|
140
|
+
timingFunc: g,
|
|
141
|
+
indicatorType: M,
|
|
141
142
|
indicatorPosition: k,
|
|
142
143
|
indicatorClassName: L,
|
|
143
144
|
showArrow: Q,
|
|
@@ -145,76 +146,76 @@ function Le(A, P) {
|
|
|
145
146
|
arrowClassName: se,
|
|
146
147
|
carousel: ae,
|
|
147
148
|
icons: le,
|
|
148
|
-
onChange:
|
|
149
|
+
onChange: U,
|
|
149
150
|
...ce
|
|
150
151
|
} = l;
|
|
151
|
-
let
|
|
152
|
-
|
|
152
|
+
let u = l.autoPlay;
|
|
153
|
+
u && l.autoPlaySpeed && (u = {
|
|
153
154
|
interval: l.autoPlaySpeed
|
|
154
|
-
},
|
|
155
|
+
}, be(
|
|
155
156
|
!0,
|
|
156
157
|
"[Pqb Carousel] The 'autoPlaySpeed' property will be removed in the next major version, please use 'autoPlay.interval' instead."
|
|
157
158
|
));
|
|
158
|
-
const ee =
|
|
159
|
-
(e) =>
|
|
160
|
-
),
|
|
161
|
-
typeof m == "number" ?
|
|
162
|
-
), [
|
|
159
|
+
const ee = S.Children.toArray(P).filter(
|
|
160
|
+
(e) => S.isValidElement(e)
|
|
161
|
+
), b = ee.length, R = B(null), E = B(null), O = B(null), [z, de] = T(
|
|
162
|
+
typeof m == "number" ? j(m) : 0
|
|
163
|
+
), [ue, pe] = T(z), [me, te] = T(!1), [H, re] = T(!1), [F, fe] = T(
|
|
163
164
|
null
|
|
164
|
-
), [
|
|
165
|
+
), [ne, X] = T({
|
|
165
166
|
sliderWrapper: null,
|
|
166
167
|
indicatorWrapper: null
|
|
167
|
-
}), f = typeof m == "number" ?
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
}), f = typeof m == "number" ? j(m) : z, V = j(f - 1), _ = j(f + 1), he = typeof u == "object" && u.interval ? u.interval : ke;
|
|
169
|
+
K(() => () => O.current && clearTimeout(O.current), []), K(() => {
|
|
170
|
+
I({
|
|
170
171
|
targetIndex: f
|
|
171
172
|
});
|
|
172
173
|
}, [f]);
|
|
173
|
-
const
|
|
174
|
+
const ge = Ie(
|
|
174
175
|
() => {
|
|
175
|
-
|
|
176
|
-
targetIndex:
|
|
176
|
+
I({
|
|
177
|
+
targetIndex: _
|
|
177
178
|
});
|
|
178
179
|
},
|
|
179
|
-
|
|
180
|
+
u && !me && b > 1 ? he : null
|
|
180
181
|
);
|
|
181
|
-
|
|
182
|
-
dom:
|
|
183
|
-
getRootDOMNode: () =>
|
|
184
|
-
goto: ({ index: e, isNegative:
|
|
185
|
-
|
|
186
|
-
targetIndex:
|
|
187
|
-
isNegative:
|
|
182
|
+
Ce(ae, () => ({
|
|
183
|
+
dom: R.current,
|
|
184
|
+
getRootDOMNode: () => R.current,
|
|
185
|
+
goto: ({ index: e, isNegative: r, isManual: o, resetAutoPlayInterval: a }) => {
|
|
186
|
+
I({
|
|
187
|
+
targetIndex: j(e),
|
|
188
|
+
isNegative: r,
|
|
188
189
|
isManual: o,
|
|
189
190
|
resetAutoPlayInterval: a
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
}));
|
|
193
|
-
function
|
|
194
|
-
const
|
|
195
|
-
return typeof
|
|
194
|
+
function j(e) {
|
|
195
|
+
const r = +e;
|
|
196
|
+
return typeof r == "number" && !isNaN(r) ? (r + b) % b : e;
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
+
function I({
|
|
198
199
|
targetIndex: e,
|
|
199
|
-
isNegative:
|
|
200
|
+
isNegative: r = !1,
|
|
200
201
|
isManual: o = !1,
|
|
201
202
|
resetAutoPlayInterval: a = !1
|
|
202
203
|
}) {
|
|
203
|
-
!
|
|
204
|
-
|
|
205
|
-
},
|
|
204
|
+
!H && e !== f && (re(!0), de(e), pe(z), fe(r ? "negative" : "positive"), U == null || U(e, f, o), u && a && ge(), O.current = setTimeout(() => {
|
|
205
|
+
re(!1), O.current = null;
|
|
206
|
+
}, t));
|
|
206
207
|
}
|
|
207
208
|
function ve() {
|
|
208
|
-
if (
|
|
209
|
+
if (n === "card") {
|
|
209
210
|
if (E.current) {
|
|
210
211
|
const e = E.current.children[0];
|
|
211
212
|
if (!e)
|
|
212
213
|
return;
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
|
|
214
|
+
if (C === "horizontal") {
|
|
215
|
+
const r = E.current.clientWidth, o = e.clientWidth, a = (r - o) / 2, v = 200, x = r / 2, N = o, D = x + 50 >= N ? v * 4 : v * x / (N - x);
|
|
216
|
+
X({
|
|
216
217
|
sliderWrapper: {
|
|
217
|
-
perspective:
|
|
218
|
+
perspective: D
|
|
218
219
|
},
|
|
219
220
|
indicatorWrapper: {
|
|
220
221
|
width: "auto",
|
|
@@ -223,10 +224,10 @@ function Le(A, P) {
|
|
|
223
224
|
}
|
|
224
225
|
});
|
|
225
226
|
} else {
|
|
226
|
-
const
|
|
227
|
-
|
|
227
|
+
const r = E.current.clientHeight, o = e.clientHeight, a = (r - o) / 2, v = 200, x = r / 2, N = o, D = x + 50 >= N ? v * 4 : v * x / (N - x);
|
|
228
|
+
X({
|
|
228
229
|
sliderWrapper: {
|
|
229
|
-
perspective:
|
|
230
|
+
perspective: D
|
|
230
231
|
},
|
|
231
232
|
indicatorWrapper: {
|
|
232
233
|
height: "auto",
|
|
@@ -237,47 +238,46 @@ function Le(A, P) {
|
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
} else
|
|
240
|
-
|
|
241
|
+
X({
|
|
241
242
|
sliderWrapper: null,
|
|
242
243
|
indicatorWrapper: null
|
|
243
244
|
});
|
|
244
245
|
}
|
|
245
|
-
const i =
|
|
246
|
+
const i = A("carousel"), xe = y(
|
|
246
247
|
i,
|
|
247
248
|
`${i}-indicator-position-${k}`,
|
|
248
249
|
{
|
|
249
|
-
[`${i}-rtl`]:
|
|
250
|
+
[`${i}-rtl`]: h
|
|
250
251
|
},
|
|
251
|
-
|
|
252
|
+
d
|
|
252
253
|
), ye = Object.assign(
|
|
253
254
|
{},
|
|
254
|
-
|
|
255
|
+
u && (typeof u != "object" || u.hoverToPause !== !1) ? {
|
|
255
256
|
onMouseEnter: () => te(!0),
|
|
256
257
|
onMouseLeave: () => te(!1)
|
|
257
258
|
} : null
|
|
258
259
|
);
|
|
259
|
-
let [
|
|
260
|
-
() =>
|
|
261
|
-
targetIndex:
|
|
260
|
+
let [Y, Z] = [
|
|
261
|
+
() => I({
|
|
262
|
+
targetIndex: V,
|
|
262
263
|
isNegative: !0,
|
|
263
264
|
isManual: !0
|
|
264
265
|
}),
|
|
265
|
-
() =>
|
|
266
|
-
targetIndex:
|
|
266
|
+
() => I({
|
|
267
|
+
targetIndex: _,
|
|
267
268
|
isManual: !0
|
|
268
269
|
})
|
|
269
270
|
];
|
|
270
|
-
return
|
|
271
|
-
|
|
272
|
-
return
|
|
273
|
-
|
|
274
|
-
v.current && ((t = e == null ? void 0 : e.unobserve) == null || t.call(e, v.current)), (o = e == null ? void 0 : e.disconnect) == null || o.call(e), e = null;
|
|
271
|
+
return h && ([Y, Z] = [Z, Y]), K(() => {
|
|
272
|
+
const e = Pe([R.current], ve);
|
|
273
|
+
return () => {
|
|
274
|
+
e();
|
|
275
275
|
};
|
|
276
|
-
}, [
|
|
276
|
+
}, [R.current]), /* @__PURE__ */ oe(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
279
|
ref: (e) => {
|
|
280
|
-
|
|
280
|
+
w = e, R.current = w;
|
|
281
281
|
},
|
|
282
282
|
className: xe,
|
|
283
283
|
style: p,
|
|
@@ -288,45 +288,45 @@ function Le(A, P) {
|
|
|
288
288
|
"div",
|
|
289
289
|
{
|
|
290
290
|
ref: E,
|
|
291
|
-
style:
|
|
292
|
-
className:
|
|
293
|
-
`${i}-${
|
|
294
|
-
`${i}-${
|
|
291
|
+
style: ne.sliderWrapper,
|
|
292
|
+
className: y(
|
|
293
|
+
`${i}-${n}`,
|
|
294
|
+
`${i}-${C}`,
|
|
295
295
|
{
|
|
296
|
-
[`${i}-negative`]:
|
|
296
|
+
[`${i}-negative`]: F === "negative"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
children: ee.map((e,
|
|
300
|
-
const o =
|
|
301
|
-
if (!(!ie || o || a ||
|
|
299
|
+
children: ee.map((e, r) => {
|
|
300
|
+
const o = r === f, a = r === V, v = r === _;
|
|
301
|
+
if (!(!ie || o || a || v))
|
|
302
302
|
return null;
|
|
303
303
|
const {
|
|
304
|
-
style:
|
|
305
|
-
className:
|
|
306
|
-
onClick:
|
|
304
|
+
style: N,
|
|
305
|
+
className: D,
|
|
306
|
+
onClick: q
|
|
307
307
|
} = e.props;
|
|
308
|
-
return
|
|
308
|
+
return S.cloneElement(e, {
|
|
309
309
|
"aria-hidden": !o,
|
|
310
310
|
style: Object.assign(
|
|
311
311
|
{
|
|
312
|
-
transitionTimingFunction:
|
|
313
|
-
transitionDuration: `${
|
|
314
|
-
animationTimingFunction:
|
|
315
|
-
animationDuration: `${
|
|
312
|
+
transitionTimingFunction: g,
|
|
313
|
+
transitionDuration: `${t}ms`,
|
|
314
|
+
animationTimingFunction: g,
|
|
315
|
+
animationDuration: `${t}ms`
|
|
316
316
|
},
|
|
317
|
-
|
|
317
|
+
N
|
|
318
318
|
),
|
|
319
|
-
className:
|
|
319
|
+
className: y(D, {
|
|
320
320
|
[`${i}-item-prev`]: a,
|
|
321
|
-
[`${i}-item-next`]:
|
|
321
|
+
[`${i}-item-next`]: v,
|
|
322
322
|
[`${i}-item-current`]: o,
|
|
323
|
-
[`${i}-item-slide-in`]:
|
|
324
|
-
[`${i}-item-slide-out`]:
|
|
323
|
+
[`${i}-item-slide-in`]: n === "slide" && F && H && o,
|
|
324
|
+
[`${i}-item-slide-out`]: n === "slide" && F && H && r === ue
|
|
325
325
|
}),
|
|
326
|
-
onClick: (
|
|
327
|
-
|
|
328
|
-
targetIndex:
|
|
329
|
-
isNegative:
|
|
326
|
+
onClick: ($e) => {
|
|
327
|
+
q == null || q($e), I({
|
|
328
|
+
targetIndex: r,
|
|
329
|
+
isNegative: r === V,
|
|
330
330
|
isManual: !0
|
|
331
331
|
});
|
|
332
332
|
}
|
|
@@ -334,24 +334,24 @@ function Le(A, P) {
|
|
|
334
334
|
})
|
|
335
335
|
}
|
|
336
336
|
),
|
|
337
|
-
|
|
337
|
+
M !== "never" && b > 1 && /* @__PURE__ */ s(
|
|
338
338
|
"div",
|
|
339
339
|
{
|
|
340
|
-
style:
|
|
341
|
-
className:
|
|
340
|
+
style: ne.indicatorWrapper,
|
|
341
|
+
className: y(
|
|
342
342
|
`${i}-indicator-wrapper`,
|
|
343
343
|
`${i}-indicator-wrapper-${k}`
|
|
344
344
|
),
|
|
345
345
|
children: /* @__PURE__ */ s(
|
|
346
|
-
|
|
346
|
+
Me,
|
|
347
347
|
{
|
|
348
348
|
className: L,
|
|
349
|
-
type:
|
|
350
|
-
count:
|
|
349
|
+
type: M,
|
|
350
|
+
count: b,
|
|
351
351
|
activeIndex: f,
|
|
352
352
|
position: k,
|
|
353
353
|
trigger: $,
|
|
354
|
-
onSelectIndex: (e) =>
|
|
354
|
+
onSelectIndex: (e) => I({
|
|
355
355
|
targetIndex: e,
|
|
356
356
|
isNegative: e < f,
|
|
357
357
|
isManual: !0
|
|
@@ -360,22 +360,22 @@ function Le(A, P) {
|
|
|
360
360
|
)
|
|
361
361
|
}
|
|
362
362
|
),
|
|
363
|
-
Q !== "never" &&
|
|
364
|
-
|
|
363
|
+
Q !== "never" && b > 1 && /* @__PURE__ */ s(
|
|
364
|
+
je,
|
|
365
365
|
{
|
|
366
366
|
className: se,
|
|
367
|
-
direction:
|
|
367
|
+
direction: C,
|
|
368
368
|
showArrow: Q,
|
|
369
369
|
icons: le,
|
|
370
|
-
prev:
|
|
371
|
-
next:
|
|
370
|
+
prev: Y,
|
|
371
|
+
next: Z
|
|
372
372
|
}
|
|
373
373
|
)
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
);
|
|
377
377
|
}
|
|
378
|
-
const Ue =
|
|
378
|
+
const Ue = S.forwardRef(Oe);
|
|
379
379
|
Ue.displayName = "Carousel";
|
|
380
380
|
export {
|
|
381
381
|
Ue as default
|
package/Cascader.js
CHANGED
package/Checkbox.js
CHANGED
package/Collapse.js
CHANGED