@moubing/bing-ui 0.5.3 → 0.6.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 +95 -16
- package/dist/bing-ui.css +1 -1
- package/dist/bing-ui.es.js +12933 -10167
- package/dist/bing-ui.umd.js +47 -42
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue.d.ts +2 -2
- package/dist/components/BingButton/BingButton.types.d.ts +1 -0
- package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
- package/dist/components/BingCarouselTransition/BingCarouselTransition.vue.d.ts +2 -2
- package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +7 -7
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +6 -6
- package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +4 -4
- package/dist/components/BingCursor/BingCursor.controller.d.ts +13 -0
- package/dist/components/BingCursor/BingCursor.morph.d.ts +9 -0
- package/dist/components/BingCursor/BingCursor.presets.d.ts +5 -0
- package/dist/components/BingCursor/BingCursor.shapes.d.ts +11 -0
- package/dist/components/BingCursor/BingCursor.styleSource.d.ts +5 -0
- package/dist/components/BingCursor/BingCursor.types.d.ts +39 -0
- package/dist/components/BingCursor/BingCursor.vue.d.ts +26 -0
- package/dist/components/BingCursor/BingCursorMorph.vue.d.ts +11 -0
- package/dist/components/BingCursor/BingCursorTransition.vue.d.ts +28 -0
- package/dist/components/BingCursor/index.d.ts +2 -0
- package/dist/components/BingDatePicker/BingDatePicker.types.d.ts +1 -0
- package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +4 -4
- package/dist/components/BingDeckTransition/BingDeckTransition.vue.d.ts +2 -2
- package/dist/components/BingDialog/BingDialog.vue.d.ts +3 -3
- package/dist/components/BingDropDown/BingDropDown.context.d.ts +1 -0
- package/dist/components/BingDropDown/BingDropDown.vue.d.ts +2 -2
- package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
- package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +6 -6
- package/dist/components/BingForm/BingForm.context.d.ts +19 -2
- package/dist/components/BingForm/BingForm.types.d.ts +6 -1
- package/dist/components/BingForm/BingForm.vue.d.ts +4 -2
- package/dist/components/BingForm/formFocus.d.ts +3 -0
- package/dist/components/BingForm/formTabOrder.d.ts +2 -0
- package/dist/components/BingForm/useFormControl.d.ts +21 -0
- package/dist/components/BingForm/useFormNextHint.d.ts +16 -0
- package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
- package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +3 -3
- package/dist/components/BingInput/BingInput.types.d.ts +11 -3
- package/dist/components/BingInput/BingInput.vue.d.ts +9 -7
- package/dist/components/BingInput/useInputCaret.d.ts +3 -0
- package/dist/components/BingRadio/BingRadio.vue.d.ts +7 -7
- package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +6 -6
- package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
- package/dist/components/BingScrollbar/BingScrollbar.types.d.ts +17 -0
- package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +6 -9
- package/dist/components/BingScrollbar/index.d.ts +1 -1
- package/dist/components/BingSelect/BingSelect.vue.d.ts +8 -8
- package/dist/components/BingSortableList/BingSortableList.types.d.ts +2 -0
- package/dist/components/BingSortableList/BingSortableList.vue.d.ts +1 -0
- package/dist/components/BingTable/BingTable.vue.d.ts +10 -10
- package/dist/components/BingTable/BingTableCellValue.vue.d.ts +20 -0
- package/dist/components/BingTable/BingTableHeaderContent.vue.d.ts +39 -0
- package/dist/components/BingTabs/BingTabs.vue.d.ts +6 -6
- package/dist/components/BingTextarea/BingTextarea.types.d.ts +1 -0
- package/dist/components/BingTextarea/BingTextarea.vue.d.ts +7 -6
- package/dist/components/BingTooltip/BingTooltip.shared.d.ts +1 -0
- package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -4
- package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +8 -8
- package/dist/components/index.d.ts +1 -0
- package/dist/motion/clickParticles.d.ts +4 -0
- package/dist/motion/liquidHover.d.ts +4 -0
- package/dist/motion/panelMotion.d.ts +14 -0
- package/dist/motion/selectPanelMotion.d.ts +16 -0
- package/dist/motion/useClickFeedback.d.ts +6 -0
- package/dist/utils/controlAttrs.d.ts +8 -0
- package/dist/utils/overlay.d.ts +28 -0
- package/dist/utils/scrollLock.d.ts +5 -0
- package/package.json +1 -1
|
@@ -4,11 +4,11 @@ type __VLS_Slots = {
|
|
|
4
4
|
default?: (props: BingAppSwitcherTransitionSlotProps) => unknown;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingAppSwitcherTransitionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (value: BingTabValue) => any;
|
|
8
7
|
change: (payload: import('./BingAppSwitcherTransition.types').BingAppSwitcherTransitionChangePayload) => any;
|
|
8
|
+
"update:modelValue": (value: BingTabValue) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<BingAppSwitcherTransitionProps> & Readonly<{
|
|
10
|
-
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
11
10
|
onChange?: ((payload: import('./BingAppSwitcherTransition.types').BingAppSwitcherTransitionChangePayload) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
respectReducedMotion: boolean;
|
|
@@ -8,14 +8,14 @@ type __VLS_Slots = {} & {
|
|
|
8
8
|
suffix?: (props: typeof __VLS_11) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import('vue').DefineComponent<BingButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
focus: (event: FocusEvent) => any;
|
|
12
11
|
blur: (event: FocusEvent) => any;
|
|
13
12
|
click: (event: MouseEvent) => any;
|
|
13
|
+
focus: (event: FocusEvent) => any;
|
|
14
14
|
throttled: (payload: import('./BingButton.types').BingButtonThrottledPayload) => any;
|
|
15
15
|
}, string, import('vue').PublicProps, Readonly<BingButtonProps> & Readonly<{
|
|
16
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
17
16
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
18
17
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
18
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
19
19
|
onThrottled?: ((payload: import('./BingButton.types').BingButtonThrottledPayload) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
disabled: boolean;
|
|
@@ -4,11 +4,11 @@ type __VLS_Slots = {
|
|
|
4
4
|
default?: (props: BingCarouselTransitionSlotProps) => unknown;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingCarouselTransitionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (value: BingTabValue) => any;
|
|
8
7
|
change: (payload: import('./BingCarouselTransition.types').BingCarouselTransitionChangePayload) => any;
|
|
8
|
+
"update:modelValue": (value: BingTabValue) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<BingCarouselTransitionProps> & Readonly<{
|
|
10
|
-
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
11
10
|
onChange?: ((payload: import('./BingCarouselTransition.types').BingCarouselTransitionChangePayload) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
respectReducedMotion: boolean;
|
|
@@ -4,26 +4,26 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_13) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingCheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (value: boolean) => any;
|
|
8
7
|
change: (value: boolean, event: Event) => any;
|
|
9
|
-
focus: (event: FocusEvent) => any;
|
|
10
8
|
blur: (event: FocusEvent) => any;
|
|
9
|
+
focus: (event: FocusEvent) => any;
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingCheckboxProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
13
12
|
onChange?: ((value: boolean, event: Event) => any) | undefined;
|
|
14
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
15
13
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
14
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
label: string;
|
|
19
|
-
|
|
19
|
+
id: string;
|
|
20
20
|
ariaLabel: string;
|
|
21
|
+
name: string;
|
|
22
|
+
value: string | number;
|
|
21
23
|
modelValue: boolean;
|
|
22
24
|
size: import('./BingCheckbox.types').BingCheckboxSize;
|
|
23
|
-
name: string;
|
|
24
25
|
tone: import('./BingCheckbox.types').BingCheckboxTone;
|
|
25
26
|
decorative: boolean;
|
|
26
|
-
id: string;
|
|
27
27
|
indeterminate: boolean;
|
|
28
28
|
shape: import('./BingCheckbox.types').BingCheckboxShape;
|
|
29
29
|
ariaDescribedby: string;
|
|
@@ -4,23 +4,23 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingCheckboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (value: BingCheckboxGroupValue[]) => any;
|
|
8
7
|
change: (value: BingCheckboxGroupValue[], event: Event) => any;
|
|
9
|
-
focus: (event: FocusEvent) => any;
|
|
10
8
|
blur: (event: FocusEvent) => any;
|
|
9
|
+
focus: (event: FocusEvent) => any;
|
|
10
|
+
"update:modelValue": (value: BingCheckboxGroupValue[]) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingCheckboxGroupProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value: BingCheckboxGroupValue[]) => any) | undefined;
|
|
13
12
|
onChange?: ((value: BingCheckboxGroupValue[], event: Event) => any) | undefined;
|
|
14
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
15
13
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
14
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: BingCheckboxGroupValue[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
direction: import('./BingCheckboxGroup.types').BingCheckboxGroupDirection;
|
|
19
|
+
id: string;
|
|
19
20
|
ariaLabel: string;
|
|
21
|
+
name: string;
|
|
20
22
|
modelValue: BingCheckboxGroupValue[];
|
|
21
23
|
size: import('./BingCheckboxGroup.types').BingCheckboxGroupSize;
|
|
22
|
-
name: string;
|
|
23
|
-
id: string;
|
|
24
24
|
ariaDescribedby: string;
|
|
25
25
|
status: "default" | "error" | "success" | "warning";
|
|
26
26
|
options: BingCheckboxGroupOption[];
|
|
@@ -2,32 +2,32 @@ import { BingColorPickerChangePayload, BingColorPickerExpose, BingColorPickerPre
|
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
4
4
|
declare const __VLS_export: import('vue').DefineComponent<BingColorPickerProps, BingColorPickerExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
"update:modelValue": (value: string) => any;
|
|
6
5
|
change: (payload: BingColorPickerChangePayload) => any;
|
|
7
6
|
close: () => any;
|
|
8
7
|
copy: (payload: import('./BingColorPicker.types').BingColorPickerCopyPayload) => any;
|
|
8
|
+
"update:modelValue": (value: string) => any;
|
|
9
9
|
copyError: (error: Error) => any;
|
|
10
10
|
open: () => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingColorPickerProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
13
12
|
onChange?: ((payload: BingColorPickerChangePayload) => any) | undefined;
|
|
14
13
|
onClose?: (() => any) | undefined;
|
|
15
14
|
onCopy?: ((payload: import('./BingColorPicker.types').BingColorPickerCopyPayload) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
16
|
onCopyError?: ((error: Error) => any) | undefined;
|
|
17
17
|
onOpen?: (() => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
minWidth: string | number;
|
|
21
21
|
width: string | number;
|
|
22
|
-
|
|
22
|
+
id: string;
|
|
23
23
|
ariaLabel: string;
|
|
24
|
+
glass: boolean;
|
|
24
25
|
modelValue: import('./BingColorPicker.types').BingColorPickerModelValue;
|
|
25
26
|
size: import('./BingColorPicker.types').BingColorPickerSize;
|
|
26
27
|
block: boolean;
|
|
27
28
|
glassBlur: string | number;
|
|
28
29
|
glassOpacity: number;
|
|
29
30
|
glassSaturation: number;
|
|
30
|
-
id: string;
|
|
31
31
|
ariaDescribedby: string;
|
|
32
32
|
status: "default" | "error" | "success" | "warning";
|
|
33
33
|
copyLabel: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BingCursorProps, BingCursorSlotProps } from './BingCursor.types';
|
|
2
|
+
interface CursorOwner {
|
|
3
|
+
root: HTMLElement;
|
|
4
|
+
options: () => BingCursorProps;
|
|
5
|
+
show: (state: Omit<BingCursorSlotProps, 'size'>, x: number, y: number) => boolean;
|
|
6
|
+
move: (x: number, y: number) => void;
|
|
7
|
+
hide: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function registerCursor(owner: CursorOwner): {
|
|
10
|
+
refresh: () => void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BingCursorType } from './BingCursor.types';
|
|
2
|
+
/** 把点击热点统一对齐到画布中心,轮廓形变不带动鼠标位置。 */
|
|
3
|
+
export declare function alignCursorPaths(type: BingCursorType, hotspot: readonly [number, number], size: number): {
|
|
4
|
+
d: string;
|
|
5
|
+
ink: number;
|
|
6
|
+
outline: number;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
opacity: number;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BingCursorType } from './BingCursor.types';
|
|
2
|
+
export declare const cursorHotspots: Record<BingCursorType, readonly [number, number]>;
|
|
3
|
+
export declare function isCursorType(value: string): value is BingCursorType;
|
|
4
|
+
/** null 表示保留原生光标(例如 busy、外部图片、自定义原生控件)。 */
|
|
5
|
+
export declare function resolveCursorType(target: Element, cssCursor: string, requested?: BingCursorType | 'auto', pressed?: boolean): BingCursorType | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BingCursorType } from './BingCursor.types';
|
|
2
|
+
export interface CursorPath {
|
|
3
|
+
d: string;
|
|
4
|
+
/** 1 为主色,0 为描边色;形变时同步插值这两个颜色。 */
|
|
5
|
+
ink: number;
|
|
6
|
+
outline: number;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
opacity: number;
|
|
9
|
+
}
|
|
10
|
+
/** 预览与鼠标共用相同的四层路径:主体轮廓和三个细节,始终保持节点身份。 */
|
|
11
|
+
export declare const cursorShapes: Record<BingCursorType, readonly CursorPath[]>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export type BingCursorType = 'default' | 'pointer' | 'not-allowed' | 'text' | 'grab' | 'grabbing' | 'move' | 'crosshair' | 'col-resize' | 'row-resize' | 'ew-resize' | 'ns-resize' | 'nwse-resize' | 'nesw-resize' | 'zoom-in' | 'zoom-out';
|
|
3
|
+
export type BingCursorMode = 'replace' | 'follow';
|
|
4
|
+
export interface BingCursorProps {
|
|
5
|
+
/** 自动识别元素的 CSS cursor 和交互语义,也可固定一种光标。 */
|
|
6
|
+
type?: BingCursorType | 'auto';
|
|
7
|
+
/** replace 使用自定义光标;follow 保留原生光标并显示跟随圆环。 */
|
|
8
|
+
mode?: BingCursorMode;
|
|
9
|
+
/** 默认只作用于默认插槽的内容;开启后作用于当前文档。 */
|
|
10
|
+
global?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 光标画布大小,单位 px。 */
|
|
13
|
+
size?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
outlineColor?: string;
|
|
16
|
+
/** 自定义插槽的点击热点,相对于插槽左上角,单位 px。 */
|
|
17
|
+
hotspot?: readonly [number, number];
|
|
18
|
+
/** 仅跟随模式使用,单位秒;替换模式始终精确定位。 */
|
|
19
|
+
followDuration?: number;
|
|
20
|
+
/** 内置 SVG 轮廓形变与自定义提示的过渡时长,单位秒,默认 0.24;设为 0 关闭。 */
|
|
21
|
+
transitionDuration?: number;
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface BingCursorSlotProps {
|
|
25
|
+
type: BingCursorType;
|
|
26
|
+
pressed: boolean;
|
|
27
|
+
size: number;
|
|
28
|
+
/** 来自当前元素或祖先的 data-bing-cursor-label。 */
|
|
29
|
+
label: string;
|
|
30
|
+
target: Element | null;
|
|
31
|
+
}
|
|
32
|
+
export interface BingCursorSlots {
|
|
33
|
+
default?: () => VNode[];
|
|
34
|
+
cursor?: (props: BingCursorSlotProps) => VNode[];
|
|
35
|
+
}
|
|
36
|
+
export interface BingCursorEmits {
|
|
37
|
+
change: [type: BingCursorType];
|
|
38
|
+
'visibility-change': [visible: boolean];
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BingCursorProps, BingCursorSlots, BingCursorType } from './BingCursor.types';
|
|
2
|
+
type __VLS_Slots = BingCursorSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<BingCursorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
change: (type: BingCursorType) => any;
|
|
5
|
+
"visibility-change": (visible: boolean) => any;
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<BingCursorProps> & Readonly<{
|
|
7
|
+
onChange?: ((type: BingCursorType) => any) | undefined;
|
|
8
|
+
"onVisibility-change"?: ((visible: boolean) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
transitionDuration: number;
|
|
12
|
+
zIndex: number;
|
|
13
|
+
type: BingCursorType | "auto";
|
|
14
|
+
mode: import('./BingCursor.types').BingCursorMode;
|
|
15
|
+
size: number;
|
|
16
|
+
global: boolean;
|
|
17
|
+
followDuration: number;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BingCursorType } from './BingCursor.types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
type: BingCursorType;
|
|
4
|
+
size: number;
|
|
5
|
+
hotspot: readonly [number, number];
|
|
6
|
+
duration: number;
|
|
7
|
+
active: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BingCursorMode, BingCursorSlotProps } from './BingCursor.types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
state: BingCursorSlotProps;
|
|
4
|
+
hotspot: readonly [number, number];
|
|
5
|
+
duration: number;
|
|
6
|
+
active: boolean;
|
|
7
|
+
mode: BingCursorMode;
|
|
8
|
+
custom: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_1: {
|
|
11
|
+
type: import('./BingCursor.types').BingCursorType;
|
|
12
|
+
pressed: boolean;
|
|
13
|
+
size: number;
|
|
14
|
+
label: string;
|
|
15
|
+
target: Element | null;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -2,26 +2,27 @@ import { Dayjs } from 'dayjs';
|
|
|
2
2
|
import { BingDatePickerChangePayload, BingDatePickerExpose, BingDatePickerModelValue, BingDatePickerProps, BingDatePickerType } from './BingDatePicker.types';
|
|
3
3
|
declare const __VLS_export: import('vue').DefineComponent<BingDatePickerProps, BingDatePickerExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
4
|
clear: () => any;
|
|
5
|
-
"update:modelValue": (value: BingDatePickerModelValue) => any;
|
|
6
5
|
change: (payload: BingDatePickerChangePayload) => any;
|
|
7
6
|
cancel: () => any;
|
|
8
7
|
close: () => any;
|
|
8
|
+
"update:modelValue": (value: BingDatePickerModelValue) => any;
|
|
9
9
|
open: () => any;
|
|
10
10
|
confirm: (payload: BingDatePickerChangePayload) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingDatePickerProps> & Readonly<{
|
|
12
12
|
onClear?: (() => any) | undefined;
|
|
13
|
-
"onUpdate:modelValue"?: ((value: BingDatePickerModelValue) => any) | undefined;
|
|
14
13
|
onChange?: ((payload: BingDatePickerChangePayload) => any) | undefined;
|
|
15
14
|
onCancel?: (() => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
"onUpdate:modelValue"?: ((value: BingDatePickerModelValue) => any) | undefined;
|
|
17
17
|
onOpen?: (() => any) | undefined;
|
|
18
18
|
onConfirm?: ((payload: BingDatePickerChangePayload) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
20
|
disabled: boolean;
|
|
21
21
|
minWidth: string | number;
|
|
22
|
+
id: string;
|
|
22
23
|
type: BingDatePickerType;
|
|
23
|
-
glass: boolean;
|
|
24
24
|
ariaLabel: string;
|
|
25
|
+
glass: boolean;
|
|
25
26
|
modelValue: BingDatePickerModelValue;
|
|
26
27
|
size: import('./BingDatePicker.types').BingDatePickerSize;
|
|
27
28
|
block: boolean;
|
|
@@ -29,7 +30,6 @@ declare const __VLS_export: import('vue').DefineComponent<BingDatePickerProps, B
|
|
|
29
30
|
glassBlur: string | number;
|
|
30
31
|
glassOpacity: number;
|
|
31
32
|
glassSaturation: number;
|
|
32
|
-
id: string;
|
|
33
33
|
ariaDescribedby: string;
|
|
34
34
|
status: "default" | "error" | "success" | "warning";
|
|
35
35
|
range: boolean;
|
|
@@ -5,11 +5,11 @@ type __VLS_Slots = {
|
|
|
5
5
|
controls?: (props: BingDeckTransitionControlsSlotProps) => unknown;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import('vue').DefineComponent<BingDeckTransitionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
"update:modelValue": (value: BingTabValue) => any;
|
|
9
8
|
change: (payload: import('./BingDeckTransition.types').BingDeckTransitionChangePayload) => any;
|
|
9
|
+
"update:modelValue": (value: BingTabValue) => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<BingDeckTransitionProps> & Readonly<{
|
|
11
|
-
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
12
11
|
onChange?: ((payload: import('./BingDeckTransition.types').BingDeckTransitionChangePayload) => any) | undefined;
|
|
12
|
+
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
14
|
disabled: boolean;
|
|
15
15
|
respectReducedMotion: boolean;
|
|
@@ -15,21 +15,21 @@ type __VLS_Slots = {} & {
|
|
|
15
15
|
footer?: (props: typeof __VLS_38) => any;
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_base: import('vue').DefineComponent<BingDialogProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
-
"update:modelValue": (value: boolean) => any;
|
|
19
18
|
cancel: () => any;
|
|
20
19
|
close: (reason: BingDialogCloseReason) => any;
|
|
20
|
+
"update:modelValue": (value: boolean) => any;
|
|
21
21
|
confirm: () => any;
|
|
22
22
|
}, string, import('vue').PublicProps, Readonly<BingDialogProps> & Readonly<{
|
|
23
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
24
23
|
onCancel?: (() => any) | undefined;
|
|
25
24
|
onClose?: ((reason: BingDialogCloseReason) => any) | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
26
26
|
onConfirm?: (() => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
width: string | number;
|
|
29
29
|
zIndex: number;
|
|
30
30
|
title: string;
|
|
31
|
-
glass: boolean;
|
|
32
31
|
ariaLabel: string;
|
|
32
|
+
glass: boolean;
|
|
33
33
|
modelValue: boolean;
|
|
34
34
|
smoothScroll: import('../..').SmoothScrollValue;
|
|
35
35
|
glassBlur: string | number;
|
|
@@ -19,17 +19,17 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<BingDr
|
|
|
19
19
|
"onAfter-leave"?: (() => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
trigger: import('./BingDropDown.types').BingDropDownTrigger;
|
|
22
|
-
glass: boolean;
|
|
23
22
|
ariaLabel: string;
|
|
23
|
+
glass: boolean;
|
|
24
24
|
size: import('./BingDropDown.types').BingDropDownSize;
|
|
25
25
|
block: boolean;
|
|
26
26
|
loop: boolean;
|
|
27
27
|
glassBlur: string | number;
|
|
28
28
|
glassOpacity: number;
|
|
29
29
|
glassSaturation: number;
|
|
30
|
+
open: boolean | null;
|
|
30
31
|
placement: BingDropDownPlacement;
|
|
31
32
|
closeOnOutside: boolean;
|
|
32
|
-
open: boolean | null;
|
|
33
33
|
panelClass: string;
|
|
34
34
|
closeOnEscape: boolean;
|
|
35
35
|
autoFocus: boolean;
|
|
@@ -9,10 +9,10 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<BingDr
|
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
title: string;
|
|
11
11
|
ariaLabel: string;
|
|
12
|
+
target: string;
|
|
12
13
|
description: string;
|
|
13
14
|
icon: import('vue').Component;
|
|
14
15
|
tone: import('./BingDropDown.types').BingDropDownItemTone;
|
|
15
|
-
target: string;
|
|
16
16
|
href: string;
|
|
17
17
|
active: boolean;
|
|
18
18
|
shortcut: string | string[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { BingFilePreviewCloseReason, BingFilePreviewFile, BingFilePreviewProps } from './BingFilePreview.types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<BingFilePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
"update:modelValue": (value: boolean) => any;
|
|
4
|
-
error: (error: Error) => any;
|
|
5
3
|
close: (reason: BingFilePreviewCloseReason) => any;
|
|
4
|
+
error: (error: Error) => any;
|
|
5
|
+
"update:modelValue": (value: boolean) => any;
|
|
6
6
|
download: (payload: import('./BingFilePreview.types').BingFilePreviewDownloadPayload) => any;
|
|
7
7
|
openExternal: (payload: import('./BingFilePreview.types').BingFilePreviewOpenExternalPayload) => any;
|
|
8
8
|
}, string, import('vue').PublicProps, Readonly<BingFilePreviewProps> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
|
-
onError?: ((error: Error) => any) | undefined;
|
|
11
9
|
onClose?: ((reason: BingFilePreviewCloseReason) => any) | undefined;
|
|
10
|
+
onError?: ((error: Error) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
12
12
|
onDownload?: ((payload: import('./BingFilePreview.types').BingFilePreviewDownloadPayload) => any) | undefined;
|
|
13
13
|
onOpenExternal?: ((payload: import('./BingFilePreview.types').BingFilePreviewOpenExternalPayload) => any) | undefined;
|
|
14
14
|
}>, {
|
|
@@ -17,12 +17,12 @@ declare const __VLS_export: import('vue').DefineComponent<BingFilePreviewProps,
|
|
|
17
17
|
width: string | number;
|
|
18
18
|
zIndex: number;
|
|
19
19
|
type: import('./BingFilePreview.types').BingFilePreviewKind;
|
|
20
|
-
glass: boolean;
|
|
21
20
|
ariaLabel: string;
|
|
21
|
+
name: string;
|
|
22
|
+
glass: boolean;
|
|
22
23
|
modelValue: boolean;
|
|
23
24
|
size: number;
|
|
24
25
|
smoothScroll: import('../..').SmoothScrollValue;
|
|
25
|
-
name: string;
|
|
26
26
|
glassBlur: string | number;
|
|
27
27
|
glassOpacity: number;
|
|
28
28
|
glassSaturation: number;
|
|
@@ -3,6 +3,16 @@ import { BingControlStatus, BingFormBreakpoint, BingFormErrors, BingFormLabelPos
|
|
|
3
3
|
export interface BingFormFieldRegistration {
|
|
4
4
|
prop: string;
|
|
5
5
|
scrollToField: () => void;
|
|
6
|
+
element: () => HTMLElement | null;
|
|
7
|
+
target: () => HTMLElement | null;
|
|
8
|
+
}
|
|
9
|
+
export interface BingFormNextHintField {
|
|
10
|
+
element: () => HTMLElement | null;
|
|
11
|
+
target: () => HTMLElement | null;
|
|
12
|
+
label: () => string;
|
|
13
|
+
}
|
|
14
|
+
export interface BingFormNextHintContext {
|
|
15
|
+
register: (field: BingFormNextHintField) => () => void;
|
|
6
16
|
}
|
|
7
17
|
export interface BingFormContext {
|
|
8
18
|
size: ComputedRef<BingFormSize>;
|
|
@@ -15,6 +25,7 @@ export interface BingFormContext {
|
|
|
15
25
|
getFieldErrors: (prop: string) => string[];
|
|
16
26
|
registerField: (field: BingFormFieldRegistration) => void;
|
|
17
27
|
unregisterField: (field: BingFormFieldRegistration) => void;
|
|
28
|
+
nextHint?: BingFormNextHintContext;
|
|
18
29
|
}
|
|
19
30
|
export interface BingFormItemContext {
|
|
20
31
|
controlId: ComputedRef<string>;
|
|
@@ -25,7 +36,13 @@ export interface BingFormItemContext {
|
|
|
25
36
|
disabled: ComputedRef<boolean>;
|
|
26
37
|
handleControlChange: () => void;
|
|
27
38
|
handleControlBlur: () => void;
|
|
39
|
+
labelId?: ComputedRef<string | undefined>;
|
|
40
|
+
nextControlId?: (fallbackId: string) => string;
|
|
41
|
+
registerControl?: (control: {
|
|
42
|
+
id: ComputedRef<string>;
|
|
43
|
+
group: boolean;
|
|
44
|
+
}) => () => void;
|
|
28
45
|
}
|
|
29
|
-
export declare const bingFormContextKey: InjectionKey<BingFormContext>;
|
|
30
|
-
export declare const bingFormItemContextKey: InjectionKey<BingFormItemContext>;
|
|
46
|
+
export declare const bingFormContextKey: InjectionKey<BingFormContext | null>;
|
|
47
|
+
export declare const bingFormItemContextKey: InjectionKey<BingFormItemContext | null>;
|
|
31
48
|
export declare function cloneErrors(errors: BingFormErrors): BingFormErrors;
|
|
@@ -3,7 +3,7 @@ export type BingControlStatus = 'default' | 'error' | 'success' | 'warning';
|
|
|
3
3
|
export type BingFormSize = 'sm' | 'md' | 'lg';
|
|
4
4
|
export type BingFormLayout = 'grid' | 'stack' | 'inline';
|
|
5
5
|
export type BingFormLabelPosition = 'top' | 'left';
|
|
6
|
-
export type BingFormValidateTrigger = 'change' | 'blur' | 'submit' | 'manual';
|
|
6
|
+
export type BingFormValidateTrigger = 'auto' | 'change' | 'blur' | 'submit' | 'manual';
|
|
7
7
|
export type BingFormBreakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
8
|
export type BingFormResponsiveNumber = number | Partial<Record<BingFormBreakpoint, number>>;
|
|
9
9
|
export type BingFormGap = string | number | {
|
|
@@ -23,8 +23,13 @@ export interface BingFormProps {
|
|
|
23
23
|
labelWidth?: string | number;
|
|
24
24
|
size?: BingFormSize;
|
|
25
25
|
disabled?: boolean;
|
|
26
|
+
/** 默认 auto:离开字段或提交时校验,已有错误的字段在修改时重新检查。 */
|
|
26
27
|
validateTrigger?: BingFormValidateTrigger | BingFormValidateTrigger[];
|
|
27
28
|
scrollToError?: boolean;
|
|
29
|
+
/** 提交失败后聚焦第一个可用错误字段。默认 true;异步等待期间继续操作时不抢焦点。 */
|
|
30
|
+
focusOnError?: boolean;
|
|
31
|
+
/** 实验性:显示实际下一 Tab 落点的轻提示,不改写键盘行为;默认关闭。业务提交成功后可设为 false。 */
|
|
32
|
+
nextStepHint?: boolean;
|
|
28
33
|
}
|
|
29
34
|
export interface BingFormValidationResult {
|
|
30
35
|
valid: boolean;
|
|
@@ -4,11 +4,11 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingFormProps, BingFormExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
submit: (payload: import('./BingForm.types').BingFormSubmitPayload) => any;
|
|
8
7
|
invalid: (payload: BingFormValidationResult) => any;
|
|
8
|
+
submit: (payload: import('./BingForm.types').BingFormSubmitPayload) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<BingFormProps> & Readonly<{
|
|
10
|
-
onSubmit?: ((payload: import('./BingForm.types').BingFormSubmitPayload) => any) | undefined;
|
|
11
10
|
onInvalid?: ((payload: BingFormValidationResult) => any) | undefined;
|
|
11
|
+
onSubmit?: ((payload: import('./BingForm.types').BingFormSubmitPayload) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
columns: BingFormResponsiveNumber;
|
|
@@ -21,6 +21,8 @@ declare const __VLS_base: import('vue').DefineComponent<BingFormProps, BingFormE
|
|
|
21
21
|
labelWidth: string | number;
|
|
22
22
|
validateTrigger: BingFormValidateTrigger | BingFormValidateTrigger[];
|
|
23
23
|
scrollToError: boolean;
|
|
24
|
+
focusOnError: boolean;
|
|
25
|
+
nextStepHint: boolean;
|
|
24
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BingControlStatus } from './BingForm.types';
|
|
2
|
+
export declare function useFormControl<Size extends string | number>(props: {
|
|
3
|
+
id?: string;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
status?: BingControlStatus;
|
|
7
|
+
ariaDescribedby?: string;
|
|
8
|
+
}, options?: {
|
|
9
|
+
group?: boolean;
|
|
10
|
+
register?: boolean;
|
|
11
|
+
}): {
|
|
12
|
+
formItem: import('./BingForm.context').BingFormItemContext | null;
|
|
13
|
+
resolvedId: import('vue').ComputedRef<string>;
|
|
14
|
+
resolvedSize: import('vue').ComputedRef<import('./BingForm.types').BingFormSize | Size>;
|
|
15
|
+
resolvedDisabled: import('vue').ComputedRef<boolean>;
|
|
16
|
+
resolvedStatus: import('vue').ComputedRef<BingControlStatus>;
|
|
17
|
+
resolvedAriaDescribedby: import('vue').ComputedRef<string | undefined>;
|
|
18
|
+
resolvedAriaLabelledby: import('vue').ComputedRef<string | undefined>;
|
|
19
|
+
};
|
|
20
|
+
/** 复合控件内部的搜索框、选项等不再注册为外部表单字段。 */
|
|
21
|
+
export declare function isolateFormControls(): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties, Ref } from 'vue';
|
|
2
|
+
import { BingFormNextHintContext } from './BingForm.context';
|
|
3
|
+
interface NextHint {
|
|
4
|
+
target: HTMLElement;
|
|
5
|
+
anchor: HTMLElement;
|
|
6
|
+
text: string;
|
|
7
|
+
offscreen: boolean;
|
|
8
|
+
submit: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** 每个表单只有一个不可交互的提示;用户仍由浏览器原生 Tab 顺序导航。 */
|
|
11
|
+
export declare function useFormNextHint(root: Ref<HTMLFormElement | null>, hintRef: Ref<HTMLElement | null>, enabled: () => boolean): {
|
|
12
|
+
context: BingFormNextHintContext;
|
|
13
|
+
hint: import('vue').ShallowRef<NextHint | null, NextHint | null>;
|
|
14
|
+
style: import('vue').ShallowRef<CSSProperties, CSSProperties>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|