@letsprogram/ng-oat 0.1.3 → 0.1.4

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.
@@ -1979,7 +1979,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
1979
1979
  * <ng-oat-table
1980
1980
  * [columns]="[{key:'name', label:'Name'}, {key:'email', label:'Email'}]"
1981
1981
  * [data]="users"
1982
- * [striped]="true"
1982
+ * [scrollX]="true"
1983
+ * [scrollY]="'320px'"
1983
1984
  * (rowClick)="onRowClick($event)">
1984
1985
  * </ng-oat-table>
1985
1986
  * ```
@@ -1990,13 +1991,17 @@ class NgOatTable {
1990
1991
  striped = input(false, ...(ngDevMode ? [{ debugName: "striped" }] : []));
1991
1992
  clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable" }] : []));
1992
1993
  emptyText = input('No data available.', ...(ngDevMode ? [{ debugName: "emptyText" }] : []));
1994
+ scrollX = input(false, ...(ngDevMode ? [{ debugName: "scrollX" }] : []));
1995
+ scrollY = input('', ...(ngDevMode ? [{ debugName: "scrollY" }] : []));
1993
1996
  rowClick = output();
1994
1997
  onRowClick(row) {
1995
1998
  this.rowClick.emit(row);
1996
1999
  }
1997
2000
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgOatTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
1998
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NgOatTable, isStandalone: true, selector: "ng-oat-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowClick: "rowClick" }, ngImport: i0, template: `
1999
- <div class="table">
2001
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NgOatTable, isStandalone: true, selector: "ng-oat-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, scrollX: { classPropertyName: "scrollX", publicName: "scrollX", isSignal: true, isRequired: false, transformFunction: null }, scrollY: { classPropertyName: "scrollY", publicName: "scrollY", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowClick: "rowClick" }, ngImport: i0, template: `
2002
+ <div class="table" [class.ng-oat-table-scroll-x]="scrollX()"
2003
+ [style.max-height]="scrollY() || null"
2004
+ [style.overflow-y]="scrollY() ? 'auto' : null">
2000
2005
  <table>
2001
2006
  <thead>
2002
2007
  <tr>
@@ -2024,12 +2029,14 @@ class NgOatTable {
2024
2029
  </tbody>
2025
2030
  </table>
2026
2031
  </div>
2027
- `, isInline: true, styles: [".clickable{cursor:pointer}.clickable:hover{background:var(--hover)}\n"] });
2032
+ `, isInline: true, styles: [".clickable{cursor:pointer}.clickable:hover{background:var(--hover)}.ng-oat-table-scroll-x{overflow-x:auto;-webkit-overflow-scrolling:touch}:host([scrollY]) thead th,.ng-oat-table-scroll-x thead th{position:sticky;top:0;z-index:1;background:var(--card, var(--background))}\n"] });
2028
2033
  }
2029
2034
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgOatTable, decorators: [{
2030
2035
  type: Component,
2031
2036
  args: [{ selector: 'ng-oat-table', template: `
2032
- <div class="table">
2037
+ <div class="table" [class.ng-oat-table-scroll-x]="scrollX()"
2038
+ [style.max-height]="scrollY() || null"
2039
+ [style.overflow-y]="scrollY() ? 'auto' : null">
2033
2040
  <table>
2034
2041
  <thead>
2035
2042
  <tr>
@@ -2057,8 +2064,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
2057
2064
  </tbody>
2058
2065
  </table>
2059
2066
  </div>
2060
- `, styles: [".clickable{cursor:pointer}.clickable:hover{background:var(--hover)}\n"] }]
2061
- }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }] } });
2067
+ `, styles: [".clickable{cursor:pointer}.clickable:hover{background:var(--hover)}.ng-oat-table-scroll-x{overflow-x:auto;-webkit-overflow-scrolling:touch}:host([scrollY]) thead th,.ng-oat-table-scroll-x thead th{position:sticky;top:0;z-index:1;background:var(--card, var(--background))}\n"] }]
2068
+ }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], scrollX: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollX", required: false }] }], scrollY: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollY", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }] } });
2062
2069
 
2063
2070
  /**
2064
2071
  * Angular component wrapper for Oat's dropdown.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letsprogram/ng-oat",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Angular component library built on top of the Oat CSS framework — signals-first, lightweight, and accessible.",
5
5
  "license": "MIT",
6
6
  "author": "SashiKumar Yadav",
@@ -807,7 +807,8 @@ interface NgOatTableColumn {
807
807
  * <ng-oat-table
808
808
  * [columns]="[{key:'name', label:'Name'}, {key:'email', label:'Email'}]"
809
809
  * [data]="users"
810
- * [striped]="true"
810
+ * [scrollX]="true"
811
+ * [scrollY]="'320px'"
811
812
  * (rowClick)="onRowClick($event)">
812
813
  * </ng-oat-table>
813
814
  * ```
@@ -818,10 +819,12 @@ declare class NgOatTable {
818
819
  readonly striped: _angular_core.InputSignal<boolean>;
819
820
  readonly clickable: _angular_core.InputSignal<boolean>;
820
821
  readonly emptyText: _angular_core.InputSignal<string>;
822
+ readonly scrollX: _angular_core.InputSignal<boolean>;
823
+ readonly scrollY: _angular_core.InputSignal<string>;
821
824
  readonly rowClick: _angular_core.OutputEmitterRef<Record<string, any>>;
822
825
  onRowClick(row: Record<string, any>): void;
823
826
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgOatTable, never>;
824
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgOatTable, "ng-oat-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; }, { "rowClick": "rowClick"; }, never, never, true, never>;
827
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgOatTable, "ng-oat-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "scrollX": { "alias": "scrollX"; "required": false; "isSignal": true; }; "scrollY": { "alias": "scrollY"; "required": false; "isSignal": true; }; }, { "rowClick": "rowClick"; }, never, never, true, never>;
825
828
  }
826
829
 
827
830
  /**
@@ -1644,7 +1647,7 @@ declare class NgOatThemeSelectorIcon {
1644
1647
  */
1645
1648
  declare class NgOatThemeSelector implements OnInit {
1646
1649
  /** Display mode: dropdown menu or inline toggle group */
1647
- readonly mode: _angular_core.InputSignal<"dropdown" | "toggle">;
1650
+ readonly mode: _angular_core.InputSignal<"toggle" | "dropdown">;
1648
1651
  /** Initial theme (overrides localStorage if set) */
1649
1652
  readonly initialTheme: _angular_core.InputSignal<NgOatTheme | undefined>;
1650
1653
  /**