hys-ui 0.2.0 → 0.4.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/CHANGELOG.md +59 -0
- package/README.md +68 -59
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +227 -60
- package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
- package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
- package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
- package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
- package/dist/components/HysCascader/HysCascader.vue.js +2 -2
- package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
- package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +1092 -142
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +491 -85
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysSearch/HysSearch.vue.js +5 -82
- package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +755 -590
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
- package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
- package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
- package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1416 -1127
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +291 -63
- package/dist/components/HysTour/HysTour3.vue.js +5 -0
- package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
- package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
- package/dist/components/HysTree/HysTree.vue.js +2 -2
- package/dist/components/HysTree/HysTree2.vue.js +195 -184
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/buttonGroup.js +12 -0
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/floatingPosition.js +18 -0
- package/dist/composables/mentionDocument.js +79 -0
- package/dist/composables/mentionEditor.js +58 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/selectOptions.js +44 -38
- package/dist/composables/splitPaneSizes.js +58 -0
- package/dist/composables/table.js +128 -105
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +19 -17
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +118 -80
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useMentionCaret.js +81 -0
- package/dist/composables/useMentionList.js +81 -0
- package/dist/composables/useMentionModel.js +90 -0
- package/dist/composables/useMentionOptions.js +421 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useSplitPaneDrag.js +52 -0
- package/dist/composables/useSplitPaneStorage.js +38 -0
- package/dist/composables/useTable.js +344 -312
- package/dist/composables/useTableSticky.js +79 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTourLayout.js +129 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/config.js +11 -11
- package/dist/index.js +175 -153
- package/dist/internal/MultiSplitPane.vue.js +305 -0
- package/dist/internal/MultiSplitPane2.vue.js +4 -0
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
- package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
- package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +3 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -39
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +19 -5
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
- package/dist/types/components/HysTable/HysTable.vue.d.ts +1742 -5
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -8
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
- package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +3 -0
- package/dist/types/composables/avatar.d.ts +3 -0
- package/dist/types/composables/buttonGroup.d.ts +9 -0
- package/dist/types/composables/cascader.d.ts +3 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +3 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/floatingPosition.d.ts +14 -0
- package/dist/types/composables/formContext.d.ts +2 -0
- package/dist/types/composables/mention.d.ts +284 -0
- package/dist/types/composables/mentionDocument.d.ts +15 -0
- package/dist/types/composables/mentionEditor.d.ts +7 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +185 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/selectOptions.d.ts +7 -0
- package/dist/types/composables/splitPaneSizes.d.ts +11 -0
- package/dist/types/composables/table.d.ts +119 -6
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/tour.d.ts +68 -0
- package/dist/types/composables/transfer.d.ts +7 -0
- package/dist/types/composables/tree.d.ts +3 -0
- package/dist/types/composables/treeSelect.d.ts +3 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +1 -1
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +22 -3
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useMentionCaret.d.ts +6 -0
- package/dist/types/composables/useMentionList.d.ts +23 -0
- package/dist/types/composables/useMentionModel.d.ts +14 -0
- package/dist/types/composables/useMentionOptions.d.ts +26 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
- package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
- package/dist/types/composables/useTable.d.ts +7 -3
- package/dist/types/composables/useTableSticky.d.ts +22 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTourLayout.d.ts +33 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +53 -3
- package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +3 -2
- package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
- package/dist/components/HysTour/HysTour2.vue.js +0 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HysPopupTransition } from '../motion/popup';
|
|
1
2
|
import type { Component, CSSProperties } from "vue";
|
|
2
3
|
import type { Placement } from "./useFloating";
|
|
3
4
|
import type { HysInputProps } from "./textInput";
|
|
@@ -23,6 +24,8 @@ export interface HysAutocompleteContext {
|
|
|
23
24
|
export type HysAutocompleteCallback = (options: readonly HysAutocompleteDataOption[]) => void;
|
|
24
25
|
export type HysAutocompleteFetch = (query: string, callback: HysAutocompleteCallback, context: HysAutocompleteContext) => void | readonly HysAutocompleteDataOption[] | Promise<void | readonly HysAutocompleteDataOption[]>;
|
|
25
26
|
export interface HysAutocompleteProps {
|
|
27
|
+
popupTransition?: HysPopupTransition;
|
|
28
|
+
popupTransitionDuration?: number;
|
|
26
29
|
modelValue?: string;
|
|
27
30
|
defaultValue?: string;
|
|
28
31
|
options?: readonly HysAutocompleteDataOption[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HysPopupTransition } from '../motion/popup';
|
|
1
2
|
import { type Component, type ComputedRef, type CSSProperties, type ImgHTMLAttributes, type InjectionKey } from "vue";
|
|
2
3
|
import type { Placement } from "./useFloating";
|
|
3
4
|
export type HysAvatarBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
@@ -46,6 +47,8 @@ export interface HysAvatarGroupInstance {
|
|
|
46
47
|
close: () => void;
|
|
47
48
|
}
|
|
48
49
|
export interface HysAvatarGroupProps {
|
|
50
|
+
popupTransition?: HysPopupTransition;
|
|
51
|
+
popupTransitionDuration?: number;
|
|
49
52
|
options?: readonly HysAvatarOption[];
|
|
50
53
|
size?: HysAvatarSize;
|
|
51
54
|
shape?: "circle" | "square";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from "vue";
|
|
2
|
+
import type { HysButtonAppearance, HysButtonSize, HysButtonVariant } from "../components/HysButton/HysButton.vue";
|
|
3
|
+
export declare function buttonSize(size: HysButtonSize | undefined): "sm" | "md" | "lg" | undefined;
|
|
4
|
+
export declare function buttonVariant(type: HysButtonAppearance | "button" | "submit" | "reset" | undefined): HysButtonVariant | undefined;
|
|
5
|
+
export declare const buttonGroupKey: InjectionKey<{
|
|
6
|
+
variant: Readonly<Ref<HysButtonVariant | undefined>>;
|
|
7
|
+
size: Readonly<Ref<"sm" | "md" | "lg" | undefined>>;
|
|
8
|
+
disabled: Readonly<Ref<boolean>>;
|
|
9
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HysPopupTransition } from '../motion/popup';
|
|
1
2
|
import type { CSSProperties, VNodeChild } from "vue";
|
|
2
3
|
import { type HysTreeKey } from "./tree";
|
|
3
4
|
import type { Placement } from "./useFloating";
|
|
@@ -72,6 +73,8 @@ export interface HysCascaderLocale {
|
|
|
72
73
|
limit: string;
|
|
73
74
|
}
|
|
74
75
|
export interface HysCascaderProps<N extends object = HysCascaderNode, V extends HysCascaderValue = HysCascaderValue> {
|
|
76
|
+
popupTransition?: HysPopupTransition;
|
|
77
|
+
popupTransitionDuration?: number;
|
|
75
78
|
options: readonly N[];
|
|
76
79
|
modelValue?: V;
|
|
77
80
|
defaultValue?: V;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { CSSProperties, VNodeChild } from "vue";
|
|
2
|
+
import type { HysPopupMotionProps } from "../motion/popup";
|
|
3
|
+
import type { Placement } from "./useFloating";
|
|
4
|
+
export type HysColorFormat = "hex" | "rgb" | "hsl" | "hsv";
|
|
5
|
+
export interface HysColor {
|
|
6
|
+
h: number;
|
|
7
|
+
s: number;
|
|
8
|
+
v: number;
|
|
9
|
+
a: number;
|
|
10
|
+
}
|
|
11
|
+
export interface HysColorPickerProps extends HysPopupMotionProps {
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
size?: "sm" | "md" | "lg";
|
|
17
|
+
label?: string;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
presets?: readonly string[];
|
|
20
|
+
clearable?: boolean;
|
|
21
|
+
showAlpha?: boolean;
|
|
22
|
+
format?: HysColorFormat;
|
|
23
|
+
immediate?: boolean;
|
|
24
|
+
showInput?: boolean;
|
|
25
|
+
showText?: boolean;
|
|
26
|
+
showPresets?: boolean;
|
|
27
|
+
inline?: boolean;
|
|
28
|
+
open?: boolean;
|
|
29
|
+
defaultOpen?: boolean;
|
|
30
|
+
placement?: Placement;
|
|
31
|
+
appendTo?: string | HTMLElement | false;
|
|
32
|
+
popupClass?: string;
|
|
33
|
+
popupStyle?: CSSProperties;
|
|
34
|
+
popupWidth?: number | string;
|
|
35
|
+
showFooter?: boolean;
|
|
36
|
+
confirmText?: string;
|
|
37
|
+
cancelText?: string;
|
|
38
|
+
clearText?: string;
|
|
39
|
+
status?: "error" | "warning" | "success";
|
|
40
|
+
error?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
form?: string;
|
|
43
|
+
tabindex?: number;
|
|
44
|
+
autofocus?: boolean;
|
|
45
|
+
validateEvent?: boolean;
|
|
46
|
+
inputProps?: Record<string, unknown>;
|
|
47
|
+
}
|
|
48
|
+
export interface HysColorPickerContext {
|
|
49
|
+
value: string;
|
|
50
|
+
draft: string;
|
|
51
|
+
color: Readonly<HysColor>;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
readonly: boolean;
|
|
54
|
+
valid: boolean;
|
|
55
|
+
dirty: boolean;
|
|
56
|
+
setColor: (value: string) => Promise<boolean>;
|
|
57
|
+
confirm: () => Promise<boolean>;
|
|
58
|
+
cancel: () => void;
|
|
59
|
+
clear: () => Promise<boolean>;
|
|
60
|
+
show: () => Promise<boolean>;
|
|
61
|
+
hide: () => Promise<boolean>;
|
|
62
|
+
}
|
|
63
|
+
export interface HysColorPickerSlots {
|
|
64
|
+
trigger?: (context: HysColorPickerContext) => VNodeChild;
|
|
65
|
+
header?: (context: HysColorPickerContext) => VNodeChild;
|
|
66
|
+
footer?: (context: HysColorPickerContext) => VNodeChild;
|
|
67
|
+
preset?: (context: {
|
|
68
|
+
value: string;
|
|
69
|
+
color: string;
|
|
70
|
+
selected: boolean;
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
}) => VNodeChild;
|
|
73
|
+
}
|
|
74
|
+
export interface HysColorPickerInstance {
|
|
75
|
+
readonly element: HTMLElement | undefined;
|
|
76
|
+
readonly input: HTMLInputElement | undefined;
|
|
77
|
+
readonly panel: HTMLElement | undefined;
|
|
78
|
+
readonly value: string;
|
|
79
|
+
readonly draft: string;
|
|
80
|
+
readonly color: Readonly<HysColor>;
|
|
81
|
+
readonly open: boolean;
|
|
82
|
+
focus: (options?: FocusOptions) => void;
|
|
83
|
+
blur: () => void;
|
|
84
|
+
show: () => Promise<boolean>;
|
|
85
|
+
hide: () => Promise<boolean>;
|
|
86
|
+
confirm: () => Promise<boolean>;
|
|
87
|
+
cancel: () => void;
|
|
88
|
+
clear: () => Promise<boolean>;
|
|
89
|
+
setColor: (value: string) => Promise<boolean>;
|
|
90
|
+
}
|
|
91
|
+
export declare const colorClamp: (value: number, min?: number, max?: number) => number;
|
|
92
|
+
export declare function colorFromRgb(r: number, g: number, b: number, a?: number): HysColor;
|
|
93
|
+
export declare function colorRgb(c: HysColor): readonly [number, number, number];
|
|
94
|
+
export declare function parseColor(value: string | undefined): HysColor | undefined;
|
|
95
|
+
export declare function formatColor(color: HysColor, format?: HysColorFormat, alpha?: boolean): string;
|
|
96
|
+
export declare const colorCss: (color: HysColor) => string;
|
|
97
|
+
export declare function sameColor(a: HysColor | undefined, b: HysColor | undefined): boolean;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { HysPopupMotionProps } from "../motion/popup";
|
|
2
|
+
export type HysDataGridKey = string | number;
|
|
3
|
+
export type HysDataGridSort = {
|
|
4
|
+
key: string;
|
|
5
|
+
direction: "asc" | "desc";
|
|
6
|
+
};
|
|
7
|
+
export interface HysDataGridQuery {
|
|
8
|
+
page: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
sort: HysDataGridSort[];
|
|
11
|
+
search: string;
|
|
12
|
+
filters: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export interface GridColumn<T extends object = Record<string, unknown>> {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
field?: string | ((row: T) => unknown);
|
|
18
|
+
width?: number;
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
maxWidth?: number;
|
|
21
|
+
sortable?: boolean;
|
|
22
|
+
sortMethod?: (a: T, b: T) => number;
|
|
23
|
+
filterable?: boolean;
|
|
24
|
+
filterMethod?: (value: string, row: T) => boolean;
|
|
25
|
+
hideable?: boolean;
|
|
26
|
+
resizable?: boolean;
|
|
27
|
+
reorderable?: boolean;
|
|
28
|
+
pinned?: "left" | "right";
|
|
29
|
+
align?: "left" | "center" | "right";
|
|
30
|
+
summary?: "sum" | "avg" | "min" | "max" | "count";
|
|
31
|
+
editable?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface HysDataGridResult<T extends object> {
|
|
34
|
+
rows: readonly T[];
|
|
35
|
+
total: number;
|
|
36
|
+
}
|
|
37
|
+
export type HysDataGridLoader<T extends object> = (query: HysDataGridQuery, context: {
|
|
38
|
+
signal: AbortSignal;
|
|
39
|
+
}) => Promise<HysDataGridResult<T>> | HysDataGridResult<T>;
|
|
40
|
+
export interface HysDataGridProps<T extends object> extends HysPopupMotionProps {
|
|
41
|
+
columns: readonly GridColumn<T>[];
|
|
42
|
+
rows: readonly T[];
|
|
43
|
+
rowKey?: string | ((row: T, index: number) => HysDataGridKey);
|
|
44
|
+
page?: number;
|
|
45
|
+
pageSize?: number;
|
|
46
|
+
query?: HysDataGridQuery;
|
|
47
|
+
defaultQuery?: Partial<HysDataGridQuery>;
|
|
48
|
+
immediateQuery?: boolean;
|
|
49
|
+
serverMode?: boolean;
|
|
50
|
+
loadRows?: HysDataGridLoader<T>;
|
|
51
|
+
totalRows?: number;
|
|
52
|
+
storageKey?: string;
|
|
53
|
+
selectable?: boolean;
|
|
54
|
+
rowSelectable?: (row: T, index: number) => boolean;
|
|
55
|
+
selectedRowKeys?: readonly HysDataGridKey[];
|
|
56
|
+
defaultSelectedRowKeys?: readonly HysDataGridKey[];
|
|
57
|
+
reserveSelection?: boolean;
|
|
58
|
+
selectionType?: "checkbox" | "radio";
|
|
59
|
+
loading?: boolean;
|
|
60
|
+
emptyText?: string;
|
|
61
|
+
density?: "compact" | "normal" | "comfortable";
|
|
62
|
+
multiSort?: boolean;
|
|
63
|
+
stickyHeader?: boolean;
|
|
64
|
+
maxHeight?: number | string;
|
|
65
|
+
scrollToTopOnQuery?: boolean;
|
|
66
|
+
groupable?: boolean;
|
|
67
|
+
showSummary?: boolean;
|
|
68
|
+
summaryMethod?: (column: GridColumn<T>, rows: readonly T[]) => string | number;
|
|
69
|
+
treeMode?: boolean;
|
|
70
|
+
parentKey?: string;
|
|
71
|
+
editable?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface HysDataGridInstance {
|
|
74
|
+
resetColumns(): void;
|
|
75
|
+
getQuery(): HysDataGridQuery;
|
|
76
|
+
setQuery(query: Partial<HysDataGridQuery>): void;
|
|
77
|
+
resetQuery(): void;
|
|
78
|
+
reload(): void;
|
|
79
|
+
getSelection(): HysDataGridKey[];
|
|
80
|
+
clearSelection(): void;
|
|
81
|
+
toggleRowSelection(key: HysDataGridKey, checked?: boolean): void;
|
|
82
|
+
scrollTo(options: ScrollToOptions): void;
|
|
83
|
+
scrollToRow(key: HysDataGridKey): boolean;
|
|
84
|
+
}
|
|
85
|
+
export type GridRow<T extends object> = {
|
|
86
|
+
row: T;
|
|
87
|
+
id: HysDataGridKey;
|
|
88
|
+
index: number;
|
|
89
|
+
};
|
|
90
|
+
export type GridTreeRow<T extends object> = GridRow<T> & {
|
|
91
|
+
depth: number;
|
|
92
|
+
hasChildren: boolean;
|
|
93
|
+
};
|
|
94
|
+
export declare const gridKey: (value: unknown) => value is HysDataGridKey;
|
|
95
|
+
export declare const gridToken: (key: HysDataGridKey) => string;
|
|
96
|
+
export declare const positiveInteger: (value: number | undefined, fallback: number) => number;
|
|
97
|
+
export declare function gridField(row: object, path: string): unknown;
|
|
98
|
+
export declare function gridValue<T extends object>(row: T, column: GridColumn<T>): unknown;
|
|
99
|
+
export declare function gridRows<T extends object>(rows: readonly T[], rowKey: NonNullable<HysDataGridProps<T>["rowKey"]>, offset: number): GridRow<T>[];
|
|
100
|
+
export declare function gridTree<T extends object>(rows: readonly GridRow<T>[], parentKey: string, expanded: ReadonlySet<HysDataGridKey>): GridTreeRow<T>[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HysPopupTransition } from '../motion/popup';
|
|
1
2
|
import type { CSSProperties } from "vue";
|
|
2
3
|
import type { Placement } from "./useFloating";
|
|
3
4
|
export type HysDateScalar = string | Date | number;
|
|
@@ -82,6 +83,8 @@ export interface HysDatePickerLocale {
|
|
|
82
83
|
limit: string;
|
|
83
84
|
}
|
|
84
85
|
export interface HysDatePickerProps<V extends HysDatePickerValue = HysDatePickerValue> {
|
|
86
|
+
popupTransition?: HysPopupTransition;
|
|
87
|
+
popupTransitionDuration?: number;
|
|
85
88
|
modelValue?: V;
|
|
86
89
|
defaultValue?: V;
|
|
87
90
|
clearValue?: V;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { CSSProperties, VNodeChild } from "vue";
|
|
2
|
+
import type { HysModalProps, HysModalActionContext, HysModalCloseReason, HysModalInitialFocus, HysModalSectionSize } from "./modal";
|
|
3
|
+
export type HysDrawerPlacement = "left" | "right" | "top" | "bottom";
|
|
4
|
+
export type HysDrawerSizeName = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
5
|
+
export type HysDrawerCloseReason = HysModalCloseReason;
|
|
6
|
+
export type HysDrawerActionContext = HysModalActionContext;
|
|
7
|
+
export type HysDrawerInitialFocus = HysModalInitialFocus;
|
|
8
|
+
export type HysDrawerSectionSize = HysModalSectionSize;
|
|
9
|
+
export type HysDrawerBeforeClose = Function & {
|
|
10
|
+
invoke(reason: HysDrawerCloseReason, context: HysDrawerActionContext): boolean | void | Promise<boolean | void>;
|
|
11
|
+
}["invoke"];
|
|
12
|
+
export interface HysDrawerResizeOptions {
|
|
13
|
+
minSize?: number | string;
|
|
14
|
+
maxSize?: number | string;
|
|
15
|
+
step?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface HysDrawerResizeInfo {
|
|
18
|
+
placement: HysDrawerPlacement;
|
|
19
|
+
cancelled: boolean;
|
|
20
|
+
accepted: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface HysDrawerPushOptions {
|
|
23
|
+
distance?: number | string;
|
|
24
|
+
}
|
|
25
|
+
export interface HysDrawerProps extends Pick<HysModalProps, "open" | "modelValue" | "defaultOpen" | "title" | "description" | "opacity" | "maskOpacity" | "width" | "height" | "fullscreen" | "defaultFullscreen" | "showFullscreen" | "closeOnMask" | "closeOnEscape" | "showClose" | "destroyOnClose" | "forceRender" | "modal" | "modalPenetrable" | "appendTo" | "lockScroll" | "trapFocus" | "restoreFocus" | "initialFocus" | "openDelay" | "closeDelay" | "transitionDuration" | "zIndex" | "headerClass" | "headerSize" | "footerSize" | "headerHeight" | "footerHeight" | "titleFontSize" | "bodyClass" | "footerClass" | "overlayClass" | "headerStyle" | "bodyStyle" | "footerStyle" | "maskStyle" | "ariaLabel" | "ariaLabelledby" | "ariaDescribedby" | "role" | "headerAriaLevel" | "closeText" | "fullscreenText" | "restoreText" | "footer" | "footerAlign" | "showCancel" | "okText" | "cancelText" | "okVariant" | "okButtonProps" | "cancelButtonProps" | "confirmLoading" | "confirmDisabled" | "cancelDisabled" | "closeWhileConfirming" | "loading" | "loadingText" | "showError" | "errorText" | "confirmOnCtrlEnter" | "closeOnConfirm"> {
|
|
26
|
+
beforeClose?: HysDrawerBeforeClose;
|
|
27
|
+
beforeConfirm?: (context: HysDrawerActionContext) => boolean | void | Promise<boolean | void>;
|
|
28
|
+
placement?: HysDrawerPlacement;
|
|
29
|
+
size?: HysDrawerSizeName | number | (string & {});
|
|
30
|
+
drawerClass?: string;
|
|
31
|
+
drawerStyle?: CSSProperties;
|
|
32
|
+
overlayStyle?: CSSProperties;
|
|
33
|
+
bodyTabindex?: number;
|
|
34
|
+
contained?: boolean;
|
|
35
|
+
withHeader?: boolean;
|
|
36
|
+
autofocus?: boolean;
|
|
37
|
+
transition?: "slide" | "fade" | "slide-fade" | "none" | false;
|
|
38
|
+
push?: boolean | HysDrawerPushOptions;
|
|
39
|
+
resizable?: boolean | HysDrawerResizeOptions;
|
|
40
|
+
resizeValue?: number | null;
|
|
41
|
+
defaultResizeValue?: number | null;
|
|
42
|
+
resetSizeOnClose?: boolean;
|
|
43
|
+
resizeText?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface HysDrawerSlotContext {
|
|
46
|
+
close: (reasonOrEvent?: HysDrawerCloseReason | Event, event?: Event) => Promise<boolean>;
|
|
47
|
+
cancel: (event?: Event) => Promise<boolean>;
|
|
48
|
+
confirm: (event?: Event) => Promise<boolean>;
|
|
49
|
+
closing: boolean;
|
|
50
|
+
confirming: boolean;
|
|
51
|
+
busy: boolean;
|
|
52
|
+
error: string;
|
|
53
|
+
titleId: string;
|
|
54
|
+
descriptionId: string;
|
|
55
|
+
fullscreen: boolean;
|
|
56
|
+
toggleFullscreen: () => Promise<boolean>;
|
|
57
|
+
resizing: boolean;
|
|
58
|
+
size: number;
|
|
59
|
+
resetSize: () => Promise<boolean>;
|
|
60
|
+
pushed: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface HysDrawerSlots {
|
|
63
|
+
default?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
64
|
+
header?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
65
|
+
title?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
66
|
+
extra?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
67
|
+
footer?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
68
|
+
loading?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
69
|
+
"close-icon"?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
70
|
+
"fullscreen-icon"?: (scope: HysDrawerSlotContext) => VNodeChild;
|
|
71
|
+
}
|
|
72
|
+
export interface HysDrawerInstance {
|
|
73
|
+
readonly element: HTMLElement | undefined;
|
|
74
|
+
readonly body: HTMLElement | undefined;
|
|
75
|
+
readonly open: boolean;
|
|
76
|
+
readonly closing: boolean;
|
|
77
|
+
readonly confirming: boolean;
|
|
78
|
+
readonly fullscreen: boolean;
|
|
79
|
+
readonly resizing: boolean;
|
|
80
|
+
readonly size: number;
|
|
81
|
+
readonly pushed: boolean;
|
|
82
|
+
focus: () => void;
|
|
83
|
+
show: () => Promise<boolean>;
|
|
84
|
+
close: (reasonOrEvent?: HysDrawerCloseReason | Event, event?: Event) => Promise<boolean>;
|
|
85
|
+
hide: () => Promise<boolean>;
|
|
86
|
+
cancel: (event?: Event) => Promise<boolean>;
|
|
87
|
+
confirm: (event?: Event) => Promise<boolean>;
|
|
88
|
+
setFullscreen: (value: boolean) => Promise<boolean>;
|
|
89
|
+
toggleFullscreen: () => Promise<boolean>;
|
|
90
|
+
resizeTo: (value: number | string) => Promise<boolean>;
|
|
91
|
+
resetSize: () => Promise<boolean>;
|
|
92
|
+
}
|
|
93
|
+
export declare const drawerSizes: {
|
|
94
|
+
readonly xs: 280;
|
|
95
|
+
readonly sm: 360;
|
|
96
|
+
readonly md: 520;
|
|
97
|
+
readonly lg: 736;
|
|
98
|
+
readonly xl: 960;
|
|
99
|
+
readonly full: "100%";
|
|
100
|
+
};
|
|
101
|
+
export declare const drawerVertical: (placement?: HysDrawerPlacement) => placement is "top" | "bottom";
|
|
102
|
+
export declare function drawerSize(props: HysDrawerProps): string | number;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { CSSProperties, VNodeChild } from "vue";
|
|
2
|
+
export type HysAlertTone = "info" | "primary" | "success" | "warning" | "danger";
|
|
3
|
+
export type HysAlertEffect = "light" | "dark" | "outline";
|
|
4
|
+
export type HysAlertTransition = "fade" | "slide" | "collapse" | "none";
|
|
5
|
+
export interface HysAlertCloseContext {
|
|
6
|
+
reason: "button" | "api";
|
|
7
|
+
event?: Event;
|
|
8
|
+
signal: AbortSignal;
|
|
9
|
+
}
|
|
10
|
+
export interface HysAlertProps {
|
|
11
|
+
tone?: HysAlertTone;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
closable?: boolean;
|
|
15
|
+
showIcon?: boolean;
|
|
16
|
+
center?: boolean;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
modelValue?: boolean;
|
|
19
|
+
defaultVisible?: boolean;
|
|
20
|
+
effect?: HysAlertEffect;
|
|
21
|
+
banner?: boolean;
|
|
22
|
+
bordered?: boolean;
|
|
23
|
+
size?: "sm" | "md" | "lg";
|
|
24
|
+
closeText?: string;
|
|
25
|
+
closeLabel?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
beforeClose?: (context: HysAlertCloseContext) => boolean | void | Promise<boolean | void>;
|
|
28
|
+
transition?: HysAlertTransition;
|
|
29
|
+
transitionDuration?: number;
|
|
30
|
+
appear?: boolean;
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
ariaLive?: "off" | "polite" | "assertive";
|
|
33
|
+
ariaAtomic?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface HysAlertSlotContext {
|
|
36
|
+
tone: HysAlertTone;
|
|
37
|
+
visible: boolean;
|
|
38
|
+
closing: boolean;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
close: () => Promise<boolean>;
|
|
41
|
+
}
|
|
42
|
+
export interface HysAlertSlots {
|
|
43
|
+
default?: (context: HysAlertSlotContext) => VNodeChild;
|
|
44
|
+
title?: (context: HysAlertSlotContext) => VNodeChild;
|
|
45
|
+
description?: (context: HysAlertSlotContext) => VNodeChild;
|
|
46
|
+
icon?: (context: HysAlertSlotContext) => VNodeChild;
|
|
47
|
+
action?: (context: HysAlertSlotContext) => VNodeChild;
|
|
48
|
+
"close-icon"?: (context: HysAlertSlotContext) => VNodeChild;
|
|
49
|
+
}
|
|
50
|
+
export interface HysAlertInstance {
|
|
51
|
+
readonly element: HTMLElement | undefined;
|
|
52
|
+
readonly visible: boolean;
|
|
53
|
+
readonly closing: boolean;
|
|
54
|
+
close: () => Promise<boolean>;
|
|
55
|
+
show: () => Promise<boolean>;
|
|
56
|
+
}
|
|
57
|
+
export type HysEmptyIllustration = "inbox" | "simple" | "default";
|
|
58
|
+
export interface HysEmptyProps {
|
|
59
|
+
title?: string | false;
|
|
60
|
+
description?: string | false;
|
|
61
|
+
image?: string | false;
|
|
62
|
+
imageSize?: number;
|
|
63
|
+
imageStyle?: CSSProperties;
|
|
64
|
+
imageFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
65
|
+
imageAlt?: string;
|
|
66
|
+
imageLoading?: "eager" | "lazy";
|
|
67
|
+
crossOrigin?: "" | "anonymous" | "use-credentials";
|
|
68
|
+
referrerPolicy?: ReferrerPolicy;
|
|
69
|
+
illustration?: HysEmptyIllustration;
|
|
70
|
+
size?: "sm" | "md" | "lg";
|
|
71
|
+
showImageLoading?: boolean;
|
|
72
|
+
ariaLabel?: string;
|
|
73
|
+
ariaLive?: "off" | "polite" | "assertive";
|
|
74
|
+
}
|
|
75
|
+
export interface HysEmptySlotContext {
|
|
76
|
+
title: string | false;
|
|
77
|
+
description: string | false;
|
|
78
|
+
imageLoading: boolean;
|
|
79
|
+
imageError: boolean;
|
|
80
|
+
retryImage: () => boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface HysEmptySlots {
|
|
83
|
+
default?: (context: HysEmptySlotContext) => VNodeChild;
|
|
84
|
+
image?: (context: HysEmptySlotContext) => VNodeChild;
|
|
85
|
+
title?: (context: HysEmptySlotContext) => VNodeChild;
|
|
86
|
+
description?: (context: HysEmptySlotContext) => VNodeChild;
|
|
87
|
+
action?: (context: HysEmptySlotContext) => VNodeChild;
|
|
88
|
+
fallback?: (context: HysEmptySlotContext) => VNodeChild;
|
|
89
|
+
}
|
|
90
|
+
export interface HysEmptyInstance {
|
|
91
|
+
readonly element: HTMLElement | undefined;
|
|
92
|
+
readonly imageElement: HTMLImageElement | undefined;
|
|
93
|
+
readonly loadingImage: boolean;
|
|
94
|
+
readonly failedImage: boolean;
|
|
95
|
+
retryImage: () => boolean;
|
|
96
|
+
}
|
|
97
|
+
export declare function feedbackImage(value: string | false | undefined): string | undefined;
|
|
98
|
+
export declare const feedbackNumber: (value: number | undefined, fallback: number, min: number, max: number) => number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Placement } from "./useFloating";
|
|
2
|
+
export declare function positionFloating(anchor: DOMRect, size: {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}, viewport: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}, placement: Placement, gap: number, padding: number, flip: boolean): {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
placement: Placement;
|
|
14
|
+
};
|
|
@@ -123,6 +123,8 @@ export interface HysFieldContext {
|
|
|
123
123
|
invalid?: ComputedRef<boolean>;
|
|
124
124
|
status?: ComputedRef<HysFormStatus>;
|
|
125
125
|
validate?: (trigger?: HysFormTrigger) => Promise<boolean>;
|
|
126
|
+
/** Temporarily defer model-watch validation during a continuous control gesture. */
|
|
127
|
+
deferChangeValidation?: () => () => void;
|
|
126
128
|
disabled?: ComputedRef<boolean>;
|
|
127
129
|
size?: ComputedRef<"sm" | "md" | "lg">;
|
|
128
130
|
}
|