@aginies/ui 0.2.0 → 0.3.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.
package/dist/index.d.cts CHANGED
@@ -763,8 +763,12 @@ export interface DataColumn<T = any> {
763
763
  sortValue?: (row: T) => any;
764
764
  /** right for numbers and amounts */
765
765
  align?: 'left' | 'right' | 'center';
766
+ /** Column width; also the room it needs when `minWidth` is absent (px numbers count for priority hiding) */
766
767
  width?: number | string;
768
+ /** Narrowest width the column may take; priority hiding sums these (default 120px) */
767
769
  minWidth?: number | string;
770
+ /** DataTable only: 1 = always shown (default), higher numbers hide first when the table's own width cannot fit every column */
771
+ priority?: number;
768
772
  /** Custom cell; receives (value, row, index) */
769
773
  render?: (value: any, row: T, index: number) => React.ReactNode;
770
774
  /** Inline edit on double-click, F2 or the pencil (needs onCellEdit) */
@@ -778,8 +782,8 @@ export interface DataColumn<T = any> {
778
782
  className?: string;
779
783
  }
780
784
  /** Visible strings of a DataTable, overridable per locale. */
781
- export interface DataTableLabels { empty?: string; emptyHint?: string; loading?: string; error?: string; errorHint?: string; retry?: string; selectAll?: string; selectRow?: string; actions?: string; sortedAsc?: string; sortedDesc?: string; edit?: string; }
782
- /** Dense record grid for agents, runs, approvals and tenants: sortable columns, selection with select-all, inline cell edit, row actions, sticky header, and the states error → loading → empty → rows. Rows are 32px compact and 44px comfortable. */
785
+ export interface DataTableLabels { empty?: string; emptyHint?: string; loading?: string; error?: string; errorHint?: string; retry?: string; selectAll?: string; selectRow?: string; actions?: string; sortedAsc?: string; sortedDesc?: string; edit?: string; /** aria-label of the row-detail toggle while closed */ expandRow?: string; /** aria-label of the row-detail toggle while open */ collapseRow?: string; }
786
+ /** Dense record grid for agents, runs, approvals and tenants: sortable columns, selection with select-all, inline cell edit, row actions, sticky header, and the states error → loading → empty → rows. Rows are 32px compact and 44px comfortable. At narrow widths it hides columns by `priority` against its own measured width and can pin the first column (`stickyFirst`). */
783
787
  export interface DataTableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'selected' | 'value'> {
784
788
  columns: DataColumn<T>[];
785
789
  rows: T[];
@@ -824,6 +828,10 @@ export interface DataTableProps<T = any> extends Omit<React.HTMLAttributes<HTMLD
824
828
  rowClassName?: (row: T, index: number) => string | false | undefined;
825
829
  /** Key of the row whose detail is open (side panel, split view): aria-current, --selection ground and a --signal edge. Independent of `selected` */
826
830
  activeKey?: string | number | null;
831
+ /** First data column (and the selection column) stays put while the table scrolls sideways, with a hairline shadow once scrolled */
832
+ stickyFirst?: boolean;
833
+ /** Called with the keys of the columns hidden by `priority` whenever that set changes ([] when all fit) */
834
+ onHiddenColumnsChange?: (keys: string[]) => void;
827
835
  }
828
836
  export declare function DataTable<T = any>(props: DataTableProps<T>): JSX.Element;
829
837
 
@@ -1809,6 +1817,40 @@ export interface StepperProps extends Omit<React.HTMLAttributes<HTMLOListElement
1809
1817
  }
1810
1818
  export declare function Stepper(props: StepperProps): JSX.Element;
1811
1819
 
1820
+ /** One view in an ActivityBar. */
1821
+ export interface ActivityBarItem {
1822
+ /** Value passed to onSelect and matched against `active` */
1823
+ id: string;
1824
+ /** Lucide icon name (kebab-case), or a node such as <ProductIcon product="code" size={20} /> */
1825
+ icon: string | React.ReactNode;
1826
+ /** Accessible name and tooltip text */
1827
+ label: string;
1828
+ /** Small count Badge on the icon (a number, or a short word) */
1829
+ badge?: number | string;
1830
+ /** Shown dimmed, skipped by the arrow keys, not selectable */
1831
+ disabled?: boolean;
1832
+ /** id of the view panel this item opens (sets aria-controls) */
1833
+ controls?: string;
1834
+ /** id for the tab button, so the panel can point back with aria-labelledby */
1835
+ tabId?: string;
1836
+ }
1837
+ /** Vertical 48px icon strip that switches the view beside it, like VS Code's activity bar or IntelliJ's tool-window bar: use it in IDE mocks and the web build of the Code panel. A vertical tablist with roving focus (↑ ↓ Home End, Enter or Space selects), tooltips with each label, a 2px --signal bar on the edge facing the view. */
1838
+ export interface ActivityBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
1839
+ /** Top group of views */
1840
+ items: ActivityBarItem[];
1841
+ /** Bottom group (accounts, settings), pushed to the foot of the bar */
1842
+ footerItems?: ActivityBarItem[];
1843
+ /** id of the selected item */
1844
+ active?: string;
1845
+ /** Called with the id and item when an item is clicked or chosen with Enter / Space */
1846
+ onSelect?: (id: string, item: ActivityBarItem) => void;
1847
+ /** Which side of the view the bar sits on; the active bar and the --line edge face the view (default left) */
1848
+ side?: 'left' | 'right';
1849
+ /** aria-label of the tablist (default "Views") */
1850
+ labels?: { navigation?: string };
1851
+ }
1852
+ export declare function ActivityBar(props: ActivityBarProps): JSX.Element;
1853
+
1812
1854
  // --- feedback ---
1813
1855
  /** The brand loader: the Aginies mark animated with CSS keyframes only. Use it wherever the product itself is working (boot, page data, an agent run); use Spinner for a single control. */
1814
1856
  export interface AginiesLoaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'label'> {
package/dist/index.d.ts CHANGED
@@ -763,8 +763,12 @@ export interface DataColumn<T = any> {
763
763
  sortValue?: (row: T) => any;
764
764
  /** right for numbers and amounts */
765
765
  align?: 'left' | 'right' | 'center';
766
+ /** Column width; also the room it needs when `minWidth` is absent (px numbers count for priority hiding) */
766
767
  width?: number | string;
768
+ /** Narrowest width the column may take; priority hiding sums these (default 120px) */
767
769
  minWidth?: number | string;
770
+ /** DataTable only: 1 = always shown (default), higher numbers hide first when the table's own width cannot fit every column */
771
+ priority?: number;
768
772
  /** Custom cell; receives (value, row, index) */
769
773
  render?: (value: any, row: T, index: number) => React.ReactNode;
770
774
  /** Inline edit on double-click, F2 or the pencil (needs onCellEdit) */
@@ -778,8 +782,8 @@ export interface DataColumn<T = any> {
778
782
  className?: string;
779
783
  }
780
784
  /** Visible strings of a DataTable, overridable per locale. */
781
- export interface DataTableLabels { empty?: string; emptyHint?: string; loading?: string; error?: string; errorHint?: string; retry?: string; selectAll?: string; selectRow?: string; actions?: string; sortedAsc?: string; sortedDesc?: string; edit?: string; }
782
- /** Dense record grid for agents, runs, approvals and tenants: sortable columns, selection with select-all, inline cell edit, row actions, sticky header, and the states error → loading → empty → rows. Rows are 32px compact and 44px comfortable. */
785
+ export interface DataTableLabels { empty?: string; emptyHint?: string; loading?: string; error?: string; errorHint?: string; retry?: string; selectAll?: string; selectRow?: string; actions?: string; sortedAsc?: string; sortedDesc?: string; edit?: string; /** aria-label of the row-detail toggle while closed */ expandRow?: string; /** aria-label of the row-detail toggle while open */ collapseRow?: string; }
786
+ /** Dense record grid for agents, runs, approvals and tenants: sortable columns, selection with select-all, inline cell edit, row actions, sticky header, and the states error → loading → empty → rows. Rows are 32px compact and 44px comfortable. At narrow widths it hides columns by `priority` against its own measured width and can pin the first column (`stickyFirst`). */
783
787
  export interface DataTableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'selected' | 'value'> {
784
788
  columns: DataColumn<T>[];
785
789
  rows: T[];
@@ -824,6 +828,10 @@ export interface DataTableProps<T = any> extends Omit<React.HTMLAttributes<HTMLD
824
828
  rowClassName?: (row: T, index: number) => string | false | undefined;
825
829
  /** Key of the row whose detail is open (side panel, split view): aria-current, --selection ground and a --signal edge. Independent of `selected` */
826
830
  activeKey?: string | number | null;
831
+ /** First data column (and the selection column) stays put while the table scrolls sideways, with a hairline shadow once scrolled */
832
+ stickyFirst?: boolean;
833
+ /** Called with the keys of the columns hidden by `priority` whenever that set changes ([] when all fit) */
834
+ onHiddenColumnsChange?: (keys: string[]) => void;
827
835
  }
828
836
  export declare function DataTable<T = any>(props: DataTableProps<T>): JSX.Element;
829
837
 
@@ -1809,6 +1817,40 @@ export interface StepperProps extends Omit<React.HTMLAttributes<HTMLOListElement
1809
1817
  }
1810
1818
  export declare function Stepper(props: StepperProps): JSX.Element;
1811
1819
 
1820
+ /** One view in an ActivityBar. */
1821
+ export interface ActivityBarItem {
1822
+ /** Value passed to onSelect and matched against `active` */
1823
+ id: string;
1824
+ /** Lucide icon name (kebab-case), or a node such as <ProductIcon product="code" size={20} /> */
1825
+ icon: string | React.ReactNode;
1826
+ /** Accessible name and tooltip text */
1827
+ label: string;
1828
+ /** Small count Badge on the icon (a number, or a short word) */
1829
+ badge?: number | string;
1830
+ /** Shown dimmed, skipped by the arrow keys, not selectable */
1831
+ disabled?: boolean;
1832
+ /** id of the view panel this item opens (sets aria-controls) */
1833
+ controls?: string;
1834
+ /** id for the tab button, so the panel can point back with aria-labelledby */
1835
+ tabId?: string;
1836
+ }
1837
+ /** Vertical 48px icon strip that switches the view beside it, like VS Code's activity bar or IntelliJ's tool-window bar: use it in IDE mocks and the web build of the Code panel. A vertical tablist with roving focus (↑ ↓ Home End, Enter or Space selects), tooltips with each label, a 2px --signal bar on the edge facing the view. */
1838
+ export interface ActivityBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
1839
+ /** Top group of views */
1840
+ items: ActivityBarItem[];
1841
+ /** Bottom group (accounts, settings), pushed to the foot of the bar */
1842
+ footerItems?: ActivityBarItem[];
1843
+ /** id of the selected item */
1844
+ active?: string;
1845
+ /** Called with the id and item when an item is clicked or chosen with Enter / Space */
1846
+ onSelect?: (id: string, item: ActivityBarItem) => void;
1847
+ /** Which side of the view the bar sits on; the active bar and the --line edge face the view (default left) */
1848
+ side?: 'left' | 'right';
1849
+ /** aria-label of the tablist (default "Views") */
1850
+ labels?: { navigation?: string };
1851
+ }
1852
+ export declare function ActivityBar(props: ActivityBarProps): JSX.Element;
1853
+
1812
1854
  // --- feedback ---
1813
1855
  /** The brand loader: the Aginies mark animated with CSS keyframes only. Use it wherever the product itself is working (boot, page data, an agent run); use Spinner for a single control. */
1814
1856
  export interface AginiesLoaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'label'> {