@wzyjs/uis 0.3.29 → 0.3.31
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/dist/advanced/Com2Canvas/index.d.ts +8 -0
- package/dist/advanced/Com2Canvas/index.js +39 -0
- package/dist/advanced/Crud/components/CardList/index.d.ts +2 -0
- package/dist/advanced/Crud/components/CardList/index.js +90 -0
- package/dist/advanced/Crud/components/CreateUpdate/index.d.ts +2 -0
- package/dist/advanced/Crud/components/CreateUpdate/index.js +78 -0
- package/dist/advanced/Crud/components/ListTabs/index.d.ts +8 -0
- package/dist/advanced/Crud/components/ListTabs/index.js +7 -0
- package/dist/advanced/Crud/components/Provider/index.d.ts +7 -0
- package/dist/advanced/Crud/components/Provider/index.js +42 -0
- package/dist/advanced/Crud/components/QuickFilters/index.d.ts +8 -0
- package/dist/advanced/Crud/components/QuickFilters/index.js +20 -0
- package/dist/advanced/Crud/components/Remove/index.d.ts +2 -0
- package/dist/advanced/Crud/components/Remove/index.js +18 -0
- package/dist/advanced/Crud/components/index.d.ts +6 -0
- package/dist/advanced/Crud/components/index.js +6 -0
- package/dist/advanced/Crud/hooks/index.d.ts +5 -0
- package/dist/advanced/Crud/hooks/index.js +5 -0
- package/dist/advanced/Crud/hooks/useColumns.d.ts +11 -0
- package/dist/advanced/Crud/hooks/useColumns.js +111 -0
- package/dist/advanced/Crud/hooks/useList.d.ts +12 -0
- package/dist/advanced/Crud/hooks/useList.js +53 -0
- package/dist/advanced/Crud/hooks/useListFilters.d.ts +11 -0
- package/dist/advanced/Crud/hooks/useListFilters.js +159 -0
- package/dist/advanced/Crud/hooks/useOrderable.d.ts +15 -0
- package/dist/advanced/Crud/hooks/useOrderable.js +75 -0
- package/dist/advanced/Crud/hooks/useRequest.d.ts +13 -0
- package/dist/advanced/Crud/hooks/useRequest.js +27 -0
- package/dist/advanced/Crud/index.d.ts +3 -0
- package/dist/advanced/Crud/index.js +46 -0
- package/dist/advanced/Crud/types/index.d.ts +176 -0
- package/dist/advanced/Crud/types/index.js +1 -0
- package/dist/advanced/Crud/utils/index.d.ts +7 -0
- package/dist/advanced/Crud/utils/index.js +80 -0
- package/dist/advanced/Crud/utils/query.d.ts +3 -0
- package/dist/advanced/Crud/utils/query.js +34 -0
- package/dist/advanced/MindMap/context.d.ts +12 -0
- package/dist/advanced/MindMap/context.js +12 -0
- package/dist/advanced/MindMap/hooks/useAlignmentSnap.d.ts +15 -0
- package/dist/advanced/MindMap/hooks/useAlignmentSnap.js +164 -0
- package/dist/advanced/MindMap/hooks/useCopyPaste.d.ts +11 -0
- package/dist/advanced/MindMap/hooks/useCopyPaste.js +209 -0
- package/dist/advanced/MindMap/hooks/useDropToReparent.d.ts +21 -0
- package/dist/advanced/MindMap/hooks/useDropToReparent.js +216 -0
- package/dist/advanced/MindMap/hooks/useExpandCollapse.d.ts +18 -0
- package/dist/advanced/MindMap/hooks/useExpandCollapse.js +108 -0
- package/dist/advanced/MindMap/hooks/useMoveDescendants.d.ts +12 -0
- package/dist/advanced/MindMap/hooks/useMoveDescendants.js +98 -0
- package/dist/advanced/MindMap/hooks/useUndoRedo.d.ts +14 -0
- package/dist/advanced/MindMap/hooks/useUndoRedo.js +181 -0
- package/dist/advanced/MindMap/index.d.ts +29 -0
- package/dist/advanced/MindMap/index.js +52 -0
- package/dist/advanced/index.d.ts +5 -0
- package/dist/advanced/index.js +5 -0
- package/dist/antd/index.d.ts +6 -0
- package/dist/antd/index.js +5 -0
- package/dist/buttons/ButtonGroup/index.d.ts +8 -0
- package/dist/buttons/ButtonGroup/index.js +13 -0
- package/dist/buttons/ConfirmButton/index.d.ts +5 -0
- package/dist/buttons/ConfirmButton/index.js +9 -0
- package/dist/buttons/CopyButton/index.d.ts +6 -0
- package/dist/buttons/CopyButton/index.js +26 -0
- package/dist/buttons/DrawerButton/index.d.ts +6 -0
- package/dist/buttons/DrawerButton/index.js +13 -0
- package/dist/buttons/ProgressButton/index.css +63 -0
- package/dist/buttons/ProgressButton/index.d.ts +17 -0
- package/dist/buttons/ProgressButton/index.js +31 -0
- package/dist/buttons/SectorButton/index.d.ts +20 -0
- package/dist/buttons/SectorButton/index.js +130 -0
- package/dist/buttons/index.d.ts +6 -0
- package/dist/buttons/index.js +6 -0
- package/dist/display/CodeView/index.d.ts +26 -0
- package/dist/display/CodeView/index.js +60 -0
- package/dist/display/EnumTag/index.d.ts +12 -0
- package/dist/display/EnumTag/index.js +10 -0
- package/dist/display/HtmlDataRenderer/index.d.ts +6 -0
- package/dist/display/HtmlDataRenderer/index.js +15 -0
- package/dist/display/HtmlView/index.d.ts +6 -0
- package/dist/display/HtmlView/index.js +6 -0
- package/dist/display/IframePro/index.d.ts +8 -0
- package/dist/display/IframePro/index.js +24 -0
- package/dist/display/JsonSchemaRenderer/index.d.ts +11 -0
- package/dist/display/JsonSchemaRenderer/index.js +62 -0
- package/dist/display/JsonView/index.d.ts +3 -0
- package/dist/display/JsonView/index.js +7 -0
- package/dist/display/MarkdownView/index.d.ts +7 -0
- package/dist/display/MarkdownView/index.js +80 -0
- package/dist/display/MarkdownView/style.d.ts +1 -0
- package/{src/components/Markdown/style.ts → dist/display/MarkdownView/style.js} +1 -1
- package/dist/display/VideoPro/index.d.ts +9 -0
- package/dist/display/VideoPro/index.js +15 -0
- package/dist/display/index.d.ts +9 -0
- package/dist/display/index.js +9 -0
- package/dist/inputs/CheckboxButton/index.css +22 -0
- package/dist/inputs/CheckboxButton/index.d.ts +12 -0
- package/dist/inputs/CheckboxButton/index.js +9 -0
- package/dist/inputs/DateSwitcher/index.css +10 -0
- package/dist/inputs/DateSwitcher/index.d.ts +8 -0
- package/dist/inputs/DateSwitcher/index.js +29 -0
- package/dist/inputs/FetchSelect/index.d.ts +3 -0
- package/dist/inputs/FetchSelect/index.js +121 -0
- package/dist/inputs/FetchSelect/types.d.ts +33 -0
- package/dist/inputs/FetchSelect/types.js +1 -0
- package/dist/inputs/FetchSelect/utils.d.ts +21 -0
- package/dist/inputs/FetchSelect/utils.js +67 -0
- package/dist/inputs/FileUploader/index.d.ts +22 -0
- package/dist/inputs/FileUploader/index.js +79 -0
- package/dist/inputs/IconSelect/index.d.ts +89 -0
- package/dist/inputs/IconSelect/index.js +54 -0
- package/dist/inputs/ImageUploader/index.d.ts +12 -0
- package/dist/inputs/ImageUploader/index.js +192 -0
- package/dist/inputs/RadioButton/index.d.ts +15 -0
- package/dist/inputs/RadioButton/index.js +11 -0
- package/dist/inputs/RangeInput/index.d.ts +8 -0
- package/dist/inputs/RangeInput/index.js +17 -0
- package/dist/inputs/TextInput/index.d.ts +6 -0
- package/dist/inputs/TextInput/index.js +30 -0
- package/dist/inputs/index.d.ts +9 -0
- package/dist/inputs/index.js +9 -0
- package/dist/layout/DragSort/index.d.ts +16 -0
- package/dist/layout/DragSort/index.js +12 -0
- package/dist/layout/FoldCard/index.d.ts +9 -0
- package/dist/layout/FoldCard/index.js +69 -0
- package/dist/layout/PageBase/index.d.ts +6 -0
- package/dist/layout/PageBase/index.js +6 -0
- package/dist/layout/ResizableGridLayout/index.d.ts +11 -0
- package/dist/layout/ResizableGridLayout/index.js +13 -0
- package/dist/layout/SideMenu/index.d.ts +27 -0
- package/dist/layout/SideMenu/index.js +40 -0
- package/dist/layout/TabsPro/index.d.ts +9 -0
- package/dist/layout/TabsPro/index.js +87 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.js +6 -0
- package/dist/web.css +363 -0
- package/dist/web.d.ts +7 -0
- package/dist/web.js +7 -0
- package/package.json +34 -12
- package/src/antd/form/CheckboxButton/index.module.scss +0 -24
- package/src/antd/form/CheckboxButton/index.tsx +0 -31
- package/src/antd/form/FileUploader/index.tsx +0 -163
- package/src/antd/form/RadioButton/index.tsx +0 -32
- package/src/antd/form/Upload/index.tsx +0 -65
- package/src/antd/form/UploadImage/index.tsx +0 -338
- package/src/antd/form/index.ts +0 -6
- package/src/antd/index.ts +0 -46
- package/src/antd/pro/FoldCard/index.tsx +0 -131
- package/src/antd/pro/RangeInput/index.tsx +0 -46
- package/src/antd/pro/Tabs/index.tsx +0 -135
- package/src/antd/pro/Typography/components/String.tsx +0 -72
- package/src/antd/pro/Typography/index.tsx +0 -9
- package/src/antd/pro/buttons/ButtonGroup.tsx +0 -26
- package/src/antd/pro/buttons/ConfirmButton.tsx +0 -24
- package/src/antd/pro/buttons/CopyButton.tsx +0 -47
- package/src/antd/pro/buttons/DrawerButton.tsx +0 -37
- package/src/antd/pro/buttons/index.tsx +0 -4
- package/src/antd/pro/index.ts +0 -5
- package/src/components/BottomBar/index.tsx +0 -28
- package/src/components/CodeView/index.tsx +0 -85
- package/src/components/Collapse/index.tsx +0 -26
- package/src/components/Com2Canvas/index.tsx +0 -60
- package/src/components/CompileHtml/index.tsx +0 -26
- package/src/components/Crud/components/CardList/index.tsx +0 -174
- package/src/components/Crud/components/CreateUpdate/index.tsx +0 -179
- package/src/components/Crud/components/Provider/index.tsx +0 -83
- package/src/components/Crud/components/Remove/index.tsx +0 -56
- package/src/components/Crud/components/index.ts +0 -4
- package/src/components/Crud/hooks/index.ts +0 -4
- package/src/components/Crud/hooks/useColumns.tsx +0 -169
- package/src/components/Crud/hooks/useList.ts +0 -65
- package/src/components/Crud/hooks/useOrderable.tsx +0 -107
- package/src/components/Crud/hooks/useRequest.ts +0 -41
- package/src/components/Crud/index.tsx +0 -91
- package/src/components/Crud/types/index.ts +0 -188
- package/src/components/Crud/utils/index.ts +0 -87
- package/src/components/DateSwitcher/index.module.scss +0 -10
- package/src/components/DateSwitcher/index.tsx +0 -75
- package/src/components/DownloadLink/index.tsx +0 -36
- package/src/components/DragSort/index.tsx +0 -77
- package/src/components/DynamicSelect/index.tsx +0 -76
- package/src/components/DynamicSelect/types.ts +0 -8
- package/src/components/DynamicSelect/utils.ts +0 -47
- package/src/components/EnumTag/index.tsx +0 -24
- package/src/components/FetchSelect/index.tsx +0 -57
- package/src/components/FormPro/index.tsx +0 -28
- package/src/components/GroupLayout/index.tsx +0 -45
- package/src/components/HtmlPro/index.tsx +0 -18
- package/src/components/IframePro/index.tsx +0 -52
- package/src/components/JsonRenderer/index.tsx +0 -114
- package/src/components/JsonView/index.tsx +0 -21
- package/src/components/Markdown/index.tsx +0 -152
- package/src/components/MindMap/context.tsx +0 -29
- package/src/components/MindMap/hooks/useAlignmentSnap.ts +0 -220
- package/src/components/MindMap/hooks/useCopyPaste.ts +0 -272
- package/src/components/MindMap/hooks/useDropToReparent.ts +0 -288
- package/src/components/MindMap/hooks/useExpandCollapse.ts +0 -146
- package/src/components/MindMap/hooks/useMoveDescendants.ts +0 -136
- package/src/components/MindMap/hooks/useUndoRedo.ts +0 -232
- package/src/components/MindMap/index.tsx +0 -117
- package/src/components/MultiImageDisplay/index.tsx +0 -63
- package/src/components/ProgressButton/index.module.scss +0 -65
- package/src/components/ProgressButton/index.tsx +0 -96
- package/src/components/SectorButton/index.tsx +0 -247
- package/src/components/TextInput/index.tsx +0 -61
- package/src/components/TimelineBar/components/CurrentWeekHighlight/index.tsx +0 -64
- package/src/components/TimelineBar/components/Guides/index.tsx +0 -61
- package/src/components/TimelineBar/components/Ticks/index.tsx +0 -56
- package/src/components/TimelineBar/components/TodayIndicator/index.tsx +0 -54
- package/src/components/TimelineBar/components/index.ts +0 -4
- package/src/components/TimelineBar/const.ts +0 -3
- package/src/components/TimelineBar/hooks/index.ts +0 -5
- package/src/components/TimelineBar/hooks/useHighlightRange.ts +0 -21
- package/src/components/TimelineBar/hooks/useMonthGuides.ts +0 -40
- package/src/components/TimelineBar/hooks/useTickValues.ts +0 -18
- package/src/components/TimelineBar/hooks/useVisibleRange.ts +0 -43
- package/src/components/TimelineBar/hooks/useWeekGuides.ts +0 -39
- package/src/components/TimelineBar/index.tsx +0 -63
- package/src/components/TimelineBar/utils.ts +0 -27
- package/src/components/Video/index.tsx +0 -37
- package/src/components/index.ts +0 -26
- package/src/rn.ts +0 -1
- package/src/rns/index.ts +0 -0
- package/src/web.ts +0 -2
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Tabs } from 'antd';
|
|
5
|
+
const getItemKeys = (items) => {
|
|
6
|
+
return (items || [])
|
|
7
|
+
.map(item => item?.key)
|
|
8
|
+
.filter((key) => typeof key === 'string' && !!key);
|
|
9
|
+
};
|
|
10
|
+
const getUrlTabKey = (queryKey) => {
|
|
11
|
+
if (typeof window === 'undefined') {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const value = new URLSearchParams(window.location.search).get(queryKey);
|
|
15
|
+
return value || undefined;
|
|
16
|
+
};
|
|
17
|
+
const updateUrlTabKey = (queryKey, key, mode) => {
|
|
18
|
+
if (typeof window === 'undefined') {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const url = new URL(window.location.href);
|
|
22
|
+
url.searchParams.set(queryKey, key);
|
|
23
|
+
const nextUrl = `${url.pathname}${url.search}${url.hash}`;
|
|
24
|
+
if (mode === 'push') {
|
|
25
|
+
window.history.pushState(window.history.state, '', nextUrl);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
window.history.replaceState(window.history.state, '', nextUrl);
|
|
29
|
+
};
|
|
30
|
+
export const TabsPro = (props) => {
|
|
31
|
+
const { syncToUrl = false, queryKey = 'tab', historyMode = 'replace', activeKey, defaultActiveKey, items, onChange, ...rest } = props;
|
|
32
|
+
const itemKeys = React.useMemo(() => getItemKeys(items), [items]);
|
|
33
|
+
const initialKey = React.useMemo(() => {
|
|
34
|
+
const urlKey = syncToUrl ? getUrlTabKey(queryKey) : undefined;
|
|
35
|
+
if (urlKey && itemKeys.includes(urlKey)) {
|
|
36
|
+
return urlKey;
|
|
37
|
+
}
|
|
38
|
+
if (typeof defaultActiveKey === 'string' && itemKeys.includes(defaultActiveKey)) {
|
|
39
|
+
return defaultActiveKey;
|
|
40
|
+
}
|
|
41
|
+
return itemKeys[0];
|
|
42
|
+
}, [defaultActiveKey, itemKeys, queryKey, syncToUrl]);
|
|
43
|
+
const [innerActiveKey, setInnerActiveKey] = React.useState(initialKey);
|
|
44
|
+
const mergedActiveKey = typeof activeKey === 'string' ? activeKey : innerActiveKey;
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (typeof activeKey === 'string') {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
setInnerActiveKey(prev => {
|
|
50
|
+
if (prev && itemKeys.includes(prev)) {
|
|
51
|
+
return prev;
|
|
52
|
+
}
|
|
53
|
+
return initialKey;
|
|
54
|
+
});
|
|
55
|
+
}, [activeKey, initialKey, itemKeys]);
|
|
56
|
+
React.useEffect(() => {
|
|
57
|
+
if (!syncToUrl || !mergedActiveKey) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
updateUrlTabKey(queryKey, mergedActiveKey, historyMode);
|
|
61
|
+
}, [historyMode, mergedActiveKey, queryKey, syncToUrl]);
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
if (!syncToUrl) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const onPopState = () => {
|
|
67
|
+
const urlKey = getUrlTabKey(queryKey);
|
|
68
|
+
if (!urlKey || !itemKeys.includes(urlKey)) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (typeof activeKey !== 'string') {
|
|
72
|
+
setInnerActiveKey(urlKey);
|
|
73
|
+
}
|
|
74
|
+
onChange?.(urlKey);
|
|
75
|
+
};
|
|
76
|
+
window.addEventListener('popstate', onPopState);
|
|
77
|
+
return () => {
|
|
78
|
+
window.removeEventListener('popstate', onPopState);
|
|
79
|
+
};
|
|
80
|
+
}, [activeKey, itemKeys, onChange, queryKey, syncToUrl]);
|
|
81
|
+
return (_jsx(Tabs, { ...rest, items: items, activeKey: mergedActiveKey, onChange: key => {
|
|
82
|
+
if (typeof activeKey !== 'string') {
|
|
83
|
+
setInnerActiveKey(key);
|
|
84
|
+
}
|
|
85
|
+
onChange?.(key);
|
|
86
|
+
} }));
|
|
87
|
+
};
|
package/dist/web.css
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
.pointer-events-none {
|
|
2
|
+
pointer-events: none
|
|
3
|
+
}
|
|
4
|
+
.visible {
|
|
5
|
+
visibility: visible
|
|
6
|
+
}
|
|
7
|
+
.collapse {
|
|
8
|
+
visibility: collapse
|
|
9
|
+
}
|
|
10
|
+
.fixed {
|
|
11
|
+
position: fixed
|
|
12
|
+
}
|
|
13
|
+
.absolute {
|
|
14
|
+
position: absolute
|
|
15
|
+
}
|
|
16
|
+
.relative {
|
|
17
|
+
position: relative
|
|
18
|
+
}
|
|
19
|
+
.inset-0 {
|
|
20
|
+
inset: 0px
|
|
21
|
+
}
|
|
22
|
+
.left-0 {
|
|
23
|
+
left: 0px
|
|
24
|
+
}
|
|
25
|
+
.right-0 {
|
|
26
|
+
right: 0px
|
|
27
|
+
}
|
|
28
|
+
.top-0 {
|
|
29
|
+
top: 0px
|
|
30
|
+
}
|
|
31
|
+
.z-10 {
|
|
32
|
+
z-index: 10
|
|
33
|
+
}
|
|
34
|
+
.m-2 {
|
|
35
|
+
margin: 0.5rem
|
|
36
|
+
}
|
|
37
|
+
.mx-auto {
|
|
38
|
+
margin-left: auto;
|
|
39
|
+
margin-right: auto
|
|
40
|
+
}
|
|
41
|
+
.mb-6 {
|
|
42
|
+
margin-bottom: 1.5rem
|
|
43
|
+
}
|
|
44
|
+
.ml-2 {
|
|
45
|
+
margin-left: 0.5rem
|
|
46
|
+
}
|
|
47
|
+
.mt-auto {
|
|
48
|
+
margin-top: auto
|
|
49
|
+
}
|
|
50
|
+
.block {
|
|
51
|
+
display: block
|
|
52
|
+
}
|
|
53
|
+
.flex {
|
|
54
|
+
display: flex
|
|
55
|
+
}
|
|
56
|
+
.contents {
|
|
57
|
+
display: contents
|
|
58
|
+
}
|
|
59
|
+
.hidden {
|
|
60
|
+
display: none
|
|
61
|
+
}
|
|
62
|
+
.h-full {
|
|
63
|
+
height: 100%
|
|
64
|
+
}
|
|
65
|
+
.h-px {
|
|
66
|
+
height: 1px
|
|
67
|
+
}
|
|
68
|
+
.h-screen {
|
|
69
|
+
height: 100vh
|
|
70
|
+
}
|
|
71
|
+
.w-16 {
|
|
72
|
+
width: 4rem
|
|
73
|
+
}
|
|
74
|
+
.w-40 {
|
|
75
|
+
width: 10rem
|
|
76
|
+
}
|
|
77
|
+
.w-48 {
|
|
78
|
+
width: 12rem
|
|
79
|
+
}
|
|
80
|
+
.w-full {
|
|
81
|
+
width: 100%
|
|
82
|
+
}
|
|
83
|
+
.w-px {
|
|
84
|
+
width: 1px
|
|
85
|
+
}
|
|
86
|
+
.max-w-7xl {
|
|
87
|
+
max-width: 80rem
|
|
88
|
+
}
|
|
89
|
+
.flex-1 {
|
|
90
|
+
flex: 1 1 0%
|
|
91
|
+
}
|
|
92
|
+
.-rotate-90 {
|
|
93
|
+
--tw-rotate: -90deg;
|
|
94
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
|
|
95
|
+
}
|
|
96
|
+
.transform {
|
|
97
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
|
|
98
|
+
}
|
|
99
|
+
.transform-gpu {
|
|
100
|
+
transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
|
|
101
|
+
}
|
|
102
|
+
.cursor-pointer {
|
|
103
|
+
cursor: pointer
|
|
104
|
+
}
|
|
105
|
+
.select-none {
|
|
106
|
+
-webkit-user-select: none;
|
|
107
|
+
-moz-user-select: none;
|
|
108
|
+
user-select: none
|
|
109
|
+
}
|
|
110
|
+
.flex-col {
|
|
111
|
+
flex-direction: column
|
|
112
|
+
}
|
|
113
|
+
.flex-wrap {
|
|
114
|
+
flex-wrap: wrap
|
|
115
|
+
}
|
|
116
|
+
.items-center {
|
|
117
|
+
align-items: center
|
|
118
|
+
}
|
|
119
|
+
.justify-center {
|
|
120
|
+
justify-content: center
|
|
121
|
+
}
|
|
122
|
+
.justify-between {
|
|
123
|
+
justify-content: space-between
|
|
124
|
+
}
|
|
125
|
+
.gap-3 {
|
|
126
|
+
gap: 0.75rem
|
|
127
|
+
}
|
|
128
|
+
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
|
|
129
|
+
--tw-space-y-reverse: 0;
|
|
130
|
+
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
|
131
|
+
margin-bottom: calc(1rem * var(--tw-space-y-reverse))
|
|
132
|
+
}
|
|
133
|
+
.overflow-hidden {
|
|
134
|
+
overflow: hidden
|
|
135
|
+
}
|
|
136
|
+
.overflow-y-auto {
|
|
137
|
+
overflow-y: auto
|
|
138
|
+
}
|
|
139
|
+
.whitespace-nowrap {
|
|
140
|
+
white-space: nowrap
|
|
141
|
+
}
|
|
142
|
+
.whitespace-pre {
|
|
143
|
+
white-space: pre
|
|
144
|
+
}
|
|
145
|
+
.rounded {
|
|
146
|
+
border-radius: 0.25rem
|
|
147
|
+
}
|
|
148
|
+
.rounded-full {
|
|
149
|
+
border-radius: 9999px
|
|
150
|
+
}
|
|
151
|
+
.border {
|
|
152
|
+
border-width: 1px
|
|
153
|
+
}
|
|
154
|
+
.border-2 {
|
|
155
|
+
border-width: 2px
|
|
156
|
+
}
|
|
157
|
+
.border-t {
|
|
158
|
+
border-top-width: 1px
|
|
159
|
+
}
|
|
160
|
+
.border-dashed {
|
|
161
|
+
border-style: dashed
|
|
162
|
+
}
|
|
163
|
+
.border-none {
|
|
164
|
+
border-style: none
|
|
165
|
+
}
|
|
166
|
+
.border-blue-500 {
|
|
167
|
+
--tw-border-opacity: 1;
|
|
168
|
+
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1))
|
|
169
|
+
}
|
|
170
|
+
.border-gray-200 {
|
|
171
|
+
--tw-border-opacity: 1;
|
|
172
|
+
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1))
|
|
173
|
+
}
|
|
174
|
+
.border-gray-300 {
|
|
175
|
+
--tw-border-opacity: 1;
|
|
176
|
+
border-color: rgb(209 213 219 / var(--tw-border-opacity, 1))
|
|
177
|
+
}
|
|
178
|
+
.\!bg-blue-500 {
|
|
179
|
+
--tw-bg-opacity: 1 !important;
|
|
180
|
+
background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)) !important
|
|
181
|
+
}
|
|
182
|
+
.bg-black\/40 {
|
|
183
|
+
background-color: rgb(0 0 0 / 0.4)
|
|
184
|
+
}
|
|
185
|
+
.bg-blue-50 {
|
|
186
|
+
--tw-bg-opacity: 1;
|
|
187
|
+
background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1))
|
|
188
|
+
}
|
|
189
|
+
.bg-gray-100 {
|
|
190
|
+
--tw-bg-opacity: 1;
|
|
191
|
+
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1))
|
|
192
|
+
}
|
|
193
|
+
.bg-sky-500 {
|
|
194
|
+
--tw-bg-opacity: 1;
|
|
195
|
+
background-color: rgb(14 165 233 / var(--tw-bg-opacity, 1))
|
|
196
|
+
}
|
|
197
|
+
.bg-white {
|
|
198
|
+
--tw-bg-opacity: 1;
|
|
199
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))
|
|
200
|
+
}
|
|
201
|
+
.object-contain {
|
|
202
|
+
-o-object-fit: contain;
|
|
203
|
+
object-fit: contain
|
|
204
|
+
}
|
|
205
|
+
.p-4 {
|
|
206
|
+
padding: 1rem
|
|
207
|
+
}
|
|
208
|
+
.p-6 {
|
|
209
|
+
padding: 1.5rem
|
|
210
|
+
}
|
|
211
|
+
.px-4 {
|
|
212
|
+
padding-left: 1rem;
|
|
213
|
+
padding-right: 1rem
|
|
214
|
+
}
|
|
215
|
+
.py-2 {
|
|
216
|
+
padding-top: 0.5rem;
|
|
217
|
+
padding-bottom: 0.5rem
|
|
218
|
+
}
|
|
219
|
+
.pr-4 {
|
|
220
|
+
padding-right: 1rem
|
|
221
|
+
}
|
|
222
|
+
.text-center {
|
|
223
|
+
text-align: center
|
|
224
|
+
}
|
|
225
|
+
.text-2xl {
|
|
226
|
+
font-size: 1.5rem;
|
|
227
|
+
line-height: 2rem
|
|
228
|
+
}
|
|
229
|
+
.text-base {
|
|
230
|
+
font-size: 1rem;
|
|
231
|
+
line-height: 1.5rem
|
|
232
|
+
}
|
|
233
|
+
.text-lg {
|
|
234
|
+
font-size: 1.125rem;
|
|
235
|
+
line-height: 1.75rem
|
|
236
|
+
}
|
|
237
|
+
.text-sm {
|
|
238
|
+
font-size: 0.875rem;
|
|
239
|
+
line-height: 1.25rem
|
|
240
|
+
}
|
|
241
|
+
.text-xl {
|
|
242
|
+
font-size: 1.25rem;
|
|
243
|
+
line-height: 1.75rem
|
|
244
|
+
}
|
|
245
|
+
.text-xs {
|
|
246
|
+
font-size: 0.75rem;
|
|
247
|
+
line-height: 1rem
|
|
248
|
+
}
|
|
249
|
+
.font-bold {
|
|
250
|
+
font-weight: 700
|
|
251
|
+
}
|
|
252
|
+
.font-medium {
|
|
253
|
+
font-weight: 500
|
|
254
|
+
}
|
|
255
|
+
.leading-none {
|
|
256
|
+
line-height: 1
|
|
257
|
+
}
|
|
258
|
+
.\!text-white {
|
|
259
|
+
--tw-text-opacity: 1 !important;
|
|
260
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important
|
|
261
|
+
}
|
|
262
|
+
.text-blue-600 {
|
|
263
|
+
--tw-text-opacity: 1;
|
|
264
|
+
color: rgb(37 99 235 / var(--tw-text-opacity, 1))
|
|
265
|
+
}
|
|
266
|
+
.text-gray-500 {
|
|
267
|
+
--tw-text-opacity: 1;
|
|
268
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1))
|
|
269
|
+
}
|
|
270
|
+
.text-gray-900 {
|
|
271
|
+
--tw-text-opacity: 1;
|
|
272
|
+
color: rgb(17 24 39 / var(--tw-text-opacity, 1))
|
|
273
|
+
}
|
|
274
|
+
.text-white {
|
|
275
|
+
--tw-text-opacity: 1;
|
|
276
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
277
|
+
}
|
|
278
|
+
.underline {
|
|
279
|
+
text-decoration-line: underline
|
|
280
|
+
}
|
|
281
|
+
.no-underline {
|
|
282
|
+
text-decoration-line: none
|
|
283
|
+
}
|
|
284
|
+
.opacity-30 {
|
|
285
|
+
opacity: 0.3
|
|
286
|
+
}
|
|
287
|
+
.outline {
|
|
288
|
+
outline-style: solid
|
|
289
|
+
}
|
|
290
|
+
.ring {
|
|
291
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
292
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
293
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)
|
|
294
|
+
}
|
|
295
|
+
.ring-2 {
|
|
296
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
297
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
298
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)
|
|
299
|
+
}
|
|
300
|
+
.ring-sky-500 {
|
|
301
|
+
--tw-ring-opacity: 1;
|
|
302
|
+
--tw-ring-color: rgb(14 165 233 / var(--tw-ring-opacity, 1))
|
|
303
|
+
}
|
|
304
|
+
.\!filter {
|
|
305
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important
|
|
306
|
+
}
|
|
307
|
+
.filter {
|
|
308
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
|
|
309
|
+
}
|
|
310
|
+
.transition {
|
|
311
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
312
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
313
|
+
transition-duration: 150ms
|
|
314
|
+
}
|
|
315
|
+
.transition-all {
|
|
316
|
+
transition-property: all;
|
|
317
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
318
|
+
transition-duration: 150ms
|
|
319
|
+
}
|
|
320
|
+
.transition-colors {
|
|
321
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
322
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
323
|
+
transition-duration: 150ms
|
|
324
|
+
}
|
|
325
|
+
.duration-200 {
|
|
326
|
+
transition-duration: 200ms
|
|
327
|
+
}
|
|
328
|
+
.duration-300 {
|
|
329
|
+
transition-duration: 300ms
|
|
330
|
+
}
|
|
331
|
+
.hover\:border-blue-500:hover {
|
|
332
|
+
--tw-border-opacity: 1;
|
|
333
|
+
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1))
|
|
334
|
+
}
|
|
335
|
+
.hover\:\!bg-gray-200:hover {
|
|
336
|
+
--tw-bg-opacity: 1 !important;
|
|
337
|
+
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)) !important
|
|
338
|
+
}
|
|
339
|
+
.hover\:bg-black\/60:hover {
|
|
340
|
+
background-color: rgb(0 0 0 / 0.6)
|
|
341
|
+
}
|
|
342
|
+
.hover\:\!text-gray-900:hover {
|
|
343
|
+
--tw-text-opacity: 1 !important;
|
|
344
|
+
color: rgb(17 24 39 / var(--tw-text-opacity, 1)) !important
|
|
345
|
+
}
|
|
346
|
+
.hover\:no-underline:hover {
|
|
347
|
+
text-decoration-line: none
|
|
348
|
+
}
|
|
349
|
+
.hover\:opacity-90:hover {
|
|
350
|
+
opacity: 0.9
|
|
351
|
+
}
|
|
352
|
+
.focus\:outline-none:focus {
|
|
353
|
+
outline: 2px solid transparent;
|
|
354
|
+
outline-offset: 2px
|
|
355
|
+
}
|
|
356
|
+
.focus\:ring-2:focus {
|
|
357
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
358
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
359
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)
|
|
360
|
+
}
|
|
361
|
+
.focus\:ring-offset-2:focus {
|
|
362
|
+
--tw-ring-offset-width: 2px
|
|
363
|
+
}
|
package/dist/web.d.ts
ADDED
package/dist/web.js
ADDED
package/package.json
CHANGED
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wzyjs/uis",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.31",
|
|
4
4
|
"description": "description",
|
|
5
5
|
"author": "wzy",
|
|
6
|
-
"
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"./dist/web.js",
|
|
9
|
+
"**/*.css"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rm -rf dist && tsc && rsync -a --include='*/' --include='*.css' --exclude='*' src/ dist/ && postcss ./src/web.css -o ./dist/web.css"
|
|
13
|
+
},
|
|
7
14
|
"files": [
|
|
8
|
-
"
|
|
15
|
+
"dist"
|
|
9
16
|
],
|
|
10
17
|
"exports": {
|
|
11
18
|
"./web": {
|
|
12
|
-
"import": "./
|
|
19
|
+
"import": "./dist/web.js",
|
|
20
|
+
"types": "./dist/web.d.ts"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"typesVersions": {
|
|
24
|
+
"*": {
|
|
25
|
+
"./web": [
|
|
26
|
+
"./dist/web.d.ts"
|
|
27
|
+
]
|
|
13
28
|
}
|
|
14
29
|
},
|
|
15
30
|
"dependencies": {
|
|
16
31
|
"@ant-design/icons": "^6.0.0",
|
|
17
32
|
"@ant-design/nextjs-registry": "^1.0.2",
|
|
33
|
+
"@ant-design/pro-card": "^2.10.0",
|
|
18
34
|
"@ant-design/pro-components": "^2.8.6",
|
|
19
|
-
"
|
|
35
|
+
"@ant-design/pro-form": "^2.32.0",
|
|
36
|
+
"@ant-design/pro-provider": "^2.16.2",
|
|
37
|
+
"@hello-pangea/dnd": "^18.0.1",
|
|
38
|
+
"@wzyjs/hooks": "0.3.31",
|
|
39
|
+
"@xyflow/react": "^12.5.3",
|
|
20
40
|
"echarts": "^5.4.3",
|
|
21
41
|
"echarts-for-react": "^3.0.2",
|
|
22
42
|
"github-markdown-css": "^5.8.1",
|
|
@@ -26,27 +46,29 @@
|
|
|
26
46
|
"prettier": "^3.5.3",
|
|
27
47
|
"prismjs": "^1.29.0",
|
|
28
48
|
"react": "^19.0.0",
|
|
29
|
-
"react-beautiful-dnd": "^13.1.1",
|
|
30
49
|
"react-grid-layout": "^1.5.1",
|
|
31
50
|
"react-json-view": "^1.21.3",
|
|
32
51
|
"react-markdown": "^10.1.0",
|
|
33
52
|
"react-syntax-highlighter": "^15.5.0",
|
|
34
53
|
"rehype-autolink-headings": "^7.1.0",
|
|
35
54
|
"rehype-slug": "^6.0.0",
|
|
36
|
-
"
|
|
37
|
-
"remark-gfm": "^4.0.1",
|
|
38
|
-
"remark-toc": "^9.0.0"
|
|
55
|
+
"remark-gfm": "^4.0.1"
|
|
39
56
|
},
|
|
40
57
|
"peerDependencies": {
|
|
41
58
|
"@wzyjs/hooks": "^0.2.37",
|
|
42
59
|
"@wzyjs/utils": "^0.2.37",
|
|
43
|
-
"antd": "^6.
|
|
60
|
+
"antd": "^6.3.1"
|
|
44
61
|
},
|
|
45
62
|
"devDependencies": {
|
|
46
63
|
"@types/js-beautify": "^1.14.3",
|
|
47
|
-
"@types/react
|
|
64
|
+
"@types/react": "^19.1.10",
|
|
65
|
+
"@types/react-grid-layout": "1.3.5",
|
|
66
|
+
"autoprefixer": "^10.4.21",
|
|
67
|
+
"postcss": "^8.5.6",
|
|
68
|
+
"postcss-cli": "^11.0.1",
|
|
69
|
+
"tailwindcss": "^3.4.18"
|
|
48
70
|
},
|
|
49
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "896e51ffcc433e65605c351be0595918bc32573e",
|
|
50
72
|
"publishConfig": {
|
|
51
73
|
"access": "public"
|
|
52
74
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.checkcard {
|
|
2
|
-
:global(.ant-pro-checkcard-content) {
|
|
3
|
-
padding: 0 !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
:global(.ant-pro-checkcard) {
|
|
7
|
-
margin-bottom: 0 !important;
|
|
8
|
-
text-align: center !important;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
border-radius: 0 !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:global(.ant-pro-checkcard-title) {
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:global(.ant-pro-checkcard div) {
|
|
19
|
-
width: 100%;
|
|
20
|
-
font-weight: 400 !important;
|
|
21
|
-
height: 30px !important;
|
|
22
|
-
line-height: 28px !important;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { Col, Row } from 'antd'
|
|
4
|
-
import { CheckCard } from '@ant-design/pro-components'
|
|
5
|
-
import { CheckCardValueType, CheckGroupValueType } from '@ant-design/pro-card/es/components/CheckCard/Group'
|
|
6
|
-
|
|
7
|
-
import styles from './index.module.scss'
|
|
8
|
-
|
|
9
|
-
interface CheckboxButtonProps {
|
|
10
|
-
options: { label: string; value: CheckCardValueType }[]
|
|
11
|
-
value?: CheckGroupValueType
|
|
12
|
-
onChange?: (value: CheckGroupValueType) => void
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const CheckboxButton = (props: CheckboxButtonProps) => {
|
|
16
|
-
const { options, value, onChange } = props
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className={styles.checkcard}>
|
|
20
|
-
<CheckCard.Group style={{ width: '100%' }} size='small' multiple value={value} onChange={onChange}>
|
|
21
|
-
<Row>
|
|
22
|
-
{options.map((item, index) => (
|
|
23
|
-
<Col key={index}>
|
|
24
|
-
<CheckCard title={item.label} value={item.value} style={{ width: 60, height: 30 }} />
|
|
25
|
-
</Col>
|
|
26
|
-
))}
|
|
27
|
-
</Row>
|
|
28
|
-
</CheckCard.Group>
|
|
29
|
-
</div>
|
|
30
|
-
)
|
|
31
|
-
}
|