@unicom-cloud/ui 0.8.99 → 0.8.101
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/Anchor.js +3 -1
- package/Badge.js +7 -6
- package/Copy.js +49 -2
- package/Details.js +13 -2
- package/Divider.js +3 -2
- package/Flex.js +22 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +3 -2
- package/Loading.js +16 -3
- package/Marquee.js +3 -2
- package/QrCode.js +3 -2
- package/Space.js +3 -3
- package/Splitter.js +5 -5
- package/SuspenseFallbackTest.js +2 -4
- package/Tag.js +3 -2
- package/Tour.js +3 -2
- package/alert/index.js +61 -64
- package/anchor/index.js +5 -3
- package/back-top/index.js +32 -33
- package/badge/index.js +19 -18
- package/calendar/index.js +85 -84
- 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/toArray.js +12 -0
- package/copy/index.js +83 -35
- package/details/index.js +102 -62
- package/divider/index.js +27 -21
- package/empty/index.js +13 -13
- package/flex/index.js +47 -0
- package/flex/interface.js +1 -0
- package/grid/{GridItem.js → Item.js} +15 -15
- package/grid/index.js +1 -1
- package/icon/interface.js +1 -0
- package/icon-hover/interface.js +1 -0
- package/index.js +610 -599
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +3 -2
- package/loading/index.js +72 -53
- package/loading/interface.js +1 -0
- package/marquee/index.js +3 -2
- package/modal/Modal.js +73 -74
- package/package.json +1 -1
- package/portal/interface.js +1 -0
- package/qr-code/index.js +3 -2
- package/segmented/index.js +113 -105
- package/space/index.js +41 -35
- package/speech-synthesis/interface.js +1 -0
- package/spin/index.js +75 -62
- package/splitter/Panel.js +39 -0
- package/splitter/SplitBar.js +157 -0
- package/splitter/Splitter.js +135 -0
- package/splitter/hooks/useEvent.js +12 -0
- package/splitter/hooks/useItems.js +26 -0
- package/splitter/hooks/useResizable.js +26 -0
- package/splitter/hooks/useResize.js +68 -0
- package/splitter/hooks/useSizes.js +60 -0
- package/splitter/index.js +6 -115
- 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 +38 -38
- package/table/hook/useThResizable.js +72 -26
- package/table/tbody/Td.js +80 -77
- package/table/th-resizable/index.js +92 -35
- package/tag/index.js +42 -41
- package/tooltip/index.js +89 -82
- package/tour/index.js +5 -6
- 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 -3
- 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/toArray.d.ts +13 -0
- package/types/pc/affix/interface.d.ts +0 -2
- package/types/pc/alert/index.d.ts +3 -2
- package/types/pc/alert/interface.d.ts +7 -1
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/anchor/interface.d.ts +0 -2
- package/types/pc/auto-complete/interface.d.ts +0 -6
- package/types/pc/avatar/interface.d.ts +0 -4
- package/types/pc/badge/Count.d.ts +1 -1
- package/types/pc/breadcrumb/Item.d.ts +1 -1
- package/types/pc/breadcrumb/interface.d.ts +0 -3
- 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/carousel/interface.d.ts +2 -6
- package/types/pc/cascader/interface.d.ts +7 -19
- 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/checkbox/interface.d.ts +0 -1
- package/types/pc/collapse/interface.d.ts +0 -2
- 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/interface.d.ts +0 -2
- package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +17 -17
- package/types/pc/copy/index.d.ts +1 -1
- package/types/pc/copy/interface.d.ts +2 -1
- package/types/pc/date-picker/interface.d.ts +0 -17
- 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/descriptions/interface.d.ts +0 -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/drawer/interface.d.ts +0 -7
- package/types/pc/dropdown/interface.d.ts +0 -1
- package/types/pc/flex/index.d.ts +9 -0
- package/types/pc/flex/interface.d.ts +16 -0
- package/types/pc/form/Control.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/form/interface.d.ts +9 -22
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -3
- package/types/pc/grid/interface.d.ts +1 -6
- 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/image/interface.d.ts +0 -13
- package/types/pc/index.d.ts +63 -50
- package/types/pc/input/Textarea.d.ts +2 -6
- package/types/pc/input/interface.d.ts +5 -13
- package/types/pc/input-number/interface.d.ts +0 -4
- package/types/pc/input-tag/interface.d.ts +0 -13
- package/types/pc/layout/interface.d.ts +0 -1
- package/types/pc/link/interface.d.ts +0 -1
- package/types/pc/list/interface.d.ts +0 -4
- 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/interface.d.ts +0 -8
- 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/message/interface.d.ts +0 -2
- package/types/pc/modal/interface.d.ts +0 -5
- package/types/pc/notification/interface.d.ts +0 -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/pagination/interface.d.ts +0 -2
- package/types/pc/popconfirm/interface.d.ts +8 -10
- package/types/pc/popover/interface.d.ts +0 -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/progress/interface.d.ts +0 -3
- 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/resize-box/interface.d.ts +1 -7
- 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/select/interface.d.ts +0 -12
- package/types/pc/select-view/interface.d.ts +0 -7
- 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/slider/interface.d.ts +0 -4
- package/types/pc/space/index.d.ts +7 -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/spin/interface.d.ts +4 -1
- package/types/pc/splitter/Panel.d.ts +8 -0
- package/types/pc/splitter/SplitBar.d.ts +21 -0
- package/types/pc/splitter/Splitter.d.ts +4 -0
- package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
- package/types/pc/splitter/hooks/useItems.d.ts +10 -0
- package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
- package/types/pc/splitter/hooks/useResize.d.ts +4 -0
- package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
- package/types/pc/splitter/index.d.ts +8 -3
- package/types/pc/splitter/interface.d.ts +181 -38
- package/types/pc/statistic/interface.d.ts +0 -4
- package/types/pc/steps/interface.d.ts +0 -3
- 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/hook/useThResizable.d.ts +2 -2
- package/types/pc/table/interface.d.ts +4 -15
- 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/interface.d.ts +0 -7
- 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/tag/index.d.ts +2 -0
- package/types/pc/tag/interface.d.ts +0 -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/time-picker/interface.d.ts +0 -7
- package/types/pc/tooltip/interface.d.ts +4 -1
- package/types/pc/transfer/Item.d.ts +1 -1
- package/types/pc/transfer/List.d.ts +1 -1
- package/types/pc/transfer/interface.d.ts +2 -9
- package/types/pc/tree/Animation.d.ts +1 -1
- package/types/pc/tree/interface.d.ts +2 -8
- package/types/pc/tree-select/interface.d.ts +0 -8
- package/types/pc/trigger/interface.d.ts +0 -5
- package/types/pc/typography/EditContent.d.ts +2 -1
- package/types/pc/typography/Operations.d.ts +1 -1
- package/types/pc/typography/interface.d.ts +45 -30
- package/types/pc/upload/interface.d.ts +6 -11
- package/types/pc/upload/list/index.d.ts +1 -1
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +6 -0
- package/types/pc/utils/toArray.d.ts +3 -0
- package/types/pc/verification-code/VerificationCode.d.ts +1 -1
- package/types/pc/verification-code/interface.d.ts +0 -2
- 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/types/pc/watermark/interface.d.ts +0 -2
- package/typography/Base.js +73 -73
- package/typography/EditContent.js +43 -33
- package/typography/Ellipsis.js +117 -184
- package/typography/Operations.js +97 -49
- package/typography/useCssEllipsis.js +7 -6
- package/utils/index.js +117 -115
- package/utils/names.js +4 -0
- package/utils/toArray.js +5 -0
- package/version/index.js +1 -1
- package/virtual-list/interface.js +1 -0
- package/components/common/space/toArray.js +0 -11
- package/loading/style/index.module.less.js +0 -4
- package/types/common/space/toArray.d.ts +0 -3
- package/types/pc/suspense-fallback-test/style/index.d.ts +0 -1
- /package/{suspense-fallback-test/style/index.less.js → development/interface.js} +0 -0
- /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/badge/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { forwardRef as z, useContext as H, useRef as O, useImperativeHandle as L
|
|
|
4
4
|
import "../config-provider/ConfigProvider.js";
|
|
5
5
|
import M from "../components/common/hooks/useMergeProps.js";
|
|
6
6
|
import "@unicom-cloud/utils/case-name";
|
|
7
|
-
import
|
|
7
|
+
import n from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
9
9
|
import "@unicom-cloud/utils/constant/ui";
|
|
10
10
|
import "../utils/contextHolder.js";
|
|
@@ -46,6 +46,7 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
|
46
46
|
import "@unicom-cloud/utils/file/saveAs";
|
|
47
47
|
import "@unicom-cloud/utils/screenfull";
|
|
48
48
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
49
|
+
import "react-is";
|
|
49
50
|
import "@unicom-cloud/utils/tree";
|
|
50
51
|
import "@unicom-cloud/utils/is";
|
|
51
52
|
import { v4 as F } from "uuid";
|
|
@@ -93,8 +94,8 @@ function Q(P, v) {
|
|
|
93
94
|
status: p,
|
|
94
95
|
children: u,
|
|
95
96
|
...y
|
|
96
|
-
} = T, d = O(null), C = O(F()), t = A?.("badge"),
|
|
97
|
-
h && (
|
|
97
|
+
} = T, d = O(null), C = O(F()), t = A?.("badge"), i = { ...j || {} }, [h, S] = I || [];
|
|
98
|
+
h && (i.marginRight = -h), S && (i.marginTop = S), L(v, () => ({
|
|
98
99
|
dom: d.current
|
|
99
100
|
}));
|
|
100
101
|
const k = () => {
|
|
@@ -102,8 +103,8 @@ function Q(P, v) {
|
|
|
102
103
|
return /* @__PURE__ */ e(
|
|
103
104
|
"span",
|
|
104
105
|
{
|
|
105
|
-
className:
|
|
106
|
-
style:
|
|
106
|
+
className: n(`${t}-custom-dot`, m),
|
|
107
|
+
style: i,
|
|
107
108
|
children: s
|
|
108
109
|
}
|
|
109
110
|
);
|
|
@@ -111,8 +112,8 @@ function Q(P, v) {
|
|
|
111
112
|
return l && !r && !p ? /* @__PURE__ */ e(
|
|
112
113
|
"span",
|
|
113
114
|
{
|
|
114
|
-
className:
|
|
115
|
-
style:
|
|
115
|
+
className: n(`${t}-text`, m),
|
|
116
|
+
style: i,
|
|
116
117
|
children: l
|
|
117
118
|
}
|
|
118
119
|
) : p || r && typeof s == "number" && s <= 0 ? /* @__PURE__ */ c("span", { className: `${t}-status-wrapper`, children: [
|
|
@@ -120,7 +121,7 @@ function Q(P, v) {
|
|
|
120
121
|
/* @__PURE__ */ e(
|
|
121
122
|
"span",
|
|
122
123
|
{
|
|
123
|
-
className:
|
|
124
|
+
className: n(
|
|
124
125
|
`${t}-status-dot`,
|
|
125
126
|
{
|
|
126
127
|
[`${t}-dot-pulse`]: x,
|
|
@@ -129,7 +130,7 @@ function Q(P, v) {
|
|
|
129
130
|
},
|
|
130
131
|
m
|
|
131
132
|
),
|
|
132
|
-
style: { ...a, ...
|
|
133
|
+
style: { ...a, ...i }
|
|
133
134
|
}
|
|
134
135
|
),
|
|
135
136
|
!!l && /* @__PURE__ */ e("span", { className: `${t}-status-text`, children: l })
|
|
@@ -145,7 +146,7 @@ function Q(P, v) {
|
|
|
145
146
|
children: /* @__PURE__ */ e(
|
|
146
147
|
"span",
|
|
147
148
|
{
|
|
148
|
-
className:
|
|
149
|
+
className: n(
|
|
149
150
|
`${t}-dot`,
|
|
150
151
|
{
|
|
151
152
|
[`${t}-dot-pulse`]: x,
|
|
@@ -153,7 +154,7 @@ function Q(P, v) {
|
|
|
153
154
|
},
|
|
154
155
|
m
|
|
155
156
|
),
|
|
156
|
-
style: { ...a, ...
|
|
157
|
+
style: { ...a, ...i }
|
|
157
158
|
}
|
|
158
159
|
)
|
|
159
160
|
}
|
|
@@ -161,8 +162,8 @@ function Q(P, v) {
|
|
|
161
162
|
B,
|
|
162
163
|
{
|
|
163
164
|
prefixCls: t,
|
|
164
|
-
className:
|
|
165
|
-
style: { ...a, ...
|
|
165
|
+
className: n(`${t}-number`, m),
|
|
166
|
+
style: { ...a, ...i },
|
|
166
167
|
maxCount: E,
|
|
167
168
|
count: s
|
|
168
169
|
}
|
|
@@ -173,7 +174,7 @@ function Q(P, v) {
|
|
|
173
174
|
return /* @__PURE__ */ c(
|
|
174
175
|
"div",
|
|
175
176
|
{
|
|
176
|
-
className:
|
|
177
|
+
className: n(
|
|
177
178
|
`${t}-ribbon`,
|
|
178
179
|
`${t}-ribbon-${_}`,
|
|
179
180
|
{
|
|
@@ -205,7 +206,7 @@ function Q(P, v) {
|
|
|
205
206
|
) : /* @__PURE__ */ c(
|
|
206
207
|
"span",
|
|
207
208
|
{
|
|
208
|
-
className:
|
|
209
|
+
className: n(
|
|
209
210
|
t,
|
|
210
211
|
{
|
|
211
212
|
[`${t}-status`]: p,
|
|
@@ -228,7 +229,7 @@ function Q(P, v) {
|
|
|
228
229
|
const D = z(Q);
|
|
229
230
|
D.displayName = "Badge";
|
|
230
231
|
D.Count = B;
|
|
231
|
-
const
|
|
232
|
+
const Xt = f, Yt = [
|
|
232
233
|
"default",
|
|
233
234
|
"processing",
|
|
234
235
|
"success",
|
|
@@ -236,8 +237,8 @@ const Wt = f, Xt = [
|
|
|
236
237
|
"error"
|
|
237
238
|
];
|
|
238
239
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
Xt as BADGE_COLORS,
|
|
241
|
+
Yt as BADGE_STATUS,
|
|
241
242
|
B as BadgeCount,
|
|
242
243
|
D as default
|
|
243
244
|
};
|
package/calendar/index.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useContext as
|
|
1
|
+
import { jsxs as ne, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import re from "lodash/merge";
|
|
3
|
+
import { useContext as se, useState as M, useMemo as le } from "react";
|
|
4
4
|
import "../config-provider/ConfigProvider.js";
|
|
5
|
-
import
|
|
5
|
+
import de from "../components/common/hooks/useMergeProps.js";
|
|
6
6
|
import me from "@unicom-cloud/utils/class-name";
|
|
7
|
-
import { getDayjsValue as u, getNow as
|
|
8
|
-
import { pickDataAttributes as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
function
|
|
15
|
-
return
|
|
7
|
+
import { getDayjsValue as u, getNow as A, methods as g } from "../components/common/utils/dayjs.js";
|
|
8
|
+
import { pickDataAttributes as ce } from "../components/common/utils/pick.js";
|
|
9
|
+
import ie, { getAllDaysByTime as pe } from "./Month.js";
|
|
10
|
+
import fe from "./Year.js";
|
|
11
|
+
import he from "./header/index.js";
|
|
12
|
+
import ue from "./header/Panel.js";
|
|
13
|
+
import ge from "../config-provider/context.js";
|
|
14
|
+
function ye(m, y) {
|
|
15
|
+
return m === "month" || m === "year" && !y ? "YYYY-MM-DD" : "YYYY-MM";
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const Ce = {
|
|
18
18
|
dayStartOfWeek: 0,
|
|
19
19
|
panelWidth: 265,
|
|
20
20
|
defaultMode: "month",
|
|
21
21
|
headerType: "button",
|
|
22
22
|
modes: ["month", "year"]
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function De(m) {
|
|
25
25
|
const {
|
|
26
26
|
getPrefixCls: y,
|
|
27
|
-
locale:
|
|
28
|
-
componentConfig:
|
|
29
|
-
rtl:
|
|
30
|
-
} =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
locale: k,
|
|
28
|
+
componentConfig: H,
|
|
29
|
+
rtl: L
|
|
30
|
+
} = se(ge), s = de(
|
|
31
|
+
m,
|
|
32
|
+
Ce,
|
|
33
|
+
H?.Calendar
|
|
34
34
|
), {
|
|
35
|
-
style:
|
|
36
|
-
className:
|
|
37
|
-
dayStartOfWeek:
|
|
38
|
-
panel:
|
|
39
|
-
locale:
|
|
40
|
-
panelWidth:
|
|
41
|
-
panelTodayBtn:
|
|
42
|
-
defaultPageShowDate:
|
|
35
|
+
style: O,
|
|
36
|
+
className: T,
|
|
37
|
+
dayStartOfWeek: W,
|
|
38
|
+
panel: d,
|
|
39
|
+
locale: j,
|
|
40
|
+
panelWidth: B,
|
|
41
|
+
panelTodayBtn: E,
|
|
42
|
+
defaultPageShowDate: F,
|
|
43
43
|
value: w,
|
|
44
|
-
pageShowDate:
|
|
45
|
-
defaultValue:
|
|
44
|
+
pageShowDate: R,
|
|
45
|
+
defaultValue: _,
|
|
46
46
|
mode: S,
|
|
47
|
-
defaultMode:
|
|
48
|
-
onChange:
|
|
47
|
+
defaultMode: q,
|
|
48
|
+
onChange: z,
|
|
49
49
|
onPanelChange: c,
|
|
50
50
|
headerRender: P,
|
|
51
|
-
headerType:
|
|
52
|
-
modes:
|
|
53
|
-
panelOperations:
|
|
54
|
-
} = s, l =
|
|
55
|
-
S ||
|
|
56
|
-
), a = S ||
|
|
57
|
-
u(w ||
|
|
58
|
-
), [
|
|
59
|
-
u(
|
|
60
|
-
), t = u(
|
|
51
|
+
headerType: G,
|
|
52
|
+
modes: I,
|
|
53
|
+
panelOperations: J
|
|
54
|
+
} = s, l = re(k.Calendar, j), o = y?.("calendar"), [K, Q] = M(
|
|
55
|
+
S || q
|
|
56
|
+
), a = S || K, i = ye(a, d), [Y, U] = M(
|
|
57
|
+
u(w || _, i)
|
|
58
|
+
), [X, p] = M(
|
|
59
|
+
u(F, i) || Y || A()
|
|
60
|
+
), t = u(R, i) || X, C = "value" in s ? u(w, i) : Y, N = le(() => pe(s, t), [t.toString(), a, W]);
|
|
61
61
|
function f(e) {
|
|
62
|
-
|
|
62
|
+
U(e), z?.(e), v(e);
|
|
63
63
|
}
|
|
64
64
|
function v(e) {
|
|
65
65
|
p(e), c?.(e);
|
|
@@ -69,66 +69,67 @@ function Ce(d) {
|
|
|
69
69
|
}
|
|
70
70
|
let D = "";
|
|
71
71
|
a === "month" ? D = l.formatMonth : a === "year" && (D = l.formatYear);
|
|
72
|
-
function
|
|
72
|
+
function Z(e, n) {
|
|
73
73
|
let h;
|
|
74
74
|
e === "prev" && (h = g.subtract(t, 1, n)), e === "next" && (h = g.add(t, 1, n)), p(h), c?.(h);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ee(e) {
|
|
77
77
|
const n = g.set(t, "year", e);
|
|
78
78
|
p(n), c?.(n);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ae(e) {
|
|
81
81
|
const n = g.set(t, "month", e - 1);
|
|
82
82
|
p(n), c?.(n);
|
|
83
83
|
}
|
|
84
84
|
function x(e) {
|
|
85
|
-
|
|
85
|
+
Q(e);
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const oe = me(
|
|
88
88
|
o,
|
|
89
89
|
a === "month" ? `${o}-mode-month` : `${o}-mode-year`,
|
|
90
90
|
{
|
|
91
|
-
[`${o}-panel`]:
|
|
92
|
-
[`${o}-rtl`]:
|
|
91
|
+
[`${o}-panel`]: d && (a === "month" || a === "year"),
|
|
92
|
+
[`${o}-rtl`]: L
|
|
93
93
|
},
|
|
94
|
-
|
|
95
|
-
),
|
|
94
|
+
T
|
|
95
|
+
), te = d ? { width: B } : {}, V = {
|
|
96
96
|
prefixCls: o,
|
|
97
|
-
changePageShowDate:
|
|
97
|
+
changePageShowDate: Z,
|
|
98
98
|
headerValueFormat: D,
|
|
99
99
|
mergedPageShowDate: t,
|
|
100
|
-
modes:
|
|
100
|
+
modes: I,
|
|
101
101
|
innerMode: a,
|
|
102
|
-
panelOperations:
|
|
103
|
-
}
|
|
104
|
-
|
|
102
|
+
panelOperations: J
|
|
103
|
+
}, $ = d ? /* @__PURE__ */ r(ue, { ...V }) : /* @__PURE__ */ r(
|
|
104
|
+
he,
|
|
105
|
+
{
|
|
106
|
+
...V,
|
|
107
|
+
CALENDAR_LOCALE: l,
|
|
108
|
+
move: f,
|
|
109
|
+
innerMode: a,
|
|
110
|
+
changeMode: x,
|
|
111
|
+
onChangeYear: ee,
|
|
112
|
+
onChangeMonth: ae,
|
|
113
|
+
headerType: G
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
return /* @__PURE__ */ ne(
|
|
105
117
|
"div",
|
|
106
118
|
{
|
|
107
|
-
className:
|
|
108
|
-
style: { ...
|
|
109
|
-
...
|
|
119
|
+
className: oe,
|
|
120
|
+
style: { ...O, ...te },
|
|
121
|
+
...ce(s),
|
|
110
122
|
children: [
|
|
111
123
|
typeof P == "function" ? P({
|
|
112
124
|
value: C,
|
|
113
125
|
pageShowDate: t,
|
|
114
126
|
onChangeMode: x,
|
|
115
127
|
onChange: f,
|
|
116
|
-
onChangePageDate: v
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
{
|
|
120
|
-
...V,
|
|
121
|
-
CALENDAR_LOCALE: l,
|
|
122
|
-
move: f,
|
|
123
|
-
innerMode: a,
|
|
124
|
-
changeMode: x,
|
|
125
|
-
onChangeYear: Z,
|
|
126
|
-
onChangeMonth: ee,
|
|
127
|
-
headerType: z
|
|
128
|
-
}
|
|
129
|
-
),
|
|
128
|
+
onChangePageDate: v,
|
|
129
|
+
header: $
|
|
130
|
+
}) : $,
|
|
130
131
|
a === "month" && /* @__PURE__ */ r("div", { className: `${o}-body`, children: /* @__PURE__ */ r(
|
|
131
|
-
|
|
132
|
+
ie,
|
|
132
133
|
{
|
|
133
134
|
...s,
|
|
134
135
|
prefixCls: o,
|
|
@@ -141,7 +142,7 @@ function Ce(d) {
|
|
|
141
142
|
}
|
|
142
143
|
) }),
|
|
143
144
|
a === "year" && /* @__PURE__ */ r("div", { className: `${o}-body`, children: /* @__PURE__ */ r(
|
|
144
|
-
|
|
145
|
+
fe,
|
|
145
146
|
{
|
|
146
147
|
...s,
|
|
147
148
|
prefixCls: o,
|
|
@@ -153,11 +154,11 @@ function Ce(d) {
|
|
|
153
154
|
CALENDAR_LOCALE: l
|
|
154
155
|
}
|
|
155
156
|
) }),
|
|
156
|
-
|
|
157
|
+
E && d && /* @__PURE__ */ r(
|
|
157
158
|
"div",
|
|
158
159
|
{
|
|
159
160
|
className: `${o}-footer-btn-wrapper`,
|
|
160
|
-
onClick: () => f(
|
|
161
|
+
onClick: () => f(A()),
|
|
161
162
|
children: l.today
|
|
162
163
|
}
|
|
163
164
|
)
|
|
@@ -165,9 +166,9 @@ function Ce(d) {
|
|
|
165
166
|
}
|
|
166
167
|
);
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
+
De.displayName = "Calendar";
|
|
169
170
|
export {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
ie as CalendarMonth,
|
|
172
|
+
fe as CalendarYear,
|
|
173
|
+
De as default
|
|
173
174
|
};
|
|
@@ -1,32 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { UI_COMMON_PREFIX as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import C from "@unicom-cloud/icons/IconFluentFlatHourglassNotDone";
|
|
3
|
+
import s from "@unicom-cloud/utils/class-name";
|
|
4
|
+
import { UI_COMMON_PREFIX as v } from "@unicom-cloud/utils/constant/ui";
|
|
5
|
+
import { forwardRef as x, useMemo as b } from "react";
|
|
6
|
+
const g = (t, n) => {
|
|
7
|
+
const {
|
|
8
|
+
url: a,
|
|
9
|
+
// 图片地址
|
|
10
|
+
imgClassName: o,
|
|
11
|
+
// 图片自定义类名
|
|
12
|
+
icon: m,
|
|
13
|
+
// 自定义图标
|
|
14
|
+
iconClassName: r,
|
|
15
|
+
// 图标自定义类名
|
|
16
|
+
tip: c,
|
|
17
|
+
// 高优先级提示文字
|
|
18
|
+
label: i = "等待开发",
|
|
19
|
+
// 次要提示文字(默认值)
|
|
20
|
+
labelClassName: p,
|
|
21
|
+
// 文字容器类名
|
|
22
|
+
className: N
|
|
23
|
+
// 外层容器类名
|
|
24
|
+
} = t, e = `${v}-development`, d = b(() => a ? /* @__PURE__ */ l(
|
|
25
|
+
"img",
|
|
26
|
+
{
|
|
27
|
+
className: s(`${e}-img`, o),
|
|
28
|
+
src: a,
|
|
29
|
+
alt: "开发预览图"
|
|
30
|
+
}
|
|
31
|
+
) : m ?? /* @__PURE__ */ l(
|
|
32
|
+
C,
|
|
33
|
+
{
|
|
34
|
+
className: s(`${e}-icon`, r)
|
|
35
|
+
}
|
|
36
|
+
), [a, e, o, m, r]), f = c ?? i;
|
|
37
|
+
return /* @__PURE__ */ u("div", { ref: n, className: s(e, N), children: [
|
|
38
|
+
d,
|
|
39
|
+
/* @__PURE__ */ l("div", { className: s(`${e}-label`, p), children: f })
|
|
27
40
|
] });
|
|
28
|
-
}
|
|
29
|
-
|
|
41
|
+
}, D = x(
|
|
42
|
+
g
|
|
43
|
+
);
|
|
44
|
+
D.displayName = "Development";
|
|
30
45
|
export {
|
|
31
|
-
|
|
46
|
+
D as default
|
|
32
47
|
};
|
|
@@ -1,37 +1,49 @@
|
|
|
1
|
-
import { jsxs as N, jsx as
|
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import $ from "@unicom-cloud/icons/IconUiEmpty";
|
|
3
|
-
import { UI_COMMON_PREFIX as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { SpaceVertical as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const {
|
|
3
|
+
import { UI_COMMON_PREFIX as g } from "@unicom-cloud/utils/constant/ui";
|
|
4
|
+
import { memo as x, forwardRef as u } from "react";
|
|
5
|
+
import { SpaceVertical as C } from "../space/index.js";
|
|
6
|
+
import r from "@unicom-cloud/utils/class-name";
|
|
7
|
+
const E = (n, c) => {
|
|
8
|
+
const {
|
|
9
|
+
style: a,
|
|
10
|
+
className: p,
|
|
11
|
+
description: i = "无数据",
|
|
12
|
+
// 默认描述文本
|
|
13
|
+
icon: o,
|
|
14
|
+
imgSrc: m,
|
|
15
|
+
prefixCls: l,
|
|
16
|
+
...f
|
|
17
|
+
} = n, e = `${g}-empty`, t = l ?? e, d = typeof i == "string" ? i : "empty", y = () => m ? /* @__PURE__ */ s(
|
|
18
|
+
"img",
|
|
19
|
+
{
|
|
20
|
+
className: r(`${e}-img`, `${t}-img`),
|
|
21
|
+
alt: d,
|
|
22
|
+
src: m,
|
|
23
|
+
loading: "lazy"
|
|
24
|
+
}
|
|
25
|
+
) : o ? /* @__PURE__ */ s("div", { className: r(`${e}-icon`, `${t}-icon`), children: o }) : /* @__PURE__ */ s($, { className: r(`${e}-icon`, `${t}-icon`) });
|
|
9
26
|
return /* @__PURE__ */ N(
|
|
10
|
-
|
|
27
|
+
C,
|
|
11
28
|
{
|
|
12
|
-
ref:
|
|
13
|
-
className:
|
|
29
|
+
ref: c,
|
|
30
|
+
className: r(e, t, p),
|
|
14
31
|
style: a,
|
|
15
32
|
justifyContent: "center",
|
|
16
33
|
alignItems: "center",
|
|
17
34
|
gap: 5,
|
|
18
35
|
...f,
|
|
19
36
|
children: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
className: s(`${e}-img`, `${i}-img`),
|
|
24
|
-
alt: d,
|
|
25
|
-
src: r
|
|
26
|
-
}
|
|
27
|
-
) : o ? /* @__PURE__ */ t("div", { className: s(`${e}-icon`, `${i}-icon`), children: o }) : /* @__PURE__ */ t($, { className: s(`${e}-icon`, `${i}-icon`) }),
|
|
28
|
-
/* @__PURE__ */ t("div", { className: s(`${e}-description`, `${i}-description`), children: m || "无数据" })
|
|
37
|
+
y(),
|
|
38
|
+
/* @__PURE__ */ s("div", { className: r(`${e}-description`, `${t}-description`), children: i })
|
|
29
39
|
]
|
|
30
40
|
}
|
|
31
41
|
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
}, I = x(
|
|
43
|
+
u(E)
|
|
44
|
+
);
|
|
45
|
+
I.displayName = "Empty";
|
|
35
46
|
export {
|
|
36
|
-
|
|
47
|
+
I as Empty,
|
|
48
|
+
I as default
|
|
37
49
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { UI_COMMON_PREFIX as j } from "@unicom-cloud/utils/constant/ui";
|
|
3
|
+
import { forwardRef as x, useMemo as C } from "react";
|
|
4
|
+
import I from "../hooks/useMergeProps.js";
|
|
5
|
+
import P from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import "../utils/is.js";
|
|
7
|
+
import { GAP_SIZE_MAP as y } from "./interface.js";
|
|
8
|
+
import { isBoolean as V, isArray as _, isString as A } from "@unicom-cloud/utils/is";
|
|
9
|
+
const O = (o) => A(o) && Object.keys(y).includes(o), m = (o, r, t) => {
|
|
10
|
+
t !== void 0 && (O(t) ? o[r] = y[t] : o[r] = typeof t == "number" ? `${t}px` : t);
|
|
11
|
+
}, S = (o = {}, r, t = "gap") => (r === void 0 || (_(r) ? (m(o, "rowGap", r[0]), m(o, "columnGap", r[1])) : m(o, t, r)), o), b = {
|
|
12
|
+
component: "div",
|
|
13
|
+
gap: "small"
|
|
14
|
+
}, a = x((o, r) => {
|
|
15
|
+
const t = I(o, b, {}), {
|
|
16
|
+
className: g,
|
|
17
|
+
style: c,
|
|
18
|
+
flex: l,
|
|
19
|
+
gap: f,
|
|
20
|
+
children: u,
|
|
21
|
+
direction: e,
|
|
22
|
+
justify: i,
|
|
23
|
+
align: n,
|
|
24
|
+
component: N = "div",
|
|
25
|
+
wrap: s,
|
|
26
|
+
rtl: w,
|
|
27
|
+
...F
|
|
28
|
+
} = t, p = `${j}-flex`, G = C(() => {
|
|
29
|
+
const M = {
|
|
30
|
+
display: "flex",
|
|
31
|
+
...S({}, f),
|
|
32
|
+
...s !== void 0 && {
|
|
33
|
+
flexWrap: V(s) ? s ? "wrap" : "nowrap" : s
|
|
34
|
+
},
|
|
35
|
+
...n && { alignItems: n },
|
|
36
|
+
...i && { justifyContent: i },
|
|
37
|
+
...e && { flexDirection: e },
|
|
38
|
+
...l && { flex: l }
|
|
39
|
+
};
|
|
40
|
+
return { ...c, ...M };
|
|
41
|
+
}, [f, s, n, i, e, l, c]);
|
|
42
|
+
return /* @__PURE__ */ d(
|
|
43
|
+
N,
|
|
44
|
+
{
|
|
45
|
+
ref: r,
|
|
46
|
+
style: G,
|
|
47
|
+
className: P(p, g, {
|
|
48
|
+
[`${p}-rtl`]: w,
|
|
49
|
+
[`${p}-${e}`]: e,
|
|
50
|
+
[`${p}-${i}`]: i,
|
|
51
|
+
[`${p}-${n}`]: n
|
|
52
|
+
}),
|
|
53
|
+
...F,
|
|
54
|
+
children: u
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}), $ = x((o, r) => /* @__PURE__ */ d(a, { ref: r, ...o, direction: "column" }));
|
|
58
|
+
a.Vertical = $;
|
|
59
|
+
a.displayName = "Flex";
|
|
60
|
+
$.displayName = "Flex.Vertical";
|
|
61
|
+
export {
|
|
62
|
+
$ as FlexVertical,
|
|
63
|
+
a as default
|
|
64
|
+
};
|