@unicom-cloud/ui 0.8.65 → 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 -237
- 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 +1463 -1395
- 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/{DIx0qmCq.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/{DXZEpA3t.js → BBvWDeuZ.js} +67 -67
- package/chunk/BCftTxEy.js +626 -0
- package/chunk/{CsbCHnFk.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/{DK4KcodH.js → C42LIMP9.js} +244 -242
- package/chunk/C4YkFMzC.js +778 -0
- package/chunk/{CF6p9R93.js → C9Wcraj7.js} +21 -21
- package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
- package/chunk/CJ_o9tZM.js +5 -0
- package/chunk/{Bqk6yh16.js → CK5m7rLl.js} +36 -36
- package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
- package/chunk/CLiqJm_T.js +10 -0
- package/chunk/{DjtWv6Wn.js → CNmmhbCn.js} +32 -32
- package/chunk/{BUCEs557.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/{DTjcKyDN.js → C_gJWGGh.js} +201 -201
- package/chunk/{CPcm9Cm5.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/{Dnycc1qJ.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/{DG-epQqF.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/{CIlGCedk.js → SLWP34OR.js} +90 -85
- package/chunk/VVKtwaGf.js +278 -0
- package/chunk/WPNpLxSI.js +16 -0
- package/chunk/{DLvMA1OW.js → WpO_DsK4.js} +49 -48
- package/chunk/fdU3ang6.js +14 -0
- package/chunk/{DqFhzTWC.js → fkclKOAL.js} +298 -292
- package/chunk/flvYlqx3.js +22 -0
- package/chunk/kTDayEpF.js +288 -0
- package/chunk/{DQDkV47j.js → pZoNQ75H.js} +31 -31
- package/chunk/qFf1w_Jq.js +8 -0
- package/chunk/{CH1UUxsg.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/1GQdnTJp.js +0 -284
- package/chunk/BAWsPQBM.js +0 -11
- package/chunk/BS09tn7B.js +0 -638
- package/chunk/BqGtwxTi.js +0 -777
- package/chunk/BqufsN8i.js +0 -376
- package/chunk/BtlvlGQN.js +0 -278
- package/chunk/C2lIz2F9.js +0 -60
- package/chunk/CGZ0In1p.js +0 -776
- package/chunk/CWgltRVL.js +0 -698
- package/chunk/D3NFxdmG.js +0 -518
- package/chunk/DApXtulb.js +0 -1102
- package/chunk/DlLL5JQo.js +0 -1501
- package/chunk/Dv_xRzvR.js +0 -269
- package/chunk/Ek8U5CTN.js +0 -1032
- package/chunk/ewRDIDUz.js +0 -995
- package/chunk/l0sNRNKZ.js +0 -1
- package/chunk/tYXLFPVI.js +0 -871
- 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/style/{variable.less → variables.less} +0 -0
package/Upload.js
CHANGED
package/VerificationCode.js
CHANGED
package/Version.js
CHANGED
package/VirtualList.js
CHANGED
package/Watermark.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { jsx as R, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import w, { forwardRef as N, useContext as F, useRef as j, createElement as z } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { I as K } from "./
|
|
6
|
-
import {
|
|
7
|
-
import { useVerificationCode as L } from "../hooks/
|
|
8
|
-
const
|
|
3
|
+
import { a as D } from "./BJQ5UNa-.js";
|
|
4
|
+
import { c as E } from "./B5gK1Idp.js";
|
|
5
|
+
import { I as K } from "./Dz5BdmXo.js";
|
|
6
|
+
import { m as p } from "./JPPo5nY_.js";
|
|
7
|
+
import { useVerificationCode as L } from "../hooks/useVerificationCode.js";
|
|
8
|
+
const _ = {
|
|
9
9
|
length: 6
|
|
10
10
|
};
|
|
11
|
-
function C(y,
|
|
11
|
+
function C(y, q) {
|
|
12
12
|
var d;
|
|
13
|
-
const
|
|
13
|
+
const n = F(D), e = E(
|
|
14
14
|
y,
|
|
15
|
-
|
|
16
|
-
(d =
|
|
17
|
-
), { size: l, separator:
|
|
15
|
+
_,
|
|
16
|
+
(d = n.componentConfig) == null ? void 0 : d.VerificationCode
|
|
17
|
+
), { size: l, separator: r, status: f, length: g, masked: h, disabled: $ } = e, c = j([]), { value: v, filledValue: x, getInputProps: P } = L({
|
|
18
18
|
defaultValue: e.defaultValue,
|
|
19
19
|
value: e.value,
|
|
20
20
|
length: g,
|
|
21
|
-
getInputRefList: () =>
|
|
21
|
+
getInputRefList: () => c.current,
|
|
22
22
|
onChange: e.onChange,
|
|
23
23
|
onFinish: e.onFinish
|
|
24
|
-
}),
|
|
24
|
+
}), s = n.getPrefixCls("verification-code"), o = n.getPrefixCls("input");
|
|
25
25
|
return /* @__PURE__ */ R(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
className:
|
|
29
|
-
[`${
|
|
28
|
+
className: p(`${s}`, e.className, {
|
|
29
|
+
[`${s}-rtl`]: n.rtl
|
|
30
30
|
}),
|
|
31
31
|
style: e.style,
|
|
32
|
-
children:
|
|
33
|
-
const { onChange: m, onClick: I, onPaste: O, onKeyDown: k, ...
|
|
32
|
+
children: x.map((V, i) => {
|
|
33
|
+
const { onChange: m, onClick: I, onPaste: O, onKeyDown: k, ...u } = P(i);
|
|
34
34
|
return /* @__PURE__ */ b(w.Fragment, { children: [
|
|
35
35
|
/* @__PURE__ */ z(
|
|
36
36
|
K,
|
|
37
37
|
{
|
|
38
38
|
disabled: e.disabled,
|
|
39
39
|
readOnly: e.readOnly,
|
|
40
|
-
className:
|
|
41
|
-
[`${
|
|
42
|
-
[`${
|
|
43
|
-
[`${
|
|
44
|
-
[`${
|
|
40
|
+
className: p(o, `${s}-input`, {
|
|
41
|
+
[`${o}-size-${l}`]: l,
|
|
42
|
+
[`${o}-${f}`]: f,
|
|
43
|
+
[`${o}-disabled`]: $,
|
|
44
|
+
[`${o}-rtl`]: n.rtl
|
|
45
45
|
}),
|
|
46
46
|
ref: (t) => {
|
|
47
|
-
|
|
47
|
+
c.current[i] = t == null ? void 0 : t.dom;
|
|
48
48
|
},
|
|
49
|
-
...
|
|
50
|
-
key:
|
|
49
|
+
...u,
|
|
50
|
+
key: u.key,
|
|
51
51
|
onClick: e.readOnly ? void 0 : I,
|
|
52
52
|
onPaste: e.readOnly ? void 0 : O,
|
|
53
53
|
onKeyDown: e.readOnly ? void 0 : k,
|
|
@@ -55,8 +55,8 @@ function C(y, _) {
|
|
|
55
55
|
if (e.validate) {
|
|
56
56
|
const a = e == null ? void 0 : e.validate({
|
|
57
57
|
inputValue: t,
|
|
58
|
-
index:
|
|
59
|
-
value:
|
|
58
|
+
index: i,
|
|
59
|
+
value: v
|
|
60
60
|
});
|
|
61
61
|
a !== !1 && m(
|
|
62
62
|
typeof a == "string" ? a : t
|
|
@@ -67,8 +67,8 @@ function C(y, _) {
|
|
|
67
67
|
type: h ? "password" : "text"
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
|
|
71
|
-
] },
|
|
70
|
+
r == null ? void 0 : r({ index: i, character: V })
|
|
71
|
+
] }, i);
|
|
72
72
|
})
|
|
73
73
|
}
|
|
74
74
|
);
|
|
@@ -5,7 +5,7 @@ function t(o) {
|
|
|
5
5
|
function s(o, n) {
|
|
6
6
|
const e = t();
|
|
7
7
|
e.open("GET", o), e.responseType = "blob", e.onload = () => {
|
|
8
|
-
|
|
8
|
+
i(e.response, n);
|
|
9
9
|
}, e.onerror = () => {
|
|
10
10
|
console.error("无法下载文件");
|
|
11
11
|
}, e.send();
|
|
@@ -20,15 +20,15 @@ function c(o) {
|
|
|
20
20
|
}
|
|
21
21
|
return n.status >= 200 && n.status <= 299;
|
|
22
22
|
}
|
|
23
|
-
async function
|
|
23
|
+
async function a(o, n) {
|
|
24
24
|
const e = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
|
|
25
25
|
e.rel = "noopener", typeof o == "string" && (e.href = o, e.origin === location.origin || (c(o) ? s(o, n) : e.target = "_blank")), o instanceof Blob && (e.href = await r(o)), o instanceof File && (n || (n = o.name)), n || (n = "download"), e.download = n, setTimeout(() => {
|
|
26
26
|
e.dispatchEvent(new MouseEvent("click"));
|
|
27
27
|
}, 0);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function i(o, n) {
|
|
30
|
+
a(o, n);
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
i as c
|
|
34
34
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useMemo as m } from "react";
|
|
2
|
+
import { c as i } from "./BdUcgWdu.js";
|
|
3
|
+
function u(o, s, t = {}) {
|
|
4
|
+
const { _ignorePropsFromGlobal: c } = o, r = m(() => ({
|
|
5
|
+
...s,
|
|
6
|
+
...c ? {} : t
|
|
7
|
+
}), [s, t, c]);
|
|
8
|
+
return m(() => {
|
|
9
|
+
const n = i(o, [
|
|
10
|
+
"_ignorePropsFromGlobal"
|
|
11
|
+
]);
|
|
12
|
+
for (const e in r)
|
|
13
|
+
n[e] === void 0 && (n[e] = r[e]);
|
|
14
|
+
return n;
|
|
15
|
+
}, [o, r]);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
u as c
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { e } from "./Ce1j9KTi.js";
|
|
2
|
+
import { useState as c, useEffect as m } from "react";
|
|
3
|
+
function f() {
|
|
4
|
+
const [n, r] = c(
|
|
5
|
+
e.matches
|
|
6
|
+
);
|
|
7
|
+
return m(() => {
|
|
8
|
+
function t(o) {
|
|
9
|
+
r(!!o.matches);
|
|
10
|
+
}
|
|
11
|
+
return e.addEventListener(
|
|
12
|
+
"change",
|
|
13
|
+
t
|
|
14
|
+
), () => {
|
|
15
|
+
e.removeEventListener(
|
|
16
|
+
"change",
|
|
17
|
+
t
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
}, []), n;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
f as m
|
|
24
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as $, jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsx as $, jsxs as K, Fragment as Te } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as z, useEffect as Q, useCallback as V, createContext as Ce, useContext as ie } from "react";
|
|
3
3
|
import se from "../Button.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { a as He } from "./BJQ5UNa-.js";
|
|
5
|
+
import { m as ee } from "./JPPo5nY_.js";
|
|
6
|
+
import { c as g, h as Y, V as Oe, X as re, v as ce } from "./BndfNLK4.js";
|
|
7
7
|
import { padStart as C } from "../utils/pad.js";
|
|
8
8
|
import ge from "lodash/debounce";
|
|
9
|
-
import {
|
|
10
|
-
import { C as we, S as Se } from "./
|
|
9
|
+
import { n as ye } from "./DU6bs_19.js";
|
|
10
|
+
import { C as we, S as Se } from "./CANgSlh3.js";
|
|
11
11
|
import { isDayjs as ke } from "dayjs";
|
|
12
12
|
function _(r) {
|
|
13
13
|
const s = ["H", "h", "m", "s", "a", "A"], o = [];
|
|
@@ -44,7 +44,7 @@ function _e(r) {
|
|
|
44
44
|
}
|
|
45
45
|
return r;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function L(r) {
|
|
48
48
|
const {
|
|
49
49
|
prefixCls: s,
|
|
50
50
|
list: o,
|
|
@@ -53,24 +53,24 @@ function R(r) {
|
|
|
53
53
|
unit: u,
|
|
54
54
|
popupVisible: a,
|
|
55
55
|
scrollSticky: d
|
|
56
|
-
} = r, y =
|
|
56
|
+
} = r, y = z(/* @__PURE__ */ new Map()), p = z(null), w = z(), E = z(0), M = ye(a), b = z(
|
|
57
57
|
p.current && p.current.scrollTop
|
|
58
58
|
);
|
|
59
|
-
|
|
59
|
+
Q(() => {
|
|
60
60
|
const i = y.current.get(h);
|
|
61
|
-
i && a &&
|
|
62
|
-
}, [h]),
|
|
63
|
-
if (a && a !==
|
|
61
|
+
i && a && M && (le(p.current, i.offsetTop, 150), b.current = i.offsetTop);
|
|
62
|
+
}, [h]), Q(() => {
|
|
63
|
+
if (a && a !== M) {
|
|
64
64
|
const i = y.current.get(h);
|
|
65
|
-
i && (le(p.current, i.offsetTop, 0),
|
|
65
|
+
i && (le(p.current, i.offsetTop, 0), b.current = i.offsetTop);
|
|
66
66
|
}
|
|
67
|
-
}, [a,
|
|
68
|
-
o.length <= 1 || (
|
|
67
|
+
}, [a, M]), Q(() => {
|
|
68
|
+
o.length <= 1 || (E.current = (w.current.clientHeight - p.current.clientHeight) / (o.length - 1));
|
|
69
69
|
}, [o.length]);
|
|
70
|
-
const
|
|
70
|
+
const j = V(
|
|
71
71
|
ge(() => {
|
|
72
|
-
const H = (p.current.scrollTop -
|
|
73
|
-
p.current.scrollTop /
|
|
72
|
+
const H = (p.current.scrollTop - b.current > 0 ? Math.ceil : Math.floor)(
|
|
73
|
+
p.current.scrollTop / E.current
|
|
74
74
|
);
|
|
75
75
|
H !== h && o[H] && !o[H].disabled && c(o[H].value, u);
|
|
76
76
|
}, 100),
|
|
@@ -81,7 +81,7 @@ function R(r) {
|
|
|
81
81
|
{
|
|
82
82
|
className: ee(`${s}-list`),
|
|
83
83
|
ref: p,
|
|
84
|
-
onWheel: d ?
|
|
84
|
+
onWheel: d ? j : void 0,
|
|
85
85
|
children: /* @__PURE__ */ $("ul", { ref: w, children: o.map((i) => /* @__PURE__ */ $(
|
|
86
86
|
"li",
|
|
87
87
|
{
|
|
@@ -100,8 +100,8 @@ function R(r) {
|
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
const Ne = Ce({}),
|
|
104
|
-
function
|
|
103
|
+
const Ne = Ce({}), Fe = ["am", "pm"];
|
|
104
|
+
function Me(r) {
|
|
105
105
|
return r.use12Hours ?? _(r.format).use12Hours;
|
|
106
106
|
}
|
|
107
107
|
function qe(r) {
|
|
@@ -116,15 +116,15 @@ function qe(r) {
|
|
|
116
116
|
hideDisabledOptions: y,
|
|
117
117
|
onConfirmValue: p,
|
|
118
118
|
isRangePicker: w,
|
|
119
|
-
confirmBtnDisabled:
|
|
120
|
-
valueShow:
|
|
121
|
-
setValueShow:
|
|
122
|
-
extra:
|
|
119
|
+
confirmBtnDisabled: E,
|
|
120
|
+
valueShow: M,
|
|
121
|
+
setValueShow: b,
|
|
122
|
+
extra: j,
|
|
123
123
|
disableConfirm: i,
|
|
124
124
|
hideFooter: H,
|
|
125
125
|
showNowBtn: ne = !0,
|
|
126
126
|
scrollSticky: fe
|
|
127
|
-
} = r, { getPrefixCls: ue, locale: te } = ie(He), B = ue("timepicker"), { utcOffset: q, timezone: W } = ie(Ne), x = Oe(
|
|
127
|
+
} = r, { getPrefixCls: ue, locale: te } = ie(He), B = ue("timepicker"), { utcOffset: q, timezone: W } = ie(Ne), x = Oe(M, s), P = x && x.hour() >= 12 ? "pm" : "am", O = Me(r), X = V(
|
|
128
128
|
(n) => {
|
|
129
129
|
const t = c.hour || 1, e = c.minute || 1, U = c.second || 1, m = [];
|
|
130
130
|
if (n === "hour") {
|
|
@@ -141,10 +141,10 @@ function qe(r) {
|
|
|
141
141
|
return m;
|
|
142
142
|
},
|
|
143
143
|
[c.hour, c.minute, c.second, O]
|
|
144
|
-
), A =
|
|
144
|
+
), A = X("hour"), N = X("minute"), S = X("second");
|
|
145
145
|
let l = x && x.hour();
|
|
146
|
-
l = O && l > 12 ? l - 12 : l, O && l === 0 &&
|
|
147
|
-
const
|
|
146
|
+
l = O && l > 12 ? l - 12 : l, O && l === 0 && P === "am" && (l += 12);
|
|
147
|
+
const F = x && x.minute(), oe = x && x.second(), G = V(
|
|
148
148
|
(n) => {
|
|
149
149
|
switch (n) {
|
|
150
150
|
case "hour":
|
|
@@ -164,7 +164,7 @@ function qe(r) {
|
|
|
164
164
|
case "second":
|
|
165
165
|
return typeof d == "function" ? C(
|
|
166
166
|
S.find(
|
|
167
|
-
(t) => d(l,
|
|
167
|
+
(t) => d(l, F).indexOf(t) === -1
|
|
168
168
|
) || 0,
|
|
169
169
|
2,
|
|
170
170
|
"0"
|
|
@@ -181,52 +181,52 @@ function qe(r) {
|
|
|
181
181
|
a,
|
|
182
182
|
d,
|
|
183
183
|
l,
|
|
184
|
-
|
|
184
|
+
F
|
|
185
185
|
]
|
|
186
186
|
);
|
|
187
187
|
function ae(n, t) {
|
|
188
188
|
const e = _(s).list.indexOf("A") !== -1, U = x || g(
|
|
189
|
-
`${
|
|
189
|
+
`${G("hour")}:${G("minute")}:${G(
|
|
190
190
|
"second"
|
|
191
191
|
)}`,
|
|
192
192
|
"HH:mm:ss"
|
|
193
193
|
);
|
|
194
194
|
let m = U.hour(), f = U.minute(), k = U.second();
|
|
195
|
-
const
|
|
196
|
-
let T = "HH:mm:ss",
|
|
195
|
+
const J = e ? P.toUpperCase() : P;
|
|
196
|
+
let T = "HH:mm:ss", v;
|
|
197
197
|
O && (e ? T = `${T} A` : T = `${T} a`), O && (m = m > 12 ? m - 12 : m), t === "hour" && (typeof a == "function" && a(n).includes(f) && (f = N.find(
|
|
198
198
|
(D) => a(n).indexOf(D) === -1
|
|
199
199
|
) ?? 0), typeof d == "function" && d(n, f).includes(k) && (k = S.find(
|
|
200
200
|
(D) => d(n, f).indexOf(D) === -1
|
|
201
|
-
) ?? 0),
|
|
202
|
-
`${n}:${f}:${k} ${
|
|
201
|
+
) ?? 0), v = g(
|
|
202
|
+
`${n}:${f}:${k} ${J}`,
|
|
203
203
|
T,
|
|
204
204
|
"en"
|
|
205
205
|
)), t === "minute" && (typeof d == "function" && d(m, n).includes(k) && (k = S.find(
|
|
206
206
|
(D) => d(m, n).indexOf(D) === -1
|
|
207
|
-
) ?? 0),
|
|
208
|
-
`${m}:${n}:${k} ${
|
|
207
|
+
) ?? 0), v = g(
|
|
208
|
+
`${m}:${n}:${k} ${J}`,
|
|
209
209
|
T,
|
|
210
210
|
"en"
|
|
211
|
-
)), t === "second" && (
|
|
212
|
-
`${m}:${f}:${n} ${
|
|
211
|
+
)), t === "second" && (v = g(
|
|
212
|
+
`${m}:${f}:${n} ${J}`,
|
|
213
213
|
T,
|
|
214
214
|
"en"
|
|
215
|
-
)), t === "ampm" && (
|
|
215
|
+
)), t === "ampm" && (v = g(
|
|
216
216
|
`${m}:${f}:${k} ${e ? n.toUpperCase() : n}`,
|
|
217
217
|
T,
|
|
218
218
|
"en"
|
|
219
|
-
)),
|
|
220
|
-
ce(
|
|
221
|
-
ce(
|
|
222
|
-
), w || (
|
|
219
|
+
)), v = g(v, T).locale(g.locale()), o == null || o(
|
|
220
|
+
ce(v, q, W).format(s),
|
|
221
|
+
ce(v, q, W)
|
|
222
|
+
), w || (b == null || b(v), i && p(v));
|
|
223
223
|
}
|
|
224
224
|
function de() {
|
|
225
225
|
x && p(x);
|
|
226
226
|
}
|
|
227
227
|
function me() {
|
|
228
228
|
const n = re(), t = re(q, W);
|
|
229
|
-
o == null || o(n.format(s), n), i ? p == null || p(t) :
|
|
229
|
+
o == null || o(n.format(s), n), i ? p == null || p(t) : b == null || b(t);
|
|
230
230
|
}
|
|
231
231
|
const I = {
|
|
232
232
|
prefixCls: B,
|
|
@@ -242,7 +242,7 @@ function qe(r) {
|
|
|
242
242
|
disabled: typeof u == "function" && u().indexOf(e) !== -1
|
|
243
243
|
}));
|
|
244
244
|
return /* @__PURE__ */ $(
|
|
245
|
-
|
|
245
|
+
L,
|
|
246
246
|
{
|
|
247
247
|
...I,
|
|
248
248
|
list: t,
|
|
@@ -255,30 +255,30 @@ function qe(r) {
|
|
|
255
255
|
const t = (y && typeof a == "function" ? N.filter((e) => a(l).indexOf(e) === -1) : N).map((e) => ({
|
|
256
256
|
label: C(`${e}`, 2, "0"),
|
|
257
257
|
value: e,
|
|
258
|
-
selected: l !== void 0 &&
|
|
258
|
+
selected: l !== void 0 && F === e,
|
|
259
259
|
disabled: typeof a == "function" && a(l).indexOf(e) !== -1
|
|
260
260
|
}));
|
|
261
261
|
return /* @__PURE__ */ $(
|
|
262
|
-
|
|
262
|
+
L,
|
|
263
263
|
{
|
|
264
264
|
...I,
|
|
265
265
|
list: t,
|
|
266
|
-
value:
|
|
266
|
+
value: F,
|
|
267
267
|
unit: "minute"
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
271
|
function xe() {
|
|
272
272
|
const t = (y && typeof d == "function" ? S.filter(
|
|
273
|
-
(e) => d(l,
|
|
273
|
+
(e) => d(l, F).indexOf(e) === -1
|
|
274
274
|
) : S).map((e) => ({
|
|
275
275
|
label: C(`${e}`, 2, "0"),
|
|
276
276
|
value: e,
|
|
277
277
|
selected: l !== void 0 && oe === e,
|
|
278
|
-
disabled: typeof d == "function" && d(l,
|
|
278
|
+
disabled: typeof d == "function" && d(l, F).indexOf(e) !== -1
|
|
279
279
|
}));
|
|
280
280
|
return /* @__PURE__ */ $(
|
|
281
|
-
|
|
281
|
+
L,
|
|
282
282
|
{
|
|
283
283
|
...I,
|
|
284
284
|
list: t,
|
|
@@ -288,31 +288,31 @@ function qe(r) {
|
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
function $e() {
|
|
291
|
-
const n = _(s).list.indexOf("A") !== -1, t =
|
|
291
|
+
const n = _(s).list.indexOf("A") !== -1, t = Fe.map((e) => ({
|
|
292
292
|
label: n ? e.toUpperCase() : e,
|
|
293
293
|
value: e,
|
|
294
|
-
selected:
|
|
294
|
+
selected: P === e
|
|
295
295
|
}));
|
|
296
296
|
return /* @__PURE__ */ $(
|
|
297
|
-
|
|
297
|
+
L,
|
|
298
298
|
{
|
|
299
299
|
...I,
|
|
300
300
|
list: t,
|
|
301
|
-
value:
|
|
301
|
+
value: P,
|
|
302
302
|
unit: "ampm"
|
|
303
303
|
}
|
|
304
304
|
);
|
|
305
305
|
}
|
|
306
|
-
const { list:
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
(
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
const { list: R } = _(s), be = ee(B), ve = H || i && w || !w && i && !ne;
|
|
307
|
+
return /* @__PURE__ */ K(Te, { children: [
|
|
308
|
+
/* @__PURE__ */ K("div", { className: be, children: [
|
|
309
|
+
(R.indexOf("H") !== -1 || R.indexOf("h") !== -1) && pe(),
|
|
310
|
+
R.indexOf("m") !== -1 && he(),
|
|
311
|
+
R.indexOf("s") !== -1 && xe(),
|
|
312
312
|
O && $e()
|
|
313
313
|
] }),
|
|
314
|
-
|
|
315
|
-
!
|
|
314
|
+
j && /* @__PURE__ */ $("div", { className: `${B}-footer-extra-wrapper`, children: j }),
|
|
315
|
+
!ve && /* @__PURE__ */ K("div", { className: `${B}-footer-btn-wrapper`, children: [
|
|
316
316
|
!w && ne ? /* @__PURE__ */ $(se, { size: "mini", onClick: me, children: te.TimePicker.now }) : /* @__PURE__ */ $("div", {}),
|
|
317
317
|
!i && /* @__PURE__ */ $(
|
|
318
318
|
se,
|
|
@@ -320,7 +320,7 @@ function qe(r) {
|
|
|
320
320
|
type: "primary",
|
|
321
321
|
size: "mini",
|
|
322
322
|
onClick: de,
|
|
323
|
-
disabled:
|
|
323
|
+
disabled: E || !x,
|
|
324
324
|
children: te.TimePicker.ok
|
|
325
325
|
}
|
|
326
326
|
)
|