@moubing/bing-ui 0.1.0 → 0.2.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.
Files changed (113) hide show
  1. package/dist/bing-ui.css +1 -1
  2. package/dist/bing-ui.es.js +1261 -1682
  3. package/dist/bing-ui.umd.js +22 -22
  4. package/dist/components/BingAnimatedText/BingAnimatedText.types.d.ts +21 -0
  5. package/dist/components/BingAnimatedText/BingAnimatedText.vue.d.ts +31 -0
  6. package/dist/components/BingAnimatedText/index.d.ts +2 -0
  7. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.types.d.ts +33 -0
  8. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue.d.ts +28 -0
  9. package/dist/components/BingAppSwitcherTransition/index.d.ts +2 -0
  10. package/dist/components/BingButton/BingButton.types.d.ts +46 -0
  11. package/dist/components/BingButton/BingButton.vue.d.ts +52 -0
  12. package/dist/components/BingButton/index.d.ts +2 -0
  13. package/dist/components/BingCard/BingCard.types.d.ts +38 -0
  14. package/dist/components/BingCard/BingCard.vue.d.ts +56 -0
  15. package/dist/components/BingCard/index.d.ts +2 -0
  16. package/dist/components/BingCarouselTransition/BingCarouselTransition.types.d.ts +33 -0
  17. package/dist/components/BingCarouselTransition/BingCarouselTransition.vue.d.ts +28 -0
  18. package/dist/components/BingCarouselTransition/index.d.ts +2 -0
  19. package/dist/components/BingCheckbox/BingCheckbox.types.d.ts +25 -0
  20. package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +39 -0
  21. package/dist/components/BingCheckbox/index.d.ts +2 -0
  22. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.d.ts +13 -0
  23. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.types.d.ts +27 -0
  24. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +35 -0
  25. package/dist/components/BingCheckboxGroup/index.d.ts +2 -0
  26. package/dist/components/BingCodeBlock/BingCodeBlock.highlight.d.ts +10 -0
  27. package/dist/components/BingCodeBlock/BingCodeBlock.types.d.ts +32 -0
  28. package/dist/components/BingCodeBlock/BingCodeBlock.vue.d.ts +29 -0
  29. package/dist/components/BingCodeBlock/index.d.ts +2 -0
  30. package/dist/components/BingDatePicker/BingDatePicker.types.d.ts +70 -0
  31. package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +54 -0
  32. package/dist/components/BingDatePicker/index.d.ts +2 -0
  33. package/dist/components/BingDeckTransition/BingDeckTransition.types.d.ts +38 -0
  34. package/dist/components/BingDeckTransition/BingDeckTransition.vue.d.ts +29 -0
  35. package/dist/components/BingDeckTransition/index.d.ts +2 -0
  36. package/dist/components/BingDialog/BingDialog.types.d.ts +45 -0
  37. package/dist/components/BingDialog/BingDialog.vue.d.ts +61 -0
  38. package/dist/components/BingDialog/index.d.ts +2 -0
  39. package/dist/components/BingDropDown/BingDropDown.context.d.ts +7 -0
  40. package/dist/components/BingDropDown/BingDropDown.types.d.ts +60 -0
  41. package/dist/components/BingDropDown/BingDropDown.vue.d.ts +87 -0
  42. package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +36 -0
  43. package/dist/components/BingDropDown/index.d.ts +3 -0
  44. package/dist/components/BingFilePreview/BingFilePreview.types.d.ts +56 -0
  45. package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +46 -0
  46. package/dist/components/BingFilePreview/index.d.ts +2 -0
  47. package/dist/components/BingForm/BingForm.context.d.ts +31 -0
  48. package/dist/components/BingForm/BingForm.types.d.ts +46 -0
  49. package/dist/components/BingForm/BingForm.vue.d.ts +32 -0
  50. package/dist/components/BingForm/index.d.ts +2 -0
  51. package/dist/components/BingFormItem/BingFormItem.types.d.ts +10 -0
  52. package/dist/components/BingFormItem/BingFormItem.vue.d.ts +30 -0
  53. package/dist/components/BingFormItem/index.d.ts +2 -0
  54. package/dist/components/BingIcon/BingIcon.types.d.ts +11 -0
  55. package/dist/components/BingIcon/BingIcon.vue.d.ts +10 -0
  56. package/dist/components/BingIcon/index.d.ts +2 -0
  57. package/dist/components/BingImage/BingImage.types.d.ts +68 -0
  58. package/dist/components/BingImage/BingImage.vue.d.ts +64 -0
  59. package/dist/components/BingImage/index.d.ts +2 -0
  60. package/dist/components/BingImagePreview/BingImagePreview.types.d.ts +40 -0
  61. package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +38 -0
  62. package/dist/components/BingImagePreview/index.d.ts +2 -0
  63. package/dist/components/BingInput/BingInput.types.d.ts +38 -0
  64. package/dist/components/BingInput/BingInput.vue.d.ts +49 -0
  65. package/dist/components/BingInput/index.d.ts +2 -0
  66. package/dist/components/BingRadio/BingRadio.types.d.ts +21 -0
  67. package/dist/components/BingRadio/BingRadio.vue.d.ts +38 -0
  68. package/dist/components/BingRadio/index.d.ts +2 -0
  69. package/dist/components/BingRadioGroup/BingRadioGroup.context.d.ts +13 -0
  70. package/dist/components/BingRadioGroup/BingRadioGroup.types.d.ts +27 -0
  71. package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +35 -0
  72. package/dist/components/BingRadioGroup/index.d.ts +2 -0
  73. package/dist/components/BingResizable/BingResizable.types.d.ts +63 -0
  74. package/dist/components/BingResizable/BingResizable.vue.d.ts +50 -0
  75. package/dist/components/BingResizable/index.d.ts +2 -0
  76. package/dist/components/BingScrollbar/BingScrollbar.types.d.ts +20 -0
  77. package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +28 -0
  78. package/dist/components/BingScrollbar/index.d.ts +2 -0
  79. package/dist/components/BingSelect/BingSelect.types.d.ts +57 -0
  80. package/dist/components/BingSelect/BingSelect.vue.d.ts +72 -0
  81. package/dist/components/BingSelect/index.d.ts +2 -0
  82. package/dist/components/BingSortableList/BingSortableList.types.d.ts +62 -0
  83. package/dist/components/BingSortableList/BingSortableList.vue.d.ts +51 -0
  84. package/dist/components/BingSortableList/BingSortableListItem.vue.d.ts +34 -0
  85. package/dist/components/BingSortableList/index.d.ts +2 -0
  86. package/dist/components/BingTable/BingTable.types.d.ts +156 -0
  87. package/dist/components/BingTable/BingTable.vue.d.ts +142 -0
  88. package/dist/components/BingTable/index.d.ts +2 -0
  89. package/dist/components/BingTabs/BingTabs.types.d.ts +42 -0
  90. package/dist/components/BingTabs/BingTabs.vue.d.ts +40 -0
  91. package/dist/components/BingTabs/index.d.ts +2 -0
  92. package/dist/components/BingTag/BingTag.types.d.ts +15 -0
  93. package/dist/components/BingTag/BingTag.vue.d.ts +26 -0
  94. package/dist/components/BingTag/index.d.ts +2 -0
  95. package/dist/components/BingTextarea/BingTextarea.types.d.ts +40 -0
  96. package/dist/components/BingTextarea/BingTextarea.vue.d.ts +38 -0
  97. package/dist/components/BingTextarea/index.d.ts +2 -0
  98. package/dist/components/BingToast/BingToast.service.d.ts +44 -0
  99. package/dist/components/BingToast/BingToast.types.d.ts +58 -0
  100. package/dist/components/BingToast/BingToast.vue.d.ts +19 -0
  101. package/dist/components/BingToast/index.d.ts +4 -0
  102. package/dist/components/BingTooltip/BingTooltip.shared.d.ts +32 -0
  103. package/dist/components/BingTooltip/BingTooltip.types.d.ts +36 -0
  104. package/dist/components/BingTooltip/BingTooltip.vue.d.ts +51 -0
  105. package/dist/components/BingTooltip/index.d.ts +2 -0
  106. package/dist/components/BingTreeSelect/BingTreeSelect.types.d.ts +69 -0
  107. package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +85 -0
  108. package/dist/components/BingTreeSelect/index.d.ts +2 -0
  109. package/dist/components/index.d.ts +32 -0
  110. package/dist/index.d.ts +3 -1
  111. package/dist/motion/index.d.ts +13 -0
  112. package/dist/utils/glass.d.ts +16 -0
  113. package/package.json +67 -68
@@ -0,0 +1,63 @@
1
+ export type BingResizableDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
2
+ export type BingResizableMode = 'fixed' | 'mirror';
3
+ export type BingResizableSnapMode = 'live' | 'end';
4
+ export type BingResizableSizeValue = number | string;
5
+ export interface BingResizableSize {
6
+ width?: BingResizableSizeValue;
7
+ height?: BingResizableSizeValue;
8
+ }
9
+ export interface BingResizableResolvedSize {
10
+ width: number;
11
+ height: number;
12
+ }
13
+ export interface BingResizablePosition {
14
+ x: number;
15
+ y: number;
16
+ }
17
+ export type BingResizableStep = number | {
18
+ x?: number;
19
+ y?: number;
20
+ };
21
+ export interface BingResizableDelta {
22
+ x: number;
23
+ y: number;
24
+ }
25
+ export interface BingResizablePayload {
26
+ direction: BingResizableDirection;
27
+ size: BingResizableResolvedSize;
28
+ position: BingResizablePosition;
29
+ delta: BingResizableDelta;
30
+ event: PointerEvent | KeyboardEvent;
31
+ }
32
+ export interface BingResizableProps {
33
+ size?: BingResizableSize;
34
+ defaultSize?: BingResizableSize;
35
+ position?: Partial<BingResizablePosition>;
36
+ defaultPosition?: Partial<BingResizablePosition>;
37
+ minWidth?: BingResizableSizeValue;
38
+ minHeight?: BingResizableSizeValue;
39
+ maxWidth?: BingResizableSizeValue;
40
+ maxHeight?: BingResizableSizeValue;
41
+ mode?: BingResizableMode;
42
+ snapMode?: BingResizableSnapMode;
43
+ directions?: BingResizableDirection[];
44
+ step?: BingResizableStep;
45
+ disabled?: boolean;
46
+ lockAspectRatio?: boolean;
47
+ contain?: boolean;
48
+ showSize?: boolean;
49
+ handleSize?: number;
50
+ ariaLabel?: string;
51
+ }
52
+ export interface BingResizableEmits {
53
+ 'update:size': [size: BingResizableResolvedSize];
54
+ 'update:position': [position: BingResizablePosition];
55
+ 'resize-start': [payload: BingResizablePayload];
56
+ resize: [payload: BingResizablePayload];
57
+ 'resize-end': [payload: BingResizablePayload];
58
+ }
59
+ export interface BingResizableExpose {
60
+ reset: () => void;
61
+ getSize: () => BingResizableResolvedSize;
62
+ getPosition: () => BingResizablePosition;
63
+ }
@@ -0,0 +1,50 @@
1
+ import { BingResizableDirection, BingResizableExpose, BingResizablePayload, BingResizablePosition, BingResizableProps, BingResizableResolvedSize, BingResizableSize } from './BingResizable.types';
2
+ declare var __VLS_1: {}, __VLS_3: {
3
+ direction: BingResizableDirection;
4
+ active: boolean;
5
+ };
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ } & {
9
+ handle?: (props: typeof __VLS_3) => any;
10
+ };
11
+ declare const __VLS_base: import('vue').DefineComponent<BingResizableProps, BingResizableExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ resize: (payload: BingResizablePayload) => any;
13
+ "update:size": (size: BingResizableResolvedSize) => any;
14
+ "update:position": (position: BingResizablePosition) => any;
15
+ "resize-start": (payload: BingResizablePayload) => any;
16
+ "resize-end": (payload: BingResizablePayload) => any;
17
+ }, string, import('vue').PublicProps, Readonly<BingResizableProps> & Readonly<{
18
+ onResize?: ((payload: BingResizablePayload) => any) | undefined;
19
+ "onUpdate:size"?: ((size: BingResizableResolvedSize) => any) | undefined;
20
+ "onUpdate:position"?: ((position: BingResizablePosition) => any) | undefined;
21
+ "onResize-start"?: ((payload: BingResizablePayload) => any) | undefined;
22
+ "onResize-end"?: ((payload: BingResizablePayload) => any) | undefined;
23
+ }>, {
24
+ disabled: boolean;
25
+ maxHeight: import('./BingResizable.types').BingResizableSizeValue;
26
+ maxWidth: import('./BingResizable.types').BingResizableSizeValue;
27
+ minHeight: import('./BingResizable.types').BingResizableSizeValue;
28
+ minWidth: import('./BingResizable.types').BingResizableSizeValue;
29
+ position: Partial<BingResizablePosition>;
30
+ ariaLabel: string;
31
+ size: BingResizableSize;
32
+ mode: import('./BingResizable.types').BingResizableMode;
33
+ defaultSize: BingResizableSize;
34
+ defaultPosition: Partial<BingResizablePosition>;
35
+ snapMode: import('./BingResizable.types').BingResizableSnapMode;
36
+ directions: BingResizableDirection[];
37
+ step: import('./BingResizable.types').BingResizableStep;
38
+ lockAspectRatio: boolean;
39
+ contain: boolean;
40
+ showSize: boolean;
41
+ handleSize: number;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
46
+ type __VLS_WithSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1,2 @@
1
+ export { default as BingResizable } from './BingResizable.vue';
2
+ export type { BingResizableDelta, BingResizableDirection, BingResizableEmits, BingResizableExpose, BingResizableMode, BingResizablePayload, BingResizablePosition, BingResizableProps, BingResizableResolvedSize, BingResizableSize, BingResizableSizeValue, BingResizableStep, } from './BingResizable.types';
@@ -0,0 +1,20 @@
1
+ export interface BingScrollbarProps {
2
+ height?: string | number;
3
+ maxHeight?: string | number;
4
+ minThumbSize?: number;
5
+ overflowTolerance?: number;
6
+ vertical?: boolean;
7
+ horizontal?: boolean;
8
+ always?: boolean;
9
+ disabled?: boolean;
10
+ ariaLabel?: string;
11
+ }
12
+ export interface BingScrollbarEmits {
13
+ scroll: [event: Event];
14
+ }
15
+ export interface BingScrollbarExpose {
16
+ scrollBy: (options: ScrollToOptions | number) => void;
17
+ scrollTo: (options: ScrollToOptions | number) => void;
18
+ update: () => void;
19
+ viewport: HTMLElement | null;
20
+ }
@@ -0,0 +1,28 @@
1
+ import { BingScrollbarExpose, BingScrollbarProps } from './BingScrollbar.types';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<BingScrollbarProps, BingScrollbarExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ scroll: (event: Event) => any;
8
+ }, string, import('vue').PublicProps, Readonly<BingScrollbarProps> & Readonly<{
9
+ onScroll?: ((event: Event) => any) | undefined;
10
+ }>, {
11
+ always: boolean;
12
+ disabled: boolean;
13
+ height: string | number;
14
+ maxHeight: string | number;
15
+ ariaLabel: string;
16
+ horizontal: boolean;
17
+ vertical: boolean;
18
+ minThumbSize: number;
19
+ overflowTolerance: number;
20
+ }, {}, {}, {}, 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
+ };
@@ -0,0 +1,2 @@
1
+ export { default as BingScrollbar } from './BingScrollbar.vue';
2
+ export type { BingScrollbarEmits, BingScrollbarExpose, BingScrollbarProps, } from './BingScrollbar.types';
@@ -0,0 +1,57 @@
1
+ import { BingGlassEffectProps } from '../../utils/glass';
2
+ export type BingSelectValue = string | number;
3
+ export type BingSelectModelValue = BingSelectValue | BingSelectValue[] | null;
4
+ export type BingSelectSize = 'sm' | 'md' | 'lg';
5
+ export type BingSelectVirtualMode = boolean | 'auto';
6
+ export type BingSelectSearchable = boolean | 'auto';
7
+ export type BingSelectOptionMetaValue = string | number | boolean | null | undefined;
8
+ export interface BingSelectOption {
9
+ label: string;
10
+ value: BingSelectValue;
11
+ disabled?: boolean;
12
+ description?: string;
13
+ detail?: string;
14
+ meta?: Record<string, BingSelectOptionMetaValue>;
15
+ [key: string]: unknown;
16
+ }
17
+ export interface BingSelectProps extends BingGlassEffectProps {
18
+ id?: string;
19
+ modelValue?: BingSelectModelValue;
20
+ options?: BingSelectOption[];
21
+ multiple?: boolean;
22
+ placeholder?: string;
23
+ disabled?: boolean;
24
+ clearable?: boolean;
25
+ showSelectAll?: boolean;
26
+ selectAllText?: string;
27
+ clearAllText?: string;
28
+ emptyText?: string;
29
+ searchable?: BingSelectSearchable;
30
+ searchPlaceholder?: string;
31
+ noSearchResultsText?: string;
32
+ size?: BingSelectSize;
33
+ block?: boolean;
34
+ width?: string | number;
35
+ minWidth?: string | number;
36
+ panelMinHeight?: string | number;
37
+ panelMaxHeight?: string | number;
38
+ virtual?: BingSelectVirtualMode;
39
+ virtualThreshold?: number;
40
+ virtualItemHeight?: number;
41
+ virtualOverscan?: number;
42
+ ariaLabel?: string;
43
+ ariaDescribedby?: string;
44
+ status?: 'default' | 'error' | 'success' | 'warning';
45
+ }
46
+ export interface BingSelectChangePayload {
47
+ value: BingSelectModelValue;
48
+ option?: BingSelectOption;
49
+ options: BingSelectOption[];
50
+ }
51
+ export interface BingSelectEmits {
52
+ 'update:modelValue': [value: BingSelectModelValue];
53
+ change: [payload: BingSelectChangePayload];
54
+ clear: [];
55
+ open: [];
56
+ close: [];
57
+ }
@@ -0,0 +1,72 @@
1
+ import { BingSelectChangePayload, BingSelectModelValue, BingSelectOption, BingSelectProps } from './BingSelect.types';
2
+ declare var __VLS_1: {
3
+ selectedOptions: BingSelectOption[];
4
+ placeholder: string;
5
+ }, __VLS_77: {
6
+ option: BingSelectOption;
7
+ selected: boolean;
8
+ }, __VLS_79: {
9
+ option: BingSelectOption;
10
+ selected: boolean;
11
+ index: number;
12
+ };
13
+ type __VLS_Slots = {} & {
14
+ value?: (props: typeof __VLS_1) => any;
15
+ } & {
16
+ option?: (props: typeof __VLS_77) => any;
17
+ } & {
18
+ 'option-detail'?: (props: typeof __VLS_79) => any;
19
+ };
20
+ declare const __VLS_base: import('vue').DefineComponent<BingSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ clear: () => any;
22
+ "update:modelValue": (value: BingSelectModelValue) => any;
23
+ change: (payload: BingSelectChangePayload) => any;
24
+ close: () => any;
25
+ open: () => any;
26
+ }, string, import('vue').PublicProps, Readonly<BingSelectProps> & Readonly<{
27
+ onClear?: (() => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: BingSelectModelValue) => any) | undefined;
29
+ onChange?: ((payload: BingSelectChangePayload) => any) | undefined;
30
+ onClose?: (() => any) | undefined;
31
+ onOpen?: (() => any) | undefined;
32
+ }>, {
33
+ disabled: boolean;
34
+ minWidth: string | number;
35
+ width: string | number;
36
+ glass: boolean;
37
+ ariaLabel: string;
38
+ modelValue: BingSelectModelValue;
39
+ size: import('./BingSelect.types').BingSelectSize;
40
+ block: boolean;
41
+ glassBlur: string | number;
42
+ glassOpacity: number;
43
+ glassSaturation: number;
44
+ id: string;
45
+ ariaDescribedby: string;
46
+ status: "default" | "error" | "success" | "warning";
47
+ placeholder: string;
48
+ clearable: boolean;
49
+ panelMaxHeight: string | number;
50
+ options: BingSelectOption[];
51
+ multiple: boolean;
52
+ showSelectAll: boolean;
53
+ selectAllText: string;
54
+ clearAllText: string;
55
+ emptyText: string;
56
+ searchable: import('./BingSelect.types').BingSelectSearchable;
57
+ searchPlaceholder: string;
58
+ noSearchResultsText: string;
59
+ panelMinHeight: string | number;
60
+ virtual: import('./BingSelect.types').BingSelectVirtualMode;
61
+ virtualThreshold: number;
62
+ virtualItemHeight: number;
63
+ virtualOverscan: number;
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,2 @@
1
+ export { default as BingSelect } from './BingSelect.vue';
2
+ export type { BingSelectChangePayload, BingSelectEmits, BingSelectModelValue, BingSelectOption, BingSelectProps, BingSelectSize, BingSelectValue, BingSelectVirtualMode, } from './BingSelect.types';
@@ -0,0 +1,62 @@
1
+ import { ComponentPublicInstance, HTMLAttributes } from 'vue';
2
+ export type BingSortableListKey = string | number;
3
+ export type BingSortableListAxis = 'vertical' | 'horizontal';
4
+ export type BingSortableListReorderMode = 'drop' | 'live';
5
+ export type BingSortableListItemKey<T> = keyof T | ((item: T, index: number) => BingSortableListKey);
6
+ export type BingSortableListItemDisabled<T> = keyof T | ((item: T, index: number) => boolean);
7
+ export interface BingSortableListPayload<T = Record<string, unknown>> {
8
+ key: BingSortableListKey;
9
+ item: T;
10
+ from: number;
11
+ to: number;
12
+ order: BingSortableListKey[];
13
+ event?: PointerEvent | KeyboardEvent;
14
+ }
15
+ export interface BingSortableListDragPayload<T = Record<string, unknown>> {
16
+ key: BingSortableListKey;
17
+ item: T;
18
+ index: number;
19
+ order: BingSortableListKey[];
20
+ event: PointerEvent;
21
+ }
22
+ export interface BingSortableListProps<T = Record<string, unknown>> {
23
+ items?: T[];
24
+ order?: BingSortableListKey[];
25
+ itemKey?: BingSortableListItemKey<T>;
26
+ itemDisabled?: BingSortableListItemDisabled<T>;
27
+ disabledKeys?: BingSortableListKey[];
28
+ axis?: BingSortableListAxis;
29
+ disabled?: boolean;
30
+ keyboard?: boolean;
31
+ flip?: boolean;
32
+ reorderMode?: BingSortableListReorderMode;
33
+ duration?: number;
34
+ settleDuration?: number;
35
+ dragThreshold?: number;
36
+ ariaLabel?: string;
37
+ handleAriaLabel?: string | ((item: T, index: number) => string);
38
+ }
39
+ export interface BingSortableListEmits<T = Record<string, unknown>> {
40
+ 'update:order': [order: BingSortableListKey[]];
41
+ reorder: [payload: BingSortableListPayload<T>];
42
+ 'drag-start': [payload: BingSortableListDragPayload<T>];
43
+ drag: [payload: BingSortableListDragPayload<T>];
44
+ 'drag-end': [payload: BingSortableListDragPayload<T>];
45
+ }
46
+ export interface BingSortableListHandleProps extends HTMLAttributes {
47
+ ref: (element: Element | ComponentPublicInstance | null) => void;
48
+ role: 'button';
49
+ tabindex: number;
50
+ 'aria-label': string;
51
+ 'aria-disabled': 'true' | 'false';
52
+ onKeydown: (event: KeyboardEvent) => void;
53
+ }
54
+ export interface BingSortableListSlotProps<T = Record<string, unknown>> {
55
+ item: T;
56
+ key: BingSortableListKey;
57
+ index: number;
58
+ active: boolean;
59
+ dragging: boolean;
60
+ disabled: boolean;
61
+ handleProps: BingSortableListHandleProps;
62
+ }
@@ -0,0 +1,51 @@
1
+ import { BingSortableListDragPayload, BingSortableListKey, BingSortableListPayload, BingSortableListProps } from './BingSortableList.types';
2
+ type ListItem = any;
3
+ type __VLS_Props = BingSortableListProps<ListItem>;
4
+ type __VLS_Slots = {
5
+ default?(props: {
6
+ item: ListItem;
7
+ key: BingSortableListKey;
8
+ index: number;
9
+ active: boolean;
10
+ dragging: boolean;
11
+ disabled: boolean;
12
+ handleProps: any;
13
+ }): unknown;
14
+ };
15
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ drag: (payload: BingSortableListDragPayload<any>) => any;
17
+ "update:order": (order: BingSortableListKey[]) => any;
18
+ reorder: (payload: BingSortableListPayload<any>) => any;
19
+ "drag-start": (payload: BingSortableListDragPayload<any>) => any;
20
+ "drag-end": (payload: BingSortableListDragPayload<any>) => any;
21
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onDrag?: ((payload: BingSortableListDragPayload<any>) => any) | undefined;
23
+ "onUpdate:order"?: ((order: BingSortableListKey[]) => any) | undefined;
24
+ onReorder?: ((payload: BingSortableListPayload<any>) => any) | undefined;
25
+ "onDrag-start"?: ((payload: BingSortableListDragPayload<any>) => any) | undefined;
26
+ "onDrag-end"?: ((payload: BingSortableListDragPayload<any>) => any) | undefined;
27
+ }>, {
28
+ disabled: boolean;
29
+ order: BingSortableListKey[];
30
+ ariaLabel: string;
31
+ items: any[];
32
+ duration: number;
33
+ flip: boolean;
34
+ itemKey: import('./BingSortableList.types').BingSortableListItemKey<any>;
35
+ axis: import('./BingSortableList.types').BingSortableListAxis;
36
+ itemDisabled: import('./BingSortableList.types').BingSortableListItemDisabled<any>;
37
+ disabledKeys: BingSortableListKey[];
38
+ keyboard: boolean;
39
+ reorderMode: import('./BingSortableList.types').BingSortableListReorderMode;
40
+ settleDuration: number;
41
+ dragThreshold: number;
42
+ handleAriaLabel: string | ((item: any, index: number) => string);
43
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
44
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
45
+ declare const _default: typeof __VLS_export;
46
+ export default _default;
47
+ type __VLS_WithSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };
@@ -0,0 +1,34 @@
1
+ import { BingSortableListAxis, BingSortableListKey, BingSortableListSlotProps } from './BingSortableList.types';
2
+ type ListItem = any;
3
+ type __VLS_Props = {
4
+ item: ListItem;
5
+ itemKey: BingSortableListKey;
6
+ index: number;
7
+ activeKey: BingSortableListKey | null;
8
+ disabled?: boolean;
9
+ axis?: BingSortableListAxis;
10
+ flip?: boolean;
11
+ duration?: number;
12
+ handleLabel: string;
13
+ };
14
+ type __VLS_Slots = {
15
+ default?(props: BingSortableListSlotProps<ListItem>): unknown;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "keyboard-move": (event: KeyboardEvent) => any;
19
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ "onKeyboard-move"?: ((event: KeyboardEvent) => any) | undefined;
21
+ }>, {
22
+ disabled: boolean;
23
+ duration: number;
24
+ flip: boolean;
25
+ axis: BingSortableListAxis;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,2 @@
1
+ export { default as BingSortableList } from './BingSortableList.vue';
2
+ export type { BingSortableListAxis, BingSortableListDragPayload, BingSortableListEmits, BingSortableListHandleProps, BingSortableListItemDisabled, BingSortableListItemKey, BingSortableListKey, BingSortableListPayload, BingSortableListProps, BingSortableListReorderMode, BingSortableListSlotProps, } from './BingSortableList.types';
@@ -0,0 +1,156 @@
1
+ export type BingTableKey = string | number;
2
+ export type BingTableAlign = 'left' | 'center' | 'right';
3
+ export type BingTableFixed = 'left' | 'right';
4
+ export type BingTableSize = 'sm' | 'md' | 'lg';
5
+ export type BingTableVirtualMode = boolean | 'auto';
6
+ export type BingTableSelectionMode = 'multiple' | 'single';
7
+ export type BingTableSortOrder = 'asc' | 'desc' | null;
8
+ export type BingTableRow = Record<string, unknown>;
9
+ export type BingTableRowKeyGetter = (row: BingTableRow, index: number, path: number[]) => BingTableKey;
10
+ export type BingTableRowClass = string | ((row: BingTableRow, index: number) => string | undefined);
11
+ export type BingTableRowDisabled = string | ((row: BingTableRow, index: number) => boolean);
12
+ export interface BingTableColumn {
13
+ key: string;
14
+ title?: string;
15
+ dataKey?: string;
16
+ width?: number | string;
17
+ minWidth?: number;
18
+ maxWidth?: number;
19
+ fixed?: BingTableFixed;
20
+ hidden?: boolean;
21
+ align?: BingTableAlign;
22
+ headerAlign?: BingTableAlign;
23
+ sortable?: boolean;
24
+ resizable?: boolean;
25
+ description?: string;
26
+ ellipsis?: boolean;
27
+ class?: string;
28
+ headerClass?: string;
29
+ sorter?: (left: BingTableRow, right: BingTableRow) => number;
30
+ }
31
+ export interface BingTableColumnResizePayload {
32
+ key: string;
33
+ width: number;
34
+ widths: Record<string, number>;
35
+ }
36
+ export interface BingTableColumnReorderPayload {
37
+ key: string;
38
+ from: number;
39
+ to: number;
40
+ order: string[];
41
+ }
42
+ export interface BingTableColumnVisibilityPayload {
43
+ key: string;
44
+ hidden: boolean;
45
+ hiddenColumnKeys: string[];
46
+ }
47
+ export interface BingTableColumnFixedPayload {
48
+ key: string;
49
+ fixed: BingTableFixed | null;
50
+ columnFixed: Record<string, BingTableFixed | null>;
51
+ }
52
+ export interface BingTableSelectionPayload {
53
+ keys: BingTableKey[];
54
+ rows: BingTableRow[];
55
+ }
56
+ export interface BingTableExpandPayload {
57
+ key: BingTableKey;
58
+ row: BingTableRow;
59
+ expanded: boolean;
60
+ expandedRowKeys: BingTableKey[];
61
+ }
62
+ export interface BingTablePageChangePayload {
63
+ page: number;
64
+ pageSize: number;
65
+ }
66
+ export interface BingTableSortPayload {
67
+ key: string | null;
68
+ order: BingTableSortOrder;
69
+ column?: BingTableColumn;
70
+ }
71
+ export interface BingTableProps {
72
+ data?: BingTableRow[];
73
+ columns?: BingTableColumn[];
74
+ rowKey?: string | BingTableRowKeyGetter;
75
+ childrenKey?: string;
76
+ height?: number | string;
77
+ maxHeight?: number | string;
78
+ size?: BingTableSize;
79
+ bordered?: boolean;
80
+ striped?: boolean;
81
+ loading?: boolean;
82
+ emptyText?: string;
83
+ loadingText?: string;
84
+ selectable?: boolean;
85
+ selectionMode?: BingTableSelectionMode;
86
+ selectedRowKeys?: BingTableKey[];
87
+ defaultSelectedRowKeys?: BingTableKey[];
88
+ rowDisabled?: BingTableRowDisabled;
89
+ selectOnRowClick?: boolean;
90
+ selectionFixed?: boolean;
91
+ selectionColumnWidth?: number;
92
+ expandedRowKeys?: BingTableKey[];
93
+ defaultExpandedRowKeys?: BingTableKey[];
94
+ defaultExpandAll?: boolean;
95
+ treeColumnKey?: string;
96
+ indentSize?: number;
97
+ columnWidths?: Record<string, number>;
98
+ defaultColumnWidths?: Record<string, number>;
99
+ columnOrder?: string[];
100
+ defaultColumnOrder?: string[];
101
+ hiddenColumnKeys?: string[];
102
+ defaultHiddenColumnKeys?: string[];
103
+ columnFixed?: Record<string, BingTableFixed | null>;
104
+ defaultColumnFixed?: Record<string, BingTableFixed | null>;
105
+ resizableColumns?: boolean;
106
+ reorderableColumns?: boolean;
107
+ showColumnControls?: boolean;
108
+ virtual?: BingTableVirtualMode;
109
+ virtualThreshold?: number;
110
+ virtualRowHeight?: number;
111
+ virtualOverscan?: number;
112
+ pagination?: boolean;
113
+ remotePagination?: boolean;
114
+ preservePageHeight?: boolean;
115
+ page?: number;
116
+ defaultPage?: number;
117
+ pageSize?: number;
118
+ defaultPageSize?: number;
119
+ pageSizeOptions?: number[];
120
+ total?: number;
121
+ sortKey?: string | null;
122
+ defaultSortKey?: string | null;
123
+ sortOrder?: BingTableSortOrder;
124
+ defaultSortOrder?: BingTableSortOrder;
125
+ rowClass?: BingTableRowClass;
126
+ ariaLabel?: string;
127
+ }
128
+ export interface BingTableEmits {
129
+ 'update:selectedRowKeys': [keys: BingTableKey[]];
130
+ 'selection-change': [payload: BingTableSelectionPayload];
131
+ 'update:expandedRowKeys': [keys: BingTableKey[]];
132
+ 'expand-change': [payload: BingTableExpandPayload];
133
+ 'update:columnWidths': [widths: Record<string, number>];
134
+ 'column-resize': [payload: BingTableColumnResizePayload];
135
+ 'update:columnOrder': [order: string[]];
136
+ 'column-reorder': [payload: BingTableColumnReorderPayload];
137
+ 'update:hiddenColumnKeys': [keys: string[]];
138
+ 'column-visibility-change': [payload: BingTableColumnVisibilityPayload];
139
+ 'update:columnFixed': [columnFixed: Record<string, BingTableFixed | null>];
140
+ 'column-fixed-change': [payload: BingTableColumnFixedPayload];
141
+ 'update:page': [page: number];
142
+ 'update:pageSize': [pageSize: number];
143
+ 'page-change': [payload: BingTablePageChangePayload];
144
+ 'update:sortKey': [key: string | null];
145
+ 'update:sortOrder': [order: BingTableSortOrder];
146
+ 'sort-change': [payload: BingTableSortPayload];
147
+ 'row-click': [row: BingTableRow, event: MouseEvent];
148
+ scroll: [event: Event];
149
+ }
150
+ export interface BingTableExpose {
151
+ clearSelection: () => void;
152
+ toggleRowSelection: (key: BingTableKey, selected?: boolean) => void;
153
+ toggleRowExpansion: (key: BingTableKey, expanded?: boolean) => void;
154
+ resetColumns: () => void;
155
+ scrollTo: (top: number) => void;
156
+ }