@imfusion/web-ui 0.11.1-dev.57.g3cec18fa → 0.11.1-dev.58.ge2daec34
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 +8 -0
- package/dist/components/dialog/dialog.d.ts +23 -3
- package/dist/index.js +1766 -1738
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +118 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
+
- `Dialog.Alert` composes a confirmation from props like `Dialog.Simple`, on Base UI's Alert Dialog: screen readers announce
|
|
8
|
+
it as an `alertdialog`, it is always modal, and a click on the overlay leaves it open. `actions` is required, the header has
|
|
9
|
+
no close button, and `status` takes any variant. It replaces a `Dialog.Simple` or a hand-composed `Dialog.Root` that asks
|
|
10
|
+
the user to confirm a step, such as removing a member or discarding changes. [Dialog](src/components/dialog/dialog.mdx)
|
|
11
|
+
([WEBSDK-247](https://imfusion.atlassian.net/browse/WEBSDK-247)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
7
12
|
- `Progress` is a new bar for the completion of a running task, adapted from Base UI. `size` runs from `xs` (a 2px hairline) to
|
|
8
13
|
`lg`, `layout` is `stacked` or `inline`, `value={null}` sweeps while the amount is unknown, and the fill turns positive at the
|
|
9
14
|
maximum. [Progress](src/components/progress/progress.mdx) — Nikolaus Brunner <brunner@imfusion.com>
|
|
@@ -59,6 +64,9 @@
|
|
|
59
64
|
|
|
60
65
|
### Changed
|
|
61
66
|
|
|
67
|
+
- `Dialog.Simple` and `Dialog.Inline` without children render no `Dialog.Body`, so the header sits directly on the footer
|
|
68
|
+
without the body's padding between them. [Dialog](src/components/dialog/dialog.mdx)
|
|
69
|
+
([WEBSDK-247](https://imfusion.atlassian.net/browse/WEBSDK-247)) — Nikolaus Brunner <brunner@imfusion.com>
|
|
62
70
|
- `initialsFromEmail` gives the first two letters of a single-segment local part, `jkeller@…` gives `JK`, and `?` for an
|
|
63
71
|
empty one, the same rule as `initialsFromName`. [Avatar](src/components/avatar/avatar.mdx) — Nikolaus Brunner
|
|
64
72
|
<brunner@imfusion.com>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
|
|
1
2
|
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
4
|
import * as ScrollArea from '../scroll-area/scroll-area';
|
|
@@ -102,7 +103,7 @@ export declare function Close(props: React.ComponentProps<typeof DialogPrimitive
|
|
|
102
103
|
export declare namespace Close {
|
|
103
104
|
var displayName: string;
|
|
104
105
|
}
|
|
105
|
-
type
|
|
106
|
+
type ContentProps = {
|
|
106
107
|
/** Heading of the dialog. */
|
|
107
108
|
title: React.ReactNode;
|
|
108
109
|
/** Short uppercase label above the title. */
|
|
@@ -127,6 +128,7 @@ type ComposedProps = Omit<React.ComponentProps<typeof DialogPrimitive.Root>, "ch
|
|
|
127
128
|
/** Content of the body. */
|
|
128
129
|
children?: React.ReactNode;
|
|
129
130
|
};
|
|
131
|
+
type ComposedProps = Omit<React.ComponentProps<typeof DialogPrimitive.Root>, "children"> & ContentProps;
|
|
130
132
|
type SimpleProps = ComposedProps & {
|
|
131
133
|
/** Element rendered as the trigger, such as a `Button`. Omit it for a controlled dialog. */
|
|
132
134
|
trigger?: React.ReactElement;
|
|
@@ -135,7 +137,7 @@ type SimpleProps = ComposedProps & {
|
|
|
135
137
|
* Dialog.Simple — pre-composed dialog: trigger, header with title, description, and optional status, a scrolling body,
|
|
136
138
|
* and either a close button in the header or a footer of `actions`. Root props pass through.
|
|
137
139
|
*/
|
|
138
|
-
export declare function Simple({ trigger, headerVariant, size, ...
|
|
140
|
+
export declare function Simple({ trigger, headerVariant, size, eyebrow, title, description, status, actions, children, ...rootProps }: SimpleProps): import("react/jsx-runtime").JSX.Element;
|
|
139
141
|
export declare namespace Simple {
|
|
140
142
|
var displayName: string;
|
|
141
143
|
}
|
|
@@ -144,8 +146,26 @@ type InlineProps = ComposedProps & {
|
|
|
144
146
|
trigger: React.ReactNode;
|
|
145
147
|
};
|
|
146
148
|
/** Dialog.Inline — like Dialog.Simple, but the trigger is text inside a sentence. */
|
|
147
|
-
export declare function Inline({ trigger, headerVariant, size, ...
|
|
149
|
+
export declare function Inline({ trigger, headerVariant, size, eyebrow, title, description, status, actions, children, ...rootProps }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
148
150
|
export declare namespace Inline {
|
|
149
151
|
var displayName: string;
|
|
150
152
|
}
|
|
153
|
+
type AlertProps = Omit<React.ComponentProps<typeof AlertDialogPrimitive.Root>, "children"> & Omit<ContentProps, "headerVariant" | "actions"> & {
|
|
154
|
+
/** Element rendered as the trigger, such as a `Button`. Omit it for a controlled dialog. */
|
|
155
|
+
trigger?: React.ReactElement;
|
|
156
|
+
/** Buttons of the footer, the only way out. Include a Cancel `Dialog.Close`. */
|
|
157
|
+
actions: React.ReactNode;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Dialog.Alert — pre-composed confirmation that interrupts the user, announced as an `alertdialog`. Always modal; a click
|
|
161
|
+
* on the overlay does not close it, Escape does. Like Dialog.Simple, without a header close button. Root props pass
|
|
162
|
+
* through.
|
|
163
|
+
*
|
|
164
|
+
* @see https://base-ui.com/react/components/alert-dialog
|
|
165
|
+
* @llm https://base-ui.com/react/components/alert-dialog.md
|
|
166
|
+
*/
|
|
167
|
+
export declare function Alert({ trigger, size, eyebrow, title, description, status, actions, children, ...rootProps }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
168
|
+
export declare namespace Alert {
|
|
169
|
+
var displayName: string;
|
|
170
|
+
}
|
|
151
171
|
export {};
|