@gindow/vant-go 1.0.1 → 1.0.3

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 (38) hide show
  1. package/README.md +4 -4
  2. package/dist/{vant-go.cjs → @gindow/vant-go.cjs} +1 -1
  3. package/dist/{vant-go.mjs → @gindow/vant-go.mjs} +20 -20
  4. package/dist/resolver.cjs +1 -1
  5. package/dist/resolver.mjs +1 -1
  6. package/dist/src/components/VaxAssetPreview.vue.d.ts +35 -0
  7. package/dist/src/components/VaxAvatar.vue.d.ts +32 -0
  8. package/dist/src/components/VaxButton.vue.d.ts +53 -0
  9. package/dist/src/components/VaxCaptcha.vue.d.ts +62 -0
  10. package/dist/src/components/VaxCell.vue.d.ts +108 -0
  11. package/dist/src/components/VaxCellGroup.vue.d.ts +113 -0
  12. package/dist/src/components/VaxEmpty.vue.d.ts +41 -0
  13. package/dist/src/components/VaxField.vue.d.ts +63 -0
  14. package/dist/src/components/VaxIcon.vue.d.ts +88 -0
  15. package/dist/src/components/VaxLoading.vue.d.ts +75 -0
  16. package/dist/src/components/VaxNavBar.vue.d.ts +56 -0
  17. package/dist/src/components/VaxPage.vue.d.ts +17 -0
  18. package/dist/src/components/VaxSelect.vue.d.ts +34 -0
  19. package/dist/src/components/VaxTabbar.vue.d.ts +116 -0
  20. package/dist/src/components/VaxTabs.vue.d.ts +39 -0
  21. package/dist/src/hooks/useCaptcha.d.ts +4 -0
  22. package/dist/src/hooks/useMessage.d.ts +10 -0
  23. package/dist/src/index.d.ts +22 -0
  24. package/dist/src/locale/en-US.d.ts +25 -0
  25. package/dist/src/locale/index.d.ts +15 -0
  26. package/dist/src/locale/zh-CN.d.ts +25 -0
  27. package/dist/src/resolver.d.ts +19 -0
  28. package/dist/src/types/index.d.ts +14 -0
  29. package/dist/src/utils/validate.d.ts +13 -0
  30. package/package.json +17 -9
  31. package/src/index.ts +6 -0
  32. package/src/resolver.ts +1 -1
  33. package/src/styles/arco.css +99 -0
  34. package/src/{style.css → styles/index.css} +21 -12
  35. package/src/styles/purple.css +107 -0
  36. package/dist/resolver.d.ts +0 -1
  37. package/dist/vant-go.d.ts +0 -1
  38. /package/dist/{style.css → styles/index.css} +0 -0
@@ -0,0 +1,116 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ menu: {
3
+ type: {
4
+ (arrayLength: number): {
5
+ title?: string;
6
+ icon: string;
7
+ to: string;
8
+ dot?: boolean;
9
+ }[];
10
+ (...items: {
11
+ title?: string;
12
+ icon: string;
13
+ to: string;
14
+ dot?: boolean;
15
+ }[]): {
16
+ title?: string;
17
+ icon: string;
18
+ to: string;
19
+ dot?: boolean;
20
+ }[];
21
+ new (arrayLength: number): {
22
+ title?: string;
23
+ icon: string;
24
+ to: string;
25
+ dot?: boolean;
26
+ }[];
27
+ new (...items: {
28
+ title?: string;
29
+ icon: string;
30
+ to: string;
31
+ dot?: boolean;
32
+ }[]): {
33
+ title?: string;
34
+ icon: string;
35
+ to: string;
36
+ dot?: boolean;
37
+ }[];
38
+ isArray(arg: any): arg is any[];
39
+ readonly prototype: any[];
40
+ from<T>(arrayLike: ArrayLike<T>): T[];
41
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
42
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
43
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
44
+ of<T>(...items: T[]): T[];
45
+ readonly [Symbol.species]: ArrayConstructor;
46
+ };
47
+ required: true;
48
+ default: () => never[];
49
+ };
50
+ flash: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
55
+ menu: {
56
+ type: {
57
+ (arrayLength: number): {
58
+ title?: string;
59
+ icon: string;
60
+ to: string;
61
+ dot?: boolean;
62
+ }[];
63
+ (...items: {
64
+ title?: string;
65
+ icon: string;
66
+ to: string;
67
+ dot?: boolean;
68
+ }[]): {
69
+ title?: string;
70
+ icon: string;
71
+ to: string;
72
+ dot?: boolean;
73
+ }[];
74
+ new (arrayLength: number): {
75
+ title?: string;
76
+ icon: string;
77
+ to: string;
78
+ dot?: boolean;
79
+ }[];
80
+ new (...items: {
81
+ title?: string;
82
+ icon: string;
83
+ to: string;
84
+ dot?: boolean;
85
+ }[]): {
86
+ title?: string;
87
+ icon: string;
88
+ to: string;
89
+ dot?: boolean;
90
+ }[];
91
+ isArray(arg: any): arg is any[];
92
+ readonly prototype: any[];
93
+ from<T>(arrayLike: ArrayLike<T>): T[];
94
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
95
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
96
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
97
+ of<T>(...items: T[]): T[];
98
+ readonly [Symbol.species]: ArrayConstructor;
99
+ };
100
+ required: true;
101
+ default: () => never[];
102
+ };
103
+ flash: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ }>> & Readonly<{}>, {
108
+ menu: {
109
+ title?: string;
110
+ icon: string;
111
+ to: string;
112
+ dot?: boolean;
113
+ }[];
114
+ flash: boolean;
115
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
116
+ export default _default;
@@ -0,0 +1,39 @@
1
+ export interface IVaxTab {
2
+ name: string;
3
+ label: string;
4
+ badge?: number | string;
5
+ }
6
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
7
+ tabs: {
8
+ type: () => IVaxTab[];
9
+ required: true;
10
+ };
11
+ sticky: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ active: {
16
+ type: globalThis.PropType<string>;
17
+ required: true;
18
+ };
19
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "update:active": (value: string) => any;
21
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
22
+ tabs: {
23
+ type: () => IVaxTab[];
24
+ required: true;
25
+ };
26
+ sticky: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ active: {
31
+ type: globalThis.PropType<string>;
32
+ required: true;
33
+ };
34
+ }>> & Readonly<{
35
+ "onUpdate:active"?: ((value: string) => any) | undefined;
36
+ }>, {
37
+ sticky: boolean;
38
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
39
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare const useCaptcha: (api: (data: any) => Promise<void>) => {
2
+ waiting: globalThis.Ref<number, number>;
3
+ send: (para?: {}) => Promise<unknown>;
4
+ };
@@ -0,0 +1,10 @@
1
+ import { ToastOptions } from 'vant';
2
+ export declare const useMessage: () => {
3
+ message: (message: string, options?: {}) => import('vant').ToastWrapperInstance;
4
+ success: (message: string, options?: {}) => import('vant').ToastWrapperInstance;
5
+ error: (message: string, options?: {}) => import('vant').ToastWrapperInstance;
6
+ warning: (message: string, options?: {}) => import('vant').ToastWrapperInstance;
7
+ dialog: (message: string, title?: string, options?: {}) => Promise<import('vant/lib/dialog/types').DialogAction | undefined>;
8
+ confirm: (message: string, title?: string, options?: {}) => Promise<import('vant/lib/dialog/types').DialogAction | undefined>;
9
+ loading: (options: string | ToastOptions) => import('vant').ToastWrapperInstance;
10
+ };
@@ -0,0 +1,22 @@
1
+ import { Plugin } from 'vue';
2
+ import { provider, setLocale, getLocale, useLocale } from './locale';
3
+ import { default as VaxAssetPreview } from './components/VaxAssetPreview.vue';
4
+ import { default as VaxAvatar } from './components/VaxAvatar.vue';
5
+ import { default as VaxButton } from './components/VaxButton.vue';
6
+ import { default as VaxCaptcha } from './components/VaxCaptcha.vue';
7
+ import { default as VaxCell } from './components/VaxCell.vue';
8
+ import { default as VaxCellGroup } from './components/VaxCellGroup.vue';
9
+ import { default as VaxEmpty } from './components/VaxEmpty.vue';
10
+ import { default as VaxField } from './components/VaxField.vue';
11
+ import { default as VaxIcon } from './components/VaxIcon.vue';
12
+ import { default as VaxLoading } from './components/VaxLoading.vue';
13
+ import { default as VaxNavBar } from './components/VaxNavBar.vue';
14
+ import { default as VaxPage } from './components/VaxPage.vue';
15
+ import { default as VaxSelect } from './components/VaxSelect.vue';
16
+ import { default as VaxTabbar } from './components/VaxTabbar.vue';
17
+ import { default as VaxTabs } from './components/VaxTabs.vue';
18
+ export * from './types';
19
+ export { useMessage } from './hooks/useMessage';
20
+ declare const VantGo: Plugin;
21
+ export default VantGo;
22
+ export { VaxAssetPreview, VaxAvatar, VaxButton, VaxCaptcha, VaxCell, VaxCellGroup, VaxEmpty, VaxField, VaxIcon, VaxLoading, VaxNavBar, VaxPage, VaxSelect, VaxTabbar, VaxTabs, provider, setLocale, getLocale, useLocale, };
@@ -0,0 +1,25 @@
1
+ declare const _default: {
2
+ cancel: string;
3
+ confirm: string;
4
+ auth: {
5
+ phone: string;
6
+ otp: string;
7
+ enterPhone: string;
8
+ enterOTP: string;
9
+ getOTP: string;
10
+ viaWhatsApp: string;
11
+ viaPhone: string;
12
+ };
13
+ message: {
14
+ otpSent: string;
15
+ phoneInvalid: string;
16
+ };
17
+ empty: {
18
+ noData: string;
19
+ };
20
+ dialog: {
21
+ tip: string;
22
+ confirm: string;
23
+ };
24
+ };
25
+ export default _default;
@@ -0,0 +1,15 @@
1
+ type Messages = Record<string, any>;
2
+ export declare const provider: (opts?: {
3
+ locale?: string;
4
+ messages?: Messages;
5
+ }) => {
6
+ locale: globalThis.Ref<string, string>;
7
+ messages: Messages;
8
+ };
9
+ export declare const useLocale: () => {
10
+ locale: globalThis.Ref<string, string>;
11
+ t: (path: string, params?: Record<string, string | number>) => string;
12
+ };
13
+ export declare const setLocale: (lang: string) => string;
14
+ export declare const getLocale: () => string;
15
+ export {};
@@ -0,0 +1,25 @@
1
+ declare const _default: {
2
+ cancel: string;
3
+ confirm: string;
4
+ auth: {
5
+ phone: string;
6
+ otp: string;
7
+ enterPhone: string;
8
+ enterOTP: string;
9
+ getOTP: string;
10
+ viaWhatsApp: string;
11
+ viaPhone: string;
12
+ };
13
+ message: {
14
+ otpSent: string;
15
+ phoneInvalid: string;
16
+ };
17
+ empty: {
18
+ noData: string;
19
+ };
20
+ dialog: {
21
+ tip: string;
22
+ confirm: string;
23
+ };
24
+ };
25
+ export default _default;
@@ -0,0 +1,19 @@
1
+ export interface VantGoResolverOptions {
2
+ /**
3
+ * 是否自动导入 vant-go 的聚合样式文件。
4
+ * 默认 true:每次解析到 Vax* 组件时附带 `@gindow/vant-go/style.css` 副作用导入
5
+ * (unplugin-vue-components 会去重,不会重复打包)。
6
+ * 设为 false 时需在应用入口手动 `import '@gindow/vant-go/style.css'`。
7
+ */
8
+ importStyle?: boolean;
9
+ /** 自定义前缀,默认 'Vax' */
10
+ prefix?: string;
11
+ }
12
+ export declare function VantGoResolver(options?: VantGoResolverOptions): {
13
+ type: "component";
14
+ resolve(name: string): {
15
+ name: string;
16
+ from: string;
17
+ sideEffects: string | undefined;
18
+ } | undefined;
19
+ };
@@ -0,0 +1,14 @@
1
+ export interface IModel {
2
+ id?: string | any;
3
+ created_at?: string;
4
+ updated_at?: string;
5
+ deleted_at?: string;
6
+ [property: string]: any;
7
+ }
8
+ export interface IAsset extends IModel {
9
+ id: string;
10
+ type: string;
11
+ title: string;
12
+ url: string;
13
+ shrink: string;
14
+ }
@@ -0,0 +1,13 @@
1
+ export declare class Validate {
2
+ static country: string;
3
+ static set: (country: string) => string;
4
+ static get phone_pattern(): RegExp;
5
+ static email_pattern: RegExp;
6
+ static idcard_pattern: RegExp;
7
+ static cname_pattern: RegExp;
8
+ static password_pattern: RegExp;
9
+ static phone: (str: string) => boolean;
10
+ static email: (str: string) => boolean;
11
+ static idcard: (str: string) => boolean;
12
+ static cname: (str: string) => boolean;
13
+ }
package/package.json CHANGED
@@ -1,23 +1,31 @@
1
1
  {
2
2
  "name": "@gindow/vant-go",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "基于 Vant 的移动端扩展组件库",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
- "main": "./dist/vant-go.cjs",
8
- "types": "./dist/vant-go.d.ts",
7
+ "main": "./dist/@gindow/vant-go.cjs",
8
+ "types": "./dist/src/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./dist/vant-go.d.ts",
12
- "import": "./dist/vant-go.mjs",
13
- "require": "./dist/vant-go.cjs"
11
+ "@source": "./src/index.ts",
12
+ "types": "./dist/src/index.d.ts",
13
+ "import": "./dist/@gindow/vant-go.mjs",
14
+ "require": "./dist/@gindow/vant-go.cjs"
14
15
  },
15
16
  "./resolver": {
16
- "types": "./dist/resolver.d.ts",
17
+ "@source": "./src/resolver.ts",
18
+ "types": "./dist/src/resolver.d.ts",
17
19
  "import": "./dist/resolver.mjs",
18
20
  "require": "./dist/resolver.cjs"
19
21
  },
20
- "./style.css": "./dist/style.css",
22
+ "./styles/index.css": {
23
+ "@source": "./src/styles/index.css",
24
+ "import": "./dist/styles/index.css",
25
+ "require": "./dist/styles/index.css"
26
+ },
27
+ "./styles/arco.css": "./src/styles/arco.css",
28
+ "./styles/purple.css": "./src/styles/purple.css",
21
29
  "./src/*": "./src/*",
22
30
  "./package.json": "./package.json"
23
31
  },
@@ -50,7 +58,7 @@
50
58
  "vant": "^4.9.24",
51
59
  "vite": "^8.1.0",
52
60
  "vite-plugin-dts": "^4.5.4",
53
- "vue": "^3.5.38",
61
+ "vue": "^3.5.39",
54
62
  "vue-router": "^5.1.0",
55
63
  "vue-tsc": "^3.3.5"
56
64
  }
package/src/index.ts CHANGED
@@ -15,6 +15,12 @@ import VaxPage from './components/VaxPage.vue'
15
15
  import VaxSelect from './components/VaxSelect.vue'
16
16
  import VaxTabbar from './components/VaxTabbar.vue'
17
17
  import VaxTabs from './components/VaxTabs.vue'
18
+ // import './styles/index.css'
19
+
20
+ export * from './types'
21
+ export { useMessage } from './hooks/useMessage'
22
+ // export { useNanoid } from './hooks/useNanoid'
23
+ // export { useIcon } from './hooks/useIcon'
18
24
 
19
25
  const components = [
20
26
  VaxAssetPreview,
package/src/resolver.ts CHANGED
@@ -19,7 +19,7 @@ export function VantGoResolver(options: VantGoResolverOptions = {}) {
19
19
  return {
20
20
  name,
21
21
  from: '@gindow/vant-go',
22
- sideEffects: importStyle ? '@gindow/vant-go/style.css' : undefined,
22
+ sideEffects: importStyle ? '@gindow/vant-go/styles/index.css' : undefined,
23
23
  }
24
24
  },
25
25
  }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Arco Design 风格主题 —— 把 Arco 设计令牌映射成 Vant 支持的 CSS 变量(--van-*)。
3
+ *
4
+ * 用法:在应用入口、vant-go 基础样式之后引入即可:
5
+ * import '@gindow/vant-go/styles/arco.css'
6
+ *
7
+ * 说明:
8
+ * - 选择器用 `html:root` / `html.van-theme-dark:root` 提升优先级,确保覆盖 vant-go
9
+ * 基础变量,且不依赖 import 顺序。
10
+ * - 亮色用 Arco 官方调色板原值;暗色用 Arco 暗色面板原值。
11
+ */
12
+
13
+ /* ============ 亮色 ============ */
14
+ html:root {
15
+ /* 主色 arcoblue */
16
+ --van-primary-color: #165dff;
17
+ --van-primary-color-end: #0e42d2;
18
+
19
+ /* 成功 green */
20
+ --van-success-color: #00b42a;
21
+ --van-success-color-end: #009a29;
22
+
23
+ /* 警告 orange */
24
+ --van-warning-color: #ff7d00;
25
+ --van-warning-color-end: #d25f00;
26
+
27
+ /* 危险 red */
28
+ --van-danger-color: #f53f3f;
29
+ --van-danger-color-end: #cb272d;
30
+
31
+ /* 文本色 */
32
+ --van-text-color: #1d2129;
33
+ --van-text-color-2: #4e5969;
34
+ --van-text-color-3: #86909c;
35
+ --van-text-color-asis: inherit;
36
+
37
+ /* 活跃色(主色压暗) */
38
+ --van-active-color: #0e42d2;
39
+
40
+ /* 边框色 */
41
+ --van-border-color: #e5e6eb;
42
+
43
+ /* 背景 */
44
+ --van-background: #f7f8fa;
45
+ --van-background-2: #ffffff;
46
+ --van-background-3: #f2f3f5;
47
+
48
+ /* 灰度色阶(Arco 灰色调色板) */
49
+ --van-gray-1: #f7f8fa;
50
+ --van-gray-2: #f2f3f5;
51
+ --van-gray-3: #e5e6eb;
52
+ --van-gray-4: #c9cdd4;
53
+ --van-gray-5: #a9aeb8;
54
+ --van-gray-6: #86909c;
55
+ --van-gray-7: #4e5969;
56
+ --van-gray-8: #1d2129;
57
+ }
58
+
59
+ /* ============ 暗色(Arco 暗色面板,html.van-theme-dark 时生效) ============ */
60
+ html.van-theme-dark:root {
61
+ /* 背景 */
62
+ --van-background: #232324;
63
+ --van-background-2: #2a2a2b;
64
+ --van-background-3: #17171a;
65
+
66
+ /* 文本 */
67
+ --van-text-color: rgba(255, 255, 255, 0.9);
68
+ --van-text-color-2: rgba(255, 255, 255, 0.7);
69
+ --van-text-color-3: rgba(255, 255, 255, 0.5);
70
+
71
+ /* 边框 */
72
+ --van-border-color: #484849;
73
+
74
+ /* 灰度色阶(暗色背景下的 Arco 中性灰) */
75
+ --van-gray-1: #17171a;
76
+ --van-gray-2: #232324;
77
+ --van-gray-3: #2a2a2b;
78
+ --van-gray-4: #373739;
79
+ --van-gray-5: #484849;
80
+ --van-gray-6: #5f5f60;
81
+ --van-gray-7: #6b6b6c;
82
+ --van-gray-8: #c9cdd4;
83
+
84
+ /* 语义色(暗色下提亮) */
85
+ --van-primary-color: #3c7eff;
86
+ --van-primary-color-end: color-mix(in srgb, #3c7eff 80%, #17171a);
87
+
88
+ --van-success-color: #23c343;
89
+ --van-success-color-end: color-mix(in srgb, #23c343 80%, #17171a);
90
+
91
+ --van-warning-color: #ff9a2e;
92
+ --van-warning-color-end: color-mix(in srgb, #ff9a2e 80%, #17171a);
93
+
94
+ --van-danger-color: #f76560;
95
+ --van-danger-color-end: color-mix(in srgb, #f76560 80%, #17171a);
96
+
97
+ /* 活跃色 */
98
+ --van-active-color: color-mix(in srgb, #3c7eff 80%, #17171a);
99
+ }
@@ -1,5 +1,12 @@
1
+ @import "tailwindcss";
2
+ @import "vant/lib/index.css";
1
3
  @import "@gindow/vue/style.css";
2
4
 
5
+ @source "../";
6
+
7
+ @media screen and (orientation: landscape) { .portrait-only { display: none; } } /* 仅竖屏显示 */
8
+ @media screen and (orientation: portrait) { .landscape-only { display: none; }} /* 仅横屏显示 */
9
+
3
10
  body {
4
11
  font-size: var(--van-font-size-md);
5
12
  color: var(--van-text-color);
@@ -7,21 +14,23 @@ body {
7
14
  }
8
15
 
9
16
  /** 公共样式 */
10
- .bg-primary { background-color: var(--van-primary-color); }
11
17
  .text-primary { color: var(--van-primary-color); }
12
18
  .text-success { color: var(--van-success-color); }
13
19
  .text-warning { color: var(--van-warning-color); }
14
20
  .text-danger { color: var(--van-danger-color); }
21
+ .bg-primary { background-color: var(--van-primary-color); }
22
+ .bg-warning { background-color: var(--van-warning-color); }
23
+ .bg-success { background-color: var(--van-success-color); }
24
+ .bg-danger { background-color: var(--van-danger-color); }
15
25
  .border-primary { border-color: var(--van-primary-color); }
16
26
 
17
- /* Layout */
18
- .buttons { padding: var(--van-padding-xl); }
19
- .buttons > .van-button + .van-button { margin-top: var(--van-padding-md); }
20
- .van-field .captcha { float: right; background: transparent; color: var(--van-primary-color); border: 0; padding: 0 5px; min-width: 45px; height: 24px; }
21
- .van-field .captcha .van-button--disabled { color: #ccc; }
27
+ /* Vant */
28
+ .van-toast { word-break: break-word !important; }
22
29
 
23
- /** 菜单样式 */
24
- .van-cell-group.menu { border: 1px solid var(--van-gray-2); }
30
+ .van-field .captcha, .van-field .btn-captcha { float: right; background: transparent; color: var(--van-primary-color); border: 0; padding: 0 5px; min-width: 45px; height: 24px; }
31
+ .van-field .captcha .van-button--disabled, .van-field .btn-captcha .van-button--disabled { color: #ccc; }
32
+
33
+ .van-cell-group.menu { border: 1px solid var(--van-gray-2); --van-cell-vertical-padding: var(--van-padding-md); }
25
34
  .van-cell-group.menu .van-cell { --van-switch-size: 20px; }
26
35
  .van-cell-group.menu .van-cell > .i-icon { margin-right: var(--van-padding-md); }
27
36
  .van-cell-group--inset + .van-cell-group--inset { margin-top: var(--van-padding-md); }
@@ -33,10 +42,6 @@ body {
33
42
  text-transform: uppercase;
34
43
  }
35
44
 
36
- /* Toast */
37
- .van-toast { word-break: break-word !important; }
38
-
39
- /* Form */
40
45
  .van-field--label-top .van-field__label .van-field__required { color: var(--van-danger-color); }
41
46
  .van-field--label-top .van-field__label {
42
47
  font-size: 11px;
@@ -44,3 +49,7 @@ body {
44
49
  text-transform: uppercase;
45
50
  font-weight: 500;
46
51
  }
52
+
53
+ /* Layout */
54
+ .buttons { padding: var(--van-padding-xl); }
55
+ .buttons > .van-button + .van-button { margin-top: var(--van-padding-md); }
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Purple 风格主题 —— 世界级 SaaS 紫色配色,映射成 Vant 支持的 CSS 变量(--van-*)。
3
+ *
4
+ * 用法:在应用入口、vant-go 基础样式之后引入即可:
5
+ * import '@gindow/vant-go/styles/purple.css'
6
+ *
7
+ * 设计来源(与 element-go/styles/purple.css 同源,移动端一致):
8
+ * - 主色 Tailwind violet-600 #7c3aed(Linear / Stripe / Untitled UI 一脉的高级感紫)。
9
+ * - 语义色用 Tailwind green/amber/red;中性色为带极轻微紫调的 lavender-gray。
10
+ * - 暗色用带紫调的近黑面板(参考 Linear 暗色),语义色提亮,渐变终点用 color-mix 派生。
11
+ *
12
+ * 说明:选择器用 `html:root` / `html.van-theme-dark:root` 提升优先级,确保覆盖 vant-go
13
+ * 基础变量,且不依赖 import 顺序。
14
+ */
15
+
16
+ /* ============ 亮色 ============ */
17
+ html:root {
18
+ /* 主色 violet */
19
+ --van-primary-color: #7c3aed;
20
+ --van-primary-color-end: #6d28d9;
21
+
22
+ /* 成功 green */
23
+ --van-success-color: #16a34a;
24
+ --van-success-color-end: #15803d;
25
+
26
+ /* 警告 amber */
27
+ --van-warning-color: #f59e0b;
28
+ --van-warning-color-end: #d97706;
29
+
30
+ /* 危险 red */
31
+ --van-danger-color: #ef4444;
32
+ --van-danger-color-end: #dc2626;
33
+
34
+ /* 文本色(带极轻微紫调的 lavender-gray) */
35
+ --van-text-color: #1d192b;
36
+ --van-text-color-2: #474357;
37
+ --van-text-color-3: #6b6780;
38
+ --van-text-color-asis: inherit;
39
+
40
+ /* 活跃色(cell 点按高亮 —— 淡紫底,而非灰底) */
41
+ --van-active-color: #f3f1f9;
42
+
43
+ /* 边框色 */
44
+ --van-border-color: #e7e5f0;
45
+
46
+ /* 背景(background 页面 / background-2 卡片悬浮面 / background-3 更深) */
47
+ --van-background: #faf9fd;
48
+ --van-background-2: #ffffff;
49
+ --van-background-3: #f3f1f9;
50
+
51
+ /* 灰度色阶(lavender-gray 调色板) */
52
+ --van-gray-1: #faf9fd;
53
+ --van-gray-2: #f3f1f9;
54
+ --van-gray-3: #e7e5f0;
55
+ --van-gray-4: #d8d5e3;
56
+ --van-gray-5: #9d99ad;
57
+ --van-gray-6: #6b6780;
58
+ --van-gray-7: #474357;
59
+ --van-gray-8: #1d192b;
60
+
61
+ /* 圆角(SaaS 偏大圆角,更现代) */
62
+ --van-radius-sm: 4px;
63
+ --van-radius-md: 8px;
64
+ --van-radius-lg: 12px;
65
+ }
66
+
67
+ /* ============ 暗色(带紫调近黑面板,html.van-theme-dark 时生效) ============ */
68
+ html.dark {
69
+ /* 背景(violet-tinted near-black;background-2 为悬浮面,略亮) */
70
+ --van-background: #15121e;
71
+ --van-background-2: #1c1828;
72
+ --van-background-3: #0d0b14;
73
+
74
+ /* 文本 */
75
+ --van-text-color: rgba(255, 255, 255, 0.92);
76
+ --van-text-color-2: rgba(255, 255, 255, 0.72);
77
+ --van-text-color-3: rgba(255, 255, 255, 0.5);
78
+
79
+ /* 边框 */
80
+ --van-border-color: #332e42;
81
+
82
+ /* 活跃色(暗色点按高亮) */
83
+ --van-active-color: #232030;
84
+
85
+ /* 灰度色阶(暗色背景下的紫调中性灰,由深到浅) */
86
+ --van-gray-1: #0d0b14;
87
+ --van-gray-2: #15121e;
88
+ --van-gray-3: #1c1828;
89
+ --van-gray-4: #232030;
90
+ --van-gray-5: #332e42;
91
+ --van-gray-6: #423d54;
92
+ --van-gray-7: #554f68;
93
+ --van-gray-8: #d8d5e3;
94
+
95
+ /* 语义色(暗色下提亮,渐变终点向暗背景 #0d0b14 混合派生) */
96
+ --van-primary-color: #8b5cf6;
97
+ --van-primary-color-end: color-mix(in srgb, #8b5cf6 80%, #0d0b14);
98
+
99
+ --van-success-color: #22c55e;
100
+ --van-success-color-end: color-mix(in srgb, #22c55e 80%, #0d0b14);
101
+
102
+ --van-warning-color: #fbbf24;
103
+ --van-warning-color-end: color-mix(in srgb, #fbbf24 80%, #0d0b14);
104
+
105
+ --van-danger-color: #f87171;
106
+ --van-danger-color-end: color-mix(in srgb, #f87171 80%, #0d0b14);
107
+ }
@@ -1 +0,0 @@
1
- export { }
package/dist/vant-go.d.ts DELETED
@@ -1 +0,0 @@
1
- export { }
File without changes