@aic-kits/react 0.36.0 → 0.36.1

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.
@@ -0,0 +1,2 @@
1
+ import { SelectSearchProps } from './types';
2
+ export declare const SelectSearch: <T extends string | number>({ options, value, onChange, placeholder, label, helperText, error, disabled, variant, color: colorProp, size: sizeProp, corner: cornerProp, borderRadius: borderRadiusProp, bgColor: bgColorProp, style, "data-testid": testId, onSearchTermChange, searchPlaceholder, }: SelectSearchProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { SelectSize } from '../../theme/components/select';
3
+ import { SelectOption } from '../Select/types';
4
+ interface SelectSearchDropdownProps<T extends string | number> {
5
+ anchorRef: React.RefObject<HTMLDivElement | null>;
6
+ isOpen: boolean;
7
+ options: SelectOption<T>[];
8
+ onSelect: (option: SelectOption<T>) => void;
9
+ selectedValue?: T;
10
+ onClose: () => void;
11
+ size: SelectSize;
12
+ borderRadius: string;
13
+ searchTerm: string;
14
+ }
15
+ export declare function SelectSearchDropdown<T extends string | number>({ anchorRef, isOpen, options, onSelect, selectedValue, onClose, size, borderRadius, searchTerm, }: SelectSearchDropdownProps<T>): import("react/jsx-runtime").JSX.Element | null;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './SelectSearch';
2
+ export * from './types';
@@ -0,0 +1,15 @@
1
+ import { SelectProps } from '../Select';
2
+ export interface SelectSearchProps<T extends string | number> extends Omit<SelectProps<T>, 'searchable'> {
3
+ /**
4
+ * Callback fired when the search term changes.
5
+ * The parent should use this to filter the options array
6
+ * (client-side, server-side, debounced API call, etc.)
7
+ * and pass the filtered result back via the `options` prop.
8
+ */
9
+ onSearchTermChange?: (searchTerm: string) => void;
10
+ /**
11
+ * Placeholder text shown in the search input when the dropdown is open.
12
+ * @default 'Search...'
13
+ */
14
+ searchPlaceholder?: string;
15
+ }
@@ -1,4 +1,7 @@
1
- export declare const StyledTable: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
1
+ export interface StyledTableProps {
2
+ $minWidth?: string | number;
3
+ }
4
+ export declare const StyledTable: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, StyledTableProps>> & string;
2
5
  export declare const StyledTableHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
3
6
  export declare const StyledTableBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
4
7
  export declare const StyledTableFooter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
@@ -27,3 +30,4 @@ export interface StyledInlineCellProps {
27
30
  export declare const StyledInlineCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, StyledInlineCellProps>> & string;
28
31
  export declare const StyledCellPreformatted: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLPreElement>, HTMLPreElement>, never>> & string;
29
32
  export declare const StyledNoDataCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
33
+ export declare const StyledTableWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -2,4 +2,4 @@ import { default as React } from 'react';
2
2
  import { TableProps } from './types';
3
3
  export declare function Table<T extends {
4
4
  id: string | number;
5
- }>({ data, columns: allColumns, onAdd, onEdit, onDelete, onView, renderExpandedRow, onSelectedItemChange, title, addButtonText, deleteButtonText, confirmDeleteMessage, noDataMessage, total, currentPage, pageSize, pageSizeOptions, sortBy, sortDirection, onPaginationChange, isLoading, filters, onFiltersChange, showFilterBuilder, onFieldChange, expandable, error, }: TableProps<T>): React.ReactElement;
5
+ }>({ data, columns: allColumns, onAdd, onEdit, onDelete, onView, renderExpandedRow, onSelectedItemChange, title, addButtonText, deleteButtonText, confirmDeleteMessage, noDataMessage, total, currentPage, pageSize, pageSizeOptions, sortBy, sortDirection, onPaginationChange, isLoading, filters, onFiltersChange, showFilterBuilder, onFieldChange, expandable, error, minWidth, }: TableProps<T>): React.ReactElement;
@@ -76,7 +76,7 @@ export type ColumnType = 'text' | 'number' | 'email' | 'date' | 'select' | 'link
76
76
  /**
77
77
  * Filter type definitions
78
78
  */
79
- export type FilterType = 'text' | 'number' | 'date' | 'select' | 'checkboxes' | 'boolean' | 'none' | 'inlinemultiselect' | 'inlinepairselect';
79
+ export type FilterType = 'text' | 'number' | 'date' | 'select' | 'searchSelect' | 'checkboxes' | 'boolean' | 'none' | 'inlinemultiselect' | 'inlinepairselect';
80
80
  /**
81
81
  * Column definition for table
82
82
  */
@@ -106,6 +106,10 @@ export interface Column<T> {
106
106
  label: string;
107
107
  }[];
108
108
  pairOptions?: InlinePairSelectConfig;
109
+ /** Callback fired when the search term changes in a searchSelect filter */
110
+ onSearchTermChange?: (term: string) => void;
111
+ /** Placeholder for the search input in a searchSelect filter */
112
+ searchPlaceholder?: string;
109
113
  flex?: number | string;
110
114
  truncate?: boolean;
111
115
  href?: (item: T) => string;
@@ -172,6 +176,8 @@ export interface TableProps<T extends {
172
176
  expandable?: boolean;
173
177
  /** Error message displayed as a banner above the table */
174
178
  error?: string | null;
179
+ /** Minimum width to force horizontal scrolling container behavior */
180
+ minWidth?: string | number;
175
181
  }
176
182
  /**
177
183
  * AccordionRow component props
@@ -18,6 +18,7 @@ export * from './Tag';
18
18
  export * from './Checkbox';
19
19
  export * from './Radio';
20
20
  export * from './Select';
21
+ export * from './SelectSearch';
21
22
  export * from './Switch';
22
23
  export * from './Grid';
23
24
  export * from './Pagination';