@soybeanjs/ui 0.0.10 → 0.0.11
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/components/accordion/accordion.vue.d.ts +3 -3
- package/dist/components/alert/alert.vue.d.ts +4 -4
- package/dist/components/alert-dialog/alert-dialog-action.vue.d.ts +3 -3
- package/dist/components/alert-dialog/alert-dialog-cancel.vue.d.ts +3 -3
- package/dist/components/alert-dialog/alert-dialog.vue.d.ts +4 -4
- package/dist/components/avatar/avatar.vue.d.ts +4 -4
- package/dist/components/badge/badge.vue.d.ts +4 -4
- package/dist/components/breadcrumb/breadcrumb.vue.d.ts +3 -3
- package/dist/components/button/button-group.vue.d.ts +6 -6
- package/dist/components/button/button-icon.vue.d.ts +3 -3
- package/dist/components/button/button-link.vue.d.ts +3 -3
- package/dist/components/button/button-loading.vue.d.ts +3 -3
- package/dist/components/button/button.vue.d.ts +4 -4
- package/dist/components/card/card.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox-card-group.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox-card.vue.d.ts +8 -8
- package/dist/components/checkbox/checkbox-group.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox.vue.d.ts +12 -12
- package/dist/components/collapsible/collapsible.vue.d.ts +4 -4
- package/dist/components/command/command.vue.d.ts +7 -7
- package/dist/components/config-provider/config-provider.vue.d.ts +5 -5
- package/dist/components/context-menu/context-menu-checkbox.vue.d.ts +10 -10
- package/dist/components/context-menu/context-menu-radio.vue.d.ts +10 -10
- package/dist/components/context-menu/context-menu-wrapper.vue.d.ts +13 -13
- package/dist/components/context-menu/context-menu.vue.d.ts +9 -9
- package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-pure.vue.d.ts +13 -13
- package/dist/components/dialog/dialog.vue.d.ts +13 -13
- package/dist/components/drawer/drawer-close.vue.d.ts +2 -2
- package/dist/components/drawer/drawer.vue.d.ts +13 -13
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts +10 -10
- package/dist/components/dropdown-menu/dropdown-menu-radio.vue.d.ts +10 -10
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts +14 -14
- package/dist/components/dropdown-menu/dropdown-menu.vue.d.ts +9 -9
- package/dist/components/form/form.vue.d.ts +2 -2
- package/dist/components/form/use-form.d.ts +22 -26
- package/dist/components/icon/icon.vue.d.ts +3 -3
- package/dist/components/input/input.vue.d.ts +4 -4
- package/dist/components/kbd/kbd.vue.d.ts +3 -3
- package/dist/components/label/label.vue.d.ts +2 -2
- package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
- package/dist/components/layout/layout.vue.d.ts +5 -5
- package/dist/components/link/link.vue.d.ts +3 -3
- package/dist/components/list/list-item.vue.d.ts +2 -2
- package/dist/components/list/list.vue.d.ts +2 -2
- package/dist/components/menu/menu-checkbox-options.vue.d.ts +3 -3
- package/dist/components/menu/menu-option.vue.d.ts +9 -9
- package/dist/components/menu/menu-options.vue.d.ts +9 -9
- package/dist/components/menu/menu-radio-options.vue.d.ts +3 -3
- package/dist/components/navigation-menu/navigation-menu.vue.d.ts +11 -11
- package/dist/components/number-input/number-input.vue.d.ts +4 -4
- package/dist/components/pagination/pagination.vue.d.ts +4 -4
- package/dist/components/password/password.vue.d.ts +4 -4
- package/dist/components/popover/popover.vue.d.ts +11 -11
- package/dist/components/radio-group/radio-card-group.vue.d.ts +3 -3
- package/dist/components/radio-group/radio-card.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +3 -3
- package/dist/components/radio-group/radio.vue.d.ts +2 -2
- package/dist/components/segment/segment.vue.d.ts +3 -3
- package/dist/components/select/select.vue.d.ts +8 -8
- package/dist/components/separator/separator.vue.d.ts +5 -5
- package/dist/components/switch/switch.vue.d.ts +25 -25
- package/dist/components/tabs/tabs.vue.d.ts +3 -3
- package/dist/components/tag/tag.vue.d.ts +4 -4
- package/dist/components/textarea/textarea.vue.d.ts +4 -4
- package/dist/components/tooltip/tooltip.vue.d.ts +3 -3
- package/dist/components/tree/tree-virtualizer.vue.d.ts +5 -5
- package/dist/components/tree/tree.vue.d.ts +5 -5
- package/dist/components/tree-menu/tree-menu-option-slot.js +1 -1
- package/dist/components/tree-menu/tree-menu-option.js +1 -1
- package/dist/components/tree-menu/tree-menu-styled-item.js +1 -1
- package/dist/components/tree-menu/tree-menu.js +1 -1
- package/dist/components/tree-menu/types.d.ts +2 -1
- package/dist/components/virtualizer/virtualizer.vue.d.ts +3 -3
- package/dist/styles.css +1 -1
- package/dist/variants/alert.d.ts +3 -3
- package/dist/variants/badge.d.ts +3 -3
- package/dist/variants/button.d.ts +3 -3
- package/dist/variants/checkbox.d.ts +3 -3
- package/dist/variants/kbd.d.ts +3 -3
- package/dist/variants/pagination.d.ts +3 -3
- package/dist/variants/radio-group.d.ts +3 -3
- package/dist/variants/separator.d.ts +3 -3
- package/dist/variants/switch.d.ts +3 -3
- package/dist/variants/tabs.d.ts +3 -3
- package/dist/variants/tag.d.ts +3 -3
- package/dist/variants/textarea.d.ts +3 -3
- package/dist/variants/toast.d.ts +3 -3
- package/package.json +5 -5
|
@@ -2,13 +2,13 @@ import { ThemeColor, ThemeSize } from "../../theme/types.js";
|
|
|
2
2
|
import "../../theme/index.js";
|
|
3
3
|
import { SwitchShape } from "../../variants/switch.js";
|
|
4
4
|
import { SwitchProps } from "./types.js";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as vue288 from "vue";
|
|
6
|
+
import * as _soybeanjs_headless178 from "@soybeanjs/headless";
|
|
7
7
|
import { AcceptableBooleanValue } from "@soybeanjs/headless";
|
|
8
8
|
|
|
9
9
|
//#region src/components/switch/switch.vue.d.ts
|
|
10
10
|
declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__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<{
|
|
11
|
-
props:
|
|
11
|
+
props: vue288.PublicProps & __VLS_PrettifyLocal<SwitchProps<T> & {
|
|
12
12
|
"onUpdate:modelValue"?: ((payload: NonNullable<T>) => any) | undefined;
|
|
13
13
|
}> & (typeof globalThis extends {
|
|
14
14
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -18,13 +18,13 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
18
18
|
slots: {
|
|
19
19
|
leading?: (props: {
|
|
20
20
|
modelValue: (Readonly<{
|
|
21
|
-
class:
|
|
22
|
-
ui: Partial<
|
|
21
|
+
class: _soybeanjs_headless178.ClassValue;
|
|
22
|
+
ui: Partial<_soybeanjs_headless178.SwitchUi>;
|
|
23
23
|
color: ThemeColor;
|
|
24
24
|
size: ThemeSize;
|
|
25
25
|
shape: SwitchShape;
|
|
26
|
-
controlProps:
|
|
27
|
-
thumbProps:
|
|
26
|
+
controlProps: _soybeanjs_headless178.SwitchControlProps;
|
|
27
|
+
thumbProps: _soybeanjs_headless178.SwitchThumbProps;
|
|
28
28
|
defaultValue: NonNullable<T> | undefined;
|
|
29
29
|
disabled: boolean;
|
|
30
30
|
value: string;
|
|
@@ -32,14 +32,14 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
32
32
|
required: boolean;
|
|
33
33
|
manifest: string | undefined;
|
|
34
34
|
innerHTML: string | undefined;
|
|
35
|
-
style:
|
|
35
|
+
style: vue288.StyleValue | undefined;
|
|
36
36
|
accesskey: string | undefined;
|
|
37
37
|
contenteditable: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
38
38
|
contextmenu: string | undefined;
|
|
39
39
|
dir: string | undefined;
|
|
40
40
|
draggable: (boolean | "true" | "false") | undefined;
|
|
41
41
|
enterkeyhint: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
42
|
-
enterKeyHint:
|
|
42
|
+
enterKeyHint: vue288.HTMLAttributes["enterkeyhint"];
|
|
43
43
|
hidden: (boolean | "true" | "false") | "" | "hidden" | "until-found" | undefined;
|
|
44
44
|
id: string | undefined;
|
|
45
45
|
inert: (boolean | "true" | "false") | undefined;
|
|
@@ -220,7 +220,7 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
220
220
|
readonly modelValue: T | undefined;
|
|
221
221
|
readonly trueValue: NonNullable<T> extends infer T_1 ? T_1 extends NonNullable<T> ? T_1 extends undefined ? never : T_1 : never : never;
|
|
222
222
|
readonly falseValue: NonNullable<T> extends infer T_2 ? T_2 extends NonNullable<T> ? T_2 extends undefined ? never : T_2 : never : never;
|
|
223
|
-
} & ("
|
|
223
|
+
} & ("disabled" | "inlist" | "required" | (T | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "modelValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "defaultValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "trueValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "falseValue" : never) extends infer T_3 extends keyof T_4 ? { readonly [K in T_3]-?: K extends "modelValue" | "trueValue" | "falseValue" ? {
|
|
224
224
|
modelValue: undefined;
|
|
225
225
|
trueValue: any;
|
|
226
226
|
falseValue: any;
|
|
@@ -229,13 +229,13 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
229
229
|
} & {
|
|
230
230
|
default?: (props: {
|
|
231
231
|
modelValue: (Readonly<{
|
|
232
|
-
class:
|
|
233
|
-
ui: Partial<
|
|
232
|
+
class: _soybeanjs_headless178.ClassValue;
|
|
233
|
+
ui: Partial<_soybeanjs_headless178.SwitchUi>;
|
|
234
234
|
color: ThemeColor;
|
|
235
235
|
size: ThemeSize;
|
|
236
236
|
shape: SwitchShape;
|
|
237
|
-
controlProps:
|
|
238
|
-
thumbProps:
|
|
237
|
+
controlProps: _soybeanjs_headless178.SwitchControlProps;
|
|
238
|
+
thumbProps: _soybeanjs_headless178.SwitchThumbProps;
|
|
239
239
|
defaultValue: NonNullable<T> | undefined;
|
|
240
240
|
disabled: boolean;
|
|
241
241
|
value: string;
|
|
@@ -243,14 +243,14 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
243
243
|
required: boolean;
|
|
244
244
|
manifest: string | undefined;
|
|
245
245
|
innerHTML: string | undefined;
|
|
246
|
-
style:
|
|
246
|
+
style: vue288.StyleValue | undefined;
|
|
247
247
|
accesskey: string | undefined;
|
|
248
248
|
contenteditable: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
249
249
|
contextmenu: string | undefined;
|
|
250
250
|
dir: string | undefined;
|
|
251
251
|
draggable: (boolean | "true" | "false") | undefined;
|
|
252
252
|
enterkeyhint: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
253
|
-
enterKeyHint:
|
|
253
|
+
enterKeyHint: vue288.HTMLAttributes["enterkeyhint"];
|
|
254
254
|
hidden: (boolean | "true" | "false") | "" | "hidden" | "until-found" | undefined;
|
|
255
255
|
id: string | undefined;
|
|
256
256
|
inert: (boolean | "true" | "false") | undefined;
|
|
@@ -431,7 +431,7 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
431
431
|
readonly modelValue: T | undefined;
|
|
432
432
|
readonly trueValue: NonNullable<T> extends infer T_1 ? T_1 extends NonNullable<T> ? T_1 extends undefined ? never : T_1 : never : never;
|
|
433
433
|
readonly falseValue: NonNullable<T> extends infer T_2 ? T_2 extends NonNullable<T> ? T_2 extends undefined ? never : T_2 : never : never;
|
|
434
|
-
} & ("
|
|
434
|
+
} & ("disabled" | "inlist" | "required" | (T | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "modelValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "defaultValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "trueValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "falseValue" : never) extends infer T_3 extends keyof T_4 ? { readonly [K in T_3]-?: K extends "modelValue" | "trueValue" | "falseValue" ? {
|
|
435
435
|
modelValue: undefined;
|
|
436
436
|
trueValue: any;
|
|
437
437
|
falseValue: any;
|
|
@@ -440,13 +440,13 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
440
440
|
} & {
|
|
441
441
|
trailing?: (props: {
|
|
442
442
|
modelValue: (Readonly<{
|
|
443
|
-
class:
|
|
444
|
-
ui: Partial<
|
|
443
|
+
class: _soybeanjs_headless178.ClassValue;
|
|
444
|
+
ui: Partial<_soybeanjs_headless178.SwitchUi>;
|
|
445
445
|
color: ThemeColor;
|
|
446
446
|
size: ThemeSize;
|
|
447
447
|
shape: SwitchShape;
|
|
448
|
-
controlProps:
|
|
449
|
-
thumbProps:
|
|
448
|
+
controlProps: _soybeanjs_headless178.SwitchControlProps;
|
|
449
|
+
thumbProps: _soybeanjs_headless178.SwitchThumbProps;
|
|
450
450
|
defaultValue: NonNullable<T> | undefined;
|
|
451
451
|
disabled: boolean;
|
|
452
452
|
value: string;
|
|
@@ -454,14 +454,14 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
454
454
|
required: boolean;
|
|
455
455
|
manifest: string | undefined;
|
|
456
456
|
innerHTML: string | undefined;
|
|
457
|
-
style:
|
|
457
|
+
style: vue288.StyleValue | undefined;
|
|
458
458
|
accesskey: string | undefined;
|
|
459
459
|
contenteditable: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
460
460
|
contextmenu: string | undefined;
|
|
461
461
|
dir: string | undefined;
|
|
462
462
|
draggable: (boolean | "true" | "false") | undefined;
|
|
463
463
|
enterkeyhint: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
464
|
-
enterKeyHint:
|
|
464
|
+
enterKeyHint: vue288.HTMLAttributes["enterkeyhint"];
|
|
465
465
|
hidden: (boolean | "true" | "false") | "" | "hidden" | "until-found" | undefined;
|
|
466
466
|
id: string | undefined;
|
|
467
467
|
inert: (boolean | "true" | "false") | undefined;
|
|
@@ -642,7 +642,7 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
642
642
|
readonly modelValue: T | undefined;
|
|
643
643
|
readonly trueValue: NonNullable<T> extends infer T_1 ? T_1 extends NonNullable<T> ? T_1 extends undefined ? never : T_1 : never : never;
|
|
644
644
|
readonly falseValue: NonNullable<T> extends infer T_2 ? T_2 extends NonNullable<T> ? T_2 extends undefined ? never : T_2 : never : never;
|
|
645
|
-
} & ("
|
|
645
|
+
} & ("disabled" | "inlist" | "required" | (T | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "modelValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "defaultValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "trueValue" : never) | (NonNullable<T> | undefined extends boolean | undefined ? (boolean & T) | undefined extends undefined ? never : "falseValue" : never) extends infer T_3 extends keyof T_4 ? { readonly [K in T_3]-?: K extends "modelValue" | "trueValue" | "falseValue" ? {
|
|
646
646
|
modelValue: undefined;
|
|
647
647
|
trueValue: any;
|
|
648
648
|
falseValue: any;
|
|
@@ -650,7 +650,7 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = boolean>(__VLS_p
|
|
|
650
650
|
}) => any;
|
|
651
651
|
};
|
|
652
652
|
emit: (evt: "update:modelValue", payload: NonNullable<T>) => void;
|
|
653
|
-
}>) =>
|
|
653
|
+
}>) => vue288.VNode & {
|
|
654
654
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
655
655
|
};
|
|
656
656
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TabsOptionData, TabsProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue66 from "vue";
|
|
3
3
|
import { AcceptableValue } from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tabs/tabs.vue.d.ts
|
|
6
6
|
declare const __VLS_export: <T extends AcceptableValue = AcceptableValue, S extends TabsOptionData<NonNullable<T>> = TabsOptionData<NonNullable<T>>>(__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:
|
|
7
|
+
props: vue66.PublicProps & __VLS_PrettifyLocal<TabsProps<T, S> & {
|
|
8
8
|
"onUpdate:modelValue"?: ((payload: NonNullable<T>) => any) | undefined;
|
|
9
9
|
}> & (typeof globalThis extends {
|
|
10
10
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -21,7 +21,7 @@ declare const __VLS_export: <T extends AcceptableValue = AcceptableValue, S exte
|
|
|
21
21
|
}) => any;
|
|
22
22
|
};
|
|
23
23
|
emit: (evt: "update:modelValue", payload: NonNullable<T>) => void;
|
|
24
|
-
}>) =>
|
|
24
|
+
}>) => vue66.VNode & {
|
|
25
25
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
26
26
|
};
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue296 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tag/tag.vue.d.ts
|
|
5
5
|
declare var __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {
|
|
@@ -14,13 +14,13 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
} & {
|
|
15
15
|
close?: (props: typeof __VLS_16) => any;
|
|
16
16
|
};
|
|
17
|
-
declare const __VLS_base:
|
|
17
|
+
declare const __VLS_base: vue296.DefineComponent<TagProps, {}, {}, {}, {}, vue296.ComponentOptionsMixin, vue296.ComponentOptionsMixin, {
|
|
18
18
|
"update:open": (open: boolean) => any;
|
|
19
|
-
}, string,
|
|
19
|
+
}, string, vue296.PublicProps, Readonly<TagProps> & Readonly<{
|
|
20
20
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
open: boolean;
|
|
23
|
-
}, {}, {}, {}, string,
|
|
23
|
+
}, {}, {}, {}, string, vue296.ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
25
|
declare const _default: typeof __VLS_export;
|
|
26
26
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextareaProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue68 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/textarea/textarea.vue.d.ts
|
|
5
5
|
declare var __VLS_28: {
|
|
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
} & {
|
|
12
12
|
footer?: (props: typeof __VLS_30) => any;
|
|
13
13
|
};
|
|
14
|
-
declare const __VLS_base:
|
|
14
|
+
declare const __VLS_base: vue68.DefineComponent<TextareaProps, {}, {}, {}, {}, vue68.ComponentOptionsMixin, vue68.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: string) => any;
|
|
16
|
-
}, string,
|
|
16
|
+
}, string, vue68.PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
17
17
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string,
|
|
18
|
+
}>, {}, {}, {}, {}, string, vue68.ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
21
21
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TooltipProps } from "./types.js";
|
|
2
2
|
import * as vue301 from "vue";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _soybeanjs_headless190 from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tooltip/tooltip.vue.d.ts
|
|
6
6
|
declare var __VLS_16: {}, __VLS_36: {};
|
|
@@ -12,11 +12,11 @@ type __VLS_Slots = {} & {
|
|
|
12
12
|
declare const __VLS_base: vue301.DefineComponent<TooltipProps, {}, {}, {}, {}, vue301.ComponentOptionsMixin, vue301.ComponentOptionsMixin, {
|
|
13
13
|
"update:open": (value: boolean) => any;
|
|
14
14
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
15
|
-
pointerDownOutside: (event:
|
|
15
|
+
pointerDownOutside: (event: _soybeanjs_headless190.PointerDownOutsideEvent) => any;
|
|
16
16
|
}, string, vue301.PublicProps, Readonly<TooltipProps> & Readonly<{
|
|
17
17
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
18
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
19
|
-
onPointerDownOutside?: ((event:
|
|
19
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless190.PointerDownOutsideEvent) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
open: boolean;
|
|
22
22
|
defaultOpen: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TreeVirtualizerProps } from "./types.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as vue89 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless43 from "@soybeanjs/headless";
|
|
4
4
|
import { MaybeArray, TreeItemData } from "@soybeanjs/headless";
|
|
5
5
|
import * as _tanstack_vue_virtual0 from "@tanstack/vue-virtual";
|
|
6
6
|
|
|
7
7
|
//#region src/components/tree/tree-virtualizer.vue.d.ts
|
|
8
8
|
declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string> | undefined, M extends boolean>(__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<{
|
|
9
|
-
props:
|
|
9
|
+
props: vue89.PublicProps & __VLS_PrettifyLocal<TreeVirtualizerProps<T, U, M> & {
|
|
10
10
|
"onUpdate:modelValue"?: ((value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => any) | undefined;
|
|
11
11
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
12
12
|
}> & (typeof globalThis extends {
|
|
@@ -18,13 +18,13 @@ declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string
|
|
|
18
18
|
item?: (props: {
|
|
19
19
|
key: number;
|
|
20
20
|
virtualItem: _tanstack_vue_virtual0.VirtualItem;
|
|
21
|
-
item:
|
|
21
|
+
item: _soybeanjs_headless43.FlattenedItem<T>;
|
|
22
22
|
modelValue: U;
|
|
23
23
|
expanded: string[];
|
|
24
24
|
}) => any;
|
|
25
25
|
};
|
|
26
26
|
emit: ((evt: "update:modelValue", value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => void) & ((evt: "update:expanded", value: string[]) => void);
|
|
27
|
-
}>) =>
|
|
27
|
+
}>) => vue89.VNode & {
|
|
28
28
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
29
|
};
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as vue87 from "vue";
|
|
2
|
+
import * as _soybeanjs_headless42 from "@soybeanjs/headless";
|
|
3
3
|
import { MaybeArray, TreeItemData, TreeRootProps } from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tree/tree.vue.d.ts
|
|
6
6
|
declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string> | undefined, M extends boolean>(__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:
|
|
7
|
+
props: vue87.PublicProps & __VLS_PrettifyLocal<TreeRootProps<T, U, M> & {
|
|
8
8
|
"onUpdate:modelValue"?: ((value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => any) | undefined;
|
|
9
9
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
10
10
|
}> & (typeof globalThis extends {
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string
|
|
|
17
17
|
} & {
|
|
18
18
|
item?: (props: {
|
|
19
19
|
key: string;
|
|
20
|
-
item:
|
|
20
|
+
item: _soybeanjs_headless42.FlattenedItem<T>;
|
|
21
21
|
modelValue: U | undefined;
|
|
22
22
|
expanded: string[];
|
|
23
23
|
}) => any;
|
|
@@ -25,7 +25,7 @@ declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string
|
|
|
25
25
|
bottom?: (props: {}) => any;
|
|
26
26
|
};
|
|
27
27
|
emit: ((evt: "update:modelValue", value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => void) & ((evt: "update:expanded", value: string[]) => void);
|
|
28
|
-
}>) =>
|
|
28
|
+
}>) => vue87.VNode & {
|
|
29
29
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
30
30
|
};
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../button/button-icon.js";import t from"../icon/icon.js";import n from"../badge/badge.js";import r from"../dropdown-menu/dropdown-menu.js";import i from"../tag/tag.js";import{useTreeMenuContext as a,useTreeMenuExtraUi as o}from"./context.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createVNode as p,defineComponent as m,mergeProps as h,normalizeClass as g,openBlock as _,renderSlot as v,toDisplayString as y,unref as b,withCtx as x,withModifiers as S}from"vue";import{useTreeMenuRootContext as C}from"@soybeanjs/headless";var w=m({name:`STreeMenuOptionSlot`,__name:`tree-menu-option-slot`,props:{showLinkIcon:{type:Boolean},item:{}},setup(m){let w=m,{collapsed:T}=C(`TreeMenuOptionSlot`),{size:E}=a(`TreeMenuOptionSlot`),D=o(),O=c(()=>!!w.item.children?.length),k=c(()=>({color:`accent`,variant:`raw`,...w.item.tagProps,content:w.item.tag}));return(a,o)=>(_(),d(s,null,[v(a.$slots,`leading`,{item:m.item},()=>[m.item.icon?(_(),l(t,{key:0,icon:m.item.icon},null,8,[`icon`])):u(`v-if`,!0)]),v(a.$slots,`default`,{item:m.item},()=>[m.item.badge?(_(),l(n,h({key:0},m.item.badgeProps,{size:b(E),content:m.item.badge,class:b(D).itemBadge}),{default:x(()=>[f(`span`,{class:g(b(D).itemLabel)},y(m.item.label),3)]),_:1},16,[`size`,`content`,`class`])):(_(),d(`span`,{key:1,class:g(b(D).itemLabel)},y(m.item.label),3))]),m.showLinkIcon?(_(),l(t,{key:0,icon:`lucide:arrow-up-right`,class:g(b(D).itemLinkIcon)},null,8,[`class`])):u(`v-if`,!0),m.item.tag?(_(),l(i,h({key:1},k.value,{size:b(E),content:m.item.tag,class:b(D).itemTag}),null,16,[`size`,`content`,`class`])):u(`v-if`,!0),!b(T)&&m.item.actions?.length?(_(),l(r,h({key:2},m.item.actionMenuProps,{size:b(E),items:m.item.actions,onSelect:m.item.onActionSelect}),{trigger:x(()=>[p(e,{icon:`lucide:ellipsis`,size:b(E),class:g(b(D).itemAction),onClick:o[0]||=S(()=>{},[`stop`])},null,8,[`size`,`class`])]),_:1},16,[`size`,`items`,`onSelect`])):u(`v-if`,!0),v(a.$slots,`trailing`,{item:m.item}),O.value?(_(),l(t,{key:3,icon:`lucide:chevron-right`,class:g(b(D).collapsibleIcon)},null,8,[`class`])):u(`v-if`,!0)],64))}});export{w as default};
|
|
1
|
+
import e from"../button/button-icon.js";import t from"../icon/icon.js";import n from"../badge/badge.js";import r from"../dropdown-menu/dropdown-menu.js";import i from"../tag/tag.js";import{useTreeMenuContext as a,useTreeMenuExtraUi as o}from"./context.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createVNode as p,defineComponent as m,mergeProps as h,normalizeClass as g,openBlock as _,renderSlot as v,toDisplayString as y,unref as b,withCtx as x,withModifiers as S}from"vue";import{useTreeMenuRootContext as C}from"@soybeanjs/headless";var w=m({name:`STreeMenuOptionSlot`,__name:`tree-menu-option-slot`,props:{showLinkIcon:{type:Boolean},as:{},item:{}},setup(m){let w=m,{collapsed:T}=C(`TreeMenuOptionSlot`),{size:E}=a(`TreeMenuOptionSlot`),D=o(),O=c(()=>!!w.item.children?.length),k=c(()=>({color:`accent`,variant:`raw`,...w.item.tagProps,content:w.item.tag}));return(a,o)=>(_(),d(s,null,[v(a.$slots,`leading`,{item:m.item},()=>[m.item.icon?(_(),l(t,{key:0,icon:m.item.icon},null,8,[`icon`])):u(`v-if`,!0)]),v(a.$slots,`default`,{item:m.item},()=>[m.item.badge?(_(),l(n,h({key:0},m.item.badgeProps,{size:b(E),content:m.item.badge,class:b(D).itemBadge}),{default:x(()=>[f(`span`,{class:g(b(D).itemLabel)},y(m.item.label),3)]),_:1},16,[`size`,`content`,`class`])):(_(),d(`span`,{key:1,class:g(b(D).itemLabel)},y(m.item.label),3))]),m.showLinkIcon?(_(),l(t,{key:0,icon:`lucide:arrow-up-right`,class:g(b(D).itemLinkIcon)},null,8,[`class`])):u(`v-if`,!0),m.item.tag?(_(),l(i,h({key:1},k.value,{size:b(E),content:m.item.tag,class:b(D).itemTag}),null,16,[`size`,`content`,`class`])):u(`v-if`,!0),!b(T)&&m.item.actions?.length?(_(),l(r,h({key:2},m.item.actionMenuProps,{size:b(E),items:m.item.actions,onSelect:m.item.onActionSelect}),{trigger:x(()=>[p(e,{icon:`lucide:ellipsis`,size:b(E),class:g(b(D).itemAction),onClick:o[0]||=S(()=>{},[`stop`])},null,8,[`size`,`class`])]),_:1},16,[`size`,`items`,`onSelect`])):u(`v-if`,!0),v(a.$slots,`trailing`,{item:m.item}),O.value?(_(),l(t,{key:3,icon:`lucide:chevron-right`,class:g(b(D).collapsibleIcon)},null,8,[`class`])):u(`v-if`,!0)],64))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../link/link.js";import t from"../dropdown-menu/dropdown-menu.js";import n from"../tooltip/tooltip.js";import{useTreeMenuContext as r,useTreeMenuExtraUi as i}from"./context.js";import a from"./tree-menu-option-slot.js";import{isChildActive as o}from"./shared.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as p,createVNode as m,defineComponent as h,guardReactiveProps as g,mergeProps as _,normalizeClass as v,normalizeProps as y,openBlock as b,renderList as x,renderSlot as S,resolveComponent as C,resolveDynamicComponent as w,unref as T,useSlots as E,withCtx as D}from"vue";import{TreeMenuButton as O,TreeMenuCollapsible as k,TreeMenuItem as A,TreeMenuSub as j,useTreeMenuRootContext as M}from"@soybeanjs/headless";var N=h({name:`STreeMenuOption`,__name:`tree-menu-option`,props:{item:{}},emits:[`selectDropdown`],setup(h,{emit:N}){let P=h,F=N,I=E(),{collapsed:L,modelValue:R,onModelValueChange:z}=M(`TreeMenuOption`),{size:B,side:V}=r(`TreeMenuOption`),H=i(`itemAbsolute`),U=c(()=>Object.keys(I)),W=c(()=>!!P.item.children?.length),G=c(()=>o(P.item,R.value)),K=c(()=>!!(P.item.to||P.item.href)),q=c(()=>{let{disabled:e,to:t,href:n,target:r,external:i}=P.item;return K.value?{disabled:e,to:t,href:n,target:r,external:i}:{}}),J=c(()=>L.value&&W.value),Y=c(()=>L.value&&!J.value?P.item.label:void 0),X=c(()=>V.value===`left`?`right`:`left`),Z=c(()=>({...P.item.tooltipProps,placement:P.item.tooltipProps?.placement??X.value})),Q=c(()=>({...P.item.dropdownMenuProps,trigger:P.item.dropdownMenuProps?.trigger??`hover`,placement:P.item.dropdownMenuProps?.placement??X.value})),$=()=>{P.item.disabled||z(P.item.value)},ee=e=>{P.item.disabled||(z(e.value),F(`selectDropdown`,e.value))};return(r,i)=>{let o=C(`STreeMenuOption`);return W.value?(b(),l(T(A),{key:1,"as-child":``,value:h.item.value,disabled:h.item.disabled},{default:D(()=>[m(T(k),{as
|
|
1
|
+
import e from"../link/link.js";import t from"../dropdown-menu/dropdown-menu.js";import n from"../tooltip/tooltip.js";import{useTreeMenuContext as r,useTreeMenuExtraUi as i}from"./context.js";import a from"./tree-menu-option-slot.js";import{isChildActive as o}from"./shared.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as p,createVNode as m,defineComponent as h,guardReactiveProps as g,mergeProps as _,normalizeClass as v,normalizeProps as y,openBlock as b,renderList as x,renderSlot as S,resolveComponent as C,resolveDynamicComponent as w,unref as T,useSlots as E,withCtx as D}from"vue";import{TreeMenuButton as O,TreeMenuCollapsible as k,TreeMenuItem as A,TreeMenuSub as j,useTreeMenuRootContext as M}from"@soybeanjs/headless";var N=h({name:`STreeMenuOption`,__name:`tree-menu-option`,props:{as:{default:`li`},item:{}},emits:[`selectDropdown`],setup(h,{emit:N}){let P=h,F=N,I=E(),{collapsed:L,modelValue:R,onModelValueChange:z}=M(`TreeMenuOption`),{size:B,side:V}=r(`TreeMenuOption`),H=i(`itemAbsolute`),U=c(()=>Object.keys(I)),W=c(()=>!!P.item.children?.length),G=c(()=>o(P.item,R.value)),K=c(()=>!!(P.item.to||P.item.href)),q=c(()=>{let{disabled:e,to:t,href:n,target:r,external:i}=P.item;return K.value?{disabled:e,to:t,href:n,target:r,external:i}:{}}),J=c(()=>L.value&&W.value),Y=c(()=>L.value&&!J.value?P.item.label:void 0),X=c(()=>V.value===`left`?`right`:`left`),Z=c(()=>({...P.item.tooltipProps,placement:P.item.tooltipProps?.placement??X.value})),Q=c(()=>({...P.item.dropdownMenuProps,trigger:P.item.dropdownMenuProps?.trigger??`hover`,placement:P.item.dropdownMenuProps?.placement??X.value})),$=()=>{P.item.disabled||z(P.item.value)},ee=e=>{P.item.disabled||(z(e.value),F(`selectDropdown`,e.value))};return(r,i)=>{let o=C(`STreeMenuOption`);return W.value?(b(),l(T(A),{key:1,"as-child":``,value:h.item.value,disabled:h.item.disabled},{default:D(()=>[m(T(k),{as:h.as,"disabled-collapsible":T(L)},{trigger:D(()=>[m(T(O),{"disabled-active":``,"data-child-active":G.value},{default:D(()=>[m(a,{item:h.item},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,y(g(t)))])}))]),1032,[`item`])]),_:3},8,[`data-child-active`])]),extra:D(()=>[J.value?(b(),l(t,_({key:0},Q.value,{items:h.item.children??[],disabled:h.item.disabled,size:T(B),"data-menu":h.item.label,onSelect:ee}),{trigger:D(()=>[f(`div`,{class:v(T(H))},null,2)]),_:1},16,[`items`,`disabled`,`size`,`data-menu`])):u(`v-if`,!0)]),default:D(()=>[m(T(j),null,{default:D(()=>[(b(!0),d(s,null,x(h.item.children,e=>(b(),l(o,{key:e.value,item:e},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,_({ref_for:!0},t))])}))]),1032,[`item`]))),128))]),_:3})]),_:3},8,[`as`,`disabled-collapsible`])]),_:3},8,[`value`,`disabled`])):(b(),l(T(A),{key:0,as:h.as,value:h.item.value,disabled:h.item.disabled},{default:D(()=>[K.value?(b(),l(T(O),{key:0,"as-child":``},{default:D(()=>[m(e,y(g(q.value)),{default:D(({isHref:e})=>[m(a,{item:h.item,"show-link-icon":e},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,y(g(t)))])}))]),1032,[`item`,`show-link-icon`])]),_:3},16)]),_:3})):(b(),l(T(O),{key:1},{default:D(()=>[m(a,{item:h.item},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,y(g(t)))])}))]),1032,[`item`])]),_:3})),Y.value?(b(),l(n,_({key:2},Z.value,{size:T(B),content:Y.value}),{trigger:D(()=>[(b(),l(w(K.value?e:`div`),_(q.value,{class:T(H),onClick:$}),null,16,[`class`]))]),_:1},16,[`size`,`content`])):u(`v-if`,!0)]),_:3},8,[`as`,`value`,`disabled`]))}}});export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElementBlock as e,createElementVNode as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";import{useTreeMenuUi as s}from"@soybeanjs/headless";var c=n({name:`STreeMenuStyledItem`,__name:`tree-menu-styled-item`,setup(n){let c=s();return(n,s)=>(i(),e(`
|
|
1
|
+
import{createElementBlock as e,createElementVNode as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";import{useTreeMenuUi as s}from"@soybeanjs/headless";var c=n({name:`STreeMenuStyledItem`,__name:`tree-menu-styled-item`,setup(n){let c=s();return(n,s)=>(i(),e(`div`,{class:r(o(c).item)},[t(`button`,{class:r(o(c).button)},[a(n.$slots,`default`)],2)],2))}});export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import{themeSizeMap as t,themeSizeRatio as n}from"../../theme/config.js";import{treeMenuVariants as r}from"../../variants/tree-menu.js";import{provideTreeMenuContext as i,provideTreeMenuExtraUi as a}from"./context.js";import{isGroupTreeMenu as o,treeMenuCssVars as s}from"./shared.js";import c from"./tree-menu-option.js";import{Fragment as l,computed as u,createBlock as d,createElementBlock as f,createSlots as p,createTextVNode as m,createVNode as h,defineComponent as g,mergeProps as _,openBlock as v,renderList as y,renderSlot as b,toDisplayString as x,toHandlers as S,unref as C,useSlots as w,withCtx as T}from"vue";import{useForwardListeners as E,useOmitProps as D}from"@soybeanjs/headless/composables";import{TreeMenuGroup as O,TreeMenuGroupLabel as k,TreeMenuGroupRoot as A,TreeMenuRoot as j,provideTreeMenuUi as M}from"@soybeanjs/headless";import{transformPropsToContext as N}from"@soybeanjs/headless/shared";var P=g({name:`STreeMenu`,__name:`tree-menu`,props:{class:{},size:{default:`md`},ui:{},side:{default:`left`},items:{},collapsedWidth:{default:50},indent:{default:16},groupRootProps:{},groupProps:{},groupLabelProps:{},buttonProps:{},collapsibleProps:{},subProps:{},modelValue:{},defaultValue:{},expanded:{},defaultExpanded:{},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean}},emits:[`update:modelValue`,`update:expanded`,`update:collapsed`,`selectDropdown`],setup(g,{emit:P}){let F=g,I=P,L=w(),R=u(()=>Object.keys(L).filter(e=>e.startsWith(`item-`))),z=D(F,[`class`,`size`,`side`,`ui`,`items`,`collapsedWidth`,`indent`,`groupRootProps`,`groupProps`,`groupLabelProps`,`buttonProps`,`collapsibleProps`,`subProps`]),B=E(I),V=u(()=>{let e=F.collapsedWidth*n[F.size],r=F.indent*n[F.size];return{[s.collapsedWidth]:`${e/t.md}rem`,[s.indent]:`${r/t.md}rem`}}),H=u(()=>e(r({size:F.size}),F.ui,{root:F.class}));return M(H),a(H),i(N(F,[`size`,`side`])),(e,t)=>(v(),d(C(j),_(C(z),{style:V.value},S(C(B))),{default:T(()=>[b(e.$slots,`top`),(v(!0),f(l,null,y(g.items,t=>(v(),f(l,{key:t.value},[C(o)(t)?(v(),d(C(A),{key:0},{default:T(()=>[h(C(k),null,{default:T(()=>[m(x(t.label),1)]),_:2},1024),h(C(O),null,{default:T(()=>[(v(!0),f(l,null,y(t.children,t=>(v(),d(c,{key:t.value,item:t},p({_:2},[y(R.value,t=>({name:t,fn:T(n=>[b(e.$slots,t,_({ref_for:!0},n))])}))]),1032,[`item`]))),128))]),_:2},1024)]),_:2},1024)):(v(),d(c,{key:1,item:t},p({_:2},[y(R.value,t=>({name:t,fn:T(n=>[b(e.$slots,t,_({ref_for:!0},n))])}))]),1032,[`item`]))],64))),128)),b(e.$slots,`bottom`)]),_:3},16,[`style`]))}});export{P as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{themeSizeMap as t,themeSizeRatio as n}from"../../theme/config.js";import{treeMenuVariants as r}from"../../variants/tree-menu.js";import{provideTreeMenuContext as i,provideTreeMenuExtraUi as a}from"./context.js";import{isGroupTreeMenu as o,treeMenuCssVars as s}from"./shared.js";import c from"./tree-menu-option.js";import{Fragment as l,computed as u,createBlock as d,createElementBlock as f,createSlots as p,createTextVNode as m,createVNode as h,defineComponent as g,mergeProps as _,openBlock as v,renderList as y,renderSlot as b,toDisplayString as x,toHandlers as S,unref as C,useSlots as w,withCtx as T}from"vue";import{useForwardListeners as E,useOmitProps as D}from"@soybeanjs/headless/composables";import{TreeMenuGroup as O,TreeMenuGroupLabel as k,TreeMenuGroupRoot as A,TreeMenuRoot as j,provideTreeMenuUi as M}from"@soybeanjs/headless";import{transformPropsToContext as N}from"@soybeanjs/headless/shared";var P=g({name:`STreeMenu`,__name:`tree-menu`,props:{class:{},size:{default:`md`},ui:{},side:{default:`left`},items:{},collapsedWidth:{default:50},indent:{default:16},groupRootProps:{},groupProps:{},groupLabelProps:{},buttonProps:{},collapsibleProps:{},subProps:{},modelValue:{},defaultValue:{},expanded:{},defaultExpanded:{},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean}},emits:[`update:modelValue`,`update:expanded`,`update:collapsed`,`selectDropdown`],setup(g,{emit:P}){let F=g,I=P,L=w(),R=u(()=>Object.keys(L).filter(e=>e.startsWith(`item-`))),z=D(F,[`class`,`size`,`side`,`ui`,`items`,`collapsedWidth`,`indent`,`groupRootProps`,`groupProps`,`groupLabelProps`,`buttonProps`,`collapsibleProps`,`subProps`]),B=E(I),V=u(()=>{let e=F.collapsedWidth*n[F.size],r=F.indent*n[F.size];return{[s.collapsedWidth]:`${e/t.md}rem`,[s.indent]:`${r/t.md}rem`}}),H=u(()=>e(r({size:F.size}),F.ui,{root:F.class}));return M(H),a(H),i(N(F,[`size`,`side`])),(e,t)=>(v(),d(C(j),_(C(z),{style:V.value},S(C(B))),{default:T(()=>[b(e.$slots,`top`),(v(!0),f(l,null,y(g.items,t=>(v(),f(l,{key:t.value},[C(o)(t)?(v(),d(C(A),{key:0},{default:T(()=>[h(C(k),null,{default:T(()=>[m(x(t.label),1)]),_:2},1024),h(C(O),null,{default:T(()=>[(v(!0),f(l,null,y(t.children,t=>(v(),d(c,{key:t.value,item:t},p({_:2},[y(R.value,t=>({name:t,fn:T(n=>[b(e.$slots,t,_({ref_for:!0},n))])}))]),1032,[`item`]))),128))]),_:2},1024)]),_:2},1024)):(v(),d(c,{key:1,as:`div`,item:t},p({_:2},[y(R.value,t=>({name:t,fn:T(n=>[b(e.$slots,t,_({ref_for:!0},n))])}))]),1032,[`item`]))],64))),128)),b(e.$slots,`bottom`)]),_:3},16,[`style`]))}});export{P as default};
|
|
@@ -6,7 +6,7 @@ import { MenuOptionData } from "../menu/types.js";
|
|
|
6
6
|
import { DropdownMenuProps } from "../dropdown-menu/types.js";
|
|
7
7
|
import { TagProps as TagProps$1 } from "../tag/types.js";
|
|
8
8
|
import { TooltipProps } from "../tooltip/types.js";
|
|
9
|
-
import { ClassValue, HorizontalSide, LinkBaseProps, PropsToContext, TreeMenuBaseItemProps, TreeMenuButtonProps, TreeMenuCollapsibleProps, TreeMenuGroupLabelProps, TreeMenuGroupProps, TreeMenuGroupRootProps, TreeMenuRootEmits, TreeMenuRootProps, TreeMenuSubProps, TreeMenuUiSlot, UiClass } from "@soybeanjs/headless";
|
|
9
|
+
import { AsTag, ClassValue, HorizontalSide, LinkBaseProps, PropsToContext, TreeMenuBaseItemProps, TreeMenuButtonProps, TreeMenuCollapsibleProps, TreeMenuGroupLabelProps, TreeMenuGroupProps, TreeMenuGroupRootProps, TreeMenuRootEmits, TreeMenuRootProps, TreeMenuSubProps, TreeMenuUiSlot, UiClass } from "@soybeanjs/headless";
|
|
10
10
|
|
|
11
11
|
//#region src/components/tree-menu/types.d.ts
|
|
12
12
|
interface TreeMenuBaseOptionData extends TreeMenuBaseItemProps, LinkBaseProps {
|
|
@@ -67,6 +67,7 @@ interface TreeMenuGroupOptionData {
|
|
|
67
67
|
}
|
|
68
68
|
type TreeMenuOptionData = TreeMenuBaseOptionData | TreeMenuGroupOptionData;
|
|
69
69
|
interface TreeMenuOptionProps {
|
|
70
|
+
as?: AsTag;
|
|
70
71
|
item: TreeMenuBaseOptionData;
|
|
71
72
|
}
|
|
72
73
|
type TreeMenuExtraUiSlot = 'itemLabel' | 'itemAbsolute' | 'itemBadge' | 'itemTag' | 'itemAction' | 'itemLinkIcon' | 'collapsibleIcon';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { VirtualizerProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue91 from "vue";
|
|
3
3
|
import * as _tanstack_vue_virtual0 from "@tanstack/vue-virtual";
|
|
4
4
|
|
|
5
5
|
//#region src/components/virtualizer/virtualizer.vue.d.ts
|
|
6
6
|
declare const __VLS_export: <T extends Record<string, any>>(__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:
|
|
7
|
+
props: vue91.PublicProps & __VLS_PrettifyLocal<VirtualizerProps<T>> & (typeof globalThis extends {
|
|
8
8
|
__VLS_PROPS_FALLBACK: infer P;
|
|
9
9
|
} ? P : {});
|
|
10
10
|
expose: (exposed: {}) => void;
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNull
|
|
|
17
17
|
}) => any;
|
|
18
18
|
};
|
|
19
19
|
emit: {};
|
|
20
|
-
}>) =>
|
|
20
|
+
}>) => vue91.VNode & {
|
|
21
21
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
22
|
};
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
package/dist/styles.css
CHANGED
|
@@ -1407,7 +1407,7 @@ body {
|
|
|
1407
1407
|
.md\:ml-0{margin-left:0;}
|
|
1408
1408
|
.md\:block{display:block;}
|
|
1409
1409
|
.md\:max-w-105{max-width:26.25rem;}
|
|
1410
|
-
.md\:max-w-
|
|
1410
|
+
.md\:max-w-270\!{max-width:67.5rem !important;}
|
|
1411
1411
|
.md\:w-auto{width:auto;}
|
|
1412
1412
|
.md\:w-full{width:100%;}
|
|
1413
1413
|
.md\:flex{display:flex;}
|
package/dist/variants/alert.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants15 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/alert.d.ts
|
|
5
|
-
declare const alertVariants:
|
|
5
|
+
declare const alertVariants: tailwind_variants15.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: {
|
|
8
8
|
root: string;
|
|
@@ -196,7 +196,7 @@ declare const alertVariants: tailwind_variants13.TVReturnType<{
|
|
|
196
196
|
title: string;
|
|
197
197
|
description: string;
|
|
198
198
|
close: string;
|
|
199
|
-
},
|
|
199
|
+
}, tailwind_variants15.TVReturnType<{
|
|
200
200
|
color: {
|
|
201
201
|
primary: {
|
|
202
202
|
root: string;
|
package/dist/variants/badge.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants17 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/badge.d.ts
|
|
5
|
-
declare const badgeVariants:
|
|
5
|
+
declare const badgeVariants: tailwind_variants17.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: {
|
|
8
8
|
content: string;
|
|
@@ -130,7 +130,7 @@ declare const badgeVariants: tailwind_variants3.TVReturnType<{
|
|
|
130
130
|
}, {
|
|
131
131
|
root: string;
|
|
132
132
|
content: string;
|
|
133
|
-
},
|
|
133
|
+
}, tailwind_variants17.TVReturnType<{
|
|
134
134
|
color: {
|
|
135
135
|
primary: {
|
|
136
136
|
content: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants19 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/button.d.ts
|
|
5
|
-
declare const buttonVariants:
|
|
5
|
+
declare const buttonVariants: tailwind_variants19.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: string;
|
|
8
8
|
destructive: string;
|
|
@@ -92,7 +92,7 @@ declare const buttonVariants: tailwind_variants0.TVReturnType<{
|
|
|
92
92
|
true: string;
|
|
93
93
|
false: string;
|
|
94
94
|
};
|
|
95
|
-
}, undefined,
|
|
95
|
+
}, undefined, tailwind_variants19.TVReturnType<{
|
|
96
96
|
color: {
|
|
97
97
|
primary: string;
|
|
98
98
|
destructive: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants23 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/checkbox.d.ts
|
|
5
|
-
declare const checkboxVariants:
|
|
5
|
+
declare const checkboxVariants: tailwind_variants23.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: {
|
|
8
8
|
control: string;
|
|
@@ -164,7 +164,7 @@ declare const checkboxVariants: tailwind_variants5.TVReturnType<{
|
|
|
164
164
|
control: string[];
|
|
165
165
|
indicator: string;
|
|
166
166
|
label: string;
|
|
167
|
-
},
|
|
167
|
+
}, tailwind_variants23.TVReturnType<{
|
|
168
168
|
color: {
|
|
169
169
|
primary: {
|
|
170
170
|
control: string;
|
package/dist/variants/kbd.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants1 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/kbd.d.ts
|
|
5
|
-
declare const kbdVariants:
|
|
5
|
+
declare const kbdVariants: tailwind_variants1.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
solid: string;
|
|
8
8
|
outline: string;
|
|
@@ -30,7 +30,7 @@ declare const kbdVariants: tailwind_variants9.TVReturnType<{
|
|
|
30
30
|
xl: string;
|
|
31
31
|
'2xl': string;
|
|
32
32
|
};
|
|
33
|
-
}, undefined,
|
|
33
|
+
}, undefined, tailwind_variants1.TVReturnType<{
|
|
34
34
|
variant: {
|
|
35
35
|
solid: string;
|
|
36
36
|
outline: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/pagination.d.ts
|
|
5
|
-
declare const paginationVariants:
|
|
5
|
+
declare const paginationVariants: tailwind_variants0.TVReturnType<{
|
|
6
6
|
size: {
|
|
7
7
|
xs: {
|
|
8
8
|
list: string;
|
|
@@ -150,7 +150,7 @@ declare const paginationVariants: tailwind_variants11.TVReturnType<{
|
|
|
150
150
|
ellipsis: string;
|
|
151
151
|
button: string[];
|
|
152
152
|
navigationButton: string[];
|
|
153
|
-
},
|
|
153
|
+
}, tailwind_variants0.TVReturnType<{
|
|
154
154
|
size: {
|
|
155
155
|
xs: {
|
|
156
156
|
list: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants3 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/radio-group.d.ts
|
|
5
|
-
declare const radioGroupVariants:
|
|
5
|
+
declare const radioGroupVariants: tailwind_variants3.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: {
|
|
8
8
|
control: string;
|
|
@@ -180,7 +180,7 @@ declare const radioGroupVariants: tailwind_variants15.TVReturnType<{
|
|
|
180
180
|
control: string[];
|
|
181
181
|
indicator: string;
|
|
182
182
|
label: string;
|
|
183
|
-
},
|
|
183
|
+
}, tailwind_variants3.TVReturnType<{
|
|
184
184
|
color: {
|
|
185
185
|
primary: {
|
|
186
186
|
control: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants27 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/separator.d.ts
|
|
5
|
-
declare const separatorVariants:
|
|
5
|
+
declare const separatorVariants: tailwind_variants27.TVReturnType<{
|
|
6
6
|
size: {
|
|
7
7
|
xs: {
|
|
8
8
|
label: string;
|
|
@@ -114,7 +114,7 @@ declare const separatorVariants: tailwind_variants23.TVReturnType<{
|
|
|
114
114
|
}, {
|
|
115
115
|
root: string;
|
|
116
116
|
label: string;
|
|
117
|
-
},
|
|
117
|
+
}, tailwind_variants27.TVReturnType<{
|
|
118
118
|
size: {
|
|
119
119
|
xs: {
|
|
120
120
|
label: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants29 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/variants/switch.d.ts
|
|
5
|
-
declare const switchVariants:
|
|
5
|
+
declare const switchVariants: tailwind_variants29.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: {
|
|
8
8
|
control: string;
|
|
@@ -136,7 +136,7 @@ declare const switchVariants: tailwind_variants31.TVReturnType<{
|
|
|
136
136
|
root: string;
|
|
137
137
|
control: string[];
|
|
138
138
|
thumb: string;
|
|
139
|
-
},
|
|
139
|
+
}, tailwind_variants29.TVReturnType<{
|
|
140
140
|
color: {
|
|
141
141
|
primary: {
|
|
142
142
|
control: string;
|