@epilot/zenith-react 0.3.0-next.2 → 0.3.0-next.4

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/CHANGELOG.md CHANGED
@@ -5,7 +5,7 @@ history belongs to the source project and remains available through Git.
5
5
 
6
6
  ## Unreleased
7
7
 
8
- ## [0.3.0-next.2] - 2026-10-30
8
+ ## [0.3.0-next.4] - 2026-10-30
9
9
 
10
10
  - changed: @epilot/zenith-react depends on @epilot/zenith-runtime ^0.2.0 so compatible runtime releases reach consumers independently. — @wmolinari ([!153](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/153))
11
11
  - changed: **BREAKING**: FieldCombobox and Command, the search list inside it, run on Base UI's Autocomplete instead of `cmdk`. Options are data: pass them as `items` on `FieldComboboxContent` and render them with a function in `FieldComboboxList` (and in `FieldComboboxCollection` inside each `FieldComboboxGroup`, which takes its group's `items`). `FieldComboboxItem`'s `value` is the item, and `onClick`, which also runs on Enter, replaces `onSelect`. `items` is required on `FieldComboboxContent`. The search text moves from `FieldComboboxInput`'s `value`/`onValueChange` to `FieldComboboxContent`'s, `FieldComboboxGroupLabel` replaces `FieldComboboxGroup`'s `heading`, and filtering is a case-insensitive "contains" that keeps the items' order. The Combobox page's "Changed in this version" section shows the new form (#106) — @wmolinari ([!151](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151)) (experiment: https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151)
@@ -13,6 +13,8 @@ history belongs to the source project and remains available through Git.
13
13
  - changed: `FieldLabel` inside a `Field` renders with an id (a caller's own `id` wins), and `FieldComboboxList` points its `aria-labelledby` at the Field's label that names the trigger (the one whose `htmlFor` is the trigger's id, else the first `FieldLabel`), so the list carries the trigger's name (#106) — @wmolinari ([!151](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151)) (experiment: https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151)
14
14
  - added: `FieldComboboxCollection`, and `@epilot/zenith-runtime/v1` serves Base UI's `autocomplete`; publish the runtime before `@epilot/zenith-react` (#106) — @wmolinari ([!151](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151)) (experiment: https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151)
15
15
  - fixed: CalloutAction no longer runs past the right edge of its Callout when the callout has an icon; its width is no longer forced to 100% on top of the icon indent, so a wrapping label or full-width row now wraps inside the callout (#61) — @wmolinari ([!139](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/139))
16
+ - fixed: a `List` row whose children are not all React nodes, such as react-i18next's `<Trans>` with `{{ name }}` interpolation, no longer crashes the list; `0.3.0-next.1` was affected — @wmolinari ([!158](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/158)) (experiment: https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/158)
17
+ - changed: `TooltipContent` wraps long text at about 40 characters (`max-width: 40ch`) instead of stretching across the page, and spaces wrapped lines with a 1.35 line height; one-line tooltips are 4 px taller — @wmolinari ([!158](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/158)) (experiment: https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/158)
16
18
  - fixed: the Radix to Base UI codemod reads the parameter count of an imported handler declared with `satisfies`, so a zero-parameter handler no longer gets an event argument — @wmolinari ([!149](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/149))
17
19
  - fixed: `SortableList` keeps the lifted row under the pointer and drops it where the pointer is inside a transformed container, such as a `PopoverContent` — @josh.stewart.epilot ([!155](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/155))
18
20
  - changed: `SortableList` drag grips are named after the row's text instead of its `value`; the new `ListItem` `textValue` names rows without text — @josh.stewart.epilot ([!155](https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/155))
@@ -1,10 +1,10 @@
1
- import { jsx as t, jsxs as S } from "react/jsx-runtime";
2
- import * as n from "react";
3
- import { mergeClasses as m, SLOT_ATTR as g, shorthands as p } from "@epilot/zenith-runtime/v1";
4
- import { makeZenithStyles as J } from "../../styles/make-styles.js";
1
+ import { jsx as e, jsxs as k } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { mergeClasses as g, SLOT_ATTR as m, shorthands as p } from "@epilot/zenith-runtime/v1";
4
+ import { makeZenithStyles as Q } from "../../styles/make-styles.js";
5
5
  import { boxModel as d } from "../../styles/host-reset.js";
6
- import { successLight as Q, warningLight as tt, errorLight as et, spacingGroup2 as G, grayA12 as R, fontWeightSemibold as rt, leadingSm as O, textSm as P, grayA10 as ot, fontWeightMedium as nt, accentSolid as it, accentA8 as st, grayA11 as T, grayA8 as at, leadingXs as lt, textXs as ct, listIndexPaddingX as H, listItemPaddingX as z, listItemPaddingY as D, listIndexMinWidth as dt, grayA2 as j, radiusMd as W, successSoftHover as pt, warningSoftHover as ut, errorSoftHover as gt, accentSoft as mt, successDefault as ft, successSoft as ht, warningDefault as xt, warningSoft as yt, errorDefault as wt, errorSoft as vt, listItemMinHeight as bt, spacingElement3 as It, grayA5 as St, spacingElement1 as kt, spacingElement2 as Lt, listItemGap as Ct } from "../../tokens/index.js";
7
- const Tt = (r) => /* @__PURE__ */ S(
6
+ import { successLight as tt, warningLight as et, errorLight as rt, spacingGroup2 as R, grayA12 as O, fontWeightSemibold as ot, leadingSm as P, textSm as H, grayA10 as it, fontWeightMedium as nt, accentSolid as st, accentA8 as at, grayA11 as T, grayA8 as lt, leadingXs as ct, textXs as dt, listIndexPaddingX as z, listItemPaddingX as j, listItemPaddingY as D, listIndexMinWidth as pt, grayA2 as M, radiusMd as W, successSoftHover as ut, warningSoftHover as mt, errorSoftHover as gt, accentSoft as ft, successDefault as ht, successSoft as xt, warningDefault as yt, warningSoft as vt, errorDefault as wt, errorSoft as bt, listItemMinHeight as It, spacingElement3 as St, grayA5 as kt, spacingElement1 as Lt, spacingElement2 as Ct, listItemGap as Tt } from "../../tokens/index.js";
7
+ const Dt = (t) => /* @__PURE__ */ k(
8
8
  "svg",
9
9
  {
10
10
  xmlns: "http://www.w3.org/2000/svg",
@@ -13,17 +13,17 @@ const Tt = (r) => /* @__PURE__ */ S(
13
13
  viewBox: "0 0 24 24",
14
14
  fill: "currentColor",
15
15
  "aria-hidden": "true",
16
- ...r,
16
+ ...t,
17
17
  children: [
18
- /* @__PURE__ */ t("circle", { cx: "9", cy: "5", r: "1.5" }),
19
- /* @__PURE__ */ t("circle", { cx: "15", cy: "5", r: "1.5" }),
20
- /* @__PURE__ */ t("circle", { cx: "9", cy: "12", r: "1.5" }),
21
- /* @__PURE__ */ t("circle", { cx: "15", cy: "12", r: "1.5" }),
22
- /* @__PURE__ */ t("circle", { cx: "9", cy: "19", r: "1.5" }),
23
- /* @__PURE__ */ t("circle", { cx: "15", cy: "19", r: "1.5" })
18
+ /* @__PURE__ */ e("circle", { cx: "9", cy: "5", r: "1.5" }),
19
+ /* @__PURE__ */ e("circle", { cx: "15", cy: "5", r: "1.5" }),
20
+ /* @__PURE__ */ e("circle", { cx: "9", cy: "12", r: "1.5" }),
21
+ /* @__PURE__ */ e("circle", { cx: "15", cy: "12", r: "1.5" }),
22
+ /* @__PURE__ */ e("circle", { cx: "9", cy: "19", r: "1.5" }),
23
+ /* @__PURE__ */ e("circle", { cx: "15", cy: "19", r: "1.5" })
24
24
  ]
25
25
  }
26
- ), M = (r) => /* @__PURE__ */ S(
26
+ ), F = (t) => /* @__PURE__ */ k(
27
27
  "svg",
28
28
  {
29
29
  xmlns: "http://www.w3.org/2000/svg",
@@ -34,14 +34,14 @@ const Tt = (r) => /* @__PURE__ */ S(
34
34
  strokeLinecap: "round",
35
35
  strokeLinejoin: "round",
36
36
  "aria-hidden": "true",
37
- ...r,
37
+ ...t,
38
38
  children: [
39
- /* @__PURE__ */ t("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }),
40
- /* @__PURE__ */ t("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
41
- /* @__PURE__ */ t("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
39
+ /* @__PURE__ */ e("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }),
40
+ /* @__PURE__ */ e("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
41
+ /* @__PURE__ */ e("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
42
42
  ]
43
43
  }
44
- ), Dt = (r) => /* @__PURE__ */ S(
44
+ ), Wt = (t) => /* @__PURE__ */ k(
45
45
  "svg",
46
46
  {
47
47
  xmlns: "http://www.w3.org/2000/svg",
@@ -52,13 +52,13 @@ const Tt = (r) => /* @__PURE__ */ S(
52
52
  strokeLinecap: "round",
53
53
  strokeLinejoin: "round",
54
54
  "aria-hidden": "true",
55
- ...r,
55
+ ...t,
56
56
  children: [
57
- /* @__PURE__ */ t("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
58
- /* @__PURE__ */ t("polyline", { points: "22 4 12 14.01 9 11.01" })
57
+ /* @__PURE__ */ e("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
58
+ /* @__PURE__ */ e("polyline", { points: "22 4 12 14.01 9 11.01" })
59
59
  ]
60
60
  }
61
- ), Wt = (r) => /* @__PURE__ */ t(
61
+ ), At = (t) => /* @__PURE__ */ e(
62
62
  "svg",
63
63
  {
64
64
  xmlns: "http://www.w3.org/2000/svg",
@@ -69,10 +69,10 @@ const Tt = (r) => /* @__PURE__ */ S(
69
69
  strokeLinecap: "round",
70
70
  strokeLinejoin: "round",
71
71
  "aria-hidden": "true",
72
- ...r,
73
- children: /* @__PURE__ */ t("polyline", { points: "9 18 15 12 9 6" })
72
+ ...t,
73
+ children: /* @__PURE__ */ e("polyline", { points: "9 18 15 12 9 6" })
74
74
  }
75
- ), f = J({
75
+ ), f = Q({
76
76
  list: {
77
77
  ...d,
78
78
  display: "flex",
@@ -91,15 +91,15 @@ const Tt = (r) => /* @__PURE__ */ S(
91
91
  width: "100%",
92
92
  alignItems: "center",
93
93
  ...p.borderRadius(W),
94
- color: R,
94
+ color: O,
95
95
  transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke",
96
96
  transitionDuration: "150ms",
97
97
  transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
98
- minHeight: bt,
99
- ...p.gap(Ct),
100
- ...p.padding(D, z),
101
- fontSize: P,
102
- lineHeight: O,
98
+ minHeight: It,
99
+ ...p.gap(Tt),
100
+ ...p.padding(D, j),
101
+ fontSize: H,
102
+ lineHeight: P,
103
103
  "& > svg": {
104
104
  flexShrink: 0,
105
105
  width: "1rem",
@@ -109,27 +109,27 @@ const Tt = (r) => /* @__PURE__ */ S(
109
109
  // Status variants
110
110
  statusDefault: {},
111
111
  statusError: {
112
- backgroundColor: vt,
112
+ backgroundColor: bt,
113
113
  color: wt
114
114
  },
115
115
  statusWarning: {
116
- backgroundColor: yt,
117
- color: xt
116
+ backgroundColor: vt,
117
+ color: yt
118
118
  },
119
119
  statusSuccess: {
120
- backgroundColor: ht,
121
- color: ft
120
+ backgroundColor: xt,
121
+ color: ht
122
122
  },
123
123
  // Striped variant (only neutral rows)
124
124
  stripedEven: {
125
125
  "&:nth-child(even)": {
126
- backgroundColor: j
126
+ backgroundColor: M
127
127
  }
128
128
  },
129
129
  // Interactive hovers
130
130
  interactiveDefault: {
131
131
  ":hover": {
132
- backgroundColor: mt
132
+ backgroundColor: ft
133
133
  }
134
134
  },
135
135
  interactiveError: {
@@ -139,12 +139,12 @@ const Tt = (r) => /* @__PURE__ */ S(
139
139
  },
140
140
  interactiveWarning: {
141
141
  ":hover": {
142
- backgroundColor: ut
142
+ backgroundColor: mt
143
143
  }
144
144
  },
145
145
  interactiveSuccess: {
146
146
  ":hover": {
147
- backgroundColor: pt
147
+ backgroundColor: ut
148
148
  }
149
149
  },
150
150
  // Sortable modifiers
@@ -169,16 +169,16 @@ const Tt = (r) => /* @__PURE__ */ S(
169
169
  alignSelf: "stretch",
170
170
  borderTopLeftRadius: W,
171
171
  borderBottomLeftRadius: W,
172
- backgroundColor: j,
172
+ backgroundColor: M,
173
173
  textAlign: "center",
174
174
  color: T,
175
175
  fontVariantNumeric: "tabular-nums",
176
- minWidth: dt,
176
+ minWidth: pt,
177
177
  marginTop: `calc(-1 * ${D})`,
178
178
  marginBottom: `calc(-1 * ${D})`,
179
- marginLeft: `calc(-1 * ${z})`,
180
- paddingLeft: H,
181
- paddingRight: H
179
+ marginLeft: `calc(-1 * ${j})`,
180
+ paddingLeft: z,
181
+ paddingRight: z
182
182
  },
183
183
  // Content
184
184
  content: {
@@ -189,7 +189,7 @@ const Tt = (r) => /* @__PURE__ */ S(
189
189
  flexShrink: 1,
190
190
  flexBasis: "0%",
191
191
  alignItems: "center",
192
- ...p.gap(Lt),
192
+ ...p.gap(Ct),
193
193
  overflow: "hidden",
194
194
  textOverflow: "ellipsis",
195
195
  whiteSpace: "nowrap",
@@ -206,7 +206,7 @@ const Tt = (r) => /* @__PURE__ */ S(
206
206
  display: "flex",
207
207
  flexShrink: 0,
208
208
  alignItems: "center",
209
- ...p.gap(kt)
209
+ ...p.gap(Lt)
210
210
  },
211
211
  // Text
212
212
  text: {
@@ -224,8 +224,8 @@ const Tt = (r) => /* @__PURE__ */ S(
224
224
  overflow: "hidden",
225
225
  textOverflow: "ellipsis",
226
226
  whiteSpace: "nowrap",
227
- fontSize: ct,
228
- lineHeight: lt,
227
+ fontSize: dt,
228
+ lineHeight: ct,
229
229
  color: T
230
230
  },
231
231
  // Drag handle button
@@ -237,7 +237,7 @@ const Tt = (r) => /* @__PURE__ */ S(
237
237
  flexShrink: 0,
238
238
  cursor: "grab",
239
239
  alignItems: "center",
240
- color: at,
240
+ color: lt,
241
241
  backgroundColor: "transparent",
242
242
  ...p.border("0"),
243
243
  ...p.padding(0),
@@ -251,7 +251,7 @@ const Tt = (r) => /* @__PURE__ */ S(
251
251
  outlineWidth: "2px",
252
252
  outlineStyle: "solid",
253
253
  outlineOffset: "2px",
254
- outlineColor: st
254
+ outlineColor: at
255
255
  },
256
256
  "& svg": {
257
257
  width: "1rem",
@@ -269,7 +269,7 @@ const Tt = (r) => /* @__PURE__ */ S(
269
269
  height: "0.125rem",
270
270
  transformOrigin: "center",
271
271
  ...p.borderRadius("9999px"),
272
- backgroundColor: it,
272
+ backgroundColor: st,
273
273
  animationName: {
274
274
  from: {
275
275
  transform: "scaleX(0)",
@@ -295,7 +295,7 @@ const Tt = (r) => /* @__PURE__ */ S(
295
295
  transformOrigin: "center",
296
296
  transform: "scale(0.95)",
297
297
  cursor: "grabbing",
298
- ...p.border("1px", "solid", St),
298
+ ...p.border("1px", "solid", kt),
299
299
  backgroundColor: "rgb(255 255 255 / 55%)",
300
300
  boxShadow: "0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a",
301
301
  backdropFilter: "blur(12px)",
@@ -326,7 +326,7 @@ const Tt = (r) => /* @__PURE__ */ S(
326
326
  width: "1rem",
327
327
  height: "1rem",
328
328
  flexShrink: 0,
329
- color: ot,
329
+ color: it,
330
330
  transitionProperty: "transform",
331
331
  transitionDuration: "150ms",
332
332
  transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)"
@@ -346,21 +346,21 @@ const Tt = (r) => /* @__PURE__ */ S(
346
346
  },
347
347
  standaloneGroupLabel: {
348
348
  ...d,
349
- marginTop: G,
349
+ marginTop: R,
350
350
  display: "block",
351
351
  listStyleType: "none",
352
- ...p.padding("0.375rem", It),
353
- fontSize: P,
354
- lineHeight: O,
355
- fontWeight: rt,
356
- color: R,
352
+ ...p.padding("0.375rem", St),
353
+ fontSize: H,
354
+ lineHeight: P,
355
+ fontWeight: ot,
356
+ color: O,
357
357
  "&:first-child": {
358
358
  marginTop: 0
359
359
  }
360
360
  },
361
361
  groupContentList: {
362
362
  ...d,
363
- paddingLeft: G
363
+ paddingLeft: R
364
364
  },
365
365
  collapseWrapper: {
366
366
  display: "grid",
@@ -386,292 +386,292 @@ const Tt = (r) => /* @__PURE__ */ S(
386
386
  width: "1rem",
387
387
  height: "1rem",
388
388
  flexShrink: 0,
389
- color: et
389
+ color: rt
390
390
  },
391
391
  statusIconWarning: {
392
392
  ...d,
393
393
  width: "1rem",
394
394
  height: "1rem",
395
395
  flexShrink: 0,
396
- color: tt
396
+ color: et
397
397
  },
398
398
  statusIconSuccess: {
399
399
  ...d,
400
400
  width: "1rem",
401
401
  height: "1rem",
402
402
  flexShrink: 0,
403
- color: Q
403
+ color: tt
404
404
  }
405
- }), At = ({ status: r }) => {
406
- const e = f();
407
- return r === "error" ? /* @__PURE__ */ t(M, { className: e.statusIconError }) : r === "warning" ? /* @__PURE__ */ t(M, { className: e.statusIconWarning }) : r === "success" ? /* @__PURE__ */ t(Dt, { className: e.statusIconSuccess }) : null;
408
- }, F = n.createContext({
405
+ }), Nt = ({ status: t }) => {
406
+ const r = f();
407
+ return t === "error" ? /* @__PURE__ */ e(F, { className: r.statusIconError }) : t === "warning" ? /* @__PURE__ */ e(F, { className: r.statusIconWarning }) : t === "success" ? /* @__PURE__ */ e(Wt, { className: r.statusIconSuccess }) : null;
408
+ }, X = i.createContext({
409
409
  striped: !1,
410
410
  showIndex: !1,
411
411
  sortable: !1
412
- }), V = () => n.useContext(F), Nt = (r) => r === void 0 ? void 0 : r === "relaxed" ? "normal" : r, Bt = n.forwardRef(function({ className: e, density: i, children: s, ...o }, a) {
413
- const l = f(), u = Nt(i), v = n.Children.toArray(s).filter(n.isValidElement).map(
414
- (y, w) => y.type === Ot ? n.cloneElement(y, {
415
- index: w
412
+ }), $ = () => i.useContext(X), Et = (t) => t === void 0 ? void 0 : t === "relaxed" ? "normal" : t, Bt = i.forwardRef(function({ className: r, density: s, children: n, ...o }, a) {
413
+ const l = f(), u = Et(s), w = i.Children.toArray(n).filter(i.isValidElement).map(
414
+ (y, v) => y.type === Ot ? i.cloneElement(y, {
415
+ index: v
416
416
  }) : y
417
417
  );
418
- return /* @__PURE__ */ t(
418
+ return /* @__PURE__ */ e(
419
419
  "ol",
420
420
  {
421
421
  ref: a,
422
422
  "data-slot": "list",
423
- [g]: "list",
423
+ [m]: "list",
424
424
  ...u !== void 0 ? { "data-density": u } : {},
425
- className: m(l.list, e),
425
+ className: g(l.list, r),
426
426
  ...o,
427
- children: v
427
+ children: w
428
428
  }
429
429
  );
430
- }), Ft = n.forwardRef(function({ striped: e = !1, showIndex: i = !1, ...s }, o) {
431
- return /* @__PURE__ */ t(F.Provider, { value: { striped: e, showIndex: i, sortable: !1 }, children: /* @__PURE__ */ t(Bt, { ref: o, ...s }) });
432
- }), Et = n.forwardRef(function({ className: e, children: i, ...s }, o) {
430
+ }), Ft = i.forwardRef(function({ striped: r = !1, showIndex: s = !1, ...n }, o) {
431
+ return /* @__PURE__ */ e(X.Provider, { value: { striped: r, showIndex: s, sortable: !1 }, children: /* @__PURE__ */ e(Bt, { ref: o, ...n }) });
432
+ }), V = i.forwardRef(function({ className: r, children: s, ...n }, o) {
433
433
  const a = f();
434
- return /* @__PURE__ */ t(
434
+ return /* @__PURE__ */ e(
435
435
  "span",
436
436
  {
437
437
  ref: o,
438
438
  "data-slot": "list-item-actions",
439
- [g]: "list-item-actions",
439
+ [m]: "list-item-actions",
440
440
  onPointerDown: (l) => l.stopPropagation(),
441
- className: m(a.actions, e),
442
- ...s,
443
- children: i
441
+ className: g(a.actions, r),
442
+ ...n,
443
+ children: s
444
444
  }
445
445
  );
446
- }), Vt = n.forwardRef(function({ className: e, ...i }, s) {
446
+ }), Xt = i.forwardRef(function({ className: r, ...s }, n) {
447
447
  const o = f();
448
- return /* @__PURE__ */ t(
448
+ return /* @__PURE__ */ e(
449
449
  "span",
450
450
  {
451
- ref: s,
451
+ ref: n,
452
452
  "data-slot": "list-item-text",
453
- [g]: "list-item-text",
454
- className: m(o.text, e),
455
- ...i
453
+ [m]: "list-item-text",
454
+ className: g(o.text, r),
455
+ ...s
456
456
  }
457
457
  );
458
- }), Gt = n.forwardRef(function({ className: e, ...i }, s) {
458
+ }), Gt = i.forwardRef(function({ className: r, ...s }, n) {
459
459
  const o = f();
460
- return /* @__PURE__ */ t(
460
+ return /* @__PURE__ */ e(
461
461
  "span",
462
462
  {
463
- ref: s,
463
+ ref: n,
464
464
  "data-slot": "list-item-description",
465
- [g]: "list-item-description",
466
- className: m(o.description, e),
467
- ...i
465
+ [m]: "list-item-description",
466
+ className: g(o.description, r),
467
+ ...s
468
468
  }
469
469
  );
470
- }), X = (r) => n.Children.toArray(r).map((e) => typeof e == "string" || typeof e == "number" ? String(e) : !n.isValidElement(e) || e.type === Gt || e.props["aria-hidden"] === !0 || e.props["aria-hidden"] === "true" ? "" : X(e.props.children)).join(" ").replace(/\s+/g, " ").trim(), Rt = n.forwardRef(
470
+ }), A = (t) => typeof t == "string" || typeof t == "number" ? String(t) : typeof t == "object" && t !== null && !i.isValidElement(t) && Symbol.iterator in t ? Array.from(t, A).join(" ") : !i.isValidElement(t) || t.type === Gt || t.type === V || t.props["aria-hidden"] === !0 || t.props["aria-hidden"] === "true" ? "" : A(t.props.children), Rt = i.forwardRef(
471
471
  function({
472
- className: e,
473
- value: i,
474
- textValue: s,
472
+ className: r,
473
+ value: s,
474
+ textValue: n,
475
475
  status: o = "default",
476
476
  index: a,
477
477
  children: l,
478
478
  setNodeRef: u,
479
- setActivatorNodeRef: v,
479
+ setActivatorNodeRef: w,
480
480
  style: y,
481
- isDragging: w,
481
+ isDragging: v,
482
482
  dropEdge: b,
483
483
  listeners: h,
484
484
  attributes: C,
485
- ...k
485
+ ...L
486
486
  }, I) {
487
- const c = f(), { striped: $, showIndex: K, sortable: L } = V(), Z = L && !w, N = n.Children.toArray(l), B = N.find(
488
- (x) => n.isValidElement(x) && x.type === Et
489
- ), E = N.filter((x) => x !== B), U = s ?? (X(E) || i || "item"), Y = n.useCallback(
487
+ const c = f(), { striped: K, showIndex: Z, sortable: S } = $(), U = S && !v, E = i.Children.toArray(l), B = E.find(
488
+ (x) => i.isValidElement(x) && x.type === V
489
+ ), G = E.filter((x) => x !== B), Y = S ? (n == null ? void 0 : n.trim()) || A(G).replace(/\s+/g, " ").trim() || s || "item" : void 0, _ = i.useCallback(
490
490
  (x) => {
491
491
  u == null || u(x), typeof I == "function" ? I(x) : I && (I.current = x);
492
492
  },
493
493
  [u, I]
494
- ), _ = o === "error" ? c.statusError : o === "warning" ? c.statusWarning : o === "success" ? c.statusSuccess : c.statusDefault, q = Z ? o === "error" ? c.interactiveError : o === "warning" ? c.interactiveWarning : o === "success" ? c.interactiveSuccess : c.interactiveDefault : void 0;
495
- return /* @__PURE__ */ S(
494
+ ), q = o === "error" ? c.statusError : o === "warning" ? c.statusWarning : o === "success" ? c.statusSuccess : c.statusDefault, J = U ? o === "error" ? c.interactiveError : o === "warning" ? c.interactiveWarning : o === "success" ? c.interactiveSuccess : c.interactiveDefault : void 0;
495
+ return /* @__PURE__ */ k(
496
496
  "li",
497
497
  {
498
- ref: Y,
498
+ ref: _,
499
499
  style: y,
500
500
  "data-slot": "list-item",
501
- [g]: "list-item",
501
+ [m]: "list-item",
502
502
  "data-status": o,
503
- "data-value": i,
504
- onPointerDown: L ? h == null ? void 0 : h.onPointerDown : void 0,
505
- className: m(
503
+ "data-value": s,
504
+ onPointerDown: S ? h == null ? void 0 : h.onPointerDown : void 0,
505
+ className: g(
506
506
  c.item,
507
- _,
508
- $ && o === "default" && c.stripedEven,
509
507
  q,
510
- L && c.sortableItem,
511
- w && c.itemDragging,
512
- e
508
+ K && o === "default" && c.stripedEven,
509
+ J,
510
+ S && c.sortableItem,
511
+ v && c.itemDragging,
512
+ r
513
513
  ),
514
- ...k,
514
+ ...L,
515
515
  children: [
516
- b && /* @__PURE__ */ t(
516
+ b && /* @__PURE__ */ e(
517
517
  "span",
518
518
  {
519
519
  "data-slot": "list-drop-indicator",
520
- [g]: "list-drop-indicator",
520
+ [m]: "list-drop-indicator",
521
521
  "aria-hidden": "true",
522
- className: m(
522
+ className: g(
523
523
  c.dropIndicator,
524
524
  b === "top" ? c.dropIndicatorTop : c.dropIndicatorBottom
525
525
  )
526
526
  }
527
527
  ),
528
- K && /* @__PURE__ */ t(
528
+ Z && /* @__PURE__ */ e(
529
529
  "span",
530
530
  {
531
531
  "data-slot": "list-item-index",
532
- [g]: "list-item-index",
532
+ [m]: "list-item-index",
533
533
  "aria-hidden": "true",
534
534
  className: c.indexBase,
535
535
  children: (a ?? 0) + 1
536
536
  }
537
537
  ),
538
- /* @__PURE__ */ t(
538
+ /* @__PURE__ */ e(
539
539
  "span",
540
540
  {
541
541
  "data-slot": "list-item-content",
542
- [g]: "list-item-content",
542
+ [m]: "list-item-content",
543
543
  className: c.content,
544
- children: E
544
+ children: G
545
545
  }
546
546
  ),
547
- /* @__PURE__ */ t(At, { status: o }),
547
+ /* @__PURE__ */ e(Nt, { status: o }),
548
548
  B,
549
- L && /* @__PURE__ */ t(
549
+ S && /* @__PURE__ */ e(
550
550
  "button",
551
551
  {
552
- ref: v,
552
+ ref: w,
553
553
  type: "button",
554
- "aria-label": `Drag to reorder ${U}`,
554
+ "aria-label": `Drag to reorder ${Y}`,
555
555
  className: c.dragHandle,
556
556
  ...C,
557
557
  onKeyDown: h == null ? void 0 : h.onKeyDown,
558
- children: /* @__PURE__ */ t(Tt, {})
558
+ children: /* @__PURE__ */ e(Dt, {})
559
559
  }
560
560
  )
561
561
  ]
562
562
  }
563
563
  );
564
564
  }
565
- ), Ot = n.forwardRef(
566
- function(e, i) {
567
- const { SortableItem: s } = V();
568
- return s ? /* @__PURE__ */ t(s, { ref: i, ...e }) : /* @__PURE__ */ t(Rt, { ref: i, ...e });
565
+ ), Ot = i.forwardRef(
566
+ function(r, s) {
567
+ const { SortableItem: n } = $();
568
+ return n ? /* @__PURE__ */ e(n, { ref: s, ...r }) : /* @__PURE__ */ e(Rt, { ref: s, ...r });
569
569
  }
570
- ), A = n.createContext(null), Xt = n.forwardRef(
570
+ ), N = i.createContext(null), $t = i.forwardRef(
571
571
  function({
572
- open: e,
573
- defaultOpen: i = !1,
574
- onOpenChange: s,
572
+ open: r,
573
+ defaultOpen: s = !1,
574
+ onOpenChange: n,
575
575
  className: o,
576
576
  children: a,
577
577
  ...l
578
578
  }, u) {
579
- const v = f(), [y, w] = n.useState(i), b = e ?? y, h = n.useId(), C = (k) => {
580
- e === void 0 && w(k), s == null || s(k);
579
+ const w = f(), [y, v] = i.useState(s), b = r ?? y, h = i.useId(), C = (L) => {
580
+ r === void 0 && v(L), n == null || n(L);
581
581
  };
582
- return /* @__PURE__ */ t(A.Provider, { value: { open: b, setOpen: C, contentId: h }, children: /* @__PURE__ */ t(
582
+ return /* @__PURE__ */ e(N.Provider, { value: { open: b, setOpen: C, contentId: h }, children: /* @__PURE__ */ e(
583
583
  "li",
584
584
  {
585
585
  ref: u,
586
586
  "data-slot": "list-group",
587
- [g]: "list-group",
587
+ [m]: "list-group",
588
588
  "data-state": b ? "open" : "closed",
589
- className: m(v.group, o),
589
+ className: g(w.group, o),
590
590
  ...l,
591
591
  children: a
592
592
  }
593
593
  ) });
594
594
  }
595
- ), $t = n.forwardRef(function({ className: e, children: i, ...s }, o) {
596
- const a = f(), l = n.useContext(A);
597
- return l ? /* @__PURE__ */ S(
595
+ ), Vt = i.forwardRef(function({ className: r, children: s, ...n }, o) {
596
+ const a = f(), l = i.useContext(N);
597
+ return l ? /* @__PURE__ */ k(
598
598
  "button",
599
599
  {
600
600
  ref: o,
601
601
  type: "button",
602
602
  "data-slot": "list-group-trigger",
603
- [g]: "list-group-trigger",
603
+ [m]: "list-group-trigger",
604
604
  "aria-expanded": l.open,
605
605
  "aria-controls": l.contentId,
606
606
  onClick: () => l.setOpen(!l.open),
607
- className: m(
607
+ className: g(
608
608
  a.item,
609
609
  a.interactiveDefault,
610
610
  a.groupTrigger,
611
- e
611
+ r
612
612
  ),
613
- ...s,
613
+ ...n,
614
614
  children: [
615
- /* @__PURE__ */ t(
616
- Wt,
615
+ /* @__PURE__ */ e(
616
+ At,
617
617
  {
618
- className: m(
618
+ className: g(
619
619
  a.groupChevron,
620
620
  l.open && a.groupChevronOpen
621
621
  )
622
622
  }
623
623
  ),
624
- /* @__PURE__ */ t("span", { className: a.groupTriggerText, children: i })
624
+ /* @__PURE__ */ e("span", { className: a.groupTriggerText, children: s })
625
625
  ]
626
626
  }
627
- ) : /* @__PURE__ */ t(
627
+ ) : /* @__PURE__ */ e(
628
628
  "li",
629
629
  {
630
630
  ref: o,
631
631
  "data-slot": "list-group-label",
632
- [g]: "list-group-label",
633
- className: m(a.standaloneGroupLabel, e),
634
- children: i
632
+ [m]: "list-group-label",
633
+ className: g(a.standaloneGroupLabel, r),
634
+ children: s
635
635
  }
636
636
  );
637
- }), Kt = n.forwardRef(function({ className: e, children: i, ...s }, o) {
638
- const a = f(), l = n.useContext(A), u = /* @__PURE__ */ t(
637
+ }), Kt = i.forwardRef(function({ className: r, children: s, ...n }, o) {
638
+ const a = f(), l = i.useContext(N), u = /* @__PURE__ */ e(
639
639
  "ul",
640
640
  {
641
641
  ref: o,
642
642
  "data-slot": "list-group-content",
643
- [g]: "list-group-content",
644
- className: m(a.list, a.groupContentList, e),
645
- ...s,
646
- children: i
643
+ [m]: "list-group-content",
644
+ className: g(a.list, a.groupContentList, r),
645
+ ...n,
646
+ children: s
647
647
  }
648
648
  );
649
- return l ? /* @__PURE__ */ t(
649
+ return l ? /* @__PURE__ */ e(
650
650
  "div",
651
651
  {
652
652
  id: l.contentId,
653
653
  "data-state": l.open ? "open" : "closed",
654
- className: m(
654
+ className: g(
655
655
  a.collapseWrapper,
656
656
  l.open && a.collapseWrapperOpen
657
657
  ),
658
- children: /* @__PURE__ */ t("div", { className: a.collapseInner, children: u })
658
+ children: /* @__PURE__ */ e("div", { className: a.collapseInner, children: u })
659
659
  }
660
660
  ) : u;
661
661
  });
662
662
  export {
663
663
  Ft as List,
664
- Xt as ListGroup,
664
+ $t as ListGroup,
665
665
  Kt as ListGroupContent,
666
- $t as ListGroupLabel,
666
+ Vt as ListGroupLabel,
667
667
  Ot as ListItem,
668
- Et as ListItemActions,
668
+ V as ListItemActions,
669
669
  Rt as ListItemBody,
670
670
  Gt as ListItemDescription,
671
- Vt as ListItemText,
671
+ Xt as ListItemText,
672
672
  Bt as ListRoot,
673
- Nt as canonicalDomDensity,
674
- F as listContext,
673
+ Et as canonicalDomDensity,
674
+ X as listContext,
675
675
  f as useListStyles
676
676
  };
677
677
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sources":["../../../src/components/list/list.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel } from \"../../styles/host-reset\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * `relaxed` is a permanent compatibility alias for `normal` (DENSITY-SPEC.md §4.2,\n * WP9B2A-ACCEPTANCE-LIST) — identical geometry, forever, not deprecated.\n */\nexport type ListDensity = \"compact\" | \"normal\" | \"comfortable\" | \"relaxed\"\nexport type ListItemStatus = \"default\" | \"error\" | \"warning\" | \"success\"\n\n// ── Icons ──────────────────────────────────────────────────────────────────\n\nconst GripVerticalIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n {...props}\n >\n <circle cx=\"9\" cy=\"5\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"5\" r=\"1.5\" />\n <circle cx=\"9\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"9\" cy=\"19\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"19\" r=\"1.5\" />\n </svg>\n)\n\nconst WarningIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" />\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\" />\n </svg>\n)\n\nconst CheckCircleIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\" />\n <polyline points=\"22 4 12 14.01 9 11.01\" />\n </svg>\n)\n\nconst ChevronRightIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n)\n\n// ── Styles ─────────────────────────────────────────────────────────────────\n\nexport const useListStyles = makeZenithStyles({\n list: {\n ...boxModel,\n display: \"flex\",\n width: \"100%\",\n listStyleType: \"none\",\n flexDirection: \"column\",\n ...shorthands.gap(0),\n ...shorthands.padding(0),\n ...shorthands.margin(0),\n },\n\n // ListItem base — density-bound (DENSITY-SPEC.md §2.2, WP9B2A-ACCEPTANCE-LIST).\n item: {\n ...boxModel,\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n alignItems: \"center\",\n ...shorthands.borderRadius(tokens.radiusMd),\n color: tokens.grayA12,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n minHeight: tokens.listItemMinHeight,\n ...shorthands.gap(tokens.listItemGap),\n ...shorthands.padding(tokens.listItemPaddingY, tokens.listItemPaddingX),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n \"& > svg\": {\n flexShrink: 0,\n width: \"1rem\",\n height: \"1rem\",\n },\n },\n\n // Status variants\n statusDefault: {},\n statusError: {\n backgroundColor: tokens.errorSoft,\n color: tokens.errorDefault,\n },\n statusWarning: {\n backgroundColor: tokens.warningSoft,\n color: tokens.warningDefault,\n },\n statusSuccess: {\n backgroundColor: tokens.successSoft,\n color: tokens.successDefault,\n },\n\n // Striped variant (only neutral rows)\n stripedEven: {\n \"&:nth-child(even)\": {\n backgroundColor: tokens.grayA2,\n },\n },\n\n // Interactive hovers\n interactiveDefault: {\n \":hover\": {\n backgroundColor: tokens.accentSoft,\n },\n },\n interactiveError: {\n \":hover\": {\n backgroundColor: tokens.errorSoftHover,\n },\n },\n interactiveWarning: {\n \":hover\": {\n backgroundColor: tokens.warningSoftHover,\n },\n },\n interactiveSuccess: {\n \":hover\": {\n backgroundColor: tokens.successSoftHover,\n },\n },\n\n // Sortable modifiers\n sortableItem: {\n cursor: \"grab\",\n touchAction: \"none\",\n \":active\": {\n cursor: \"grabbing\",\n },\n },\n itemDragging: {\n opacity: 0.4,\n },\n\n // Index gutter — density-bound.\n indexBase: {\n ...boxModel,\n display: \"flex\",\n flexShrink: 0,\n userSelect: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n alignSelf: \"stretch\",\n borderTopLeftRadius: tokens.radiusMd,\n borderBottomLeftRadius: tokens.radiusMd,\n backgroundColor: tokens.grayA2,\n textAlign: \"center\",\n color: tokens.grayA11,\n fontVariantNumeric: \"tabular-nums\",\n minWidth: tokens.listIndexMinWidth,\n marginTop: `calc(-1 * ${tokens.listItemPaddingY})`,\n marginBottom: `calc(-1 * ${tokens.listItemPaddingY})`,\n marginLeft: `calc(-1 * ${tokens.listItemPaddingX})`,\n paddingLeft: tokens.listIndexPaddingX,\n paddingRight: tokens.listIndexPaddingX,\n },\n\n // Content\n content: {\n ...boxModel,\n display: \"flex\",\n minWidth: 0,\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n \"& > svg\": {\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n },\n },\n\n // Actions\n actions: {\n position: \"relative\",\n zIndex: 10,\n display: \"flex\",\n flexShrink: 0,\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n },\n\n // Text\n text: {\n ...boxModel,\n display: \"flex\",\n minWidth: 0,\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n flexDirection: \"column\",\n ...shorthands.gap(\"0.125rem\"),\n },\n\n // Description\n description: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n color: tokens.grayA11,\n },\n\n // Drag handle button\n dragHandle: {\n ...boxModel,\n position: \"relative\",\n zIndex: 10,\n display: \"inline-flex\",\n flexShrink: 0,\n cursor: \"grab\",\n alignItems: \"center\",\n color: tokens.grayA8,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \":hover\": {\n color: tokens.grayA11,\n },\n \":active\": {\n cursor: \"grabbing\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n \"& svg\": {\n width: \"1rem\",\n height: \"1rem\",\n },\n },\n\n // Drop indicator line\n dropIndicator: {\n ...boxModel,\n pointerEvents: \"none\",\n position: \"absolute\",\n left: 0,\n right: 0,\n zIndex: 10,\n height: \"0.125rem\",\n transformOrigin: \"center\",\n ...shorthands.borderRadius(\"9999px\"),\n backgroundColor: tokens.accentSolid,\n animationName: {\n from: {\n transform: \"scaleX(0)\",\n opacity: 0,\n },\n to: {\n transform: \"scaleX(1)\",\n opacity: 1,\n },\n },\n animationDuration: \"160ms\",\n animationTimingFunction: \"ease-out\",\n },\n dropIndicatorTop: {\n top: \"-0.125rem\",\n },\n dropIndicatorBottom: {\n bottom: \"-0.125rem\",\n },\n\n // DragOverlay ghost\n dragOverlayItem: {\n ...boxModel,\n transformOrigin: \"center\",\n transform: \"scale(0.95)\",\n cursor: \"grabbing\",\n ...shorthands.border(\"1px\", \"solid\", tokens.grayA5),\n backgroundColor: \"rgb(255 255 255 / 55%)\",\n boxShadow: \"0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a\",\n backdropFilter: \"blur(12px)\",\n animationName: {\n from: { transform: \"scale(1)\" },\n to: { transform: \"scale(0.95)\" },\n },\n animationDuration: \"160ms\",\n animationTimingFunction: \"ease-out\",\n \":hover\": {\n backgroundColor: \"rgb(255 255 255 / 55%)\",\n },\n },\n\n // Group\n group: {\n listStyleType: \"none\",\n },\n groupTrigger: {\n ...boxModel,\n cursor: \"pointer\",\n textAlign: \"left\",\n fontWeight: tokens.fontWeightMedium,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n },\n groupChevron: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.grayA10,\n transitionProperty: \"transform\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n },\n groupChevronOpen: {\n transform: \"rotate(90deg)\",\n },\n groupTriggerText: {\n ...boxModel,\n minWidth: 0,\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n },\n standaloneGroupLabel: {\n ...boxModel,\n marginTop: tokens.spacingGroup2,\n display: \"block\",\n listStyleType: \"none\",\n ...shorthands.padding(\"0.375rem\", tokens.spacingElement3),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.grayA12,\n \"&:first-child\": {\n marginTop: 0,\n },\n },\n groupContentList: {\n ...boxModel,\n paddingLeft: tokens.spacingGroup2,\n },\n collapseWrapper: {\n display: \"grid\",\n gridTemplateRows: \"0fr\",\n transitionProperty: \"grid-template-rows\",\n transitionDuration: \"200ms\",\n transitionTimingFunction: \"cubic-bezier(0, 0, 0.2, 1)\",\n \"&[data-state='open']\": {\n gridTemplateRows: \"1fr\",\n },\n },\n collapseWrapperOpen: {\n gridTemplateRows: \"1fr\",\n },\n collapseInner: {\n ...boxModel,\n minHeight: 0,\n overflow: \"hidden\",\n },\n\n // Status icons\n statusIconError: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.errorLight,\n },\n statusIconWarning: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.warningLight,\n },\n statusIconSuccess: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.successLight,\n },\n})\n\n// ── Status Icons Helper ────────────────────────────────────────────────────\n\nconst StatusIcon = ({ status }: { status: ListItemStatus }) => {\n const styles = useListStyles()\n if (status === \"error\") {\n return <WarningIcon className={styles.statusIconError} />\n }\n if (status === \"warning\") {\n return <WarningIcon className={styles.statusIconWarning} />\n }\n if (status === \"success\") {\n return <CheckCircleIcon className={styles.statusIconSuccess} />\n }\n return null\n}\n\n// ── Context ────────────────────────────────────────────────────────────────\n\n/**\n * `density` is deliberately NOT here — every downstream consumer (`ListItemBody`,\n * `ListGroupLabel`'s collapsible-trigger branch) now reads geometry from CSS custom properties via\n * `[data-density]` inheritance, not from this context.\n */\nexport type ListContextValue = {\n striped: boolean\n showIndex: boolean\n /** Set only by `SortableList` (`@epilot/zenith-react/list/sortable`). */\n sortable: boolean\n /**\n * The drag-aware row `SortableList` supplies. The root entry never imports dnd-kit, so `ListItem`\n * cannot name it; it renders whatever the surrounding `SortableList` put here.\n */\n SortableItem?: React.ForwardRefExoticComponent<\n ListItemProps & React.RefAttributes<HTMLLIElement>\n >\n}\n\n/** Internal: shared with `list-sortable.tsx`, deliberately not exported from the package index. */\nexport const listContext = React.createContext<ListContextValue>({\n striped: false,\n showIndex: false,\n sortable: false,\n})\n\nconst useListContext = () => React.useContext(listContext)\n\n/**\n * `undefined` (density omitted) stays `undefined` — no implicit normal stamp, so the `<ol>`\n * inherits ambient CSS density through ordinary DOM inheritance.\n */\nexport const canonicalDomDensity = (\n density: ListDensity | undefined\n): \"compact\" | \"normal\" | \"comfortable\" | undefined =>\n density === undefined ? undefined : density === \"relaxed\" ? \"normal\" : density\n\n// ── List ───────────────────────────────────────────────────────────────────\n\nexport type ListProps = React.ComponentProps<\"ol\"> & {\n /**\n * Row density. Omitted inherits the ambient shell `[data-density]` (no stamp is written).\n * `\"relaxed\"` is a permanent alias for `\"normal\"` — identical geometry, normalized to\n * `data-density=\"normal\"` in the DOM. An explicit value (including `\"relaxed\"`) creates a\n * canonical density boundary for this list's subtree and its `DragOverlay`.\n */\n density?: ListDensity\n /** Alternating background on neutral rows. Default: false */\n striped?: boolean\n /** Show a 1-based position number on each item. Default: false */\n showIndex?: boolean\n}\n\n/**\n * Internal: the `<ol>` itself, with the index injected into each `ListItem`. Shared by `List` and\n * `SortableList` so both render identical markup; the context provider stays with the caller.\n */\nexport const ListRoot = React.forwardRef<\n HTMLOListElement,\n Omit<ListProps, \"striped\" | \"showIndex\">\n>(function ListRoot({ className, density, children, ...props }, ref) {\n const styles = useListStyles()\n const domDensity = canonicalDomDensity(density)\n\n const indexedItems = React.Children.toArray(children)\n .filter(React.isValidElement)\n .map((child, index) =>\n child.type === ListItem\n ? React.cloneElement(child as React.ReactElement<ListItemProps>, {\n index,\n })\n : child\n )\n\n return (\n <ol\n ref={ref}\n data-slot=\"list\"\n {...{ [SLOT_ATTR]: \"list\" }}\n {...(domDensity !== undefined ? { \"data-density\": domDensity } : {})}\n className={mergeClasses(styles.list, className)}\n {...props}\n >\n {indexedItems}\n </ol>\n )\n})\n\nexport const List = React.forwardRef<HTMLOListElement, ListProps>(function List(\n { striped = false, showIndex = false, ...props },\n ref\n) {\n return (\n <listContext.Provider value={{ striped, showIndex, sortable: false }}>\n <ListRoot ref={ref} {...props} />\n </listContext.Provider>\n )\n})\n\n// ── ListItemActions ────────────────────────────────────────────────────────\n\nexport type ListItemActionsProps = React.ComponentProps<\"span\">\n\nexport const ListItemActions = React.forwardRef<\n HTMLSpanElement,\n ListItemActionsProps\n>(function ListItemActions({ className, children, ...props }, ref) {\n const styles = useListStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"list-item-actions\"\n {...{ [SLOT_ATTR]: \"list-item-actions\" }}\n onPointerDown={(e) => e.stopPropagation()}\n className={mergeClasses(styles.actions, className)}\n {...props}\n >\n {children}\n </span>\n )\n})\n\n// ── ListItemText ───────────────────────────────────────────────────────────\n\nexport type ListItemTextProps = React.ComponentProps<\"span\">\n\nexport const ListItemText = React.forwardRef<\n HTMLSpanElement,\n ListItemTextProps\n>(function ListItemText({ className, ...props }, ref) {\n const styles = useListStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"list-item-text\"\n {...{ [SLOT_ATTR]: \"list-item-text\" }}\n className={mergeClasses(styles.text, className)}\n {...props}\n />\n )\n})\n\n// ── ListItemDescription ────────────────────────────────────────────────────\n\nexport type ListItemDescriptionProps = React.ComponentProps<\"span\">\n\nexport const ListItemDescription = React.forwardRef<\n HTMLSpanElement,\n ListItemDescriptionProps\n>(function ListItemDescription({ className, ...props }, ref) {\n const styles = useListStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"list-item-description\"\n {...{ [SLOT_ATTR]: \"list-item-description\" }}\n className={mergeClasses(styles.description, className)}\n {...props}\n />\n )\n})\n\n// ── ListItemBody ───────────────────────────────────────────────────────────\n\n/**\n * The row's own text, leaving out its description line and anything hidden from assistive technology.\n */\nconst getPrimaryText = (node: React.ReactNode): string =>\n React.Children.toArray(node)\n .map((child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return String(child)\n }\n if (\n !React.isValidElement<{\n children?: React.ReactNode\n \"aria-hidden\"?: React.AriaAttributes[\"aria-hidden\"]\n }>(child) ||\n child.type === ListItemDescription ||\n child.props[\"aria-hidden\"] === true ||\n child.props[\"aria-hidden\"] === \"true\"\n ) {\n return \"\"\n }\n return getPrimaryText(child.props.children)\n })\n .join(\" \")\n .replace(/\\s+/g, \" \")\n .trim()\n\nexport type ListItemProps = React.ComponentProps<\"li\"> & {\n /** Stable id used for drag-and-drop. Required on every item of a `SortableList`. */\n value?: string\n /** Names the row for assistive technology, such as its drag handle. Default: the row's text, then its `value`. */\n textValue?: string\n /** System status. Tints the row and shows a trailing status icon. */\n status?: ListItemStatus\n /** Injected by `List` — the 0-based position. */\n index?: number\n}\n\n/** The slice of dnd-kit's activator listeners a row uses; typed here so this module stays dnd-free. */\nexport type ListItemDragListeners = {\n onPointerDown?: React.PointerEventHandler<HTMLLIElement>\n onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>\n}\n\nexport type ListItemBodyProps = ListItemProps & {\n setNodeRef?: (node: HTMLElement | null) => void\n setActivatorNodeRef?: (node: HTMLElement | null) => void\n style?: React.CSSProperties\n isDragging?: boolean\n /** Insertion indicator edge while another item is dragged over this one. */\n dropEdge?: \"top\" | \"bottom\" | null\n /** dnd-kit listeners — pointer activation goes on the row, keyboard on the handle. */\n listeners?: ListItemDragListeners\n /** dnd-kit a11y attributes for the keyboard drag handle. */\n attributes?: React.ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport const ListItemBody = React.forwardRef<HTMLLIElement, ListItemBodyProps>(\n function ListItemBody(\n {\n className,\n value,\n textValue,\n status = \"default\",\n index,\n children,\n setNodeRef,\n setActivatorNodeRef,\n style,\n isDragging,\n dropEdge,\n listeners,\n attributes,\n ...props\n },\n forwardedRef\n ) {\n const styles = useListStyles()\n const { striped, showIndex, sortable } = useListContext()\n const interactive = sortable && !isDragging\n\n const childArray = React.Children.toArray(children)\n const actionsSlot = childArray.find(\n (child): child is React.ReactElement =>\n React.isValidElement(child) && child.type === ListItemActions\n )\n const contentChildren = childArray.filter((child) => child !== actionsSlot)\n const name =\n textValue ?? (getPrimaryText(contentChildren) || value || \"item\")\n\n // Combined ref for dnd-kit setNodeRef + caller's forwardedRef\n const handleRef = React.useCallback(\n (node: HTMLLIElement | null) => {\n setNodeRef?.(node)\n if (typeof forwardedRef === \"function\") {\n forwardedRef(node)\n } else if (forwardedRef) {\n ;(\n forwardedRef as React.MutableRefObject<HTMLLIElement | null>\n ).current = node\n }\n },\n [setNodeRef, forwardedRef]\n )\n\n const statusStyle =\n status === \"error\"\n ? styles.statusError\n : status === \"warning\"\n ? styles.statusWarning\n : status === \"success\"\n ? styles.statusSuccess\n : styles.statusDefault\n\n const interactiveStyle = interactive\n ? status === \"error\"\n ? styles.interactiveError\n : status === \"warning\"\n ? styles.interactiveWarning\n : status === \"success\"\n ? styles.interactiveSuccess\n : styles.interactiveDefault\n : undefined\n\n return (\n <li\n ref={handleRef}\n style={style}\n data-slot=\"list-item\"\n {...{ [SLOT_ATTR]: \"list-item\" }}\n data-status={status}\n data-value={value}\n onPointerDown={sortable ? listeners?.onPointerDown : undefined}\n className={mergeClasses(\n styles.item,\n statusStyle,\n striped && status === \"default\" && styles.stripedEven,\n interactiveStyle,\n sortable && styles.sortableItem,\n isDragging && styles.itemDragging,\n className\n )}\n {...props}\n >\n {dropEdge && (\n <span\n data-slot=\"list-drop-indicator\"\n {...{ [SLOT_ATTR]: \"list-drop-indicator\" }}\n aria-hidden=\"true\"\n className={mergeClasses(\n styles.dropIndicator,\n dropEdge === \"top\"\n ? styles.dropIndicatorTop\n : styles.dropIndicatorBottom\n )}\n />\n )}\n\n {showIndex && (\n <span\n data-slot=\"list-item-index\"\n {...{ [SLOT_ATTR]: \"list-item-index\" }}\n aria-hidden=\"true\"\n className={styles.indexBase}\n >\n {(index ?? 0) + 1}\n </span>\n )}\n\n <span\n data-slot=\"list-item-content\"\n {...{ [SLOT_ATTR]: \"list-item-content\" }}\n className={styles.content}\n >\n {contentChildren}\n </span>\n\n <StatusIcon status={status} />\n\n {actionsSlot}\n\n {sortable && (\n <button\n ref={setActivatorNodeRef}\n type=\"button\"\n aria-label={`Drag to reorder ${name}`}\n className={styles.dragHandle}\n {...attributes}\n onKeyDown={listeners?.onKeyDown}\n >\n <GripVerticalIcon />\n </button>\n )}\n </li>\n )\n }\n)\n\n// ── ListItem ───────────────────────────────────────────────────────────────\n\nexport const ListItem = React.forwardRef<HTMLLIElement, ListItemProps>(\n function ListItem(props, ref) {\n const { SortableItem } = useListContext()\n\n if (SortableItem) {\n return <SortableItem ref={ref} {...props} />\n }\n\n return <ListItemBody ref={ref} {...props} />\n }\n)\n\n// ── ListGroup ──────────────────────────────────────────────────────────────\n\ntype ListGroupContextValue = {\n open: boolean\n setOpen: (open: boolean) => void\n contentId: string\n}\n\nconst ListGroupContext = React.createContext<ListGroupContextValue | null>(null)\n\nexport type ListGroupProps = Omit<React.ComponentProps<\"li\">, \"onChange\"> & {\n /** Controlled open state of the collapsible group. */\n open?: boolean\n /** Initial open state when uncontrolled. Default: false */\n defaultOpen?: boolean\n /** Called when the group is expanded or collapsed. */\n onOpenChange?: (open: boolean) => void\n}\n\nexport const ListGroup = React.forwardRef<HTMLLIElement, ListGroupProps>(\n function ListGroup(\n {\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n className,\n children,\n ...props\n },\n ref\n ) {\n const styles = useListStyles()\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const open = openProp ?? uncontrolledOpen\n const contentId = React.useId()\n\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setUncontrolledOpen(next)\n onOpenChange?.(next)\n }\n\n return (\n <ListGroupContext.Provider value={{ open, setOpen, contentId }}>\n <li\n ref={ref}\n data-slot=\"list-group\"\n {...{ [SLOT_ATTR]: \"list-group\" }}\n data-state={open ? \"open\" : \"closed\"}\n className={mergeClasses(styles.group, className)}\n {...props}\n >\n {children}\n </li>\n </ListGroupContext.Provider>\n )\n }\n)\n\n// ── ListGroupLabel ─────────────────────────────────────────────────────────\n\nexport type ListGroupLabelProps = React.ComponentProps<\"button\"> & {\n asListItem?: boolean\n}\n\nexport const ListGroupLabel = React.forwardRef<\n HTMLElement,\n ListGroupLabelProps\n>(function ListGroupLabel({ className, children, ...props }, ref) {\n const styles = useListStyles()\n const group = React.useContext(ListGroupContext)\n\n if (group) {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-slot=\"list-group-trigger\"\n {...{ [SLOT_ATTR]: \"list-group-trigger\" }}\n aria-expanded={group.open}\n aria-controls={group.contentId}\n onClick={() => group.setOpen(!group.open)}\n className={mergeClasses(\n styles.item,\n styles.interactiveDefault,\n styles.groupTrigger,\n className\n )}\n {...props}\n >\n <ChevronRightIcon\n className={mergeClasses(\n styles.groupChevron,\n group.open && styles.groupChevronOpen\n )}\n />\n <span className={styles.groupTriggerText}>{children}</span>\n </button>\n )\n }\n\n return (\n <li\n ref={ref as React.Ref<HTMLLIElement>}\n data-slot=\"list-group-label\"\n {...{ [SLOT_ATTR]: \"list-group-label\" }}\n className={mergeClasses(styles.standaloneGroupLabel, className)}\n >\n {children}\n </li>\n )\n})\n\n// ── ListGroupContent ───────────────────────────────────────────────────────\n\nexport type ListGroupContentProps = React.ComponentProps<\"ul\">\n\nexport const ListGroupContent = React.forwardRef<\n HTMLUListElement,\n ListGroupContentProps\n>(function ListGroupContent({ className, children, ...props }, ref) {\n const styles = useListStyles()\n const group = React.useContext(ListGroupContext)\n\n const items = (\n <ul\n ref={ref}\n data-slot=\"list-group-content\"\n {...{ [SLOT_ATTR]: \"list-group-content\" }}\n className={mergeClasses(styles.list, styles.groupContentList, className)}\n {...props}\n >\n {children}\n </ul>\n )\n\n if (!group) return items\n\n return (\n <div\n id={group.contentId}\n data-state={group.open ? \"open\" : \"closed\"}\n className={mergeClasses(\n styles.collapseWrapper,\n group.open && styles.collapseWrapperOpen\n )}\n >\n <div className={styles.collapseInner}>{items}</div>\n </div>\n )\n})\n"],"names":["GripVerticalIcon","props","jsxs","jsx","WarningIcon","CheckCircleIcon","ChevronRightIcon","useListStyles","makeZenithStyles","boxModel","shorthands","tokens.radiusMd","tokens.grayA12","tokens.listItemMinHeight","tokens.listItemGap","tokens.listItemPaddingY","tokens.listItemPaddingX","tokens.textSm","tokens.leadingSm","tokens.errorSoft","tokens.errorDefault","tokens.warningSoft","tokens.warningDefault","tokens.successSoft","tokens.successDefault","tokens.grayA2","tokens.accentSoft","tokens.errorSoftHover","tokens.warningSoftHover","tokens.successSoftHover","tokens.grayA11","tokens.listIndexMinWidth","tokens.listIndexPaddingX","tokens.spacingElement2","tokens.spacingElement1","tokens.textXs","tokens.leadingXs","tokens.grayA8","tokens.accentA8","tokens.accentSolid","tokens.grayA5","tokens.fontWeightMedium","tokens.grayA10","tokens.spacingGroup2","tokens.spacingElement3","tokens.fontWeightSemibold","tokens.errorLight","tokens.warningLight","tokens.successLight","StatusIcon","status","styles","listContext","React","useListContext","canonicalDomDensity","density","ListRoot","className","children","ref","domDensity","indexedItems","child","index","ListItem","SLOT_ATTR","mergeClasses","List","striped","showIndex","ListItemActions","e","ListItemText","ListItemDescription","getPrimaryText","node","ListItemBody","value","textValue","setNodeRef","setActivatorNodeRef","style","isDragging","dropEdge","listeners","attributes","forwardedRef","sortable","interactive","childArray","actionsSlot","contentChildren","name","handleRef","statusStyle","interactiveStyle","SortableItem","ListGroupContext","ListGroup","openProp","defaultOpen","onOpenChange","uncontrolledOpen","setUncontrolledOpen","open","content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AYA,EAAM,OAAO,SAAS;AAAA,MAClC,WAAW3C;AAAA,QACThB,EAAO;AAAA,QACP2D,EAAM,QAAQ3D,EAAO;AAAA,MAAA;AAAA,MAGvB,UAAA,gBAAAhD,EAAC,OAAA,EAAI,WAAWgD,EAAO,eAAgB,UAAA6D,EAAA,CAAM;AAAA,IAAA;AAAA,EAAA,IAX9BA;AAcrB,CAAC;"}
1
+ {"version":3,"file":"list.js","sources":["../../../src/components/list/list.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel } from \"../../styles/host-reset\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * `relaxed` is a permanent compatibility alias for `normal` (DENSITY-SPEC.md §4.2,\n * WP9B2A-ACCEPTANCE-LIST) — identical geometry, forever, not deprecated.\n */\nexport type ListDensity = \"compact\" | \"normal\" | \"comfortable\" | \"relaxed\"\nexport type ListItemStatus = \"default\" | \"error\" | \"warning\" | \"success\"\n\n// ── Icons ──────────────────────────────────────────────────────────────────\n\nconst GripVerticalIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n {...props}\n >\n <circle cx=\"9\" cy=\"5\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"5\" r=\"1.5\" />\n <circle cx=\"9\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"9\" cy=\"19\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"19\" r=\"1.5\" />\n </svg>\n)\n\nconst WarningIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" />\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\" />\n </svg>\n)\n\nconst CheckCircleIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\" />\n <polyline points=\"22 4 12 14.01 9 11.01\" />\n </svg>\n)\n\nconst ChevronRightIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n)\n\n// ── Styles ─────────────────────────────────────────────────────────────────\n\nexport const useListStyles = makeZenithStyles({\n list: {\n ...boxModel,\n display: \"flex\",\n width: \"100%\",\n listStyleType: \"none\",\n flexDirection: \"column\",\n ...shorthands.gap(0),\n ...shorthands.padding(0),\n ...shorthands.margin(0),\n },\n\n // ListItem base — density-bound (DENSITY-SPEC.md §2.2, WP9B2A-ACCEPTANCE-LIST).\n item: {\n ...boxModel,\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n alignItems: \"center\",\n ...shorthands.borderRadius(tokens.radiusMd),\n color: tokens.grayA12,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n minHeight: tokens.listItemMinHeight,\n ...shorthands.gap(tokens.listItemGap),\n ...shorthands.padding(tokens.listItemPaddingY, tokens.listItemPaddingX),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n \"& > svg\": {\n flexShrink: 0,\n width: \"1rem\",\n height: \"1rem\",\n },\n },\n\n // Status variants\n statusDefault: {},\n statusError: {\n backgroundColor: tokens.errorSoft,\n color: tokens.errorDefault,\n },\n statusWarning: {\n backgroundColor: tokens.warningSoft,\n color: tokens.warningDefault,\n },\n statusSuccess: {\n backgroundColor: tokens.successSoft,\n color: tokens.successDefault,\n },\n\n // Striped variant (only neutral rows)\n stripedEven: {\n \"&:nth-child(even)\": {\n backgroundColor: tokens.grayA2,\n },\n },\n\n // Interactive hovers\n interactiveDefault: {\n \":hover\": {\n backgroundColor: tokens.accentSoft,\n },\n },\n interactiveError: {\n \":hover\": {\n backgroundColor: tokens.errorSoftHover,\n },\n },\n interactiveWarning: {\n \":hover\": {\n backgroundColor: tokens.warningSoftHover,\n },\n },\n interactiveSuccess: {\n \":hover\": {\n backgroundColor: tokens.successSoftHover,\n },\n },\n\n // Sortable modifiers\n sortableItem: {\n cursor: \"grab\",\n touchAction: \"none\",\n \":active\": {\n cursor: \"grabbing\",\n },\n },\n itemDragging: {\n opacity: 0.4,\n },\n\n // Index gutter — density-bound.\n indexBase: {\n ...boxModel,\n display: \"flex\",\n flexShrink: 0,\n userSelect: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n alignSelf: \"stretch\",\n borderTopLeftRadius: tokens.radiusMd,\n borderBottomLeftRadius: tokens.radiusMd,\n backgroundColor: tokens.grayA2,\n textAlign: \"center\",\n color: tokens.grayA11,\n fontVariantNumeric: \"tabular-nums\",\n minWidth: tokens.listIndexMinWidth,\n marginTop: `calc(-1 * ${tokens.listItemPaddingY})`,\n marginBottom: `calc(-1 * ${tokens.listItemPaddingY})`,\n marginLeft: `calc(-1 * ${tokens.listItemPaddingX})`,\n paddingLeft: tokens.listIndexPaddingX,\n paddingRight: tokens.listIndexPaddingX,\n },\n\n // Content\n content: {\n ...boxModel,\n display: \"flex\",\n minWidth: 0,\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n \"& > svg\": {\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n },\n },\n\n // Actions\n actions: {\n position: \"relative\",\n zIndex: 10,\n display: \"flex\",\n flexShrink: 0,\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n },\n\n // Text\n text: {\n ...boxModel,\n display: \"flex\",\n minWidth: 0,\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n flexDirection: \"column\",\n ...shorthands.gap(\"0.125rem\"),\n },\n\n // Description\n description: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n color: tokens.grayA11,\n },\n\n // Drag handle button\n dragHandle: {\n ...boxModel,\n position: \"relative\",\n zIndex: 10,\n display: \"inline-flex\",\n flexShrink: 0,\n cursor: \"grab\",\n alignItems: \"center\",\n color: tokens.grayA8,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \":hover\": {\n color: tokens.grayA11,\n },\n \":active\": {\n cursor: \"grabbing\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n \"& svg\": {\n width: \"1rem\",\n height: \"1rem\",\n },\n },\n\n // Drop indicator line\n dropIndicator: {\n ...boxModel,\n pointerEvents: \"none\",\n position: \"absolute\",\n left: 0,\n right: 0,\n zIndex: 10,\n height: \"0.125rem\",\n transformOrigin: \"center\",\n ...shorthands.borderRadius(\"9999px\"),\n backgroundColor: tokens.accentSolid,\n animationName: {\n from: {\n transform: \"scaleX(0)\",\n opacity: 0,\n },\n to: {\n transform: \"scaleX(1)\",\n opacity: 1,\n },\n },\n animationDuration: \"160ms\",\n animationTimingFunction: \"ease-out\",\n },\n dropIndicatorTop: {\n top: \"-0.125rem\",\n },\n dropIndicatorBottom: {\n bottom: \"-0.125rem\",\n },\n\n // DragOverlay ghost\n dragOverlayItem: {\n ...boxModel,\n transformOrigin: \"center\",\n transform: \"scale(0.95)\",\n cursor: \"grabbing\",\n ...shorthands.border(\"1px\", \"solid\", tokens.grayA5),\n backgroundColor: \"rgb(255 255 255 / 55%)\",\n boxShadow: \"0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a\",\n backdropFilter: \"blur(12px)\",\n animationName: {\n from: { transform: \"scale(1)\" },\n to: { transform: \"scale(0.95)\" },\n },\n animationDuration: \"160ms\",\n animationTimingFunction: \"ease-out\",\n \":hover\": {\n backgroundColor: \"rgb(255 255 255 / 55%)\",\n },\n },\n\n // Group\n group: {\n listStyleType: \"none\",\n },\n groupTrigger: {\n ...boxModel,\n cursor: \"pointer\",\n textAlign: \"left\",\n fontWeight: tokens.fontWeightMedium,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n },\n groupChevron: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.grayA10,\n transitionProperty: \"transform\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n },\n groupChevronOpen: {\n transform: \"rotate(90deg)\",\n },\n groupTriggerText: {\n ...boxModel,\n minWidth: 0,\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n },\n standaloneGroupLabel: {\n ...boxModel,\n marginTop: tokens.spacingGroup2,\n display: \"block\",\n listStyleType: \"none\",\n ...shorthands.padding(\"0.375rem\", tokens.spacingElement3),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.grayA12,\n \"&:first-child\": {\n marginTop: 0,\n },\n },\n groupContentList: {\n ...boxModel,\n paddingLeft: tokens.spacingGroup2,\n },\n collapseWrapper: {\n display: \"grid\",\n gridTemplateRows: \"0fr\",\n transitionProperty: \"grid-template-rows\",\n transitionDuration: \"200ms\",\n transitionTimingFunction: \"cubic-bezier(0, 0, 0.2, 1)\",\n \"&[data-state='open']\": {\n gridTemplateRows: \"1fr\",\n },\n },\n collapseWrapperOpen: {\n gridTemplateRows: \"1fr\",\n },\n collapseInner: {\n ...boxModel,\n minHeight: 0,\n overflow: \"hidden\",\n },\n\n // Status icons\n statusIconError: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.errorLight,\n },\n statusIconWarning: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.warningLight,\n },\n statusIconSuccess: {\n ...boxModel,\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n color: tokens.successLight,\n },\n})\n\n// ── Status Icons Helper ────────────────────────────────────────────────────\n\nconst StatusIcon = ({ status }: { status: ListItemStatus }) => {\n const styles = useListStyles()\n if (status === \"error\") {\n return <WarningIcon className={styles.statusIconError} />\n }\n if (status === \"warning\") {\n return <WarningIcon className={styles.statusIconWarning} />\n }\n if (status === \"success\") {\n return <CheckCircleIcon className={styles.statusIconSuccess} />\n }\n return null\n}\n\n// ── Context ────────────────────────────────────────────────────────────────\n\n/**\n * `density` is deliberately NOT here — every downstream consumer (`ListItemBody`,\n * `ListGroupLabel`'s collapsible-trigger branch) now reads geometry from CSS custom properties via\n * `[data-density]` inheritance, not from this context.\n */\nexport type ListContextValue = {\n striped: boolean\n showIndex: boolean\n /** Set only by `SortableList` (`@epilot/zenith-react/list/sortable`). */\n sortable: boolean\n /**\n * The drag-aware row `SortableList` supplies. The root entry never imports dnd-kit, so `ListItem`\n * cannot name it; it renders whatever the surrounding `SortableList` put here.\n */\n SortableItem?: React.ForwardRefExoticComponent<\n ListItemProps & React.RefAttributes<HTMLLIElement>\n >\n}\n\n/** Internal: shared with `list-sortable.tsx`, deliberately not exported from the package index. */\nexport const listContext = React.createContext<ListContextValue>({\n striped: false,\n showIndex: false,\n sortable: false,\n})\n\nconst useListContext = () => React.useContext(listContext)\n\n/**\n * `undefined` (density omitted) stays `undefined` — no implicit normal stamp, so the `<ol>`\n * inherits ambient CSS density through ordinary DOM inheritance.\n */\nexport const canonicalDomDensity = (\n density: ListDensity | undefined\n): \"compact\" | \"normal\" | \"comfortable\" | undefined =>\n density === undefined ? undefined : density === \"relaxed\" ? \"normal\" : density\n\n// ── List ───────────────────────────────────────────────────────────────────\n\nexport type ListProps = React.ComponentProps<\"ol\"> & {\n /**\n * Row density. Omitted inherits the ambient shell `[data-density]` (no stamp is written).\n * `\"relaxed\"` is a permanent alias for `\"normal\"` — identical geometry, normalized to\n * `data-density=\"normal\"` in the DOM. An explicit value (including `\"relaxed\"`) creates a\n * canonical density boundary for this list's subtree and its `DragOverlay`.\n */\n density?: ListDensity\n /** Alternating background on neutral rows. Default: false */\n striped?: boolean\n /** Show a 1-based position number on each item. Default: false */\n showIndex?: boolean\n}\n\n/**\n * Internal: the `<ol>` itself, with the index injected into each `ListItem`. Shared by `List` and\n * `SortableList` so both render identical markup; the context provider stays with the caller.\n */\nexport const ListRoot = React.forwardRef<\n HTMLOListElement,\n Omit<ListProps, \"striped\" | \"showIndex\">\n>(function ListRoot({ className, density, children, ...props }, ref) {\n const styles = useListStyles()\n const domDensity = canonicalDomDensity(density)\n\n const indexedItems = React.Children.toArray(children)\n .filter(React.isValidElement)\n .map((child, index) =>\n child.type === ListItem\n ? React.cloneElement(child as React.ReactElement<ListItemProps>, {\n index,\n })\n : child\n )\n\n return (\n <ol\n ref={ref}\n data-slot=\"list\"\n {...{ [SLOT_ATTR]: \"list\" }}\n {...(domDensity !== undefined ? { \"data-density\": domDensity } : {})}\n className={mergeClasses(styles.list, className)}\n {...props}\n >\n {indexedItems}\n </ol>\n )\n})\n\nexport const List = React.forwardRef<HTMLOListElement, ListProps>(function List(\n { striped = false, showIndex = false, ...props },\n ref\n) {\n return (\n <listContext.Provider value={{ striped, showIndex, sortable: false }}>\n <ListRoot ref={ref} {...props} />\n </listContext.Provider>\n )\n})\n\n// ── ListItemActions ────────────────────────────────────────────────────────\n\nexport type ListItemActionsProps = React.ComponentProps<\"span\">\n\nexport const ListItemActions = React.forwardRef<\n HTMLSpanElement,\n ListItemActionsProps\n>(function ListItemActions({ className, children, ...props }, ref) {\n const styles = useListStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"list-item-actions\"\n {...{ [SLOT_ATTR]: \"list-item-actions\" }}\n onPointerDown={(e) => e.stopPropagation()}\n className={mergeClasses(styles.actions, className)}\n {...props}\n >\n {children}\n </span>\n )\n})\n\n// ── ListItemText ───────────────────────────────────────────────────────────\n\nexport type ListItemTextProps = React.ComponentProps<\"span\">\n\nexport const ListItemText = React.forwardRef<\n HTMLSpanElement,\n ListItemTextProps\n>(function ListItemText({ className, ...props }, ref) {\n const styles = useListStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"list-item-text\"\n {...{ [SLOT_ATTR]: \"list-item-text\" }}\n className={mergeClasses(styles.text, className)}\n {...props}\n />\n )\n})\n\n// ── ListItemDescription ────────────────────────────────────────────────────\n\nexport type ListItemDescriptionProps = React.ComponentProps<\"span\">\n\nexport const ListItemDescription = React.forwardRef<\n HTMLSpanElement,\n ListItemDescriptionProps\n>(function ListItemDescription({ className, ...props }, ref) {\n const styles = useListStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"list-item-description\"\n {...{ [SLOT_ATTR]: \"list-item-description\" }}\n className={mergeClasses(styles.description, className)}\n {...props}\n />\n )\n})\n\n// ── ListItemBody ───────────────────────────────────────────────────────────\n\n/**\n * The row's own text, leaving out its description, its actions and anything `aria-hidden`; the\n * caller collapses the whitespace.\n */\nconst getPrimaryText = (node: unknown): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n // Not React.Children.toArray: it throws on non-node children such as <Trans>'s {{ name }} objects.\n if (\n typeof node === \"object\" &&\n node !== null &&\n !React.isValidElement(node) &&\n Symbol.iterator in node\n )\n return Array.from(node as Iterable<unknown>, getPrimaryText).join(\" \")\n if (\n !React.isValidElement<{\n children?: unknown\n \"aria-hidden\"?: React.AriaAttributes[\"aria-hidden\"]\n }>(node) ||\n node.type === ListItemDescription ||\n node.type === ListItemActions ||\n node.props[\"aria-hidden\"] === true ||\n node.props[\"aria-hidden\"] === \"true\"\n ) {\n return \"\"\n }\n return getPrimaryText(node.props.children)\n}\n\nexport type ListItemProps = React.ComponentProps<\"li\"> & {\n /** Stable id used for drag-and-drop. Required on every item of a `SortableList`. */\n value?: string\n /** Names the row for assistive technology, such as its drag handle. Default: the row's text, then its `value`. */\n textValue?: string\n /** System status. Tints the row and shows a trailing status icon. */\n status?: ListItemStatus\n /** Injected by `List` — the 0-based position. */\n index?: number\n}\n\n/** The slice of dnd-kit's activator listeners a row uses; typed here so this module stays dnd-free. */\nexport type ListItemDragListeners = {\n onPointerDown?: React.PointerEventHandler<HTMLLIElement>\n onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>\n}\n\nexport type ListItemBodyProps = ListItemProps & {\n setNodeRef?: (node: HTMLElement | null) => void\n setActivatorNodeRef?: (node: HTMLElement | null) => void\n style?: React.CSSProperties\n isDragging?: boolean\n /** Insertion indicator edge while another item is dragged over this one. */\n dropEdge?: \"top\" | \"bottom\" | null\n /** dnd-kit listeners — pointer activation goes on the row, keyboard on the handle. */\n listeners?: ListItemDragListeners\n /** dnd-kit a11y attributes for the keyboard drag handle. */\n attributes?: React.ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport const ListItemBody = React.forwardRef<HTMLLIElement, ListItemBodyProps>(\n function ListItemBody(\n {\n className,\n value,\n textValue,\n status = \"default\",\n index,\n children,\n setNodeRef,\n setActivatorNodeRef,\n style,\n isDragging,\n dropEdge,\n listeners,\n attributes,\n ...props\n },\n forwardedRef\n ) {\n const styles = useListStyles()\n const { striped, showIndex, sortable } = useListContext()\n const interactive = sortable && !isDragging\n\n const childArray = React.Children.toArray(children)\n const actionsSlot = childArray.find(\n (child): child is React.ReactElement =>\n React.isValidElement(child) && child.type === ListItemActions\n )\n const contentChildren = childArray.filter((child) => child !== actionsSlot)\n // Only a sortable row has a grip to name.\n const name = sortable\n ? textValue?.trim() ||\n getPrimaryText(contentChildren).replace(/\\s+/g, \" \").trim() ||\n value ||\n \"item\"\n : undefined\n\n // Combined ref for dnd-kit setNodeRef + caller's forwardedRef\n const handleRef = React.useCallback(\n (node: HTMLLIElement | null) => {\n setNodeRef?.(node)\n if (typeof forwardedRef === \"function\") {\n forwardedRef(node)\n } else if (forwardedRef) {\n ;(\n forwardedRef as React.MutableRefObject<HTMLLIElement | null>\n ).current = node\n }\n },\n [setNodeRef, forwardedRef]\n )\n\n const statusStyle =\n status === \"error\"\n ? styles.statusError\n : status === \"warning\"\n ? styles.statusWarning\n : status === \"success\"\n ? styles.statusSuccess\n : styles.statusDefault\n\n const interactiveStyle = interactive\n ? status === \"error\"\n ? styles.interactiveError\n : status === \"warning\"\n ? styles.interactiveWarning\n : status === \"success\"\n ? styles.interactiveSuccess\n : styles.interactiveDefault\n : undefined\n\n return (\n <li\n ref={handleRef}\n style={style}\n data-slot=\"list-item\"\n {...{ [SLOT_ATTR]: \"list-item\" }}\n data-status={status}\n data-value={value}\n onPointerDown={sortable ? listeners?.onPointerDown : undefined}\n className={mergeClasses(\n styles.item,\n statusStyle,\n striped && status === \"default\" && styles.stripedEven,\n interactiveStyle,\n sortable && styles.sortableItem,\n isDragging && styles.itemDragging,\n className\n )}\n {...props}\n >\n {dropEdge && (\n <span\n data-slot=\"list-drop-indicator\"\n {...{ [SLOT_ATTR]: \"list-drop-indicator\" }}\n aria-hidden=\"true\"\n className={mergeClasses(\n styles.dropIndicator,\n dropEdge === \"top\"\n ? styles.dropIndicatorTop\n : styles.dropIndicatorBottom\n )}\n />\n )}\n\n {showIndex && (\n <span\n data-slot=\"list-item-index\"\n {...{ [SLOT_ATTR]: \"list-item-index\" }}\n aria-hidden=\"true\"\n className={styles.indexBase}\n >\n {(index ?? 0) + 1}\n </span>\n )}\n\n <span\n data-slot=\"list-item-content\"\n {...{ [SLOT_ATTR]: \"list-item-content\" }}\n className={styles.content}\n >\n {contentChildren}\n </span>\n\n <StatusIcon status={status} />\n\n {actionsSlot}\n\n {sortable && (\n <button\n ref={setActivatorNodeRef}\n type=\"button\"\n aria-label={`Drag to reorder ${name}`}\n className={styles.dragHandle}\n {...attributes}\n onKeyDown={listeners?.onKeyDown}\n >\n <GripVerticalIcon />\n </button>\n )}\n </li>\n )\n }\n)\n\n// ── ListItem ───────────────────────────────────────────────────────────────\n\nexport const ListItem = React.forwardRef<HTMLLIElement, ListItemProps>(\n function ListItem(props, ref) {\n const { SortableItem } = useListContext()\n\n if (SortableItem) {\n return <SortableItem ref={ref} {...props} />\n }\n\n return <ListItemBody ref={ref} {...props} />\n }\n)\n\n// ── ListGroup ──────────────────────────────────────────────────────────────\n\ntype ListGroupContextValue = {\n open: boolean\n setOpen: (open: boolean) => void\n contentId: string\n}\n\nconst ListGroupContext = React.createContext<ListGroupContextValue | null>(null)\n\nexport type ListGroupProps = Omit<React.ComponentProps<\"li\">, \"onChange\"> & {\n /** Controlled open state of the collapsible group. */\n open?: boolean\n /** Initial open state when uncontrolled. Default: false */\n defaultOpen?: boolean\n /** Called when the group is expanded or collapsed. */\n onOpenChange?: (open: boolean) => void\n}\n\nexport const ListGroup = React.forwardRef<HTMLLIElement, ListGroupProps>(\n function ListGroup(\n {\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n className,\n children,\n ...props\n },\n ref\n ) {\n const styles = useListStyles()\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const open = openProp ?? uncontrolledOpen\n const contentId = React.useId()\n\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setUncontrolledOpen(next)\n onOpenChange?.(next)\n }\n\n return (\n <ListGroupContext.Provider value={{ open, setOpen, contentId }}>\n <li\n ref={ref}\n data-slot=\"list-group\"\n {...{ [SLOT_ATTR]: \"list-group\" }}\n data-state={open ? \"open\" : \"closed\"}\n className={mergeClasses(styles.group, className)}\n {...props}\n >\n {children}\n </li>\n </ListGroupContext.Provider>\n )\n }\n)\n\n// ── ListGroupLabel ─────────────────────────────────────────────────────────\n\nexport type ListGroupLabelProps = React.ComponentProps<\"button\"> & {\n asListItem?: boolean\n}\n\nexport const ListGroupLabel = React.forwardRef<\n HTMLElement,\n ListGroupLabelProps\n>(function ListGroupLabel({ className, children, ...props }, ref) {\n const styles = useListStyles()\n const group = React.useContext(ListGroupContext)\n\n if (group) {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-slot=\"list-group-trigger\"\n {...{ [SLOT_ATTR]: \"list-group-trigger\" }}\n aria-expanded={group.open}\n aria-controls={group.contentId}\n onClick={() => group.setOpen(!group.open)}\n className={mergeClasses(\n styles.item,\n styles.interactiveDefault,\n styles.groupTrigger,\n className\n )}\n {...props}\n >\n <ChevronRightIcon\n className={mergeClasses(\n styles.groupChevron,\n group.open && styles.groupChevronOpen\n )}\n />\n <span className={styles.groupTriggerText}>{children}</span>\n </button>\n )\n }\n\n return (\n <li\n ref={ref as React.Ref<HTMLLIElement>}\n data-slot=\"list-group-label\"\n {...{ [SLOT_ATTR]: \"list-group-label\" }}\n className={mergeClasses(styles.standaloneGroupLabel, className)}\n >\n {children}\n </li>\n )\n})\n\n// ── ListGroupContent ───────────────────────────────────────────────────────\n\nexport type ListGroupContentProps = React.ComponentProps<\"ul\">\n\nexport const ListGroupContent = React.forwardRef<\n HTMLUListElement,\n ListGroupContentProps\n>(function ListGroupContent({ className, children, ...props }, ref) {\n const styles = useListStyles()\n const group = React.useContext(ListGroupContext)\n\n const items = (\n <ul\n ref={ref}\n data-slot=\"list-group-content\"\n {...{ [SLOT_ATTR]: \"list-group-content\" }}\n className={mergeClasses(styles.list, styles.groupContentList, className)}\n {...props}\n >\n {children}\n </ul>\n )\n\n if (!group) return items\n\n return (\n <div\n id={group.contentId}\n data-state={group.open ? \"open\" : \"closed\"}\n className={mergeClasses(\n styles.collapseWrapper,\n group.open && styles.collapseWrapperOpen\n )}\n >\n <div className={styles.collapseInner}>{items}</div>\n </div>\n )\n})\n"],"names":["GripVerticalIcon","props","jsxs","jsx","WarningIcon","CheckCircleIcon","ChevronRightIcon","useListStyles","makeZenithStyles","boxModel","shorthands","tokens.radiusMd","tokens.grayA12","tokens.listItemMinHeight","tokens.listItemGap","tokens.listItemPaddingY","tokens.listItemPaddingX","tokens.textSm","tokens.leadingSm","tokens.errorSoft","tokens.errorDefault","tokens.warningSoft","tokens.warningDefault","tokens.successSoft","tokens.successDefault","tokens.grayA2","tokens.accentSoft","tokens.errorSoftHover","tokens.warningSoftHover","tokens.successSoftHover","tokens.grayA11","tokens.listIndexMinWidth","tokens.listIndexPaddingX","tokens.spacingElement2","tokens.spacingElement1","tokens.textXs","tokens.leadingXs","tokens.grayA8","tokens.accentA8","tokens.accentSolid","tokens.grayA5","tokens.fontWeightMedium","tokens.grayA10","tokens.spacingGroup2","tokens.spacingElement3","tokens.fontWeightSemibold","tokens.errorLight","tokens.warningLight","tokens.successLight","StatusIcon","status","styles","listContext","React","useListContext","canonicalDomDensity","density","ListRoot","className","children","ref","domDensity","indexedItems","child","index","ListItem","SLOT_ATTR","mergeClasses","List","striped","showIndex","ListItemActions","e","ListItemText","ListItemDescription","getPrimaryText","node","ListItemBody","value","textValue","setNodeRef","setActivatorNodeRef","style","isDragging","dropEdge","listeners","attributes","forwardedRef","sortable","interactive","childArray","actionsSlot","contentChildren","name","handleRef","statusStyle","interactiveStyle","SortableItem","ListGroupContext","ListGroup","openProp","defaultOpen","onOpenChange","uncontrolledOpen","setUncontrolledOpen","open","contentId","setOpen","next","ListGroupLabel","group","ListGroupContent","items"],"mappings":";;;;;;AAiBA,MAAMA,KAAmB,CAACC,MACxB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,eAAY;AAAA,IACX,GAAGD;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE,EAAC,YAAO,IAAG,KAAI,IAAG,KAAI,GAAE,OAAM;AAAA,wBAC7B,UAAA,EAAO,IAAG,MAAK,IAAG,KAAI,GAAE,OAAM;AAAA,wBAC9B,UAAA,EAAO,IAAG,KAAI,IAAG,MAAK,GAAE,OAAM;AAAA,wBAC9B,UAAA,EAAO,IAAG,MAAK,IAAG,MAAK,GAAE,OAAM;AAAA,wBAC/B,UAAA,EAAO,IAAG,KAAI,IAAG,MAAK,GAAE,OAAM;AAAA,wBAC9B,UAAA,EAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAA,CAAM;AAAA,IAAA;AAAA,EAAA;AAClC,GAGIC,IAAc,CAACH,MACnB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,eAAY;AAAA,IACX,GAAGD;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAA,EAAK,GAAE,2FAAA,CAA2F;AAAA,MACnG,gBAAAA,EAAC,UAAK,IAAG,MAAK,IAAG,KAAI,IAAG,MAAK,IAAG,KAAA,CAAK;AAAA,MACrC,gBAAAA,EAAC,UAAK,IAAG,MAAK,IAAG,MAAK,IAAG,SAAQ,I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GAAG;AAAA,MACnB,WAAWC,EAAahB,EAAO,MAAMA,EAAO,kBAAkBO,CAAS;AAAA,MACtE,GAAGzD;AAAA,MAEH,UAAA0D;AAAA,IAAA;AAAA,EAAA;AAIL,SAAKmD,IAGH,gBAAA3G;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI2G,EAAM;AAAA,MACV,cAAYA,EAAM,OAAO,SAAS;AAAA,MAClC,WAAW3C;AAAA,QACThB,EAAO;AAAA,QACP2D,EAAM,QAAQ3D,EAAO;AAAA,MAAA;AAAA,MAGvB,UAAA,gBAAAhD,EAAC,OAAA,EAAI,WAAWgD,EAAO,eAAgB,UAAA6D,EAAA,CAAM;AAAA,IAAA;AAAA,EAAA,IAX9BA;AAcrB,CAAC;"}
@@ -29,14 +29,16 @@ const B = ft({
29
29
  popup: {
30
30
  ...q,
31
31
  width: "fit-content",
32
+ // About 40 characters a line: long hints wrap instead of stretching across the page (ER-5571).
33
+ maxWidth: "40ch",
32
34
  transformOrigin: "var(--transform-origin)",
33
35
  ...z.borderRadius(Tt),
34
36
  ...z.padding(wt),
35
37
  // v1 shadow-md; elevation has no token in this package.
36
38
  boxShadow: "0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",
37
39
  fontSize: Pt,
38
- // v1 leading-none; no line-height token exists.
39
- lineHeight: "1",
40
+ // Wrapped lines need room; v1's leading-none suited one-line tooltips only. No line-height token exists.
41
+ lineHeight: "1.35",
40
42
  zIndex: J,
41
43
  "&[data-variant='default']": {
42
44
  backgroundColor: Q,
@@ -251,7 +253,7 @@ const Ut = t.forwardRef(function({ asChild: e = !1, children: n, className: r, .
251
253
  id: k,
252
254
  ...P
253
255
  }, g) {
254
- const s = B(), f = rt("TooltipContent"), w = t.useContext(nt), V = ut(), it = pt(), X = t.useRef(null), [A, at] = t.useState(null), st = yt(g, at), { open: H, closeOnEscape: Y } = f;
256
+ const s = B(), f = rt("TooltipContent"), w = t.useContext(nt), V = ut(), it = pt(), X = t.useRef(null), [A, at] = t.useState(null), st = yt(g, at), { open: H, closeOnEscape: W } = f;
255
257
  t.useEffect(() => {
256
258
  if (!H || !A) return;
257
259
  const l = A;
@@ -260,15 +262,15 @@ const Ut = t.forwardRef(function({ asChild: e = !1, children: n, className: r, .
260
262
  function K(m) {
261
263
  if (m.key !== "Escape" || m.defaultPrevented || m.isComposing || T[T.length - 1] !== l) return;
262
264
  const M = m.target;
263
- !(M instanceof Node) || l.contains(M) || !(l.compareDocumentPosition(M) & Node.DOCUMENT_POSITION_PRECEDING) || (m.preventDefault(), Y(m));
265
+ !(M instanceof Node) || l.contains(M) || !(l.compareDocumentPosition(M) & Node.DOCUMENT_POSITION_PRECEDING) || (m.preventDefault(), W(m));
264
266
  }
265
267
  return F.addEventListener("keydown", K, !0), () => {
266
268
  F.removeEventListener("keydown", K, !0), T.splice(T.indexOf(l), 1);
267
269
  };
268
- }, [H, A, Y]);
269
- const N = k ?? f.generatedId, L = P["aria-label"], $ = `${N}-label`, j = L ? $ : N, { setDescriptionId: _ } = f;
270
- t.useEffect(() => (_(j), () => _(void 0)), [j, _]);
271
- const G = L && /* @__PURE__ */ i("span", { id: $, hidden: !0, children: L }), W = !a && /* @__PURE__ */ i(
270
+ }, [H, A, W]);
271
+ const N = k ?? f.generatedId, L = P["aria-label"], Y = `${N}-label`, $ = L ? Y : N, { setDescriptionId: _ } = f;
272
+ t.useEffect(() => (_($), () => _(void 0)), [$, _]);
273
+ const j = L && /* @__PURE__ */ i("span", { id: Y, hidden: !0, children: L }), G = !a && /* @__PURE__ */ i(
272
274
  c.Arrow,
273
275
  {
274
276
  ref: X,
@@ -282,14 +284,14 @@ const Ut = t.forwardRef(function({ asChild: e = !1, children: n, className: r, .
282
284
  D,
283
285
  void 0,
284
286
  D.props.children,
285
- G,
286
- W
287
+ j,
288
+ G
287
289
  )
288
290
  } : {
289
291
  children: /* @__PURE__ */ ct(dt, { children: [
290
292
  r,
291
- G,
292
- W
293
+ j,
294
+ G
293
295
  ] })
294
296
  }, Z = /* @__PURE__ */ i(
295
297
  c.Positioner,
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { useAppearanceAttributes } from \"../appearance-boundary/appearance-boundary\"\nimport { useDensity } from \"../density-provider/density-provider\"\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel, nativeControl } from \"../../styles/host-reset\"\nimport { OVERLAY_Z_INDEX } from \"../../styles/overlay-layer\"\nimport * as tokens from \"../../tokens\"\n\nconst useStyles = makeZenithStyles({\n // For the bare native `<button>` a Trigger/Close renders. Not applied under `asChild`, where the\n // child owns its own element and two atom sets would race for the same properties.\n nativeTrigger: {\n ...nativeControl,\n },\n positioner: {\n zIndex: OVERLAY_Z_INDEX,\n },\n // Radix's `hideWhenDetached`: hide the content once its trigger is scrolled out of view.\n hideWhenDetached: {\n \"&[data-anchor-hidden]\": {\n visibility: \"hidden\",\n pointerEvents: \"none\",\n },\n },\n // No enter or exit motion: the Radix version keyed its keyframes on `data-state='open'`, a value\n // Radix's tooltip never sets (it sets `delayed-open` or `instant-open`), so it never animated.\n popup: {\n ...boxModel,\n width: \"fit-content\",\n transformOrigin: \"var(--transform-origin)\",\n ...shorthands.borderRadius(tokens.radiusLg),\n ...shorthands.padding(tokens.spacingElement2),\n // v1 shadow-md; elevation has no token in this package.\n boxShadow: \"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a\",\n fontSize: tokens.textXs,\n // v1 leading-none; no line-height token exists.\n lineHeight: \"1\",\n zIndex: OVERLAY_Z_INDEX,\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n color: tokens.gray1,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.errorA12,\n color: tokens.error1,\n },\n },\n // Base UI places the arrow on the cross axis only; the anchored edge is set per side here. The\n // diamond's centre sits 2px inside the content's edge, where Radix's arrow wrapper put it.\n arrow: {\n ...boxModel,\n zIndex: 50,\n width: \"0.625rem\",\n height: \"0.625rem\",\n ...shorthands.borderRadius(\"2px\"),\n \"&[data-side='top']\": {\n top: \"100%\",\n transform: \"translateY(calc(-50% - 2px)) rotate(45deg)\",\n },\n \"&[data-side='bottom']\": {\n top: 0,\n transform: \"translateY(calc(-50% + 2px)) rotate(45deg)\",\n },\n \"&[data-side='left']\": {\n left: \"100%\",\n transform: \"translateX(calc(-50% - 2px)) rotate(45deg)\",\n },\n \"&[data-side='right']\": {\n left: 0,\n transform: \"translateX(calc(-50% + 2px)) rotate(45deg)\",\n },\n // Radix hid the arrow when it could not point at the trigger's centre.\n \"&[data-uncentered]\": {\n visibility: \"hidden\",\n },\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.error12,\n },\n },\n})\n\n// A single child can arrive wrapped in a one-element array depending on the JSX runtime (MDX call\n// sites do this). Radix's Slot normalised that, so the `asChild` shim has to as well.\nfunction onlySlotChild(children: React.ReactNode) {\n const elements = React.Children.toArray(children).filter(React.isValidElement)\n return elements.length === 1 ? elements[0] : undefined\n}\n\n/**\n * Radix's `asChild` over Base UI's `render`: the single child element becomes the part and keeps\n * its own children, since Base UI lets the rendered element's props win the merge.\n */\nfunction slotProps(asChild: boolean, children: React.ReactNode) {\n const child = asChild ? onlySlotChild(children) : undefined\n return child ? { render: child } : { children }\n}\n\n/**\n * A part's props as they were under Radix: its native element's own (DOM attributes, React's\n * handler types, a `CSSProperties` style, a string `className`, `ref`) plus `asChild`. Base UI's\n * prop types widen `style` and `className` to functions of the part's state, wrap every handler's\n * event in `BaseUIEvent` and add props of their own; none of that reaches the public surface.\n */\ntype NativePartProps<Tag extends \"button\" | \"div\"> =\n React.ComponentProps<Tag> & {\n /** Renders the single child element as this part, merging its props and behaviour onto it. */\n asChild?: boolean\n }\n\nfunction useMergedRef<T>(a: React.Ref<T> | undefined, b: React.Ref<T>) {\n return React.useCallback(\n (node: T | null) => {\n for (const ref of [a, b]) {\n if (typeof ref === \"function\") ref(node)\n else if (ref) (ref as React.MutableRefObject<T | null>).current = node\n }\n },\n [a, b]\n )\n}\n\n/**\n * What `onOpenChange` receives as its second argument: Base UI's change details, declared in\n * Zenith. Base UI's own type would put its internals in the published declarations, which\n * TypeScript 4 consumers cannot parse. `event` narrows with `reason`, as it does in Base UI.\n */\ntype TooltipOpenChangeDetails = (\n | { reason: \"trigger-hover\"; event: MouseEvent }\n | { reason: \"trigger-focus\"; event: FocusEvent }\n | {\n reason: \"trigger-press\"\n event: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent\n }\n | { reason: \"outside-press\"; event: MouseEvent | PointerEvent | TouchEvent }\n | { reason: \"escape-key\"; event: KeyboardEvent }\n | { reason: \"disabled\"; event: Event }\n | { reason: \"imperative-action\"; event: Event }\n | { reason: \"none\"; event: Event }\n) & {\n /** Keeps the tooltip in its current state. */\n cancel: () => void\n /** Lets the event propagate where the tooltip would otherwise stop it. */\n allowPropagation: () => void\n isCanceled: boolean\n isPropagationAllowed: boolean\n /** The element that caused the change, if any. */\n trigger: Element | undefined\n /** Keeps the tooltip's elements mounted after it closes. */\n preventUnmountOnClose: () => void\n}\n\n/** Base UI's details of the imperative close, reported as the Escape that caused it. */\nfunction escapeDetails(\n details: TooltipOpenChangeDetails,\n event: KeyboardEvent\n): TooltipOpenChangeDetails {\n return {\n reason: \"escape-key\",\n event,\n cancel: () => details.cancel(),\n allowPropagation: () => details.allowPropagation(),\n get isCanceled() {\n return details.isCanceled\n },\n get isPropagationAllowed() {\n return details.isPropagationAllowed\n },\n trigger: details.trigger,\n preventUnmountOnClose: () => details.preventUnmountOnClose(),\n }\n}\n\n// The open tooltips' popups, in the order they opened. Escape goes to the last one, as it went to\n// Radix's topmost layer.\nconst openPopups: HTMLElement[] = []\n\n// Radix's provider-level `disableHoverableContent`, which Base UI only takes per tooltip, and the\n// skip delay a tooltip with its own `delayDuration` carries into its own Base UI provider.\nconst TooltipProviderContext = React.createContext<{\n skipDelayDuration?: number\n disableHoverableContent?: boolean\n}>({})\n\nexport type TooltipProviderProps = {\n children: React.ReactNode\n /** How long the pointer rests on a trigger before its tooltip opens, in ms. Defaults to 0. */\n delayDuration?: number\n /** How soon after one tooltip closes the next one opens without a delay, in ms. Defaults to 300. */\n skipDelayDuration?: number\n /** Closes tooltips as soon as the pointer leaves the trigger, even towards the content. */\n disableHoverableContent?: boolean\n}\n\nexport const TooltipProvider = React.forwardRef<\n HTMLElement,\n TooltipProviderProps\n>(function TooltipProvider(\n {\n children,\n delayDuration = 0,\n skipDelayDuration = 300,\n disableHoverableContent,\n },\n _ref\n) {\n const value = React.useMemo(\n () => ({ skipDelayDuration, disableHoverableContent }),\n [skipDelayDuration, disableHoverableContent]\n )\n\n return (\n <TooltipProviderContext.Provider value={value}>\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delayDuration}\n timeout={skipDelayDuration}\n >\n {children}\n </TooltipPrimitive.Provider>\n </TooltipProviderContext.Provider>\n )\n})\n\n// What the trigger and the content share through the root: the open state, the id of the element\n// that describes the trigger (the content, or its label) for `aria-describedby`, and the close the\n// content's Escape listener calls.\ntype TooltipContextValue = {\n open: boolean\n generatedId: string\n descriptionId: string\n setDescriptionId: (id: string | undefined) => void\n closeOnEscape: (event: KeyboardEvent) => void\n}\n\nconst TooltipContext = React.createContext<TooltipContextValue | null>(null)\n\nexport type TooltipProps = {\n children?: React.ReactNode\n open?: boolean\n defaultOpen?: boolean\n /**\n * Called when the tooltip opens or closes. `eventDetails.reason` says why (`trigger-hover`,\n * `trigger-focus`, `trigger-press`, `escape-key`, `outside-press`) and `eventDetails.cancel()`\n * keeps the tooltip in its current state.\n */\n onOpenChange?: (open: boolean, eventDetails: TooltipOpenChangeDetails) => void\n /** This tooltip's hover delay in ms, overriding the provider's. */\n delayDuration?: number\n /** Closes this tooltip as soon as the pointer leaves the trigger, even towards the content. */\n disableHoverableContent?: boolean\n}\n\nexport const Tooltip = React.forwardRef<HTMLElement, TooltipProps>(\n function Tooltip(\n {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n },\n _ref\n ) {\n const provider = React.useContext(TooltipProviderContext)\n // Base UI is always controlled from here, so the trigger's `aria-describedby` follows the\n // same open state Base UI renders.\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const open = openProp ?? uncontrolledOpen\n const generatedId = React.useId()\n const [descriptionId, setDescriptionId] = React.useState<string>()\n const actionsRef = React.useRef<TooltipPrimitive.Root.Actions>(null)\n // Set while the content's Escape listener closes the tooltip, so `onOpenChange` reports it.\n const escapeRef = React.useRef<KeyboardEvent | null>(null)\n const closeOnEscape = React.useCallback((event: KeyboardEvent) => {\n escapeRef.current = event\n try {\n actionsRef.current?.close()\n } finally {\n escapeRef.current = null\n }\n }, [])\n\n const context = React.useMemo(\n () => ({\n open,\n generatedId,\n descriptionId: descriptionId ?? generatedId,\n setDescriptionId,\n closeOnEscape,\n }),\n [open, generatedId, descriptionId, closeOnEscape]\n )\n\n const root = (\n <TooltipContext.Provider value={context}>\n <TooltipPrimitive.Root\n data-slot=\"tooltip\"\n open={open}\n actionsRef={actionsRef}\n onOpenChange={(nextOpen, baseDetails) => {\n const escape = escapeRef.current\n const eventDetails = escape\n ? escapeDetails(baseDetails, escape)\n : baseDetails\n // An Escape that arrives prevented was taken already: by this tooltip's own listener,\n // or by a layer above it. Base UI dismisses regardless, so one Escape would close two.\n if (\n !escape &&\n eventDetails.reason === \"escape-key\" &&\n eventDetails.event.defaultPrevented\n ) {\n baseDetails.cancel()\n return\n }\n onOpenChange?.(nextOpen, eventDetails)\n if (!baseDetails.isCanceled) setUncontrolledOpen(nextOpen)\n }}\n disableHoverablePopup={\n disableHoverableContent ?? provider.disableHoverableContent\n }\n >\n {children}\n </TooltipPrimitive.Root>\n </TooltipContext.Provider>\n )\n\n // Base UI ignores a trigger's own delay while its provider's is 0, and Zenith's provider\n // defaults to 0, so a tooltip with its own delay gets a provider of its own. It leaves the\n // surrounding provider's skip-delay group, which Radix kept it in.\n return delayDuration === undefined ? (\n root\n ) : (\n <TooltipPrimitive.Provider\n delay={delayDuration}\n timeout={provider.skipDelayDuration ?? 300}\n >\n {root}\n </TooltipPrimitive.Provider>\n )\n }\n)\n\nfunction useTooltipContext(part: string) {\n const context = React.useContext(TooltipContext)\n if (!context) throw new Error(`\\`${part}\\` must be used within \\`Tooltip\\``)\n return context\n}\n\nexport type TooltipTriggerProps = NativePartProps<\"button\">\n\nexport const TooltipTrigger = React.forwardRef<\n HTMLButtonElement,\n TooltipTriggerProps\n>(function TooltipTrigger(\n { asChild = false, children, className, ...props },\n ref\n) {\n const styles = useStyles()\n const tooltip = useTooltipContext(\"TooltipTrigger\")\n\n return (\n <TooltipPrimitive.Trigger\n ref={ref}\n data-slot=\"tooltip-trigger\"\n {...{ [SLOT_ATTR]: \"tooltip-trigger\" }}\n // Base UI links nothing; Radix described the trigger by the content while it was open.\n aria-describedby={tooltip.open ? tooltip.descriptionId : undefined}\n className={mergeClasses(!asChild && styles.nativeTrigger, className)}\n {...props}\n {...slotProps(asChild, children)}\n />\n )\n})\n\n// Lets TooltipContent supply Base UI's required Portal itself when no TooltipPortal wraps it, as\n// Radix rendered content without one.\nconst TooltipPortalPresenceContext = React.createContext(false)\n\nexport type TooltipPortalProps = {\n children?: React.ReactNode\n /** The element the content portals into; `document.body` when omitted or null. */\n container?: Element | DocumentFragment | null\n /** Keeps the content mounted while the tooltip is closed. */\n forceMount?: true\n}\n\nexport const TooltipPortal = React.forwardRef<HTMLElement, TooltipPortalProps>(\n function TooltipPortal({ container, forceMount, ...props }, ref) {\n return (\n <TooltipPortalPresenceContext.Provider value={true}>\n <TooltipPrimitive.Portal\n // Base UI types the ref as its portal div, which any HTMLElement ref can hold.\n ref={ref as React.Ref<HTMLDivElement>}\n data-slot=\"tooltip-portal\"\n {...{ [SLOT_ATTR]: \"tooltip-portal\" }}\n // Radix took any Element or DocumentFragment, null meaning the body. Base UI hands a\n // node straight to createPortal, which takes either, but reads null as \"wait for one\".\n container={(container ?? undefined) as HTMLElement | undefined}\n keepMounted={forceMount}\n {...props}\n />\n </TooltipPortalPresenceContext.Provider>\n )\n }\n)\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\"\n\nexport type TooltipContentProps = NativePartProps<\"div\"> & {\n /** The side of the trigger the content opens on. Flips when it would not fit. Defaults to top. */\n side?: Side\n /** Distance from the trigger in px, on top of the arrow's own height. Defaults to 0. */\n sideOffset?: number\n /** Alignment against the trigger. Defaults to center. */\n align?: \"start\" | \"center\" | \"end\"\n /** Offset from the `start` or `end` alignment in px. Defaults to 0. */\n alignOffset?: number\n /** Distance between the arrow and the content's corners in px. Defaults to 0. */\n arrowPadding?: number\n /** Flips and shifts the content to keep it in view. Defaults to true. */\n avoidCollisions?: boolean\n /** Elements the content must stay inside, besides the viewport. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Distance in px from the boundary edges before the content avoids them. Defaults to 0. */\n collisionPadding?: number | Partial<Record<Side, number>>\n /** `partial` keeps the content attached to its trigger; `always` keeps it in the boundary. */\n sticky?: \"partial\" | \"always\"\n /** Hides the content once its trigger is scrolled out of view. */\n hideWhenDetached?: boolean\n /** Accepted for compatibility; the position follows layout changes either way. */\n updatePositionStrategy?: \"optimized\" | \"always\"\n /**\n * Keeps the content mounted while the tooltip is closed. Inside TooltipPortal, the portal's\n * `forceMount` decides.\n */\n forceMount?: true\n /** Hides the arrow that points at the trigger. */\n hideArrow?: boolean\n variant?: \"default\" | \"destructive\"\n}\n\n// Radix's collision handling: flip to the opposite side or alignment, never to the other axis.\nconst AVOID_COLLISIONS = {\n side: \"flip\",\n align: \"flip\",\n fallbackAxisSide: \"none\",\n} as const\nconst IGNORE_COLLISIONS = {\n side: \"none\",\n align: \"none\",\n fallbackAxisSide: \"none\",\n} as const\n\nexport const TooltipContent = React.forwardRef<\n HTMLDivElement,\n TooltipContentProps\n>(function TooltipContent(\n {\n asChild = false,\n className,\n children,\n hideArrow = false,\n variant = \"default\",\n side = \"top\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy: _updatePositionStrategy,\n forceMount,\n id: idProp,\n ...props\n },\n ref\n) {\n const styles = useStyles()\n const tooltip = useTooltipContext(\"TooltipContent\")\n const hasPortal = React.useContext(TooltipPortalPresenceContext)\n // DENSITY-SPEC.md §4.4 — portal content boundary; see dialog.tsx's identical comment. Tooltip\n // content rarely nests density-consuming children, but the mechanism is applied uniformly across\n // every portal-content component rather than special-cased per component.\n const override = useDensity()\n // SPEC.md §2 rule 3 — the same portal asymmetry, for the appearance pair: re-stamp the\n // nearest explicit AppearanceBoundary's mode+surface, or neither attribute when there is\n // none, leaving live shell inheritance in place.\n const appearance = useAppearanceAttributes()\n const arrowRef = React.useRef<HTMLDivElement>(null)\n const [popup, setPopup] = React.useState<HTMLDivElement | null>(null)\n const popupRef = useMergedRef(ref, setPopup)\n\n // Radix's tooltip was the topmost layer while open, so Escape closed it before anything under it:\n // a Dialog or a Radix menu it sits in, or a control. Base UI's listens later, after a Dialog has\n // taken the key. Taking it on the window in the capture phase, before Radix's layers and Zenith's\n // Base UI roots see it, and preventing it makes them leave it alone.\n const { open, closeOnEscape } = tooltip\n React.useEffect(() => {\n if (!open || !popup) return\n const element = popup\n openPopups.push(element)\n const view = element.ownerDocument.defaultView ?? window\n function onKeyDown(event: KeyboardEvent) {\n if (event.key !== \"Escape\" || event.defaultPrevented || event.isComposing)\n return\n if (openPopups[openPopups.length - 1] !== element) return\n // Only an Escape from under the tooltip, earlier in the document. From inside it (a layer\n // nested in the content, or the content itself) Base UI's own handler runs first; from later\n // in the document, a layer opened over the tooltip takes its own.\n const target = event.target\n if (\n !(target instanceof Node) ||\n element.contains(target) ||\n !(\n element.compareDocumentPosition(target) &\n Node.DOCUMENT_POSITION_PRECEDING\n )\n )\n return\n event.preventDefault()\n closeOnEscape(event)\n }\n view.addEventListener(\"keydown\", onKeyDown, true)\n return () => {\n view.removeEventListener(\"keydown\", onKeyDown, true)\n openPopups.splice(openPopups.indexOf(element), 1)\n }\n }, [open, popup, closeOnEscape])\n\n // The trigger's `aria-describedby` points here, so a caller's own id has to reach it. Radix\n // described the trigger by `aria-label` when one was given; a hidden node carries it, because\n // not every accessibility engine reads the `aria-label` of a describing element.\n const popupId = idProp ?? tooltip.generatedId\n const ariaLabel = props[\"aria-label\"]\n const labelId = `${popupId}-label`\n const descriptionId = ariaLabel ? labelId : popupId\n const { setDescriptionId } = tooltip\n React.useEffect(() => {\n setDescriptionId(descriptionId)\n return () => setDescriptionId(undefined)\n }, [descriptionId, setDescriptionId])\n\n const label = ariaLabel && (\n <span id={labelId} hidden>\n {ariaLabel}\n </span>\n )\n\n const arrow = !hideArrow && (\n <TooltipPrimitive.Arrow\n ref={arrowRef}\n data-slot=\"tooltip-arrow\"\n {...{ [SLOT_ATTR]: \"tooltip-arrow\" }}\n data-variant={variant}\n className={styles.arrow}\n />\n )\n const child = asChild ? onlySlotChild(children) : undefined\n // The child keeps its own children, so the label and the arrow join them there.\n const content = child\n ? {\n render: React.cloneElement(\n child,\n undefined,\n (child.props as { children?: React.ReactNode }).children,\n label,\n arrow\n ),\n }\n : {\n children: (\n <>\n {children}\n {label}\n {arrow}\n </>\n ),\n }\n\n const positioner = (\n <TooltipPrimitive.Positioner\n className={mergeClasses(\n styles.positioner,\n hideWhenDetached && styles.hideWhenDetached\n )}\n positionMethod=\"fixed\"\n side={side}\n // Radix moved the content away by the arrow's own height on top of `sideOffset`.\n sideOffset={() => sideOffset + (arrowRef.current?.offsetHeight ?? 0)}\n align={align}\n // Radix applied the offset to `start` and `end` only; Base UI also shifts centred content.\n alignOffset={align === \"center\" ? 0 : alignOffset}\n arrowPadding={arrowPadding}\n // Radix's default is the viewport alone, not every clipping ancestor.\n collisionBoundary={\n Array.isArray(collisionBoundary)\n ? collisionBoundary.filter((boundary) => boundary !== null)\n : collisionBoundary === null\n ? []\n : collisionBoundary\n }\n collisionPadding={collisionPadding}\n sticky={sticky === \"always\"}\n collisionAvoidance={\n avoidCollisions ? AVOID_COLLISIONS : IGNORE_COLLISIONS\n }\n >\n <TooltipPrimitive.Popup\n ref={popupRef}\n id={popupId}\n // Base UI renders no role; Radix exposed the content as role=\"tooltip\".\n role=\"tooltip\"\n data-slot=\"tooltip-content\"\n {...{ [SLOT_ATTR]: \"tooltip-content\" }}\n {...(override !== undefined ? { \"data-density\": override } : {})}\n {...appearance}\n data-variant={variant}\n className={mergeClasses(styles.popup, className)}\n {...props}\n {...content}\n />\n </TooltipPrimitive.Positioner>\n )\n\n // Base UI's Positioner requires a Portal ancestor; Radix rendered inline without one.\n return hasPortal ? (\n positioner\n ) : (\n <TooltipPrimitive.Portal keepMounted={forceMount}>\n {positioner}\n </TooltipPrimitive.Portal>\n )\n})\n"],"names":["useStyles","makeZenithStyles","nativeControl","OVERLAY_Z_INDEX","boxModel","shorthands","tokens.radiusLg","tokens.spacingElement2","tokens.textXs","tokens.gray12","tokens.gray1","tokens.errorA12","tokens.error1","tokens.error12","onlySlotChild","children","elements","React","slotProps","asChild","child","useMergedRef","a","b","node","ref","escapeDetails","details","event","openPopups","TooltipProviderContext","TooltipProvider","delayDuration","skipDelayDuration","disableHoverableContent","_ref","value","jsx","TooltipPrimitive","TooltipContext","Tooltip","openProp","defaultOpen","onOpenChange","provider","uncontrolledOpen","setUncontrolledOpen","open","generatedId","descriptionId","setDescriptionId","actionsRef","escapeRef","closeOnEscape","_a","context","root","nextOpen","baseDetails","escape","eventDetails","useTooltipContext","part","TooltipTrigger","className","props","styles","tooltip","SLOT_ATTR","mergeClasses","TooltipPortalPresenceContext","TooltipPortal","container","forceMount","AVOID_COLLISIONS","IGNORE_COLLISIONS","TooltipContent","hideArrow","variant","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","_updatePositionStrategy","idProp","hasPortal","override","useDensity","appearance","useAppearanceAttributes","arrowRef","popup","setPopup","popupRef","element","view","onKeyDown","target","popupId","ariaLabel","labelId","label","arrow","content","jsxs","Fragment","positioner","boundary"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAYC,GAAiB;AAAA;AAAA;AAAA,EAGjC,eAAe;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,EAEL,YAAY;AAAA,IACV,QAAQC;AAAA,EAAA;AAAA;AAAA,EAGV,kBAAkB;AAAA,IAChB,yBAAyB;AAAA,MACvB,YAAY;AAAA,MACZ,eAAe;AAAA,IAAA;AAAA,EACjB;AAAA;AAAA;AAAA,EAIF,OAAO;AAAA,IACL,GAAGC;AAAA,IACH,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,GAAGC,EAAW,aAAaC,EAAe;AAAA,IAC1C,GAAGD,EAAW,QAAQE,EAAsB;AAAA;AAAA,IAE5C,WAAW;AAAA,IACX,UAAUC;AAAAA;AAAAA,IAEV,YAAY;AAAA,IACZ,QAAQL;AAAA,IACR,6BAA6B;AAAA,MAC3B,iBAAiBM;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,IAEhB,iCAAiC;AAAA,MAC/B,iBAAiBC;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,EAChB;AAAA;AAAA;AAAA,EAIF,OAAO;AAAA,IACL,GAAGR;AAAA,IACH,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAGC,EAAW,aAAa,KAAK;AAAA,IAChC,sBAAsB;AAAA,MACpB,KAAK;AAAA,MACL,WAAW;AAAA,IAAA;AAAA,IAEb,yBAAyB;AAAA,MACvB,KAAK;AAAA,MACL,WAAW;AAAA,IAAA;AAAA,IA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BAAgB;AAAA;AAAA,MAClE,OAAA2B;AAAA,MAEA,aAAaA,MAAU,WAAW,IAAIC;AAAA,MACtC,cAAAC;AAAA,MAEA,mBACE,MAAM,QAAQE,CAAiB,IAC3BA,EAAkB,OAAO,CAAC4B,MAAaA,MAAa,IAAI,IACxD5B,MAAsB,OACpB,CAAA,IACAA;AAAA,MAER,kBAAAC;AAAA,MACA,QAAQC,MAAW;AAAA,MACnB,oBACEH,IAAkBV,KAAmBC;AAAA,MAGvC,UAAA,gBAAAtC;AAAA,QAACC,EAAiB;AAAA,QAAjB;AAAA,UACC,KAAK6D;AAAA,UACL,IAAIK;AAAA,UAEJ,MAAK;AAAA,UACL,aAAU;AAAA,UACJ,CAACpC,CAAS,GAAG;AAAA,UAClB,GAAIwB,MAAa,SAAY,EAAE,gBAAgBA,EAAA,IAAa,CAAA;AAAA,UAC5D,GAAGE;AAAA,UACJ,gBAAchB;AAAA,UACd,WAAWT,EAAaH,EAAO,OAAOF,CAAS;AAAA,UAC9C,GAAGC;AAAA,UACH,GAAG4C;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAKJ,SAAOlB,IACLqB,IAEA,gBAAA3E,EAACC,EAAiB,QAAjB,EAAwB,aAAamC,GACnC,UAAAuC,GACH;AAEJ,CAAC;"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { useAppearanceAttributes } from \"../appearance-boundary/appearance-boundary\"\nimport { useDensity } from \"../density-provider/density-provider\"\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel, nativeControl } from \"../../styles/host-reset\"\nimport { OVERLAY_Z_INDEX } from \"../../styles/overlay-layer\"\nimport * as tokens from \"../../tokens\"\n\nconst useStyles = makeZenithStyles({\n // For the bare native `<button>` a Trigger/Close renders. Not applied under `asChild`, where the\n // child owns its own element and two atom sets would race for the same properties.\n nativeTrigger: {\n ...nativeControl,\n },\n positioner: {\n zIndex: OVERLAY_Z_INDEX,\n },\n // Radix's `hideWhenDetached`: hide the content once its trigger is scrolled out of view.\n hideWhenDetached: {\n \"&[data-anchor-hidden]\": {\n visibility: \"hidden\",\n pointerEvents: \"none\",\n },\n },\n // No enter or exit motion: the Radix version keyed its keyframes on `data-state='open'`, a value\n // Radix's tooltip never sets (it sets `delayed-open` or `instant-open`), so it never animated.\n popup: {\n ...boxModel,\n width: \"fit-content\",\n // About 40 characters a line: long hints wrap instead of stretching across the page (ER-5571).\n maxWidth: \"40ch\",\n transformOrigin: \"var(--transform-origin)\",\n ...shorthands.borderRadius(tokens.radiusLg),\n ...shorthands.padding(tokens.spacingElement2),\n // v1 shadow-md; elevation has no token in this package.\n boxShadow: \"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a\",\n fontSize: tokens.textXs,\n // Wrapped lines need room; v1's leading-none suited one-line tooltips only. No line-height token exists.\n lineHeight: \"1.35\",\n zIndex: OVERLAY_Z_INDEX,\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n color: tokens.gray1,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.errorA12,\n color: tokens.error1,\n },\n },\n // Base UI places the arrow on the cross axis only; the anchored edge is set per side here. The\n // diamond's centre sits 2px inside the content's edge, where Radix's arrow wrapper put it.\n arrow: {\n ...boxModel,\n zIndex: 50,\n width: \"0.625rem\",\n height: \"0.625rem\",\n ...shorthands.borderRadius(\"2px\"),\n \"&[data-side='top']\": {\n top: \"100%\",\n transform: \"translateY(calc(-50% - 2px)) rotate(45deg)\",\n },\n \"&[data-side='bottom']\": {\n top: 0,\n transform: \"translateY(calc(-50% + 2px)) rotate(45deg)\",\n },\n \"&[data-side='left']\": {\n left: \"100%\",\n transform: \"translateX(calc(-50% - 2px)) rotate(45deg)\",\n },\n \"&[data-side='right']\": {\n left: 0,\n transform: \"translateX(calc(-50% + 2px)) rotate(45deg)\",\n },\n // Radix hid the arrow when it could not point at the trigger's centre.\n \"&[data-uncentered]\": {\n visibility: \"hidden\",\n },\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.error12,\n },\n },\n})\n\n// A single child can arrive wrapped in a one-element array depending on the JSX runtime (MDX call\n// sites do this). Radix's Slot normalised that, so the `asChild` shim has to as well.\nfunction onlySlotChild(children: React.ReactNode) {\n const elements = React.Children.toArray(children).filter(React.isValidElement)\n return elements.length === 1 ? elements[0] : undefined\n}\n\n/**\n * Radix's `asChild` over Base UI's `render`: the single child element becomes the part and keeps\n * its own children, since Base UI lets the rendered element's props win the merge.\n */\nfunction slotProps(asChild: boolean, children: React.ReactNode) {\n const child = asChild ? onlySlotChild(children) : undefined\n return child ? { render: child } : { children }\n}\n\n/**\n * A part's props as they were under Radix: its native element's own (DOM attributes, React's\n * handler types, a `CSSProperties` style, a string `className`, `ref`) plus `asChild`. Base UI's\n * prop types widen `style` and `className` to functions of the part's state, wrap every handler's\n * event in `BaseUIEvent` and add props of their own; none of that reaches the public surface.\n */\ntype NativePartProps<Tag extends \"button\" | \"div\"> =\n React.ComponentProps<Tag> & {\n /** Renders the single child element as this part, merging its props and behaviour onto it. */\n asChild?: boolean\n }\n\nfunction useMergedRef<T>(a: React.Ref<T> | undefined, b: React.Ref<T>) {\n return React.useCallback(\n (node: T | null) => {\n for (const ref of [a, b]) {\n if (typeof ref === \"function\") ref(node)\n else if (ref) (ref as React.MutableRefObject<T | null>).current = node\n }\n },\n [a, b]\n )\n}\n\n/**\n * What `onOpenChange` receives as its second argument: Base UI's change details, declared in\n * Zenith. Base UI's own type would put its internals in the published declarations, which\n * TypeScript 4 consumers cannot parse. `event` narrows with `reason`, as it does in Base UI.\n */\ntype TooltipOpenChangeDetails = (\n | { reason: \"trigger-hover\"; event: MouseEvent }\n | { reason: \"trigger-focus\"; event: FocusEvent }\n | {\n reason: \"trigger-press\"\n event: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent\n }\n | { reason: \"outside-press\"; event: MouseEvent | PointerEvent | TouchEvent }\n | { reason: \"escape-key\"; event: KeyboardEvent }\n | { reason: \"disabled\"; event: Event }\n | { reason: \"imperative-action\"; event: Event }\n | { reason: \"none\"; event: Event }\n) & {\n /** Keeps the tooltip in its current state. */\n cancel: () => void\n /** Lets the event propagate where the tooltip would otherwise stop it. */\n allowPropagation: () => void\n isCanceled: boolean\n isPropagationAllowed: boolean\n /** The element that caused the change, if any. */\n trigger: Element | undefined\n /** Keeps the tooltip's elements mounted after it closes. */\n preventUnmountOnClose: () => void\n}\n\n/** Base UI's details of the imperative close, reported as the Escape that caused it. */\nfunction escapeDetails(\n details: TooltipOpenChangeDetails,\n event: KeyboardEvent\n): TooltipOpenChangeDetails {\n return {\n reason: \"escape-key\",\n event,\n cancel: () => details.cancel(),\n allowPropagation: () => details.allowPropagation(),\n get isCanceled() {\n return details.isCanceled\n },\n get isPropagationAllowed() {\n return details.isPropagationAllowed\n },\n trigger: details.trigger,\n preventUnmountOnClose: () => details.preventUnmountOnClose(),\n }\n}\n\n// The open tooltips' popups, in the order they opened. Escape goes to the last one, as it went to\n// Radix's topmost layer.\nconst openPopups: HTMLElement[] = []\n\n// Radix's provider-level `disableHoverableContent`, which Base UI only takes per tooltip, and the\n// skip delay a tooltip with its own `delayDuration` carries into its own Base UI provider.\nconst TooltipProviderContext = React.createContext<{\n skipDelayDuration?: number\n disableHoverableContent?: boolean\n}>({})\n\nexport type TooltipProviderProps = {\n children: React.ReactNode\n /** How long the pointer rests on a trigger before its tooltip opens, in ms. Defaults to 0. */\n delayDuration?: number\n /** How soon after one tooltip closes the next one opens without a delay, in ms. Defaults to 300. */\n skipDelayDuration?: number\n /** Closes tooltips as soon as the pointer leaves the trigger, even towards the content. */\n disableHoverableContent?: boolean\n}\n\nexport const TooltipProvider = React.forwardRef<\n HTMLElement,\n TooltipProviderProps\n>(function TooltipProvider(\n {\n children,\n delayDuration = 0,\n skipDelayDuration = 300,\n disableHoverableContent,\n },\n _ref\n) {\n const value = React.useMemo(\n () => ({ skipDelayDuration, disableHoverableContent }),\n [skipDelayDuration, disableHoverableContent]\n )\n\n return (\n <TooltipProviderContext.Provider value={value}>\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delayDuration}\n timeout={skipDelayDuration}\n >\n {children}\n </TooltipPrimitive.Provider>\n </TooltipProviderContext.Provider>\n )\n})\n\n// What the trigger and the content share through the root: the open state, the id of the element\n// that describes the trigger (the content, or its label) for `aria-describedby`, and the close the\n// content's Escape listener calls.\ntype TooltipContextValue = {\n open: boolean\n generatedId: string\n descriptionId: string\n setDescriptionId: (id: string | undefined) => void\n closeOnEscape: (event: KeyboardEvent) => void\n}\n\nconst TooltipContext = React.createContext<TooltipContextValue | null>(null)\n\nexport type TooltipProps = {\n children?: React.ReactNode\n open?: boolean\n defaultOpen?: boolean\n /**\n * Called when the tooltip opens or closes. `eventDetails.reason` says why (`trigger-hover`,\n * `trigger-focus`, `trigger-press`, `escape-key`, `outside-press`) and `eventDetails.cancel()`\n * keeps the tooltip in its current state.\n */\n onOpenChange?: (open: boolean, eventDetails: TooltipOpenChangeDetails) => void\n /** This tooltip's hover delay in ms, overriding the provider's. */\n delayDuration?: number\n /** Closes this tooltip as soon as the pointer leaves the trigger, even towards the content. */\n disableHoverableContent?: boolean\n}\n\nexport const Tooltip = React.forwardRef<HTMLElement, TooltipProps>(\n function Tooltip(\n {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n },\n _ref\n ) {\n const provider = React.useContext(TooltipProviderContext)\n // Base UI is always controlled from here, so the trigger's `aria-describedby` follows the\n // same open state Base UI renders.\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const open = openProp ?? uncontrolledOpen\n const generatedId = React.useId()\n const [descriptionId, setDescriptionId] = React.useState<string>()\n const actionsRef = React.useRef<TooltipPrimitive.Root.Actions>(null)\n // Set while the content's Escape listener closes the tooltip, so `onOpenChange` reports it.\n const escapeRef = React.useRef<KeyboardEvent | null>(null)\n const closeOnEscape = React.useCallback((event: KeyboardEvent) => {\n escapeRef.current = event\n try {\n actionsRef.current?.close()\n } finally {\n escapeRef.current = null\n }\n }, [])\n\n const context = React.useMemo(\n () => ({\n open,\n generatedId,\n descriptionId: descriptionId ?? generatedId,\n setDescriptionId,\n closeOnEscape,\n }),\n [open, generatedId, descriptionId, closeOnEscape]\n )\n\n const root = (\n <TooltipContext.Provider value={context}>\n <TooltipPrimitive.Root\n data-slot=\"tooltip\"\n open={open}\n actionsRef={actionsRef}\n onOpenChange={(nextOpen, baseDetails) => {\n const escape = escapeRef.current\n const eventDetails = escape\n ? escapeDetails(baseDetails, escape)\n : baseDetails\n // An Escape that arrives prevented was taken already: by this tooltip's own listener,\n // or by a layer above it. Base UI dismisses regardless, so one Escape would close two.\n if (\n !escape &&\n eventDetails.reason === \"escape-key\" &&\n eventDetails.event.defaultPrevented\n ) {\n baseDetails.cancel()\n return\n }\n onOpenChange?.(nextOpen, eventDetails)\n if (!baseDetails.isCanceled) setUncontrolledOpen(nextOpen)\n }}\n disableHoverablePopup={\n disableHoverableContent ?? provider.disableHoverableContent\n }\n >\n {children}\n </TooltipPrimitive.Root>\n </TooltipContext.Provider>\n )\n\n // Base UI ignores a trigger's own delay while its provider's is 0, and Zenith's provider\n // defaults to 0, so a tooltip with its own delay gets a provider of its own. It leaves the\n // surrounding provider's skip-delay group, which Radix kept it in.\n return delayDuration === undefined ? (\n root\n ) : (\n <TooltipPrimitive.Provider\n delay={delayDuration}\n timeout={provider.skipDelayDuration ?? 300}\n >\n {root}\n </TooltipPrimitive.Provider>\n )\n }\n)\n\nfunction useTooltipContext(part: string) {\n const context = React.useContext(TooltipContext)\n if (!context) throw new Error(`\\`${part}\\` must be used within \\`Tooltip\\``)\n return context\n}\n\nexport type TooltipTriggerProps = NativePartProps<\"button\">\n\nexport const TooltipTrigger = React.forwardRef<\n HTMLButtonElement,\n TooltipTriggerProps\n>(function TooltipTrigger(\n { asChild = false, children, className, ...props },\n ref\n) {\n const styles = useStyles()\n const tooltip = useTooltipContext(\"TooltipTrigger\")\n\n return (\n <TooltipPrimitive.Trigger\n ref={ref}\n data-slot=\"tooltip-trigger\"\n {...{ [SLOT_ATTR]: \"tooltip-trigger\" }}\n // Base UI links nothing; Radix described the trigger by the content while it was open.\n aria-describedby={tooltip.open ? tooltip.descriptionId : undefined}\n className={mergeClasses(!asChild && styles.nativeTrigger, className)}\n {...props}\n {...slotProps(asChild, children)}\n />\n )\n})\n\n// Lets TooltipContent supply Base UI's required Portal itself when no TooltipPortal wraps it, as\n// Radix rendered content without one.\nconst TooltipPortalPresenceContext = React.createContext(false)\n\nexport type TooltipPortalProps = {\n children?: React.ReactNode\n /** The element the content portals into; `document.body` when omitted or null. */\n container?: Element | DocumentFragment | null\n /** Keeps the content mounted while the tooltip is closed. */\n forceMount?: true\n}\n\nexport const TooltipPortal = React.forwardRef<HTMLElement, TooltipPortalProps>(\n function TooltipPortal({ container, forceMount, ...props }, ref) {\n return (\n <TooltipPortalPresenceContext.Provider value={true}>\n <TooltipPrimitive.Portal\n // Base UI types the ref as its portal div, which any HTMLElement ref can hold.\n ref={ref as React.Ref<HTMLDivElement>}\n data-slot=\"tooltip-portal\"\n {...{ [SLOT_ATTR]: \"tooltip-portal\" }}\n // Radix took any Element or DocumentFragment, null meaning the body. Base UI hands a\n // node straight to createPortal, which takes either, but reads null as \"wait for one\".\n container={(container ?? undefined) as HTMLElement | undefined}\n keepMounted={forceMount}\n {...props}\n />\n </TooltipPortalPresenceContext.Provider>\n )\n }\n)\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\"\n\nexport type TooltipContentProps = NativePartProps<\"div\"> & {\n /** The side of the trigger the content opens on. Flips when it would not fit. Defaults to top. */\n side?: Side\n /** Distance from the trigger in px, on top of the arrow's own height. Defaults to 0. */\n sideOffset?: number\n /** Alignment against the trigger. Defaults to center. */\n align?: \"start\" | \"center\" | \"end\"\n /** Offset from the `start` or `end` alignment in px. Defaults to 0. */\n alignOffset?: number\n /** Distance between the arrow and the content's corners in px. Defaults to 0. */\n arrowPadding?: number\n /** Flips and shifts the content to keep it in view. Defaults to true. */\n avoidCollisions?: boolean\n /** Elements the content must stay inside, besides the viewport. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Distance in px from the boundary edges before the content avoids them. Defaults to 0. */\n collisionPadding?: number | Partial<Record<Side, number>>\n /** `partial` keeps the content attached to its trigger; `always` keeps it in the boundary. */\n sticky?: \"partial\" | \"always\"\n /** Hides the content once its trigger is scrolled out of view. */\n hideWhenDetached?: boolean\n /** Accepted for compatibility; the position follows layout changes either way. */\n updatePositionStrategy?: \"optimized\" | \"always\"\n /**\n * Keeps the content mounted while the tooltip is closed. Inside TooltipPortal, the portal's\n * `forceMount` decides.\n */\n forceMount?: true\n /** Hides the arrow that points at the trigger. */\n hideArrow?: boolean\n variant?: \"default\" | \"destructive\"\n}\n\n// Radix's collision handling: flip to the opposite side or alignment, never to the other axis.\nconst AVOID_COLLISIONS = {\n side: \"flip\",\n align: \"flip\",\n fallbackAxisSide: \"none\",\n} as const\nconst IGNORE_COLLISIONS = {\n side: \"none\",\n align: \"none\",\n fallbackAxisSide: \"none\",\n} as const\n\nexport const TooltipContent = React.forwardRef<\n HTMLDivElement,\n TooltipContentProps\n>(function TooltipContent(\n {\n asChild = false,\n className,\n children,\n hideArrow = false,\n variant = \"default\",\n side = \"top\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy: _updatePositionStrategy,\n forceMount,\n id: idProp,\n ...props\n },\n ref\n) {\n const styles = useStyles()\n const tooltip = useTooltipContext(\"TooltipContent\")\n const hasPortal = React.useContext(TooltipPortalPresenceContext)\n // DENSITY-SPEC.md §4.4 — portal content boundary; see dialog.tsx's identical comment. Tooltip\n // content rarely nests density-consuming children, but the mechanism is applied uniformly across\n // every portal-content component rather than special-cased per component.\n const override = useDensity()\n // SPEC.md §2 rule 3 — the same portal asymmetry, for the appearance pair: re-stamp the\n // nearest explicit AppearanceBoundary's mode+surface, or neither attribute when there is\n // none, leaving live shell inheritance in place.\n const appearance = useAppearanceAttributes()\n const arrowRef = React.useRef<HTMLDivElement>(null)\n const [popup, setPopup] = React.useState<HTMLDivElement | null>(null)\n const popupRef = useMergedRef(ref, setPopup)\n\n // Radix's tooltip was the topmost layer while open, so Escape closed it before anything under it:\n // a Dialog or a Radix menu it sits in, or a control. Base UI's listens later, after a Dialog has\n // taken the key. Taking it on the window in the capture phase, before Radix's layers and Zenith's\n // Base UI roots see it, and preventing it makes them leave it alone.\n const { open, closeOnEscape } = tooltip\n React.useEffect(() => {\n if (!open || !popup) return\n const element = popup\n openPopups.push(element)\n const view = element.ownerDocument.defaultView ?? window\n function onKeyDown(event: KeyboardEvent) {\n if (event.key !== \"Escape\" || event.defaultPrevented || event.isComposing)\n return\n if (openPopups[openPopups.length - 1] !== element) return\n // Only an Escape from under the tooltip, earlier in the document. From inside it (a layer\n // nested in the content, or the content itself) Base UI's own handler runs first; from later\n // in the document, a layer opened over the tooltip takes its own.\n const target = event.target\n if (\n !(target instanceof Node) ||\n element.contains(target) ||\n !(\n element.compareDocumentPosition(target) &\n Node.DOCUMENT_POSITION_PRECEDING\n )\n )\n return\n event.preventDefault()\n closeOnEscape(event)\n }\n view.addEventListener(\"keydown\", onKeyDown, true)\n return () => {\n view.removeEventListener(\"keydown\", onKeyDown, true)\n openPopups.splice(openPopups.indexOf(element), 1)\n }\n }, [open, popup, closeOnEscape])\n\n // The trigger's `aria-describedby` points here, so a caller's own id has to reach it. Radix\n // described the trigger by `aria-label` when one was given; a hidden node carries it, because\n // not every accessibility engine reads the `aria-label` of a describing element.\n const popupId = idProp ?? tooltip.generatedId\n const ariaLabel = props[\"aria-label\"]\n const labelId = `${popupId}-label`\n const descriptionId = ariaLabel ? labelId : popupId\n const { setDescriptionId } = tooltip\n React.useEffect(() => {\n setDescriptionId(descriptionId)\n return () => setDescriptionId(undefined)\n }, [descriptionId, setDescriptionId])\n\n const label = ariaLabel && (\n <span id={labelId} hidden>\n {ariaLabel}\n </span>\n )\n\n const arrow = !hideArrow && (\n <TooltipPrimitive.Arrow\n ref={arrowRef}\n data-slot=\"tooltip-arrow\"\n {...{ [SLOT_ATTR]: \"tooltip-arrow\" }}\n data-variant={variant}\n className={styles.arrow}\n />\n )\n const child = asChild ? onlySlotChild(children) : undefined\n // The child keeps its own children, so the label and the arrow join them there.\n const content = child\n ? {\n render: React.cloneElement(\n child,\n undefined,\n (child.props as { children?: React.ReactNode }).children,\n label,\n arrow\n ),\n }\n : {\n children: (\n <>\n {children}\n {label}\n {arrow}\n </>\n ),\n }\n\n const positioner = (\n <TooltipPrimitive.Positioner\n className={mergeClasses(\n styles.positioner,\n hideWhenDetached && styles.hideWhenDetached\n )}\n positionMethod=\"fixed\"\n side={side}\n // Radix moved the content away by the arrow's own height on top of `sideOffset`.\n sideOffset={() => sideOffset + (arrowRef.current?.offsetHeight ?? 0)}\n align={align}\n // Radix applied the offset to `start` and `end` only; Base UI also shifts centred content.\n alignOffset={align === \"center\" ? 0 : alignOffset}\n arrowPadding={arrowPadding}\n // Radix's default is the viewport alone, not every clipping ancestor.\n collisionBoundary={\n Array.isArray(collisionBoundary)\n ? collisionBoundary.filter((boundary) => boundary !== null)\n : collisionBoundary === null\n ? []\n : collisionBoundary\n }\n collisionPadding={collisionPadding}\n sticky={sticky === \"always\"}\n collisionAvoidance={\n avoidCollisions ? AVOID_COLLISIONS : IGNORE_COLLISIONS\n }\n >\n <TooltipPrimitive.Popup\n ref={popupRef}\n id={popupId}\n // Base UI renders no role; Radix exposed the content as role=\"tooltip\".\n role=\"tooltip\"\n data-slot=\"tooltip-content\"\n {...{ [SLOT_ATTR]: \"tooltip-content\" }}\n {...(override !== undefined ? { \"data-density\": override } : {})}\n {...appearance}\n data-variant={variant}\n className={mergeClasses(styles.popup, className)}\n {...props}\n {...content}\n />\n </TooltipPrimitive.Positioner>\n )\n\n // Base UI's Positioner requires a Portal ancestor; Radix rendered inline without one.\n return hasPortal ? (\n positioner\n ) : (\n <TooltipPrimitive.Portal keepMounted={forceMount}>\n {positioner}\n </TooltipPrimitive.Portal>\n )\n})\n"],"names":["useStyles","makeZenithStyles","nativeControl","OVERLAY_Z_INDEX","boxModel","shorthands","tokens.radiusLg","tokens.spacingElement2","tokens.textXs","tokens.gray12","tokens.gray1","tokens.errorA12","tokens.error1","tokens.error12","onlySlotChild","children","elements","React","slotProps","asChild","child","useMergedRef","a","b","node","ref","escapeDetails","details","event","openPopups","TooltipProviderContext","TooltipProvider","delayDuration","skipDelayDuration","disableHoverableContent","_ref","value","jsx","TooltipPrimitive","TooltipContext","Tooltip","openProp","defaultOpen","onOpenChange","provider","uncontrolledOpen","setUncontrolledOpen","open","generatedId","descriptionId","setDescriptionId","actionsRef","escapeRef","closeOnEscape","_a","context","root","nextOpen","baseDetails","escape","eventDetails","useTooltipContext","part","TooltipTrigger","className","props","styles","tooltip","SLOT_ATTR","mergeClasses","TooltipPortalPresenceContext","TooltipPortal","container","forceMount","AVOID_COLLISIONS","IGNORE_COLLISIONS","TooltipContent","hideArrow","variant","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","_updatePositionStrategy","idProp","hasPortal","override","useDensity","appearance","useAppearanceAttributes","arrowRef","popup","setPopup","popupRef","element","view","onKeyDown","target","popupId","ariaLabel","labelId","label","arrow","content","jsxs","Fragment","positioner","boundary"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAYC,GAAiB;AAAA;AAAA;AAAA,EAGjC,eAAe;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,EAEL,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AAK6D;AAAA,UACL,IAAIK;AAAA,UAEJ,MAAK;AAAA,UACL,aAAU;AAAA,UACJ,CAACpC,CAAS,GAAG;AAAA,UAClB,GAAIwB,MAAa,SAAY,EAAE,gBAAgBA,EAAA,IAAa,CAAA;AAAA,UAC5D,GAAGE;AAAA,UACJ,gBAAchB;AAAA,UACd,WAAWT,EAAaH,EAAO,OAAOF,CAAS;AAAA,UAC9C,GAAGC;AAAA,UACH,GAAG4C;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAKJ,SAAOlB,IACLqB,IAEA,gBAAA3E,EAACC,EAAiB,QAAjB,EAAwB,aAAamC,GACnC,UAAAuC,GACH;AAEJ,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/zenith-react",
3
- "version": "0.3.0-next.2",
3
+ "version": "0.3.0-next.4",
4
4
  "description": "Zenith React components, styled with Griffel and designed for isolated micro-frontend delivery",
5
5
  "type": "module",
6
6
  "repository": {
@@ -150,18 +150,24 @@
150
150
  "zenith": {
151
151
  "next": {
152
152
  "mainSha": "139e14faaec9474269303ecf8f473413c4659fcd",
153
- "pipelineId": 3008178810,
153
+ "pipelineId": 3008274351,
154
154
  "included": [
155
155
  {
156
156
  "iid": 151,
157
157
  "headSha": "f25e7df7c7f2f3b00ed4fd7426dd84ecf0b6176a",
158
158
  "url": "https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/151",
159
159
  "order": 1
160
+ },
161
+ {
162
+ "iid": 158,
163
+ "headSha": "a72f0dbe76969fa6f4ec24b143394f33a9a91bf0",
164
+ "url": "https://gitlab.com/e-pilot/product/frontend/zenith/-/merge_requests/158",
165
+ "order": 2
160
166
  }
161
167
  ],
162
168
  "leftOut": [],
163
169
  "versions": {
164
- "react": "0.3.0-next.2",
170
+ "react": "0.3.0-next.4",
165
171
  "runtime": "0.3.0-next.1"
166
172
  },
167
173
  "runtime": {