@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.
@@ -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: { position: {
2328
- "top-left": Y.positionTopLeft,
2329
- "top-center": Y.positionTopCenter,
2330
- "top-right": Y.positionTopRight,
2331
- "bottom-left": Y.positionBottomLeft,
2332
- "bottom-center": Y.positionBottomCenter,
2333
- "bottom-right": Y.positionBottomRight
2334
- } },
2335
- defaultVariants: { position: "bottom-center" }
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", ...n }) {
2377
+ function Ja({ className: e, position: t = "bottom-center", width: n = "default", ...r }) {
2363
2378
  return /* @__PURE__ */ _(T.Viewport, {
2364
- ...n,
2379
+ ...r,
2365
2380
  "data-imf-ui-component": "Toast.Viewport",
2366
- className: (n) => Fa({
2381
+ className: (r) => Fa({
2367
2382
  position: t,
2368
- className: typeof e == "function" ? e(n) : e
2383
+ width: n,
2384
+ className: typeof e == "function" ? e(r) : e
2369
2385
  })
2370
2386
  });
2371
2387
  }