@hina-ui/vue 1.2.0 → 1.3.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/dist/index.js +613 -302
- package/dist/index.js.map +1 -1
- package/dist/types/components/alert-dialog/AlertDialog.vue.d.ts +4 -0
- package/dist/types/components/alert-dialog/AlertDialog.vue.d.ts.map +1 -1
- package/dist/types/components/alert-dialog/alert-dialog.variants.d.ts +5 -0
- package/dist/types/components/alert-dialog/alert-dialog.variants.d.ts.map +1 -0
- package/dist/types/components/alert-dialog/composables/useAlertDialogConfirm.d.ts +9 -0
- package/dist/types/components/alert-dialog/composables/useAlertDialogConfirm.d.ts.map +1 -0
- package/dist/types/components/alert-dialog/composables/useConfirmDelay.d.ts +3 -0
- package/dist/types/components/alert-dialog/composables/useConfirmDelay.d.ts.map +1 -0
- package/dist/types/components/anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/types/components/code-block/CodeBlock.vue.d.ts.map +1 -1
- package/dist/types/components/code-block/code-block.variants.d.ts +6 -0
- package/dist/types/components/code-block/code-block.variants.d.ts.map +1 -0
- package/dist/types/components/code-block/composables/useCodeHighlight.d.ts +7 -0
- package/dist/types/components/code-block/composables/useCodeHighlight.d.ts.map +1 -0
- package/dist/types/components/dropdown-menu/DropdownMenu.vue.d.ts +18 -6
- package/dist/types/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -1
- package/dist/types/components/highlight/Highlight.vue.d.ts +2 -0
- package/dist/types/components/highlight/Highlight.vue.d.ts.map +1 -1
- package/dist/types/components/highlight/composables/useHighlightMotion.d.ts +10 -0
- package/dist/types/components/highlight/composables/useHighlightMotion.d.ts.map +1 -0
- package/dist/types/components/lightbox/LightboxThumbs.vue.d.ts.map +1 -1
- package/dist/types/components/popover/Popover.vue.d.ts +19 -6
- package/dist/types/components/popover/Popover.vue.d.ts.map +1 -1
- package/dist/types/components/popover/PopoverContent.vue.d.ts +29 -0
- package/dist/types/components/popover/PopoverContent.vue.d.ts.map +1 -0
- package/dist/types/components/popover/composables/usePopoverCloseFocus.d.ts +2 -0
- package/dist/types/components/popover/composables/usePopoverCloseFocus.d.ts.map +1 -0
- package/dist/types/components/scroll-area/ScrollArea.vue.d.ts.map +1 -1
- package/dist/types/components/scroll-area/composables/useScrollFocus.d.ts +17 -0
- package/dist/types/components/scroll-area/composables/useScrollFocus.d.ts.map +1 -0
- package/dist/types/components/segmented-control/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/types/components/tabs/TabsTrigger.vue.d.ts.map +1 -1
- package/dist/types/lib/anchored-overlay.d.ts +23 -0
- package/dist/types/lib/anchored-overlay.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/alert-dialog/AlertDialog.vue +24 -36
- package/src/components/alert-dialog/alert-dialog.variants.ts +17 -0
- package/src/components/alert-dialog/composables/useAlertDialogConfirm.ts +29 -0
- package/src/components/alert-dialog/composables/useConfirmDelay.ts +37 -0
- package/src/components/anchor/Anchor.vue +1 -0
- package/src/components/code-block/CodeBlock.vue +15 -30
- package/src/components/code-block/code-block.variants.ts +21 -0
- package/src/components/code-block/composables/useCodeHighlight.ts +30 -0
- package/src/components/dropdown-menu/DropdownMenu.vue +16 -4
- package/src/components/highlight/Highlight.vue +5 -4
- package/src/components/highlight/composables/useHighlightMotion.ts +22 -0
- package/src/components/lightbox/LightboxThumbs.vue +1 -0
- package/src/components/popover/Popover.vue +21 -5
- package/src/components/popover/PopoverContent.vue +25 -0
- package/src/components/popover/composables/usePopoverCloseFocus.ts +17 -0
- package/src/components/scroll-area/ScrollArea.vue +7 -5
- package/src/components/scroll-area/composables/useScrollFocus.ts +39 -0
- package/src/components/segmented-control/SegmentedControl.vue +6 -1
- package/src/components/tabs/TabsTrigger.vue +6 -1
- package/src/lib/anchored-overlay.ts +110 -0
- package/src/styles/typography.css +9 -4
|
@@ -2,6 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
title: string;
|
|
3
3
|
description?: string;
|
|
4
4
|
confirmText?: string;
|
|
5
|
+
confirmDelay?: number;
|
|
5
6
|
cancelText?: string;
|
|
6
7
|
tone?: 'accent' | 'danger';
|
|
7
8
|
size?: 'sm' | 'md';
|
|
@@ -21,13 +22,16 @@ type __VLS_Slots = {} & {
|
|
|
21
22
|
};
|
|
22
23
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
24
|
cancel: () => any;
|
|
25
|
+
error: (error: unknown) => any;
|
|
24
26
|
"update:open": (value: boolean | undefined) => any;
|
|
25
27
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
28
|
onCancel?: (() => any) | undefined;
|
|
29
|
+
onError?: ((error: unknown) => any) | undefined;
|
|
27
30
|
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
28
31
|
}>, {
|
|
29
32
|
size: "sm" | "md";
|
|
30
33
|
tone: "accent" | "danger";
|
|
34
|
+
confirmDelay: number;
|
|
31
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/alert-dialog/AlertDialog.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AlertDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/alert-dialog/AlertDialog.vue"],"names":[],"mappings":"AAwIE,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,OAAO,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAmBN,KAAK,gBAAgB,GAAG;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAMF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsSxD,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,QAAA,MAAM,UAAU;;;;;;;;;UA7UH,IAAI,GAAG,IAAI;UADX,QAAQ,GAAG,QAAQ;kBAFX,MAAM;6EAoVzB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const alertDialogHeader: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "flex min-w-0 flex-col gap-1.5 px-(--hn-panel-p)", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
2
|
+
export declare const alertDialogContent: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-(--hn-panel-p)", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
export declare const alertDialogActions: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "flex justify-end gap-(--hn-inline-gap) px-(--hn-panel-p)", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
4
|
+
export declare const alertDialogCountdown: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "tabular-nums", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
5
|
+
//# sourceMappingURL=alert-dialog.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/alert-dialog/alert-dialog.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,4MAE5B,CAAA;AAEF,eAAO,MAAM,kBAAkB,8KAE7B,CAAA;AAEF,eAAO,MAAM,kBAAkB,qNAE7B,CAAA;AAEF,eAAO,MAAM,oBAAoB,yKAE/B,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export declare function useAlertDialogConfirm(props: {
|
|
3
|
+
onConfirm?: () => unknown;
|
|
4
|
+
}, open: Ref<boolean | undefined>, onError: (error: unknown) => void, blocked?: () => boolean): {
|
|
5
|
+
busy: Ref<boolean, boolean>;
|
|
6
|
+
guard: (event: Event) => void;
|
|
7
|
+
confirm: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useAlertDialogConfirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertDialogConfirm.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert-dialog/composables/useAlertDialogConfirm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAEnC,wBAAgB,qBAAqB,CACnC,KAAK,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,OAAO,CAAA;CAAE,EACpC,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACjC,OAAO,GAAE,MAAM,OAAqB;;mBAId,KAAK;;EAkB5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfirmDelay.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert-dialog/composables/useConfirmDelay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAErE,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,MAAM,uBAkClF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/anchor/Anchor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Anchor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/anchor/Anchor.vue"],"names":[],"mappings":"AAsFE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;CACxB;AAID,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA+HJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/code-block/CodeBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/code-block/CodeBlock.vue"],"names":[],"mappings":"AAmEE,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAsHN,QAAA,MAAM,YAAY;cAxHD,OAAO;6EA2HtB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const codeBlock: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "relative flex min-h-0 min-w-0 flex-col", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
2
|
+
export declare const codeBlockArea: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "hn-pre min-h-0 grow p-0", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
export declare const codeBlockContent: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "hn-pre-content m-0 w-max min-w-full", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
4
|
+
export declare const codeBlockActions: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "absolute top-2 end-2 flex items-center gap-2", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
5
|
+
export declare const codeBlockLabel: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "text-faint font-mono text-xs select-none", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
|
|
6
|
+
//# sourceMappingURL=code-block.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/code-block/code-block.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,mMAEpB,CAAA;AAEF,eAAO,MAAM,aAAa,oLAExB,CAAA;AAEF,eAAO,MAAM,gBAAgB,gMAE3B,CAAA;AAEF,eAAO,MAAM,gBAAgB,yMAE3B,CAAA;AAEF,eAAO,MAAM,cAAc,qMAEzB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemedToken } from 'shiki/core';
|
|
2
|
+
export declare function useCodeHighlight(props: {
|
|
3
|
+
code: string;
|
|
4
|
+
lang?: string;
|
|
5
|
+
html?: string;
|
|
6
|
+
}): import("vue").ShallowRef<ThemedToken[][] | null, ThemedToken[][] | null>;
|
|
7
|
+
//# sourceMappingURL=useCodeHighlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCodeHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/components/code-block/composables/useCodeHighlight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAI7C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,4EAwBrF"}
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
label?: string;
|
|
3
|
+
anchor?: HTMLElement | null;
|
|
4
|
+
modal?: boolean;
|
|
5
|
+
dir?: 'ltr' | 'rtl';
|
|
3
6
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
4
7
|
align?: 'start' | 'center' | 'end';
|
|
5
8
|
sideOffset?: number;
|
|
6
9
|
class?: string;
|
|
7
10
|
};
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?(): unknown;
|
|
13
|
+
content?(): unknown;
|
|
14
|
+
};
|
|
8
15
|
type __VLS_ModelProps = {
|
|
9
16
|
'open'?: boolean;
|
|
10
17
|
};
|
|
11
18
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var __VLS_14: {}, __VLS_34: {};
|
|
13
|
-
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof __VLS_14) => any;
|
|
15
|
-
} & {
|
|
16
|
-
content?: (props: typeof __VLS_34) => any;
|
|
17
|
-
};
|
|
18
19
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
20
|
"update:open": (value: boolean | undefined) => any;
|
|
21
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
22
|
+
pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
|
|
23
|
+
focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
|
|
24
|
+
interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
|
|
25
|
+
closeAutoFocus: (event: Event) => any;
|
|
20
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
27
|
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
28
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
29
|
+
onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
|
|
30
|
+
onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
31
|
+
onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
32
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
22
33
|
}>, {
|
|
23
34
|
side: "top" | "right" | "bottom" | "left";
|
|
24
35
|
align: "start" | "center" | "end";
|
|
25
36
|
sideOffset: number;
|
|
37
|
+
modal: boolean;
|
|
26
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
40
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown-menu/DropdownMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown-menu/DropdownMenu.vue"],"names":[],"mappings":"AAgGE,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACnB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AASJ,KAAK,WAAW,GAAG;IAAE,OAAO,CAAC,IAAI,OAAO,CAAC;IAAC,OAAO,CAAC,IAAI,OAAO,CAAA;CAAE,CAAC;AAalE,KAAK,gBAAgB,GAAG;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAMF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA+IxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;UAjLH,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;WAClC,OAAO,GAAG,QAAQ,GAAG,KAAK;gBACrB,MAAM;WAJX,OAAO;6EAuLnB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
id?: string;
|
|
3
|
+
axis?: 'x' | 'y' | 'both';
|
|
3
4
|
as?: 'div' | 'li';
|
|
4
5
|
class?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
8
|
as: "div" | "li";
|
|
8
9
|
id: string;
|
|
10
|
+
axis: "x" | "y" | "both";
|
|
9
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
12
|
declare const _default: typeof __VLS_export;
|
|
11
13
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Highlight.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/highlight/Highlight.vue"],"names":[],"mappings":"AAyCE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"Highlight.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/highlight/Highlight.vue"],"names":[],"mappings":"AAyCE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,CAAA;IACzB,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA2DN,QAAA,MAAM,YAAY;QA7DP,KAAK,GAAG,IAAI;QAFZ,MAAM;UACJ,GAAG,GAAG,GAAG,GAAG,MAAM;6EAiE7B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useHighlightMotion(axis: () => 'x' | 'y' | 'both'): {
|
|
2
|
+
transition: import("vue").ComputedRef<{
|
|
3
|
+
readonly duration: 0.3;
|
|
4
|
+
readonly ease: readonly [0.4, 0, 0.2, 1];
|
|
5
|
+
} | {
|
|
6
|
+
duration: number;
|
|
7
|
+
}>;
|
|
8
|
+
transformTemplate: import("vue").ComputedRef<((transform: import("motion-v").TransformProperties, generatedTransform: string) => string) | undefined>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useHighlightMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHighlightMotion.d.ts","sourceRoot":"","sources":["../../../../../src/components/highlight/composables/useHighlightMotion.ts"],"names":[],"mappings":"AAIA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,MAAM;;;;;;;;EAiBhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightboxThumbs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/lightbox/LightboxThumbs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LightboxThumbs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/lightbox/LightboxThumbs.vue"],"names":[],"mappings":"AAmFE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA2IJ,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
anchor?: HTMLElement | null;
|
|
3
|
+
modal?: boolean;
|
|
2
4
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
3
5
|
align?: 'start' | 'center' | 'end';
|
|
4
6
|
sideOffset?: number;
|
|
5
7
|
padded?: boolean;
|
|
6
8
|
class?: string;
|
|
7
9
|
};
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
default?(): unknown;
|
|
12
|
+
content?(): unknown;
|
|
13
|
+
};
|
|
8
14
|
type __VLS_ModelProps = {
|
|
9
15
|
'open'?: boolean;
|
|
10
16
|
};
|
|
11
17
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var __VLS_14: {}, __VLS_34: {};
|
|
13
|
-
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof __VLS_14) => any;
|
|
15
|
-
} & {
|
|
16
|
-
content?: (props: typeof __VLS_34) => any;
|
|
17
|
-
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
"update:open": (value: boolean | undefined) => any;
|
|
20
|
+
openAutoFocus: (event: Event) => any;
|
|
21
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
22
|
+
pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
|
|
23
|
+
focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
|
|
24
|
+
interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
|
|
25
|
+
closeAutoFocus: (event: Event) => any;
|
|
20
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
27
|
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
28
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
29
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
30
|
+
onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
|
|
31
|
+
onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
32
|
+
onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
33
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
22
34
|
}>, {
|
|
23
35
|
side: "top" | "right" | "bottom" | "left";
|
|
24
36
|
align: "start" | "center" | "end";
|
|
25
37
|
sideOffset: number;
|
|
38
|
+
modal: boolean;
|
|
26
39
|
padded: boolean;
|
|
27
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/Popover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/Popover.vue"],"names":[],"mappings":"AAgFE,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AASJ,KAAK,WAAW,GAAG;IAAE,OAAO,CAAC,IAAI,OAAO,CAAC;IAAC,OAAO,CAAC,IAAI,OAAO,CAAA;CAAE,CAAC;AAelE,KAAK,gBAAgB,GAAG;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAMF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA2HxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;UAhKH,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;WAClC,OAAO,GAAG,QAAQ,GAAG,KAAK;gBACrB,MAAM;WAHX,OAAO;YAIN,OAAO;6EAiKpB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type PopoverContentProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<PopoverContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
openAutoFocus: (event: Event) => any;
|
|
8
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
9
|
+
pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
|
|
10
|
+
focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
|
|
11
|
+
interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
|
|
12
|
+
closeAutoFocus: (event: Event) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<PopoverContentProps> & Readonly<{
|
|
14
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
15
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
16
|
+
onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
|
|
17
|
+
onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
18
|
+
onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
|
|
19
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=PopoverContent.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverContent.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/PopoverContent.vue"],"names":[],"mappings":"AA4BE,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,SAAS,CAAA;AAqDlB,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopoverCloseFocus.d.ts","sourceRoot":"","sources":["../../../../../src/components/popover/composables/usePopoverCloseFocus.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,IAGhF,OAAO,KAAK,UAUrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollArea.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/scroll-area/ScrollArea.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrollArea.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/scroll-area/ScrollArea.vue"],"names":[],"mappings":"AAgJE,KAAK,WAAW,GAAG;IACf,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IAC9C,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IAChD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA2JN,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAQ/C,QAAA,MAAM,UAAU;;;;YAzKD,OAAO;eAJJ,UAAU,GAAG,YAAY,GAAG,MAAM;eAKlC,OAAO;cAJR,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM;eACpC,OAAO;mBACH,OAAO;6EA8K3B,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ShallowRef } from 'vue';
|
|
2
|
+
export declare function useScrollFocus(host: ShallowRef<HTMLElement | undefined>, viewport: ShallowRef<HTMLElement | undefined>, options: () => {
|
|
3
|
+
focusable: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
}): {
|
|
6
|
+
hostFocus: import("vue").ComputedRef<{
|
|
7
|
+
tabindex: number | undefined;
|
|
8
|
+
role: string | undefined;
|
|
9
|
+
'aria-label': string | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
viewportFocus: import("vue").ComputedRef<{
|
|
12
|
+
tabindex: number | undefined;
|
|
13
|
+
role: string | undefined;
|
|
14
|
+
'aria-label': string | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useScrollFocus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollFocus.d.ts","sourceRoot":"","sources":["../../../../../src/components/scroll-area/composables/useScrollFocus.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,KAAK,CAAA;AAEhE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,EACzC,QAAQ,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,EAC7C,OAAO,EAAE,MAAM;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;EAiCrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/segmented-control/SegmentedControl.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/segmented-control/SegmentedControl.vue"],"names":[],"mappings":"AA6FE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAIL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAA;AAErC,QAAA,MAAM,YAAY,GAAK,CAAC,SAAS,YAAY,GAAG,YAAY,EAC7D,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WA6KO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;iBAzKzC,CAAC,EAAE;eACL,qBAAqB,CAAC,MAAM,CAAC;sBACtB,wBAAwB,CAAC,aAAa,CAAC;gBAC7C,OAAO;mBACJ,OAAO;gBACV,MAAM;;qBA6BP,MAAM,GAAG,MAAM;;;KAuI+D,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;uBA7J2B;YAAE,MAAM,EAAE,CAAC,CAAA;SAAE,GAAG,OAAO;;;EAiKzD,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsTrigger.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/TabsTrigger.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabsTrigger.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/TabsTrigger.vue"],"names":[],"mappings":"AAmDE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA0EJ,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { DropdownMenuContentEmits } from 'reka-ui';
|
|
3
|
+
export declare function useAnchoredOverlay(props: {
|
|
4
|
+
anchor?: HTMLElement | null;
|
|
5
|
+
modal: boolean;
|
|
6
|
+
}, open: Ref<boolean | undefined>, emit: <K extends keyof DropdownMenuContentEmits>(event: K, ...args: DropdownMenuContentEmits[K]) => void, openAutoFocus?: (event: Event) => void): {
|
|
7
|
+
trigger: import("vue").ShallowRef<{
|
|
8
|
+
$el: HTMLElement;
|
|
9
|
+
} | null, {
|
|
10
|
+
$el: HTMLElement;
|
|
11
|
+
} | null>;
|
|
12
|
+
reference: import("vue").ComputedRef<HTMLElement | undefined>;
|
|
13
|
+
visible: import("vue").WritableComputedRef<boolean, boolean>;
|
|
14
|
+
events: {
|
|
15
|
+
onCloseAutoFocus: (event: Event) => void;
|
|
16
|
+
onInteractOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => void;
|
|
17
|
+
onPointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => void;
|
|
18
|
+
onFocusOutside: (event: import("reka-ui").FocusOutsideEvent) => void;
|
|
19
|
+
onEscapeKeyDown: (event: KeyboardEvent) => void;
|
|
20
|
+
onOpenAutoFocus?: ((event: Event) => void) | undefined;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=anchored-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchored-overlay.d.ts","sourceRoot":"","sources":["../../../src/lib/anchored-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAEvD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EACtD,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,EAC9B,IAAI,EAAE,CAAC,CAAC,SAAS,MAAM,wBAAwB,EAC7C,KAAK,EAAE,CAAC,EACR,GAAG,IAAI,EAAE,wBAAwB,CAAC,CAAC,CAAC,KACjC,IAAI,EACT,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;;aAEJ,WAAW;;aAAX,WAAW;;;;;;;;;;;;EAiG9C"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ref } from 'vue'
|
|
3
2
|
import {
|
|
4
3
|
AlertDialogCancel,
|
|
5
4
|
AlertDialogContent,
|
|
@@ -17,6 +16,14 @@
|
|
|
17
16
|
import { dialogCard, dialogWrapper } from '../dialog/dialog.variants'
|
|
18
17
|
import Heading from '../heading/Heading.vue'
|
|
19
18
|
import Text from '../text/Text.vue'
|
|
19
|
+
import { useAlertDialogConfirm } from './composables/useAlertDialogConfirm'
|
|
20
|
+
import { useConfirmDelay } from './composables/useConfirmDelay'
|
|
21
|
+
import {
|
|
22
|
+
alertDialogHeader,
|
|
23
|
+
alertDialogContent,
|
|
24
|
+
alertDialogActions,
|
|
25
|
+
alertDialogCountdown,
|
|
26
|
+
} from './alert-dialog.variants'
|
|
20
27
|
|
|
21
28
|
defineOptions({ name: 'HnAlertDialog' })
|
|
22
29
|
|
|
@@ -25,6 +32,7 @@
|
|
|
25
32
|
title: string
|
|
26
33
|
description?: string
|
|
27
34
|
confirmText?: string
|
|
35
|
+
confirmDelay?: number
|
|
28
36
|
cancelText?: string
|
|
29
37
|
tone?: 'accent' | 'danger'
|
|
30
38
|
size?: 'sm' | 'md'
|
|
@@ -32,31 +40,19 @@
|
|
|
32
40
|
onConfirm?: () => unknown
|
|
33
41
|
class?: string
|
|
34
42
|
}>(),
|
|
35
|
-
{ tone: 'accent', size: 'sm' },
|
|
43
|
+
{ tone: 'accent', size: 'sm', confirmDelay: 0 },
|
|
36
44
|
)
|
|
37
|
-
const emit = defineEmits<{ cancel: [] }>()
|
|
45
|
+
const emit = defineEmits<{ cancel: []; error: [error: unknown] }>()
|
|
38
46
|
|
|
39
47
|
const open = defineModel<boolean>('open')
|
|
40
|
-
const busy = ref(false)
|
|
41
48
|
const t = useUiLocale()
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const result = props.onConfirm?.()
|
|
50
|
-
if (result instanceof Promise) {
|
|
51
|
-
busy.value = true
|
|
52
|
-
try {
|
|
53
|
-
await result
|
|
54
|
-
} finally {
|
|
55
|
-
busy.value = false
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
open.value = false
|
|
59
|
-
}
|
|
49
|
+
const remaining = useConfirmDelay(open, () => props.confirmDelay)
|
|
50
|
+
const { busy, guard, confirm } = useAlertDialogConfirm(
|
|
51
|
+
props,
|
|
52
|
+
open,
|
|
53
|
+
error => emit('error', error),
|
|
54
|
+
() => remaining.value > 0,
|
|
55
|
+
)
|
|
60
56
|
</script>
|
|
61
57
|
|
|
62
58
|
<template>
|
|
@@ -66,14 +62,7 @@
|
|
|
66
62
|
</AlertDialogTrigger>
|
|
67
63
|
<AlertDialogPortal>
|
|
68
64
|
<AlertDialogOverlay class="hn-scrim" />
|
|
69
|
-
<div
|
|
70
|
-
:class="
|
|
71
|
-
cn(
|
|
72
|
-
'pointer-events-none fixed inset-0 z-(--hn-z-overlay) grid',
|
|
73
|
-
dialogWrapper({ placement: props.placement ?? 'auto' }),
|
|
74
|
-
)
|
|
75
|
-
"
|
|
76
|
-
>
|
|
65
|
+
<div :class="dialogWrapper({ placement: props.placement ?? 'auto' })">
|
|
77
66
|
<AlertDialogContent as-child @escape-key-down="guard">
|
|
78
67
|
<Card
|
|
79
68
|
:padded="false"
|
|
@@ -81,14 +70,12 @@
|
|
|
81
70
|
:aria-busy="busy || undefined"
|
|
82
71
|
:class="
|
|
83
72
|
cn(
|
|
84
|
-
'pointer-events-auto flex w-full flex-col gap-4 shadow-lg outline-none',
|
|
85
|
-
'py-(--hn-panel-p)',
|
|
86
73
|
dialogCard({ placement: props.placement ?? 'auto', size: props.size }),
|
|
87
74
|
props.class,
|
|
88
75
|
)
|
|
89
76
|
"
|
|
90
77
|
>
|
|
91
|
-
<div class="
|
|
78
|
+
<div :class="alertDialogHeader()">
|
|
92
79
|
<AlertDialogTitle as-child>
|
|
93
80
|
<Heading :level="2" size="lg">{{ props.title }}</Heading>
|
|
94
81
|
</AlertDialogTitle>
|
|
@@ -96,17 +83,18 @@
|
|
|
96
83
|
<Text tone="muted">{{ props.description }}</Text>
|
|
97
84
|
</AlertDialogDescription>
|
|
98
85
|
</div>
|
|
99
|
-
<div v-if="$slots.content" class="
|
|
86
|
+
<div v-if="$slots.content" :class="alertDialogContent()">
|
|
100
87
|
<slot name="content" />
|
|
101
88
|
</div>
|
|
102
|
-
<div class="
|
|
89
|
+
<div :class="alertDialogActions()">
|
|
103
90
|
<AlertDialogCancel as-child>
|
|
104
91
|
<Button variant="soft" tone="neutral" :disabled="busy" @click="emit('cancel')">
|
|
105
92
|
{{ props.cancelText ?? t.common.cancel }}
|
|
106
93
|
</Button>
|
|
107
94
|
</AlertDialogCancel>
|
|
108
|
-
<Button :tone="props.tone" :loading="busy" @click="confirm">
|
|
95
|
+
<Button :tone="props.tone" :loading="busy" :disabled="remaining > 0" @click="confirm">
|
|
109
96
|
{{ props.confirmText ?? t.common.confirm }}
|
|
97
|
+
<span v-if="remaining > 0" :class="alertDialogCountdown()">({{ remaining }})</span>
|
|
110
98
|
</Button>
|
|
111
99
|
</div>
|
|
112
100
|
</Card>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { tv } from '../../lib/tv'
|
|
2
|
+
|
|
3
|
+
export const alertDialogHeader = tv({
|
|
4
|
+
base: 'flex min-w-0 flex-col gap-1.5 px-(--hn-panel-p)',
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
export const alertDialogContent = tv({
|
|
8
|
+
base: 'px-(--hn-panel-p)',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export const alertDialogActions = tv({
|
|
12
|
+
base: 'flex justify-end gap-(--hn-inline-gap) px-(--hn-panel-p)',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const alertDialogCountdown = tv({
|
|
16
|
+
base: 'tabular-nums',
|
|
17
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ref, type Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export function useAlertDialogConfirm(
|
|
4
|
+
props: { onConfirm?: () => unknown },
|
|
5
|
+
open: Ref<boolean | undefined>,
|
|
6
|
+
onError: (error: unknown) => void,
|
|
7
|
+
blocked: () => boolean = () => false,
|
|
8
|
+
) {
|
|
9
|
+
const busy = ref(false)
|
|
10
|
+
|
|
11
|
+
function guard(event: Event) {
|
|
12
|
+
if (busy.value) event.preventDefault()
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function confirm() {
|
|
16
|
+
if (!open.value || busy.value || blocked()) return
|
|
17
|
+
busy.value = true
|
|
18
|
+
try {
|
|
19
|
+
await props.onConfirm?.()
|
|
20
|
+
open.value = false
|
|
21
|
+
} catch (error) {
|
|
22
|
+
onError(error)
|
|
23
|
+
} finally {
|
|
24
|
+
busy.value = false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return { busy, guard, confirm }
|
|
29
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { onMounted, onScopeDispose, ref, watch, type Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export function useConfirmDelay(open: Ref<boolean | undefined>, delay: () => number) {
|
|
4
|
+
const remaining = ref(0)
|
|
5
|
+
let mounted = false
|
|
6
|
+
let timer: ReturnType<typeof setTimeout> | undefined
|
|
7
|
+
|
|
8
|
+
function stop() {
|
|
9
|
+
clearTimeout(timer)
|
|
10
|
+
timer = undefined
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function restart() {
|
|
14
|
+
stop()
|
|
15
|
+
if (!open.value) return
|
|
16
|
+
const seconds = Math.ceil(delay())
|
|
17
|
+
remaining.value = Number.isFinite(seconds) && seconds > 0 ? seconds : 0
|
|
18
|
+
if (!mounted || !remaining.value) return
|
|
19
|
+
|
|
20
|
+
const deadline = performance.now() + remaining.value * 1000
|
|
21
|
+
function tick() {
|
|
22
|
+
const milliseconds = deadline - performance.now()
|
|
23
|
+
remaining.value = Math.max(0, Math.ceil(milliseconds / 1000))
|
|
24
|
+
timer = remaining.value > 0 ? setTimeout(tick, Math.min(1000, milliseconds)) : undefined
|
|
25
|
+
}
|
|
26
|
+
tick()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
watch([open, delay], restart, { immediate: true, flush: 'sync' })
|
|
30
|
+
onMounted(() => {
|
|
31
|
+
mounted = true
|
|
32
|
+
restart()
|
|
33
|
+
})
|
|
34
|
+
onScopeDispose(stop)
|
|
35
|
+
|
|
36
|
+
return remaining
|
|
37
|
+
}
|