@phreshos/react-ui 0.1.47 → 0.1.48

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.
Files changed (2) hide show
  1. package/dist/dialog.js +5 -2
  2. package/package.json +1 -1
package/dist/dialog.js CHANGED
@@ -53,9 +53,12 @@ export const DialogContent = forwardRef(function DialogContent({ children, class
53
53
  const padding = containerPadding(visual.spacing);
54
54
  const transition = overlayTransition(visual);
55
55
  const direction = resolveDirection(properties.dir, useDirection());
56
+ // The width belongs to the centered modal, so a Dialog of any width stays centered; the Surface fills it.
57
+ const { width = "32rem", maxWidth, ...surfaceStyle } = style ?? {};
56
58
  return _jsxs(_Fragment, { children: [_jsx(MotionStyle, {}), _jsx(AriaModal, { dir: direction, className: overlayMotionClass, style: {
57
59
  ...transition,
58
- width: `min(32rem, calc(100vw - ${inset * 2}px))`,
60
+ width,
61
+ maxWidth: maxWidth ?? `calc(100vw - ${inset * 2}px)`,
59
62
  maxHeight: `calc(100vh - ${inset * 2}px)`,
60
63
  outline: "none"
61
64
  }, children: _jsx(Surface, { className: className, color: color, material: material,
@@ -67,7 +70,7 @@ export const DialogContent = forwardRef(function DialogContent({ children, class
67
70
  maxHeight: "inherit",
68
71
  padding,
69
72
  overflow: "hidden",
70
- ...style
73
+ ...surfaceStyle
71
74
  }, children: _jsx(AriaDialog, { ...properties, ref: ref, style: {
72
75
  display: "grid",
73
76
  gap: inset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phreshos/react-ui",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "React components for coherent PhreshOS Program interfaces.",
5
5
  "type": "module",
6
6
  "sideEffects": false,