@selectwin/kit 0.1.2 → 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.
- package/dist/SelectDataTable.d.ts +5 -1
- package/dist/SelectTable.d.ts +4 -0
- package/dist/index.js +2051 -2049
- package/dist/style.css +1 -1
- package/package.json +61 -61
|
@@ -40,7 +40,7 @@ export interface SelectDataColumn<T> {
|
|
|
40
40
|
* guards mirror SelectMoney — storage unavailable = in-memory only.
|
|
41
41
|
*/
|
|
42
42
|
export declare function useSelectPageSize(key: string, fallback: number, options?: number[]): [number, (size: number) => void];
|
|
43
|
-
export declare function SelectDataTable<T>({ columns, items, getId, loading, empty, pagination, onRowClick, title, action, columnsKey, }: {
|
|
43
|
+
export declare function SelectDataTable<T>({ columns, items, getId, loading, empty, pagination, onRowClick, title, action, filters, columnsKey, }: {
|
|
44
44
|
columns: SelectDataColumn<T>[];
|
|
45
45
|
items: T[];
|
|
46
46
|
getId: (item: T) => string;
|
|
@@ -89,6 +89,10 @@ export declare function SelectDataTable<T>({ columns, items, getId, loading, emp
|
|
|
89
89
|
title?: ReactNode;
|
|
90
90
|
/** Right-aligned header action (e.g. an "Adicionar" button). */
|
|
91
91
|
action?: ReactNode;
|
|
92
|
+
/** Filter controls (e.g. a SelectFilterBar) embedded in the table's header bar, left of
|
|
93
|
+
* the action/column picker — table + filters read as ONE unit, and the bar stays
|
|
94
|
+
* reachable when a filter empties the table. */
|
|
95
|
+
filters?: ReactNode;
|
|
92
96
|
/**
|
|
93
97
|
* Enables the column-visibility picker (a gear in the header bar) and persists the
|
|
94
98
|
* hidden set in localStorage under this key — use a stable per-table slug (e.g.
|
package/dist/SelectTable.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ type SelectTableOwnProps = {
|
|
|
19
19
|
title?: ReactNode;
|
|
20
20
|
/** Right-aligned action in the header bar (e.g. an "Adicionar" button). */
|
|
21
21
|
action?: ReactNode;
|
|
22
|
+
/** Filter controls (e.g. a SelectFilterBar) embedded in the header bar, left of the
|
|
23
|
+
* action — the table and its filters read as ONE unit. The bar stays visible when a
|
|
24
|
+
* filter empties the table (clearing the filter must remain reachable). */
|
|
25
|
+
filters?: ReactNode;
|
|
22
26
|
};
|
|
23
27
|
export type SelectTableProps = SelectTableOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableOwnProps>;
|
|
24
28
|
export declare const SelectTable: import('react').ForwardRefExoticComponent<SelectTableOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|