@ssa-ui-kit/core 3.26.4 → 3.27.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/dist/ai/source-map.md +107 -37
- package/dist/components/Calendar/Calendar.d.ts +11 -3
- package/dist/components/Calendar/CalendarContext.d.ts +12 -1
- package/dist/components/Calendar/components/CalendarToolbar.d.ts +5 -1
- package/dist/components/Calendar/components/DayView.d.ts +4 -2
- package/dist/components/Calendar/components/TimeZoneSelect.d.ts +14 -0
- package/dist/components/Calendar/consts.d.ts +14 -1
- package/dist/components/Calendar/styles.d.ts +37 -1
- package/dist/components/Calendar/types.d.ts +93 -5
- package/dist/components/Calendar/utils.d.ts +35 -5
- package/dist/components/DataTable/DataTable.d.ts +79 -0
- package/dist/components/DataTable/DataTableColumnPicker.d.ts +66 -0
- package/dist/components/DataTable/ExpanderCell.d.ts +10 -0
- package/dist/components/DataTable/SelectionCell.d.ts +25 -0
- package/dist/components/DataTable/index.d.ts +4 -0
- package/dist/components/DataTable/styles.d.ts +47 -0
- package/dist/components/DataTable/types.d.ts +378 -0
- package/dist/components/DataTable/useColumnReorder.d.ts +31 -0
- package/dist/components/DataTable/useDataTableModel.d.ts +36 -0
- package/dist/components/DataTable/utils.d.ts +82 -0
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/types.d.ts +34 -0
- package/dist/components/DropdownOption/DropdownOption.d.ts +5 -0
- package/dist/components/DropdownOptions/DropdownSearch.d.ts +25 -0
- package/dist/components/DropdownOptions/useToggleListKeys.d.ts +13 -7
- package/dist/components/DropdownOptions/utils.d.ts +7 -0
- package/dist/components/DropdownToggle/types.d.ts +2 -0
- package/dist/components/MultipleDropdown/types.d.ts +25 -0
- package/dist/components/NestedTable/WithNestedTableRow.d.ts +4 -0
- package/dist/components/NestedTable/components/NestedTable.d.ts +4 -0
- package/dist/components/NestedTable/components/NestedTableCell.d.ts +4 -0
- package/dist/components/NestedTable/components/NestedTableCellHeader.d.ts +4 -0
- package/dist/components/NestedTable/components/NestedTableRow.d.ts +4 -0
- package/dist/components/Table/ColumnFreezeMenu.d.ts +11 -1
- package/dist/components/Table/ColumnMenu.d.ts +30 -0
- package/dist/components/Table/Table.d.ts +4 -4
- package/dist/components/Table/types.d.ts +77 -6
- package/dist/components/TableCellHeader/TableCellHeader.d.ts +1 -1
- package/dist/components/TableCellHeader/types.d.ts +14 -5
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +2932 -600
- package/dist/index.mjs +2932 -601
- package/dist/tsbuildcache +1 -1
- package/package.json +6 -5
|
@@ -5,6 +5,8 @@ import { ControlledButtonProps } from '../Dropdown/types';
|
|
|
5
5
|
export interface DropdownToggleProps extends CommonProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, ControlledButtonProps> {
|
|
6
6
|
/** Emotion css prop forwarded to the underlying styled button */
|
|
7
7
|
css?: Interpolation<Theme>;
|
|
8
|
+
/** Ref to the button, e.g. to return focus to it. */
|
|
9
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
8
10
|
onClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
9
11
|
onFocus?: (e: React.FocusEvent<HTMLButtonElement, Element>) => void;
|
|
10
12
|
isOpen: boolean;
|
|
@@ -98,6 +98,27 @@ export type DropdownProps<P extends DropdownOptionProps> = {
|
|
|
98
98
|
* matching the behaviour of previous versions.
|
|
99
99
|
*/
|
|
100
100
|
width?: string | number;
|
|
101
|
+
/**
|
|
102
|
+
* Adds a search box above the open list. Typing filters the options by
|
|
103
|
+
* their text (case-insensitive, anywhere in the text); a group stays while
|
|
104
|
+
* any of its options match. Options whose `children` is markup are matched
|
|
105
|
+
* by their `textValue`. Selections outside the current search are kept.
|
|
106
|
+
*
|
|
107
|
+
* Focus moves to the search box on open and keeps driving the list: arrows
|
|
108
|
+
* move the highlight, Enter toggles, Escape clears the search, then closes.
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
searchable?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Placeholder and accessible name of the search box.
|
|
114
|
+
* @default 'Search'
|
|
115
|
+
*/
|
|
116
|
+
searchPlaceholder?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Shown in the list when nothing matches the search.
|
|
119
|
+
* @default 'No results found'
|
|
120
|
+
*/
|
|
121
|
+
searchEmptyState?: React.ReactNode;
|
|
101
122
|
};
|
|
102
123
|
/**
|
|
103
124
|
* Context value shared with child DropdownOption components via MultipleDropdownContext
|
|
@@ -127,4 +148,8 @@ export interface DropdownContextType<T extends DropdownOptionProps> {
|
|
|
127
148
|
* Updates the highlighted option
|
|
128
149
|
*/
|
|
129
150
|
setActiveValue?: (value: string | number | null) => void;
|
|
151
|
+
/** The list sits in the search card, which does the positioning. */
|
|
152
|
+
searchable?: boolean;
|
|
153
|
+
/** Shown when the list has no options. */
|
|
154
|
+
emptyState?: React.ReactNode;
|
|
130
155
|
}
|
|
@@ -12,6 +12,10 @@ import { WithNestedTableRowProps } from './types';
|
|
|
12
12
|
* and ignores `defaultCollapsed` — otherwise it could start collapsed with no
|
|
13
13
|
* way to reopen it.
|
|
14
14
|
*
|
|
15
|
+
* @deprecated Use `DataTable` with `getSubRows` instead: it nests rows from
|
|
16
|
+
* data, to any depth, with accessible expand buttons. `NestedTable` is
|
|
17
|
+
* removed in the next major release.
|
|
18
|
+
*
|
|
15
19
|
* @category Components
|
|
16
20
|
* @subcategory Data Display
|
|
17
21
|
*
|
|
@@ -39,6 +39,10 @@ import { TableProps } from '../../Table/types';
|
|
|
39
39
|
* opaque one — a translucent row would let scrolled content show through.
|
|
40
40
|
* With resizing on, the table renders its own `colgroup`; drop any you had.
|
|
41
41
|
*
|
|
42
|
+
* @deprecated Use `DataTable` with `getSubRows` instead: it nests rows from
|
|
43
|
+
* data, to any depth, with accessible expand buttons. `NestedTable` is
|
|
44
|
+
* removed in the next major release.
|
|
45
|
+
*
|
|
42
46
|
* @category Components
|
|
43
47
|
* @subcategory Data Display
|
|
44
48
|
*
|
|
@@ -15,6 +15,10 @@ import { NestedTableCellBaseProps } from './NestedTableCellBase';
|
|
|
15
15
|
* Borders and background are cleared so the group reads as one block; the row
|
|
16
16
|
* supplies the shading.
|
|
17
17
|
*
|
|
18
|
+
* @deprecated Use `DataTable` with `getSubRows` instead: it nests rows from
|
|
19
|
+
* data, to any depth, with accessible expand buttons. `NestedTable` is
|
|
20
|
+
* removed in the next major release.
|
|
21
|
+
*
|
|
18
22
|
* @category Components
|
|
19
23
|
* @subcategory Data Display
|
|
20
24
|
*
|
|
@@ -12,6 +12,10 @@ import { NestedTableCellHeaderProps } from '../types';
|
|
|
12
12
|
* toggle column the row adds in front gets no handle or menu, and does not
|
|
13
13
|
* count as a column — `0` is the first header cell you render.
|
|
14
14
|
*
|
|
15
|
+
* @deprecated Use `DataTable` with `getSubRows` instead: it nests rows from
|
|
16
|
+
* data, to any depth, with accessible expand buttons. `NestedTable` is
|
|
17
|
+
* removed in the next major release.
|
|
18
|
+
*
|
|
15
19
|
* @category Components
|
|
16
20
|
* @subcategory Data Display
|
|
17
21
|
*
|
|
@@ -17,6 +17,10 @@ import { HTMLAttributes } from 'react';
|
|
|
17
17
|
* it collapses or expands the rest of the group. Later rows are the collapsible
|
|
18
18
|
* body. A group holding only one row shows no toggle and never collapses.
|
|
19
19
|
*
|
|
20
|
+
* @deprecated Use `DataTable` with `getSubRows` instead: it nests rows from
|
|
21
|
+
* data, to any depth, with accessible expand buttons. `NestedTable` is
|
|
22
|
+
* removed in the next major release.
|
|
23
|
+
*
|
|
20
24
|
* @category Components
|
|
21
25
|
* @subcategory Data Display
|
|
22
26
|
*
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import { ColumnFreezeMenuProps } from './types';
|
|
1
|
+
import { ColumnFreezeMenuProps, ColumnId, FrozenColumns } from './types';
|
|
2
|
+
/** Which edge a column is frozen to, if any. */
|
|
3
|
+
export declare const getFrozenEdge: ({ start, end }: Required<FrozenColumns>, id: ColumnId) => "start" | "end" | null;
|
|
4
|
+
/**
|
|
5
|
+
* The freeze actions for one column's header menu, each with the frozen
|
|
6
|
+
* columns it leads to. Shared by `ColumnFreezeMenu` and `DataTable`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getFreezeMenuItems: (frozen: Required<FrozenColumns>, id: ColumnId) => {
|
|
9
|
+
label: string;
|
|
10
|
+
next: Required<FrozenColumns>;
|
|
11
|
+
}[];
|
|
2
12
|
/**
|
|
3
13
|
* ColumnFreezeMenu - The freeze/unfreeze menu in a table header cell
|
|
4
14
|
*
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
/** Where a column menu sits in its header cell. */
|
|
3
|
+
export declare const ColumnMenuAnchor: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
7
|
+
/** One action of a {@link ColumnMenu}. */
|
|
8
|
+
export interface ColumnMenuItem {
|
|
9
|
+
label: string;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ColumnMenuProps {
|
|
14
|
+
items: ColumnMenuItem[];
|
|
15
|
+
/** Accessible name of the menu. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Accessible name of the trigger button. */
|
|
18
|
+
triggerLabel: string;
|
|
19
|
+
/** Shows the lock icon, and keeps the trigger visible. */
|
|
20
|
+
frozen?: boolean;
|
|
21
|
+
ref?: Ref<HTMLSpanElement>;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The menu button of a table header cell: a trigger that shows on hover and
|
|
26
|
+
* opens a list of actions. `ColumnFreezeMenu` and `DataTable`'s column menu
|
|
27
|
+
* are both built on it.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ColumnMenu: ({ items, label, triggerLabel, frozen, ref, className, }: ColumnMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -23,10 +23,10 @@ import { TableProps } from './types';
|
|
|
23
23
|
* it would have had anyway, then switches to `table-layout: fixed` and
|
|
24
24
|
* truncates overflowing cell content with an ellipsis.
|
|
25
25
|
*
|
|
26
|
-
* By default a resize is
|
|
27
|
-
*
|
|
28
|
-
* it was and nothing around it reflows. The last column has
|
|
29
|
-
* right to trade with, so it has no handle.
|
|
26
|
+
* By default a resize is paid for by the columns to the right: they give up
|
|
27
|
+
* what the dragged column gains, each in proportion to its width, so the table
|
|
28
|
+
* stays the width it was and nothing around it reflows. The last column has
|
|
29
|
+
* nothing to its right to trade with, so it has no handle.
|
|
30
30
|
*
|
|
31
31
|
* `columnResizeMode="expand"` opts into the other model — the table grows
|
|
32
32
|
* with the dragged column and the others keep their widths — for tables that
|
|
@@ -3,9 +3,10 @@ import { CommonProps } from '../../types/emotion';
|
|
|
3
3
|
/**
|
|
4
4
|
* How a resize distributes width.
|
|
5
5
|
*
|
|
6
|
-
* - `fit` — the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* - `fit` — the resizable columns to the right share out what the dragged
|
|
7
|
+
* column gains or gives up, each in proportion to its width, so the table's
|
|
8
|
+
* own width never changes. The last column cannot be dragged, having nothing
|
|
9
|
+
* to its right to trade with.
|
|
9
10
|
* - `expand` — the table grows and the other columns keep their widths, so the
|
|
10
11
|
* table needs a horizontally scrollable parent.
|
|
11
12
|
*/
|
|
@@ -41,8 +42,8 @@ export interface ColumnResizeOptions {
|
|
|
41
42
|
*/
|
|
42
43
|
maxColumnWidth?: number;
|
|
43
44
|
/**
|
|
44
|
-
* Whether a resize is paid for by the
|
|
45
|
-
* width. Defaults to `fit`, which keeps the table exactly as wide as it was
|
|
45
|
+
* Whether a resize is paid for by the columns to the right or by the
|
|
46
|
+
* table's own width. Defaults to `fit`, which keeps the table exactly as wide as it was
|
|
46
47
|
* — surrounding layout never moves because a user dragged a column.
|
|
47
48
|
*
|
|
48
49
|
* Switch to `expand` when the table lives in its own scroll container and
|
|
@@ -218,7 +219,9 @@ export interface ColumnFreezeApi {
|
|
|
218
219
|
* Props for the {@link Table} component.
|
|
219
220
|
*
|
|
220
221
|
* Every attribute of a `table` element, plus the column-resizing options that
|
|
221
|
-
* `resizableColumns` turns on and the column-freezing options.
|
|
222
|
+
* `resizableColumns` turns on and the column-freezing options. The column
|
|
223
|
+
* options are deprecated: for tables with column features, use `DataTable`,
|
|
224
|
+
* which keeps them by column id.
|
|
222
225
|
*
|
|
223
226
|
* @example
|
|
224
227
|
* ```tsx
|
|
@@ -239,6 +242,74 @@ export interface TableProps extends CommonProps, ColumnResizeOptions, ColumnFree
|
|
|
239
242
|
* `columnResizeMode`.
|
|
240
243
|
*
|
|
241
244
|
* @default false
|
|
245
|
+
* @deprecated Use `DataTable`'s `resizableColumns` instead: it keeps
|
|
246
|
+
* widths by column id. Removed from `Table` in the next major release.
|
|
242
247
|
*/
|
|
243
248
|
resizableColumns?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Column widths in pixels, one per column, for the controlled case.
|
|
251
|
+
*
|
|
252
|
+
* @deprecated Use `DataTable`'s `columnState.widths`, keyed by column id instead. Removed from `Table` in the next major release.
|
|
253
|
+
*/
|
|
254
|
+
columnWidths?: number[];
|
|
255
|
+
/**
|
|
256
|
+
* Starting column widths in pixels, for the uncontrolled case.
|
|
257
|
+
*
|
|
258
|
+
* @deprecated Use `DataTable`'s `defaultColumnState.widths` instead. Removed from `Table` in the next major release.
|
|
259
|
+
*/
|
|
260
|
+
defaultColumnWidths?: number[];
|
|
261
|
+
/**
|
|
262
|
+
* Called on every width change, including each frame of a drag.
|
|
263
|
+
*
|
|
264
|
+
* @deprecated Use `DataTable`'s `onColumnStateChange` instead. Removed from `Table` in the next major release.
|
|
265
|
+
*/
|
|
266
|
+
onColumnWidthsChange?: (columnWidths: number[]) => void;
|
|
267
|
+
/**
|
|
268
|
+
* Narrowest a column can be dragged, in pixels.
|
|
269
|
+
*
|
|
270
|
+
* @deprecated Use `DataTable`'s `minColumnWidth` instead. Removed from `Table` in the next major release.
|
|
271
|
+
*/
|
|
272
|
+
minColumnWidth?: number;
|
|
273
|
+
/**
|
|
274
|
+
* Widest a column can be dragged, in pixels.
|
|
275
|
+
*
|
|
276
|
+
* @deprecated Use `DataTable`'s `maxColumnWidth` instead. Removed from `Table` in the next major release.
|
|
277
|
+
*/
|
|
278
|
+
maxColumnWidth?: number;
|
|
279
|
+
/**
|
|
280
|
+
* Whether a resize is paid for by the columns to the right or by the table's own width.
|
|
281
|
+
*
|
|
282
|
+
* @deprecated Use `DataTable`'s `columnResizeMode` instead. Removed from `Table` in the next major release.
|
|
283
|
+
*/
|
|
284
|
+
columnResizeMode?: ColumnResizeMode;
|
|
285
|
+
/**
|
|
286
|
+
* Columns frozen to each edge, for the controlled case.
|
|
287
|
+
*
|
|
288
|
+
* @deprecated Use `DataTable`'s `columnState.frozen` instead. Removed from `Table` in the next major release.
|
|
289
|
+
*/
|
|
290
|
+
frozenColumns?: FrozenColumns;
|
|
291
|
+
/**
|
|
292
|
+
* Columns frozen to each edge to begin with.
|
|
293
|
+
*
|
|
294
|
+
* @deprecated Use `DataTable`'s `defaultColumnState.frozen` instead. Removed from `Table` in the next major release.
|
|
295
|
+
*/
|
|
296
|
+
defaultFrozenColumns?: FrozenColumns;
|
|
297
|
+
/**
|
|
298
|
+
* Called whenever the user freezes or unfreezes columns.
|
|
299
|
+
*
|
|
300
|
+
* @deprecated Use `DataTable`'s `onColumnStateChange` instead. Removed from `Table` in the next major release.
|
|
301
|
+
*/
|
|
302
|
+
onFrozenColumnsChange?: (frozenColumns: Required<FrozenColumns>) => void;
|
|
303
|
+
/**
|
|
304
|
+
* Gives every `TableCellHeader` a menu to freeze its column.
|
|
305
|
+
*
|
|
306
|
+
* @deprecated Use `DataTable`'s `freezeControls` instead. Removed from `Table` in the next major release.
|
|
307
|
+
*/
|
|
308
|
+
freezeControls?: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* Keeps the header row in view while the table scrolls vertically.
|
|
311
|
+
*
|
|
312
|
+
* @deprecated Use `DataTable`'s `stickyHeader` with `maxHeight` instead. Removed from `Table` in the next major release.
|
|
313
|
+
*/
|
|
314
|
+
stickyHeader?: boolean;
|
|
244
315
|
}
|
|
@@ -62,5 +62,5 @@ import { TableCellHeaderProps } from './types';
|
|
|
62
62
|
* - Supports ARIA attributes via TableCellProps
|
|
63
63
|
* - Better accessibility than using TableCell in headers
|
|
64
64
|
*/
|
|
65
|
-
declare const TableCellHeader: ({ children, resizable, freezable, columnId, ...props }: React.PropsWithChildren<TableCellHeaderProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
65
|
+
declare const TableCellHeader: ({ children, resizable, freezable, columnId, minWidth, maxWidth, ...props }: React.PropsWithChildren<TableCellHeaderProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
66
66
|
export default TableCellHeader;
|
|
@@ -32,11 +32,10 @@ export interface TableCellHeaderProps extends TableCellProps {
|
|
|
32
32
|
* `resizableColumns`. Set it to `false` to pin a column — an actions or
|
|
33
33
|
* checkbox column, typically — at a width the user cannot change.
|
|
34
34
|
*
|
|
35
|
-
* In the default `fit` mode this also
|
|
36
|
-
* its
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* goes.
|
|
35
|
+
* In the default `fit` mode this column also keeps its width when a column
|
|
36
|
+
* to its left is resized: the other columns to the right absorb the change,
|
|
37
|
+
* and a handle with no such column left is hidden. In `expand` mode nothing
|
|
38
|
+
* pays for a resize, so only this column's own handle goes.
|
|
40
39
|
*
|
|
41
40
|
* Ignored outside a resizable table.
|
|
42
41
|
*
|
|
@@ -52,6 +51,16 @@ export interface TableCellHeaderProps extends TableCellProps {
|
|
|
52
51
|
* @default true
|
|
53
52
|
*/
|
|
54
53
|
freezable?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Narrowest this column can be resized to, in pixels, inside a `Table` with
|
|
56
|
+
* `resizableColumns`. Overrides the table's `minColumnWidth`.
|
|
57
|
+
*/
|
|
58
|
+
minWidth?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Widest this column can be resized to, in pixels, inside a `Table` with
|
|
61
|
+
* `resizableColumns`. Overrides the table's `maxColumnWidth`.
|
|
62
|
+
*/
|
|
63
|
+
maxWidth?: number;
|
|
55
64
|
/**
|
|
56
65
|
* Stable id for this column, used by `frozenColumns` on the `Table`. Give
|
|
57
66
|
* every header one when the app can hide or reorder columns, so frozen
|
|
@@ -62,6 +62,8 @@ export { default as FormRadioGroup } from './FormRadioGroup';
|
|
|
62
62
|
export * from './Filters';
|
|
63
63
|
export * from './FiltersMultiSelect';
|
|
64
64
|
export * as JsonSchema from './JsonSchemaForm';
|
|
65
|
+
export { default as DataTable, DataTableColumnPicker } from './DataTable';
|
|
66
|
+
export type { DataTableColumn, DataTableColumnPickerProps, DataTableColumnState, DataTableElementProps, DataTableProps, DataTableSelectionMode, DataTableSort, DataTableSortDirection, } from './DataTable';
|
|
65
67
|
export { default as Table } from './Table';
|
|
66
68
|
export { ColumnFreezeMenu, ColumnResizeHandle, useColumnFreezeContext, useColumnResize, useColumnResizeContext, } from './Table';
|
|
67
69
|
export type { ColumnFreezeApi, ColumnFreezeMenuProps, ColumnFreezeOptions, ColumnId, ColumnResizeApi, ColumnResizeHandleProps, ColumnResizeMode, ColumnResizeOptions, FrozenColumns, ResizeHandleProps, TableProps, UseColumnResizeOptions, } from './Table';
|