@unicom-cloud/ui 0.8.95 → 0.8.97
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 +1 -1
- package/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/Message.js +1 -1
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Switch.js +1 -1
- package/Tour.js +63 -0
- package/Trigger.js +2 -2
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +52 -51
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +126 -130
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useForceUpdate.js +6 -2
- package/components/common/hooks/useId.js +4 -4
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +11 -10
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +55 -56
- package/development/index.js +9 -9
- package/dist/react-transition-group/src/CSSTransition.js +1 -1
- package/dist/react-transition-group/src/SwitchTransition.js +1 -1
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/tween/src/tween.js +24 -25
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/index.js +50 -52
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +682 -679
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +223 -231
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +189 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/liquid-fill/interface.js +1 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +97 -100
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +61 -66
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +108 -108
- package/slider/util.js +1 -1
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +61 -61
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +78 -79
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/time-picker/util.js +4 -4
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +338 -347
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/math.d.ts +1 -1
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/alert/interface.d.ts +2 -2
- package/types/pc/details/interface.d.ts +2 -2
- package/types/pc/hooks/index.d.ts +0 -1
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +30 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +4 -0
- package/types/pc/liquid-fill/interface.d.ts +0 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/math.d.ts +1 -1
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +78 -75
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +49 -50
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +274 -275
- package/utils/intersectionObserver.js +4 -0
- package/utils/math.js +7 -11
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/reactTransitionGroup.js +1 -1
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/hooks/useComputedState.js +0 -11
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/hooks/useComputedState.js +0 -4
- package/types/common/hooks/useComputedState.d.ts +0 -4
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/hooks/useComputedState.d.ts +0 -1
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
- /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
|
@@ -3,7 +3,7 @@ import { useState as l, useDeferredValue as h, useCallback as o, useEffect as m
|
|
|
3
3
|
import z from "./useListenResize.js";
|
|
4
4
|
const R = (i = !1) => {
|
|
5
5
|
const [s, u] = l({
|
|
6
|
-
...
|
|
6
|
+
...t(null)
|
|
7
7
|
}), c = h(
|
|
8
8
|
s
|
|
9
9
|
// 延迟一个值与防抖和节流之间有什么不同?
|
|
@@ -14,17 +14,17 @@ const R = (i = !1) => {
|
|
|
14
14
|
// 此外,与防抖或节流不同,useDeferredValue 执行的延迟重新渲染默认是可中断的。这意味着,如果 React 正在重新渲染一个大型列表,但用户进行了另一次键盘输入,React 会放弃该重新渲染,先处理键盘输入,然后再次开始在后台渲染。相比之下,防抖和节流仍会产生不顺畅的体验,因为它们是阻塞的:它们仅仅是将渲染阻塞键盘输入的时刻推迟了。
|
|
15
15
|
// 如果你要优化的工作不是在渲染期间发生的,那么防抖和节流仍然非常有用。例如,它们可以让你减少网络请求的次数。你也可以同时使用这些技术。
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
const
|
|
17
|
+
function t(e) {
|
|
18
|
+
const r = e?.currentTarget ?? e?.target ?? window;
|
|
19
19
|
return {
|
|
20
|
-
width:
|
|
21
|
-
height:
|
|
20
|
+
width: r?.innerWidth ?? 0,
|
|
21
|
+
height: r?.innerHeight ?? 0
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
u(
|
|
24
|
+
function n(e) {
|
|
25
|
+
u(t(e));
|
|
26
26
|
}
|
|
27
|
-
const a = o(
|
|
27
|
+
const a = o(n, []), f = o(d(n, 123), []);
|
|
28
28
|
return z(i ? f : a, []), m(() => () => {
|
|
29
29
|
}, []), c;
|
|
30
30
|
};
|
|
@@ -4,6 +4,7 @@ import { forwardRef as c } from "react";
|
|
|
4
4
|
import "@unicom-cloud/utils/case-name";
|
|
5
5
|
import _ from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import "../../../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
7
|
+
import "@unicom-cloud/utils/dayjs";
|
|
7
8
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
8
9
|
import "../utils/dayjs.js";
|
|
9
10
|
import "../utils/dom.js";
|
|
@@ -12,6 +13,8 @@ import "lodash/escapeRegExp";
|
|
|
12
13
|
import "lodash/isArray";
|
|
13
14
|
import "lodash/isNumber";
|
|
14
15
|
import "lodash/isString";
|
|
16
|
+
import "lodash/isFunction";
|
|
17
|
+
import "lodash/throttle";
|
|
15
18
|
import "../utils/is.js";
|
|
16
19
|
import "lodash/camelCase";
|
|
17
20
|
import "lodash/capitalize";
|
|
@@ -26,7 +29,6 @@ import "lodash/set";
|
|
|
26
29
|
import "lodash/setWith";
|
|
27
30
|
import "lodash/snakeCase";
|
|
28
31
|
import "lodash/startCase";
|
|
29
|
-
import "lodash/throttle";
|
|
30
32
|
import "lodash/uniq";
|
|
31
33
|
import "lodash/upperFirst";
|
|
32
34
|
import "@unicom-cloud/utils/math";
|
|
@@ -34,22 +36,21 @@ import "lodash/isPlainObject";
|
|
|
34
36
|
import "../../../dist/react-transition-group/src/CSSTransition.js";
|
|
35
37
|
import "../../../dist/react-transition-group/src/ReplaceTransition.js";
|
|
36
38
|
import "../../../dist/react-transition-group/src/SwitchTransition.js";
|
|
37
|
-
import "../../../dist/react-transition-group/chunk/
|
|
39
|
+
import "../../../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
38
40
|
import "../../../dist/react-transition-group/src/TransitionGroup.js";
|
|
39
41
|
import "../utils/reactDOM.js";
|
|
40
42
|
import "@unicom-cloud/utils/file/saveAs";
|
|
41
43
|
import "@unicom-cloud/utils/screenfull";
|
|
42
44
|
import "@unicom-cloud/utils/tree";
|
|
43
|
-
import "
|
|
45
|
+
import { isArray as l, isNumber as I } from "@unicom-cloud/utils/is";
|
|
44
46
|
import "uuid";
|
|
45
47
|
import "../../../dist/validate/src/index.js";
|
|
46
48
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
47
|
-
import { isArray as l, isNumber as I } from "@unicom-cloud/utils/is";
|
|
48
49
|
function f(t = 8) {
|
|
49
50
|
if (I(t))
|
|
50
51
|
return t;
|
|
51
52
|
if (l(t))
|
|
52
|
-
return t.map((i, r,
|
|
53
|
+
return t.map((i, r, e) => f(i));
|
|
53
54
|
switch (t) {
|
|
54
55
|
case "mini":
|
|
55
56
|
return 4;
|
|
@@ -65,7 +66,7 @@ function f(t = 8) {
|
|
|
65
66
|
}
|
|
66
67
|
function S(t, i) {
|
|
67
68
|
const r = `${C}-space`, {
|
|
68
|
-
className:
|
|
69
|
+
className: e,
|
|
69
70
|
style: d,
|
|
70
71
|
children: $,
|
|
71
72
|
inline: y,
|
|
@@ -76,8 +77,8 @@ function S(t, i) {
|
|
|
76
77
|
alignItems: g,
|
|
77
78
|
...w
|
|
78
79
|
} = t;
|
|
79
|
-
let
|
|
80
|
-
n === "horizontal" && (
|
|
80
|
+
let p = g;
|
|
81
|
+
n === "horizontal" && (p ||= "center");
|
|
81
82
|
const o = f(N), m = { ...d };
|
|
82
83
|
return l(o) ? (m.rowGap = o[0], m.columnGap = o[1]) : m.gap = o, /* @__PURE__ */ s(
|
|
83
84
|
"div",
|
|
@@ -89,8 +90,8 @@ function S(t, i) {
|
|
|
89
90
|
h && `${r}-wrap`,
|
|
90
91
|
`${r}-${n}`,
|
|
91
92
|
a && `${r}-justify-content-${a}`,
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
p && `${r}-align-items-${p}`,
|
|
94
|
+
e
|
|
94
95
|
),
|
|
95
96
|
style: m,
|
|
96
97
|
...w,
|
|
@@ -2,7 +2,7 @@ import { jsx as d } from "react/jsx-runtime";
|
|
|
2
2
|
import u from "../../../dist/react-transition-group/src/CSSTransition.js";
|
|
3
3
|
import "../../../dist/react-transition-group/src/ReplaceTransition.js";
|
|
4
4
|
import "../../../dist/react-transition-group/src/SwitchTransition.js";
|
|
5
|
-
import "../../../dist/react-transition-group/chunk/
|
|
5
|
+
import "../../../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
6
6
|
import "../../../dist/react-transition-group/src/TransitionGroup.js";
|
|
7
7
|
import { useRef as f, useMemo as l, isValidElement as a, cloneElement as s } from "react";
|
|
8
8
|
import { supportRef as E } from "./is.js";
|
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import { NOOP as
|
|
2
|
-
const
|
|
1
|
+
import { NOOP as i } from "./constant.js";
|
|
2
|
+
const l = function() {
|
|
3
3
|
try {
|
|
4
4
|
return !(typeof window < "u" && document !== void 0);
|
|
5
5
|
} catch {
|
|
6
6
|
return !0;
|
|
7
7
|
}
|
|
8
|
-
}(),
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
(r = t == null ? void 0 : t.addEventListener) == null || r.call(t, c, o, n || !1);
|
|
8
|
+
}(), w = /* @__PURE__ */ function() {
|
|
9
|
+
return l ? i : function(t, o, n, e) {
|
|
10
|
+
t?.addEventListener?.(o, n, e || !1);
|
|
12
11
|
};
|
|
13
|
-
}(),
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
(r = t == null ? void 0 : t.removeEventListener) == null || r.call(t, c, o, n || !1);
|
|
12
|
+
}(), E = /* @__PURE__ */ function() {
|
|
13
|
+
return l ? i : function(t, o, n, e) {
|
|
14
|
+
t?.removeEventListener?.(o, n, e || !1);
|
|
17
15
|
};
|
|
18
|
-
}(),
|
|
16
|
+
}(), g = function(t, o) {
|
|
19
17
|
if (!t)
|
|
20
18
|
return !1;
|
|
21
19
|
if (t.contains)
|
|
22
|
-
return t.contains(
|
|
23
|
-
let
|
|
24
|
-
for (;
|
|
25
|
-
if (
|
|
20
|
+
return t.contains(o);
|
|
21
|
+
let n = o;
|
|
22
|
+
for (; n; ) {
|
|
23
|
+
if (n === t)
|
|
26
24
|
return !0;
|
|
27
|
-
|
|
25
|
+
n = n.parentNode;
|
|
28
26
|
}
|
|
29
27
|
return !1;
|
|
30
28
|
};
|
|
31
29
|
function h(t) {
|
|
32
30
|
if (!(t instanceof HTMLElement) || t === document.documentElement || t === window)
|
|
33
31
|
return !1;
|
|
34
|
-
const
|
|
35
|
-
return
|
|
32
|
+
const o = t === document.documentElement ? t.clientHeight : t.offsetHeight, n = t === document.documentElement ? t.clientWidth : t.offsetWidth, e = t.scrollHeight, s = t.scrollWidth, c = window.getComputedStyle(t), u = c.getPropertyValue("overflow-x"), f = c.getPropertyValue("overflow-y"), r = ["scroll", "auto"], d = e > o && r.includes(f), a = s > n && r.includes(u);
|
|
33
|
+
return d || a;
|
|
36
34
|
}
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
for (;
|
|
41
|
-
h(
|
|
42
|
-
return
|
|
35
|
+
const p = (t, o = document.documentElement) => {
|
|
36
|
+
const n = [];
|
|
37
|
+
let e = t;
|
|
38
|
+
for (; e && e !== o; )
|
|
39
|
+
h(e) && n.push(e), e = e.parentElement;
|
|
40
|
+
return n;
|
|
43
41
|
};
|
|
44
42
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
g as contains,
|
|
44
|
+
p as getScrollElements,
|
|
47
45
|
h as isScrollElement,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
l as isServerRendering,
|
|
47
|
+
E as off,
|
|
48
|
+
w as on
|
|
51
49
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function i(o, l = !1) {
|
|
2
|
+
if (!o) return document.documentElement;
|
|
3
|
+
const n = getComputedStyle(o), r = n.position === "absolute", c = l ? /(auto|scroll|hidden)/ : /(auto|scroll)/;
|
|
4
|
+
if (n.position === "fixed")
|
|
5
|
+
return document.documentElement;
|
|
6
|
+
for (let t = o; t = t.parentElement; ) {
|
|
7
|
+
const e = getComputedStyle(t);
|
|
8
|
+
if (!(r && e.position === "static") && (c.test(
|
|
9
|
+
e.overflow + e.overflowY + e.overflowX
|
|
10
|
+
) || t.scrollHeight > t.clientHeight))
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
return document.documentElement;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
i as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import a from "lodash/isFunction";
|
|
2
|
+
import f from "lodash/throttle";
|
|
3
|
+
function h(c, n) {
|
|
4
|
+
const t = [].concat(c).filter(Boolean);
|
|
5
|
+
if (!(t.length && a(n))) return () => {
|
|
6
|
+
};
|
|
7
|
+
const o = f((...e) => {
|
|
8
|
+
n(...e);
|
|
9
|
+
}), r = new IntersectionObserver(o);
|
|
10
|
+
return t.forEach((e, i, s) => {
|
|
11
|
+
r.observe(e);
|
|
12
|
+
}), () => {
|
|
13
|
+
t.forEach((e, i, s) => {
|
|
14
|
+
r.unobserve(e);
|
|
15
|
+
}), r.disconnect(), o.cancel();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
h as default,
|
|
20
|
+
h as intersectionObserver
|
|
21
|
+
};
|
|
@@ -1,126 +1,116 @@
|
|
|
1
|
-
import { isPlainObject as
|
|
2
|
-
import { isArguments as
|
|
3
|
-
import { isDayjs as
|
|
4
|
-
import { isValidElement as
|
|
5
|
-
import
|
|
6
|
-
import { isForwardRef as
|
|
7
|
-
import { isAsyncMode as
|
|
8
|
-
function
|
|
1
|
+
import { isPlainObject as l } from "@unicom-cloud/utils/is";
|
|
2
|
+
import { isArguments as L, isArray as v, isArrayBuffer as V, isArrayLike as W, isArrayLikeObject as h, isBlob as k, isBoolean as B, isBuffer as j, isColor as I, isColor2 as Y, isDate as q, isElement as z, isEmpty as U, isEmptyArray as H, isEmptyObject as J, isEmptyValue as G, isEqual as K, isEqualWith as Q, isError as X, isFile as Z, isFinite as ii, isFunction as si, isInteger as ri, isJSON as ei, isLength as ti, isMap as oi, isMatch as ai, isMatchWith as ni, isNaN as fi, isNative as ui, isNil as pi, isNull as li, isNumber as ci, isObject as yi, isObjectLike as di, isPlainObject as Ri, isPromise as Ei, isReadableByteStreamControllerSupported as mi, isReadableStream as Si, isReadableStreamDefaultControllerSupported as $i, isReadableStreamSupported as Ci, isReadableStreamSymbolAsyncIteratorSupported as Mi, isRegExp as bi, isSafeInteger as Ai, isSet as Ni, isString as Ti, isSymbol as Fi, isTypedArray as Pi, isUndefined as gi, isValidColor as Oi, isWeakMap as wi, isWeakSet as xi } from "@unicom-cloud/utils/is";
|
|
3
|
+
import { isDayjs as c } from "dayjs";
|
|
4
|
+
import { isValidElement as o } from "react";
|
|
5
|
+
import a from "react-dom";
|
|
6
|
+
import { isForwardRef as n, ForwardRef as t, Memo as y } from "react-is";
|
|
7
|
+
import { isAsyncMode as Di, isConcurrentMode as Li, isContextConsumer as vi, isContextProvider as Vi, isElement as Wi, isForwardRef as hi, isFragment as ki, isLazy as Bi, isMemo as ji, isPortal as Ii, isProfiler as Yi, isStrictMode as qi, isSuspense as zi, isValidElementType as Ui } from "react-is";
|
|
8
|
+
function T(i) {
|
|
9
9
|
return i == null;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function F(i, s) {
|
|
12
12
|
return i == null || i === !1 || typeof i == "string" && (s ? i.trim() === "" : i === "");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function P(i) {
|
|
15
15
|
return i || i === 0;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function g(i) {
|
|
18
18
|
return i === window;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return i &&
|
|
20
|
+
function O(i) {
|
|
21
|
+
return i && c(i) && typeof i.isValid == "function" && i.isValid() && l(i) && "$y" in i && "$M" in i && "$D" in i && "$d" in i && "$H" in i && "$m" in i && "$s" in i;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var o;
|
|
28
|
-
const _ = Number((o = f.version) == null ? void 0 : o.split(".")[0]) > 17;
|
|
29
|
-
var a;
|
|
30
|
-
const S = Number((a = f.version) == null ? void 0 : a.split(".")[0]) > 18, $ = (i) => {
|
|
31
|
-
if (!S)
|
|
32
|
-
return u(i);
|
|
33
|
-
const s = Symbol.for("react.element"), l = Symbol.for("react.transitional.element"), c = Symbol.for("react.forward_ref");
|
|
23
|
+
const f = (i) => i && o(i) && typeof i.type == "function", d = (i) => f(i) && !!i.type.prototype?.isReactComponent, R = (i) => o(i) && typeof i.type == "string", w = Number(a.version?.split(".")[0]) > 17, E = Number(a.version?.split(".")[0]) > 18, m = (i) => {
|
|
24
|
+
if (!E)
|
|
25
|
+
return n(i);
|
|
26
|
+
const s = Symbol.for("react.element"), u = Symbol.for("react.transitional.element"), p = Symbol.for("react.forward_ref");
|
|
34
27
|
if (typeof i == "object" && i !== null) {
|
|
35
28
|
const r = i.$$typeof;
|
|
36
|
-
if (r === s || r ===
|
|
29
|
+
if (r === s || r === u) {
|
|
37
30
|
const e = i.type;
|
|
38
|
-
return (e && e.$$typeof) ===
|
|
31
|
+
return (e && e.$$typeof) === p;
|
|
39
32
|
}
|
|
40
33
|
}
|
|
41
34
|
return !1;
|
|
42
|
-
},
|
|
43
|
-
var s;
|
|
44
|
-
return i ? m(i) || $(i) || u(i) || i.$$typeof === t ? !0 : i.$$typeof === R ? ((s = i.type) == null ? void 0 : s.$$typeof) === t : p(i) ? E(i) : !1 : !1;
|
|
45
|
-
}, D = C;
|
|
35
|
+
}, S = (i) => i ? R(i) || m(i) || n(i) || i.$$typeof === t ? !0 : i.$$typeof === y ? i.type?.$$typeof === t : f(i) ? d(i) : !1 : !1, x = S;
|
|
46
36
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
37
|
+
L as isArguments,
|
|
38
|
+
v as isArray,
|
|
39
|
+
V as isArrayBuffer,
|
|
40
|
+
W as isArrayLike,
|
|
41
|
+
h as isArrayLikeObject,
|
|
42
|
+
k as isBlob,
|
|
43
|
+
B as isBoolean,
|
|
44
|
+
j as isBuffer,
|
|
45
|
+
d as isClassComponent,
|
|
46
|
+
I as isColor,
|
|
47
|
+
Y as isColor2,
|
|
48
|
+
R as isDOMElement,
|
|
49
|
+
q as isDate,
|
|
50
|
+
O as isDayjs,
|
|
51
|
+
z as isElement,
|
|
52
|
+
U as isEmpty,
|
|
53
|
+
H as isEmptyArray,
|
|
54
|
+
J as isEmptyObject,
|
|
55
|
+
F as isEmptyReactNode,
|
|
56
|
+
G as isEmptyValue,
|
|
57
|
+
K as isEqual,
|
|
58
|
+
Q as isEqualWith,
|
|
59
|
+
X as isError,
|
|
60
|
+
P as isExist,
|
|
61
|
+
Z as isFile,
|
|
62
|
+
ii as isFinite,
|
|
63
|
+
m as isForwardRefReact,
|
|
64
|
+
si as isFunction,
|
|
65
|
+
ri as isInteger,
|
|
66
|
+
ei as isJSON,
|
|
67
|
+
ti as isLength,
|
|
68
|
+
oi as isMap,
|
|
69
|
+
ai as isMatch,
|
|
70
|
+
ni as isMatchWith,
|
|
71
|
+
fi as isNaN,
|
|
72
|
+
ui as isNative,
|
|
73
|
+
pi as isNil,
|
|
74
|
+
li as isNull,
|
|
75
|
+
T as isNullOrUndefined,
|
|
76
|
+
ci as isNumber,
|
|
77
|
+
yi as isObject,
|
|
78
|
+
di as isObjectLike,
|
|
79
|
+
Ri as isPlainObject,
|
|
80
|
+
Ei as isPromise,
|
|
81
|
+
w as isReact18,
|
|
82
|
+
E as isReact19,
|
|
83
|
+
Di as isReactAsyncMode,
|
|
84
|
+
f as isReactComponent,
|
|
85
|
+
Li as isReactConcurrentMode,
|
|
86
|
+
vi as isReactContextConsumer,
|
|
87
|
+
Vi as isReactContextProvider,
|
|
88
|
+
Wi as isReactElement,
|
|
89
|
+
hi as isReactForwardRef,
|
|
90
|
+
ki as isReactFragment,
|
|
91
|
+
Bi as isReactLazy,
|
|
92
|
+
ji as isReactMemo,
|
|
93
|
+
Ii as isReactPortal,
|
|
94
|
+
Yi as isReactProfiler,
|
|
95
|
+
qi as isReactStrictMode,
|
|
96
|
+
zi as isReactSuspense,
|
|
97
|
+
Ui as isReactValidElementType,
|
|
98
|
+
mi as isReadableByteStreamControllerSupported,
|
|
99
|
+
Si as isReadableStream,
|
|
100
|
+
$i as isReadableStreamDefaultControllerSupported,
|
|
101
|
+
Ci as isReadableStreamSupported,
|
|
102
|
+
Mi as isReadableStreamSymbolAsyncIteratorSupported,
|
|
103
|
+
bi as isRegExp,
|
|
104
|
+
Ai as isSafeInteger,
|
|
105
|
+
Ni as isSet,
|
|
106
|
+
Ti as isString,
|
|
107
|
+
x as isSupportRef,
|
|
108
|
+
Fi as isSymbol,
|
|
109
|
+
Pi as isTypedArray,
|
|
110
|
+
gi as isUndefined,
|
|
111
|
+
Oi as isValidColor,
|
|
112
|
+
wi as isWeakMap,
|
|
113
|
+
xi as isWeakSet,
|
|
114
|
+
g as isWindow,
|
|
115
|
+
S as supportRef
|
|
126
116
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import s from "lodash/isFunction";
|
|
2
|
+
import u from "lodash/throttle";
|
|
3
|
+
function m(i, e) {
|
|
4
|
+
const r = [].concat(i).filter(Boolean);
|
|
5
|
+
if (!(r.length && s(e))) return () => {
|
|
6
|
+
};
|
|
7
|
+
const o = u((...t) => {
|
|
8
|
+
e(...t);
|
|
9
|
+
}), n = new MutationObserver(o);
|
|
10
|
+
return r.forEach((t, c, a) => {
|
|
11
|
+
n.observe(t, { attributes: !0, childList: !0, subtree: !0 });
|
|
12
|
+
}), () => {
|
|
13
|
+
n.disconnect(), o.cancel();
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
m as default,
|
|
18
|
+
m as mutationObserver
|
|
19
|
+
};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { Component as
|
|
2
|
-
import
|
|
3
|
-
import { isReact18 as
|
|
4
|
-
import { warning as
|
|
5
|
-
import { isFunction as
|
|
6
|
-
const
|
|
7
|
-
let
|
|
1
|
+
import { Component as c } from "react";
|
|
2
|
+
import a, { findDOMNode as r } from "react-dom";
|
|
3
|
+
import { isReact18 as s } from "./is.js";
|
|
4
|
+
import { warning as u } from "./warning.js";
|
|
5
|
+
import { isFunction as f } from "@unicom-cloud/utils/is";
|
|
6
|
+
const d = a;
|
|
7
|
+
let n;
|
|
8
8
|
try {
|
|
9
|
-
|
|
9
|
+
n = d.createRoot;
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (typeof
|
|
12
|
+
let e;
|
|
13
|
+
function p(t) {
|
|
14
|
+
const o = t.constructor;
|
|
15
|
+
if (typeof o != "function")
|
|
16
16
|
return !1;
|
|
17
|
-
!
|
|
18
|
-
const
|
|
19
|
-
return
|
|
17
|
+
!e && typeof WeakSet == "function" && (e = /* @__PURE__ */ new WeakSet());
|
|
18
|
+
const i = !!e?.has(o);
|
|
19
|
+
return e?.add(o), i;
|
|
20
20
|
}
|
|
21
|
-
const N = (
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
29
|
-
if (
|
|
30
|
-
return
|
|
21
|
+
const N = (t, o) => {
|
|
22
|
+
if (t) {
|
|
23
|
+
if (t instanceof Element)
|
|
24
|
+
return t;
|
|
25
|
+
if (t.current instanceof Element)
|
|
26
|
+
return t.current;
|
|
27
|
+
if (f(t.getRootDOMNode))
|
|
28
|
+
return t.getRootDOMNode();
|
|
29
|
+
if (t instanceof c && r)
|
|
30
|
+
return r(t);
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
|
|
32
|
+
return o && (u(
|
|
33
|
+
s && !p(o),
|
|
34
34
|
"Element does not define the `getRootDOMNode` method causing a call to React.findDOMNode. but findDOMNode is deprecated in StrictMode. Please check the code logic",
|
|
35
|
-
{ element:
|
|
36
|
-
),
|
|
37
|
-
}, m = (
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
35
|
+
{ element: t, instance: o }
|
|
36
|
+
), r) ? r(o) : null;
|
|
37
|
+
}, m = (t, o) => {
|
|
38
|
+
t && t.ref && (f(t.ref) && t?.ref(o), "current" in t.ref && (t.ref.current = o));
|
|
39
|
+
}, k = (t) => {
|
|
40
|
+
n = t;
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
43
|
m as callbackOriginRef,
|
|
44
44
|
N as findDOMNode_,
|
|
45
|
-
|
|
45
|
+
k as setCreateRoot
|
|
46
46
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import a from "lodash/isFunction";
|
|
2
|
+
import f from "lodash/throttle";
|
|
3
|
+
function h(s, t) {
|
|
4
|
+
const r = [].concat(s).filter(Boolean);
|
|
5
|
+
if (!(r.length && a(t))) return () => {
|
|
6
|
+
};
|
|
7
|
+
const n = f((...e) => {
|
|
8
|
+
t(...e);
|
|
9
|
+
}), o = new ResizeObserver(n);
|
|
10
|
+
return r.forEach((e, i, c) => {
|
|
11
|
+
o.observe(e);
|
|
12
|
+
}), () => {
|
|
13
|
+
r.forEach((e, i, c) => {
|
|
14
|
+
o.unobserve(e);
|
|
15
|
+
}), o.disconnect(), n.cancel();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
h as default,
|
|
20
|
+
h as resizeObserver
|
|
21
|
+
};
|