@homebound/beam 2.342.0 → 2.343.1

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 @@ const useModal_1 = require("./useModal");
13
13
  const Css_1 = require("../../Css");
14
14
  const utils_2 = require("../../utils");
15
15
  const ModalContext_1 = require("./ModalContext");
16
+ const hooks_1 = require("../../hooks");
16
17
  /**
17
18
  * Internal component for displaying a Modal; see `useModal` for the public API.
18
19
  *
@@ -42,6 +43,7 @@ function Modal(props) {
42
43
  const modalHeaderRef = (0, react_1.useRef)(null);
43
44
  const testId = (0, utils_2.useTestIds)({}, testIdPrefix);
44
45
  (0, react_aria_1.usePreventScroll)();
46
+ const { sm } = (0, hooks_1.useBreakpoint)();
45
47
  if (api) {
46
48
  api.current = { setSize: (size = "md") => setSize(getSize(size)) };
47
49
  }
@@ -73,7 +75,11 @@ function Modal(props) {
73
75
  .df.fdc.wPx(width)
74
76
  .mhPx(defaultMinHeight)
75
77
  .if(isFixedHeight)
76
- .hPx(height).$, ref: ref, ...overlayProps, ...dialogProps, ...modalProps, ...testId, children: [(0, jsx_runtime_1.jsxs)("header", { css: Css_1.Css.df.p3.fs0.if(drawHeaderBorder).bb.bGray200.$, children: [(0, jsx_runtime_1.jsx)("h1", { css: Css_1.Css.fg1.xl2Sb.gray900.$, ref: modalHeaderRef, ...titleProps, ...testId.title }), (0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.pl1.$, children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { icon: "x", onClick: closeModal, ...testId.titleClose }) })] }), (0, jsx_runtime_1.jsx)("main", { ref: modalBodyRef, css: Css_1.Css.fg1.overflowYAuto.if(hasScroll).bb.bGray200.if(!!forceScrolling).overflowYScroll.$, children: content }), (0, jsx_runtime_1.jsx)("footer", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)("div", { ref: modalFooterRef }) })] }) }) }) }) }) }));
78
+ .hPx(height)
79
+ .if(sm)
80
+ .add("height", "100dvh")
81
+ .add("width", "100dvw")
82
+ .maxh("none").br0.$, ref: ref, ...overlayProps, ...dialogProps, ...modalProps, ...testId, children: [(0, jsx_runtime_1.jsxs)("header", { css: Css_1.Css.df.p3.fs0.if(drawHeaderBorder).bb.bGray200.$, children: [(0, jsx_runtime_1.jsx)("h1", { css: Css_1.Css.fg1.xl2Sb.gray900.$, ref: modalHeaderRef, ...titleProps, ...testId.title }), (0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.pl1.$, children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { icon: "x", onClick: closeModal, ...testId.titleClose }) })] }), (0, jsx_runtime_1.jsx)("main", { ref: modalBodyRef, css: Css_1.Css.fg1.overflowYAuto.if(hasScroll).bb.bGray200.if(!!forceScrolling).overflowYScroll.$, children: content }), (0, jsx_runtime_1.jsx)("footer", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)("div", { ref: modalFooterRef }) })] }) }) }) }) }) }));
77
83
  }
78
84
  exports.Modal = Modal;
79
85
  function ModalHeader({ children }) {
@@ -80,7 +80,7 @@ function Tabs(props) {
80
80
  setActive(selected);
81
81
  }
82
82
  }
83
- return ((0, jsx_runtime_1.jsxs)("div", { css: { ...Css_1.Css.df.aic.$, ...(includeBottomBorder ? { ...Css_1.Css.bb.bGray200.$ } : {}) }, children: [!hideTabs(props) && ((0, jsx_runtime_1.jsx)("div", { ref: ref, css: Css_1.Css.dif.gap1.asfe.$, "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
83
+ return ((0, jsx_runtime_1.jsxs)("div", { css: { ...Css_1.Css.df.aic.overflowAuto.nowrap.gap1.$, ...(includeBottomBorder ? { ...Css_1.Css.bb.bGray200.$ } : {}) }, children: [!hideTabs(props) && ((0, jsx_runtime_1.jsx)("div", { ref: ref, css: Css_1.Css.dif.gap1.asfe.$, "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
84
84
  const uniqueValue = uniqueTabValue(tab);
85
85
  return ((0, jsx_runtime_1.jsx)(TabImpl, { active: active === uniqueValue, focusProps: focusProps, isFocusVisible: isFocusVisible, onClick: onClick, onKeyUp: onKeyUp, onBlur: onBlur, tab: tab, ...tid[(0, defaultTestId_1.defaultTestId)(uniqueValue)] }, uniqueValue));
86
86
  }) })), right && (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.mla.df.aic.gap1.pb1.$, children: right })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.342.0",
3
+ "version": "2.343.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",