@frontile/collections 0.18.0-alpha.2 → 0.18.0-alpha.20

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 (52) hide show
  1. package/declarations/index.d.ts +1 -3
  2. package/declarations/template-registry.d.ts +1 -7
  3. package/dist/index.js +13 -3
  4. package/dist/index.js.map +1 -1
  5. package/package.json +14 -23
  6. package/declarations/components/dropdown.d.ts +0 -99
  7. package/declarations/components/listbox/item.d.ts +0 -51
  8. package/declarations/components/listbox/listbox.d.ts +0 -75
  9. package/declarations/components/listbox.d.ts +0 -2
  10. package/declarations/components/simple-table/body.d.ts +0 -428
  11. package/declarations/components/simple-table/cell.d.ts +0 -427
  12. package/declarations/components/simple-table/column.d.ts +0 -419
  13. package/declarations/components/simple-table/footer.d.ts +0 -430
  14. package/declarations/components/simple-table/header.d.ts +0 -430
  15. package/declarations/components/simple-table/index.d.ts +0 -446
  16. package/declarations/components/simple-table/row.d.ts +0 -430
  17. package/declarations/components/table/cell-default.d.ts +0 -43
  18. package/declarations/components/table/cell-for.d.ts +0 -38
  19. package/declarations/components/table/cell-rendering-context.d.ts +0 -24
  20. package/declarations/components/table/checkbox.d.ts +0 -50
  21. package/declarations/components/table/column-visibility.d.ts +0 -416
  22. package/declarations/components/table/icons.d.ts +0 -11
  23. package/declarations/components/table/index.d.ts +0 -4
  24. package/declarations/components/table/sort-button.d.ts +0 -413
  25. package/declarations/components/table/table.d.ts +0 -555
  26. package/declarations/components/table/types.d.ts +0 -46
  27. package/declarations/components/table/utils.d.ts +0 -6
  28. package/declarations/components/table.d.ts +0 -2
  29. package/declarations/utils/listManager.d.ts +0 -74
  30. package/dist/_app_/components/dropdown.js +0 -1
  31. package/dist/_app_/components/listbox.js +0 -1
  32. package/dist/_app_/components/table.js +0 -1
  33. package/dist/components/dropdown.js +0 -94
  34. package/dist/components/dropdown.js.map +0 -1
  35. package/dist/components/listbox.js +0 -2
  36. package/dist/components/listbox.js.map +0 -1
  37. package/dist/components/table.js +0 -2
  38. package/dist/components/table.js.map +0 -1
  39. package/dist/listManager-CKsOd2zS.js +0 -438
  40. package/dist/listManager-CKsOd2zS.js.map +0 -1
  41. package/dist/listbox-CkGwpiDp.js +0 -203
  42. package/dist/listbox-CkGwpiDp.js.map +0 -1
  43. package/dist/listbox-Czwb-jUT.js +0 -203
  44. package/dist/listbox-Czwb-jUT.js.map +0 -1
  45. package/dist/table-3uScDwoD.js +0 -877
  46. package/dist/table-3uScDwoD.js.map +0 -1
  47. package/dist/table-DvivyvLm.js +0 -877
  48. package/dist/table-DvivyvLm.js.map +0 -1
  49. package/dist/table-SVR6fEqh.js +0 -877
  50. package/dist/table-SVR6fEqh.js.map +0 -1
  51. package/dist/utils/listManager.js +0 -5
  52. package/dist/utils/listManager.js.map +0 -1
@@ -1,555 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import ColumnVisibilityComponent from './column-visibility';
3
- import CellForComponent from './cell-for';
4
- import CellDefaultComponent from './cell-default';
5
- import SortButtonComponent from './sort-button';
6
- import CheckboxComponent from './checkbox';
7
- import { CellRenderingContext } from './cell-rendering-context';
8
- import type { ColumnConfig, TableVariants, TableSlots, SlotsToClasses, Column, Row, SortItem, SelectionMode } from './types';
9
- import type { ColumnConfig as UniversalColumnConfig } from '@universal-ember/table';
10
- import type { ContentValue, WithBoundArgs } from '@glint/template';
11
- import type Owner from '@ember/owner';
12
- interface TableSignature<T, TColumns extends ColumnConfig<T>[] = ColumnConfig<T>[]> {
13
- Args: {
14
- /** Array of column configurations for automatic table generation */
15
- columns: TColumns;
16
- /** Array of data items to display in the table */
17
- items: T[];
18
- /** Custom CSS classes for different table elements (wrapper, table, th, td, etc.) */
19
- classes?: SlotsToClasses<TableSlots>;
20
- /** Size variant for table cells and headers. @defaultValue 'md' */
21
- size?: TableVariants['size'];
22
- /** Table layout algorithm - 'auto' sizes columns by content, 'fixed' uses first row for sizing. @defaultValue 'auto' */
23
- layout?: TableVariants['layout'];
24
- /** Enable striped rows (alternating background colors) */
25
- isStriped?: TableVariants['striped'];
26
- /** Content to display when no data items are provided */
27
- emptyContent?: ContentValue;
28
- /** Enable scrolling for the table container */
29
- isScrollable?: boolean;
30
- /** Array of item keys that should be sticky during vertical scrolling */
31
- stickyKeys?: string[];
32
- /** Make the table header sticky during vertical scrolling */
33
- isStickyHeader?: boolean;
34
- /** Array of column configurations for automatic footer generation */
35
- footerColumns?: ColumnConfig<T>[];
36
- /** Make the table footer sticky during vertical scrolling */
37
- isStickyFooter?: boolean;
38
- /** Enable loading state styling and behavior */
39
- isLoading?: boolean;
40
- /** Color variant for loading animation. @defaultValue 'default' */
41
- loadingColor?: TableVariants['loadingColor'];
42
- /** Function to sort items when sorting is triggered. Receives the items array and sort descriptor. Returns sorted items. */
43
- onSort?: (items: T[], sortDescriptor: SortItem<T>) => T[];
44
- /** Initial sort descriptor to apply on mount. Only used for initial render, subsequent changes are ignored. */
45
- initialSort?: SortItem<T>;
46
- /** Selection mode - 'none' (default), 'single' (row clicks only), or 'multiple' (with checkboxes). @defaultValue 'none' */
47
- selectionMode?: SelectionMode;
48
- /** Color variant for selection highlight. @defaultValue 'primary' */
49
- selectionColor?: TableVariants['selectionColor'];
50
- /** Set of selected item keys */
51
- selectedKeys?: Set<string> | string[];
52
- /** Callback when selection changes */
53
- onSelectionChange?: (selectedKeys: Set<string>) => void;
54
- /** Function to extract unique key from an item. Defaults to using keyAndLabelForItem helper. */
55
- getKey?: (item: T) => string;
56
- /** Array of keys that should be disabled from selection */
57
- disabledKeys?: string[];
58
- /** Show "select all" checkbox in header (only for multiple selection mode). @defaultValue true */
59
- showSelectAll?: boolean;
60
- };
61
- Element: HTMLTableElement;
62
- Blocks: {
63
- default: never;
64
- toolbar: [
65
- {
66
- ColumnVisibility: WithBoundArgs<typeof ColumnVisibilityComponent<T>, 'tableInstance'>;
67
- }
68
- ];
69
- cell: [
70
- {
71
- column: Column<T>;
72
- value: ContentValue;
73
- row: Row<T>;
74
- For: WithBoundArgs<typeof CellForComponent<T, TColumns>, 'column' | 'registry'>;
75
- Default: WithBoundArgs<typeof CellDefaultComponent<T>, 'column' | 'registry'>;
76
- }
77
- ];
78
- empty: [];
79
- header: [
80
- {
81
- column: Column<T>;
82
- isSortable: boolean;
83
- sortDirection: string;
84
- isSorted: boolean;
85
- onSort: () => void;
86
- }
87
- ];
88
- loading: [];
89
- bodyTop: [];
90
- bodyBottom: [];
91
- };
92
- }
93
- declare class Table<T = unknown, TColumns extends ColumnConfig<T>[] = ColumnConfig<T>[]> extends Component<TableSignature<T, TColumns>> {
94
- ColumnVisibility: {
95
- new (owner: Owner, args: {
96
- tableInstance?: import("@universal-ember/table").Table<T> | undefined;
97
- size?: "xs" | "sm" | "lg" | "xl";
98
- }): ColumnVisibilityComponent<T>;
99
- };
100
- CellFor: {
101
- new (owner: Owner, args: {
102
- key: import("./types").ColumnKeys<TColumns>;
103
- column: Column<T>;
104
- registry: CellRenderingContext;
105
- }): CellForComponent<T, TColumns>;
106
- };
107
- CellDefault: {
108
- new (owner: Owner, args: {
109
- column: Column<T>;
110
- registry: CellRenderingContext;
111
- except?: string[];
112
- }): CellDefaultComponent<T>;
113
- };
114
- SortButton: {
115
- new (owner: Owner, args: {
116
- column: Column<T>;
117
- sortDirection: import("@universal-ember/table/plugins/data-sorting").SortDirection;
118
- isSorted: boolean;
119
- onSort: () => void;
120
- }): SortButtonComponent<T>;
121
- };
122
- Checkbox: typeof CheckboxComponent;
123
- sorts: SortItem<T>[];
124
- private internalSelectedKeys;
125
- constructor(owner: Owner, args: TableSignature<T, TColumns>['Args']);
126
- get selectionMode(): SelectionMode;
127
- get hasSelection(): boolean;
128
- get selectedKeysSet(): Set<string>;
129
- get disabledKeysSet(): Set<string>;
130
- getRowData: (row: Row<T>) => T;
131
- getKey: (itemOrRow: T | Row<T>) => string;
132
- isKeyDisabled: (key: string) => boolean;
133
- handleSelect: (key: string) => void;
134
- handleDeselect: (key: string) => void;
135
- isRowSelected: (row: Row<T>) => boolean;
136
- isRowDisabled: (row: Row<T>) => boolean;
137
- handleRowSelectionChange: (row: Row<T>, checked: boolean) => void;
138
- handleRowKeydown: (row: Row<T>, event: KeyboardEvent) => void;
139
- rowKeyboardHandler: import("ember-modifier").FunctionBasedModifier<{
140
- Args: {
141
- Positional: [Row<T>];
142
- Named: import("ember-modifier/-private/signature").EmptyObject;
143
- };
144
- Element: HTMLElement;
145
- }>;
146
- get selectableKeys(): string[];
147
- get isAllSelected(): boolean;
148
- get isSomeSelected(): boolean;
149
- handleSelectAllChange: (checked: boolean) => void;
150
- get columnsWithSelection(): readonly ColumnConfig<T>[];
151
- processColumns(columns: readonly ColumnConfig<T>[]): UniversalColumnConfig<T>[];
152
- handleSortChange: (newSorts: SortItem<T>[]) => void;
153
- tableInstance: import("@universal-ember/table").Table<T>;
154
- get sortedItems(): T[];
155
- get styles(): {
156
- base: (slotProps?: ({
157
- size?: "sm" | "md" | "lg" | undefined;
158
- isLoading?: boolean | undefined;
159
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
160
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
161
- layout?: "fixed" | "auto" | undefined;
162
- striped?: boolean | undefined;
163
- isSticky?: boolean | undefined;
164
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
165
- isScrollable?: boolean | undefined;
166
- hasStickyHeader?: boolean | undefined;
167
- isInStickyRow?: boolean | undefined;
168
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
169
- wrapper: (slotProps?: ({
170
- size?: "sm" | "md" | "lg" | undefined;
171
- isLoading?: boolean | undefined;
172
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
173
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
174
- layout?: "fixed" | "auto" | undefined;
175
- striped?: boolean | undefined;
176
- isSticky?: boolean | undefined;
177
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
178
- isScrollable?: boolean | undefined;
179
- hasStickyHeader?: boolean | undefined;
180
- isInStickyRow?: boolean | undefined;
181
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
182
- table: (slotProps?: ({
183
- size?: "sm" | "md" | "lg" | undefined;
184
- isLoading?: boolean | undefined;
185
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
186
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
187
- layout?: "fixed" | "auto" | undefined;
188
- striped?: boolean | undefined;
189
- isSticky?: boolean | undefined;
190
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
191
- isScrollable?: boolean | undefined;
192
- hasStickyHeader?: boolean | undefined;
193
- isInStickyRow?: boolean | undefined;
194
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
195
- thead: (slotProps?: ({
196
- size?: "sm" | "md" | "lg" | undefined;
197
- isLoading?: boolean | undefined;
198
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
199
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
200
- layout?: "fixed" | "auto" | undefined;
201
- striped?: boolean | undefined;
202
- isSticky?: boolean | undefined;
203
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
204
- isScrollable?: boolean | undefined;
205
- hasStickyHeader?: boolean | undefined;
206
- isInStickyRow?: boolean | undefined;
207
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
208
- tbody: (slotProps?: ({
209
- size?: "sm" | "md" | "lg" | undefined;
210
- isLoading?: boolean | undefined;
211
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
212
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
213
- layout?: "fixed" | "auto" | undefined;
214
- striped?: boolean | undefined;
215
- isSticky?: boolean | undefined;
216
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
217
- isScrollable?: boolean | undefined;
218
- hasStickyHeader?: boolean | undefined;
219
- isInStickyRow?: boolean | undefined;
220
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
221
- tfoot: (slotProps?: ({
222
- size?: "sm" | "md" | "lg" | undefined;
223
- isLoading?: boolean | undefined;
224
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
225
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
226
- layout?: "fixed" | "auto" | undefined;
227
- striped?: boolean | undefined;
228
- isSticky?: boolean | undefined;
229
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
230
- isScrollable?: boolean | undefined;
231
- hasStickyHeader?: boolean | undefined;
232
- isInStickyRow?: boolean | undefined;
233
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
234
- tr: (slotProps?: ({
235
- size?: "sm" | "md" | "lg" | undefined;
236
- isLoading?: boolean | undefined;
237
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
238
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
239
- layout?: "fixed" | "auto" | undefined;
240
- striped?: boolean | undefined;
241
- isSticky?: boolean | undefined;
242
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
243
- isScrollable?: boolean | undefined;
244
- hasStickyHeader?: boolean | undefined;
245
- isInStickyRow?: boolean | undefined;
246
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
247
- separator: (slotProps?: ({
248
- size?: "sm" | "md" | "lg" | undefined;
249
- isLoading?: boolean | undefined;
250
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
251
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
252
- layout?: "fixed" | "auto" | undefined;
253
- striped?: boolean | undefined;
254
- isSticky?: boolean | undefined;
255
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
256
- isScrollable?: boolean | undefined;
257
- hasStickyHeader?: boolean | undefined;
258
- isInStickyRow?: boolean | undefined;
259
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
260
- th: (slotProps?: ({
261
- size?: "sm" | "md" | "lg" | undefined;
262
- isLoading?: boolean | undefined;
263
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
264
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
265
- layout?: "fixed" | "auto" | undefined;
266
- striped?: boolean | undefined;
267
- isSticky?: boolean | undefined;
268
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
269
- isScrollable?: boolean | undefined;
270
- hasStickyHeader?: boolean | undefined;
271
- isInStickyRow?: boolean | undefined;
272
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
273
- sortButton: (slotProps?: ({
274
- size?: "sm" | "md" | "lg" | undefined;
275
- isLoading?: boolean | undefined;
276
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
277
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
278
- layout?: "fixed" | "auto" | undefined;
279
- striped?: boolean | undefined;
280
- isSticky?: boolean | undefined;
281
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
282
- isScrollable?: boolean | undefined;
283
- hasStickyHeader?: boolean | undefined;
284
- isInStickyRow?: boolean | undefined;
285
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
286
- sortIcon: (slotProps?: ({
287
- size?: "sm" | "md" | "lg" | undefined;
288
- isLoading?: boolean | undefined;
289
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
290
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
291
- layout?: "fixed" | "auto" | undefined;
292
- striped?: boolean | undefined;
293
- isSticky?: boolean | undefined;
294
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
295
- isScrollable?: boolean | undefined;
296
- hasStickyHeader?: boolean | undefined;
297
- isInStickyRow?: boolean | undefined;
298
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
299
- columnVisibilityButton: (slotProps?: ({
300
- size?: "sm" | "md" | "lg" | undefined;
301
- isLoading?: boolean | undefined;
302
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
303
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
304
- layout?: "fixed" | "auto" | undefined;
305
- striped?: boolean | undefined;
306
- isSticky?: boolean | undefined;
307
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
308
- isScrollable?: boolean | undefined;
309
- hasStickyHeader?: boolean | undefined;
310
- isInStickyRow?: boolean | undefined;
311
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
312
- columnVisibilityIcon: (slotProps?: ({
313
- size?: "sm" | "md" | "lg" | undefined;
314
- isLoading?: boolean | undefined;
315
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
316
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
317
- layout?: "fixed" | "auto" | undefined;
318
- striped?: boolean | undefined;
319
- isSticky?: boolean | undefined;
320
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
321
- isScrollable?: boolean | undefined;
322
- hasStickyHeader?: boolean | undefined;
323
- isInStickyRow?: boolean | undefined;
324
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
325
- td: (slotProps?: ({
326
- size?: "sm" | "md" | "lg" | undefined;
327
- isLoading?: boolean | undefined;
328
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
329
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
330
- layout?: "fixed" | "auto" | undefined;
331
- striped?: boolean | undefined;
332
- isSticky?: boolean | undefined;
333
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
334
- isScrollable?: boolean | undefined;
335
- hasStickyHeader?: boolean | undefined;
336
- isInStickyRow?: boolean | undefined;
337
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
338
- empty: (slotProps?: ({
339
- size?: "sm" | "md" | "lg" | undefined;
340
- isLoading?: boolean | undefined;
341
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
342
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
343
- layout?: "fixed" | "auto" | undefined;
344
- striped?: boolean | undefined;
345
- isSticky?: boolean | undefined;
346
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
347
- isScrollable?: boolean | undefined;
348
- hasStickyHeader?: boolean | undefined;
349
- isInStickyRow?: boolean | undefined;
350
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
351
- } & {
352
- base: (slotProps?: ({
353
- size?: "sm" | "md" | "lg" | undefined;
354
- isLoading?: boolean | undefined;
355
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
356
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
357
- layout?: "fixed" | "auto" | undefined;
358
- striped?: boolean | undefined;
359
- isSticky?: boolean | undefined;
360
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
361
- isScrollable?: boolean | undefined;
362
- hasStickyHeader?: boolean | undefined;
363
- isInStickyRow?: boolean | undefined;
364
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
365
- wrapper: (slotProps?: ({
366
- size?: "sm" | "md" | "lg" | undefined;
367
- isLoading?: boolean | undefined;
368
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
369
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
370
- layout?: "fixed" | "auto" | undefined;
371
- striped?: boolean | undefined;
372
- isSticky?: boolean | undefined;
373
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
374
- isScrollable?: boolean | undefined;
375
- hasStickyHeader?: boolean | undefined;
376
- isInStickyRow?: boolean | undefined;
377
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
378
- table: (slotProps?: ({
379
- size?: "sm" | "md" | "lg" | undefined;
380
- isLoading?: boolean | undefined;
381
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
382
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
383
- layout?: "fixed" | "auto" | undefined;
384
- striped?: boolean | undefined;
385
- isSticky?: boolean | undefined;
386
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
387
- isScrollable?: boolean | undefined;
388
- hasStickyHeader?: boolean | undefined;
389
- isInStickyRow?: boolean | undefined;
390
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
391
- thead: (slotProps?: ({
392
- size?: "sm" | "md" | "lg" | undefined;
393
- isLoading?: boolean | undefined;
394
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
395
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
396
- layout?: "fixed" | "auto" | undefined;
397
- striped?: boolean | undefined;
398
- isSticky?: boolean | undefined;
399
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
400
- isScrollable?: boolean | undefined;
401
- hasStickyHeader?: boolean | undefined;
402
- isInStickyRow?: boolean | undefined;
403
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
404
- tbody: (slotProps?: ({
405
- size?: "sm" | "md" | "lg" | undefined;
406
- isLoading?: boolean | undefined;
407
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
408
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
409
- layout?: "fixed" | "auto" | undefined;
410
- striped?: boolean | undefined;
411
- isSticky?: boolean | undefined;
412
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
413
- isScrollable?: boolean | undefined;
414
- hasStickyHeader?: boolean | undefined;
415
- isInStickyRow?: boolean | undefined;
416
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
417
- tfoot: (slotProps?: ({
418
- size?: "sm" | "md" | "lg" | undefined;
419
- isLoading?: boolean | undefined;
420
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
421
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
422
- layout?: "fixed" | "auto" | undefined;
423
- striped?: boolean | undefined;
424
- isSticky?: boolean | undefined;
425
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
426
- isScrollable?: boolean | undefined;
427
- hasStickyHeader?: boolean | undefined;
428
- isInStickyRow?: boolean | undefined;
429
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
430
- tr: (slotProps?: ({
431
- size?: "sm" | "md" | "lg" | undefined;
432
- isLoading?: boolean | undefined;
433
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
434
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
435
- layout?: "fixed" | "auto" | undefined;
436
- striped?: boolean | undefined;
437
- isSticky?: boolean | undefined;
438
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
439
- isScrollable?: boolean | undefined;
440
- hasStickyHeader?: boolean | undefined;
441
- isInStickyRow?: boolean | undefined;
442
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
443
- separator: (slotProps?: ({
444
- size?: "sm" | "md" | "lg" | undefined;
445
- isLoading?: boolean | undefined;
446
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
447
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
448
- layout?: "fixed" | "auto" | undefined;
449
- striped?: boolean | undefined;
450
- isSticky?: boolean | undefined;
451
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
452
- isScrollable?: boolean | undefined;
453
- hasStickyHeader?: boolean | undefined;
454
- isInStickyRow?: boolean | undefined;
455
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
456
- th: (slotProps?: ({
457
- size?: "sm" | "md" | "lg" | undefined;
458
- isLoading?: boolean | undefined;
459
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
460
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
461
- layout?: "fixed" | "auto" | undefined;
462
- striped?: boolean | undefined;
463
- isSticky?: boolean | undefined;
464
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
465
- isScrollable?: boolean | undefined;
466
- hasStickyHeader?: boolean | undefined;
467
- isInStickyRow?: boolean | undefined;
468
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
469
- sortButton: (slotProps?: ({
470
- size?: "sm" | "md" | "lg" | undefined;
471
- isLoading?: boolean | undefined;
472
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
473
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
474
- layout?: "fixed" | "auto" | undefined;
475
- striped?: boolean | undefined;
476
- isSticky?: boolean | undefined;
477
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
478
- isScrollable?: boolean | undefined;
479
- hasStickyHeader?: boolean | undefined;
480
- isInStickyRow?: boolean | undefined;
481
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
482
- sortIcon: (slotProps?: ({
483
- size?: "sm" | "md" | "lg" | undefined;
484
- isLoading?: boolean | undefined;
485
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
486
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
487
- layout?: "fixed" | "auto" | undefined;
488
- striped?: boolean | undefined;
489
- isSticky?: boolean | undefined;
490
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
491
- isScrollable?: boolean | undefined;
492
- hasStickyHeader?: boolean | undefined;
493
- isInStickyRow?: boolean | undefined;
494
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
495
- columnVisibilityButton: (slotProps?: ({
496
- size?: "sm" | "md" | "lg" | undefined;
497
- isLoading?: boolean | undefined;
498
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
499
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
500
- layout?: "fixed" | "auto" | undefined;
501
- striped?: boolean | undefined;
502
- isSticky?: boolean | undefined;
503
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
504
- isScrollable?: boolean | undefined;
505
- hasStickyHeader?: boolean | undefined;
506
- isInStickyRow?: boolean | undefined;
507
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
508
- columnVisibilityIcon: (slotProps?: ({
509
- size?: "sm" | "md" | "lg" | undefined;
510
- isLoading?: boolean | undefined;
511
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
512
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
513
- layout?: "fixed" | "auto" | undefined;
514
- striped?: boolean | undefined;
515
- isSticky?: boolean | undefined;
516
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
517
- isScrollable?: boolean | undefined;
518
- hasStickyHeader?: boolean | undefined;
519
- isInStickyRow?: boolean | undefined;
520
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
521
- td: (slotProps?: ({
522
- size?: "sm" | "md" | "lg" | undefined;
523
- isLoading?: boolean | undefined;
524
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
525
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
526
- layout?: "fixed" | "auto" | undefined;
527
- striped?: boolean | undefined;
528
- isSticky?: boolean | undefined;
529
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
530
- isScrollable?: boolean | undefined;
531
- hasStickyHeader?: boolean | undefined;
532
- isInStickyRow?: boolean | undefined;
533
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
534
- empty: (slotProps?: ({
535
- size?: "sm" | "md" | "lg" | undefined;
536
- isLoading?: boolean | undefined;
537
- loadingColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
538
- selectionColor?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
539
- layout?: "fixed" | "auto" | undefined;
540
- striped?: boolean | undefined;
541
- isSticky?: boolean | undefined;
542
- stickyPosition?: "bottom" | "left" | "right" | "top" | undefined;
543
- isScrollable?: boolean | undefined;
544
- hasStickyHeader?: boolean | undefined;
545
- isInStickyRow?: boolean | undefined;
546
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
547
- } & {};
548
- get wrapperClassNames(): string;
549
- get tableClassNames(): string;
550
- get headlessColumns(): Column<T>[];
551
- get headlessRows(): Row<T>[];
552
- isRowSticky: (row: Row<T>) => boolean;
553
- }
554
- export { Table, type TableSignature };
555
- export default Table;
@@ -1,46 +0,0 @@
1
- import type { TableVariants, TableSlots, SlotsToClasses, ClassValue } from '@frontile/theme';
2
- export type { Column, Row, Table } from '@universal-ember/table';
3
- import type { Row, Column } from '@universal-ember/table';
4
- import type { ContentValue } from '@glint/template';
5
- import type { ComponentLike } from '@glint/template';
6
- export { SortDirection, type Sort, type SortItem } from '@universal-ember/table/plugins/data-sorting';
7
- export interface CellContext<T> {
8
- column: Column<T>;
9
- row: Row<T>;
10
- }
11
- export interface CellSignature<T> {
12
- Args: {
13
- column: Column<T>;
14
- row: Row<T>;
15
- };
16
- }
17
- export interface FrontileStickyOptions {
18
- isSticky?: boolean;
19
- stickyPosition?: 'left' | 'right';
20
- }
21
- export type FrontilePluginOption = [string, () => FrontileStickyOptions];
22
- export interface ColumnConfig<T = unknown> {
23
- /** The key to extract data from items */
24
- key: string;
25
- /** Display name for the column header */
26
- name: string;
27
- /** Optional function to transform/compute column values */
28
- value?: (ctx: CellContext<T>) => ContentValue;
29
- /** Custom component to render for this column's cells */
30
- Cell?: ComponentLike<CellSignature<T>>;
31
- /** Whether this column should be sticky during horizontal scrolling */
32
- isSticky?: boolean;
33
- /** Position where the sticky column should stick. @default 'left' */
34
- stickyPosition?: 'left' | 'right';
35
- /** Whether this column should be visible. @default true */
36
- isVisible?: boolean;
37
- /** Whether this column is sortable. @default false */
38
- isSortable?: boolean;
39
- /** Use this key instead of the column key for sorting. Useful when the display key differs from the data key */
40
- sortProperty?: string;
41
- }
42
- export type ColumnKeys<T extends unknown[]> = T[number] extends {
43
- key: infer K;
44
- } ? K extends string ? K : never : never;
45
- export type SelectionMode = 'none' | 'single' | 'multiple';
46
- export type { TableVariants, TableSlots, SlotsToClasses, ClassValue };
@@ -1,6 +0,0 @@
1
- import type { Column } from '@universal-ember/table';
2
- import type { FrontileStickyOptions } from './types';
3
- /**
4
- * Helper to extract Frontile sticky options from a universal-ember column's pluginOptions
5
- */
6
- export declare function extractFrontileOptions<T = unknown>(column?: Column<T>): FrontileStickyOptions | undefined;
@@ -1,2 +0,0 @@
1
- export * from './table/index';
2
- export { default } from './table/index';