@winm/vue-workbench-ui 0.0.0-stage → 0.1.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/README.md +54 -3
- package/dist/Toggle-DJwRG1Ev.js +387 -0
- package/dist/code-editor.css +189 -0
- package/dist/code-editor.d.ts +5 -0
- package/dist/code-editor.js +1272 -0
- package/dist/components/Badge.vue.d.ts +34 -0
- package/dist/components/BrandMark.vue.d.ts +6 -0
- package/dist/components/CodeEditor.vue.d.ts +32 -0
- package/dist/components/ConfirmationDialog.vue.d.ts +27 -0
- package/dist/components/ContextMenu.vue.d.ts +66 -0
- package/dist/components/CopyButton.vue.d.ts +35 -0
- package/dist/components/DataTable.vue.d.ts +87 -0
- package/dist/components/DatePicker.vue.d.ts +33 -0
- package/dist/components/DropdownMenu.vue.d.ts +88 -0
- package/dist/components/EmptyState.vue.d.ts +38 -0
- package/dist/components/ErrorBanner.vue.d.ts +30 -0
- package/dist/components/ExpandableCodeEditor.vue.d.ts +72 -0
- package/dist/components/Expander.vue.d.ts +75 -0
- package/dist/components/FilePicker.vue.d.ts +111 -0
- package/dist/components/Icon.vue.d.ts +8 -0
- package/dist/components/Ipv4Input.vue.d.ts +95 -0
- package/dist/components/KeyValueTable.vue.d.ts +96 -0
- package/dist/components/ModalDialog.vue.d.ts +75 -0
- package/dist/components/NumberInput.vue.d.ts +69 -0
- package/dist/components/Pagination.vue.d.ts +49 -0
- package/dist/components/PasswordInput.vue.d.ts +48 -0
- package/dist/components/PlaceholderInput.vue.d.ts +36 -0
- package/dist/components/PluginIcon.vue.d.ts +20 -0
- package/dist/components/Popover.vue.d.ts +91 -0
- package/dist/components/ProgressBar.vue.d.ts +46 -0
- package/dist/components/SearchInput.vue.d.ts +72 -0
- package/dist/components/SegmentedControl.vue.d.ts +45 -0
- package/dist/components/SliderInput.vue.d.ts +59 -0
- package/dist/components/StatusBadge.vue.d.ts +18 -0
- package/dist/components/SwitchField.vue.d.ts +38 -0
- package/dist/components/Tabs.vue.d.ts +51 -0
- package/dist/components/TextInput.vue.d.ts +120 -0
- package/dist/components/Toast.vue.d.ts +47 -0
- package/dist/components/Toggle.vue.d.ts +16 -0
- package/dist/components/Tooltip.vue.d.ts +32 -0
- package/dist/components/WorkbenchTabs.vue.d.ts +52 -0
- package/dist/components/flow/PanelResizer.vue.d.ts +23 -0
- package/dist/components/http/HttpJsonTree.vue.d.ts +6 -0
- package/dist/components/http/HttpJsonTreeNode.vue.d.ts +22 -0
- package/dist/composables/useClipboard.d.ts +23 -0
- package/dist/date-picker-range.d.ts +54 -0
- package/dist/date-picker.d.ts +31 -0
- package/dist/directives/tooltip.d.ts +32 -0
- package/dist/editors/languages.d.ts +10 -0
- package/dist/editors/script-completions.d.ts +23 -0
- package/dist/editors/script-linter.d.ts +7 -0
- package/dist/editors/theme.d.ts +3 -0
- package/dist/file-picker.d.ts +68 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +6116 -0
- package/dist/media-icon.d.ts +5 -0
- package/dist/modal-enhancer.d.ts +28 -0
- package/dist/overlay-host.d.ts +2 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/select-popup.d.ts +14 -0
- package/dist/style.css +2 -0
- package/dist/template-placeholders.d.ts +64 -0
- package/dist/ui-context.d.ts +18 -0
- package/package.json +71 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export type PopoverPlacement = "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
2
|
+
/**
|
|
3
|
+
* 通用气泡浮层容器(Popover):
|
|
4
|
+
* - 通过 Teleport 挂载到当前 dialog 或主题顶层容器,避免被外层卡片的 overflow: hidden/auto 裁剪遮挡。
|
|
5
|
+
* - 自动基于触发器 getBoundingClientRect() 计算固定视口坐标,支持上下空间不足自动翻转与左右视口夹紧。
|
|
6
|
+
* - 统一托管点击外部(pointerdown)关闭、Escape 键关闭、滚动跟随与轻量入场动效。
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** 受控展开状态(v-model:open;未传时使用非受控内部状态) */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** 首选弹出方向(空间不足时自动翻转) */
|
|
12
|
+
placement?: PopoverPlacement;
|
|
13
|
+
/** 浮层宽度(如 "320px" 或 "min(380px, 90vw)") */
|
|
14
|
+
width?: string;
|
|
15
|
+
/** 浮层 ARIA 角色 */
|
|
16
|
+
role?: "dialog" | "listbox" | "menu" | "region";
|
|
17
|
+
/** 浮层无障碍名称 */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** 附加到浮层面板的自定义类名 */
|
|
20
|
+
panelClass?: string;
|
|
21
|
+
/** 是否禁用触发 */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** 点击外部区域是否自动关闭 */
|
|
24
|
+
closeOnOutside?: boolean;
|
|
25
|
+
/** 按 Escape 键是否自动关闭 */
|
|
26
|
+
closeOnEscape?: boolean;
|
|
27
|
+
/** 弹出与触发器的间距(px) */
|
|
28
|
+
offset?: number;
|
|
29
|
+
};
|
|
30
|
+
declare function updatePosition(): void;
|
|
31
|
+
declare function toggle(): void;
|
|
32
|
+
declare function openPopover(): void;
|
|
33
|
+
declare function closePopover(): void;
|
|
34
|
+
declare var __VLS_1: {
|
|
35
|
+
open: boolean;
|
|
36
|
+
toggle: typeof toggle;
|
|
37
|
+
close: typeof closePopover;
|
|
38
|
+
panelId: string;
|
|
39
|
+
}, __VLS_15: {
|
|
40
|
+
close: typeof closePopover;
|
|
41
|
+
}, __VLS_17: {
|
|
42
|
+
close: typeof closePopover;
|
|
43
|
+
}, __VLS_19: {
|
|
44
|
+
close: typeof closePopover;
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Slots = {} & {
|
|
47
|
+
trigger?: (props: typeof __VLS_1) => any;
|
|
48
|
+
} & {
|
|
49
|
+
header?: (props: typeof __VLS_15) => any;
|
|
50
|
+
} & {
|
|
51
|
+
default?: (props: typeof __VLS_17) => any;
|
|
52
|
+
} & {
|
|
53
|
+
footer?: (props: typeof __VLS_19) => any;
|
|
54
|
+
};
|
|
55
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
56
|
+
open: import("vue").ComputedRef<boolean>;
|
|
57
|
+
toggle: typeof toggle;
|
|
58
|
+
openPopover: typeof openPopover;
|
|
59
|
+
closePopover: typeof closePopover;
|
|
60
|
+
updatePosition: typeof updatePosition;
|
|
61
|
+
rootRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
62
|
+
panelRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
63
|
+
panelId: string;
|
|
64
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
65
|
+
close: () => any;
|
|
66
|
+
open: () => any;
|
|
67
|
+
"update:open": (open: boolean) => any;
|
|
68
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
69
|
+
onClose?: (() => any) | undefined;
|
|
70
|
+
onOpen?: (() => any) | undefined;
|
|
71
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
role: "dialog" | "menu" | "region" | "listbox";
|
|
74
|
+
placement: PopoverPlacement;
|
|
75
|
+
width: string;
|
|
76
|
+
open: boolean;
|
|
77
|
+
ariaLabel: string;
|
|
78
|
+
disabled: boolean;
|
|
79
|
+
offset: number;
|
|
80
|
+
panelClass: string;
|
|
81
|
+
closeOnOutside: boolean;
|
|
82
|
+
closeOnEscape: boolean;
|
|
83
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
84
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
85
|
+
declare const _default: typeof __VLS_export;
|
|
86
|
+
export default _default;
|
|
87
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
88
|
+
new (): {
|
|
89
|
+
$slots: S;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ProgressTone = "accent" | "success" | "warning" | "danger" | "neutral" | "auto";
|
|
2
|
+
/**
|
|
3
|
+
* 通用进度条组件(ProgressBar):
|
|
4
|
+
* - 支持确定进度与不确定流动进度(indeterminate)。
|
|
5
|
+
* - 支持 accent / success / warning / danger / neutral / auto(随占比自动阈值变色)六种语义色。
|
|
6
|
+
* - 支持 sm (4px) / md (6px) / lg (10px) 三档高度、可选标题与等宽百分比读数。
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** 当前数值(自动按 min / max 换算为 0–100%) */
|
|
10
|
+
value?: number | null;
|
|
11
|
+
/** 最小值 */
|
|
12
|
+
min?: number;
|
|
13
|
+
/** 最大值 */
|
|
14
|
+
max?: number;
|
|
15
|
+
/** 未知进度流动加载态 */
|
|
16
|
+
indeterminate?: boolean;
|
|
17
|
+
/** 语义色阶;auto 按 <70% 强调色、70–89% 警告色、>=90% 危险色自动切换 */
|
|
18
|
+
tone?: ProgressTone;
|
|
19
|
+
/** 轨道高度规格:sm (4px) / md (6px) / lg (10px) */
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
/** 轨道上方左侧可选标题 */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** 是否显示百分比或格式化读数 */
|
|
24
|
+
showValue?: boolean;
|
|
25
|
+
/** 自定义数值格式化函数 */
|
|
26
|
+
formatValue?: (percent: number, value: number) => string;
|
|
27
|
+
/** 是否叠加轻斜纹纹理 */
|
|
28
|
+
striped?: boolean;
|
|
29
|
+
/** 无障碍名称 */
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
};
|
|
32
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
33
|
+
value: number | null;
|
|
34
|
+
min: number;
|
|
35
|
+
max: number;
|
|
36
|
+
label: string;
|
|
37
|
+
size: "sm" | "md" | "lg";
|
|
38
|
+
ariaLabel: string;
|
|
39
|
+
tone: ProgressTone;
|
|
40
|
+
striped: boolean;
|
|
41
|
+
indeterminate: boolean;
|
|
42
|
+
showValue: boolean;
|
|
43
|
+
formatValue: (percent: number, value: number) => string;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
size?: "default" | "compact";
|
|
6
|
+
variant?: "control" | "inset";
|
|
7
|
+
toolbar?: boolean;
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
clearLabel?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
maxlength?: number;
|
|
15
|
+
autofocus?: boolean;
|
|
16
|
+
autocomplete?: string;
|
|
17
|
+
inputClass?: string;
|
|
18
|
+
shortcut?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function focusInput(): void;
|
|
21
|
+
declare function clearValue(): void;
|
|
22
|
+
declare var __VLS_6: {};
|
|
23
|
+
type __VLS_Slots = {} & {
|
|
24
|
+
suffix?: (props: typeof __VLS_6) => any;
|
|
25
|
+
};
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
27
|
+
focus: typeof focusInput;
|
|
28
|
+
blur: () => void | undefined;
|
|
29
|
+
select: () => void | undefined;
|
|
30
|
+
clear: typeof clearValue;
|
|
31
|
+
inputEl: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
32
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (value: string) => any;
|
|
34
|
+
focus: (event: FocusEvent) => any;
|
|
35
|
+
blur: (event: FocusEvent) => any;
|
|
36
|
+
keydown: (event: KeyboardEvent) => any;
|
|
37
|
+
keyup: (event: KeyboardEvent) => any;
|
|
38
|
+
clear: () => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
41
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
42
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
43
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
44
|
+
onKeyup?: ((event: KeyboardEvent) => any) | undefined;
|
|
45
|
+
onClear?: (() => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
autocomplete: string;
|
|
48
|
+
modelValue: string;
|
|
49
|
+
readonly: boolean;
|
|
50
|
+
name: string;
|
|
51
|
+
size: "default" | "compact";
|
|
52
|
+
ariaLabel: string;
|
|
53
|
+
id: string;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
autofocus: boolean;
|
|
56
|
+
variant: "inset" | "control";
|
|
57
|
+
placeholder: string;
|
|
58
|
+
maxlength: number;
|
|
59
|
+
toolbar: boolean;
|
|
60
|
+
clearable: boolean;
|
|
61
|
+
clearLabel: string;
|
|
62
|
+
inputClass: string;
|
|
63
|
+
shortcut: string;
|
|
64
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
65
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
66
|
+
declare const _default: typeof __VLS_export;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface SegmentedOption<V = string> {
|
|
2
|
+
value: V;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number | string;
|
|
5
|
+
countTone?: "default" | "warning";
|
|
6
|
+
icon?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
controls?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: <T extends string | number | boolean = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
13
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
14
|
+
modelValue: T;
|
|
15
|
+
options: SegmentedOption<T>[];
|
|
16
|
+
role?: "tablist" | "radiogroup" | "group";
|
|
17
|
+
size?: "default" | "compact";
|
|
18
|
+
itemClass?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
} & {
|
|
22
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
23
|
+
onChange?: ((value: T) => any) | undefined;
|
|
24
|
+
}> & (typeof globalThis extends {
|
|
25
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
26
|
+
} ? P : {});
|
|
27
|
+
expose: (exposed: {}) => void;
|
|
28
|
+
attrs: any;
|
|
29
|
+
slots: {
|
|
30
|
+
item?: (props: {
|
|
31
|
+
option: SegmentedOption<T>;
|
|
32
|
+
active: boolean;
|
|
33
|
+
}) => any;
|
|
34
|
+
};
|
|
35
|
+
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "change", value: T) => void);
|
|
36
|
+
}>) => import("vue").VNode & {
|
|
37
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
38
|
+
};
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
42
|
+
[K in keyof T]: T[K];
|
|
43
|
+
} : {
|
|
44
|
+
[K in keyof T as K]: T[K];
|
|
45
|
+
}) & {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 全站统一胶囊数值滑块控件:
|
|
3
|
+
* - 单胶囊内集成「左侧参数标签 + 中央刻度/渐进填充/竖线滑标 + 右侧等宽数值读数」;
|
|
4
|
+
* - 静默态呈现轻量化中性进度,悬停/聚焦/拖拽时平滑转为强调色微光胶囊滑标;
|
|
5
|
+
* - 支持全区域指针拖拽、键盘方向键步进,以及点击右侧数值就地切换为精确数字输入(可配置独立输入上下限)。
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
modelValue: number;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
inputMin?: number;
|
|
13
|
+
inputMax?: number;
|
|
14
|
+
label?: string;
|
|
15
|
+
unit?: string;
|
|
16
|
+
precision?: number;
|
|
17
|
+
formatValue?: (value: number) => string;
|
|
18
|
+
ticks?: number;
|
|
19
|
+
size?: "default" | "compact";
|
|
20
|
+
variant?: "inset" | "control";
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
defaultValue?: number;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
readonly?: boolean;
|
|
25
|
+
tooltip?: string;
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
id?: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
"update:modelValue": (value: number) => any;
|
|
32
|
+
change: (value: number) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
35
|
+
onChange?: ((value: number) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
min: number;
|
|
38
|
+
max: number;
|
|
39
|
+
readonly: boolean;
|
|
40
|
+
label: string;
|
|
41
|
+
tooltip: string;
|
|
42
|
+
name: string;
|
|
43
|
+
size: "default" | "compact";
|
|
44
|
+
ariaLabel: string;
|
|
45
|
+
id: string;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
variant: "inset" | "control";
|
|
48
|
+
step: number;
|
|
49
|
+
precision: number;
|
|
50
|
+
unit: string;
|
|
51
|
+
formatValue: (value: number) => string;
|
|
52
|
+
inputMin: number;
|
|
53
|
+
inputMax: number;
|
|
54
|
+
ticks: number;
|
|
55
|
+
editable: boolean;
|
|
56
|
+
defaultValue: number;
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
|
+
declare const _default: typeof __VLS_export;
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type StatusTone = "success" | "error" | "attention" | "running" | "idle";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
state: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
labels?: Record<string, string>;
|
|
6
|
+
tone?: StatusTone;
|
|
7
|
+
compact?: boolean;
|
|
8
|
+
variant?: "subtle" | "pill";
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
label: string;
|
|
12
|
+
compact: boolean;
|
|
13
|
+
tone: StatusTone;
|
|
14
|
+
variant: "subtle" | "pill";
|
|
15
|
+
labels: Record<string, string>;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 节点配置与表单通用的布尔开关字段组件。
|
|
3
|
+
* 默认按「左标题 + 右开关」单行左右分布排列,节省纵向空间并保持与设置项一致的视觉节律;
|
|
4
|
+
* 开启 inline 时转为紧凑横向行内排布,适用于多开关并排或工具栏元信息行。
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
modelValue: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
labelText?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
badge?: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
switchTooltip?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
compact?: boolean;
|
|
17
|
+
inline?: boolean;
|
|
18
|
+
id?: string;
|
|
19
|
+
};
|
|
20
|
+
declare var __VLS_1: {};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
label?: (props: typeof __VLS_1) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: boolean) => any;
|
|
26
|
+
change: (value: boolean) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
29
|
+
onChange?: ((value: boolean) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface TabItem<V extends string | number = string> {
|
|
2
|
+
value: V;
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
badge?: string | number;
|
|
6
|
+
badgeTone?: "neutral" | "accent" | "warning" | "danger" | "success";
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const __VLS_export: <T extends string | number = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
12
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
13
|
+
modelValue: T;
|
|
14
|
+
items: TabItem<T>[];
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
size?: "default" | "compact";
|
|
17
|
+
stretch?: boolean;
|
|
18
|
+
/** automatic: 方向键移动焦点同时切换;manual: 方向键仅移动焦点,Enter/Space 激活 */
|
|
19
|
+
activation?: "automatic" | "manual";
|
|
20
|
+
} & {
|
|
21
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
22
|
+
onChange?: ((value: T) => any) | undefined;
|
|
23
|
+
}> & (typeof globalThis extends {
|
|
24
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
25
|
+
} ? P : {});
|
|
26
|
+
expose: (exposed: {}) => void;
|
|
27
|
+
attrs: any;
|
|
28
|
+
slots: {
|
|
29
|
+
tab?: (props: {
|
|
30
|
+
item: TabItem<T>;
|
|
31
|
+
active: boolean;
|
|
32
|
+
}) => any;
|
|
33
|
+
} & {
|
|
34
|
+
actions?: (props: {}) => any;
|
|
35
|
+
} & {
|
|
36
|
+
default?: (props: {
|
|
37
|
+
activeItem: TabItem<T> | undefined;
|
|
38
|
+
activeValue: T;
|
|
39
|
+
}) => any;
|
|
40
|
+
};
|
|
41
|
+
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "change", value: T) => void);
|
|
42
|
+
}>) => import("vue").VNode & {
|
|
43
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
44
|
+
};
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
} : {
|
|
50
|
+
[K in keyof T as K]: T[K];
|
|
51
|
+
}) & {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用文本输入框(TextInput):
|
|
3
|
+
* - 支持单行 input 与多行 textarea(multiline)两种模式。
|
|
4
|
+
* - 内置前置图标、一键清空(clearable)、字数统计(showCount)、错误态(invalid)与等宽模式(monospace)。
|
|
5
|
+
* - 提供 #prepend / #prefix / #suffix / #append 四个插槽,前后附加按钮自动贴合高度与细线分隔。
|
|
6
|
+
* - 内部原生控件通过 .ui-text-native 隔离全局输入样式,避免双边框冲突。
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** 文本值(v-model) */
|
|
10
|
+
modelValue?: string;
|
|
11
|
+
/** 原生 input 类型(单行模式生效) */
|
|
12
|
+
type?: "text" | "url" | "email" | "tel" | "search";
|
|
13
|
+
/** 是否切换为多行文本域 */
|
|
14
|
+
multiline?: boolean;
|
|
15
|
+
/** 多行模式下的默认行数 */
|
|
16
|
+
rows?: number;
|
|
17
|
+
/** 高度规格:default(30px)/ compact(26px) */
|
|
18
|
+
size?: "default" | "compact";
|
|
19
|
+
/** 底色与边框变体:inset(--ui-bg)/ control(--ui-control)/ bare(无外框嵌入) */
|
|
20
|
+
variant?: "inset" | "control" | "bare";
|
|
21
|
+
/** 可选前置线性图标名称 */
|
|
22
|
+
prefixIcon?: string;
|
|
23
|
+
/** 有内容时显示一键清空按钮 */
|
|
24
|
+
clearable?: boolean;
|
|
25
|
+
/** 是否显示字数统计(配合 maxlength 显示 current/max) */
|
|
26
|
+
showCount?: boolean;
|
|
27
|
+
/** 是否处于校验错误态 */
|
|
28
|
+
invalid?: boolean;
|
|
29
|
+
/** 是否使用等宽字体(适合路径、URL、表达式) */
|
|
30
|
+
monospace?: boolean;
|
|
31
|
+
/** 占位提示文案 */
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
/** 原生属性透传 */
|
|
34
|
+
id?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
autocomplete?: string;
|
|
37
|
+
maxlength?: number;
|
|
38
|
+
minlength?: number;
|
|
39
|
+
pattern?: string;
|
|
40
|
+
list?: string;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
readonly?: boolean;
|
|
43
|
+
required?: boolean;
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
ariaDescribedby?: string;
|
|
46
|
+
clearLabel?: string;
|
|
47
|
+
};
|
|
48
|
+
declare function clear(): void;
|
|
49
|
+
declare function focus(): void;
|
|
50
|
+
declare function blur(): void;
|
|
51
|
+
declare function select(): void;
|
|
52
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_10: {}, __VLS_17: {};
|
|
53
|
+
type __VLS_Slots = {} & {
|
|
54
|
+
prepend?: (props: typeof __VLS_1) => any;
|
|
55
|
+
} & {
|
|
56
|
+
prefix?: (props: typeof __VLS_3) => any;
|
|
57
|
+
} & {
|
|
58
|
+
suffix?: (props: typeof __VLS_10) => any;
|
|
59
|
+
} & {
|
|
60
|
+
append?: (props: typeof __VLS_17) => any;
|
|
61
|
+
};
|
|
62
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
63
|
+
inputEl: import("vue").Ref<HTMLInputElement | HTMLTextAreaElement | undefined, HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
64
|
+
focus: typeof focus;
|
|
65
|
+
blur: typeof blur;
|
|
66
|
+
select: typeof select;
|
|
67
|
+
clear: typeof clear;
|
|
68
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
69
|
+
input: (value: string) => any;
|
|
70
|
+
"update:modelValue": (value: string) => any;
|
|
71
|
+
focus: (event: FocusEvent) => any;
|
|
72
|
+
blur: (event: FocusEvent) => any;
|
|
73
|
+
change: (value: string) => any;
|
|
74
|
+
keydown: (event: KeyboardEvent) => any;
|
|
75
|
+
keyup: (event: KeyboardEvent) => any;
|
|
76
|
+
clear: () => any;
|
|
77
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
78
|
+
onInput?: ((value: string) => any) | undefined;
|
|
79
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
80
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
81
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
82
|
+
onChange?: ((value: string) => any) | undefined;
|
|
83
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
84
|
+
onKeyup?: ((event: KeyboardEvent) => any) | undefined;
|
|
85
|
+
onClear?: (() => any) | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
rows: number;
|
|
88
|
+
autocomplete: string;
|
|
89
|
+
modelValue: string;
|
|
90
|
+
readonly: boolean;
|
|
91
|
+
pattern: string;
|
|
92
|
+
type: "text" | "search" | "email" | "tel" | "url";
|
|
93
|
+
invalid: boolean;
|
|
94
|
+
name: string;
|
|
95
|
+
size: "default" | "compact";
|
|
96
|
+
list: string;
|
|
97
|
+
ariaLabel: string;
|
|
98
|
+
id: string;
|
|
99
|
+
disabled: boolean;
|
|
100
|
+
required: boolean;
|
|
101
|
+
variant: "inset" | "control" | "bare";
|
|
102
|
+
placeholder: string;
|
|
103
|
+
maxlength: number;
|
|
104
|
+
minlength: number;
|
|
105
|
+
clearable: boolean;
|
|
106
|
+
clearLabel: string;
|
|
107
|
+
ariaDescribedby: string;
|
|
108
|
+
multiline: boolean;
|
|
109
|
+
prefixIcon: string;
|
|
110
|
+
showCount: boolean;
|
|
111
|
+
monospace: boolean;
|
|
112
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
113
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
114
|
+
declare const _default: typeof __VLS_export;
|
|
115
|
+
export default _default;
|
|
116
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
117
|
+
new (): {
|
|
118
|
+
$slots: S;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type ToastTone = "success" | "warning" | "error" | "info";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
message?: string;
|
|
4
|
+
tone?: ToastTone;
|
|
5
|
+
/** 自动关闭毫秒数;未传入时 error 默认 6000ms,其余默认 4000ms;<= 0 表示常驻不自动关闭 */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** 每次触发提示递增或变化,用于相同文案连续弹出时重置计时器 */
|
|
8
|
+
resetKey?: string | number;
|
|
9
|
+
/** 是否显示手动关闭按钮;未显式传入时 error 或常驻提示默认显示 */
|
|
10
|
+
closable?: boolean;
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
actionLabel?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
/** 是否显示底部倒计时细进度条;未显式传入时,存在 actionLabel 且自动关闭时默认显示 */
|
|
15
|
+
showProgress?: boolean;
|
|
16
|
+
/** 是否优先尝试使用浏览器原生 popover="manual" 进入 Top Layer(避免被模态遮罩遮挡) */
|
|
17
|
+
usePopover?: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare function pauseTimer(): void;
|
|
20
|
+
declare function resumeTimer(): void;
|
|
21
|
+
declare function dismiss(): void;
|
|
22
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
23
|
+
dismiss: typeof dismiss;
|
|
24
|
+
pauseTimer: typeof pauseTimer;
|
|
25
|
+
resumeTimer: typeof resumeTimer;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
close: () => any;
|
|
28
|
+
"update:message": (value: string) => any;
|
|
29
|
+
action: () => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onClose?: (() => any) | undefined;
|
|
32
|
+
"onUpdate:message"?: ((value: string) => any) | undefined;
|
|
33
|
+
onAction?: (() => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
ariaLabel: string;
|
|
36
|
+
closeLabel: string;
|
|
37
|
+
closable: boolean;
|
|
38
|
+
message: string;
|
|
39
|
+
tone: ToastTone;
|
|
40
|
+
duration: number;
|
|
41
|
+
resetKey: string | number;
|
|
42
|
+
actionLabel: string;
|
|
43
|
+
showProgress: boolean;
|
|
44
|
+
usePopover: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id?: string;
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
busy?: boolean;
|
|
8
|
+
compact?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
change: () => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onChange?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tooltip 提示组件:提供对插槽子元素的悬浮提示包裹能力
|
|
3
|
+
*/
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
text?: string;
|
|
6
|
+
content?: string;
|
|
7
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
delay?: number;
|
|
10
|
+
/** 可选快捷键徽标(渲染在提示文本右侧) */
|
|
11
|
+
shortcut?: string;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
|
+
} & {
|
|
17
|
+
default?: (props: typeof __VLS_3) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
placement: "top" | "bottom" | "left" | "right";
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
shortcut: string;
|
|
23
|
+
delay: number;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|