impact-nova 1.5.8 → 1.5.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.
@@ -1,5 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { buttonVariants } from './button-variants';
3
+ import { KeyBinding } from './command-palette/utils';
3
4
  import * as React from "react";
4
5
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
5
6
  /**
@@ -15,6 +16,12 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
15
16
  * @default "top"
16
17
  */
17
18
  tooltipSide?: "top" | "bottom" | "left" | "right";
19
+ /**
20
+ * Optional keyboard shortcut keybinding to display in the tooltip
21
+ * alongside the aria-label text as a styled Kbd badge.
22
+ * Only applies when the tooltip is shown (size="icon" + aria-label).
23
+ */
24
+ tooltipKeybinding?: KeyBinding;
18
25
  }
19
26
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
20
27
  export { Button };
@@ -1,29 +1,34 @@
1
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
- import * as f from "react";
3
- import { Slot as u } from "@radix-ui/react-slot";
1
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
+ import * as u from "react";
3
+ import { Slot as b } from "@radix-ui/react-slot";
4
4
  import "class-variance-authority";
5
- import { cn as p } from "../../lib/utils.js";
6
- import { Tooltip as b, TooltipTrigger as h, TooltipContent as T } from "./tooltip.js";
7
- import { buttonVariants as x } from "./button-variants.js";
8
- const C = f.forwardRef(
9
- ({ className: r, variant: n, size: a, asChild: e = !1, tooltipSide: l = "top", ...t }, s) => {
10
- const c = e ? u : "button", m = a === "icon" && t["aria-label"], i = /* @__PURE__ */ o(
11
- c,
5
+ import { cn as h } from "../../lib/utils.js";
6
+ import { Tooltip as p, TooltipTrigger as x, TooltipContent as T } from "./tooltip.js";
7
+ import { buttonVariants as N } from "./button-variants.js";
8
+ import { Kbd as C } from "./command-palette/kbd.js";
9
+ const I = u.forwardRef(
10
+ ({ className: l, variant: i, size: o, asChild: s = !1, tooltipSide: m = "top", tooltipKeybinding: e, ...t }, c) => {
11
+ const d = s ? b : "button", f = o === "icon" && t["aria-label"] || e && t["aria-label"], r = /* @__PURE__ */ a(
12
+ d,
12
13
  {
13
- className: p(x({ variant: n, size: a, className: r })),
14
- "data-variant": n ?? "default",
15
- "data-size": a ?? "default",
16
- ref: s,
14
+ className: h(N({ variant: i, size: o, className: l })),
15
+ "data-variant": i ?? "default",
16
+ "data-size": o ?? "default",
17
+ ref: c,
17
18
  ...t
18
19
  }
19
20
  );
20
- return m ? /* @__PURE__ */ d(b, { children: [
21
- /* @__PURE__ */ o(h, { asChild: !0, children: t.disabled ? /* @__PURE__ */ o("span", { tabIndex: -1, className: "inline-block outline-none", children: i }) : i }),
22
- /* @__PURE__ */ o(T, { variant: "tertiary", side: l, children: t["aria-label"] })
23
- ] }) : i;
21
+ return f ? /* @__PURE__ */ n(p, { children: [
22
+ /* @__PURE__ */ a(x, { asChild: !0, children: t.disabled ? /* @__PURE__ */ a("span", { tabIndex: -1, className: "inline-block outline-none", children: r }) : r }),
23
+ /* @__PURE__ */ a(T, { variant: "tertiary", side: m, children: e ? /* @__PURE__ */ n("span", { className: "flex items-center gap-2", children: [
24
+ t["aria-label"],
25
+ " ",
26
+ /* @__PURE__ */ a(C, { keybinding: e, size: "sm" })
27
+ ] }) : t["aria-label"] })
28
+ ] }) : r;
24
29
  }
25
30
  );
26
- C.displayName = "Button";
31
+ I.displayName = "Button";
27
32
  export {
28
- C as Button
33
+ I as Button
29
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",