@imfusion/web-ui 0.10.1-dev.6.gf715361a → 0.10.1-dev.61.g9d1000b8
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 +167 -0
- package/README.md +8 -32
- package/THIRD_PARTY_NOTICES.md +110 -0
- package/dist/code-NTcddiYk.js +139 -0
- package/dist/components/account-card/account-card.d.ts +9 -26
- package/dist/components/app-shell/app-shell.d.ts +48 -26
- package/dist/components/callout/callout.d.ts +1 -1
- package/dist/components/chip/chip.d.ts +1 -1
- package/dist/components/color-scheme-toggle/color-scheme-preference.d.ts +3 -0
- package/dist/components/color-scheme-toggle/color-scheme-toggle.d.ts +17 -0
- package/dist/components/color-scheme-toggle/color-scheme-toggle.meta.d.ts +2 -0
- package/dist/components/color-scheme-toggle/index.d.ts +2 -0
- package/dist/components/dialog/dialog.d.ts +151 -0
- package/dist/components/dialog/dialog.meta.d.ts +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/logo/index.d.ts +1 -0
- package/dist/components/logo/product/index.d.ts +1 -0
- package/dist/components/logo/product/marks.d.ts +11 -0
- package/dist/components/logo/product/product.d.ts +17 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +49 -0
- package/dist/components/scroll-area/scroll-area.meta.d.ts +2 -0
- package/dist/components/select/select.d.ts +18 -4
- package/dist/components/separator/separator.d.ts +4 -2
- package/dist/components/skeleton/skeleton.d.ts +17 -2
- package/dist/components/table/table.d.ts +12 -4
- package/dist/components/toggle/toggle.d.ts +8 -2
- package/dist/components/toggle-group/toggle-group-size.d.ts +3 -0
- package/dist/components/toggle-group/toggle-group.d.ts +7 -3
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use-disclosure.d.ts +17 -0
- package/dist/icons.js +1 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2705 -2093
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/frame-selection.js +2 -2
- package/dist/integrations/image-display-options.js +123 -113
- package/dist/{rolldown-runtime-Dy4uBu1J.js → resolve-state-props-DQf9WiGv.js} +12 -1
- package/dist/scroll-area-z9Lf9uIk.js +89 -0
- package/dist/{separator-lzz4A3x_.js → separator-BV2TR8U0.js} +16 -8
- package/dist/slider-Bf274cMe.js +106 -0
- package/dist/style.css +1 -1
- package/dist/{tabs-DRyqtS04.js → tabs-CU46aGud.js} +106 -88
- package/dist/vite/local-web-ui-link.d.ts +17 -4
- package/dist/vite.js +25 -20
- package/dist/web-ui-cli.js +155 -141
- package/docs/user-guide/AgentTooling.mdx +4 -4
- package/docs/user-guide/UsagePatterns.mdx +4 -0
- package/package.json +11 -9
- package/src/docgen/doc.gen.json +2292 -1071
- package/src/llms/install-templates/hooks/session-start.sh +14 -0
- package/src/llms/install-templates/hooks/stop.sh +7 -2
- package/src/llms/llms.gen.txt +18 -1
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +28 -15
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +4 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +8 -9
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +17 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +8 -5
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +3 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +5 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +3 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +47 -8
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +2 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +10 -1
- package/src/llms/skills/imf-web-ui-update/SKILL.md +12 -5
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +47 -26
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +6 -6
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +3 -3
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +3 -3
- package/src/llms/tokens.gen.json +13 -5
- package/dist/code-BYkr5k55.js +0 -134
- package/dist/slider-Cqpreglu.js +0 -116
- package/src/llms/install-templates/hooks/baseline-staleness.sh +0 -24
|
@@ -1,29 +1,62 @@
|
|
|
1
|
-
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
2
|
import { VariantProps } from 'class-variance-authority';
|
|
4
3
|
declare const navbarSurface: (props?: ({
|
|
5
4
|
variant?: "default" | "branded" | null | undefined;
|
|
6
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* AppShell — application layout shell.
|
|
8
|
+
*
|
|
9
|
+
* The classic dashboard frame: collapsible navbar/aside sidebars, a page
|
|
10
|
+
* header, an optional footer, and a scrolling main content area. Also called
|
|
11
|
+
* an app layout, application frame, dashboard shell, or sidebar layout.
|
|
12
|
+
*
|
|
13
|
+
* Composed of eight sub-components used with dot-notation: `AppShell.Root` wraps
|
|
14
|
+
* `AppShell.Header`, `AppShell.Navbar`, `AppShell.Aside`, `AppShell.Footer`,
|
|
15
|
+
* `AppShell.Main`, and (inside a sidebar) `AppShell.Section` and `AppShell.NavItem`.
|
|
16
|
+
*
|
|
17
|
+
* Sizing is CSS-driven — override the `--imf-ui-appshell-*` custom properties
|
|
18
|
+
* rather than passing dimension props. Below the responsive breakpoints the
|
|
19
|
+
* navbar (`md`) and aside (`lg`) open as drawers, and the shell renders the
|
|
20
|
+
* navbar's toggle itself.
|
|
21
|
+
*
|
|
22
|
+
* Copied and adapted from Mantine's AppShell; no upstream runtime dependency.
|
|
23
|
+
* MIT licensed (see Mantine repo).
|
|
24
|
+
*
|
|
25
|
+
* @see https://mantine.dev/llms/core-app-shell.md
|
|
26
|
+
*/
|
|
27
|
+
declare function Root({ ref, children, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
28
|
declare namespace Root {
|
|
9
29
|
var displayName: string;
|
|
10
30
|
}
|
|
11
|
-
|
|
31
|
+
/**
|
|
32
|
+
* AppShell.Header — the page row: a title and actions at every width. Below `md` it sits under the shell's bar, and from
|
|
33
|
+
* `md` it sits beside the rail.
|
|
34
|
+
*/
|
|
35
|
+
declare function Header({ className, children, ...props }: React.ComponentProps<"header">): import("react/jsx-runtime").JSX.Element;
|
|
12
36
|
declare namespace Header {
|
|
13
37
|
var displayName: string;
|
|
14
38
|
}
|
|
15
39
|
type DrawerProps = {
|
|
16
40
|
/** Whether the drawer is open below the breakpoint. Ignored while the section is docked. */
|
|
17
41
|
open?: boolean;
|
|
42
|
+
/** Whether the drawer starts open when `open` is omitted. */
|
|
43
|
+
defaultOpen?: boolean;
|
|
18
44
|
/** Called when the drawer asks to open or close: scrim, swipe, or Escape. */
|
|
19
45
|
onOpenChange?: (open: boolean) => void;
|
|
20
46
|
};
|
|
21
|
-
type NavbarProps = React.ComponentProps<"nav"> & VariantProps<typeof navbarSurface> & DrawerProps
|
|
47
|
+
type NavbarProps = React.ComponentProps<"nav"> & VariantProps<typeof navbarSurface> & DrawerProps & {
|
|
48
|
+
/** The brand at the top of the rail. Defaults to the ImFusion logo; `null` leaves the row empty. */
|
|
49
|
+
logo?: React.ReactNode;
|
|
50
|
+
/** The signed-in account at the foot of the rail, usually an `AccountCard`. Without it the foot is omitted. */
|
|
51
|
+
account?: React.ReactNode;
|
|
52
|
+
};
|
|
22
53
|
/**
|
|
23
|
-
* `
|
|
24
|
-
*
|
|
54
|
+
* The navbar owns its frame: `logo` on top, the children (nav items) in the middle, `account` at the foot. Without a
|
|
55
|
+
* Header the logo's bottom edge sits on the baseline of Main's first heading. `variant="branded"` paints the primary
|
|
56
|
+
* color; children opt into on-color themselves. Below `md` the navbar opens as a drawer from the inline start, with its
|
|
57
|
+
* close on the logo row.
|
|
25
58
|
*/
|
|
26
|
-
declare function Navbar({ variant, open, onOpenChange, ...props }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function Navbar({ variant, open, defaultOpen, onOpenChange, logo, account, children, id, ...props }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
60
|
declare namespace Navbar {
|
|
28
61
|
var displayName: string;
|
|
29
62
|
}
|
|
@@ -34,9 +67,11 @@ type AsideProps = React.ComponentProps<"aside"> & DrawerProps & {
|
|
|
34
67
|
onWidthChange?: (width: number) => void;
|
|
35
68
|
/** Accessible name of the drag handle. */
|
|
36
69
|
resizeLabel?: string;
|
|
70
|
+
/** Accessible name of the close button shown while the aside is a drawer. */
|
|
71
|
+
closeLabel?: string;
|
|
37
72
|
};
|
|
38
73
|
/** Below `lg` the aside opens as a drawer: from the bottom on phones, from the inline end on tablets. */
|
|
39
|
-
declare function Aside({ open, onOpenChange, resizable, onWidthChange, resizeLabel, children, ...props }: AsideProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
declare function Aside({ open, defaultOpen, onOpenChange, resizable, onWidthChange, resizeLabel, closeLabel, children, ...props }: AsideProps): import("react/jsx-runtime").JSX.Element;
|
|
40
75
|
declare namespace Aside {
|
|
41
76
|
var displayName: string;
|
|
42
77
|
}
|
|
@@ -44,7 +79,7 @@ declare function Footer(props: React.ComponentProps<"footer">): import("react/js
|
|
|
44
79
|
declare namespace Footer {
|
|
45
80
|
var displayName: string;
|
|
46
81
|
}
|
|
47
|
-
declare function Main(props: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
declare function Main({ children, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
48
83
|
declare namespace Main {
|
|
49
84
|
var displayName: string;
|
|
50
85
|
}
|
|
@@ -56,20 +91,6 @@ declare function Section({ grow, ...props }: SectionProps): import("react/jsx-ru
|
|
|
56
91
|
declare namespace Section {
|
|
57
92
|
var displayName: string;
|
|
58
93
|
}
|
|
59
|
-
type BurgerProps = React.ComponentProps<typeof ButtonPrimitive> & {
|
|
60
|
-
/** Whether the navigation it controls is open; draws the cross and sets `aria-expanded`. */
|
|
61
|
-
opened?: boolean;
|
|
62
|
-
/** Accessible name. Defaults to "Open navigation" or "Close navigation" from `opened`. */
|
|
63
|
-
label?: string;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* AppShell.Burger — the header's menu toggle: three sheared bands that cross when `opened`. Takes its color from the
|
|
67
|
-
* surface and hides from `md` up, where the navbar is docked.
|
|
68
|
-
*/
|
|
69
|
-
declare function Burger({ opened, label, className, ...props }: BurgerProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
-
declare namespace Burger {
|
|
71
|
-
var displayName: string;
|
|
72
|
-
}
|
|
73
94
|
type NavItemProps = useRender.ComponentProps<"a"> & {
|
|
74
95
|
/** Leading icon, decorative. */
|
|
75
96
|
icon?: React.ReactNode;
|
|
@@ -78,10 +99,11 @@ type NavItemProps = useRender.ComponentProps<"a"> & {
|
|
|
78
99
|
};
|
|
79
100
|
/**
|
|
80
101
|
* AppShell.NavItem — a navbar link: icon, mono label, and an optional description. Takes its color from the navbar;
|
|
81
|
-
* `aria-current="page"`
|
|
102
|
+
* `aria-current="page"` underlines the label. Pass a router link through `render`. Followed inside the navbar drawer,
|
|
103
|
+
* it closes the drawer.
|
|
82
104
|
*/
|
|
83
|
-
declare function NavItem({ icon, description, children, render, ...props }: NavItemProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
105
|
+
declare function NavItem({ icon, description, children, render, onClick, ...props }: NavItemProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
84
106
|
declare namespace NavItem {
|
|
85
107
|
var displayName: string;
|
|
86
108
|
}
|
|
87
|
-
export { Root, Header, Navbar, Aside, Footer, Main, Section,
|
|
109
|
+
export { Root, Header, Navbar, Aside, Footer, Main, Section, NavItem };
|
|
@@ -22,7 +22,7 @@ declare function Icon({ children, ...props }: React.ComponentProps<"span">): imp
|
|
|
22
22
|
declare namespace Icon {
|
|
23
23
|
var displayName: string;
|
|
24
24
|
}
|
|
25
|
-
/** Callout.Title — an optional short heading, set in the
|
|
25
|
+
/** Callout.Title — an optional short heading, set in the mono UPPERCASE technical voice. */
|
|
26
26
|
declare function Title(props: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
declare namespace Title {
|
|
28
28
|
var displayName: string;
|
|
@@ -7,5 +7,5 @@ type Props = React.ComponentProps<"span"> & VariantProps<typeof chip> & {
|
|
|
7
7
|
* Chip — compact inline label for status or category.
|
|
8
8
|
* Not based on any upstream component.
|
|
9
9
|
*/
|
|
10
|
-
export declare function Chip({ variant, appearance, inline, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function Chip({ variant, appearance, inline, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToggleGroup } from '../toggle-group';
|
|
2
|
+
type Props = Omit<React.ComponentProps<typeof ToggleGroup>, "value" | "defaultValue" | "onValueChange" | "multiple" | "children"> & {
|
|
3
|
+
/** Accessible name of the group. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Text of the segment that picks the light scheme. */
|
|
6
|
+
lightLabel?: string;
|
|
7
|
+
/** Text of the segment that follows the operating system. */
|
|
8
|
+
systemLabel?: string;
|
|
9
|
+
/** Text of the segment that picks the dark scheme. */
|
|
10
|
+
darkLabel?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* ColorSchemeToggle - lets the user pick Light, System, or Dark. It reads and stores the preference through
|
|
14
|
+
* `useColorScheme`, so placing it is enough. System stays pressed while the page follows the operating system.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ColorSchemeToggle({ label, lightLabel, systemLabel, darkLabel, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as ScrollArea from '../scroll-area/scroll-area';
|
|
4
|
+
type HeaderVariant = "primary" | "main" | "support" | "minor";
|
|
5
|
+
declare const dialogTrigger: (props?: ({
|
|
6
|
+
inline?: boolean | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare const dialogStatus: (props?: ({
|
|
9
|
+
variant?: "positive" | "negative" | "warning" | "info" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
export declare const createHandle: typeof DialogPrimitive.createHandle;
|
|
12
|
+
type RootProps<Payload = unknown> = React.ComponentProps<typeof DialogPrimitive.Root<Payload>>;
|
|
13
|
+
/**
|
|
14
|
+
* Dialog.Root — container that manages open/closed state.
|
|
15
|
+
*
|
|
16
|
+
* @see https://base-ui.com/react/components/dialog
|
|
17
|
+
* @llm https://base-ui.com/react/components/dialog.md
|
|
18
|
+
*/
|
|
19
|
+
export declare function Root<Payload = unknown>(props: RootProps<Payload>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare namespace Root {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
/** Dialog.Trigger — button that opens the dialog. `inline` styles it as a dashed-underlined term inside running text. */
|
|
24
|
+
export declare function Trigger({ inline, ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger> & VariantProps<typeof dialogTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare namespace Trigger {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
28
|
+
/** Dialog.Portal — renders backdrop and popup in a portal outside the main document flow. */
|
|
29
|
+
export declare function Portal(props: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace Portal {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
/** Dialog.Backdrop — flat dark overlay that dims the page behind the dialog. */
|
|
34
|
+
export declare function Backdrop(props: React.ComponentProps<typeof DialogPrimitive.Backdrop>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace Backdrop {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
/** Dialog.Viewport — full-screen container that centres the popup. */
|
|
39
|
+
export declare function Viewport(props: React.ComponentProps<typeof DialogPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare namespace Viewport {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
43
|
+
interface PopupProps extends React.ComponentProps<typeof DialogPrimitive.Popup> {
|
|
44
|
+
/**
|
|
45
|
+
* Width of the window. `full` fills the screen minus a margin.
|
|
46
|
+
* @default 'md'
|
|
47
|
+
*/
|
|
48
|
+
size?: "sm" | "md" | "lg" | "full";
|
|
49
|
+
}
|
|
50
|
+
/** Dialog.Popup — the window. Holds Header, Body, and Footer, or any free content. */
|
|
51
|
+
export declare function Popup({ size, ...props }: PopupProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare namespace Popup {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
55
|
+
type HeaderProps = React.ComponentProps<"div"> & {
|
|
56
|
+
/**
|
|
57
|
+
* Colour of the header band. On `primary` the title, description, and close button turn light.
|
|
58
|
+
* @default 'main'
|
|
59
|
+
*/
|
|
60
|
+
variant?: HeaderVariant;
|
|
61
|
+
};
|
|
62
|
+
/** Dialog.Header — band at the top of the popup that holds the title, description, and close button. */
|
|
63
|
+
export declare function Header({ variant, ...props }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare namespace Header {
|
|
65
|
+
var displayName: string;
|
|
66
|
+
}
|
|
67
|
+
/** Dialog.Body — the scrolling region between header and footer, a ScrollArea with the library's thumb and edge fades. */
|
|
68
|
+
export declare function Body({ children, ...props }: React.ComponentProps<typeof ScrollArea.Auto>): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare namespace Body {
|
|
70
|
+
var displayName: string;
|
|
71
|
+
}
|
|
72
|
+
/** Dialog.Footer — row of actions pinned to the bottom of the popup. */
|
|
73
|
+
export declare function Footer(props: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare namespace Footer {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
77
|
+
type StatusProps = React.ComponentProps<"div"> & VariantProps<typeof dialogStatus>;
|
|
78
|
+
/**
|
|
79
|
+
* Dialog.Status — a tinted column at the start of the popup, spanning its full height, that marks the dialog's
|
|
80
|
+
* status with the variant's glyph. Place it first inside `Dialog.Popup`. Pass children to replace the glyph.
|
|
81
|
+
* Decorative (`aria-hidden`); the title carries the status.
|
|
82
|
+
*/
|
|
83
|
+
export declare function Status({ variant, children, ...props }: StatusProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export declare namespace Status {
|
|
85
|
+
var displayName: string;
|
|
86
|
+
}
|
|
87
|
+
/** Dialog.Title — heading that names the dialog for screen readers, set as `Typo.H2`. Light on a `primary` header. */
|
|
88
|
+
export declare function Title(props: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export declare namespace Title {
|
|
90
|
+
var displayName: string;
|
|
91
|
+
}
|
|
92
|
+
/** Dialog.Description — supplementary paragraph that describes the dialog for screen readers, set as `Typo.P`. */
|
|
93
|
+
export declare function Description(props: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export declare namespace Description {
|
|
95
|
+
var displayName: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Dialog.Close — button that closes the dialog. With no `children` and no `render` it renders the library's ghost close
|
|
99
|
+
* button (a boxed × icon labelled "Close"); otherwise render your own `Button`.
|
|
100
|
+
*/
|
|
101
|
+
export declare function Close(props: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export declare namespace Close {
|
|
103
|
+
var displayName: string;
|
|
104
|
+
}
|
|
105
|
+
type ComposedProps = Omit<React.ComponentProps<typeof DialogPrimitive.Root>, "children"> & {
|
|
106
|
+
/** Heading of the dialog. */
|
|
107
|
+
title: React.ReactNode;
|
|
108
|
+
/** Short uppercase label above the title. */
|
|
109
|
+
eyebrow?: React.ReactNode;
|
|
110
|
+
/** Line of context under the title. */
|
|
111
|
+
description?: React.ReactNode;
|
|
112
|
+
/** Adds a `Dialog.Status` with this variant at the start of the popup. */
|
|
113
|
+
status?: NonNullable<VariantProps<typeof dialogStatus>["variant"]>;
|
|
114
|
+
/**
|
|
115
|
+
* Colour of the header band.
|
|
116
|
+
*/
|
|
117
|
+
headerVariant?: HeaderVariant;
|
|
118
|
+
/**
|
|
119
|
+
* Width of the window.
|
|
120
|
+
*/
|
|
121
|
+
size?: PopupProps["size"];
|
|
122
|
+
/**
|
|
123
|
+
* Content of the footer, usually buttons. The footer renders only when this is set, and then replaces the header's
|
|
124
|
+
* close button, so include a way out such as a Cancel `Dialog.Close`.
|
|
125
|
+
*/
|
|
126
|
+
actions?: React.ReactNode;
|
|
127
|
+
/** Content of the body. */
|
|
128
|
+
children?: React.ReactNode;
|
|
129
|
+
};
|
|
130
|
+
type SimpleProps = ComposedProps & {
|
|
131
|
+
/** Element rendered as the trigger, such as a `Button`. Omit it for a controlled dialog. */
|
|
132
|
+
trigger?: React.ReactElement;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Dialog.Simple — pre-composed dialog: trigger, header with title, description, and optional status, a scrolling body,
|
|
136
|
+
* and either a close button in the header or a footer of `actions`. Root props pass through.
|
|
137
|
+
*/
|
|
138
|
+
export declare function Simple({ trigger, headerVariant, size, ...props }: SimpleProps): import("react/jsx-runtime").JSX.Element;
|
|
139
|
+
export declare namespace Simple {
|
|
140
|
+
var displayName: string;
|
|
141
|
+
}
|
|
142
|
+
type InlineProps = ComposedProps & {
|
|
143
|
+
/** Text of the trigger, set as an inline term inside running prose. */
|
|
144
|
+
trigger: React.ReactNode;
|
|
145
|
+
};
|
|
146
|
+
/** Dialog.Inline — like Dialog.Simple, but the trigger is text inside a sentence. */
|
|
147
|
+
export declare function Inline({ trigger, headerVariant, size, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
148
|
+
export declare namespace Inline {
|
|
149
|
+
var displayName: string;
|
|
150
|
+
}
|
|
151
|
+
export {};
|
|
@@ -63,7 +63,7 @@ export declare namespace Popup {
|
|
|
63
63
|
var displayName: string;
|
|
64
64
|
}
|
|
65
65
|
/** Drawer.Content — scrollable content wrapper inside the popup. */
|
|
66
|
-
export declare function Content(props: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function Content({ children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
export declare namespace Content {
|
|
68
68
|
var displayName: string;
|
|
69
69
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProductLogo } from './product';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product logo geometry. The plate is shared; each product adds its name as a separate path so the
|
|
3
|
+
* name can be filled on its own or cut out of the plate. Not exported from the package.
|
|
4
|
+
*/
|
|
5
|
+
export declare const productViewBox = "0 0 842.21 335.39";
|
|
6
|
+
export declare const productPlate = "M842.21,99.26L742.95,0L0,0L0,236.13L99.26,335.39L842.21,335.39Z";
|
|
7
|
+
export declare const productWords: {
|
|
8
|
+
labels: string;
|
|
9
|
+
suite: string;
|
|
10
|
+
sdk: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Logo } from '../logo';
|
|
2
|
+
import { productWords } from './marks';
|
|
3
|
+
type LogoVariant = NonNullable<React.ComponentProps<typeof Logo>["variant"]>;
|
|
4
|
+
type Props = Omit<React.ComponentProps<typeof Logo>, "src" | "alt" | "variant"> & {
|
|
5
|
+
product: keyof typeof productWords;
|
|
6
|
+
/** Cut the product name out of the plate so the background shows through. */
|
|
7
|
+
cutout?: boolean;
|
|
8
|
+
/** Override the accessible label. Defaults to the product name, e.g. "ImFusion SDK". */
|
|
9
|
+
alt?: string;
|
|
10
|
+
variant?: Exclude<LogoVariant, "minor">;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* An ImFusion product logo (Labels, Suite, SDK) — the generic {@link Logo} primitive pre-wired
|
|
14
|
+
* with the product plate. The name is filled to contrast with the plate unless `cutout` is set.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ProductLogo({ product, cutout, alt, variant, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';
|
|
2
|
+
/**
|
|
3
|
+
* ScrollArea.Root — groups the viewport and its scrollbars. Give it a height or max-height.
|
|
4
|
+
*
|
|
5
|
+
* @see https://base-ui.com/react/components/scroll-area
|
|
6
|
+
* @llm https://base-ui.com/react/components/scroll-area.md
|
|
7
|
+
*/
|
|
8
|
+
export declare function Root(props: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace Root {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
/** ScrollArea.Viewport — the scrolling box. It fades its content out at each edge with more to scroll. */
|
|
13
|
+
export declare function Viewport(props: React.ComponentProps<typeof ScrollAreaPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare namespace Viewport {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
/** ScrollArea.Content — wraps the scrolled content so the viewport can measure it. */
|
|
18
|
+
export declare function Content(props: React.ComponentProps<typeof ScrollAreaPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace Content {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
/** ScrollArea.Scrollbar — overlay bar that shows while the area is hovered or scrolling. */
|
|
23
|
+
export declare function Scrollbar(props: React.ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace Scrollbar {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
/** ScrollArea.Thumb — the draggable part of the scrollbar. */
|
|
28
|
+
export declare function Thumb(props: React.ComponentProps<typeof ScrollAreaPrimitive.Thumb>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare namespace Thumb {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
/** ScrollArea.Corner — the square where a vertical and a horizontal scrollbar meet. */
|
|
33
|
+
export declare function Corner(props: React.ComponentProps<typeof ScrollAreaPrimitive.Corner>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare namespace Corner {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
interface AutoProps extends React.ComponentProps<typeof ScrollAreaPrimitive.Root> {
|
|
38
|
+
/**
|
|
39
|
+
* Which scrollbars to render. `both` also adds the Corner; `none` scrolls and fades without a visible bar.
|
|
40
|
+
* @default 'vertical'
|
|
41
|
+
*/
|
|
42
|
+
orientation?: "vertical" | "horizontal" | "both" | "none";
|
|
43
|
+
}
|
|
44
|
+
/** ScrollArea.Auto — Root, Viewport, Content, and the scrollbars for `orientation`, around `children`. */
|
|
45
|
+
export declare function Auto({ orientation, children, ...props }: AutoProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare namespace Auto {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
type UpstreamItem = React.ComponentProps<typeof SelectPrimitive.Item>;
|
|
4
|
+
declare const selectRoot: (props?: ({
|
|
5
|
+
width?: "auto" | "full" | "wide" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
3
7
|
interface RootProps<Value = unknown, Multiple extends boolean | undefined = false> extends React.ComponentProps<typeof SelectPrimitive.Root<Value, Multiple>> {
|
|
8
|
+
/** Trigger width: `auto` keeps the compact minimum; `wide` raises it; `full` fills the parent. @default "auto" */
|
|
9
|
+
width?: VariantProps<typeof selectRoot>["width"];
|
|
4
10
|
}
|
|
5
11
|
/**
|
|
6
12
|
* Select.Root — accessible select / listbox primitive.
|
|
@@ -12,7 +18,7 @@ interface RootProps<Value = unknown, Multiple extends boolean | undefined = fals
|
|
|
12
18
|
* @doc https://base-ui.com/react/components/select
|
|
13
19
|
* @llm https://base-ui.com/react/components/select.md
|
|
14
20
|
*/
|
|
15
|
-
export declare function Root<Value = unknown, Multiple extends boolean | undefined = false>({ className, style, ...props }: RootProps<Value, Multiple> & {
|
|
21
|
+
export declare function Root<Value = unknown, Multiple extends boolean | undefined = false>({ width, className, style, ...props }: RootProps<Value, Multiple> & {
|
|
16
22
|
className?: string;
|
|
17
23
|
style?: React.CSSProperties;
|
|
18
24
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -50,7 +56,7 @@ export declare namespace Backdrop {
|
|
|
50
56
|
var displayName: string;
|
|
51
57
|
}
|
|
52
58
|
/** Select.Positioner — positions the popup relative to the trigger. */
|
|
53
|
-
export declare function Positioner({ align, alignItemWithTrigger, ...props }: React.ComponentProps<typeof SelectPrimitive.Positioner>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare function Positioner({ align, alignItemWithTrigger, sideOffset, ...props }: React.ComponentProps<typeof SelectPrimitive.Positioner>): import("react/jsx-runtime").JSX.Element;
|
|
54
60
|
export declare namespace Positioner {
|
|
55
61
|
var displayName: string;
|
|
56
62
|
}
|
|
@@ -77,8 +83,8 @@ export declare function Item(props: ItemProps): import("react/jsx-runtime").JSX.
|
|
|
77
83
|
export declare namespace Item {
|
|
78
84
|
var displayName: string;
|
|
79
85
|
}
|
|
80
|
-
/** Select.ItemIndicator —
|
|
81
|
-
export declare function ItemIndicator(props: React.ComponentProps<typeof SelectPrimitive.ItemIndicator>): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
/** Select.ItemIndicator — marker inside the selected item. Without children it draws a check icon in the item's text colour. */
|
|
87
|
+
export declare function ItemIndicator({ children, ...props }: React.ComponentProps<typeof SelectPrimitive.ItemIndicator>): import("react/jsx-runtime").JSX.Element;
|
|
82
88
|
export declare namespace ItemIndicator {
|
|
83
89
|
var displayName: string;
|
|
84
90
|
}
|
|
@@ -87,6 +93,14 @@ export declare function ItemText(props: React.ComponentProps<typeof SelectPrimit
|
|
|
87
93
|
export declare namespace ItemText {
|
|
88
94
|
var displayName: string;
|
|
89
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Select.ItemDescription — a muted second line under an item's text, such as what a role allows. It stays out of the
|
|
98
|
+
* trigger, which shows only `Select.ItemText`.
|
|
99
|
+
*/
|
|
100
|
+
export declare function ItemDescription(props: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
export declare namespace ItemDescription {
|
|
102
|
+
var displayName: string;
|
|
103
|
+
}
|
|
90
104
|
/** Select.Group — wrapper around a grouped set of items. */
|
|
91
105
|
export declare function Group(props: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
92
106
|
export declare namespace Group {
|
|
@@ -2,14 +2,16 @@ import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const separator: (props?: ({
|
|
4
4
|
variant?: "solid" | "dashed" | "dotted" | null | undefined;
|
|
5
|
+
tone?: "minor" | "primary" | null | undefined;
|
|
5
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
7
|
interface Props extends React.ComponentProps<typeof SeparatorPrimitive>, VariantProps<typeof separator> {
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
|
-
* Separator — visual divider between content sections.
|
|
10
|
+
* Separator — visual divider between content sections. `tone="minor"` draws a neutral line for a quiet break inside a
|
|
11
|
+
* page; the default primary line marks a stronger division.
|
|
10
12
|
*
|
|
11
13
|
* @see https://base-ui.com/react/components/separator
|
|
12
14
|
* @llm https://base-ui.com/react/components/separator.md
|
|
13
15
|
*/
|
|
14
|
-
export declare function Separator({ orientation, variant, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Separator({ orientation, variant, tone, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export {};
|
|
@@ -10,7 +10,7 @@ type RootProps = useRender.ComponentProps<"div"> & {
|
|
|
10
10
|
/**
|
|
11
11
|
* Skeleton.Root — marks a region as loading. The view inside renders for real; bones stand in for the data. While
|
|
12
12
|
* `loading`, sets `aria-busy` and announces `label` once, however many bones it holds. When `loading` turns false, the
|
|
13
|
-
* data fades in
|
|
13
|
+
* data fades in.
|
|
14
14
|
*/
|
|
15
15
|
declare function Root({ label, loading, animation, render, children, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare namespace Root {
|
|
@@ -47,4 +47,19 @@ declare function Block({ width, shape, height, style, ...props }: BlockProps): i
|
|
|
47
47
|
declare namespace Block {
|
|
48
48
|
var displayName: string;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
type SuspenseProps = {
|
|
51
|
+
/** Bones shown while the children suspend. */
|
|
52
|
+
fallback: React.ReactNode;
|
|
53
|
+
/** Announced once through a visually hidden status while the fallback shows. */
|
|
54
|
+
label: string;
|
|
55
|
+
children: React.ReactNode;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Skeleton.Suspense — a Suspense boundary whose fallback is bones in a busy Root. When the children mount after the
|
|
59
|
+
* fallback showed, they fade in over it. Content that was ready without suspending mounts without a fade.
|
|
60
|
+
*/
|
|
61
|
+
declare function Suspense({ fallback, label, children }: SuspenseProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare namespace Suspense {
|
|
63
|
+
var displayName: string;
|
|
64
|
+
}
|
|
65
|
+
export { Root, Text, Block, Suspense };
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
-
type
|
|
2
|
+
type CellActionProps = {
|
|
3
|
+
/** Marks an action column: it shrinks to its content and keeps it on one line. */
|
|
4
|
+
action?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type HeaderCellProps = React.ComponentProps<"th"> & CellActionProps;
|
|
7
|
+
type RootProps = React.ComponentProps<"table"> & {
|
|
8
|
+
/** Cell padding: `compact` for dense data, `spacious` for a few rows at a glance. */
|
|
9
|
+
density?: "compact" | "comfortable" | "spacious";
|
|
10
|
+
};
|
|
3
11
|
/** Table.Root — the `<table>` element. */
|
|
4
|
-
export declare function Root(props:
|
|
12
|
+
export declare function Root({ density, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
5
13
|
export declare namespace Root {
|
|
6
14
|
var displayName: string;
|
|
7
15
|
}
|
|
@@ -21,12 +29,12 @@ export declare namespace Row {
|
|
|
21
29
|
var displayName: string;
|
|
22
30
|
}
|
|
23
31
|
/** Table.HeaderCell — a `<th>` header cell. */
|
|
24
|
-
export declare function HeaderCell(props: HeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function HeaderCell({ action, ...props }: HeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
25
33
|
export declare namespace HeaderCell {
|
|
26
34
|
var displayName: string;
|
|
27
35
|
}
|
|
28
36
|
/** Table.Cell — a `<td>` data cell. */
|
|
29
|
-
export declare function Cell(props: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function Cell({ action, ...props }: React.ComponentProps<"td"> & CellActionProps): import("react/jsx-runtime").JSX.Element;
|
|
30
38
|
export declare namespace Cell {
|
|
31
39
|
var displayName: string;
|
|
32
40
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
|
|
2
|
-
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const toggle: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
interface Props extends React.ComponentProps<typeof TogglePrimitive>, VariantProps<typeof toggle> {
|
|
3
7
|
/**
|
|
4
8
|
* Key hint shown in the top corner at the end of the line, such as `"P"` or `"Ctrl Z"`. It also sets
|
|
5
9
|
* `aria-keyshortcuts` in its notation (`Control+Z`), which an explicit
|
|
6
10
|
* `aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys.
|
|
7
11
|
*/
|
|
8
12
|
shortcut?: string;
|
|
13
|
+
/** Defaults to the enclosing `ToggleGroup`'s `size`, or `"md"` standalone. */
|
|
14
|
+
size?: VariantProps<typeof toggle>["size"];
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* Toggle - a two-state button. Use standalone for a
|
|
@@ -15,5 +21,5 @@ interface Props extends React.ComponentProps<typeof TogglePrimitive> {
|
|
|
15
21
|
* @doc https://base-ui.com/react/components/toggle
|
|
16
22
|
* @llm https://base-ui.com/react/components/toggle.md
|
|
17
23
|
*/
|
|
18
|
-
export declare function Toggle({ style, shortcut, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function Toggle({ style, shortcut, size, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
export {};
|