@byline/ui 3.12.0 → 3.12.2

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.
@@ -40,12 +40,15 @@ const drawer_Drawer = ({ id, isOpen, onDismiss, closeOnOverlayClick, children, w
40
40
  top: topOffset
41
41
  } : void 0
42
42
  }),
43
- /*#__PURE__*/ jsx(Drawer.Popup, {
44
- className: classnames('byline-drawer-wrapper', drawer_module["drawer-wrapper"], typedStyles[`drawer-${width}`], typedStyles[`drawer-depth-${depth.toString()}`], className),
45
- style: hasTopOffset ? {
46
- top: topOffset
47
- } : void 0,
48
- children: children
43
+ /*#__PURE__*/ jsx(Drawer.Viewport, {
44
+ className: classnames('byline-drawer-viewport', drawer_module.viewport),
45
+ children: /*#__PURE__*/ jsx(Drawer.Popup, {
46
+ className: classnames('byline-drawer-wrapper', drawer_module["drawer-wrapper"], typedStyles[`drawer-${width}`], typedStyles[`drawer-depth-${depth.toString()}`], className),
47
+ style: hasTopOffset ? {
48
+ top: topOffset
49
+ } : void 0,
50
+ children: children
51
+ })
49
52
  })
50
53
  ]
51
54
  })
@@ -1,6 +1,7 @@
1
1
  import "./drawer_module.css";
2
2
  const drawer_module = {
3
3
  backdrop: "backdrop-Ga1s55",
4
+ viewport: "viewport-YXa3uO",
4
5
  "drawer-wrapper": "drawer-wrapper-q0hBzd",
5
6
  drawerWrapper: "drawer-wrapper-q0hBzd",
6
7
  "drawer-container": "drawer-container-ssf1qn",
@@ -28,6 +28,10 @@
28
28
  background-color: #00000080;
29
29
  }
30
30
 
31
+ :is(.viewport-YXa3uO, .byline-drawer-viewport) {
32
+ display: contents;
33
+ }
34
+
31
35
  :is(.drawer-wrapper-q0hBzd, .byline-drawer-wrapper) {
32
36
  background-color: var(--surface-panel);
33
37
  box-shadow: var(--shadow-md);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
- "version": "3.12.0",
6
+ "version": "3.12.2",
7
7
  "engines": {
8
8
  "node": ">=20.9.0"
9
9
  },
@@ -62,7 +62,7 @@
62
62
  "npm-run-all": "^4.1.5",
63
63
  "react-day-picker": "^10.0.1",
64
64
  "zod": "^4.4.3",
65
- "@byline/core": "3.12.0"
65
+ "@byline/core": "3.12.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^19.0.0",
@@ -34,6 +34,16 @@
34
34
  background-color: rgba(0, 0, 0, 0.5);
35
35
  }
36
36
 
37
+ /* Viewport — Base UI's swipe / scroll-lock container. Layout-neutral here
38
+ (`display: contents`) so the Popup keeps owning its own fixed positioning;
39
+ the wrapper exists only to satisfy Base UI's Popup-within-Viewport
40
+ requirement. */
41
+
42
+ .viewport,
43
+ :global(.byline-drawer-viewport) {
44
+ display: contents;
45
+ }
46
+
37
47
  /* Drawer wrapper / popup — the sliding panel itself */
38
48
 
39
49
  .drawer-wrapper,
@@ -71,18 +71,25 @@ const Drawer = ({
71
71
  className={cx('byline-drawer-backdrop', styles.backdrop)}
72
72
  style={hasTopOffset ? { top: topOffset } : undefined}
73
73
  />
74
- <BaseDrawer.Popup
75
- className={cx(
76
- 'byline-drawer-wrapper',
77
- styles['drawer-wrapper'],
78
- typedStyles[`drawer-${width}`],
79
- typedStyles[`drawer-depth-${depth.toString()}`],
80
- className
81
- )}
82
- style={hasTopOffset ? { top: topOffset } : undefined}
83
- >
84
- {children}
85
- </BaseDrawer.Popup>
74
+ {/* Base UI expects <Popup> to live inside a <Viewport> — the element
75
+ that owns swipe-dismiss + touch scroll-locking. Our positioning
76
+ lives on the Popup itself, so the Viewport is a layout-neutral
77
+ (`display: contents`) wrapper here: it satisfies the context and
78
+ silences the warning without disturbing the Popup's fixed layout. */}
79
+ <BaseDrawer.Viewport className={cx('byline-drawer-viewport', styles.viewport)}>
80
+ <BaseDrawer.Popup
81
+ className={cx(
82
+ 'byline-drawer-wrapper',
83
+ styles['drawer-wrapper'],
84
+ typedStyles[`drawer-${width}`],
85
+ typedStyles[`drawer-depth-${depth.toString()}`],
86
+ className
87
+ )}
88
+ style={hasTopOffset ? { top: topOffset } : undefined}
89
+ >
90
+ {children}
91
+ </BaseDrawer.Popup>
92
+ </BaseDrawer.Viewport>
86
93
  </BaseDrawer.Portal>
87
94
  </BaseDrawer.Root>
88
95
  )