hys-ui 0.1.0 → 0.1.1
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 +26 -1
- package/README.md +16 -6
- package/dist/components/HysAlert/HysAlert.vue.js +14 -14
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
- package/dist/components/HysBadge/HysBadge.vue.js +1 -1
- package/dist/components/HysBadge/HysBadge2.vue.js +20 -19
- package/dist/components/HysCalendar/HysCalendar.vue.js +48 -40
- package/dist/components/HysCard/HysCard.vue.js +2 -2
- package/dist/components/HysCard/HysCard2.vue.js +9 -9
- package/dist/components/HysCascader/HysCascader.vue.js +88 -76
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +5 -39
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +85 -2
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
- package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +22 -22
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +55 -54
- package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
- package/dist/components/HysFileManager/HysFileManager2.vue.js +85 -2
- package/dist/components/HysForm/HysForm.vue.js +2 -2
- package/dist/components/HysForm/HysForm2.vue.js +66 -64
- package/dist/components/HysFormItem/HysFormItem.vue.js +53 -37
- package/dist/components/HysGantt/HysGantt.vue.js +5 -264
- package/dist/components/HysGantt/HysGantt2.vue.js +302 -2
- package/dist/components/HysInput/HysInput.vue.js +1 -1
- package/dist/components/HysInput/HysInput2.vue.js +42 -41
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +35 -35
- package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +49 -40
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +34 -32
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +91 -91
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +100 -2
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +5 -40
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +80 -2
- package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +86 -67
- package/dist/components/HysSearch/HysSearch.vue.js +49 -38
- package/dist/components/HysSegmented/HysSegmented.vue.js +39 -34
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +130 -109
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +40 -40
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
- package/dist/components/HysSteps/HysSteps.vue.js +2 -2
- package/dist/components/HysSteps/HysSteps2.vue.js +15 -14
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +38 -27
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +42 -38
- package/dist/components/HysTabs/HysTabs.vue.js +1 -1
- package/dist/components/HysTabs/HysTabs2.vue.js +8 -6
- package/dist/components/HysTextarea/HysTextarea.vue.js +58 -48
- package/dist/components/HysToast/HysToast.vue.js +2 -2
- package/dist/components/HysToast/HysToast2.vue.js +121 -38
- package/dist/components/HysTour/HysTour.vue.js +47 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +159 -143
- package/dist/components/HysTree/HysTree.vue.js +2 -2
- package/dist/components/HysTree/HysTree2.vue.js +62 -61
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +64 -57
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +95 -77
- package/dist/composables/formContext.js +9 -3
- package/dist/composables/toastEscape.js +16 -0
- package/dist/composables/useDialog.js +16 -16
- package/dist/composables/useFloating.js +40 -40
- package/dist/composables/useHysToast.js +148 -0
- package/dist/config.js +18 -15
- package/dist/index.js +10 -7
- package/dist/style.css +1 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +2 -0
- package/dist/types/components/HysCard/HysCard.vue.d.ts +5 -1
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +21 -4
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -0
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +6 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +6 -0
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -0
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +3 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +40 -17
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +7 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -0
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +1 -1
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +1 -1
- package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
- package/dist/types/components/HysTour/HysTour.vue.d.ts +3 -1
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +11 -1
- package/dist/types/composables/formContext.d.ts +5 -0
- package/dist/types/composables/toastEscape.d.ts +1 -0
- package/dist/types/composables/useFloating.d.ts +1 -1
- package/dist/types/composables/useHysToast.d.ts +50 -0
- package/dist/types/index.d.ts +5 -0
- package/package.json +46 -11
|
@@ -8,20 +8,37 @@ type __VLS_Props = {
|
|
|
8
8
|
value?: string;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
indeterminate?: boolean;
|
|
11
|
+
tabindex?: number;
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
13
|
};
|
|
12
14
|
declare const __VLS_template: () => {
|
|
13
15
|
__VLS_Slots: {
|
|
16
|
+
icon?: (props: {
|
|
17
|
+
checked: boolean;
|
|
18
|
+
indeterminate: boolean;
|
|
19
|
+
}) => any;
|
|
20
|
+
} & {
|
|
14
21
|
default?: (props: {}) => any;
|
|
15
22
|
};
|
|
16
23
|
};
|
|
17
24
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
18
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
19
|
-
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
26
|
+
input: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
27
|
+
focus: () => void | undefined;
|
|
28
|
+
blur: () => void | undefined;
|
|
29
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:modelValue": (value: boolean) => any;
|
|
20
31
|
change: (value: boolean) => any;
|
|
32
|
+
focus: (event: FocusEvent) => any;
|
|
33
|
+
blur: (event: FocusEvent) => any;
|
|
21
34
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
"onUpdate:modelValue"?: ((
|
|
35
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
23
36
|
onChange?: ((value: boolean) => any) | undefined;
|
|
24
|
-
|
|
37
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
38
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
size: "sm" | "md" | "lg";
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
43
|
declare const _default: typeof __VLS_export;
|
|
27
44
|
export default _default;
|
|
@@ -4,15 +4,19 @@ export interface ManagedFile {
|
|
|
4
4
|
size: number;
|
|
5
5
|
url?: string;
|
|
6
6
|
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
7
10
|
type __VLS_ModelProps = {
|
|
8
11
|
modelValue?: ManagedFile[];
|
|
9
12
|
};
|
|
10
|
-
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
15
|
"update:modelValue": (value: ManagedFile[]) => any;
|
|
12
16
|
remove: (id: string) => any;
|
|
13
17
|
upload: (files: File[]) => any;
|
|
14
18
|
download: (id: string) => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
20
|
"onUpdate:modelValue"?: ((value: ManagedFile[]) => any) | undefined;
|
|
17
21
|
onRemove?: ((id: string) => any) | undefined;
|
|
18
22
|
onUpload?: ((files: File[]) => any) | undefined;
|
|
@@ -18,22 +18,28 @@ type __VLS_Props = {
|
|
|
18
18
|
editable?: boolean;
|
|
19
19
|
rowHeight?: number;
|
|
20
20
|
labelWidth?: number;
|
|
21
|
+
fitContainer?: boolean;
|
|
21
22
|
};
|
|
22
23
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
24
|
"update:modelValue": (id: string | number | null) => any;
|
|
24
25
|
change: (item: GanttItem) => any;
|
|
25
26
|
open: (item: GanttItem) => any;
|
|
27
|
+
"update:scale": (value: Scale) => any;
|
|
28
|
+
scaleChange: (value: Scale) => any;
|
|
26
29
|
"update:items": (items: GanttItem[]) => any;
|
|
27
30
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
31
|
"onUpdate:modelValue"?: ((id: string | number | null) => any) | undefined;
|
|
29
32
|
onChange?: ((item: GanttItem) => any) | undefined;
|
|
30
33
|
onOpen?: ((item: GanttItem) => any) | undefined;
|
|
34
|
+
"onUpdate:scale"?: ((value: Scale) => any) | undefined;
|
|
35
|
+
onScaleChange?: ((value: Scale) => any) | undefined;
|
|
31
36
|
"onUpdate:items"?: ((items: GanttItem[]) => any) | undefined;
|
|
32
37
|
}>, {
|
|
33
38
|
scale: Scale;
|
|
34
39
|
editable: boolean;
|
|
35
40
|
labelWidth: number;
|
|
36
41
|
rowHeight: number;
|
|
42
|
+
fitContainer: boolean;
|
|
37
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
44
|
declare const _default: typeof __VLS_export;
|
|
39
45
|
export default _default;
|
|
@@ -19,11 +19,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
19
19
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
20
|
"update:modelValue": (value: number) => any;
|
|
21
21
|
change: (value: number) => any;
|
|
22
|
+
input: (value: number | null) => any;
|
|
22
23
|
focus: (event: FocusEvent) => any;
|
|
23
24
|
blur: (event: FocusEvent) => any;
|
|
24
25
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
26
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
26
27
|
onChange?: ((value: number) => any) | undefined;
|
|
28
|
+
onInput?: ((value: number | null) => any) | undefined;
|
|
27
29
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
28
30
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
29
31
|
}>, {
|
|
@@ -17,6 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((id: string) => any) | undefined;
|
|
19
19
|
"onUpdate:checkedKeys"?: ((keys: string[]) => any) | undefined;
|
|
20
|
-
}>, {
|
|
20
|
+
}>, {
|
|
21
|
+
searchable: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
23
|
declare const _default: typeof __VLS_export;
|
|
22
24
|
export default _default;
|
|
@@ -2,11 +2,18 @@ type __VLS_Props = {
|
|
|
2
2
|
roles: string[];
|
|
3
3
|
resources: string[];
|
|
4
4
|
modelValue: Record<string, boolean>;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
showSelectAll?: boolean;
|
|
5
8
|
};
|
|
6
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
10
|
"update:modelValue": (value: Record<string, boolean>) => any;
|
|
11
|
+
change: (value: Record<string, boolean>) => any;
|
|
8
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
13
|
"onUpdate:modelValue"?: ((value: Record<string, boolean>) => any) | undefined;
|
|
10
|
-
|
|
14
|
+
onChange?: ((value: Record<string, boolean>) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
showSelectAll: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
18
|
declare const _default: typeof __VLS_export;
|
|
12
19
|
export default _default;
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}[];
|
|
8
|
-
name?: string;
|
|
1
|
+
export interface HysRadioOption<V extends string | number = string> {
|
|
2
|
+
label: string;
|
|
3
|
+
value: V;
|
|
9
4
|
disabled?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: <T extends string | number = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
8
|
+
modelValue?: T;
|
|
9
|
+
options: HysRadioOption<T>[];
|
|
10
|
+
name?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
vertical?: boolean;
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
} & {
|
|
18
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
19
|
+
onChange?: ((value: T) => any) | undefined;
|
|
20
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
21
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
22
|
+
}> & (typeof globalThis extends {
|
|
23
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
24
|
+
} ? P : {});
|
|
25
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
26
|
+
focus: () => void;
|
|
27
|
+
}>) => void;
|
|
28
|
+
attrs: any;
|
|
29
|
+
slots: {
|
|
30
|
+
label?: (props: {
|
|
31
|
+
option: HysRadioOption<T>;
|
|
32
|
+
}) => any;
|
|
33
|
+
};
|
|
34
|
+
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "change", value: T) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "blur", event: FocusEvent) => void);
|
|
35
|
+
}>) => import("vue").VNode & {
|
|
36
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
12
37
|
};
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
-
"update:modelValue": (value: string) => any;
|
|
15
|
-
change: (value: string) => any;
|
|
16
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
-
onChange?: ((value: string) => any) | undefined;
|
|
19
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
38
|
declare const _default: typeof __VLS_export;
|
|
21
39
|
export default _default;
|
|
40
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} : {
|
|
43
|
+
[K in keyof T as K]: T[K];
|
|
44
|
+
}) & {};
|
|
@@ -2,6 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
minWidth?: number;
|
|
3
3
|
maxWidth?: number;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
step?: number;
|
|
5
6
|
};
|
|
6
7
|
type __VLS_ModelProps = {
|
|
7
8
|
modelValue?: number;
|
|
@@ -15,9 +16,14 @@ declare const __VLS_template: () => {
|
|
|
15
16
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
17
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
18
|
"update:modelValue": (value: number) => any;
|
|
19
|
+
resizeStart: () => any;
|
|
20
|
+
resizeEnd: (value: number) => any;
|
|
18
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
22
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
23
|
+
onResizeStart?: (() => any) | undefined;
|
|
24
|
+
onResizeEnd?: ((value: number) => any) | undefined;
|
|
20
25
|
}>, {
|
|
26
|
+
step: number;
|
|
21
27
|
minWidth: number;
|
|
22
28
|
maxWidth: number;
|
|
23
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -15,6 +15,8 @@ declare const __VLS_export: <T extends string | string[] = string>(__VLS_props:
|
|
|
15
15
|
clearable?: boolean;
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
remote?: boolean;
|
|
18
|
+
popupMatchWidth?: boolean;
|
|
19
|
+
filterMethod?: (query: string, option: HysSelectOption) => boolean;
|
|
18
20
|
emptyText?: string;
|
|
19
21
|
size?: "sm" | "md" | "lg";
|
|
20
22
|
} & {
|
|
@@ -34,7 +36,11 @@ declare const __VLS_export: <T extends string | string[] = string>(__VLS_props:
|
|
|
34
36
|
attrs: any;
|
|
35
37
|
slots: {
|
|
36
38
|
label?: (props: {
|
|
37
|
-
selected:
|
|
39
|
+
selected: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
disabled?: boolean | undefined;
|
|
43
|
+
}[];
|
|
38
44
|
}) => any;
|
|
39
45
|
} & {
|
|
40
46
|
loading?: (props: {}) => any;
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
max?: number;
|
|
5
5
|
vertical?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
step?: number;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_template: () => {
|
|
9
10
|
__VLS_Slots: {
|
|
@@ -15,12 +16,17 @@ declare const __VLS_template: () => {
|
|
|
15
16
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
17
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
18
|
"update:modelValue": (value: number) => any;
|
|
19
|
+
resizeStart: () => any;
|
|
20
|
+
resizeEnd: (value: number) => any;
|
|
18
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
22
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
23
|
+
onResizeStart?: (() => any) | undefined;
|
|
24
|
+
onResizeEnd?: ((value: number) => any) | undefined;
|
|
20
25
|
}>, {
|
|
21
26
|
modelValue: number;
|
|
22
27
|
max: number;
|
|
23
28
|
min: number;
|
|
29
|
+
step: number;
|
|
24
30
|
vertical: boolean;
|
|
25
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
current: number;
|
|
8
8
|
vertical?: boolean;
|
|
9
9
|
clickable?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
status?: 'process' | 'error' | 'finish' | 'wait';
|
|
11
12
|
};
|
|
12
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -5,7 +5,7 @@ type __VLS_Props = {
|
|
|
5
5
|
activeText?: string;
|
|
6
6
|
inactiveText?: string;
|
|
7
7
|
ariaLabel?: string;
|
|
8
|
-
beforeChange?: () => boolean | Promise<boolean>;
|
|
8
|
+
beforeChange?: (next: boolean) => boolean | void | Promise<boolean | void>;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
11
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -36,8 +36,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
36
36
|
}>, {
|
|
37
37
|
modelValue: string;
|
|
38
38
|
resize: "none" | "horizontal" | "vertical" | "both";
|
|
39
|
-
showCount: boolean;
|
|
40
39
|
rows: number;
|
|
40
|
+
showCount: boolean;
|
|
41
41
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
43
43
|
export default _default;
|
|
@@ -1,19 +1,67 @@
|
|
|
1
|
+
export type HysToastType = 'success' | 'error' | 'info' | 'warning' | 'loading';
|
|
2
|
+
export type HysToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center' | 'top' | 'bottom';
|
|
1
3
|
type __VLS_Props = {
|
|
2
|
-
message
|
|
3
|
-
type?:
|
|
4
|
+
message?: string;
|
|
5
|
+
type?: HysToastType;
|
|
4
6
|
duration?: number;
|
|
5
7
|
closable?: boolean;
|
|
6
|
-
position?:
|
|
8
|
+
position?: HysToastPosition;
|
|
9
|
+
offset?: number;
|
|
10
|
+
zIndex?: number;
|
|
11
|
+
showIcon?: boolean;
|
|
12
|
+
pauseOnHover?: boolean;
|
|
13
|
+
closeOnEscape?: boolean;
|
|
14
|
+
repeat?: number;
|
|
15
|
+
plain?: boolean;
|
|
16
|
+
teleport?: boolean;
|
|
17
|
+
appendTo?: string | HTMLElement;
|
|
18
|
+
};
|
|
19
|
+
declare function pause(): void;
|
|
20
|
+
declare function resume(): void;
|
|
21
|
+
declare function restart(): void;
|
|
22
|
+
declare function close(): void;
|
|
23
|
+
declare const __VLS_template: () => {
|
|
24
|
+
__VLS_Slots: {
|
|
25
|
+
icon?: (props: {}) => any;
|
|
26
|
+
} & {
|
|
27
|
+
default?: (props: {}) => any;
|
|
28
|
+
} & {
|
|
29
|
+
action?: (props: {
|
|
30
|
+
close: typeof close;
|
|
31
|
+
}) => any;
|
|
32
|
+
};
|
|
7
33
|
};
|
|
8
|
-
|
|
34
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
35
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
36
|
+
close: typeof close;
|
|
37
|
+
pause: typeof pause;
|
|
38
|
+
resume: typeof resume;
|
|
39
|
+
restart: typeof restart;
|
|
40
|
+
element: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
41
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
42
|
close: () => any;
|
|
43
|
+
afterClose: () => any;
|
|
10
44
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
45
|
onClose?: (() => any) | undefined;
|
|
46
|
+
onAfterClose?: (() => any) | undefined;
|
|
12
47
|
}>, {
|
|
13
|
-
type:
|
|
48
|
+
type: HysToastType;
|
|
49
|
+
offset: number;
|
|
14
50
|
closable: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
51
|
+
showIcon: boolean;
|
|
52
|
+
repeat: number;
|
|
53
|
+
position: HysToastPosition;
|
|
54
|
+
zIndex: number;
|
|
55
|
+
message: string;
|
|
56
|
+
pauseOnHover: boolean;
|
|
57
|
+
teleport: boolean;
|
|
58
|
+
appendTo: string | HTMLElement;
|
|
17
59
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
61
|
declare const _default: typeof __VLS_export;
|
|
19
62
|
export default _default;
|
|
63
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -22,6 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
22
22
|
onClose?: (() => any) | undefined;
|
|
23
23
|
onFinish?: (() => any) | undefined;
|
|
24
24
|
"onUpdate:current"?: ((index: number) => any) | undefined;
|
|
25
|
-
}>, {
|
|
25
|
+
}>, {
|
|
26
|
+
closeOnEscape: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
28
|
declare const _default: typeof __VLS_export;
|
|
27
29
|
export default _default;
|
|
@@ -15,14 +15,24 @@ declare const __VLS_template: () => {
|
|
|
15
15
|
option?: (props: {
|
|
16
16
|
option: Item;
|
|
17
17
|
}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
option?: (props: {
|
|
20
|
+
option: Item;
|
|
21
|
+
}) => any;
|
|
18
22
|
};
|
|
19
23
|
};
|
|
20
24
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
21
25
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
26
|
"update:modelValue": (value: string[]) => any;
|
|
27
|
+
change: (value: string[], direction: "left" | "right", movedKeys: string[]) => any;
|
|
28
|
+
checkChange: (side: "left" | "right", values: string[]) => any;
|
|
23
29
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
30
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
25
|
-
|
|
31
|
+
onChange?: ((value: string[], direction: "left" | "right", movedKeys: string[]) => any) | undefined;
|
|
32
|
+
onCheckChange?: ((side: "left" | "right", values: string[]) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
filterable: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
37
|
declare const _default: typeof __VLS_export;
|
|
28
38
|
export default _default;
|
|
@@ -9,6 +9,8 @@ export interface HysFormRule {
|
|
|
9
9
|
validator?: (value: unknown, model: Record<string, unknown>) => boolean | string | void | Promise<boolean | string | void>;
|
|
10
10
|
}
|
|
11
11
|
export interface HysFormContext {
|
|
12
|
+
model: ComputedRef<Record<string, unknown> | undefined>;
|
|
13
|
+
resetting: Ref<boolean>;
|
|
12
14
|
errors: Ref<Record<string, string>>;
|
|
13
15
|
rules: ComputedRef<Record<string, HysFormRule | HysFormRule[]>>;
|
|
14
16
|
register: (name: string) => () => void;
|
|
@@ -17,8 +19,11 @@ export interface HysFormContext {
|
|
|
17
19
|
export declare const formKey: InjectionKey<HysFormContext>;
|
|
18
20
|
export interface HysFieldContext {
|
|
19
21
|
id: Ref<string>;
|
|
22
|
+
label: ComputedRef<string | undefined>;
|
|
20
23
|
error: ComputedRef<string | undefined>;
|
|
21
24
|
errorId: string;
|
|
25
|
+
describedBy: ComputedRef<string | undefined>;
|
|
22
26
|
required: ComputedRef<boolean>;
|
|
23
27
|
}
|
|
24
28
|
export declare const fieldKey: InjectionKey<HysFieldContext>;
|
|
29
|
+
export declare function focusHysField(control: HTMLElement | null | undefined): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerToastEscape(close: () => void): () => void;
|
|
@@ -10,7 +10,7 @@ export declare function useFloating(anchor: Readonly<Ref<FloatingAnchor | undefi
|
|
|
10
10
|
placement?: Placement;
|
|
11
11
|
gap?: number;
|
|
12
12
|
padding?: number;
|
|
13
|
-
matchWidth?: boolean;
|
|
13
|
+
matchWidth?: boolean | 'min' | (() => boolean | 'min');
|
|
14
14
|
}): {
|
|
15
15
|
open: Ref<boolean, boolean>;
|
|
16
16
|
style: Ref<Record<string, string>, Record<string, string>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type VNodeChild } from 'vue';
|
|
2
|
+
import type { HysToastPosition, HysToastType } from '../components/HysToast/HysToast.vue';
|
|
3
|
+
import { type HysConfig } from '../config';
|
|
4
|
+
export interface HysToastOptions {
|
|
5
|
+
id?: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
content?: VNodeChild | (() => VNodeChild);
|
|
8
|
+
type?: HysToastType;
|
|
9
|
+
duration?: number;
|
|
10
|
+
closable?: boolean;
|
|
11
|
+
position?: HysToastPosition;
|
|
12
|
+
offset?: number;
|
|
13
|
+
zIndex?: number;
|
|
14
|
+
showIcon?: boolean;
|
|
15
|
+
icon?: VNodeChild | (() => VNodeChild);
|
|
16
|
+
plain?: boolean;
|
|
17
|
+
pauseOnHover?: boolean;
|
|
18
|
+
closeOnEscape?: boolean;
|
|
19
|
+
grouping?: boolean;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onAfterClose?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface HysToastConfig extends Omit<HysToastOptions, 'id' | 'message' | 'content' | 'icon' | 'onClose' | 'onAfterClose'> {
|
|
24
|
+
maxCount?: number;
|
|
25
|
+
appendTo?: string | HTMLElement | ShadowRoot;
|
|
26
|
+
}
|
|
27
|
+
export interface HysToastHandle {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly closed: Promise<void>;
|
|
30
|
+
close(): void;
|
|
31
|
+
update(value: string | Omit<Partial<HysToastOptions>, 'id'>): void;
|
|
32
|
+
}
|
|
33
|
+
export interface HysToastApi {
|
|
34
|
+
show(value: string | HysToastOptions): HysToastHandle;
|
|
35
|
+
success(value: string | Omit<HysToastOptions, 'type'>): HysToastHandle;
|
|
36
|
+
info(value: string | Omit<HysToastOptions, 'type'>): HysToastHandle;
|
|
37
|
+
warning(value: string | Omit<HysToastOptions, 'type'>): HysToastHandle;
|
|
38
|
+
error(value: string | Omit<HysToastOptions, 'type'>): HysToastHandle;
|
|
39
|
+
loading(value: string | Omit<HysToastOptions, 'type'>): HysToastHandle;
|
|
40
|
+
closeAll(): void;
|
|
41
|
+
}
|
|
42
|
+
export interface HysToastServiceConfig extends HysToastConfig, HysConfig {
|
|
43
|
+
}
|
|
44
|
+
export interface HysToastService extends HysToastApi {
|
|
45
|
+
dispose(): void;
|
|
46
|
+
}
|
|
47
|
+
/** Call during setup. Messages inherit the owner's theme and are removed when its scope leaves. */
|
|
48
|
+
export declare function useHysToast(config?: HysToastConfig): HysToastApi;
|
|
49
|
+
/** Create a shared service for callers outside setup; dispose it when the owning application ends. */
|
|
50
|
+
export declare function createHysToast(config?: HysToastServiceConfig): HysToastService;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { default as HysPermissionMatrix } from './components/HysPermissionMatrix
|
|
|
53
53
|
export { default as HysPopover } from './components/HysPopover/HysPopover.vue';
|
|
54
54
|
export { default as HysProgress } from './components/HysProgress/HysProgress.vue';
|
|
55
55
|
export { default as HysRadioGroup } from './components/HysRadioGroup/HysRadioGroup.vue';
|
|
56
|
+
export type { HysRadioOption } from './components/HysRadioGroup/HysRadioGroup.vue';
|
|
56
57
|
export { default as HysRating } from './components/HysRating/HysRating.vue';
|
|
57
58
|
export { default as HysResizablePanel } from './components/HysResizablePanel/HysResizablePanel.vue';
|
|
58
59
|
export { default as HysRichTextEditor } from './components/HysRichTextEditor/HysRichTextEditor.vue';
|
|
@@ -74,6 +75,8 @@ export { default as HysTagInput } from './components/HysTagInput/HysTagInput.vue
|
|
|
74
75
|
export { default as HysTextarea } from './components/HysTextarea/HysTextarea.vue';
|
|
75
76
|
export { default as HysTimeline } from './components/HysTimeline/HysTimeline.vue';
|
|
76
77
|
export { default as HysToast } from './components/HysToast/HysToast.vue';
|
|
78
|
+
export type { HysToastType } from './components/HysToast/HysToast.vue';
|
|
79
|
+
export type { HysToastPosition } from './components/HysToast/HysToast.vue';
|
|
77
80
|
export { default as HysTooltip } from './components/HysTooltip/HysTooltip.vue';
|
|
78
81
|
export { default as HysTour } from './components/HysTour/HysTour.vue';
|
|
79
82
|
export { default as HysTransfer } from './components/HysTransfer/HysTransfer.vue';
|
|
@@ -88,3 +91,5 @@ export { provideHysConfig } from './config';
|
|
|
88
91
|
export type { HysConfig, HysTheme, HysMotion } from './config';
|
|
89
92
|
export type { Placement } from './composables/useFloating';
|
|
90
93
|
export type { HysFormRule } from './composables/formContext';
|
|
94
|
+
export { useHysToast, createHysToast } from './composables/useHysToast';
|
|
95
|
+
export type { HysToastApi, HysToastOptions, HysToastConfig, HysToastHandle, HysToastServiceConfig, HysToastService } from './composables/useHysToast';
|
package/package.json
CHANGED
|
@@ -1,23 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hys-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Themeable Vue 3 components with TypeScript and interactive documentation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "hys-ui contributors",
|
|
8
|
-
"repository": {
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/lampo1024/hys-ui.git",
|
|
11
|
+
"directory": "packages/ui"
|
|
12
|
+
},
|
|
9
13
|
"homepage": "https://github.com/lampo1024/hys-ui#readme",
|
|
10
14
|
"bugs": "https://github.com/lampo1024/hys-ui/issues",
|
|
11
|
-
"keywords": [
|
|
12
|
-
|
|
15
|
+
"keywords": [
|
|
16
|
+
"vue",
|
|
17
|
+
"vue3",
|
|
18
|
+
"components",
|
|
19
|
+
"typescript",
|
|
20
|
+
"hys-ui"
|
|
21
|
+
],
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE",
|
|
26
|
+
"CHANGELOG.md"
|
|
27
|
+
],
|
|
13
28
|
"main": "./dist/index.js",
|
|
14
29
|
"module": "./dist/index.js",
|
|
15
30
|
"types": "./dist/types/index.d.ts",
|
|
16
|
-
"exports": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/types/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./style.css": "./dist/style.css",
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"sideEffects": [
|
|
40
|
+
"**/*.css"
|
|
41
|
+
],
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"vue": ">=3.5.0 <4"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"lucide-vue-next": "^0.468.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"vue": "^3.5.13"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public",
|
|
53
|
+
"registry": "https://registry.npmjs.org/"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "vite build --config vite.config.ts && vue-tsc -p tsconfig.build.json"
|
|
57
|
+
}
|
|
23
58
|
}
|