@sxo/theme-wechat 0.0.1 → 0.1.1
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/README.md +2 -2
- package/dist/index.cjs +116 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.js +25 -11
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ pnpm add @sxo/theme-wechat
|
|
|
31
31
|
### Usage (Vue 3 Example)
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
|
-
import { createSxo } from '@sxo/vue';
|
|
34
|
+
import { createSxo } from '@sxo/plugin-vue';
|
|
35
35
|
import wechatTheme from '@sxo/theme-wechat';
|
|
36
36
|
|
|
37
37
|
app.use(createSxo({
|
|
@@ -41,7 +41,7 @@ app.use(createSxo({
|
|
|
41
41
|
|
|
42
42
|
## 📖 Documentation
|
|
43
43
|
|
|
44
|
-
For full documentation and theme customization, visit the [Theme Documentation](https://sxo-engine.pages.dev/zh/guide/tokens.html).
|
|
44
|
+
For full documentation and theme customization, visit the [Theme Documentation](https://sxo-engine.pages.dev/zh-CN/guide/tokens.html).
|
|
45
45
|
|
|
46
46
|
## 📄 License
|
|
47
47
|
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,116 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
default: () => tokens_default,
|
|
24
|
+
wechatTheme: () => wechatTheme
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/tokens.ts
|
|
29
|
+
var import_design = require("@sxo/design");
|
|
30
|
+
var wechatTheme = {
|
|
31
|
+
...import_design.defaultTokens,
|
|
32
|
+
color: {
|
|
33
|
+
...import_design.defaultTokens.color,
|
|
34
|
+
primary: {
|
|
35
|
+
DEFAULT: "#07C160",
|
|
36
|
+
// WeChat Green
|
|
37
|
+
foreground: "#ffffff"
|
|
38
|
+
},
|
|
39
|
+
secondary: {
|
|
40
|
+
DEFAULT: "#10AEFF",
|
|
41
|
+
// WeChat Blue
|
|
42
|
+
foreground: "#ffffff"
|
|
43
|
+
},
|
|
44
|
+
accent: {
|
|
45
|
+
DEFAULT: "#07C160",
|
|
46
|
+
neon: "#07C160",
|
|
47
|
+
vivid: "#FA5151"
|
|
48
|
+
// WeChat Red (Error)
|
|
49
|
+
},
|
|
50
|
+
success: {
|
|
51
|
+
DEFAULT: "#07C160"
|
|
52
|
+
},
|
|
53
|
+
warning: {
|
|
54
|
+
DEFAULT: "#FFBE00"
|
|
55
|
+
},
|
|
56
|
+
error: {
|
|
57
|
+
DEFAULT: "#FA5151"
|
|
58
|
+
},
|
|
59
|
+
info: {
|
|
60
|
+
DEFAULT: "#10AEFF"
|
|
61
|
+
},
|
|
62
|
+
neutral: {
|
|
63
|
+
0: "#ffffff",
|
|
64
|
+
50: "#F7F7F7",
|
|
65
|
+
100: "#EDEDED",
|
|
66
|
+
200: "#E5E5E5",
|
|
67
|
+
300: "#D1D1D1",
|
|
68
|
+
400: "#B2B2B2",
|
|
69
|
+
500: "#888888",
|
|
70
|
+
600: "#757575",
|
|
71
|
+
700: "#4C4C4C",
|
|
72
|
+
800: "#333333",
|
|
73
|
+
900: "#191919",
|
|
74
|
+
1e3: "#000000"
|
|
75
|
+
},
|
|
76
|
+
background: {
|
|
77
|
+
primary: "#ffffff",
|
|
78
|
+
secondary: "#F7F7F7",
|
|
79
|
+
inverse: "#191919"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
borderRadius: {
|
|
83
|
+
DEFAULT: "8px",
|
|
84
|
+
none: "0px",
|
|
85
|
+
xs: "2px",
|
|
86
|
+
sm: "4px",
|
|
87
|
+
md: "8px",
|
|
88
|
+
// WeUI standard
|
|
89
|
+
lg: "12px",
|
|
90
|
+
full: "9999px",
|
|
91
|
+
xl: "12px"
|
|
92
|
+
},
|
|
93
|
+
boxShadow: {
|
|
94
|
+
none: "none",
|
|
95
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
96
|
+
DEFAULT: "0 4px 12px rgba(0,0,0,0.05)",
|
|
97
|
+
md: "0 8px 24px rgba(0,0,0,0.08)",
|
|
98
|
+
lg: "0 12px 32px rgba(0,0,0,0.12)",
|
|
99
|
+
hard: "0 0 0 1px rgba(0,0,0,0.1)",
|
|
100
|
+
"hard-accent": "0 0 0 1px #07C160",
|
|
101
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
102
|
+
},
|
|
103
|
+
typography: {
|
|
104
|
+
...import_design.defaultTokens.typography,
|
|
105
|
+
fontFamily: {
|
|
106
|
+
sans: '-apple-system-font, "Helvetica Neue", Helvetica, sans-serif',
|
|
107
|
+
serif: 'Georgia, "Times New Roman", serif',
|
|
108
|
+
mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var tokens_default = wechatTheme;
|
|
113
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
+
0 && (module.exports = {
|
|
115
|
+
wechatTheme
|
|
116
|
+
});
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export {}
|
|
1
|
+
import { DesignTokens } from '@sxo/design';
|
|
2
|
+
|
|
3
|
+
declare const wechatTheme: DesignTokens;
|
|
4
|
+
|
|
5
|
+
export { wechatTheme as default, wechatTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// src/tokens.ts
|
|
2
|
+
import { defaultTokens } from "@sxo/design";
|
|
3
|
+
var wechatTheme = {
|
|
4
|
+
...defaultTokens,
|
|
4
5
|
color: {
|
|
5
|
-
...
|
|
6
|
+
...defaultTokens.color,
|
|
6
7
|
primary: {
|
|
7
8
|
DEFAULT: "#07C160",
|
|
9
|
+
// WeChat Green
|
|
8
10
|
foreground: "#ffffff"
|
|
9
11
|
},
|
|
10
12
|
secondary: {
|
|
11
13
|
DEFAULT: "#10AEFF",
|
|
14
|
+
// WeChat Blue
|
|
12
15
|
foreground: "#ffffff"
|
|
13
16
|
},
|
|
14
17
|
accent: {
|
|
15
18
|
DEFAULT: "#07C160",
|
|
16
19
|
neon: "#07C160",
|
|
17
20
|
vivid: "#FA5151"
|
|
21
|
+
// WeChat Red (Error)
|
|
22
|
+
},
|
|
23
|
+
success: {
|
|
24
|
+
DEFAULT: "#07C160"
|
|
25
|
+
},
|
|
26
|
+
warning: {
|
|
27
|
+
DEFAULT: "#FFBE00"
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
DEFAULT: "#FA5151"
|
|
31
|
+
},
|
|
32
|
+
info: {
|
|
33
|
+
DEFAULT: "#10AEFF"
|
|
18
34
|
},
|
|
19
|
-
success: { DEFAULT: "#07C160" },
|
|
20
|
-
warning: { DEFAULT: "#FFBE00" },
|
|
21
|
-
error: { DEFAULT: "#FA5151" },
|
|
22
|
-
info: { DEFAULT: "#10AEFF" },
|
|
23
35
|
neutral: {
|
|
24
36
|
0: "#ffffff",
|
|
25
37
|
50: "#F7F7F7",
|
|
@@ -46,6 +58,7 @@ const r = {
|
|
|
46
58
|
xs: "2px",
|
|
47
59
|
sm: "4px",
|
|
48
60
|
md: "8px",
|
|
61
|
+
// WeUI standard
|
|
49
62
|
lg: "12px",
|
|
50
63
|
full: "9999px",
|
|
51
64
|
xl: "12px"
|
|
@@ -61,7 +74,7 @@ const r = {
|
|
|
61
74
|
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
62
75
|
},
|
|
63
76
|
typography: {
|
|
64
|
-
...
|
|
77
|
+
...defaultTokens.typography,
|
|
65
78
|
fontFamily: {
|
|
66
79
|
sans: '-apple-system-font, "Helvetica Neue", Helvetica, sans-serif',
|
|
67
80
|
serif: 'Georgia, "Times New Roman", serif',
|
|
@@ -69,7 +82,8 @@ const r = {
|
|
|
69
82
|
}
|
|
70
83
|
}
|
|
71
84
|
};
|
|
85
|
+
var tokens_default = wechatTheme;
|
|
72
86
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
tokens_default as default,
|
|
88
|
+
wechatTheme
|
|
75
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxo/theme-wechat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Wechat theme for SXO Design System.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sxo",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sxo/design": "0.
|
|
30
|
+
"@sxo/design": "0.1.1"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
@@ -42,12 +42,11 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"vite-plugin-dts": "^4.5.4"
|
|
45
|
+
"tsup": "^8.3.6",
|
|
46
|
+
"typescript": "^5.9.3"
|
|
48
47
|
},
|
|
49
48
|
"scripts": {
|
|
50
|
-
"build": "
|
|
51
|
-
"dev": "
|
|
49
|
+
"build": "tsup src/index.ts --format cjs --format esm --dts",
|
|
50
|
+
"dev": "tsup src/index.ts --format cjs --format esm --dts --watch"
|
|
52
51
|
}
|
|
53
52
|
}
|