@vuecs/table 1.0.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.
Files changed (58) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +59 -0
  3. package/dist/components/Table.vue.d.ts +511 -0
  4. package/dist/components/Table.vue.d.ts.map +1 -0
  5. package/dist/components/TableBody.vue.d.ts +43 -0
  6. package/dist/components/TableBody.vue.d.ts.map +1 -0
  7. package/dist/components/TableCell.vue.d.ts +182 -0
  8. package/dist/components/TableCell.vue.d.ts.map +1 -0
  9. package/dist/components/TableEmpty.vue.d.ts +104 -0
  10. package/dist/components/TableEmpty.vue.d.ts.map +1 -0
  11. package/dist/components/TableFooter.vue.d.ts +40 -0
  12. package/dist/components/TableFooter.vue.d.ts.map +1 -0
  13. package/dist/components/TableHeadCell.vue.d.ts +267 -0
  14. package/dist/components/TableHeadCell.vue.d.ts.map +1 -0
  15. package/dist/components/TableHeader.vue.d.ts +40 -0
  16. package/dist/components/TableHeader.vue.d.ts.map +1 -0
  17. package/dist/components/TableLite.vue.d.ts +250 -0
  18. package/dist/components/TableLite.vue.d.ts.map +1 -0
  19. package/dist/components/TableLoading.vue.d.ts +88 -0
  20. package/dist/components/TableLoading.vue.d.ts.map +1 -0
  21. package/dist/components/TableRow.vue.d.ts +116 -0
  22. package/dist/components/TableRow.vue.d.ts.map +1 -0
  23. package/dist/components/TableSortIndicators.vue.d.ts +335 -0
  24. package/dist/components/TableSortIndicators.vue.d.ts.map +1 -0
  25. package/dist/components/index.d.ts +23 -0
  26. package/dist/components/index.d.ts.map +1 -0
  27. package/dist/composables/context.d.ts +104 -0
  28. package/dist/composables/context.d.ts.map +1 -0
  29. package/dist/composables/define-table.d.ts +48 -0
  30. package/dist/composables/define-table.d.ts.map +1 -0
  31. package/dist/composables/index.d.ts +5 -0
  32. package/dist/composables/index.d.ts.map +1 -0
  33. package/dist/composables/selection.d.ts +10 -0
  34. package/dist/composables/selection.d.ts.map +1 -0
  35. package/dist/composables/sort.d.ts +61 -0
  36. package/dist/composables/sort.d.ts.map +1 -0
  37. package/dist/defaults.d.ts +41 -0
  38. package/dist/defaults.d.ts.map +1 -0
  39. package/dist/index.d.ts +18 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.mjs +2081 -0
  42. package/dist/index.mjs.map +1 -0
  43. package/dist/style.css +145 -0
  44. package/dist/theme.d.ts +13 -0
  45. package/dist/theme.d.ts.map +1 -0
  46. package/dist/types.d.ts +248 -0
  47. package/dist/types.d.ts.map +1 -0
  48. package/dist/utils/auto-render.d.ts +31 -0
  49. package/dist/utils/auto-render.d.ts.map +1 -0
  50. package/dist/utils/index.d.ts +3 -0
  51. package/dist/utils/index.d.ts.map +1 -0
  52. package/dist/utils/render-utils.d.ts +49 -0
  53. package/dist/utils/render-utils.d.ts.map +1 -0
  54. package/dist/utils/sort-rows.d.ts +29 -0
  55. package/dist/utils/sort-rows.d.ts.map +1 -0
  56. package/dist/vue.d.ts +27 -0
  57. package/dist/vue.d.ts.map +1 -0
  58. package/package.json +62 -0
package/dist/style.css ADDED
@@ -0,0 +1,145 @@
1
+ .vc-table {
2
+ border-collapse: collapse;
3
+ box-sizing: border-box;
4
+ width: 100%;
5
+ }
6
+
7
+ .vc-table-scroll-container {
8
+ position: relative;
9
+ overflow: auto;
10
+ }
11
+
12
+ .vc-table-row[tabindex="0"] {
13
+ cursor: pointer;
14
+ }
15
+
16
+ .vc-table-row[tabindex="0"]:focus-visible {
17
+ outline-offset: -2px;
18
+ outline: 2px solid;
19
+ }
20
+
21
+ .vc-table-cell, .vc-table-head-cell {
22
+ box-sizing: border-box;
23
+ text-align: left;
24
+ vertical-align: middle;
25
+ }
26
+
27
+ .vc-table-head-cell[role="columnheader"][tabindex="0"] {
28
+ cursor: pointer;
29
+ user-select: none;
30
+ }
31
+
32
+ .vc-table-head-cell-sort-icon {
33
+ vertical-align: baseline;
34
+ margin-left: .25rem;
35
+ font-size: .75em;
36
+ line-height: 1;
37
+ display: inline-block;
38
+ }
39
+
40
+ .vc-table-head-cell[data-sort-index]:after {
41
+ content: attr(data-sort-index);
42
+ vertical-align: super;
43
+ opacity: .75;
44
+ margin-inline-start: .125rem;
45
+ font-size: .6em;
46
+ line-height: 1;
47
+ display: inline-block;
48
+ }
49
+
50
+ .vc-table-loading-overlay {
51
+ pointer-events: auto;
52
+ z-index: 1;
53
+ justify-content: center;
54
+ align-items: center;
55
+ display: flex;
56
+ position: absolute;
57
+ inset: 0;
58
+ }
59
+
60
+ .vc-table-head-cell[data-sticky-column], .vc-table-cell[data-sticky-column] {
61
+ position: sticky;
62
+ left: 0;
63
+ }
64
+
65
+ @media (width <= 640px) {
66
+ .vc-table[data-responsive="true"] thead {
67
+ clip-path: inset(50%);
68
+ white-space: nowrap;
69
+ border: 0;
70
+ width: 1px;
71
+ height: 1px;
72
+ margin: -1px;
73
+ padding: 0;
74
+ position: absolute;
75
+ overflow: hidden;
76
+ }
77
+
78
+ .vc-table[data-responsive="true"] tbody, .vc-table[data-responsive="true"] tr {
79
+ width: 100%;
80
+ display: block;
81
+ }
82
+
83
+ .vc-table[data-responsive="true"] tr {
84
+ margin-bottom: .75rem;
85
+ }
86
+
87
+ .vc-table[data-responsive="true"] tbody td, .vc-table[data-responsive="true"] tbody th {
88
+ text-align: left;
89
+ align-items: baseline;
90
+ gap: .75rem;
91
+ padding: .5rem .75rem;
92
+ display: flex;
93
+ }
94
+
95
+ .vc-table[data-responsive="true"] tbody td:before, .vc-table[data-responsive="true"] tbody th:before {
96
+ content: attr(data-label);
97
+ color: inherit;
98
+ flex: 0 0 8rem;
99
+ font-weight: 600;
100
+ }
101
+
102
+ .vc-table[data-responsive="true"] tbody td:not([data-label]):before, .vc-table[data-responsive="true"] tbody th:not([data-label]):before, .vc-table[data-responsive="true"] tbody td[data-label=""]:before, .vc-table[data-responsive="true"] tbody th[data-label=""]:before {
103
+ content: none;
104
+ }
105
+ }
106
+
107
+ .vc-table-sort-indicators {
108
+ flex-wrap: wrap;
109
+ align-items: center;
110
+ gap: .375rem;
111
+ display: flex;
112
+ }
113
+
114
+ .vc-table-sort-indicators-chip {
115
+ font: inherit;
116
+ align-items: center;
117
+ display: inline-flex;
118
+ }
119
+
120
+ .vc-table-sort-indicators-chip-toggle {
121
+ font: inherit;
122
+ cursor: pointer;
123
+ align-items: center;
124
+ gap: .375rem;
125
+ display: inline-flex;
126
+ }
127
+
128
+ .vc-table-sort-indicators-chip-remove {
129
+ cursor: pointer;
130
+ justify-content: center;
131
+ align-items: center;
132
+ line-height: 1;
133
+ display: inline-flex;
134
+ }
135
+
136
+ .vc-table-sort-indicators-add, .vc-table-sort-indicators-clear {
137
+ font: inherit;
138
+ cursor: pointer;
139
+ }
140
+
141
+ .vc-table-selector-checkbox {
142
+ cursor: pointer;
143
+ vertical-align: middle;
144
+ accent-color: var(--vc-color-primary-600);
145
+ }
@@ -0,0 +1,13 @@
1
+ import type { ComponentThemeDefinition } from '@vuecs/core';
2
+ import type { TableBodyThemeClasses, TableCellThemeClasses, TableEmptyThemeClasses, TableFooterThemeClasses, TableHeadCellThemeClasses, TableHeaderThemeClasses, TableLoadingThemeClasses, TableRowThemeClasses, TableSortIndicatorsThemeClasses, TableThemeClasses } from './types';
3
+ export declare const tableThemeDefaults: ComponentThemeDefinition<TableThemeClasses>;
4
+ export declare const tableHeaderThemeDefaults: ComponentThemeDefinition<TableHeaderThemeClasses>;
5
+ export declare const tableBodyThemeDefaults: ComponentThemeDefinition<TableBodyThemeClasses>;
6
+ export declare const tableFooterThemeDefaults: ComponentThemeDefinition<TableFooterThemeClasses>;
7
+ export declare const tableRowThemeDefaults: ComponentThemeDefinition<TableRowThemeClasses>;
8
+ export declare const tableCellThemeDefaults: ComponentThemeDefinition<TableCellThemeClasses>;
9
+ export declare const tableHeadCellThemeDefaults: ComponentThemeDefinition<TableHeadCellThemeClasses>;
10
+ export declare const tableEmptyThemeDefaults: ComponentThemeDefinition<TableEmptyThemeClasses>;
11
+ export declare const tableLoadingThemeDefaults: ComponentThemeDefinition<TableLoadingThemeClasses>;
12
+ export declare const tableSortIndicatorsThemeDefaults: ComponentThemeDefinition<TableSortIndicatorsThemeClasses>;
13
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EACR,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,iBAAiB,EACpB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,kBAAkB,EAAE,wBAAwB,CAAC,iBAAiB,CAK1E,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,wBAAwB,CAAC,uBAAuB,CAA4C,CAAC;AAEpI,eAAO,MAAM,sBAAsB,EAAE,wBAAwB,CAAC,qBAAqB,CAA0C,CAAC;AAE9H,eAAO,MAAM,wBAAwB,EAAE,wBAAwB,CAAC,uBAAuB,CAA4C,CAAC;AAEpI,eAAO,MAAM,qBAAqB,EAAE,wBAAwB,CAAC,oBAAoB,CAAyC,CAAC;AAE3H,eAAO,MAAM,sBAAsB,EAAE,wBAAwB,CAAC,qBAAqB,CAA0C,CAAC;AAE9H,eAAO,MAAM,0BAA0B,EAAE,wBAAwB,CAAC,yBAAyB,CAK1F,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,wBAAwB,CAAC,sBAAsB,CAA2C,CAAC;AAEjI,eAAO,MAAM,yBAAyB,EAAE,wBAAwB,CAAC,wBAAwB,CAKxF,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,wBAAwB,CAAC,+BAA+B,CAetG,CAAC"}
@@ -0,0 +1,248 @@
1
+ import type { ThemeElementDefinition, VNodeClass } from '@vuecs/core';
2
+ /**
3
+ * Bare-string shorthand: `'name'` is equivalent to
4
+ * `{ key: 'name', label: startCase('name') }`.
5
+ */
6
+ export type TableColumnRaw<Row = unknown, K extends string = string> = K | TableColumn<Row, K>;
7
+ export type TableColumnFormatterCtx<Row, K extends string = string> = {
8
+ value: unknown;
9
+ key: K;
10
+ row: Row;
11
+ };
12
+ export type TableColumnHeaderAttrsCtx<K extends string = string> = {
13
+ key: K;
14
+ type: 'top' | 'bottom';
15
+ };
16
+ export interface TableColumn<Row = unknown, K extends string = string> {
17
+ /** Key into the row object. Used as the cell value default and the slot suffix. */
18
+ key: K;
19
+ /** Heading text. Defaults to `startCase(key)`. Override per-column via `#header-<key>` slot. */
20
+ label?: string;
21
+ /** Optional class string applied to BOTH `<th>` AND `<td>` for this column. */
22
+ class?: VNodeClass;
23
+ /** Class concatenated onto the `<th>` (in addition to `class`). Additive, not replacing. */
24
+ headerClass?: VNodeClass;
25
+ /** Class concatenated onto the `<td>` (in addition to `class`). Additive, not replacing. */
26
+ cellClass?: VNodeClass;
27
+ /** Marks the column sortable. Click / Enter / Space cycles sort state and emits `update:sort`. */
28
+ sortable?: boolean;
29
+ /**
30
+ * Value accessor when the row's value isn't `row[key]`.
31
+ * - String: dot-path (e.g. `'profile.email'`) — resolved against `row` at render time.
32
+ * - Function: `(row) => unknown` — full custom resolution.
33
+ */
34
+ accessor?: string | ((row: Row) => unknown);
35
+ /**
36
+ * Default cell renderer when `#cell-<key>` slot isn't provided.
37
+ * Object-arg shape (matches `cellAttrs` / `headerAttrs`).
38
+ */
39
+ formatter?: (ctx: TableColumnFormatterCtx<Row, K>) => string;
40
+ /**
41
+ * Render this column's `<td>` as `<th scope="row">` instead.
42
+ * Highest-leverage a11y switch for entity-name columns: screen readers
43
+ * announce row-header + column-header for every other cell in the row.
44
+ */
45
+ isRowHeader?: boolean;
46
+ /**
47
+ * Per-cell attribute escape hatch — applied to the `<td>` (or `<th>` when
48
+ * `isRowHeader`). Object form is static; function form receives the same
49
+ * ctx as `formatter`. Common uses: `data-testid`, ARIA labels.
50
+ */
51
+ cellAttrs?: Record<string, unknown> | ((ctx: TableColumnFormatterCtx<Row, K>) => Record<string, unknown>);
52
+ /**
53
+ * Per-header attribute escape hatch — applied to the `<th>`. Object form
54
+ * is static; function form receives `{ key, type }` where `type` is
55
+ * `'top'` (header band) or `'bottom'` (footer band, when present).
56
+ */
57
+ headerAttrs?: Record<string, unknown> | ((ctx: TableColumnHeaderAttrsCtx<K>) => Record<string, unknown>);
58
+ /** Native `<th title="…">`. */
59
+ headerTitle?: string;
60
+ /** Native `<th abbr="…">`. */
61
+ headerAbbr?: string;
62
+ /**
63
+ * `position: sticky; left: 0` on this column's `<th>` + `<td>`. Theme owns
64
+ * the CSS (each shipping theme adds a `stickyColumn` variant axis on
65
+ * `tableCell` / `tableHeadCell`).
66
+ */
67
+ stickyColumn?: boolean;
68
+ /** Default direction when this column is sorted for the first time. Defaults to `'asc'`. */
69
+ initialSortDirection?: 'asc' | 'desc';
70
+ /**
71
+ * Custom comparator for client-side sort (plan 033 v1.x-B). Receives
72
+ * the two resolved values from `accessor` (or `formatter` output when
73
+ * `sortByFormatted: true`) — same ergonomics as
74
+ * `Array.prototype.sort`. Return a negative number when `a` should
75
+ * come first, positive for `b`, zero when equal.
76
+ *
77
+ * Use for semver, IP addresses, locale-aware strings, custom epochs,
78
+ * or any value where the default `<` / `>` ordering is wrong.
79
+ */
80
+ sortFn?: (a: unknown, b: unknown) => number;
81
+ /**
82
+ * When `true`, client-side sort compares the formatter output rather
83
+ * than the raw accessor value. Default `false` — sort by raw value
84
+ * so dates / numbers sort chronologically / numerically even when
85
+ * the cell displays "2 days ago" / "$1,234.56". (plan 033 v1.x-B)
86
+ */
87
+ sortByFormatted?: boolean;
88
+ /**
89
+ * Client-side sort null-handling override. By default, `null` /
90
+ * `undefined` values sort to the END regardless of direction
91
+ * ("missing data lives at the bottom"). Set `true` to float them to
92
+ * the start instead. (plan 033 v1.x-B)
93
+ */
94
+ nullsFirst?: boolean;
95
+ }
96
+ export type RowVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'primary';
97
+ /**
98
+ * Row-meta escape hatch. Underscore-prefixed fields on the data row itself
99
+ * control visual state without forcing consumers to wire a function prop or
100
+ * additional column.
101
+ *
102
+ * const users: WithRowMeta<User>[] = [
103
+ * { id: 1, name: 'Alice', _rowVariant: 'warning' },
104
+ * { id: 2, name: 'Bob', _cellVariants: { email: 'error' } },
105
+ * ];
106
+ *
107
+ * Underscore prefix prevents collision with real data keys. Consumers that
108
+ * send rows back to a server should strip these client-side fields.
109
+ */
110
+ export type WithRowMeta<T> = T & {
111
+ /** Applied to the entire `<tr>` via `tableRow.rowVariant.<value>`. */
112
+ _rowVariant?: RowVariant | null;
113
+ /** Applied per-cell — keyed by column key — via `tableCell.cellVariant.<value>`. */
114
+ _cellVariants?: Partial<Record<keyof T & string, RowVariant>>;
115
+ };
116
+ export type SortDirection = 'asc' | 'desc';
117
+ /**
118
+ * A single sort step. The array form `SortDescriptor[]` is the public
119
+ * shape of `v-model:sort` from v1.x-B onward — single-column sort
120
+ * becomes an array of length 0 or 1.
121
+ */
122
+ export type SortDescriptor = {
123
+ key: string;
124
+ direction: SortDirection;
125
+ };
126
+ /**
127
+ * Public sort state shape — always an array since v1.x-B (breaking
128
+ * change from v0.1's `{ key, direction } | null`). An empty array
129
+ * means "no sort active". Multi-key sort appends additional descriptors;
130
+ * the first descriptor is the primary key, the second is the
131
+ * tie-breaker, etc.
132
+ */
133
+ export type TableSortState = SortDescriptor[];
134
+ export type TableThemeClasses = {
135
+ /** The outer `<table>` (or its `<div class="scrollContainer">` wrapper when `:scrollable`). */
136
+ root: string;
137
+ /** The overflow wrapper rendered when `:scrollable` is set. */
138
+ scrollContainer: string;
139
+ };
140
+ export type TableHeaderThemeClasses = {
141
+ /** The `<thead>` band. */
142
+ root: string;
143
+ };
144
+ export type TableBodyThemeClasses = {
145
+ /** The `<tbody>` band. */
146
+ root: string;
147
+ };
148
+ export type TableFooterThemeClasses = {
149
+ /** The `<tfoot>` band. */
150
+ root: string;
151
+ };
152
+ export type TableRowThemeClasses = {
153
+ /** The `<tr>` element. */
154
+ root: string;
155
+ };
156
+ export type TableCellThemeClasses = {
157
+ /** The `<td>` element. */
158
+ root: string;
159
+ };
160
+ export type TableHeadCellThemeClasses = {
161
+ /** The `<th>` element. */
162
+ root: string;
163
+ /** The sort-indicator wrapper rendered alongside the label when `sortable`. */
164
+ sortIcon: string;
165
+ };
166
+ export type TableEmptyThemeClasses = {
167
+ /** The `<tbody>` (or `<td>` child) carrying the empty-state message. */
168
+ root: string;
169
+ };
170
+ export type TableLoadingThemeClasses = {
171
+ /** The `<tbody>` band (default) OR the overlay `<div>` (when `:overlay`). */
172
+ root: string;
173
+ /** Applied only in overlay mode. */
174
+ overlay: string;
175
+ };
176
+ export type TableSortIndicatorsThemeClasses = {
177
+ /** The bar container `<div>`. */
178
+ root: string;
179
+ /** The leading `"Sort:"` label. */
180
+ label: string;
181
+ /** The empty-state hint shown when no descriptors are active. */
182
+ empty: string;
183
+ /** The chip wrapper `<div>` (non-interactive — holds the two buttons). */
184
+ chip: string;
185
+ /** The toggle `<button>` inside a chip (cycles asc ↔ desc on click). */
186
+ chipToggle: string;
187
+ /** The 1-based position prefix (`1.`, `2.`, …) inside the toggle button. */
188
+ chipPosition: string;
189
+ /** The column label inside the toggle button. */
190
+ chipLabel: string;
191
+ /** The direction arrow inside the toggle button (↑ / ↓). */
192
+ chipArrow: string;
193
+ /** The `×` remove `<button>` at the trailing edge of a chip. */
194
+ chipRemove: string;
195
+ /**
196
+ * Wrapper element around the "Add column" `<select>`. Optional —
197
+ * themes that style the `<select>` directly leave it empty
198
+ * (Tailwind, Bootstrap). Bulma's `.select` is a wrapper pattern,
199
+ * so theme-bulma populates this slot.
200
+ */
201
+ addWrapper: string;
202
+ /** The "Add column" `<select>` element. */
203
+ add: string;
204
+ /** The "Clear all" trigger. */
205
+ clear: string;
206
+ };
207
+ declare module '@vuecs/core' {
208
+ interface ThemeElements {
209
+ table?: ThemeElementDefinition<TableThemeClasses>;
210
+ tableHeader?: ThemeElementDefinition<TableHeaderThemeClasses>;
211
+ tableBody?: ThemeElementDefinition<TableBodyThemeClasses>;
212
+ tableFooter?: ThemeElementDefinition<TableFooterThemeClasses>;
213
+ tableRow?: ThemeElementDefinition<TableRowThemeClasses>;
214
+ tableCell?: ThemeElementDefinition<TableCellThemeClasses>;
215
+ tableHeadCell?: ThemeElementDefinition<TableHeadCellThemeClasses>;
216
+ tableEmpty?: ThemeElementDefinition<TableEmptyThemeClasses>;
217
+ tableLoading?: ThemeElementDefinition<TableLoadingThemeClasses>;
218
+ tableSortIndicators?: ThemeElementDefinition<TableSortIndicatorsThemeClasses>;
219
+ }
220
+ }
221
+ export type TableSlotProps<Row = unknown> = {
222
+ data: Row[];
223
+ busy: boolean;
224
+ columns: TableColumn<Row>[];
225
+ sort: TableSortState;
226
+ setSort: (key: string, opts?: {
227
+ append?: boolean;
228
+ direction?: SortDirection;
229
+ }) => void;
230
+ };
231
+ export type TableBodyRowSlotProps<Row = unknown> = {
232
+ row: Row;
233
+ index: number;
234
+ };
235
+ export type TableCellSlotProps<Row = unknown> = {
236
+ row: Row;
237
+ value: unknown;
238
+ key: string;
239
+ column: TableColumn<Row>;
240
+ index: number;
241
+ };
242
+ export type TableHeadCellSlotProps<Row = unknown> = {
243
+ column: TableColumn<Row>;
244
+ key: string;
245
+ sort: SortDirection | null;
246
+ setSort: (direction?: SortDirection) => void;
247
+ };
248
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMtE;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,GAAG,GAAG,OAAO,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAS,CAAC,GACzE,WA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,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,aAAa,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1F,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,GAAG,GAAG,OAAO,IAAI;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,GAAG,GAAG,OAAO,IAAI;IAC5C,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,GAAG,GAAG,OAAO,IAAI;IAChD,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CAChD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { TableColumn } from '../types';
2
+ /**
3
+ * Recursively check whether `nodes` (a slot return) contains a vnode
4
+ * whose `type` equals `target`. Recurses into Vue `Fragment` vnodes so
5
+ * `<template v-if>` / `<template v-for>` wrapping around a part
6
+ * doesn't hide it from the auto-render check.
7
+ *
8
+ * Used by `<VCTable>` and `<VCTableLite>` to detect whether the
9
+ * consumer wrote a manual `<VCTableHeader>` / `<VCTableBody>` in the
10
+ * default slot — if not, and `:columns` is set, the table renders the
11
+ * missing band itself.
12
+ */
13
+ export declare function containsComponent(nodes: unknown, target: unknown): boolean;
14
+ /**
15
+ * Compose the inner children of a `<table>` for the driver auto-render
16
+ * path (plan 033 v0.2-B). Returns the array of vnodes in the order
17
+ * the table should render them:
18
+ *
19
+ * caption? · colgroup? · autoHeader? · slotChildren · autoBody?
20
+ *
21
+ * Header / body auto-render fires when `columns.length > 0` AND the
22
+ * matching part isn't already present in `slotChildren` (Fragment-
23
+ * aware via `containsComponent`).
24
+ */
25
+ export declare function composeTableInner(opts: {
26
+ cols: TableColumn<unknown>[];
27
+ slotChildren: unknown;
28
+ captionSlot?: (() => unknown) | undefined;
29
+ colgroupSlot?: (() => unknown) | undefined;
30
+ }): unknown[];
31
+ //# sourceMappingURL=auto-render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-render.d.ts","sourceRoot":"","sources":["../../src/utils/auto-render.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAa1E;AAkDD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACpC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;IAC1C,YAAY,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;CAC9C,GAAG,OAAO,EAAE,CAiEZ"}
@@ -0,0 +1,3 @@
1
+ export * from './render-utils';
2
+ export * from './sort-rows';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { TableColumn, TableColumnRaw } from '../types';
2
+ /**
3
+ * Convert a key like `'firstName'` / `'first_name'` / `'first-name'` to
4
+ * `'First Name'`. Used by the bare-string column shorthand to derive
5
+ * a label when only the key is given.
6
+ */
7
+ export declare function startCase(input: string): string;
8
+ /**
9
+ * Normalize the `:columns` prop into a uniform `TableColumn[]`.
10
+ *
11
+ * - **Explicit array** (including empty `[]`): pass through, fill `label`
12
+ * from `startCase(key)`. Treating `[]` as authoritative lets consumers
13
+ * deliberately render a header-less table during loading without the
14
+ * auto-derive kicking in the moment data arrives.
15
+ * - **Bare-string shorthand**: `['id', 'name']` → `[{ key, label }, ...]`.
16
+ * - **Auto-derive**: only when `columns` is `undefined` AND `data[0]` is an
17
+ * object, derive the columns from `Object.keys(data[0])`, skipping
18
+ * underscore-prefixed row-meta keys (`_rowVariant` / `_cellVariants`).
19
+ */
20
+ export declare function normalizeColumns<Row>(columns: ReadonlyArray<TableColumnRaw<Row>> | undefined, data: ReadonlyArray<Row>): TableColumn<Row>[];
21
+ /**
22
+ * Resolve a column's value against a row.
23
+ *
24
+ * - String accessor: dot-path lookup (e.g. `'profile.email'` → `row.profile.email`)
25
+ * - Function accessor: invoked with the row
26
+ * - Falls back to `row[column.key]`
27
+ */
28
+ export declare function resolveCellValue<Row>(column: TableColumn<Row>, row: Row): unknown;
29
+ /**
30
+ * Resolve attribute objects, supporting both static-object and function forms
31
+ * used by `cellAttrs` and `headerAttrs`.
32
+ */
33
+ export declare function resolveAttrs<Ctx>(attrs: Record<string, unknown> | ((ctx: Ctx) => Record<string, unknown>) | undefined, ctx: Ctx): Record<string, unknown> | undefined;
34
+ /**
35
+ * Returns `true` when a row-level click should be suppressed because the
36
+ * event originated inside an interactive descendant — a button, anchor,
37
+ * form input, role=button/link, an explicitly-focusable element, or a
38
+ * portal'd overlay rendered into the document body (e.g. a
39
+ * `<VCDropdownMenu>` action menu inside the row).
40
+ *
41
+ * Pass the `<tr>` element as `rowEl` so the helper can disambiguate
42
+ * legitimate row clicks (where the `closest()` ancestor walk reaches the
43
+ * `<tr>` itself, which carries `tabindex="0"` when the row is clickable)
44
+ * from clicks on a genuine interactive descendant.
45
+ *
46
+ * Use at the row click handler: `if (filterRowClickEvent(event, tr)) return;`.
47
+ */
48
+ export declare function filterRowClickEvent(event: Event, rowEl?: Element | null): boolean;
49
+ //# sourceMappingURL=render-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-utils.d.ts","sourceRoot":"","sources":["../../src/utils/render-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAChC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,EACvD,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,GACzB,WAAW,CAAC,GAAG,CAAC,EAAE,CAoBpB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAYjF;AAYD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,EACpF,GAAG,EAAE,GAAG,GACT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAGrC;AA4BD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAUjF"}
@@ -0,0 +1,29 @@
1
+ import type { SortDescriptor, TableColumn } from '../types';
2
+ export type SortRowsOptions<Row = unknown> = {
3
+ columns: ReadonlyArray<TableColumn<Row>>;
4
+ sorts: ReadonlyArray<SortDescriptor>;
5
+ };
6
+ /**
7
+ * Client-side row sort (plan 033 v1.x-B).
8
+ *
9
+ * Returns a new array — the input is untouched. Honors:
10
+ *
11
+ * - **Sort key**: `column.sortByFormatted` → use `formatter` output;
12
+ * else → use `accessor` resolved value (default, matches v0.1
13
+ * `resolveCellValue`).
14
+ * - **Comparator**: `column.sortFn(a, b) => number` when present;
15
+ * else a built-in compare that handles numbers, Dates, booleans,
16
+ * and uses `localeCompare` (with `numeric: true`) for everything
17
+ * else — so `'item 2'` sorts before `'item 10'`.
18
+ * - **Null handling**: `null` / `undefined` sort LAST regardless of
19
+ * direction. Per-column `nullsFirst: true` floats them to the top.
20
+ * - **Multi-key tie-break**: descriptors are applied in order. The
21
+ * first non-zero comparison wins.
22
+ * - **Stability**: relies on `Array.prototype.sort`'s stable
23
+ * guarantee (ES2019+, every supported runtime).
24
+ *
25
+ * Empty `sorts` returns a shallow copy — never the input reference
26
+ * itself, so callers can safely mutate the result.
27
+ */
28
+ export declare function sortRows<Row>(rows: ReadonlyArray<Row>, options: SortRowsOptions<Row>): Row[];
29
+ //# sourceMappingURL=sort-rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-rows.d.ts","sourceRoot":"","sources":["../../src/utils/sort-rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,cAAc,EAEd,WAAW,EACd,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,eAAe,CAAC,GAAG,GAAG,OAAO,IAAI;IACzC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EACxB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EACxB,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,GAC9B,GAAG,EAAE,CAcP"}
package/dist/vue.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import type VCTable from './components/Table.vue';
2
+ import type VCTableBody from './components/TableBody.vue';
3
+ import type VCTableCell from './components/TableCell.vue';
4
+ import type VCTableEmpty from './components/TableEmpty.vue';
5
+ import type VCTableFooter from './components/TableFooter.vue';
6
+ import type VCTableHeadCell from './components/TableHeadCell.vue';
7
+ import type VCTableHeader from './components/TableHeader.vue';
8
+ import type VCTableLite from './components/TableLite.vue';
9
+ import type VCTableLoading from './components/TableLoading.vue';
10
+ import type VCTableRow from './components/TableRow.vue';
11
+ import type VCTableSortIndicators from './components/TableSortIndicators.vue';
12
+ declare module '@vue/runtime-core' {
13
+ interface GlobalComponents {
14
+ VCTable: typeof VCTable;
15
+ VCTableLite: typeof VCTableLite;
16
+ VCTableHeader: typeof VCTableHeader;
17
+ VCTableBody: typeof VCTableBody;
18
+ VCTableFooter: typeof VCTableFooter;
19
+ VCTableRow: typeof VCTableRow;
20
+ VCTableCell: typeof VCTableCell;
21
+ VCTableHeadCell: typeof VCTableHeadCell;
22
+ VCTableEmpty: typeof VCTableEmpty;
23
+ VCTableLoading: typeof VCTableLoading;
24
+ VCTableSortIndicators: typeof VCTableSortIndicators;
25
+ }
26
+ }
27
+ //# sourceMappingURL=vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../src/vue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,WAAW,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,qBAAqB,MAAM,sCAAsC,CAAC;AAE9E,OAAO,QAAQ,mBAAmB,CAAC;IAC/B,UAAiB,gBAAgB;QAC7B,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,WAAW,EAAE,OAAO,WAAW,CAAC;QAChC,aAAa,EAAE,OAAO,aAAa,CAAC;QACpC,WAAW,EAAE,OAAO,WAAW,CAAC;QAChC,aAAa,EAAE,OAAO,aAAa,CAAC;QACpC,UAAU,EAAE,OAAO,UAAU,CAAC;QAC9B,WAAW,EAAE,OAAO,WAAW,CAAC;QAChC,eAAe,EAAE,OAAO,eAAe,CAAC;QACxC,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,cAAc,EAAE,OAAO,cAAc,CAAC;QACtC,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;KACvD;CACJ"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@vuecs/table",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "Compound table for vuecs (Table / Header / Body / Footer / Row / Cell / HeadCell / Empty / Loading) + columns/data driver with sortable headers, row-meta variants, and row keyboard navigation. Semantic-HTML compound — no Reka primitive dependency.",
6
+ "exports": {
7
+ "./package.json": "./package.json",
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "style": "./dist/style.css",
11
+ "import": "./dist/index.mjs"
12
+ },
13
+ "./style.css": "./dist/style.css",
14
+ "./dist/style.css": "./dist/style.css"
15
+ },
16
+ "style": "./dist/style.css",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "keywords": [
21
+ "vue",
22
+ "vuecs",
23
+ "table",
24
+ "compound",
25
+ "columns",
26
+ "sortable"
27
+ ],
28
+ "author": {
29
+ "name": "Peter Placzek",
30
+ "email": "contact@tada5hi.net",
31
+ "url": "https://tada5hi.net"
32
+ },
33
+ "license": "Apache-2.0",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/tada5hi/vuecs.git",
37
+ "directory": "packages/table"
38
+ },
39
+ "scripts": {
40
+ "build:js": "tsdown",
41
+ "build:types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.build.json",
42
+ "build": "rimraf dist && npm run build:js && npm run build:types",
43
+ "test": "vitest --config test/vitest.config.ts --run",
44
+ "test:coverage": "vitest --config test/vitest.config.ts --run --coverage"
45
+ },
46
+ "devDependencies": {
47
+ "@vue/test-utils": "^2.4.10",
48
+ "@vuecs/core": "^3.0.0",
49
+ "jsdom": "^29.1.1",
50
+ "vue": "^3.5.34"
51
+ },
52
+ "peerDependencies": {
53
+ "@vuecs/core": "^3.0.0",
54
+ "vue": "^3.x"
55
+ },
56
+ "engines": {
57
+ "node": ">=22.0.0"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ }
62
+ }