create-antd-skin 1.1.4 → 1.1.6

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/bin/skin.js CHANGED
@@ -97,7 +97,7 @@ async function installSkin(skinName) {
97
97
  name: "skin",
98
98
  message: "Choose a skin",
99
99
  choices: skins.map(item => ({
100
- name: item.name,
100
+ name: toCamelCase(item.name),
101
101
  value: item.name,
102
102
  })),
103
103
  },
@@ -117,14 +117,13 @@ async function installSkin(skinName) {
117
117
  await copySkinFiles(selectedSkin, skin.path, cwd);
118
118
  await updateSkinIndex(selectedSkin, cwd);
119
119
  spinner.succeed(`Skin "${selectedSkin}" installed.`);
120
- console.log(`
121
- ✨ Skin installed successfully!
122
- // Simply adding the skin name to the settings will take effect, e.g.
123
- const layoutConfig: LayoutConfig = {
124
- skinName: "${toCamelCase(selectedSkin) ?? "<skin-name>"}",
125
- ...
126
- }
127
- `);
120
+ console.log(chalk_1.default.gray(`
121
+ ✨ Skin installed successfully!
122
+ // Simply adding the skin name to the settings will take effect, e.g.
123
+ const layoutConfig: LayoutConfig = {
124
+ skinName: "${toCamelCase(selectedSkin) ?? "<skin-name>"}",
125
+ ...
126
+ }`));
128
127
  }
129
128
  catch (e) {
130
129
  spinner.fail("Install skin failed.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-antd-skin",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "this is skin-cli for @adminui-dev/antd-layout",
5
5
  "main": "index.js",
6
6
  "author": "zhouwenqi",
@@ -0,0 +1,41 @@
1
+ import type { ThemeSkin } from "@adminui-dev/antd-layout"
2
+ const skinBgStyles:React.CSSProperties = {
3
+ position:"absolute",
4
+ inset:"0",
5
+ backgroundColor:"transparent",
6
+ }
7
+
8
+ const ImageBackground=()=>{
9
+ return (
10
+ <div style={skinBgStyles}>
11
+ </div>
12
+ )
13
+ }
14
+ const skin:ThemeSkin = {
15
+ "name":"parkWavesNone",
16
+ "skinType":"custom",
17
+ "layoutConfig":{
18
+ "theme":"light",
19
+ "layoutType":"leftMenu",
20
+ "asideMenuInline":false,
21
+ "asideMenuGroup":true,
22
+ "hideBorder":true,
23
+ "splitMenu":false,
24
+ "primaryColor":"#161616",
25
+ "containerMargin":12,
26
+ "menuIconSize":16,
27
+ "noneHeader":true,
28
+ "asideBlur":false,
29
+ "asideTransparent":true,
30
+ "containerBlur":false,
31
+ "hideTitle":true,
32
+ "largeBrand":true,
33
+ "visibleBreadcrumbIcon":"all",
34
+ "collapsedPosition":"top",
35
+ "menuItemSelectColor":"invert",
36
+ },
37
+ "logo":"/images/skins/park-waves-none/app-logo-none.webp",
38
+ "icon":"/images/skins/park-waves-none/skin-icon-none.webp",
39
+ "backgroundContent":<ImageBackground />
40
+ }
41
+ export default skin
@@ -0,0 +1,53 @@
1
+ import type { ThemeSkin } from "@adminui-dev/antd-layout"
2
+ import { LazyImage } from "@adminui-dev/antd-layout"
3
+ import { Grid } from "antd"
4
+
5
+ const { useBreakpoint } = Grid
6
+
7
+ const skinBgStyles:React.CSSProperties = {
8
+ position:"absolute",
9
+ inset:"0",
10
+ backgroundColor:"#dae4ea",
11
+ }
12
+ const imgStyles:React.CSSProperties = {
13
+ position:"absolute",
14
+ transition:"width 0.3s, height 0.3s, opaticy 0.3s"
15
+ }
16
+ const ImageBackground=()=>{
17
+ const { xs } = useBreakpoint()
18
+ const leftStyle = xs ? {"height":"100%"} : {"width:":"260px"}
19
+ return (
20
+ <div style={skinBgStyles}>
21
+ <LazyImage style={{...leftStyle,...imgStyles,top:"0px"}} src="/images/skins/park-waves-sider/aside-bg-sider.webp" alt="aisde-bg.webp" />
22
+ <LazyImage style={{...imgStyles,width:"90%",top:"0px",right:"0px"}} src="/images/skins/park-waves-sider/header-bg-light.webp" alt="header-bg.webp" />
23
+ <LazyImage style={{...imgStyles,height:"80px",bottom:"0px",right:"0px"}} src="/images/skins/park-waves-sider/footer-bg-light.webp" alt="header-bg.webp" />
24
+ </div>
25
+ )
26
+ }
27
+ const skin:ThemeSkin = {
28
+ "name":"parkWavesSider",
29
+ "skinType":"custom",
30
+ "layoutConfig":{
31
+ "theme":"light",
32
+ "layoutType":"leftMenu",
33
+ "asideMenuInline":false,
34
+ "asideMenuGroup":true,
35
+ "hideBorder":true,
36
+ "splitMenu":false,
37
+ "primaryColor":"#4a3a88",
38
+ "containerMargin":12,
39
+ "menuIconSize":16,
40
+ "noneHeader":true,
41
+ "asideBlur":false,
42
+ "asideTransparent":true,
43
+ "largeBrand":true,
44
+ "containerBlur":true,
45
+ "collapsedPosition":"top",
46
+ "visibleBreadcrumbIcon":"all",
47
+ "menuItemSelectColor":"default",
48
+ },
49
+ "logo":"/images/skins/park-waves-sider/app-logo-light.webp",
50
+ "icon":"/images/skins/park-waves-sider/skin-icon-sider.webp",
51
+ "backgroundContent":<ImageBackground />
52
+ }
53
+ export default skin