@imfusion/web-ui 0.11.1-dev.62.gfcd31b6e → 0.11.1-dev.64.gdd82b76a
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 +8 -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/index.d.ts +1 -0
- package/dist/index.js +2827 -2484
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +1384 -0
- package/src/llms/llms.gen.txt +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
`priority` loads it eagerly with high fetch priority. A soft pulse shows while it loads and a glyph when it fails.
|
|
10
10
|
`radius`, `fit`, `border`, `borderWidth` and `aspectRatio` shape the box. [Image](src/components/image/image.mdx)
|
|
11
11
|
([WEBSDK-250](https://imfusion.atlassian.net/browse/WEBSDK-250)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
12
|
+
- `Menu` is a new action menu adapted from Base UI, with every upstream part. Items take `icon`, `description`, and `badge`;
|
|
13
|
+
`CheckboxItem` and `RadioItem` draw their check in the trailing cell; `Popup` has a `size` of `sm` (dense, the default) or
|
|
14
|
+
`md`. A menu where no item has an icon drops the icon gutter. [Menu](src/components/menu/menu.mdx)
|
|
15
|
+
([WEBSDK-248](https://imfusion.atlassian.net/browse/WEBSDK-248)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
12
16
|
- `Dialog.Alert` composes a confirmation from props like `Dialog.Simple`, on Base UI's Alert Dialog: screen readers announce
|
|
13
17
|
it as an `alertdialog`, it is always modal, and a click on the overlay leaves it open. `actions` is required, the header has
|
|
14
18
|
no close button, and `status` takes any variant. It replaces a `Dialog.Simple` or a hand-composed `Dialog.Root` that asks
|
|
@@ -69,6 +73,10 @@
|
|
|
69
73
|
|
|
70
74
|
### Changed
|
|
71
75
|
|
|
76
|
+
- `Button`, `IconButton`, and `CopyButton` keep their hover look while the popup, menu, or drawer they open is shown
|
|
77
|
+
(`data-popup-open` with `aria-expanded`). A tooltip does not trigger it. This includes a `Button` passed as `render` to a
|
|
78
|
+
`Popover.Trigger`, `Menu.Trigger`, or `Drawer.Trigger`.
|
|
79
|
+
[Button](src/components/button/button.mdx) — Nikolaus Brunner <brunner@imfusion.com>
|
|
72
80
|
- `Dialog.Simple` and `Dialog.Inline` without children render no `Dialog.Body`, so the header sits directly on the footer
|
|
73
81
|
without the body's padding between them. [Dialog](src/components/dialog/dialog.mdx)
|
|
74
82
|
([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 {};
|
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';
|