@lovince/ui-vue 0.1.1 → 0.2.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/README.md +246 -28
- package/dist/components/{combobox.d.ts → choice/combobox.d.ts} +10 -27
- package/dist/components/{command.d.ts → choice/command.d.ts} +7 -19
- package/dist/components/{emoji-picker.d.ts → choice/emoji-picker.d.ts} +9 -9
- package/dist/components/{radio-group.d.ts → choice/radio-group.d.ts} +3 -3
- package/dist/components/choice/rating.d.ts +143 -0
- package/dist/components/choice/segmented-control.d.ts +26 -0
- package/dist/components/{select.d.ts → choice/select.d.ts} +11 -20
- package/dist/components/{toggle-group.d.ts → choice/toggle-group.d.ts} +3 -9
- package/dist/components/{toggles.d.ts → choice/toggles.d.ts} +4 -4
- package/dist/components/{accordion.d.ts → disclosure/accordion.d.ts} +5 -13
- package/dist/components/{disclosure.d.ts → disclosure/disclosure.d.ts} +3 -10
- package/dist/components/{tabs.d.ts → disclosure/tabs.d.ts} +4 -6
- package/dist/components/display/avatar-group.d.ts +61 -0
- package/dist/components/{avatar.d.ts → display/avatar.d.ts} +3 -6
- package/dist/components/display/feedback.d.ts +623 -0
- package/dist/components/display/image.d.ts +95 -0
- package/dist/components/display/meter.d.ts +165 -0
- package/dist/components/{progress.d.ts → display/progress.d.ts} +2 -6
- package/dist/components/display/stat.d.ts +102 -0
- package/dist/components/display/table.d.ts +130 -0
- package/dist/components/display/timeline.d.ts +181 -0
- package/dist/components/forms/color-picker.d.ts +187 -0
- package/dist/components/forms/date-picker.d.ts +257 -0
- package/dist/components/forms/editable.d.ts +243 -0
- package/dist/components/forms/file-upload.d.ts +203 -0
- package/dist/components/forms/forms.d.ts +290 -0
- package/dist/components/forms/phone-input.d.ts +189 -0
- package/dist/components/forms/signature-pad.d.ts +122 -0
- package/dist/components/forms/tags-input.d.ts +209 -0
- package/dist/components/forms/text-inputs.d.ts +270 -0
- package/dist/components/forms/time-field.d.ts +165 -0
- package/dist/components/{calendar.d.ts → inputs/calendar.d.ts} +8 -19
- package/dist/components/{number-field.d.ts → inputs/number-field.d.ts} +4 -15
- package/dist/components/{pin-input.d.ts → inputs/pin-input.d.ts} +2 -12
- package/dist/components/{slider.d.ts → inputs/slider.d.ts} +4 -14
- package/dist/components/{carousel.d.ts → layout/carousel.d.ts} +50 -20
- package/dist/components/layout/marquee.d.ts +104 -0
- package/dist/components/layout/primitives.d.ts +242 -0
- package/dist/components/layout/scroll-area.d.ts +160 -0
- package/dist/components/{sortable.d.ts → layout/sortable.d.ts} +3 -12
- package/dist/components/{splitter.d.ts → layout/splitter.d.ts} +3 -11
- package/dist/components/{tree.d.ts → layout/tree.d.ts} +3 -9
- package/dist/components/layout/virtual-list.d.ts +68 -0
- package/dist/components/navigation/breadcrumb.d.ts +114 -0
- package/dist/components/navigation/pagination.d.ts +221 -0
- package/dist/components/navigation/sidebar.d.ts +258 -0
- package/dist/components/{dialog.d.ts → navigation/stepper.d.ts} +142 -114
- package/dist/components/navigation/table-of-contents.d.ts +60 -0
- package/dist/components/navigation/toolbar.d.ts +179 -0
- package/dist/components/{menu.d.ts → overlays/dialog.d.ts} +222 -224
- package/dist/components/overlays/menu.d.ts +901 -0
- package/dist/components/overlays/menubar.d.ts +106 -0
- package/dist/components/{navigation-menu.d.ts → overlays/navigation-menu.d.ts} +6 -19
- package/dist/components/{popover.d.ts → overlays/popover.d.ts} +6 -9
- package/dist/components/overlays/sheet.d.ts +77 -0
- package/dist/components/{toast.d.ts → overlays/toast.d.ts} +6 -14
- package/dist/components/{tooltip.d.ts → overlays/tooltip.d.ts} +8 -8
- package/dist/components/primitives/button.d.ts +102 -0
- package/dist/components/primitives/icon.d.ts +79 -0
- package/dist/components/primitives/primitives.d.ts +300 -0
- package/dist/composables/data-table.d.ts +0 -2
- package/dist/composables/observers.d.ts +0 -9
- package/dist/composables/presence.d.ts +0 -5
- package/dist/icon.d.ts +2 -0
- package/dist/icon.js +76 -0
- package/dist/index.d.ts +61 -28
- package/dist/index.js +4935 -990
- package/dist/shared/dismiss.d.ts +0 -8
- package/dist/shared/element.d.ts +0 -2
- package/dist/shared/floating-props.d.ts +0 -1
- package/dist/shared/list.d.ts +0 -7
- package/dist/shared/machine.d.ts +0 -18
- package/dist/shared/parts.d.ts +1 -2
- package/dist/shared/portal.d.ts +1 -10
- package/dist/shared/primitive.d.ts +2 -10
- package/dist/shared/roving.d.ts +14 -0
- package/package.json +16 -3
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { Component, PropType } from 'vue';
|
|
2
|
+
export type TextRole = 'display-lg' | 'display-md' | 'display-sm' | 'headline-lg' | 'headline-md' | 'headline-sm' | 'title-lg' | 'title-md' | 'title-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'label-lg' | 'label-md' | 'overline';
|
|
3
|
+
export declare const LvText: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
as: {
|
|
5
|
+
default: string;
|
|
6
|
+
type: PropType<string | Component>;
|
|
7
|
+
};
|
|
8
|
+
variant: {
|
|
9
|
+
readonly type: PropType<TextRole>;
|
|
10
|
+
readonly default: "body-md";
|
|
11
|
+
};
|
|
12
|
+
asChild: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
readonly default: false;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
as: {
|
|
20
|
+
default: string;
|
|
21
|
+
type: PropType<string | Component>;
|
|
22
|
+
};
|
|
23
|
+
variant: {
|
|
24
|
+
readonly type: PropType<TextRole>;
|
|
25
|
+
readonly default: "body-md";
|
|
26
|
+
};
|
|
27
|
+
asChild: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: false;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
as: string | Component;
|
|
33
|
+
asChild: boolean;
|
|
34
|
+
variant: TextRole;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
export declare const LvHeading: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
37
|
+
as: {
|
|
38
|
+
type: PropType<string | Component>;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
asChild: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
level: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: number;
|
|
48
|
+
validator: (value: number) => boolean;
|
|
49
|
+
};
|
|
50
|
+
size: {
|
|
51
|
+
default: string;
|
|
52
|
+
type: PropType<TextRole>;
|
|
53
|
+
};
|
|
54
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
57
|
+
as: {
|
|
58
|
+
type: PropType<string | Component>;
|
|
59
|
+
default: undefined;
|
|
60
|
+
};
|
|
61
|
+
asChild: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
level: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: number;
|
|
68
|
+
validator: (value: number) => boolean;
|
|
69
|
+
};
|
|
70
|
+
size: {
|
|
71
|
+
default: string;
|
|
72
|
+
type: PropType<TextRole>;
|
|
73
|
+
};
|
|
74
|
+
}>> & Readonly<{}>, {
|
|
75
|
+
size: TextRole;
|
|
76
|
+
as: string | Component;
|
|
77
|
+
asChild: boolean;
|
|
78
|
+
level: number;
|
|
79
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
80
|
+
export declare const LvLabel: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
81
|
+
as: {
|
|
82
|
+
default: string;
|
|
83
|
+
type: PropType<string | Component>;
|
|
84
|
+
};
|
|
85
|
+
asChild: {
|
|
86
|
+
readonly type: BooleanConstructor;
|
|
87
|
+
readonly default: false;
|
|
88
|
+
};
|
|
89
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
90
|
+
[key: string]: any;
|
|
91
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
92
|
+
as: {
|
|
93
|
+
default: string;
|
|
94
|
+
type: PropType<string | Component>;
|
|
95
|
+
};
|
|
96
|
+
asChild: {
|
|
97
|
+
readonly type: BooleanConstructor;
|
|
98
|
+
readonly default: false;
|
|
99
|
+
};
|
|
100
|
+
}>> & Readonly<{}>, {
|
|
101
|
+
as: string | Component;
|
|
102
|
+
asChild: boolean;
|
|
103
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
104
|
+
export declare const LvLink: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
105
|
+
as: {
|
|
106
|
+
default: string;
|
|
107
|
+
type: PropType<string | Component>;
|
|
108
|
+
};
|
|
109
|
+
asChild: {
|
|
110
|
+
readonly type: BooleanConstructor;
|
|
111
|
+
readonly default: false;
|
|
112
|
+
};
|
|
113
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
114
|
+
[key: string]: any;
|
|
115
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
116
|
+
as: {
|
|
117
|
+
default: string;
|
|
118
|
+
type: PropType<string | Component>;
|
|
119
|
+
};
|
|
120
|
+
asChild: {
|
|
121
|
+
readonly type: BooleanConstructor;
|
|
122
|
+
readonly default: false;
|
|
123
|
+
};
|
|
124
|
+
}>> & Readonly<{}>, {
|
|
125
|
+
as: string | Component;
|
|
126
|
+
asChild: boolean;
|
|
127
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
128
|
+
export declare const LvCode: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
129
|
+
as: {
|
|
130
|
+
default: string;
|
|
131
|
+
type: PropType<string | Component>;
|
|
132
|
+
};
|
|
133
|
+
asChild: {
|
|
134
|
+
readonly type: BooleanConstructor;
|
|
135
|
+
readonly default: false;
|
|
136
|
+
};
|
|
137
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
138
|
+
[key: string]: any;
|
|
139
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
140
|
+
as: {
|
|
141
|
+
default: string;
|
|
142
|
+
type: PropType<string | Component>;
|
|
143
|
+
};
|
|
144
|
+
asChild: {
|
|
145
|
+
readonly type: BooleanConstructor;
|
|
146
|
+
readonly default: false;
|
|
147
|
+
};
|
|
148
|
+
}>> & Readonly<{}>, {
|
|
149
|
+
as: string | Component;
|
|
150
|
+
asChild: boolean;
|
|
151
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
152
|
+
export declare const LvKbd: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
153
|
+
as: {
|
|
154
|
+
default: string;
|
|
155
|
+
type: PropType<string | Component>;
|
|
156
|
+
};
|
|
157
|
+
asChild: {
|
|
158
|
+
readonly type: BooleanConstructor;
|
|
159
|
+
readonly default: false;
|
|
160
|
+
};
|
|
161
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
162
|
+
[key: string]: any;
|
|
163
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
164
|
+
as: {
|
|
165
|
+
default: string;
|
|
166
|
+
type: PropType<string | Component>;
|
|
167
|
+
};
|
|
168
|
+
asChild: {
|
|
169
|
+
readonly type: BooleanConstructor;
|
|
170
|
+
readonly default: false;
|
|
171
|
+
};
|
|
172
|
+
}>> & Readonly<{}>, {
|
|
173
|
+
as: string | Component;
|
|
174
|
+
asChild: boolean;
|
|
175
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
176
|
+
export declare const LvBox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
177
|
+
readonly as: {
|
|
178
|
+
readonly type: PropType<string | Component>;
|
|
179
|
+
readonly default: "div";
|
|
180
|
+
};
|
|
181
|
+
readonly asChild: {
|
|
182
|
+
readonly type: BooleanConstructor;
|
|
183
|
+
readonly default: false;
|
|
184
|
+
};
|
|
185
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
186
|
+
[key: string]: any;
|
|
187
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
188
|
+
readonly as: {
|
|
189
|
+
readonly type: PropType<string | Component>;
|
|
190
|
+
readonly default: "div";
|
|
191
|
+
};
|
|
192
|
+
readonly asChild: {
|
|
193
|
+
readonly type: BooleanConstructor;
|
|
194
|
+
readonly default: false;
|
|
195
|
+
};
|
|
196
|
+
}>> & Readonly<{}>, {
|
|
197
|
+
readonly as: string | Component;
|
|
198
|
+
readonly asChild: boolean;
|
|
199
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
200
|
+
export declare const LvAspectRatio: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
201
|
+
ratio: {
|
|
202
|
+
type: NumberConstructor;
|
|
203
|
+
default: number;
|
|
204
|
+
validator: (value: number) => boolean;
|
|
205
|
+
};
|
|
206
|
+
as: {
|
|
207
|
+
readonly type: PropType<string | Component>;
|
|
208
|
+
readonly default: "div";
|
|
209
|
+
};
|
|
210
|
+
asChild: {
|
|
211
|
+
readonly type: BooleanConstructor;
|
|
212
|
+
readonly default: false;
|
|
213
|
+
};
|
|
214
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
217
|
+
ratio: {
|
|
218
|
+
type: NumberConstructor;
|
|
219
|
+
default: number;
|
|
220
|
+
validator: (value: number) => boolean;
|
|
221
|
+
};
|
|
222
|
+
as: {
|
|
223
|
+
readonly type: PropType<string | Component>;
|
|
224
|
+
readonly default: "div";
|
|
225
|
+
};
|
|
226
|
+
asChild: {
|
|
227
|
+
readonly type: BooleanConstructor;
|
|
228
|
+
readonly default: false;
|
|
229
|
+
};
|
|
230
|
+
}>> & Readonly<{}>, {
|
|
231
|
+
as: string | Component;
|
|
232
|
+
asChild: boolean;
|
|
233
|
+
ratio: number;
|
|
234
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
235
|
+
export declare const LvVisuallyHidden: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
236
|
+
as: {
|
|
237
|
+
default: string;
|
|
238
|
+
type: PropType<string | Component>;
|
|
239
|
+
};
|
|
240
|
+
asChild: {
|
|
241
|
+
readonly type: BooleanConstructor;
|
|
242
|
+
readonly default: false;
|
|
243
|
+
};
|
|
244
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
245
|
+
[key: string]: any;
|
|
246
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
247
|
+
as: {
|
|
248
|
+
default: string;
|
|
249
|
+
type: PropType<string | Component>;
|
|
250
|
+
};
|
|
251
|
+
asChild: {
|
|
252
|
+
readonly type: BooleanConstructor;
|
|
253
|
+
readonly default: false;
|
|
254
|
+
};
|
|
255
|
+
}>> & Readonly<{}>, {
|
|
256
|
+
as: string | Component;
|
|
257
|
+
asChild: boolean;
|
|
258
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
259
|
+
export declare const LvSeparator: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
260
|
+
orientation: {
|
|
261
|
+
type: PropType<"horizontal" | "vertical">;
|
|
262
|
+
default: string;
|
|
263
|
+
};
|
|
264
|
+
decorative: {
|
|
265
|
+
type: BooleanConstructor;
|
|
266
|
+
default: boolean;
|
|
267
|
+
};
|
|
268
|
+
as: {
|
|
269
|
+
readonly type: PropType<string | Component>;
|
|
270
|
+
readonly default: "div";
|
|
271
|
+
};
|
|
272
|
+
asChild: {
|
|
273
|
+
readonly type: BooleanConstructor;
|
|
274
|
+
readonly default: false;
|
|
275
|
+
};
|
|
276
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
277
|
+
[key: string]: any;
|
|
278
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
279
|
+
orientation: {
|
|
280
|
+
type: PropType<"horizontal" | "vertical">;
|
|
281
|
+
default: string;
|
|
282
|
+
};
|
|
283
|
+
decorative: {
|
|
284
|
+
type: BooleanConstructor;
|
|
285
|
+
default: boolean;
|
|
286
|
+
};
|
|
287
|
+
as: {
|
|
288
|
+
readonly type: PropType<string | Component>;
|
|
289
|
+
readonly default: "div";
|
|
290
|
+
};
|
|
291
|
+
asChild: {
|
|
292
|
+
readonly type: BooleanConstructor;
|
|
293
|
+
readonly default: false;
|
|
294
|
+
};
|
|
295
|
+
}>> & Readonly<{}>, {
|
|
296
|
+
as: string | Component;
|
|
297
|
+
asChild: boolean;
|
|
298
|
+
orientation: "horizontal" | "vertical";
|
|
299
|
+
decorative: boolean;
|
|
300
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -5,7 +5,6 @@ export interface DataTableOptions<T extends Readonly<Record<string, unknown>>, C
|
|
|
5
5
|
readonly columns: () => readonly C[];
|
|
6
6
|
readonly hidden: () => readonly string[];
|
|
7
7
|
readonly rowKey: () => string;
|
|
8
|
-
/** `client` sorts the loaded rows; `server` only reports the sort so the caller can refetch. */
|
|
9
8
|
readonly sortMode: () => 'client' | 'server';
|
|
10
9
|
readonly sort: Ref<TableSort | null>;
|
|
11
10
|
readonly selected: Ref<RowKey[]>;
|
|
@@ -21,5 +20,4 @@ export interface DataTable<T, C extends TableColumn> {
|
|
|
21
20
|
readonly togglePage: () => void;
|
|
22
21
|
readonly toggleSort: (key: string) => void;
|
|
23
22
|
}
|
|
24
|
-
/** State and derivations for a column-driven table, with no markup attached. */
|
|
25
23
|
export declare const useDataTable: <T extends Readonly<Record<string, unknown>>, C extends TableColumn>(options: DataTableOptions<T, C>) => DataTable<T, C>;
|
|
@@ -9,31 +9,22 @@ export declare const useScrollEdges: (target: ElementRef) => {
|
|
|
9
9
|
readonly measure: () => void;
|
|
10
10
|
};
|
|
11
11
|
export type ActiveSectionOptions = {
|
|
12
|
-
/** Where the reading line sits, as a share of the viewport's height. */
|
|
13
12
|
readonly line?: number;
|
|
14
13
|
};
|
|
15
14
|
export declare const useActiveSection: (ids: () => readonly string[], options?: ActiveSectionOptions) => Ref<string | undefined>;
|
|
16
15
|
export type VirtualListOptions = {
|
|
17
16
|
readonly count: () => number;
|
|
18
|
-
/** Every row's height, in pixels. */
|
|
19
17
|
readonly itemSize: () => number;
|
|
20
18
|
readonly overscan?: () => number;
|
|
21
19
|
};
|
|
22
20
|
export type VirtualList = {
|
|
23
21
|
readonly range: ComputedRef<VirtualRange>;
|
|
24
|
-
/** Scrolls so a row is in view, including one that is not rendered yet. */
|
|
25
22
|
readonly scrollToIndex: (index: number, align?: ScrollAlign) => void;
|
|
26
23
|
readonly viewportHeight: Ref<number>;
|
|
27
24
|
};
|
|
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
25
|
export declare const useVirtualList: (container: ElementRef, options: VirtualListOptions) => VirtualList;
|
|
33
26
|
export type Clipboard = {
|
|
34
|
-
/** True for a moment after a copy succeeds. */
|
|
35
27
|
readonly copied: Ref<boolean>;
|
|
36
|
-
/** True after a copy fails, until the next attempt. */
|
|
37
28
|
readonly failed: Ref<boolean>;
|
|
38
29
|
readonly copy: (text: string) => Promise<boolean>;
|
|
39
30
|
};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
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
2
|
export declare const usePresence: (open: () => boolean, element: () => HTMLElement | null) => Ref<boolean>;
|
package/dist/icon.d.ts
ADDED
package/dist/icon.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { computed as e, defineComponent as t, h as n } from "vue";
|
|
2
|
+
import { CANVAS as r, paths as i, resolveFill as a, resolveGeometry as o } from "@lovince/icons";
|
|
3
|
+
//#region src/components/primitives/icon.ts
|
|
4
|
+
var s = t({
|
|
5
|
+
name: "LvIcon",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
props: {
|
|
8
|
+
name: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
type: [Number, String],
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
strokeWidth: {
|
|
17
|
+
type: [Number, String],
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
absoluteStrokeWidth: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
fill: {
|
|
25
|
+
type: [Number, Boolean],
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
rotate: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
flip: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
36
|
+
label: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: void 0
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup: (t, { attrs: s }) => {
|
|
42
|
+
let c = e(() => o({
|
|
43
|
+
size: t.size,
|
|
44
|
+
strokeWidth: t.strokeWidth,
|
|
45
|
+
absoluteStrokeWidth: t.absoluteStrokeWidth,
|
|
46
|
+
rotate: t.rotate,
|
|
47
|
+
flip: t.flip
|
|
48
|
+
}));
|
|
49
|
+
return () => {
|
|
50
|
+
let e = i[t.name] ?? [], o = a(t.fill), l = t.label === void 0 || t.label.length === 0;
|
|
51
|
+
return n("svg", {
|
|
52
|
+
...s,
|
|
53
|
+
class: ["lovince-icon", s.class],
|
|
54
|
+
"data-icon": t.name,
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
width: c.value.size,
|
|
57
|
+
height: c.value.size,
|
|
58
|
+
viewBox: `0 0 ${r} ${r}`,
|
|
59
|
+
fill: "none",
|
|
60
|
+
stroke: "currentColor",
|
|
61
|
+
"stroke-width": c.value.strokeWidth,
|
|
62
|
+
"stroke-linecap": "round",
|
|
63
|
+
"stroke-linejoin": "round",
|
|
64
|
+
"aria-hidden": l ? "true" : void 0,
|
|
65
|
+
role: l ? void 0 : "img",
|
|
66
|
+
"aria-label": l ? void 0 : t.label
|
|
67
|
+
}, [n("g", { transform: c.value.transform }, e.map((e) => n("path", {
|
|
68
|
+
d: e,
|
|
69
|
+
fill: o > 0 ? "currentColor" : "none",
|
|
70
|
+
"fill-opacity": o > 0 ? o : void 0
|
|
71
|
+
})))]);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { s as LvIcon };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { LvPrimitive, LvSlot, primitiveProps } from './shared/primitive';
|
|
2
|
+
export { LvPortal } from './shared/portal';
|
|
3
3
|
export { toElement, useIdWatch, type ElementRef } from './shared/element';
|
|
4
4
|
export { normalizeProps, useMachine, type MachineBinding, type UseMachineOptions } from './shared/machine';
|
|
5
5
|
export { useListEnv, type ListBinding } from './shared/list';
|
|
@@ -8,30 +8,63 @@ export { usePresence } from './composables/presence';
|
|
|
8
8
|
export { useDataTable, type DataTable, type DataTableOptions } from './composables/data-table';
|
|
9
9
|
export { useActiveSection, useClipboard, useInView, useScrollEdges, useVirtualList, type ActiveSectionOptions, type Clipboard, type InViewOptions, type VirtualList, type VirtualListOptions, } from './composables/observers';
|
|
10
10
|
export { scrollLockCount } from '@lovince/ui-dom';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
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';
|
|
11
|
+
export { LvDisclosureRoot, LvDisclosureTrigger, LvDisclosureContent, injectDisclosure } from './components/disclosure/disclosure';
|
|
12
|
+
export { LvCheckboxRoot, LvCheckboxIndicator, LvSwitchRoot, LvSwitchThumb } from './components/choice/toggles';
|
|
13
|
+
export { LvTabsRoot, LvTabsList, LvTabsTrigger, LvTabsContent } from './components/disclosure/tabs';
|
|
14
|
+
export { LvDialogRoot, LvDialogTrigger, LvDialogPortal, LvDialogOverlay, LvDialogContent, LvDialogTitle, LvDialogDescription, LvDialogClose, LvAlertDialogRoot, LvAlertDialogTrigger, LvAlertDialogPortal, LvAlertDialogOverlay, LvAlertDialogContent, LvAlertDialogTitle, LvAlertDialogDescription, LvAlertDialogAction, LvAlertDialogCancel, } from './components/overlays/dialog';
|
|
15
|
+
export * from './components/overlays/popover';
|
|
16
|
+
export * from './components/overlays/tooltip';
|
|
17
|
+
export * from './components/overlays/menu';
|
|
18
|
+
export * from './components/choice/select';
|
|
19
|
+
export * from './components/choice/combobox';
|
|
20
|
+
export * from './components/choice/command';
|
|
21
|
+
export * from './components/overlays/navigation-menu';
|
|
22
|
+
export * from './components/disclosure/accordion';
|
|
23
|
+
export * from './components/choice/radio-group';
|
|
24
|
+
export * from './components/choice/toggle-group';
|
|
25
|
+
export * from './components/inputs/slider';
|
|
26
|
+
export * from './components/inputs/number-field';
|
|
27
|
+
export * from './components/inputs/pin-input';
|
|
28
|
+
export * from './components/display/progress';
|
|
29
|
+
export * from './components/display/avatar';
|
|
30
|
+
export * from './components/inputs/calendar';
|
|
31
|
+
export * from './components/overlays/toast';
|
|
32
|
+
export * from './components/layout/splitter';
|
|
33
|
+
export * from './components/layout/tree';
|
|
34
|
+
export * from './components/layout/carousel';
|
|
35
|
+
export * from './components/layout/sortable';
|
|
36
|
+
export * from './components/choice/emoji-picker';
|
|
37
|
+
export * from './components/forms/tags-input';
|
|
38
|
+
export * from './components/forms/file-upload';
|
|
39
|
+
export * from './components/forms/time-field';
|
|
40
|
+
export * from './components/forms/phone-input';
|
|
41
|
+
export * from './components/layout/scroll-area';
|
|
42
|
+
export { LvFieldRoot, LvFieldLabel, LvForm, LvInput, LvTextarea } from './components/forms/forms';
|
|
43
|
+
export { LvButton, BUTTON_SHAPES, BUTTON_SIZES, BUTTON_VARIANTS, type ButtonShape, type ButtonSize, type ButtonVariant } from './components/primitives/button';
|
|
44
|
+
export { LvAspectRatio, LvBox, LvCode, LvHeading, LvKbd, LvLabel, LvLink, LvSeparator, LvText, LvVisuallyHidden, type TextRole } from './components/primitives/primitives';
|
|
37
45
|
export type { ActivationMode, CheckedState, DialogRole, Direction, Orientation } from '@lovince/ui-headless';
|
|
46
|
+
export * from './components/display/feedback';
|
|
47
|
+
export * from './components/display/meter';
|
|
48
|
+
export * from './components/display/stat';
|
|
49
|
+
export * from './components/display/timeline';
|
|
50
|
+
export * from './components/display/avatar-group';
|
|
51
|
+
export * from './components/display/image';
|
|
52
|
+
export * from './components/display/table';
|
|
53
|
+
export * from './components/choice/rating';
|
|
54
|
+
export * from './components/choice/segmented-control';
|
|
55
|
+
export * from './components/forms/text-inputs';
|
|
56
|
+
export * from './components/forms/editable';
|
|
57
|
+
export * from './components/forms/color-picker';
|
|
58
|
+
export * from './components/forms/signature-pad';
|
|
59
|
+
export * from './components/forms/date-picker';
|
|
60
|
+
export * from './components/overlays/menubar';
|
|
61
|
+
export * from './components/overlays/sheet';
|
|
62
|
+
export * from './components/navigation/breadcrumb';
|
|
63
|
+
export * from './components/navigation/pagination';
|
|
64
|
+
export * from './components/navigation/stepper';
|
|
65
|
+
export * from './components/navigation/toolbar';
|
|
66
|
+
export * from './components/navigation/sidebar';
|
|
67
|
+
export * from './components/navigation/table-of-contents';
|
|
68
|
+
export * from './components/layout/primitives';
|
|
69
|
+
export * from './components/layout/virtual-list';
|
|
70
|
+
export * from './components/layout/marquee';
|