hys-ui 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/LICENSE +19 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1055 -753
- package/dist/components/HysDataGrid/gridColumnLayout.js +46 -0
- package/dist/components/HysDataGrid/gridPresentation.js +17 -0
- package/dist/components/HysDataGrid/useGridContextMenu.js +33 -0
- package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
- package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
- package/dist/components/HysForm/HysForm2.vue.js +9 -8
- package/dist/components/HysIcon/HysIcon.vue.js +373 -0
- package/dist/components/HysIcon/HysIcon2.vue.js +5 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic.vue.js +147 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.js +7 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel2.vue.js +440 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.js +29 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip.vue.js +19 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip2.vue.js +4 -0
- package/dist/components/HysIcon/builtins/access.js +180 -0
- package/dist/components/HysIcon/builtins/actions.js +327 -0
- package/dist/components/HysIcon/builtins/business.js +364 -0
- package/dist/components/HysIcon/builtins/catalog/access-1.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/access-2.json.js +35 -0
- package/dist/components/HysIcon/builtins/catalog/accessibility.json.js +26 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-2.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-3.json.js +42 -0
- package/dist/components/HysIcon/builtins/catalog/charts-1.json.js +50 -0
- package/dist/components/HysIcon/builtins/catalog/charts-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/commerce.json.js +43 -0
- package/dist/components/HysIcon/builtins/catalog/communication-1.json.js +49 -0
- package/dist/components/HysIcon/builtins/catalog/communication-2.json.js +37 -0
- package/dist/components/HysIcon/builtins/catalog/design-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/design-2.json.js +27 -0
- package/dist/components/HysIcon/builtins/catalog/development-1.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/development-2.json.js +60 -0
- package/dist/components/HysIcon/builtins/catalog/development-3.json.js +25 -0
- package/dist/components/HysIcon/builtins/catalog/devices-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/devices-2.json.js +55 -0
- package/dist/components/HysIcon/builtins/catalog/devices-3.json.js +23 -0
- package/dist/components/HysIcon/builtins/catalog/education.json.js +34 -0
- package/dist/components/HysIcon/builtins/catalog/emoji.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/files-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/files-2.json.js +47 -0
- package/dist/components/HysIcon/builtins/catalog/files-3.json.js +8 -0
- package/dist/components/HysIcon/builtins/catalog/food-1.json.js +67 -0
- package/dist/components/HysIcon/builtins/catalog/food-2.json.js +40 -0
- package/dist/components/HysIcon/builtins/catalog/home.json.js +36 -0
- package/dist/components/HysIcon/builtins/catalog/layout-1.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/layout-2.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/manifest.json.js +4 -0
- package/dist/components/HysIcon/builtins/catalog/maps-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/maps-2.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/media-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/media-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/medical.json.js +30 -0
- package/dist/components/HysIcon/builtins/catalog/nature.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/recreation.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/shapes.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/text-2.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-3.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/text-4.json.js +41 -0
- package/dist/components/HysIcon/builtins/catalog/time.json.js +39 -0
- package/dist/components/HysIcon/builtins/catalog/transport-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/transport-2.json.js +7 -0
- package/dist/components/HysIcon/builtins/catalog/weather.json.js +46 -0
- package/dist/components/HysIcon/builtins/communication.js +314 -0
- package/dist/components/HysIcon/builtins/documents.js +315 -0
- package/dist/components/HysIcon/builtins/extendedCatalog.js +75 -0
- package/dist/components/HysIcon/builtins/iconInCategory.js +11 -0
- package/dist/components/HysIcon/builtins/media.js +255 -0
- package/dist/components/HysIcon/builtins/navigation.js +276 -0
- package/dist/components/HysIcon/builtins/technology.js +189 -0
- package/dist/components/HysIcon/iconBuiltins.js +228 -0
- package/dist/components/HysIcon/iconConfig.js +30 -0
- package/dist/components/HysIcon/iconRegistry.js +183 -0
- package/dist/components/HysIcon/iconSafety.js +191 -0
- package/dist/components/HysIcon/iconStyle.js +70 -0
- package/dist/components/HysIcon/useIconResource.js +75 -0
- package/dist/components/HysPopconfirm/HysPopconfirm.vue.js +7 -0
- package/dist/components/HysPopconfirm/HysPopconfirm2.vue.js +346 -0
- package/dist/components/HysPopconfirm/usePopconfirmAction.js +32 -0
- package/dist/components/HysResult/HysResult.vue.js +7 -0
- package/dist/components/HysResult/HysResult2.vue.js +124 -0
- package/dist/components/HysSpace/HysSpace.vue.js +7 -0
- package/dist/components/HysSpace/HysSpace2.vue.js +79 -0
- package/dist/components/HysSpace/spaceItems.js +17 -0
- package/dist/components/HysSpin/HysSpin.vue.js +7 -0
- package/dist/components/HysSpin/HysSpin2.vue.js +427 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph.vue.js +334 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph2.vue.js +5 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal.vue.js +7 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal2.vue.js +66 -0
- package/dist/components/HysSpin/SpinPortal/spinTarget.js +57 -0
- package/dist/components/HysSpin/spinCatalog.js +35 -0
- package/dist/components/HysSpin/spinConfig.js +32 -0
- package/dist/components/HysSpin/spinService.js +160 -0
- package/dist/components/HysSpin/spinStyle.js +39 -0
- package/dist/components/HysSpin/useHysSpinTask.js +92 -0
- package/dist/components/HysSpin/useSpinFullscreen.js +60 -0
- package/dist/components/HysSpin/useSpinVisibility.js +59 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +285 -204
- package/dist/components/HysSplitPane/splitPaneResize.js +75 -0
- package/dist/components/HysTabPane/HysTabPane.vue.js +49 -0
- package/dist/components/HysTabPane/HysTabPane2.vue.js +4 -0
- package/dist/components/HysTable/HysTable.vue.js +3 -3
- package/dist/components/HysTable/HysTable2.vue.js +412 -383
- package/dist/components/HysTable/tableSearch.js +24 -0
- package/dist/components/HysTabs/HysTabs.vue.js +172 -5
- package/dist/components/HysTabs/HysTabs2.vue.js +2 -275
- package/dist/components/HysTabs/TabsMore/TabsMore.vue.js +7 -0
- package/dist/components/HysTabs/TabsMore/TabsMore2.vue.js +133 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels.vue.js +161 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels2.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts2.vue.js +88 -0
- package/dist/components/HysTabs/TabsSlot/TabsSlot.js +13 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.js +7 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench2.vue.js +687 -0
- package/dist/components/HysTabs/tabsConfig.js +35 -0
- package/dist/components/HysTabs/tabsItems.js +79 -0
- package/dist/components/HysTabs/tabsPersistence.js +118 -0
- package/dist/components/HysTabs/useHysRouteTabs.js +77 -0
- package/dist/components/HysTabs/useTabsDragGhost.js +47 -0
- package/dist/components/HysTabs/useTabsNav.js +127 -0
- package/dist/components/HysTabs/useTabsOverlays.js +52 -0
- package/dist/components/HysTabs/useTabsPanels.js +101 -0
- package/dist/components/HysTabs/useTabsPointer.js +131 -0
- package/dist/components/HysTabs/useTabsState.js +263 -0
- package/dist/composables/formLayout.js +20 -42
- package/dist/composables/popupSurfaceStyle.js +30 -0
- package/dist/composables/useContainerWidth.js +24 -0
- package/dist/composables/useFloating.js +28 -28
- package/dist/composables/usePageVisibility.js +19 -0
- package/dist/composables/usePopupSurface.js +153 -162
- package/dist/composables/usePopupSurfaceInteractions.js +91 -90
- package/dist/composables/useSplitPaneDrag.js +29 -26
- package/dist/composables/useSvgInstanceId.js +15 -0
- package/dist/composables/useTable.js +321 -306
- package/dist/composables/useTabularRowNavigation.js +46 -0
- package/dist/index.js +229 -185
- package/dist/internal/MultiSplitPane.vue.js +246 -205
- package/dist/internal/PopupSurfacePanel.vue.js +2 -2
- package/dist/internal/PopupSurfacePanel2.vue.js +35 -30
- package/dist/style.css +1 -1
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +40 -2
- package/dist/types/components/HysDataGrid/gridColumnLayout.d.ts +22 -0
- package/dist/types/components/HysDataGrid/gridPresentation.d.ts +47 -0
- package/dist/types/components/HysDataGrid/useGridContextMenu.d.ts +14 -0
- package/dist/types/components/HysDescriptions/HysDescriptions.vue.d.ts +20 -0
- package/dist/types/components/HysDescriptions/descriptionsTypes.d.ts +54 -0
- package/dist/types/components/HysForm/HysForm.vue.d.ts +1 -1
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysIcon/HysIcon.vue.d.ts +76 -0
- package/dist/types/components/HysIcon/IconGraphic/IconGraphic.vue.d.ts +43 -0
- package/dist/types/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.d.ts +17 -0
- package/dist/types/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.d.ts +10 -0
- package/dist/types/components/HysIcon/IconTooltip/IconTooltip.vue.d.ts +11 -0
- package/dist/types/components/HysIcon/builtins/access.d.ts +15 -0
- package/dist/types/components/HysIcon/builtins/actions.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/business.d.ts +31 -0
- package/dist/types/components/HysIcon/builtins/communication.d.ts +27 -0
- package/dist/types/components/HysIcon/builtins/documents.d.ts +29 -0
- package/dist/types/components/HysIcon/builtins/extendedCatalog.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/iconInCategory.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/media.d.ts +24 -0
- package/dist/types/components/HysIcon/builtins/navigation.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/technology.d.ts +18 -0
- package/dist/types/components/HysIcon/iconBuiltins.d.ts +2 -0
- package/dist/types/components/HysIcon/iconConfig.d.ts +10 -0
- package/dist/types/components/HysIcon/iconRegistry.d.ts +5 -0
- package/dist/types/components/HysIcon/iconSafety.d.ts +8 -0
- package/dist/types/components/HysIcon/iconStyle.d.ts +6 -0
- package/dist/types/components/HysIcon/iconTypes.d.ts +192 -0
- package/dist/types/components/HysIcon/useIconResource.d.ts +14 -0
- package/dist/types/components/HysPopconfirm/HysPopconfirm.vue.d.ts +85 -0
- package/dist/types/components/HysPopconfirm/popconfirmTypes.d.ts +72 -0
- package/dist/types/components/HysPopconfirm/usePopconfirmAction.d.ts +6 -0
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysResult/HysResult.vue.d.ts +22 -0
- package/dist/types/components/HysResult/resultTypes.d.ts +32 -0
- package/dist/types/components/HysSpace/HysSpace.vue.d.ts +15 -0
- package/dist/types/components/HysSpace/spaceItems.d.ts +9 -0
- package/dist/types/components/HysSpace/spaceTypes.d.ts +20 -0
- package/dist/types/components/HysSpin/HysSpin.vue.d.ts +84 -0
- package/dist/types/components/HysSpin/SpinGlyph/SpinGlyph.vue.d.ts +16 -0
- package/dist/types/components/HysSpin/SpinPortal/SpinPortal.vue.d.ts +21 -0
- package/dist/types/components/HysSpin/SpinPortal/spinTarget.d.ts +3 -0
- package/dist/types/components/HysSpin/spinCatalog.d.ts +122 -0
- package/dist/types/components/HysSpin/spinConfig.d.ts +10 -0
- package/dist/types/components/HysSpin/spinService.d.ts +7 -0
- package/dist/types/components/HysSpin/spinStyle.d.ts +5 -0
- package/dist/types/components/HysSpin/spinTypes.d.ts +133 -0
- package/dist/types/components/HysSpin/useHysSpinTask.d.ts +4 -0
- package/dist/types/components/HysSpin/useSpinFullscreen.d.ts +17 -0
- package/dist/types/components/HysSpin/useSpinVisibility.d.ts +10 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +25 -2
- package/dist/types/components/HysSplitPane/splitPaneResize.d.ts +17 -0
- package/dist/types/components/HysTabPane/HysTabPane.vue.d.ts +11 -0
- package/dist/types/components/HysTable/HysTable.vue.d.ts +16 -10
- package/dist/types/components/HysTable/tableSearch.d.ts +2 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +83 -74
- package/dist/types/components/HysTabs/TabsMore/TabsMore.vue.d.ts +14 -0
- package/dist/types/components/HysTabs/TabsPanels/TabsPanels.vue.d.ts +17 -0
- package/dist/types/components/HysTabs/TabsPrompts/TabsPrompts.vue.d.ts +7 -0
- package/dist/types/components/HysTabs/TabsSlot/TabsSlot.d.ts +9 -0
- package/dist/types/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.d.ts +32 -0
- package/dist/types/components/HysTabs/tabsConfig.d.ts +4 -0
- package/dist/types/components/HysTabs/tabsItems.d.ts +14 -0
- package/dist/types/components/HysTabs/tabsPersistence.d.ts +6 -0
- package/dist/types/components/HysTabs/tabsTypes.d.ts +236 -0
- package/dist/types/components/HysTabs/useHysRouteTabs.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsDragGhost.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsNav.d.ts +20 -0
- package/dist/types/components/HysTabs/useTabsOverlays.d.ts +54 -0
- package/dist/types/components/HysTabs/useTabsPanels.d.ts +14 -0
- package/dist/types/components/HysTabs/useTabsPointer.d.ts +30 -0
- package/dist/types/components/HysTabs/useTabsState.d.ts +32 -0
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +2 -2
- package/dist/types/components/HysToast/toastPresentation.d.ts +1 -1
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
- package/dist/types/composables/dataGrid.d.ts +34 -0
- package/dist/types/composables/formLayout.d.ts +1 -2
- package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
- package/dist/types/composables/table.d.ts +10 -1
- package/dist/types/composables/toastQueue.d.ts +4 -4
- package/dist/types/composables/toastQueueModel.d.ts +2 -2
- package/dist/types/composables/useColorPicker.d.ts +1 -1
- package/dist/types/composables/useContainerWidth.d.ts +2 -0
- package/dist/types/composables/useContextMenu.d.ts +1 -1
- package/dist/types/composables/useFloating.d.ts +2 -2
- package/dist/types/composables/usePageVisibility.d.ts +1 -0
- package/dist/types/composables/usePopupSurface.d.ts +9 -3
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +4 -2
- package/dist/types/composables/useSplitPaneDrag.d.ts +2 -2
- package/dist/types/composables/useSvgInstanceId.d.ts +1 -0
- package/dist/types/composables/useTable.d.ts +2 -0
- package/dist/types/composables/useTabularRowNavigation.d.ts +18 -0
- package/dist/types/index.d.ts +30 -2
- package/dist/types/internal/MultiSplitPane.vue.d.ts +10 -1
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const devicesIcons: {
|
|
2
|
+
monitor: import("../iconTypes").HysIconEntry;
|
|
3
|
+
laptop: import("../iconTypes").HysIconEntry;
|
|
4
|
+
tablet: import("../iconTypes").HysIconEntry;
|
|
5
|
+
smartphone: import("../iconTypes").HysIconEntry;
|
|
6
|
+
battery: import("../iconTypes").HysIconEntry;
|
|
7
|
+
"battery-charging": import("../iconTypes").HysIconEntry;
|
|
8
|
+
wifi: import("../iconTypes").HysIconEntry;
|
|
9
|
+
"wifi-off": import("../iconTypes").HysIconEntry;
|
|
10
|
+
signal: import("../iconTypes").HysIconEntry;
|
|
11
|
+
bluetooth: import("../iconTypes").HysIconEntry;
|
|
12
|
+
cloud: import("../iconTypes").HysIconEntry;
|
|
13
|
+
"cloud-upload": import("../iconTypes").HysIconEntry;
|
|
14
|
+
"cloud-download": import("../iconTypes").HysIconEntry;
|
|
15
|
+
server: import("../iconTypes").HysIconEntry;
|
|
16
|
+
"hard-drive": import("../iconTypes").HysIconEntry;
|
|
17
|
+
terminal: import("../iconTypes").HysIconEntry;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
import type { HysIconConfig, HysIconProps, HysIconRegistry } from "./iconTypes";
|
|
3
|
+
interface IconScope {
|
|
4
|
+
registry: ComputedRef<HysIconRegistry>;
|
|
5
|
+
defaults: ComputedRef<Partial<HysIconProps>>;
|
|
6
|
+
}
|
|
7
|
+
export declare function configureHysIcon(config: HysIconConfig): void;
|
|
8
|
+
export declare function useIconConfig(): IconScope;
|
|
9
|
+
export declare function provideHysIcons(config: HysIconConfig): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HysIconSvg, HysIconSvgNode } from "./iconTypes";
|
|
2
|
+
export declare function iconViewBox(value?: string): string;
|
|
3
|
+
export declare function iconPaint(value: string): string | undefined;
|
|
4
|
+
export declare function sanitizeIconNodes(nodes: readonly HysIconSvgNode[], prefix?: string): HysIconSvgNode[];
|
|
5
|
+
export declare function importHysIconSvg(markup: string): HysIconSvg;
|
|
6
|
+
export declare function iconAssetUrl(value: string, allowedOrigins?: readonly string[], fragment?: boolean): string | undefined;
|
|
7
|
+
export declare function iconSrcset(value: string | undefined, allowedOrigins?: readonly string[]): string | undefined;
|
|
8
|
+
export declare function serializeHysIconSvg(source: HysIconSvg): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CSSProperties } from "vue";
|
|
2
|
+
import type { HysIconAnimation, HysIconProps } from "./iconTypes";
|
|
3
|
+
export declare const iconLength: (value: number | string | undefined) => string | undefined;
|
|
4
|
+
export declare function iconNumber(value: number | undefined, fallback: number, min: number, max: number): number;
|
|
5
|
+
export declare const hysIconAnimations: readonly ["none", "spin", "rotate", "pulse", "bounce", "shake", "swing", "wiggle", "float", "breathing", "scale", "fade", "slide", "flip", "spring", "heartbeat", "blink", "draw", "morph", "gradient", "loading"];
|
|
6
|
+
export declare function iconStyle(options: HysIconProps, animation: HysIconAnimation, paused: boolean): CSSProperties;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { Component, CSSProperties, MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
+
import type { HysTheme } from "../../config";
|
|
3
|
+
export type HysIconVariant = "outline" | "filled" | "duotone" | "multicolor" | "round" | "sharp" | "bold" | "thin" | "gradient" | "flat" | "3d" | (string & {});
|
|
4
|
+
export type HysIconStatus = "default" | "loading" | "success" | "error" | "warning" | "info" | (string & {});
|
|
5
|
+
export type HysIconAnimation = "none" | "spin" | "rotate" | "pulse" | "bounce" | "shake" | "swing" | "wiggle" | "float" | "breathing" | "scale" | "fade" | "slide" | "flip" | "spring" | "heartbeat" | "blink" | "draw" | "morph" | "gradient" | "loading" | (string & {});
|
|
6
|
+
export interface HysIconSvgNode {
|
|
7
|
+
tag: string;
|
|
8
|
+
attrs?: Record<string, string | number>;
|
|
9
|
+
children?: readonly HysIconSvgNode[];
|
|
10
|
+
}
|
|
11
|
+
export interface HysIconSvg {
|
|
12
|
+
type: "svg";
|
|
13
|
+
viewBox?: string;
|
|
14
|
+
nodes: readonly HysIconSvgNode[];
|
|
15
|
+
}
|
|
16
|
+
export type HysIconSource = HysIconSvg | {
|
|
17
|
+
type: "sprite";
|
|
18
|
+
href: string;
|
|
19
|
+
viewBox?: string;
|
|
20
|
+
} | {
|
|
21
|
+
type: "image";
|
|
22
|
+
src: string;
|
|
23
|
+
srcset?: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: "font";
|
|
26
|
+
glyph?: string;
|
|
27
|
+
family?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "text";
|
|
31
|
+
text: string;
|
|
32
|
+
} | {
|
|
33
|
+
type: "component";
|
|
34
|
+
component: Component;
|
|
35
|
+
props?: Record<string, unknown>;
|
|
36
|
+
};
|
|
37
|
+
export type HysIconLoader = () => Promise<HysIconSource | {
|
|
38
|
+
default: HysIconSource;
|
|
39
|
+
}> | HysIconSource;
|
|
40
|
+
export type HysIconAsset = HysIconSource | HysIconLoader;
|
|
41
|
+
export interface HysIconEntry {
|
|
42
|
+
source?: HysIconAsset;
|
|
43
|
+
variants?: Record<string, HysIconAsset>;
|
|
44
|
+
label?: string;
|
|
45
|
+
category?: string;
|
|
46
|
+
keywords?: readonly string[];
|
|
47
|
+
aliases?: readonly string[];
|
|
48
|
+
directional?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface HysIconLibrary {
|
|
51
|
+
namespace: string;
|
|
52
|
+
version?: string;
|
|
53
|
+
icons: Record<string, HysIconAsset | HysIconEntry>;
|
|
54
|
+
}
|
|
55
|
+
export type HysIconConflict = "error" | "replace" | "keep";
|
|
56
|
+
export interface HysIconRecord {
|
|
57
|
+
name: string;
|
|
58
|
+
label: string;
|
|
59
|
+
namespace: string;
|
|
60
|
+
version?: string;
|
|
61
|
+
category: string;
|
|
62
|
+
variants: readonly string[];
|
|
63
|
+
aliases: readonly string[];
|
|
64
|
+
keywords: readonly string[];
|
|
65
|
+
directional: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface HysIconSearch {
|
|
68
|
+
namespace?: string;
|
|
69
|
+
category?: string;
|
|
70
|
+
variant?: string;
|
|
71
|
+
fuzzy?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface HysIconRegistry {
|
|
74
|
+
readonly revision: Readonly<Ref<number>>;
|
|
75
|
+
register(library: HysIconLibrary, conflict?: HysIconConflict): void;
|
|
76
|
+
unregister(namespace: string): void;
|
|
77
|
+
resolve(name: string): HysIconRecord | undefined;
|
|
78
|
+
get(name: string, variant?: HysIconVariant): HysIconSource | undefined;
|
|
79
|
+
load(name: string, variant?: HysIconVariant): Promise<HysIconSource>;
|
|
80
|
+
preload(names: readonly string[], variant?: HysIconVariant, allowedOrigins?: readonly string[]): Promise<PromiseSettledResult<HysIconSource>[]>;
|
|
81
|
+
list(): HysIconRecord[];
|
|
82
|
+
search(query: string, filter?: HysIconSearch): HysIconRecord[];
|
|
83
|
+
}
|
|
84
|
+
export type HysIconReference = string | HysIconSource;
|
|
85
|
+
export interface HysIconLayer {
|
|
86
|
+
icon: HysIconReference;
|
|
87
|
+
color?: string;
|
|
88
|
+
size?: number | string;
|
|
89
|
+
x?: number | string;
|
|
90
|
+
y?: number | string;
|
|
91
|
+
rotate?: number;
|
|
92
|
+
}
|
|
93
|
+
export interface HysIconProps {
|
|
94
|
+
name?: string;
|
|
95
|
+
source?: HysIconSource;
|
|
96
|
+
variant?: HysIconVariant;
|
|
97
|
+
registry?: HysIconRegistry;
|
|
98
|
+
status?: HysIconStatus;
|
|
99
|
+
statusIcons?: Record<string, HysIconReference>;
|
|
100
|
+
fallback?: HysIconReference | false;
|
|
101
|
+
loadingIcon?: HysIconReference | false;
|
|
102
|
+
size?: number | string;
|
|
103
|
+
width?: number | string;
|
|
104
|
+
height?: number | string;
|
|
105
|
+
fit?: "contain" | "cover" | "fill";
|
|
106
|
+
color?: string;
|
|
107
|
+
theme?: HysTheme | "system";
|
|
108
|
+
fill?: string;
|
|
109
|
+
stroke?: string;
|
|
110
|
+
strokeWidth?: number;
|
|
111
|
+
gradient?: readonly string[];
|
|
112
|
+
opacity?: number;
|
|
113
|
+
background?: string;
|
|
114
|
+
shape?: "circle" | "square" | "rounded";
|
|
115
|
+
radius?: number | string;
|
|
116
|
+
border?: string;
|
|
117
|
+
padding?: number | string;
|
|
118
|
+
gap?: number | string;
|
|
119
|
+
shadow?: string;
|
|
120
|
+
glow?: string;
|
|
121
|
+
rotate?: number;
|
|
122
|
+
flipX?: boolean;
|
|
123
|
+
flipY?: boolean;
|
|
124
|
+
align?: "start" | "center" | "end";
|
|
125
|
+
verticalAlign?: CSSProperties["verticalAlign"];
|
|
126
|
+
directional?: boolean;
|
|
127
|
+
animation?: HysIconAnimation;
|
|
128
|
+
animateOn?: "always" | "hover" | "click" | "state";
|
|
129
|
+
animated?: boolean;
|
|
130
|
+
paused?: boolean;
|
|
131
|
+
duration?: number;
|
|
132
|
+
speed?: number;
|
|
133
|
+
animationDelay?: number;
|
|
134
|
+
iterations?: number | "infinite";
|
|
135
|
+
easing?: string;
|
|
136
|
+
morphTo?: string;
|
|
137
|
+
animationStyle?: CSSProperties;
|
|
138
|
+
decorative?: boolean;
|
|
139
|
+
label?: string;
|
|
140
|
+
clickable?: boolean;
|
|
141
|
+
href?: string;
|
|
142
|
+
target?: string;
|
|
143
|
+
rel?: string;
|
|
144
|
+
disabled?: boolean;
|
|
145
|
+
readonly?: boolean;
|
|
146
|
+
active?: boolean;
|
|
147
|
+
selected?: boolean;
|
|
148
|
+
tooltip?: string;
|
|
149
|
+
badge?: number | string | boolean;
|
|
150
|
+
badgePosition?: "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
151
|
+
badgeMax?: number;
|
|
152
|
+
secondary?: HysIconReference;
|
|
153
|
+
layers?: readonly HysIconLayer[];
|
|
154
|
+
allowedOrigins?: readonly string[];
|
|
155
|
+
picker?: boolean;
|
|
156
|
+
allowUpload?: boolean;
|
|
157
|
+
storageKey?: string;
|
|
158
|
+
pickerLocale?: Partial<HysIconPickerLocale>;
|
|
159
|
+
}
|
|
160
|
+
export interface HysIconPickerLocale {
|
|
161
|
+
search: string;
|
|
162
|
+
library: string;
|
|
163
|
+
category: string;
|
|
164
|
+
variant: string;
|
|
165
|
+
all: string;
|
|
166
|
+
favorites: string;
|
|
167
|
+
recent: string;
|
|
168
|
+
popular: string;
|
|
169
|
+
empty: string;
|
|
170
|
+
previous: string;
|
|
171
|
+
next: string;
|
|
172
|
+
addFavorite: string;
|
|
173
|
+
removeFavorite: string;
|
|
174
|
+
copyName: string;
|
|
175
|
+
copyCode: string;
|
|
176
|
+
copySvg: string;
|
|
177
|
+
copied: string;
|
|
178
|
+
copyFailed: string;
|
|
179
|
+
upload: string;
|
|
180
|
+
imported: (count: number) => string;
|
|
181
|
+
}
|
|
182
|
+
export interface HysIconConfig {
|
|
183
|
+
registry?: HysIconRegistry;
|
|
184
|
+
defaults?: MaybeRefOrGetter<Partial<HysIconProps>>;
|
|
185
|
+
}
|
|
186
|
+
export interface HysIconContext {
|
|
187
|
+
name?: string;
|
|
188
|
+
status: HysIconStatus;
|
|
189
|
+
variant: HysIconVariant;
|
|
190
|
+
loading: boolean;
|
|
191
|
+
source?: HysIconSource;
|
|
192
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HysIconReference, HysIconRegistry, HysIconSource } from "./iconTypes";
|
|
2
|
+
export declare function useIconResource(options: {
|
|
3
|
+
reference(): HysIconReference | undefined;
|
|
4
|
+
registry(): HysIconRegistry;
|
|
5
|
+
variant(): string;
|
|
6
|
+
allowedOrigins?(): readonly string[] | undefined;
|
|
7
|
+
}): {
|
|
8
|
+
source: import("vue").ShallowRef<HysIconSource | undefined, HysIconSource | undefined>;
|
|
9
|
+
loading: import("vue").ShallowRef<boolean, boolean>;
|
|
10
|
+
error: import("vue").ShallowRef<unknown, unknown>;
|
|
11
|
+
record: import("vue").ComputedRef<import("./iconTypes").HysIconRecord | undefined>;
|
|
12
|
+
fail: (reason: unknown) => void;
|
|
13
|
+
reload: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { HysPopconfirmAction, HysPopconfirmActionContext, HysPopconfirmDismissReason, HysPopconfirmProps, HysPopconfirmSlots } from "./popconfirmTypes";
|
|
2
|
+
type __VLS_Slots = HysPopconfirmSlots;
|
|
3
|
+
declare function clearError(): void;
|
|
4
|
+
declare function close(): Promise<boolean>;
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<HysPopconfirmProps, {
|
|
6
|
+
element: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
7
|
+
referenceElement: import("vue").ComputedRef<HTMLElement | undefined>;
|
|
8
|
+
open: import("vue").Ref<boolean, boolean>;
|
|
9
|
+
placement: import("vue").Ref<import("../..").Placement, import("../..").Placement>;
|
|
10
|
+
show: () => Promise<boolean>;
|
|
11
|
+
close: typeof close;
|
|
12
|
+
hide: typeof close;
|
|
13
|
+
toggle: () => Promise<boolean>;
|
|
14
|
+
updatePosition: () => void;
|
|
15
|
+
focus: () => void | undefined;
|
|
16
|
+
confirm: (event?: Event) => Promise<boolean>;
|
|
17
|
+
cancel: (event?: Event) => Promise<boolean>;
|
|
18
|
+
abort: () => void;
|
|
19
|
+
pending: import("vue").ComputedRef<HysPopconfirmAction | null>;
|
|
20
|
+
error: import("vue").Ref<string, string>;
|
|
21
|
+
clearError: typeof clearError;
|
|
22
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (open: boolean) => any;
|
|
24
|
+
visibleChange: (open: boolean) => any;
|
|
25
|
+
show: () => any;
|
|
26
|
+
cancel: (context: HysPopconfirmActionContext) => any;
|
|
27
|
+
error: (error: unknown, context: HysPopconfirmActionContext) => any;
|
|
28
|
+
hide: () => any;
|
|
29
|
+
"update:open": (open: boolean) => any;
|
|
30
|
+
opened: () => any;
|
|
31
|
+
closed: () => any;
|
|
32
|
+
openChange: (open: boolean) => any;
|
|
33
|
+
confirm: (result: unknown, context: HysPopconfirmActionContext) => any;
|
|
34
|
+
dismiss: (reason: HysPopconfirmDismissReason) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<HysPopconfirmProps> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((open: boolean) => any) | undefined;
|
|
37
|
+
onVisibleChange?: ((open: boolean) => any) | undefined;
|
|
38
|
+
onShow?: (() => any) | undefined;
|
|
39
|
+
onCancel?: ((context: HysPopconfirmActionContext) => any) | undefined;
|
|
40
|
+
onError?: ((error: unknown, context: HysPopconfirmActionContext) => any) | undefined;
|
|
41
|
+
onHide?: (() => any) | undefined;
|
|
42
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
43
|
+
onOpened?: (() => any) | undefined;
|
|
44
|
+
onClosed?: (() => any) | undefined;
|
|
45
|
+
onOpenChange?: ((open: boolean) => any) | undefined;
|
|
46
|
+
onConfirm?: ((result: unknown, context: HysPopconfirmActionContext) => any) | undefined;
|
|
47
|
+
onDismiss?: ((reason: HysPopconfirmDismissReason) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
icon: false | import("vue").Component;
|
|
50
|
+
modelValue: boolean;
|
|
51
|
+
size: import("../..").HysButtonSize;
|
|
52
|
+
showArrow: boolean;
|
|
53
|
+
trigger: "click" | "contextmenu" | "manual";
|
|
54
|
+
destroyOnHide: boolean;
|
|
55
|
+
title: string;
|
|
56
|
+
offset: number;
|
|
57
|
+
tone: import("./popconfirmTypes").HysPopconfirmTone;
|
|
58
|
+
showIcon: boolean;
|
|
59
|
+
open: boolean;
|
|
60
|
+
placement: import("../..").Placement;
|
|
61
|
+
maxWidth: string | number;
|
|
62
|
+
appendTo: string | false | HTMLElement;
|
|
63
|
+
confirmText: string;
|
|
64
|
+
cancelText: string;
|
|
65
|
+
autoAdjustOverflow: boolean;
|
|
66
|
+
closeOnEscape: boolean;
|
|
67
|
+
closeOnOutside: boolean;
|
|
68
|
+
align: "center" | "end" | "start";
|
|
69
|
+
initialFocus: "none" | "cancel" | "panel" | "confirm";
|
|
70
|
+
restoreFocus: boolean;
|
|
71
|
+
showCancel: boolean;
|
|
72
|
+
closeOnConfirm: boolean;
|
|
73
|
+
triggerText: string;
|
|
74
|
+
pendingText: string;
|
|
75
|
+
cancelVariant: import("../..").HysButtonVariant;
|
|
76
|
+
closeOnCancel: boolean;
|
|
77
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
78
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
79
|
+
declare const _default: typeof __VLS_export;
|
|
80
|
+
export default _default;
|
|
81
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
82
|
+
new (): {
|
|
83
|
+
$slots: S;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Component, VNodeChild } from "vue";
|
|
2
|
+
import type { HysButtonSize, HysButtonVariant } from "../HysButton/HysButton.vue";
|
|
3
|
+
import type { HysPopupSurfaceContext, HysPopupSurfaceInstance, HysPopupSurfaceProps } from "../../composables/popupSurface";
|
|
4
|
+
import type { PopupCloseSource } from "../../composables/usePopupSurfaceInteractions";
|
|
5
|
+
export type HysPopconfirmTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
6
|
+
export type HysPopconfirmAction = "confirm" | "cancel";
|
|
7
|
+
export type HysPopconfirmDismissReason = Exclude<PopupCloseSource, "auto">;
|
|
8
|
+
export interface HysPopconfirmActionContext {
|
|
9
|
+
action: HysPopconfirmAction;
|
|
10
|
+
signal: AbortSignal;
|
|
11
|
+
event?: Event;
|
|
12
|
+
}
|
|
13
|
+
export type HysPopconfirmGuard = (context: HysPopconfirmActionContext) => boolean | void | PromiseLike<boolean | void>;
|
|
14
|
+
export type HysPopconfirmHandler = (context: HysPopconfirmActionContext) => unknown;
|
|
15
|
+
export interface HysPopconfirmProps extends Omit<HysPopupSurfaceProps, "autoClose" | "enterable" | "showDelay" | "hideDelay" | "trigger"> {
|
|
16
|
+
trigger?: "click" | "contextmenu" | "manual";
|
|
17
|
+
triggerText?: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
tone?: HysPopconfirmTone;
|
|
21
|
+
icon?: Component | false;
|
|
22
|
+
showIcon?: boolean;
|
|
23
|
+
confirmText?: string;
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
pendingText?: string;
|
|
26
|
+
errorText?: string | ((error: unknown, context: HysPopconfirmActionContext) => string);
|
|
27
|
+
confirmVariant?: HysButtonVariant;
|
|
28
|
+
cancelVariant?: HysButtonVariant;
|
|
29
|
+
size?: HysButtonSize;
|
|
30
|
+
align?: "start" | "center" | "end";
|
|
31
|
+
showCancel?: boolean;
|
|
32
|
+
confirmDisabled?: boolean;
|
|
33
|
+
cancelDisabled?: boolean;
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
allowCancelWhilePending?: boolean;
|
|
36
|
+
dismissWhilePending?: boolean;
|
|
37
|
+
closeOnConfirm?: boolean;
|
|
38
|
+
closeOnCancel?: boolean;
|
|
39
|
+
initialFocus?: "cancel" | "confirm" | "panel" | "none";
|
|
40
|
+
restoreFocus?: boolean;
|
|
41
|
+
beforeConfirm?: HysPopconfirmGuard;
|
|
42
|
+
beforeCancel?: HysPopconfirmGuard;
|
|
43
|
+
action?: HysPopconfirmHandler;
|
|
44
|
+
}
|
|
45
|
+
export interface HysPopconfirmContext extends HysPopupSurfaceContext {
|
|
46
|
+
pending: HysPopconfirmAction | null;
|
|
47
|
+
busy: boolean;
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
confirmDisabled: boolean;
|
|
50
|
+
cancelDisabled: boolean;
|
|
51
|
+
error: string;
|
|
52
|
+
confirm: (event?: Event) => Promise<boolean>;
|
|
53
|
+
cancel: (event?: Event) => Promise<boolean>;
|
|
54
|
+
abort: () => void;
|
|
55
|
+
}
|
|
56
|
+
export interface HysPopconfirmSlots {
|
|
57
|
+
default?: (context: HysPopconfirmContext) => VNodeChild;
|
|
58
|
+
trigger?: (context: HysPopconfirmContext) => VNodeChild;
|
|
59
|
+
title?: (context: HysPopconfirmContext) => VNodeChild;
|
|
60
|
+
description?: (context: HysPopconfirmContext) => VNodeChild;
|
|
61
|
+
icon?: (context: HysPopconfirmContext) => VNodeChild;
|
|
62
|
+
actions?: (context: HysPopconfirmContext) => VNodeChild;
|
|
63
|
+
error?: (context: HysPopconfirmContext) => VNodeChild;
|
|
64
|
+
}
|
|
65
|
+
export interface HysPopconfirmInstance extends HysPopupSurfaceInstance {
|
|
66
|
+
readonly pending: HysPopconfirmAction | null;
|
|
67
|
+
readonly error: string;
|
|
68
|
+
confirm: (event?: Event) => Promise<boolean>;
|
|
69
|
+
cancel: (event?: Event) => Promise<boolean>;
|
|
70
|
+
abort: () => void;
|
|
71
|
+
clearError: () => void;
|
|
72
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HysPopconfirmAction, HysPopconfirmActionContext } from "./popconfirmTypes";
|
|
2
|
+
export declare function usePopconfirmAction(): {
|
|
3
|
+
pending: import("vue").Ref<HysPopconfirmAction | null, HysPopconfirmAction | null>;
|
|
4
|
+
run: (action: HysPopconfirmAction, event: Event | undefined, work: (context: HysPopconfirmActionContext) => unknown, finish: (result: unknown, context: HysPopconfirmActionContext, isCurrent: () => boolean) => Promise<void>, fail: (error: unknown, context: HysPopconfirmActionContext) => void) => Promise<boolean>;
|
|
5
|
+
abort: () => void;
|
|
6
|
+
};
|
|
@@ -12,10 +12,10 @@ declare const __VLS_base: import("vue").DefineComponent<HysProgressProps, {
|
|
|
12
12
|
status: import("../..").HysProgressStatus;
|
|
13
13
|
strokeLinecap: import("../..").HysProgressLinecap;
|
|
14
14
|
showLabel: boolean;
|
|
15
|
+
animated: boolean;
|
|
15
16
|
showStatusIcon: boolean;
|
|
16
17
|
stepGap: number;
|
|
17
18
|
gapPosition: import("../..").HysProgressGapPosition;
|
|
18
|
-
animated: boolean;
|
|
19
19
|
flowDuration: number;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HysResultProps, HysResultSlots } from "./resultTypes";
|
|
2
|
+
type __VLS_Slots = HysResultSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<HysResultProps, {
|
|
4
|
+
element: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
5
|
+
focus: (options?: FocusOptions) => void | undefined;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HysResultProps> & Readonly<{}>, {
|
|
7
|
+
icon: false | import("vue").Component;
|
|
8
|
+
size: "sm" | "md" | "lg";
|
|
9
|
+
status: import("./resultTypes").HysResultStatus;
|
|
10
|
+
announce: "off" | "polite" | "assertive";
|
|
11
|
+
align: "center" | "start";
|
|
12
|
+
showCode: boolean;
|
|
13
|
+
headingLevel: 2 | 3 | 4 | 5 | 6;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Component, VNodeChild } from "vue";
|
|
2
|
+
export type HysResultCode = "403" | "404" | "500";
|
|
3
|
+
export type HysResultStatus = "primary" | "info" | "success" | "warning" | "error" | HysResultCode | 403 | 404 | 500;
|
|
4
|
+
export interface HysResultProps {
|
|
5
|
+
status?: HysResultStatus;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
icon?: Component | false;
|
|
9
|
+
showCode?: boolean;
|
|
10
|
+
size?: "sm" | "md" | "lg";
|
|
11
|
+
align?: "start" | "center";
|
|
12
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
13
|
+
announce?: "off" | "polite" | "assertive";
|
|
14
|
+
announcement?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface HysResultContext {
|
|
17
|
+
status: Exclude<HysResultStatus, number>;
|
|
18
|
+
code?: HysResultCode;
|
|
19
|
+
title: string;
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface HysResultSlots {
|
|
23
|
+
default?: (context: HysResultContext) => VNodeChild;
|
|
24
|
+
icon?: (context: HysResultContext) => VNodeChild;
|
|
25
|
+
title?: (context: HysResultContext) => VNodeChild;
|
|
26
|
+
subtitle?: (context: HysResultContext) => VNodeChild;
|
|
27
|
+
extra?: (context: HysResultContext) => VNodeChild;
|
|
28
|
+
}
|
|
29
|
+
export interface HysResultInstance {
|
|
30
|
+
readonly element: HTMLElement | undefined;
|
|
31
|
+
focus: (options?: FocusOptions) => void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HysSpaceProps, HysSpaceSlots } from "./spaceTypes";
|
|
2
|
+
type __VLS_Slots = HysSpaceSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<HysSpaceProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HysSpaceProps> & Readonly<{}>, {
|
|
4
|
+
size: import("./spaceTypes").HysSpaceGap | readonly [inline: import("./spaceTypes").HysSpaceGap, block: import("./spaceTypes").HysSpaceGap];
|
|
5
|
+
direction: "horizontal" | "vertical";
|
|
6
|
+
justify: "center" | "end" | "start" | "evenly" | "around" | "between";
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VNode } from "vue";
|
|
2
|
+
import type { HysSpaceGap } from "./spaceTypes";
|
|
3
|
+
interface SpaceItem {
|
|
4
|
+
key: string;
|
|
5
|
+
node: VNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function collectSpaceItems(nodes: readonly unknown[], path?: string, items?: SpaceItem[]): SpaceItem[];
|
|
8
|
+
export declare function spaceGap(value: HysSpaceGap): string;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { VNode, VNodeChild } from "vue";
|
|
2
|
+
export type HysSpaceGap = number | string;
|
|
3
|
+
export interface HysSpaceProps {
|
|
4
|
+
direction?: "horizontal" | "vertical";
|
|
5
|
+
size?: HysSpaceGap | readonly [inline: HysSpaceGap, block: HysSpaceGap];
|
|
6
|
+
align?: "start" | "center" | "end" | "baseline" | "stretch";
|
|
7
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
block?: boolean;
|
|
10
|
+
fill?: boolean;
|
|
11
|
+
fillRatio?: number;
|
|
12
|
+
separator?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface HysSpaceSlots {
|
|
15
|
+
default?: () => VNode[];
|
|
16
|
+
separator?: (context: {
|
|
17
|
+
index: number;
|
|
18
|
+
count: number;
|
|
19
|
+
}) => VNodeChild;
|
|
20
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type VNodeChild } from "vue";
|
|
2
|
+
import type { HysSpinContext, HysSpinProps, HysSpinRunOptions, HysSpinSnapshot, HysSpinUpdate, HysSpinWork } from "./spinTypes";
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
default?: () => VNodeChild;
|
|
5
|
+
indicator?: (context: HysSpinContext) => VNodeChild;
|
|
6
|
+
icon?: (context: HysSpinContext) => VNodeChild;
|
|
7
|
+
message?: (context: HysSpinContext) => VNodeChild;
|
|
8
|
+
progress?: (context: HysSpinContext) => VNodeChild;
|
|
9
|
+
overlay?: (context: HysSpinContext) => VNodeChild;
|
|
10
|
+
actions?: (context: HysSpinContext) => VNodeChild;
|
|
11
|
+
};
|
|
12
|
+
declare function show(): void;
|
|
13
|
+
declare function hide(): void;
|
|
14
|
+
declare function update(patch: HysSpinUpdate): void;
|
|
15
|
+
declare function cancel(): void;
|
|
16
|
+
declare function retry(): Promise<unknown> | undefined;
|
|
17
|
+
declare function run<T>(work: HysSpinWork<T>, settings?: HysSpinRunOptions): Promise<T>;
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<HysSpinProps, {
|
|
19
|
+
show: typeof show;
|
|
20
|
+
hide: typeof hide;
|
|
21
|
+
toggle: () => void;
|
|
22
|
+
run: typeof run;
|
|
23
|
+
cancel: typeof cancel;
|
|
24
|
+
retry: typeof retry;
|
|
25
|
+
update: typeof update;
|
|
26
|
+
pause: () => void;
|
|
27
|
+
resume: () => void;
|
|
28
|
+
stop: () => void;
|
|
29
|
+
restart: () => void;
|
|
30
|
+
clearResult: () => void;
|
|
31
|
+
visible: import("vue").Ref<boolean, boolean>;
|
|
32
|
+
snapshot: import("vue").ComputedRef<HysSpinSnapshot>;
|
|
33
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
+
change: (context: HysSpinSnapshot) => any;
|
|
35
|
+
"update:modelValue": (spinning: boolean) => any;
|
|
36
|
+
end: (context: HysSpinSnapshot) => any;
|
|
37
|
+
success: (context: HysSpinSnapshot) => any;
|
|
38
|
+
show: (context: HysSpinSnapshot) => any;
|
|
39
|
+
start: (context: HysSpinSnapshot) => any;
|
|
40
|
+
cancel: (context: HysSpinSnapshot) => any;
|
|
41
|
+
error: (error: unknown, context: HysSpinSnapshot) => any;
|
|
42
|
+
hide: (context: HysSpinSnapshot) => any;
|
|
43
|
+
retry: (context: HysSpinSnapshot) => any;
|
|
44
|
+
timeout: (context: HysSpinSnapshot) => any;
|
|
45
|
+
"update:spinning": (spinning: boolean) => any;
|
|
46
|
+
afterHide: (context: HysSpinSnapshot) => any;
|
|
47
|
+
}, string, import("vue").PublicProps, Readonly<HysSpinProps> & Readonly<{
|
|
48
|
+
onChange?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
49
|
+
"onUpdate:modelValue"?: ((spinning: boolean) => any) | undefined;
|
|
50
|
+
onEnd?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
51
|
+
onSuccess?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
52
|
+
onShow?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
53
|
+
onStart?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
54
|
+
onCancel?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
55
|
+
onError?: ((error: unknown, context: HysSpinSnapshot) => any) | undefined;
|
|
56
|
+
onHide?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
57
|
+
onRetry?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
58
|
+
onTimeout?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
59
|
+
"onUpdate:spinning"?: ((spinning: boolean) => any) | undefined;
|
|
60
|
+
onAfterHide?: ((context: HysSpinSnapshot) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
modelValue: boolean;
|
|
63
|
+
mask: boolean;
|
|
64
|
+
paused: boolean;
|
|
65
|
+
pauseWhenHidden: boolean;
|
|
66
|
+
lockScroll: boolean;
|
|
67
|
+
spinning: boolean;
|
|
68
|
+
animated: boolean;
|
|
69
|
+
defaultSpinning: boolean;
|
|
70
|
+
showResult: boolean;
|
|
71
|
+
showPercentage: boolean;
|
|
72
|
+
blockInteraction: boolean;
|
|
73
|
+
cancellable: boolean;
|
|
74
|
+
retryable: boolean;
|
|
75
|
+
escapeCancel: boolean;
|
|
76
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
77
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
78
|
+
declare const _default: typeof __VLS_export;
|
|
79
|
+
export default _default;
|
|
80
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
81
|
+
new (): {
|
|
82
|
+
$slots: S;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HysSpinAnimation } from "../spinCatalog";
|
|
2
|
+
import type { HysSpinStatus } from "../spinTypes";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
animation: HysSpinAnimation;
|
|
5
|
+
status: HysSpinStatus;
|
|
6
|
+
progress?: number;
|
|
7
|
+
stroke: number;
|
|
8
|
+
dot: number;
|
|
9
|
+
spacing: number;
|
|
10
|
+
colors?: readonly string[];
|
|
11
|
+
gradient?: readonly string[];
|
|
12
|
+
path?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|