@acronis-platform/ui-react 1.0.0 → 3.0.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/components/ui/accordion-container/accordion-container.js +144 -0
- package/dist/components/ui/accordion-container/accordion-container.js.map +1 -0
- package/dist/components/ui/alert/alert.js +55 -55
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +33 -22
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/card/card.js +150 -74
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/card-section/card-section.js +111 -0
- package/dist/components/ui/card-section/card-section.js.map +1 -0
- package/dist/components/ui/checkbox/checkbox.js +1 -1
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/data-table/data-table-bulk-actions-bar.js +38 -0
- package/dist/components/ui/data-table/data-table-bulk-actions-bar.js.map +1 -0
- package/dist/components/ui/data-table/data-table-column-header.js +23 -20
- package/dist/components/ui/data-table/data-table-column-header.js.map +1 -1
- package/dist/components/ui/data-table/data-table-expand-trigger.js +23 -15
- package/dist/components/ui/data-table/data-table-expand-trigger.js.map +1 -1
- package/dist/components/ui/data-table/data-table-pagination.js +29 -28
- package/dist/components/ui/data-table/data-table-pagination.js.map +1 -1
- package/dist/components/ui/data-table/data-table-selection.js +7 -0
- package/dist/components/ui/data-table/data-table-selection.js.map +1 -0
- package/dist/components/ui/data-table/data-table-toolbar.js +21 -23
- package/dist/components/ui/data-table/data-table-toolbar.js.map +1 -1
- package/dist/components/ui/data-table/data-table-view-options.js +12 -10
- package/dist/components/ui/data-table/data-table-view-options.js.map +1 -1
- package/dist/components/ui/data-table/data-table.js +349 -183
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/empty-overlay/empty-overlay.js +49 -0
- package/dist/components/ui/empty-overlay/empty-overlay.js.map +1 -0
- package/dist/components/ui/stepper/stepper.js +70 -0
- package/dist/components/ui/stepper/stepper.js.map +1 -0
- package/dist/components/ui/stepper-item/stepper-item.js +97 -0
- package/dist/components/ui/stepper-item/stepper-item.js.map +1 -0
- package/dist/components/ui/table/table-pagination.js +54 -47
- package/dist/components/ui/table/table-pagination.js.map +1 -1
- package/dist/components/ui/table/table-view-options.js +32 -19
- package/dist/components/ui/table/table-view-options.js.map +1 -1
- package/dist/components/ui/table/table.js +112 -63
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/timeline/timeline.js +10 -10
- package/dist/components/ui/timeline/timeline.js.map +1 -1
- package/dist/components/ui/toast/toast.js +15 -15
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/index.js +529 -506
- package/dist/index.js.map +1 -1
- package/dist/react.js +529 -506
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/accordion-container/accordion-container.d.ts +44 -0
- package/dist/src/components/ui/accordion-container/index.d.ts +1 -0
- package/dist/src/components/ui/avatar/avatar.d.ts +26 -7
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/card/card.d.ts +69 -8
- package/dist/src/components/ui/card/index.d.ts +1 -1
- package/dist/src/components/ui/card-section/card-section.d.ts +50 -0
- package/dist/src/components/ui/card-section/index.d.ts +1 -0
- package/dist/src/components/ui/data-table/data-table-bulk-actions-bar.d.ts +26 -0
- package/dist/src/components/ui/data-table/data-table-column-header.d.ts +6 -1
- package/dist/src/components/ui/data-table/data-table-expand-trigger.d.ts +4 -0
- package/dist/src/components/ui/data-table/data-table-pagination.d.ts +15 -1
- package/dist/src/components/ui/data-table/data-table-selection.d.ts +11 -0
- package/dist/src/components/ui/data-table/data-table-view-options.d.ts +3 -2
- package/dist/src/components/ui/data-table/data-table.d.ts +88 -3
- package/dist/src/components/ui/data-table/data-table.docs.d.ts +61 -1
- package/dist/src/components/ui/data-table/index.d.ts +3 -1
- package/dist/src/components/ui/dialog/dialog.d.ts +1 -1
- package/dist/src/components/ui/empty-overlay/empty-overlay.d.ts +20 -0
- package/dist/src/components/ui/empty-overlay/index.d.ts +2 -0
- package/dist/src/components/ui/grid/grid.d.ts +1 -1
- package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
- package/dist/src/components/ui/stack/stack.d.ts +1 -1
- package/dist/src/components/ui/stepper/index.d.ts +1 -0
- package/dist/src/components/ui/stepper/stepper.d.ts +40 -0
- package/dist/src/components/ui/stepper-item/index.d.ts +1 -0
- package/dist/src/components/ui/stepper-item/stepper-item.d.ts +41 -0
- package/dist/src/components/ui/table/index.d.ts +1 -1
- package/dist/src/components/ui/table/table-pagination.d.ts +21 -0
- package/dist/src/components/ui/table/table-view-options.d.ts +9 -2
- package/dist/src/components/ui/table/table.d.ts +40 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/ui-react.css +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const gridVariants: (props?: ({
|
|
4
|
-
cols?: 1 | 2 |
|
|
4
|
+
cols?: 1 | 2 | 3 | 6 | 4 | 12 | null | undefined;
|
|
5
5
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
|
|
@@ -2,7 +2,7 @@ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const sheetVariants: (props?: ({
|
|
5
|
-
side?: "
|
|
5
|
+
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare const Sheet: typeof DialogPrimitive.Root;
|
|
8
8
|
declare const SheetTrigger: DialogPrimitive.Trigger;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
declare const stackVariants: (props?: ({
|
|
4
4
|
direction?: "horizontal" | "vertical" | null | undefined;
|
|
5
5
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
6
|
-
align?: "center" | "end" | "
|
|
6
|
+
align?: "center" | "end" | "stretch" | "start" | null | undefined;
|
|
7
7
|
justify?: "center" | "end" | "start" | "between" | null | undefined;
|
|
8
8
|
wrap?: boolean | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stepper, type StepperProps } from './stepper';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The `StepperItem` elements making up the sequence. Rendered in the wide
|
|
5
|
+
* (>= 1024px) layout only — the compact layout is a text summary and shows no
|
|
6
|
+
* items at all.
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** 1-based index of the step the user is on, e.g. `3`. Compact layout only. */
|
|
10
|
+
currentStep: React.ReactNode;
|
|
11
|
+
/** How many steps there are in total, e.g. `5`. Compact layout only. */
|
|
12
|
+
totalSteps: React.ReactNode;
|
|
13
|
+
/** The current step's name. Compact layout only. */
|
|
14
|
+
current: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The next step's name. Omit it — on the last step, say — and the whole
|
|
17
|
+
* "Next: …" line is left out rather than rendered empty. Compact layout only.
|
|
18
|
+
*/
|
|
19
|
+
next?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The word introducing the step counter. A prop, not an inlined literal, so
|
|
22
|
+
* the string can be translated (see `context/conventions.md` §"Localization —
|
|
23
|
+
* no hardcoded labels"): this component generates the text itself, unlike the
|
|
24
|
+
* step names, which the caller supplies.
|
|
25
|
+
*/
|
|
26
|
+
stepLabel?: string;
|
|
27
|
+
/** The word joining the current step number to the total. Translatable — see `stepLabel`. */
|
|
28
|
+
ofLabel?: string;
|
|
29
|
+
/** The label introducing the next step's name. Translatable — see `stepLabel`. */
|
|
30
|
+
nextLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The punctuation joining the step counter to the current step's name. A prop
|
|
33
|
+
* for the same reason as `stepLabel`: the component generates it, and not every
|
|
34
|
+
* locale writes it as `": "` (French, say, spaces before the colon; CJK uses a
|
|
35
|
+
* full-width one).
|
|
36
|
+
*/
|
|
37
|
+
separatorLabel?: string;
|
|
38
|
+
}
|
|
39
|
+
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
export { Stepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepperItem, stepperItemVariants, type StepperItemProps, type StepperItemVariant, type StepperItemState, } from './stepper-item';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const stepperItemVariants: (props?: ({
|
|
5
|
+
variant?: "current" | "completed" | "future" | null | undefined;
|
|
6
|
+
state?: "active" | "hover" | "idle" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
/** Kept in lockstep with the `cva` axes above. */
|
|
9
|
+
export type StepperItemVariant = NonNullable<VariantProps<typeof stepperItemVariants>['variant']>;
|
|
10
|
+
export type StepperItemState = NonNullable<VariantProps<typeof stepperItemVariants>['state']>;
|
|
11
|
+
export interface StepperItemProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
12
|
+
/**
|
|
13
|
+
* The step's structural role in the sequence. Drives the container background
|
|
14
|
+
* and the label color. Defaults to `current` for prop ergonomics — in a real
|
|
15
|
+
* sequence every step declares its own.
|
|
16
|
+
*/
|
|
17
|
+
variant?: StepperItemVariant;
|
|
18
|
+
/**
|
|
19
|
+
* Interaction state. Only produces a different look when `variant` is
|
|
20
|
+
* `completed` (`idle` has no background, `hover` and `active` paint one).
|
|
21
|
+
* Ignored for `current`, which always renders in its highlighted look, and for
|
|
22
|
+
* `future`, which always renders disabled and non-interactive.
|
|
23
|
+
*/
|
|
24
|
+
state?: StepperItemState;
|
|
25
|
+
/**
|
|
26
|
+
* The step's marker — required, and entirely the caller's to compose. Pass any
|
|
27
|
+
* `Avatar` composition (color scheme, initials / icon / image, size overrides);
|
|
28
|
+
* this component renders it verbatim and never styles it.
|
|
29
|
+
*/
|
|
30
|
+
avatar: React.ReactElement;
|
|
31
|
+
/** The step name. */
|
|
32
|
+
label?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Replace the rendered `<div>` with another element or component (Base UI
|
|
35
|
+
* composition) — e.g. a `<button>`, since a completed step is usually a way
|
|
36
|
+
* back to an earlier step.
|
|
37
|
+
*/
|
|
38
|
+
render?: useRender.RenderProp;
|
|
39
|
+
}
|
|
40
|
+
declare const StepperItem: React.ForwardRefExoticComponent<StepperItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export { StepperItem, stepperItemVariants };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, type TableRowProps, type TableHeadProps, type TableCellProps, } from './table';
|
|
1
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableSelectCell, TableActionsCell, TableSettingsCell, TableCaption, type TableRowProps, type TableHeadProps, type TableCellProps, type TableSelectCellProps, type TableActionsCellProps, } from './table';
|
|
2
2
|
export { TablePagination, type TablePaginationProps, } from './table-pagination';
|
|
3
3
|
export { TableViewOptions, type TableViewOptionsProps, type TableColumnVisibility, } from './table-view-options';
|
|
@@ -16,6 +16,27 @@ export interface TablePaginationProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
16
16
|
onPageIndexChange: (pageIndex: number) => void;
|
|
17
17
|
/** Invoked with the next page size. */
|
|
18
18
|
onPageSizeChange: (pageSize: number) => void;
|
|
19
|
+
/** Label of the rows-per-page select (also its accessible name). */
|
|
20
|
+
rowsPerPageLabel?: string;
|
|
21
|
+
/** Accessible name of the first-page control. */
|
|
22
|
+
firstPageLabel?: string;
|
|
23
|
+
/** Accessible name of the previous-page control. */
|
|
24
|
+
previousPageLabel?: string;
|
|
25
|
+
/** Accessible name of the next-page control. */
|
|
26
|
+
nextPageLabel?: string;
|
|
27
|
+
/** Accessible name of the last-page control. */
|
|
28
|
+
lastPageLabel?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Builds the page indicator. Receives the 1-based page number and the total
|
|
31
|
+
* page count; `pageCount === 0` means there are no pages.
|
|
32
|
+
*/
|
|
33
|
+
pageLabel?: (page: number, pageCount: number) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Builds the leading row summary. Receives the selected-row count (or
|
|
36
|
+
* `undefined` when selection isn't tracked) and the total row count. Return
|
|
37
|
+
* `null` for no summary.
|
|
38
|
+
*/
|
|
39
|
+
summaryLabel?: (selectedRows: number | undefined, totalRows: number) => string | null;
|
|
19
40
|
}
|
|
20
41
|
declare const TablePagination: React.ForwardRefExoticComponent<TablePaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
42
|
export { TablePagination };
|
|
@@ -12,10 +12,17 @@ export interface TableViewOptionsProps {
|
|
|
12
12
|
columns: TableColumnVisibility[];
|
|
13
13
|
/** Invoked with the column id whose visibility was toggled. */
|
|
14
14
|
onToggle: (id: string) => void;
|
|
15
|
-
/** Trigger label. Defaults to `View`. */
|
|
15
|
+
/** Trigger label. Defaults to `View`. Ignored when `iconOnly`. */
|
|
16
16
|
triggerLabel?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Render the trigger as a cog-only icon button instead of a labelled
|
|
19
|
+
* `Button` — the shape that fits the 48px `TableSettingsCell` column.
|
|
20
|
+
*/
|
|
21
|
+
iconOnly?: boolean;
|
|
22
|
+
/** Accessible name of the `iconOnly` trigger. Override to localize. */
|
|
23
|
+
triggerAriaLabel?: string;
|
|
17
24
|
}
|
|
18
|
-
declare function TableViewOptions({ columns, onToggle, triggerLabel, }: TableViewOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function TableViewOptions({ columns, onToggle, triggerLabel, iconOnly, triggerAriaLabel, }: TableViewOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
26
|
declare namespace TableViewOptions {
|
|
20
27
|
var displayName: string;
|
|
21
28
|
}
|
|
@@ -31,5 +31,44 @@ export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElem
|
|
|
31
31
|
wrap?: boolean;
|
|
32
32
|
}
|
|
33
33
|
declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
34
|
+
export interface TableSelectCellProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
35
|
+
/**
|
|
36
|
+
* Render the select-all cell of the header row (`<th>`) instead of a row's
|
|
37
|
+
* selection cell (`<td>`).
|
|
38
|
+
*/
|
|
39
|
+
header?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The row-selection cell (design part `TableCheckbox`) — a fixed 32px column
|
|
43
|
+
* holding a label-less `Checkbox`. Only the leading padding is applied, matching
|
|
44
|
+
* the design (16px padding + a 16px box), so the checkbox sits flush against the
|
|
45
|
+
* first data cell.
|
|
46
|
+
*/
|
|
47
|
+
declare const TableSelectCell: React.ForwardRefExoticComponent<TableSelectCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
48
|
+
export interface TableActionsCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
49
|
+
/**
|
|
50
|
+
* Suppress this row's actions because a selection is in play — the cell
|
|
51
|
+
* still reserves its 48px column (so the grid doesn't reflow) but renders no
|
|
52
|
+
* children and no hover/press tint. Per the design, that means any row is
|
|
53
|
+
* selected, including exactly one. Pass `isBulkSelectionActive(table)` (from
|
|
54
|
+
* the data-table part) rather than re-deriving the threshold.
|
|
55
|
+
*/
|
|
56
|
+
bulkSelectionActive?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The trailing row-actions cell (design part `TableActions`) — a fixed 48px
|
|
60
|
+
* column, end-aligned, holding the consumer's overflow trigger (e.g. a
|
|
61
|
+
* `ButtonIcon` with `EllipsisIcon` opening a `DropdownMenu`). The cell itself
|
|
62
|
+
* carries the hover/press tint and the focus ring, per the design.
|
|
63
|
+
*/
|
|
64
|
+
declare const TableActionsCell: React.ForwardRefExoticComponent<TableActionsCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
65
|
+
/**
|
|
66
|
+
* The trailing header cell holding the column-settings trigger (design part
|
|
67
|
+
* `TableSettings`) — a fixed 48px column, end-aligned, holding the consumer's
|
|
68
|
+
* gear trigger (e.g. a `ButtonIcon` with `CogIcon`). Visual states only; what
|
|
69
|
+
* the trigger opens (a column-visibility menu) is the consumer's choice —
|
|
70
|
+
* `TableViewOptions` is the ready-made one.
|
|
71
|
+
*/
|
|
72
|
+
declare const TableSettingsCell: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
34
73
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
35
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
74
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableSelectCell, TableActionsCell, TableSettingsCell, TableCaption, };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './hooks';
|
|
|
3
3
|
export * from './lib/breakpoints';
|
|
4
4
|
export { PortalContainerProvider, usePortalContainer, type PortalContainerProviderProps, } from './lib/portal-container';
|
|
5
5
|
export * from './components/ui/accordion';
|
|
6
|
+
export * from './components/ui/accordion-container';
|
|
6
7
|
export * from './components/ui/alert';
|
|
7
8
|
export * from './components/ui/app-shell';
|
|
8
9
|
export * from './components/ui/app-shell-chat';
|
|
@@ -18,6 +19,7 @@ export * from './components/ui/calendar';
|
|
|
18
19
|
export * from './components/ui/calendar-panel';
|
|
19
20
|
export * from './components/ui/card';
|
|
20
21
|
export * from './components/ui/card-filter';
|
|
22
|
+
export * from './components/ui/card-section';
|
|
21
23
|
export * from './components/ui/category-bar';
|
|
22
24
|
export * from './components/ui/chart';
|
|
23
25
|
export * from './components/ui/chart-state';
|
|
@@ -36,6 +38,7 @@ export * from './components/ui/dialog-footer-default';
|
|
|
36
38
|
export * from './components/ui/dialog-welcome';
|
|
37
39
|
export * from './components/ui/dropdown-menu';
|
|
38
40
|
export * from './components/ui/empty';
|
|
41
|
+
export * from './components/ui/empty-overlay';
|
|
39
42
|
export * from './components/ui/field';
|
|
40
43
|
export * from './components/ui/fitted-actions';
|
|
41
44
|
export * from './components/ui/filter-cards';
|
|
@@ -82,6 +85,8 @@ export * from './components/ui/sheet';
|
|
|
82
85
|
export * from './components/ui/skeleton';
|
|
83
86
|
export * from './components/ui/slider';
|
|
84
87
|
export * from './components/ui/stack';
|
|
88
|
+
export * from './components/ui/stepper';
|
|
89
|
+
export * from './components/ui/stepper-item';
|
|
85
90
|
export * from './components/ui/resizable';
|
|
86
91
|
export * from './components/ui/sidebar-primary';
|
|
87
92
|
export * from './components/ui/sidebar-secondary';
|