@imfusion/web-ui 0.6.1-dev.16.g616c20b4 → 0.6.1-dev.20.g3845eed7
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/dist/components/toast/toast.d.ts +4 -1
- package/dist/index.js +30 -14
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +7 -0
|
@@ -13,6 +13,7 @@ type UpstreamPositioner = React.ComponentProps<typeof ToastPrimitive.Positioner>
|
|
|
13
13
|
type UpstreamArrow = React.ComponentProps<typeof ToastPrimitive.Arrow>;
|
|
14
14
|
declare const toastViewport: (props?: ({
|
|
15
15
|
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
16
|
+
width?: "content" | "default" | "compact" | "wide" | null | undefined;
|
|
16
17
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
17
18
|
declare const toastRoot: (props?: ({
|
|
18
19
|
variant?: "warning" | "info" | "neutral" | "success" | "error" | null | undefined;
|
|
@@ -62,6 +63,8 @@ export declare namespace Portal {
|
|
|
62
63
|
type ViewportProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
|
|
63
64
|
/** Which edge or corner of the screen the stack anchors to. */
|
|
64
65
|
position?: VariantProps<typeof toastViewport>["position"];
|
|
66
|
+
/** Width treatment for the toast stack. */
|
|
67
|
+
width?: VariantProps<typeof toastViewport>["width"];
|
|
65
68
|
className?: UpstreamViewport["className"];
|
|
66
69
|
render?: UpstreamViewport["render"];
|
|
67
70
|
};
|
|
@@ -70,7 +73,7 @@ type ViewportProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
|
|
|
70
73
|
* expands the collapsed toasts; it ignores pointer events except on the toasts
|
|
71
74
|
* themselves so the app underneath stays clickable.
|
|
72
75
|
*/
|
|
73
|
-
export declare function Viewport({ className, position, ...props }: ViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare function Viewport({ className, position, width, ...props }: ViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
74
77
|
export declare namespace Viewport {
|
|
75
78
|
var displayName: string;
|
|
76
79
|
}
|
package/dist/index.js
CHANGED
|
@@ -2308,7 +2308,11 @@ var ja = {
|
|
|
2308
2308
|
variantInfo: "imf-ui-toast-module-variantInfo",
|
|
2309
2309
|
variantSuccess: "imf-ui-toast-module-variantSuccess",
|
|
2310
2310
|
variantWarning: "imf-ui-toast-module-variantWarning",
|
|
2311
|
-
viewport: "imf-ui-toast-module-viewport"
|
|
2311
|
+
viewport: "imf-ui-toast-module-viewport",
|
|
2312
|
+
widthCompact: "imf-ui-toast-module-widthCompact",
|
|
2313
|
+
widthContent: "imf-ui-toast-module-widthContent",
|
|
2314
|
+
widthDefault: "imf-ui-toast-module-widthDefault",
|
|
2315
|
+
widthWide: "imf-ui-toast-module-widthWide"
|
|
2312
2316
|
}, Na = /* @__PURE__ */ e({
|
|
2313
2317
|
Action: () => eo,
|
|
2314
2318
|
Arrow: () => no,
|
|
@@ -2324,15 +2328,26 @@ var ja = {
|
|
|
2324
2328
|
createToastManager: () => Ga,
|
|
2325
2329
|
useToastManager: () => Wa
|
|
2326
2330
|
}), Pa = h(Y.portal), Fa = h(Y.viewport, {
|
|
2327
|
-
variants: {
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2331
|
+
variants: {
|
|
2332
|
+
position: {
|
|
2333
|
+
"top-left": Y.positionTopLeft,
|
|
2334
|
+
"top-center": Y.positionTopCenter,
|
|
2335
|
+
"top-right": Y.positionTopRight,
|
|
2336
|
+
"bottom-left": Y.positionBottomLeft,
|
|
2337
|
+
"bottom-center": Y.positionBottomCenter,
|
|
2338
|
+
"bottom-right": Y.positionBottomRight
|
|
2339
|
+
},
|
|
2340
|
+
width: {
|
|
2341
|
+
compact: Y.widthCompact,
|
|
2342
|
+
default: Y.widthDefault,
|
|
2343
|
+
wide: Y.widthWide,
|
|
2344
|
+
content: Y.widthContent
|
|
2345
|
+
}
|
|
2346
|
+
},
|
|
2347
|
+
defaultVariants: {
|
|
2348
|
+
position: "bottom-center",
|
|
2349
|
+
width: "default"
|
|
2350
|
+
}
|
|
2336
2351
|
}), Ia = h(Y.root, {
|
|
2337
2352
|
variants: { variant: {
|
|
2338
2353
|
neutral: null,
|
|
@@ -2359,13 +2374,14 @@ function qa({ className: e, ...t }) {
|
|
|
2359
2374
|
});
|
|
2360
2375
|
}
|
|
2361
2376
|
qa.displayName = "Toast.Portal";
|
|
2362
|
-
function Ja({ className: e, position: t = "bottom-center",
|
|
2377
|
+
function Ja({ className: e, position: t = "bottom-center", width: n = "default", ...r }) {
|
|
2363
2378
|
return /* @__PURE__ */ _(T.Viewport, {
|
|
2364
|
-
...
|
|
2379
|
+
...r,
|
|
2365
2380
|
"data-imf-ui-component": "Toast.Viewport",
|
|
2366
|
-
className: (
|
|
2381
|
+
className: (r) => Fa({
|
|
2367
2382
|
position: t,
|
|
2368
|
-
|
|
2383
|
+
width: n,
|
|
2384
|
+
className: typeof e == "function" ? e(r) : e
|
|
2369
2385
|
})
|
|
2370
2386
|
});
|
|
2371
2387
|
}
|