@danxbot/ui 4.1.7 → 4.1.9

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
@@ -16088,7 +16088,10 @@ const zO = au, Z0 = mt({
16088
16088
  "data-starting-style:scale-95 data-starting-style:opacity-0",
16089
16089
  "data-ending-style:opacity-0 data-ending-style:duration-(--dur-exit-slow) data-ending-style:ease-exit"
16090
16090
  ],
16091
- header: "flex items-start gap-4 px-6 pt-6",
16091
+ /* `pr-12` reserves the corner close button's own footprint so a long title
16092
+ or description never runs underneath it — see the close button's own
16093
+ comment below for why it sits OUTSIDE this row instead of inside it. */
16094
+ header: "flex items-start gap-4 px-6 pr-12 pt-6",
16092
16095
  title: "font-display text-lg font-semibold text-primary text-balance",
16093
16096
  description: "mt-1.5 text-sm text-secondary text-pretty",
16094
16097
  /* The body scrolls, not the panel, so the header and footer stay put on a
@@ -16128,21 +16131,38 @@ function BO({
16128
16131
  /* @__PURE__ */ T(la, { children: [
16129
16132
  /* @__PURE__ */ f(sa, { className: m.backdrop() }),
16130
16133
  /* @__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
- ] }),
16134
+ /* @__PURE__ */ f("div", { className: m.header(), children: /* @__PURE__ */ T("div", { className: "min-w-0 flex-1", children: [
16135
+ /* @__PURE__ */ f(ca, { className: m.title(), children: r }),
16136
+ o && /* @__PURE__ */ f(vm, { className: m.description(), children: o })
16137
+ ] }) }),
16138
+ !i && /* PINNED TO THE POPUP'S OWN CORNER, NOT THE HEADER ROW.
16139
+ Sitting inside `header`'s flex row (the previous layout) put the
16140
+ close button's vertical position at the mercy of the title's own
16141
+ line height — a short one-line title read fine, but the button
16142
+ shared a baseline with the FIRST line of title/description
16143
+ content rather than sitting at a fixed, predictable corner
16144
+ independent of how much text the header holds. `.popup` is
16145
+ already `fixed`, which is itself a positioning context, so no
16146
+ extra `relative` wrapper is needed here. `header`'s `pr-12`
16147
+ reserves this button's footprint so title/description text
16148
+ never runs underneath it.
16149
+ `hideTooltip`: a Base UI `render` slot merges props and a ref
16150
+ into ONE element, which a tooltip wrapper would swallow. The
16151
+ accessible name still comes from `label`. */
16152
+ /* @__PURE__ */ f(
16153
+ ia,
16154
+ {
16155
+ render: /* @__PURE__ */ f(
16156
+ Mn,
16157
+ {
16158
+ label: "Close",
16159
+ hideTooltip: !0,
16160
+ icon: /* @__PURE__ */ f(ge, { name: "x", size: "sm" }),
16161
+ className: "absolute top-4 right-4"
16162
+ }
16163
+ )
16164
+ }
16165
+ ),
16146
16166
  c && /* @__PURE__ */ f("div", { className: m.body(), children: c }),
16147
16167
  s && /* @__PURE__ */ f("div", { className: m.footer(), children: s })
16148
16168
  ] })
@@ -21635,20 +21655,24 @@ function bu({
21635
21655
  }
21636
21656
  function $r({
21637
21657
  className: e,
21638
- selected: t,
21639
- tone: n = "neutral",
21640
- children: r,
21641
- ref: o,
21642
- ...s
21658
+ icon: t,
21659
+ selected: n,
21660
+ tone: r = "neutral",
21661
+ children: o,
21662
+ ref: s,
21663
+ ...i
21643
21664
  }) {
21644
- return /* @__PURE__ */ f(
21665
+ return /* @__PURE__ */ T(
21645
21666
  W1,
21646
21667
  {
21647
- ref: o,
21648
- "data-selected": t || void 0,
21649
- className: W(th, n === "danger" && rD, t && nD, e),
21650
- ...s,
21651
- children: r
21668
+ ref: s,
21669
+ "data-selected": n || void 0,
21670
+ className: W(th, r === "danger" && rD, n && nD, e),
21671
+ ...i,
21672
+ children: [
21673
+ t && /* @__PURE__ */ f("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: t }),
21674
+ o
21675
+ ]
21652
21676
  }
21653
21677
  );
21654
21678
  }