@cyberpunk-vue/components 1.13.19 → 1.14.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.
- package/dist/card/src/card.d.ts +2 -0
- package/dist/config-provider/index.d.ts +51 -6
- package/dist/config-provider/src/config-provider.d.ts +53 -3
- package/dist/config-provider/src/config-provider.vue.d.ts +30 -3
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1508 -1358
- package/dist/input-number/index.d.ts +9 -0
- package/dist/input-number/src/input-number.d.ts +15 -0
- package/dist/input-number/src/input-number.vue.d.ts +9 -0
- package/dist/progress/src/progress.d.ts +3 -1
- package/dist/radio/index.d.ts +15 -0
- package/dist/radio/src/radio.d.ts +15 -0
- package/dist/radio/src/radio.vue.d.ts +9 -0
- package/dist/radio-group/index.d.ts +15 -0
- package/dist/radio-group/src/constants.d.ts +2 -1
- package/dist/radio-group/src/radio-group.d.ts +9 -1
- package/dist/radio-group/src/radio-group.vue.d.ts +9 -0
- package/dist/slider/index.d.ts +9 -0
- package/dist/slider/src/slider.d.ts +17 -0
- package/dist/slider/src/slider.vue.d.ts +9 -0
- package/dist/switch/index.d.ts +18 -0
- package/dist/switch/src/switch.d.ts +38 -4
- package/dist/switch/src/switch.vue.d.ts +18 -0
- package/dist/textarea/index.d.ts +9 -0
- package/dist/textarea/src/textarea.d.ts +12 -0
- package/dist/textarea/src/textarea.vue.d.ts +9 -0
- package/package.json +4 -4
|
@@ -35,6 +35,10 @@ export declare const CpInputNumber: import('../utils').SFCWithInstall<import('vu
|
|
|
35
35
|
readonly type: import('vue').PropType<import('.').InputNumberSize>;
|
|
36
36
|
readonly default: "md";
|
|
37
37
|
};
|
|
38
|
+
readonly shape: {
|
|
39
|
+
readonly type: import('vue').PropType<import('.').InputNumberShape>;
|
|
40
|
+
readonly default: "clip";
|
|
41
|
+
};
|
|
38
42
|
readonly disabled: {
|
|
39
43
|
readonly type: BooleanConstructor;
|
|
40
44
|
readonly default: false;
|
|
@@ -105,6 +109,10 @@ export declare const CpInputNumber: import('../utils').SFCWithInstall<import('vu
|
|
|
105
109
|
readonly type: import('vue').PropType<import('.').InputNumberSize>;
|
|
106
110
|
readonly default: "md";
|
|
107
111
|
};
|
|
112
|
+
readonly shape: {
|
|
113
|
+
readonly type: import('vue').PropType<import('.').InputNumberShape>;
|
|
114
|
+
readonly default: "clip";
|
|
115
|
+
};
|
|
108
116
|
readonly disabled: {
|
|
109
117
|
readonly type: BooleanConstructor;
|
|
110
118
|
readonly default: false;
|
|
@@ -139,6 +147,7 @@ export declare const CpInputNumber: import('../utils').SFCWithInstall<import('vu
|
|
|
139
147
|
readonly wheel: boolean;
|
|
140
148
|
readonly color: string;
|
|
141
149
|
readonly disabled: boolean;
|
|
150
|
+
readonly shape: import('.').InputNumberShape;
|
|
142
151
|
readonly placeholder: string;
|
|
143
152
|
readonly modelValue: number;
|
|
144
153
|
readonly readonly: boolean;
|
|
@@ -5,6 +5,13 @@ import { Size } from '@cyberpunk-vue/hooks';
|
|
|
5
5
|
* - 也支持数字 (px) 或带单位字符串 (如 '2rem')
|
|
6
6
|
*/
|
|
7
7
|
export type InputNumberSize = Size;
|
|
8
|
+
/**
|
|
9
|
+
* InputNumber 形状
|
|
10
|
+
* - `clip` - 切角样式(默认,赛博朋克特色)
|
|
11
|
+
* - `no-clip` - 直角矩形
|
|
12
|
+
* - `round` - 圆角矩形
|
|
13
|
+
*/
|
|
14
|
+
export type InputNumberShape = 'clip' | 'no-clip' | 'round';
|
|
8
15
|
/**
|
|
9
16
|
* CpInputNumber 组件 Props 定义
|
|
10
17
|
* @category 表单组件
|
|
@@ -73,6 +80,14 @@ export declare const inputNumberProps: {
|
|
|
73
80
|
readonly type: PropType<InputNumberSize>;
|
|
74
81
|
readonly default: "md";
|
|
75
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* 数字输入框形状
|
|
85
|
+
* @default 'clip'
|
|
86
|
+
*/
|
|
87
|
+
readonly shape: {
|
|
88
|
+
readonly type: PropType<InputNumberShape>;
|
|
89
|
+
readonly default: "clip";
|
|
90
|
+
};
|
|
76
91
|
/** 是否禁用 */
|
|
77
92
|
readonly disabled: {
|
|
78
93
|
readonly type: BooleanConstructor;
|
|
@@ -35,6 +35,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
35
35
|
readonly type: import('vue').PropType<import('./input-number').InputNumberSize>;
|
|
36
36
|
readonly default: "md";
|
|
37
37
|
};
|
|
38
|
+
readonly shape: {
|
|
39
|
+
readonly type: import('vue').PropType<import('./input-number').InputNumberShape>;
|
|
40
|
+
readonly default: "clip";
|
|
41
|
+
};
|
|
38
42
|
readonly disabled: {
|
|
39
43
|
readonly type: BooleanConstructor;
|
|
40
44
|
readonly default: false;
|
|
@@ -105,6 +109,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
105
109
|
readonly type: import('vue').PropType<import('./input-number').InputNumberSize>;
|
|
106
110
|
readonly default: "md";
|
|
107
111
|
};
|
|
112
|
+
readonly shape: {
|
|
113
|
+
readonly type: import('vue').PropType<import('./input-number').InputNumberShape>;
|
|
114
|
+
readonly default: "clip";
|
|
115
|
+
};
|
|
108
116
|
readonly disabled: {
|
|
109
117
|
readonly type: BooleanConstructor;
|
|
110
118
|
readonly default: false;
|
|
@@ -139,6 +147,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
139
147
|
readonly wheel: boolean;
|
|
140
148
|
readonly color: string;
|
|
141
149
|
readonly disabled: boolean;
|
|
150
|
+
readonly shape: import('./input-number').InputNumberShape;
|
|
142
151
|
readonly placeholder: string;
|
|
143
152
|
readonly modelValue: number;
|
|
144
153
|
readonly readonly: boolean;
|
|
@@ -19,11 +19,13 @@ export type ProgressType = 'line' | 'circle' | 'dashboard';
|
|
|
19
19
|
export type ProgressSize = Size | 'xl' | 'xxl';
|
|
20
20
|
/**
|
|
21
21
|
* 进度条状态
|
|
22
|
+
* - `primary` - 主色调
|
|
22
23
|
* - `success` - 成功状态(绿色)
|
|
23
24
|
* - `warning` - 警告状态(黄色)
|
|
24
25
|
* - `error` - 错误状态(红色)
|
|
26
|
+
* - `info` - 信息状态(紫色)
|
|
25
27
|
*/
|
|
26
|
-
export type ProgressStatus = 'success' | 'warning' | 'error';
|
|
28
|
+
export type ProgressStatus = 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
27
29
|
/**
|
|
28
30
|
* 进度条线端样式
|
|
29
31
|
* - `round` - 圆形端点(默认)
|
package/dist/radio/index.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export declare const CpRadio: import('../utils').SFCWithInstall<{
|
|
|
36
36
|
readonly type: import('vue').PropType<import('.').RadioType>;
|
|
37
37
|
readonly default: "primary";
|
|
38
38
|
};
|
|
39
|
+
readonly shape: {
|
|
40
|
+
readonly type: import('vue').PropType<import('.').RadioShape>;
|
|
41
|
+
readonly default: "clip";
|
|
42
|
+
};
|
|
39
43
|
readonly color: {
|
|
40
44
|
readonly type: StringConstructor;
|
|
41
45
|
readonly default: "";
|
|
@@ -72,6 +76,7 @@ export declare const CpRadio: import('../utils').SFCWithInstall<{
|
|
|
72
76
|
readonly type: import('.').RadioType;
|
|
73
77
|
readonly color: string;
|
|
74
78
|
readonly disabled: boolean;
|
|
79
|
+
readonly shape: import('.').RadioShape;
|
|
75
80
|
readonly label: string | number;
|
|
76
81
|
readonly modelValue: import('.').RadioValueType;
|
|
77
82
|
readonly border: boolean;
|
|
@@ -111,6 +116,10 @@ export declare const CpRadio: import('../utils').SFCWithInstall<{
|
|
|
111
116
|
readonly type: import('vue').PropType<import('.').RadioType>;
|
|
112
117
|
readonly default: "primary";
|
|
113
118
|
};
|
|
119
|
+
readonly shape: {
|
|
120
|
+
readonly type: import('vue').PropType<import('.').RadioShape>;
|
|
121
|
+
readonly default: "clip";
|
|
122
|
+
};
|
|
114
123
|
readonly color: {
|
|
115
124
|
readonly type: StringConstructor;
|
|
116
125
|
readonly default: "";
|
|
@@ -144,6 +153,7 @@ export declare const CpRadio: import('../utils').SFCWithInstall<{
|
|
|
144
153
|
readonly type: import('.').RadioType;
|
|
145
154
|
readonly color: string;
|
|
146
155
|
readonly disabled: boolean;
|
|
156
|
+
readonly shape: import('.').RadioShape;
|
|
147
157
|
readonly label: string | number;
|
|
148
158
|
readonly modelValue: import('.').RadioValueType;
|
|
149
159
|
readonly border: boolean;
|
|
@@ -178,6 +188,10 @@ export declare const CpRadio: import('../utils').SFCWithInstall<{
|
|
|
178
188
|
readonly type: import('vue').PropType<import('.').RadioType>;
|
|
179
189
|
readonly default: "primary";
|
|
180
190
|
};
|
|
191
|
+
readonly shape: {
|
|
192
|
+
readonly type: import('vue').PropType<import('.').RadioShape>;
|
|
193
|
+
readonly default: "clip";
|
|
194
|
+
};
|
|
181
195
|
readonly color: {
|
|
182
196
|
readonly type: StringConstructor;
|
|
183
197
|
readonly default: "";
|
|
@@ -214,6 +228,7 @@ export declare const CpRadio: import('../utils').SFCWithInstall<{
|
|
|
214
228
|
readonly type: import('.').RadioType;
|
|
215
229
|
readonly color: string;
|
|
216
230
|
readonly disabled: boolean;
|
|
231
|
+
readonly shape: import('.').RadioShape;
|
|
217
232
|
readonly label: string | number;
|
|
218
233
|
readonly modelValue: import('.').RadioValueType;
|
|
219
234
|
readonly border: boolean;
|
|
@@ -17,6 +17,13 @@ export type RadioSize = Size;
|
|
|
17
17
|
* - `info` - 信息 (紫罗兰)
|
|
18
18
|
*/
|
|
19
19
|
export type RadioType = 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
20
|
+
/**
|
|
21
|
+
* 单选框形状
|
|
22
|
+
* - `clip` - 切角/八边形样式(默认,赛博朋克特色)
|
|
23
|
+
* - `no-clip` - 直角矩形
|
|
24
|
+
* - `round` - 圆角矩形
|
|
25
|
+
*/
|
|
26
|
+
export type RadioShape = 'clip' | 'no-clip' | 'round';
|
|
20
27
|
/**
|
|
21
28
|
* 单选框值类型
|
|
22
29
|
*/
|
|
@@ -88,6 +95,14 @@ export declare const radioProps: {
|
|
|
88
95
|
readonly type: PropType<RadioType>;
|
|
89
96
|
readonly default: "primary";
|
|
90
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* 单选框形状
|
|
100
|
+
* @default 'clip'
|
|
101
|
+
*/
|
|
102
|
+
readonly shape: {
|
|
103
|
+
readonly type: PropType<RadioShape>;
|
|
104
|
+
readonly default: "clip";
|
|
105
|
+
};
|
|
91
106
|
/**
|
|
92
107
|
* 自定义选中颜色
|
|
93
108
|
* 优先级高于 type
|
|
@@ -35,6 +35,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
35
35
|
readonly type: import('vue').PropType<import('./radio').RadioType>;
|
|
36
36
|
readonly default: "primary";
|
|
37
37
|
};
|
|
38
|
+
readonly shape: {
|
|
39
|
+
readonly type: import('vue').PropType<import('./radio').RadioShape>;
|
|
40
|
+
readonly default: "clip";
|
|
41
|
+
};
|
|
38
42
|
readonly color: {
|
|
39
43
|
readonly type: StringConstructor;
|
|
40
44
|
readonly default: "";
|
|
@@ -88,6 +92,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
88
92
|
readonly type: import('vue').PropType<import('./radio').RadioType>;
|
|
89
93
|
readonly default: "primary";
|
|
90
94
|
};
|
|
95
|
+
readonly shape: {
|
|
96
|
+
readonly type: import('vue').PropType<import('./radio').RadioShape>;
|
|
97
|
+
readonly default: "clip";
|
|
98
|
+
};
|
|
91
99
|
readonly color: {
|
|
92
100
|
readonly type: StringConstructor;
|
|
93
101
|
readonly default: "";
|
|
@@ -118,6 +126,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
118
126
|
readonly type: import('./radio').RadioType;
|
|
119
127
|
readonly color: string;
|
|
120
128
|
readonly disabled: boolean;
|
|
129
|
+
readonly shape: import('./radio').RadioShape;
|
|
121
130
|
readonly label: string | number;
|
|
122
131
|
readonly modelValue: RadioValueType;
|
|
123
132
|
readonly border: boolean;
|
|
@@ -31,6 +31,10 @@ export declare const CpRadioGroup: import('../utils').SFCWithInstall<{
|
|
|
31
31
|
readonly type: import('vue').PropType<import('..').RadioType>;
|
|
32
32
|
readonly default: "primary";
|
|
33
33
|
};
|
|
34
|
+
readonly shape: {
|
|
35
|
+
readonly type: import('vue').PropType<import('..').RadioShape>;
|
|
36
|
+
readonly default: "clip";
|
|
37
|
+
};
|
|
34
38
|
readonly direction: {
|
|
35
39
|
readonly type: import('vue').PropType<"horizontal" | "vertical">;
|
|
36
40
|
readonly default: "horizontal";
|
|
@@ -47,6 +51,7 @@ export declare const CpRadioGroup: import('../utils').SFCWithInstall<{
|
|
|
47
51
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
48
52
|
readonly type: import('..').RadioType;
|
|
49
53
|
readonly disabled: boolean;
|
|
54
|
+
readonly shape: import('..').RadioShape;
|
|
50
55
|
readonly modelValue: import('..').RadioValueType;
|
|
51
56
|
readonly direction: "vertical" | "horizontal";
|
|
52
57
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
@@ -73,6 +78,10 @@ export declare const CpRadioGroup: import('../utils').SFCWithInstall<{
|
|
|
73
78
|
readonly type: import('vue').PropType<import('..').RadioType>;
|
|
74
79
|
readonly default: "primary";
|
|
75
80
|
};
|
|
81
|
+
readonly shape: {
|
|
82
|
+
readonly type: import('vue').PropType<import('..').RadioShape>;
|
|
83
|
+
readonly default: "clip";
|
|
84
|
+
};
|
|
76
85
|
readonly direction: {
|
|
77
86
|
readonly type: import('vue').PropType<"horizontal" | "vertical">;
|
|
78
87
|
readonly default: "horizontal";
|
|
@@ -86,6 +95,7 @@ export declare const CpRadioGroup: import('../utils').SFCWithInstall<{
|
|
|
86
95
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
87
96
|
readonly type: import('..').RadioType;
|
|
88
97
|
readonly disabled: boolean;
|
|
98
|
+
readonly shape: import('..').RadioShape;
|
|
89
99
|
readonly modelValue: import('..').RadioValueType;
|
|
90
100
|
readonly direction: "vertical" | "horizontal";
|
|
91
101
|
}>;
|
|
@@ -109,6 +119,10 @@ export declare const CpRadioGroup: import('../utils').SFCWithInstall<{
|
|
|
109
119
|
readonly type: import('vue').PropType<import('..').RadioType>;
|
|
110
120
|
readonly default: "primary";
|
|
111
121
|
};
|
|
122
|
+
readonly shape: {
|
|
123
|
+
readonly type: import('vue').PropType<import('..').RadioShape>;
|
|
124
|
+
readonly default: "clip";
|
|
125
|
+
};
|
|
112
126
|
readonly direction: {
|
|
113
127
|
readonly type: import('vue').PropType<"horizontal" | "vertical">;
|
|
114
128
|
readonly default: "horizontal";
|
|
@@ -125,6 +139,7 @@ export declare const CpRadioGroup: import('../utils').SFCWithInstall<{
|
|
|
125
139
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
126
140
|
readonly type: import('..').RadioType;
|
|
127
141
|
readonly disabled: boolean;
|
|
142
|
+
readonly shape: import('..').RadioShape;
|
|
128
143
|
readonly modelValue: import('..').RadioValueType;
|
|
129
144
|
readonly direction: "vertical" | "horizontal";
|
|
130
145
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
import { RadioValueType, RadioType, RadioSize } from '../../radio/src/radio';
|
|
2
|
+
import { RadioValueType, RadioType, RadioSize, RadioShape } from '../../radio/src/radio';
|
|
3
3
|
export interface RadioGroupContext {
|
|
4
4
|
modelValue: Ref<RadioValueType | undefined>;
|
|
5
5
|
disabled: Ref<boolean>;
|
|
6
6
|
size: Ref<RadioSize>;
|
|
7
7
|
type: Ref<RadioType>;
|
|
8
|
+
shape: Ref<RadioShape>;
|
|
8
9
|
handleChange: (value: RadioValueType) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const radioGroupContextKey: InjectionKey<RadioGroupContext>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { Size } from '@cyberpunk-vue/hooks';
|
|
3
|
-
import { RadioValueType, RadioType } from '../../radio/src/radio';
|
|
3
|
+
import { RadioValueType, RadioType, RadioShape } from '../../radio/src/radio';
|
|
4
4
|
/**
|
|
5
5
|
* CpRadioGroup 组件 Props 定义
|
|
6
6
|
*
|
|
@@ -49,6 +49,14 @@ export declare const radioGroupProps: {
|
|
|
49
49
|
readonly type: PropType<RadioType>;
|
|
50
50
|
readonly default: "primary";
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* 子单选框形状
|
|
54
|
+
* @default 'clip'
|
|
55
|
+
*/
|
|
56
|
+
readonly shape: {
|
|
57
|
+
readonly type: PropType<RadioShape>;
|
|
58
|
+
readonly default: "clip";
|
|
59
|
+
};
|
|
52
60
|
/**
|
|
53
61
|
* 布局方向
|
|
54
62
|
* @default 'horizontal'
|
|
@@ -25,6 +25,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
25
25
|
readonly type: import('vue').PropType<import('../../radio/src/radio').RadioType>;
|
|
26
26
|
readonly default: "primary";
|
|
27
27
|
};
|
|
28
|
+
readonly shape: {
|
|
29
|
+
readonly type: import('vue').PropType<import('../../radio/src/radio').RadioShape>;
|
|
30
|
+
readonly default: "clip";
|
|
31
|
+
};
|
|
28
32
|
readonly direction: {
|
|
29
33
|
readonly type: import('vue').PropType<"horizontal" | "vertical">;
|
|
30
34
|
readonly default: "horizontal";
|
|
@@ -52,6 +56,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
52
56
|
readonly type: import('vue').PropType<import('../../radio/src/radio').RadioType>;
|
|
53
57
|
readonly default: "primary";
|
|
54
58
|
};
|
|
59
|
+
readonly shape: {
|
|
60
|
+
readonly type: import('vue').PropType<import('../../radio/src/radio').RadioShape>;
|
|
61
|
+
readonly default: "clip";
|
|
62
|
+
};
|
|
55
63
|
readonly direction: {
|
|
56
64
|
readonly type: import('vue').PropType<"horizontal" | "vertical">;
|
|
57
65
|
readonly default: "horizontal";
|
|
@@ -63,6 +71,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
63
71
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
64
72
|
readonly type: import('../../radio/src/radio').RadioType;
|
|
65
73
|
readonly disabled: boolean;
|
|
74
|
+
readonly shape: import('../../radio/src/radio').RadioShape;
|
|
66
75
|
readonly modelValue: RadioValueType;
|
|
67
76
|
readonly direction: "vertical" | "horizontal";
|
|
68
77
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
package/dist/slider/index.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export declare const CpSlider: import('../utils').SFCWithInstall<import('vue').D
|
|
|
33
33
|
readonly type: import('vue').PropType<import('.').SliderSize>;
|
|
34
34
|
readonly default: "md";
|
|
35
35
|
};
|
|
36
|
+
readonly type: {
|
|
37
|
+
readonly type: import('vue').PropType<import('.').SliderType>;
|
|
38
|
+
readonly default: "primary";
|
|
39
|
+
};
|
|
36
40
|
readonly shape: {
|
|
37
41
|
readonly type: import('vue').PropType<import('.').SliderShape>;
|
|
38
42
|
readonly default: "clip";
|
|
@@ -100,6 +104,10 @@ export declare const CpSlider: import('../utils').SFCWithInstall<import('vue').D
|
|
|
100
104
|
readonly type: import('vue').PropType<import('.').SliderSize>;
|
|
101
105
|
readonly default: "md";
|
|
102
106
|
};
|
|
107
|
+
readonly type: {
|
|
108
|
+
readonly type: import('vue').PropType<import('.').SliderType>;
|
|
109
|
+
readonly default: "primary";
|
|
110
|
+
};
|
|
103
111
|
readonly shape: {
|
|
104
112
|
readonly type: import('vue').PropType<import('.').SliderShape>;
|
|
105
113
|
readonly default: "clip";
|
|
@@ -147,6 +155,7 @@ export declare const CpSlider: import('../utils').SFCWithInstall<import('vue').D
|
|
|
147
155
|
}>, {
|
|
148
156
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
149
157
|
readonly height: string;
|
|
158
|
+
readonly type: import('.').SliderType;
|
|
150
159
|
readonly color: string;
|
|
151
160
|
readonly disabled: boolean;
|
|
152
161
|
readonly shape: import('.').SliderShape;
|
|
@@ -8,6 +8,15 @@ import { Size } from '@cyberpunk-vue/hooks';
|
|
|
8
8
|
* - 也支持数字 (px) 或带单位字符串 (如 '2rem')
|
|
9
9
|
*/
|
|
10
10
|
export type SliderSize = Size;
|
|
11
|
+
/**
|
|
12
|
+
* 滑块类型(颜色预设)
|
|
13
|
+
* - `primary` - 主色调
|
|
14
|
+
* - `success` - 成功
|
|
15
|
+
* - `warning` - 警告
|
|
16
|
+
* - `error` - 错误/危险
|
|
17
|
+
* - `info` - 信息
|
|
18
|
+
*/
|
|
19
|
+
export type SliderType = 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
11
20
|
/**
|
|
12
21
|
* 滑块形状
|
|
13
22
|
* - `clip` - 切角样式(默认,赛博朋克特色)
|
|
@@ -89,6 +98,14 @@ export declare const sliderProps: {
|
|
|
89
98
|
readonly type: PropType<SliderSize>;
|
|
90
99
|
readonly default: "md";
|
|
91
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* 滑块类型(颜色预设)
|
|
103
|
+
* @default 'primary'
|
|
104
|
+
*/
|
|
105
|
+
readonly type: {
|
|
106
|
+
readonly type: PropType<SliderType>;
|
|
107
|
+
readonly default: "primary";
|
|
108
|
+
};
|
|
92
109
|
/**
|
|
93
110
|
* 滑块形状
|
|
94
111
|
* - `clip` - 切角样式(赛博朋克特色)
|
|
@@ -19,6 +19,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
19
19
|
readonly type: import('vue').PropType<import('./slider').SliderSize>;
|
|
20
20
|
readonly default: "md";
|
|
21
21
|
};
|
|
22
|
+
readonly type: {
|
|
23
|
+
readonly type: import('vue').PropType<import('./slider').SliderType>;
|
|
24
|
+
readonly default: "primary";
|
|
25
|
+
};
|
|
22
26
|
readonly shape: {
|
|
23
27
|
readonly type: import('vue').PropType<import('./slider').SliderShape>;
|
|
24
28
|
readonly default: "clip";
|
|
@@ -86,6 +90,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
86
90
|
readonly type: import('vue').PropType<import('./slider').SliderSize>;
|
|
87
91
|
readonly default: "md";
|
|
88
92
|
};
|
|
93
|
+
readonly type: {
|
|
94
|
+
readonly type: import('vue').PropType<import('./slider').SliderType>;
|
|
95
|
+
readonly default: "primary";
|
|
96
|
+
};
|
|
89
97
|
readonly shape: {
|
|
90
98
|
readonly type: import('vue').PropType<import('./slider').SliderShape>;
|
|
91
99
|
readonly default: "clip";
|
|
@@ -133,6 +141,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
133
141
|
}>, {
|
|
134
142
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
135
143
|
readonly height: string;
|
|
144
|
+
readonly type: import('./slider').SliderType;
|
|
136
145
|
readonly color: string;
|
|
137
146
|
readonly disabled: boolean;
|
|
138
147
|
readonly shape: import('./slider').SliderShape;
|
package/dist/switch/index.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export declare const CpSwitch: import('../utils').SFCWithInstall<import('vue').D
|
|
|
24
24
|
readonly type: import('vue').PropType<import('.').SwitchType>;
|
|
25
25
|
readonly default: "primary";
|
|
26
26
|
};
|
|
27
|
+
readonly shape: {
|
|
28
|
+
readonly type: import('vue').PropType<import('.').SwitchShape>;
|
|
29
|
+
readonly default: "clip";
|
|
30
|
+
};
|
|
27
31
|
readonly disabled: {
|
|
28
32
|
readonly type: BooleanConstructor;
|
|
29
33
|
readonly default: false;
|
|
@@ -48,6 +52,10 @@ export declare const CpSwitch: import('../utils').SFCWithInstall<import('vue').D
|
|
|
48
52
|
readonly type: BooleanConstructor;
|
|
49
53
|
readonly default: false;
|
|
50
54
|
};
|
|
55
|
+
readonly textPosition: {
|
|
56
|
+
readonly type: import('vue').PropType<import('.').SwitchTextPosition>;
|
|
57
|
+
readonly default: "right";
|
|
58
|
+
};
|
|
51
59
|
readonly activeText: {
|
|
52
60
|
readonly type: StringConstructor;
|
|
53
61
|
readonly default: "";
|
|
@@ -82,6 +90,10 @@ export declare const CpSwitch: import('../utils').SFCWithInstall<import('vue').D
|
|
|
82
90
|
readonly type: import('vue').PropType<import('.').SwitchType>;
|
|
83
91
|
readonly default: "primary";
|
|
84
92
|
};
|
|
93
|
+
readonly shape: {
|
|
94
|
+
readonly type: import('vue').PropType<import('.').SwitchShape>;
|
|
95
|
+
readonly default: "clip";
|
|
96
|
+
};
|
|
85
97
|
readonly disabled: {
|
|
86
98
|
readonly type: BooleanConstructor;
|
|
87
99
|
readonly default: false;
|
|
@@ -106,6 +118,10 @@ export declare const CpSwitch: import('../utils').SFCWithInstall<import('vue').D
|
|
|
106
118
|
readonly type: BooleanConstructor;
|
|
107
119
|
readonly default: false;
|
|
108
120
|
};
|
|
121
|
+
readonly textPosition: {
|
|
122
|
+
readonly type: import('vue').PropType<import('.').SwitchTextPosition>;
|
|
123
|
+
readonly default: "right";
|
|
124
|
+
};
|
|
109
125
|
readonly activeText: {
|
|
110
126
|
readonly type: StringConstructor;
|
|
111
127
|
readonly default: "";
|
|
@@ -133,9 +149,11 @@ export declare const CpSwitch: import('../utils').SFCWithInstall<import('vue').D
|
|
|
133
149
|
readonly color: string;
|
|
134
150
|
readonly disabled: boolean;
|
|
135
151
|
readonly loading: boolean;
|
|
152
|
+
readonly shape: import('.').SwitchShape;
|
|
136
153
|
readonly modelValue: boolean;
|
|
137
154
|
readonly inactiveColor: string;
|
|
138
155
|
readonly fitText: boolean;
|
|
156
|
+
readonly textPosition: import('.').SwitchTextPosition;
|
|
139
157
|
readonly activeText: string;
|
|
140
158
|
readonly inactiveText: string;
|
|
141
159
|
readonly beforeChange: () => Promise<boolean> | boolean;
|
|
@@ -17,19 +17,36 @@ export type SwitchSize = Size;
|
|
|
17
17
|
* - `info` - 信息 (紫罗兰)
|
|
18
18
|
*/
|
|
19
19
|
export type SwitchType = 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
20
|
+
/**
|
|
21
|
+
* 开关形状
|
|
22
|
+
* - `clip` - 切角样式(默认,赛博朋克特色)
|
|
23
|
+
* - `no-clip` - 直角矩形
|
|
24
|
+
* - `round` - 圆角胶囊
|
|
25
|
+
*/
|
|
26
|
+
export type SwitchShape = 'clip' | 'no-clip' | 'round';
|
|
27
|
+
/**
|
|
28
|
+
* 开关文字显示位置
|
|
29
|
+
* - `left` - 显示在开关左侧
|
|
30
|
+
* - `right` - 显示在开关右侧,默认
|
|
31
|
+
* - `inner` - 显示在开关内部
|
|
32
|
+
*/
|
|
33
|
+
export type SwitchTextPosition = 'left' | 'right' | 'inner';
|
|
20
34
|
/**
|
|
21
35
|
* CpSwitch 组件 Props 定义
|
|
22
36
|
*
|
|
23
|
-
* @description
|
|
37
|
+
* @description 赛博朋克风格开关组件,支持异步切换、文字位置、自定义颜色。
|
|
24
38
|
*
|
|
25
39
|
* @example
|
|
26
40
|
* ```vue
|
|
27
41
|
* <!-- 基础用法 -->
|
|
28
42
|
* <CpSwitch v-model="enabled" />
|
|
29
43
|
*
|
|
30
|
-
* <!--
|
|
44
|
+
* <!-- 右侧状态文字 -->
|
|
31
45
|
* <CpSwitch v-model="enabled" active-text="ON" inactive-text="OFF" />
|
|
32
46
|
*
|
|
47
|
+
* <!-- 内嵌文字 -->
|
|
48
|
+
* <CpSwitch v-model="enabled" text-position="inner" active-text="ON" inactive-text="OFF" />
|
|
49
|
+
*
|
|
33
50
|
* <!-- 异步切换 -->
|
|
34
51
|
* <CpSwitch v-model="enabled" :before-change="handleConfirm" />
|
|
35
52
|
* ```
|
|
@@ -67,6 +84,14 @@ export declare const switchProps: {
|
|
|
67
84
|
readonly type: PropType<SwitchType>;
|
|
68
85
|
readonly default: "primary";
|
|
69
86
|
};
|
|
87
|
+
/**
|
|
88
|
+
* 开关形状
|
|
89
|
+
* @default 'clip'
|
|
90
|
+
*/
|
|
91
|
+
readonly shape: {
|
|
92
|
+
readonly type: PropType<SwitchShape>;
|
|
93
|
+
readonly default: "clip";
|
|
94
|
+
};
|
|
70
95
|
/**
|
|
71
96
|
* 是否禁用开关
|
|
72
97
|
* 禁用后不可切换,样式变为灰色
|
|
@@ -123,7 +148,16 @@ export declare const switchProps: {
|
|
|
123
148
|
readonly default: false;
|
|
124
149
|
};
|
|
125
150
|
/**
|
|
126
|
-
*
|
|
151
|
+
* 文字显示位置
|
|
152
|
+
* @default 'right'
|
|
153
|
+
* @example `<CpSwitch text-position="left" active-text="ON" inactive-text="OFF" />`
|
|
154
|
+
*/
|
|
155
|
+
readonly textPosition: {
|
|
156
|
+
readonly type: PropType<SwitchTextPosition>;
|
|
157
|
+
readonly default: "right";
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* 选中时显示的文字
|
|
127
161
|
* @default ''
|
|
128
162
|
* @example `<CpSwitch active-text="ON" />`
|
|
129
163
|
*/
|
|
@@ -132,7 +166,7 @@ export declare const switchProps: {
|
|
|
132
166
|
readonly default: "";
|
|
133
167
|
};
|
|
134
168
|
/**
|
|
135
|
-
*
|
|
169
|
+
* 未选中时显示的文字
|
|
136
170
|
* @default ''
|
|
137
171
|
* @example `<CpSwitch inactive-text="OFF" />`
|
|
138
172
|
*/
|
|
@@ -11,6 +11,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
11
11
|
readonly type: import('vue').PropType<import('./switch').SwitchType>;
|
|
12
12
|
readonly default: "primary";
|
|
13
13
|
};
|
|
14
|
+
readonly shape: {
|
|
15
|
+
readonly type: import('vue').PropType<import('./switch').SwitchShape>;
|
|
16
|
+
readonly default: "clip";
|
|
17
|
+
};
|
|
14
18
|
readonly disabled: {
|
|
15
19
|
readonly type: BooleanConstructor;
|
|
16
20
|
readonly default: false;
|
|
@@ -35,6 +39,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
35
39
|
readonly type: BooleanConstructor;
|
|
36
40
|
readonly default: false;
|
|
37
41
|
};
|
|
42
|
+
readonly textPosition: {
|
|
43
|
+
readonly type: import('vue').PropType<import('./switch').SwitchTextPosition>;
|
|
44
|
+
readonly default: "right";
|
|
45
|
+
};
|
|
38
46
|
readonly activeText: {
|
|
39
47
|
readonly type: StringConstructor;
|
|
40
48
|
readonly default: "";
|
|
@@ -69,6 +77,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
69
77
|
readonly type: import('vue').PropType<import('./switch').SwitchType>;
|
|
70
78
|
readonly default: "primary";
|
|
71
79
|
};
|
|
80
|
+
readonly shape: {
|
|
81
|
+
readonly type: import('vue').PropType<import('./switch').SwitchShape>;
|
|
82
|
+
readonly default: "clip";
|
|
83
|
+
};
|
|
72
84
|
readonly disabled: {
|
|
73
85
|
readonly type: BooleanConstructor;
|
|
74
86
|
readonly default: false;
|
|
@@ -93,6 +105,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
93
105
|
readonly type: BooleanConstructor;
|
|
94
106
|
readonly default: false;
|
|
95
107
|
};
|
|
108
|
+
readonly textPosition: {
|
|
109
|
+
readonly type: import('vue').PropType<import('./switch').SwitchTextPosition>;
|
|
110
|
+
readonly default: "right";
|
|
111
|
+
};
|
|
96
112
|
readonly activeText: {
|
|
97
113
|
readonly type: StringConstructor;
|
|
98
114
|
readonly default: "";
|
|
@@ -120,9 +136,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
120
136
|
readonly color: string;
|
|
121
137
|
readonly disabled: boolean;
|
|
122
138
|
readonly loading: boolean;
|
|
139
|
+
readonly shape: import('./switch').SwitchShape;
|
|
123
140
|
readonly modelValue: boolean;
|
|
124
141
|
readonly inactiveColor: string;
|
|
125
142
|
readonly fitText: boolean;
|
|
143
|
+
readonly textPosition: import('./switch').SwitchTextPosition;
|
|
126
144
|
readonly activeText: string;
|
|
127
145
|
readonly inactiveText: string;
|
|
128
146
|
readonly beforeChange: () => Promise<boolean> | boolean;
|
package/dist/textarea/index.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export declare const CpTextarea: import('../utils').SFCWithInstall<import('vue')
|
|
|
11
11
|
readonly type: import('vue').PropType<import('.').TextareaSize>;
|
|
12
12
|
readonly default: "md";
|
|
13
13
|
};
|
|
14
|
+
readonly shape: {
|
|
15
|
+
readonly type: import('vue').PropType<import('.').TextareaShape>;
|
|
16
|
+
readonly default: "clip";
|
|
17
|
+
};
|
|
14
18
|
readonly variant: {
|
|
15
19
|
readonly type: import('vue').PropType<import('.').TextareaVariant>;
|
|
16
20
|
readonly default: "outline";
|
|
@@ -73,6 +77,10 @@ export declare const CpTextarea: import('../utils').SFCWithInstall<import('vue')
|
|
|
73
77
|
readonly type: import('vue').PropType<import('.').TextareaSize>;
|
|
74
78
|
readonly default: "md";
|
|
75
79
|
};
|
|
80
|
+
readonly shape: {
|
|
81
|
+
readonly type: import('vue').PropType<import('.').TextareaShape>;
|
|
82
|
+
readonly default: "clip";
|
|
83
|
+
};
|
|
76
84
|
readonly variant: {
|
|
77
85
|
readonly type: import('vue').PropType<import('.').TextareaVariant>;
|
|
78
86
|
readonly default: "outline";
|
|
@@ -123,6 +131,7 @@ export declare const CpTextarea: import('../utils').SFCWithInstall<import('vue')
|
|
|
123
131
|
readonly color: string;
|
|
124
132
|
readonly variant: import('.').TextareaVariant;
|
|
125
133
|
readonly disabled: boolean;
|
|
134
|
+
readonly shape: import('.').TextareaShape;
|
|
126
135
|
readonly textColor: string;
|
|
127
136
|
readonly placeholder: string;
|
|
128
137
|
readonly modelValue: string;
|