@imfusion/web-ui 0.8.1-dev.46.g027b5df2 → 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 CHANGED
@@ -64,6 +64,8 @@ workflows already ask for stay as they are. Say "change my profile" to answer ag
64
64
  range.
65
65
  - `FrameSelection`, from `@imfusion/web-ui/integrations/frame-selection`, steps through the frames of ImFusion Web SDK
66
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.
67
69
  - AppShell ([WEBSDK-243](https://imfusion.atlassian.net/browse/WEBSDK-243)) — Nikolaus Brunner <brunner@imfusion.com>
68
70
  - `AppShell.Navbar` has a `variant` prop: `default` or `branded`, a rail filled with the primary color.
69
71
  - `AppShell.Burger` toggles the navbar drawer with three sheared bands that align on hover and cross when open.
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ import { ComponentMeta } from '../../types/meta';
2
+ export declare const iconButtonMeta: ComponentMeta;
@@ -0,0 +1,2 @@
1
+ export { IconButton } from './icon-button';
2
+ export { iconButtonMeta } from './icon-button.meta';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { Button, buttonMeta } from './components/button';
2
2
  export { ChipLink, chipLinkMeta } from './components/chip-link';
3
3
  export { CopyButton, copyButtonMeta } from './components/copy-button';
4
+ export { IconButton, iconButtonMeta } from './components/icon-button';
4
5
  export { Checkbox, checkboxMeta } from './components/checkbox';
5
6
  export { Field, fieldMeta } from './components/field';
6
7
  export { Fieldset, fieldsetMeta } from './components/fieldset';