asma-ui-core 3.128.1 → 3.128.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.
|
@@ -2,11 +2,11 @@ import { cn as r } from "../../../helpers/cn.js";
|
|
|
2
2
|
import { CloseIcon as h } from "../../icons/close-icon/CloseIcon.js";
|
|
3
3
|
import { StyledButton as c } from "../../inputs/button/StyledButton.js";
|
|
4
4
|
import { useScrollGutter as u } from "./useScrollGutter.js";
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
var _ = 40, j = "
|
|
8
|
-
const
|
|
9
|
-
return /* @__PURE__ */ o(
|
|
5
|
+
import { useRef as g } from "react";
|
|
6
|
+
import { Fragment as v, jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
var _ = 40, j = "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[0px_4px_40px_0px_#22213366]", b = "pointer-events-none absolute inset-0 rounded-[inherit] shadow-[inset_0_0_0_1px_var(--colors-delta-300)]", k = ({ dataTest: s, title: a, titleId: m, children: x, viewResultsAction: t, resetAction: l, footerActions: n, closeLabel: p, onClose: f }) => {
|
|
8
|
+
const d = g(null), i = u(d);
|
|
9
|
+
return /* @__PURE__ */ o(v, { children: [
|
|
10
10
|
/* @__PURE__ */ o("div", {
|
|
11
11
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
12
12
|
children: [a && /* @__PURE__ */ e("div", {
|
|
@@ -14,9 +14,9 @@ var _ = 40, j = "relative box-border flex flex-col overflow-hidden rounded-lg bg
|
|
|
14
14
|
className: "shrink-0 truncate pb-1 pl-4 pr-10 pt-2 text-lg font-semibold leading-7 text-delta-800",
|
|
15
15
|
children: a
|
|
16
16
|
}), /* @__PURE__ */ e("div", {
|
|
17
|
-
ref:
|
|
18
|
-
className: r("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto py-2 pl-4 [scrollbar-gutter:stable]", !a &&
|
|
19
|
-
style: { paddingRight: Math.max(0, _ -
|
|
17
|
+
ref: d,
|
|
18
|
+
className: r("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto py-2 pl-4 [scrollbar-gutter:stable]", !a && i.overflows && "mt-10"),
|
|
19
|
+
style: { paddingRight: Math.max(0, _ - i.width) },
|
|
20
20
|
children: x
|
|
21
21
|
})]
|
|
22
22
|
}),
|
|
@@ -24,9 +24,9 @@ var _ = 40, j = "relative box-border flex flex-col overflow-hidden rounded-lg bg
|
|
|
24
24
|
className: r("flex shrink-0 items-start p-1", t ? "justify-between" : "justify-end", "max-xs:flex-wrap max-xs:gap-y-2 max-xs:[&>:last-child]:ml-auto"),
|
|
25
25
|
children: [t, l]
|
|
26
26
|
}),
|
|
27
|
-
|
|
27
|
+
n && /* @__PURE__ */ e("div", {
|
|
28
28
|
className: r("flex shrink-0 flex-col items-end p-3", (t ?? l) && "max-xs:pt-1"),
|
|
29
|
-
children:
|
|
29
|
+
children: n
|
|
30
30
|
}),
|
|
31
31
|
/* @__PURE__ */ e("div", {
|
|
32
32
|
className: "absolute right-0 top-0",
|
|
@@ -202,7 +202,7 @@ var C = 240, nt = {
|
|
|
202
202
|
maxWidth: Ae,
|
|
203
203
|
maxHeight: ue
|
|
204
204
|
},
|
|
205
|
-
className: Le("z-[1300]", "
|
|
205
|
+
className: Le("z-[1300]", "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[0px_4px_40px_0px_#22213366]", X),
|
|
206
206
|
children: /* @__PURE__ */ m(We.Provider, {
|
|
207
207
|
value: c,
|
|
208
208
|
children: /* @__PURE__ */ m(Ke, {
|
|
@@ -12,7 +12,10 @@ import { ReactNode } from 'react';
|
|
|
12
12
|
* The ring is not on this surface itself: an element's own inset shadow paints beneath its
|
|
13
13
|
* children, so the Close button's hover fill in the top-right corner covered it. `PopoverAnatomy`
|
|
14
14
|
* draws it as its last, absolutely positioned layer (`SURFACE_EDGE_CLASSNAME`), above the content.
|
|
15
|
-
*
|
|
15
|
+
* The surface carries no `position` class: utilities here ship `!important`, so `relative` beat
|
|
16
|
+
* Floating UI's inline `position: fixed`. Inside a modal `<dialog>` (no top layer to rescue it) the
|
|
17
|
+
* sheet then rendered off-screen and focusing it scrolled the dialog sideways. The caller's
|
|
18
|
+
* position (the sheet's inline `fixed`, the Gallery's `relative`) is that layer's containing block.
|
|
16
19
|
*
|
|
17
20
|
* `box-border` is load-bearing, not noise: this package builds Tailwind with `preflight: false`, so
|
|
18
21
|
* without it `box-sizing` falls back to `content-box` and a 472px max-width renders 474.
|
|
@@ -20,7 +23,7 @@ import { ReactNode } from 'react';
|
|
|
20
23
|
* Positioning (`z-index`, the floating transform, the top-layer props) deliberately stays with the
|
|
21
24
|
* caller, so the Gallery story can render the same surface statically in a grid.
|
|
22
25
|
*/
|
|
23
|
-
export declare const POPOVER_SURFACE_CLASSNAME = "
|
|
26
|
+
export declare const POPOVER_SURFACE_CLASSNAME = "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[0px_4px_40px_0px_#22213366]";
|
|
24
27
|
export interface PopoverAnatomyProps {
|
|
25
28
|
dataTest: string;
|
|
26
29
|
title?: ReactNode;
|