@imfusion/web-ui 0.11.1-dev.62.gfcd31b6e → 0.11.1-dev.65.g9b6bba80
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 +16 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +135 -0
- package/dist/components/menu/menu.meta.d.ts +2 -0
- package/dist/components/table/table.d.ts +49 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2920 -2489
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +2150 -433
- package/src/llms/llms.gen.txt +7 -1
- package/src/llms/skills/imf-web-ui-components/SKILL.md +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
+
- `Table.SelectCell` and `Table.SelectAllCell` put a row checkbox and a counted select-all checkbox in action columns,
|
|
8
|
+
`Table.Row` takes `disabled` to lock a row (its checkbox, `Table.RowLink` and `Table.RowButton` stop responding), and
|
|
9
|
+
`Table.EmptyRow` spans one muted cell across all columns. Selection state and the counter stay the app's.
|
|
10
|
+
[Table](src/components/table/table.mdx) ([WEBSDK-306](https://imfusion.atlassian.net/browse/WEBSDK-306)) — Nikolaus Brunner
|
|
11
|
+
<brunner@imfusion.com>
|
|
7
12
|
- `Image` is a new picture box over native `<picture>` and `<img>`, with an AVIF and a WebP source and a fallback `<img>`.
|
|
8
13
|
`width` and `height` are required and reserve the box before the image loads. It loads lazily and decodes asynchronously;
|
|
9
14
|
`priority` loads it eagerly with high fetch priority. A soft pulse shows while it loads and a glyph when it fails.
|
|
10
15
|
`radius`, `fit`, `border`, `borderWidth` and `aspectRatio` shape the box. [Image](src/components/image/image.mdx)
|
|
11
16
|
([WEBSDK-250](https://imfusion.atlassian.net/browse/WEBSDK-250)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
17
|
+
- `Menu` is a new action menu adapted from Base UI, with every upstream part. Items take `icon`, `description`, and `badge`;
|
|
18
|
+
`CheckboxItem` and `RadioItem` draw their check in the trailing cell; `Popup` has a `size` of `sm` (dense, the default) or
|
|
19
|
+
`md`. A menu where no item has an icon drops the icon gutter. [Menu](src/components/menu/menu.mdx)
|
|
20
|
+
([WEBSDK-248](https://imfusion.atlassian.net/browse/WEBSDK-248)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
12
21
|
- `Dialog.Alert` composes a confirmation from props like `Dialog.Simple`, on Base UI's Alert Dialog: screen readers announce
|
|
13
22
|
it as an `alertdialog`, it is always modal, and a click on the overlay leaves it open. `actions` is required, the header has
|
|
14
23
|
no close button, and `status` takes any variant. It replaces a `Dialog.Simple` or a hand-composed `Dialog.Root` that asks
|
|
@@ -69,6 +78,13 @@
|
|
|
69
78
|
|
|
70
79
|
### Changed
|
|
71
80
|
|
|
81
|
+
- `Button`, `IconButton`, and `CopyButton` keep their hover look while the popup, menu, or drawer they open is shown
|
|
82
|
+
(`data-popup-open` with `aria-expanded`). A tooltip does not trigger it. This includes a `Button` passed as `render` to a
|
|
83
|
+
`Popover.Trigger`, `Menu.Trigger`, or `Drawer.Trigger`.
|
|
84
|
+
[Button](src/components/button/button.mdx) — Nikolaus Brunner <brunner@imfusion.com>
|
|
85
|
+
- An action cell that is not the last in its row drops its end padding, so a select gutter sits next to the column after it.
|
|
86
|
+
[Table](src/components/table/table.mdx) ([WEBSDK-306](https://imfusion.atlassian.net/browse/WEBSDK-306)) — Nikolaus Brunner
|
|
87
|
+
<brunner@imfusion.com>
|
|
72
88
|
- `Dialog.Simple` and `Dialog.Inline` without children render no `Dialog.Body`, so the header sits directly on the footer
|
|
73
89
|
without the body's padding between them. [Dialog](src/components/dialog/dialog.mdx)
|
|
74
90
|
([WEBSDK-247](https://imfusion.atlassian.net/browse/WEBSDK-247)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const menuPopup: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const createHandle: typeof MenuPrimitive.createHandle;
|
|
7
|
+
type RootProps<Payload = unknown> = React.ComponentProps<typeof MenuPrimitive.Root<Payload>>;
|
|
8
|
+
/**
|
|
9
|
+
* Menu.Root — container that manages open state and the menu tree.
|
|
10
|
+
*
|
|
11
|
+
* @see https://base-ui.com/react/components/menu
|
|
12
|
+
* @llm https://base-ui.com/react/components/menu.md
|
|
13
|
+
*/
|
|
14
|
+
export declare function Root<Payload = unknown>(props: RootProps<Payload>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare namespace Root {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
18
|
+
/** Menu.Trigger — native button that opens the menu. Pass `render={<Button />}` to use any element, such as a `Button`. */
|
|
19
|
+
export declare function Trigger(props: React.ComponentProps<typeof MenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare namespace Trigger {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
/** Menu.Portal — renders the positioner in a portal outside the main document flow. */
|
|
24
|
+
export declare function Portal(props: React.ComponentProps<typeof MenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare namespace Portal {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
28
|
+
/** Menu.Backdrop — overlay beneath the menu. */
|
|
29
|
+
export declare function Backdrop(props: React.ComponentProps<typeof MenuPrimitive.Backdrop>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace Backdrop {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
/** Menu.Positioner — positions the popup relative to the trigger. */
|
|
34
|
+
export declare function Positioner({ sideOffset, alignOffset, ...props }: React.ComponentProps<typeof MenuPrimitive.Positioner>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace Positioner {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
interface PopupProps extends React.ComponentProps<typeof MenuPrimitive.Popup> {
|
|
39
|
+
/** Row density: `sm` is dense with hairlines between rows that have a description, `md` is roomier. A submenu popup sets its own. @default "sm" */
|
|
40
|
+
size?: VariantProps<typeof menuPopup>["size"];
|
|
41
|
+
}
|
|
42
|
+
/** Menu.Popup — the visible surface of the menu. Its `size` sets the density of every item inside. */
|
|
43
|
+
export declare function Popup({ size, ...props }: PopupProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare namespace Popup {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
/** Menu.Arrow — pointer arrow anchored to the popup edge. */
|
|
48
|
+
export declare function Arrow(props: React.ComponentProps<typeof MenuPrimitive.Arrow>): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare namespace Arrow {
|
|
50
|
+
var displayName: string;
|
|
51
|
+
}
|
|
52
|
+
/** Menu.Viewport — content wrapper that supports direction-aware transitions between triggers. */
|
|
53
|
+
export declare function Viewport(props: React.ComponentProps<typeof MenuPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare namespace Viewport {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
57
|
+
interface ItemSlots {
|
|
58
|
+
/** Glyph in the lead cell, such as `<Icon glyph={Plus} size={16} aria-hidden />`. A menu where no item has one drops the cell. */
|
|
59
|
+
icon?: React.ReactNode;
|
|
60
|
+
/** Muted second line under the text. */
|
|
61
|
+
description?: React.ReactNode;
|
|
62
|
+
/** Trailing label. A string or number renders as small mono text; any other node renders as given, such as a `Chip`. */
|
|
63
|
+
badge?: React.ReactNode;
|
|
64
|
+
}
|
|
65
|
+
interface ItemProps extends React.ComponentProps<typeof MenuPrimitive.Item>, ItemSlots {
|
|
66
|
+
}
|
|
67
|
+
/** Menu.Item — an action row. Without `label`, a string `children` is the text typeahead matches. */
|
|
68
|
+
export declare function Item({ icon, description, badge, label, children, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare namespace Item {
|
|
70
|
+
var displayName: string;
|
|
71
|
+
}
|
|
72
|
+
interface LinkItemProps extends React.ComponentProps<typeof MenuPrimitive.LinkItem>, ItemSlots {
|
|
73
|
+
}
|
|
74
|
+
/** Menu.LinkItem — a row that renders an `<a>`. Pass a router link as `render`. */
|
|
75
|
+
export declare function LinkItem({ icon, description, badge, label, children, ...props }: LinkItemProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare namespace LinkItem {
|
|
77
|
+
var displayName: string;
|
|
78
|
+
}
|
|
79
|
+
/** Menu.CheckboxItemIndicator — marks a ticked checkbox row. A wrapped `CheckboxItem` renders one itself. */
|
|
80
|
+
export declare function CheckboxItemIndicator(props: React.ComponentProps<typeof MenuPrimitive.CheckboxItemIndicator>): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare namespace CheckboxItemIndicator {
|
|
82
|
+
var displayName: string;
|
|
83
|
+
}
|
|
84
|
+
interface CheckboxItemProps extends React.ComponentProps<typeof MenuPrimitive.CheckboxItem>, ItemSlots {
|
|
85
|
+
}
|
|
86
|
+
/** Menu.CheckboxItem — a row that toggles a setting. It draws its check in the trailing cell, after the badge. */
|
|
87
|
+
export declare function CheckboxItem({ icon, description, badge, label, children, ...props }: CheckboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
export declare namespace CheckboxItem {
|
|
89
|
+
var displayName: string;
|
|
90
|
+
}
|
|
91
|
+
/** Menu.RadioGroup — groups radio rows so one is selected. */
|
|
92
|
+
export declare function RadioGroup(props: React.ComponentProps<typeof MenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
export declare namespace RadioGroup {
|
|
94
|
+
var displayName: string;
|
|
95
|
+
}
|
|
96
|
+
/** Menu.RadioItemIndicator — marks the selected radio row. A wrapped `RadioItem` renders one itself. */
|
|
97
|
+
export declare function RadioItemIndicator(props: React.ComponentProps<typeof MenuPrimitive.RadioItemIndicator>): import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
export declare namespace RadioItemIndicator {
|
|
99
|
+
var displayName: string;
|
|
100
|
+
}
|
|
101
|
+
interface RadioItemProps extends React.ComponentProps<typeof MenuPrimitive.RadioItem>, ItemSlots {
|
|
102
|
+
}
|
|
103
|
+
/** Menu.RadioItem — a row that selects one value of its `RadioGroup`. It draws its check in the trailing cell. */
|
|
104
|
+
export declare function RadioItem({ icon, description, badge, label, children, ...props }: RadioItemProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
export declare namespace RadioItem {
|
|
106
|
+
var displayName: string;
|
|
107
|
+
}
|
|
108
|
+
/** Menu.SubmenuRoot — container for a nested menu. */
|
|
109
|
+
export declare function SubmenuRoot(props: React.ComponentProps<typeof MenuPrimitive.SubmenuRoot>): import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
export declare namespace SubmenuRoot {
|
|
111
|
+
var displayName: string;
|
|
112
|
+
}
|
|
113
|
+
interface SubmenuTriggerProps extends React.ComponentProps<typeof MenuPrimitive.SubmenuTrigger>, ItemSlots {
|
|
114
|
+
}
|
|
115
|
+
/** Menu.SubmenuTrigger — a row that opens a nested menu. It draws a chevron in the trailing cell. */
|
|
116
|
+
export declare function SubmenuTrigger({ icon, description, badge, label, children, ...props }: SubmenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
export declare namespace SubmenuTrigger {
|
|
118
|
+
var displayName: string;
|
|
119
|
+
}
|
|
120
|
+
/** Menu.Separator — divider line between rows or groups. */
|
|
121
|
+
export declare function Separator(props: React.ComponentProps<typeof MenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
export declare namespace Separator {
|
|
123
|
+
var displayName: string;
|
|
124
|
+
}
|
|
125
|
+
/** Menu.Group — groups related rows under a `GroupLabel`. */
|
|
126
|
+
export declare function Group(props: React.ComponentProps<typeof MenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
export declare namespace Group {
|
|
128
|
+
var displayName: string;
|
|
129
|
+
}
|
|
130
|
+
/** Menu.GroupLabel — accessible label of a `Group`. */
|
|
131
|
+
export declare function GroupLabel(props: React.ComponentProps<typeof MenuPrimitive.GroupLabel>): import("react/jsx-runtime").JSX.Element;
|
|
132
|
+
export declare namespace GroupLabel {
|
|
133
|
+
var displayName: string;
|
|
134
|
+
}
|
|
135
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { Checkbox } from '../checkbox';
|
|
2
3
|
type CellActionProps = {
|
|
3
4
|
/** Marks an action column: it shrinks to its content and keeps it on one line. */
|
|
4
5
|
action?: boolean;
|
|
@@ -23,8 +24,12 @@ export declare function Body(props: React.ComponentProps<"tbody">): import("reac
|
|
|
23
24
|
export declare namespace Body {
|
|
24
25
|
var displayName: string;
|
|
25
26
|
}
|
|
27
|
+
type RowProps = React.ComponentProps<"tr"> & {
|
|
28
|
+
/** Dims the row and takes it out of use: its select checkbox, `RowLink` and `RowButton` stop responding. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
};
|
|
26
31
|
/** Table.Row — a `<tr>` in header or body. */
|
|
27
|
-
export declare function Row(props:
|
|
32
|
+
export declare function Row({ disabled, ...props }: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
28
33
|
export declare namespace Row {
|
|
29
34
|
var displayName: string;
|
|
30
35
|
}
|
|
@@ -48,7 +53,8 @@ export declare namespace RowLink {
|
|
|
48
53
|
}
|
|
49
54
|
/**
|
|
50
55
|
* Table.RowButton — a `<button>` that stands for its whole row, such as one that opens a drawer. Use it when the row acts
|
|
51
|
-
* instead of navigating; a link that goes to a page is a `Table.RowLink`.
|
|
56
|
+
* instead of navigating; a link that goes to a page is a `Table.RowLink`. In a disabled row it renders `disabled`, which
|
|
57
|
+
* only takes effect when it renders a button.
|
|
52
58
|
*/
|
|
53
59
|
export declare function RowButton({ render, type, ...props }: useRender.ComponentProps<"button">): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
54
60
|
export declare namespace RowButton {
|
|
@@ -80,4 +86,45 @@ export declare function SortableHeaderCell({ sortDirection, onToggle, children,
|
|
|
80
86
|
export declare namespace SortableHeaderCell {
|
|
81
87
|
var displayName: string;
|
|
82
88
|
}
|
|
89
|
+
type SelectCellProps = Omit<React.ComponentProps<typeof Checkbox.Root>, "className" | "aria-label"> & {
|
|
90
|
+
/** Reaches the `<td>`, not the checkbox. */
|
|
91
|
+
className?: string;
|
|
92
|
+
/** Names the checkbox, such as `Select brain_mr_t1_0142`. */
|
|
93
|
+
"aria-label": string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Table.SelectCell — a `<td>` action cell holding the row's checkbox. `checked` and `onCheckedChange` belong to the app.
|
|
97
|
+
* `disabled` follows the row's `disabled` unless set.
|
|
98
|
+
*/
|
|
99
|
+
export declare function SelectCell({ className, disabled, ...props }: SelectCellProps): import("react/jsx-runtime").JSX.Element;
|
|
100
|
+
export declare namespace SelectCell {
|
|
101
|
+
var displayName: string;
|
|
102
|
+
}
|
|
103
|
+
type SelectAllCellProps = Omit<React.ComponentProps<typeof Checkbox.Root>, "className" | "children" | "aria-label" | "aria-labelledby"> & {
|
|
104
|
+
/** Reaches the `<th>`, not the checkbox. */
|
|
105
|
+
className?: string;
|
|
106
|
+
/** Number of columns the cell spans, such as the select and thumbnail columns. */
|
|
107
|
+
colSpan?: number;
|
|
108
|
+
/** The counter beside the checkbox, such as `2/4`. The app computes it. */
|
|
109
|
+
children?: React.ReactNode;
|
|
110
|
+
/** Names the checkbox for assistive tech; the counter follows it. */
|
|
111
|
+
label?: string;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Table.SelectAllCell — a `<th>` action cell with the select-all checkbox. The checkbox is named by `label` plus the
|
|
115
|
+
* counter. `disabled` follows the row's `disabled` unless set.
|
|
116
|
+
*/
|
|
117
|
+
export declare function SelectAllCell({ className, colSpan, children, label, disabled, ...props }: SelectAllCellProps): import("react/jsx-runtime").JSX.Element;
|
|
118
|
+
export declare namespace SelectAllCell {
|
|
119
|
+
var displayName: string;
|
|
120
|
+
}
|
|
121
|
+
type EmptyRowProps = React.ComponentProps<"tr"> & {
|
|
122
|
+
/** Number of columns the message spans. */
|
|
123
|
+
colSpan: number;
|
|
124
|
+
};
|
|
125
|
+
/** Table.EmptyRow — a body row with one muted cell across all columns. `children` holds the message and an optional action. */
|
|
126
|
+
export declare function EmptyRow({ colSpan, children, ...props }: EmptyRowProps): import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
export declare namespace EmptyRow {
|
|
128
|
+
var displayName: string;
|
|
129
|
+
}
|
|
83
130
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { Image, imageMeta } from './components/image';
|
|
|
40
40
|
export { Kbd, kbdMeta } from './components/kbd';
|
|
41
41
|
export { Logo, logoMeta } from './components/logo';
|
|
42
42
|
export { Meter, meterMeta } from './components/meter';
|
|
43
|
+
export { Menu, menuMeta } from './components/menu';
|
|
43
44
|
export { NavigationMenu, navigationMenuMeta } from './components/navigation-menu';
|
|
44
45
|
export { Progress, progressMeta } from './components/progress';
|
|
45
46
|
export { Skeleton, skeletonMeta } from './components/skeleton';
|