@vueye-table/styled 3.0.0-alpha.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Brahim Boussadjra and vueye-table contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # @vueye-table/styled
2
+
3
+ Themed Vue components for vueye-table (`VtTable`, `VtGrid`, `VtToolbar`, `VtSearch`,
4
+ `VtPagination`, `VtPageSize`, `VtColumnVisibility`, `VtStatus`, `VtEmpty`) and a stylesheet
5
+ driven by CSS custom properties, with dark mode and three densities.
6
+
7
+ ```bash
8
+ pnpm add @vueye-table/styled vue
9
+ ```
10
+
11
+ ```ts
12
+ import "@vueye-table/styled/style.css";
13
+ ```
14
+
15
+ See the [repository README](https://github.com/boussadjra/vueye-table#readme) for every layer.
@@ -0,0 +1,397 @@
1
+ import { SortInfo, TableColumn, TableRow } from "@vueye-table/core";
2
+ import { GridCellSlotProps } from "@vueye-table/headless";
3
+ import { AnyDataTableBinding, DataTableBinding } from "@vueye-table/vue";
4
+ import { Component, PropType, SlotsType, VNode, VNodeChild } from "vue";
5
+ //#region src/components.d.ts
6
+ type Density = "compact" | "comfortable" | "spacious";
7
+ /** An arrow showing a column's sort direction and, in a multi-column sort, its priority. */
8
+ declare const VtSortIndicator: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
+ sort: {
10
+ type: PropType<SortInfo | undefined>;
11
+ default: undefined;
12
+ };
13
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
14
+ [key: string]: any;
15
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ sort: {
17
+ type: PropType<SortInfo | undefined>;
18
+ default: undefined;
19
+ };
20
+ }>> & Readonly<{}>, {
21
+ sort: SortInfo | undefined;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
23
+ /** A header row of styled header cells with sort indicators. */
24
+ declare const VtHeader: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
25
+ [key: string]: any;
26
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<{
27
+ [key: `header.${string}`]: (props: {
28
+ column: TableColumn<unknown>;
29
+ sort: SortInfo | undefined;
30
+ toggleSort: (multi?: boolean) => void;
31
+ }) => VNode[];
32
+ } & {
33
+ before?: () => VNode[];
34
+ after?: () => VNode[];
35
+ header?: (props: {
36
+ column: TableColumn<unknown>;
37
+ }) => VNodeChild;
38
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
+ /**
40
+ * The styled table surface: a scroll container, a loading bar, and the table. Without a default
41
+ * slot it renders a styled header and body.
42
+ */
43
+ declare const VtTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
44
+ density: {
45
+ readonly type: PropType<Density>;
46
+ readonly default: "comfortable";
47
+ };
48
+ striped: {
49
+ readonly type: BooleanConstructor;
50
+ readonly default: false;
51
+ };
52
+ bordered: {
53
+ readonly type: BooleanConstructor;
54
+ readonly default: false;
55
+ };
56
+ hover: {
57
+ readonly type: BooleanConstructor;
58
+ readonly default: true;
59
+ };
60
+ stickyHeader: {
61
+ readonly type: BooleanConstructor;
62
+ readonly default: false;
63
+ };
64
+ loading: {
65
+ readonly type: BooleanConstructor;
66
+ readonly default: false;
67
+ };
68
+ theme: {
69
+ readonly type: PropType<"light" | "dark" | undefined>;
70
+ readonly default: undefined;
71
+ };
72
+ table: {
73
+ type: PropType<AnyDataTableBinding>;
74
+ required: true;
75
+ };
76
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
77
+ [key: string]: any;
78
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
79
+ density: {
80
+ readonly type: PropType<Density>;
81
+ readonly default: "comfortable";
82
+ };
83
+ striped: {
84
+ readonly type: BooleanConstructor;
85
+ readonly default: false;
86
+ };
87
+ bordered: {
88
+ readonly type: BooleanConstructor;
89
+ readonly default: false;
90
+ };
91
+ hover: {
92
+ readonly type: BooleanConstructor;
93
+ readonly default: true;
94
+ };
95
+ stickyHeader: {
96
+ readonly type: BooleanConstructor;
97
+ readonly default: false;
98
+ };
99
+ loading: {
100
+ readonly type: BooleanConstructor;
101
+ readonly default: false;
102
+ };
103
+ theme: {
104
+ readonly type: PropType<"light" | "dark" | undefined>;
105
+ readonly default: undefined;
106
+ };
107
+ table: {
108
+ type: PropType<AnyDataTableBinding>;
109
+ required: true;
110
+ };
111
+ }>> & Readonly<{}>, {
112
+ density: Density;
113
+ striped: boolean;
114
+ bordered: boolean;
115
+ hover: boolean;
116
+ stickyHeader: boolean;
117
+ loading: boolean;
118
+ theme: "light" | "dark" | undefined;
119
+ }, SlotsType<{
120
+ default?: (props: {
121
+ table: DataTableBinding<unknown>;
122
+ }) => VNode[];
123
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
124
+ /** The styled body, with the empty state in a full-width row. */
125
+ declare const VtBody: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
126
+ [key: string]: any;
127
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<{
128
+ default?: (props: {
129
+ rows: readonly TableRow<unknown>[];
130
+ }) => VNode[];
131
+ empty?: () => VNode[];
132
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
133
+ /** The default empty state. */
134
+ declare const VtEmpty: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
135
+ text: {
136
+ type: StringConstructor;
137
+ default: string;
138
+ };
139
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
140
+ [key: string]: any;
141
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
142
+ text: {
143
+ type: StringConstructor;
144
+ default: string;
145
+ };
146
+ }>> & Readonly<{}>, {
147
+ text: string;
148
+ }, SlotsType<{
149
+ default?: () => VNode[];
150
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
151
+ /** A search field with an icon. */
152
+ declare const VtSearch: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
153
+ [key: string]: any;
154
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
155
+ /** "Rows per page" with a picker. */
156
+ declare const VtPageSize: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
157
+ options: {
158
+ type: PropType<readonly number[]>;
159
+ default: () => number[];
160
+ };
161
+ label: {
162
+ type: StringConstructor;
163
+ default: string;
164
+ };
165
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
166
+ [key: string]: any;
167
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
168
+ options: {
169
+ type: PropType<readonly number[]>;
170
+ default: () => number[];
171
+ };
172
+ label: {
173
+ type: StringConstructor;
174
+ default: string;
175
+ };
176
+ }>> & Readonly<{}>, {
177
+ label: string;
178
+ options: readonly number[];
179
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
180
+ /**
181
+ * A menu of column checkboxes behind a "Columns" button. Escape closes it and returns focus to
182
+ * the button, and so does moving focus out of it.
183
+ */
184
+ declare const VtColumnVisibility: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
185
+ label: {
186
+ type: StringConstructor;
187
+ default: string;
188
+ };
189
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
190
+ [key: string]: any;
191
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
192
+ label: {
193
+ type: StringConstructor;
194
+ default: string;
195
+ };
196
+ }>> & Readonly<{}>, {
197
+ label: string;
198
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
199
+ declare const VtPagination: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
200
+ as: {
201
+ readonly type: StringConstructor;
202
+ readonly default: string;
203
+ };
204
+ label: {
205
+ type: StringConstructor;
206
+ default: string;
207
+ };
208
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
209
+ [key: string]: any;
210
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
211
+ as: {
212
+ readonly type: StringConstructor;
213
+ readonly default: string;
214
+ };
215
+ label: {
216
+ type: StringConstructor;
217
+ default: string;
218
+ };
219
+ }>> & Readonly<{}>, {
220
+ label: string;
221
+ as: string;
222
+ }, SlotsType<{
223
+ default?: (props: {
224
+ page: number;
225
+ pageCount: number;
226
+ items: readonly import("@vueye-table/core").PageItem[];
227
+ canPrevious: boolean;
228
+ canNext: boolean;
229
+ goToPage: (page: number) => void;
230
+ next: () => void;
231
+ previous: () => void;
232
+ }) => VNode[];
233
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
234
+ declare const VtStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
235
+ as: {
236
+ readonly type: StringConstructor;
237
+ readonly default: string;
238
+ };
239
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
240
+ [key: string]: any;
241
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
242
+ as: {
243
+ readonly type: StringConstructor;
244
+ readonly default: string;
245
+ };
246
+ }>> & Readonly<{}>, {
247
+ as: string;
248
+ }, SlotsType<{
249
+ default?: (props: {
250
+ start: number;
251
+ end: number;
252
+ rowCount: number;
253
+ totalRowCount: number;
254
+ selectedCount: number;
255
+ }) => VNode[];
256
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
257
+ /** A horizontal bar for controls above or below a table. */
258
+ declare const VtToolbar: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
259
+ [key: string]: any;
260
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<{
261
+ default?: () => VNode[];
262
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
263
+ /**
264
+ * The styled spreadsheet grid, with optional row numbers and A, B, C column letters. A
265
+ * `cell.<column id>` slot draws that column's cells while they are not being edited.
266
+ */
267
+ declare const VtGrid: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
268
+ density: {
269
+ readonly type: PropType<Density>;
270
+ readonly default: "comfortable";
271
+ };
272
+ striped: {
273
+ readonly type: BooleanConstructor;
274
+ readonly default: false;
275
+ };
276
+ bordered: {
277
+ readonly type: BooleanConstructor;
278
+ readonly default: false;
279
+ };
280
+ hover: {
281
+ readonly type: BooleanConstructor;
282
+ readonly default: true;
283
+ };
284
+ stickyHeader: {
285
+ readonly type: BooleanConstructor;
286
+ readonly default: false;
287
+ };
288
+ loading: {
289
+ readonly type: BooleanConstructor;
290
+ readonly default: false;
291
+ };
292
+ theme: {
293
+ readonly type: PropType<"light" | "dark" | undefined>;
294
+ readonly default: undefined;
295
+ };
296
+ table: {
297
+ type: PropType<AnyDataTableBinding>;
298
+ required: true;
299
+ };
300
+ label: {
301
+ type: PropType<string | undefined>;
302
+ default: undefined;
303
+ };
304
+ rowNumbers: {
305
+ type: BooleanConstructor;
306
+ default: boolean;
307
+ };
308
+ columnLetters: {
309
+ type: BooleanConstructor;
310
+ default: boolean;
311
+ };
312
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
313
+ [key: string]: any;
314
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
315
+ density: {
316
+ readonly type: PropType<Density>;
317
+ readonly default: "comfortable";
318
+ };
319
+ striped: {
320
+ readonly type: BooleanConstructor;
321
+ readonly default: false;
322
+ };
323
+ bordered: {
324
+ readonly type: BooleanConstructor;
325
+ readonly default: false;
326
+ };
327
+ hover: {
328
+ readonly type: BooleanConstructor;
329
+ readonly default: true;
330
+ };
331
+ stickyHeader: {
332
+ readonly type: BooleanConstructor;
333
+ readonly default: false;
334
+ };
335
+ loading: {
336
+ readonly type: BooleanConstructor;
337
+ readonly default: false;
338
+ };
339
+ theme: {
340
+ readonly type: PropType<"light" | "dark" | undefined>;
341
+ readonly default: undefined;
342
+ };
343
+ table: {
344
+ type: PropType<AnyDataTableBinding>;
345
+ required: true;
346
+ };
347
+ label: {
348
+ type: PropType<string | undefined>;
349
+ default: undefined;
350
+ };
351
+ rowNumbers: {
352
+ type: BooleanConstructor;
353
+ default: boolean;
354
+ };
355
+ columnLetters: {
356
+ type: BooleanConstructor;
357
+ default: boolean;
358
+ };
359
+ }>> & Readonly<{}>, {
360
+ label: string | undefined;
361
+ density: Density;
362
+ striped: boolean;
363
+ bordered: boolean;
364
+ hover: boolean;
365
+ stickyHeader: boolean;
366
+ loading: boolean;
367
+ theme: "light" | "dark" | undefined;
368
+ rowNumbers: boolean;
369
+ columnLetters: boolean;
370
+ }, SlotsType<{
371
+ [key: `cell.${string}`]: GridCellSlotProps;
372
+ } & {
373
+ default?: (props: Record<string, unknown>) => VNode[];
374
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
375
+ //#endregion
376
+ //#region src/icons.d.ts
377
+ declare const paths: {
378
+ readonly sortNone: "M7 9l5-5 5 5M7 15l5 5 5-5";
379
+ readonly sortAsc: "M7 14l5-5 5 5";
380
+ readonly sortDesc: "M7 10l5 5 5-5";
381
+ readonly search: "M11 19a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm10 2-4.35-4.35";
382
+ readonly columns: "M4 4h6v16H4zM14 4h6v16h-6z";
383
+ readonly empty: "M3 7h18M3 12h18M3 17h10";
384
+ };
385
+ type IconName = keyof typeof paths;
386
+ /** A 24-pixel stroke icon that inherits the text color. */
387
+ declare function icon(name: IconName, className?: string): VNode;
388
+ //#endregion
389
+ //#region src/with-class.d.ts
390
+ /**
391
+ * Wrap a component so it always carries a class. Props, attributes, and slots pass through
392
+ * untouched, so the wrapper keeps the wrapped component's full API.
393
+ */
394
+ declare function withClass<TComponent extends Component>(component: TComponent, className: string, name: string): TComponent;
395
+ //#endregion
396
+ export { type Density, type IconName, VtBody, VtColumnVisibility, VtEmpty, VtGrid, VtHeader, VtPageSize, VtPagination, VtSearch, VtSortIndicator, VtStatus, VtTable, VtToolbar, icon, withClass };
397
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components.ts","../src/icons.ts","../src/with-class.ts"],"mappings":";;;;;KA8BY;;cAqCC,+BAAe,8BAAA;;IAEO,MAAA,SAAS;;;;;;;IAAT,MAAA,SAAS;;;;;qCAW1C;;cAGW,wBAAQ,0BAAA,oBAAA,4BAAA;;;GAIoB,2BAAA;IACjC,QAAQ;IACR,MAAM;IACN,aAAa;QACT;;EAEG,eAAM;EACP,cAAM;EACL,UAAC;IAAS,QAAQ;QAA2B;kCAoC1D;;;;;cAMW,uBAAO,8BAAA;;aAvGS,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;aAOX,MAAA;;;;IAsGE,MAAA,SAAS;;;;;;;aA7GT,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;aAOX,MAAA;;;;IAsGE,MAAA,SAAS;;;;;;;;;;;;EAHxB,WAAC;IAAS,OAAO;QAAgC;kCAqB7D;;cAGW,sBAAM,0BAAA,oBAAA,4BAAA;;;EAGL,WAAC;IAAS,eAAe;QAA0B;EACrD,cAAM;kCAahB;;cAGW,uBAAO,8BAAA;;;;;;;;;;;;;;;EAEqB,gBAAM;kCAS7C;;cAGW,wBAAQ,0BAAA,oBAAA,4BAAA;;8BAMnB,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,0BAAU,8BAAA;;IAGO,MAAA;;;;;;;;;;;IAAA,MAAA;;;;;;;;;;qCAU5B;;;;;cAMW,kCAAkB,8BAAA;;;;;;;;;;;;;;qCAwC7B;cAEW,4BAAY,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAAkE;cAC9E,wBAAQ,8BAAA;;;;;;;;;;;;;;;;;;;;;;kCAAsD;;cAG9D,yBAAS,0BAAA,oBAAA,4BAAA;;;EAEmB,gBAAM;kCAI7C;;;;;cA6CW,sBAAM,8BAAA;;aAjSU,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;aAOX,MAAA;;;;IAkSE,MAAA,SAAS;;;;IACT,MAAA;;;;;;;;;;;;;;;aA1SA,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;aAOX,MAAA;;;;IAkSE,MAAA,SAAS;;;;IACT,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;EALb,WAAC,OAAO,4BAA4B;kCAsDlD;;;cC3XI;;;;;;;;KASM,wBAAwB;;iBAGpB,KAAK,MAAM,UAAU,qBAAwB;;;;;;;iBCR7C,UAAU,mBAAmB,WAC3C,WAAW,YACX,mBACA,eACC"}