@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
|
@@ -9,85 +9,286 @@ import { TimePickerOption } from "../../shared/time-picker.js";
|
|
|
9
9
|
import { ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/components/time-range-picker/types.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Props for the time range picker root component.
|
|
14
|
+
*/
|
|
12
15
|
interface TimeRangePickerRootProps extends PrimitiveProps, FormFieldCommonProps, /** @vue-ignore */Omit<HTMLAttributes, 'placeholder'> {
|
|
16
|
+
/**
|
|
17
|
+
* Default value.
|
|
18
|
+
*/
|
|
13
19
|
defaultValue?: TimeRange;
|
|
20
|
+
/**
|
|
21
|
+
* Default placeholder.
|
|
22
|
+
*/
|
|
14
23
|
defaultPlaceholder?: TimeValue;
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder.
|
|
26
|
+
*/
|
|
15
27
|
placeholder?: TimeValue;
|
|
28
|
+
/**
|
|
29
|
+
* Current model value.
|
|
30
|
+
*/
|
|
16
31
|
modelValue?: TimeRange;
|
|
32
|
+
/**
|
|
33
|
+
* Hour cycle.
|
|
34
|
+
*/
|
|
17
35
|
hourCycle?: HourCycle;
|
|
36
|
+
/**
|
|
37
|
+
* Step.
|
|
38
|
+
*/
|
|
18
39
|
step?: DateStep;
|
|
40
|
+
/**
|
|
41
|
+
* Granularity.
|
|
42
|
+
*/
|
|
19
43
|
granularity?: TimeGranularity;
|
|
44
|
+
/**
|
|
45
|
+
* Whether hide time zone.
|
|
46
|
+
*/
|
|
20
47
|
hideTimeZone?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Max value.
|
|
50
|
+
*/
|
|
21
51
|
maxValue?: TimeValue;
|
|
52
|
+
/**
|
|
53
|
+
* Min value.
|
|
54
|
+
*/
|
|
22
55
|
minValue?: TimeValue;
|
|
56
|
+
/**
|
|
57
|
+
* Locale.
|
|
58
|
+
*/
|
|
23
59
|
locale?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the component is disabled.
|
|
62
|
+
*/
|
|
24
63
|
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the component is readonly.
|
|
66
|
+
*/
|
|
25
67
|
readonly?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the time is unavailable.
|
|
70
|
+
*/
|
|
26
71
|
isTimeUnavailable?: TimeMatcher;
|
|
72
|
+
/**
|
|
73
|
+
* Id.
|
|
74
|
+
*/
|
|
27
75
|
id?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Reading direction of the component.
|
|
78
|
+
*/
|
|
28
79
|
dir?: Direction;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the component is open by default.
|
|
82
|
+
*/
|
|
29
83
|
defaultOpen?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the component is open.
|
|
86
|
+
*/
|
|
30
87
|
open?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Whether the popup is modal.
|
|
90
|
+
*/
|
|
31
91
|
modal?: boolean;
|
|
32
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Emits for the time range picker root component.
|
|
95
|
+
*/
|
|
33
96
|
type TimeRangePickerRootEmits = {
|
|
97
|
+
/**
|
|
98
|
+
* Emitted when the model value changes.
|
|
99
|
+
*/
|
|
34
100
|
'update:modelValue': [range: TimeRange];
|
|
101
|
+
/**
|
|
102
|
+
* Emitted when the placeholder value changes.
|
|
103
|
+
*/
|
|
35
104
|
'update:placeholder': [time: TimeValue];
|
|
105
|
+
/**
|
|
106
|
+
* Emitted when the start value changes.
|
|
107
|
+
*/
|
|
36
108
|
'update:startValue': [time: TimeValue | undefined];
|
|
109
|
+
/**
|
|
110
|
+
* Emitted when the end value changes.
|
|
111
|
+
*/
|
|
37
112
|
'update:endValue': [time: TimeValue | undefined];
|
|
113
|
+
/**
|
|
114
|
+
* Emitted when the open state changes.
|
|
115
|
+
*/
|
|
38
116
|
'update:open': [open: boolean];
|
|
39
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* Props for the time range picker trigger component.
|
|
120
|
+
*/
|
|
40
121
|
interface TimeRangePickerTriggerProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
122
|
+
/**
|
|
123
|
+
* Props for the time range picker popup component.
|
|
124
|
+
*/
|
|
41
125
|
interface TimeRangePickerPopupProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
126
|
+
/**
|
|
127
|
+
* Context for the time range picker root component.
|
|
128
|
+
*/
|
|
42
129
|
interface TimeRangePickerRootContext extends PropsToContext<TimeRangePickerRootProps, 'disabled' | 'readonly'> {
|
|
130
|
+
/**
|
|
131
|
+
* Locale used by the component context.
|
|
132
|
+
*/
|
|
43
133
|
locale: ComputedRef<string>;
|
|
134
|
+
/**
|
|
135
|
+
* Reading direction of the component.
|
|
136
|
+
*/
|
|
44
137
|
dir: ComputedRef<Direction>;
|
|
138
|
+
/**
|
|
139
|
+
* Current model value.
|
|
140
|
+
*/
|
|
45
141
|
modelValue: ShallowRef<TimeRange>;
|
|
142
|
+
/**
|
|
143
|
+
* Placeholder used by the component context.
|
|
144
|
+
*/
|
|
46
145
|
placeholder: ShallowRef<TimeValue>;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the time is unavailable.
|
|
148
|
+
*/
|
|
47
149
|
isTimeUnavailable?: TimeMatcher;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the current value is invalid.
|
|
152
|
+
*/
|
|
48
153
|
isInvalid: ComputedRef<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Formatter used by the component context.
|
|
156
|
+
*/
|
|
49
157
|
formatter: Formatter;
|
|
158
|
+
/**
|
|
159
|
+
* Granularity used by the component context.
|
|
160
|
+
*/
|
|
50
161
|
granularity: ComputedRef<TimeGranularity>;
|
|
162
|
+
/**
|
|
163
|
+
* Hour cycle used by the component context.
|
|
164
|
+
*/
|
|
51
165
|
hourCycle: HourCycle;
|
|
166
|
+
/**
|
|
167
|
+
* Whether hide time zone.
|
|
168
|
+
*/
|
|
52
169
|
hideTimeZone: ComputedRef<boolean>;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the component is open.
|
|
172
|
+
*/
|
|
53
173
|
open: ShallowRef<boolean | undefined>;
|
|
174
|
+
/**
|
|
175
|
+
* Popup id used by the component context.
|
|
176
|
+
*/
|
|
54
177
|
popupId: string;
|
|
178
|
+
/**
|
|
179
|
+
* Display value used by the component context.
|
|
180
|
+
*/
|
|
55
181
|
displayValue: ComputedRef<string>;
|
|
182
|
+
/**
|
|
183
|
+
* Focused time used by the component context.
|
|
184
|
+
*/
|
|
56
185
|
focusedTime: ShallowRef<TimeValue>;
|
|
186
|
+
/**
|
|
187
|
+
* Hovered time used by the component context.
|
|
188
|
+
*/
|
|
57
189
|
hoveredTime: ShallowRef<TimeValue | undefined>;
|
|
190
|
+
/**
|
|
191
|
+
* Options used by the component context.
|
|
192
|
+
*/
|
|
58
193
|
options: ComputedRef<TimePickerOption[]>;
|
|
194
|
+
/**
|
|
195
|
+
* Min value used by the component context.
|
|
196
|
+
*/
|
|
59
197
|
minValue: ComputedRef<TimeValue | undefined>;
|
|
198
|
+
/**
|
|
199
|
+
* Max value used by the component context.
|
|
200
|
+
*/
|
|
60
201
|
maxValue: ComputedRef<TimeValue | undefined>;
|
|
202
|
+
/**
|
|
203
|
+
* Callback invoked when the range changes.
|
|
204
|
+
*/
|
|
61
205
|
onRangeChange: (time: TimeValue) => void;
|
|
206
|
+
/**
|
|
207
|
+
* Callback invoked when the placeholder changes.
|
|
208
|
+
*/
|
|
62
209
|
onPlaceholderChange: (time: TimeValue) => void;
|
|
210
|
+
/**
|
|
211
|
+
* Whether the time is disabled.
|
|
212
|
+
*/
|
|
63
213
|
isTimeDisabled: (time: TimeValue) => boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Whether the time is selected.
|
|
216
|
+
*/
|
|
64
217
|
isTimeSelected: (time: TimeValue) => boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Whether the time is highlighted.
|
|
220
|
+
*/
|
|
65
221
|
isTimeHighlighted: (time: TimeValue) => boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Whether a range start.
|
|
224
|
+
*/
|
|
66
225
|
isRangeStart: (time: TimeValue) => boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Whether a range end.
|
|
228
|
+
*/
|
|
67
229
|
isRangeEnd: (time: TimeValue) => boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Set open used by the component context.
|
|
232
|
+
*/
|
|
68
233
|
setOpen: (value: boolean) => void;
|
|
234
|
+
/**
|
|
235
|
+
* Set focused time used by the component context.
|
|
236
|
+
*/
|
|
69
237
|
setFocusedTime: (time: TimeValue) => void;
|
|
238
|
+
/**
|
|
239
|
+
* Set hovered time used by the component context.
|
|
240
|
+
*/
|
|
70
241
|
setHoveredTime: (time: TimeValue | undefined) => void;
|
|
71
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Available UI slots for the time range picker component.
|
|
245
|
+
*/
|
|
72
246
|
type TimeRangePickerUiSlot = 'root' | 'trigger' | 'popup' | 'list' | 'cellTrigger';
|
|
247
|
+
/**
|
|
248
|
+
* UI class overrides for the time range picker component.
|
|
249
|
+
*/
|
|
73
250
|
type TimeRangePickerUi = UiClass<TimeRangePickerUiSlot>;
|
|
251
|
+
/**
|
|
252
|
+
* Props for the time range picker compact component.
|
|
253
|
+
*/
|
|
74
254
|
interface TimeRangePickerCompactProps extends TimeRangePickerRootProps {
|
|
255
|
+
/**
|
|
256
|
+
* Props forwarded to the trigger element.
|
|
257
|
+
*/
|
|
75
258
|
triggerProps?: TimeRangePickerTriggerProps;
|
|
259
|
+
/**
|
|
260
|
+
* Props forwarded to the popup element.
|
|
261
|
+
*/
|
|
76
262
|
popupProps?: TimeRangePickerPopupProps;
|
|
77
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Emits for the time range picker compact component.
|
|
266
|
+
*/
|
|
78
267
|
type TimeRangePickerCompactEmits = TimeRangePickerRootEmits;
|
|
268
|
+
/**
|
|
269
|
+
* Slots for the time range picker compact component.
|
|
270
|
+
*/
|
|
79
271
|
type TimeRangePickerCompactSlots = {
|
|
272
|
+
/**
|
|
273
|
+
* Custom content for the default slot.
|
|
274
|
+
*/
|
|
80
275
|
default?: (props: {
|
|
81
276
|
modelValue: TimeRange;
|
|
82
277
|
placeholder: TimeValue;
|
|
83
278
|
displayValue: string;
|
|
84
279
|
open: boolean;
|
|
85
280
|
}) => any;
|
|
281
|
+
/**
|
|
282
|
+
* Custom content for the trigger slot.
|
|
283
|
+
*/
|
|
86
284
|
trigger?: (props: {
|
|
87
285
|
displayValue: string;
|
|
88
286
|
modelValue: TimeRange;
|
|
89
287
|
open: boolean;
|
|
90
288
|
}) => any;
|
|
289
|
+
/**
|
|
290
|
+
* Custom content for the time slot.
|
|
291
|
+
*/
|
|
91
292
|
time?: (props: {
|
|
92
293
|
label: string;
|
|
93
294
|
time: TimeValue;
|
|
@@ -9,10 +9,10 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
declare const __VLS_base: _$vue.DefineComponent<ToasterProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
|
|
10
10
|
offset: ToastOffset;
|
|
11
11
|
duration: number;
|
|
12
|
-
|
|
12
|
+
position: ToastPosition;
|
|
13
13
|
hotkey: string[];
|
|
14
14
|
containerAriaLabel: string;
|
|
15
|
-
|
|
15
|
+
gap: number;
|
|
16
16
|
visibleCounts: number;
|
|
17
17
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -3,104 +3,324 @@ import { Direction, Side, SwipeDirection, UiClass } from "../../types/common.js"
|
|
|
3
3
|
import { ComputedRef, HTMLAttributes, LiHTMLAttributes, OlHTMLAttributes, ShallowRef, VNode } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/toast/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Supported toast values.
|
|
8
|
+
*/
|
|
6
9
|
type ToastType = 'default' | 'success' | 'info' | 'warning' | 'error' | 'loading';
|
|
10
|
+
/**
|
|
11
|
+
* Supported toast icon values.
|
|
12
|
+
*/
|
|
7
13
|
type ToastIconType = Exclude<ToastType, 'default'> | 'close';
|
|
14
|
+
/**
|
|
15
|
+
* Type information for the toast position component.
|
|
16
|
+
*/
|
|
8
17
|
type ToastPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
|
|
18
|
+
/**
|
|
19
|
+
* Type information for the toast offset component.
|
|
20
|
+
*/
|
|
9
21
|
type ToastOffset = Partial<Record<Side, number>> | number;
|
|
22
|
+
/**
|
|
23
|
+
* Type information for the toast promise component.
|
|
24
|
+
*/
|
|
10
25
|
type ToastPromise<Data = any> = Promise<Data> | (() => Promise<Data>);
|
|
26
|
+
/**
|
|
27
|
+
* Type information for the toast t component.
|
|
28
|
+
*/
|
|
11
29
|
interface ToastT {
|
|
30
|
+
/**
|
|
31
|
+
* Id.
|
|
32
|
+
*/
|
|
12
33
|
id: number | string;
|
|
34
|
+
/**
|
|
35
|
+
* Toaster id.
|
|
36
|
+
*/
|
|
13
37
|
toasterId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Type.
|
|
40
|
+
*/
|
|
14
41
|
type?: ToastType;
|
|
42
|
+
/**
|
|
43
|
+
* Per-slot class overrides for the component.
|
|
44
|
+
*/
|
|
15
45
|
ui?: Partial<ToastUi>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether rich color.
|
|
48
|
+
*/
|
|
16
49
|
richColor?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether inverted.
|
|
52
|
+
*/
|
|
17
53
|
inverted?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Position.
|
|
56
|
+
*/
|
|
18
57
|
position?: ToastPosition;
|
|
58
|
+
/**
|
|
59
|
+
* Duration.
|
|
60
|
+
*/
|
|
19
61
|
duration?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether dismissible.
|
|
64
|
+
*/
|
|
20
65
|
dismissible?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Title text rendered by the component.
|
|
68
|
+
*/
|
|
21
69
|
title?: VNode | string;
|
|
70
|
+
/**
|
|
71
|
+
* Description text rendered by the component.
|
|
72
|
+
*/
|
|
22
73
|
description?: VNode | string;
|
|
74
|
+
/**
|
|
75
|
+
* Icon rendered by the component.
|
|
76
|
+
*/
|
|
23
77
|
icon?: IconValue;
|
|
78
|
+
/**
|
|
79
|
+
* Content.
|
|
80
|
+
*/
|
|
24
81
|
content?: VNode;
|
|
82
|
+
/**
|
|
83
|
+
* Action.
|
|
84
|
+
*/
|
|
25
85
|
action?: VNode | string;
|
|
86
|
+
/**
|
|
87
|
+
* Whether the component can cel.
|
|
88
|
+
*/
|
|
26
89
|
cancel?: VNode | string;
|
|
90
|
+
/**
|
|
91
|
+
* Callback invoked when the action event fires.
|
|
92
|
+
*/
|
|
27
93
|
onAction?: (event: MouseEvent) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Callback invoked when the cancel event fires.
|
|
96
|
+
*/
|
|
28
97
|
onCancel?: (event: MouseEvent) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Whether to show a close.
|
|
100
|
+
*/
|
|
29
101
|
showClose?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Whether delete.
|
|
104
|
+
*/
|
|
30
105
|
delete?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Custom.
|
|
108
|
+
*/
|
|
31
109
|
custom?: VNode;
|
|
110
|
+
/**
|
|
111
|
+
* Promise.
|
|
112
|
+
*/
|
|
32
113
|
promise?: ToastPromise;
|
|
114
|
+
/**
|
|
115
|
+
* Callback invoked when the dismiss event fires.
|
|
116
|
+
*/
|
|
33
117
|
onDismiss?: (toast: ToastT) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Callback invoked when the auto close event fires.
|
|
120
|
+
*/
|
|
34
121
|
onAutoClose?: (toast: ToastT) => void;
|
|
122
|
+
/**
|
|
123
|
+
* Test id.
|
|
124
|
+
*/
|
|
35
125
|
testId?: string;
|
|
36
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Type information for the toast external component.
|
|
129
|
+
*/
|
|
37
130
|
interface ToastExternal extends Omit<ToastT, 'id' | 'type' | 'title' | 'content' | 'custom' | 'promise' | 'delete'> {
|
|
131
|
+
/**
|
|
132
|
+
* Id.
|
|
133
|
+
*/
|
|
38
134
|
id?: number | string;
|
|
39
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Type information for the toast create options component.
|
|
138
|
+
*/
|
|
40
139
|
interface ToastCreateOptions extends Omit<ToastT, 'id' | 'delete' | 'title'> {
|
|
140
|
+
/**
|
|
141
|
+
* Id.
|
|
142
|
+
*/
|
|
41
143
|
id?: number | string;
|
|
144
|
+
/**
|
|
145
|
+
* Message.
|
|
146
|
+
*/
|
|
42
147
|
message?: VNode | string;
|
|
43
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Props for the toaster component.
|
|
151
|
+
*/
|
|
44
152
|
interface ToasterProps extends /** @vue-ignore */OlHTMLAttributes {
|
|
153
|
+
/**
|
|
154
|
+
* Id.
|
|
155
|
+
*/
|
|
45
156
|
id?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Reading direction of the component.
|
|
159
|
+
*/
|
|
46
160
|
dir?: Direction;
|
|
161
|
+
/**
|
|
162
|
+
* Hotkey.
|
|
163
|
+
*/
|
|
47
164
|
hotkey?: string[];
|
|
165
|
+
/**
|
|
166
|
+
* Custom aria label.
|
|
167
|
+
*/
|
|
48
168
|
customAriaLabel?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Container aria label.
|
|
171
|
+
*/
|
|
49
172
|
containerAriaLabel?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Position.
|
|
175
|
+
*/
|
|
50
176
|
position?: ToastPosition;
|
|
177
|
+
/**
|
|
178
|
+
* Whether default expanded.
|
|
179
|
+
*/
|
|
51
180
|
defaultExpanded?: boolean;
|
|
52
181
|
/**
|
|
53
182
|
* The duration (in milliseconds) before the toast automatically closes. Set to `0` or `Infinity` to disable auto-dismissal.
|
|
54
|
-
*
|
|
55
|
-
* [自动关闭前的持续时间(以毫秒为单位)。设置为 `0` 或 `Infinity` 可禁用自动关闭。]
|
|
56
183
|
*/
|
|
57
184
|
duration?: number;
|
|
185
|
+
/**
|
|
186
|
+
* Gap.
|
|
187
|
+
*/
|
|
58
188
|
gap?: number;
|
|
59
189
|
/**
|
|
60
|
-
* The maximum number of visible toasts per position.
|
|
190
|
+
* The maximum number of visible toasts per position.
|
|
61
191
|
*
|
|
62
192
|
* @default 3
|
|
63
193
|
*/
|
|
64
194
|
offset?: ToastOffset;
|
|
195
|
+
/**
|
|
196
|
+
* Visible counts.
|
|
197
|
+
*/
|
|
65
198
|
visibleCounts?: number;
|
|
199
|
+
/**
|
|
200
|
+
* Swipe directions.
|
|
201
|
+
*/
|
|
66
202
|
swipeDirections?: SwipeDirection[];
|
|
203
|
+
/**
|
|
204
|
+
* Whether to show an icon.
|
|
205
|
+
*/
|
|
67
206
|
showIcon?: boolean;
|
|
68
207
|
/**
|
|
69
|
-
* Whether to show the close button on the toast.
|
|
208
|
+
* Whether to show the close button on the toast.
|
|
70
209
|
*
|
|
71
210
|
* @default true
|
|
72
211
|
*/
|
|
73
212
|
showClose?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Icons.
|
|
215
|
+
*/
|
|
74
216
|
icons?: Partial<Record<ToastIconType, IconValue>>;
|
|
217
|
+
/**
|
|
218
|
+
* Props forwarded to the toast element.
|
|
219
|
+
*/
|
|
75
220
|
toastProps?: LiHTMLAttributes;
|
|
221
|
+
/**
|
|
222
|
+
* Props forwarded to the wrapper element.
|
|
223
|
+
*/
|
|
76
224
|
wrapperProps?: HTMLAttributes;
|
|
225
|
+
/**
|
|
226
|
+
* Props forwarded to the content element.
|
|
227
|
+
*/
|
|
77
228
|
contentProps?: HTMLAttributes;
|
|
229
|
+
/**
|
|
230
|
+
* Props forwarded to the title element.
|
|
231
|
+
*/
|
|
78
232
|
titleProps?: HTMLAttributes;
|
|
233
|
+
/**
|
|
234
|
+
* Props forwarded to the description element.
|
|
235
|
+
*/
|
|
79
236
|
descriptionProps?: HTMLAttributes;
|
|
237
|
+
/**
|
|
238
|
+
* Props forwarded to the icon component.
|
|
239
|
+
*/
|
|
80
240
|
iconProps?: HTMLAttributes;
|
|
241
|
+
/**
|
|
242
|
+
* Props forwarded to the footer element.
|
|
243
|
+
*/
|
|
81
244
|
footerProps?: HTMLAttributes;
|
|
245
|
+
/**
|
|
246
|
+
* Props forwarded to the action element.
|
|
247
|
+
*/
|
|
82
248
|
actionProps?: HTMLAttributes;
|
|
249
|
+
/**
|
|
250
|
+
* Props forwarded to the cancel element.
|
|
251
|
+
*/
|
|
83
252
|
cancelProps?: HTMLAttributes;
|
|
253
|
+
/**
|
|
254
|
+
* Props forwarded to the close element.
|
|
255
|
+
*/
|
|
84
256
|
closeProps?: HTMLAttributes;
|
|
85
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Props for the toast provider component.
|
|
260
|
+
*/
|
|
86
261
|
interface ToastProviderProps extends ToasterProps {}
|
|
262
|
+
/**
|
|
263
|
+
* Type information for the toast dismiss component.
|
|
264
|
+
*/
|
|
87
265
|
interface ToastDismiss {
|
|
266
|
+
/**
|
|
267
|
+
* Id.
|
|
268
|
+
*/
|
|
88
269
|
id: number | string;
|
|
270
|
+
/**
|
|
271
|
+
* Whether dismiss.
|
|
272
|
+
*/
|
|
89
273
|
dismiss: boolean;
|
|
90
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Type information for the toast or dismiss component.
|
|
277
|
+
*/
|
|
91
278
|
type ToastOrDismiss = ToastT | ToastDismiss;
|
|
279
|
+
/**
|
|
280
|
+
* Type information for the toast promise result component.
|
|
281
|
+
*/
|
|
92
282
|
interface ToastPromiseResult extends ToastExternal {
|
|
283
|
+
/**
|
|
284
|
+
* Message.
|
|
285
|
+
*/
|
|
93
286
|
message: VNode | string;
|
|
94
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* Type information for the toast promise resolver component.
|
|
290
|
+
*/
|
|
95
291
|
type ToastPromiseResolver<Result, Data = any> = Result | ((data: Data) => Result | Promise<Result>);
|
|
292
|
+
/**
|
|
293
|
+
* Type information for the toast promise data component.
|
|
294
|
+
*/
|
|
96
295
|
type ToastPromiseData<ToastData = any> = Omit<ToastExternal, 'description'> & {
|
|
296
|
+
/**
|
|
297
|
+
* Whether the component is loading.
|
|
298
|
+
*/
|
|
97
299
|
loading?: VNode | string;
|
|
300
|
+
/**
|
|
301
|
+
* Success.
|
|
302
|
+
*/
|
|
98
303
|
success?: ToastPromiseResolver<ToastPromiseResult | VNode | string, ToastData>;
|
|
304
|
+
/**
|
|
305
|
+
* Error.
|
|
306
|
+
*/
|
|
99
307
|
error?: ToastPromiseResolver<ToastPromiseResult | VNode | string>;
|
|
308
|
+
/**
|
|
309
|
+
* Description text rendered by the component.
|
|
310
|
+
*/
|
|
100
311
|
description?: ToastPromiseResolver<VNode | string>;
|
|
312
|
+
/**
|
|
313
|
+
* Finally.
|
|
314
|
+
*/
|
|
101
315
|
finally?: () => void | Promise<void>;
|
|
102
316
|
};
|
|
317
|
+
/**
|
|
318
|
+
* Available UI slots for the toast component.
|
|
319
|
+
*/
|
|
103
320
|
type ToastUiSlot = 'toaster' | 'toast' | 'wrapper' | 'content' | 'title' | 'description' | 'icon' | 'footer' | 'action' | 'cancel' | 'close';
|
|
321
|
+
/**
|
|
322
|
+
* UI class overrides for the toast component.
|
|
323
|
+
*/
|
|
104
324
|
type ToastUi = UiClass<ToastUiSlot>;
|
|
105
325
|
//#endregion
|
|
106
326
|
export { ToastCreateOptions, ToastExternal, ToastIconType, ToastOffset, ToastOrDismiss, ToastPosition, ToastPromise, ToastPromiseData, ToastProviderProps, ToastT, ToastType, ToastUi, ToastUiSlot, ToasterProps };
|
|
@@ -17,7 +17,7 @@ declare const __VLS_base: _$vue.DefineComponent<ToggleProps, {}, {}, {}, {}, _$v
|
|
|
17
17
|
}, string, _$vue.PublicProps, Readonly<ToggleProps> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
type: "button" | "
|
|
20
|
+
type: "button" | "submit" | "reset";
|
|
21
21
|
disabled: boolean;
|
|
22
22
|
as: AsTag | _$vue.Component;
|
|
23
23
|
modelValue: boolean;
|
|
@@ -2,7 +2,13 @@ import { PrimitiveProps } from "../primitive/types.js";
|
|
|
2
2
|
import { ButtonHTMLAttributes } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/toggle/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* State values for the toggle component.
|
|
7
|
+
*/
|
|
5
8
|
type ToggleState = 'on' | 'off';
|
|
9
|
+
/**
|
|
10
|
+
* Props for the toggle component.
|
|
11
|
+
*/
|
|
6
12
|
interface ToggleProps extends PrimitiveProps, /** @vue-ignore */Omit<ButtonHTMLAttributes, 'onClick'> {
|
|
7
13
|
/**
|
|
8
14
|
* The pressed state of the toggle when it is initially rendered.
|
|
@@ -17,6 +23,9 @@ interface ToggleProps extends PrimitiveProps, /** @vue-ignore */Omit<ButtonHTMLA
|
|
|
17
23
|
*/
|
|
18
24
|
disabled?: boolean;
|
|
19
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Emits for the toggle component.
|
|
28
|
+
*/
|
|
20
29
|
type ToggleEmits = {
|
|
21
30
|
/**
|
|
22
31
|
* Event handler called when the pressed state changes.
|
|
@@ -5,6 +5,9 @@ import { ButtonProps } from "../button/types.js";
|
|
|
5
5
|
import { ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/components/toggle-group/types.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Props for the toggle group root component.
|
|
10
|
+
*/
|
|
8
11
|
interface ToggleGroupRootProps<M extends boolean = false, T extends DefinedValue = string> extends SelectionProps<M, T>, FormFieldCommonProps, PrimitiveProps, /** @vue-ignore */HTMLAttributes {
|
|
9
12
|
/** When `false`, navigating through items with arrow keys is disabled. */
|
|
10
13
|
rovingFocus?: boolean;
|
|
@@ -17,14 +20,26 @@ interface ToggleGroupRootProps<M extends boolean = false, T extends DefinedValue
|
|
|
17
20
|
/** When `true`, keyboard navigation loops from last to first item, and vice versa. */
|
|
18
21
|
loop?: boolean;
|
|
19
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Emits for the toggle group root component.
|
|
25
|
+
*/
|
|
20
26
|
type ToggleGroupRootEmits<M extends boolean = false, T extends DefinedValue = string> = SelectionEmits<M, T>;
|
|
27
|
+
/**
|
|
28
|
+
* Props for the toggle group item component.
|
|
29
|
+
*/
|
|
21
30
|
interface ToggleGroupItemProps<T extends DefinedValue = string> extends ButtonProps {
|
|
22
31
|
/** A unique value that identifies the item inside the group. */
|
|
23
32
|
value: T;
|
|
24
33
|
/** When `true`, prevents interaction with the item. */
|
|
25
34
|
disabled?: boolean;
|
|
26
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Available UI slots for the toggle group component.
|
|
38
|
+
*/
|
|
27
39
|
type ToggleGroupUiSlot = 'root' | 'item';
|
|
40
|
+
/**
|
|
41
|
+
* UI class overrides for the toggle group component.
|
|
42
|
+
*/
|
|
28
43
|
type ToggleGroupUi = UiClass<ToggleGroupUiSlot>;
|
|
29
44
|
//#endregion
|
|
30
45
|
export { ToggleGroupItemProps, ToggleGroupRootEmits, ToggleGroupRootProps, ToggleGroupUi, ToggleGroupUiSlot };
|