@imfusion/web-ui 0.6.4-dev.7.g1840f300 → 0.6.4-dev.84.gbfc0d437
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/README.md +19 -55
- package/dist/assets/vendors/base-ui.d.ts +2 -3
- package/dist/breakpoints/min-width.d.ts +3 -7
- package/dist/breakpoints/registry.d.ts +3 -9
- package/dist/{code-Ce8uiPsv.js → code-D2lwxHgd.js} +15 -15
- package/dist/codegen/gen-breakpoints-css.d.ts +0 -4
- package/dist/codegen/gen-token-css.d.ts +0 -2
- package/dist/components/app-shell/app-shell.d.ts +7 -11
- package/dist/components/button/button.d.ts +7 -12
- package/dist/components/callout/callout.d.ts +11 -18
- package/dist/components/card/card.d.ts +11 -10
- package/dist/components/checkbox/checkbox.d.ts +2 -38
- package/dist/components/chip/chip.cva.d.ts +2 -4
- package/dist/components/chip/chip.d.ts +1 -1
- package/dist/components/code/code.d.ts +2 -2
- package/dist/components/collapsible/collapsible.d.ts +4 -35
- package/dist/components/copy-button/copy-button.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +17 -100
- package/dist/components/field/field.d.ts +7 -67
- package/dist/components/fieldset/fieldset.d.ts +2 -15
- package/dist/components/icon/icon.d.ts +2 -2
- package/dist/components/input/input.d.ts +2 -8
- package/dist/components/logo/imfusion/imfusion.d.ts +2 -5
- package/dist/components/logo/imfusion/marks.d.ts +10 -0
- package/dist/components/logo/logo.d.ts +3 -3
- package/dist/components/navigation-menu/subs/flyout-link.d.ts +5 -19
- package/dist/components/navigation-menu/subs/inline-submenu.d.ts +2 -4
- package/dist/components/navigation-menu/subs/link.d.ts +6 -23
- package/dist/components/navigation-menu/subs/overlay.d.ts +6 -51
- package/dist/components/navigation-menu/subs/shared.d.ts +4 -14
- package/dist/components/navigation-menu/subs/structure.d.ts +7 -29
- package/dist/components/navigation-menu/subs/trigger.d.ts +11 -20
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/number-field.d.ts +72 -0
- package/dist/components/number-field/number-field.meta.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +23 -98
- package/dist/components/row/row.d.ts +1 -1
- package/dist/components/select/select.d.ts +26 -189
- package/dist/components/separator/separator.d.ts +5 -4
- package/dist/components/slider/slider.d.ts +7 -77
- package/dist/components/spinner/spinner.d.ts +13 -8
- package/dist/components/stack/stack.d.ts +3 -4
- package/dist/components/switch/switch.d.ts +2 -31
- package/dist/components/table/table.d.ts +10 -18
- package/dist/components/tabs/tabs.d.ts +18 -52
- package/dist/components/toast/toast.d.ts +16 -103
- package/dist/components/toggle/toggle.d.ts +3 -21
- package/dist/components/toggle-group/toggle-group.d.ts +3 -20
- package/dist/components/tooltip/tooltip.d.ts +26 -85
- package/dist/components/typo/typo.d.ts +25 -25
- package/dist/docgen/gen-docgen.utils.d.ts +3 -4
- package/dist/hooks/use-color-scheme.d.ts +5 -11
- package/dist/hooks/use-media-query.d.ts +2 -7
- package/dist/{icons-Cy1HAosO.js → icons-CaGCCwG-.js} +7 -7
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1486 -1368
- package/dist/integrations/code-highlight/highlighter.d.ts +1 -56
- package/dist/integrations/code-highlight.js +41 -189
- package/dist/integrations/image-display-options/image-display-options-view.utils.d.ts +0 -1
- package/dist/integrations/image-display-options.js +54 -54
- package/dist/llms/evals/runner/affected.d.ts +2 -0
- package/dist/llms/evals/runner/benchmark.d.ts +12 -0
- package/dist/llms/evals/runner/compare.d.ts +2 -0
- package/dist/llms/evals/runner/config.d.ts +29 -0
- package/dist/llms/evals/runner/evidence.d.ts +7 -0
- package/dist/llms/evals/runner/execute.d.ts +32 -0
- package/dist/llms/evals/runner/grade.d.ts +10 -0
- package/dist/llms/evals/runner/report-md.d.ts +2 -0
- package/dist/llms/evals/runner/report.d.ts +4 -0
- package/dist/llms/evals/runner/run.d.ts +2 -0
- package/dist/llms/evals/runner/scenario.d.ts +3 -0
- package/dist/llms/evals/runner/types.d.ts +140 -0
- package/dist/llms/evals/runner/workspace.d.ts +2 -0
- package/dist/llms/evals/runner/write-generated.d.ts +1 -0
- package/dist/provider/web-ui-provider.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/{tabs-DIe1Utiy.js → tabs-By5ir2pt.js} +162 -159
- package/dist/tokens/apply.d.ts +4 -9
- package/dist/tokens/control-registry.d.ts +3 -6
- package/dist/tokens/types.d.ts +7 -24
- package/dist/tokens/use-token-controls.d.ts +3 -12
- package/dist/types/meta.d.ts +15 -32
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/resolve-state-props.d.ts +4 -0
- package/dist/vite/brand-assets.d.ts +3 -0
- package/dist/vite/index.d.ts +2 -0
- package/dist/vite/readable-css-module-names.d.ts +11 -0
- package/dist/vite.js +55 -0
- package/dist/web-ui-cli.js +322 -0
- package/docs/user-guide/AgentTooling.mdx +127 -0
- package/docs/user-guide/BrandAssets.mdx +102 -0
- package/docs/user-guide/Changelog.mdx +23 -0
- package/docs/user-guide/GettingStarted.mdx +70 -0
- package/docs/user-guide/HowItsBuilt.mdx +113 -0
- package/docs/user-guide/Tokens.mdx +87 -0
- package/docs/user-guide/UsagePatterns.mdx +122 -0
- package/package.json +27 -22
- package/src/assets/public/favicon/apple-touch-icon.png +0 -0
- package/src/assets/public/favicon/favicon-16.png +0 -0
- package/src/assets/public/favicon/favicon-32.png +0 -0
- package/src/assets/public/favicon/favicon.ico +0 -0
- package/src/assets/public/favicon/favicon.svg +7 -0
- package/src/assets/public/favicon/icon-192.png +0 -0
- package/src/assets/public/favicon/icon-512.png +0 -0
- package/src/assets/public/favicon/og-image.png +0 -0
- package/src/assets/public/spinner/imfusion-spinner-black.webp +0 -0
- package/src/assets/public/spinner/imfusion-spinner-blue.webp +0 -0
- package/src/assets/public/spinner/imfusion-spinner-white.webp +0 -0
- package/src/docgen/doc.gen.json +3255 -603
- package/src/llms/install-templates/AGENTS.md +4 -4
- package/src/llms/install-templates/hooks/baseline-staleness.sh +9 -2
- package/src/llms/llms.gen.txt +7 -1
- package/src/llms/skills/imf-web-ui/SKILL.md +44 -21
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +25 -11
- package/src/llms/skills/imf-web-ui-components/SKILL.md +4 -1
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +2 -2
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
- package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +21 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +15 -10
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +7 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +3 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +2 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +4 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +10 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +2 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -2
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +13 -11
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +17 -9
- package/src/llms/skills/imf-web-ui-update/SKILL.md +36 -14
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +5 -3
- package/src/llms/tokens.gen.json +71 -7
- package/bin/install.js +0 -446
- package/dist/build/vite-css-module-names/index.d.ts +0 -20
- package/dist/build/vite-css-module-names.js +0 -17
- package/dist/components/spinner/spinner.geometry.d.ts +0 -37
- package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
- package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
- /package/dist/{meta-CySnRuVp.js → meta-j-7HGrWv.js} +0 -0
package/README.md
CHANGED
|
@@ -28,48 +28,13 @@ To follow builds from `master`, use the `dev` dist-tag:
|
|
|
28
28
|
npm install @imfusion/web-ui@dev
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```tsx
|
|
34
|
-
import "@imfusion/web-ui/styles.css";
|
|
35
|
-
import { WebUIProvider } from "@imfusion/web-ui";
|
|
36
|
-
|
|
37
|
-
export function App() {
|
|
38
|
-
return <WebUIProvider>{/* app */}</WebUIProvider>;
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Agent skills
|
|
43
|
-
|
|
44
|
-
The package can install optional skills for agents working in a consumer project:
|
|
45
|
-
|
|
46
|
-
```sh
|
|
47
|
-
npx web-ui-install
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Run the command again after updating the package. It refreshes the skills already installed in the project. Use
|
|
51
|
-
`--reconfigure` to choose a different target. Add `--hooks` to install the lifecycle hooks for Claude Code and Codex.
|
|
52
|
-
|
|
53
|
-
Start with `/imf-web-ui`. It routes a task to the companion skills it needs, or tells the agent to work without extra
|
|
54
|
-
guidance.
|
|
55
|
-
|
|
56
|
-
| Skill | Use it for |
|
|
57
|
-
| ------------------------- | ------------------------------------------------------------ |
|
|
58
|
-
| `/imf-web-ui` | Route UI work to the right companion. |
|
|
59
|
-
| `/imf-web-ui-setup` | Plan library wiring, project setup, or tooling changes. |
|
|
60
|
-
| `/imf-web-ui-components` | Look up component and icon APIs. |
|
|
61
|
-
| `/imf-web-ui-ux` | Choose components and shape screens and flows. |
|
|
62
|
-
| `/imf-web-ui-conventions` | Follow the frontend conventions and token seams. |
|
|
63
|
-
| `/imf-web-ui-audit` | Inspect an existing frontend without changing it. |
|
|
64
|
-
| `/imf-web-ui-update` | Update the package, skills, and hooks in a consumer project. |
|
|
65
|
-
|
|
66
|
-
The shipped [`agent-tooling` topic](./src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md) explains the hook
|
|
67
|
-
installation and Codex trust step.
|
|
31
|
+
[Getting Started](./docs/user-guide/GettingStarted.mdx) covers the setup, with or without an agent.
|
|
32
|
+
[Agent Tooling](./docs/user-guide/AgentTooling.mdx) covers the skills and hooks the package ships for coding agents.
|
|
68
33
|
|
|
69
34
|
### Versions
|
|
70
35
|
|
|
71
|
-
Use a release version or range for normal development
|
|
72
|
-
library:
|
|
36
|
+
Use a release version or range for normal development, or follow `master` through the `dev` dist-tag while building against
|
|
37
|
+
the library:
|
|
73
38
|
|
|
74
39
|
| Dependency spec | Resolves to | Update with |
|
|
75
40
|
| --------------- | -------------------------------- | ----------------------------- |
|
|
@@ -85,7 +50,7 @@ copy, so it never updates by itself.
|
|
|
85
50
|
## Read the docs
|
|
86
51
|
|
|
87
52
|
[Storybook](https://storybook.js.org/) is the project documentation. It contains the setup guide, usage patterns, token
|
|
88
|
-
reference, and component examples. It
|
|
53
|
+
reference, and component examples. It runs locally from this repository:
|
|
89
54
|
|
|
90
55
|
```sh
|
|
91
56
|
npm run dev
|
|
@@ -105,18 +70,17 @@ npm run git:config
|
|
|
105
70
|
|
|
106
71
|
The main development skills are:
|
|
107
72
|
|
|
108
|
-
| Skill
|
|
109
|
-
|
|
|
110
|
-
| `/web-ui-dev-getting-started`
|
|
111
|
-
| `/web-ui-dev-start`
|
|
112
|
-
| `/web-ui-dev-new-component`
|
|
113
|
-
| `/web-ui-dev-update-component`
|
|
114
|
-
| `/web-ui-dev-design-component`
|
|
115
|
-
| `/web-ui-dev-story`
|
|
116
|
-
| `/web-ui-dev-commit`
|
|
117
|
-
| `/web-ui-dev-release`
|
|
118
|
-
| `/web-ui-dev-audit-docs`
|
|
119
|
-
| `/web-ui-dev-
|
|
120
|
-
| `/web-ui-dev-
|
|
121
|
-
| `/web-ui-dev-
|
|
122
|
-
| `/web-ui-dev-mcp` | Recover one optional MCP capability. |
|
|
73
|
+
| Skill | Use it for |
|
|
74
|
+
| -------------------------------- | ------------------------------------------------ |
|
|
75
|
+
| `/web-ui-dev-getting-started` | Route a first task based on experience and goal. |
|
|
76
|
+
| `/web-ui-dev-start` | Establish task context and working location. |
|
|
77
|
+
| `/web-ui-dev-new-component` | Add a primitive. |
|
|
78
|
+
| `/web-ui-dev-update-component` | Change an existing primitive. |
|
|
79
|
+
| `/web-ui-dev-design-component` | Apply the ImFusion brand to a component. |
|
|
80
|
+
| `/web-ui-dev-story` | Author a Storybook story. |
|
|
81
|
+
| `/web-ui-dev-commit` | Verify and commit a change. |
|
|
82
|
+
| `/web-ui-dev-release` | Prepare and ship a release. |
|
|
83
|
+
| `/web-ui-dev-audit-docs` | Check docs for drift before a commit. |
|
|
84
|
+
| `/web-ui-dev-claude-design-sync` | Update the design system in Claude Design. |
|
|
85
|
+
| `/web-ui-dev-teardown-worktree` | Remove a finished worktree. |
|
|
86
|
+
| `/web-ui-dev-mcp` | Recover one optional MCP capability. |
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* components. New upstreams (Mantine, …) get a sibling file here.
|
|
2
|
+
* Internal asset (not part of the public package API), consumed by the Storybook origin badge
|
|
3
|
+
* to flag adapted components. New upstreams get a sibling file here.
|
|
5
4
|
*/
|
|
6
5
|
export declare function BaseUILogo({ size }: {
|
|
7
6
|
size?: number;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { BreakpointName } from './registry';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Keeps JS-side viewport checks (e.g. a mobile burger toggle) reading from the
|
|
7
|
-
* same numeric source as the CSS-side `@custom-media` definitions.
|
|
8
|
-
*/
|
|
2
|
+
/** Resolves a registry breakpoint name to the media-query string `useMediaQuery` expects, e.g.
|
|
3
|
+
* `minWidth("md")` → `"(min-width: 768px)"`. Keeps JS viewport checks reading from the same numeric
|
|
4
|
+
* source as the CSS-side `@custom-media` definitions. */
|
|
9
5
|
export declare function minWidth(name: BreakpointName): string;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* `
|
|
5
|
-
* runner (see `./gen-breakpoints-css.ts`), so CSS and JS can never drift.
|
|
6
|
-
*
|
|
7
|
-
* Values are min-width breakpoints (mobile-first). Component CSS consumes them
|
|
8
|
-
* via `@media (--imf-ui-{name})`; Lightning CSS substitutes the literal at
|
|
9
|
-
* build time (`drafts.customMedia`, enabled in `vite.config.ts` and
|
|
10
|
-
* `.storybook/main.ts`).
|
|
2
|
+
* The single source of truth for every `@custom-media --imf-ui-*` definition and the
|
|
3
|
+
* `minWidth()` JS helper. `src/styles/custom-media.gen.css` is generated from this list
|
|
4
|
+
* by `src/codegen/gen-breakpoints-css.ts`, so CSS and JS can never drift.
|
|
11
5
|
*/
|
|
12
6
|
export declare const BREAKPOINTS: {
|
|
13
7
|
readonly mobile: 375;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
-
import { t } from "./meta-
|
|
3
|
-
import { Ma as n, Xo as r, r as i } from "./icons-
|
|
2
|
+
import { t } from "./meta-j-7HGrWv.js";
|
|
3
|
+
import { Ma as n, Xo as r, r as i } from "./icons-CaGCCwG-.js";
|
|
4
4
|
import { cx as a } from "class-variance-authority";
|
|
5
5
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
6
|
import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
|
|
@@ -32,28 +32,28 @@ var g = {
|
|
|
32
32
|
Inline: () => v,
|
|
33
33
|
InlineLink: () => y
|
|
34
34
|
});
|
|
35
|
-
function v({
|
|
36
|
-
let { copied:
|
|
35
|
+
function v({ copyable: e = !1, children: t, render: a, ...l }) {
|
|
36
|
+
let { copied: u, copy: f } = h(), _ = d(null), v = u ? n : r;
|
|
37
37
|
return m({
|
|
38
38
|
defaultTagName: "code",
|
|
39
|
-
render:
|
|
39
|
+
render: a,
|
|
40
40
|
props: {
|
|
41
|
-
...p(
|
|
42
|
-
className:
|
|
41
|
+
...p(l, {
|
|
42
|
+
className: g.inline,
|
|
43
43
|
children: /* @__PURE__ */ c(o, { children: [
|
|
44
44
|
/* @__PURE__ */ s("span", {
|
|
45
|
-
ref:
|
|
46
|
-
children:
|
|
45
|
+
ref: _,
|
|
46
|
+
children: t
|
|
47
47
|
}),
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
e && /* @__PURE__ */ s("span", { className: g.separator }),
|
|
49
|
+
e && /* @__PURE__ */ s("button", {
|
|
50
50
|
type: "button",
|
|
51
51
|
className: g.inlineCopy,
|
|
52
|
-
"data-copied":
|
|
53
|
-
"aria-label":
|
|
54
|
-
onClick: () =>
|
|
52
|
+
"data-copied": u || void 0,
|
|
53
|
+
"aria-label": u ? "Copied" : "Copy",
|
|
54
|
+
onClick: () => f(_.current?.textContent ?? ""),
|
|
55
55
|
children: /* @__PURE__ */ s(i, {
|
|
56
|
-
glyph:
|
|
56
|
+
glyph: v,
|
|
57
57
|
size: 12,
|
|
58
58
|
strokeWidth: 2,
|
|
59
59
|
"aria-hidden": !0
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Token } from '../tokens/types';
|
|
2
|
-
/** Render `token-controls.gen.css` — every non-font token's `:root` declarations, in registry order. */
|
|
3
2
|
export declare function renderColorTokensCss(registry?: readonly Token[]): string;
|
|
4
|
-
/** Render `font-families.gen.css` — the `--imf-ui-font-family-*` tokens, base stacks and aliases. */
|
|
5
3
|
export declare function renderFontTokensCss(registry?: readonly Token[]): string;
|
|
6
4
|
export declare function writeTokenCss(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
type RootProps = React.HTMLAttributes<HTMLDivElement>;
|
|
2
1
|
/**
|
|
3
2
|
* AppShell — application layout shell.
|
|
4
3
|
*
|
|
@@ -20,12 +19,11 @@ type RootProps = React.HTMLAttributes<HTMLDivElement>;
|
|
|
20
19
|
*
|
|
21
20
|
* @see https://mantine.dev/llms/core-app-shell.md
|
|
22
21
|
*/
|
|
23
|
-
declare function Root(
|
|
22
|
+
declare function Root(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
declare namespace Root {
|
|
25
24
|
var displayName: string;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
declare function Header({ className, ...props }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function Header(props: React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
29
27
|
declare namespace Header {
|
|
30
28
|
var displayName: string;
|
|
31
29
|
}
|
|
@@ -33,7 +31,7 @@ type NavbarProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
33
31
|
/** Whether the mobile overlay is open. Ignored above the `md` breakpoint, where the navbar is always visible. */
|
|
34
32
|
open?: boolean;
|
|
35
33
|
};
|
|
36
|
-
declare function Navbar({
|
|
34
|
+
declare function Navbar({ open, ...props }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
37
35
|
declare namespace Navbar {
|
|
38
36
|
var displayName: string;
|
|
39
37
|
}
|
|
@@ -41,17 +39,15 @@ type AsideProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
41
39
|
/** Whether the mobile overlay is open. Ignored above the `lg` breakpoint, where the aside is always visible. */
|
|
42
40
|
open?: boolean;
|
|
43
41
|
};
|
|
44
|
-
declare function Aside({
|
|
42
|
+
declare function Aside({ open, ...props }: AsideProps): import("react/jsx-runtime").JSX.Element;
|
|
45
43
|
declare namespace Aside {
|
|
46
44
|
var displayName: string;
|
|
47
45
|
}
|
|
48
|
-
|
|
49
|
-
declare function Footer({ className, ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare function Footer(props: React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
50
47
|
declare namespace Footer {
|
|
51
48
|
var displayName: string;
|
|
52
49
|
}
|
|
53
|
-
|
|
54
|
-
declare function Main({ className, ...props }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare function Main(props: React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
55
51
|
declare namespace Main {
|
|
56
52
|
var displayName: string;
|
|
57
53
|
}
|
|
@@ -59,7 +55,7 @@ type SectionProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
59
55
|
/** If set, the section expands to fill the remaining space in its sidebar. */
|
|
60
56
|
grow?: boolean;
|
|
61
57
|
};
|
|
62
|
-
declare function Section({
|
|
58
|
+
declare function Section({ grow, ...props }: SectionProps): import("react/jsx-runtime").JSX.Element;
|
|
63
59
|
declare namespace Section {
|
|
64
60
|
var displayName: string;
|
|
65
61
|
}
|
|
@@ -5,26 +5,21 @@ declare const button: (props?: ({
|
|
|
5
5
|
size?: "sm" | "md" | "lg" | "hero" | null | undefined;
|
|
6
6
|
chamfer?: boolean | null | undefined;
|
|
7
7
|
radius?: "sm" | "md" | "lg" | "none" | "round" | null | undefined;
|
|
8
|
+
context?: "default" | "oncolor" | null | undefined;
|
|
8
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
|
|
10
|
-
type Props = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> & VariantProps<typeof button> & {
|
|
11
|
-
/** @default false */
|
|
12
|
-
focusableWhenDisabled?: boolean;
|
|
13
|
-
/** @default true */
|
|
14
|
-
nativeButton?: boolean;
|
|
10
|
+
interface Props extends React.ComponentProps<typeof ButtonPrimitive>, VariantProps<typeof button> {
|
|
15
11
|
/** Leading slot — typically a label. When present, the label aligns right and the icon pins left. */
|
|
16
12
|
startIcon?: React.ReactNode;
|
|
17
13
|
/** Trailing slot — typically an icon. When present, the label aligns left and the icon pins right. */
|
|
18
14
|
endIcon?: React.ReactNode;
|
|
19
|
-
|
|
20
|
-
style?: UpstreamButton["style"];
|
|
21
|
-
render?: UpstreamButton["render"];
|
|
22
|
-
};
|
|
15
|
+
}
|
|
23
16
|
/**
|
|
24
|
-
* Button
|
|
17
|
+
* Button
|
|
25
18
|
*
|
|
26
19
|
* @doc https://base-ui.com/react/components/button
|
|
27
20
|
* @llm https://base-ui.com/react/components/button.md
|
|
28
21
|
*/
|
|
29
|
-
export declare function Button({ variant, size,
|
|
22
|
+
export declare function Button({ variant, size,
|
|
23
|
+
/** Explicit saturated-surface context; this is never inferred from an ancestor. */
|
|
24
|
+
context, chamfer, radius, startIcon, endIcon, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
30
25
|
export {};
|
|
@@ -3,39 +3,32 @@ declare const root: (props?: ({
|
|
|
3
3
|
variant?: "positive" | "negative" | "warning" | "info" | "accent-1" | "accent-2" | "accent-3" | null | undefined;
|
|
4
4
|
maxWidth?: "sm" | "md" | "lg" | "full" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
type RootProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof root>;
|
|
7
6
|
/**
|
|
8
|
-
* Callout.Root — the banner container. Sets
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* container width. A persistent element in the content flow — not a transient
|
|
13
|
-
* Toast, not a modal Alert Dialog.
|
|
7
|
+
* Callout.Root — the banner container. Sets `variant` (tints surface, icon, and text) and lays
|
|
8
|
+
* out a leading `Callout.Icon` beside `Callout.Title` / `Callout.Description`. `maxWidth` caps
|
|
9
|
+
* the banner so it reads as a block region, not full container width. A persistent content-flow
|
|
10
|
+
* element — not a transient Toast, not a modal Alert Dialog.
|
|
14
11
|
*/
|
|
15
|
-
declare function Root({ variant, maxWidth,
|
|
12
|
+
declare function Root({ variant, maxWidth, children, ...props }: React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof root>): import("react/jsx-runtime").JSX.Element;
|
|
16
13
|
declare namespace Root {
|
|
17
14
|
var displayName: string;
|
|
18
15
|
}
|
|
19
|
-
type IconProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
20
16
|
/**
|
|
21
|
-
* Callout.Icon — the leading status glyph.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the status colour via `currentColor`.
|
|
17
|
+
* Callout.Icon — the leading status glyph. Renders the variant's default icon when no children
|
|
18
|
+
* are passed; pass a custom icon as children to override. `aria-hidden` (variant is conveyed by
|
|
19
|
+
* copy) and inherits colour via `currentColor`.
|
|
25
20
|
*/
|
|
26
|
-
declare function Icon({
|
|
21
|
+
declare function Icon({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
27
22
|
declare namespace Icon {
|
|
28
23
|
var displayName: string;
|
|
29
24
|
}
|
|
30
|
-
type TitleProps = React.HTMLAttributes<HTMLDivElement>;
|
|
31
25
|
/** Callout.Title — an optional short heading, set in the semi-mono UPPERCASE technical voice. */
|
|
32
|
-
declare function Title(
|
|
26
|
+
declare function Title(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
33
27
|
declare namespace Title {
|
|
34
28
|
var displayName: string;
|
|
35
29
|
}
|
|
36
|
-
type DescriptionProps = React.HTMLAttributes<HTMLDivElement>;
|
|
37
30
|
/** Callout.Description — the message body, set in the editorial (grotesk) body voice. */
|
|
38
|
-
declare function Description(
|
|
31
|
+
declare function Description(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
39
32
|
declare namespace Description {
|
|
40
33
|
var displayName: string;
|
|
41
34
|
}
|
|
@@ -23,32 +23,33 @@ type RootProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof root
|
|
|
23
23
|
* The image is always the first entry in the stack, so `orientation` just
|
|
24
24
|
* switches the stack between a column and a row without reordering slots.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* level only — how hard or spread that shadow reads is a global lighting decision,
|
|
29
|
-
* owned by the `--imf-ui-shadow-hardness` / `--imf-ui-shadow-spread` tokens.
|
|
26
|
+
* `shadow` defaults to `lg`; `shadow="none"` gives the flat surface. It picks the elevation level only: how hard or
|
|
27
|
+
* spread the shadow reads is global, set by `--imf-ui-shadow-hardness` and `--imf-ui-shadow-spread`.
|
|
30
28
|
*/
|
|
31
|
-
declare function Root({ density, variant, shadow, radius, orientation, withBorder,
|
|
29
|
+
declare function Root({ density, variant, shadow, radius, orientation, withBorder, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
32
30
|
declare namespace Root {
|
|
33
31
|
var displayName: string;
|
|
34
32
|
}
|
|
35
|
-
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement
|
|
33
|
+
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
34
|
+
/** Width divided by height, or "auto" to use the image's intrinsic ratio. */
|
|
35
|
+
aspectRatio?: number | "auto";
|
|
36
|
+
};
|
|
36
37
|
/**
|
|
37
38
|
* Card.Image — an edge-to-edge media slot. Has no padding, so the image bleeds
|
|
38
39
|
* to the card edges. Always place it first among the slots.
|
|
39
40
|
*/
|
|
40
|
-
declare function Image({
|
|
41
|
+
declare function Image({ alt, aspectRatio, style, ...props }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
41
42
|
declare namespace Image {
|
|
42
43
|
var displayName: string;
|
|
43
44
|
}
|
|
44
45
|
type SlotProps = React.HTMLAttributes<HTMLDivElement>;
|
|
45
46
|
/** Card.Header — the padded title region at the top of the card body. */
|
|
46
|
-
declare function Header(
|
|
47
|
+
declare function Header(props: SlotProps): import("react/jsx-runtime").JSX.Element;
|
|
47
48
|
declare namespace Header {
|
|
48
49
|
var displayName: string;
|
|
49
50
|
}
|
|
50
51
|
/** Card.Content — the padded main body of the card. */
|
|
51
|
-
declare function Content(
|
|
52
|
+
declare function Content(props: SlotProps): import("react/jsx-runtime").JSX.Element;
|
|
52
53
|
declare namespace Content {
|
|
53
54
|
var displayName: string;
|
|
54
55
|
}
|
|
@@ -57,7 +58,7 @@ declare namespace Content {
|
|
|
57
58
|
* the card fill by default; override `background` in `style` for a distinct
|
|
58
59
|
* action bar.
|
|
59
60
|
*/
|
|
60
|
-
declare function Footer(
|
|
61
|
+
declare function Footer(props: SlotProps): import("react/jsx-runtime").JSX.Element;
|
|
61
62
|
declare namespace Footer {
|
|
62
63
|
var displayName: string;
|
|
63
64
|
}
|
|
@@ -1,56 +1,20 @@
|
|
|
1
1
|
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
2
|
-
type UpstreamRoot = React.ComponentProps<typeof CheckboxPrimitive.Root>;
|
|
3
|
-
type UpstreamIndicator = React.ComponentProps<typeof CheckboxPrimitive.Indicator>;
|
|
4
|
-
type RootProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "className" | "style"> & {
|
|
5
|
-
/** @default false */
|
|
6
|
-
defaultChecked?: boolean;
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
onCheckedChange?: UpstreamRoot["onCheckedChange"];
|
|
9
|
-
/** @default false */
|
|
10
|
-
indeterminate?: boolean;
|
|
11
|
-
/** @default false */
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
/** @default false */
|
|
14
|
-
readOnly?: boolean;
|
|
15
|
-
/** @default false */
|
|
16
|
-
required?: boolean;
|
|
17
|
-
/** @default false */
|
|
18
|
-
nativeButton?: boolean;
|
|
19
|
-
/** @default false */
|
|
20
|
-
parent?: boolean;
|
|
21
|
-
name?: string;
|
|
22
|
-
value?: string;
|
|
23
|
-
uncheckedValue?: string;
|
|
24
|
-
form?: string;
|
|
25
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
26
|
-
className?: UpstreamRoot["className"];
|
|
27
|
-
style?: UpstreamRoot["style"];
|
|
28
|
-
render?: UpstreamRoot["render"];
|
|
29
|
-
};
|
|
30
2
|
/**
|
|
31
3
|
* Checkbox.Root — binary form control; renders a `<span>` plus a hidden `<input>`.
|
|
32
4
|
*
|
|
33
5
|
* @doc https://base-ui.com/react/components/checkbox
|
|
34
6
|
* @llm https://base-ui.com/react/components/checkbox.md
|
|
35
7
|
*/
|
|
36
|
-
export declare function Root(
|
|
8
|
+
export declare function Root(props: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
37
9
|
export declare namespace Root {
|
|
38
10
|
var displayName: string;
|
|
39
11
|
}
|
|
40
|
-
type IndicatorProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "className" | "style"> & {
|
|
41
|
-
/** @default false */
|
|
42
|
-
keepMounted?: boolean;
|
|
43
|
-
className?: UpstreamIndicator["className"];
|
|
44
|
-
style?: UpstreamIndicator["style"];
|
|
45
|
-
render?: UpstreamIndicator["render"];
|
|
46
|
-
};
|
|
47
12
|
/**
|
|
48
13
|
* Checkbox.Indicator — shows the checked / indeterminate mark. Ships brand
|
|
49
14
|
* icons by default (check, and a minus while `indeterminate`); pass children
|
|
50
15
|
* to replace them.
|
|
51
16
|
*/
|
|
52
|
-
export declare function Indicator({
|
|
17
|
+
export declare function Indicator({ children, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Indicator>): import("react/jsx-runtime").JSX.Element;
|
|
53
18
|
export declare namespace Indicator {
|
|
54
19
|
var displayName: string;
|
|
55
20
|
}
|
|
56
|
-
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared variants for `Chip` and any sibling primitive that renders the same
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* means variant axes stay aligned without cross-component imports of a
|
|
6
|
-
* component file.
|
|
3
|
+
* visual on a different element (`ChipLink` renders `<a>`). Keeping them here
|
|
4
|
+
* avoids cross-component imports between Chip and its siblings.
|
|
7
5
|
*/
|
|
8
6
|
export declare const chip: (props?: ({
|
|
9
7
|
variant?: "primary" | "positive" | "negative" | "main" | "support" | "minor" | "brand" | "warning" | "info" | "accent-1" | "accent-2" | "accent-3" | null | undefined;
|
|
@@ -7,5 +7,5 @@ type Props = React.HTMLAttributes<HTMLSpanElement> & 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,
|
|
10
|
+
export declare function Chip({ variant, appearance, inline, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -10,7 +10,7 @@ type InlineProps = Omit<useRender.ComponentProps<"code">, "children"> & {
|
|
|
10
10
|
* text. `Typo.InlineCode` renders this under the hood so inline-code chrome is
|
|
11
11
|
* defined in one place. The copy button copies the rendered text.
|
|
12
12
|
*/
|
|
13
|
-
export declare function Inline({
|
|
13
|
+
export declare function Inline({ copyable, children, render, ...props }: InlineProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
14
14
|
export declare namespace Inline {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -22,7 +22,7 @@ type InlineLinkProps = useRender.ComponentProps<"a"> & {
|
|
|
22
22
|
/**
|
|
23
23
|
* Code.InlineLink — the inline-code chip rendered as a link: the same hairline
|
|
24
24
|
* box, with an optional directional arrow behind the separator instead of a copy button.
|
|
25
|
-
* Sibling of `Code.Inline`, sharing its chip visual (`.inline`)
|
|
25
|
+
* Sibling of `Code.Inline`, sharing its chip visual (`.inline`). Never both a
|
|
26
26
|
* copy button and a link on the same chip. Mirrors `ChipLink`'s shape (anchor
|
|
27
27
|
* is the chip root, trailing icon nudges on hover, `data-kind` picks the icon).
|
|
28
28
|
*/
|
|
@@ -1,56 +1,25 @@
|
|
|
1
1
|
import { Collapsible as CollapsiblePrimitive } from '@base-ui/react/collapsible';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
type UpstreamRoot = React.ComponentProps<typeof CollapsiblePrimitive.Root>;
|
|
4
|
-
type UpstreamTrigger = React.ComponentProps<typeof CollapsiblePrimitive.Trigger>;
|
|
5
|
-
type UpstreamPanel = React.ComponentProps<typeof CollapsiblePrimitive.Panel>;
|
|
6
3
|
declare const collapsibleRoot: (props?: ({
|
|
7
|
-
variant?: "
|
|
4
|
+
variant?: "default" | "solid" | null | undefined;
|
|
8
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
type RootProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & VariantProps<typeof collapsibleRoot> & {
|
|
10
|
-
/** Visual treatment applied to the trigger. `solid` gives the trigger a contained surface background; `default` is transparent at rest and drenched-blue when open. */
|
|
11
|
-
/** @default false */
|
|
12
|
-
defaultOpen?: UpstreamRoot["defaultOpen"];
|
|
13
|
-
open?: UpstreamRoot["open"];
|
|
14
|
-
onOpenChange?: UpstreamRoot["onOpenChange"];
|
|
15
|
-
/** @default false */
|
|
16
|
-
disabled?: UpstreamRoot["disabled"];
|
|
17
|
-
className?: UpstreamRoot["className"];
|
|
18
|
-
style?: UpstreamRoot["style"];
|
|
19
|
-
render?: UpstreamRoot["render"];
|
|
20
|
-
};
|
|
21
6
|
/**
|
|
22
7
|
* Collapsible.Root — container that manages open/closed state for a trigger–panel pair.
|
|
23
8
|
*
|
|
24
9
|
* @see https://base-ui.com/react/components/collapsible
|
|
25
10
|
* @llm https://base-ui.com/react/components/collapsible.md
|
|
26
11
|
*/
|
|
27
|
-
export declare function Root({ variant,
|
|
12
|
+
export declare function Root({ variant, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root> & VariantProps<typeof collapsibleRoot>): import("react/jsx-runtime").JSX.Element;
|
|
28
13
|
export declare namespace Root {
|
|
29
14
|
var displayName: string;
|
|
30
15
|
}
|
|
31
|
-
type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> & {
|
|
32
|
-
/** @default true */
|
|
33
|
-
nativeButton?: UpstreamTrigger["nativeButton"];
|
|
34
|
-
className?: UpstreamTrigger["className"];
|
|
35
|
-
style?: UpstreamTrigger["style"];
|
|
36
|
-
render?: UpstreamTrigger["render"];
|
|
37
|
-
};
|
|
38
16
|
/** Collapsible.Trigger — button that toggles the panel open and closed. */
|
|
39
|
-
export declare function Trigger({
|
|
17
|
+
export declare function Trigger({ children, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
40
18
|
export declare namespace Trigger {
|
|
41
19
|
var displayName: string;
|
|
42
20
|
}
|
|
43
|
-
type PanelProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
|
|
44
|
-
/** @default false */
|
|
45
|
-
hiddenUntilFound?: UpstreamPanel["hiddenUntilFound"];
|
|
46
|
-
/** @default false */
|
|
47
|
-
keepMounted?: UpstreamPanel["keepMounted"];
|
|
48
|
-
className?: UpstreamPanel["className"];
|
|
49
|
-
style?: UpstreamPanel["style"];
|
|
50
|
-
render?: UpstreamPanel["render"];
|
|
51
|
-
};
|
|
52
21
|
/** Collapsible.Panel — region that expands and collapses when the trigger is activated. */
|
|
53
|
-
export declare function Panel(
|
|
22
|
+
export declare function Panel(props: React.ComponentProps<typeof CollapsiblePrimitive.Panel>): import("react/jsx-runtime").JSX.Element;
|
|
54
23
|
export declare namespace Panel {
|
|
55
24
|
var displayName: string;
|
|
56
25
|
}
|
|
@@ -14,7 +14,7 @@ type Props = Omit<React.ComponentProps<typeof Button>, "children" | "onClick"> &
|
|
|
14
14
|
* transient confirmation (Copy → Check). Composes Button rather than rendering
|
|
15
15
|
* its own element, so all Button variants and native attributes pass through.
|
|
16
16
|
*/
|
|
17
|
-
export declare function CopyButton({ value, label, copiedLabel, variant, size,
|
|
17
|
+
export declare function CopyButton({ value, label, copiedLabel, variant, size, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export declare namespace CopyButton {
|
|
19
19
|
var displayName: string;
|
|
20
20
|
}
|