@cyberpunk-vue/components 1.13.20 → 1.14.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Cyberpunk Vue Contributors
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cyberpunk Vue Contributors
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.
@@ -5,6 +5,7 @@ import { DurationValue } from '@cyberpunk-vue/hooks';
5
5
  * - `always` - 始终显示阴影(默认)
6
6
  * - `hover` - 仅悬停时显示
7
7
  * - `never` - 不显示阴影
8
+ * @note `variant="outline"` 以描边轮廓为主,外部 hover shadow 不生效。
8
9
  */
9
10
  export type CardShadow = 'always' | 'hover' | 'never';
10
11
  /**
@@ -14,9 +15,8 @@ export type CardShadow = 'always' | 'hover' | 'never';
14
15
  * - `semi` - 半透明背景,支持毛玻璃效果
15
16
  * - `ghost` - 透明背景
16
17
  * - `neon` - 霓虹发光
17
- * - `cyber` - 赛博风格
18
18
  */
19
- export type CardVariant = 'solid' | 'outline' | 'semi' | 'ghost' | 'neon' | 'cyber';
19
+ export type CardVariant = 'solid' | 'outline' | 'semi' | 'ghost' | 'neon';
20
20
  /**
21
21
  * 卡片形状模式
22
22
  * - `clip` - 切角样式(默认,赛博朋克特色)
@@ -114,6 +114,7 @@ export declare const cardProps: {
114
114
  * - `always` - 始终显示
115
115
  * - `hover` - 悬停时显示
116
116
  * - `never` - 不显示
117
+ * @description `variant="outline"` 时外部 hover shadow 无效,仅保留描边状态。
117
118
  * @default 'always'
118
119
  */
119
120
  readonly shadow: {
@@ -24,12 +24,27 @@ export declare const CpConfigProvider: import('../utils').SFCWithInstall<{
24
24
  readonly default: () => {};
25
25
  };
26
26
  readonly theme: {
27
- readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeType>;
27
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeMode>;
28
28
  readonly default: "dark";
29
29
  };
30
+ readonly themeOverrides: {
31
+ readonly type: import('vue').PropType<import('.').ThemeOverrides>;
32
+ readonly default: () => {};
33
+ };
34
+ readonly syncDocument: {
35
+ readonly type: BooleanConstructor;
36
+ readonly default: true;
37
+ };
38
+ readonly tag: {
39
+ readonly type: StringConstructor;
40
+ readonly default: "div";
41
+ };
30
42
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
43
+ readonly tag: string;
31
44
  readonly defaults: import('.').ComponentDefaults;
32
- readonly theme: import('@cyberpunk-vue/constants').ThemeType;
45
+ readonly theme: import('@cyberpunk-vue/constants').ThemeMode;
46
+ readonly themeOverrides: import('.').ThemeOverrides;
47
+ readonly syncDocument: boolean;
33
48
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
34
49
  P: {};
35
50
  B: {};
@@ -43,12 +58,27 @@ export declare const CpConfigProvider: import('../utils').SFCWithInstall<{
43
58
  readonly default: () => {};
44
59
  };
45
60
  readonly theme: {
46
- readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeType>;
61
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeMode>;
47
62
  readonly default: "dark";
48
63
  };
64
+ readonly themeOverrides: {
65
+ readonly type: import('vue').PropType<import('.').ThemeOverrides>;
66
+ readonly default: () => {};
67
+ };
68
+ readonly syncDocument: {
69
+ readonly type: BooleanConstructor;
70
+ readonly default: true;
71
+ };
72
+ readonly tag: {
73
+ readonly type: StringConstructor;
74
+ readonly default: "div";
75
+ };
49
76
  }>> & Readonly<{}>, {}, {}, {}, {}, {
77
+ readonly tag: string;
50
78
  readonly defaults: import('.').ComponentDefaults;
51
- readonly theme: import('@cyberpunk-vue/constants').ThemeType;
79
+ readonly theme: import('@cyberpunk-vue/constants').ThemeMode;
80
+ readonly themeOverrides: import('.').ThemeOverrides;
81
+ readonly syncDocument: boolean;
52
82
  }>;
53
83
  __isFragment?: never;
54
84
  __isTeleport?: never;
@@ -59,12 +89,27 @@ export declare const CpConfigProvider: import('../utils').SFCWithInstall<{
59
89
  readonly default: () => {};
60
90
  };
61
91
  readonly theme: {
62
- readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeType>;
92
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeMode>;
63
93
  readonly default: "dark";
64
94
  };
95
+ readonly themeOverrides: {
96
+ readonly type: import('vue').PropType<import('.').ThemeOverrides>;
97
+ readonly default: () => {};
98
+ };
99
+ readonly syncDocument: {
100
+ readonly type: BooleanConstructor;
101
+ readonly default: true;
102
+ };
103
+ readonly tag: {
104
+ readonly type: StringConstructor;
105
+ readonly default: "div";
106
+ };
65
107
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
108
+ readonly tag: string;
66
109
  readonly defaults: import('.').ComponentDefaults;
67
- readonly theme: import('@cyberpunk-vue/constants').ThemeType;
110
+ readonly theme: import('@cyberpunk-vue/constants').ThemeMode;
111
+ readonly themeOverrides: import('.').ThemeOverrides;
112
+ readonly syncDocument: boolean;
68
113
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
69
114
  $slots: {
70
115
  default?(_: {}): any;
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
- import { ThemeType } from '@cyberpunk-vue/constants';
3
- export type { ThemeType };
2
+ import { ThemeMode, ThemeType } from '@cyberpunk-vue/constants';
3
+ export type { ThemeMode, ThemeType };
4
4
  /**
5
5
  * 组件默认值配置类型
6
6
  *
@@ -16,6 +16,15 @@ export type { ThemeType };
16
16
  * ```
17
17
  */
18
18
  export type ComponentDefaults = Record<string, Record<string, any>>;
19
+ /**
20
+ * 主题变量覆盖配置
21
+ *
22
+ * 键名支持 CSS 变量名或简写 token 名:
23
+ * - `--cp-color-primary`
24
+ * - `color-primary`
25
+ * - `colorPrimary`
26
+ */
27
+ export type ThemeOverrides = Record<string, string | number>;
19
28
  /**
20
29
  * CpConfigProvider 组件 Props 定义
21
30
  *
@@ -77,8 +86,49 @@ export declare const configProviderProps: {
77
86
  * @example `<CpConfigProvider theme="light" />`
78
87
  */
79
88
  readonly theme: {
80
- readonly type: PropType<ThemeType>;
89
+ readonly type: PropType<ThemeMode>;
81
90
  readonly default: "dark";
82
91
  };
92
+ /**
93
+ * 主题 CSS 变量覆盖
94
+ *
95
+ * 用于按作用域覆盖组件库设计 token。传入简写 token 名时会自动转换为
96
+ * `--cp-*` CSS 变量。
97
+ *
98
+ * @default {}
99
+ * @example
100
+ * ```vue
101
+ * <CpConfigProvider :theme-overrides="{ colorPrimary: '#ff6bcb', radiusMd: '10px' }">
102
+ * <App />
103
+ * </CpConfigProvider>
104
+ * ```
105
+ */
106
+ readonly themeOverrides: {
107
+ readonly type: PropType<ThemeOverrides>;
108
+ readonly default: () => {};
109
+ };
110
+ /**
111
+ * 是否同步主题和变量到 document.documentElement
112
+ *
113
+ * 根级 Provider 建议开启,以影响 body 背景等全局样式;局部嵌套 Provider
114
+ * 可以关闭,仅让配置作用于当前插槽子树。
115
+ *
116
+ * @default true
117
+ */
118
+ readonly syncDocument: {
119
+ readonly type: BooleanConstructor;
120
+ readonly default: true;
121
+ };
122
+ /**
123
+ * Provider 渲染标签
124
+ *
125
+ * 默认使用 `div` 并设置 `display: contents`,不会产生额外布局盒。
126
+ *
127
+ * @default 'div'
128
+ */
129
+ readonly tag: {
130
+ readonly type: StringConstructor;
131
+ readonly default: "div";
132
+ };
83
133
  };
84
134
  export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
@@ -13,21 +13,48 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
13
13
  readonly default: () => {};
14
14
  };
15
15
  readonly theme: {
16
- readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeType>;
16
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeMode>;
17
17
  readonly default: "dark";
18
18
  };
19
+ readonly themeOverrides: {
20
+ readonly type: import('vue').PropType<import('./config-provider').ThemeOverrides>;
21
+ readonly default: () => {};
22
+ };
23
+ readonly syncDocument: {
24
+ readonly type: BooleanConstructor;
25
+ readonly default: true;
26
+ };
27
+ readonly tag: {
28
+ readonly type: StringConstructor;
29
+ readonly default: "div";
30
+ };
19
31
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
20
32
  readonly defaults: {
21
33
  readonly type: import('vue').PropType<import('./config-provider').ComponentDefaults>;
22
34
  readonly default: () => {};
23
35
  };
24
36
  readonly theme: {
25
- readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeType>;
37
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/constants').ThemeMode>;
26
38
  readonly default: "dark";
27
39
  };
40
+ readonly themeOverrides: {
41
+ readonly type: import('vue').PropType<import('./config-provider').ThemeOverrides>;
42
+ readonly default: () => {};
43
+ };
44
+ readonly syncDocument: {
45
+ readonly type: BooleanConstructor;
46
+ readonly default: true;
47
+ };
48
+ readonly tag: {
49
+ readonly type: StringConstructor;
50
+ readonly default: "div";
51
+ };
28
52
  }>> & Readonly<{}>, {
53
+ readonly tag: string;
29
54
  readonly defaults: import('./config-provider').ComponentDefaults;
30
- readonly theme: import('@cyberpunk-vue/constants').ThemeType;
55
+ readonly theme: import('@cyberpunk-vue/constants').ThemeMode;
56
+ readonly themeOverrides: import('./config-provider').ThemeOverrides;
57
+ readonly syncDocument: boolean;
31
58
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
32
59
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
60
  export default _default;
@@ -51,9 +51,9 @@ export declare const CpContainer: import('../utils').SFCWithInstall<{
51
51
  readonly direction: import('.').ContainerDirection;
52
52
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
53
53
  $slots: Readonly<{
54
- default?: (props?: any) => any;
54
+ default?: () => import('vue').VNode[];
55
55
  }> & {
56
- default?: (props?: any) => any;
56
+ default?: () => import('vue').VNode[];
57
57
  };
58
58
  })>;
59
59
  export declare const CpHeader: import('../utils').SFCWithInstall<{
@@ -1,9 +1,10 @@
1
+ import { VNode } from 'vue';
1
2
  declare function __VLS_template(): {
2
3
  attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
- default?: (props?: any) => any;
5
+ default?: () => VNode[];
5
6
  }> & {
6
- default?: (props?: any) => any;
7
+ default?: () => VNode[];
7
8
  };
8
9
  refs: {};
9
10
  rootEl: HTMLElement;