@gx-design-vue/pro-layout-components 0.1.0-alpha.0

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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +76 -0
  3. package/dist/AppsLogoComponents/AppLogoList.d.ts +24 -0
  4. package/dist/AppsLogoComponents/AppLogoList.js +43 -0
  5. package/dist/AppsLogoComponents/AppsLogo.d.ts +10 -0
  6. package/dist/AppsLogoComponents/AppsLogo.js +12 -0
  7. package/dist/AppsLogoComponents/DefaultContent.d.ts +27 -0
  8. package/dist/AppsLogoComponents/DefaultContent.js +43 -0
  9. package/dist/AppsLogoComponents/SimpleContent.d.ts +38 -0
  10. package/dist/AppsLogoComponents/SimpleContent.js +63 -0
  11. package/dist/AppsLogoComponents/index.d.ts +32 -0
  12. package/dist/AppsLogoComponents/index.js +71 -0
  13. package/dist/AppsLogoComponents/props.d.ts +26 -0
  14. package/dist/AppsLogoComponents/props.js +12 -0
  15. package/dist/AppsLogoComponents/style/default.d.ts +6 -0
  16. package/dist/AppsLogoComponents/style/default.js +70 -0
  17. package/dist/AppsLogoComponents/style/index.d.ts +7 -0
  18. package/dist/AppsLogoComponents/style/index.js +60 -0
  19. package/dist/AppsLogoComponents/style/simple.d.ts +6 -0
  20. package/dist/AppsLogoComponents/style/simple.js +83 -0
  21. package/dist/Icon/components/Paintbrush.d.ts +6 -0
  22. package/dist/Icon/components/Paintbrush.js +21 -0
  23. package/dist/Icon/components/Palette.d.ts +6 -0
  24. package/dist/Icon/components/Palette.js +20 -0
  25. package/dist/Icon/components/index.d.ts +10 -0
  26. package/dist/Icon/components/index.js +11 -0
  27. package/dist/Icon/index.d.ts +37 -0
  28. package/dist/Icon/index.js +24 -0
  29. package/dist/PageLock/Popup.d.ts +43 -0
  30. package/dist/PageLock/Popup.js +68 -0
  31. package/dist/PageLock/UserForm.d.ts +42 -0
  32. package/dist/PageLock/UserForm.js +68 -0
  33. package/dist/PageLock/index.d.ts +52 -0
  34. package/dist/PageLock/index.js +92 -0
  35. package/dist/PageLock/props.d.ts +51 -0
  36. package/dist/PageLock/props.js +29 -0
  37. package/dist/PageLock/style.d.ts +7 -0
  38. package/dist/PageLock/style.js +108 -0
  39. package/dist/PageLock/useFormState.d.ts +16 -0
  40. package/dist/PageLock/useFormState.js +19 -0
  41. package/dist/Paintbrush-EfUpNqey.js +14 -0
  42. package/dist/Palette-B5wq9KtV.js +13 -0
  43. package/dist/RightContent/Search/Panel.d.ts +42 -0
  44. package/dist/RightContent/Search/Panel.js +146 -0
  45. package/dist/RightContent/Search/index.d.ts +50 -0
  46. package/dist/RightContent/Search/index.js +118 -0
  47. package/dist/RightContent/Search/props.d.ts +17 -0
  48. package/dist/RightContent/Search/props.js +15 -0
  49. package/dist/RightContent/Search/style.d.ts +10 -0
  50. package/dist/RightContent/Search/style.js +96 -0
  51. package/dist/RightContent/index.d.ts +407 -0
  52. package/dist/RightContent/index.js +152 -0
  53. package/dist/RightContent/props.d.ts +64 -0
  54. package/dist/RightContent/props.js +63 -0
  55. package/dist/RightContent/style.d.ts +10 -0
  56. package/dist/RightContent/style.js +73 -0
  57. package/dist/ThemeEditor/components/BlockCheckbox.d.ts +39 -0
  58. package/dist/ThemeEditor/components/BlockCheckbox.js +42 -0
  59. package/dist/ThemeEditor/components/RegionalChange.d.ts +21 -0
  60. package/dist/ThemeEditor/components/RegionalChange.js +43 -0
  61. package/dist/ThemeEditor/components/Setting/index.d.ts +52 -0
  62. package/dist/ThemeEditor/components/Setting/index.js +125 -0
  63. package/dist/ThemeEditor/components/SwitchTab/index.d.ts +51 -0
  64. package/dist/ThemeEditor/components/SwitchTab/index.js +52 -0
  65. package/dist/ThemeEditor/components/SwitchTab/style.d.ts +6 -0
  66. package/dist/ThemeEditor/components/SwitchTab/style.js +54 -0
  67. package/dist/ThemeEditor/components/Tokens/Colors/ColorSvg.d.ts +7 -0
  68. package/dist/ThemeEditor/components/Tokens/Colors/ColorSvg.js +453 -0
  69. package/dist/ThemeEditor/components/Tokens/Colors/Primary.d.ts +7 -0
  70. package/dist/ThemeEditor/components/Tokens/Colors/Primary.js +58 -0
  71. package/dist/ThemeEditor/components/Tokens/Colors/Side.d.ts +7 -0
  72. package/dist/ThemeEditor/components/Tokens/Colors/Side.js +18 -0
  73. package/dist/ThemeEditor/components/Tokens/Colors/index.d.ts +7 -0
  74. package/dist/ThemeEditor/components/Tokens/Colors/index.js +15 -0
  75. package/dist/ThemeEditor/components/Tokens/context.d.ts +9 -0
  76. package/dist/ThemeEditor/components/Tokens/context.js +7 -0
  77. package/dist/ThemeEditor/components/Tokens/index.d.ts +45 -0
  78. package/dist/ThemeEditor/components/Tokens/index.js +69 -0
  79. package/dist/ThemeEditor/components/Tokens/utils/config.d.ts +10 -0
  80. package/dist/ThemeEditor/components/Tokens/utils/config.js +8 -0
  81. package/dist/ThemeEditor/components/Trigger.d.ts +21 -0
  82. package/dist/ThemeEditor/components/Trigger.js +46 -0
  83. package/dist/ThemeEditor/context.d.ts +14 -0
  84. package/dist/ThemeEditor/context.js +7 -0
  85. package/dist/ThemeEditor/index.d.ts +841 -0
  86. package/dist/ThemeEditor/index.js +165 -0
  87. package/dist/ThemeEditor/props.d.ts +57 -0
  88. package/dist/ThemeEditor/props.js +40 -0
  89. package/dist/ThemeEditor/style/animate.d.ts +9 -0
  90. package/dist/ThemeEditor/style/animate.js +38 -0
  91. package/dist/ThemeEditor/style/index.d.ts +10 -0
  92. package/dist/ThemeEditor/style/index.js +318 -0
  93. package/dist/ThemeEditor/style/theme.d.ts +6 -0
  94. package/dist/ThemeEditor/style/theme.js +71 -0
  95. package/dist/ThemeEditor/utils/config.d.ts +37 -0
  96. package/dist/ThemeEditor/utils/config.js +132 -0
  97. package/dist/ThemeEditor/utils/index.d.ts +9 -0
  98. package/dist/ThemeEditor/utils/index.js +64 -0
  99. package/dist/hooks/useClockTime/index.d.ts +11 -0
  100. package/dist/hooks/useClockTime/index.js +28 -0
  101. package/dist/index.d.ts +7 -0
  102. package/dist/index.js +5 -0
  103. package/dist/pro-layout-components.esm.js +6258 -0
  104. package/dist/pro-layout-components.js +5 -0
  105. package/dist/utils/index.d.ts +2 -0
  106. package/dist/utils/index.js +3 -0
  107. package/dist/utils/util.d.ts +10 -0
  108. package/dist/utils/util.js +17 -0
  109. package/global.d.ts +10 -0
  110. package/package.json +77 -0
@@ -0,0 +1,71 @@
1
+ import { TinyColor } from "@ctrl/tinycolor";
2
+
3
+ //#region src/ThemeEditor/style/theme.ts
4
+ const proThemeSetting = (token) => {
5
+ const componentCls = `${token.componentCls}`;
6
+ const subTitleColor = new TinyColor(new TinyColor(token.colorWhite).setAlpha(.55).toRgbString());
7
+ return { [componentCls]: {
8
+ "&-color-list": {
9
+ display: "flex",
10
+ gap: 8,
11
+ marginBlockEnd: token.margin
12
+ },
13
+ "&-color-item": {
14
+ width: 20,
15
+ height: 20,
16
+ display: "flex",
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ borderRadius: 2,
20
+ cursor: "pointer",
21
+ color: token.colorWhite,
22
+ fontWeight: "bold"
23
+ },
24
+ "&-color-picker": {
25
+ marginBlock: token.marginXS,
26
+ padding: 2,
27
+ height: 106,
28
+ background: `conic-gradient(from 180deg at 50% 50%,#00c3ff 0,${token.colorPrimary} 120deg,${token.colorPrimary} 180deg,#4ceb1b 290.62deg,#00c3ff 1turn)`,
29
+ borderRadius: 9,
30
+ cursor: "pointer",
31
+ transition: `padding ${token.motionDurationMid}`,
32
+ "&:hover": { padding: 4 },
33
+ "&-inner": {
34
+ backgroundColor: token.colorBgElevated,
35
+ padding: "2px 2px 4px 2px",
36
+ borderRadius: 7,
37
+ maxHeight: "100%"
38
+ },
39
+ "&-top": {
40
+ width: "100%",
41
+ borderRadius: 6,
42
+ padding: "4px 8px",
43
+ p: {
44
+ color: subTitleColor.toString(),
45
+ lineHeight: "20px",
46
+ fontSize: token.fontSizeSM,
47
+ margin: 0
48
+ }
49
+ },
50
+ "&-bottom": {
51
+ display: "flex",
52
+ alignItems: "center",
53
+ justifyContent: "space-between",
54
+ padding: "4px 8px",
55
+ p: {
56
+ margin: 0,
57
+ fontSize: token.fontSize,
58
+ lineHeight: "22px",
59
+ "&:first-child": {
60
+ color: token.colorText,
61
+ fontWeight: 600
62
+ },
63
+ "&:last-child": { color: token.colorTextDescription }
64
+ }
65
+ }
66
+ }
67
+ } };
68
+ };
69
+
70
+ //#endregion
71
+ export { proThemeSetting };
@@ -0,0 +1,37 @@
1
+ import { LayoutConfig } from "../props.js";
2
+ import { BaseTheme } from "@gx-design-vue/context";
3
+ import * as vue_jsx_runtime11 from "vue/jsx-runtime";
4
+
5
+ //#region src/ThemeEditor/utils/config.d.ts
6
+ type MergerSettingsType<T> = Partial<T> & {
7
+ colorWeak?: boolean;
8
+ progress?: boolean;
9
+ };
10
+ type SettingsState = MergerSettingsType<LayoutConfig>;
11
+ declare const systemTheme: {
12
+ value: string;
13
+ label: () => vue_jsx_runtime11.JSX.Element;
14
+ }[];
15
+ declare const theme: {
16
+ key: BaseTheme;
17
+ title: string;
18
+ }[];
19
+ declare const layout: {
20
+ key: string;
21
+ title: string;
22
+ }[];
23
+ declare const layoutLabelRadioList: {
24
+ label: keyof SettingsState;
25
+ title: string;
26
+ }[];
27
+ declare const othersLabelRadioList: {
28
+ label: keyof SettingsState;
29
+ title: string;
30
+ }[];
31
+ declare const colorList: {
32
+ key: string;
33
+ color: string;
34
+ title: string;
35
+ }[];
36
+ //#endregion
37
+ export { MergerSettingsType, SettingsState, colorList, layout, layoutLabelRadioList, othersLabelRadioList, systemTheme, theme };
@@ -0,0 +1,132 @@
1
+ import Icon_default from "../../Icon/index.js";
2
+ import { createTextVNode, createVNode } from "vue";
3
+ import { DesktopOutlined } from "@ant-design/icons-vue";
4
+
5
+ //#region src/ThemeEditor/utils/config.tsx
6
+ const systemTheme = [
7
+ {
8
+ value: "light",
9
+ label: () => createVNode("div", { "style": {
10
+ display: "flex",
11
+ alignItems: "center",
12
+ gap: "6px"
13
+ } }, [createVNode(Icon_default, {
14
+ "type": "moon",
15
+ "style": { fontSize: "15px" }
16
+ }, null), createTextVNode("亮色")])
17
+ },
18
+ {
19
+ value: "dark",
20
+ label: () => createVNode("div", { "style": {
21
+ display: "flex",
22
+ alignItems: "center",
23
+ gap: "6px"
24
+ } }, [createVNode(Icon_default, {
25
+ "type": "sunny",
26
+ "style": { fontSize: "15px" }
27
+ }, null), createTextVNode("深色")])
28
+ },
29
+ {
30
+ value: "system",
31
+ label: () => createVNode("div", { "style": {
32
+ display: "flex",
33
+ alignItems: "center",
34
+ gap: "6px"
35
+ } }, [createVNode(DesktopOutlined, null, null), createTextVNode("自动")])
36
+ }
37
+ ];
38
+ const theme = [{
39
+ key: "light",
40
+ title: "亮色"
41
+ }, {
42
+ key: "dark",
43
+ title: "深色"
44
+ }];
45
+ const layout = [
46
+ {
47
+ key: "side",
48
+ title: "侧边导航"
49
+ },
50
+ {
51
+ key: "mix",
52
+ title: "混合导航"
53
+ },
54
+ {
55
+ key: "top",
56
+ title: "顶部导航"
57
+ },
58
+ {
59
+ key: "wide",
60
+ title: "定宽导航"
61
+ },
62
+ {
63
+ key: "simple",
64
+ title: "简单导航"
65
+ }
66
+ ];
67
+ const layoutLabelRadioList = [
68
+ {
69
+ label: "fixedHeader",
70
+ title: "固定 Header"
71
+ },
72
+ {
73
+ label: "fixSiderbar",
74
+ title: "固定侧边菜单"
75
+ },
76
+ {
77
+ label: "splitMenus",
78
+ title: "自动分割菜单"
79
+ }
80
+ ];
81
+ const othersLabelRadioList = [{
82
+ label: "showTabsBar",
83
+ title: "多标签"
84
+ }, {
85
+ label: "fixedTabsBar",
86
+ title: "固定多标签"
87
+ }];
88
+ const colorList = [
89
+ {
90
+ key: "techBlue",
91
+ color: "#1677FF",
92
+ title: "拂晓蓝(默认)"
93
+ },
94
+ {
95
+ key: "dust",
96
+ color: "#F5222D",
97
+ title: "薄暮"
98
+ },
99
+ {
100
+ key: "volcano",
101
+ color: "#FA541C",
102
+ title: "火山"
103
+ },
104
+ {
105
+ key: "sunset",
106
+ color: "#FAAD14",
107
+ title: "日暮"
108
+ },
109
+ {
110
+ key: "cyan",
111
+ color: "#13C2C2",
112
+ title: "明青"
113
+ },
114
+ {
115
+ key: "green",
116
+ color: "#52C41A",
117
+ title: "极光绿"
118
+ },
119
+ {
120
+ key: "geekblue",
121
+ color: "#2F54EB",
122
+ title: "极客蓝"
123
+ },
124
+ {
125
+ key: "purple",
126
+ color: "#722ED1",
127
+ title: "酱紫"
128
+ }
129
+ ];
130
+
131
+ //#endregion
132
+ export { colorList, layout, layoutLabelRadioList, othersLabelRadioList, systemTheme, theme };
@@ -0,0 +1,9 @@
1
+ import { ExtraConfigState, LayoutConfig } from "../props.js";
2
+ import * as _gx_design_vue_pro_layout3 from "@gx-design-vue/pro-layout";
3
+
4
+ //#region src/ThemeEditor/utils/index.d.ts
5
+ type LayoutConfigDisabled = Record<keyof LayoutConfig, boolean>;
6
+ declare function handleSettingsDisabled(config: LayoutConfig): LayoutConfigDisabled;
7
+ declare function handleThemeConfig(config: LayoutConfig): Partial<_gx_design_vue_pro_layout3.ProLayoutConfig & ExtraConfigState>;
8
+ //#endregion
9
+ export { LayoutConfigDisabled, handleSettingsDisabled, handleThemeConfig };
@@ -0,0 +1,64 @@
1
+ //#region src/ThemeEditor/utils/index.ts
2
+ function handleSettingsDisabled(config) {
3
+ const keysObject = Object.keys(config).reduce((acc, current) => {
4
+ acc[current] = false;
5
+ return acc;
6
+ }, {});
7
+ if (config.layout === "mix") {
8
+ keysObject.fixSiderbar = true;
9
+ keysObject.fixedHeader = true;
10
+ }
11
+ if (config.layout === "top") {
12
+ keysObject.fixSiderbar = true;
13
+ keysObject.splitMenus = true;
14
+ }
15
+ if (config.layout === "side") keysObject.splitMenus = true;
16
+ if (config.layout === "simple") {
17
+ keysObject.splitMenus = true;
18
+ keysObject.fixedHeader = true;
19
+ keysObject.showTabsBar = true;
20
+ keysObject.fixedTabsBar = true;
21
+ }
22
+ if (config.layout === "wide") {
23
+ keysObject.splitMenus = true;
24
+ keysObject.fixedHeader = true;
25
+ keysObject.fixSiderbar = true;
26
+ keysObject.showTabsBar = true;
27
+ keysObject.fixedTabsBar = true;
28
+ }
29
+ return keysObject;
30
+ }
31
+ function handleThemeConfig(config) {
32
+ if (config.layout === "mix") {
33
+ config.fixSiderbar = true;
34
+ config.fixedHeader = true;
35
+ config.splitMenus = true;
36
+ }
37
+ if (config.layout === "top") {
38
+ config.fixSiderbar = false;
39
+ config.fixedHeader = true;
40
+ config.splitMenus = false;
41
+ }
42
+ if (config.layout === "simple") {
43
+ config.splitMenus = false;
44
+ config.showTabsBar = false;
45
+ config.fixedHeader = false;
46
+ config.fixSiderbar = false;
47
+ }
48
+ if (config.layout === "side") {
49
+ config.splitMenus = false;
50
+ config.fixedHeader = true;
51
+ config.fixSiderbar = true;
52
+ }
53
+ if (config.layout === "wide") {
54
+ config.splitMenus = false;
55
+ config.fixSiderbar = false;
56
+ config.fixedHeader = true;
57
+ config.showTabsBar = false;
58
+ config.fixedTabsBar = false;
59
+ }
60
+ return config;
61
+ }
62
+
63
+ //#endregion
64
+ export { handleSettingsDisabled, handleThemeConfig };
@@ -0,0 +1,11 @@
1
+ //#region src/hooks/useClockTime/index.d.ts
2
+ declare function export_default(): {
3
+ hh: string;
4
+ mm: string;
5
+ ss: string;
6
+ dddd: string;
7
+ day: string;
8
+ a: string;
9
+ };
10
+ //#endregion
11
+ export { export_default as default };
@@ -0,0 +1,28 @@
1
+ import { reactive } from "vue";
2
+ import dayjs from "dayjs";
3
+
4
+ //#region src/hooks/useClockTime/index.ts
5
+ function useClockTime_default() {
6
+ const clockTime = reactive({
7
+ hh: "",
8
+ mm: "",
9
+ ss: "",
10
+ dddd: "",
11
+ day: "",
12
+ a: ""
13
+ });
14
+ function display_time() {
15
+ clockTime.hh = dayjs().format("HH");
16
+ clockTime.mm = dayjs().format("mm");
17
+ clockTime.ss = dayjs().format("ss");
18
+ clockTime.a = dayjs().format("a").toUpperCase();
19
+ clockTime.day = dayjs().format("YYYY-MM-DD");
20
+ clockTime.dddd = dayjs().format("dddd");
21
+ requestAnimationFrame(display_time);
22
+ }
23
+ requestAnimationFrame(display_time);
24
+ return clockTime;
25
+ }
26
+
27
+ //#endregion
28
+ export { useClockTime_default as default };
@@ -0,0 +1,7 @@
1
+ import { AppItemProps, AppListProps, AppsLogoComponentsProps } from "./AppsLogoComponents/props.js";
2
+ import AppsLogoIcon, { DefaultRenderLogo } from "./AppsLogoComponents/index.js";
3
+ import { RightContentActions } from "./RightContent/props.js";
4
+ import GlobalRightContent from "./RightContent/index.js";
5
+ import { ExtraConfigState } from "./ThemeEditor/props.js";
6
+ import ThemeEditor from "./ThemeEditor/index.js";
7
+ export { AppItemProps, AppListProps, AppsLogoComponentsProps, DefaultRenderLogo, type ExtraConfigState, AppsLogoIcon as GAppsLogoComponents, ThemeEditor as GProThemeEditor, GlobalRightContent as GRightContent, type RightContentActions };
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import AppsLogoComponents_default, { DefaultRenderLogo } from "./AppsLogoComponents/index.js";
2
+ import RightContent_default from "./RightContent/index.js";
3
+ import ThemeEditor_default from "./ThemeEditor/index.js";
4
+
5
+ export { DefaultRenderLogo, AppsLogoComponents_default as GAppsLogoComponents, ThemeEditor_default as GProThemeEditor, RightContent_default as GRightContent };