@particle-academy/react-fancy 4.4.0 → 4.4.1

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.cjs CHANGED
@@ -2539,9 +2539,14 @@ var Button = react.forwardRef(
2539
2539
  {
2540
2540
  "data-react-fancy-button-label": "",
2541
2541
  className: cn(
2542
- // min-w-0 lets the label shrink + wrap inside the flex row instead
2543
- // of overflowing and shoving the icon out of place.
2544
- "min-w-0",
2542
+ // A button label must stay on one line. When a host flex layout
2543
+ // squeezes the button, `whitespace-nowrap` keeps the label and any
2544
+ // trailing icon/arrow together instead of wrapping and stacking the
2545
+ // icon below it (the classic "send" over "→" break). `min-w-0` keeps
2546
+ // the span shrinkable so `truncate`/ellipsis still works; multi-line
2547
+ // wrapping is opt-in via `labelClassName` ("whitespace-normal") or
2548
+ // the `responsive` prop.
2549
+ "min-w-0 whitespace-nowrap",
2545
2550
  // `responsive` collapses to icon-only when squeezed, while keeping
2546
2551
  // the label readable to screen readers.
2547
2552
  responsive && "sr-only sm:not-sr-only",
@@ -12914,13 +12919,14 @@ function PromptInput({
12914
12919
  {
12915
12920
  variant: "ghost",
12916
12921
  size: "sm",
12922
+ className: "shrink-0",
12917
12923
  onClick: () => {
12918
12924
  },
12919
12925
  children: "\u{1F4CE} attach"
12920
12926
  }
12921
12927
  ) }),
12922
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex items-center gap-1.5", children: [
12923
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1.5 w-24 overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-700", children: /* @__PURE__ */ jsxRuntime.jsx(
12928
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
12929
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1.5 w-24 shrink overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-700", children: /* @__PURE__ */ jsxRuntime.jsx(
12924
12930
  "div",
12925
12931
  {
12926
12932
  className: "h-full rounded-full transition-all",
@@ -12933,7 +12939,7 @@ function PromptInput({
12933
12939
  fmtTokens(budgetTokens)
12934
12940
  ] })
12935
12941
  ] }),
12936
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
12942
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
12937
12943
  showHint && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "hidden text-[10px] text-zinc-500 sm:inline", children: [
12938
12944
  /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "rounded border border-zinc-300 bg-zinc-50 px-1 py-0.5 font-mono text-[9px] text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300", children: "\u2318" }),
12939
12945
  " ",
@@ -12943,7 +12949,7 @@ function PromptInput({
12943
12949
  " ",
12944
12950
  "to send"
12945
12951
  ] }),
12946
- /* @__PURE__ */ jsxRuntime.jsx(Button, { color: "violet", size: "sm", onClick: submit, children: "send \u2192" })
12952
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { color: "violet", size: "sm", className: "shrink-0", onClick: submit, children: "send \u2192" })
12947
12953
  ] })
12948
12954
  ] })
12949
12955
  ]