@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 gx12358
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ <div align="center"><a name="readme-top"></a>
2
+
3
+ <img height="180" src="https://gx12358.cn/resource/img/favicon.ico">
4
+
5
+ <h1>Pro Layout Components</h1>
6
+
7
+ </div>
8
+
9
+ ## ✨ Features
10
+
11
+ - 🌈 Enterprise-class UI designed for web applications.
12
+ - 📦 A set of high-quality Vue3 components out of the box.
13
+ - 🛡 Written in TypeScript with predictable static types.
14
+ - ⚙️ Whole package of design resources and development tools.
15
+ - 🌍 Internationalization support for dozens of languages.
16
+ - 🎨 Powerful theme customization based on CSS-in-JS.
17
+
18
+ ## 🖥 Environment Support
19
+
20
+ - Modern browsers
21
+ - Server-side Rendering
22
+ - [Electron](https://www.electronjs.org/)
23
+
24
+ | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Electron |
25
+ | --- | --- | --- | --- | --- |
26
+ | Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
27
+
28
+ ## 📦 Install
29
+
30
+ ```bash
31
+ npm install @gx-design-vue/pro-layout-components
32
+ ```
33
+
34
+ ```bash
35
+ yarn add @gx-design-vue/pro-layout-components
36
+ ```
37
+
38
+ ```bash
39
+ pnpm add @gx-design-vue/pro-layout-components
40
+ ```
41
+
42
+ ```bash
43
+ bun add @gx-design-vue/pro-layout-components
44
+ ```
45
+
46
+ ## Acknowledgements
47
+
48
+ Antdv Next is inspired by and built upon the following open-source projects.
49
+
50
+ - [Ant Design](https://ant.design/)
51
+ - [Vue.js](https://vuejs.org/)
52
+ - [Vite](https://vitejs.dev/)
53
+
54
+ ## Maintainer
55
+
56
+ [@gx12358](https://github.com/gx12358/vue3-antd-admin)
57
+
58
+ ## Contributors
59
+
60
+ <a href="https://github.com/gx12358/vue3-antd-admin/graphs/contributors">
61
+ <img alt="Contributors" src="https://contrib.rocks/image?repo=gx12358/vue3-antd-admin" />
62
+ </a>
63
+
64
+ ## Special Thanks
65
+
66
+ Thanks to the [vbenjs/vue-vben-admin](https://github.com/gx12358/vue3-antd-admin) project for providing inspiration and reference implementation.
67
+
68
+ ## License
69
+
70
+ [MIT © gx12358-2021](./LICENSE)
71
+
72
+ ## `Star`
73
+
74
+ Thank you very much for the stars from kind-hearted people, thank you for your support :heart:
75
+
76
+ [![Stargazers repo roster for @gx12358/vue3-antd-admin](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=gx12358&repo=vue3-antd-admin)](https://github.com/gx12358/vue3-antd-admin/stargazers)
@@ -0,0 +1,24 @@
1
+ import { AppListProps, AppsLogoComponentsProps } from "./props.js";
2
+ import * as vue6 from "vue";
3
+ import * as ant_design_vue_es__util_type0 from "ant-design-vue/es/_util/type";
4
+
5
+ //#region src/AppsLogoComponents/AppLogoList.d.ts
6
+ declare const AppsLogoList: vue6.DefineComponent<vue6.ExtractPropTypes<{
7
+ appList: {
8
+ type: vue6.PropType<AppListProps>;
9
+ default: any;
10
+ };
11
+ onItemClick: vue6.PropType<AppsLogoComponentsProps["onItemClick"]>;
12
+ }>, () => ant_design_vue_es__util_type0.VueNode, {}, {}, {}, vue6.ComponentOptionsMixin, vue6.ComponentOptionsMixin, "itemClick"[], "itemClick", vue6.PublicProps, Readonly<vue6.ExtractPropTypes<{
13
+ appList: {
14
+ type: vue6.PropType<AppListProps>;
15
+ default: any;
16
+ };
17
+ onItemClick: vue6.PropType<AppsLogoComponentsProps["onItemClick"]>;
18
+ }>> & Readonly<{
19
+ onItemClick?: (...args: any[]) => any;
20
+ }>, {
21
+ appList: AppListProps;
22
+ }, {}, {}, {}, string, vue6.ComponentProvideOptions, true, {}, any>;
23
+ //#endregion
24
+ export { AppsLogoList as default };
@@ -0,0 +1,43 @@
1
+ import props_default from "./props.js";
2
+ import { DefaultContent } from "./DefaultContent.js";
3
+ import { SimpleContent } from "./SimpleContent.js";
4
+ import { genAppLogoListStyle } from "./style/index.js";
5
+ import { createVNode, defineComponent } from "vue";
6
+ import { useProStyle } from "@gx-design-vue/pro-provider";
7
+ import { getPrefixCls } from "@gx-design-vue/pro-utils";
8
+
9
+ //#region src/AppsLogoComponents/AppLogoList.tsx
10
+ const AppsLogoList = /* @__PURE__ */ defineComponent({
11
+ props: props_default,
12
+ emits: ["itemClick"],
13
+ setup(props) {
14
+ const baseClassName = getPrefixCls({
15
+ suffixCls: "layout-app",
16
+ isPor: true
17
+ });
18
+ const { wrapSSR, hashId } = useProStyle("AppsLogoList", [genAppLogoListStyle], baseClassName);
19
+ const cloneItemClick = (app) => {
20
+ props.onItemClick?.(app);
21
+ };
22
+ return () => {
23
+ if (props.appList?.some((app) => {
24
+ return !app?.desc;
25
+ })) return wrapSSR(createVNode(SimpleContent, {
26
+ "hashId": hashId.value,
27
+ "appList": props.appList,
28
+ "onItemClick": props.onItemClick ? cloneItemClick : void 0,
29
+ "baseClassName": `${baseClassName}-simple`
30
+ }, null));
31
+ return wrapSSR(createVNode(DefaultContent, {
32
+ "hashId": hashId.value,
33
+ "appList": props.appList,
34
+ "onItemClick": props.onItemClick ? cloneItemClick : void 0,
35
+ "baseClassName": `${baseClassName}-default`
36
+ }, null));
37
+ };
38
+ }
39
+ });
40
+ var AppLogoList_default = AppsLogoList;
41
+
42
+ //#endregion
43
+ export { AppLogoList_default as default };
@@ -0,0 +1,10 @@
1
+ import { FunctionalComponent } from "vue";
2
+
3
+ //#region src/AppsLogoComponents/AppsLogo.d.ts
4
+ /**
5
+ * 默认的应用列表的图标
6
+ *
7
+ */
8
+ declare const AppsLogo: FunctionalComponent;
9
+ //#endregion
10
+ export { AppsLogo };
@@ -0,0 +1,12 @@
1
+ import { createVNode } from "vue";
2
+ import { AppstoreOutlined } from "@ant-design/icons-vue";
3
+
4
+ //#region src/AppsLogoComponents/AppsLogo.tsx
5
+ /**
6
+ * 默认的应用列表的图标
7
+ *
8
+ */
9
+ const AppsLogo = () => createVNode(AppstoreOutlined, null, null);
10
+
11
+ //#endregion
12
+ export { AppsLogo };
@@ -0,0 +1,27 @@
1
+ import { AppItemProps, AppListProps } from "./props.js";
2
+ import * as vue0 from "vue";
3
+ import { PropType } from "vue";
4
+ import * as vue_jsx_runtime0 from "vue/jsx-runtime";
5
+
6
+ //#region src/AppsLogoComponents/DefaultContent.d.ts
7
+ declare const DefaultContent: vue0.DefineComponent<vue0.ExtractPropTypes<{
8
+ hashId: PropType<string>;
9
+ baseClassName: PropType<string>;
10
+ appList: {
11
+ type: PropType<AppListProps>;
12
+ default: any;
13
+ };
14
+ onItemClick: PropType<(item: AppItemProps, popoverRef?: HTMLSpanElement | undefined) => void>;
15
+ }>, () => vue_jsx_runtime0.JSX.Element, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<vue0.ExtractPropTypes<{
16
+ hashId: PropType<string>;
17
+ baseClassName: PropType<string>;
18
+ appList: {
19
+ type: PropType<AppListProps>;
20
+ default: any;
21
+ };
22
+ onItemClick: PropType<(item: AppItemProps, popoverRef?: HTMLSpanElement | undefined) => void>;
23
+ }>> & Readonly<{}>, {
24
+ appList: AppListProps;
25
+ }, {}, {}, {}, string, vue0.ComponentProvideOptions, true, {}, any>;
26
+ //#endregion
27
+ export { DefaultContent };
@@ -0,0 +1,43 @@
1
+ import props_default from "./props.js";
2
+ import { DefaultRenderLogo } from "./index.js";
3
+ import { createVNode, defineComponent } from "vue";
4
+
5
+ //#region src/AppsLogoComponents/DefaultContent.tsx
6
+ const DefaultContent = /* @__PURE__ */ defineComponent({
7
+ props: {
8
+ hashId: String,
9
+ baseClassName: String,
10
+ appList: props_default.appList,
11
+ onItemClick: props_default.onItemClick
12
+ },
13
+ setup(props) {
14
+ return () => {
15
+ return createVNode("div", { "class": `${props.baseClassName}-content ${props.hashId}`.trim() }, [createVNode("ul", { "class": `${props.baseClassName}-content-list ${props.hashId}`.trim() }, [props.appList?.map((app, index) => {
16
+ if (app?.children?.length) return createVNode("div", {
17
+ "key": index,
18
+ "class": `${props.baseClassName}-content-list-item-group ${props.hashId}`.trim()
19
+ }, [createVNode("div", { "class": `${props.baseClassName}-content-list-item-group-title ${props.hashId}`.trim() }, [app.title]), createVNode(DefaultContent, {
20
+ "hashId": props.hashId,
21
+ "onItemClick": props.onItemClick,
22
+ "appList": app?.children,
23
+ "baseClassName": props.baseClassName
24
+ }, null)]);
25
+ return createVNode("li", {
26
+ "key": index,
27
+ "class": `${props.baseClassName}-content-list-item ${props.hashId}`.trim(),
28
+ "onClick": (e) => {
29
+ e.stopPropagation();
30
+ props.onItemClick?.(app);
31
+ }
32
+ }, [createVNode("a", {
33
+ "href": props.onItemClick ? void 0 : app.url,
34
+ "target": app.target,
35
+ "rel": "noreferrer"
36
+ }, [createVNode(DefaultRenderLogo, { "logo": app.icon }, null), createVNode("div", null, [createVNode("div", null, [app.title]), app.desc ? createVNode("span", null, [app.desc]) : null])])]);
37
+ })])]);
38
+ };
39
+ }
40
+ });
41
+
42
+ //#endregion
43
+ export { DefaultContent };
@@ -0,0 +1,38 @@
1
+ import { AppItemProps, AppListProps } from "./props.js";
2
+ import * as vue17 from "vue";
3
+ import { PropType } from "vue";
4
+ import { CustomRender } from "@gx-design-vue/pro-utils";
5
+ import * as vue_jsx_runtime0 from "vue/jsx-runtime";
6
+
7
+ //#region src/AppsLogoComponents/SimpleContent.d.ts
8
+ /**
9
+ * simple 模式渲染logo的方式
10
+ *
11
+ * @param logo
12
+ * @param title
13
+ * @returns
14
+ */
15
+ declare function renderLogo(logo: AppItemProps['icon'], title?: CustomRender): string | number | boolean | void | vue17.VNode<vue17.RendererNode, vue17.RendererElement, {
16
+ [key: string]: any;
17
+ }> | vue17.VNodeArrayChildren | vue17.Slot | ((...props: any[]) => vue17.VNode);
18
+ declare const SimpleContent: vue17.DefineComponent<vue17.ExtractPropTypes<{
19
+ hashId: PropType<string>;
20
+ baseClassName: PropType<string>;
21
+ appList: {
22
+ type: PropType<AppListProps>;
23
+ default: any;
24
+ };
25
+ onItemClick: PropType<(item: AppItemProps, popoverRef?: HTMLSpanElement | undefined) => void>;
26
+ }>, () => vue_jsx_runtime0.JSX.Element, {}, {}, {}, vue17.ComponentOptionsMixin, vue17.ComponentOptionsMixin, {}, string, vue17.PublicProps, Readonly<vue17.ExtractPropTypes<{
27
+ hashId: PropType<string>;
28
+ baseClassName: PropType<string>;
29
+ appList: {
30
+ type: PropType<AppListProps>;
31
+ default: any;
32
+ };
33
+ onItemClick: PropType<(item: AppItemProps, popoverRef?: HTMLSpanElement | undefined) => void>;
34
+ }>> & Readonly<{}>, {
35
+ appList: AppListProps;
36
+ }, {}, {}, {}, string, vue17.ComponentProvideOptions, true, {}, any>;
37
+ //#endregion
38
+ export { SimpleContent, renderLogo };
@@ -0,0 +1,63 @@
1
+ import props_default from "./props.js";
2
+ import { createVNode, defineComponent } from "vue";
3
+ import { isUrl } from "@gx-design-vue/pro-utils";
4
+
5
+ //#region src/AppsLogoComponents/SimpleContent.tsx
6
+ /**
7
+ * simple 模式渲染logo的方式
8
+ *
9
+ * @param logo
10
+ * @param title
11
+ * @returns
12
+ */
13
+ function renderLogo(logo, title) {
14
+ if (logo && typeof logo === "string" && isUrl(logo)) return createVNode("img", {
15
+ "src": logo,
16
+ "alt": "logo"
17
+ }, null);
18
+ if (typeof logo === "function") return logo();
19
+ if (logo && typeof logo === "string") return createVNode("div", { "id": "avatarLogo" }, [logo]);
20
+ if (!logo && title && typeof title === "string") {
21
+ const symbol = title.substring(0, 1);
22
+ return createVNode("div", { "id": "avatarLogo" }, [symbol]);
23
+ }
24
+ return logo;
25
+ }
26
+ const SimpleContent = /* @__PURE__ */ defineComponent({
27
+ props: {
28
+ hashId: String,
29
+ baseClassName: String,
30
+ appList: props_default.appList,
31
+ onItemClick: props_default.onItemClick
32
+ },
33
+ setup(props) {
34
+ return () => {
35
+ return createVNode("div", { "class": `${props.baseClassName}-content ${props.hashId}`.trim() }, [createVNode("ul", { "class": `${props.baseClassName}-content-list ${props.hashId}`.trim() }, [props.appList?.map((app, index) => {
36
+ if (app?.children?.length) return createVNode("div", {
37
+ "key": index,
38
+ "class": `${props.baseClassName}-content-list-item-group ${props.hashId}`.trim()
39
+ }, [createVNode("div", { "class": `${props.baseClassName}-content-list-item-group-title ${props.hashId}`.trim() }, [app.title]), createVNode(SimpleContent, {
40
+ "hashId": props.hashId,
41
+ "onItemClick": props.onItemClick,
42
+ "appList": app?.children,
43
+ "baseClassName": props.baseClassName
44
+ }, null)]);
45
+ return createVNode("li", {
46
+ "key": index,
47
+ "class": `${props.baseClassName}-content-list-item ${props.hashId}`.trim(),
48
+ "onClick": (e) => {
49
+ e.stopPropagation();
50
+ props.onItemClick?.(app);
51
+ }
52
+ }, [createVNode("a", {
53
+ "href": props.onItemClick ? "javascript:;" : app.url,
54
+ "target": app.target,
55
+ "rel": "noreferrer"
56
+ }, [renderLogo(app.icon, app.title), createVNode("div", null, [createVNode("div", null, [app.title])])])]);
57
+ })])]);
58
+ };
59
+ }
60
+ });
61
+
62
+ //#endregion
63
+ export { SimpleContent, renderLogo };
@@ -0,0 +1,32 @@
1
+ import { AppItemProps, AppListProps, AppsLogoComponentsProps } from "./props.js";
2
+ import * as vue37 from "vue";
3
+ import { FunctionalComponent } from "vue";
4
+ import * as ant_design_vue_es__util_type0 from "ant-design-vue/es/_util/type";
5
+
6
+ //#region src/AppsLogoComponents/index.d.ts
7
+ /**
8
+ * 默认渲染logo的方式,如果是个string,用img。否则直接返回
9
+ *
10
+ * @param logo
11
+ * @returns
12
+ */
13
+ declare const DefaultRenderLogo: FunctionalComponent<{
14
+ logo: AppItemProps['icon'];
15
+ }>;
16
+ declare const AppsLogoIcon: vue37.DefineComponent<vue37.ExtractPropTypes<{
17
+ appList: {
18
+ type: vue37.PropType<AppListProps>;
19
+ default: any;
20
+ };
21
+ onItemClick: vue37.PropType<AppsLogoComponentsProps["onItemClick"]>;
22
+ }>, () => ant_design_vue_es__util_type0.VueNode, {}, {}, {}, vue37.ComponentOptionsMixin, vue37.ComponentOptionsMixin, {}, string, vue37.PublicProps, Readonly<vue37.ExtractPropTypes<{
23
+ appList: {
24
+ type: vue37.PropType<AppListProps>;
25
+ default: any;
26
+ };
27
+ onItemClick: vue37.PropType<AppsLogoComponentsProps["onItemClick"]>;
28
+ }>> & Readonly<{}>, {
29
+ appList: AppListProps;
30
+ }, {}, {}, {}, string, vue37.ComponentProvideOptions, true, {}, any>;
31
+ //#endregion
32
+ export { DefaultRenderLogo, AppsLogoIcon as default };
@@ -0,0 +1,71 @@
1
+ import props_default from "./props.js";
2
+ import { genAppLogoIcon } from "./style/index.js";
3
+ import AppLogoList_default from "./AppLogoList.js";
4
+ import { AppsLogo } from "./AppsLogo.js";
5
+ import { Fragment, createVNode, defineComponent, ref } from "vue";
6
+ import { useState } from "@gx-design-vue/pro-hooks";
7
+ import { useProStyle } from "@gx-design-vue/pro-provider";
8
+ import { classNames, getPrefixCls } from "@gx-design-vue/pro-utils";
9
+ import { Popover } from "ant-design-vue";
10
+
11
+ //#region src/AppsLogoComponents/index.tsx
12
+ /**
13
+ * 默认渲染logo的方式,如果是个string,用img。否则直接返回
14
+ *
15
+ * @param logo
16
+ * @returns
17
+ */
18
+ const DefaultRenderLogo = ({ logo }) => {
19
+ if (typeof logo === "string") return createVNode("img", {
20
+ "width": "auto",
21
+ "height": 22,
22
+ "src": logo,
23
+ "alt": "logo"
24
+ }, null);
25
+ if (typeof logo === "function") return logo();
26
+ return logo;
27
+ };
28
+ const AppsLogoIcon = /* @__PURE__ */ defineComponent({
29
+ name: "AppsLogoIcon",
30
+ inheritAttrs: false,
31
+ props: props_default,
32
+ setup(props) {
33
+ const baseClassName = getPrefixCls({
34
+ suffixCls: "layout-app",
35
+ isPor: true
36
+ });
37
+ const { wrapSSR, hashId } = useProStyle("AppsLogoIcon", [genAppLogoIcon], baseClassName);
38
+ const [open, setOpen] = useState(false);
39
+ const rootRef = ref();
40
+ const popoverRef = ref();
41
+ return () => {
42
+ return wrapSSR(createVNode(Fragment, null, [createVNode("div", {
43
+ "ref": rootRef,
44
+ "onClick": (e) => {
45
+ e.stopPropagation();
46
+ e.preventDefault();
47
+ }
48
+ }, null), createVNode(Popover, {
49
+ "placement": "bottomRight",
50
+ "trigger": ["click"],
51
+ "arrow": false,
52
+ "destroyTooltipOnHide": true,
53
+ "open": open.value,
54
+ "onOpenChange": setOpen,
55
+ "overlayClassName": `${baseClassName}-popover ${hashId.value}`.trim(),
56
+ "content": createVNode(AppLogoList_default, props, null),
57
+ "getPopupContainer": () => rootRef.value || document.body
58
+ }, { default: () => [createVNode("span", {
59
+ "ref": popoverRef,
60
+ "onClick": (e) => {
61
+ e.stopPropagation();
62
+ },
63
+ "class": classNames(`${baseClassName}-icon`, hashId.value, { [`${baseClassName}-icon-active`]: open.value })
64
+ }, [createVNode(AppsLogo, null, null)])] })]));
65
+ };
66
+ }
67
+ });
68
+ var AppsLogoComponents_default = AppsLogoIcon;
69
+
70
+ //#endregion
71
+ export { DefaultRenderLogo, AppsLogoComponents_default as default };
@@ -0,0 +1,26 @@
1
+ import { PropType } from "vue";
2
+ import { CustomRender } from "@gx-design-vue/pro-utils";
3
+
4
+ //#region src/AppsLogoComponents/props.d.ts
5
+ interface AppItemProps {
6
+ title: CustomRender;
7
+ desc?: CustomRender;
8
+ icon?: CustomRender | (() => CustomRender);
9
+ url?: string;
10
+ target?: string;
11
+ children?: Omit<AppItemProps, 'children'>[];
12
+ }
13
+ type AppListProps = AppItemProps[];
14
+ interface AppsLogoComponentsProps {
15
+ appList?: AppListProps;
16
+ onItemClick?: (item: AppItemProps, popoverRef?: HTMLSpanElement | undefined) => void;
17
+ }
18
+ declare const appsLogoComponentsProps: {
19
+ appList: {
20
+ type: PropType<AppListProps>;
21
+ default: any;
22
+ };
23
+ onItemClick: PropType<AppsLogoComponentsProps["onItemClick"]>;
24
+ };
25
+ //#endregion
26
+ export { AppItemProps, AppListProps, AppsLogoComponentsProps, appsLogoComponentsProps as default };
@@ -0,0 +1,12 @@
1
+ //#region src/AppsLogoComponents/props.ts
2
+ const appsLogoComponentsProps = {
3
+ appList: {
4
+ type: Array,
5
+ default: void 0
6
+ },
7
+ onItemClick: Function
8
+ };
9
+ var props_default = appsLogoComponentsProps;
10
+
11
+ //#endregion
12
+ export { props_default as default };
@@ -0,0 +1,6 @@
1
+ import { GenerateStyle } from "@gx-design-vue/pro-provider";
2
+
3
+ //#region src/AppsLogoComponents/style/default.d.ts
4
+ declare const genAppsLogoComponentsDefaultListStyle: GenerateStyle;
5
+ //#endregion
6
+ export { genAppsLogoComponentsDefaultListStyle };
@@ -0,0 +1,70 @@
1
+ import { resetComponent } from "@gx-design-vue/pro-provider";
2
+
3
+ //#region src/AppsLogoComponents/style/default.ts
4
+ const genAppsLogoComponentsDefaultListStyle = (token) => {
5
+ return { "&-content": {
6
+ maxHeight: "calc(100vh - 48px)",
7
+ overflow: "auto",
8
+ "&-list": {
9
+ boxSizing: "content-box",
10
+ maxWidth: 656,
11
+ marginBlock: 0,
12
+ marginInline: 0,
13
+ paddingBlock: 0,
14
+ paddingInline: 0,
15
+ listStyle: "none",
16
+ "&-item": {
17
+ position: "relative",
18
+ display: "inline-block",
19
+ width: 328,
20
+ height: 72,
21
+ paddingInline: 16,
22
+ paddingBlock: 16,
23
+ verticalAlign: "top",
24
+ listStyleType: "none",
25
+ transition: "transform 0.2s cubic-bezier(0.333, 0, 0, 1)",
26
+ borderRadius: token.borderRadius,
27
+ "&-group": {
28
+ marginBottom: 16,
29
+ "&-title": {
30
+ margin: "16px 0 8px 12px",
31
+ fontWeight: 600,
32
+ color: "rgba(0, 0, 0, 0.88)",
33
+ fontSize: 16,
34
+ opacity: .85,
35
+ lineHeight: 1.5,
36
+ "&:first-child": { marginTop: 12 }
37
+ }
38
+ },
39
+ "&:hover": { backgroundColor: token.colorBgTextHover },
40
+ "* div": resetComponent?.(token),
41
+ a: {
42
+ display: "flex",
43
+ height: "100%",
44
+ fontSize: 12,
45
+ textDecoration: "none",
46
+ "& > img": {
47
+ width: 40,
48
+ height: 40
49
+ },
50
+ "& > div": {
51
+ marginInlineStart: 14,
52
+ color: token.colorTextHeading,
53
+ fontSize: 14,
54
+ lineHeight: "22px",
55
+ whiteSpace: "nowrap",
56
+ textOverflow: "ellipsis"
57
+ },
58
+ "& > div > span": {
59
+ color: token.colorTextSecondary,
60
+ fontSize: 12,
61
+ lineHeight: "20px"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ } };
67
+ };
68
+
69
+ //#endregion
70
+ export { genAppsLogoComponentsDefaultListStyle };
@@ -0,0 +1,7 @@
1
+ import { GenerateStyle } from "@gx-design-vue/pro-provider";
2
+
3
+ //#region src/AppsLogoComponents/style/index.d.ts
4
+ declare const genAppLogoListStyle: GenerateStyle;
5
+ declare const genAppLogoIcon: GenerateStyle;
6
+ //#endregion
7
+ export { genAppLogoIcon, genAppLogoListStyle };
@@ -0,0 +1,60 @@
1
+ import { genAppsLogoComponentsDefaultListStyle } from "./default.js";
2
+ import { genAppsLogoComponentsSimpleListStyle } from "./simple.js";
3
+ import { getTokenLayoutTheme } from "@gx-design-vue/pro-layout";
4
+ import { getAlphaColor } from "ant-design-vue/es/theme/themes/dark/colorAlgorithm";
5
+
6
+ //#region src/AppsLogoComponents/style/index.ts
7
+ const genAppLogoListStyle = (token) => {
8
+ return { [token.componentCls]: {
9
+ "&-simple": genAppsLogoComponentsSimpleListStyle(token),
10
+ "&-default": genAppsLogoComponentsDefaultListStyle(token)
11
+ } };
12
+ };
13
+ const genAppLogoIcon = (token) => {
14
+ const { theme } = getTokenLayoutTheme(token);
15
+ return { [token.componentCls]: {
16
+ "&-icon": {
17
+ display: "inline-flex",
18
+ alignItems: "center",
19
+ justifyContent: "center",
20
+ paddingInline: 4,
21
+ paddingBlock: 0,
22
+ fontSize: 18,
23
+ lineHeight: "14px",
24
+ height: 28,
25
+ width: 28,
26
+ cursor: "pointer",
27
+ color: theme === "dark" ? token.colorWhite : token.layout?.colorTextAppListIcon,
28
+ borderRadius: token.borderRadius,
29
+ "&:hover": {
30
+ color: theme === "dark" ? token.colorWhite : token.layout?.colorTextAppListIconHover,
31
+ backgroundColor: theme === "dark" ? getAlphaColor("#fff", .12) : token.layout?.colorBgAppListIconHover
32
+ },
33
+ [`&-active${token.proComponentsCls}-layout-app-icon`]: {
34
+ fontSize: 18,
35
+ color: theme === "dark" ? token.colorWhite : token.layout?.colorTextAppListIconHover,
36
+ backgroundColor: theme === "dark" ? getAlphaColor("#fff", .12) : token.layout?.colorBgAppListIconHover
37
+ }
38
+ },
39
+ "&-item-title": {
40
+ marginInlineStart: "16px",
41
+ marginInlineEnd: "8px",
42
+ marginBlockStart: 0,
43
+ marginBlockEnd: "12px",
44
+ fontWeight: 600,
45
+ color: "rgba(0, 0, 0, 0.88)",
46
+ fontSize: 16,
47
+ opacity: .85,
48
+ lineHeight: 1.5,
49
+ "&:first-child": { marginBlockStart: 12 }
50
+ },
51
+ "&-popover": {
52
+ width: "max-content",
53
+ maxWidth: "100vw",
54
+ [`${token.antCls}-popover-arrow`]: { display: "none" }
55
+ }
56
+ } };
57
+ };
58
+
59
+ //#endregion
60
+ export { genAppLogoIcon, genAppLogoListStyle };
@@ -0,0 +1,6 @@
1
+ import { GenerateStyle } from "@gx-design-vue/pro-provider";
2
+
3
+ //#region src/AppsLogoComponents/style/simple.d.ts
4
+ declare const genAppsLogoComponentsSimpleListStyle: GenerateStyle;
5
+ //#endregion
6
+ export { genAppsLogoComponentsSimpleListStyle };