@ztwoint/z-ui 0.1.120 → 0.1.121

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.
@@ -4,5 +4,6 @@ export interface NavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
4
4
  leftIcon?: React.ReactNode;
5
5
  rightIcon?: React.ReactNode;
6
6
  label?: string;
7
+ asTag?: React.ElementType;
7
8
  }
8
9
  export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,32 +1,32 @@
1
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import u from "react";
1
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
+ import p from "react";
3
3
  import { cn as f } from "../../../lib/utils.js";
4
- const p = u.forwardRef(
5
- ({ leftIcon: n, label: o, rightIcon: r, className: t, isActive: a, children: l, ...c }, d) => {
6
- const i = o ?? l, s = "w-3.5 h-3.5 min-w-max";
7
- return /* @__PURE__ */ m(
8
- "button",
4
+ const v = p.forwardRef(
5
+ ({ leftIcon: n, label: t, rightIcon: o, className: i, isActive: a, children: c, asTag: l = "button", ...d }, m) => {
6
+ const r = t ?? c, s = "w-3.5 h-3.5 min-w-max";
7
+ return /* @__PURE__ */ u(
8
+ l,
9
9
  {
10
- ref: d,
10
+ ref: m,
11
11
  className: f(
12
12
  "h-7.5 inline-flex items-center justify-center p-2 gap-1 rounded-lg",
13
13
  "hover:bg-background-inverted-elevated text-inverted-primary",
14
14
  "leading-none-medium-sm",
15
15
  "select-none hover:cursor-pointer disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring-default",
16
16
  a && "bg-background-inverted-elevated",
17
- t
17
+ i
18
18
  ),
19
- ...c,
19
+ ...d,
20
20
  children: [
21
21
  n && /* @__PURE__ */ e("span", { className: s, children: n }),
22
- i && /* @__PURE__ */ e("span", { children: i }),
23
- r && /* @__PURE__ */ e("span", { className: s, children: r })
22
+ r && /* @__PURE__ */ e("span", { children: r }),
23
+ o && /* @__PURE__ */ e("span", { className: s, children: o })
24
24
  ]
25
25
  }
26
26
  );
27
27
  }
28
28
  );
29
- p.displayName = "NavItem";
29
+ v.displayName = "NavItem";
30
30
  export {
31
- p as NavItem
31
+ v as NavItem
32
32
  };
@@ -4,5 +4,6 @@ export interface NavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
4
4
  leftIcon?: React.ReactNode;
5
5
  rightIcon?: React.ReactNode;
6
6
  label?: string;
7
+ asTag?: React.ElementType;
7
8
  }
8
9
  export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<HTMLButtonElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztwoint/z-ui",
3
- "version": "0.1.120",
3
+ "version": "0.1.121",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",