@fulate/components 1.0.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/README.md +37 -0
- package/dist/components/button/button.d.ts +81 -0
- package/dist/components/button/style.d.ts +18 -0
- package/dist/components/button/types.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +106 -0
- package/dist/components/dialog/dialog.d.ts +64 -0
- package/dist/components/field/border.d.ts +9 -0
- package/dist/components/field/field.d.ts +149 -0
- package/dist/components/field/style.d.ts +18 -0
- package/dist/components/input/input.d.ts +80 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/types.d.ts +19 -0
- package/dist/components/popover/popover.d.ts +114 -0
- package/dist/components/popover/types.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +105 -0
- package/dist/components/select/select.d.ts +91 -0
- package/dist/components/select/types.d.ts +4 -0
- package/dist/components/switch/switch.d.ts +52 -0
- package/dist/components/tooltip/tooltip.d.ts +58 -0
- package/dist/composables/context.d.ts +9 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/outside-click.d.ts +6 -0
- package/dist/composables/overlay-position.d.ts +10 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +2263 -0
- package/dist/internal/control-size.d.ts +14 -0
- package/dist/internal/interaction.d.ts +14 -0
- package/dist/internal/ripple.d.ts +5 -0
- package/dist/internal/state-layer.d.ts +9 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/md3.d.ts +25 -0
- package/dist/types/control.d.ts +1 -0
- package/dist/types/floating.d.ts +4 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# `@fulate/components`
|
|
2
|
+
|
|
3
|
+
> 文档角色:`GUIDE`。权威来源:组件源码与测试;Root/overlay 生命周期见 [`@fulate/vue`](../vue/README.md)。
|
|
4
|
+
|
|
5
|
+
`@fulate/components` 提供基于 Vue 和 Material Design 3 的 Canvas UI 组件:`FButton`、`FInput`、
|
|
6
|
+
`FSelect`、`FRadio`、`FCheckbox`、`FSwitch`、`FTooltip`、`FPopover`、`FDialog` 与 `FMessage`。
|
|
7
|
+
导入包会加载 Yoga 的 `f-div`/`f-span` 注册,以便组件模板使用 Flex 容器。
|
|
8
|
+
|
|
9
|
+
## 基本用法
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { FButton, FInput, FPopover } from "@fulate/components";
|
|
13
|
+
|
|
14
|
+
function Panel() {
|
|
15
|
+
return (
|
|
16
|
+
<f-div>
|
|
17
|
+
<FInput modelValue={name.value} />
|
|
18
|
+
<FButton onClick={save}>Save</FButton>
|
|
19
|
+
<FPopover>Details</FPopover>
|
|
20
|
+
</f-div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
组件遵循 Vue 的 props/events 与 composable 语义;Canvas 元素属性通过 renderer 的普通
|
|
26
|
+
`setOptions()` 路径更新。组件内部的 overlay 定位复用所属 Root 的 frame-final completion,不创建
|
|
27
|
+
第二个 RAF 或 scheduler。`FDialog`、`FMessage` 通过所属 Root 的 viewport/resize 事实更新,
|
|
28
|
+
`FTooltip`/`FPopover` 通过 `useOutsideClick()` 与 `useOverlayPosition()` 管理触发和定位。
|
|
29
|
+
|
|
30
|
+
## Overlay 与消息
|
|
31
|
+
|
|
32
|
+
`useOverlay()`、`useOverlayPosition()`、`FTooltip`、`FPopover` 和 `FDialog` 使用当前 Root 提供的
|
|
33
|
+
overlay Layer。`useOutsideClick()` 负责外部指针边界;`useMessage()` 返回消息 API,消息组件的
|
|
34
|
+
timer,以及组件创建的 viewport 和 document listener,都会在卸载时清理。
|
|
35
|
+
|
|
36
|
+
具体 props、事件和尺寸类型以包源码导出的 TypeScript 类型为准;本 README 只说明包边界,不复制
|
|
37
|
+
每个组件的完整 API。
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type PropType } from "@vue/runtime-core";
|
|
2
|
+
import type { ButtonVariant } from "./types";
|
|
3
|
+
export declare const FButton: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
4
|
+
label: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
variant: {
|
|
9
|
+
type: PropType<ButtonVariant>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
color: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
type: PropType<import("../..").ControlSize>;
|
|
22
|
+
default: import("../..").ControlSize;
|
|
23
|
+
};
|
|
24
|
+
width: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: any;
|
|
27
|
+
};
|
|
28
|
+
height: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: any;
|
|
31
|
+
};
|
|
32
|
+
fontSize: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
default: any;
|
|
35
|
+
};
|
|
36
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("click" | "press")[], "click" | "press", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
37
|
+
label: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
variant: {
|
|
42
|
+
type: PropType<ButtonVariant>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
color: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
disabled: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
size: {
|
|
54
|
+
type: PropType<import("../..").ControlSize>;
|
|
55
|
+
default: import("../..").ControlSize;
|
|
56
|
+
};
|
|
57
|
+
width: {
|
|
58
|
+
type: NumberConstructor;
|
|
59
|
+
default: any;
|
|
60
|
+
};
|
|
61
|
+
height: {
|
|
62
|
+
type: NumberConstructor;
|
|
63
|
+
default: any;
|
|
64
|
+
};
|
|
65
|
+
fontSize: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: any;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{
|
|
70
|
+
onClick?: (...args: any[]) => any;
|
|
71
|
+
onPress?: (...args: any[]) => any;
|
|
72
|
+
}>, {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
fontSize: number;
|
|
76
|
+
size: import("../..").ControlSize;
|
|
77
|
+
label: string;
|
|
78
|
+
variant: ButtonVariant;
|
|
79
|
+
color: string;
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonVariant } from "./types";
|
|
2
|
+
import type { InteractionState } from "../../internal/interaction";
|
|
3
|
+
import type { SizeScale } from "../../internal/control-size";
|
|
4
|
+
export declare const BUTTON_SIZE: SizeScale<{
|
|
5
|
+
height: number;
|
|
6
|
+
fontSize: number;
|
|
7
|
+
minWidth: number;
|
|
8
|
+
horizontalPadding: number;
|
|
9
|
+
textHorizontalPadding: number;
|
|
10
|
+
}>;
|
|
11
|
+
interface ButtonVisualStyle {
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
borderColor?: string;
|
|
14
|
+
textColor: string;
|
|
15
|
+
rippleColor: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveButtonVisual(variant: ButtonVariant, color: string, disabled: boolean, state: InteractionState): ButtonVisualStyle;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ButtonVariant = "filled" | "outlined" | "text";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type PropType } from "@vue/runtime-core";
|
|
2
|
+
import type { ControlSize } from "../../types/control";
|
|
3
|
+
export declare const FCheckboxGroup: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: PropType<string[]>;
|
|
6
|
+
default: () => any[];
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
type: PropType<ControlSize>;
|
|
14
|
+
default: ControlSize;
|
|
15
|
+
};
|
|
16
|
+
direction: {
|
|
17
|
+
type: PropType<"row" | "column">;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
gap: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: any;
|
|
23
|
+
};
|
|
24
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: PropType<string[]>;
|
|
27
|
+
default: () => any[];
|
|
28
|
+
};
|
|
29
|
+
disabled: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
size: {
|
|
34
|
+
type: PropType<ControlSize>;
|
|
35
|
+
default: ControlSize;
|
|
36
|
+
};
|
|
37
|
+
direction: {
|
|
38
|
+
type: PropType<"row" | "column">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
gap: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: any;
|
|
44
|
+
};
|
|
45
|
+
}>> & Readonly<{
|
|
46
|
+
onChange?: (...args: any[]) => any;
|
|
47
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
48
|
+
}>, {
|
|
49
|
+
size: ControlSize;
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
modelValue: string[];
|
|
52
|
+
gap: number;
|
|
53
|
+
direction: "row" | "column";
|
|
54
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
55
|
+
export declare const FCheckbox: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
56
|
+
value: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
label: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
disabled: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
size: {
|
|
69
|
+
type: PropType<ControlSize>;
|
|
70
|
+
default: any;
|
|
71
|
+
};
|
|
72
|
+
modelValue: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: any;
|
|
75
|
+
};
|
|
76
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
77
|
+
value: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
label: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
disabled: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
size: {
|
|
90
|
+
type: PropType<ControlSize>;
|
|
91
|
+
default: any;
|
|
92
|
+
};
|
|
93
|
+
modelValue: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: any;
|
|
96
|
+
};
|
|
97
|
+
}>> & Readonly<{
|
|
98
|
+
onChange?: (...args: any[]) => any;
|
|
99
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
100
|
+
}>, {
|
|
101
|
+
value: string;
|
|
102
|
+
size: ControlSize;
|
|
103
|
+
label: string;
|
|
104
|
+
disabled: boolean;
|
|
105
|
+
modelValue: boolean;
|
|
106
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const FDialog: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
title: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
width: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
closeOnOverlayClick: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
closeOnEscape: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
showClose: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "update:modelValue" | "open" | "opened" | "closed")[], "close" | "update:modelValue" | "open" | "opened" | "closed", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
title: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
width: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
closeOnOverlayClick: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
closeOnEscape: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
showClose: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{
|
|
52
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
53
|
+
onClose?: (...args: any[]) => any;
|
|
54
|
+
onOpen?: (...args: any[]) => any;
|
|
55
|
+
onOpened?: (...args: any[]) => any;
|
|
56
|
+
onClosed?: (...args: any[]) => any;
|
|
57
|
+
}>, {
|
|
58
|
+
width: number;
|
|
59
|
+
title: string;
|
|
60
|
+
modelValue: boolean;
|
|
61
|
+
closeOnEscape: boolean;
|
|
62
|
+
closeOnOverlayClick: boolean;
|
|
63
|
+
showClose: boolean;
|
|
64
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Shape } from "@fulate/core";
|
|
2
|
+
export declare function useFieldBorder(disabled: () => boolean, active: () => boolean): {
|
|
3
|
+
borderRef: import("@vue/reactivity").ShallowRef<Shape<import("@fulate/core").ShapeProperties, import("@fulate/core").ShapeOption<any>>, Shape<import("@fulate/core").ShapeProperties, import("@fulate/core").ShapeOption<any>>>;
|
|
4
|
+
handlers: {
|
|
5
|
+
onMouseenter(): void;
|
|
6
|
+
onMouseleave(): void;
|
|
7
|
+
};
|
|
8
|
+
initialVisual: import("./style").FieldBorderVisual;
|
|
9
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { type PropType, type ShallowRef } from "@vue/runtime-core";
|
|
2
|
+
import type { Element } from "@fulate/core";
|
|
3
|
+
import type { Text } from "@fulate/ui";
|
|
4
|
+
export interface FieldLabelSlotProps {
|
|
5
|
+
ref: ShallowRef<Text | null>;
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
fitWidth: boolean;
|
|
11
|
+
lineHeight: number;
|
|
12
|
+
fontSize: number;
|
|
13
|
+
color: string;
|
|
14
|
+
silent: boolean;
|
|
15
|
+
pickable: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const FField: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
18
|
+
active: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
disabled: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
filled: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
hasLabel: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
width: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
height: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
paddingLeft: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
paddingRight: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
suffixWidth: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
fontSize: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
labelFontSize: {
|
|
59
|
+
type: NumberConstructor;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
labelHeight: {
|
|
63
|
+
type: NumberConstructor;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
66
|
+
labelPaddingTop: {
|
|
67
|
+
type: NumberConstructor;
|
|
68
|
+
required: true;
|
|
69
|
+
};
|
|
70
|
+
cursor: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
elementRef: {
|
|
75
|
+
type: PropType<(element: Element | null) => void>;
|
|
76
|
+
default: any;
|
|
77
|
+
};
|
|
78
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "click"[], "click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
79
|
+
active: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
disabled: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
filled: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
hasLabel: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
width: {
|
|
96
|
+
type: NumberConstructor;
|
|
97
|
+
required: true;
|
|
98
|
+
};
|
|
99
|
+
height: {
|
|
100
|
+
type: NumberConstructor;
|
|
101
|
+
required: true;
|
|
102
|
+
};
|
|
103
|
+
paddingLeft: {
|
|
104
|
+
type: NumberConstructor;
|
|
105
|
+
required: true;
|
|
106
|
+
};
|
|
107
|
+
paddingRight: {
|
|
108
|
+
type: NumberConstructor;
|
|
109
|
+
required: true;
|
|
110
|
+
};
|
|
111
|
+
suffixWidth: {
|
|
112
|
+
type: NumberConstructor;
|
|
113
|
+
default: number;
|
|
114
|
+
};
|
|
115
|
+
fontSize: {
|
|
116
|
+
type: NumberConstructor;
|
|
117
|
+
required: true;
|
|
118
|
+
};
|
|
119
|
+
labelFontSize: {
|
|
120
|
+
type: NumberConstructor;
|
|
121
|
+
required: true;
|
|
122
|
+
};
|
|
123
|
+
labelHeight: {
|
|
124
|
+
type: NumberConstructor;
|
|
125
|
+
required: true;
|
|
126
|
+
};
|
|
127
|
+
labelPaddingTop: {
|
|
128
|
+
type: NumberConstructor;
|
|
129
|
+
required: true;
|
|
130
|
+
};
|
|
131
|
+
cursor: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: string;
|
|
134
|
+
};
|
|
135
|
+
elementRef: {
|
|
136
|
+
type: PropType<(element: Element | null) => void>;
|
|
137
|
+
default: any;
|
|
138
|
+
};
|
|
139
|
+
}>> & Readonly<{
|
|
140
|
+
onClick?: (...args: any[]) => any;
|
|
141
|
+
}>, {
|
|
142
|
+
cursor: string;
|
|
143
|
+
filled: boolean;
|
|
144
|
+
disabled: boolean;
|
|
145
|
+
active: boolean;
|
|
146
|
+
hasLabel: boolean;
|
|
147
|
+
suffixWidth: number;
|
|
148
|
+
elementRef: (element: Element | null) => void;
|
|
149
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SizeScale } from "../../internal/control-size";
|
|
2
|
+
export declare const FIELD_BORDER_WIDTH = 0.5;
|
|
3
|
+
export declare const FIELD_HOVER_BORDER_WIDTH = 1;
|
|
4
|
+
export declare const FIELD_ACTIVE_BORDER_WIDTH = 1.5;
|
|
5
|
+
export type FieldBorderState = "disabled" | "rest" | "hover" | "active";
|
|
6
|
+
export interface FieldBorderVisual {
|
|
7
|
+
borderColor: string;
|
|
8
|
+
borderWidth: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const FIELD_SIZE: SizeScale<{
|
|
11
|
+
height: number;
|
|
12
|
+
fontSize: number;
|
|
13
|
+
horizontalPadding: number;
|
|
14
|
+
labelHeight: number;
|
|
15
|
+
labelFontSize: number;
|
|
16
|
+
labelPaddingTop: number;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function resolveFieldBorderVisual(state: FieldBorderState): FieldBorderVisual;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const FInput: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
label: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
placeholder: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
disabled: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
size: {
|
|
19
|
+
type: import("@vue/runtime-core").PropType<import("../..").ControlSize>;
|
|
20
|
+
default: import("../..").ControlSize;
|
|
21
|
+
};
|
|
22
|
+
width: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
height: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
30
|
+
fontSize: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "input" | "update:modelValue")[], "change" | "input" | "update:modelValue", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
35
|
+
modelValue: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
label: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
placeholder: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
disabled: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
size: {
|
|
52
|
+
type: import("@vue/runtime-core").PropType<import("../..").ControlSize>;
|
|
53
|
+
default: import("../..").ControlSize;
|
|
54
|
+
};
|
|
55
|
+
width: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
59
|
+
height: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: any;
|
|
62
|
+
};
|
|
63
|
+
fontSize: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
default: any;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{
|
|
68
|
+
onChange?: (...args: any[]) => any;
|
|
69
|
+
onInput?: (...args: any[]) => any;
|
|
70
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
71
|
+
}>, {
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
fontSize: number;
|
|
75
|
+
size: import("../..").ControlSize;
|
|
76
|
+
label: string;
|
|
77
|
+
disabled: boolean;
|
|
78
|
+
placeholder: string;
|
|
79
|
+
modelValue: string;
|
|
80
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { MessageApi } from "./types";
|
|
2
|
+
export declare const FMessage: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
3
|
+
duration: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
offset: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
gap: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
width: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
}>, () => (import("vue/jsx-runtime").JSX.Element | import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}>[])[], {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
22
|
+
duration: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
offset: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
gap: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
width: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
}>> & Readonly<{}>, {
|
|
39
|
+
width: number;
|
|
40
|
+
duration: number;
|
|
41
|
+
gap: number;
|
|
42
|
+
offset: number;
|
|
43
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
export declare function useMessage(): MessageApi;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type MessageType = "success" | "info" | "warning" | "error";
|
|
2
|
+
export interface MessageOptions {
|
|
3
|
+
message: string;
|
|
4
|
+
type?: MessageType;
|
|
5
|
+
duration?: number;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface MessageHandle {
|
|
9
|
+
close(): void;
|
|
10
|
+
}
|
|
11
|
+
export type MessageInput = string | MessageOptions;
|
|
12
|
+
export interface MessageApi {
|
|
13
|
+
(input: MessageInput): MessageHandle;
|
|
14
|
+
success(input: MessageInput): MessageHandle;
|
|
15
|
+
info(input: MessageInput): MessageHandle;
|
|
16
|
+
warning(input: MessageInput): MessageHandle;
|
|
17
|
+
error(input: MessageInput): MessageHandle;
|
|
18
|
+
closeAll(): void;
|
|
19
|
+
}
|