@soybeanjs/headless 0.16.0 → 0.17.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/_icon/types.d.ts +9 -0
- package/dist/components/accordion/types.d.ts +87 -0
- package/dist/components/affix/types.d.ts +39 -0
- package/dist/components/alert/types.d.ts +78 -0
- package/dist/components/anchor/anchor-compact.js +1 -1
- package/dist/components/anchor/{anchor-compact-item.js → anchor-item-compact.js} +1 -1
- package/dist/components/anchor/anchor-item-compact.vue.d.ts +8 -0
- package/dist/components/anchor/anchor-link.js +1 -1
- package/dist/components/anchor/anchor-root.vue.d.ts +1 -1
- package/dist/components/anchor/index.d.ts +5 -4
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/anchor/types.d.ts +122 -10
- package/dist/components/arrow/types.d.ts +3 -0
- package/dist/components/aspect-ratio/types.d.ts +3 -0
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
- package/dist/components/autocomplete/types.d.ts +141 -0
- package/dist/components/avatar/types.d.ts +18 -0
- package/dist/components/backtop/backtop.vue.d.ts +9 -3
- package/dist/components/backtop/index.d.ts +2 -2
- package/dist/components/backtop/types.d.ts +19 -12
- package/dist/components/badge/types.d.ts +21 -0
- package/dist/components/bottom-sheet/bottom-sheet-compact.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +2 -2
- package/dist/components/bottom-sheet/bottom-sheet-root.js +1 -1
- package/dist/components/bottom-sheet/types.d.ts +99 -0
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/types.d.ts +103 -1
- package/dist/components/button/types.d.ts +16 -1
- package/dist/components/calendar/calendar-root.js +1 -1
- package/dist/components/calendar/types.d.ts +363 -0
- package/dist/components/card/types.d.ts +90 -0
- package/dist/components/carousel/types.d.ts +42 -0
- package/dist/components/checkbox/types.d.ts +111 -0
- package/dist/components/clipboard/types.d.ts +42 -0
- package/dist/components/collapsible/types.d.ts +18 -0
- package/dist/components/color-area/color-area-root.vue.d.ts +1 -1
- package/dist/components/color-area/types.d.ts +60 -0
- package/dist/components/color-field/color-field-root.vue.d.ts +2 -2
- package/dist/components/color-field/types.d.ts +51 -0
- package/dist/components/color-picker/color-picker-root.vue.d.ts +1 -1
- package/dist/components/color-picker/types.d.ts +39 -0
- package/dist/components/color-slider/color-slider-root.vue.d.ts +1 -1
- package/dist/components/color-slider/types.d.ts +60 -0
- package/dist/components/color-swatch/types.d.ts +9 -0
- package/dist/components/color-swatch-picker/types.d.ts +27 -0
- package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/components/combobox/types.d.ts +237 -0
- package/dist/components/command/types.d.ts +147 -0
- package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
- package/dist/components/config-provider/types.d.ts +3 -0
- package/dist/components/context-menu/context-menu-checkbox-compact.js +1 -1
- package/dist/components/context-menu/context-menu-compact.js +1 -1
- package/dist/components/context-menu/context-menu-radio-compact.js +1 -1
- package/dist/components/context-menu/context-menu-root.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.js +1 -1
- package/dist/components/context-menu/types.d.ts +78 -0
- package/dist/components/date-field/date-field-root.vue.d.ts +2 -2
- package/dist/components/date-field/types.d.ts +147 -0
- package/dist/components/date-picker/context.js +1 -1
- package/dist/components/date-picker/date-picker-compact.js +1 -0
- package/dist/components/date-picker/date-picker-compact.vue.d.ts +27 -0
- package/dist/components/date-picker/date-picker-content.js +1 -0
- package/dist/components/date-picker/date-picker-content.vue.d.ts +33 -0
- package/dist/components/date-picker/date-picker-root.js +1 -1
- package/dist/components/date-picker/date-picker-root.vue.d.ts +9 -14
- package/dist/components/date-picker/index.d.ts +8 -5
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/types.d.ts +236 -10
- package/dist/components/date-range-field/date-range-field-root.vue.d.ts +2 -2
- package/dist/components/date-range-field/types.d.ts +192 -0
- package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +2 -2
- package/dist/components/date-range-picker/date-range-picker-root.vue.d.ts +7 -7
- package/dist/components/date-range-picker/types.d.ts +189 -0
- package/dist/components/dialog/dialog-compact.js +1 -1
- package/dist/components/dialog/dialog-compact.vue.d.ts +5 -5
- package/dist/components/dialog/dialog-root.js +1 -1
- package/dist/components/dialog/types.d.ts +196 -2
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +84 -0
- package/dist/components/editable/types.d.ts +123 -0
- package/dist/components/empty/types.d.ts +24 -0
- package/dist/components/form/core/types.d.ts +396 -13
- package/dist/components/form/types.d.ts +27 -0
- package/dist/components/hover-card/hover-card-positioner-impl.js +1 -1
- package/dist/components/hover-card/types.d.ts +57 -0
- package/dist/components/input/types.d.ts +21 -0
- package/dist/components/input-number/types.d.ts +30 -0
- package/dist/components/input-otp/index.d.ts +1 -2
- package/dist/components/input-otp/index.js +1 -1
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +4 -4
- package/dist/components/input-otp/input-otp-root.vue.d.ts +5 -5
- package/dist/components/input-otp/types.d.ts +186 -0
- package/dist/components/kbd/types.d.ts +6 -0
- package/dist/components/label/types.d.ts +3 -0
- package/dist/components/layout/layout-root.vue.d.ts +1 -1
- package/dist/components/layout/types.d.ts +124 -10
- package/dist/components/link/types.d.ts +12 -0
- package/dist/components/list/types.d.ts +21 -0
- package/dist/components/listbox/types.d.ts +66 -0
- package/dist/components/menu/menu-option-compact.js +1 -1
- package/dist/components/menu/menu-options-compact.js +1 -1
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/types.d.ts +266 -2
- package/dist/components/menubar/menubar-compact.js +1 -1
- package/dist/components/menubar/types.d.ts +72 -0
- package/dist/components/month-picker/month-picker-root.vue.d.ts +4 -4
- package/dist/components/month-picker/types.d.ts +141 -0
- package/dist/components/month-range-picker/month-range-picker-root.vue.d.ts +4 -4
- package/dist/components/month-range-picker/types.d.ts +165 -0
- package/dist/components/navigation-menu/types.d.ts +87 -0
- package/dist/components/page-tabs/types.d.ts +24 -0
- package/dist/components/pagination/types.d.ts +96 -0
- package/dist/components/popover/context.d.ts +9 -0
- package/dist/components/popover/context.js +1 -1
- package/dist/components/popover/index.d.ts +6 -6
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-compact.js +1 -1
- package/dist/components/popover/popover-root.js +1 -1
- package/dist/components/popover/popover-root.vue.d.ts +0 -2
- package/dist/components/popover/popover-trigger.js +1 -1
- package/dist/components/popover/types.d.ts +94 -6
- package/dist/components/popper/popper-positioner.vue.d.ts +2 -2
- package/dist/components/popper/types.d.ts +21 -0
- package/dist/components/portal/types.d.ts +3 -0
- package/dist/components/primitive/types.d.ts +6 -0
- package/dist/components/progress/types.d.ts +81 -0
- package/dist/components/radio-group/types.d.ts +66 -0
- package/dist/components/range-calendar/range-calendar-root.vue.d.ts +2 -2
- package/dist/components/range-calendar/types.d.ts +330 -0
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +1 -1
- package/dist/components/roving-focus/types.d.ts +18 -0
- package/dist/components/scroll-area/types.d.ts +33 -0
- package/dist/components/segment/types.d.ts +36 -0
- package/dist/components/select/select-content.vue.d.ts +1 -1
- package/dist/components/select/types.d.ts +240 -0
- package/dist/components/separator/types.d.ts +12 -0
- package/dist/components/skeleton/types.d.ts +3 -0
- package/dist/components/slider/slider-root.vue.d.ts +1 -1
- package/dist/components/slider/types.d.ts +90 -0
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/splitter/types.d.ts +114 -0
- package/dist/components/stepper/stepper-root.vue.d.ts +1 -1
- package/dist/components/stepper/types.d.ts +96 -0
- package/dist/components/switch/types.d.ts +21 -0
- package/dist/components/table/types.d.ts +819 -0
- package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +75 -0
- package/dist/components/tag/types.d.ts +12 -0
- package/dist/components/tags-input/tags-input-root.vue.d.ts +2 -2
- package/dist/components/tags-input/types.d.ts +63 -0
- package/dist/components/textarea/types.d.ts +27 -0
- package/dist/components/time-field/time-field-root.vue.d.ts +1 -1
- package/dist/components/time-field/types.d.ts +138 -0
- package/dist/components/time-picker/time-picker-root.vue.d.ts +6 -6
- package/dist/components/time-picker/types.d.ts +156 -0
- package/dist/components/time-range-field/time-range-field-root.vue.d.ts +2 -2
- package/dist/components/time-range-field/types.d.ts +192 -0
- package/dist/components/time-range-picker/time-range-picker-compact.vue.d.ts +2 -2
- package/dist/components/time-range-picker/time-range-picker-root.vue.d.ts +6 -6
- package/dist/components/time-range-picker/types.d.ts +201 -0
- package/dist/components/toast/toaster.vue.d.ts +2 -2
- package/dist/components/toast/types.d.ts +224 -4
- package/dist/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/components/toggle/types.d.ts +9 -0
- package/dist/components/toggle-group/types.d.ts +15 -0
- package/dist/components/toolbar/types.d.ts +48 -0
- package/dist/components/tooltip/types.d.ts +27 -0
- package/dist/components/tree/types.d.ts +75 -0
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/components/tree-menu/types.d.ts +60 -0
- package/dist/components/virtualizer/types.d.ts +33 -0
- package/dist/components/visually-hidden/types.d.ts +30 -0
- package/dist/components/year-picker/types.d.ts +144 -0
- package/dist/components/year-picker/year-picker-root.vue.d.ts +4 -4
- package/dist/components/year-range-picker/types.d.ts +168 -0
- package/dist/components/year-range-picker/year-range-picker-root.vue.d.ts +4 -4
- package/dist/composables/use-collection.js +1 -1
- package/dist/constants/components.d.ts +5 -5
- package/dist/constants/components.js +1 -1
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.js +1 -1
- package/dist/{components/input-otp → constants}/regexp.d.ts +1 -1
- package/dist/date/parts.d.ts +1 -1
- package/dist/index.d.ts +418 -417
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +877 -872
- package/dist/namespaced/index.js +1 -1
- package/dist/node_modules/.pnpm/@soybeanjs_utils@0.1.1/node_modules/@soybeanjs/utils/dist/index.js +1 -1
- package/dist/resolver/index.js +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/shared/string.d.ts +1 -34
- package/dist/shared/string.js +1 -1
- package/dist/types/common.d.ts +9 -1
- package/dist/types/dom.d.ts +3 -1
- package/dist/types/event.d.ts +10 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.js +0 -0
- package/dist/types/vue.d.ts +4 -1
- package/package.json +6 -1
- package/dist/components/date-picker/date-picker-popup.js +0 -1
- package/dist/components/date-picker/date-picker-popup.vue.d.ts +0 -21
- package/dist/components/date-picker/date-picker-trigger.js +0 -1
- package/dist/components/date-picker/date-picker-trigger.vue.d.ts +0 -21
- /package/dist/{components/input-otp → constants}/regexp.js +0 -0
|
@@ -3,6 +3,9 @@ import { HTMLAttributes } from "vue";
|
|
|
3
3
|
import { RouteLocationRaw } from "vue-router";
|
|
4
4
|
|
|
5
5
|
//#region src/components/link/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Props for the link component.
|
|
8
|
+
*/
|
|
6
9
|
interface LinkProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {
|
|
7
10
|
/**
|
|
8
11
|
* Route Location the link should navigate to when clicked on.
|
|
@@ -85,8 +88,17 @@ interface LinkProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {
|
|
|
85
88
|
*/
|
|
86
89
|
trailingSlash?: 'append' | 'remove';
|
|
87
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Type information for the link base props key component.
|
|
93
|
+
*/
|
|
88
94
|
type LinkBasePropsKey = Extract<keyof LinkProps, 'to' | 'href' | 'external' | 'target'>;
|
|
95
|
+
/**
|
|
96
|
+
* Props for the link base component.
|
|
97
|
+
*/
|
|
89
98
|
interface LinkBaseProps extends Pick<LinkProps, LinkBasePropsKey> {}
|
|
99
|
+
/**
|
|
100
|
+
* Props for the link extra component.
|
|
101
|
+
*/
|
|
90
102
|
interface LinkExtraProps extends Omit<LinkProps, LinkBasePropsKey> {}
|
|
91
103
|
//#endregion
|
|
92
104
|
export { LinkBaseProps, LinkExtraProps, LinkProps };
|
|
@@ -2,12 +2,33 @@ import { UiClass } from "../../types/common.js";
|
|
|
2
2
|
import { HTMLAttributes } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/list/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the list root component.
|
|
7
|
+
*/
|
|
5
8
|
interface ListRootProps extends /** @vue-ignore */HTMLAttributes {}
|
|
9
|
+
/**
|
|
10
|
+
* Props for the list item component.
|
|
11
|
+
*/
|
|
6
12
|
interface ListItemProps extends /** @vue-ignore */HTMLAttributes {}
|
|
13
|
+
/**
|
|
14
|
+
* Props for the list content component.
|
|
15
|
+
*/
|
|
7
16
|
interface ListContentProps extends /** @vue-ignore */HTMLAttributes {}
|
|
17
|
+
/**
|
|
18
|
+
* Props for the list title component.
|
|
19
|
+
*/
|
|
8
20
|
interface ListTitleProps extends /** @vue-ignore */HTMLAttributes {}
|
|
21
|
+
/**
|
|
22
|
+
* Props for the list description component.
|
|
23
|
+
*/
|
|
9
24
|
interface ListDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
|
|
25
|
+
/**
|
|
26
|
+
* Available UI slots for the list component.
|
|
27
|
+
*/
|
|
10
28
|
type ListUiSlot = 'root' | 'item' | 'content' | 'title' | 'description';
|
|
29
|
+
/**
|
|
30
|
+
* UI class overrides for the list component.
|
|
31
|
+
*/
|
|
11
32
|
type ListUi = UiClass<ListUiSlot>;
|
|
12
33
|
//#endregion
|
|
13
34
|
export { ListContentProps, ListDescriptionProps, ListItemProps, ListRootProps, ListTitleProps, ListUi, ListUiSlot };
|
|
@@ -8,6 +8,9 @@ import { ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
|
8
8
|
import { VirtualItem, Virtualizer } from "@tanstack/vue-virtual";
|
|
9
9
|
|
|
10
10
|
//#region src/components/listbox/types.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Props for the listbox root component.
|
|
13
|
+
*/
|
|
11
14
|
interface ListboxRootProps<M extends boolean = false> extends SelectionProps<M>, FormFieldCommonProps, /** @vue-ignore */HTMLAttributes {
|
|
12
15
|
/** The orientation of the listbox. <br>Mainly so arrow navigation is done accordingly (left & right vs. up & down) */
|
|
13
16
|
orientation?: DataOrientation;
|
|
@@ -21,26 +24,56 @@ interface ListboxRootProps<M extends boolean = false> extends SelectionProps<M>,
|
|
|
21
24
|
/** When `true`, hover over item will trigger highlight */
|
|
22
25
|
highlightOnHover?: boolean;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Value associated with the current item.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Type information for the listbox collection item data component.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Value associated with the current item.
|
|
35
|
+
*/
|
|
24
36
|
type ListboxCollectionItemData = {
|
|
25
37
|
value: string;
|
|
26
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Emits for the listbox root component.
|
|
41
|
+
*/
|
|
27
42
|
type ListboxRootEmits<M extends boolean = false> = SelectionEmits<M> & {
|
|
28
43
|
/** Event handler when highlighted element changes. */highlight: [payload?: CollectionItemData<ListboxCollectionItemData>]; /** Event handler called when container is being focused. Can be prevented. */
|
|
29
44
|
entryFocus: [event: CustomEvent]; /** Event handler called when the mouse leave the container */
|
|
30
45
|
leave: [event: Event];
|
|
31
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Props for the listbox item component.
|
|
49
|
+
*/
|
|
32
50
|
interface ListboxItemProps extends PrimitiveProps, /** @vue-ignore */Omit<HTMLAttributes, 'onSelect'> {
|
|
33
51
|
/** The value given as data when submitted with a `name`. */
|
|
34
52
|
value: string;
|
|
35
53
|
/** When `true`, prevents the user from interacting with the item. */
|
|
36
54
|
disabled?: boolean;
|
|
37
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Emits for the listbox item component.
|
|
58
|
+
*/
|
|
38
59
|
type ListboxItemEmits = {
|
|
39
60
|
/** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */select: [event: SelectEvent<string>];
|
|
40
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Props for the listbox item indicator component.
|
|
64
|
+
*/
|
|
41
65
|
interface ListboxItemIndicatorProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
66
|
+
/**
|
|
67
|
+
* Props for the listbox group component.
|
|
68
|
+
*/
|
|
42
69
|
interface ListboxGroupProps extends /** @vue-ignore */HTMLAttributes {}
|
|
70
|
+
/**
|
|
71
|
+
* Props for the listbox group label component.
|
|
72
|
+
*/
|
|
43
73
|
interface ListboxGroupLabelProps extends /** @vue-ignore */HTMLAttributes {}
|
|
74
|
+
/**
|
|
75
|
+
* Props for the listbox filter component.
|
|
76
|
+
*/
|
|
44
77
|
interface ListboxFilterProps extends InputRootProps {
|
|
45
78
|
/**
|
|
46
79
|
* The function to set the input element.
|
|
@@ -53,8 +86,17 @@ interface ListboxFilterProps extends InputRootProps {
|
|
|
53
86
|
*/
|
|
54
87
|
controlProps?: InputControlProps;
|
|
55
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Emits for the listbox filter component.
|
|
91
|
+
*/
|
|
56
92
|
type ListboxFilterEmits = InputRootEmits;
|
|
93
|
+
/**
|
|
94
|
+
* Props for the listbox content component.
|
|
95
|
+
*/
|
|
57
96
|
interface ListboxContentProps extends /** @vue-ignore */HTMLAttributes {}
|
|
97
|
+
/**
|
|
98
|
+
* Props for the listbox virtualizer component.
|
|
99
|
+
*/
|
|
58
100
|
interface ListboxVirtualizerProps {
|
|
59
101
|
/** List of items */
|
|
60
102
|
options: string[];
|
|
@@ -65,15 +107,39 @@ interface ListboxVirtualizerProps {
|
|
|
65
107
|
/** Text content for each item to achieve type-ahead feature */
|
|
66
108
|
textContent?: (option: string) => string;
|
|
67
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Props for the listbox virtualizer slots component.
|
|
112
|
+
*/
|
|
68
113
|
type ListboxVirtualizerSlotsProps = {
|
|
114
|
+
/**
|
|
115
|
+
* Option.
|
|
116
|
+
*/
|
|
69
117
|
option: string;
|
|
118
|
+
/**
|
|
119
|
+
* Virtualizer.
|
|
120
|
+
*/
|
|
70
121
|
virtualizer: Virtualizer<HTMLElement, Element>;
|
|
122
|
+
/**
|
|
123
|
+
* Virtual item.
|
|
124
|
+
*/
|
|
71
125
|
virtualItem: VirtualItem;
|
|
72
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* Slots for the listbox virtualizer component.
|
|
129
|
+
*/
|
|
73
130
|
type ListboxVirtualizerSlots = {
|
|
131
|
+
/**
|
|
132
|
+
* Custom content for the default slot.
|
|
133
|
+
*/
|
|
74
134
|
default: (props: ListboxVirtualizerSlotsProps) => any;
|
|
75
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* Available UI slots for the listbox component.
|
|
138
|
+
*/
|
|
76
139
|
type ListboxUiSlot = 'root' | 'content' | 'filterRoot' | 'filterControl' | 'item' | 'itemIndicator' | 'group' | 'groupLabel' | 'virtualizer';
|
|
140
|
+
/**
|
|
141
|
+
* UI class overrides for the listbox component.
|
|
142
|
+
*/
|
|
77
143
|
type ListboxUi = UiClass<ListboxUiSlot>;
|
|
78
144
|
//#endregion
|
|
79
145
|
export { ListboxCollectionItemData, ListboxContentProps, ListboxFilterEmits, ListboxFilterProps, ListboxGroupLabelProps, ListboxGroupProps, ListboxItemEmits, ListboxItemIndicatorProps, ListboxItemProps, ListboxRootEmits, ListboxRootProps, ListboxUi, ListboxUiSlot, ListboxVirtualizerProps, ListboxVirtualizerSlots };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{e}from"../../node_modules/.pnpm/@soybeanjs_utils@0.1.1/node_modules/@soybeanjs/utils/dist/index.js";import{useForwardListeners as t}from"../../composables/use-forward-listeners.js";import{useOmitProps as n}from"../../composables/use-props.js";import"../../composables/index.js";import r from"../_icon/icon.js";import i from"../portal/portal.js";import a from"../link/link.js";import o from"../kbd/kbd.js";import s from"../separator/separator-root.js";import{useMenuOptionsCompactContext as c,useMenuUi as l}from"./context.js";import u from"./menu-group.js";import d from"./menu-group-label.js";import f from"./menu-item.js";import p from"./menu-sub.js";import m from"./menu-sub-trigger.js";import h from"./menu-sub-content.js";import{useCommonSlotNames as g}from"./hooks.js";import _ from"./menu-item-slot-compact.js";import{Fragment as v,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createSlots as C,createVNode as w,defineComponent as T,guardReactiveProps as E,mergeProps as D,normalizeClass as O,normalizeProps as k,openBlock as A,renderList as j,renderSlot as M,resolveComponent as N,toHandlers as P,unref as F,useSlots as I,withCtx as L}from"vue";const R=T({name:`MenuOptionCompact`,inheritAttrs:!1,__name:`menu-option-compact`,props:{item:{},itemProps:{},linkProps:{},groupProps:{},groupLabelProps:{},subProps:{},subTriggerProps:{},portalProps:{},subContentProps:{},separatorProps:{},shortcutProps:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`entryFocus`,`select`],setup(T,{emit:R}){let z=T,B=R,V=t(B),H=I(),U=n(z,[`item`]),W=y(()=>e(H)),G=g(H),K=l(),{activeValue:q,activePaths:J}=c(`MenuOptionCompact`),Y=y(()=>q.value===z.item.value),X=y(()=>J.value.includes(z.item.value));return(e,t)=>{let n=N(`MenuOptionCompact`,!0);return A(),S(v,null,[T.item.isGroupLabel?(A(),b(d,k(D({key:0},T.groupLabelProps)),{default:L(()=>[w(_,{icon:T.item.icon,label:T.item.label},{default:L(()=>[(A(!0),S(v,null,j(F(G),t=>M(e.$slots,t,{item:T.item})),256))]),_:3},8,[`icon`,`label`])]),_:3},16)):T.item.to||T.item.href?(A(),b(f,D({key:1},T.itemProps,{"as-child":``,disabled:T.item.disabled,"text-value":T.item.textValue,"data-active":Y.value,onSelect:t[0]||(t[0]=e=>B(`select`,T.item,e))}),{default:L(()=>[w(a,D(T.linkProps,{disabled:T.item.disabled,to:T.item.to,href:T.item.href,target:T.item.target,external:T.item.external}),{default:L(({isHref:t})=>[w(_,{icon:T.item.icon,label:T.item.label},C({default:L(()=>[(A(!0),S(v,null,j(F(G),t=>M(e.$slots,t,{item:T.item})),256))]),_:2},[t?{name:`link-icon`,fn:L(()=>[M(e.$slots,`item-link-icon`,{item:T.item},()=>[w(r,{icon:`lucide:arrow-up-right`,class:O(F(K).itemLinkIcon)},null,8,[`class`])])]),key:`0`}:void 0]),1032,[`icon`,`label`])]),_:3},16,[`disabled`,`to`,`href`,`target`,`external`])]),_:3},16,[`disabled`,`text-value`,`data-active`])):T.item.children?.length?(A(),b(p,D({key:3},T.subProps,{"onUpdate:open":t[2]||(t[2]=e=>B(`update:open`,e))}),{default:L(()=>[w(m,D(T.subTriggerProps,{disabled:T.item.disabled,"text-value":T.item.textValue,"data-child-active":X.value?``:void 0}),{default:L(()=>[w(_,{icon:T.item.icon,label:T.item.label},{"trigger-icon":L(()=>[M(e.$slots,`item-trigger-icon`,{item:T.item},()=>[w(r,{icon:`lucide:chevron-right`,class:O(F(K).subTriggerIcon)},null,8,[`class`])])]),default:L(()=>[(A(!0),S(v,null,j(F(G),t=>M(e.$slots,t,{item:T.item})),256))]),_:3},8,[`icon`,`label`])]),_:3},16,[`disabled`,`text-value`,`data-child-active`]),T.item.separator?(A(),b(s,k(D({key:0},T.separatorProps)),null,16)):x(`v-if`,!0),w(i,k(E(T.portalProps)),{default:L(()=>[w(h,D(T.subContentProps,P(F(V))),{default:L(()=>[w(u,k(E(T.groupProps)),{default:L(()=>[(A(!0),S(v,null,j(T.item.children,t=>(A(),b(n,D({key:t.value},{ref_for:!0},F(U),{item:t},P(F(V))),C({_:2},[j(W.value,t=>({name:t,fn:L(n=>[M(e.$slots,t,D({ref_for:!0},n))])}))]),1040,[`item`]))),128))]),_:3},16)]),_:3},16)]),_:3},16)]),_:3},16)):(A(),b(f,D({key:2},T.itemProps,{disabled:T.item.disabled,"text-value":T.item.textValue,"data-active":Y.value,onSelect:t[1]||(t[1]=e=>B(`select`,T.item,e))}),{default:L(()=>[w(_,{icon:T.item.icon,label:T.item.label},{shortcut:L(()=>[T.item.shortcut?(A(),b(o,D({key:0},T.shortcutProps,{value:T.item.shortcut,class:F(K).shortcut}),null,16,[`value`,`class`])):x(`v-if`,!0)]),default:L(()=>[(A(!0),S(v,null,j(F(G),t=>M(e.$slots,t,{item:T.item})),256))]),_:3},8,[`icon`,`label`])]),_:3},16,[`disabled`,`text-value`,`data-active`])),T.item.separator&&!T.item.children?.length?(A(),b(s,k(D({key:4},T.separatorProps)),null,16)):x(`v-if`,!0)],64)}}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformPropsToContext as e}from"../../shared/vue.js";import{getTreePaths as t}from"../../shared/tree.js";import"../../shared/index.js";import{
|
|
1
|
+
import{transformPropsToContext as e}from"../../shared/vue.js";import{getTreePaths as t}from"../../shared/tree.js";import"../../shared/index.js";import{e as n}from"../../node_modules/.pnpm/@soybeanjs_utils@0.1.1/node_modules/@soybeanjs/utils/dist/index.js";import{useForwardListeners as r}from"../../composables/use-forward-listeners.js";import{useOmitProps as i}from"../../composables/use-props.js";import"../../composables/index.js";import{provideMenuOptionsCompactContext as a}from"./context.js";import o from"./menu-group.js";import s from"./menu-option-compact.js";import{Fragment as c,computed as l,createBlock as u,createElementBlock as d,createSlots as f,defineComponent as p,guardReactiveProps as m,mergeProps as h,normalizeProps as g,openBlock as _,renderList as v,renderSlot as y,toHandlers as b,unref as x,useSlots as S,withCtx as C}from"vue";const w=p({name:`MenuOptionsCompact`,inheritAttrs:!1,__name:`menu-options-compact`,props:{items:{},activeValue:{},itemProps:{},linkProps:{},groupProps:{},groupLabelProps:{},subProps:{},subTriggerProps:{},portalProps:{},subContentProps:{},separatorProps:{},shortcutProps:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`entryFocus`,`select`],setup(p,{emit:w}){let T=p,E=w,D=S(),O=i(T,[`items`]),k=r(E),A=l(()=>n(D)),j=l(()=>T.activeValue===void 0?[]:t(T.activeValue,T.items));return a({...e(T,[`activeValue`]),activePaths:j}),(e,t)=>(_(),u(o,g(m(p.groupProps)),{default:C(()=>[(_(!0),d(c,null,v(p.items,t=>(_(),u(s,h({key:t.value},{ref_for:!0},x(O),{item:t},b(x(k))),f({_:2},[v(A.value,t=>({name:t,fn:C(n=>[y(e.$slots,t,h({ref_for:!0},n))])}))]),1040,[`item`]))),128))]),_:3},16))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as t}from"../../composables/use-controllable-state.js";import{useIsUsingKeyboard as n}from"../../composables/use-is-using-keyboard.js";import"../../composables/index.js";import{useDirection as r}from"../config-provider/context.js";import i from"../popper/popper-root.js";import"../popper/index.js";import{provideMenuContext as a,provideMenuRootContext as o}from"./context.js";import{createBlock as s,defineComponent as c,openBlock as l,renderSlot as u,unref as d,withCtx as f}from"vue";const p=c({name:`MenuRoot`,inheritAttrs:!1,__name:`menu-root`,props:{dir:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}
|
|
1
|
+
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as t}from"../../composables/use-controllable-state.js";import{useIsUsingKeyboard as n}from"../../composables/use-is-using-keyboard.js";import"../../composables/index.js";import{useDirection as r}from"../config-provider/context.js";import i from"../popper/popper-root.js";import"../popper/index.js";import{provideMenuContext as a,provideMenuRootContext as o}from"./context.js";import{createBlock as s,defineComponent as c,openBlock as l,renderSlot as u,unref as d,withCtx as f}from"vue";const p=c({name:`MenuRoot`,inheritAttrs:!1,__name:`menu-root`,props:{dir:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`],setup(c,{emit:p}){let m=c,h=p,g=t(()=>m.open,e=>{h(`update:open`,e??!1)},m.defaultOpen),_=r(()=>m.dir),v=n(),y=()=>{g.value=!1};return a({open:g,isRoot:!0}),o({...e(m,[`modal`]),dir:_,onClose:y,isUsingKeyboard:v}),(e,t)=>(l(),s(d(i),null,{default:f(()=>[u(e.$slots,`default`,{open:d(g)})]),_:3}))}});export{p as default};
|
|
@@ -5,14 +5,17 @@ import { PrimitiveProps } from "../primitive/types.js";
|
|
|
5
5
|
import { LinkBaseProps, LinkProps } from "../link/types.js";
|
|
6
6
|
import { PopperPopupProps, PopperPositionerProps } from "../popper/types.js";
|
|
7
7
|
import { PortalProps } from "../portal/types.js";
|
|
8
|
-
import {
|
|
8
|
+
import { DialogBaseProps, DialogRootEmits } from "../dialog/types.js";
|
|
9
9
|
import { RovingFocusGroupEmits, RovingFocusGroupProps } from "../roving-focus/types.js";
|
|
10
10
|
import { KbdProps, KbdValue } from "../kbd/types.js";
|
|
11
11
|
import { SeparatorRootProps } from "../separator/types.js";
|
|
12
12
|
import { ButtonHTMLAttributes, ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
13
13
|
|
|
14
14
|
//#region src/components/menu/types.d.ts
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Props for the menu root component.
|
|
17
|
+
*/
|
|
18
|
+
interface MenuRootProps extends DialogBaseProps {
|
|
16
19
|
/**
|
|
17
20
|
* The reading direction of the combobox when applicable.
|
|
18
21
|
*
|
|
@@ -20,23 +23,65 @@ interface MenuRootProps extends DialogRootProps {
|
|
|
20
23
|
*/
|
|
21
24
|
dir?: Direction;
|
|
22
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Emits for the menu root component.
|
|
28
|
+
*/
|
|
23
29
|
type MenuRootEmits = DialogRootEmits;
|
|
30
|
+
/**
|
|
31
|
+
* Props for the menu popup component.
|
|
32
|
+
*/
|
|
24
33
|
interface MenuPopupProps extends PopperPopupProps {}
|
|
34
|
+
/**
|
|
35
|
+
* Emits for the menu content impl component.
|
|
36
|
+
*/
|
|
25
37
|
type MenuContentImplEmits = DismissableLayerEmits & FocusScopeEmits & Pick<RovingFocusGroupEmits, 'entryFocus'>;
|
|
38
|
+
/**
|
|
39
|
+
* Props for the menu content component.
|
|
40
|
+
*/
|
|
26
41
|
interface MenuContentProps extends PopperPositionerProps, ForceMountProps, Pick<RovingFocusGroupProps, 'loop'> {
|
|
42
|
+
/**
|
|
43
|
+
* Props forwarded to the popup element.
|
|
44
|
+
*/
|
|
27
45
|
popupProps?: MenuPopupProps;
|
|
28
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Emits for the menu content component.
|
|
49
|
+
*/
|
|
29
50
|
type MenuContentEmits = MenuContentImplEmits;
|
|
51
|
+
/**
|
|
52
|
+
* Props for the menu trigger component.
|
|
53
|
+
*/
|
|
30
54
|
interface MenuTriggerProps extends PrimitiveProps, /** @vue-ignore */ButtonHTMLAttributes {
|
|
31
55
|
/** When `true`, the menu would not open when triggered. */
|
|
32
56
|
disabled?: boolean;
|
|
33
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Props for the menu sub component.
|
|
60
|
+
*/
|
|
34
61
|
interface MenuSubProps extends Pick<MenuRootProps, 'open' | 'defaultOpen'> {}
|
|
62
|
+
/**
|
|
63
|
+
* Emits for the menu sub component.
|
|
64
|
+
*/
|
|
35
65
|
type MenuSubEmits = MenuRootEmits;
|
|
66
|
+
/**
|
|
67
|
+
* Props for the menu sub content component.
|
|
68
|
+
*/
|
|
36
69
|
interface MenuSubContentProps extends Omit<MenuContentProps, 'side' | 'align'> {}
|
|
70
|
+
/**
|
|
71
|
+
* Emits for the menu sub content component.
|
|
72
|
+
*/
|
|
37
73
|
type MenuSubContentEmits = MenuContentEmits;
|
|
74
|
+
/**
|
|
75
|
+
* Props for the menu group component.
|
|
76
|
+
*/
|
|
38
77
|
interface MenuGroupProps extends PrimitiveProps, /** @vue-ignore */Omit<HTMLAttributes, 'dir' | 'onSelect'> {}
|
|
78
|
+
/**
|
|
79
|
+
* Props for the menu group label component.
|
|
80
|
+
*/
|
|
39
81
|
interface MenuGroupLabelProps extends /** @vue-ignore */HTMLAttributes {}
|
|
82
|
+
/**
|
|
83
|
+
* Props for the menu item impl component.
|
|
84
|
+
*/
|
|
40
85
|
interface MenuItemImplProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {
|
|
41
86
|
/** When `true`, prevents the user from interacting with the item. */
|
|
42
87
|
disabled?: boolean;
|
|
@@ -46,7 +91,13 @@ interface MenuItemImplProps extends PrimitiveProps, /** @vue-ignore */HTMLAttrib
|
|
|
46
91
|
*/
|
|
47
92
|
textValue?: string;
|
|
48
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Props for the menu item component.
|
|
96
|
+
*/
|
|
49
97
|
interface MenuItemProps extends MenuItemImplProps {}
|
|
98
|
+
/**
|
|
99
|
+
* Emits for the menu item component.
|
|
100
|
+
*/
|
|
50
101
|
type MenuItemEmits = {
|
|
51
102
|
/**
|
|
52
103
|
* Event handler called when the user selects an item (via mouse or keyboard). <br> Calling `event.preventDefault` in
|
|
@@ -54,6 +105,9 @@ type MenuItemEmits = {
|
|
|
54
105
|
*/
|
|
55
106
|
select: [event: Event];
|
|
56
107
|
};
|
|
108
|
+
/**
|
|
109
|
+
* Props for the menu checkbox item component.
|
|
110
|
+
*/
|
|
57
111
|
interface MenuCheckboxItemProps extends MenuItemImplProps {
|
|
58
112
|
/** The controlled checked state of the item. Can be used as `v-model`. */
|
|
59
113
|
modelValue?: CheckedState;
|
|
@@ -64,9 +118,15 @@ interface MenuCheckboxItemProps extends MenuItemImplProps {
|
|
|
64
118
|
*/
|
|
65
119
|
value?: DefinedValue;
|
|
66
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Emits for the menu checkbox item component.
|
|
123
|
+
*/
|
|
67
124
|
type MenuCheckboxItemEmits = MenuItemEmits & {
|
|
68
125
|
/** Event handler called when the checked state of the item changes. */'update:modelValue': [value: CheckedState];
|
|
69
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* Props for the menu checkbox group component.
|
|
129
|
+
*/
|
|
70
130
|
interface MenuCheckboxGroupProps<T extends DefinedValue = DefinedValue> extends MenuGroupProps {
|
|
71
131
|
/** The controlled value of the checkbox. Can be bound with v-model. */
|
|
72
132
|
modelValue?: T[];
|
|
@@ -79,14 +139,26 @@ interface MenuCheckboxGroupProps<T extends DefinedValue = DefinedValue> extends
|
|
|
79
139
|
*/
|
|
80
140
|
disabled?: boolean;
|
|
81
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Emits for the menu checkbox group component.
|
|
144
|
+
*/
|
|
82
145
|
type MenuCheckboxGroupEmits<T extends DefinedValue = DefinedValue> = {
|
|
83
146
|
/** Event handler called when the value of the checkbox group changes. */'update:modelValue': [value: T[]];
|
|
84
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* Props for the menu radio item component.
|
|
150
|
+
*/
|
|
85
151
|
interface MenuRadioItemProps extends MenuItemImplProps {
|
|
86
152
|
/** The value given as data when submitted with a `name`. */
|
|
87
153
|
value: NonNullable<AcceptableBooleanValue>;
|
|
88
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Emits for the menu radio item component.
|
|
157
|
+
*/
|
|
89
158
|
type MenuRadioItemEmits = MenuItemEmits;
|
|
159
|
+
/**
|
|
160
|
+
* Props for the menu radio group component.
|
|
161
|
+
*/
|
|
90
162
|
interface MenuRadioGroupProps<T = AcceptableBooleanValue> extends MenuGroupProps {
|
|
91
163
|
/** The controlled value of the radio item to check. Can be bound as `v-model`. */
|
|
92
164
|
modelValue?: T;
|
|
@@ -98,11 +170,23 @@ interface MenuRadioGroupProps<T = AcceptableBooleanValue> extends MenuGroupProps
|
|
|
98
170
|
/** When `true`, prevents the user from interacting with radio items. */
|
|
99
171
|
disabled?: boolean;
|
|
100
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Emits for the menu radio group component.
|
|
175
|
+
*/
|
|
101
176
|
type MenuRadioGroupEmits<T = AcceptableBooleanValue> = {
|
|
102
177
|
/** Event handler called when the radio group value changes */'update:modelValue': [payload: NonNullable<T>];
|
|
103
178
|
};
|
|
179
|
+
/**
|
|
180
|
+
* Props for the menu sub trigger component.
|
|
181
|
+
*/
|
|
104
182
|
interface MenuSubTriggerProps extends MenuItemImplProps {}
|
|
183
|
+
/**
|
|
184
|
+
* Props for the menu item indicator component.
|
|
185
|
+
*/
|
|
105
186
|
interface MenuItemIndicatorProps extends PrimitiveProps, ForceMountProps, /** @vue-ignore */HTMLAttributes {}
|
|
187
|
+
/**
|
|
188
|
+
* Option data for the menu component.
|
|
189
|
+
*/
|
|
106
190
|
interface MenuOptionData<T extends DefinedValue = DefinedValue> extends Pick<MenuItemProps, 'disabled' | 'textValue'>, LinkBaseProps {
|
|
107
191
|
/** The label to display in the menu. */
|
|
108
192
|
label: string;
|
|
@@ -119,68 +203,197 @@ interface MenuOptionData<T extends DefinedValue = DefinedValue> extends Pick<Men
|
|
|
119
203
|
/** The children of the option. */
|
|
120
204
|
children?: MenuOptionData<T>[];
|
|
121
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Props for the menu shortcut component.
|
|
208
|
+
*/
|
|
122
209
|
interface MenuShortcutProps extends Omit<KbdProps, 'value'> {}
|
|
210
|
+
/**
|
|
211
|
+
* Props for the menu option compact component.
|
|
212
|
+
*/
|
|
123
213
|
interface MenuOptionCompactProps<T extends DefinedValue = DefinedValue> {
|
|
214
|
+
/**
|
|
215
|
+
* Current item data.
|
|
216
|
+
*/
|
|
124
217
|
item: MenuOptionData<T>;
|
|
218
|
+
/**
|
|
219
|
+
* Props forwarded to the item element.
|
|
220
|
+
*/
|
|
125
221
|
itemProps?: MenuItemProps;
|
|
222
|
+
/**
|
|
223
|
+
* Props forwarded to the link element.
|
|
224
|
+
*/
|
|
126
225
|
linkProps?: LinkProps;
|
|
226
|
+
/**
|
|
227
|
+
* Props forwarded to the group element.
|
|
228
|
+
*/
|
|
127
229
|
groupProps?: MenuGroupProps;
|
|
230
|
+
/**
|
|
231
|
+
* Props forwarded to the group label element.
|
|
232
|
+
*/
|
|
128
233
|
groupLabelProps?: MenuGroupLabelProps;
|
|
234
|
+
/**
|
|
235
|
+
* Props forwarded to the sub element.
|
|
236
|
+
*/
|
|
129
237
|
subProps?: MenuSubProps;
|
|
238
|
+
/**
|
|
239
|
+
* Props forwarded to the sub trigger element.
|
|
240
|
+
*/
|
|
130
241
|
subTriggerProps?: MenuSubTriggerProps;
|
|
242
|
+
/**
|
|
243
|
+
* Props forwarded to the portal element.
|
|
244
|
+
*/
|
|
131
245
|
portalProps?: PortalProps;
|
|
246
|
+
/**
|
|
247
|
+
* Props forwarded to the sub content element.
|
|
248
|
+
*/
|
|
132
249
|
subContentProps?: MenuSubContentProps;
|
|
250
|
+
/**
|
|
251
|
+
* Props forwarded to the separator element.
|
|
252
|
+
*/
|
|
133
253
|
separatorProps?: SeparatorRootProps;
|
|
254
|
+
/**
|
|
255
|
+
* Props forwarded to the shortcut element.
|
|
256
|
+
*/
|
|
134
257
|
shortcutProps?: MenuShortcutProps;
|
|
135
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Emits for the menu option compact select component.
|
|
261
|
+
*/
|
|
136
262
|
type MenuOptionCompactSelectEmits<T extends DefinedValue = DefinedValue> = {
|
|
263
|
+
/**
|
|
264
|
+
* Emitted when select occurs.
|
|
265
|
+
*/
|
|
137
266
|
select: [item: MenuOptionData<T>, event: Event];
|
|
138
267
|
};
|
|
268
|
+
/**
|
|
269
|
+
* Emits for the menu option compact component.
|
|
270
|
+
*/
|
|
139
271
|
type MenuOptionCompactEmits<T extends DefinedValue = DefinedValue> = MenuSubEmits & MenuSubContentEmits & MenuOptionCompactSelectEmits<T>;
|
|
272
|
+
/**
|
|
273
|
+
* Slots for the menu option compact component.
|
|
274
|
+
*/
|
|
140
275
|
type MenuOptionCompactSlots<T extends DefinedValue = DefinedValue> = {
|
|
276
|
+
/**
|
|
277
|
+
* Custom content for the item slot.
|
|
278
|
+
*/
|
|
141
279
|
item?: (props: {
|
|
142
280
|
item: MenuOptionData<T>;
|
|
143
281
|
isTrigger?: boolean;
|
|
144
282
|
}) => any;
|
|
283
|
+
/**
|
|
284
|
+
* Custom content for the item leading slot.
|
|
285
|
+
*/
|
|
145
286
|
'item-leading'?: (props: {
|
|
146
287
|
item: MenuOptionData<T>;
|
|
147
288
|
}) => any;
|
|
289
|
+
/**
|
|
290
|
+
* Custom content for the item trailing slot.
|
|
291
|
+
*/
|
|
148
292
|
'item-trailing'?: (props: {
|
|
149
293
|
item: MenuOptionData<T>;
|
|
150
294
|
}) => any;
|
|
295
|
+
/**
|
|
296
|
+
* Custom content for the item trigger icon slot.
|
|
297
|
+
*/
|
|
151
298
|
'item-trigger-icon'?: (props: {
|
|
152
299
|
item: MenuOptionData<T>;
|
|
153
300
|
}) => any;
|
|
301
|
+
/**
|
|
302
|
+
* Custom content for the item link icon slot.
|
|
303
|
+
*/
|
|
154
304
|
'item-link-icon'?: (props: {
|
|
155
305
|
item: MenuOptionData<T>;
|
|
156
306
|
}) => any;
|
|
157
307
|
};
|
|
308
|
+
/**
|
|
309
|
+
* Props for the menu options compact component.
|
|
310
|
+
*/
|
|
158
311
|
interface MenuOptionsCompactProps<T extends DefinedValue = DefinedValue> extends Omit<MenuOptionCompactProps<T>, 'item'> {
|
|
312
|
+
/**
|
|
313
|
+
* Items rendered by the component.
|
|
314
|
+
*/
|
|
159
315
|
items: MenuOptionData<T>[];
|
|
160
316
|
/** The active value of the menu. */
|
|
161
317
|
activeValue?: T;
|
|
162
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* Emits for the menu options compact component.
|
|
321
|
+
*/
|
|
163
322
|
type MenuOptionsCompactEmits<T extends DefinedValue = DefinedValue> = MenuOptionCompactEmits<T>;
|
|
323
|
+
/**
|
|
324
|
+
* Slots for the menu options compact component.
|
|
325
|
+
*/
|
|
164
326
|
type MenuOptionsCompactSlots<T extends DefinedValue = DefinedValue> = MenuOptionCompactSlots<T>;
|
|
327
|
+
/**
|
|
328
|
+
* Option data for the menu checkbox component.
|
|
329
|
+
*/
|
|
165
330
|
interface MenuCheckboxOptionData<T extends DefinedValue = DefinedValue> extends Omit<MenuOptionData<T>, 'children'> {}
|
|
331
|
+
/**
|
|
332
|
+
* Props for the menu checkbox options compact component.
|
|
333
|
+
*/
|
|
166
334
|
interface MenuCheckboxOptionsCompactProps<T extends DefinedValue = DefinedValue> extends MenuCheckboxGroupProps<T> {
|
|
335
|
+
/**
|
|
336
|
+
* Items rendered by the component.
|
|
337
|
+
*/
|
|
167
338
|
items: MenuCheckboxOptionData<T>[];
|
|
339
|
+
/**
|
|
340
|
+
* Props forwarded to the group label element.
|
|
341
|
+
*/
|
|
168
342
|
groupLabelProps?: MenuGroupLabelProps;
|
|
343
|
+
/**
|
|
344
|
+
* Props forwarded to the checkbox item element.
|
|
345
|
+
*/
|
|
169
346
|
checkboxItemProps?: MenuCheckboxItemProps;
|
|
347
|
+
/**
|
|
348
|
+
* Props forwarded to the indicator element.
|
|
349
|
+
*/
|
|
170
350
|
indicatorProps?: MenuItemIndicatorProps;
|
|
351
|
+
/**
|
|
352
|
+
* Props forwarded to the shortcut element.
|
|
353
|
+
*/
|
|
171
354
|
shortcutProps?: MenuShortcutProps;
|
|
355
|
+
/**
|
|
356
|
+
* Props forwarded to the separator element.
|
|
357
|
+
*/
|
|
172
358
|
separatorProps?: SeparatorRootProps;
|
|
173
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* Emits for the menu checkbox options compact select component.
|
|
362
|
+
*/
|
|
174
363
|
type MenuCheckboxOptionsCompactSelectEmits<T extends DefinedValue = DefinedValue> = {
|
|
364
|
+
/**
|
|
365
|
+
* Emitted when select occurs.
|
|
366
|
+
*/
|
|
175
367
|
select: [item: MenuCheckboxOptionData<T>, event: Event];
|
|
176
368
|
};
|
|
369
|
+
/**
|
|
370
|
+
* Emits for the menu checkbox options compact component.
|
|
371
|
+
*/
|
|
177
372
|
type MenuCheckboxOptionsCompactEmits<T extends DefinedValue = DefinedValue> = MenuCheckboxGroupEmits<T> & MenuCheckboxOptionsCompactSelectEmits<T>;
|
|
373
|
+
/**
|
|
374
|
+
* Slots for the menu checkbox options compact component.
|
|
375
|
+
*/
|
|
178
376
|
type MenuCheckboxOptionsCompactSlots<T extends DefinedValue = DefinedValue> = {
|
|
377
|
+
/**
|
|
378
|
+
* Custom content for the item slot.
|
|
379
|
+
*/
|
|
179
380
|
item?: (props: MenuCheckboxOptionData<T>) => any;
|
|
381
|
+
/**
|
|
382
|
+
* Custom content for the item leading slot.
|
|
383
|
+
*/
|
|
180
384
|
'item-leading'?: (props: MenuCheckboxOptionData<T>) => any;
|
|
385
|
+
/**
|
|
386
|
+
* Custom content for the item trailing slot.
|
|
387
|
+
*/
|
|
181
388
|
'item-trailing'?: (props: MenuCheckboxOptionData<T>) => any;
|
|
389
|
+
/**
|
|
390
|
+
* Custom content for the item indicator icon slot.
|
|
391
|
+
*/
|
|
182
392
|
'item-indicator-icon'?: (props: MenuCheckboxOptionData<T>) => any;
|
|
183
393
|
};
|
|
394
|
+
/**
|
|
395
|
+
* Option data for the menu radio component.
|
|
396
|
+
*/
|
|
184
397
|
interface MenuRadioOptionData<T extends AcceptableBooleanValue = AcceptableBooleanValue> extends Pick<MenuItemProps, 'disabled' | 'textValue'>, LinkBaseProps {
|
|
185
398
|
/** The label to display in the menu. */
|
|
186
399
|
label: string;
|
|
@@ -195,25 +408,76 @@ interface MenuRadioOptionData<T extends AcceptableBooleanValue = AcceptableBoole
|
|
|
195
408
|
/** The shortcut rendered at the end of the option. */
|
|
196
409
|
shortcut?: KbdValue | KbdValue[];
|
|
197
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* Props for the menu radio options compact component.
|
|
413
|
+
*/
|
|
198
414
|
interface MenuRadioOptionsCompactProps<T extends AcceptableBooleanValue = AcceptableBooleanValue> extends MenuRadioGroupProps<T> {
|
|
415
|
+
/**
|
|
416
|
+
* Items rendered by the component.
|
|
417
|
+
*/
|
|
199
418
|
items: MenuRadioOptionData<T>[];
|
|
419
|
+
/**
|
|
420
|
+
* Props forwarded to the group label element.
|
|
421
|
+
*/
|
|
200
422
|
groupLabelProps?: MenuGroupLabelProps;
|
|
423
|
+
/**
|
|
424
|
+
* Props forwarded to the radio item element.
|
|
425
|
+
*/
|
|
201
426
|
radioItemProps?: MenuRadioItemProps;
|
|
427
|
+
/**
|
|
428
|
+
* Props forwarded to the indicator element.
|
|
429
|
+
*/
|
|
202
430
|
indicatorProps?: MenuItemIndicatorProps;
|
|
431
|
+
/**
|
|
432
|
+
* Props forwarded to the shortcut element.
|
|
433
|
+
*/
|
|
203
434
|
shortcutProps?: MenuShortcutProps;
|
|
435
|
+
/**
|
|
436
|
+
* Props forwarded to the separator element.
|
|
437
|
+
*/
|
|
204
438
|
separatorProps?: SeparatorRootProps;
|
|
205
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Emits for the menu radio options compact select component.
|
|
442
|
+
*/
|
|
206
443
|
type MenuRadioOptionsCompactSelectEmits<T extends AcceptableBooleanValue = AcceptableBooleanValue> = {
|
|
444
|
+
/**
|
|
445
|
+
* Emitted when select occurs.
|
|
446
|
+
*/
|
|
207
447
|
select: [item: MenuRadioOptionData<T>, event: Event];
|
|
208
448
|
};
|
|
449
|
+
/**
|
|
450
|
+
* Emits for the menu radio options compact component.
|
|
451
|
+
*/
|
|
209
452
|
type MenuRadioOptionsCompactEmits<T extends AcceptableBooleanValue = AcceptableBooleanValue> = MenuRadioGroupEmits<T> & MenuRadioOptionsCompactSelectEmits<T>;
|
|
453
|
+
/**
|
|
454
|
+
* Slots for the menu radio options compact component.
|
|
455
|
+
*/
|
|
210
456
|
type MenuRadioOptionsCompactSlots<T extends AcceptableBooleanValue = AcceptableBooleanValue> = {
|
|
457
|
+
/**
|
|
458
|
+
* Custom content for the item slot.
|
|
459
|
+
*/
|
|
211
460
|
item?: (props: MenuRadioOptionData<T>) => any;
|
|
461
|
+
/**
|
|
462
|
+
* Custom content for the item leading slot.
|
|
463
|
+
*/
|
|
212
464
|
'item-leading'?: (props: MenuRadioOptionData<T>) => any;
|
|
465
|
+
/**
|
|
466
|
+
* Custom content for the item trailing slot.
|
|
467
|
+
*/
|
|
213
468
|
'item-trailing'?: (props: MenuRadioOptionData<T>) => any;
|
|
469
|
+
/**
|
|
470
|
+
* Custom content for the item indicator icon slot.
|
|
471
|
+
*/
|
|
214
472
|
'item-indicator-icon'?: (props: MenuRadioOptionData<T>) => any;
|
|
215
473
|
};
|
|
474
|
+
/**
|
|
475
|
+
* Available UI slots for the menu component.
|
|
476
|
+
*/
|
|
216
477
|
type MenuUiSlot = 'positioner' | 'popup' | 'arrow' | 'subPositioner' | 'subPopup' | 'subTrigger' | 'group' | 'groupLabel' | 'item' | 'itemIcon' | 'itemLink' | 'itemLinkIcon' | 'checkboxGroup' | 'checkboxItem' | 'radioGroup' | 'radioItem' | 'itemIndicator' | 'subTriggerIcon' | 'shortcut' | 'separator';
|
|
478
|
+
/**
|
|
479
|
+
* UI class overrides for the menu component.
|
|
480
|
+
*/
|
|
217
481
|
type MenuUi = UiClass<MenuUiSlot>;
|
|
218
482
|
//#endregion
|
|
219
483
|
export { MenuCheckboxGroupEmits, MenuCheckboxGroupProps, MenuCheckboxItemEmits, MenuCheckboxItemProps, MenuCheckboxOptionData, MenuCheckboxOptionsCompactEmits, MenuCheckboxOptionsCompactProps, MenuCheckboxOptionsCompactSelectEmits, MenuCheckboxOptionsCompactSlots, MenuContentEmits, MenuContentProps, MenuGroupLabelProps, MenuGroupProps, MenuItemEmits, MenuItemIndicatorProps, MenuItemProps, MenuOptionCompactEmits, MenuOptionCompactProps, MenuOptionCompactSelectEmits, MenuOptionCompactSlots, MenuOptionData, MenuOptionsCompactEmits, MenuOptionsCompactProps, MenuOptionsCompactSlots, MenuPopupProps, MenuRadioGroupEmits, MenuRadioGroupProps, MenuRadioItemEmits, MenuRadioItemProps, MenuRadioOptionData, MenuRadioOptionsCompactEmits, MenuRadioOptionsCompactProps, MenuRadioOptionsCompactSelectEmits, MenuRadioOptionsCompactSlots, MenuRootEmits, MenuRootProps, MenuShortcutProps, MenuSubContentEmits, MenuSubContentProps, MenuSubEmits, MenuSubProps, MenuSubTriggerProps, MenuTriggerProps, MenuUi, MenuUiSlot };
|