@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,70 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import { BingGlassEffectProps } from '../../utils/glass';
3
+ export type BingDatePickerType = 'date' | 'datetime' | 'month' | 'year' | 'time';
4
+ export type BingDatePickerSize = 'sm' | 'md' | 'lg';
5
+ export type BingDatePickerSingleValue = string | null;
6
+ export type BingDatePickerRangeValue = [string, string] | null;
7
+ export type BingDatePickerModelValue = BingDatePickerSingleValue | BingDatePickerRangeValue;
8
+ export type BingDatePickerRangeRole = 'start' | 'end';
9
+ export type BingDatePickerTimeUnit = 'hour' | 'minute' | 'second';
10
+ export interface BingDatePickerDisabledDateContext {
11
+ type: BingDatePickerType;
12
+ range: boolean;
13
+ role?: BingDatePickerRangeRole;
14
+ }
15
+ export interface BingDatePickerDisabledTimeContext extends BingDatePickerDisabledDateContext {
16
+ unit: BingDatePickerTimeUnit;
17
+ value: number;
18
+ }
19
+ export interface BingDatePickerChangePayload {
20
+ value: BingDatePickerModelValue;
21
+ parsedValue: Dayjs | [Dayjs, Dayjs] | null;
22
+ type: BingDatePickerType;
23
+ range: boolean;
24
+ }
25
+ export interface BingDatePickerProps extends BingGlassEffectProps {
26
+ id?: string;
27
+ modelValue?: BingDatePickerModelValue;
28
+ type?: BingDatePickerType;
29
+ range?: boolean;
30
+ placeholder?: string;
31
+ startPlaceholder?: string;
32
+ endPlaceholder?: string;
33
+ disabled?: boolean;
34
+ clearable?: boolean;
35
+ size?: BingDatePickerSize;
36
+ block?: boolean;
37
+ minWidth?: string | number;
38
+ format?: string;
39
+ valueFormat?: string;
40
+ locale?: string;
41
+ firstDayOfWeek?: number;
42
+ min?: string;
43
+ max?: string;
44
+ disabledDate?: (value: Dayjs, context: BingDatePickerDisabledDateContext) => boolean;
45
+ disabledTime?: (value: Dayjs, context: BingDatePickerDisabledTimeContext) => boolean;
46
+ hourStep?: number;
47
+ minuteStep?: number;
48
+ secondStep?: number;
49
+ showShortcuts?: boolean;
50
+ panelMaxHeight?: string | number;
51
+ ariaLabel?: string;
52
+ ariaDescribedby?: string;
53
+ status?: 'default' | 'error' | 'success' | 'warning';
54
+ }
55
+ export interface BingDatePickerEmits {
56
+ 'update:modelValue': [value: BingDatePickerModelValue];
57
+ change: [payload: BingDatePickerChangePayload];
58
+ clear: [];
59
+ open: [];
60
+ close: [];
61
+ confirm: [payload: BingDatePickerChangePayload];
62
+ cancel: [];
63
+ }
64
+ export interface BingDatePickerExpose {
65
+ focus: () => void;
66
+ blur: () => void;
67
+ openPanel: () => void;
68
+ closePanel: () => void;
69
+ clear: () => void;
70
+ }
@@ -0,0 +1,54 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import { BingDatePickerChangePayload, BingDatePickerExpose, BingDatePickerModelValue, BingDatePickerProps, BingDatePickerType } from './BingDatePicker.types';
3
+ declare const __VLS_export: import('vue').DefineComponent<BingDatePickerProps, BingDatePickerExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ clear: () => any;
5
+ "update:modelValue": (value: BingDatePickerModelValue) => any;
6
+ change: (payload: BingDatePickerChangePayload) => any;
7
+ cancel: () => any;
8
+ close: () => any;
9
+ open: () => any;
10
+ confirm: (payload: BingDatePickerChangePayload) => any;
11
+ }, string, import('vue').PublicProps, Readonly<BingDatePickerProps> & Readonly<{
12
+ onClear?: (() => any) | undefined;
13
+ "onUpdate:modelValue"?: ((value: BingDatePickerModelValue) => any) | undefined;
14
+ onChange?: ((payload: BingDatePickerChangePayload) => any) | undefined;
15
+ onCancel?: (() => any) | undefined;
16
+ onClose?: (() => any) | undefined;
17
+ onOpen?: (() => any) | undefined;
18
+ onConfirm?: ((payload: BingDatePickerChangePayload) => any) | undefined;
19
+ }>, {
20
+ disabled: boolean;
21
+ minWidth: string | number;
22
+ type: BingDatePickerType;
23
+ glass: boolean;
24
+ ariaLabel: string;
25
+ modelValue: BingDatePickerModelValue;
26
+ size: import('./BingDatePicker.types').BingDatePickerSize;
27
+ block: boolean;
28
+ glassBlur: string | number;
29
+ glassOpacity: number;
30
+ glassSaturation: number;
31
+ id: string;
32
+ ariaDescribedby: string;
33
+ status: "default" | "error" | "success" | "warning";
34
+ range: boolean;
35
+ max: string;
36
+ min: string;
37
+ format: string;
38
+ placeholder: string;
39
+ startPlaceholder: string;
40
+ endPlaceholder: string;
41
+ clearable: boolean;
42
+ valueFormat: string;
43
+ locale: string;
44
+ firstDayOfWeek: number;
45
+ disabledDate: (value: Dayjs, context: import('./BingDatePicker.types').BingDatePickerDisabledDateContext) => boolean;
46
+ disabledTime: (value: Dayjs, context: import('./BingDatePicker.types').BingDatePickerDisabledTimeContext) => boolean;
47
+ hourStep: number;
48
+ minuteStep: number;
49
+ secondStep: number;
50
+ showShortcuts: boolean;
51
+ panelMaxHeight: string | number;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
53
+ declare const _default: typeof __VLS_export;
54
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as BingDatePicker } from './BingDatePicker.vue';
2
+ export type { BingDatePickerChangePayload, BingDatePickerDisabledDateContext, BingDatePickerDisabledTimeContext, BingDatePickerEmits, BingDatePickerExpose, BingDatePickerModelValue, BingDatePickerProps, BingDatePickerRangeRole, BingDatePickerRangeValue, BingDatePickerSingleValue, BingDatePickerSize, BingDatePickerTimeUnit, BingDatePickerType, } from './BingDatePicker.types';
@@ -0,0 +1,38 @@
1
+ import { BingTabValue } from '../BingTabs';
2
+ export interface BingDeckTransitionItem {
3
+ value: BingTabValue;
4
+ label: string;
5
+ disabled?: boolean;
6
+ [key: string]: unknown;
7
+ }
8
+ export interface BingDeckTransitionProps {
9
+ modelValue?: BingTabValue;
10
+ items?: BingDeckTransitionItem[];
11
+ disabled?: boolean;
12
+ respectReducedMotion?: boolean;
13
+ loop?: boolean;
14
+ showControls?: boolean;
15
+ controlLabel?: string;
16
+ }
17
+ export interface BingDeckTransitionSlotProps {
18
+ item: BingDeckTransitionItem;
19
+ index: number;
20
+ active: boolean;
21
+ isAnimating: boolean;
22
+ }
23
+ export interface BingDeckTransitionControlsSlotProps {
24
+ next: () => void;
25
+ activeItem?: BingDeckTransitionItem;
26
+ activeIndex: number;
27
+ isAnimating: boolean;
28
+ }
29
+ export interface BingDeckTransitionChangePayload {
30
+ value: BingTabValue;
31
+ previousValue?: BingTabValue;
32
+ item: BingDeckTransitionItem;
33
+ previousItem?: BingDeckTransitionItem;
34
+ }
35
+ export interface BingDeckTransitionEmits {
36
+ 'update:modelValue': [value: BingTabValue];
37
+ change: [payload: BingDeckTransitionChangePayload];
38
+ }
@@ -0,0 +1,29 @@
1
+ import { BingTabValue } from '../BingTabs';
2
+ import { BingDeckTransitionControlsSlotProps, BingDeckTransitionProps, BingDeckTransitionSlotProps } from './BingDeckTransition.types';
3
+ type __VLS_Slots = {
4
+ default?: (props: BingDeckTransitionSlotProps) => unknown;
5
+ controls?: (props: BingDeckTransitionControlsSlotProps) => unknown;
6
+ };
7
+ declare const __VLS_base: import('vue').DefineComponent<BingDeckTransitionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: BingTabValue) => any;
9
+ change: (payload: import('./BingDeckTransition.types').BingDeckTransitionChangePayload) => any;
10
+ }, string, import('vue').PublicProps, Readonly<BingDeckTransitionProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
12
+ onChange?: ((payload: import('./BingDeckTransition.types').BingDeckTransitionChangePayload) => any) | undefined;
13
+ }>, {
14
+ disabled: boolean;
15
+ modelValue: BingTabValue;
16
+ items: import('./BingDeckTransition.types').BingDeckTransitionItem[];
17
+ loop: boolean;
18
+ respectReducedMotion: boolean;
19
+ showControls: boolean;
20
+ controlLabel: string;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,2 @@
1
+ export { default as BingDeckTransition } from './BingDeckTransition.vue';
2
+ export * from './BingDeckTransition.types';
@@ -0,0 +1,45 @@
1
+ import { BingGlassEffectProps } from '../../utils/glass';
2
+ export type BingDialogCloseReason = 'close' | 'cancel' | 'overlay' | 'escape' | 'confirm';
3
+ export interface BingDialogOverlayOrb {
4
+ id?: string;
5
+ color: string;
6
+ x?: number;
7
+ y?: number;
8
+ size?: number | string;
9
+ opacity?: number;
10
+ blur?: number;
11
+ motionX?: number;
12
+ motionY?: number;
13
+ duration?: number;
14
+ delay?: number;
15
+ }
16
+ export interface BingDialogProps extends BingGlassEffectProps {
17
+ modelValue?: boolean;
18
+ title?: string;
19
+ width?: string | number;
20
+ zIndex?: number;
21
+ lockScroll?: boolean;
22
+ closeOnOverlay?: boolean;
23
+ closeOnEsc?: boolean;
24
+ closeOnConfirm?: boolean;
25
+ showClose?: boolean;
26
+ showFooter?: boolean;
27
+ cancelText?: string;
28
+ confirmText?: string;
29
+ confirmLoading?: boolean;
30
+ confirmDisabled?: boolean;
31
+ glass?: boolean;
32
+ overlayBlur?: boolean;
33
+ overlayOrbs?: BingDialogOverlayOrb[];
34
+ overlayOrbsAnimated?: boolean;
35
+ showPeek?: boolean;
36
+ peekOpacity?: number;
37
+ ariaLabel?: string;
38
+ ariaDescribedby?: string;
39
+ }
40
+ export interface BingDialogEmits {
41
+ 'update:modelValue': [value: boolean];
42
+ close: [reason: BingDialogCloseReason];
43
+ cancel: [];
44
+ confirm: [];
45
+ }
@@ -0,0 +1,61 @@
1
+ import { BingDialogCloseReason, BingDialogOverlayOrb, BingDialogProps } from './BingDialog.types';
2
+ declare function closeDialog(reason: BingDialogCloseReason): void;
3
+ declare function handleCancel(): void;
4
+ declare function handleConfirm(): void;
5
+ declare var __VLS_7: {}, __VLS_28: {}, __VLS_30: {
6
+ close: typeof closeDialog;
7
+ cancel: typeof handleCancel;
8
+ confirm: typeof handleConfirm;
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ title?: (props: typeof __VLS_7) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_28) => any;
14
+ } & {
15
+ footer?: (props: typeof __VLS_30) => any;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<BingDialogProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "update:modelValue": (value: boolean) => any;
19
+ cancel: () => any;
20
+ close: (reason: BingDialogCloseReason) => any;
21
+ confirm: () => any;
22
+ }, string, import('vue').PublicProps, Readonly<BingDialogProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
24
+ onCancel?: (() => any) | undefined;
25
+ onClose?: ((reason: BingDialogCloseReason) => any) | undefined;
26
+ onConfirm?: (() => any) | undefined;
27
+ }>, {
28
+ width: string | number;
29
+ zIndex: number;
30
+ title: string;
31
+ glass: boolean;
32
+ ariaLabel: string;
33
+ modelValue: boolean;
34
+ glassBlur: string | number;
35
+ glassOpacity: number;
36
+ glassSaturation: number;
37
+ ariaDescribedby: string;
38
+ closeOnEsc: boolean;
39
+ lockScroll: boolean;
40
+ closeOnOverlay: boolean;
41
+ closeOnConfirm: boolean;
42
+ showClose: boolean;
43
+ showFooter: boolean;
44
+ cancelText: string;
45
+ confirmText: string;
46
+ confirmLoading: boolean;
47
+ confirmDisabled: boolean;
48
+ overlayBlur: boolean;
49
+ overlayOrbs: BingDialogOverlayOrb[];
50
+ overlayOrbsAnimated: boolean;
51
+ showPeek: boolean;
52
+ peekOpacity: number;
53
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
54
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
55
+ declare const _default: typeof __VLS_export;
56
+ export default _default;
57
+ type __VLS_WithSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,2 @@
1
+ export { default as BingDialog } from './BingDialog.vue';
2
+ export type { BingDialogCloseReason, BingDialogEmits, BingDialogOverlayOrb, BingDialogProps, } from './BingDialog.types';
@@ -0,0 +1,7 @@
1
+ import { InjectionKey } from 'vue';
2
+ export interface BingDropDownContext {
3
+ close: () => void;
4
+ floatingId: string;
5
+ getGlassStyle: () => Record<string, string>;
6
+ }
7
+ export declare const bingDropDownContextKey: InjectionKey<BingDropDownContext>;
@@ -0,0 +1,60 @@
1
+ import { Component } from 'vue';
2
+ import { BingGlassEffectProps } from '../../utils/glass';
3
+ export type BingDropDownPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
4
+ export type BingDropDownSize = 'sm' | 'md' | 'lg';
5
+ export type BingDropDownTrigger = 'click' | 'hover' | 'contextmenu';
6
+ export type BingDropDownItemTone = 'default' | 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
7
+ export interface BingDropDownProps extends BingGlassEffectProps {
8
+ open?: boolean | null;
9
+ context?: unknown | null;
10
+ trigger?: BingDropDownTrigger;
11
+ placement?: BingDropDownPlacement;
12
+ size?: BingDropDownSize;
13
+ width?: string | number;
14
+ minWidth?: string | number;
15
+ maxWidth?: string | number;
16
+ block?: boolean;
17
+ closeOnOutside?: boolean;
18
+ closeOnEscape?: boolean;
19
+ autoFocus?: boolean;
20
+ loop?: boolean;
21
+ ariaLabel?: string;
22
+ }
23
+ export interface BingDropDownContextOpenPayload {
24
+ event: MouseEvent | KeyboardEvent;
25
+ context: unknown | null;
26
+ x: number;
27
+ y: number;
28
+ }
29
+ export interface BingDropDownEmits {
30
+ 'update:open': [open: boolean];
31
+ 'update:context': [context: unknown | null];
32
+ open: [];
33
+ close: [];
34
+ 'context-open': [payload: BingDropDownContextOpenPayload];
35
+ 'after-enter': [];
36
+ 'after-leave': [];
37
+ }
38
+ export interface BingDropDownExpose {
39
+ openPanel: () => void;
40
+ close: () => void;
41
+ toggle: () => void;
42
+ focusFirstItem: () => void;
43
+ }
44
+ export interface BingDropDownItemProps {
45
+ title?: string;
46
+ description?: string;
47
+ shortcut?: string | string[];
48
+ icon?: Component;
49
+ href?: string;
50
+ target?: string;
51
+ rel?: string;
52
+ tone?: BingDropDownItemTone;
53
+ disabled?: boolean;
54
+ active?: boolean;
55
+ closeOnClick?: boolean;
56
+ ariaLabel?: string;
57
+ }
58
+ export interface BingDropDownItemEmits {
59
+ click: [event: MouseEvent];
60
+ }
@@ -0,0 +1,87 @@
1
+ import { BingDropDownExpose, BingDropDownPlacement, BingDropDownProps } from './BingDropDown.types';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<BingDropDownProps, BingDropDownExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ close: () => any;
6
+ open: () => any;
7
+ "update:open": (open: boolean) => any;
8
+ "update:context": (context: unknown) => any;
9
+ "context-open": (payload: import('./BingDropDown.types').BingDropDownContextOpenPayload) => any;
10
+ "after-enter": () => any;
11
+ "after-leave": () => any;
12
+ }, string, import('vue').PublicProps, Readonly<BingDropDownProps> & Readonly<{
13
+ onClose?: (() => any) | undefined;
14
+ onOpen?: (() => any) | undefined;
15
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
16
+ "onUpdate:context"?: ((context: unknown) => any) | undefined;
17
+ "onContext-open"?: ((payload: import('./BingDropDown.types').BingDropDownContextOpenPayload) => any) | undefined;
18
+ "onAfter-enter"?: (() => any) | undefined;
19
+ "onAfter-leave"?: (() => any) | undefined;
20
+ }>, {
21
+ trigger: import('./BingDropDown.types').BingDropDownTrigger;
22
+ glass: boolean;
23
+ ariaLabel: string;
24
+ size: import('./BingDropDown.types').BingDropDownSize;
25
+ block: boolean;
26
+ loop: boolean;
27
+ glassBlur: string | number;
28
+ glassOpacity: number;
29
+ glassSaturation: number;
30
+ placement: BingDropDownPlacement;
31
+ closeOnOutside: boolean;
32
+ open: boolean | null;
33
+ closeOnEscape: boolean;
34
+ autoFocus: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
36
+ trigger?: (props: {
37
+ open: boolean;
38
+ context: unknown;
39
+ openPanel: () => void;
40
+ triggerProps: {
41
+ onContextmenu: (event: MouseEvent) => void;
42
+ onKeydown: (event: KeyboardEvent) => void;
43
+ 'aria-expanded': "true" | "false";
44
+ 'aria-haspopup': "menu";
45
+ 'data-bing-dropdown-trigger': string;
46
+ } | {
47
+ onClick: (event: MouseEvent) => void;
48
+ onKeydown: (event: KeyboardEvent) => void;
49
+ onPointerenter: (event: PointerEvent) => void;
50
+ onPointerleave: (event: PointerEvent) => void;
51
+ 'aria-expanded': "true" | "false";
52
+ 'aria-haspopup': "menu";
53
+ 'data-bing-dropdown-trigger': string;
54
+ };
55
+ getTriggerProps: (context?: unknown | null) => {
56
+ onContextmenu: (event: MouseEvent) => void;
57
+ onKeydown: (event: KeyboardEvent) => void;
58
+ 'aria-expanded': "true" | "false";
59
+ 'aria-haspopup': "menu";
60
+ 'data-bing-dropdown-trigger': string;
61
+ } | {
62
+ onClick: (event: MouseEvent) => void;
63
+ onKeydown: (event: KeyboardEvent) => void;
64
+ onPointerenter: (event: PointerEvent) => void;
65
+ onPointerleave: (event: PointerEvent) => void;
66
+ 'aria-expanded': "true" | "false";
67
+ 'aria-haspopup': "menu";
68
+ 'data-bing-dropdown-trigger': string;
69
+ };
70
+ close: (restoreFocus?: boolean) => void;
71
+ toggle: () => void;
72
+ }) => any;
73
+ } & {
74
+ header?: (props: {}) => any;
75
+ } & {
76
+ default?: (props: {
77
+ context: unknown;
78
+ close: (restoreFocus?: boolean) => void;
79
+ }) => any;
80
+ } & {
81
+ footer?: (props: {}) => any;
82
+ }>;
83
+ type __VLS_WithSlots<T, S> = T & {
84
+ new (): {
85
+ $slots: S;
86
+ };
87
+ };
@@ -0,0 +1,36 @@
1
+ import { BingDropDownItemProps } from './BingDropDown.types';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<BingDropDownItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ click: (event: MouseEvent) => any;
6
+ }, string, import('vue').PublicProps, Readonly<BingDropDownItemProps> & Readonly<{
7
+ onClick?: ((event: MouseEvent) => any) | undefined;
8
+ }>, {
9
+ disabled: boolean;
10
+ title: string;
11
+ ariaLabel: string;
12
+ description: string;
13
+ icon: import('vue').Component;
14
+ tone: import('./BingDropDown.types').BingDropDownItemTone;
15
+ target: string;
16
+ href: string;
17
+ shortcut: string | string[];
18
+ rel: string;
19
+ active: boolean;
20
+ closeOnClick: boolean;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
22
+ prefix?: (props: {}) => any;
23
+ } & {
24
+ default?: (props: {}) => any;
25
+ } & {
26
+ description?: (props: {}) => any;
27
+ } & {
28
+ suffix?: (props: {}) => any;
29
+ } & {
30
+ submenu?: (props: {}) => any;
31
+ }>;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,3 @@
1
+ export { default as BingDropDown } from './BingDropDown.vue';
2
+ export { default as BingDropDownItem } from './BingDropDownItem.vue';
3
+ export type { BingDropDownEmits, BingDropDownContextOpenPayload, BingDropDownExpose, BingDropDownItemEmits, BingDropDownItemProps, BingDropDownItemTone, BingDropDownPlacement, BingDropDownProps, BingDropDownSize, BingDropDownTrigger, } from './BingDropDown.types';
@@ -0,0 +1,56 @@
1
+ import { BingGlassEffectProps } from '../../utils/glass';
2
+ export type BingFilePreviewKind = 'auto' | 'image' | 'pdf' | 'text' | 'json' | 'csv' | 'docx' | 'xlsx' | 'pptx' | 'office' | 'unknown';
3
+ export type BingFilePreviewResolvedKind = Exclude<BingFilePreviewKind, 'auto'>;
4
+ export type BingFilePreviewCloseReason = 'close' | 'overlay' | 'escape';
5
+ export interface BingFilePreviewFile {
6
+ src?: string;
7
+ name?: string;
8
+ type?: BingFilePreviewKind;
9
+ mimeType?: string;
10
+ previewSrc?: string;
11
+ content?: string;
12
+ downloadUrl?: string;
13
+ size?: number;
14
+ }
15
+ export interface BingFilePreviewProps extends BingGlassEffectProps {
16
+ modelValue?: boolean;
17
+ file?: BingFilePreviewFile;
18
+ src?: string;
19
+ name?: string;
20
+ type?: BingFilePreviewKind;
21
+ mimeType?: string;
22
+ previewSrc?: string;
23
+ content?: string;
24
+ downloadUrl?: string;
25
+ size?: number;
26
+ zIndex?: number;
27
+ width?: string | number;
28
+ height?: string | number;
29
+ lockScroll?: boolean;
30
+ closeOnEsc?: boolean;
31
+ closeOnOverlay?: boolean;
32
+ downloadable?: boolean;
33
+ openable?: boolean;
34
+ jsonHighlight?: boolean;
35
+ jsonHighlightMaxLength?: number;
36
+ textMaxLength?: number;
37
+ csvMaxRows?: number;
38
+ csvMaxColumns?: number;
39
+ teleportTo?: string | HTMLElement;
40
+ ariaLabel?: string;
41
+ }
42
+ export interface BingFilePreviewDownloadPayload {
43
+ file: BingFilePreviewFile;
44
+ kind: BingFilePreviewResolvedKind;
45
+ }
46
+ export interface BingFilePreviewOpenExternalPayload {
47
+ file: BingFilePreviewFile;
48
+ kind: BingFilePreviewResolvedKind;
49
+ }
50
+ export interface BingFilePreviewEmits {
51
+ 'update:modelValue': [value: boolean];
52
+ close: [reason: BingFilePreviewCloseReason];
53
+ download: [payload: BingFilePreviewDownloadPayload];
54
+ openExternal: [payload: BingFilePreviewOpenExternalPayload];
55
+ error: [error: Error];
56
+ }
@@ -0,0 +1,46 @@
1
+ import { BingFilePreviewCloseReason, BingFilePreviewFile, BingFilePreviewProps } from './BingFilePreview.types';
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
+ close: (reason: BingFilePreviewCloseReason) => any;
6
+ download: (payload: import('./BingFilePreview.types').BingFilePreviewDownloadPayload) => any;
7
+ openExternal: (payload: import('./BingFilePreview.types').BingFilePreviewOpenExternalPayload) => any;
8
+ }, string, import('vue').PublicProps, Readonly<BingFilePreviewProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
10
+ onError?: ((error: Error) => any) | undefined;
11
+ onClose?: ((reason: BingFilePreviewCloseReason) => any) | undefined;
12
+ onDownload?: ((payload: import('./BingFilePreview.types').BingFilePreviewDownloadPayload) => any) | undefined;
13
+ onOpenExternal?: ((payload: import('./BingFilePreview.types').BingFilePreviewOpenExternalPayload) => any) | undefined;
14
+ }>, {
15
+ content: string;
16
+ height: string | number;
17
+ width: string | number;
18
+ zIndex: number;
19
+ type: import('./BingFilePreview.types').BingFilePreviewKind;
20
+ glass: boolean;
21
+ ariaLabel: string;
22
+ modelValue: boolean;
23
+ size: number;
24
+ name: string;
25
+ glassBlur: string | number;
26
+ glassOpacity: number;
27
+ glassSaturation: number;
28
+ file: BingFilePreviewFile;
29
+ closeOnEsc: boolean;
30
+ lockScroll: boolean;
31
+ closeOnOverlay: boolean;
32
+ downloadable: boolean;
33
+ teleportTo: string | HTMLElement;
34
+ src: string;
35
+ mimeType: string;
36
+ previewSrc: string;
37
+ downloadUrl: string;
38
+ openable: boolean;
39
+ jsonHighlight: boolean;
40
+ jsonHighlightMaxLength: number;
41
+ textMaxLength: number;
42
+ csvMaxRows: number;
43
+ csvMaxColumns: number;
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
45
+ declare const _default: typeof __VLS_export;
46
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as BingFilePreview } from './BingFilePreview.vue';
2
+ export type { BingFilePreviewCloseReason, BingFilePreviewDownloadPayload, BingFilePreviewEmits, BingFilePreviewFile, BingFilePreviewKind, BingFilePreviewOpenExternalPayload, BingFilePreviewProps, BingFilePreviewResolvedKind, } from './BingFilePreview.types';
@@ -0,0 +1,31 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { BingControlStatus, BingFormBreakpoint, BingFormErrors, BingFormLabelPosition, BingFormSize, BingFormValidateTrigger } from './BingForm.types';
3
+ export interface BingFormFieldRegistration {
4
+ prop: string;
5
+ scrollToField: () => void;
6
+ }
7
+ export interface BingFormContext {
8
+ size: ComputedRef<BingFormSize>;
9
+ disabled: ComputedRef<boolean>;
10
+ columns: ComputedRef<Record<BingFormBreakpoint, number>>;
11
+ labelPosition: ComputedRef<BingFormLabelPosition>;
12
+ labelWidth: ComputedRef<string>;
13
+ validateField: (prop: string, trigger?: BingFormValidateTrigger) => Promise<boolean>;
14
+ clearValidate: (prop?: string) => void;
15
+ getFieldErrors: (prop: string) => string[];
16
+ registerField: (field: BingFormFieldRegistration) => void;
17
+ unregisterField: (field: BingFormFieldRegistration) => void;
18
+ }
19
+ export interface BingFormItemContext {
20
+ controlId: ComputedRef<string>;
21
+ ariaDescribedby: ComputedRef<string | undefined>;
22
+ isInvalid: ComputedRef<boolean>;
23
+ status: ComputedRef<BingControlStatus>;
24
+ size: ComputedRef<BingFormSize>;
25
+ disabled: ComputedRef<boolean>;
26
+ handleControlChange: () => void;
27
+ handleControlBlur: () => void;
28
+ }
29
+ export declare const bingFormContextKey: InjectionKey<BingFormContext>;
30
+ export declare const bingFormItemContextKey: InjectionKey<BingFormItemContext>;
31
+ export declare function cloneErrors(errors: BingFormErrors): BingFormErrors;