@soybeanjs/ui 0.18.0 → 0.19.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/components/accordion/accordion.js +1 -1
- package/dist/components/affix/affix.js +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/alert.vue.d.ts +2 -0
- package/dist/components/anchor/anchor.js +1 -1
- package/dist/components/autocomplete/autocomplete.js +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/backtop/backtop.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.js +1 -1
- package/dist/components/bottom-sheet/variants.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/button/variants.js +1 -1
- package/dist/components/calendar/calendar.js +1 -1
- package/dist/components/calendar-range/calendar-range.js +1 -0
- package/dist/components/{range-calendar/range-calendar.vue.d.ts → calendar-range/calendar-range.vue.d.ts} +5 -5
- package/dist/components/calendar-range/index.d.ts +3 -0
- package/dist/components/calendar-range/index.js +1 -0
- package/dist/components/calendar-range/types.d.ts +32 -0
- package/dist/components/calendar-range/variants.js +1 -0
- package/dist/components/card/card-collapsible-trigger.js +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/carousel/carousel.js +1 -1
- package/dist/components/checkbox/checkbox-card-group.js +1 -1
- package/dist/components/checkbox/checkbox-card.js +1 -1
- package/dist/components/checkbox/checkbox-group.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/collapsible/collapsible.js +1 -1
- package/dist/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/components/color-area/color-area.js +1 -1
- package/dist/components/color-area/color-area.vue.d.ts +5 -5
- package/dist/components/color-area/types.d.ts +3 -11
- package/dist/components/color-field/color-field.js +1 -1
- package/dist/components/color-field/color-field.vue.d.ts +3 -3
- package/dist/components/color-field/types.d.ts +3 -7
- package/dist/components/color-field/variants.js +1 -1
- package/dist/components/color-picker/color-picker.js +1 -1
- package/dist/components/color-picker/color-picker.vue.d.ts +21 -36
- package/dist/components/color-picker/index.d.ts +1 -1
- package/dist/components/color-picker/types.d.ts +6 -118
- package/dist/components/color-picker/variants.js +1 -1
- package/dist/components/color-slider/color-slider.js +1 -1
- package/dist/components/color-slider/color-slider.vue.d.ts +5 -5
- package/dist/components/color-slider/types.d.ts +3 -11
- package/dist/components/color-swatch/color-swatch.js +1 -1
- package/dist/components/color-swatch/color-swatch.vue.d.ts +2 -5
- package/dist/components/color-swatch/index.d.ts +3 -2
- package/dist/components/color-swatch/types.d.ts +9 -13
- package/dist/components/color-swatch-picker/color-swatch-picker.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.vue.d.ts +6 -6
- package/dist/components/color-swatch-picker/types.d.ts +3 -19
- package/dist/components/color-swatch-picker/variants.d.ts +9 -9
- package/dist/components/color-swatch-picker/variants.js +1 -1
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/command/command.js +1 -1
- package/dist/components/command/command.vue.d.ts +1 -1
- package/dist/components/config-provider/config-provider.js +1 -1
- package/dist/components/config-provider/types.d.ts +2 -4
- package/dist/components/context-menu/context-menu-checkbox.vue.d.ts +1 -1
- package/dist/components/context-menu/context-menu-radio.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu.vue.d.ts +1 -1
- package/dist/components/date-field/date-field.js +1 -1
- package/dist/components/date-field/date-field.vue.d.ts +4 -4
- package/dist/components/date-field/variants.js +1 -1
- package/dist/components/date-picker/date-picker.js +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +17 -11
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-picker/types.d.ts +7 -6
- package/dist/components/date-picker/variants.js +1 -1
- package/dist/components/date-range-field/date-range-field.js +1 -1
- package/dist/components/date-range-field/date-range-field.vue.d.ts +1 -3
- package/dist/components/date-range-field/index.d.ts +1 -1
- package/dist/components/date-range-field/types.d.ts +5 -49
- package/dist/components/date-range-field/variants.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +20 -14
- package/dist/components/date-range-picker/index.d.ts +1 -1
- package/dist/components/date-range-picker/types.d.ts +7 -39
- package/dist/components/dialog/dialog-provider.js +1 -1
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/dialog/dialog.vue.d.ts +2 -0
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio.vue.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu.vue.d.ts +1 -1
- package/dist/components/editable/editable.js +1 -1
- package/dist/components/editable/editable.vue.d.ts +6 -6
- package/dist/components/empty/empty.js +1 -1
- package/dist/components/form/form-field-array.js +1 -1
- package/dist/components/form/form-field-base.js +1 -1
- package/dist/components/form/form-field.js +1 -1
- package/dist/components/form/form.js +1 -1
- package/dist/components/hover-card/hover-card.js +1 -1
- package/dist/components/icon/types.d.ts +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/input/variants.js +1 -1
- package/dist/components/input-number/index.d.ts +1 -1
- package/dist/components/input-number/input-number.js +1 -1
- package/dist/components/input-number/input-number.vue.d.ts +6 -13
- package/dist/components/input-number/types.d.ts +8 -24
- package/dist/components/input-number/variants.js +1 -1
- package/dist/components/input-otp/input-otp.js +1 -1
- package/dist/components/input-otp/input-otp.vue.d.ts +2 -2
- package/dist/components/layout/layout-classic.js +1 -1
- package/dist/components/layout/layout.js +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/index.d.ts +1 -8
- package/dist/components/menubar/menubar.js +1 -1
- package/dist/components/menubar/menubar.vue.d.ts +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +1 -1
- package/dist/components/page-tabs/index.d.ts +1 -1
- package/dist/components/page-tabs/page-tabs.js +1 -1
- package/dist/components/page-tabs/page-tabs.vue.d.ts +6 -4
- package/dist/components/page-tabs/types.d.ts +10 -117
- package/dist/components/page-tabs/variants.js +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/password/index.d.ts +3 -2
- package/dist/components/password/password.js +1 -1
- package/dist/components/password/password.vue.d.ts +2 -12
- package/dist/components/password/types.d.ts +8 -25
- package/dist/components/popconfirm/index.d.ts +3 -5
- package/dist/components/popconfirm/index.js +1 -1
- package/dist/components/popconfirm/popconfirm.js +1 -1
- package/dist/components/popconfirm/popconfirm.vue.d.ts +6 -27
- package/dist/components/popconfirm/types.d.ts +8 -209
- package/dist/components/popconfirm/variants.js +1 -1
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/popover/popover.vue.d.ts +2 -9
- package/dist/components/popover/types.d.ts +9 -37
- package/dist/components/popover/variants.js +1 -1
- package/dist/components/progress/index.d.ts +11 -3
- package/dist/components/progress/progress-circle.js +1 -1
- package/dist/components/progress/progress-circle.vue.d.ts +2 -10
- package/dist/components/progress/progress-provider.js +1 -1
- package/dist/components/progress/progress-provider.vue.d.ts +1 -1
- package/dist/components/progress/progress.js +1 -1
- package/dist/components/progress/progress.vue.d.ts +2 -11
- package/dist/components/progress/types.d.ts +16 -16
- package/dist/components/progress/variants.js +1 -1
- package/dist/components/radio-group/radio-card-group.js +1 -1
- package/dist/components/radio-group/radio-card-group.vue.d.ts +3 -2
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area.js +1 -1
- package/dist/components/scroll-area/scroll-area.vue.d.ts +2 -2
- package/dist/components/scroll-area/types.d.ts +3 -23
- package/dist/components/segment/segment.js +1 -1
- package/dist/components/segment/segment.vue.d.ts +2 -2
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.vue.d.ts +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/separator/separator.vue.d.ts +11 -1
- package/dist/components/separator/types.d.ts +2 -10
- package/dist/components/separator/variants.js +1 -1
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slider/slider.vue.d.ts +6 -7
- package/dist/components/slider/types.d.ts +3 -15
- package/dist/components/splitter/splitter-group.js +1 -1
- package/dist/components/splitter/splitter-panel.js +1 -1
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/splitter/splitter-resize-handle.js +1 -1
- package/dist/components/stepper/stepper.js +1 -1
- package/dist/components/stepper/stepper.vue.d.ts +5 -5
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/switch.vue.d.ts +2 -638
- package/dist/components/switch/types.d.ts +8 -12
- package/dist/components/switch/variants.d.ts +2 -2
- package/dist/components/switch/variants.js +1 -1
- package/dist/components/table/hooks.d.ts +3 -3
- package/dist/components/table/table-filter-popover.js +1 -1
- package/dist/components/table/table.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +2 -2
- package/dist/components/tags-input/index.d.ts +3 -4
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/tags-input.js +1 -1
- package/dist/components/tags-input/tags-input.vue.d.ts +18 -22
- package/dist/components/tags-input/types.d.ts +8 -4
- package/dist/components/tags-input/variants.js +1 -1
- package/dist/components/textarea/index.d.ts +4 -2
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/textarea/textarea.vue.d.ts +4 -10
- package/dist/components/textarea/types.d.ts +9 -28
- package/dist/components/textarea/variants.d.ts +21 -21
- package/dist/components/textarea/variants.js +1 -1
- package/dist/components/time-field/index.d.ts +1 -1
- package/dist/components/time-field/time-field.js +1 -1
- package/dist/components/time-field/time-field.vue.d.ts +2 -9
- package/dist/components/time-field/types.d.ts +4 -37
- package/dist/components/time-range-field/index.d.ts +1 -1
- package/dist/components/time-range-field/time-range-field.js +1 -1
- package/dist/components/time-range-field/time-range-field.vue.d.ts +1 -3
- package/dist/components/time-range-field/types.d.ts +5 -49
- package/dist/components/toast/styles.js +36 -36
- package/dist/components/toast/toast-provider.js +1 -1
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-group/index.d.ts +3 -2
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/toggle-group.js +1 -1
- package/dist/components/toolbar/toolbar.js +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tooltip/tooltip.vue.d.ts +2 -7
- package/dist/components/tooltip/types.d.ts +9 -37
- package/dist/components/tree/tree-virtualizer.vue.d.ts +1 -1
- package/dist/components/tree/tree.vue.d.ts +2 -2
- package/dist/components/tree-menu/index.d.ts +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/tree-menu.vue.d.ts +3 -17
- package/dist/components/tree-menu/types.d.ts +12 -204
- package/dist/components/tree-menu/variants.js +1 -1
- package/dist/constants/components.d.ts +1 -7
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +135 -152
- package/dist/index.js +1 -1
- package/dist/styles.css +35 -43
- package/dist/theme/shared.js +1 -1
- package/package.json +8 -8
- package/dist/components/color-picker/shared.js +0 -1
- package/dist/components/date-range-picker/variants.js +0 -1
- package/dist/components/month-picker/index.d.ts +0 -3
- package/dist/components/month-picker/index.js +0 -1
- package/dist/components/month-picker/month-picker.js +0 -1
- package/dist/components/month-picker/month-picker.vue.d.ts +0 -24
- package/dist/components/month-picker/types.d.ts +0 -86
- package/dist/components/month-picker/variants.js +0 -1
- package/dist/components/month-range-picker/index.d.ts +0 -3
- package/dist/components/month-range-picker/index.js +0 -1
- package/dist/components/month-range-picker/month-range-picker.js +0 -1
- package/dist/components/month-range-picker/month-range-picker.vue.d.ts +0 -29
- package/dist/components/month-range-picker/types.d.ts +0 -89
- package/dist/components/month-range-picker/variants.js +0 -1
- package/dist/components/page-tabs/hooks.js +0 -1
- package/dist/components/popconfirm/context.js +0 -1
- package/dist/components/popconfirm/popconfirm-cancel.js +0 -1
- package/dist/components/popconfirm/popconfirm-cancel.vue.d.ts +0 -25
- package/dist/components/popconfirm/popconfirm-confirm.js +0 -1
- package/dist/components/popconfirm/popconfirm-confirm.vue.d.ts +0 -22
- package/dist/components/range-calendar/index.d.ts +0 -3
- package/dist/components/range-calendar/index.js +0 -1
- package/dist/components/range-calendar/range-calendar.js +0 -1
- package/dist/components/range-calendar/types.d.ts +0 -188
- package/dist/components/range-calendar/variants.js +0 -1
- package/dist/components/tags-input/tags-input-item-delete.js +0 -1
- package/dist/components/tags-input/tags-input-item-delete.vue.d.ts +0 -18
- package/dist/components/time-field/variants.js +0 -1
- package/dist/components/time-picker/index.d.ts +0 -3
- package/dist/components/time-picker/index.js +0 -1
- package/dist/components/time-picker/time-picker.js +0 -1
- package/dist/components/time-picker/time-picker.vue.d.ts +0 -24
- package/dist/components/time-picker/types.d.ts +0 -68
- package/dist/components/time-picker/variants.js +0 -1
- package/dist/components/time-range-field/variants.js +0 -1
- package/dist/components/time-range-picker/index.d.ts +0 -3
- package/dist/components/time-range-picker/index.js +0 -1
- package/dist/components/time-range-picker/time-range-picker.js +0 -1
- package/dist/components/time-range-picker/time-range-picker.vue.d.ts +0 -28
- package/dist/components/time-range-picker/types.d.ts +0 -71
- package/dist/components/time-range-picker/variants.js +0 -1
- package/dist/components/toggle-group/toggle-group-item.js +0 -1
- package/dist/components/toggle-group/toggle-group-item.vue.d.ts +0 -22
- package/dist/components/tree-menu/context.js +0 -1
- package/dist/components/tree-menu/shared.js +0 -1
- package/dist/components/tree-menu/tree-menu-option-slot.js +0 -1
- package/dist/components/tree-menu/tree-menu-option.js +0 -1
- package/dist/components/tree-menu/tree-menu-options.js +0 -1
- package/dist/components/year-picker/index.d.ts +0 -3
- package/dist/components/year-picker/index.js +0 -1
- package/dist/components/year-picker/types.d.ts +0 -86
- package/dist/components/year-picker/variants.js +0 -1
- package/dist/components/year-picker/year-picker.js +0 -1
- package/dist/components/year-picker/year-picker.vue.d.ts +0 -24
- package/dist/components/year-range-picker/index.d.ts +0 -3
- package/dist/components/year-range-picker/index.js +0 -1
- package/dist/components/year-range-picker/types.d.ts +0 -90
- package/dist/components/year-range-picker/variants.js +0 -1
- package/dist/components/year-range-picker/year-range-picker.js +0 -1
- package/dist/components/year-range-picker/year-range-picker.vue.d.ts +0 -29
|
@@ -1,177 +1,12 @@
|
|
|
1
1
|
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DropdownMenuProps } from "../dropdown-menu/types.js";
|
|
5
|
-
import { index_d_exports } from "../menu/index.js";
|
|
6
|
-
import { TagProps } from "../tag/types.js";
|
|
7
|
-
import { TooltipProps } from "../tooltip/types.js";
|
|
8
|
-
import { ComputedRef, HTMLAttributes } from "vue";
|
|
9
|
-
import { AsTag } from "@soybeanjs/headless/primitive";
|
|
10
|
-
import { LinkBaseProps, LinkProps } from "@soybeanjs/headless/link";
|
|
11
|
-
import { TreeMenuBaseItemProps, TreeMenuButtonProps, TreeMenuCollapsibleProps, TreeMenuGroupLabelProps, TreeMenuGroupProps, TreeMenuGroupRootProps, TreeMenuItemProps, TreeMenuRootEmits, TreeMenuRootProps, TreeMenuSubProps, TreeMenuUiSlot } from "@soybeanjs/headless/tree-menu";
|
|
12
|
-
import { ClassValue, HorizontalSide, PropsToContext, UiClass } from "@soybeanjs/headless/types";
|
|
2
|
+
import { TreeMenuBaseOptionData, TreeMenuCompactEmits, TreeMenuCompactProps, TreeMenuCompactSlots, TreeMenuUiSlot } from "@soybeanjs/headless/tree-menu";
|
|
3
|
+
import { BaseProps, ClassValue } from "@soybeanjs/headless/types";
|
|
13
4
|
|
|
14
5
|
//#region src/components/tree-menu/types.d.ts
|
|
15
|
-
/**
|
|
16
|
-
* Option data for the TreeMenuBase component.
|
|
17
|
-
*/
|
|
18
|
-
interface TreeMenuBaseOptionData extends TreeMenuBaseItemProps, LinkBaseProps {
|
|
19
|
-
/**
|
|
20
|
-
* Whether the option is a group. only the first-level options can be groups.
|
|
21
|
-
*/
|
|
22
|
-
isGroup?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The label of the option.
|
|
25
|
-
*/
|
|
26
|
-
label: string;
|
|
27
|
-
/**
|
|
28
|
-
* The icon of the option.
|
|
29
|
-
*/
|
|
30
|
-
icon?: IconValue;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the option is hidden.
|
|
33
|
-
*/
|
|
34
|
-
hidden?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* The badge of the option.
|
|
37
|
-
*/
|
|
38
|
-
badge?: string;
|
|
39
|
-
/**
|
|
40
|
-
* The badge props of the option.
|
|
41
|
-
*/
|
|
42
|
-
badgeProps?: Omit<BadgeProps, 'content'>;
|
|
43
|
-
/**
|
|
44
|
-
* The tag of the option.
|
|
45
|
-
*/
|
|
46
|
-
tag?: string;
|
|
47
|
-
/**
|
|
48
|
-
* The tag props of the option.
|
|
49
|
-
*/
|
|
50
|
-
tagProps?: Omit<TagProps, 'content'>;
|
|
51
|
-
/**
|
|
52
|
-
* The tooltip props of the option.
|
|
53
|
-
*/
|
|
54
|
-
tooltipProps?: TooltipProps;
|
|
55
|
-
/**
|
|
56
|
-
* The dropdown menu props of the option.
|
|
57
|
-
*/
|
|
58
|
-
dropdownMenuProps?: Omit<DropdownMenuProps, 'items'>;
|
|
59
|
-
/**
|
|
60
|
-
* The actions of the option.
|
|
61
|
-
*/
|
|
62
|
-
actions?: index_d_exports.MenuOptionData[];
|
|
63
|
-
/**
|
|
64
|
-
* The action menu props of the option.
|
|
65
|
-
*/
|
|
66
|
-
actionMenuProps?: Omit<DropdownMenuProps, 'items'>;
|
|
67
|
-
/**
|
|
68
|
-
* The callback function when an action is selected.
|
|
69
|
-
*/
|
|
70
|
-
onActionSelect?: (action: index_d_exports.MenuOptionData) => void;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Option data for the TreeMenu component.
|
|
74
|
-
*/
|
|
75
|
-
type TreeMenuOptionData<T extends TreeMenuBaseOptionData = TreeMenuBaseOptionData> = T & {
|
|
76
|
-
/**
|
|
77
|
-
* The children of the option.
|
|
78
|
-
*/
|
|
79
|
-
children?: TreeMenuOptionData<T>[];
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Slot properties for the TreeMenuOption component.
|
|
83
|
-
*/
|
|
84
|
-
interface TreeMenuOptionSlotProps extends TreeMenuOptionProps {
|
|
85
|
-
/**
|
|
86
|
-
* Whether to show the link icon.
|
|
87
|
-
*/
|
|
88
|
-
showLinkIcon?: boolean;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Properties for the TreeMenuOption component.
|
|
92
|
-
*/
|
|
93
|
-
interface TreeMenuOptionProps {
|
|
94
|
-
/**
|
|
95
|
-
* Rendered element tag.
|
|
96
|
-
*/
|
|
97
|
-
as?: AsTag;
|
|
98
|
-
/**
|
|
99
|
-
* Current item data.
|
|
100
|
-
*/
|
|
101
|
-
item: TreeMenuOptionData;
|
|
102
|
-
/**
|
|
103
|
-
* Properties forwarded to the item element.
|
|
104
|
-
*/
|
|
105
|
-
itemProps?: TreeMenuItemProps;
|
|
106
|
-
/**
|
|
107
|
-
* Properties forwarded to the button element.
|
|
108
|
-
*/
|
|
109
|
-
buttonProps?: TreeMenuButtonProps;
|
|
110
|
-
/**
|
|
111
|
-
* Properties forwarded to the link element.
|
|
112
|
-
*/
|
|
113
|
-
linkProps?: LinkProps;
|
|
114
|
-
/**
|
|
115
|
-
* Properties forwarded to the collapsible element.
|
|
116
|
-
*/
|
|
117
|
-
collapsibleProps?: TreeMenuCollapsibleProps;
|
|
118
|
-
/**
|
|
119
|
-
* Properties forwarded to the sub element.
|
|
120
|
-
*/
|
|
121
|
-
subProps?: TreeMenuSubProps;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Events for the TreeMenuOption component.
|
|
125
|
-
*/
|
|
126
|
-
type TreeMenuOptionEmits = {
|
|
127
|
-
/**
|
|
128
|
-
* Emitted when select dropdown occurs.
|
|
129
|
-
*/
|
|
130
|
-
selectDropdown: [value: string];
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Properties for the TreeMenuOptions component.
|
|
134
|
-
*/
|
|
135
|
-
interface TreeMenuOptionsProps<T extends TreeMenuBaseOptionData = TreeMenuBaseOptionData> extends Omit<TreeMenuOptionProps, 'as' | 'item'> {
|
|
136
|
-
/**
|
|
137
|
-
* Items rendered by the component.
|
|
138
|
-
*/
|
|
139
|
-
items: TreeMenuOptionData<T>[];
|
|
140
|
-
/**
|
|
141
|
-
* Properties forwarded to the group root element.
|
|
142
|
-
*/
|
|
143
|
-
groupRootProps?: TreeMenuGroupRootProps;
|
|
144
|
-
/**
|
|
145
|
-
* Properties forwarded to the group element.
|
|
146
|
-
*/
|
|
147
|
-
groupProps?: TreeMenuGroupProps;
|
|
148
|
-
/**
|
|
149
|
-
* Properties forwarded to the group label element.
|
|
150
|
-
*/
|
|
151
|
-
groupLabelProps?: TreeMenuGroupLabelProps;
|
|
152
|
-
/**
|
|
153
|
-
* Whether to show the group icon.
|
|
154
|
-
*
|
|
155
|
-
* @default false
|
|
156
|
-
*/
|
|
157
|
-
showGroupIcon?: boolean;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Events for the TreeMenuOptions component.
|
|
161
|
-
*/
|
|
162
|
-
type TreeMenuOptionsEmits = TreeMenuOptionEmits;
|
|
163
|
-
/**
|
|
164
|
-
* Additional UI slots for the tree menu component.
|
|
165
|
-
*/
|
|
166
|
-
type TreeMenuExtraUiSlot = 'itemLabel' | 'itemAbsolute' | 'itemBadge' | 'itemTag' | 'itemAction' | 'itemLinkIcon' | 'collapsibleIcon';
|
|
167
|
-
/**
|
|
168
|
-
* Extended UI class overrides for the TreeMenu component.
|
|
169
|
-
*/
|
|
170
|
-
type TreeMenuExtendedUi = UiClass<TreeMenuUiSlot | TreeMenuExtraUiSlot>;
|
|
171
6
|
/**
|
|
172
7
|
* Properties for the TreeMenu component.
|
|
173
8
|
*/
|
|
174
|
-
interface TreeMenuProps<T extends TreeMenuBaseOptionData = TreeMenuBaseOptionData> extends
|
|
9
|
+
interface TreeMenuProps<T extends TreeMenuBaseOptionData = TreeMenuBaseOptionData> extends TreeMenuCompactProps<T> {
|
|
175
10
|
/**
|
|
176
11
|
* Additional class names applied to the root element.
|
|
177
12
|
*/
|
|
@@ -183,34 +18,20 @@ interface TreeMenuProps<T extends TreeMenuBaseOptionData = TreeMenuBaseOptionDat
|
|
|
183
18
|
/**
|
|
184
19
|
* Per-slot class overrides for the component.
|
|
185
20
|
*/
|
|
186
|
-
ui?: Partial<
|
|
187
|
-
/**
|
|
188
|
-
* The side of the tree menu.
|
|
189
|
-
*
|
|
190
|
-
* @default 'left'
|
|
191
|
-
*/
|
|
192
|
-
side?: HorizontalSide;
|
|
193
|
-
/**
|
|
194
|
-
* The width of the sidebar menu when it's collapsed.
|
|
195
|
-
*
|
|
196
|
-
* @default 50
|
|
197
|
-
*/
|
|
198
|
-
collapsedWidth?: number;
|
|
199
|
-
/**
|
|
200
|
-
* The width of the indent.
|
|
201
|
-
*
|
|
202
|
-
* @default 16
|
|
203
|
-
*/
|
|
204
|
-
indent?: number;
|
|
21
|
+
ui?: Partial<Record<TreeMenuUiSlot, ClassValue>>;
|
|
205
22
|
}
|
|
206
23
|
/**
|
|
207
24
|
* Events for the TreeMenu component.
|
|
208
25
|
*/
|
|
209
|
-
type TreeMenuEmits =
|
|
26
|
+
type TreeMenuEmits = TreeMenuCompactEmits;
|
|
27
|
+
/**
|
|
28
|
+
* Slots for the TreeMenu component.
|
|
29
|
+
*/
|
|
30
|
+
type TreeMenuSlots<T extends TreeMenuBaseOptionData = TreeMenuBaseOptionData> = TreeMenuCompactSlots<T>;
|
|
210
31
|
/**
|
|
211
32
|
* Properties for the TreeMenuStyledItem component.
|
|
212
33
|
*/
|
|
213
|
-
interface TreeMenuStyledItemProps extends
|
|
34
|
+
interface TreeMenuStyledItemProps extends BaseProps {
|
|
214
35
|
/**
|
|
215
36
|
* Additional class names applied to the root element.
|
|
216
37
|
*/
|
|
@@ -222,20 +43,7 @@ interface TreeMenuStyledItemProps extends /** @vue-ignore */HTMLAttributes {
|
|
|
222
43
|
/**
|
|
223
44
|
* Per-slot class overrides for the component.
|
|
224
45
|
*/
|
|
225
|
-
ui?: Partial<
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Context for the TreeMenu component.
|
|
229
|
-
*/
|
|
230
|
-
interface TreeMenuContext extends PropsToContext<TreeMenuProps, 'size' | 'side'> {}
|
|
231
|
-
/**
|
|
232
|
-
* Context for the TreeMenuOptions component.
|
|
233
|
-
*/
|
|
234
|
-
interface TreeMenuOptionsContext {
|
|
235
|
-
/**
|
|
236
|
-
* Active paths tracked by the component context.
|
|
237
|
-
*/
|
|
238
|
-
activePaths: ComputedRef<string[]>;
|
|
46
|
+
ui?: Partial<Record<'button' | 'item', ClassValue>>;
|
|
239
47
|
}
|
|
240
48
|
//#endregion
|
|
241
|
-
export {
|
|
49
|
+
export { TreeMenuEmits, TreeMenuProps, TreeMenuSlots, TreeMenuStyledItemProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`group flex-1 flex flex-col w-full h-full overflow-auto data-[state=collapsed]:w-[--soybean-tree-menu-collapsed-width] transition-[width,height]-200 ease-out`,groupRoot:`group-data-[state=collapsed]:mb-0`,group:`flex flex-col m-0 p-0 list-none`,groupLabel:`flex items-center text-foreground/70 group-data-[state=collapsed]:size-0 group-data-[state=collapsed]:p-0 group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:overflow-hidden transition-[height,padding,opacity]-200`,item:`relative m-0 p-0 group-data-[state=collapsed]:hover:bg-sidebar-accent group-data-[state=collapsed]:hover:rounded-sm`,button:[`group/button relative flex items-center w-full rounded-sm outline-none cursor-pointer select-none group-data-[state=collapsed]:overflow-hidden`,`data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,`data-[active=false]:hover:bg-sidebar-accent data-[active=false]:focus:bg-sidebar-accent`,`data-[child-active]:text-primary`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],collapsibleRoot:``,collapsibleTrigger:``,collapsibleContent:[`overflow-hidden transition will-change-auto`,`data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`],collapsibleIcon:`shrink-0 ml-auto text-muted-foreground transition-transform-200 group-data-[state=open]/button:rotate-90 group-data-[child-active]/button:text-primary`,sub:`flex flex-col m-0 list-none ml-[--soybean-tree-menu-indent] border-l border-sidebar-border border-solid`,itemLabel:`truncate`,itemLinkIcon:`shrink-0 self-start text-muted-foreground`,itemBadge:``,itemTag:`shrink-0 ml-auto`,itemAction
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`group flex-1 flex flex-col w-full h-full overflow-auto data-[state=collapsed]:w-[--soybean-tree-menu-collapsed-width] transition-[width,height]-200 ease-out`,groupRoot:`group-data-[state=collapsed]:mb-0`,group:`flex flex-col m-0 p-0 list-none`,groupLabel:`flex items-center text-foreground/70 group-data-[state=collapsed]:size-0 group-data-[state=collapsed]:p-0 group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:overflow-hidden transition-[height,padding,opacity]-200`,item:`relative m-0 p-0 group-data-[state=collapsed]:hover:bg-sidebar-accent group-data-[state=collapsed]:hover:rounded-sm`,button:[`group/button relative flex items-center w-full rounded-sm outline-none cursor-pointer select-none group-data-[state=collapsed]:overflow-hidden`,`data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,`data-[active=false]:hover:bg-sidebar-accent data-[active=false]:focus:bg-sidebar-accent`,`data-[child-active]:text-primary`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],collapsibleRoot:``,collapsibleTrigger:``,collapsibleContent:[`overflow-hidden transition will-change-auto`,`data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`],collapsibleIcon:`shrink-0 ml-auto text-muted-foreground transition-transform-200 group-data-[state=open]/button:rotate-90 group-data-[child-active]/button:text-primary`,sub:`flex flex-col m-0 list-none ml-[--soybean-tree-menu-indent] border-l border-sidebar-border border-solid`,itemLabel:`truncate`,itemLinkIcon:`shrink-0 self-start text-muted-foreground`,itemBadge:``,itemTag:`shrink-0 ml-auto inline-flex items-center rounded-sm bg-accent/15 text-accent-foreground`,itemAction:[`absolute end-0 top-1/2 -translate-y-1/2 z-2 inline-flex items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors`,`focus-visible:bg-sidebar-accent focus-visible:text-foreground focus-visible:ring-3 focus-visible:ring-accent-foreground/20`,`disabled:pointer-events-none disabled:opacity-50`],itemAbsolute:`absolute inset-0 z-1 cursor-pointer`},variants:{size:{xs:{root:`gap-0.875 p-1.5 text-2xs`,groupRoot:`mb-0.875`,groupLabel:`h-6 gap-1 px-1.5 py-1 text-3xs`,group:`gap-0.875`,button:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,sub:`gap-0.875 pl-1.5 pt-0.875`,subButton:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,itemLinkIcon:`size-2 -ml-1`,itemTag:`min-h-3.5 px-1 text-4xs`,itemAction:`end-1 size-4 text-2xs`},sm:{root:`gap-1 p-1.75 text-xs`,groupRoot:`mb-1`,groupLabel:`h-7 gap-1.5 px-1.75 py-1 text-2xs`,group:`gap-1`,button:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,sub:`gap-1 pl-1.75 pt-1`,subButton:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,itemLinkIcon:`size-2.5 -ml-1.5`,itemTag:`min-h-4 px-1.25 text-3xs`,itemAction:`end-1.25 size-4.5 text-xs`},md:{root:`gap-1.25 p-2 text-sm`,groupRoot:`mb-1.25`,groupLabel:`h-8 gap-2 px-2 py-1.5 text-xs`,group:`gap-1.25`,button:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,sub:`gap-1.25 pl-2 pt-1.25`,subButton:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,itemLinkIcon:`size-3 -ml-2`,itemTag:`min-h-4.5 px-1.5 text-2xs`,itemAction:`end-1.5 size-5 text-sm`},lg:{root:`gap-1.5 p-2.25 text-base`,groupRoot:`mb-1.5`,groupLabel:`h-9 gap-2.5 px-2.25 py-1.5 text-sm`,group:`gap-1.5`,button:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,sub:`gap-1.5 pl-2.25 pt-1.5`,subButton:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,itemLinkIcon:`size-3.5 -ml-2.5`,itemTag:`min-h-5 px-1.75 text-xs`,itemAction:`end-1.75 size-5.5 text-base`},xl:{root:`gap-2 p-2.5 text-lg`,groupRoot:`mb-2`,groupLabel:`h-10 gap-3 px-2.5 py-2 text-base`,group:`gap-2`,button:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,sub:`gap-2 pl-2.5 pt-2`,subButton:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,itemLinkIcon:`size-4 -ml-3`,itemTag:`min-h-5.5 px-2 text-sm`,itemAction:`end-2 size-6 text-lg`},"2xl":{root:`gap-2.5 p-3 text-xl`,groupRoot:`mb-2.5`,groupLabel:`h-12 gap-3.5 px-3 py-2.5 text-lg`,group:`gap-2.5`,button:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,sub:`gap-2.5 pl-3 pt-2.5`,subButton:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,itemLinkIcon:`size-5 -ml-4`,itemTag:`min-h-6 px-2.5 text-base`,itemAction:`end-2.5 size-7 text-xl`}}},defaultVariants:{size:`md`}});export{t as treeMenuVariants};
|
|
@@ -14,6 +14,7 @@ declare const components: {
|
|
|
14
14
|
breadcrumb: string[];
|
|
15
15
|
button: string[];
|
|
16
16
|
calendar: string[];
|
|
17
|
+
calendarRange: string[];
|
|
17
18
|
card: string[];
|
|
18
19
|
carousel: string[];
|
|
19
20
|
checkbox: string[];
|
|
@@ -51,8 +52,6 @@ declare const components: {
|
|
|
51
52
|
list: string[];
|
|
52
53
|
menu: string[];
|
|
53
54
|
menubar: string[];
|
|
54
|
-
monthPicker: string[];
|
|
55
|
-
monthRangePicker: string[];
|
|
56
55
|
navigationMenu: string[];
|
|
57
56
|
pageTabs: string[];
|
|
58
57
|
pagination: string[];
|
|
@@ -61,7 +60,6 @@ declare const components: {
|
|
|
61
60
|
popover: string[];
|
|
62
61
|
progress: string[];
|
|
63
62
|
radioGroup: string[];
|
|
64
|
-
rangeCalendar: string[];
|
|
65
63
|
scrollArea: string[];
|
|
66
64
|
segment: string[];
|
|
67
65
|
select: string[];
|
|
@@ -78,9 +76,7 @@ declare const components: {
|
|
|
78
76
|
tagsInput: string[];
|
|
79
77
|
textarea: string[];
|
|
80
78
|
timeField: string[];
|
|
81
|
-
timePicker: string[];
|
|
82
79
|
timeRangeField: string[];
|
|
83
|
-
timeRangePicker: string[];
|
|
84
80
|
toast: string[];
|
|
85
81
|
toggle: string[];
|
|
86
82
|
toggleGroup: string[];
|
|
@@ -89,8 +85,6 @@ declare const components: {
|
|
|
89
85
|
tree: string[];
|
|
90
86
|
treeMenu: string[];
|
|
91
87
|
virtualizer: string[];
|
|
92
|
-
yearPicker: string[];
|
|
93
|
-
yearRangePicker: string[];
|
|
94
88
|
};
|
|
95
89
|
//#endregion
|
|
96
90
|
export { components };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={accordion:[`SAccordion`],affix:[`SAffix`],alert:[`SAlert`],anchor:[`SAnchor`],arrow:[`SArrow`],aspectRatio:[`SAspectRatio`],autocomplete:[`SAutocomplete`],avatar:[`SAvatar`],backtop:[`SBacktop`],badge:[`SBadge`],bottomSheet:[`SBottomSheet`],breadcrumb:[`SBreadcrumb`,`SBreadcrumbPage`,`SBreadcrumbEllipsis`],button:[`SButton`,`SButtonLoading`,`SButtonIcon`,`SButtonLink`,`SButtonGroup`],calendar:[`SCalendar`],card:[`SCard`,`SCardCollapsibleTrigger`],carousel:[`SCarousel`],checkbox:[`SCheckboxGroup`,`SCheckbox`,`SCheckboxCardGroup`,`SCheckboxCard`],clipboard:[`SClipboard`],collapsible:[`SCollapsible`,`SCollapsibleTrigger`,`SCollapsibleContent`],colorArea:[`SColorArea`],colorField:[`SColorField`],colorPicker:[`SColorPicker`],colorSlider:[`SColorSlider`],colorSwatch:[`SColorSwatch`],colorSwatchPicker:[`SColorSwatchPicker`],combobox:[`SCombobox`],command:[`SCommand`],configProvider:[`SConfigProvider`],contextMenu:[`SContextMenu`,`SContextMenuCheckbox`,`SContextMenuRadio`,`SContextMenuWrapper`],dateField:[`SDateField`],datePicker:[`SDatePicker`],dateRangeField:[`SDateRangeField`],dateRangePicker:[`SDateRangePicker`],dialog:[`SDialog`,`SDialogProvider`],drawer:[`SDrawer`],dropdownMenu:[`SDropdownMenu`,`SDropdownMenuCheckbox`,`SDropdownMenuRadio`,`SDropdownMenuWrapper`],editable:[`SEditable`],empty:[`SEmpty`],form:[`SForm`,`SFormFieldBase`],hoverCard:[`SHoverCard`],icon:[`SIcon`],input:[`SInput`,`SInputClear`],inputNumber:[`SInputNumber`],inputOtp:[`SInputOtp`],kbd:[`SKbd`],label:[`SLabel`],layout:[`SLayout`,`SLayoutClassic`,`SLayoutTrigger`],link:[`SLink`],list:[`SList`,`SListItem`],menu:[`SMenuOptions`,`SMenuCheckboxOptions`,`SMenuRadioOptions`],menubar:[`SMenubar`],
|
|
1
|
+
const e={accordion:[`SAccordion`],affix:[`SAffix`],alert:[`SAlert`],anchor:[`SAnchor`],arrow:[`SArrow`],aspectRatio:[`SAspectRatio`],autocomplete:[`SAutocomplete`],avatar:[`SAvatar`],backtop:[`SBacktop`],badge:[`SBadge`],bottomSheet:[`SBottomSheet`],breadcrumb:[`SBreadcrumb`,`SBreadcrumbPage`,`SBreadcrumbEllipsis`],button:[`SButton`,`SButtonLoading`,`SButtonIcon`,`SButtonLink`,`SButtonGroup`],calendar:[`SCalendar`],calendarRange:[`SCalendarRange`],card:[`SCard`,`SCardCollapsibleTrigger`],carousel:[`SCarousel`],checkbox:[`SCheckboxGroup`,`SCheckbox`,`SCheckboxCardGroup`,`SCheckboxCard`],clipboard:[`SClipboard`],collapsible:[`SCollapsible`,`SCollapsibleTrigger`,`SCollapsibleContent`],colorArea:[`SColorArea`],colorField:[`SColorField`],colorPicker:[`SColorPicker`],colorSlider:[`SColorSlider`],colorSwatch:[`SColorSwatch`],colorSwatchPicker:[`SColorSwatchPicker`],combobox:[`SCombobox`],command:[`SCommand`],configProvider:[`SConfigProvider`],contextMenu:[`SContextMenu`,`SContextMenuCheckbox`,`SContextMenuRadio`,`SContextMenuWrapper`],dateField:[`SDateField`],datePicker:[`SDatePicker`],dateRangeField:[`SDateRangeField`],dateRangePicker:[`SDateRangePicker`],dialog:[`SDialog`,`SDialogProvider`],drawer:[`SDrawer`],dropdownMenu:[`SDropdownMenu`,`SDropdownMenuCheckbox`,`SDropdownMenuRadio`,`SDropdownMenuWrapper`],editable:[`SEditable`],empty:[`SEmpty`],form:[`SForm`,`SFormFieldBase`],hoverCard:[`SHoverCard`],icon:[`SIcon`],input:[`SInput`,`SInputClear`],inputNumber:[`SInputNumber`],inputOtp:[`SInputOtp`],kbd:[`SKbd`],label:[`SLabel`],layout:[`SLayout`,`SLayoutClassic`,`SLayoutTrigger`],link:[`SLink`],list:[`SList`,`SListItem`],menu:[`SMenuOptions`,`SMenuCheckboxOptions`,`SMenuRadioOptions`],menubar:[`SMenubar`],navigationMenu:[`SNavigationMenu`],pageTabs:[`SPageTabs`],pagination:[`SPagination`],password:[`SPassword`],popconfirm:[`SPopconfirm`,`SPopconfirmConfirm`,`SPopconfirmCancel`],popover:[`SPopover`],progress:[`SProgressProvider`,`SProgress`,`SProgressCircle`],radioGroup:[`SRadioGroup`,`SRadio`,`SRadioCard`,`SRadioCardGroup`],scrollArea:[`SScrollArea`],segment:[`SSegment`],select:[`SSelect`],separator:[`SSeparator`],skeleton:[`SSkeleton`],slider:[`SSlider`],spinner:[`SSpinner`],splitter:[`SSplitterGroup`,`SSplitterPanel`,`SSplitterResizeHandle`],stepper:[`SStepper`],switch:[`SSwitch`],table:[`STable`,`STableRow`,`STableCell`],tabs:[`STabs`],tag:[`STag`],tagsInput:[`STagsInput`,`STagsInputItemText`,`STagsInputItemDelete`],textarea:[`STextarea`,`STextareaClear`],timeField:[`STimeField`],timeRangeField:[`STimeRangeField`],toast:[`SToastProvider`],toggle:[`SToggle`],toggleGroup:[`SToggleGroup`,`SToggleGroupItem`],toolbar:[`SToolbar`,`SToolbarButton`,`SToolbarLink`,`SToolbarSeparator`,`SToolbarToggleGroup`,`SToolbarToggleItem`],tooltip:[`STooltip`],tree:[`STree`,`STreeVirtualizer`,`STreeItem`,`STreeVirtualizerItem`],treeMenu:[`STreeMenu`,`STreeMenuStyledItem`],virtualizer:[`SVirtualizer`,`SVirtualizerItem`]};export{e as components};
|