@photon-ai/pho-ui 4.16.1 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/chunks/{bar-chart-By5gWQqP.js → bar-chart-B-c6dujU.js} +2 -2
  2. package/dist/chunks/{bar-chart-By5gWQqP.js.map → bar-chart-B-c6dujU.js.map} +1 -1
  3. package/dist/chunks/{basic-page-C0C8NDjG.js → basic-page-DS1YIheB.js} +4 -4
  4. package/dist/chunks/{basic-page-C0C8NDjG.js.map → basic-page-DS1YIheB.js.map} +1 -1
  5. package/dist/chunks/{chart-Dx3rjeFn.js → chart-PPuzbeXN.js} +478 -438
  6. package/dist/chunks/chart-PPuzbeXN.js.map +1 -0
  7. package/dist/chunks/{code-block-CbcE994O.js → code-block-DMiZkEWS.js} +2 -2
  8. package/dist/chunks/{code-block-CbcE994O.js.map → code-block-DMiZkEWS.js.map} +1 -1
  9. package/dist/chunks/copy-button-CHYc_cvM.js +76 -0
  10. package/dist/chunks/copy-button-CHYc_cvM.js.map +1 -0
  11. package/dist/chunks/description-list-SIlI9ZHs.js +60 -0
  12. package/dist/chunks/description-list-SIlI9ZHs.js.map +1 -0
  13. package/dist/chunks/{filter-bar-yEcG2pBm.js → filter-bar-BCiaO1gO.js} +2 -2
  14. package/dist/chunks/{filter-bar-yEcG2pBm.js.map → filter-bar-BCiaO1gO.js.map} +1 -1
  15. package/dist/chunks/{line-chart-CAe09fqr.js → line-chart-CNvnFb-M.js} +2 -2
  16. package/dist/chunks/{line-chart-CAe09fqr.js.map → line-chart-CNvnFb-M.js.map} +1 -1
  17. package/dist/chunks/menu-CoMrYnd1.js +264 -0
  18. package/dist/chunks/menu-CoMrYnd1.js.map +1 -0
  19. package/dist/components/bar-chart.js +1 -1
  20. package/dist/components/chart.js +1 -1
  21. package/dist/components/code-block.js +1 -1
  22. package/dist/components/context-menu.js +38 -37
  23. package/dist/components/context-menu.js.map +1 -1
  24. package/dist/components/copy-button.js +1 -1
  25. package/dist/components/description-list.js +1 -1
  26. package/dist/components/filter-bar.js +1 -1
  27. package/dist/components/line-chart.js +1 -1
  28. package/dist/components/menu.js +5 -4
  29. package/dist/components/scope.js +88 -84
  30. package/dist/components/scope.js.map +1 -1
  31. package/dist/index.js +8 -8
  32. package/dist/sections/basic-page.js +1 -1
  33. package/dist/src/components/copy-button/copy-button.d.ts +15 -4
  34. package/dist/src/components/description-list/description-list.d.ts +3 -2
  35. package/dist/src/components/menu/index.d.ts +1 -1
  36. package/dist/src/components/menu/menu-pending.d.ts +26 -0
  37. package/package.json +1 -1
  38. package/dist/chunks/chart-Dx3rjeFn.js.map +0 -1
  39. package/dist/chunks/copy-button-D8XyP0oR.js +0 -56
  40. package/dist/chunks/copy-button-D8XyP0oR.js.map +0 -1
  41. package/dist/chunks/description-list-8qm83WZB.js +0 -59
  42. package/dist/chunks/description-list-8qm83WZB.js.map +0 -1
  43. package/dist/chunks/menu-BQeprfxB.js +0 -208
  44. package/dist/chunks/menu-BQeprfxB.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { t as d } from "../chunks/cn-ChIgwEl3.js";
3
3
  import { revealIn as st } from "../motion.js";
4
- import { u as at } from "../chunks/button-C9VqBBIr.js";
4
+ import { u as lt } from "../chunks/button-C9VqBBIr.js";
5
5
  import { t as ye } from "../chunks/IconCheck-D2WuculQ.js";
6
6
  import { t as it } from "../chunks/IconChevronDown-CZilB71T.js";
7
7
  import { t as ct } from "../chunks/close-button-GvqWbLl0.js";
@@ -11,11 +11,11 @@ import { t as dt } from "../chunks/ghost-search-8PzP73zS.js";
11
11
  import { t as A } from "../chunks/tooltip-BTF7GChl.js";
12
12
  import { t as p } from "../chunks/select-COFV0NLb.js";
13
13
  import { useEffect as Ne, useId as ut, useLayoutEffect as pt, useMemo as G, useRef as S, useState as X } from "react";
14
- import { jsx as n, jsxs as l } from "react/jsx-runtime";
15
- import { AnimatePresence as H, motion as y, useReducedMotion as ht } from "motion/react";
16
- import { Field as ft } from "@base-ui/react/field";
17
- import { Tooltip as mt } from "@base-ui/react/tooltip";
18
- var vt = "group/scope relative w-full min-w-0 overflow-clip rounded-base border border-pho-secondary bg-pho-primary [--scope-inset:var(--choice-card-inset,0.75rem)]", Se = "px-[var(--scope-inset)]", gt = "flex min-h-11 items-center gap-3 border-b border-pho-secondary px-[var(--scope-inset)]", bt = "text-pho-secondary hover:bg-pho-ghost-hover hover:text-pho-secondary-hover data-[popup-open]:bg-pho-ghost-hover outline-pho-brand shrink-0 gap-1.5 rounded-full py-1.5 pr-2 pl-3 font-medium focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid", de = "custom", Ce = "grid grid-cols-1 group-data-[wide]/scope:grid-cols-[fit-content(45%)_minmax(0,1fr)] group-data-[wide]/scope:gap-x-4", Oe = "col-span-full grid grid-cols-subgrid border-t border-pho-secondary first:border-t-0", Ee = "group col-span-full flex min-w-0 cursor-pointer flex-col gap-y-0.5 px-[var(--scope-inset)] py-2 transition-colors select-none hover:bg-pho-primary-hover group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-transparent", wt = "col-span-full flex min-w-0 flex-col gap-y-0.5 px-[var(--scope-inset)] py-2 group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center", ke = "group col-span-full flex h-8 min-w-0 cursor-pointer items-center gap-2 border-b border-pho-secondary bg-pho-page px-[var(--scope-inset)] text-xs font-medium text-pho-secondary select-none data-[disabled]:cursor-not-allowed", Ie = "line-clamp-2 min-w-0 pl-6 text-xs text-pho-description group-data-[wide]/scope:block group-data-[wide]/scope:truncate group-data-[wide]/scope:pl-0", Re = "flex w-full min-w-0 items-center gap-3 px-[var(--scope-inset)] py-2.5 text-left outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-2", xt = 34, yt = 18;
14
+ import { jsx as n, jsxs as a } from "react/jsx-runtime";
15
+ import { AnimatePresence as H, motion as b, useReducedMotion as ht } from "motion/react";
16
+ import { Field as mt } from "@base-ui/react/field";
17
+ import { Tooltip as ft } from "@base-ui/react/tooltip";
18
+ var vt = "group/scope relative w-full min-w-0 overflow-clip rounded-base border border-pho-secondary bg-pho-primary [--scope-inset:var(--choice-card-inset,0.75rem)]", Se = "px-[var(--scope-inset)]", gt = "flex min-h-11 items-center gap-3 border-b border-pho-secondary px-[var(--scope-inset)]", bt = "text-pho-secondary hover:bg-pho-ghost-hover hover:text-pho-secondary-hover data-[popup-open]:bg-pho-ghost-hover outline-pho-brand shrink-0 gap-1.5 rounded-full py-1.5 pr-2 pl-3 font-medium focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid", de = "custom", Ce = "grid auto-rows-max grid-cols-1 group-data-[wide]/scope:grid-cols-[fit-content(45%)_minmax(0,1fr)] group-data-[wide]/scope:gap-x-4", Oe = "col-span-full grid auto-rows-max grid-cols-subgrid border-t border-pho-secondary first:border-t-0", Ee = "group col-span-full flex min-w-0 cursor-pointer flex-col gap-y-0.5 px-[var(--scope-inset)] py-2 transition-colors select-none hover:bg-pho-primary-hover group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-transparent", wt = "col-span-full flex min-w-0 flex-col gap-y-0.5 px-[var(--scope-inset)] py-2 group-data-[wide]/scope:grid group-data-[wide]/scope:grid-cols-subgrid group-data-[wide]/scope:items-center", ke = "group col-span-full flex h-8 min-w-0 cursor-pointer items-center gap-2 border-b border-pho-secondary bg-pho-page px-[var(--scope-inset)] text-xs font-medium text-pho-secondary select-none data-[disabled]:cursor-not-allowed", Ie = "line-clamp-2 min-w-0 pl-6 text-xs text-pho-description group-data-[wide]/scope:block group-data-[wide]/scope:truncate group-data-[wide]/scope:pl-0", Re = "flex w-full min-w-0 items-center gap-3 px-[var(--scope-inset)] py-2.5 text-left outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-2", xt = 34, yt = 18;
19
19
  function Nt(r) {
20
20
  const [s, m] = X({
21
21
  wide: !0,
@@ -38,7 +38,7 @@ function Nt(r) {
38
38
  wide: W >= xt * L,
39
39
  roomy: W >= yt * L
40
40
  };
41
- m((g) => g.wide === u.wide && g.roomy === u.roomy ? g : u);
41
+ m((w) => w.wide === u.wide && w.roomy === u.roomy ? w : u);
42
42
  };
43
43
  c();
44
44
  const _ = new ResizeObserver(c);
@@ -78,12 +78,13 @@ function _e(r, s) {
78
78
  const m = new Set(r);
79
79
  return s.every((i) => m.has(i));
80
80
  }
81
- function J(r, s) {
81
+ function J(r, s, m = "fade") {
82
82
  return {
83
83
  ...r,
84
84
  initial: {
85
85
  ...r.initial,
86
- height: s
86
+ height: s,
87
+ opacity: m === "down" ? 1 : 0
87
88
  },
88
89
  exit: { opacity: 0 }
89
90
  };
@@ -93,15 +94,15 @@ function Ot(r) {
93
94
  const s = r.closest("[data-scope-description]");
94
95
  return s == null ? !1 : s.scrollWidth > s.clientWidth + 1 || s.scrollHeight > s.clientHeight + 1;
95
96
  }
96
- function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, presets: c, placeholder: _ = "Search", collapsible: C = !1, open: z, defaultOpen: L = !1, onOpenChange: W, loading: u = !1, disabled: g = !1, className: Te, ref: B, ...Me }) {
97
- const [De, Ae] = X(m ?? []), O = s ?? De, [Ge, He] = X(L), E = C ? z ?? Ge : !0, [F, T] = X(""), Le = ht(), ue = S(null), { wide: We, roomy: Be, heights: V } = Nt(ue), v = ut(), pe = `${v}-list`, he = S(null), fe = S(null), q = S(null), me = G(() => mt.createHandle(), []), U = G(() => St(r), [r]), j = G(() => new Set(r.map((e) => e.value)), [r]), Fe = G(() => new Map(r.map((e, t) => [e.value, t])), [r]), Ve = G(() => new Map(U.map((e, t) => [e.label, t])), [U]), Z = S([]);
97
+ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, presets: c, placeholder: _ = "Search", collapsible: C = !1, open: z, defaultOpen: L = !1, onOpenChange: W, loading: u = !1, disabled: w = !1, className: Te, ref: B, ...Me }) {
98
+ const [De, Ae] = X(m ?? []), O = s ?? De, [Ge, He] = X(L), E = C ? z ?? Ge : !0, [F, T] = X(""), Le = ht(), ue = S(null), { wide: We, roomy: Be, heights: V } = Nt(ue), v = ut(), pe = `${v}-list`, he = S(null), me = S(null), q = S(null), fe = G(() => ft.createHandle(), []), U = G(() => St(r), [r]), j = G(() => new Set(r.map((e) => e.value)), [r]), Fe = G(() => new Map(r.map((e, t) => [e.value, t])), [r]), Ve = G(() => new Map(U.map((e, t) => [e.label, t])), [U]), Z = S([]);
98
99
  for (const e of O) e !== o?.value && !j.has(e) && !Z.current.includes(e) && Z.current.push(e);
99
100
  const k = Z.current.filter((e) => !j.has(e)), f = o?.value, M = new Set(O), N = f !== void 0 && M.has(f), K = (e) => N ? j.has(e) : M.has(e), R = r.filter((e) => K(e.value)).length, ee = k.filter((e) => M.has(e)).length, Y = (e) => {
100
101
  s === void 0 && Ae(e), i?.(e);
101
102
  }, te = (e) => Y([...r.filter((t) => e.has(t.value)).map((t) => t.value), ...k.filter((t) => e.has(t))]), qe = () => N ? new Set(r.map((e) => e.value)) : new Set(O.filter((e) => e !== f)), ne = (e, t) => {
102
- const a = qe();
103
- for (const h of e) t ? a.add(h) : a.delete(h);
104
- te(a);
103
+ const l = qe();
104
+ for (const h of e) t ? l.add(h) : l.delete(h);
105
+ te(l);
105
106
  }, Ue = (e) => {
106
107
  f === void 0 ? ne(r.map((t) => t.value), e) : e ? Y([f]) : te(new Set(r.map((t) => t.value)));
107
108
  }, re = (e) => e.filter((t) => t === f || j.has(t)), P = u || r.length === 0 ? void 0 : c?.find((e) => {
@@ -109,7 +110,7 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
109
110
  return t.length > 0 && _e(t, re(O));
110
111
  }), je = (e) => {
111
112
  const t = re(e.value);
112
- f !== void 0 && t.includes(f) ? Y([f]) : te(/* @__PURE__ */ new Set([...t, ...k.filter((a) => M.has(a))]));
113
+ f !== void 0 && t.includes(f) ? Y([f]) : te(/* @__PURE__ */ new Set([...t, ...k.filter((l) => M.has(l))]));
113
114
  }, ve = (e) => {
114
115
  z === void 0 && He(e), W?.(e);
115
116
  }, Ke = () => {
@@ -130,19 +131,19 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
130
131
  const e = q.current;
131
132
  if (e == null) return;
132
133
  q.current = null;
133
- let t = 0, a = 0;
134
+ let t = 0, l = 0;
134
135
  const h = () => {
135
- const w = e === "search" ? he.current : fe.current;
136
- w != null && (w.focus({ preventScroll: !0 }), document.activeElement !== w && a++ < 5 && (t = requestAnimationFrame(h)));
136
+ const x = e === "search" ? he.current : me.current;
137
+ x != null && (x.focus({ preventScroll: !0 }), document.activeElement !== x && l++ < 5 && (t = requestAnimationFrame(h)));
137
138
  };
138
139
  return t = requestAnimationFrame(h), () => cancelAnimationFrame(t);
139
140
  }, [E]);
140
141
  const Qe = (e) => {
141
- e.key === "Enter" && e.preventDefault(), e.key === "Escape" && (F !== "" ? (e.preventDefault(), T("")) : C && !g && (e.preventDefault(), be()));
142
- }, le = Ct(F), Q = le.length > 0, we = U.map((e) => ({
142
+ e.key === "Enter" && e.preventDefault(), e.key === "Escape" && (F !== "" ? (e.preventDefault(), T("")) : C && !w && (e.preventDefault(), be()));
143
+ }, ae = Ct(F), Q = ae.length > 0, we = U.map((e) => ({
143
144
  ...e,
144
- items: Q ? e.items.filter((t) => Pe(le, e.label, t.value, t.label, t.description)) : e.items
145
- })).filter((e) => e.items.length > 0), se = Q ? k.filter((e) => Pe(le, e)) : k, D = N || r.length === 0 ? null : `${R} of ${r.length}`, ae = (() => {
145
+ items: Q ? e.items.filter((t) => Pe(ae, e.label, t.value, t.label, t.description)) : e.items
146
+ })).filter((e) => e.items.length > 0), se = Q ? k.filter((e) => Pe(ae, e)) : k, D = N || r.length === 0 ? null : `${R} of ${r.length}`, le = (() => {
146
147
  if (N && o) return {
147
148
  title: o.label,
148
149
  detail: o.description ?? ""
@@ -157,39 +158,39 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
157
158
  };
158
159
  const e = [];
159
160
  for (const t of U) {
160
- const a = t.items.filter((h) => K(h.value));
161
- t.label !== null && t.items.length > 1 && a.length === t.items.length ? e.push(t.label) : e.push(...a.map($e));
161
+ const l = t.items.filter((h) => K(h.value));
162
+ t.label !== null && t.items.length > 1 && l.length === t.items.length ? e.push(t.label) : e.push(...l.map($e));
162
163
  }
163
164
  return e.push(...k.filter((t) => M.has(t))), {
164
165
  title: e.length > 0 ? e.join(", ") : "None",
165
166
  detail: D ?? ""
166
167
  };
167
- })(), $ = g || u, b = st(Le), ie = (e, t = !1) => {
168
- const a = t ? `${v}-r${k.indexOf(e.value)}` : `${v}-i${Fe.get(e.value)}`, h = `${a}-name`, w = `${a}-description`;
169
- return /* @__PURE__ */ l(y.label, {
170
- ...b,
168
+ })(), $ = w || u, g = st(Le), ie = (e, t = !1) => {
169
+ const l = t ? `${v}-r${k.indexOf(e.value)}` : `${v}-i${Fe.get(e.value)}`, h = `${l}-name`, x = `${l}-description`;
170
+ return /* @__PURE__ */ a(b.label, {
171
+ ...g,
171
172
  className: d(Ee, "overflow-hidden"),
172
173
  "data-scope-row": "",
173
174
  "data-disabled": $ || void 0,
174
- children: [/* @__PURE__ */ l("span", {
175
+ children: [/* @__PURE__ */ a("span", {
175
176
  className: "flex min-w-0 items-center gap-2",
176
177
  children: [/* @__PURE__ */ n(ce, {
177
178
  size: "sm",
178
179
  checked: K(e.value),
179
180
  disabled: $,
180
181
  "aria-labelledby": h,
181
- "aria-describedby": e.description ? w : void 0,
182
- onCheckedChange: (x) => ne([e.value], x)
182
+ "aria-describedby": e.description ? x : void 0,
183
+ onCheckedChange: (y) => ne([e.value], y)
183
184
  }), /* @__PURE__ */ n("span", {
184
185
  id: h,
185
186
  className: d("truncate text-base", t ? "text-pho-description" : "text-pho-secondary"),
186
187
  children: $e(e)
187
188
  })]
188
189
  }), e.description ? /* @__PURE__ */ n(A.Trigger, {
189
- handle: me,
190
+ handle: fe,
190
191
  payload: e.description,
191
192
  render: /* @__PURE__ */ n("span", {
192
- id: w,
193
+ id: x,
193
194
  "data-scope-description": "",
194
195
  className: Ie
195
196
  }),
@@ -197,24 +198,24 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
197
198
  }) : null]
198
199
  }, e.value);
199
200
  }, Je = (e) => {
200
- if (e.label === null) return e.items.map((x) => ie(x));
201
- const t = `${v}-g${Ve.get(e.label)}`, a = e.items.map((x) => x.value), h = a.filter(K).length, w = h === a.length;
202
- return /* @__PURE__ */ l(y.div, {
203
- ...b,
201
+ if (e.label === null) return e.items.map((y) => ie(y));
202
+ const t = `${v}-g${Ve.get(e.label)}`, l = e.items.map((y) => y.value), h = l.filter(K).length, x = h === l.length;
203
+ return /* @__PURE__ */ a(b.div, {
204
+ ...g,
204
205
  role: "group",
205
206
  "aria-labelledby": t,
206
207
  className: d(Oe, "overflow-hidden"),
207
- children: [/* @__PURE__ */ l("label", {
208
+ children: [/* @__PURE__ */ a("label", {
208
209
  className: ke,
209
210
  "data-disabled": $ || void 0,
210
211
  children: [
211
212
  /* @__PURE__ */ n(ce, {
212
213
  size: "sm",
213
- checked: w,
214
- indeterminate: h > 0 && !w,
214
+ checked: x,
215
+ indeterminate: h > 0 && !x,
215
216
  disabled: $,
216
217
  "aria-labelledby": t,
217
- onCheckedChange: (x) => ne(a, x)
218
+ onCheckedChange: (y) => ne(l, y)
218
219
  }),
219
220
  /* @__PURE__ */ n("span", {
220
221
  id: t,
@@ -223,20 +224,20 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
223
224
  }),
224
225
  /* @__PURE__ */ n("span", {
225
226
  className: "text-pho-description tabular-nums",
226
- children: a.length
227
+ children: l.length
227
228
  })
228
229
  ]
229
230
  }), /* @__PURE__ */ n(H, {
230
231
  initial: !1,
231
- children: e.items.map((x) => ie(x))
232
+ children: e.items.map((y) => ie(y))
232
233
  })]
233
234
  }, `group:${e.label}`);
234
- }, Xe = se.length > 0 ? /* @__PURE__ */ l(y.div, {
235
- ...b,
235
+ }, Xe = se.length > 0 ? /* @__PURE__ */ a(b.div, {
236
+ ...g,
236
237
  role: "group",
237
238
  "aria-labelledby": `${v}-retired`,
238
239
  className: d(Oe, "overflow-hidden"),
239
- children: [/* @__PURE__ */ l("div", {
240
+ children: [/* @__PURE__ */ a("div", {
240
241
  className: d(ke, "cursor-default"),
241
242
  children: [/* @__PURE__ */ n("span", {
242
243
  "aria-hidden": !0,
@@ -250,12 +251,12 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
250
251
  initial: !1,
251
252
  children: se.map((e) => ie({ value: e }, !0))
252
253
  })]
253
- }, "retired") : null, Ze = o ? /* @__PURE__ */ l(y.label, {
254
- ...b,
254
+ }, "retired") : null, Ze = o ? /* @__PURE__ */ a(b.label, {
255
+ ...g,
255
256
  className: d(Ee, "overflow-hidden"),
256
257
  "data-scope-row": "",
257
258
  "data-disabled": $ || N && r.length === 0 || void 0,
258
- children: [/* @__PURE__ */ l("span", {
259
+ children: [/* @__PURE__ */ a("span", {
259
260
  className: "flex min-w-0 items-center gap-2",
260
261
  children: [/* @__PURE__ */ n(ce, {
261
262
  size: "sm",
@@ -275,10 +276,10 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
275
276
  className: Ie,
276
277
  children: o.description
277
278
  }) : null]
278
- }, "all") : null, et = Q && we.length === 0 && se.length === 0 ? /* @__PURE__ */ n(y.p, {
279
- ...b,
279
+ }, "all") : null, et = Q && we.length === 0 && se.length === 0 ? /* @__PURE__ */ n(b.p, {
280
+ ...g,
280
281
  className: d("text-pho-description col-span-full overflow-hidden text-center text-base", Se),
281
- children: /* @__PURE__ */ l("span", {
282
+ children: /* @__PURE__ */ a("span", {
282
283
  className: "block py-6",
283
284
  children: [
284
285
  "Nothing matches “",
@@ -286,12 +287,12 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
286
287
  "”."
287
288
  ]
288
289
  })
289
- }, "nothing") : null, tt = /* @__PURE__ */ n(y.div, {
290
- ...J(b, V.current.bones),
290
+ }, "nothing") : null, tt = /* @__PURE__ */ n(b.div, {
291
+ ...J(g, V.current.bones, "down"),
291
292
  id: pe,
292
293
  "data-scope-list": "",
293
294
  className: d(Ce, "overflow-hidden"),
294
- children: /* @__PURE__ */ l(H, {
295
+ children: /* @__PURE__ */ a(H, {
295
296
  initial: !1,
296
297
  children: [
297
298
  Q ? null : Ze,
@@ -300,8 +301,8 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
300
301
  et
301
302
  ]
302
303
  })
303
- }, "list"), nt = /* @__PURE__ */ n(y.div, {
304
- ...J(b, V.current.list),
304
+ }, "list"), nt = /* @__PURE__ */ n(b.div, {
305
+ ...J(g, V.current.list),
305
306
  "data-scope-bones": "",
306
307
  "aria-hidden": !0,
307
308
  className: d(Ce, "overflow-hidden"),
@@ -331,12 +332,12 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
331
332
  name: "w-24",
332
333
  text: "w-60"
333
334
  }
334
- ].map((e, t) => e.band ? /* @__PURE__ */ l("div", {
335
+ ].map((e, t) => e.band ? /* @__PURE__ */ a("div", {
335
336
  className: d("border-pho-secondary bg-pho-page col-span-full flex h-8 items-center gap-2 border-y", Se),
336
337
  children: [/* @__PURE__ */ n(I, { className: "size-4 rounded-sm" }), /* @__PURE__ */ n(I, { className: d("h-3", e.name) })]
337
- }, t) : /* @__PURE__ */ l("div", {
338
+ }, t) : /* @__PURE__ */ a("div", {
338
339
  className: wt,
339
- children: [/* @__PURE__ */ l("span", {
340
+ children: [/* @__PURE__ */ a("span", {
340
341
  className: "flex h-5 min-w-0 items-center gap-2",
341
342
  children: [/* @__PURE__ */ n(I, { className: "size-4 shrink-0 rounded-sm" }), /* @__PURE__ */ n(I, { className: d("h-3.5 max-w-full", e.name) })]
342
343
  }), /* @__PURE__ */ n("span", {
@@ -344,9 +345,9 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
344
345
  children: /* @__PURE__ */ n(I, { className: d("h-3 max-w-full", e.text) })
345
346
  })]
346
347
  }, t))
347
- }, "bones"), rt = c != null && c.length > 0 ? /* @__PURE__ */ n(ft.Root, {
348
+ }, "bones"), rt = c != null && c.length > 0 ? /* @__PURE__ */ n(mt.Root, {
348
349
  className: "contents",
349
- children: /* @__PURE__ */ l(p.Root, {
350
+ children: /* @__PURE__ */ a(p.Root, {
350
351
  items: [...c.map((e, t) => ({
351
352
  value: `preset:${t}`,
352
353
  label: e.label
@@ -359,15 +360,15 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
359
360
  const t = c[Number(String(e).slice(7))];
360
361
  t != null && t !== P && je(t);
361
362
  },
362
- disabled: g || u,
363
- children: [/* @__PURE__ */ l(p.Trigger, {
363
+ disabled: w || u,
364
+ children: [/* @__PURE__ */ a(p.Trigger, {
364
365
  variant: "inline",
365
366
  "aria-label": "Preset",
366
367
  className: d(bt, C ? "-mr-1" : "-mr-2"),
367
368
  children: [/* @__PURE__ */ n(p.Value, {}), /* @__PURE__ */ n(p.Icon, { children: /* @__PURE__ */ n(it, {}) })]
368
369
  }), /* @__PURE__ */ n(p.Portal, { children: /* @__PURE__ */ n(p.Positioner, {
369
370
  align: "end",
370
- children: /* @__PURE__ */ n(p.Popup, { children: /* @__PURE__ */ l(p.List, { children: [c.map((e, t) => /* @__PURE__ */ l(p.Item, {
371
+ children: /* @__PURE__ */ n(p.Popup, { children: /* @__PURE__ */ a(p.List, { children: [c.map((e, t) => /* @__PURE__ */ a(p.Item, {
371
372
  value: `preset:${t}`,
372
373
  children: [
373
374
  /* @__PURE__ */ n(p.ItemIndicator, { children: /* @__PURE__ */ n(ye, {}) }),
@@ -377,17 +378,20 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
377
378
  children: e.description
378
379
  }) : null
379
380
  ]
380
- }, t)), /* @__PURE__ */ l(p.Item, {
381
+ }, t)), /* @__PURE__ */ a(p.Item, {
381
382
  value: de,
382
383
  disabled: !0,
383
384
  children: [/* @__PURE__ */ n(p.ItemIndicator, { children: /* @__PURE__ */ n(ye, {}) }), /* @__PURE__ */ n(p.ItemText, { children: "Custom" })]
384
385
  })] }) })
385
386
  }) })]
386
387
  })
387
- }) : null, ot = /* @__PURE__ */ l(y.div, {
388
- ...J(b, V.current.face),
388
+ }) : null, ot = /* @__PURE__ */ a(b.div, {
389
+ ...J(g, V.current.face, "down"),
389
390
  className: "overflow-hidden",
390
- children: [/* @__PURE__ */ l("div", {
391
+ children: [/* @__PURE__ */ a(b.div, {
392
+ initial: { opacity: 0 },
393
+ animate: { opacity: 1 },
394
+ transition: g.transition,
391
395
  className: gt,
392
396
  children: [
393
397
  /* @__PURE__ */ n(dt, {
@@ -411,7 +415,7 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
411
415
  C ? /* @__PURE__ */ n(ct, {
412
416
  size: "sm",
413
417
  label: "Cancel",
414
- disabled: g,
418
+ disabled: w,
415
419
  onClick: be,
416
420
  className: "-mr-2 shrink-0 focus-visible:-outline-offset-2"
417
421
  }) : null
@@ -421,7 +425,7 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
421
425
  mode: "popLayout",
422
426
  children: u ? nt : tt
423
427
  })]
424
- }, "picker"), xe = u ? /* @__PURE__ */ l("span", {
428
+ }, "picker"), xe = u ? /* @__PURE__ */ a("span", {
425
429
  className: "flex min-w-0 flex-1 flex-col",
426
430
  children: [/* @__PURE__ */ n("span", {
427
431
  className: "flex h-5 items-center",
@@ -430,30 +434,30 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
430
434
  className: "flex h-4.5 items-center",
431
435
  children: /* @__PURE__ */ n(I, { className: "h-3 w-16" })
432
436
  })]
433
- }) : /* @__PURE__ */ l("span", {
437
+ }) : /* @__PURE__ */ a("span", {
434
438
  className: "flex min-w-0 flex-1 flex-col",
435
439
  children: [/* @__PURE__ */ n("span", {
436
440
  className: "text-pho-primary truncate text-base",
437
- children: ae.title
438
- }), ae.detail ? /* @__PURE__ */ n("span", {
441
+ children: le.title
442
+ }), le.detail ? /* @__PURE__ */ n("span", {
439
443
  className: "text-pho-description truncate text-xs tabular-nums",
440
- children: ae.detail
444
+ children: le.detail
441
445
  }) : null]
442
- }), lt = /* @__PURE__ */ n(y.div, {
443
- ...J(b, V.current.face),
446
+ }), at = /* @__PURE__ */ n(b.div, {
447
+ ...J(g, V.current.face),
444
448
  className: "overflow-hidden",
445
- children: g || u ? /* @__PURE__ */ n("div", {
449
+ children: w || u ? /* @__PURE__ */ n("div", {
446
450
  className: Re,
447
451
  children: xe
448
- }) : /* @__PURE__ */ l("button", {
449
- ref: fe,
452
+ }) : /* @__PURE__ */ a("button", {
453
+ ref: me,
450
454
  type: "button",
451
455
  "aria-expanded": !1,
452
456
  className: d(Re, "group hover:bg-pho-primary-hover cursor-pointer transition-colors"),
453
457
  onClick: Ke,
454
458
  children: [xe, /* @__PURE__ */ n("span", {
455
459
  "aria-hidden": !0,
456
- className: at({
460
+ className: lt({
457
461
  variant: "ghost",
458
462
  size: "sm",
459
463
  className: "group-hover:bg-pho-ghost-hover group-hover:text-pho-secondary-hover pointer-events-none shrink-0"
@@ -462,7 +466,7 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
462
466
  })]
463
467
  })
464
468
  }, "folded");
465
- return /* @__PURE__ */ l("div", {
469
+ return /* @__PURE__ */ a("div", {
466
470
  role: "group",
467
471
  "aria-busy": u || void 0,
468
472
  "data-scope": "",
@@ -477,9 +481,9 @@ function Et({ items: r, value: s, defaultValue: m, onValueChange: i, all: o, pre
477
481
  children: [/* @__PURE__ */ n(H, {
478
482
  initial: !1,
479
483
  mode: "popLayout",
480
- children: E ? ot : lt
484
+ children: E ? ot : at
481
485
  }), /* @__PURE__ */ n(A.Root, {
482
- handle: me,
486
+ handle: fe,
483
487
  onOpenChange: (e, t) => {
484
488
  e && !Ot(t.event?.target) && t.cancel();
485
489
  },