ngx-com 0.1.4 → 0.1.6

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.
@@ -114,14 +114,21 @@ declare class ComColumnDef {
114
114
  * ```html
115
115
  * <tr comHeaderRowDef="['name', 'email']" comHeaderRowDefSticky></tr>
116
116
  * ```
117
+ *
118
+ * @example Custom class on header row
119
+ * ```html
120
+ * <tr [comHeaderRowDef]="['name', 'email']" comHeaderRowDefClass="uppercase"></tr>
121
+ * ```
117
122
  */
118
123
  declare class ComHeaderRowDef {
119
124
  /** Ordered list of column names to display. */
120
125
  readonly columns: InputSignal<string[]>;
121
126
  /** Makes this header row sticky (alternative to table-level `stickyHeader`). */
122
127
  readonly sticky: InputSignalWithTransform<boolean, unknown>;
128
+ /** Additional CSS classes to merge onto the header `<tr>`. */
129
+ readonly headerRowClass: InputSignal<string>;
123
130
  static ɵfac: i0.ɵɵFactoryDeclaration<ComHeaderRowDef, never>;
124
- static ɵdir: i0.ɵɵDirectiveDeclaration<ComHeaderRowDef, "[comHeaderRowDef]", never, { "columns": { "alias": "comHeaderRowDef"; "required": true; "isSignal": true; }; "sticky": { "alias": "comHeaderRowDefSticky"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
131
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComHeaderRowDef, "[comHeaderRowDef]", never, { "columns": { "alias": "comHeaderRowDef"; "required": true; "isSignal": true; }; "sticky": { "alias": "comHeaderRowDefSticky"; "required": false; "isSignal": true; }; "headerRowClass": { "alias": "comHeaderRowDefClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
125
132
  }
126
133
 
127
134
  /**
@@ -133,12 +140,19 @@ declare class ComHeaderRowDef {
133
140
  * ```html
134
141
  * <tr comRowDef [comRowDefColumns]="['name', 'email', 'role']"></tr>
135
142
  * ```
143
+ *
144
+ * @example Custom class on body rows
145
+ * ```html
146
+ * <tr comRowDef [comRowDefColumns]="['name', 'email']" comRowDefClass="even:bg-blue-50"></tr>
147
+ * ```
136
148
  */
137
149
  declare class ComRowDef {
138
150
  /** Ordered list of column names to display per body row. */
139
151
  readonly columns: InputSignal<string[]>;
152
+ /** Additional CSS classes to merge onto each body `<tr>`. */
153
+ readonly rowClass: InputSignal<string>;
140
154
  static ɵfac: i0.ɵɵFactoryDeclaration<ComRowDef, never>;
141
- static ɵdir: i0.ɵɵDirectiveDeclaration<ComRowDef, "[comRowDef]", never, { "columns": { "alias": "comRowDefColumns"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
155
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComRowDef, "[comRowDef]", never, { "columns": { "alias": "comRowDefColumns"; "required": true; "isSignal": true; }; "rowClass": { "alias": "comRowDefClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
142
156
  }
143
157
 
144
158
  /**
@@ -150,12 +164,19 @@ declare class ComRowDef {
150
164
  * ```html
151
165
  * <tr comFooterRowDef="['description', 'amount']"></tr>
152
166
  * ```
167
+ *
168
+ * @example Custom class on footer row
169
+ * ```html
170
+ * <tr comFooterRowDef="['description', 'amount']" comFooterRowDefClass="font-bold"></tr>
171
+ * ```
153
172
  */
154
173
  declare class ComFooterRowDef {
155
174
  /** Ordered list of column names in the footer. */
156
175
  readonly columns: InputSignal<string[]>;
176
+ /** Additional CSS classes to merge onto the footer `<tr>`. */
177
+ readonly footerRowClass: InputSignal<string>;
157
178
  static ɵfac: i0.ɵɵFactoryDeclaration<ComFooterRowDef, never>;
158
- static ɵdir: i0.ɵɵDirectiveDeclaration<ComFooterRowDef, "[comFooterRowDef]", never, { "columns": { "alias": "comFooterRowDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
179
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComFooterRowDef, "[comFooterRowDef]", never, { "columns": { "alias": "comFooterRowDef"; "required": true; "isSignal": true; }; "footerRowClass": { "alias": "comFooterRowDefClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
159
180
  }
160
181
 
161
182
  /**
@@ -237,6 +258,7 @@ type ComTableDataSourceInput<T> = T[] | ComDataSource<T>;
237
258
 
238
259
  type TableVariant = 'default' | 'striped';
239
260
  type TableDensity = 'compact' | 'default' | 'comfortable';
261
+ type HeaderVariant = 'default' | 'muted';
240
262
  /**
241
263
  * CVA variants for the table container wrapper.
242
264
  */
@@ -252,10 +274,11 @@ type TableVariants = VariantProps<typeof tableVariants>;
252
274
  /**
253
275
  * CVA variants for the `<thead>` element.
254
276
  *
255
- * @tokens `--color-background`
277
+ * @tokens `--color-background`, `--color-muted`, `--color-muted-foreground`, `--color-border`
256
278
  */
257
279
  declare const tableHeaderVariants: (props?: {
258
280
  sticky?: boolean;
281
+ headerVariant?: HeaderVariant;
259
282
  }) => string;
260
283
  type TableHeaderVariants = VariantProps<typeof tableHeaderVariants>;
261
284
  /**
@@ -360,6 +383,16 @@ declare class ComTable<T> {
360
383
  readonly loading: InputSignalWithTransform<boolean, unknown>;
361
384
  /** Accessible label for the table element. */
362
385
  readonly ariaLabel: InputSignal<string | undefined>;
386
+ /** Additional CSS classes to merge onto the host element. */
387
+ readonly userClass: InputSignal<string>;
388
+ /** Additional CSS classes to merge onto the container `<div>`. */
389
+ readonly containerClass: InputSignal<string>;
390
+ /** Additional CSS classes to merge onto the `<table>` element. */
391
+ readonly tableClass: InputSignal<string>;
392
+ /** Additional CSS classes to merge onto the `<thead>` element. */
393
+ readonly theadClass: InputSignal<string>;
394
+ /** Visual treatment of the header — `'muted'` adds a filled background. */
395
+ readonly headerVariant: InputSignal<HeaderVariant>;
363
396
  /** @internal All column definitions projected into the table. */
364
397
  readonly columnDefs: Signal<readonly ComColumnDef[]>;
365
398
  /** @internal Header row definition. */
@@ -384,6 +417,7 @@ declare class ComTable<T> {
384
417
  private readonly isSticky;
385
418
  /** @internal Whether body rows are clickable (ComRowClick directive is active). */
386
419
  protected readonly isRowClickable: Signal<boolean>;
420
+ protected readonly hostClass: Signal<string>;
387
421
  protected readonly containerClasses: Signal<string>;
388
422
  protected readonly tableClasses: Signal<string>;
389
423
  protected readonly theadClasses: Signal<string>;
@@ -392,7 +426,7 @@ declare class ComTable<T> {
392
426
  protected readonly footerTrClasses: Signal<string>;
393
427
  constructor();
394
428
  static ɵfac: i0.ɵɵFactoryDeclaration<ComTable<any>, never>;
395
- static ɵcmp: i0.ɵɵComponentDeclaration<ComTable<any>, "com-table", ["comTable"], { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "trackByFn": { "alias": "trackByFn"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, ["columnDefs", "headerRowDef", "rowDef", "footerRowDef", "noDataRow"], never, true, never>;
429
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComTable<any>, "com-table", ["comTable"], { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "trackByFn": { "alias": "trackByFn"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "containerClass": { "alias": "containerClass"; "required": false; "isSignal": true; }; "tableClass": { "alias": "tableClass"; "required": false; "isSignal": true; }; "theadClass": { "alias": "theadClass"; "required": false; "isSignal": true; }; "headerVariant": { "alias": "headerVariant"; "required": false; "isSignal": true; }; }, {}, ["columnDefs", "headerRowDef", "rowDef", "footerRowDef", "noDataRow"], never, true, never>;
396
430
  }
397
431
 
398
432
  /** Data context that ComTable pushes to ComRowClick to avoid circular DI. */
@@ -464,4 +498,4 @@ declare class ComRowClick<T = unknown> implements ComRowClickRef<T> {
464
498
  }
465
499
 
466
500
  export { COM_ROW_CLICK, ComArrayDataSource, ComCellDef, ComColumnDef, ComDataSource, ComFooterCellDef, ComFooterRowDef, ComHeaderCellDef, ComHeaderRowDef, ComNoDataRow, ComRowClick, ComRowDef, ComTable, isDataSource, tableBodyCellVariants, tableContainerVariants, tableFooterCellVariants, tableFooterRowVariants, tableHeaderCellVariants, tableHeaderRowVariants, tableHeaderVariants, tableRowVariants, tableVariants };
467
- export type { CellDefContext, ComRowClickRef, ComTableDataSourceInput, TableBodyCellVariants, TableContainerVariants, TableDensity, TableFooterCellVariants, TableFooterRowVariants, TableHeaderCellVariants, TableHeaderRowVariants, TableHeaderVariants, TableRowVariants, TableVariant, TableVariants };
501
+ export type { CellDefContext, ComRowClickRef, ComTableDataSourceInput, HeaderVariant, TableBodyCellVariants, TableContainerVariants, TableDensity, TableFooterCellVariants, TableFooterRowVariants, TableHeaderCellVariants, TableHeaderRowVariants, TableHeaderVariants, TableRowVariants, TableVariant, TableVariants };