@lovince/ui-vue 0.0.0-stage → 0.1.1

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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -2
  3. package/dist/components/accordion.d.ts +197 -0
  4. package/dist/components/avatar.d.ts +90 -0
  5. package/dist/components/calendar.d.ts +421 -0
  6. package/dist/components/carousel.d.ts +293 -0
  7. package/dist/components/combobox.d.ts +431 -0
  8. package/dist/components/command.d.ts +252 -0
  9. package/dist/components/dialog.d.ts +242 -0
  10. package/dist/components/disclosure.d.ts +120 -0
  11. package/dist/components/emoji-picker.d.ts +359 -0
  12. package/dist/components/menu.d.ts +493 -0
  13. package/dist/components/navigation-menu.d.ts +275 -0
  14. package/dist/components/number-field.d.ts +202 -0
  15. package/dist/components/pin-input.d.ts +174 -0
  16. package/dist/components/popover.d.ts +213 -0
  17. package/dist/components/progress.d.ts +82 -0
  18. package/dist/components/radio-group.d.ts +167 -0
  19. package/dist/components/select.d.ts +418 -0
  20. package/dist/components/slider.d.ts +222 -0
  21. package/dist/components/sortable.d.ts +140 -0
  22. package/dist/components/splitter.d.ts +167 -0
  23. package/dist/components/tabs.d.ts +183 -0
  24. package/dist/components/toast.d.ts +192 -0
  25. package/dist/components/toggle-group.d.ts +205 -0
  26. package/dist/components/toggles.d.ts +232 -0
  27. package/dist/components/tooltip.d.ts +370 -0
  28. package/dist/components/tree.d.ts +147 -0
  29. package/dist/composables/data-table.d.ts +25 -0
  30. package/dist/composables/observers.d.ts +42 -0
  31. package/dist/composables/presence.d.ts +7 -0
  32. package/dist/index.d.ts +37 -0
  33. package/dist/index.js +4094 -0
  34. package/dist/shared/context.d.ts +2 -0
  35. package/dist/shared/dismiss.d.ts +17 -0
  36. package/dist/shared/element.d.ts +6 -0
  37. package/dist/shared/floating-props.d.ts +27 -0
  38. package/dist/shared/list.d.ts +17 -0
  39. package/dist/shared/machine.d.ts +38 -0
  40. package/dist/shared/parts.d.ts +8 -0
  41. package/dist/shared/portal.d.ts +34 -0
  42. package/dist/shared/primitive.d.ts +57 -0
  43. package/package.json +68 -4
@@ -0,0 +1,370 @@
1
+ export declare const TooltipRoot: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ open: {
3
+ type: BooleanConstructor;
4
+ default: undefined;
5
+ };
6
+ defaultOpen: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ delayDuration: {
11
+ type: NumberConstructor;
12
+ default: undefined;
13
+ };
14
+ openDelay: {
15
+ type: NumberConstructor;
16
+ default: undefined;
17
+ };
18
+ closeDelay: {
19
+ type: NumberConstructor;
20
+ default: number;
21
+ };
22
+ disabled: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
27
+ [key: string]: any;
28
+ }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ 'update:open': (value: boolean) => boolean;
30
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
31
+ open: {
32
+ type: BooleanConstructor;
33
+ default: undefined;
34
+ };
35
+ defaultOpen: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ delayDuration: {
40
+ type: NumberConstructor;
41
+ default: undefined;
42
+ };
43
+ openDelay: {
44
+ type: NumberConstructor;
45
+ default: undefined;
46
+ };
47
+ closeDelay: {
48
+ type: NumberConstructor;
49
+ default: number;
50
+ };
51
+ disabled: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ }>> & Readonly<{
56
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
57
+ }>, {
58
+ disabled: boolean;
59
+ open: boolean;
60
+ openDelay: number;
61
+ closeDelay: number;
62
+ defaultOpen: boolean;
63
+ delayDuration: number;
64
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
65
+ export declare const TooltipTrigger: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
66
+ as: {
67
+ default: string;
68
+ type: import('vue').PropType<string | import('vue').Component>;
69
+ };
70
+ asChild: {
71
+ readonly type: BooleanConstructor;
72
+ readonly default: false;
73
+ };
74
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
75
+ [key: string]: any;
76
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
77
+ as: {
78
+ default: string;
79
+ type: import('vue').PropType<string | import('vue').Component>;
80
+ };
81
+ asChild: {
82
+ readonly type: BooleanConstructor;
83
+ readonly default: false;
84
+ };
85
+ }>> & Readonly<{}>, {
86
+ as: string | import('vue').Component;
87
+ asChild: boolean;
88
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
89
+ export declare const TooltipPortal: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
90
+ to: {
91
+ type: import('vue').PropType<string | HTMLElement>;
92
+ default: string;
93
+ };
94
+ disabled: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
98
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
99
+ [key: string]: any;
100
+ }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
101
+ to: {
102
+ type: import('vue').PropType<string | HTMLElement>;
103
+ default: string;
104
+ };
105
+ disabled: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ }>> & Readonly<{}>, {
110
+ to: string | HTMLElement;
111
+ disabled: boolean;
112
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
113
+ export declare const TooltipContent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
114
+ side: {
115
+ default: "top" | "right" | "bottom" | "left";
116
+ type: import('vue').PropType<import('@lovince/ui-headless').Side>;
117
+ validator: (value: string) => boolean;
118
+ };
119
+ align: {
120
+ readonly type: import('vue').PropType<import('@lovince/ui-headless').Align>;
121
+ readonly default: "center";
122
+ readonly validator: (value: string) => boolean;
123
+ };
124
+ sideOffset: {
125
+ readonly type: NumberConstructor;
126
+ readonly default: 4;
127
+ };
128
+ collisionPadding: {
129
+ readonly type: NumberConstructor;
130
+ readonly default: 8;
131
+ };
132
+ avoidCollisions: {
133
+ readonly type: BooleanConstructor;
134
+ readonly default: true;
135
+ };
136
+ as: {
137
+ readonly type: import('vue').PropType<string | import('vue').Component>;
138
+ readonly default: "div";
139
+ };
140
+ asChild: {
141
+ readonly type: BooleanConstructor;
142
+ readonly default: false;
143
+ };
144
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
145
+ [key: string]: any;
146
+ }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
147
+ side: {
148
+ default: "top" | "right" | "bottom" | "left";
149
+ type: import('vue').PropType<import('@lovince/ui-headless').Side>;
150
+ validator: (value: string) => boolean;
151
+ };
152
+ align: {
153
+ readonly type: import('vue').PropType<import('@lovince/ui-headless').Align>;
154
+ readonly default: "center";
155
+ readonly validator: (value: string) => boolean;
156
+ };
157
+ sideOffset: {
158
+ readonly type: NumberConstructor;
159
+ readonly default: 4;
160
+ };
161
+ collisionPadding: {
162
+ readonly type: NumberConstructor;
163
+ readonly default: 8;
164
+ };
165
+ avoidCollisions: {
166
+ readonly type: BooleanConstructor;
167
+ readonly default: true;
168
+ };
169
+ as: {
170
+ readonly type: import('vue').PropType<string | import('vue').Component>;
171
+ readonly default: "div";
172
+ };
173
+ asChild: {
174
+ readonly type: BooleanConstructor;
175
+ readonly default: false;
176
+ };
177
+ }>> & Readonly<{}>, {
178
+ as: string | import('vue').Component;
179
+ asChild: boolean;
180
+ side: "top" | "right" | "bottom" | "left";
181
+ align: "center" | "start" | "end";
182
+ sideOffset: number;
183
+ collisionPadding: number;
184
+ avoidCollisions: boolean;
185
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
186
+ export declare const HoverCardRoot: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
187
+ open: {
188
+ type: BooleanConstructor;
189
+ default: undefined;
190
+ };
191
+ defaultOpen: {
192
+ type: BooleanConstructor;
193
+ default: boolean;
194
+ };
195
+ delayDuration: {
196
+ type: NumberConstructor;
197
+ default: undefined;
198
+ };
199
+ openDelay: {
200
+ type: NumberConstructor;
201
+ default: undefined;
202
+ };
203
+ closeDelay: {
204
+ type: NumberConstructor;
205
+ default: number;
206
+ };
207
+ disabled: {
208
+ type: BooleanConstructor;
209
+ default: boolean;
210
+ };
211
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
212
+ [key: string]: any;
213
+ }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
214
+ 'update:open': (value: boolean) => boolean;
215
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
216
+ open: {
217
+ type: BooleanConstructor;
218
+ default: undefined;
219
+ };
220
+ defaultOpen: {
221
+ type: BooleanConstructor;
222
+ default: boolean;
223
+ };
224
+ delayDuration: {
225
+ type: NumberConstructor;
226
+ default: undefined;
227
+ };
228
+ openDelay: {
229
+ type: NumberConstructor;
230
+ default: undefined;
231
+ };
232
+ closeDelay: {
233
+ type: NumberConstructor;
234
+ default: number;
235
+ };
236
+ disabled: {
237
+ type: BooleanConstructor;
238
+ default: boolean;
239
+ };
240
+ }>> & Readonly<{
241
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
242
+ }>, {
243
+ disabled: boolean;
244
+ open: boolean;
245
+ openDelay: number;
246
+ closeDelay: number;
247
+ defaultOpen: boolean;
248
+ delayDuration: number;
249
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
250
+ export declare const HoverCardTrigger: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
251
+ as: {
252
+ default: string;
253
+ type: import('vue').PropType<string | import('vue').Component>;
254
+ };
255
+ asChild: {
256
+ readonly type: BooleanConstructor;
257
+ readonly default: false;
258
+ };
259
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
260
+ [key: string]: any;
261
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
262
+ as: {
263
+ default: string;
264
+ type: import('vue').PropType<string | import('vue').Component>;
265
+ };
266
+ asChild: {
267
+ readonly type: BooleanConstructor;
268
+ readonly default: false;
269
+ };
270
+ }>> & Readonly<{}>, {
271
+ as: string | import('vue').Component;
272
+ asChild: boolean;
273
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
274
+ export declare const HoverCardPortal: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
275
+ to: {
276
+ type: import('vue').PropType<string | HTMLElement>;
277
+ default: string;
278
+ };
279
+ disabled: {
280
+ type: BooleanConstructor;
281
+ default: boolean;
282
+ };
283
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
284
+ [key: string]: any;
285
+ }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
286
+ to: {
287
+ type: import('vue').PropType<string | HTMLElement>;
288
+ default: string;
289
+ };
290
+ disabled: {
291
+ type: BooleanConstructor;
292
+ default: boolean;
293
+ };
294
+ }>> & Readonly<{}>, {
295
+ to: string | HTMLElement;
296
+ disabled: boolean;
297
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
298
+ export declare const HoverCardContent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
299
+ side: {
300
+ default: "top" | "right" | "bottom" | "left";
301
+ type: import('vue').PropType<import('@lovince/ui-headless').Side>;
302
+ validator: (value: string) => boolean;
303
+ };
304
+ align: {
305
+ readonly type: import('vue').PropType<import('@lovince/ui-headless').Align>;
306
+ readonly default: "center";
307
+ readonly validator: (value: string) => boolean;
308
+ };
309
+ sideOffset: {
310
+ readonly type: NumberConstructor;
311
+ readonly default: 4;
312
+ };
313
+ collisionPadding: {
314
+ readonly type: NumberConstructor;
315
+ readonly default: 8;
316
+ };
317
+ avoidCollisions: {
318
+ readonly type: BooleanConstructor;
319
+ readonly default: true;
320
+ };
321
+ as: {
322
+ readonly type: import('vue').PropType<string | import('vue').Component>;
323
+ readonly default: "div";
324
+ };
325
+ asChild: {
326
+ readonly type: BooleanConstructor;
327
+ readonly default: false;
328
+ };
329
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
330
+ [key: string]: any;
331
+ }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
332
+ side: {
333
+ default: "top" | "right" | "bottom" | "left";
334
+ type: import('vue').PropType<import('@lovince/ui-headless').Side>;
335
+ validator: (value: string) => boolean;
336
+ };
337
+ align: {
338
+ readonly type: import('vue').PropType<import('@lovince/ui-headless').Align>;
339
+ readonly default: "center";
340
+ readonly validator: (value: string) => boolean;
341
+ };
342
+ sideOffset: {
343
+ readonly type: NumberConstructor;
344
+ readonly default: 4;
345
+ };
346
+ collisionPadding: {
347
+ readonly type: NumberConstructor;
348
+ readonly default: 8;
349
+ };
350
+ avoidCollisions: {
351
+ readonly type: BooleanConstructor;
352
+ readonly default: true;
353
+ };
354
+ as: {
355
+ readonly type: import('vue').PropType<string | import('vue').Component>;
356
+ readonly default: "div";
357
+ };
358
+ asChild: {
359
+ readonly type: BooleanConstructor;
360
+ readonly default: false;
361
+ };
362
+ }>> & Readonly<{}>, {
363
+ as: string | import('vue').Component;
364
+ asChild: boolean;
365
+ side: "top" | "right" | "bottom" | "left";
366
+ align: "center" | "start" | "end";
367
+ sideOffset: number;
368
+ collisionPadding: number;
369
+ avoidCollisions: boolean;
370
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,147 @@
1
+ import { PropType } from 'vue';
2
+ /**
3
+ * A hierarchy to browse and pick from — the WAI-ARIA tree view. Arrow keys
4
+ * move through the visible items; Right opens a branch or enters it, Left
5
+ * closes it or climbs to its parent.
6
+ */
7
+ export declare const TreeRoot: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
+ as: {
9
+ default: string;
10
+ type: PropType<string | import('vue').Component>;
11
+ };
12
+ modelValue: {
13
+ type: PropType<string | string[]>;
14
+ default: undefined;
15
+ };
16
+ defaultValue: {
17
+ type: PropType<string | string[]>;
18
+ default: undefined;
19
+ };
20
+ multiple: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ expanded: {
25
+ type: PropType<string[]>;
26
+ default: undefined;
27
+ };
28
+ defaultExpanded: {
29
+ type: PropType<string[]>;
30
+ default: () => never[];
31
+ };
32
+ asChild: {
33
+ readonly type: BooleanConstructor;
34
+ readonly default: false;
35
+ };
36
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
37
+ [key: string]: any;
38
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
39
+ 'update:modelValue': (value: string | string[] | undefined) => boolean;
40
+ 'update:expanded': (value: string[]) => boolean;
41
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
42
+ as: {
43
+ default: string;
44
+ type: PropType<string | import('vue').Component>;
45
+ };
46
+ modelValue: {
47
+ type: PropType<string | string[]>;
48
+ default: undefined;
49
+ };
50
+ defaultValue: {
51
+ type: PropType<string | string[]>;
52
+ default: undefined;
53
+ };
54
+ multiple: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ expanded: {
59
+ type: PropType<string[]>;
60
+ default: undefined;
61
+ };
62
+ defaultExpanded: {
63
+ type: PropType<string[]>;
64
+ default: () => never[];
65
+ };
66
+ asChild: {
67
+ readonly type: BooleanConstructor;
68
+ readonly default: false;
69
+ };
70
+ }>> & Readonly<{
71
+ "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
72
+ "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
73
+ }>, {
74
+ as: string | import('vue').Component;
75
+ asChild: boolean;
76
+ multiple: boolean;
77
+ expanded: string[];
78
+ modelValue: string | string[];
79
+ defaultValue: string | string[];
80
+ defaultExpanded: string[];
81
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
82
+ export declare const TreeItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
83
+ as: {
84
+ default: string;
85
+ type: PropType<string | import('vue').Component>;
86
+ };
87
+ value: {
88
+ type: StringConstructor;
89
+ required: true;
90
+ };
91
+ disabled: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ asChild: {
96
+ readonly type: BooleanConstructor;
97
+ readonly default: false;
98
+ };
99
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
100
+ [key: string]: any;
101
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
102
+ as: {
103
+ default: string;
104
+ type: PropType<string | import('vue').Component>;
105
+ };
106
+ value: {
107
+ type: StringConstructor;
108
+ required: true;
109
+ };
110
+ disabled: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
114
+ asChild: {
115
+ readonly type: BooleanConstructor;
116
+ readonly default: false;
117
+ };
118
+ }>> & Readonly<{}>, {
119
+ as: string | import('vue').Component;
120
+ asChild: boolean;
121
+ disabled: boolean;
122
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
123
+ /** An item's children. Rendered only while the item is open, so closed branches hold no focusable items. */
124
+ export declare const TreeGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
125
+ as: {
126
+ default: string;
127
+ type: PropType<string | import('vue').Component>;
128
+ };
129
+ asChild: {
130
+ readonly type: BooleanConstructor;
131
+ readonly default: false;
132
+ };
133
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
134
+ [key: string]: any;
135
+ }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
136
+ as: {
137
+ default: string;
138
+ type: PropType<string | import('vue').Component>;
139
+ };
140
+ asChild: {
141
+ readonly type: BooleanConstructor;
142
+ readonly default: false;
143
+ };
144
+ }>> & Readonly<{}>, {
145
+ as: string | import('vue').Component;
146
+ asChild: boolean;
147
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { CardLayout, RowKey, SelectionState, TableColumn, TableSort } from '@lovince/ui-headless';
3
+ export interface DataTableOptions<T extends Readonly<Record<string, unknown>>, C extends TableColumn> {
4
+ readonly rows: () => readonly T[];
5
+ readonly columns: () => readonly C[];
6
+ readonly hidden: () => readonly string[];
7
+ readonly rowKey: () => string;
8
+ /** `client` sorts the loaded rows; `server` only reports the sort so the caller can refetch. */
9
+ readonly sortMode: () => 'client' | 'server';
10
+ readonly sort: Ref<TableSort | null>;
11
+ readonly selected: Ref<RowKey[]>;
12
+ }
13
+ export interface DataTable<T, C extends TableColumn> {
14
+ readonly columns: ComputedRef<C[]>;
15
+ readonly rows: ComputedRef<T[]>;
16
+ readonly card: ComputedRef<CardLayout<C>>;
17
+ readonly pageState: ComputedRef<SelectionState>;
18
+ readonly keyOf: (row: T, index: number) => RowKey;
19
+ readonly isSelected: (row: T, index: number) => boolean;
20
+ readonly toggleRow: (row: T, index: number) => void;
21
+ readonly togglePage: () => void;
22
+ readonly toggleSort: (key: string) => void;
23
+ }
24
+ /** State and derivations for a column-driven table, with no markup attached. */
25
+ export declare const useDataTable: <T extends Readonly<Record<string, unknown>>, C extends TableColumn>(options: DataTableOptions<T, C>) => DataTable<T, C>;
@@ -0,0 +1,42 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { InViewOptions } from '@lovince/ui-dom';
3
+ import { ScrollAlign, ScrollEdges, VirtualRange } from '@lovince/ui-headless';
4
+ import { ElementRef } from '../shared/element';
5
+ export type { InViewOptions };
6
+ export declare const useInView: (target: ElementRef, options?: InViewOptions) => Ref<boolean>;
7
+ export declare const useScrollEdges: (target: ElementRef) => {
8
+ readonly edges: Ref<ScrollEdges>;
9
+ readonly measure: () => void;
10
+ };
11
+ export type ActiveSectionOptions = {
12
+ /** Where the reading line sits, as a share of the viewport's height. */
13
+ readonly line?: number;
14
+ };
15
+ export declare const useActiveSection: (ids: () => readonly string[], options?: ActiveSectionOptions) => Ref<string | undefined>;
16
+ export type VirtualListOptions = {
17
+ readonly count: () => number;
18
+ /** Every row's height, in pixels. */
19
+ readonly itemSize: () => number;
20
+ readonly overscan?: () => number;
21
+ };
22
+ export type VirtualList = {
23
+ readonly range: ComputedRef<VirtualRange>;
24
+ /** Scrolls so a row is in view, including one that is not rendered yet. */
25
+ readonly scrollToIndex: (index: number, align?: ScrollAlign) => void;
26
+ readonly viewportHeight: Ref<number>;
27
+ };
28
+ /**
29
+ * Renders only the rows in view of a scrolling container. Without a
30
+ * measurable container — tests, server rendering — it renders a first screenful.
31
+ */
32
+ export declare const useVirtualList: (container: ElementRef, options: VirtualListOptions) => VirtualList;
33
+ export type Clipboard = {
34
+ /** True for a moment after a copy succeeds. */
35
+ readonly copied: Ref<boolean>;
36
+ /** True after a copy fails, until the next attempt. */
37
+ readonly failed: Ref<boolean>;
38
+ readonly copy: (text: string) => Promise<boolean>;
39
+ };
40
+ export declare const useClipboard: (options?: {
41
+ readonly resetAfter?: () => number;
42
+ }) => Clipboard;
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Keeps an element mounted after `open` turns false until its exit animation
4
+ * ends, so `data-state="closed"` animations can play. With no animation, or
5
+ * reduced motion, it unmounts at once.
6
+ */
7
+ export declare const usePresence: (open: () => boolean, element: () => HTMLElement | null) => Ref<boolean>;
@@ -0,0 +1,37 @@
1
+ export { Primitive, Slot, primitiveProps } from './shared/primitive';
2
+ export { Portal } from './shared/portal';
3
+ export { toElement, useIdWatch, type ElementRef } from './shared/element';
4
+ export { normalizeProps, useMachine, type MachineBinding, type UseMachineOptions } from './shared/machine';
5
+ export { useListEnv, type ListBinding } from './shared/list';
6
+ export { floatingProps } from './shared/floating-props';
7
+ export { usePresence } from './composables/presence';
8
+ export { useDataTable, type DataTable, type DataTableOptions } from './composables/data-table';
9
+ export { useActiveSection, useClipboard, useInView, useScrollEdges, useVirtualList, type ActiveSectionOptions, type Clipboard, type InViewOptions, type VirtualList, type VirtualListOptions, } from './composables/observers';
10
+ export { scrollLockCount } from '@lovince/ui-dom';
11
+ export { DisclosureRoot, DisclosureTrigger, DisclosureContent, injectDisclosure } from './components/disclosure';
12
+ export { CheckboxRoot, CheckboxIndicator, SwitchRoot, SwitchThumb } from './components/toggles';
13
+ export { TabsRoot, TabsList, TabsTrigger, TabsContent } from './components/tabs';
14
+ export { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, } from './components/dialog';
15
+ export * from './components/popover';
16
+ export * from './components/tooltip';
17
+ export * from './components/menu';
18
+ export * from './components/select';
19
+ export * from './components/combobox';
20
+ export * from './components/command';
21
+ export * from './components/navigation-menu';
22
+ export * from './components/accordion';
23
+ export * from './components/radio-group';
24
+ export * from './components/toggle-group';
25
+ export * from './components/slider';
26
+ export * from './components/number-field';
27
+ export * from './components/pin-input';
28
+ export * from './components/progress';
29
+ export * from './components/avatar';
30
+ export * from './components/calendar';
31
+ export * from './components/toast';
32
+ export * from './components/splitter';
33
+ export * from './components/tree';
34
+ export * from './components/carousel';
35
+ export * from './components/sortable';
36
+ export * from './components/emoji-picker';
37
+ export type { ActivationMode, CheckedState, DialogRole, Direction, Orientation } from '@lovince/ui-headless';