@estiva-app/ui 0.12.5 → 0.12.6
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/Menu.d.ts.map +1 -1
- package/dist/Popover.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/Menu.tsx +18 -6
- package/src/Popover.tsx +7 -5
package/package.json
CHANGED
package/src/Menu.tsx
CHANGED
|
@@ -208,16 +208,28 @@ export function Menu({ trigger, align = 'left', openOnHover = false, open, onOpe
|
|
|
208
208
|
room. Select's 288 was never this component's — the identity
|
|
209
209
|
panel got it by accident once and grew a scrollbar at full
|
|
210
210
|
height. */
|
|
211
|
-
className={cn('min-w-[180px] outline-none', className)}
|
|
211
|
+
className={cn('min-w-[180px] outline-none p-0', className)}
|
|
212
212
|
render={<MenuPanel />}
|
|
213
213
|
>
|
|
214
214
|
{/* The height cap sits on the box that scrolls — on the panel it
|
|
215
215
|
let the box grow to its content and nothing scrolled (measured,
|
|
216
|
-
2026-09-08)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
2026-09-08).
|
|
217
|
+
*
|
|
218
|
+
* And **the padding is on the content, not on the panel** (D63,
|
|
219
|
+
* 2026-09-13). With it on the panel the scrolling box was inset by
|
|
220
|
+
* it, so the bar floated 9px in from the panel's edge where every
|
|
221
|
+
* other scrolling surface in the suite draws it at 1px —
|
|
222
|
+
* `DialogShell` had it right and said so in its own comment, and
|
|
223
|
+
* this is the same arrangement. The rows do not move: the padding
|
|
224
|
+
* that used to be the panel's is now the content's, at the same
|
|
225
|
+
* 8px. The cap loses its `- 1rem` for the same reason — the
|
|
226
|
+
* padding is inside the scrolling box now, so the panel is exactly
|
|
227
|
+
* as tall as Floating UI allowed.
|
|
228
|
+
*
|
|
229
|
+
* A caller's `className` still lands on the panel, so a caller
|
|
230
|
+
* asking for different padding needs `contentClassName` — which is
|
|
231
|
+
* what `MenuPanel` is for when one is used on its own. */}
|
|
232
|
+
<ScrollArea viewportClassName="max-h-[var(--available-height)]" contentClassName="flex flex-col p-2 [&>[role=separator]]:mx-0">
|
|
221
233
|
<MenuContext.Provider value={{ openOnHover }}>{children}</MenuContext.Provider>
|
|
222
234
|
</ScrollArea>
|
|
223
235
|
</BaseMenu.Popup>
|
package/src/Popover.tsx
CHANGED
|
@@ -175,14 +175,16 @@ export function Popover({ trigger, anchor, align = 'left', side = 'bottom', open
|
|
|
175
175
|
*/
|
|
176
176
|
initialFocus={trigger ? undefined : false}
|
|
177
177
|
finalFocus={finalFocus}
|
|
178
|
-
className={cn('min-w-[180px] outline-none', className)}
|
|
178
|
+
className={cn('min-w-[180px] outline-none p-0', className)}
|
|
179
179
|
render={<MenuPanel />}
|
|
180
180
|
>
|
|
181
|
-
{/* As in Menu: the cap on the scrolling box,
|
|
182
|
-
|
|
181
|
+
{/* As in Menu: the cap on the scrolling box, and the padding on the
|
|
182
|
+
content rather than the panel, so the bar is drawn over the
|
|
183
|
+
padding instead of 9px inside it (D63). A caller's `maxHeight`
|
|
184
|
+
replaces the cap — see the prop. */}
|
|
183
185
|
<ScrollArea
|
|
184
|
-
viewportClassName={maxHeight ?? 'max-h-[
|
|
185
|
-
contentClassName="flex flex-col [&>[role=separator]]:mx-0"
|
|
186
|
+
viewportClassName={maxHeight ?? 'max-h-[var(--available-height)]'}
|
|
187
|
+
contentClassName="flex flex-col p-2 [&>[role=separator]]:mx-0"
|
|
186
188
|
>
|
|
187
189
|
{children}
|
|
188
190
|
</ScrollArea>
|