@danxbot/ui 4.1.8 → 4.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13690,43 +13690,45 @@ const uO = [
13690
13690
  ];
13691
13691
  function nr({
13692
13692
  trigger: e,
13693
- side: t = "bottom",
13694
- align: n = "center",
13695
- arrow: r = !1,
13696
- width: o,
13697
- className: s,
13698
- children: i,
13699
- ref: a,
13700
- defaultOpen: l,
13701
- onOpenChange: c,
13702
- "aria-labelledby": u,
13703
- "aria-label": m
13693
+ open: t,
13694
+ side: n = "bottom",
13695
+ align: r = "center",
13696
+ arrow: o = !1,
13697
+ width: s,
13698
+ className: i,
13699
+ children: a,
13700
+ ref: l,
13701
+ defaultOpen: c,
13702
+ onOpenChange: u,
13703
+ "aria-labelledby": m,
13704
+ "aria-label": d
13704
13705
  }) {
13705
13706
  return /* @__PURE__ */ T(
13706
13707
  E2,
13707
13708
  {
13708
- defaultOpen: l,
13709
- onOpenChange: c && ((p) => c(p)),
13709
+ open: t,
13710
+ defaultOpen: c,
13711
+ onOpenChange: u && ((h) => u(h)),
13710
13712
  children: [
13711
13713
  /* @__PURE__ */ f(l0, { render: e }),
13712
13714
  /* @__PURE__ */ f(c0, { children: /* @__PURE__ */ f(
13713
13715
  m0,
13714
13716
  {
13715
- side: t,
13716
- align: n,
13717
+ side: n,
13718
+ align: r,
13717
13719
  sideOffset: 8,
13718
13720
  className: "z-(--z-popover) outline-none",
13719
13721
  children: /* @__PURE__ */ T(
13720
13722
  x0,
13721
13723
  {
13722
- ref: a,
13723
- "aria-labelledby": u,
13724
- "aria-label": m,
13725
- style: o ? { "--dx-popover-w": o } : void 0,
13726
- className: W(uO, dO, "p-4", s),
13724
+ ref: l,
13725
+ "aria-labelledby": m,
13726
+ "aria-label": d,
13727
+ style: s ? { "--dx-popover-w": s } : void 0,
13728
+ className: W(uO, dO, "p-4", i),
13727
13729
  children: [
13728
- r && /* @__PURE__ */ f(y0, { className: W(O0), children: /* @__PURE__ */ f("span", { className: W(A0) }) }),
13729
- /* @__PURE__ */ f("div", { className: P0, children: i })
13730
+ o && /* @__PURE__ */ f(y0, { className: W(O0), children: /* @__PURE__ */ f("span", { className: W(A0) }) }),
13731
+ /* @__PURE__ */ f("div", { className: P0, children: a })
13730
13732
  ]
13731
13733
  }
13732
13734
  )
@@ -16088,7 +16090,10 @@ const zO = au, Z0 = mt({
16088
16090
  "data-starting-style:scale-95 data-starting-style:opacity-0",
16089
16091
  "data-ending-style:opacity-0 data-ending-style:duration-(--dur-exit-slow) data-ending-style:ease-exit"
16090
16092
  ],
16091
- header: "flex items-start gap-4 px-6 pt-6",
16093
+ /* `pr-12` reserves the corner close button's own footprint so a long title
16094
+ or description never runs underneath it — see the close button's own
16095
+ comment below for why it sits OUTSIDE this row instead of inside it. */
16096
+ header: "flex items-start gap-4 px-6 pr-12 pt-6",
16092
16097
  title: "font-display text-lg font-semibold text-primary text-balance",
16093
16098
  description: "mt-1.5 text-sm text-secondary text-pretty",
16094
16099
  /* The body scrolls, not the panel, so the header and footer stay put on a
@@ -16128,21 +16133,38 @@ function BO({
16128
16133
  /* @__PURE__ */ T(la, { children: [
16129
16134
  /* @__PURE__ */ f(sa, { className: m.backdrop() }),
16130
16135
  /* @__PURE__ */ T(aa, { ref: u, className: W(m.popup(), l), children: [
16131
- /* @__PURE__ */ T("div", { className: m.header(), children: [
16132
- /* @__PURE__ */ T("div", { className: "min-w-0 flex-1", children: [
16133
- /* @__PURE__ */ f(ca, { className: m.title(), children: r }),
16134
- o && /* @__PURE__ */ f(vm, { className: m.description(), children: o })
16135
- ] }),
16136
- !i && /* `hideTooltip`: a Base UI `render` slot merges props and a ref
16137
- into ONE element, which a tooltip wrapper would swallow. The
16138
- accessible name still comes from `label`. */
16139
- /* @__PURE__ */ f(
16140
- ia,
16141
- {
16142
- render: /* @__PURE__ */ f(Mn, { label: "Close", hideTooltip: !0, icon: /* @__PURE__ */ f(ge, { name: "x", size: "sm" }) })
16143
- }
16144
- )
16145
- ] }),
16136
+ /* @__PURE__ */ f("div", { className: m.header(), children: /* @__PURE__ */ T("div", { className: "min-w-0 flex-1", children: [
16137
+ /* @__PURE__ */ f(ca, { className: m.title(), children: r }),
16138
+ o && /* @__PURE__ */ f(vm, { className: m.description(), children: o })
16139
+ ] }) }),
16140
+ !i && /* PINNED TO THE POPUP'S OWN CORNER, NOT THE HEADER ROW.
16141
+ Sitting inside `header`'s flex row (the previous layout) put the
16142
+ close button's vertical position at the mercy of the title's own
16143
+ line height — a short one-line title read fine, but the button
16144
+ shared a baseline with the FIRST line of title/description
16145
+ content rather than sitting at a fixed, predictable corner
16146
+ independent of how much text the header holds. `.popup` is
16147
+ already `fixed`, which is itself a positioning context, so no
16148
+ extra `relative` wrapper is needed here. `header`'s `pr-12`
16149
+ reserves this button's footprint so title/description text
16150
+ never runs underneath it.
16151
+ `hideTooltip`: a Base UI `render` slot merges props and a ref
16152
+ into ONE element, which a tooltip wrapper would swallow. The
16153
+ accessible name still comes from `label`. */
16154
+ /* @__PURE__ */ f(
16155
+ ia,
16156
+ {
16157
+ render: /* @__PURE__ */ f(
16158
+ Mn,
16159
+ {
16160
+ label: "Close",
16161
+ hideTooltip: !0,
16162
+ icon: /* @__PURE__ */ f(ge, { name: "x", size: "sm" }),
16163
+ className: "absolute top-4 right-4"
16164
+ }
16165
+ )
16166
+ }
16167
+ ),
16146
16168
  c && /* @__PURE__ */ f("div", { className: m.body(), children: c }),
16147
16169
  s && /* @__PURE__ */ f("div", { className: m.footer(), children: s })
16148
16170
  ] })