@moubing/bing-ui 0.5.3 → 0.7.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 +157 -93
- package/dist/bing-ui.css +1 -1
- package/dist/bing-ui.es.js +12362 -10240
- 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.native.d.ts +3 -0
- package/dist/components/BingCursor/BingCursor.presets.d.ts +5 -0
- package/dist/components/BingCursor/BingCursor.shapes.d.ts +10 -0
- package/dist/components/BingCursor/BingCursor.styleSource.d.ts +5 -0
- package/dist/components/BingCursor/BingCursor.types.d.ts +22 -0
- package/dist/components/BingCursor/BingCursor.vue.d.ts +22 -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.measurements.d.ts +11 -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, BingCursorType } from './BingCursor.types';
|
|
2
|
+
interface CursorOwner {
|
|
3
|
+
root: HTMLElement;
|
|
4
|
+
options: () => BingCursorProps;
|
|
5
|
+
show: (type: BingCursorType) => void;
|
|
6
|
+
hide: () => void;
|
|
7
|
+
nativeCursor: (type: BingCursorType) => string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare function registerCursor(owner: CursorOwner): {
|
|
10
|
+
refresh: () => void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -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,10 @@
|
|
|
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
|
+
}
|
|
9
|
+
/** 预览与原生光标图片共用的静态路径。 */
|
|
10
|
+
export declare const cursorShapes: Record<BingCursorType, readonly CursorPath[]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 interface BingCursorProps {
|
|
4
|
+
/** 自动识别元素的 CSS cursor 和交互语义,也可固定一种光标。 */
|
|
5
|
+
type?: BingCursorType | 'auto';
|
|
6
|
+
/** 默认只作用于默认插槽的内容;开启后作用于当前文档。 */
|
|
7
|
+
global?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** 光标画布大小,单位 px。 */
|
|
10
|
+
size?: number;
|
|
11
|
+
color?: string;
|
|
12
|
+
outlineColor?: string;
|
|
13
|
+
/** 点击热点,相对于光标左上角,单位 px;原生渲染会取整并限制在画布内。 */
|
|
14
|
+
hotspot?: readonly [number, number];
|
|
15
|
+
}
|
|
16
|
+
export interface BingCursorSlots {
|
|
17
|
+
default?: () => VNode[];
|
|
18
|
+
}
|
|
19
|
+
export interface BingCursorEmits {
|
|
20
|
+
change: [type: BingCursorType];
|
|
21
|
+
'visibility-change': [visible: boolean];
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
type: BingCursorType | "auto";
|
|
12
|
+
size: number;
|
|
13
|
+
global: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -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 {};
|
|
@@ -14,8 +14,8 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
declare const __VLS_base: import('vue').DefineComponent<BingFormItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BingFormItemProps> & Readonly<{}>, {
|
|
15
15
|
label: string;
|
|
16
16
|
span: BingFormResponsiveNumber;
|
|
17
|
-
required: boolean;
|
|
18
17
|
prop: string;
|
|
18
|
+
required: boolean;
|
|
19
19
|
help: string;
|
|
20
20
|
labelPosition: import('..').BingFormLabelPosition;
|
|
21
21
|
showMessage: boolean;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { BingImagePreviewCloseReason, BingImagePreviewProps } from './BingImagePreview.types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<BingImagePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
"update:modelValue": (value: boolean) => any;
|
|
4
3
|
change: (index: number, item: import('./BingImagePreview.types').BingImagePreviewItem) => any;
|
|
5
4
|
close: (reason: BingImagePreviewCloseReason) => any;
|
|
5
|
+
"update:modelValue": (value: boolean) => any;
|
|
6
6
|
"update:currentIndex": (value: number) => any;
|
|
7
7
|
download: (payload: import('./BingImagePreview.types').BingImagePreviewDownloadPayload) => any;
|
|
8
8
|
}, string, import('vue').PublicProps, Readonly<BingImagePreviewProps> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
9
|
onChange?: ((index: number, item: import('./BingImagePreview.types').BingImagePreviewItem) => any) | undefined;
|
|
11
10
|
onClose?: ((reason: BingImagePreviewCloseReason) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
12
12
|
"onUpdate:currentIndex"?: ((value: number) => any) | undefined;
|
|
13
13
|
onDownload?: ((payload: import('./BingImagePreview.types').BingImagePreviewDownloadPayload) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
zIndex: number;
|
|
16
|
-
glass: boolean;
|
|
17
16
|
ariaLabel: string;
|
|
17
|
+
glass: boolean;
|
|
18
18
|
modelValue: boolean;
|
|
19
19
|
items: import('./BingImagePreview.types').BingImagePreviewItem[];
|
|
20
20
|
loop: boolean;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
export type BingInputSize = 'sm' | 'md' | 'lg';
|
|
3
|
-
export type BingInputType = 'text' | 'search' | 'email' | 'password' | 'tel' | 'url';
|
|
3
|
+
export type BingInputType = 'text' | 'search' | 'email' | 'password' | 'tel' | 'url' | 'number';
|
|
4
4
|
export interface BingInputProps {
|
|
5
5
|
id?: string;
|
|
6
|
-
modelValue?: string;
|
|
6
|
+
modelValue?: string | number | null;
|
|
7
7
|
type?: BingInputType;
|
|
8
|
+
min?: number | string;
|
|
9
|
+
max?: number | string;
|
|
10
|
+
step?: number | string;
|
|
8
11
|
placeholder?: string;
|
|
9
12
|
disabled?: boolean;
|
|
13
|
+
readonly?: boolean;
|
|
14
|
+
/** 搜索输入默认开启,其他类型默认关闭;可显式覆盖。 */
|
|
10
15
|
clearable?: boolean;
|
|
16
|
+
/** 默认开启约 90ms 的光标位移过渡;不支持精确定位或使用输入法组字时保留原生光标。 */
|
|
17
|
+
smoothCaret?: boolean;
|
|
11
18
|
icon?: Component;
|
|
12
19
|
iconLabel?: string;
|
|
13
20
|
size?: BingInputSize;
|
|
@@ -18,11 +25,12 @@ export interface BingInputProps {
|
|
|
18
25
|
ariaDescribedby?: string;
|
|
19
26
|
status?: 'default' | 'error' | 'success' | 'warning';
|
|
20
27
|
name?: string;
|
|
28
|
+
/** 浏览器自动填充设置,默认 'off'。 */
|
|
21
29
|
autocomplete?: string;
|
|
22
30
|
spellcheck?: boolean | 'true' | 'false';
|
|
23
31
|
}
|
|
24
32
|
export interface BingInputEmits {
|
|
25
|
-
'update:modelValue': [value: string];
|
|
33
|
+
'update:modelValue': [value: string | number];
|
|
26
34
|
input: [value: string, event: Event];
|
|
27
35
|
'debounced-input': [value: string];
|
|
28
36
|
clear: [];
|