@financinha/ui 0.12.0 → 0.13.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.
package/dist/index.cjs CHANGED
@@ -3513,6 +3513,7 @@ var InsightCardContext = React37.createContext({ size: "default", divided: true
3513
3513
  function InsightCard({
3514
3514
  title,
3515
3515
  meta,
3516
+ metaPosition = "inline",
3516
3517
  action,
3517
3518
  divider = false,
3518
3519
  divided = true,
@@ -3522,6 +3523,7 @@ function InsightCard({
3522
3523
  ...props
3523
3524
  }) {
3524
3525
  const sm = size === "sm";
3526
+ const metaNoFim = meta != null && metaPosition === "end";
3525
3527
  const contexto = React37.useMemo(() => ({ size, divided }), [size, divided]);
3526
3528
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3527
3529
  Card,
@@ -3548,14 +3550,17 @@ function InsightCard({
3548
3550
  ),
3549
3551
  children: [
3550
3552
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { "aria-hidden": true, className: (0, import_cn37.cn)("flex shrink-0 items-center", sm && "h-6"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react13.SparklesIcon, { className: "size-5 text-primary-500 dark:text-primary-300" }) }),
3551
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: (0, import_cn37.cn)("font-semibold text-foreground", sm ? "text-sm leading-6" : "text-base"), children: [
3553
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: (0, import_cn37.cn)("min-w-0 font-semibold text-foreground", sm ? "text-sm leading-6" : "text-base"), children: [
3552
3554
  title,
3553
- meta ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "font-normal text-muted-foreground", children: [
3555
+ meta != null && !metaNoFim ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "font-normal text-muted-foreground", children: [
3554
3556
  " \xB7 ",
3555
3557
  meta
3556
3558
  ] }) : null
3557
3559
  ] }),
3558
- action ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ml-auto", children: action }) : null
3560
+ metaNoFim || action ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
3561
+ metaNoFim ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { "data-slot": "insight-card-meta", className: "text-sm leading-6 text-muted-foreground", children: meta }) : null,
3562
+ action
3563
+ ] }) : null
3559
3564
  ]
3560
3565
  }
3561
3566
  ),