@frontile/collections 0.17.0-beta.25 → 0.17.0-beta.26

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 (180) hide show
  1. package/declarations/components/simple-table/body.d.ts +428 -0
  2. package/declarations/components/simple-table/cell.d.ts +427 -0
  3. package/declarations/components/simple-table/column.d.ts +419 -0
  4. package/declarations/components/simple-table/footer.d.ts +430 -0
  5. package/declarations/components/simple-table/header.d.ts +430 -0
  6. package/declarations/components/simple-table/index.d.ts +446 -0
  7. package/declarations/components/simple-table/row.d.ts +430 -0
  8. package/declarations/components/simple-table/simple-table-body.d.ts +238 -0
  9. package/declarations/components/simple-table/simple-table-cell.d.ts +231 -0
  10. package/declarations/components/simple-table/simple-table-column.d.ts +225 -0
  11. package/declarations/components/simple-table/simple-table-footer.d.ts +237 -0
  12. package/declarations/components/simple-table/simple-table-header.d.ts +237 -0
  13. package/declarations/components/simple-table/simple-table-row.d.ts +236 -0
  14. package/declarations/components/simple-table/simple-table.d.ts +249 -0
  15. package/declarations/components/table/cell-default.d.ts +43 -0
  16. package/declarations/components/table/cell-for.d.ts +38 -0
  17. package/declarations/components/table/cell-rendering-context.d.ts +24 -0
  18. package/declarations/components/table/checkbox.d.ts +50 -0
  19. package/declarations/components/table/column-visibility.d.ts +416 -0
  20. package/declarations/components/table/icons.d.ts +11 -0
  21. package/declarations/components/table/index.d.ts +2 -7
  22. package/declarations/components/table/sort-button.d.ts +413 -0
  23. package/declarations/components/table/table-body.d.ts +10 -7
  24. package/declarations/components/table/table-cell.d.ts +4 -4
  25. package/declarations/components/table/table-column.d.ts +20 -3
  26. package/declarations/components/table/table-footer.d.ts +3 -3
  27. package/declarations/components/table/table-header.d.ts +5 -3
  28. package/declarations/components/table/table-row.d.ts +20 -6
  29. package/declarations/components/table/table.d.ts +335 -111
  30. package/declarations/components/table/typed-cell-for.d.ts +34 -0
  31. package/declarations/components/table/types.d.ts +38 -7
  32. package/declarations/components/table/utils.d.ts +4 -8
  33. package/declarations/components/table-legacy/index.d.ts +9 -0
  34. package/declarations/components/table-legacy/table-body.d.ts +374 -0
  35. package/declarations/components/table-legacy/table-cell.d.ts +364 -0
  36. package/declarations/components/table-legacy/table-column.d.ts +357 -0
  37. package/declarations/components/table-legacy/table-footer.d.ts +365 -0
  38. package/declarations/components/table-legacy/table-header.d.ts +364 -0
  39. package/declarations/components/table-legacy/table-row.d.ts +373 -0
  40. package/declarations/components/table-legacy/table.d.ts +437 -0
  41. package/declarations/components/table-legacy/types.d.ts +20 -0
  42. package/declarations/components/table-legacy/utils.d.ts +16 -0
  43. package/declarations/index.d.ts +1 -0
  44. package/declarations/template-registry.d.ts +3 -1
  45. package/declarations/utils/tableManager.d.ts +25 -0
  46. package/declarations/utils/typed-table.d.ts +32 -0
  47. package/dist/_app_/components/table.js +1 -0
  48. package/dist/components/dropdown.js +1 -1
  49. package/dist/components/listbox.js +1 -1
  50. package/dist/components/table.js +2 -0
  51. package/dist/components/table.js.map +1 -0
  52. package/dist/index-OHRSSSqD.js +528 -0
  53. package/dist/index-OHRSSSqD.js.map +1 -0
  54. package/dist/index.js +2 -1
  55. package/dist/index.js.map +1 -1
  56. package/dist/{listManager-D4_vozfz.js → listManager-CKsOd2zS.js} +2 -2
  57. package/dist/{listManager-D4_vozfz.js.map → listManager-CKsOd2zS.js.map} +1 -1
  58. package/dist/listManager-Dth1-3Si.js +439 -0
  59. package/dist/listManager-Dth1-3Si.js.map +1 -0
  60. package/dist/listbox-BHb3ozlg.js +204 -0
  61. package/dist/listbox-BHb3ozlg.js.map +1 -0
  62. package/dist/listbox-CkGwpiDp.js +203 -0
  63. package/dist/listbox-CkGwpiDp.js.map +1 -0
  64. package/dist/listbox-ClqgWnnA.js +204 -0
  65. package/dist/listbox-ClqgWnnA.js.map +1 -0
  66. package/dist/listbox-rcGFjxs0.js +112 -47
  67. package/dist/listbox-y30VBGX-.js +204 -0
  68. package/dist/listbox-y30VBGX-.js.map +1 -0
  69. package/dist/simple-table-B7dwVNtZ.js +528 -0
  70. package/dist/simple-table-B7dwVNtZ.js.map +1 -0
  71. package/dist/simple-table-OHRSSSqD.js +528 -0
  72. package/dist/simple-table-OHRSSSqD.js.map +1 -0
  73. package/dist/table-B2HDNKJZ.js +406 -0
  74. package/dist/table-B2HDNKJZ.js.map +1 -0
  75. package/dist/table-BDc4IZIE.js +878 -0
  76. package/dist/table-BDc4IZIE.js.map +1 -0
  77. package/dist/table-BFkVEZvb.js +392 -0
  78. package/dist/table-BFkVEZvb.js.map +1 -0
  79. package/dist/table-BqvHQi0L.js +878 -0
  80. package/dist/table-BqvHQi0L.js.map +1 -0
  81. package/dist/table-C7ch3NLp.js +395 -0
  82. package/dist/table-C7ch3NLp.js.map +1 -0
  83. package/dist/table-CLHR4-J5.js +395 -0
  84. package/dist/table-CLHR4-J5.js.map +1 -0
  85. package/dist/table-COm7aEZ1.js +341 -0
  86. package/dist/table-COm7aEZ1.js.map +1 -0
  87. package/dist/table-CSzsuwXt.js +394 -0
  88. package/dist/table-CSzsuwXt.js.map +1 -0
  89. package/dist/table-CVCiVPCB.js +878 -0
  90. package/dist/table-CVCiVPCB.js.map +1 -0
  91. package/dist/table-CcYV8m90.js +341 -0
  92. package/dist/table-CcYV8m90.js.map +1 -0
  93. package/dist/table-DEK1U06v.js +632 -0
  94. package/dist/table-DEK1U06v.js.map +1 -0
  95. package/dist/table-DGQbKRn3.js +395 -0
  96. package/dist/table-DGQbKRn3.js.map +1 -0
  97. package/dist/table-DnQQJItF.js +632 -0
  98. package/dist/table-DnQQJItF.js.map +1 -0
  99. package/dist/table-DrBJt7Eh.js +395 -0
  100. package/dist/table-DrBJt7Eh.js.map +1 -0
  101. package/dist/table-SVR6fEqh.js +877 -0
  102. package/dist/table-SVR6fEqh.js.map +1 -0
  103. package/dist/table-XUYqiKyi.js +394 -0
  104. package/dist/table-XUYqiKyi.js.map +1 -0
  105. package/dist/table-footer-DTLYf3Ac.js +553 -0
  106. package/dist/table-footer-DTLYf3Ac.js.map +1 -0
  107. package/dist/types-B-8cgOds.js +524 -0
  108. package/dist/types-B-8cgOds.js.map +1 -0
  109. package/dist/types-CJuwIIDs.js +524 -0
  110. package/dist/types-CJuwIIDs.js.map +1 -0
  111. package/dist/types-CuXFudgJ.js +526 -0
  112. package/dist/types-CuXFudgJ.js.map +1 -0
  113. package/dist/types-DkKoxFKn.js +524 -0
  114. package/dist/types-DkKoxFKn.js.map +1 -0
  115. package/dist/utils/listManager.js +1 -1
  116. package/package.json +9 -7
  117. package/dist/table-92ff_YNO.js +0 -277
  118. package/dist/table-92ff_YNO.js.map +0 -1
  119. package/dist/table-9AY4L0Gb.js +0 -197
  120. package/dist/table-9AY4L0Gb.js.map +0 -1
  121. package/dist/table-9lHVhRR5.js +0 -241
  122. package/dist/table-9lHVhRR5.js.map +0 -1
  123. package/dist/table-BIkLOscH.js +0 -269
  124. package/dist/table-BIkLOscH.js.map +0 -1
  125. package/dist/table-BPp_OXkX.js +0 -206
  126. package/dist/table-BPp_OXkX.js.map +0 -1
  127. package/dist/table-BQBLUGgl.js +0 -208
  128. package/dist/table-BQBLUGgl.js.map +0 -1
  129. package/dist/table-BUboQojw.js +0 -267
  130. package/dist/table-BUboQojw.js.map +0 -1
  131. package/dist/table-BUrvD0CN.js +0 -324
  132. package/dist/table-BUrvD0CN.js.map +0 -1
  133. package/dist/table-B_z4aWPh.js +0 -276
  134. package/dist/table-B_z4aWPh.js.map +0 -1
  135. package/dist/table-Bi_i2GOl.js +0 -279
  136. package/dist/table-Bi_i2GOl.js.map +0 -1
  137. package/dist/table-BkWhyzMo.js +0 -214
  138. package/dist/table-BkWhyzMo.js.map +0 -1
  139. package/dist/table-Bp_EqrlK.js +0 -309
  140. package/dist/table-Bp_EqrlK.js.map +0 -1
  141. package/dist/table-Bq1HGB9C.js +0 -240
  142. package/dist/table-Bq1HGB9C.js.map +0 -1
  143. package/dist/table-C-_mQMW_.js +0 -141
  144. package/dist/table-C-_mQMW_.js.map +0 -1
  145. package/dist/table-CaBDs-LD.js +0 -269
  146. package/dist/table-CaBDs-LD.js.map +0 -1
  147. package/dist/table-CcbmieDl.js +0 -329
  148. package/dist/table-CcbmieDl.js.map +0 -1
  149. package/dist/table-CdLut7xT.js +0 -172
  150. package/dist/table-CdLut7xT.js.map +0 -1
  151. package/dist/table-Cs_Xm3-T.js +0 -144
  152. package/dist/table-Cs_Xm3-T.js.map +0 -1
  153. package/dist/table-CwxlKxz0.js +0 -185
  154. package/dist/table-CwxlKxz0.js.map +0 -1
  155. package/dist/table-D1jyvvdd.js +0 -242
  156. package/dist/table-D1jyvvdd.js.map +0 -1
  157. package/dist/table-D7QCvl0_.js +0 -269
  158. package/dist/table-D7QCvl0_.js.map +0 -1
  159. package/dist/table-DApb61os.js +0 -185
  160. package/dist/table-DApb61os.js.map +0 -1
  161. package/dist/table-DFIwJpJO.js +0 -144
  162. package/dist/table-DFIwJpJO.js.map +0 -1
  163. package/dist/table-DIZvtyjH.js +0 -185
  164. package/dist/table-DIZvtyjH.js.map +0 -1
  165. package/dist/table-DYOLmjfk.js +0 -325
  166. package/dist/table-DYOLmjfk.js.map +0 -1
  167. package/dist/table-Da60U9eH.js +0 -269
  168. package/dist/table-Da60U9eH.js.map +0 -1
  169. package/dist/table-Dcyk7CLS.js +0 -144
  170. package/dist/table-Dcyk7CLS.js.map +0 -1
  171. package/dist/table-DzNT9tDs.js +0 -280
  172. package/dist/table-DzNT9tDs.js.map +0 -1
  173. package/dist/table-EDCy6SCT.js +0 -214
  174. package/dist/table-EDCy6SCT.js.map +0 -1
  175. package/dist/table-GRGxN-x5.js +0 -309
  176. package/dist/table-GRGxN-x5.js.map +0 -1
  177. package/dist/table-Lk0tmBng.js +0 -309
  178. package/dist/table-Lk0tmBng.js.map +0 -1
  179. package/dist/table-k5i2kvUD.js +0 -324
  180. package/dist/table-k5i2kvUD.js.map +0 -1
@@ -0,0 +1,437 @@
1
+ import Component from '@glimmer/component';
2
+ import { useStyles } from '@frontile/theme';
3
+ import { TableHeader } from './table-header';
4
+ import { TableBody } from './table-body';
5
+ import { TableFooter } from './table-footer';
6
+ import { TableColumn } from './table-column';
7
+ import { TableRow } from './table-row';
8
+ import { TableCell } from './table-cell';
9
+ import type {
10
+ ColumnDefinition,
11
+ TableVariants,
12
+ TableSlots,
13
+ SlotsToClasses,
14
+ ClassValue
15
+ } from './types';
16
+ import type { ContentValue, WithBoundArgs } from '@glint/template';
17
+ interface TableSignature<T> {
18
+ Args: {
19
+ /** Array of column definitions for automatic table generation */
20
+ columns?: ColumnDefinition<T>[];
21
+ /** Array of data items to display in the table */
22
+ items?: T[];
23
+ /** Custom CSS classes for different table elements (wrapper, table, th, td, etc.) */
24
+ classes?: SlotsToClasses<TableSlots>;
25
+ /** Size variant for table cells and headers. @defaultValue 'md' */
26
+ size?: TableVariants['size'];
27
+ /** Table layout algorithm - 'auto' sizes columns by content, 'fixed' uses first row for sizing. @defaultValue 'auto' */
28
+ layout?: TableVariants['layout'];
29
+ /** Enable striped rows (alternating background colors) */
30
+ isStriped?: TableVariants['striped'];
31
+ /** Content to display when no data items are provided */
32
+ emptyContent?: ContentValue;
33
+ /** Enable scrolling for the table container */
34
+ isScrollable?: boolean;
35
+ /** Array of item keys that should be sticky during vertical scrolling */
36
+ stickyKeys?: string[];
37
+ /** Make the table header sticky during vertical scrolling */
38
+ isStickyHeader?: boolean;
39
+ /** Array of column definitions for automatic footer generation */
40
+ footerColumns?: ColumnDefinition<T>[];
41
+ /** Make the table footer sticky during vertical scrolling */
42
+ isStickyFooter?: boolean;
43
+ };
44
+ Element: HTMLTableElement;
45
+ Blocks: {
46
+ default: [
47
+ {
48
+ Column: WithBoundArgs<typeof TableColumn<T>, 'styleFns'>;
49
+ Header: WithBoundArgs<typeof TableHeader<T>, 'columns' | 'styleFns'>;
50
+ Body: WithBoundArgs<
51
+ typeof TableBody<T>,
52
+ 'columns' | 'items' | 'styleFns'
53
+ >;
54
+ Footer: WithBoundArgs<typeof TableFooter<T>, 'columns' | 'styleFns'>;
55
+ Row: WithBoundArgs<
56
+ typeof TableRow<T>,
57
+ 'columns' | 'styleFns' | 'stickyKeys' | 'isStickyHeader'
58
+ >;
59
+ Cell: WithBoundArgs<typeof TableCell<T>, 'styleFns'>;
60
+ }
61
+ ];
62
+ };
63
+ }
64
+ declare class Table<T = unknown> extends Component<TableSignature<T>> {
65
+ TableBody: new (
66
+ owner: import('@ember/-internals/owner').default,
67
+ args: {
68
+ columns?: ColumnDefinition<T>[] | undefined;
69
+ items?: T[] | undefined;
70
+ class?: string;
71
+ styleFns?: ReturnType<ReturnType<typeof useStyles>['table']>;
72
+ classes?: SlotsToClasses<TableSlots>;
73
+ }
74
+ ) => TableBody<T>;
75
+
76
+ TableFooter: new (
77
+ owner: import('@ember/-internals/owner').default,
78
+ args: {
79
+ columns?: ColumnDefinition<T>[] | undefined;
80
+ class?: string;
81
+ isSticky?: boolean;
82
+ styleFns?: ReturnType<ReturnType<typeof useStyles>['table']>;
83
+ classes?: SlotsToClasses<TableSlots>;
84
+ }
85
+ ) => TableFooter<T>;
86
+
87
+ TableRow: new (
88
+ owner: import('@ember/-internals/owner').default,
89
+ args: {
90
+ item?: T | undefined;
91
+ columns?: ColumnDefinition<T>[] | undefined;
92
+ class?: string;
93
+ isSticky?: boolean;
94
+ stickyKeys?: string[];
95
+ isStickyHeader?: boolean;
96
+ styleFns?: ReturnType<ReturnType<typeof useStyles>['table']>;
97
+ classes?: SlotsToClasses<TableSlots>;
98
+ }
99
+ ) => TableRow<T>;
100
+
101
+ TableCell: new (
102
+ owner: import('@ember/-internals/owner').default,
103
+ args: {
104
+ item?: T | undefined;
105
+ column?: ColumnDefinition<T> | undefined;
106
+ class?: string;
107
+ isSticky?: boolean;
108
+ stickyPosition?: 'left' | 'right';
109
+ isInStickyRow?: boolean;
110
+ styleFns?: ReturnType<ReturnType<typeof useStyles>['table']>;
111
+ classes?: SlotsToClasses<TableSlots>;
112
+ }
113
+ ) => TableCell<T>;
114
+
115
+ TableColumn: new (
116
+ owner: import('@ember/-internals/owner').default,
117
+ args: {
118
+ column?: ColumnDefinition<T> | undefined;
119
+ class?: string;
120
+ isSticky?: boolean;
121
+ stickyPosition?: 'left' | 'right';
122
+ styleFns?: ReturnType<ReturnType<typeof useStyles>['table']>;
123
+ }
124
+ ) => TableColumn<T>;
125
+
126
+ TableHeader: new (
127
+ owner: import('@ember/-internals/owner').default,
128
+ args: {
129
+ columns?: ColumnDefinition<T>[] | undefined;
130
+ class?: string;
131
+ isSticky?: boolean;
132
+ styleFns?: ReturnType<ReturnType<typeof useStyles>['table']>;
133
+ classes?: SlotsToClasses<TableSlots>;
134
+ }
135
+ ) => TableHeader<T>;
136
+
137
+ get styles(): {
138
+ base: (
139
+ slotProps?:
140
+ | ({
141
+ size?: 'sm' | 'md' | 'lg' | undefined;
142
+ layout?: 'fixed' | 'auto' | undefined;
143
+ striped?: boolean | undefined;
144
+ isSticky?: boolean | undefined;
145
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
146
+ isScrollable?: boolean | undefined;
147
+ hasStickyHeader?: boolean | undefined;
148
+ isInStickyRow?: boolean | undefined;
149
+ } & import('tailwind-variants').ClassProp<ClassValue>)
150
+ | undefined
151
+ ) => string;
152
+ wrapper: (
153
+ slotProps?:
154
+ | ({
155
+ size?: 'sm' | 'md' | 'lg' | undefined;
156
+ layout?: 'fixed' | 'auto' | undefined;
157
+ striped?: boolean | undefined;
158
+ isSticky?: boolean | undefined;
159
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
160
+ isScrollable?: boolean | undefined;
161
+ hasStickyHeader?: boolean | undefined;
162
+ isInStickyRow?: boolean | undefined;
163
+ } & import('tailwind-variants').ClassProp<ClassValue>)
164
+ | undefined
165
+ ) => string;
166
+ table: (
167
+ slotProps?:
168
+ | ({
169
+ size?: 'sm' | 'md' | 'lg' | undefined;
170
+ layout?: 'fixed' | 'auto' | undefined;
171
+ striped?: boolean | undefined;
172
+ isSticky?: boolean | undefined;
173
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
174
+ isScrollable?: boolean | undefined;
175
+ hasStickyHeader?: boolean | undefined;
176
+ isInStickyRow?: boolean | undefined;
177
+ } & import('tailwind-variants').ClassProp<ClassValue>)
178
+ | undefined
179
+ ) => string;
180
+ thead: (
181
+ slotProps?:
182
+ | ({
183
+ size?: 'sm' | 'md' | 'lg' | undefined;
184
+ layout?: 'fixed' | 'auto' | undefined;
185
+ striped?: boolean | undefined;
186
+ isSticky?: boolean | undefined;
187
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
188
+ isScrollable?: boolean | undefined;
189
+ hasStickyHeader?: boolean | undefined;
190
+ isInStickyRow?: boolean | undefined;
191
+ } & import('tailwind-variants').ClassProp<ClassValue>)
192
+ | undefined
193
+ ) => string;
194
+ tbody: (
195
+ slotProps?:
196
+ | ({
197
+ size?: 'sm' | 'md' | 'lg' | undefined;
198
+ layout?: 'fixed' | 'auto' | undefined;
199
+ striped?: boolean | undefined;
200
+ isSticky?: boolean | undefined;
201
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
202
+ isScrollable?: boolean | undefined;
203
+ hasStickyHeader?: boolean | undefined;
204
+ isInStickyRow?: boolean | undefined;
205
+ } & import('tailwind-variants').ClassProp<ClassValue>)
206
+ | undefined
207
+ ) => string;
208
+ tfoot: (
209
+ slotProps?:
210
+ | ({
211
+ size?: 'sm' | 'md' | 'lg' | undefined;
212
+ layout?: 'fixed' | 'auto' | undefined;
213
+ striped?: boolean | undefined;
214
+ isSticky?: boolean | undefined;
215
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
216
+ isScrollable?: boolean | undefined;
217
+ hasStickyHeader?: boolean | undefined;
218
+ isInStickyRow?: boolean | undefined;
219
+ } & import('tailwind-variants').ClassProp<ClassValue>)
220
+ | undefined
221
+ ) => string;
222
+ tr: (
223
+ slotProps?:
224
+ | ({
225
+ size?: 'sm' | 'md' | 'lg' | undefined;
226
+ layout?: 'fixed' | 'auto' | undefined;
227
+ striped?: boolean | undefined;
228
+ isSticky?: boolean | undefined;
229
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
230
+ isScrollable?: boolean | undefined;
231
+ hasStickyHeader?: boolean | undefined;
232
+ isInStickyRow?: boolean | undefined;
233
+ } & import('tailwind-variants').ClassProp<ClassValue>)
234
+ | undefined
235
+ ) => string;
236
+ th: (
237
+ slotProps?:
238
+ | ({
239
+ size?: 'sm' | 'md' | 'lg' | undefined;
240
+ layout?: 'fixed' | 'auto' | undefined;
241
+ striped?: boolean | undefined;
242
+ isSticky?: boolean | undefined;
243
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
244
+ isScrollable?: boolean | undefined;
245
+ hasStickyHeader?: boolean | undefined;
246
+ isInStickyRow?: boolean | undefined;
247
+ } & import('tailwind-variants').ClassProp<ClassValue>)
248
+ | undefined
249
+ ) => string;
250
+ td: (
251
+ slotProps?:
252
+ | ({
253
+ size?: 'sm' | 'md' | 'lg' | undefined;
254
+ layout?: 'fixed' | 'auto' | undefined;
255
+ striped?: boolean | undefined;
256
+ isSticky?: boolean | undefined;
257
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
258
+ isScrollable?: boolean | undefined;
259
+ hasStickyHeader?: boolean | undefined;
260
+ isInStickyRow?: boolean | undefined;
261
+ } & import('tailwind-variants').ClassProp<ClassValue>)
262
+ | undefined
263
+ ) => string;
264
+ emptyCell: (
265
+ slotProps?:
266
+ | ({
267
+ size?: 'sm' | 'md' | 'lg' | undefined;
268
+ layout?: 'fixed' | 'auto' | undefined;
269
+ striped?: boolean | undefined;
270
+ isSticky?: boolean | undefined;
271
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
272
+ isScrollable?: boolean | undefined;
273
+ hasStickyHeader?: boolean | undefined;
274
+ isInStickyRow?: boolean | undefined;
275
+ } & import('tailwind-variants').ClassProp<ClassValue>)
276
+ | undefined
277
+ ) => string;
278
+ } & {
279
+ base: (
280
+ slotProps?:
281
+ | ({
282
+ size?: 'sm' | 'md' | 'lg' | undefined;
283
+ layout?: 'fixed' | 'auto' | undefined;
284
+ striped?: boolean | undefined;
285
+ isSticky?: boolean | undefined;
286
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
287
+ isScrollable?: boolean | undefined;
288
+ hasStickyHeader?: boolean | undefined;
289
+ isInStickyRow?: boolean | undefined;
290
+ } & import('tailwind-variants').ClassProp<ClassValue>)
291
+ | undefined
292
+ ) => string;
293
+ wrapper: (
294
+ slotProps?:
295
+ | ({
296
+ size?: 'sm' | 'md' | 'lg' | undefined;
297
+ layout?: 'fixed' | 'auto' | undefined;
298
+ striped?: boolean | undefined;
299
+ isSticky?: boolean | undefined;
300
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
301
+ isScrollable?: boolean | undefined;
302
+ hasStickyHeader?: boolean | undefined;
303
+ isInStickyRow?: boolean | undefined;
304
+ } & import('tailwind-variants').ClassProp<ClassValue>)
305
+ | undefined
306
+ ) => string;
307
+ table: (
308
+ slotProps?:
309
+ | ({
310
+ size?: 'sm' | 'md' | 'lg' | undefined;
311
+ layout?: 'fixed' | 'auto' | undefined;
312
+ striped?: boolean | undefined;
313
+ isSticky?: boolean | undefined;
314
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
315
+ isScrollable?: boolean | undefined;
316
+ hasStickyHeader?: boolean | undefined;
317
+ isInStickyRow?: boolean | undefined;
318
+ } & import('tailwind-variants').ClassProp<ClassValue>)
319
+ | undefined
320
+ ) => string;
321
+ thead: (
322
+ slotProps?:
323
+ | ({
324
+ size?: 'sm' | 'md' | 'lg' | undefined;
325
+ layout?: 'fixed' | 'auto' | undefined;
326
+ striped?: boolean | undefined;
327
+ isSticky?: boolean | undefined;
328
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
329
+ isScrollable?: boolean | undefined;
330
+ hasStickyHeader?: boolean | undefined;
331
+ isInStickyRow?: boolean | undefined;
332
+ } & import('tailwind-variants').ClassProp<ClassValue>)
333
+ | undefined
334
+ ) => string;
335
+ tbody: (
336
+ slotProps?:
337
+ | ({
338
+ size?: 'sm' | 'md' | 'lg' | undefined;
339
+ layout?: 'fixed' | 'auto' | undefined;
340
+ striped?: boolean | undefined;
341
+ isSticky?: boolean | undefined;
342
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
343
+ isScrollable?: boolean | undefined;
344
+ hasStickyHeader?: boolean | undefined;
345
+ isInStickyRow?: boolean | undefined;
346
+ } & import('tailwind-variants').ClassProp<ClassValue>)
347
+ | undefined
348
+ ) => string;
349
+ tfoot: (
350
+ slotProps?:
351
+ | ({
352
+ size?: 'sm' | 'md' | 'lg' | undefined;
353
+ layout?: 'fixed' | 'auto' | undefined;
354
+ striped?: boolean | undefined;
355
+ isSticky?: boolean | undefined;
356
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
357
+ isScrollable?: boolean | undefined;
358
+ hasStickyHeader?: boolean | undefined;
359
+ isInStickyRow?: boolean | undefined;
360
+ } & import('tailwind-variants').ClassProp<ClassValue>)
361
+ | undefined
362
+ ) => string;
363
+ tr: (
364
+ slotProps?:
365
+ | ({
366
+ size?: 'sm' | 'md' | 'lg' | undefined;
367
+ layout?: 'fixed' | 'auto' | undefined;
368
+ striped?: boolean | undefined;
369
+ isSticky?: boolean | undefined;
370
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
371
+ isScrollable?: boolean | undefined;
372
+ hasStickyHeader?: boolean | undefined;
373
+ isInStickyRow?: boolean | undefined;
374
+ } & import('tailwind-variants').ClassProp<ClassValue>)
375
+ | undefined
376
+ ) => string;
377
+ th: (
378
+ slotProps?:
379
+ | ({
380
+ size?: 'sm' | 'md' | 'lg' | undefined;
381
+ layout?: 'fixed' | 'auto' | undefined;
382
+ striped?: boolean | undefined;
383
+ isSticky?: boolean | undefined;
384
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
385
+ isScrollable?: boolean | undefined;
386
+ hasStickyHeader?: boolean | undefined;
387
+ isInStickyRow?: boolean | undefined;
388
+ } & import('tailwind-variants').ClassProp<ClassValue>)
389
+ | undefined
390
+ ) => string;
391
+ td: (
392
+ slotProps?:
393
+ | ({
394
+ size?: 'sm' | 'md' | 'lg' | undefined;
395
+ layout?: 'fixed' | 'auto' | undefined;
396
+ striped?: boolean | undefined;
397
+ isSticky?: boolean | undefined;
398
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
399
+ isScrollable?: boolean | undefined;
400
+ hasStickyHeader?: boolean | undefined;
401
+ isInStickyRow?: boolean | undefined;
402
+ } & import('tailwind-variants').ClassProp<ClassValue>)
403
+ | undefined
404
+ ) => string;
405
+ emptyCell: (
406
+ slotProps?:
407
+ | ({
408
+ size?: 'sm' | 'md' | 'lg' | undefined;
409
+ layout?: 'fixed' | 'auto' | undefined;
410
+ striped?: boolean | undefined;
411
+ isSticky?: boolean | undefined;
412
+ stickyPosition?: 'top' | 'right' | 'bottom' | 'left' | undefined;
413
+ isScrollable?: boolean | undefined;
414
+ hasStickyHeader?: boolean | undefined;
415
+ isInStickyRow?: boolean | undefined;
416
+ } & import('tailwind-variants').ClassProp<ClassValue>)
417
+ | undefined
418
+ ) => string;
419
+ } & {};
420
+
421
+ get wrapperClassNames(): string;
422
+ calculateHeaderHeight: import('ember-modifier').FunctionBasedModifier<{
423
+ Args: {
424
+ Positional: unknown[];
425
+ Named: import('ember-modifier/-private/signature').EmptyObject;
426
+ };
427
+ Element: HTMLDivElement;
428
+ }>;
429
+
430
+ get tableClassNames(): string;
431
+ get columns(): ColumnDefinition<T>[];
432
+ get footerColumns(): ColumnDefinition<T>[];
433
+ get items(): T[];
434
+ getValue: (item: T, column: ColumnDefinition<T>) => ContentValue;
435
+ }
436
+ export { Table, type TableSignature };
437
+ export default Table;
@@ -0,0 +1,20 @@
1
+ import type { ContentValue } from '@glint/template';
2
+ import type {
3
+ TableVariants,
4
+ TableSlots,
5
+ SlotsToClasses,
6
+ ClassValue
7
+ } from '@frontile/theme';
8
+ export interface ColumnDefinition<T = unknown> {
9
+ /** The property key to extract data from items, or a unique identifier for the column */
10
+ key: string;
11
+ /** Display label for the column header */
12
+ label: string;
13
+ /** Optional function to transform or compute column values from the data item */
14
+ accessorFn?: (item: T) => ContentValue;
15
+ /** Whether this column should be sticky during horizontal scrolling */
16
+ isSticky?: boolean;
17
+ /** Position where the sticky column should stick. @default 'left' */
18
+ stickyPosition?: 'left' | 'right';
19
+ }
20
+ export type { TableVariants, TableSlots, SlotsToClasses, ClassValue };
@@ -0,0 +1,16 @@
1
+ import type { ContentValue } from '@glint/template';
2
+ import type { ColumnDefinition } from './types';
3
+ /**
4
+ * Safely extracts a value from an object using either a custom accessorFn or direct property access
5
+ */
6
+ export declare function getSafeValue<T>(
7
+ obj: T,
8
+ column: ColumnDefinition<T>
9
+ ): ContentValue;
10
+ /**
11
+ * Safely extracts a value from an object by key and ensures it's safe for template rendering
12
+ */
13
+ export declare function getSafeValueByKey(
14
+ obj: unknown,
15
+ key: string
16
+ ): ContentValue;
@@ -1,2 +1,3 @@
1
1
  export * from './components/listbox';
2
2
  export * from './components/dropdown';
3
+ export * from './components/table';
@@ -1,5 +1,7 @@
1
- import type { Listbox, Dropdown } from './index';
1
+ import type { Listbox, Dropdown, Table, SimpleTable } from './index';
2
2
  export default interface Registry {
3
3
  Listbox: typeof Listbox;
4
4
  Dropdown: typeof Dropdown;
5
+ Table: typeof Table;
6
+ SimpleTable: typeof SimpleTable;
5
7
  }
@@ -0,0 +1,25 @@
1
+ import type { ColumnDefinition } from '../components/table/types';
2
+ import type { Table } from '@universal-ember/table';
3
+ interface TableManagerArgs {}
4
+ interface ColumnRegistration<T = unknown> {
5
+ column: ColumnDefinition<T>;
6
+ element: HTMLElement;
7
+ }
8
+ export declare class TableManager<T = unknown> {
9
+ _columns: ColumnDefinition<T>[];
10
+ _items: T[];
11
+ universalTable: Table<T>;
12
+ constructor(parent: object, args?: TableManagerArgs);
13
+ setColumns(columns: ColumnDefinition<T>[]): void;
14
+ setItems(items: T[]): void;
15
+ get columns(): ColumnDefinition<T>[];
16
+ get rows(): {
17
+ data: T;
18
+ }[];
19
+
20
+ get items(): T[];
21
+ sort: (columnKey: string) => void;
22
+ isSorted: (columnKey: string) => boolean;
23
+ getSortDirection: (columnKey: string) => 'asc' | 'desc' | null;
24
+ }
25
+ export type { TableManagerArgs, ColumnRegistration };
@@ -0,0 +1,32 @@
1
+ import type { ColumnConfig, ColumnKeys } from '../components/table/types';
2
+ /**
3
+ * Creates a typed table configuration that provides compile-time type checking
4
+ * for column keys used in cell rendering components.
5
+ *
6
+ * Usage:
7
+ * ```typescript
8
+ * const typedTable = createTypedTable([
9
+ * { key: 'name', name: 'Name' },
10
+ * { key: 'email', name: 'Email' },
11
+ * ] as const);
12
+ *
13
+ * // Now typedTable.For will only accept 'name' or 'email' as @key values
14
+ * ```
15
+ */
16
+ export declare function createTypedTable<T, const TColumns extends readonly ColumnConfig<T>[]>(columns: TColumns): {
17
+ columns: TColumns;
18
+ /**
19
+ * Type-safe cell renderer that only accepts valid column keys
20
+ */
21
+ For: <K extends ColumnKeys<TColumns>>(key: K) => K;
22
+ /**
23
+ * Get valid column keys for this table (for reference)
24
+ */
25
+ getColumnKeys: () => ColumnKeys<TColumns>[];
26
+ };
27
+ /**
28
+ * Type helper to extract column keys from a typed table configuration
29
+ */
30
+ export type TypedTableKeys<T> = T extends {
31
+ columns: infer C;
32
+ } ? C extends readonly ColumnConfig<any>[] ? ColumnKeys<C> : never : never;
@@ -0,0 +1 @@
1
+ export { default } from "@frontile/collections/components/table";
@@ -1,6 +1,6 @@
1
1
  import Component from '@glimmer/component';
2
2
  import { Button } from '@frontile/buttons';
3
- import { L as Listbox } from '../listbox-rcGFjxs0.js';
3
+ import { L as Listbox } from '../listbox-CkGwpiDp.js';
4
4
  import { Popover } from '@frontile/overlays';
5
5
  import { assert } from '@ember/debug';
6
6
  import { hash } from '@ember/helper';
@@ -1,2 +1,2 @@
1
- export { L as Listbox, a as ListboxItem, L as default } from '../listbox-rcGFjxs0.js';
1
+ export { L as Listbox, a as ListboxItem, L as default } from '../listbox-CkGwpiDp.js';
2
2
  //# sourceMappingURL=listbox.js.map
@@ -0,0 +1,2 @@
1
+ export { S as SimpleTable, T as Table, T as default } from '../table-SVR6fEqh.js';
2
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}