@optimum-intelligence/opti-ui 0.8.0 → 0.8.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.
- package/CHANGELOG.md +58 -0
- package/README.md +3 -3
- package/dist/components/app-shell/AppShell.d.ts +6 -1
- package/dist/components/app-shell/AppShell.js +99 -94
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +6 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +42 -40
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +1 -1
- package/dist/components/combobox/Combobox.js +38 -29
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +13 -4
- package/dist/components/command-palette/CommandPalette.js +91 -89
- package/dist/components/command-palette/CommandPalette.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +34 -12
- package/dist/components/data-table/DataTable.js +401 -250
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +7 -1
- package/dist/components/data-table/DataTableContent.js +246 -210
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +1 -1
- package/dist/components/data-table/DataTableFilters.js +24 -23
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/layout.d.ts +5 -0
- package/dist/components/data-table/layout.js +23 -1
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +22 -0
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +367 -335
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/progress/Progress.d.ts +2 -1
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/stat-card/StatCard.d.ts +7 -2
- package/dist/components/stat-card/StatCard.js +1 -1
- package/dist/components/stat-card/StatCard.js.map +1 -1
- package/dist/components.json +102 -15
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +12 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/labels/Labels.d.ts +9 -1
- package/dist/labels/Labels.js +4 -0
- package/dist/labels/Labels.js.map +1 -1
- package/dist/labels/hu.d.ts +17 -0
- package/dist/labels/hu.js +124 -0
- package/dist/labels/hu.js.map +1 -0
- package/dist/llms-full.txt +52 -13
- package/dist/llms.txt +2 -1
- package/dist/opti-ui.css +171 -40
- package/package.json +1 -1
|
@@ -36,11 +36,24 @@ export interface DataTableFilterSheetProps {
|
|
|
36
36
|
children?: React.ReactNode;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* The phone toolbar's
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* The phone toolbar's filter button: an icon with the number of active filters, so the search next to it
|
|
40
|
+
* keeps the width. It opens a bottom sheet holding every filter and the `children`. Filters apply as they
|
|
41
|
+
* change. The footer keeps a clear button (disabled while no filter is set, so nothing moves when one is)
|
|
42
|
+
* and a button that closes the sheet on the result count.
|
|
42
43
|
*/
|
|
43
44
|
declare function DataTableFilterSheet({ size, children }: DataTableFilterSheetProps): React.JSX.Element | null;
|
|
45
|
+
export interface DataTableColumnsMenuProps {
|
|
46
|
+
/** Height of the button. */
|
|
47
|
+
size?: DataTableControlSize;
|
|
48
|
+
/** Class name for the button. */
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Icon button with a menu of checkboxes that show or hide columns. Columns with `hidden` or
|
|
53
|
+
* `hideable: false` are not listed. The choice is in `table.hiddenColumns`; keep it across visits with
|
|
54
|
+
* `hiddenColumns` and `onHiddenColumnsChange`.
|
|
55
|
+
*/
|
|
56
|
+
declare function DataTableColumnsMenu({ size, className }: DataTableColumnsMenuProps): React.JSX.Element | null;
|
|
44
57
|
export interface DataTableToolbarContext<T> {
|
|
45
58
|
/** Rows after filters, search and sorting, across all pages. In server mode: the current page. */
|
|
46
59
|
rows: T[];
|
|
@@ -49,21 +62,28 @@ export interface DataTableToolbarContext<T> {
|
|
|
49
62
|
/** The whole table: filter values, sort, setters. */
|
|
50
63
|
table: DataTableInstance<T>;
|
|
51
64
|
}
|
|
52
|
-
export interface DataTableProps<T> extends UseDataTableOptions<T>, DataTableContentProps {
|
|
65
|
+
export interface DataTableProps<T> extends UseDataTableOptions<T>, Omit<DataTableContentProps, 'selectionActions'> {
|
|
53
66
|
/** Choices in the rows-per-page select. */
|
|
54
67
|
pageSizeOptions?: number[];
|
|
55
68
|
/** Size of the search box and the filters. */
|
|
56
69
|
controlSize?: DataTableControlSize;
|
|
57
|
-
/** Extra toolbar content (add,
|
|
70
|
+
/** Extra toolbar content (add, import…). A function receives the processed rows. */
|
|
58
71
|
toolbar?: React.ReactNode | ((context: DataTableToolbarContext<T>) => React.ReactNode);
|
|
72
|
+
/**
|
|
73
|
+
* Actions on the selected rows. While rows are selected, the header row shows their count, a clear
|
|
74
|
+
* button and these actions in place of the column names. Needs `onSelectionChange`.
|
|
75
|
+
*/
|
|
76
|
+
bulkActions?: (context: DataTableToolbarContext<T>) => React.ReactNode;
|
|
77
|
+
/** Adds an icon button whose menu shows and hides columns (`DataTable.ColumnsMenu`). */
|
|
78
|
+
columnsMenu?: boolean;
|
|
59
79
|
/**
|
|
60
80
|
* `false` drops the search, filters, row count and toolbar content: rows only, for short tables under
|
|
61
|
-
* their own heading. The toolbar holds the search,
|
|
62
|
-
*
|
|
63
|
-
* and export on the right. Active filters from the panel show
|
|
64
|
-
* the footer: the pagination's range, or a count when the table
|
|
65
|
-
* Below 640px the toolbar is one line: the search, a
|
|
66
|
-
* filter and the `toolbar` content, and export.
|
|
81
|
+
* their own heading. The toolbar holds the search, a "Filters (n)" button whose panel holds the filters
|
|
82
|
+
* that are not `quick`, the `quick` filters and a clear button on the left; the loading spinner,
|
|
83
|
+
* `toolbar` content, columns menu and export on the right. Active filters from the panel show
|
|
84
|
+
* as tags under it. The row count sits in the footer: the pagination's range, or a count when the table
|
|
85
|
+
* is not paginated. Below 640px the toolbar is one line: the search, a filter icon button whose bottom
|
|
86
|
+
* sheet holds every filter and the `toolbar` content, and export.
|
|
67
87
|
*/
|
|
68
88
|
showToolbar?: boolean;
|
|
69
89
|
/**
|
|
@@ -79,7 +99,7 @@ export interface DataTableProps<T> extends UseDataTableOptions<T>, DataTableCont
|
|
|
79
99
|
/** Class name for the table's root element. */
|
|
80
100
|
className?: string;
|
|
81
101
|
}
|
|
82
|
-
declare function DataTableComponent<T>({ density, striped, stickyHeader, layout, maxHeight, virtualized, onEndReached, stickyFirstColumn, empty, tableProps, pageSizeOptions, controlSize, toolbar, showToolbar, exportName, fill, className, ...options }: DataTableProps<T>): React.JSX.Element;
|
|
102
|
+
declare function DataTableComponent<T>({ density, striped, stickyHeader, layout, maxHeight, virtualized, onEndReached, stickyFirstColumn, empty, tableProps, pageSizeOptions, controlSize, toolbar, bulkActions, columnsMenu, showToolbar, exportName, fill, className, ...options }: DataTableProps<T>): React.JSX.Element;
|
|
83
103
|
/**
|
|
84
104
|
* `<DataTable data={…} columns={…} />` renders a complete table with search,
|
|
85
105
|
* filters, sorting, pagination, row selection, row actions and inline editing;
|
|
@@ -94,6 +114,7 @@ declare function DataTableComponent<T>({ density, striped, stickyHeader, layout,
|
|
|
94
114
|
* (the "Filters" button and panel for the other filters),
|
|
95
115
|
* `DataTable.ActiveFilters` (their tags), `DataTable.FilterSheet` (the phone
|
|
96
116
|
* filter button and sheet), `DataTable.ClearFilters`, `DataTable.Actions`,
|
|
117
|
+
* `DataTable.ColumnsMenu`,
|
|
97
118
|
* `DataTable.Loading`, `DataTable.Summary`, `DataTable.Content`,
|
|
98
119
|
* `DataTable.Pagination`.
|
|
99
120
|
*
|
|
@@ -121,6 +142,7 @@ export declare const DataTable: typeof DataTableComponent & {
|
|
|
121
142
|
displayName: string;
|
|
122
143
|
};
|
|
123
144
|
ClearFilters: typeof DataTableClearFilters;
|
|
145
|
+
ColumnsMenu: typeof DataTableColumnsMenu;
|
|
124
146
|
Loading: typeof DataTableLoading;
|
|
125
147
|
Summary: typeof DataTableSummary;
|
|
126
148
|
Content: typeof DataTableContent;
|