@vanduo-oss/vue 0.1.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 +21 -0
- package/README.md +50 -0
- package/dist/components/VdAccordion.vue.d.ts +29 -0
- package/dist/components/VdAlert.vue.d.ts +27 -0
- package/dist/components/VdAvatar.vue.d.ts +23 -0
- package/dist/components/VdBadge.vue.d.ts +21 -0
- package/dist/components/VdButton.vue.d.ts +32 -0
- package/dist/components/VdButtonGroup.vue.d.ts +23 -0
- package/dist/components/VdCard.vue.d.ts +24 -0
- package/dist/components/VdCheckboxGroup.vue.d.ts +24 -0
- package/dist/components/VdChip.vue.d.ts +36 -0
- package/dist/components/VdCodeSnippet.vue.d.ts +11 -0
- package/dist/components/VdCollection.vue.d.ts +23 -0
- package/dist/components/VdCustomSelect.vue.d.ts +23 -0
- package/dist/components/VdFlow.vue.d.ts +28 -0
- package/dist/components/VdIcon.vue.d.ts +11 -0
- package/dist/components/VdInput.vue.d.ts +43 -0
- package/dist/components/VdModal.vue.d.ts +33 -0
- package/dist/components/VdOffcanvas.vue.d.ts +33 -0
- package/dist/components/VdPagination.vue.d.ts +29 -0
- package/dist/components/VdPreloader.vue.d.ts +17 -0
- package/dist/components/VdProgress.vue.d.ts +14 -0
- package/dist/components/VdRadioGroup.vue.d.ts +24 -0
- package/dist/components/VdRating.vue.d.ts +21 -0
- package/dist/components/VdSelect.vue.d.ts +27 -0
- package/dist/components/VdSidenav.vue.d.ts +35 -0
- package/dist/components/VdSkeleton.vue.d.ts +16 -0
- package/dist/components/VdSpinner.vue.d.ts +11 -0
- package/dist/components/VdTable.vue.d.ts +22 -0
- package/dist/components/VdTabs.vue.d.ts +25 -0
- package/dist/components/VdToast.vue.d.ts +11 -0
- package/dist/components/VdToastContainer.vue.d.ts +3 -0
- package/dist/components/VdTooltip.vue.d.ts +20 -0
- package/dist/components/VdTransfer.vue.d.ts +27 -0
- package/dist/components/VdTree.vue.d.ts +26 -0
- package/dist/components/VdTreeNode.vue.d.ts +22 -0
- package/dist/components/primitives/VdBox.vue.d.ts +22 -0
- package/dist/components/primitives/VdCenter.vue.d.ts +25 -0
- package/dist/components/primitives/VdCover.vue.d.ts +25 -0
- package/dist/components/primitives/VdFrame.vue.d.ts +20 -0
- package/dist/components/primitives/VdInline.vue.d.ts +20 -0
- package/dist/components/primitives/VdStack.vue.d.ts +22 -0
- package/dist/components/primitives/VdSwitcher.vue.d.ts +24 -0
- package/dist/composables/useAffix.d.ts +2 -0
- package/dist/composables/useDatepicker.d.ts +2 -0
- package/dist/composables/useDraggable.d.ts +9 -0
- package/dist/composables/useDropdown.d.ts +20 -0
- package/dist/composables/useExpandingCards.d.ts +10 -0
- package/dist/composables/useFlow.d.ts +13 -0
- package/dist/composables/useFocusTrap.d.ts +6 -0
- package/dist/composables/useGlass.d.ts +8 -0
- package/dist/composables/useImageBox.d.ts +9 -0
- package/dist/composables/useKeyboardNav.d.ts +10 -0
- package/dist/composables/useMorph.d.ts +10 -0
- package/dist/composables/useMorphBadges.d.ts +9 -0
- package/dist/composables/useNavbarGlassScroll.d.ts +7 -0
- package/dist/composables/useParallax.d.ts +9 -0
- package/dist/composables/usePopover.d.ts +9 -0
- package/dist/composables/useRipple.d.ts +9 -0
- package/dist/composables/useScrollspy.d.ts +7 -0
- package/dist/composables/useSearch.d.ts +13 -0
- package/dist/composables/useSidenav.d.ts +14 -0
- package/dist/composables/useSpotlight.d.ts +9 -0
- package/dist/composables/useStepper.d.ts +19 -0
- package/dist/composables/useSuggest.d.ts +2 -0
- package/dist/composables/useTabs.d.ts +7 -0
- package/dist/composables/useTheme.d.ts +36 -0
- package/dist/composables/useTimeline.d.ts +9 -0
- package/dist/composables/useTimepicker.d.ts +2 -0
- package/dist/composables/useToast.d.ts +127 -0
- package/dist/composables/useTooltips.d.ts +11 -0
- package/dist/composables/useValidate.d.ts +9 -0
- package/dist/composables/useWaypoint.d.ts +18 -0
- package/dist/config/themeDefaults.d.ts +10 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.js +3254 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/utils/sanitizeHtml.d.ts +19 -0
- package/dist/vanduo-vue.css +2 -0
- package/package.json +66 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface SelectOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
modelValue: string;
|
|
8
|
+
options: readonly SelectOption[];
|
|
9
|
+
name?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: string) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
placeholder: string;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
placement?: "left" | "right" | "top" | "bottom";
|
|
4
|
+
title?: string;
|
|
5
|
+
closeOnBackdrop?: boolean;
|
|
6
|
+
closeOnEsc?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
header?: (props: typeof __VLS_7) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_9) => any;
|
|
13
|
+
} & {
|
|
14
|
+
footer?: (props: typeof __VLS_11) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: boolean) => any;
|
|
18
|
+
close: () => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
21
|
+
onClose?: (() => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
title: string;
|
|
24
|
+
closeOnBackdrop: boolean;
|
|
25
|
+
placement: "left" | "right" | "top" | "bottom";
|
|
26
|
+
closeOnEsc: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type Shape = "text" | "circle" | "rect" | "card" | "button";
|
|
2
|
+
type Size = "sm" | "md" | "lg" | "xl";
|
|
3
|
+
interface Props {
|
|
4
|
+
shape?: Shape;
|
|
5
|
+
size?: Size;
|
|
6
|
+
width?: string;
|
|
7
|
+
lines?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
+
size: Size;
|
|
11
|
+
shape: Shape;
|
|
12
|
+
width: string;
|
|
13
|
+
lines: number;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Size = "sm" | "md" | "lg";
|
|
2
|
+
interface Props {
|
|
3
|
+
size?: Size;
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
|
+
label: string;
|
|
8
|
+
size: Size;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type Variant = "primary" | "secondary" | "success" | "warning" | "error" | "info";
|
|
2
|
+
interface Column {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
variant?: Variant;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
columns: readonly Column[];
|
|
9
|
+
rows: readonly Record<string, string | number>[];
|
|
10
|
+
striped?: boolean;
|
|
11
|
+
bordered?: boolean;
|
|
12
|
+
hover?: boolean;
|
|
13
|
+
caption?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
+
caption: string;
|
|
17
|
+
bordered: boolean;
|
|
18
|
+
striped: boolean;
|
|
19
|
+
hover: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface Tab {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
tabs: Tab[];
|
|
7
|
+
modelValue: string;
|
|
8
|
+
}
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: string) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToastEntry } from "../composables/useToast";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
toast: ToastEntry;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
dismiss: (id: string) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onDismiss?: ((id: string) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Position = "top" | "bottom" | "left" | "right";
|
|
2
|
+
interface Props {
|
|
3
|
+
text: string;
|
|
4
|
+
position?: Position;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
position: Position;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactive reimplementation of framework/js/components/transfer.js — a dual-list
|
|
3
|
+
* picker generated from a `data-vd-transfer` JSON array. Reproduces the
|
|
4
|
+
* framework's generated DOM (`.vd-transfer` → panels + actions), per-panel
|
|
5
|
+
* search, checkbox selection, and the move buttons. Dispatches a native
|
|
6
|
+
* `transfer:change` CustomEvent so the documented
|
|
7
|
+
* `el.addEventListener('transfer:change', ...)` API works.
|
|
8
|
+
*
|
|
9
|
+
* Two fixes-to-documented-intent vs the Vanilla JS:
|
|
10
|
+
* - items use `.is-selected` (what transfer.css actually styles); the docs API
|
|
11
|
+
* table's `.is-checked` is a stale typo.
|
|
12
|
+
* - the event detail is `{ selected, available }` (the documented shape used by
|
|
13
|
+
* the demo snippet's `e.detail.selected`); the Vanilla JS fired the wrong
|
|
14
|
+
* `{ source, target }`, so the documented `e.detail.selected` was undefined.
|
|
15
|
+
*/
|
|
16
|
+
interface TransferItem {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
|
20
|
+
type __VLS_Props = {
|
|
21
|
+
items: TransferItem[];
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
24
|
+
getSelected: () => string[];
|
|
25
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type TreeNode } from "./VdTreeNode.vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reactive reimplementation of framework/js/components/tree.js — renders
|
|
4
|
+
* hierarchical `data-vd-tree` JSON as an expand/collapse tree with optional
|
|
5
|
+
* checkbox selection and parent→child cascade. Reproduces the framework's
|
|
6
|
+
* generated DOM (`.vd-tree[role=tree]` → `.vd-tree-node` → `.vd-tree-node-content`
|
|
7
|
+
* → `.vd-tree-children`), `getChecked()`, and keyboard navigation.
|
|
8
|
+
*
|
|
9
|
+
* Fixes-to-documented-intent vs the Vanilla JS:
|
|
10
|
+
* - fires `tree:toggle` with `{ id, open }` (listed in the docs API table but
|
|
11
|
+
* never dispatched by the Vanilla JS) and `tree:check` with the documented
|
|
12
|
+
* `{ checked: string[], node: string }` shape (Vanilla fired a single
|
|
13
|
+
* `{ id, checked: boolean, label }`).
|
|
14
|
+
* - Arrow Left/Right collapse/expand the focused branch (documented keyboard
|
|
15
|
+
* support the Vanilla JS omitted; it only handled Up/Down).
|
|
16
|
+
*/
|
|
17
|
+
type __VLS_Props = {
|
|
18
|
+
nodes: TreeNode[];
|
|
19
|
+
checkbox?: boolean;
|
|
20
|
+
cascade?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
23
|
+
getChecked: () => string[];
|
|
24
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A single recursive tree node — see VdTree.vue for the data model and events. */
|
|
2
|
+
export interface TreeNode {
|
|
3
|
+
id?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
children?: TreeNode[];
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
node: TreeNode;
|
|
12
|
+
checkbox: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
|
+
toggle: (node: TreeNode) => any;
|
|
16
|
+
check: (node: TreeNode, checked: boolean) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onToggle?: ((node: TreeNode) => any) | undefined;
|
|
19
|
+
onCheck?: ((node: TreeNode, checked: boolean) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type Space = "0" | "fib-1" | "fib-2" | "fib-3" | "fib-5" | "fib-8" | "fib-13" | "fib-21" | "fib-34" | "fib-55";
|
|
2
|
+
interface Props {
|
|
3
|
+
as?: keyof HTMLElementTagNameMap;
|
|
4
|
+
/** Fibonacci padding step (maps to `data-pad`). */
|
|
5
|
+
pad?: Space;
|
|
6
|
+
}
|
|
7
|
+
declare var __VLS_8: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_8) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
+
as: keyof HTMLElementTagNameMap;
|
|
13
|
+
pad: Space;
|
|
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,25 @@
|
|
|
1
|
+
type Max = "fib-377" | "fib-610" | "fib-987";
|
|
2
|
+
type Axis = "both" | "horizontal" | "vertical";
|
|
3
|
+
interface Props {
|
|
4
|
+
as?: keyof HTMLElementTagNameMap;
|
|
5
|
+
/** Max content width (maps to `data-max`). */
|
|
6
|
+
max?: Max;
|
|
7
|
+
/** Also center children along an axis (maps to `data-axis`). */
|
|
8
|
+
axis?: Axis;
|
|
9
|
+
}
|
|
10
|
+
declare var __VLS_8: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_8) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
+
max: Max;
|
|
16
|
+
as: keyof HTMLElementTagNameMap;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Min = "screen" | "half" | "fib-610" | "fib-987";
|
|
2
|
+
type Gap = "fib-3" | "fib-5" | "fib-8";
|
|
3
|
+
interface Props {
|
|
4
|
+
as?: keyof HTMLElementTagNameMap;
|
|
5
|
+
/** Minimum height (maps to `data-min`). */
|
|
6
|
+
min?: Min;
|
|
7
|
+
/** Gap between centered children (maps to `data-gap`). */
|
|
8
|
+
gap?: Gap;
|
|
9
|
+
}
|
|
10
|
+
declare var __VLS_8: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_8) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
+
as: keyof HTMLElementTagNameMap;
|
|
16
|
+
min: Min;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Ratio = "golden" | "golden-portrait" | "square" | "16-9" | "4-3" | "3-2";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Aspect ratio (maps to `data-ratio`). */
|
|
4
|
+
ratio?: Ratio;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
ratio: Ratio;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Space = "0" | "fib-1" | "fib-2" | "fib-3" | "fib-5" | "fib-8" | "fib-13" | "fib-21" | "fib-34" | "fib-55";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Fibonacci gap between wrapped inline items (maps to `data-gap`). */
|
|
4
|
+
gap?: Space;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
gap: Space;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type Space = "0" | "fib-1" | "fib-2" | "fib-3" | "fib-5" | "fib-8" | "fib-13" | "fib-21" | "fib-34" | "fib-55";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Fibonacci gap between stacked children (maps to `data-gap`). */
|
|
4
|
+
gap?: Space;
|
|
5
|
+
as?: "div" | "section" | "ul" | "ol";
|
|
6
|
+
}
|
|
7
|
+
declare var __VLS_8: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_8) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
+
as: "div" | "section" | "ul" | "ol";
|
|
13
|
+
gap: Space;
|
|
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,24 @@
|
|
|
1
|
+
type Threshold = "fib-377" | "fib-610" | "fib-987";
|
|
2
|
+
type Gap = "fib-3" | "fib-5" | "fib-8";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Width below which children stack (maps to `data-threshold`). */
|
|
5
|
+
threshold?: Threshold;
|
|
6
|
+
/** Gap between items (maps to `data-gap`). */
|
|
7
|
+
gap?: Gap;
|
|
8
|
+
}
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
+
gap: Gap;
|
|
15
|
+
threshold: Threshold;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `VanduoDraggable.init(root)` from
|
|
4
|
+
* `framework/js/components/draggable.js`: scans `root` for `.vd-draggable`
|
|
5
|
+
* elements (or with attribute `data-vd-draggable`) and wires pointer drag
|
|
6
|
+
* + drop-target detection. The framework global handles per-instance state;
|
|
7
|
+
* this composable wires on mount and tears down on unmount via `destroyAll()`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDraggable(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `VanduoDropdown.init(root)` from `framework/js/components/dropdown.js`:
|
|
4
|
+
* scans `root` for `.vd-dropdown` containers, wires toggle / menu / keyboard /
|
|
5
|
+
* outside-click / typeahead, and tears down on unmount.
|
|
6
|
+
*
|
|
7
|
+
* The framework JS already exposes a global, so we do NOT re-implement the
|
|
8
|
+
* logic. Instead, `init(root)` is called once on mount; the framework's own
|
|
9
|
+
* lifecycle (registered via `Vanduo.register('dropdown', …)`) handles each
|
|
10
|
+
* dropdown's per-instance wiring, and `VanduoDropdown.destroyAll()` runs on
|
|
11
|
+
* unmount so Vue's patch-driven DOM doesn't leave stale listeners behind.
|
|
12
|
+
*
|
|
13
|
+
* Notes:
|
|
14
|
+
* - The framework tracks instances in a Map keyed by the `.vd-dropdown`
|
|
15
|
+
* element. Vue's diffing may re-use the same element across re-renders,
|
|
16
|
+
* so calling `init` twice is safe (the Map dedupes).
|
|
17
|
+
* - `VanduoDropdown.destroyAll()` is the canonical teardown path called from
|
|
18
|
+
* `Vanduo.destroy(root)`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useDropdown(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `VanduoExpandingCards.init(root)` from
|
|
4
|
+
* `framework/js/components/expanding-cards.js`: scans `root` for
|
|
5
|
+
* `.vd-expanding-cards` containers and wires the click-to-expand behaviour
|
|
6
|
+
* (one card expands to fill, others shrink to a thumbnail strip). The framework
|
|
7
|
+
* global handles per-container state; this composable wires on mount and tears
|
|
8
|
+
* down on unmount via `destroyAll()`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useExpandingCards(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `VanduoFlow.init()` from `framework/js/components/flow.js`:
|
|
4
|
+
* scans `root` for `.vd-flow` / `.vd-carousel` carousels and wires slide
|
|
5
|
+
* transitions (slide + fade), prev/next controls, dot indicators, keyboard
|
|
6
|
+
* arrows, pointer/touch swipe, and autoplay (pause on hover/focus).
|
|
7
|
+
*
|
|
8
|
+
* Indicator bridge: the docs markup places bare `<button>`s inside
|
|
9
|
+
* `.vd-flow-indicators`, but the framework CSS/JS target `.vd-flow-indicator`.
|
|
10
|
+
* We add that class here so indicators render as dots and become interactive —
|
|
11
|
+
* matching the component's clear design intent.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useFlow(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `framework/js/components/glass.js`: scroll-aware glass activation.
|
|
4
|
+
* For each `[data-glass-scroll]` element, observes a sentinel (the
|
|
5
|
+
* `data-glass-sentinel` selector, else the previous sibling) and toggles
|
|
6
|
+
* `.is-glass-active` when that sentinel scrolls out of / back into view.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useGlass(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `VanduoImageBox.init(root)` from
|
|
4
|
+
* `framework/js/components/image-box.js`: scans `root` for `.vd-image-box`
|
|
5
|
+
* elements and wires hover-reveal caption + click-to-zoom behaviour. The
|
|
6
|
+
* framework global handles per-instance state; this composable wires on mount
|
|
7
|
+
* and tears down on unmount via `destroyAll()`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useImageBox(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
export interface UseKeyboardNavOptions {
|
|
3
|
+
itemSelector: string;
|
|
4
|
+
onSelect?: (index: number) => void;
|
|
5
|
+
onEscape?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useKeyboardNav: (container: Ref<HTMLElement | null>, options: UseKeyboardNavOptions) => {
|
|
8
|
+
activeIndex: Ref<number>;
|
|
9
|
+
setItems: (count: number) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `framework/js/components/morph.js`: a liquid wave content-swap on
|
|
4
|
+
* click for `.vd-morph` / `[data-vd-morph]` elements. Auto-creates the
|
|
5
|
+
* `.vd-morph-wave` / `.vd-morph-shine` layers, originates the wave at the
|
|
6
|
+
* pointer, adds `.is-morphing` for the animation window, then swaps
|
|
7
|
+
* `.vd-morph-current` ⇄ `.vd-morph-next`. `[data-vd-morph="manual"]` opts out
|
|
8
|
+
* of the click handler.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useMorph(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Ports the docs-only multi-state morph badge cycling from
|
|
4
|
+
* `docs/js/modules/demos.js` (`initSectionDemos`). Wires
|
|
5
|
+
* `[data-vd-morph="manual"][data-morph-states]` badges to cycle through
|
|
6
|
+
* `data-morph-states` / `-classes` / `-icons` on click, swapping the badge
|
|
7
|
+
* variant class and the current/next content with the morph wave.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useMorphBadges(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `framework/js/components/navbar.js` initScrollWatcher:
|
|
4
|
+
* toggles scroll-aware glass/transparent behaviour for a navbar element.
|
|
5
|
+
* Threshold: `data-scroll-threshold` attribute (px) or the navbar's own height.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useNavbarGlassScroll(navbarRef: Ref<HTMLElement | null>): Ref<boolean>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `framework/js/components/parallax.js`: layers inside a
|
|
4
|
+
* `.vd-parallax` container translate at speed-scaled rates on a
|
|
5
|
+
* rAF-throttled scroll listener. Container speed comes from
|
|
6
|
+
* `.vd-parallax-slow|medium|fast` (0.5 / 1 / 1.5); per-layer rate from
|
|
7
|
+
* `data-parallax-speed`. Disabled entirely under prefers-reduced-motion.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useParallax(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Wires the framework's bubble/popover component over `root`. The shipped
|
|
4
|
+
* framework registers this as `bubble` (`window.VanduoBubble`) and scans for
|
|
5
|
+
* `[data-vd-bubble]` / `[data-vd-popover]` triggers — building the panel from
|
|
6
|
+
* attributes (`data-vd-bubble`, `-title`, `-placement`). This composable calls
|
|
7
|
+
* `init(root)` on mount and tears down on unmount via `destroyAll()`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function usePopover(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces `VanduoRipple.init(root)` from `framework/js/components/ripple.js`:
|
|
4
|
+
* adds a click-spawned ripple element to any element matching `.vd-ripple`
|
|
5
|
+
* (or with the attribute `data-vd-ripple`). The framework global owns the
|
|
6
|
+
* per-element state and cleanup, so this composable simply wires the root on
|
|
7
|
+
* mount and lets the framework tear down on unmount via `destroyAll(root)`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useRipple(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Wires the framework search helper against `root`. Sources registered with
|
|
4
|
+
* `VanduoSearch.register()` are independent of mounting; the composable is a
|
|
5
|
+
* thin lifecycle hook so vd2 consumers can mount sources alongside a search
|
|
6
|
+
* overlay container.
|
|
7
|
+
*
|
|
8
|
+
* Per-source `fetch` functions are defined by the caller (see
|
|
9
|
+
* `src/stores/search.ts` for the default vd2 sources). This composable does
|
|
10
|
+
* NOT manage source registration — that happens in app-level code so the
|
|
11
|
+
* registry outlives any single component instance.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSearch(root: Ref<HTMLElement | null>): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Reproduces the open/close behavior of
|
|
4
|
+
* `framework/js/components/sidenav.js` for `.vd-sidenav` and `.vd-offcanvas`
|
|
5
|
+
* drawers: `[data-sidenav-toggle="#id"]` triggers, a body-level overlay,
|
|
6
|
+
* close button, overlay-click (unless `data-backdrop="static"`), Escape
|
|
7
|
+
* (unless `data-keyboard="false"`), body scroll-lock, `data-vd-position`
|
|
8
|
+
* direction class, and `sidenav:open` / `sidenav:close` events.
|
|
9
|
+
*
|
|
10
|
+
* The Vanilla portal-to-body + push/fixed/resize handling is omitted: the demo
|
|
11
|
+
* drawers are `position: fixed`, so they overlay the viewport without moving in
|
|
12
|
+
* the DOM, which keeps this from fighting Vue's ownership of the elements.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useSidenav(root: Ref<HTMLElement | null>): void;
|