feat(ui): register favorite star and glyph-only actions

This commit is contained in:
Codex
2026-11-17 18:14:08 +03:00
parent 753d4d6edc
commit 3473cd9ef1
8 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nodedc/ui-react",
"version": "0.7.5",
"version": "0.7.6",
"type": "module",
"files": [
"dist"
+5
View File
@@ -65,12 +65,16 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
label: string;
shape?: "circle" | "rounded";
/** Glyph-only action; keeps the normal hit target and keyboard focus. */
surface?: "default" | "none";
loading?: boolean;
}
export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton({
label,
shape = "circle",
surface = "default",
style,
className,
children,
type = "button",
@@ -84,6 +88,7 @@ export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(functio
type={type}
className={cn("nodedc-icon-button", className)}
data-shape={shape === "circle" ? undefined : shape}
style={surface === "none" ? { ...style, background: "transparent", boxShadow: "none", color: "var(--nodedc-text-primary)" } : style}
aria-label={label}
title={label}
{...props}
+2
View File
@@ -64,6 +64,7 @@ import {
ShieldCheck,
SlidersHorizontal,
Square,
Star,
Terminal,
Trash2,
UploadCloud,
@@ -156,6 +157,7 @@ const icons = {
shield: ShieldCheck,
sliders: SlidersHorizontal,
stop: Square,
star: Star,
terminal: Terminal,
trash: Trash2,
upload: UploadCloud,