asma-ui-core 3.118.0 → 3.119.0

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.
@@ -1,13 +1,13 @@
1
- import { cn as n } from "../../../helpers/cn.js";
1
+ import { cn as d } from "../../../helpers/cn.js";
2
2
  import { CloseIcon as c } from "../../icons/close-icon/CloseIcon.js";
3
3
  import { StyledButton as h } from "../../inputs/button/StyledButton.js";
4
4
  import { useScrollGutter as u } from "./useScrollGutter.js";
5
5
  import { useRef as v } from "react";
6
- import { Fragment as g, jsx as e, jsxs as r } 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-[inset_0_0_0_1px_var(--colors-delta-300),0px_4px_40px_0px_#22213366]", k = ({ dataTest: d, title: t, titleId: m, children: f, viewResultsAction: l, resetAction: a, footerActions: o, closeLabel: p, onClose: x }) => {
8
- const i = v(null), s = u(i);
9
- return /* @__PURE__ */ r(g, { children: [
10
- /* @__PURE__ */ r("div", {
6
+ import { Fragment as _, jsx as e, jsxs as l } from "react/jsx-runtime";
7
+ var g = 40, j = "relative 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: a, title: t, titleId: m, children: p, viewResultsAction: r, resetAction: o, footerActions: i, closeLabel: f, onClose: x }) => {
8
+ const n = v(null), s = u(n);
9
+ return /* @__PURE__ */ l(_, { children: [
10
+ /* @__PURE__ */ l("div", {
11
11
  className: "relative flex min-h-0 flex-1 flex-col",
12
12
  children: [
13
13
  t && /* @__PURE__ */ e("div", {
@@ -16,18 +16,18 @@ var _ = 40, j = "box-border flex flex-col overflow-hidden rounded-lg bg-white te
16
16
  children: t
17
17
  }),
18
18
  /* @__PURE__ */ e("div", {
19
- ref: i,
20
- className: n("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto py-2 pl-4 [scrollbar-gutter:stable]", !t && s.overflows && "mt-10"),
21
- style: { paddingRight: Math.max(0, _ - s.width) },
22
- children: f
19
+ ref: n,
20
+ className: d("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto py-2 pl-4 [scrollbar-gutter:stable]", !t && s.overflows && "mt-10"),
21
+ style: { paddingRight: Math.max(0, g - s.width) },
22
+ children: p
23
23
  }),
24
24
  /* @__PURE__ */ e("div", {
25
25
  className: "absolute right-0 top-0",
26
26
  children: /* @__PURE__ */ e(h, {
27
- dataTest: `${d}-close`,
27
+ dataTest: `${a}-close`,
28
28
  variant: "textGray",
29
29
  type: "button",
30
- "aria-label": p,
30
+ "aria-label": f,
31
31
  onClick: x,
32
32
  startIcon: /* @__PURE__ */ e(c, {
33
33
  width: 24,
@@ -37,13 +37,18 @@ var _ = 40, j = "box-border flex flex-col overflow-hidden rounded-lg bg-white te
37
37
  })
38
38
  ]
39
39
  }),
40
- (l ?? a) && /* @__PURE__ */ r("div", {
41
- className: n("flex shrink-0 items-start p-1", l ? "justify-between" : "justify-end"),
42
- children: [l, a]
40
+ (r ?? o) && /* @__PURE__ */ l("div", {
41
+ className: d("flex shrink-0 items-start p-1", r ? "justify-between" : "justify-end"),
42
+ children: [r, o]
43
43
  }),
44
- o && /* @__PURE__ */ e("div", {
44
+ i && /* @__PURE__ */ e("div", {
45
45
  className: "flex shrink-0 flex-col items-end p-3",
46
- children: o
46
+ children: i
47
+ }),
48
+ /* @__PURE__ */ e("span", {
49
+ "aria-hidden": !0,
50
+ "data-test": `${a}-edge`,
51
+ className: b
47
52
  })
48
53
  ] });
49
54
  };
@@ -1,181 +1,223 @@
1
- import { cn as ie } from "../../../helpers/cn.js";
2
- import { firstTabbable as se } from "../../../helpers/focusable.js";
3
- import { TOP_LAYER_PROPS as ae, TOP_LAYER_RESET_STYLE as le, getOpenModalDialogAncestor as ce, shouldUsePopoverTopLayer as de, useTopLayerRef as ue } from "../../../hooks/useTopLayer.hook.js";
4
- import { StyledButton as fe } from "../../inputs/button/StyledButton.js";
5
- import { useMobileMediaQuery as pe } from "../../../hooks/useMediaQuery.hook.js";
6
- import { OverlayBackOwnerContext as me, useBackCloses as ge } from "../../../hooks/useBackCloses.hook.js";
7
- import { useDebouncedValue as ve } from "../../../hooks/useDebouncedValue.hook.js";
8
- import { useFocusTrap as he } from "../../../hooks/useFocusTrap.hook.js";
9
- import { formatResultsLabel as xe } from "../bottom-sheet/formatResultsLabel.js";
10
- import { StyledBottomSheet as _e } from "../bottom-sheet/StyledBottomSheet.js";
11
- import { PopoverAnatomy as Pe } from "./PopoverAnatomy.js";
12
- import { useCallback as x, useEffect as w, useId as be, useRef as O, useState as d } from "react";
13
- import { Fragment as D, jsx as a, jsxs as N } from "react/jsx-runtime";
14
- import { FloatingPortal as ye, autoUpdate as Re, flip as we, offset as Oe, shift as Te, size as Ee, useDismiss as Me, useFloating as Se, useInteractions as Ae, useMergeRefs as Fe } from "@floating-ui/react";
15
- var Ie = 240, Ce = {
1
+ import { cn as Oe } from "../../../helpers/cn.js";
2
+ import { firstTabbable as oe } from "../../../helpers/focusable.js";
3
+ import { TOP_LAYER_PROPS as Te, TOP_LAYER_RESET_STYLE as Ce, getOpenModalDialogAncestor as Se, shouldUsePopoverTopLayer as Ie, useTopLayerRef as Me } from "../../../hooks/useTopLayer.hook.js";
4
+ import { StyledButton as _e } from "../../inputs/button/StyledButton.js";
5
+ import { useMobileMediaQuery as ke } from "../../../hooks/useMediaQuery.hook.js";
6
+ import { OverlayBackOwnerContext as He, requestCloseTopOverlayBack as We, useBackCloses as Be } from "../../../hooks/useBackCloses.hook.js";
7
+ import { useDebouncedValue as De } from "../../../hooks/useDebouncedValue.hook.js";
8
+ import { useFocusTrap as qe } from "../../../hooks/useFocusTrap.hook.js";
9
+ import { formatResultsLabel as $e } from "../bottom-sheet/formatResultsLabel.js";
10
+ import { StyledBottomSheet as Ne } from "../bottom-sheet/StyledBottomSheet.js";
11
+ import { PopoverAnatomy as Xe } from "./PopoverAnatomy.js";
12
+ import { useCallback as d, useEffect as v, useId as je, useRef as f, useState as l } from "react";
13
+ import { Fragment as ne, jsx as m, jsxs as re } from "react/jsx-runtime";
14
+ import { FloatingPortal as Ke, autoUpdate as Ue, flip as Ye, offset as ze, shift as Ve, size as Ge, useDismiss as Qe, useFloating as Je, useInteractions as Ze, useMergeRefs as et } from "@floating-ui/react";
15
+ var C = 240, tt = {
16
16
  info: 472,
17
17
  action: 472
18
- }, ke = 0.6, X = "calc(100vw - 32px)", Le = (i, u, f) => Re(i, u, f, { elementResize: !1 }), Je = ({ dataTest: i, renderTrigger: u, variant: f = "info", title: p, children: T, viewResultsAction: E, resetAction: M, footerActions: S, resultCount: _, closeLabel: A = "Lukk", ariaLabel: F, onOpenChange: I, className: C }) => {
19
- const l = be(), k = `${l}-title`, [o, q] = d(!1), [L, z] = d(), [K, U] = d(), m = pe(), t = f === "action", Y = m && !t, H = m && t, g = x((e) => {
20
- q(e), I?.(e);
21
- }, [I]), { refs: P, floatingStyles: $, context: j } = Se({
18
+ }, ie = 0.6, se = "calc(100vw - 32px)", wt = ({ dataTest: p, renderTrigger: S, variant: I = "info", title: w, children: M, viewResultsAction: _, resetAction: k, footerActions: H, resultCount: E, closeLabel: W = "Lukk", ariaLabel: B, onOpenChange: D, className: q, align: $ = "auto", ignoreOutside: N }) => {
19
+ const g = je(), X = `${g}-title`, [o, ae] = l(!1), [j, ce] = l(), [le, K] = l(), [ue, de] = l("start"), [R, U] = l(), [fe, Y] = l(C), u = ke(), n = I === "action", me = u && !n, y = u && n, P = d((e) => {
20
+ ae(e), D?.(e);
21
+ }, [D]), { refs: b, floatingStyles: pe, context: ge, placement: z, isPositioned: he } = Je({
22
22
  open: o,
23
- onOpenChange: g,
24
- placement: "bottom-start",
23
+ onOpenChange: P,
24
+ placement: `${R ?? "bottom"}-${ue}`,
25
25
  strategy: "fixed",
26
- whileElementsMounted: Le,
26
+ whileElementsMounted: Ue,
27
27
  middleware: [
28
- Oe(8),
29
- ...Y ? [] : [we({ padding: 8 })],
30
- Te({ padding: 8 }),
31
- Ee({
28
+ ze(8),
29
+ ...me || R ? [] : [Ye({
32
30
  padding: 8,
33
- apply({ availableHeight: e }) {
34
- U(Math.min(e, Math.round(window.innerHeight * ke)));
31
+ crossAxis: !1,
32
+ flipAlignment: !1
33
+ })],
34
+ Ve({ padding: 8 }),
35
+ Ge({
36
+ padding: 8,
37
+ apply({ availableHeight: e, rects: t }) {
38
+ K(Math.min(e, Math.round(window.innerHeight * ie))), u || Y((a) => Math.max(a, t.floating.width));
35
39
  }
36
40
  })
37
41
  ]
38
- }), { getFloatingProps: V } = Ae([Me(j, {
39
- enabled: !H,
40
- escapeKey: !0,
42
+ });
43
+ o && he && !R && U(z.startsWith("top") ? "top" : "bottom");
44
+ const F = Ie(j), c = f(null), [r, ve] = l(null), we = d((e) => {
45
+ c.current = e, ve(e);
46
+ }, []), ye = et([Me(b.setFloating, F), we]), A = f(null), Pe = d((e) => {
47
+ A.current = e, b.setReference(e);
48
+ }, [b]), V = f(null), L = N?.length ? N.join(",") : void 0, G = f(L);
49
+ v(() => {
50
+ G.current = L;
51
+ }, [L]);
52
+ const h = d((e) => {
53
+ if (!(e instanceof Element)) return !1;
54
+ if (c.current?.contains(e) || A.current?.contains(e) || V.current === e) return !0;
55
+ const t = G.current;
56
+ return t !== void 0 && e.closest(t) !== null;
57
+ }, []), Q = f(null), xe = d((e) => {
58
+ V.current = e.target, e.target instanceof HTMLElement && c.current?.contains(e.target) && (Q.current = e.target);
59
+ }, []), { getFloatingProps: Ee } = Ze([Qe(ge, {
60
+ enabled: !y,
61
+ escapeKey: !1,
41
62
  outsidePress: (e) => {
42
- const s = v.current;
43
- return !(s && e.target instanceof Node && s.contains(e.target));
63
+ const t = e.target;
64
+ if (!(t instanceof Element)) return !0;
65
+ if (h(t) || t.closest("[data-floating-ui-portal]")) return !1;
66
+ const a = t.closest('dialog[open], [role="dialog"]');
67
+ return !a || a.contains(c.current);
44
68
  }
45
- })]), b = de(L), c = O(null), [r, G] = d(null), Q = x((e) => {
46
- c.current = e, G(e);
47
- }, []), J = Fe([ue(P.setFloating, b), Q]), v = O(null), Z = x((e) => {
48
- v.current = e, P.setReference(e);
49
- }, [P]), n = x(() => {
50
- g(!1);
51
- }, [g]);
52
- ge({
69
+ })]), s = d(() => {
70
+ P(!1);
71
+ }, [P]);
72
+ Be({
53
73
  active: o,
54
- requestClose: n,
74
+ requestClose: s,
55
75
  ownerRef: c
56
- }), he(o && t && r !== null, c);
57
- const [W, ee] = d(!1);
58
- w(() => {
59
- if (!r || t && !W) return;
76
+ }), v(() => {
77
+ if (!o || y) return;
78
+ const e = (t) => {
79
+ t.key !== "Escape" || t.defaultPrevented || t.isComposing || (t.preventDefault(), t.stopImmediatePropagation(), We(t));
80
+ };
81
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
82
+ }, [o, y]), qe(o && n && r !== null, c);
83
+ const [J, Re] = l(!1);
84
+ v(() => {
85
+ if (!r || n && !J) return;
60
86
  const e = requestAnimationFrame(() => {
61
- (t ? se(r) : r)?.focus({ preventScroll: !0 });
87
+ (n ? oe(r) : r)?.focus({ preventScroll: !0 });
62
88
  });
63
89
  return () => {
64
90
  cancelAnimationFrame(e);
65
91
  };
66
92
  }, [
67
93
  r,
68
- t,
69
- W
70
- ]), w(() => {
71
- if (!r || t) return;
72
- const e = (s) => {
73
- const R = s.relatedTarget;
74
- R instanceof Node && (r.contains(R) || v.current?.contains(R)) || n();
94
+ n,
95
+ J
96
+ ]), v(() => {
97
+ if (!r) return;
98
+ let e = 0;
99
+ const t = () => {
100
+ cancelAnimationFrame(e), e = requestAnimationFrame(() => {
101
+ const i = document.activeElement;
102
+ if (!r.isConnected || i && i !== document.body && h(i)) return;
103
+ const T = Q.current;
104
+ (T?.isConnected && r.contains(T) ? T : oe(r) ?? r).focus({ preventScroll: !0 });
105
+ });
106
+ }, a = (i) => {
107
+ i.relatedTarget === null && s();
108
+ }, ee = (i) => {
109
+ i.relatedTarget === null && h(i.target) && t();
110
+ }, te = (i) => {
111
+ !r.isConnected || h(i.target) || (n ? t() : s());
75
112
  };
76
- return r.addEventListener("focusout", e), () => {
77
- r.removeEventListener("focusout", e);
113
+ return n ? document.addEventListener("focusout", ee) : r.addEventListener("focusout", a), document.addEventListener("focusin", te), () => {
114
+ cancelAnimationFrame(e), document.removeEventListener("focusout", ee), r.removeEventListener("focusout", a), document.removeEventListener("focusin", te);
78
115
  };
79
116
  }, [
80
117
  r,
81
- t,
82
- n
118
+ n,
119
+ s,
120
+ h
83
121
  ]);
84
- const y = O(!1);
85
- w(() => {
122
+ const O = f(!1);
123
+ v(() => {
86
124
  if (o) {
87
- y.current = !0;
125
+ O.current = !0;
88
126
  return;
89
127
  }
90
- if (!y.current) return;
91
- y.current = !1;
92
- const e = v.current;
128
+ if (!O.current) return;
129
+ O.current = !1;
130
+ const e = A.current;
93
131
  if (!e) return;
94
- const s = requestAnimationFrame(() => {
132
+ const t = requestAnimationFrame(() => {
95
133
  document.activeElement === document.body && e.focus();
96
134
  });
97
135
  return () => {
98
- cancelAnimationFrame(s);
136
+ cancelAnimationFrame(t);
99
137
  };
100
138
  }, [o]);
101
- const B = {
102
- ref: Z,
139
+ const Z = {
140
+ ref: Pe,
103
141
  isOpen: o,
104
142
  triggerProps: {
105
143
  onClick: (e) => {
106
144
  if (o) {
107
- n();
145
+ s();
108
146
  return;
109
147
  }
110
- z(ce(e.currentTarget)), ee(e.detail === 0), g(!0);
148
+ ce(Se(e.currentTarget));
149
+ const t = e.currentTarget.getBoundingClientRect(), a = t.left + t.width / 2 > window.innerWidth / 2;
150
+ de($ === "auto" ? a ? "end" : "start" : $), U(void 0), Y(C), K(Math.round(window.innerHeight * ie)), Re(e.detail === 0), P(!0);
111
151
  },
112
152
  "aria-expanded": o,
113
- "aria-controls": o ? l : void 0,
114
- "aria-haspopup": t ? "dialog" : void 0,
115
- "aria-describedby": !t && o ? l : void 0
153
+ "aria-controls": o ? g : void 0,
154
+ "aria-haspopup": n ? "dialog" : void 0,
155
+ "aria-describedby": !n && o ? g : void 0
116
156
  }
117
- }, h = (e) => typeof e == "function" ? e({ close: n }) : e, te = ve(_, 500), oe = E ?? (_ === void 0 ? void 0 : /* @__PURE__ */ a(fe, {
118
- dataTest: `${i}-view-results`,
157
+ }, x = (e) => typeof e == "function" ? e({ close: s }) : e, be = De(E, 500), Fe = _ ?? (E === void 0 ? void 0 : /* @__PURE__ */ m(_e, {
158
+ dataTest: `${p}-view-results`,
119
159
  type: "button",
120
160
  variant: "text",
121
- onClick: n,
122
- children: xe(te)
123
- })), re = m ? X : Ce[f], ne = m ? X : void 0;
124
- return H ? /* @__PURE__ */ N(D, { children: [u(B), /* @__PURE__ */ a(_e, {
125
- id: l,
126
- dataTest: i,
161
+ onClick: s,
162
+ children: $e(be)
163
+ })), Ae = u ? se : tt[I], Le = u ? se : void 0;
164
+ return y ? /* @__PURE__ */ re(ne, { children: [S(Z), /* @__PURE__ */ m(Ne, {
165
+ id: g,
166
+ dataTest: p,
127
167
  open: o,
128
- onClose: n,
168
+ onClose: s,
129
169
  registerBackClose: !1,
130
170
  ownerRef: c,
131
- title: p,
132
- ariaLabel: F,
133
- viewResultsAction: E,
134
- resetAction: M,
135
- footerActions: S,
136
- resultCount: _,
137
- closeLabel: A,
138
- className: C,
139
- children: T
140
- })] }) : /* @__PURE__ */ N(D, { children: [u(B), o && /* @__PURE__ */ a(ye, {
141
- root: L,
142
- children: /* @__PURE__ */ a("div", {
143
- ...V(),
144
- ref: J,
145
- id: l,
146
- "data-test": i,
147
- "data-testid": i,
148
- role: t ? "dialog" : void 0,
149
- "aria-labelledby": t && p ? k : void 0,
150
- "aria-label": t && !p ? F : void 0,
151
- tabIndex: t ? void 0 : -1,
152
- ...b ? ae : {},
171
+ title: w,
172
+ ariaLabel: B,
173
+ viewResultsAction: _,
174
+ resetAction: k,
175
+ footerActions: H,
176
+ resultCount: E,
177
+ closeLabel: W,
178
+ className: q,
179
+ children: M
180
+ })] }) : /* @__PURE__ */ re(ne, { children: [S(Z), o && /* @__PURE__ */ m(Ke, {
181
+ root: j,
182
+ children: /* @__PURE__ */ m("div", {
183
+ ...Ee(),
184
+ onFocusCapture: xe,
185
+ ref: ye,
186
+ id: g,
187
+ "data-placement": z,
188
+ "data-test": p,
189
+ "data-testid": p,
190
+ role: n ? "dialog" : void 0,
191
+ "aria-labelledby": n && w ? X : void 0,
192
+ "aria-label": n && !w ? B : void 0,
193
+ tabIndex: n ? void 0 : -1,
194
+ ...F ? Te : {},
153
195
  style: {
154
- ...b ? le : {},
155
- ...$,
156
- minWidth: Ie,
157
- width: ne,
158
- maxWidth: re,
159
- maxHeight: K
196
+ ...F ? Ce : {},
197
+ ...pe,
198
+ minWidth: u ? C : fe,
199
+ width: Le,
200
+ maxWidth: Ae,
201
+ maxHeight: le
160
202
  },
161
- className: ie("z-[1300]", "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[inset_0_0_0_1px_var(--colors-delta-300),0px_4px_40px_0px_#22213366]", C),
162
- children: /* @__PURE__ */ a(me.Provider, {
203
+ className: Oe("z-[1300]", "relative box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[0px_4px_40px_0px_#22213366]", q),
204
+ children: /* @__PURE__ */ m(He.Provider, {
163
205
  value: c,
164
- children: /* @__PURE__ */ a(Pe, {
165
- dataTest: i,
166
- title: p,
167
- titleId: k,
168
- viewResultsAction: h(oe),
169
- resetAction: h(M),
170
- footerActions: h(S),
171
- closeLabel: A,
172
- onClose: n,
173
- children: h(T)
206
+ children: /* @__PURE__ */ m(Xe, {
207
+ dataTest: p,
208
+ title: w,
209
+ titleId: X,
210
+ viewResultsAction: x(Fe),
211
+ resetAction: x(k),
212
+ footerActions: x(H),
213
+ closeLabel: W,
214
+ onClose: s,
215
+ children: x(M)
174
216
  })
175
217
  })
176
218
  })
177
219
  })] });
178
220
  };
179
221
  export {
180
- Je as PopoverSheet
222
+ wt as PopoverSheet
181
223
  };
@@ -1,10 +1,10 @@
1
1
  import { tabbableWithin as p } from "../helpers/focusable.js";
2
2
  import { useEffect as d, useRef as y } from "react";
3
- var E = (c, i, s) => {
4
- const f = y(s);
3
+ var E = (c, i, u) => {
4
+ const f = y(u);
5
5
  d(() => {
6
- f.current = s;
7
- }, [s]), d(() => {
6
+ f.current = u;
7
+ }, [u]), d(() => {
8
8
  if (!c) return;
9
9
  const t = i.current;
10
10
  if (!t) return;
@@ -17,14 +17,14 @@ var E = (c, i, s) => {
17
17
  f.current?.();
18
18
  return;
19
19
  }
20
- if (e.key !== "Tab") return;
20
+ if (e.key !== "Tab" || e.defaultPrevented) return;
21
21
  const r = p(t);
22
22
  if (r.length === 0) {
23
23
  e.preventDefault();
24
24
  return;
25
25
  }
26
- const u = r[0], m = r[r.length - 1], o = document.activeElement;
27
- e.shiftKey && (o === u || o === t) ? (e.preventDefault(), m?.focus()) : (!e.shiftKey && o === m || !e.shiftKey && o === t) && (e.preventDefault(), u?.focus());
26
+ const s = r[0], m = r[r.length - 1], o = document.activeElement;
27
+ e.shiftKey && (o === s || o === t) ? (e.preventDefault(), m?.focus()) : (!e.shiftKey && o === m || !e.shiftKey && o === t) && (e.preventDefault(), s?.focus());
28
28
  };
29
29
  return document.addEventListener("keydown", l), () => {
30
30
  cancelAnimationFrame(b), document.removeEventListener("keydown", l), a === null ? t.removeAttribute("tabindex") : t.setAttribute("tabindex", a), requestAnimationFrame(() => {
@@ -9,13 +9,18 @@ import { ReactNode } from 'react';
9
9
  * 40px body padding) needs the full 472px of the frame — with a border only 470px remain and the
10
10
  * pair wraps. Figma's stroke takes no width from autolayout, and the inset shadow matches that.
11
11
  *
12
+ * The ring is not on this surface itself: an element's own inset shadow paints beneath its
13
+ * children, so the Close button's hover fill in the top-right corner covered it. `PopoverAnatomy`
14
+ * draws it as its last, absolutely positioned layer (`SURFACE_EDGE_CLASSNAME`), above the content.
15
+ * `relative` makes the surface that layer's containing block where no floating position is set.
16
+ *
12
17
  * `box-border` is load-bearing, not noise: this package builds Tailwind with `preflight: false`, so
13
18
  * without it `box-sizing` falls back to `content-box` and a 472px max-width renders 474.
14
19
  *
15
20
  * Positioning (`z-index`, the floating transform, the top-layer props) deliberately stays with the
16
21
  * caller, so the Gallery story can render the same surface statically in a grid.
17
22
  */
18
- export declare const POPOVER_SURFACE_CLASSNAME = "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[inset_0_0_0_1px_var(--colors-delta-300),0px_4px_40px_0px_#22213366]";
23
+ export declare const POPOVER_SURFACE_CLASSNAME = "relative box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[0px_4px_40px_0px_#22213366]";
19
24
  export interface PopoverAnatomyProps {
20
25
  dataTest: string;
21
26
  title?: ReactNode;
@@ -60,6 +60,18 @@ export interface PopoverSheetProps {
60
60
  onOpenChange?: (isOpen: boolean) => void;
61
61
  /** @figmaProp none — style escape hatch, applied to the surface */
62
62
  className?: string;
63
+ /**
64
+ * Which trigger edge the surface lines up with. `auto` picks once per open: `end` when the
65
+ * trigger's centre is in the right half of the viewport, otherwise `start`.
66
+ * @figmaProp none — behavioral
67
+ */
68
+ align?: 'start' | 'end' | 'auto';
69
+ /**
70
+ * CSS selectors for overlays rendered outside React (e.g. DevExtreme's `.dx-overlay-wrapper`).
71
+ * Pressing or focusing inside them counts as inside the surface.
72
+ * @figmaProp none — behavioral
73
+ */
74
+ ignoreOutside?: string[];
63
75
  }
64
76
  /**
65
77
  * ASMA Design System **Popover** (ASMA-8183) — an anchored overlay with the DS surface, an optional
@@ -83,4 +95,4 @@ export interface PopoverSheetProps {
83
95
  * Separate from {@link StyledPopover}, which stays as the MUI-parity positioning primitive its eight
84
96
  * internal consumers still depend on; those migrate here gradually.
85
97
  */
86
- export declare const PopoverSheet: ({ dataTest, renderTrigger, variant, title, children, viewResultsAction, resetAction, footerActions, resultCount, closeLabel, ariaLabel, onOpenChange, className, }: PopoverSheetProps) => JSX.Element;
98
+ export declare const PopoverSheet: ({ dataTest, renderTrigger, variant, title, children, viewResultsAction, resetAction, footerActions, resultCount, closeLabel, ariaLabel, onOpenChange, className, align, ignoreOutside, }: PopoverSheetProps) => JSX.Element;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.118.0",
6
+ "version": "3.119.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",