@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
|
@@ -11,6 +11,9 @@ import { HTMLAttributes, ShallowRef } from "vue";
|
|
|
11
11
|
import { UseFuseOptions } from "@vueuse/integrations/useFuse";
|
|
12
12
|
|
|
13
13
|
//#region src/components/autocomplete/types.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Props for the autocomplete root component.
|
|
16
|
+
*/
|
|
14
17
|
interface AutocompleteRootProps extends FormFieldCommonProps, /** @vue-ignore */HTMLAttributes {
|
|
15
18
|
/** The controlled value of the autocomplete input. */
|
|
16
19
|
modelValue?: string;
|
|
@@ -31,16 +34,43 @@ interface AutocompleteRootProps extends FormFieldCommonProps, /** @vue-ignore */
|
|
|
31
34
|
/** Whether to open the autocomplete when the input is clicked. */
|
|
32
35
|
openOnClick?: boolean;
|
|
33
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Type information for the autocomplete highlight payload component.
|
|
39
|
+
*/
|
|
34
40
|
type AutocompleteHighlightPayload = CollectionItemData<ListboxCollectionItemData>;
|
|
41
|
+
/**
|
|
42
|
+
* Emits for the autocomplete root component.
|
|
43
|
+
*/
|
|
35
44
|
type AutocompleteRootEmits = {
|
|
45
|
+
/**
|
|
46
|
+
* Emitted when the model value changes.
|
|
47
|
+
*/
|
|
36
48
|
'update:modelValue': [value: string];
|
|
49
|
+
/**
|
|
50
|
+
* Emitted when the open state changes.
|
|
51
|
+
*/
|
|
37
52
|
'update:open': [value: boolean];
|
|
53
|
+
/**
|
|
54
|
+
* Emitted when highlight occurs.
|
|
55
|
+
*/
|
|
38
56
|
highlight: [payload?: AutocompleteHighlightPayload];
|
|
39
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Props for the autocomplete input component.
|
|
60
|
+
*/
|
|
40
61
|
interface AutocompleteInputProps extends Omit<InputRootProps, 'defaultValue' | 'modelValue'> {
|
|
62
|
+
/**
|
|
63
|
+
* Input ref.
|
|
64
|
+
*/
|
|
41
65
|
inputRef?: (el: HTMLInputElement) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Props forwarded to the control element.
|
|
68
|
+
*/
|
|
42
69
|
controlProps?: InputControlProps;
|
|
43
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Option data for the autocomplete single component.
|
|
73
|
+
*/
|
|
44
74
|
interface AutocompleteSingleOptionData extends Pick<ComboboxItemProps, 'disabled' | 'value'> {
|
|
45
75
|
/** Display label in the option list. */
|
|
46
76
|
label?: string;
|
|
@@ -51,64 +81,175 @@ interface AutocompleteSingleOptionData extends Pick<ComboboxItemProps, 'disabled
|
|
|
51
81
|
/** Whether to show a separator after this option. */
|
|
52
82
|
separator?: boolean;
|
|
53
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Option data for the autocomplete group component.
|
|
86
|
+
*/
|
|
54
87
|
interface AutocompleteGroupOptionData<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> {
|
|
55
88
|
/** Group label in the option list. */
|
|
56
89
|
label: string;
|
|
57
90
|
/** Whether to show a separator after this group. */
|
|
58
91
|
separator?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Items rendered by the component.
|
|
94
|
+
*/
|
|
59
95
|
items: T[];
|
|
60
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Option data for the autocomplete component.
|
|
99
|
+
*/
|
|
61
100
|
type AutocompleteOptionData<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> = T | AutocompleteGroupOptionData<T>;
|
|
101
|
+
/**
|
|
102
|
+
* Option data for the autocomplete search component.
|
|
103
|
+
*/
|
|
62
104
|
interface AutocompleteSearchOptionData extends AutocompleteSingleOptionData {
|
|
105
|
+
/**
|
|
106
|
+
* Group label.
|
|
107
|
+
*/
|
|
63
108
|
groupLabel?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Group value.
|
|
111
|
+
*/
|
|
64
112
|
groupValue?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Whether group separator.
|
|
115
|
+
*/
|
|
65
116
|
groupSeparator?: boolean;
|
|
66
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Props for the autocomplete compact component.
|
|
120
|
+
*/
|
|
67
121
|
interface AutocompleteCompactProps<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> extends Omit<AutocompleteRootProps, 'defaultValue' | 'modelValue' | 'onSelect'> {
|
|
68
122
|
/** The controlled value of the autocomplete input. */
|
|
69
123
|
modelValue?: string;
|
|
70
124
|
/** The initial value of the autocomplete input. */
|
|
71
125
|
defaultValue?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Items rendered by the component.
|
|
128
|
+
*/
|
|
72
129
|
items: AutocompleteOptionData<T>[];
|
|
130
|
+
/**
|
|
131
|
+
* Placeholder.
|
|
132
|
+
*/
|
|
73
133
|
placeholder?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Whether clearable.
|
|
136
|
+
*/
|
|
74
137
|
clearable?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Clear label.
|
|
140
|
+
*/
|
|
75
141
|
clearLabel?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Empty label.
|
|
144
|
+
*/
|
|
76
145
|
emptyLabel?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Fuse options.
|
|
148
|
+
*/
|
|
77
149
|
fuseOptions?: UseFuseOptions<AutocompleteSearchOptionData>;
|
|
150
|
+
/**
|
|
151
|
+
* Props forwarded to the anchor element.
|
|
152
|
+
*/
|
|
78
153
|
anchorProps?: PopperAnchorProps;
|
|
154
|
+
/**
|
|
155
|
+
* Props forwarded to the input element.
|
|
156
|
+
*/
|
|
79
157
|
inputProps?: AutocompleteInputProps;
|
|
158
|
+
/**
|
|
159
|
+
* Props forwarded to the trigger element.
|
|
160
|
+
*/
|
|
80
161
|
triggerProps?: ComboboxTriggerProps;
|
|
162
|
+
/**
|
|
163
|
+
* Props forwarded to the portal element.
|
|
164
|
+
*/
|
|
81
165
|
portalProps?: PortalProps;
|
|
166
|
+
/**
|
|
167
|
+
* Props forwarded to the content element.
|
|
168
|
+
*/
|
|
82
169
|
contentProps?: ComboboxContentProps;
|
|
170
|
+
/**
|
|
171
|
+
* Props forwarded to the viewport element.
|
|
172
|
+
*/
|
|
83
173
|
viewportProps?: ComboboxViewportProps;
|
|
174
|
+
/**
|
|
175
|
+
* Props forwarded to the group element.
|
|
176
|
+
*/
|
|
84
177
|
groupProps?: ListboxGroupProps;
|
|
178
|
+
/**
|
|
179
|
+
* Props forwarded to the group label element.
|
|
180
|
+
*/
|
|
85
181
|
groupLabelProps?: ListboxGroupLabelProps;
|
|
182
|
+
/**
|
|
183
|
+
* Props forwarded to the item element.
|
|
184
|
+
*/
|
|
86
185
|
itemProps?: Omit<ComboboxItemProps, 'disabled' | 'value'>;
|
|
186
|
+
/**
|
|
187
|
+
* Props forwarded to the item indicator element.
|
|
188
|
+
*/
|
|
87
189
|
itemIndicatorProps?: ListboxItemIndicatorProps;
|
|
190
|
+
/**
|
|
191
|
+
* Props forwarded to the separator element.
|
|
192
|
+
*/
|
|
88
193
|
separatorProps?: ComboboxSeparatorProps;
|
|
89
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Emits for the autocomplete compact component.
|
|
197
|
+
*/
|
|
90
198
|
type AutocompleteCompactEmits<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> = AutocompleteRootEmits & {
|
|
199
|
+
/**
|
|
200
|
+
* Emitted when select occurs.
|
|
201
|
+
*/
|
|
91
202
|
select: [item: T];
|
|
92
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* Slots for the autocomplete compact component.
|
|
206
|
+
*/
|
|
93
207
|
type AutocompleteCompactSlots<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> = {
|
|
208
|
+
/**
|
|
209
|
+
* Custom content for the input leading slot.
|
|
210
|
+
*/
|
|
94
211
|
'input-leading'?: () => any;
|
|
212
|
+
/**
|
|
213
|
+
* Custom content for the input trailing slot.
|
|
214
|
+
*/
|
|
95
215
|
'input-trailing'?: () => any;
|
|
216
|
+
/**
|
|
217
|
+
* Custom content for the trigger icon slot.
|
|
218
|
+
*/
|
|
96
219
|
'trigger-icon'?: () => any;
|
|
220
|
+
/**
|
|
221
|
+
* Custom content for the empty slot.
|
|
222
|
+
*/
|
|
97
223
|
empty?: () => any;
|
|
224
|
+
/**
|
|
225
|
+
* Custom content for the group label slot.
|
|
226
|
+
*/
|
|
98
227
|
'group-label'?: (props: {
|
|
99
228
|
item: Extract<AutocompleteOptionData<T>, {
|
|
100
229
|
items: T[];
|
|
101
230
|
}>;
|
|
102
231
|
}) => any;
|
|
232
|
+
/**
|
|
233
|
+
* Custom content for the item leading slot.
|
|
234
|
+
*/
|
|
103
235
|
'item-leading'?: (props: {
|
|
104
236
|
item: T;
|
|
105
237
|
}) => any;
|
|
238
|
+
/**
|
|
239
|
+
* Custom content for the item text slot.
|
|
240
|
+
*/
|
|
106
241
|
'item-text'?: (props: {
|
|
107
242
|
item: T;
|
|
108
243
|
}) => any;
|
|
244
|
+
/**
|
|
245
|
+
* Custom content for the item trailing slot.
|
|
246
|
+
*/
|
|
109
247
|
'item-trailing'?: (props: {
|
|
110
248
|
item: T;
|
|
111
249
|
}) => any;
|
|
250
|
+
/**
|
|
251
|
+
* Custom content for the item indicator slot.
|
|
252
|
+
*/
|
|
112
253
|
'item-indicator'?: (props: {
|
|
113
254
|
item: T;
|
|
114
255
|
}) => any;
|
|
@@ -3,7 +3,13 @@ import { ImageLoadingStatus } from "../../types/dom.js";
|
|
|
3
3
|
import { HTMLAttributes, ImgHTMLAttributes } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/avatar/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Props for the avatar root component.
|
|
8
|
+
*/
|
|
6
9
|
interface AvatarRootProps extends /** @vue-ignore */HTMLAttributes {}
|
|
10
|
+
/**
|
|
11
|
+
* Props for the avatar image component.
|
|
12
|
+
*/
|
|
7
13
|
interface AvatarImageProps extends /** @vue-ignore */ImgHTMLAttributes {
|
|
8
14
|
/** The image source URL */
|
|
9
15
|
src: string;
|
|
@@ -12,6 +18,9 @@ interface AvatarImageProps extends /** @vue-ignore */ImgHTMLAttributes {
|
|
|
12
18
|
/** The cross-origin setting for the image */
|
|
13
19
|
crossorigin?: ImgHTMLAttributes['crossorigin'];
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Emits for the avatar image component.
|
|
23
|
+
*/
|
|
15
24
|
type AvatarImageEmits = {
|
|
16
25
|
/**
|
|
17
26
|
* Event handler called when the image loading status changes. This is useful for controlling what to render as the
|
|
@@ -19,6 +28,9 @@ type AvatarImageEmits = {
|
|
|
19
28
|
*/
|
|
20
29
|
loadingStatusChange: [status: ImageLoadingStatus];
|
|
21
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Props for the avatar fallback component.
|
|
33
|
+
*/
|
|
22
34
|
interface AvatarFallbackProps extends /** @vue-ignore */HTMLAttributes {
|
|
23
35
|
/**
|
|
24
36
|
* Useful for delaying rendering so it only appears for those with slower connections.
|
|
@@ -27,7 +39,13 @@ interface AvatarFallbackProps extends /** @vue-ignore */HTMLAttributes {
|
|
|
27
39
|
*/
|
|
28
40
|
delayMs?: number;
|
|
29
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Available UI slots for the avatar component.
|
|
44
|
+
*/
|
|
30
45
|
type AvatarUiSlot = 'root' | 'image' | 'fallback';
|
|
46
|
+
/**
|
|
47
|
+
* UI class overrides for the avatar component.
|
|
48
|
+
*/
|
|
31
49
|
type AvatarUi = UiClass<AvatarUiSlot>;
|
|
32
50
|
//#endregion
|
|
33
51
|
export { AvatarFallbackProps, AvatarImageEmits, AvatarImageProps, AvatarRootProps, AvatarUi, AvatarUiSlot };
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { AsTag } from "../primitive/types.js";
|
|
2
2
|
import { ButtonType } from "../button/types.js";
|
|
3
|
-
import {
|
|
3
|
+
import { BacktopProps } from "./types.js";
|
|
4
4
|
import * as _$vue from "vue";
|
|
5
|
+
import * as _$_vueuse_shared0 from "@vueuse/shared";
|
|
5
6
|
|
|
6
7
|
//#region src/components/backtop/backtop.vue.d.ts
|
|
8
|
+
declare function scrollToTop(): void;
|
|
7
9
|
declare var __VLS_10: {
|
|
8
10
|
visible: boolean;
|
|
9
11
|
};
|
|
10
12
|
type __VLS_Slots = {} & {
|
|
11
13
|
default?: (props: typeof __VLS_10) => any;
|
|
12
14
|
};
|
|
13
|
-
declare const __VLS_base: _$vue.DefineComponent<BacktopProps,
|
|
15
|
+
declare const __VLS_base: _$vue.DefineComponent<BacktopProps, {
|
|
16
|
+
visible: _$vue.ShallowRef<boolean, boolean>;
|
|
17
|
+
scrollToTop: typeof scrollToTop;
|
|
18
|
+
updateVisibility: _$_vueuse_shared0.Fn;
|
|
19
|
+
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
14
20
|
change: (visible: boolean) => any;
|
|
15
21
|
click: (event: MouseEvent) => any;
|
|
16
22
|
}, string, _$vue.PublicProps, Readonly<BacktopProps> & Readonly<{
|
|
@@ -19,8 +25,8 @@ declare const __VLS_base: _$vue.DefineComponent<BacktopProps, BacktopExposed, {}
|
|
|
19
25
|
}>, {
|
|
20
26
|
type: ButtonType;
|
|
21
27
|
as: AsTag | _$vue.Component;
|
|
22
|
-
duration: number;
|
|
23
28
|
visibilityHeight: number;
|
|
29
|
+
duration: number;
|
|
24
30
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
25
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
32
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BacktopEmits,
|
|
1
|
+
import { BacktopEmits, BacktopProps, BacktopState, BacktopTarget } from "./types.js";
|
|
2
2
|
import { _default } from "./backtop.vue.js";
|
|
3
|
-
export { _default as Backtop, type BacktopEmits, type
|
|
3
|
+
export { _default as Backtop, type BacktopEmits, type BacktopProps, type BacktopState, type BacktopTarget };
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { AffixTarget } from "../affix/types.js";
|
|
2
2
|
import { ButtonProps } from "../button/types.js";
|
|
3
|
-
import { ShallowRef } from "vue";
|
|
4
3
|
|
|
5
4
|
//#region src/components/backtop/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Type information for the backtop target component.
|
|
7
|
+
*/
|
|
6
8
|
type BacktopTarget = AffixTarget;
|
|
9
|
+
/**
|
|
10
|
+
* State values for the backtop component.
|
|
11
|
+
*/
|
|
12
|
+
type BacktopState = 'visible' | 'hidden';
|
|
13
|
+
/**
|
|
14
|
+
* Props for the backtop component.
|
|
15
|
+
*/
|
|
7
16
|
interface BacktopProps extends /** @vue-ignore */Omit<ButtonProps, 'onChange'> {
|
|
8
17
|
/**
|
|
9
18
|
* Scroll distance that must be reached before the Backtop button becomes visible.
|
|
@@ -24,20 +33,18 @@ interface BacktopProps extends /** @vue-ignore */Omit<ButtonProps, 'onChange'> {
|
|
|
24
33
|
*/
|
|
25
34
|
duration?: number;
|
|
26
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Emits for the backtop component.
|
|
38
|
+
*/
|
|
27
39
|
type BacktopEmits = {
|
|
28
|
-
change: [visible: boolean];
|
|
29
|
-
click: [event: MouseEvent];
|
|
30
|
-
};
|
|
31
|
-
interface BacktopExposed {
|
|
32
|
-
visible: ShallowRef<boolean>;
|
|
33
40
|
/**
|
|
34
|
-
*
|
|
41
|
+
* Emitted when change occurs.
|
|
35
42
|
*/
|
|
36
|
-
|
|
43
|
+
change: [visible: boolean];
|
|
37
44
|
/**
|
|
38
|
-
*
|
|
45
|
+
* Emitted when click occurs.
|
|
39
46
|
*/
|
|
40
|
-
|
|
41
|
-
}
|
|
47
|
+
click: [event: MouseEvent];
|
|
48
|
+
};
|
|
42
49
|
//#endregion
|
|
43
|
-
export { BacktopEmits,
|
|
50
|
+
export { BacktopEmits, BacktopProps, BacktopState, BacktopTarget };
|
|
@@ -2,14 +2,35 @@ import { UiClass } from "../../types/common.js";
|
|
|
2
2
|
import { HTMLAttributes, ShallowRef } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/badge/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the badge root component.
|
|
7
|
+
*/
|
|
5
8
|
interface BadgeRootProps extends /** @vue-ignore */HTMLAttributes {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the component is open.
|
|
11
|
+
*/
|
|
6
12
|
open?: boolean;
|
|
7
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Emits for the badge root component.
|
|
16
|
+
*/
|
|
8
17
|
type BadgeRootEmits = {
|
|
18
|
+
/**
|
|
19
|
+
* Emitted when the open state changes.
|
|
20
|
+
*/
|
|
9
21
|
'update:open': [open: boolean];
|
|
10
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Props for the badge content component.
|
|
25
|
+
*/
|
|
11
26
|
interface BadgeContentProps extends /** @vue-ignore */HTMLAttributes {}
|
|
27
|
+
/**
|
|
28
|
+
* Available UI slots for the badge component.
|
|
29
|
+
*/
|
|
12
30
|
type BadgeUiSlot = 'root' | 'content';
|
|
31
|
+
/**
|
|
32
|
+
* UI class overrides for the badge component.
|
|
33
|
+
*/
|
|
13
34
|
type BadgeUi = UiClass<BadgeUiSlot>;
|
|
14
35
|
//#endregion
|
|
15
36
|
export { BadgeContentProps, BadgeRootEmits, BadgeRootProps, BadgeUi, BadgeUiSlot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import{useOmitProps as t}from"../../composables/use-props.js";import"../../composables/index.js";import n from"../_icon/icon.js";import r from"../portal/portal.js";import i from"../dialog/dialog-close.js";import a from"../dialog/dialog-content.js";import o from"../dialog/dialog-description.js";import s from"../dialog/dialog-footer.js";import c from"../dialog/dialog-header.js";import l from"../dialog/dialog-title.js";import u from"../dialog/dialog-trigger.js";import d from"../dialog/dialog-cancel.js";import f from"../dialog/dialog-confirm.js";import"../dialog/index.js";import{useBottomSheetUi as p}from"./context.js";import m from"./bottom-sheet-root.js";import h from"./bottom-sheet-root-nested.js";import g from"./bottom-sheet-popup.js";import _ from"./bottom-sheet-overlay.js";import v from"./bottom-sheet-handle.js";import{computed as y,createBlock as b,createCommentVNode as x,createElementVNode as S,createTextVNode as C,createVNode as w,defineComponent as T,guardReactiveProps as E,mergeProps as D,normalizeClass as O,normalizeProps as k,openBlock as A,renderSlot as j,resolveDynamicComponent as M,toDisplayString as N,toHandlers as P,unref as F,useSlots as I,withCtx as L}from"vue";const R=T({name:`BottomSheetCompact`,__name:`bottom-sheet-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{default:`Cancel`},showConfirm:{type:Boolean,default:!0},confirmText:{default:`Confirm`},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},
|
|
1
|
+
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import{useOmitProps as t}from"../../composables/use-props.js";import"../../composables/index.js";import n from"../_icon/icon.js";import r from"../portal/portal.js";import i from"../dialog/dialog-close.js";import a from"../dialog/dialog-content.js";import o from"../dialog/dialog-description.js";import s from"../dialog/dialog-footer.js";import c from"../dialog/dialog-header.js";import l from"../dialog/dialog-title.js";import u from"../dialog/dialog-trigger.js";import d from"../dialog/dialog-cancel.js";import f from"../dialog/dialog-confirm.js";import"../dialog/index.js";import{useBottomSheetUi as p}from"./context.js";import m from"./bottom-sheet-root.js";import h from"./bottom-sheet-root-nested.js";import g from"./bottom-sheet-popup.js";import _ from"./bottom-sheet-overlay.js";import v from"./bottom-sheet-handle.js";import{computed as y,createBlock as b,createCommentVNode as x,createElementVNode as S,createTextVNode as C,createVNode as w,defineComponent as T,guardReactiveProps as E,mergeProps as D,normalizeClass as O,normalizeProps as k,openBlock as A,renderSlot as j,resolveDynamicComponent as M,toDisplayString as N,toHandlers as P,unref as F,useSlots as I,withCtx as L}from"vue";const R=T({name:`BottomSheetCompact`,__name:`bottom-sheet-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{default:`Cancel`},showConfirm:{type:Boolean,default:!0},confirmText:{default:`Confirm`},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},isAlert:{type:Boolean},alertType:{default:`default`},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean,default:!0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean,default:!0},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{},handleProps:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`confirm`,`cancel`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(T,{emit:R}){let z=T,B=t(z,[`title`,`description`,`icon`,`showClose`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`cancelProps`,`confirmProps`,`handleProps`]),V=R,H=I(),U=e(V),W=p(),G=y(()=>({...z.triggerProps,asChild:z.triggerProps?.asChild??!0})),K={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},q=y(()=>z.icon?z.icon:z.isAlert&&z.alertType?K[z.alertType]:null),J=y(()=>z.showConfirm??z.isAlert),Y=y(()=>typeof z.showCancel==`boolean`?z.showCancel:z.isAlert===!0&&z.alertType===`warning`),X=y(()=>z.pure?!1:H.footer?!0:Y.value||J.value);return(e,t)=>(A(),b(M(T.nested?h:m),D(F(B),{"onUpdate:open":t[4]||(t[4]=e=>V(`update:open`,e))}),{default:L(p=>[w(F(u),k(E(G.value)),{default:L(()=>[j(e.$slots,`trigger`,k(E(p)))]),_:2},1040),w(r,k(E(T.portalProps)),{default:L(()=>[w(_,k(E(T.overlayProps)),null,16),w(g,D(T.popupProps,P(F(U))),{default:L(()=>[w(v,k(E(T.handleProps)),null,16),T.pure?x(`v-if`,!0):(A(),b(F(c),k(D({key:0},T.headerProps)),{default:L(()=>[w(F(l),k(E(T.titleProps)),{default:L(()=>[q.value?(A(),b(n,{key:0,icon:q.value,class:O(F(W).icon)},null,8,[`icon`,`class`])):x(`v-if`,!0),j(e.$slots,`title`,k(E(p)),()=>[S(`span`,null,N(T.title),1)])]),_:2},1040),H.description||T.description?(A(),b(F(o),k(D({key:0},T.descriptionProps)),{default:L(()=>[j(e.$slots,`description`,k(E(p)),()=>[C(N(T.description),1)])]),_:2},1040)):x(`v-if`,!0),!T.isAlert&&T.showClose?(A(),b(F(i),{key:1,onClose:t[0]||(t[0]=e=>V(`close`))},{default:L(()=>[j(e.$slots,`close`,k(E(p)))]),_:2},1024)):x(`v-if`,!0)]),_:2},1040)),w(F(a),k(E(T.contentProps)),{default:L(()=>[j(e.$slots,`default`,k(E(p)))]),_:2},1040),T.pure&&!T.isAlert&&T.showClose?(A(),b(F(i),{key:1,onClose:t[1]||(t[1]=e=>V(`close`))},{default:L(()=>[j(e.$slots,`close`,k(E(p)))]),_:2},1024)):x(`v-if`,!0),X.value?(A(),b(F(s),k(D({key:2},T.footerProps)),{default:L(()=>[j(e.$slots,`footer`,k(E(p)),()=>[Y.value?(A(),b(F(d),D({key:0},T.cancelProps,{onCancel:t[2]||(t[2]=e=>V(`cancel`,e))}),{default:L(()=>[j(e.$slots,`cancel`,k(E(p)),()=>[C(N(T.cancelText),1)])]),_:2},1040)):x(`v-if`,!0),J.value?(A(),b(F(f),D({key:1},T.confirmProps,{onConfirm:t[3]||(t[3]=e=>V(`confirm`,e))}),{default:L(()=>[j(e.$slots,`confirm`,k(E(p)),()=>[C(N(T.confirmText),1)])]),_:2},1040)):x(`v-if`,!0)])]),_:2},1040)):x(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import"../../composables/index.js";import{useDrawerRootContext as t}from"./context.js";import n from"./bottom-sheet-root.js";import{createBlock as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,toHandlers as u,unref as d,withCtx as f}from"vue";const p=i({name:`BottomSheetRootNested`,__name:`bottom-sheet-root-nested`,props:{
|
|
1
|
+
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import"../../composables/index.js";import{useDrawerRootContext as t}from"./context.js";import n from"./bottom-sheet-root.js";import{createBlock as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,toHandlers as u,unref as d,withCtx as f}from"vue";const p=i({name:`BottomSheetRootNested`,__name:`bottom-sheet-root-nested`,props:{isAlert:{type:Boolean},alertType:{},open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:[`update:open`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(i,{emit:p}){let m=i,h=e(p),{onNestedDrag:g,onNestedOpenChange:_,onNestedRelease:v}=t(`BottomSheetRootNested`);function y(){_(!1)}function b(e){g(e)}function x(e){e&&_(e)}return(e,t)=>(c(),r(n,o(m,{nested:``},u(d(h)),{onClose:y,onDrag:b,onRelease:d(v),"onUpdate:open":x}),{default:f(t=>[l(e.$slots,`default`,s(a(t)))]),_:3},16,[`onRelease`]))}});export{p as default};
|
|
@@ -34,9 +34,9 @@ declare const __VLS_base: _$vue.DefineComponent<(DialogRootProps & {
|
|
|
34
34
|
handleOnly?: boolean;
|
|
35
35
|
preventScrollRestoration?: boolean;
|
|
36
36
|
} & WithoutFadeFromProps), {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
37
|
+
"update:open": (value: boolean) => any;
|
|
37
38
|
close: () => any;
|
|
38
39
|
drag: (percentageDragged: number) => any;
|
|
39
|
-
"update:open": (value: boolean) => any;
|
|
40
40
|
release: (open: boolean) => any;
|
|
41
41
|
"update:activeSnapPoint": (val: string | number | null) => any;
|
|
42
42
|
}, string, _$vue.PublicProps, Readonly<(DialogRootProps & {
|
|
@@ -66,9 +66,9 @@ declare const __VLS_base: _$vue.DefineComponent<(DialogRootProps & {
|
|
|
66
66
|
handleOnly?: boolean;
|
|
67
67
|
preventScrollRestoration?: boolean;
|
|
68
68
|
} & WithoutFadeFromProps)> & Readonly<{
|
|
69
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
69
70
|
onClose?: (() => any) | undefined;
|
|
70
71
|
onDrag?: ((percentageDragged: number) => any) | undefined;
|
|
71
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
72
72
|
onRelease?: ((open: boolean) => any) | undefined;
|
|
73
73
|
"onUpdate:activeSnapPoint"?: ((val: string | number | null) => any) | undefined;
|
|
74
74
|
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useControllableState as e}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import t from"../dialog/dialog-root.js";import"../dialog/index.js";import{CLOSE_THRESHOLD as n}from"./shared.js";import{provideDrawerRootContext as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,openBlock as s,renderSlot as c,toRefs as l,unref as u,withCtx as d}from"vue";const f=o({name:`BottomSheetRoot`,__name:`bottom-sheet-root`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},modal:{type:Boolean,default:!0},
|
|
1
|
+
import{useControllableState as e}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import t from"../dialog/dialog-root.js";import"../dialog/index.js";import{CLOSE_THRESHOLD as n}from"./shared.js";import{provideDrawerRootContext as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,openBlock as s,renderSlot as c,toRefs as l,unref as u,withCtx as d}from"vue";const f=o({name:`BottomSheetRoot`,__name:`bottom-sheet-root`,props:{isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},modal:{type:Boolean,default:!0},activeSnapPoint:{default:void 0},closeThreshold:{default:n},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:100},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},nested:{type:Boolean,default:!1},direction:{default:`bottom`},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:[`update:open`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(n,{emit:o}){let f=n,p=o,m=e(()=>f.open,e=>{p(`update:open`,e??!1)},f.defaultOpen),h=e(()=>f.activeSnapPoint,e=>{p(`update:activeSnapPoint`,e)},void 0),g=i(()=>f.fadeFromIndex??(f.snapPoints&&f.snapPoints.length-1)),_={emitDrag:e=>p(`drag`,e),emitRelease:e=>p(`release`,e),emitClose:()=>p(`close`),emitOpenChange:e=>{p(`update:open`,e)}},{closeDrawer:v,hasBeenOpened:y,modal:b,isOpen:x}=r({..._,...l(f),activeSnapPoint:h,fadeFromIndex:g,open:m});function S(e){if(f.open!==void 0){_.emitOpenChange(e);return}x.value=e,e?y.value=!0:v()}return(e,n)=>(s(),a(u(t),{open:u(x),modal:u(b),"onUpdate:open":S},{default:d(()=>[c(e.$slots,`default`,{open:u(x)})]),_:3},8,[`open`,`modal`]))}});export{f as default};
|
|
@@ -3,18 +3,51 @@ import { DialogCompactEmits, DialogCompactProps, DialogCompactSlots, DialogRootE
|
|
|
3
3
|
import { HTMLAttributes, Ref, ShallowRef } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/bottom-sheet/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Type information for the drawer direction component.
|
|
8
|
+
*/
|
|
6
9
|
type DrawerDirection = Side;
|
|
10
|
+
/**
|
|
11
|
+
* Props for the with fade from component.
|
|
12
|
+
*/
|
|
7
13
|
interface WithFadeFromProps {
|
|
14
|
+
/**
|
|
15
|
+
* Snap points.
|
|
16
|
+
*/
|
|
8
17
|
snapPoints: (number | string)[];
|
|
18
|
+
/**
|
|
19
|
+
* Fade from index.
|
|
20
|
+
*/
|
|
9
21
|
fadeFromIndex: number;
|
|
10
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for the without fade from component.
|
|
25
|
+
*/
|
|
11
26
|
interface WithoutFadeFromProps {
|
|
27
|
+
/**
|
|
28
|
+
* Snap points.
|
|
29
|
+
*/
|
|
12
30
|
snapPoints?: (number | string)[];
|
|
31
|
+
/**
|
|
32
|
+
* Fade from index.
|
|
33
|
+
*/
|
|
13
34
|
fadeFromIndex?: never;
|
|
14
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Props for the bottom sheet root component.
|
|
38
|
+
*/
|
|
15
39
|
type BottomSheetRootProps = DialogRootProps & {
|
|
40
|
+
/**
|
|
41
|
+
* Active snap point.
|
|
42
|
+
*/
|
|
16
43
|
activeSnapPoint?: number | string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Close threshold.
|
|
46
|
+
*/
|
|
17
47
|
closeThreshold?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the component should scale background.
|
|
50
|
+
*/
|
|
18
51
|
shouldScaleBackground?: boolean;
|
|
19
52
|
/**
|
|
20
53
|
* When `false` we don't change body's background color when the drawer is open.
|
|
@@ -22,35 +55,101 @@ type BottomSheetRootProps = DialogRootProps & {
|
|
|
22
55
|
* @default true
|
|
23
56
|
*/
|
|
24
57
|
setBackgroundColorOnScale?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Scroll lock timeout.
|
|
60
|
+
*/
|
|
25
61
|
scrollLockTimeout?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether fixed.
|
|
64
|
+
*/
|
|
26
65
|
fixed?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether dismissible.
|
|
68
|
+
*/
|
|
27
69
|
dismissible?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether nested.
|
|
72
|
+
*/
|
|
28
73
|
nested?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Direction.
|
|
76
|
+
*/
|
|
29
77
|
direction?: DrawerDirection; /** When `true` the `body` doesn't get any styles assigned from Vaul */
|
|
30
78
|
noBodyStyles?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Whether handle only.
|
|
81
|
+
*/
|
|
31
82
|
handleOnly?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether prevent scroll restoration.
|
|
85
|
+
*/
|
|
32
86
|
preventScrollRestoration?: boolean;
|
|
33
87
|
} & (WithFadeFromProps | WithoutFadeFromProps);
|
|
88
|
+
/**
|
|
89
|
+
* Emits for the bottom sheet root component.
|
|
90
|
+
*/
|
|
34
91
|
type BottomSheetRootEmits = DialogRootEmits & {
|
|
92
|
+
/**
|
|
93
|
+
* Emitted when drag occurs.
|
|
94
|
+
*/
|
|
35
95
|
drag: [percentageDragged: number];
|
|
96
|
+
/**
|
|
97
|
+
* Emitted when release occurs.
|
|
98
|
+
*/
|
|
36
99
|
release: [open: boolean];
|
|
100
|
+
/**
|
|
101
|
+
* Emitted when close occurs.
|
|
102
|
+
*/
|
|
37
103
|
close: [];
|
|
104
|
+
/**
|
|
105
|
+
* Emitted when the active snap point value changes.
|
|
106
|
+
*/
|
|
38
107
|
'update:activeSnapPoint': [val: string | number | null];
|
|
39
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* Slots for the bottom sheet root component.
|
|
111
|
+
*/
|
|
40
112
|
type BottomSheetRootSlots = {
|
|
113
|
+
/**
|
|
114
|
+
* Custom content for the default slot.
|
|
115
|
+
*/
|
|
41
116
|
default?: (props: {
|
|
42
117
|
open: boolean;
|
|
43
118
|
}) => any;
|
|
44
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* Props for the bottom sheet handle component.
|
|
122
|
+
*/
|
|
45
123
|
interface BottomSheetHandleProps extends /** @vue-ignore */HTMLAttributes {
|
|
124
|
+
/**
|
|
125
|
+
* Whether prevent cycle.
|
|
126
|
+
*/
|
|
46
127
|
preventCycle?: boolean;
|
|
47
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Props for the bottom sheet compact component.
|
|
131
|
+
*/
|
|
48
132
|
type BottomSheetCompactProps = DialogCompactProps & BottomSheetRootProps & {
|
|
133
|
+
/**
|
|
134
|
+
* Props forwarded to the handle element.
|
|
135
|
+
*/
|
|
49
136
|
handleProps?: BottomSheetHandleProps;
|
|
50
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Emits for the bottom sheet compact component.
|
|
140
|
+
*/
|
|
51
141
|
type BottomSheetCompactEmits = Omit<DialogCompactEmits, 'close'> & BottomSheetRootEmits;
|
|
142
|
+
/**
|
|
143
|
+
* Slots for the bottom sheet compact component.
|
|
144
|
+
*/
|
|
52
145
|
type BottomSheetCompactSlots = DialogCompactSlots;
|
|
146
|
+
/**
|
|
147
|
+
* Available UI slots for the bottom sheet component.
|
|
148
|
+
*/
|
|
53
149
|
type BottomSheetUiSlot = DialogUiSlot | 'handle';
|
|
150
|
+
/**
|
|
151
|
+
* UI class overrides for the bottom sheet component.
|
|
152
|
+
*/
|
|
54
153
|
type BottomSheetUi = UiClass<BottomSheetUiSlot>;
|
|
55
154
|
//#endregion
|
|
56
155
|
export { BottomSheetCompactEmits, BottomSheetCompactProps, BottomSheetCompactSlots, BottomSheetHandleProps, BottomSheetRootEmits, BottomSheetRootProps, BottomSheetRootSlots, BottomSheetUi, BottomSheetUiSlot, DrawerDirection, WithFadeFromProps, WithoutFadeFromProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreadcrumbCompactEmits, BreadcrumbCompactProps, BreadcrumbCompactSlots, BreadcrumbEllipsisProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbOptionData, BreadcrumbPageProps, BreadcrumbRootProps, BreadcrumbSeparatorProps, BreadcrumbUi, BreadcrumbUiSlot } from "./types.js";
|
|
1
|
+
import { BreadcrumbCompactEllipsisSlotProps, BreadcrumbCompactEmits, BreadcrumbCompactItemSlotProps, BreadcrumbCompactProps, BreadcrumbCompactSlots, BreadcrumbEllipsisProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbOptionData, BreadcrumbPageProps, BreadcrumbRootProps, BreadcrumbSeparatorProps, BreadcrumbUi, BreadcrumbUiSlot } from "./types.js";
|
|
2
2
|
import { _default as _default$6 } from "./breadcrumb-root.vue.js";
|
|
3
3
|
import { _default } from "./breadcrumb-compact.vue.js";
|
|
4
4
|
import { _default as _default$4 } from "./breadcrumb-list.vue.js";
|
|
@@ -8,4 +8,4 @@ import { _default as _default$5 } from "./breadcrumb-page.vue.js";
|
|
|
8
8
|
import { _default as _default$7 } from "./breadcrumb-separator.vue.js";
|
|
9
9
|
import { _default as _default$1 } from "./breadcrumb-ellipsis.vue.js";
|
|
10
10
|
import { provideBreadcrumbUi } from "./context.js";
|
|
11
|
-
export { _default as BreadcrumbCompact, type BreadcrumbCompactEmits, type BreadcrumbCompactProps, type BreadcrumbCompactSlots, _default$1 as BreadcrumbEllipsis, type BreadcrumbEllipsisProps, _default$2 as BreadcrumbItem, type BreadcrumbItemProps, _default$3 as BreadcrumbLink, type BreadcrumbLinkProps, _default$4 as BreadcrumbList, type BreadcrumbListProps, type BreadcrumbOptionData, _default$5 as BreadcrumbPage, type BreadcrumbPageProps, _default$6 as BreadcrumbRoot, type BreadcrumbRootProps, _default$7 as BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbUi, type BreadcrumbUiSlot, provideBreadcrumbUi };
|
|
11
|
+
export { _default as BreadcrumbCompact, type BreadcrumbCompactEllipsisSlotProps, type BreadcrumbCompactEmits, type BreadcrumbCompactItemSlotProps, type BreadcrumbCompactProps, type BreadcrumbCompactSlots, _default$1 as BreadcrumbEllipsis, type BreadcrumbEllipsisProps, _default$2 as BreadcrumbItem, type BreadcrumbItemProps, _default$3 as BreadcrumbLink, type BreadcrumbLinkProps, _default$4 as BreadcrumbList, type BreadcrumbListProps, type BreadcrumbOptionData, _default$5 as BreadcrumbPage, type BreadcrumbPageProps, _default$6 as BreadcrumbRoot, type BreadcrumbRootProps, _default$7 as BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbUi, type BreadcrumbUiSlot, provideBreadcrumbUi };
|