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
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
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
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { buttonVariants as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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:
|
|
14
|
-
"data-variant":
|
|
15
|
-
"data-size":
|
|
16
|
-
ref:
|
|
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
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
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
|
-
|
|
31
|
+
I.displayName = "Button";
|
|
27
32
|
export {
|
|
28
|
-
|
|
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.
|
|
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",
|