@imfusion/web-ui 0.10.1-dev.2.gb6347f49 → 0.10.1-dev.33.g8275f59f
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 +161 -0
- package/README.md +4 -2
- 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 +21 -11
- package/dist/components/callout/callout.d.ts +1 -1
- package/dist/components/chip/chip.d.ts +1 -1
- package/dist/components/dialog/dialog.d.ts +148 -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/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/skeleton/skeleton.d.ts +17 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2244 -1842
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/frame-selection.js +1 -1
- package/dist/integrations/image-display-options.js +121 -111
- package/dist/{rolldown-runtime-Dy4uBu1J.js → resolve-state-props-DQf9WiGv.js} +12 -1
- package/dist/scroll-area-z9Lf9uIk.js +89 -0
- package/dist/slider-Bf274cMe.js +106 -0
- package/dist/style.css +1 -1
- package/dist/{tabs-DRyqtS04.js → tabs-Do0BFL12.js} +31 -32
- package/package.json +2 -2
- package/src/docgen/doc.gen.json +1153 -46
- package/src/llms/llms.gen.txt +13 -1
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +15 -10
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +3 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +2 -3
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +4 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +24 -5
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +5 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +11 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +6 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +3 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +2 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +2 -0
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +2 -1
- package/src/llms/tokens.gen.json +1 -1
- package/dist/code-BYkr5k55.js +0 -134
- package/dist/slider-Cqpreglu.js +0 -116
|
@@ -0,0 +1,148 @@
|
|
|
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 (an × 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
|
+
/** Content of the footer, usually buttons. The footer renders only when this is set. */
|
|
123
|
+
actions?: React.ReactNode;
|
|
124
|
+
/** Content of the body. */
|
|
125
|
+
children?: React.ReactNode;
|
|
126
|
+
};
|
|
127
|
+
type SimpleProps = ComposedProps & {
|
|
128
|
+
/** Element rendered as the trigger, such as a `Button`. Omit it for a controlled dialog. */
|
|
129
|
+
trigger?: React.ReactElement;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Dialog.Simple — pre-composed dialog: trigger, header with title, description, optional status and close button, a
|
|
133
|
+
* scrolling body, and an optional footer. Root props pass through.
|
|
134
|
+
*/
|
|
135
|
+
export declare function Simple({ trigger, headerVariant, size, ...props }: SimpleProps): import("react/jsx-runtime").JSX.Element;
|
|
136
|
+
export declare namespace Simple {
|
|
137
|
+
var displayName: string;
|
|
138
|
+
}
|
|
139
|
+
type InlineProps = ComposedProps & {
|
|
140
|
+
/** Text of the trigger, set as an inline term inside running prose. */
|
|
141
|
+
trigger: React.ReactNode;
|
|
142
|
+
};
|
|
143
|
+
/** Dialog.Inline — like Dialog.Simple, but the trigger is text inside a sentence. */
|
|
144
|
+
export declare function Inline({ trigger, headerVariant, size, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare namespace Inline {
|
|
146
|
+
var displayName: string;
|
|
147
|
+
}
|
|
148
|
+
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,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 {};
|
|
@@ -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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,10 +15,12 @@ export { Toggle, toggleMeta } from './components/toggle';
|
|
|
15
15
|
export { ToggleGroup, toggleGroupMeta } from './components/toggle-group';
|
|
16
16
|
export { AppShell, appShellMeta } from './components/app-shell';
|
|
17
17
|
export { Card, cardMeta } from './components/card';
|
|
18
|
+
export { Dialog, dialogMeta } from './components/dialog';
|
|
18
19
|
export { Drawer, drawerMeta } from './components/drawer';
|
|
19
20
|
export { Popover, popoverMeta } from './components/popover';
|
|
20
21
|
export { Prose, proseMeta } from './components/prose';
|
|
21
22
|
export { Row, rowMeta } from './components/row';
|
|
23
|
+
export { ScrollArea, scrollAreaMeta } from './components/scroll-area';
|
|
22
24
|
export { Separator, separatorMeta } from './components/separator';
|
|
23
25
|
export { Stack, stackMeta } from './components/stack';
|
|
24
26
|
export { AccountCard, accountCardMeta } from './components/account-card';
|
|
@@ -45,6 +47,7 @@ export { useClipboard, useColorScheme, useMediaQuery } from './hooks';
|
|
|
45
47
|
export type { UseClipboardOptions, UseMediaQueryOptions } from './hooks';
|
|
46
48
|
export { cva, cx } from 'class-variance-authority';
|
|
47
49
|
export { initialsFromEmail, splitEmail } from './utils/email';
|
|
50
|
+
export { withBreakHints } from './utils/break-hints';
|
|
48
51
|
export { config } from './config';
|
|
49
52
|
export type { ColorScheme, ColorSchemePreference } from './types/theme';
|
|
50
53
|
export type { ComponentMeta, ComponentCategory, ComponentCategoryId, ComponentStatus } from './types/meta';
|