@unicom-cloud/ui 0.8.100 → 0.8.102
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/Badge.js +7 -54
- package/Copy.js +5 -4
- package/Details.js +13 -2
- package/Divider.js +3 -2
- package/Flex.js +14 -4
- package/LiquidFill.js +5 -4
- package/List.js +1 -1
- package/Loading.js +16 -3
- package/Marquee.js +5 -4
- package/QrCode.js +5 -4
- package/Space.js +3 -3
- package/Splitter.js +4 -3
- package/SuspenseFallbackTest.js +2 -4
- package/Tooltip.js +3 -4
- package/Tour.js +5 -4
- package/alert/index.js +60 -62
- package/anchor/Anchor.js +12 -12
- package/anchor/util.js +10 -10
- package/back-top/index.js +33 -34
- package/badge/index.js +109 -162
- package/calendar/index.js +85 -84
- package/card/index.js +63 -43
- package/color-picker/InputHex.js +3 -4
- package/color-picker/InputRgb.js +7 -8
- package/color-picker/Palette.js +3 -4
- package/color-picker/Panel.js +3 -4
- package/color-picker/colors.js +5 -5
- package/color-picker/hooks/useColorPicker.js +3 -4
- package/color-picker/utils.js +14 -15
- package/components/common/development/index.js +44 -29
- package/components/common/empty/index.js +35 -23
- package/components/common/flex/index.js +64 -0
- package/components/common/flex/interface.js +9 -0
- package/components/common/higher-order/with-speech-synthesis/index.js +79 -55
- package/components/common/space/index.js +71 -91
- package/components/common/suspense-fallback-test/index.js +16 -0
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/components/common/utils/constant.js +6 -3
- package/components/common/utils/reactDOM.js +6 -4
- package/components/common/utils/{scrollIntoView.js → scrollIntoViewIfNeeded.js} +1 -1
- package/components/common/utils/setPrimaryColor.js +18 -18
- package/components/common/utils/setTheme.js +8 -9
- package/components/common/utils/toArray.js +12 -0
- package/copy/index.js +3 -2
- package/details/index.js +102 -62
- package/dist/scroll-into-view-if-needed/compute/index.js +126 -0
- package/dist/scroll-into-view-if-needed/smooth/index.js +70 -0
- package/dist/scroll-into-view-if-needed/src/index.js +19 -19
- package/divider/index.js +27 -21
- package/empty/index.js +13 -13
- package/flex/index.js +43 -55
- package/flex/interface.js +1 -34
- package/form/FormItem.js +69 -65
- package/form/context.js +6 -7
- package/grid/Col-.js +86 -0
- package/grid/Col.js +156 -73
- package/grid/Grid.js +71 -67
- package/grid/Row.js +3 -3
- package/grid/index.js +13 -13
- package/icon/interface.js +1 -0
- package/icon-hover/interface.js +1 -0
- package/index.js +641 -663
- package/input/Textarea.js +1 -1
- package/input/autoSizeTextAreaHeight.js +7 -7
- package/liquid-fill/index.js +5 -4
- package/list/index.js +1 -1
- package/loading/index.js +72 -53
- package/loading/interface.js +1 -0
- package/marquee/index.js +5 -4
- package/menu/Item.js +9 -9
- package/modal/Modal.js +73 -74
- package/package.json +1 -1
- package/portal/interface.js +1 -0
- package/qr-code/index.js +5 -4
- package/segmented/index.js +47 -47
- package/space/index.js +41 -35
- package/speech-synthesis/interface.js +1 -0
- package/splitter/SplitBar.js +81 -79
- package/splitter/Splitter.js +92 -104
- package/splitter/hooks/useItems.js +1 -1
- package/splitter/hooks/useResizable.js +9 -18
- package/splitter/hooks/useResize.js +10 -10
- package/splitter/hooks/useSizes.js +28 -28
- package/splitter/index.js +5 -4
- package/statistic/index.js +10 -10
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +2 -11
- package/suspense-fallback-test/interface.js +1 -0
- package/table/Table.js +376 -377
- package/table/hook/useThResizable.js +5 -4
- package/table/th-resizable/index.js +12 -11
- package/time-picker/util.js +8 -8
- package/tooltip/index.js +1 -2
- package/tour/index.js +5 -4
- package/tree/NodeList.js +1 -1
- package/trigger/index.js +67 -70
- package/types/common/development/index.d.ts +7 -1
- package/types/common/development/interface.d.ts +22 -0
- package/types/common/empty/index.d.ts +2 -1
- package/types/common/flex/index.d.ts +14 -0
- package/types/common/flex/interface.d.ts +62 -0
- package/types/common/higher-order/with-speech-synthesis/index.d.ts +6 -1
- package/types/common/higher-order/with-speech-synthesis/interface.d.ts +13 -0
- package/types/common/space/index.d.ts +4 -4
- package/types/common/space/interface.d.ts +10 -18
- package/types/common/suspense-fallback-test/index.d.ts +7 -0
- package/types/common/suspense-fallback-test/interface.d.ts +1 -0
- package/types/common/utils/PqbCSSTransition.d.ts +1 -1
- package/types/common/utils/constant.d.ts +1 -0
- package/types/common/utils/scrollIntoViewIfNeeded.d.ts +4 -0
- package/types/common/utils/toArray.d.ts +13 -0
- package/types/common/utils/tree.d.ts +1 -0
- package/types/common/utils/tween.d.ts +1 -0
- package/types/pc/alert/index.d.ts +2 -1
- package/types/pc/alert/interface.d.ts +7 -1
- package/types/pc/anchor/util.d.ts +1 -1
- package/types/pc/badge/Count.d.ts +1 -1
- package/types/pc/badge/interface.d.ts +2 -0
- package/types/pc/breadcrumb/Item.d.ts +1 -1
- package/types/pc/calendar/Month.d.ts +1 -1
- package/types/pc/calendar/WeekList.d.ts +1 -1
- package/types/pc/calendar/Year.d.ts +1 -1
- package/types/pc/calendar/header/Panel.d.ts +1 -1
- package/types/pc/calendar/header/index.d.ts +1 -1
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/calendar/interface.d.ts +2 -1
- package/types/pc/card/interface.d.ts +8 -0
- package/types/pc/cascader/interface.d.ts +1 -1
- package/types/pc/cascader/panel/List.d.ts +1 -1
- package/types/pc/cascader/panel/Option.d.ts +1 -1
- package/types/pc/cascader/panel/Search.d.ts +1 -1
- package/types/pc/checkbox/Group.d.ts +2 -2
- package/types/pc/checkbox/GroupBlock.d.ts +1 -1
- package/types/pc/checkbox/IconCheck.d.ts +1 -1
- package/types/pc/color-picker/InputRgb.d.ts +1 -1
- package/types/pc/color-picker/Palette.d.ts +1 -1
- package/types/pc/color-picker/hooks/useColorPicker.d.ts +7 -2
- package/types/pc/color-picker/utils.d.ts +6 -1
- package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +4 -0
- package/types/pc/copy/index.d.ts +1 -1
- package/types/pc/date-picker/panel/Body.d.ts +1 -1
- package/types/pc/date-picker/panel/Footer.d.ts +1 -1
- package/types/pc/date-picker/panel/Header.d.ts +1 -1
- package/types/pc/date-picker/panel/WeekList.d.ts +1 -1
- package/types/pc/date-picker/panel/date/index.d.ts +1 -1
- package/types/pc/date-picker/panel/month/index.d.ts +1 -1
- package/types/pc/date-picker/panel/quarter/index.d.ts +1 -1
- package/types/pc/date-picker/panel/range/index.d.ts +1 -1
- package/types/pc/date-picker/panel/week/index.d.ts +1 -1
- package/types/pc/date-picker/panel/year/index.d.ts +1 -1
- package/types/pc/descriptions/index.d.ts +1 -1
- package/types/pc/details/index.d.ts +3 -2
- package/types/pc/details/interface.d.ts +16 -0
- package/types/pc/development/index.d.ts +2 -1
- package/types/pc/development/interface.d.ts +15 -0
- package/types/pc/divider/index.d.ts +7 -2
- package/types/pc/draggable/Item.d.ts +1 -1
- package/types/pc/draggable/index.d.ts +1 -1
- package/types/pc/flex/index.d.ts +4 -4
- package/types/pc/flex/interface.d.ts +8 -53
- package/types/pc/form/Control.d.ts +1 -1
- package/types/pc/form/FormItem.d.ts +1 -1
- package/types/pc/form/FormList.d.ts +1 -1
- package/types/pc/form/IconSymbol.d.ts +1 -1
- package/types/pc/grid/Col-.d.ts +4 -0
- package/types/pc/grid/Col.d.ts +3 -2
- package/types/pc/grid/Grid.d.ts +2 -2
- package/types/pc/grid/Item.d.ts +3 -3
- package/types/pc/grid/Row.d.ts +2 -2
- package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
- package/types/pc/grid/interface.d.ts +13 -7
- package/types/pc/icon/addFromIconFontCn.d.ts +1 -7
- package/types/pc/icon/index.d.ts +2 -7
- package/types/pc/icon/interface.d.ts +13 -0
- package/types/pc/icon-hover/index.d.ts +2 -8
- package/types/pc/icon-hover/interface.d.ts +8 -0
- package/types/pc/image/ImageFooter.d.ts +1 -1
- package/types/pc/image/ImagePreviewArrow.d.ts +1 -1
- package/types/pc/image/TriggerForToolbar.d.ts +1 -1
- package/types/pc/index.d.ts +60 -51
- package/types/pc/loading/index.d.ts +4 -3
- package/types/pc/loading/interface.d.ts +6 -0
- package/types/pc/menu/Indent.d.ts +1 -1
- package/types/pc/menu/OverflowWrap.d.ts +1 -1
- package/types/pc/menu/sub-menu/Inline.d.ts +1 -1
- package/types/pc/menu/sub-menu/Pop.d.ts +1 -1
- package/types/pc/overflow-ellipsis/OverflowItem.d.ts +1 -1
- package/types/pc/overflow-ellipsis/index.d.ts +1 -1
- package/types/pc/pagination/PageItem.d.ts +3 -3
- package/types/pc/pagination/PageJumper.d.ts +1 -1
- package/types/pc/pagination/PageOption.d.ts +1 -1
- package/types/pc/portal/Portal.d.ts +2 -6
- package/types/pc/portal/index.d.ts +2 -9
- package/types/pc/portal/interface.d.ts +14 -0
- package/types/pc/progress/CircleProgress.d.ts +1 -1
- package/types/pc/progress/LineProgess.d.ts +1 -1
- package/types/pc/progress/StepProgress.d.ts +1 -1
- package/types/pc/radio/Group.d.ts +2 -2
- package/types/pc/radio/GroupBlock.d.ts +1 -1
- package/types/pc/radio/Radio.d.ts +1 -1
- package/types/pc/resize-box/ResizeTrigger.d.ts +1 -1
- package/types/pc/result/403.d.ts +1 -1
- package/types/pc/result/404.d.ts +1 -1
- package/types/pc/result/500.d.ts +1 -1
- package/types/pc/segmented/interface.d.ts +6 -6
- package/types/pc/skeleton/Image.d.ts +1 -1
- package/types/pc/skeleton/Text.d.ts +2 -1
- package/types/pc/slider/Button.d.ts +1 -1
- package/types/pc/slider/Input.d.ts +1 -1
- package/types/pc/slider/Tick.d.ts +1 -1
- package/types/pc/space/index.d.ts +6 -5
- package/types/pc/speech-synthesis/index.d.ts +3 -1
- package/types/pc/speech-synthesis/interface.d.ts +7 -0
- package/types/pc/spin/DotLoading.d.ts +1 -1
- package/types/pc/splitter/SplitBar.d.ts +0 -1
- package/types/pc/splitter/hooks/useResizable.d.ts +0 -1
- package/types/pc/splitter/hooks/useResize.d.ts +1 -2
- package/types/pc/splitter/index.d.ts +5 -4
- package/types/pc/splitter/interface.d.ts +16 -24
- package/types/pc/suspense-fallback-test/index.d.ts +2 -3
- package/types/pc/suspense-fallback-test/interface.d.ts +2 -0
- package/types/pc/table/ColGroup.d.ts +1 -1
- package/types/pc/table/summary/Cell.d.ts +1 -1
- package/types/pc/table/summary/Row.d.ts +1 -1
- package/types/pc/table/tbody/Td.d.ts +1 -1
- package/types/pc/table/tbody/index.d.ts +1 -1
- package/types/pc/table/tfoot/index.d.ts +1 -1
- package/types/pc/table/th-resizable/index.d.ts +1 -1
- package/types/pc/table/thead/Column.d.ts +1 -1
- package/types/pc/table/thead/index.d.ts +1 -1
- package/types/pc/tabs/TabContent.d.ts +1 -1
- package/types/pc/tabs/tab-header/DropdownIcon.d.ts +1 -1
- package/types/pc/tabs/tab-header/TabInk.d.ts +1 -1
- package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
- package/types/pc/time-picker/Picker.d.ts +1 -1
- package/types/pc/time-picker/RangePicker.d.ts +1 -1
- package/types/pc/time-picker/TimeColumn.d.ts +1 -1
- package/types/pc/time-picker/TimePicker.d.ts +1 -1
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/tour/index.d.ts +1 -1
- package/types/pc/transfer/Item.d.ts +1 -1
- package/types/pc/transfer/List.d.ts +1 -1
- package/types/pc/tree/Animation.d.ts +1 -1
- package/types/pc/typography/Operations.d.ts +1 -1
- package/types/pc/upload/interface.d.ts +1 -0
- package/types/pc/upload/list/index.d.ts +1 -1
- package/types/pc/utils/constant.d.ts +1 -2
- package/types/pc/utils/dayjs.d.ts +2 -1
- package/types/pc/utils/index.d.ts +2 -5
- package/types/pc/utils/scrollIntoViewIfNeeded.d.ts +3 -0
- package/types/pc/utils/toArray.d.ts +1 -5
- package/types/pc/utils/tree.d.ts +2 -1
- package/types/pc/utils/tween.d.ts +1 -1
- package/types/pc/verification-code/VerificationCode.d.ts +1 -1
- package/types/pc/virtual-list/VirtualList.d.ts +2 -38
- package/types/pc/virtual-list/index.d.ts +2 -1
- package/types/pc/virtual-list/interface.d.ts +56 -0
- package/types/pc/watermark/Watermark.d.ts +1 -1
- package/typography/Ellipsis.js +5 -4
- package/typography/Operations.js +5 -4
- package/upload/request.js +12 -13
- package/upload/request_.js +2 -3
- package/utils/constant.js +5 -5
- package/utils/dayjs.js +13 -12
- package/utils/index.js +261 -284
- package/utils/scrollIntoViewIfNeeded.js +12 -0
- package/utils/toArray.js +3 -10
- package/utils/tree.js +11 -9
- package/utils/tween.js +5 -5
- package/version/index.js +1 -1
- package/virtual-list/interface.js +1 -0
- package/components/common/space/toArray.js +0 -11
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +0 -6
- package/dist/compute-scroll-into-view/src/index.js +0 -126
- package/dist/tinycolor/chunk/BOzCVdr0.js +0 -182
- package/dist/tinycolor/customize/index.js +0 -12
- package/dist/tinycolor/src/conversion.js +0 -143
- package/dist/tinycolor/src/css-color-names.js +0 -153
- package/dist/tinycolor/src/format-input.js +0 -77
- package/dist/tinycolor/src/index.js +0 -388
- package/dist/tinycolor/src/util.js +0 -32
- package/flex/utils.js +0 -13
- package/loading/style/index.module.less.js +0 -4
- package/types/common/space/toArray.d.ts +0 -3
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
- package/types/common/utils/scrollIntoView.d.ts +0 -4
- package/types/common/utils/tinycolor.d.ts +0 -1
- package/types/pc/flex/utils.d.ts +0 -9
- package/types/pc/suspense-fallback-test/style/index.d.ts +0 -1
- package/types/pc/utils/color.d.ts +0 -1
- package/types/pc/utils/computeScrollIntoView.d.ts +0 -1
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
- package/types/pc/utils/scrollIntoView.d.ts +0 -3
- package/types/pc/utils/tinycolor.d.ts +0 -1
- package/utils/color.js +0 -4
- package/utils/computeScrollIntoView.js +0 -6
- package/utils/convertToDurationBasedOnTimeUnits.js +0 -6
- package/utils/scrollIntoView.js +0 -6
- package/utils/tinycolor.js +0 -29
- /package/{suspense-fallback-test/style/index.less.js → development/interface.js} +0 -0
package/input/Textarea.js
CHANGED
|
@@ -49,7 +49,7 @@ const ge = (e, A) => {
|
|
|
49
49
|
beforeTriggerValueChangeCallback: (t) => {
|
|
50
50
|
!("value" in e) && (n === void 0 || t.length <= n) && U(t);
|
|
51
51
|
}
|
|
52
|
-
}), S = F || l || "", { getPrefixCls: J, rtl: g } = ne(de), o = J?.("textarea"), z = s || e.resize === "none" || C(e.autoSize) && !w(e.autoSize.minRows) && !w(e.autoSize.maxRows) && e.autoSize?.minRows === e.autoSize?.maxRows
|
|
52
|
+
}), S = F || l || "", { getPrefixCls: J, rtl: g } = ne(de), o = J?.("textarea"), z = s || e.resize === "none" || !w(e.rows) || C(e.autoSize) && !w(e.autoSize.minRows) && !w(e.autoSize.maxRows) && e.autoSize?.minRows === e.autoSize?.maxRows;
|
|
53
53
|
z ? f.resize = "none" : e.resize && (f.resize = e.resize);
|
|
54
54
|
const y = () => {
|
|
55
55
|
if (r.current && r.current.focus) {
|
|
@@ -32,11 +32,11 @@ function y(n) {
|
|
|
32
32
|
r || (r = document.createElement("textarea"), document.body.appendChild(r));
|
|
33
33
|
const t = window.getComputedStyle(n), m = w.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";");
|
|
34
34
|
r.setAttribute("style", u + m);
|
|
35
|
-
const e = parseFloat(t.getPropertyValue("padding-top")) + parseFloat(t.getPropertyValue("padding-bottom")), i = t.getPropertyValue("box-sizing"),
|
|
35
|
+
const e = parseFloat(t.getPropertyValue("padding-top")) + parseFloat(t.getPropertyValue("padding-bottom")), i = t.getPropertyValue("box-sizing"), g = parseFloat(t.getPropertyValue("border-top-width")) + parseFloat(t.getPropertyValue("border-bottom-width"));
|
|
36
36
|
return {
|
|
37
37
|
paddingSize: e,
|
|
38
38
|
boxSizing: i,
|
|
39
|
-
borderSize:
|
|
39
|
+
borderSize: g
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function H(n, t) {
|
|
@@ -48,16 +48,16 @@ function H(n, t) {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
if (n) {
|
|
51
|
-
const { minRows: e, maxRows: i } = m(),
|
|
52
|
-
r.value =
|
|
53
|
-
let d = r.scrollHeight + p,
|
|
51
|
+
const { minRows: e, maxRows: i } = m(), g = t, { paddingSize: a, boxSizing: x, borderSize: p } = y(g);
|
|
52
|
+
r.value = g.value || g.placeholder || "";
|
|
53
|
+
let d = r.scrollHeight + p, l, o, h;
|
|
54
54
|
if (e || i) {
|
|
55
55
|
r.value = "";
|
|
56
56
|
const f = r.scrollHeight - a;
|
|
57
|
-
c(e) && (
|
|
57
|
+
c(e) && (l = f * e, x === "border-box" && (l += a, l += p), d = Math.max(d, l)), c(i) && (o = f * i, x === "border-box" && (o += a, o += p), h = d > o ? "auto" : "", o = Math.min(d, o));
|
|
58
58
|
}
|
|
59
59
|
const s = {};
|
|
60
|
-
return s.height = d,
|
|
60
|
+
return s.height = d, l && (s.minHeight = l), o && (s.maxHeight = o), h && (s.overflowY = h), s;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
export {
|
package/liquid-fill/index.js
CHANGED
|
@@ -13,12 +13,11 @@ import "../components/common/utils/reactDOM.js";
|
|
|
13
13
|
import "@unicom-cloud/utils/constant";
|
|
14
14
|
import mt from "../components/common/hooks/useUpdateEffect.js";
|
|
15
15
|
import "lodash/debounce";
|
|
16
|
+
import "@unicom-cloud/utils/date";
|
|
16
17
|
import "@unicom-cloud/utils/case-name";
|
|
17
18
|
import lt from "@unicom-cloud/utils/class-name";
|
|
18
|
-
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
19
19
|
import "@unicom-cloud/utils/constant/ui";
|
|
20
20
|
import "../utils/contextHolder.js";
|
|
21
|
-
import "@unicom-cloud/utils/dayjs";
|
|
22
21
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
23
22
|
import "../components/common/utils/dayjs.js";
|
|
24
23
|
import "@unicom-cloud/utils/file/fileToURL";
|
|
@@ -49,6 +48,8 @@ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
|
49
48
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
50
49
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
50
|
import "@unicom-cloud/utils/screenfull";
|
|
51
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
52
|
+
import "@unicom-cloud/utils/ui-color";
|
|
52
53
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
53
54
|
import "react-is";
|
|
54
55
|
import "@unicom-cloud/utils/tree";
|
|
@@ -73,7 +74,7 @@ const dt = {
|
|
|
73
74
|
decimalPlaces: 0,
|
|
74
75
|
percentFontScale: 0.5,
|
|
75
76
|
waveSpeedVariation: 0.5
|
|
76
|
-
},
|
|
77
|
+
}, we = (E) => {
|
|
77
78
|
const { getPrefixCls: I, componentConfig: _ } = at(pt), i = I?.("liquid-fill"), H = st(
|
|
78
79
|
E,
|
|
79
80
|
dt,
|
|
@@ -254,5 +255,5 @@ const dt = {
|
|
|
254
255
|
);
|
|
255
256
|
};
|
|
256
257
|
export {
|
|
257
|
-
|
|
258
|
+
we as default
|
|
258
259
|
};
|
package/list/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import Tt from "../spin/index.js";
|
|
|
10
10
|
import x from "@unicom-cloud/utils/class-name";
|
|
11
11
|
import { omit as Bt } from "../components/common/utils/omit.js";
|
|
12
12
|
import { pickDataAttributes as Vt } from "../components/common/utils/pick.js";
|
|
13
|
-
import { scrollIntoView as _t } from "../components/common/utils/
|
|
13
|
+
import { scrollIntoView as _t } from "../components/common/utils/scrollIntoViewIfNeeded.js";
|
|
14
14
|
import kt from "../virtual-list/VirtualList.js";
|
|
15
15
|
import Gt from "./Item.js";
|
|
16
16
|
import Ot from "../config-provider/context.js";
|
package/loading/index.js
CHANGED
|
@@ -1,61 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d, useContext as g, useMemo as u } from "react";
|
|
3
|
+
import "../config-provider/ConfigProvider.js";
|
|
4
|
+
import "lodash/isEqualWith";
|
|
5
|
+
import "../components/common/utils/is.js";
|
|
6
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
7
|
+
import "lodash/isNumber";
|
|
8
|
+
import "lodash/merge";
|
|
9
|
+
import "../components/common/utils/dom.js";
|
|
10
|
+
import "../components/common/hooks/useIntersectionObserver.js";
|
|
11
|
+
import A from "../components/common/hooks/useMergeProps.js";
|
|
12
|
+
import "../components/common/utils/reactDOM.js";
|
|
13
|
+
import "@unicom-cloud/utils/constant";
|
|
14
|
+
import "lodash/debounce";
|
|
15
|
+
import E from "@unicom-cloud/utils/class-name";
|
|
16
|
+
import I from "../config-provider/context.js";
|
|
17
|
+
const v = ["#FF5F57", "#FEBC2E", "#28C840"], e = 50, o = e / 2, S = 4, t = 7, c = 12, T = "0.7s", w = "0.5 0 0.5 1;0.5 0 0.5 1", D = (l, M) => {
|
|
18
|
+
const { getPrefixCls: m, componentConfig: p, rtl: a } = g(I), f = A(
|
|
19
|
+
l,
|
|
20
|
+
{},
|
|
21
|
+
p?.Loading
|
|
22
|
+
), { colors: s = v, style: x, className: $, ...O } = f, n = m?.("mentions"), C = u(
|
|
23
|
+
() => [
|
|
24
|
+
{
|
|
25
|
+
cx: o - c,
|
|
26
|
+
fill: s[0],
|
|
27
|
+
values: `${o + t};${o};${o + t}`
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
cx: o,
|
|
31
|
+
fill: s[1],
|
|
32
|
+
values: `${o - t};${o};${o - t}`
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
cx: o + c,
|
|
36
|
+
fill: s[2],
|
|
37
|
+
values: `${o + t};${o};${o + t}`
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
[s]
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ r(
|
|
9
43
|
"svg",
|
|
10
44
|
{
|
|
11
|
-
|
|
45
|
+
style: { ...x },
|
|
46
|
+
className: E(`${n}`, !!a && `${n}-rtl`, $),
|
|
12
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
15
|
-
viewBox:
|
|
48
|
+
width: `${e}px`,
|
|
49
|
+
height: `${e}px`,
|
|
50
|
+
viewBox: `0 0 ${e} ${e}`,
|
|
16
51
|
preserveAspectRatio: "xMidYMid",
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
repeatCount: "indefinite"
|
|
40
|
-
}
|
|
41
|
-
) }),
|
|
42
|
-
/* @__PURE__ */ t("circle", { cx: l + s, cy: e, r: c, fill: i[2], children: /* @__PURE__ */ t(
|
|
43
|
-
"animate",
|
|
44
|
-
{
|
|
45
|
-
attributeName: "cy",
|
|
46
|
-
values: `${e + 7};${e};${e + 7}`,
|
|
47
|
-
dur: n,
|
|
48
|
-
calcMode: "spline",
|
|
49
|
-
keySplines: r,
|
|
50
|
-
begin: "0s",
|
|
51
|
-
repeatCount: "indefinite"
|
|
52
|
-
}
|
|
53
|
-
) })
|
|
54
|
-
]
|
|
52
|
+
children: C.map((i, N) => /* @__PURE__ */ r(
|
|
53
|
+
"circle",
|
|
54
|
+
{
|
|
55
|
+
cx: i.cx,
|
|
56
|
+
cy: o,
|
|
57
|
+
r: S,
|
|
58
|
+
fill: i.fill,
|
|
59
|
+
children: /* @__PURE__ */ r(
|
|
60
|
+
"animate",
|
|
61
|
+
{
|
|
62
|
+
attributeName: "cy",
|
|
63
|
+
values: i.values,
|
|
64
|
+
dur: T,
|
|
65
|
+
calcMode: "spline",
|
|
66
|
+
keySplines: w,
|
|
67
|
+
begin: "0s",
|
|
68
|
+
repeatCount: "indefinite"
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
N
|
|
73
|
+
))
|
|
55
74
|
}
|
|
56
75
|
);
|
|
57
|
-
}
|
|
58
|
-
|
|
76
|
+
}, L = d(D);
|
|
77
|
+
L.displayName = "Loading";
|
|
59
78
|
export {
|
|
60
|
-
|
|
79
|
+
L as default
|
|
61
80
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/marquee/index.js
CHANGED
|
@@ -12,12 +12,11 @@ import V from "../components/common/hooks/useMergeProps.js";
|
|
|
12
12
|
import "../components/common/utils/reactDOM.js";
|
|
13
13
|
import "@unicom-cloud/utils/constant";
|
|
14
14
|
import "lodash/debounce";
|
|
15
|
+
import "@unicom-cloud/utils/date";
|
|
15
16
|
import "@unicom-cloud/utils/case-name";
|
|
16
17
|
import Z from "@unicom-cloud/utils/class-name";
|
|
17
|
-
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
18
18
|
import "@unicom-cloud/utils/constant/ui";
|
|
19
19
|
import "../utils/contextHolder.js";
|
|
20
|
-
import "@unicom-cloud/utils/dayjs";
|
|
21
20
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
22
21
|
import "../components/common/utils/dayjs.js";
|
|
23
22
|
import "@unicom-cloud/utils/file/fileToURL";
|
|
@@ -49,6 +48,8 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
49
48
|
import { resizeObserver as _ } from "../components/common/utils/resizeObserver.js";
|
|
50
49
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
50
|
import "@unicom-cloud/utils/screenfull";
|
|
51
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
52
|
+
import "@unicom-cloud/utils/ui-color";
|
|
52
53
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
53
54
|
import "react-is";
|
|
54
55
|
import "@unicom-cloud/utils/tree";
|
|
@@ -65,7 +66,7 @@ const et = {
|
|
|
65
66
|
loop: 0,
|
|
66
67
|
// 0表示无限循环
|
|
67
68
|
gradientSize: 50
|
|
68
|
-
},
|
|
69
|
+
}, ce = (q) => {
|
|
69
70
|
const { getPrefixCls: O, componentConfig: P } = U(tt), s = O?.("marquee"), R = V(
|
|
70
71
|
q,
|
|
71
72
|
et,
|
|
@@ -279,5 +280,5 @@ const et = {
|
|
|
279
280
|
);
|
|
280
281
|
};
|
|
281
282
|
export {
|
|
282
|
-
|
|
283
|
+
ce as default
|
|
283
284
|
};
|
package/menu/Item.js
CHANGED
|
@@ -5,11 +5,11 @@ import U from "../components/common/hooks/useIsFirstRender.js";
|
|
|
5
5
|
import z from "../tooltip/index.js";
|
|
6
6
|
import A from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { Enter as H } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
8
|
-
import { omit as
|
|
8
|
+
import { omit as b } from "../components/common/utils/omit.js";
|
|
9
9
|
import V from "./Indent.js";
|
|
10
10
|
import W from "./context.js";
|
|
11
11
|
import { PROPS_NEED_TO_BE_PASSED_IN_SUBMENU as q } from "./util.js";
|
|
12
|
-
function G(
|
|
12
|
+
function G(C, c) {
|
|
13
13
|
const {
|
|
14
14
|
_key: a,
|
|
15
15
|
children: i,
|
|
@@ -21,7 +21,7 @@ function G(b, c) {
|
|
|
21
21
|
onClick: _,
|
|
22
22
|
renderItemInTooltip: d,
|
|
23
23
|
...$
|
|
24
|
-
} =
|
|
24
|
+
} = C, {
|
|
25
25
|
prefixCls: t,
|
|
26
26
|
mode: p,
|
|
27
27
|
collapse: m,
|
|
@@ -74,7 +74,7 @@ function G(b, c) {
|
|
|
74
74
|
onKeyDown: (e) => {
|
|
75
75
|
e.key === H.key && k(e);
|
|
76
76
|
},
|
|
77
|
-
...
|
|
77
|
+
...b(
|
|
78
78
|
$,
|
|
79
79
|
["key", "_key"].concat(q)
|
|
80
80
|
),
|
|
@@ -113,14 +113,14 @@ function G(b, c) {
|
|
|
113
113
|
className: `${t}-item-tooltip`,
|
|
114
114
|
...y?.triggerProps || {}
|
|
115
115
|
},
|
|
116
|
-
...
|
|
116
|
+
...b(y, ["triggerProps"]),
|
|
117
117
|
children: g
|
|
118
118
|
}
|
|
119
119
|
) : g;
|
|
120
120
|
}
|
|
121
|
-
const J = O(G),
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
const J = O(G), h = J;
|
|
122
|
+
h.displayName = "MenuItem";
|
|
123
|
+
h.menuType = "MenuItem";
|
|
124
124
|
export {
|
|
125
|
-
|
|
125
|
+
h as default
|
|
126
126
|
};
|