@imfusion/web-ui 0.8.1-dev.36.g641eac85 → 0.8.1-dev.47.gcdcf0a9b
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 +62 -0
- package/README.md +1 -0
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/dist/{code-DBIxhqGE.js → code-GwkswukD.js} +3 -3
- package/dist/codegen/gen-icons.d.ts +29 -4
- package/dist/codegen/sharpen-icon.d.ts +11 -0
- package/dist/components/app-shell/app-shell.d.ts +55 -30
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/icon-button/icon-button.d.ts +19 -0
- package/dist/components/icon-button/icon-button.meta.d.ts +2 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +47 -0
- package/dist/components/skeleton/skeleton.meta.d.ts +2 -0
- package/dist/components/table/table.d.ts +9 -0
- package/dist/icons/catalog.gen.d.ts +3797 -0
- package/dist/icons/create-icon.d.ts +3 -0
- package/dist/icons/icon-config-context.d.ts +3 -0
- package/dist/icons/icon-config.d.ts +2 -2
- package/dist/icons/icons.gen.d.ts +1736 -1672
- package/dist/icons-DUxZcuf9.js +36339 -0
- package/dist/icons.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1567 -1233
- package/dist/integrations/code-highlight.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -3
- package/src/docgen/doc.gen.json +364 -6
- package/src/llms/icon-catalog.gen.json +5533 -1671
- package/src/llms/llms.gen.txt +10 -0
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +13 -1
- package/src/llms/skills/imf-web-ui-update/SKILL.md +5 -1
- package/dist/icons-CM68Ql5d.js +0 -78
package/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,8 @@ workflows already ask for stay as they are. Say "change my profile" to answer ag
|
|
|
30
30
|
- **Breaking:** The library supports Safari 17.5, Chrome 123, and Firefox 120 or newer. — Nikolaus Brunner <brunner@imfusion.com>
|
|
31
31
|
- The stylesheet ships native `light-dark()`; older browsers get no semantic colors.
|
|
32
32
|
- The JavaScript build targets the same versions.
|
|
33
|
+
- **Breaking:** AppShell sections draw no dividers, and the `--imf-ui-appshell-border-color`, `--imf-ui-appshell-border-width`, and `--imf-ui-appshell-border-style` properties are removed. ([WEBSDK-243](https://imfusion.atlassian.net/browse/WEBSDK-243)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
34
|
+
- **Breaking:** `AppShell.Main` is the scroll container and the document does not scroll; window scroll listeners, scroll restoration, and `scrollTo` target `AppShell.Main`. ([WEBSDK-243](https://imfusion.atlassian.net/browse/WEBSDK-243)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
33
35
|
|
|
34
36
|
### Added
|
|
35
37
|
|
|
@@ -41,6 +43,8 @@ workflows already ask for stay as they are. Say "change my profile" to answer ag
|
|
|
41
43
|
- `web-ui-dev-design-system-sync` builds the design system and publishes it to its Claude Design System artifact, with
|
|
42
44
|
resolved light and dark tokens, a live preview per component, the design language and a cover
|
|
43
45
|
([CP-202](https://imfusion.atlassian.net/browse/CP-202)).
|
|
46
|
+
- `web-ui-dev-new-icon` adds custom icons from an SVG, a Figma link, a Claude Design project, or a description. It checks the icon catalog
|
|
47
|
+
first, and codegen validates the SVGs in `src/icons/svg/` and exports them beside the Iconoir set ([WEBSDK-267](https://imfusion.atlassian.net/browse/WEBSDK-267)).
|
|
44
48
|
- Components — Nikolaus Brunner <brunner@imfusion.com>
|
|
45
49
|
- `Avatar` shows a person's photo, their initials, or a person glyph, in three sizes and an on-color context.
|
|
46
50
|
- `AccountCard` links to the signed-in person's account: a large title over a quiet subtitle, then the organization and a
|
|
@@ -51,25 +55,64 @@ workflows already ask for stay as they are. Say "change my profile" to answer ag
|
|
|
51
55
|
glyph that `Callout` uses for the same status.
|
|
52
56
|
- `Typo` body members (`P`, `Lead`, `Detail`, `Small`, `Blockquote`, `Highlight`, `Link`, and the lists) take an
|
|
53
57
|
optional `weight` of `regular`, `medium`, or `strong`, for short body text on cards that reads thin at the regular weight.
|
|
58
|
+
- `Table.RowLink` links a row to its detail page from inside a cell. It reads as row text without an underline, wraps long
|
|
59
|
+
values such as emails anywhere, and takes a `render` prop for router links.
|
|
60
|
+
- `Skeleton` holds the place of loading data: `Skeleton.Text` is one line of its parent's font tall, `Skeleton.Block`
|
|
61
|
+
takes a size or a circle, and `Skeleton.Root` announces the load once and can hold its scan line still.
|
|
54
62
|
- Components — Stephan Wenninger <wenninger@imfusion.com>
|
|
55
63
|
- `Slider.Root` has a `variant="position"` that draws a scrollbar-like trough and bar thumb for picking one position in a
|
|
56
64
|
range.
|
|
57
65
|
- `FrameSelection`, from `@imfusion/web-ui/integrations/frame-selection`, steps through the frames of ImFusion Web SDK
|
|
58
66
|
image sets with a position slider and a current-of-total readout.
|
|
67
|
+
- `IconButton` is a square `Button` that shows a single icon and no visible text. `label` sets its accessible name, the
|
|
68
|
+
glyph size follows the button size, and `iconProps` passes props such as `strokeWidth` to the icon.
|
|
69
|
+
- AppShell ([WEBSDK-243](https://imfusion.atlassian.net/browse/WEBSDK-243)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
70
|
+
- `AppShell.Navbar` has a `variant` prop: `default` or `branded`, a rail filled with the primary color.
|
|
71
|
+
- `AppShell.Burger` toggles the navbar drawer with three sheared bands that align on hover and cross when open.
|
|
72
|
+
- `AppShell.NavItem` is a navbar link with icon, label, and description that follows the navbar's color.
|
|
73
|
+
- `AppShell.Navbar` and `AppShell.Aside` take `onOpenChange` for their drawers.
|
|
74
|
+
- `AppShell.Aside` has a drag handle that resizes it and resets on double-click or Home. It is on by default; `resizable`, `onWidthChange`, and `resizeLabel` configure it.
|
|
75
|
+
- `--imf-ui-appshell-aside-min-width` (`max(20rem, 20cqi)`) is the narrowest the docked aside gets, dragged or not.
|
|
76
|
+
- `--imf-ui-appshell-main-min-width` (`max(24rem, 45cqi)`) caps the docked aside so Main keeps at least 45% of the shell.
|
|
77
|
+
- `--imf-ui-appshell-main-max-width` caps Main's content at `100rem` on wide screens, aligned to the start.
|
|
78
|
+
- Storybook — Nikolaus Brunner <brunner@imfusion.com>
|
|
79
|
+
- The toolbar has Full HD, QHD, and Ultrawide viewports for previews past `xl`.
|
|
80
|
+
- The floating token button is hidden by default; `parameters.tokenDrawer.show` shows it for a story, and a toolbar toggle overrides either way.
|
|
81
|
+
- Sidebar labels stay in the sidebar text color when a story has test warnings or errors; the status icon carries the state.
|
|
82
|
+
|
|
83
|
+
- Icons ([WEBSDK-267](https://imfusion.atlassian.net/browse/WEBSDK-267)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
84
|
+
- 65 Medical Imaging icons from the ImFusion design team, such as `ToolBrush`, `ToolWindowLevel`, and `DefineRoiAction`.
|
|
85
|
+
|
|
86
|
+
- Storybook ([WEBSDK-267](https://imfusion.atlassian.net/browse/WEBSDK-267)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
87
|
+
- Every icon has its own Iconography page with a shareable link, and both the page and the catalog tile download the icon as
|
|
88
|
+
an SVG under its source file name.
|
|
59
89
|
|
|
60
90
|
### Changed
|
|
61
91
|
|
|
92
|
+
- Icons ([WEBSDK-267](https://imfusion.atlassian.net/browse/WEBSDK-267)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
93
|
+
- Icons from `@imfusion/web-ui/icons` have square corners, line caps, and line joins. Letters, digits, stars, and
|
|
94
|
+
badges keep Iconoir's round geometry.
|
|
95
|
+
- The package generates its icons from Iconoir's SVG source and has no `iconoir-react` dependency.
|
|
96
|
+
- `strokeWidth` set on `Icon` or through `WebUIProvider` reaches every part of an icon, circles and rectangles included.
|
|
97
|
+
- Every record in the icon catalog names its `origin`, `iconoir` or `imfusion`, and its source `file`. The Iconography
|
|
98
|
+
catalog filters by origin and badges every icon with it. While no category filter is set, each tile also names the
|
|
99
|
+
icon's category.
|
|
100
|
+
|
|
62
101
|
- Documentation — Nikolaus Brunner <brunner@imfusion.com>
|
|
63
102
|
- The `CodeHighlight` install section names TanStack Highlight 0.1.x and the 0.1.0 build it is tested against.
|
|
64
103
|
- The consumer agent tooling diagram groups the skills you run in one lane, so the router and the profile each reach them
|
|
65
104
|
with a single edge.
|
|
66
105
|
- Agent skills — Nikolaus Brunner <brunner@imfusion.com>
|
|
106
|
+
- `imf-web-ui-update` proposes catalog icons for project-local icons they now cover, above all icons a release added
|
|
107
|
+
([WEBSDK-267](https://imfusion.atlassian.net/browse/WEBSDK-267)).
|
|
67
108
|
- `imf-web-ui-conventions` declares named functions, local component helpers included, with `function`, and keeps
|
|
68
109
|
inline callbacks as arrows.
|
|
69
110
|
- `imf-web-ui-conventions` loads route data with `queryClient.query({ ...options, staleTime: "static" })` in place of the
|
|
70
111
|
deprecated `ensureQueryData`.
|
|
71
112
|
- `imf-web-ui-update` opens with the route and its decision points, and names the optional `imf-web-ui-audit full` in
|
|
72
113
|
the report and its closing offer.
|
|
114
|
+
- `web-ui-dev-teardown-worktree merge` rebases onto the fetched `origin` base, runs `verify:full`, fast-forwards, and
|
|
115
|
+
pushes; it never creates a merge commit. `web-ui-dev-commit` routes landing a worktree branch there.
|
|
73
116
|
- `web-ui-dev-changelog` gives every new component, and every visibly changed one, a light and a dark screenshot of its
|
|
74
117
|
story in the release highlights.
|
|
75
118
|
- `imf-web-ui-update` checks for a running npm process by PID and working directory, and shows a command line only for
|
|
@@ -81,21 +124,40 @@ workflows already ask for stay as they are. Say "change my profile" to answer ag
|
|
|
81
124
|
through `vp lint`, and a pre-commit hook that runs `vp staged`.
|
|
82
125
|
- `web-ui install` formats the files it writes, skill version markers and hook settings, with the project's `vp fmt` when
|
|
83
126
|
the project has it, and with its Prettier otherwise.
|
|
127
|
+
- `imf-web-ui-audit` searches the frontend for `TODO`, `FIXME`, `HACK`, and similar markers. A marker that admits a
|
|
128
|
+
convention gap backs that topic's finding, and the rest go under `Suggestions`.
|
|
84
129
|
- CI and verification — Nikolaus Brunner <brunner@imfusion.com>
|
|
85
130
|
- The toolchain is Vite+: `vp build` and `vp test` replace the Vite and Vitest scripts, and Oxlint and Oxfmt replace ESLint and Prettier.
|
|
86
131
|
- The pre-commit hook runs `vp staged` against the staged state and never rewrites or stages files.
|
|
87
132
|
- `verify:generated` checks every committed `*.gen.*` file against the sources that produce it. It runs in the pre-commit hook, in `verify:full`, and as a TeamCity step.
|
|
133
|
+
- AppShell ([WEBSDK-243](https://imfusion.atlassian.net/browse/WEBSDK-243)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
134
|
+
- The navbar sits on the support background by default.
|
|
135
|
+
- The navbar variants set the navbar's text color: `fg-main` by default, `fg-oncolor` when branded.
|
|
136
|
+
- The navbar runs the full height of the screen; Header and Footer start beside it.
|
|
137
|
+
- `AppShell.Main` scrolls with a thin scrollbar.
|
|
138
|
+
- Below their breakpoints the navbar opens as a drawer from the inline end and the aside as a bottom sheet on phones or a side drawer on tablets.
|
|
139
|
+
- `AppShell.Root` is an inline-size container; the navbar is `clamp(16rem, 18cqi, 20rem)` and the aside `clamp(20rem, 30cqi, 40rem)` wide.
|
|
88
140
|
|
|
89
141
|
### Fixed
|
|
90
142
|
|
|
91
143
|
- Components — Nikolaus Brunner <brunner@imfusion.com>
|
|
92
144
|
- Screen readers announce `Field.Error` when its message appears; it has `role="alert"` by default.
|
|
93
145
|
- `WebUIProvider` and the components under it render on React 18, the runtime Claude's design canvases use.
|
|
146
|
+
- On-color `ghost` and `outline` Buttons invert to a white fill on hover instead of near-black.
|
|
94
147
|
- Peer dependencies — Nikolaus Brunner <brunner@imfusion.com>
|
|
95
148
|
- The `@imfusion/sdk` and `@imfusion/sdk-react` peers accept any version, SDK dev builds included. The
|
|
96
149
|
`FrameSelection` and `ImageDisplayOptions` install sections name SDK 1.x and the 1.0.0 build they are tested against.
|
|
97
150
|
- CI and verification — Nikolaus Brunner <brunner@imfusion.com>
|
|
98
151
|
- The dev skill eval report scores the dev scenarios and lists only the `web-ui-dev-*` skills.
|
|
152
|
+
- `verify:icons` fails when a one-icon import bundles any other icon ([WEBSDK-267](https://imfusion.atlassian.net/browse/WEBSDK-267)).
|
|
153
|
+
- The dev skill eval builds its workspace from a checkout without uncommitted changes.
|
|
154
|
+
- The repository's Chrome DevTools MCP server runs with an isolated profile, so several agent sessions can drive Chrome
|
|
155
|
+
at once.
|
|
156
|
+
- The Iconography interaction test covers the catalog's core behavior and finishes well within the CI timeout.
|
|
157
|
+
- Storybook — Nikolaus Brunner <brunner@imfusion.com>
|
|
158
|
+
- The Iconography catalog shows solid icons as drawn, and its Copy JSX snippet adds no fill or stroke override.
|
|
159
|
+
- Long icon names in the Iconography catalog break between words instead of being cut off.
|
|
160
|
+
- Button's controls list `variant`, `size`, and its other variant props before the inherited Base UI props.
|
|
99
161
|
- Token defaults — Nikolaus Brunner <brunner@imfusion.com>
|
|
100
162
|
- `data-imf-ui-color-scheme` on a nested element switches the semantic colors for that element's subtree.
|
|
101
163
|
|
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ The main development skills are:
|
|
|
82
82
|
| `/web-ui-dev-start` | Establish task context and working location. |
|
|
83
83
|
| `/web-ui-dev-new-component` | Add a primitive. |
|
|
84
84
|
| `/web-ui-dev-new-integration` | Add an integration with an optional peer. |
|
|
85
|
+
| `/web-ui-dev-new-icon` | Add custom icons from a design source. |
|
|
85
86
|
| `/web-ui-dev-update-component` | Change an existing primitive. |
|
|
86
87
|
| `/web-ui-dev-design-component` | Apply the ImFusion brand to a component. |
|
|
87
88
|
| `/web-ui-dev-story` | Author a Storybook story. |
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -32,3 +32,37 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
32
32
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
33
|
SOFTWARE.
|
|
34
34
|
```
|
|
35
|
+
|
|
36
|
+
## Iconoir
|
|
37
|
+
|
|
38
|
+
- Project: [Iconoir](https://github.com/iconoir-icons/iconoir)
|
|
39
|
+
- License: [MIT](https://github.com/iconoir-icons/iconoir/blob/main/LICENSE)
|
|
40
|
+
|
|
41
|
+
The icons exported from `@imfusion/web-ui/icons` are generated from Iconoir SVG source, with modified corners, line caps, and
|
|
42
|
+
line joins.
|
|
43
|
+
|
|
44
|
+
The following license text applies only to those Iconoir-derived icons and is reproduced verbatim:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
MIT License
|
|
48
|
+
|
|
49
|
+
Copyright (c) 2021 Luca Burgio
|
|
50
|
+
|
|
51
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
52
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
53
|
+
in the Software without restriction, including without limitation the rights
|
|
54
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
55
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
56
|
+
furnished to do so, subject to the following conditions:
|
|
57
|
+
|
|
58
|
+
The above copyright notice and this permission notice shall be included in all
|
|
59
|
+
copies or substantial portions of the Software.
|
|
60
|
+
|
|
61
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
62
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
63
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
64
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
65
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
66
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
67
|
+
SOFTWARE.
|
|
68
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { t } from "./meta-V_KyLeGn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { $o as n, Pa as r, r as i } from "./icons-DUxZcuf9.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";
|
|
@@ -33,7 +33,7 @@ var g = {
|
|
|
33
33
|
InlineLink: () => y
|
|
34
34
|
});
|
|
35
35
|
function v({ copyable: e = !1, children: t, render: a, ...l }) {
|
|
36
|
-
let { copied: u, copy: f } = h(), _ = d(null), v = u ?
|
|
36
|
+
let { copied: u, copy: f } = h(), _ = d(null), v = u ? r : n;
|
|
37
37
|
return m({
|
|
38
38
|
defaultTagName: "code",
|
|
39
39
|
render: a,
|
|
@@ -86,7 +86,7 @@ function y({ kind: e = "external", ...t }) {
|
|
|
86
86
|
}
|
|
87
87
|
y.displayName = "Code.InlineLink";
|
|
88
88
|
function b({ className: e, language: t, hideCopy: o = !1, children: l, ...u }) {
|
|
89
|
-
let { copied: f, copy: p } = h(), m = d(null), _ = f ?
|
|
89
|
+
let { copied: f, copy: p } = h(), m = d(null), _ = f ? r : n;
|
|
90
90
|
return /* @__PURE__ */ c("div", {
|
|
91
91
|
"data-imf-ui-component": "Code.Block",
|
|
92
92
|
className: a(g.block, e),
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { IconNode } from '../icons/create-icon';
|
|
2
|
+
export type IconOrigin = "iconoir" | "imfusion";
|
|
3
|
+
export type IconSource = {
|
|
4
|
+
name: string;
|
|
5
|
+
style: "regular" | "solid";
|
|
6
|
+
origin: IconOrigin;
|
|
7
|
+
/** Path of the source SVG inside its icon set, such as `regular/tool-3d-rotate.svg`. */
|
|
8
|
+
file: string;
|
|
9
|
+
nodes: IconNode[];
|
|
10
|
+
};
|
|
1
11
|
export type IconMetadata = {
|
|
2
12
|
filename: string;
|
|
3
13
|
category: string;
|
|
@@ -8,6 +18,8 @@ export type IconCatalogRecord = {
|
|
|
8
18
|
category: string;
|
|
9
19
|
tags: string[];
|
|
10
20
|
style: "regular" | "solid";
|
|
21
|
+
origin: IconOrigin;
|
|
22
|
+
file: string;
|
|
11
23
|
};
|
|
12
24
|
type IconMetadataSource = {
|
|
13
25
|
commit: string;
|
|
@@ -15,10 +27,23 @@ type IconMetadataSource = {
|
|
|
15
27
|
};
|
|
16
28
|
export declare function parseIconMetadata(csv: string): IconMetadata[];
|
|
17
29
|
export declare function validateIconMetadataSource(source: string): IconMetadataSource;
|
|
18
|
-
export declare function buildIconCatalog(
|
|
19
|
-
export declare function
|
|
30
|
+
export declare function buildIconCatalog(icons: readonly Pick<IconSource, "name" | "origin" | "file">[], metadata: readonly IconMetadata[]): IconCatalogRecord[];
|
|
31
|
+
export declare function parseIconSvg(source: string): IconNode[];
|
|
32
|
+
export declare function iconName(filename: string, style: IconSource["style"]): string;
|
|
33
|
+
/** Problems that keep an SVG from following the Web UI icon contract; empty when it does. */
|
|
34
|
+
export declare function validateIconSvg(source: string): string[];
|
|
35
|
+
export declare function readIconSet(directory: string, origin: IconOrigin): IconSource[];
|
|
36
|
+
export declare function mergeIconSets(iconoir: readonly IconSource[], custom: readonly IconSource[]): IconSource[];
|
|
37
|
+
export declare function iconoirDirectory(): string;
|
|
38
|
+
export declare function parseSharpenExclusions(source: string, icons: readonly IconSource[]): Set<string>;
|
|
39
|
+
export declare function sharpenIconSet(icons: readonly IconSource[], exclusions: ReadonlySet<string>): {
|
|
40
|
+
icons: IconSource[];
|
|
41
|
+
corners: number;
|
|
42
|
+
changed: number;
|
|
43
|
+
};
|
|
44
|
+
export declare function renderIconModule(icons: readonly IconSource[]): string;
|
|
20
45
|
export declare function renderIconCatalogJson(records: readonly IconCatalogRecord[]): string;
|
|
21
46
|
export declare function renderIconCatalog(records: readonly IconCatalogRecord[]): string;
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function writeIconCatalog(): void;
|
|
47
|
+
export declare function writeIconModule(icons: readonly IconSource[]): void;
|
|
48
|
+
export declare function writeIconCatalog(icons: readonly IconSource[]): void;
|
|
24
49
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconNode } from '../icons/create-icon';
|
|
2
|
+
/** Replaces curves that round a corner or a line end between straight edges with the corner itself. */
|
|
3
|
+
export declare function sharpenPath(d: string, maxLeg: number): {
|
|
4
|
+
d: string;
|
|
5
|
+
corners: number;
|
|
6
|
+
};
|
|
7
|
+
/** Squares the rounded corners, line caps, and line joins of an icon. */
|
|
8
|
+
export declare function sharpenIcon(nodes: readonly IconNode[], maxLeg: number): {
|
|
9
|
+
nodes: IconNode[];
|
|
10
|
+
corners: number;
|
|
11
|
+
};
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* Composed of seven sub-components used with dot-notation: `AppShell.Root` wraps
|
|
9
|
-
* `AppShell.Header`, `AppShell.Navbar`, `AppShell.Aside`, `AppShell.Footer`,
|
|
10
|
-
* `AppShell.Main`, and (inside a sidebar) `AppShell.Section`.
|
|
11
|
-
*
|
|
12
|
-
* Sizing is CSS-driven — override the `--imf-ui-appshell-*` custom properties
|
|
13
|
-
* rather than passing dimension props. Below the responsive breakpoints the
|
|
14
|
-
* navbar (`md`) and aside (`lg`) become sliding overlays toggled via the `open`
|
|
15
|
-
* prop; the consumer wires that to a burger button.
|
|
16
|
-
*
|
|
17
|
-
* Copied and adapted from Mantine's AppShell; no upstream runtime dependency.
|
|
18
|
-
* MIT licensed (see Mantine repo).
|
|
19
|
-
*
|
|
20
|
-
* @see https://mantine.dev/llms/core-app-shell.md
|
|
21
|
-
*/
|
|
22
|
-
declare function Root(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const navbarSurface: (props?: ({
|
|
5
|
+
variant?: "default" | "branded" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare function Root({ ref, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
8
|
declare namespace Root {
|
|
24
9
|
var displayName: string;
|
|
25
10
|
}
|
|
@@ -27,19 +12,31 @@ declare function Header(props: React.HTMLAttributes<HTMLElement>): import("react
|
|
|
27
12
|
declare namespace Header {
|
|
28
13
|
var displayName: string;
|
|
29
14
|
}
|
|
30
|
-
type
|
|
31
|
-
/** Whether the
|
|
15
|
+
type DrawerProps = {
|
|
16
|
+
/** Whether the drawer is open below the breakpoint. Ignored while the section is docked. */
|
|
32
17
|
open?: boolean;
|
|
18
|
+
/** Called when the drawer asks to open or close: scrim, swipe, or Escape. */
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
20
|
};
|
|
34
|
-
|
|
21
|
+
type NavbarProps = React.HTMLAttributes<HTMLElement> & VariantProps<typeof navbarSurface> & DrawerProps;
|
|
22
|
+
/**
|
|
23
|
+
* `variant="branded"` paints the primary color; children opt into on-color themselves. Below `md` the navbar opens as a
|
|
24
|
+
* drawer from the inline end.
|
|
25
|
+
*/
|
|
26
|
+
declare function Navbar({ variant, open, onOpenChange, ...props }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
35
27
|
declare namespace Navbar {
|
|
36
28
|
var displayName: string;
|
|
37
29
|
}
|
|
38
|
-
type AsideProps = React.HTMLAttributes<HTMLElement> & {
|
|
39
|
-
/**
|
|
40
|
-
|
|
30
|
+
type AsideProps = React.HTMLAttributes<HTMLElement> & DrawerProps & {
|
|
31
|
+
/** Adds a drag handle on the inline-start edge from the `lg` breakpoint up. Double-click or Home restores the default width. */
|
|
32
|
+
resizable?: boolean;
|
|
33
|
+
/** Called with the new width in px when a drag ends, on each arrow-key step, and on reset. */
|
|
34
|
+
onWidthChange?: (width: number) => void;
|
|
35
|
+
/** Accessible name of the drag handle. */
|
|
36
|
+
resizeLabel?: string;
|
|
41
37
|
};
|
|
42
|
-
|
|
38
|
+
/** 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;
|
|
43
40
|
declare namespace Aside {
|
|
44
41
|
var displayName: string;
|
|
45
42
|
}
|
|
@@ -59,4 +56,32 @@ declare function Section({ grow, ...props }: SectionProps): import("react/jsx-ru
|
|
|
59
56
|
declare namespace Section {
|
|
60
57
|
var displayName: string;
|
|
61
58
|
}
|
|
62
|
-
|
|
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
|
+
type NavItemProps = useRender.ComponentProps<"a"> & {
|
|
74
|
+
/** Leading icon, decorative. */
|
|
75
|
+
icon?: React.ReactNode;
|
|
76
|
+
/** One line under the label saying what is behind the link. */
|
|
77
|
+
description?: React.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* AppShell.NavItem — a navbar link: icon, mono label, and an optional description. Takes its color from the navbar;
|
|
81
|
+
* `aria-current="page"` marks the current page. Pass a router link through `render`.
|
|
82
|
+
*/
|
|
83
|
+
declare function NavItem({ icon, description, children, render, ...props }: NavItemProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
84
|
+
declare namespace NavItem {
|
|
85
|
+
var displayName: string;
|
|
86
|
+
}
|
|
87
|
+
export { Root, Header, Navbar, Aside, Footer, Main, Section, Burger, NavItem };
|
|
@@ -7,7 +7,7 @@ declare const button: (props?: ({
|
|
|
7
7
|
radius?: "sm" | "md" | "lg" | "none" | "round" | null | undefined;
|
|
8
8
|
context?: "default" | "oncolor" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
-
interface Props extends
|
|
10
|
+
interface Props extends VariantProps<typeof button>, React.ComponentProps<typeof ButtonPrimitive> {
|
|
11
11
|
/** Leading slot — typically a label. When present, the label aligns right and the icon pins left. */
|
|
12
12
|
startIcon?: React.ReactNode;
|
|
13
13
|
/** Trailing slot — typically an icon. When present, the label aligns left and the icon pins right. */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button } from '../button';
|
|
2
|
+
import { Icon, IconComponent } from '../icon';
|
|
3
|
+
interface Props extends Omit<React.ComponentProps<typeof Button>, "children" | "startIcon" | "endIcon"> {
|
|
4
|
+
/** Icon component imported from `@imfusion/web-ui/icons`. */
|
|
5
|
+
glyph: IconComponent;
|
|
6
|
+
/** Accessible name; the button renders no visible text. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Props for the inner Icon, such as `strokeWidth` or a `size` override. */
|
|
9
|
+
iconProps?: Omit<React.ComponentProps<typeof Icon>, "glyph">;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* IconButton — a square Button that shows a single Icon. Composes Button, so every Button variant and native attribute
|
|
13
|
+
* passes through.
|
|
14
|
+
*/
|
|
15
|
+
export declare function IconButton({ glyph, label, iconProps, size, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare namespace IconButton {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const logo: (props?: ({
|
|
4
|
-
size?: "sm" | "md" | "lg" | "hero" | "
|
|
4
|
+
size?: "sm" | "md" | "lg" | "hero" | "xl" | "xs" | "fit" | null | undefined;
|
|
5
5
|
variant?: "oncolor" | "main" | "inherit" | "support" | "minor" | "brand" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
type Props = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & VariantProps<typeof logo> & {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
type RootProps = useRender.ComponentProps<"div"> & {
|
|
3
|
+
/** Announced once through a visually hidden status. Pass `""` when something else already speaks for the region. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** `none` holds every bone inside still. */
|
|
6
|
+
animation?: "shimmer" | "none";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Skeleton.Root — marks a region as loading. The view inside renders for real; bones stand in for the data. Sets
|
|
10
|
+
* `aria-busy` and announces `label` once, however many bones it holds.
|
|
11
|
+
*/
|
|
12
|
+
declare function Root({ label, animation, render, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare namespace Root {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
type TextProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
17
|
+
/** Width of the bar, capped at the container width. */
|
|
18
|
+
width?: React.CSSProperties["width"];
|
|
19
|
+
/** Number of stacked lines. The last of several is 60% wide. */
|
|
20
|
+
lines?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Skeleton.Text — a text bar exactly one line of the parent's font tall. Place it inside the real Typo element so the
|
|
24
|
+
* row keeps the loaded row's height.
|
|
25
|
+
*/
|
|
26
|
+
declare function Text({ width, lines, style, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare namespace Text {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
type BlockProps = React.HTMLAttributes<HTMLSpanElement> & ({
|
|
31
|
+
/** `circle` takes its size from `width`, for avatars. */
|
|
32
|
+
shape?: "rect";
|
|
33
|
+
/** Width of the block, capped at the container width. A circle uses it for both sides. */
|
|
34
|
+
width?: React.CSSProperties["width"];
|
|
35
|
+
/** Height of the block. */
|
|
36
|
+
height: React.CSSProperties["height"];
|
|
37
|
+
} | {
|
|
38
|
+
shape: "circle";
|
|
39
|
+
width: React.CSSProperties["width"];
|
|
40
|
+
height?: never;
|
|
41
|
+
});
|
|
42
|
+
/** Skeleton.Block — a sized placeholder for a shaped element such as a meter, chip, or avatar. */
|
|
43
|
+
declare function Block({ width, shape, height, style, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare namespace Block {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
export { Root, Text, Block };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
1
2
|
type HeaderCellProps = React.ThHTMLAttributes<HTMLTableCellElement>;
|
|
2
3
|
/** Table.Root — the `<table>` element. */
|
|
3
4
|
export declare function Root(props: React.TableHTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -29,6 +30,14 @@ export declare function Cell(props: React.TdHTMLAttributes<HTMLTableCellElement>
|
|
|
29
30
|
export declare namespace Cell {
|
|
30
31
|
var displayName: string;
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Table.RowLink — an `<a>` that stands in for its whole row, such as a link to the row's detail page. Reads as row text,
|
|
35
|
+
* not as a separate link, and wraps anywhere so long values like emails stay inside a narrow table.
|
|
36
|
+
*/
|
|
37
|
+
export declare function RowLink({ render, ...props }: useRender.ComponentProps<"a">): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
38
|
+
export declare namespace RowLink {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
32
41
|
/**
|
|
33
42
|
* Table.HeaderButton — inline action button for header cells. Generic by
|
|
34
43
|
* design: sorting toggles, filter toggles, column menus all render through it
|