kui-vue 6.3.1 → 6.5.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/ai/kui-components.json +619 -37
- package/dist/index.js +2 -2
- package/es/index.js +1575 -647
- package/es/locale/de.js +2 -3
- package/es/locale/el.js +2 -3
- package/es/locale/en.js +2 -3
- package/es/locale/fr.js +2 -3
- package/es/locale/it.js +2 -3
- package/es/locale/ja.js +2 -3
- package/es/locale/ko.js +2 -3
- package/es/locale/ru.js +2 -3
- package/es/locale/th.js +2 -3
- package/es/locale/uk.js +2 -3
- package/es/locale/vi.js +2 -3
- package/es/locale/zh-CN.js +2 -3
- package/es/locale/zh-TW.js +2 -3
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +1 -1
- package/lib/locale/el.cjs +1 -1
- package/lib/locale/en.cjs +1 -1
- package/lib/locale/fr.cjs +1 -1
- package/lib/locale/it.cjs +1 -1
- package/lib/locale/ja.cjs +1 -1
- package/lib/locale/ko.cjs +1 -1
- package/lib/locale/ru.cjs +1 -1
- package/lib/locale/th.cjs +1 -1
- package/lib/locale/uk.cjs +1 -1
- package/lib/locale/vi.cjs +1 -1
- package/lib/locale/zh-CN.cjs +1 -1
- package/lib/locale/zh-TW.cjs +1 -1
- package/package.json +22 -22
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/motion.css +1 -1
- package/style/theme.css +1 -1
- package/types/color-picker/index.d.cts +5 -0
- package/types/color-picker/index.d.ts +5 -0
- package/types/components.d.cts +3 -0
- package/types/components.d.ts +3 -0
- package/types/global.d.cts +16 -0
- package/types/global.d.ts +16 -0
- package/types/gradient-picker/corners.d.cts +39 -0
- package/types/gradient-picker/corners.d.ts +39 -0
- package/types/gradient-picker/index.d.cts +87 -0
- package/types/gradient-picker/index.d.ts +87 -0
- package/types/gradient-picker/stops.d.cts +39 -0
- package/types/gradient-picker/stops.d.ts +39 -0
- package/types/gradient-picker/types.d.cts +34 -0
- package/types/gradient-picker/types.d.ts +34 -0
- package/types/input-number/drag.d.cts +9 -0
- package/types/input-number/drag.d.ts +9 -0
- package/types/input-number/index.d.cts +13 -0
- package/types/input-number/index.d.ts +13 -0
- package/types/menu/menu-context.d.cts +1 -0
- package/types/menu/menu-context.d.ts +1 -0
- package/types/menu/menu.d.cts +13 -0
- package/types/menu/menu.d.ts +13 -0
- package/types/popconfirm/index.d.cts +3 -0
- package/types/popconfirm/index.d.ts +3 -0
- package/types/poptip/index.d.cts +3 -0
- package/types/poptip/index.d.ts +3 -0
- package/types/popup/index.d.cts +4 -0
- package/types/popup/index.d.ts +4 -0
- package/types/segmented/index.d.cts +2 -2
- package/types/segmented/index.d.ts +2 -2
- package/types/splitter/controller.d.cts +49 -0
- package/types/splitter/controller.d.ts +49 -0
- package/types/splitter/splitter-panel.d.cts +37 -2
- package/types/splitter/splitter-panel.d.ts +37 -2
- package/types/splitter/splitter.d.cts +24 -5
- package/types/splitter/splitter.d.ts +24 -5
- package/types/tooltip/index.d.cts +3 -0
- package/types/tooltip/index.d.ts +3 -0
- package/types/utils/placement.d.cts +2 -1
- package/types/utils/placement.d.ts +2 -1
- package/types/utils/popup-arrow.d.cts +5 -0
- package/types/utils/popup-arrow.d.ts +5 -0
- package/vetur/attributes.json +340 -12
- package/vetur/tags.json +90 -4
- package/vetur/web-types.json +489 -13
package/style/motion.css
CHANGED
package/style/theme.css
CHANGED
|
@@ -11,6 +11,7 @@ declare const colorPickerProps: {
|
|
|
11
11
|
readonly: BooleanType;
|
|
12
12
|
disabledAlpha: BooleanType;
|
|
13
13
|
showText: BooleanType;
|
|
14
|
+
arrowPointAtCenter: BooleanType;
|
|
14
15
|
placement: {
|
|
15
16
|
type: PropType<DropPlacementsType>;
|
|
16
17
|
default: string;
|
|
@@ -50,6 +51,7 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
50
51
|
readonly: BooleanType;
|
|
51
52
|
disabledAlpha: BooleanType;
|
|
52
53
|
showText: BooleanType;
|
|
54
|
+
arrowPointAtCenter: BooleanType;
|
|
53
55
|
placement: {
|
|
54
56
|
type: PropType<DropPlacementsType>;
|
|
55
57
|
default: string;
|
|
@@ -92,6 +94,7 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
92
94
|
readonly: BooleanType;
|
|
93
95
|
disabledAlpha: BooleanType;
|
|
94
96
|
showText: BooleanType;
|
|
97
|
+
arrowPointAtCenter: BooleanType;
|
|
95
98
|
placement: {
|
|
96
99
|
type: PropType<DropPlacementsType>;
|
|
97
100
|
default: string;
|
|
@@ -142,6 +145,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
142
145
|
readonly: BooleanType;
|
|
143
146
|
disabledAlpha: BooleanType;
|
|
144
147
|
showText: BooleanType;
|
|
148
|
+
arrowPointAtCenter: BooleanType;
|
|
145
149
|
placement: {
|
|
146
150
|
type: PropType<DropPlacementsType>;
|
|
147
151
|
default: string;
|
|
@@ -184,6 +188,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
184
188
|
readonly: BooleanType;
|
|
185
189
|
disabledAlpha: BooleanType;
|
|
186
190
|
showText: BooleanType;
|
|
191
|
+
arrowPointAtCenter: BooleanType;
|
|
187
192
|
placement: {
|
|
188
193
|
type: PropType<DropPlacementsType>;
|
|
189
194
|
default: string;
|
|
@@ -11,6 +11,7 @@ declare const colorPickerProps: {
|
|
|
11
11
|
readonly: BooleanType;
|
|
12
12
|
disabledAlpha: BooleanType;
|
|
13
13
|
showText: BooleanType;
|
|
14
|
+
arrowPointAtCenter: BooleanType;
|
|
14
15
|
placement: {
|
|
15
16
|
type: PropType<DropPlacementsType>;
|
|
16
17
|
default: string;
|
|
@@ -50,6 +51,7 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
50
51
|
readonly: BooleanType;
|
|
51
52
|
disabledAlpha: BooleanType;
|
|
52
53
|
showText: BooleanType;
|
|
54
|
+
arrowPointAtCenter: BooleanType;
|
|
53
55
|
placement: {
|
|
54
56
|
type: PropType<DropPlacementsType>;
|
|
55
57
|
default: string;
|
|
@@ -92,6 +94,7 @@ declare const ColorPicker: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
92
94
|
readonly: BooleanType;
|
|
93
95
|
disabledAlpha: BooleanType;
|
|
94
96
|
showText: BooleanType;
|
|
97
|
+
arrowPointAtCenter: BooleanType;
|
|
95
98
|
placement: {
|
|
96
99
|
type: PropType<DropPlacementsType>;
|
|
97
100
|
default: string;
|
|
@@ -142,6 +145,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
142
145
|
readonly: BooleanType;
|
|
143
146
|
disabledAlpha: BooleanType;
|
|
144
147
|
showText: BooleanType;
|
|
148
|
+
arrowPointAtCenter: BooleanType;
|
|
145
149
|
placement: {
|
|
146
150
|
type: PropType<DropPlacementsType>;
|
|
147
151
|
default: string;
|
|
@@ -184,6 +188,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
184
188
|
readonly: BooleanType;
|
|
185
189
|
disabledAlpha: BooleanType;
|
|
186
190
|
showText: BooleanType;
|
|
191
|
+
arrowPointAtCenter: BooleanType;
|
|
187
192
|
placement: {
|
|
188
193
|
type: PropType<DropPlacementsType>;
|
|
189
194
|
default: string;
|
package/types/components.d.cts
CHANGED
|
@@ -41,6 +41,9 @@ export type { CollapsePanelProps, CollapseProps } from "./collapse/index.cjs";
|
|
|
41
41
|
export type { CollapseKey } from "./collapse/context.cjs";
|
|
42
42
|
export { ColorPickerPanel, default as ColorPicker } from "./color-picker/index.cjs";
|
|
43
43
|
export type { ColorPickerProps, ColorMode } from "./color-picker/index.cjs";
|
|
44
|
+
export { default as GradientPicker } from "./gradient-picker/index.cjs";
|
|
45
|
+
export { createCornerGradient, createLinearGradient, formatGradient, } from "./gradient-picker/index.cjs";
|
|
46
|
+
export type { CornerGradientValue, GradientPickerProps, GradientStop, GradientType, GradientValue, } from "./gradient-picker/index.cjs";
|
|
44
47
|
export { DatePickerPanel, default as DatePicker } from "./date-picker/index.cjs";
|
|
45
48
|
export type { DatePickerInput, DatePickerOutput, DatePickerModeType, DatePickerValueType, DatePickerPreset, DatePickerProps, } from "./date-picker/index.cjs";
|
|
46
49
|
export { Descriptions, DescriptionsItem } from "./descriptions/index.cjs";
|
package/types/components.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ export type { CollapsePanelProps, CollapseProps } from "./collapse/index.js";
|
|
|
41
41
|
export type { CollapseKey } from "./collapse/context.js";
|
|
42
42
|
export { ColorPickerPanel, default as ColorPicker } from "./color-picker/index.js";
|
|
43
43
|
export type { ColorPickerProps, ColorMode } from "./color-picker/index.js";
|
|
44
|
+
export { default as GradientPicker } from "./gradient-picker/index.js";
|
|
45
|
+
export { createCornerGradient, createLinearGradient, formatGradient, } from "./gradient-picker/index.js";
|
|
46
|
+
export type { CornerGradientValue, GradientPickerProps, GradientStop, GradientType, GradientValue, } from "./gradient-picker/index.js";
|
|
44
47
|
export { DatePickerPanel, default as DatePicker } from "./date-picker/index.js";
|
|
45
48
|
export type { DatePickerInput, DatePickerOutput, DatePickerModeType, DatePickerValueType, DatePickerPreset, DatePickerProps, } from "./date-picker/index.js";
|
|
46
49
|
export { Descriptions, DescriptionsItem } from "./descriptions/index.js";
|
package/types/global.d.cts
CHANGED
|
@@ -65,6 +65,14 @@ KCollapsePanel: typeof import('kui-vue')['CollapsePanel']
|
|
|
65
65
|
KColorPickerPanel: typeof import('kui-vue')['ColorPickerPanel']
|
|
66
66
|
ColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
67
67
|
KColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
68
|
+
GradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
69
|
+
KGradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
70
|
+
createCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
71
|
+
KcreateCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
72
|
+
createLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
73
|
+
KcreateLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
74
|
+
formatGradient: typeof import('kui-vue')['formatGradient']
|
|
75
|
+
KformatGradient: typeof import('kui-vue')['formatGradient']
|
|
68
76
|
DatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
69
77
|
KDatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
70
78
|
DatePicker: typeof import('kui-vue')['DatePicker']
|
|
@@ -321,6 +329,14 @@ KCollapsePanel: typeof import('kui-vue')['CollapsePanel']
|
|
|
321
329
|
KColorPickerPanel: typeof import('kui-vue')['ColorPickerPanel']
|
|
322
330
|
ColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
323
331
|
KColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
332
|
+
GradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
333
|
+
KGradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
334
|
+
createCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
335
|
+
KcreateCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
336
|
+
createLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
337
|
+
KcreateLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
338
|
+
formatGradient: typeof import('kui-vue')['formatGradient']
|
|
339
|
+
KformatGradient: typeof import('kui-vue')['formatGradient']
|
|
324
340
|
DatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
325
341
|
KDatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
326
342
|
DatePicker: typeof import('kui-vue')['DatePicker']
|
package/types/global.d.ts
CHANGED
|
@@ -65,6 +65,14 @@ KCollapsePanel: typeof import('kui-vue')['CollapsePanel']
|
|
|
65
65
|
KColorPickerPanel: typeof import('kui-vue')['ColorPickerPanel']
|
|
66
66
|
ColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
67
67
|
KColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
68
|
+
GradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
69
|
+
KGradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
70
|
+
createCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
71
|
+
KcreateCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
72
|
+
createLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
73
|
+
KcreateLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
74
|
+
formatGradient: typeof import('kui-vue')['formatGradient']
|
|
75
|
+
KformatGradient: typeof import('kui-vue')['formatGradient']
|
|
68
76
|
DatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
69
77
|
KDatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
70
78
|
DatePicker: typeof import('kui-vue')['DatePicker']
|
|
@@ -321,6 +329,14 @@ KCollapsePanel: typeof import('kui-vue')['CollapsePanel']
|
|
|
321
329
|
KColorPickerPanel: typeof import('kui-vue')['ColorPickerPanel']
|
|
322
330
|
ColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
323
331
|
KColorPicker: typeof import('kui-vue')['ColorPicker']
|
|
332
|
+
GradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
333
|
+
KGradientPicker: typeof import('kui-vue')['GradientPicker']
|
|
334
|
+
createCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
335
|
+
KcreateCornerGradient: typeof import('kui-vue')['createCornerGradient']
|
|
336
|
+
createLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
337
|
+
KcreateLinearGradient: typeof import('kui-vue')['createLinearGradient']
|
|
338
|
+
formatGradient: typeof import('kui-vue')['formatGradient']
|
|
339
|
+
KformatGradient: typeof import('kui-vue')['formatGradient']
|
|
324
340
|
DatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
325
341
|
KDatePickerPanel: typeof import('kui-vue')['DatePickerPanel']
|
|
326
342
|
DatePicker: typeof import('kui-vue')['DatePicker']
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
disabled: BooleanConstructor;
|
|
4
|
+
colors: {
|
|
5
|
+
type: PropType<string[]>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
selected: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
gradient: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
activate: (index: number, element: HTMLElement) => boolean;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
disabled: BooleanConstructor;
|
|
20
|
+
colors: {
|
|
21
|
+
type: PropType<string[]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
selected: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
gradient: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}>> & Readonly<{
|
|
33
|
+
onActivate?: ((index: number, element: HTMLElement) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
selected: number;
|
|
37
|
+
gradient: string;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
disabled: BooleanConstructor;
|
|
4
|
+
colors: {
|
|
5
|
+
type: PropType<string[]>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
selected: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
gradient: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
activate: (index: number, element: HTMLElement) => boolean;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
disabled: BooleanConstructor;
|
|
20
|
+
colors: {
|
|
21
|
+
type: PropType<string[]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
selected: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
gradient: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}>> & Readonly<{
|
|
33
|
+
onActivate?: ((index: number, element: HTMLElement) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
selected: number;
|
|
37
|
+
gradient: string;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from "vue";
|
|
2
|
+
import type { ColorMode } from "../color-picker/types.cjs";
|
|
3
|
+
import type { BooleanType, SizeType } from "../const/types.cjs";
|
|
4
|
+
import { type GradientType, type GradientValue } from "./types.cjs";
|
|
5
|
+
export { createCornerGradient, createLinearGradient, formatGradient, type CornerGradientValue, type GradientStop, type GradientType, type GradientValue, } from "./types.cjs";
|
|
6
|
+
declare const gradientPickerProps: {
|
|
7
|
+
modelValue: PropType<GradientValue>;
|
|
8
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
9
|
+
value: PropType<GradientValue>;
|
|
10
|
+
type: {
|
|
11
|
+
type: PropType<GradientType>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
15
|
+
alpha: BooleanType;
|
|
16
|
+
arrowPointAtCenter: {
|
|
17
|
+
type: BooleanType;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
disabled: BooleanType;
|
|
21
|
+
readonly: BooleanType;
|
|
22
|
+
mode: {
|
|
23
|
+
type: PropType<ColorMode>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
27
|
+
size: PropType<SizeType>;
|
|
28
|
+
};
|
|
29
|
+
export type GradientPickerProps = ExtractPropTypes<typeof gradientPickerProps>;
|
|
30
|
+
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
31
|
+
modelValue: PropType<GradientValue>;
|
|
32
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
33
|
+
value: PropType<GradientValue>;
|
|
34
|
+
type: {
|
|
35
|
+
type: PropType<GradientType>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
39
|
+
alpha: BooleanType;
|
|
40
|
+
arrowPointAtCenter: {
|
|
41
|
+
type: BooleanType;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
disabled: BooleanType;
|
|
45
|
+
readonly: BooleanType;
|
|
46
|
+
mode: {
|
|
47
|
+
type: PropType<ColorMode>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
51
|
+
size: PropType<SizeType>;
|
|
52
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
"update:modelValue": (value: GradientValue) => boolean;
|
|
54
|
+
"update:mode": (mode: ColorMode) => boolean;
|
|
55
|
+
change: (value: GradientValue) => boolean;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
57
|
+
modelValue: PropType<GradientValue>;
|
|
58
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
59
|
+
value: PropType<GradientValue>;
|
|
60
|
+
type: {
|
|
61
|
+
type: PropType<GradientType>;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
65
|
+
alpha: BooleanType;
|
|
66
|
+
arrowPointAtCenter: {
|
|
67
|
+
type: BooleanType;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
disabled: BooleanType;
|
|
71
|
+
readonly: BooleanType;
|
|
72
|
+
mode: {
|
|
73
|
+
type: PropType<ColorMode>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
77
|
+
size: PropType<SizeType>;
|
|
78
|
+
}>> & Readonly<{
|
|
79
|
+
onChange?: ((value: GradientValue) => any) | undefined;
|
|
80
|
+
"onUpdate:modelValue"?: ((value: GradientValue) => any) | undefined;
|
|
81
|
+
"onUpdate:mode"?: ((mode: ColorMode) => any) | undefined;
|
|
82
|
+
}>, {
|
|
83
|
+
type: GradientType;
|
|
84
|
+
arrowPointAtCenter: boolean | undefined;
|
|
85
|
+
mode: ColorMode;
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from "vue";
|
|
2
|
+
import type { ColorMode } from "../color-picker/types.js";
|
|
3
|
+
import type { BooleanType, SizeType } from "../const/types.js";
|
|
4
|
+
import { type GradientType, type GradientValue } from "./types.js";
|
|
5
|
+
export { createCornerGradient, createLinearGradient, formatGradient, type CornerGradientValue, type GradientStop, type GradientType, type GradientValue, } from "./types.js";
|
|
6
|
+
declare const gradientPickerProps: {
|
|
7
|
+
modelValue: PropType<GradientValue>;
|
|
8
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
9
|
+
value: PropType<GradientValue>;
|
|
10
|
+
type: {
|
|
11
|
+
type: PropType<GradientType>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
15
|
+
alpha: BooleanType;
|
|
16
|
+
arrowPointAtCenter: {
|
|
17
|
+
type: BooleanType;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
disabled: BooleanType;
|
|
21
|
+
readonly: BooleanType;
|
|
22
|
+
mode: {
|
|
23
|
+
type: PropType<ColorMode>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
27
|
+
size: PropType<SizeType>;
|
|
28
|
+
};
|
|
29
|
+
export type GradientPickerProps = ExtractPropTypes<typeof gradientPickerProps>;
|
|
30
|
+
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
31
|
+
modelValue: PropType<GradientValue>;
|
|
32
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
33
|
+
value: PropType<GradientValue>;
|
|
34
|
+
type: {
|
|
35
|
+
type: PropType<GradientType>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
39
|
+
alpha: BooleanType;
|
|
40
|
+
arrowPointAtCenter: {
|
|
41
|
+
type: BooleanType;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
disabled: BooleanType;
|
|
45
|
+
readonly: BooleanType;
|
|
46
|
+
mode: {
|
|
47
|
+
type: PropType<ColorMode>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
51
|
+
size: PropType<SizeType>;
|
|
52
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
"update:modelValue": (value: GradientValue) => boolean;
|
|
54
|
+
"update:mode": (mode: ColorMode) => boolean;
|
|
55
|
+
change: (value: GradientValue) => boolean;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
57
|
+
modelValue: PropType<GradientValue>;
|
|
58
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
59
|
+
value: PropType<GradientValue>;
|
|
60
|
+
type: {
|
|
61
|
+
type: PropType<GradientType>;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
65
|
+
alpha: BooleanType;
|
|
66
|
+
arrowPointAtCenter: {
|
|
67
|
+
type: BooleanType;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
disabled: BooleanType;
|
|
71
|
+
readonly: BooleanType;
|
|
72
|
+
mode: {
|
|
73
|
+
type: PropType<ColorMode>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
77
|
+
size: PropType<SizeType>;
|
|
78
|
+
}>> & Readonly<{
|
|
79
|
+
onChange?: ((value: GradientValue) => any) | undefined;
|
|
80
|
+
"onUpdate:modelValue"?: ((value: GradientValue) => any) | undefined;
|
|
81
|
+
"onUpdate:mode"?: ((mode: ColorMode) => any) | undefined;
|
|
82
|
+
}>, {
|
|
83
|
+
type: GradientType;
|
|
84
|
+
arrowPointAtCenter: boolean | undefined;
|
|
85
|
+
mode: ColorMode;
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import type { GradientStop } from "./types.cjs";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
disabled: BooleanConstructor;
|
|
5
|
+
stops: {
|
|
6
|
+
type: PropType<GradientStop[]>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
selected: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
add: (offset: number) => boolean;
|
|
15
|
+
move: (index: number, offset: number) => boolean;
|
|
16
|
+
remove: (index: number) => boolean;
|
|
17
|
+
select: (index: number) => boolean;
|
|
18
|
+
activate: (index: number, element: HTMLElement) => boolean;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
disabled: BooleanConstructor;
|
|
21
|
+
stops: {
|
|
22
|
+
type: PropType<GradientStop[]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
selected: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
default: number;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{
|
|
30
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
31
|
+
onAdd?: ((offset: number) => any) | undefined;
|
|
32
|
+
onMove?: ((index: number, offset: number) => any) | undefined;
|
|
33
|
+
onActivate?: ((index: number, element: HTMLElement) => any) | undefined;
|
|
34
|
+
onRemove?: ((index: number) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
selected: number;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import type { GradientStop } from "./types.js";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
disabled: BooleanConstructor;
|
|
5
|
+
stops: {
|
|
6
|
+
type: PropType<GradientStop[]>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
selected: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
add: (offset: number) => boolean;
|
|
15
|
+
move: (index: number, offset: number) => boolean;
|
|
16
|
+
remove: (index: number) => boolean;
|
|
17
|
+
select: (index: number) => boolean;
|
|
18
|
+
activate: (index: number, element: HTMLElement) => boolean;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
disabled: BooleanConstructor;
|
|
21
|
+
stops: {
|
|
22
|
+
type: PropType<GradientStop[]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
selected: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
default: number;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{
|
|
30
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
31
|
+
onAdd?: ((offset: number) => any) | undefined;
|
|
32
|
+
onMove?: ((index: number, offset: number) => any) | undefined;
|
|
33
|
+
onActivate?: ((index: number, element: HTMLElement) => any) | undefined;
|
|
34
|
+
onRemove?: ((index: number) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
selected: number;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ColorInstance } from "color";
|
|
2
|
+
export type GradientType = "linear" | "corner";
|
|
3
|
+
export interface GradientStop {
|
|
4
|
+
/** Any CSS color; alpha is stored in the string itself (`#rrggbbaa` / `rgba()`). */
|
|
5
|
+
color: string;
|
|
6
|
+
/** Position along the gradient, 0–100. */
|
|
7
|
+
offset: number;
|
|
8
|
+
}
|
|
9
|
+
/** Fixed corners: top-left, top-right, bottom-left, bottom-right. */
|
|
10
|
+
export type CornerGradientValue = [string, string, string, string];
|
|
11
|
+
/**
|
|
12
|
+
* The value is the colors, not the CSS: `linear` is the stop list left to right, `corner` is the four
|
|
13
|
+
* corner colors. Wrap it in whichever function you paint with — `linear-gradient`, `radial-gradient`,
|
|
14
|
+
* `conic-gradient` or a canvas — via the exported `formatGradient` helpers when the built-in preview
|
|
15
|
+
* shape is enough.
|
|
16
|
+
*/
|
|
17
|
+
export type GradientValue = GradientStop[] | CornerGradientValue;
|
|
18
|
+
export declare function createLinearGradient(): GradientStop[];
|
|
19
|
+
export declare function createCornerGradient(): CornerGradientValue;
|
|
20
|
+
export declare function formatColor(color: string | ColorInstance): string;
|
|
21
|
+
export declare function mixGradientColor(from: string, to: string, ratio: number): string;
|
|
22
|
+
/**
|
|
23
|
+
* Fill in a complete value of `type`. A value of the other shape is converted the way the panel
|
|
24
|
+
* switches: stops → corner takes the two end colors for the left and right edges; corner → stops
|
|
25
|
+
* runs the diagonal (top-left to bottom-right).
|
|
26
|
+
*/
|
|
27
|
+
export declare function normalizeGradient(value?: GradientValue | null, type?: GradientType): GradientValue;
|
|
28
|
+
export declare function gradientColorAtOffset(value: GradientStop[], offset: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* CSS for the component's own preview and for demos: stops render left to right; the four-corner
|
|
31
|
+
* value has no single native CSS gradient, so the default is a layered approximation. Consumers who
|
|
32
|
+
* need another function (radial, conic, direction) build it from the value instead.
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatGradient(value: GradientValue): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ColorInstance } from "color";
|
|
2
|
+
export type GradientType = "linear" | "corner";
|
|
3
|
+
export interface GradientStop {
|
|
4
|
+
/** Any CSS color; alpha is stored in the string itself (`#rrggbbaa` / `rgba()`). */
|
|
5
|
+
color: string;
|
|
6
|
+
/** Position along the gradient, 0–100. */
|
|
7
|
+
offset: number;
|
|
8
|
+
}
|
|
9
|
+
/** Fixed corners: top-left, top-right, bottom-left, bottom-right. */
|
|
10
|
+
export type CornerGradientValue = [string, string, string, string];
|
|
11
|
+
/**
|
|
12
|
+
* The value is the colors, not the CSS: `linear` is the stop list left to right, `corner` is the four
|
|
13
|
+
* corner colors. Wrap it in whichever function you paint with — `linear-gradient`, `radial-gradient`,
|
|
14
|
+
* `conic-gradient` or a canvas — via the exported `formatGradient` helpers when the built-in preview
|
|
15
|
+
* shape is enough.
|
|
16
|
+
*/
|
|
17
|
+
export type GradientValue = GradientStop[] | CornerGradientValue;
|
|
18
|
+
export declare function createLinearGradient(): GradientStop[];
|
|
19
|
+
export declare function createCornerGradient(): CornerGradientValue;
|
|
20
|
+
export declare function formatColor(color: string | ColorInstance): string;
|
|
21
|
+
export declare function mixGradientColor(from: string, to: string, ratio: number): string;
|
|
22
|
+
/**
|
|
23
|
+
* Fill in a complete value of `type`. A value of the other shape is converted the way the panel
|
|
24
|
+
* switches: stops → corner takes the two end colors for the left and right edges; corner → stops
|
|
25
|
+
* runs the diagonal (top-left to bottom-right).
|
|
26
|
+
*/
|
|
27
|
+
export declare function normalizeGradient(value?: GradientValue | null, type?: GradientType): GradientValue;
|
|
28
|
+
export declare function gradientColorAtOffset(value: GradientStop[], offset: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* CSS for the component's own preview and for demos: stops render left to right; the four-corner
|
|
31
|
+
* value has no single native CSS gradient, so the default is a layered approximation. Consumers who
|
|
32
|
+
* need another function (radial, conic, direction) build it from the value instead.
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatGradient(value: GradientValue): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface DragOptions {
|
|
2
|
+
value: string;
|
|
3
|
+
step: number | string;
|
|
4
|
+
blocked: () => boolean;
|
|
5
|
+
update: (value: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/** Start-relative movement keeps speed independent of pointer-event frequency. */
|
|
8
|
+
export declare function startNumberDrag(event: Pick<PointerEvent, "button" | "isPrimary" | "clientX" | "pointerId" | "currentTarget" | "preventDefault">, options: DragOptions): () => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface DragOptions {
|
|
2
|
+
value: string;
|
|
3
|
+
step: number | string;
|
|
4
|
+
blocked: () => boolean;
|
|
5
|
+
update: (value: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/** Start-relative movement keeps speed independent of pointer-event frequency. */
|
|
8
|
+
export declare function startNumberDrag(event: Pick<PointerEvent, "button" | "isPrimary" | "clientX" | "pointerId" | "currentTarget" | "preventDefault">, options: DragOptions): () => void;
|
|
9
|
+
export {};
|
|
@@ -25,6 +25,10 @@ declare const inputNumberProps: {
|
|
|
25
25
|
type: BooleanType;
|
|
26
26
|
default: boolean;
|
|
27
27
|
};
|
|
28
|
+
draggable: {
|
|
29
|
+
type: BooleanType;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
28
32
|
keyboard: {
|
|
29
33
|
type: BooleanType;
|
|
30
34
|
default: boolean;
|
|
@@ -79,6 +83,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
79
83
|
type: BooleanType;
|
|
80
84
|
default: boolean;
|
|
81
85
|
};
|
|
86
|
+
draggable: {
|
|
87
|
+
type: BooleanType;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
82
90
|
keyboard: {
|
|
83
91
|
type: BooleanType;
|
|
84
92
|
default: boolean;
|
|
@@ -136,6 +144,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
136
144
|
type: BooleanType;
|
|
137
145
|
default: boolean;
|
|
138
146
|
};
|
|
147
|
+
draggable: {
|
|
148
|
+
type: BooleanType;
|
|
149
|
+
default: boolean;
|
|
150
|
+
};
|
|
139
151
|
keyboard: {
|
|
140
152
|
type: BooleanType;
|
|
141
153
|
default: boolean;
|
|
@@ -174,6 +186,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
174
186
|
min: number;
|
|
175
187
|
max: number;
|
|
176
188
|
step: string | number;
|
|
189
|
+
draggable: boolean | undefined;
|
|
177
190
|
controls: boolean | undefined;
|
|
178
191
|
keyboard: boolean | undefined;
|
|
179
192
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|