@unicom-cloud/ui 0.8.96 → 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/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- 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 +56 -56
- 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 +125 -129
- 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/useId.js +8 -8
- 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 +9 -7
- 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 +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- 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/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 +684 -675
- 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 +222 -230
- 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 +96 -99
- 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 +60 -65
- 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 +107 -107
- 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 +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- 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/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 +337 -346
- 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/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- 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/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 +77 -73
- 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 +48 -49
- 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 +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- 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/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
package/Affix.js
CHANGED
|
@@ -9,7 +9,7 @@ import "./components/common/hooks/useMergeProps.js";
|
|
|
9
9
|
import "@unicom-cloud/utils/class-name";
|
|
10
10
|
import "./components/common/utils/dom.js";
|
|
11
11
|
import "./components/common/utils/is.js";
|
|
12
|
-
import "./components/common/utils/
|
|
12
|
+
import "./components/common/utils/resizeObserver.js";
|
|
13
13
|
import "./components/common/utils/throttleByRaf.js";
|
|
14
14
|
import "./config-provider/context.js";
|
|
15
15
|
import { default as h } from "./affix/index.js";
|
package/Carousel.js
CHANGED
|
@@ -5,7 +5,7 @@ import "./components/common/hooks/useInterval.js";
|
|
|
5
5
|
import "./components/common/hooks/useMergeProps.js";
|
|
6
6
|
import "@unicom-cloud/utils/class-name";
|
|
7
7
|
import "./components/common/utils/omit.js";
|
|
8
|
-
import "./components/common/utils/
|
|
8
|
+
import "./components/common/utils/resizeObserver.js";
|
|
9
9
|
import "./components/common/utils/warning.js";
|
|
10
10
|
import "./carousel/Arrow.js";
|
|
11
11
|
import "./carousel/Indicator.js";
|
package/LiquidFill.js
ADDED
package/OverflowEllipsis.js
CHANGED
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "./config-provider/ConfigProvider.js";
|
|
4
4
|
import "@unicom-cloud/utils/class-name";
|
|
5
|
-
import "./components/common/utils/
|
|
5
|
+
import "./components/common/utils/resizeObserver.js";
|
|
6
6
|
import "./overflow-ellipsis/OverflowItem.js";
|
|
7
7
|
import "./config-provider/context.js";
|
|
8
8
|
import { default as d } from "./overflow-ellipsis/index.js";
|
package/PageHeader.js
CHANGED
|
@@ -9,7 +9,7 @@ import "./components/common/hooks/useMergeProps.js";
|
|
|
9
9
|
import "./icon-hover/index.js";
|
|
10
10
|
import "@unicom-cloud/utils/class-name";
|
|
11
11
|
import "./components/common/utils/omit.js";
|
|
12
|
-
import "./components/common/utils/
|
|
12
|
+
import "./components/common/utils/resizeObserver.js";
|
|
13
13
|
import "./config-provider/context.js";
|
|
14
14
|
import { default as g } from "./page-header/index.js";
|
|
15
15
|
export {
|
package/QrCode.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "lodash/merge";
|
|
3
|
+
import "qrcode.react";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./config-provider/ConfigProvider.js";
|
|
6
|
+
import "@unicom-cloud/utils/case-name";
|
|
7
|
+
import "@unicom-cloud/utils/class-name";
|
|
8
|
+
import "./dist/tinycolor/chunk/BOzCVdr0.js";
|
|
9
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
10
|
+
import "./utils/contextHolder.js";
|
|
11
|
+
import "@unicom-cloud/utils/dayjs";
|
|
12
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
13
|
+
import "./components/common/utils/dayjs.js";
|
|
14
|
+
import "./components/common/utils/dom.js";
|
|
15
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
16
|
+
import "lodash/escapeRegExp";
|
|
17
|
+
import "lodash/isArray";
|
|
18
|
+
import "lodash/isNumber";
|
|
19
|
+
import "lodash/isString";
|
|
20
|
+
import "lodash/isFunction";
|
|
21
|
+
import "lodash/throttle";
|
|
22
|
+
import "./components/common/utils/is.js";
|
|
23
|
+
import "lodash/camelCase";
|
|
24
|
+
import "lodash/capitalize";
|
|
25
|
+
import "lodash/cloneDeep";
|
|
26
|
+
import "lodash/debounce";
|
|
27
|
+
import "lodash/get";
|
|
28
|
+
import "lodash/has";
|
|
29
|
+
import "lodash/kebabCase";
|
|
30
|
+
import "lodash/mergeWith";
|
|
31
|
+
import "lodash/set";
|
|
32
|
+
import "lodash/setWith";
|
|
33
|
+
import "lodash/snakeCase";
|
|
34
|
+
import "lodash/startCase";
|
|
35
|
+
import "lodash/uniq";
|
|
36
|
+
import "lodash/upperFirst";
|
|
37
|
+
import "@unicom-cloud/utils/math";
|
|
38
|
+
import "lodash/isPlainObject";
|
|
39
|
+
import "./dist/react-transition-group/src/CSSTransition.js";
|
|
40
|
+
import "./dist/react-transition-group/src/ReplaceTransition.js";
|
|
41
|
+
import "./dist/react-transition-group/src/SwitchTransition.js";
|
|
42
|
+
import "./dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
43
|
+
import "./dist/react-transition-group/src/TransitionGroup.js";
|
|
44
|
+
import "./components/common/utils/reactDOM.js";
|
|
45
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
46
|
+
import "@unicom-cloud/utils/screenfull";
|
|
47
|
+
import "@unicom-cloud/utils/constant/ui.js";
|
|
48
|
+
import "@unicom-cloud/utils/tree";
|
|
49
|
+
import "@unicom-cloud/utils/is";
|
|
50
|
+
import "uuid";
|
|
51
|
+
import "./dist/validate/src/index.js";
|
|
52
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
53
|
+
import "./config-provider/context.js";
|
|
54
|
+
import { default as ro } from "./qr-code/index.js";
|
|
55
|
+
export {
|
|
56
|
+
ro as default
|
|
57
|
+
};
|
package/Tour.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import "lodash/merge";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "./button/index.js";
|
|
7
|
+
import "./config-provider/ConfigProvider.js";
|
|
8
|
+
import "./icon-hover/index.js";
|
|
9
|
+
import "./space/index.js";
|
|
10
|
+
import "@unicom-cloud/utils/case-name";
|
|
11
|
+
import "@unicom-cloud/utils/class-name";
|
|
12
|
+
import "./dist/tinycolor/chunk/BOzCVdr0.js";
|
|
13
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
14
|
+
import "./utils/contextHolder.js";
|
|
15
|
+
import "@unicom-cloud/utils/dayjs";
|
|
16
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
17
|
+
import "./components/common/utils/dayjs.js";
|
|
18
|
+
import "./components/common/utils/dom.js";
|
|
19
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
20
|
+
import "lodash/escapeRegExp";
|
|
21
|
+
import "lodash/isArray";
|
|
22
|
+
import "lodash/isNumber";
|
|
23
|
+
import "lodash/isString";
|
|
24
|
+
import "./components/common/utils/intersectionObserver.js";
|
|
25
|
+
import "./components/common/utils/is.js";
|
|
26
|
+
import "lodash/camelCase";
|
|
27
|
+
import "lodash/capitalize";
|
|
28
|
+
import "lodash/cloneDeep";
|
|
29
|
+
import "lodash/debounce";
|
|
30
|
+
import "lodash/get";
|
|
31
|
+
import "lodash/has";
|
|
32
|
+
import "lodash/kebabCase";
|
|
33
|
+
import "lodash/mergeWith";
|
|
34
|
+
import "lodash/set";
|
|
35
|
+
import "lodash/setWith";
|
|
36
|
+
import "lodash/snakeCase";
|
|
37
|
+
import "lodash/startCase";
|
|
38
|
+
import "lodash/throttle";
|
|
39
|
+
import "lodash/uniq";
|
|
40
|
+
import "lodash/upperFirst";
|
|
41
|
+
import "@unicom-cloud/utils/math";
|
|
42
|
+
import "lodash/isPlainObject";
|
|
43
|
+
import "./components/common/utils/mutationObserver.js";
|
|
44
|
+
import "./dist/react-transition-group/src/CSSTransition.js";
|
|
45
|
+
import "./dist/react-transition-group/src/ReplaceTransition.js";
|
|
46
|
+
import "./dist/react-transition-group/src/SwitchTransition.js";
|
|
47
|
+
import "./dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
48
|
+
import "./dist/react-transition-group/src/TransitionGroup.js";
|
|
49
|
+
import "./components/common/utils/reactDOM.js";
|
|
50
|
+
import "./components/common/utils/resizeObserver.js";
|
|
51
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
52
|
+
import "@unicom-cloud/utils/screenfull";
|
|
53
|
+
import "@unicom-cloud/utils/constant/ui.js";
|
|
54
|
+
import "@unicom-cloud/utils/tree";
|
|
55
|
+
import "@unicom-cloud/utils/is";
|
|
56
|
+
import "uuid";
|
|
57
|
+
import "./dist/validate/src/index.js";
|
|
58
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
59
|
+
import "./config-provider/context.js";
|
|
60
|
+
import { default as fo } from "./tour/index.js";
|
|
61
|
+
export {
|
|
62
|
+
fo as default
|
|
63
|
+
};
|
package/Trigger.js
CHANGED
|
@@ -16,7 +16,7 @@ import "@unicom-cloud/utils/constant/keyboardCode";
|
|
|
16
16
|
import "./components/common/utils/mergeProps.js";
|
|
17
17
|
import "./components/common/utils/pick.js";
|
|
18
18
|
import "./components/common/utils/reactDOM.js";
|
|
19
|
-
import "./components/common/utils/
|
|
19
|
+
import "./components/common/utils/resizeObserver.js";
|
|
20
20
|
import "./components/common/utils/throttleByRaf.js";
|
|
21
21
|
import "./trigger/getPopupStyle.js";
|
|
22
22
|
import "./config-provider/context.js";
|
package/affix/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as $, jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import R from "lodash/isFunction";
|
|
3
|
+
import k from "lodash/isPlainObject";
|
|
4
|
+
import q from "lodash/isUndefined";
|
|
5
|
+
import { forwardRef as G, useContext as J, useState as K, useRef as w, useMemo as Q, useCallback as V, useEffect as u, useImperativeHandle as X } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { getScrollElements as tt, on as
|
|
7
|
+
import Y from "../components/common/hooks/useIsomorphicLayoutEffect.js";
|
|
8
|
+
import Z from "../components/common/hooks/useMergeProps.js";
|
|
9
|
+
import z from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { getScrollElements as tt, on as E, off as a } from "../components/common/utils/dom.js";
|
|
11
11
|
import { isWindow as et } from "../components/common/utils/is.js";
|
|
12
|
-
import {
|
|
12
|
+
import { resizeObserver as rt } from "../components/common/utils/resizeObserver.js";
|
|
13
13
|
import { throttleByRaf as ot } from "../components/common/utils/throttleByRaf.js";
|
|
14
14
|
import st from "../config-provider/context.js";
|
|
15
|
-
function nt(
|
|
16
|
-
return et(
|
|
15
|
+
function nt(n) {
|
|
16
|
+
return et(n) ? {
|
|
17
17
|
top: 0,
|
|
18
18
|
bottom: window.innerHeight
|
|
19
|
-
} :
|
|
19
|
+
} : n instanceof HTMLElement ? n.getBoundingClientRect() : {
|
|
20
20
|
top: 0,
|
|
21
21
|
bottom: 0
|
|
22
22
|
};
|
|
@@ -24,38 +24,37 @@ function nt(i) {
|
|
|
24
24
|
const it = {
|
|
25
25
|
offsetTop: 0
|
|
26
26
|
};
|
|
27
|
-
function ft(
|
|
28
|
-
const { getPrefixCls:
|
|
29
|
-
|
|
27
|
+
function ft(n, F) {
|
|
28
|
+
const { getPrefixCls: M, componentConfig: v, rtl: H } = J(st), O = Z(
|
|
29
|
+
n,
|
|
30
30
|
it,
|
|
31
|
-
|
|
31
|
+
v?.Affix
|
|
32
32
|
), {
|
|
33
|
-
className:
|
|
34
|
-
style:
|
|
35
|
-
affixClassName:
|
|
36
|
-
affixStyle:
|
|
37
|
-
offsetTop:
|
|
38
|
-
offsetBottom:
|
|
39
|
-
target:
|
|
40
|
-
targetContainer:
|
|
41
|
-
children:
|
|
42
|
-
onChange:
|
|
43
|
-
...
|
|
44
|
-
} =
|
|
33
|
+
className: P,
|
|
34
|
+
style: U,
|
|
35
|
+
affixClassName: _,
|
|
36
|
+
affixStyle: h,
|
|
37
|
+
offsetTop: f,
|
|
38
|
+
offsetBottom: i,
|
|
39
|
+
target: m,
|
|
40
|
+
targetContainer: c,
|
|
41
|
+
children: B,
|
|
42
|
+
onChange: p,
|
|
43
|
+
...I
|
|
44
|
+
} = O, [d, C] = K({
|
|
45
45
|
status: "MEASURE_DONE",
|
|
46
46
|
isFixed: !1,
|
|
47
47
|
sizeStyles: {},
|
|
48
48
|
fixedStyles: {}
|
|
49
|
-
}), { isFixed:
|
|
50
|
-
{ [
|
|
51
|
-
|
|
52
|
-
), r =
|
|
53
|
-
var n, c;
|
|
49
|
+
}), { isFixed: x, sizeStyles: j, fixedStyles: D } = d, N = w(x), b = M?.("affix"), L = z(
|
|
50
|
+
{ [b]: x, [`${b}-rtl`]: H },
|
|
51
|
+
_
|
|
52
|
+
), r = w(null), o = w(null), g = Q(() => {
|
|
54
53
|
let e = null;
|
|
55
|
-
return
|
|
56
|
-
}, [r.current,
|
|
54
|
+
return R(m) ? e = m() : e = tt(r.current)?.at?.(-1) || window, e;
|
|
55
|
+
}, [r.current, m]), t = V(
|
|
57
56
|
ot(() => {
|
|
58
|
-
|
|
57
|
+
C({
|
|
59
58
|
status: "MEASURE_START",
|
|
60
59
|
isFixed: !1,
|
|
61
60
|
fixedStyles: {},
|
|
@@ -64,68 +63,67 @@ function ft(i, H) {
|
|
|
64
63
|
}),
|
|
65
64
|
[]
|
|
66
65
|
);
|
|
67
|
-
return
|
|
68
|
-
const { status: e } =
|
|
66
|
+
return Y(() => {
|
|
67
|
+
const { status: e } = d;
|
|
69
68
|
if (e !== "MEASURE_START" || !r.current || !o.current)
|
|
70
69
|
return;
|
|
71
|
-
const
|
|
72
|
-
let s = !1,
|
|
73
|
-
|
|
70
|
+
const W = q(i) ? "top" : "bottom", A = r.current.getBoundingClientRect(), l = nt(o.current);
|
|
71
|
+
let s = !1, S = {};
|
|
72
|
+
W === "top" ? (s = A.top - l.top < (f || 0), S = s ? {
|
|
74
73
|
position: "fixed",
|
|
75
|
-
top:
|
|
76
|
-
} : {}) : (s =
|
|
74
|
+
top: l.top + (f || 0)
|
|
75
|
+
} : {}) : (s = l.bottom - A.bottom < (i || 0), S = s ? {
|
|
77
76
|
position: "fixed",
|
|
78
|
-
bottom: window.innerHeight -
|
|
77
|
+
bottom: window.innerHeight - l.bottom + (i || 0)
|
|
79
78
|
} : {});
|
|
80
|
-
const
|
|
79
|
+
const T = s ? {
|
|
81
80
|
width: r.current.offsetWidth,
|
|
82
81
|
height: r.current.offsetHeight
|
|
83
82
|
} : {};
|
|
84
|
-
|
|
83
|
+
C({
|
|
85
84
|
status: "MEASURE_DONE",
|
|
86
85
|
isFixed: s,
|
|
87
|
-
sizeStyles:
|
|
88
|
-
fixedStyles: { ...
|
|
89
|
-
}), s !==
|
|
90
|
-
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
p(o.current, "scroll", t), p(o.current, "resize", t);
|
|
86
|
+
sizeStyles: T,
|
|
87
|
+
fixedStyles: { ...S, ...T }
|
|
88
|
+
}), s !== N.current && (N.current = s, R(p) && p(s));
|
|
89
|
+
}, [d, i, f, p]), u(() => (t(), () => {
|
|
90
|
+
t?.cancel?.();
|
|
91
|
+
}), [g, c, i, f, t]), u(() => {
|
|
92
|
+
if (o.current = g, o.current)
|
|
93
|
+
return E(o.current, "scroll", t), E(o.current, "resize", t), () => {
|
|
94
|
+
a(o.current, "scroll", t), a(o.current, "resize", t);
|
|
97
95
|
};
|
|
98
|
-
}, [
|
|
99
|
-
const e =
|
|
100
|
-
return o.current !== window && e ? (
|
|
101
|
-
|
|
96
|
+
}, [g, t]), u(() => {
|
|
97
|
+
const e = R(c) ? c() : null;
|
|
98
|
+
return o.current !== window && e ? (E(e, "scroll", t), () => {
|
|
99
|
+
a(e, "scroll", t);
|
|
102
100
|
}) : () => {
|
|
103
|
-
|
|
101
|
+
a(e, "scroll", t);
|
|
104
102
|
};
|
|
105
|
-
}, [
|
|
103
|
+
}, [c, t]), X(F, () => ({
|
|
106
104
|
updatePosition: t,
|
|
107
105
|
getRootDOMNode: () => r.current
|
|
108
|
-
})),
|
|
106
|
+
})), u(() => {
|
|
109
107
|
const e = rt([r.current], t);
|
|
110
108
|
return () => {
|
|
111
109
|
e();
|
|
112
110
|
};
|
|
113
|
-
}, [r.current]), /* @__PURE__ */
|
|
114
|
-
|
|
115
|
-
/* @__PURE__ */
|
|
111
|
+
}, [r.current]), /* @__PURE__ */ $("div", { className: z(P), style: U, ref: r, ...I, children: [
|
|
112
|
+
x && /* @__PURE__ */ y("div", { style: j }),
|
|
113
|
+
/* @__PURE__ */ y(
|
|
116
114
|
"div",
|
|
117
115
|
{
|
|
118
|
-
className:
|
|
116
|
+
className: L,
|
|
119
117
|
style: {
|
|
120
|
-
...
|
|
121
|
-
...
|
|
118
|
+
...D,
|
|
119
|
+
...k(h) ? h : {}
|
|
122
120
|
},
|
|
123
|
-
children:
|
|
121
|
+
children: B || /* @__PURE__ */ y("span", {})
|
|
124
122
|
}
|
|
125
123
|
)
|
|
126
124
|
] });
|
|
127
125
|
}
|
|
128
|
-
const ct =
|
|
126
|
+
const ct = G(
|
|
129
127
|
ft
|
|
130
128
|
);
|
|
131
129
|
ct.displayName = "Affix";
|
package/alert/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import j from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
|
+
import k from "@unicom-cloud/icons/IconUiClose";
|
|
4
|
+
import R from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
5
|
+
import T from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
|
+
import a from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
7
|
+
import { forwardRef as _, useRef as q, useContext as z, useState as H } from "react";
|
|
8
8
|
import "../config-provider/ConfigProvider.js";
|
|
9
9
|
import M from "../components/common/hooks/useMergeProps.js";
|
|
10
10
|
import O from "@unicom-cloud/utils/class-name";
|
|
@@ -14,80 +14,80 @@ const D = {
|
|
|
14
14
|
showIcon: !0,
|
|
15
15
|
type: "default"
|
|
16
16
|
};
|
|
17
|
-
function G(
|
|
18
|
-
|
|
19
|
-
const { getPrefixCls:
|
|
20
|
-
|
|
17
|
+
function G(m, n) {
|
|
18
|
+
n ||= q();
|
|
19
|
+
const { getPrefixCls: p, componentConfig: f, rtl: d } = z(B), l = M(
|
|
20
|
+
m,
|
|
21
21
|
D,
|
|
22
|
-
|
|
22
|
+
f?.Alert
|
|
23
23
|
), {
|
|
24
|
-
style:
|
|
25
|
-
className:
|
|
26
|
-
action:
|
|
27
|
-
type:
|
|
28
|
-
title:
|
|
29
|
-
content:
|
|
30
|
-
icon:
|
|
31
|
-
showIcon:
|
|
32
|
-
closable:
|
|
33
|
-
closeable:
|
|
34
|
-
afterClose:
|
|
35
|
-
onClose:
|
|
24
|
+
style: u,
|
|
25
|
+
className: C,
|
|
26
|
+
action: s,
|
|
27
|
+
type: i,
|
|
28
|
+
title: t,
|
|
29
|
+
content: r,
|
|
30
|
+
icon: N,
|
|
31
|
+
showIcon: b,
|
|
32
|
+
closable: h,
|
|
33
|
+
closeable: $,
|
|
34
|
+
afterClose: x,
|
|
35
|
+
onClose: I,
|
|
36
36
|
closeElement: v,
|
|
37
37
|
banner: w,
|
|
38
|
-
...
|
|
39
|
-
} =
|
|
40
|
-
default: /* @__PURE__ */ e(
|
|
41
|
-
info: /* @__PURE__ */ e(
|
|
42
|
-
success: /* @__PURE__ */ e(
|
|
43
|
-
warning: /* @__PURE__ */ e(
|
|
44
|
-
error: /* @__PURE__ */ e(
|
|
45
|
-
}[
|
|
46
|
-
function
|
|
47
|
-
|
|
38
|
+
...g
|
|
39
|
+
} = l, o = p?.("alert"), [y, U] = H(!0), A = N || {
|
|
40
|
+
default: /* @__PURE__ */ e(a, {}),
|
|
41
|
+
info: /* @__PURE__ */ e(a, {}),
|
|
42
|
+
success: /* @__PURE__ */ e(j, {}),
|
|
43
|
+
warning: /* @__PURE__ */ e(T, {}),
|
|
44
|
+
error: /* @__PURE__ */ e(R, {})
|
|
45
|
+
}[i];
|
|
46
|
+
function E(S) {
|
|
47
|
+
U(!1), I?.(S);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const F = O(
|
|
50
50
|
o,
|
|
51
|
-
`${o}-${
|
|
51
|
+
`${o}-${i}`,
|
|
52
52
|
{
|
|
53
|
-
[`${o}-with-title`]:
|
|
53
|
+
[`${o}-with-title`]: t,
|
|
54
54
|
[`${o}-banner`]: w,
|
|
55
|
-
[`${o}-rtl`]:
|
|
55
|
+
[`${o}-rtl`]: d
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
),
|
|
57
|
+
C
|
|
58
|
+
), P = "closeable" in l ? $ : h;
|
|
59
59
|
return /* @__PURE__ */ e(
|
|
60
60
|
V,
|
|
61
61
|
{
|
|
62
|
-
in:
|
|
62
|
+
in: y,
|
|
63
63
|
timeout: 300,
|
|
64
64
|
classNames: "zoomInTop",
|
|
65
65
|
unmountOnExit: !0,
|
|
66
66
|
onExited: () => {
|
|
67
|
-
|
|
67
|
+
x?.();
|
|
68
68
|
},
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ c(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
|
-
ref:
|
|
73
|
-
style:
|
|
74
|
-
className:
|
|
72
|
+
ref: n,
|
|
73
|
+
style: u,
|
|
74
|
+
className: F,
|
|
75
75
|
role: "alert",
|
|
76
|
-
...
|
|
76
|
+
...g,
|
|
77
77
|
children: [
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
b && /* @__PURE__ */ e("div", { className: `${o}-icon-wrapper`, children: A }),
|
|
79
|
+
/* @__PURE__ */ c("div", { className: `${o}-content-wrapper`, children: [
|
|
80
|
+
t && /* @__PURE__ */ e("div", { className: `${o}-title`, children: t }),
|
|
81
|
+
r && /* @__PURE__ */ e("div", { className: `${o}-content`, children: r })
|
|
82
82
|
] }),
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
s && /* @__PURE__ */ e("div", { className: `${o}-action`, children: s }),
|
|
84
|
+
P && /* @__PURE__ */ e(
|
|
85
85
|
"button",
|
|
86
86
|
{
|
|
87
87
|
type: "button",
|
|
88
|
-
onClick:
|
|
88
|
+
onClick: E,
|
|
89
89
|
className: `${o}-close-btn`,
|
|
90
|
-
children: v || /* @__PURE__ */ e(
|
|
90
|
+
children: v || /* @__PURE__ */ e(k, {})
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
93
|
]
|
|
@@ -96,7 +96,7 @@ function G(u, r) {
|
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
|
-
const J =
|
|
99
|
+
const J = _(G);
|
|
100
100
|
J.displayName = "Alert";
|
|
101
101
|
export {
|
|
102
102
|
J as default
|