framepexls-ui-lib 0.3.21 → 0.3.22

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.
@@ -5,6 +5,7 @@ import React__default from 'react';
5
5
  type TopbarAction = {
6
6
  label: string;
7
7
  onClick?: () => void;
8
+ badge?: number | string;
8
9
  };
9
10
  type ButtonColor = NonNullable<React__default.ComponentProps<typeof Button>["color"]>;
10
11
  type Props = {
@@ -5,6 +5,7 @@ import React__default from 'react';
5
5
  type TopbarAction = {
6
6
  label: string;
7
7
  onClick?: () => void;
8
+ badge?: number | string;
8
9
  };
9
10
  type ButtonColor = NonNullable<React__default.ComponentProps<typeof Button>["color"]>;
10
11
  type Props = {
package/dist/AppTopbar.js CHANGED
@@ -34,6 +34,7 @@ __export(AppTopbar_exports, {
34
34
  module.exports = __toCommonJS(AppTopbar_exports);
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_Button = __toESM(require("./Button"));
37
+ var import_Badge = __toESM(require("./Badge"));
37
38
  function AppTopbar({ title, subtitle, secondary, primary, actions, color }) {
38
39
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "sticky top-0 z-30 border-b border-black/5 bg-[var(--fx-surface)] backdrop-blur-xl dark:bg-[var(--fx-surface)]/60", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 sm:px-6 xl:px-8 xl:pl-20", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex h-16 items-center justify-between", children: [
39
40
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
@@ -49,6 +50,7 @@ function AppTopbar({ title, subtitle, secondary, primary, actions, color }) {
49
50
  color,
50
51
  size: "sm",
51
52
  className: "shadow-sm",
53
+ rightIcon: a.badge != null && a.badge !== 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.default, { tone: "rose", size: "sm", className: "ml-1", children: a.badge }) : void 0,
52
54
  children: a.label
53
55
  },
54
56
  `action-${idx}-${a.label}`
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import Button from "./Button";
4
+ import Badge from "./Badge";
4
5
  function AppTopbar({ title, subtitle, secondary, primary, actions, color }) {
5
6
  return /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-30 border-b border-black/5 bg-[var(--fx-surface)] backdrop-blur-xl dark:bg-[var(--fx-surface)]/60", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-6 xl:px-8 xl:pl-20", children: /* @__PURE__ */ jsxs("div", { className: "flex h-16 items-center justify-between", children: [
6
7
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs("div", { children: [
@@ -16,6 +17,7 @@ function AppTopbar({ title, subtitle, secondary, primary, actions, color }) {
16
17
  color,
17
18
  size: "sm",
18
19
  className: "shadow-sm",
20
+ rightIcon: a.badge != null && a.badge !== 0 ? /* @__PURE__ */ jsx(Badge, { tone: "rose", size: "sm", className: "ml-1", children: a.badge }) : void 0,
19
21
  children: a.label
20
22
  },
21
23
  `action-${idx}-${a.label}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framepexls-ui-lib",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "Componentes UI de Framepexls para React/Next.",