@net-advantage/nabs-ui-toolbar 0.35.0 → 0.36.0
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.
- package/dist/Toolbar.d.ts +2 -0
- package/dist/Toolbar.types.d.ts +25 -0
- package/dist/index.d.ts +2 -0
- package/dist/toolbar.utils.d.ts +3 -0
- package/package.json +2 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentType, MouseEvent, ReactNode, SVGProps } from 'react';
|
|
2
|
+
export type ToolbarLabelPosition = "left" | "right" | "top" | "bottom";
|
|
3
|
+
export type ToolbarIconComponent = ComponentType<SVGProps<SVGSVGElement>>;
|
|
4
|
+
export interface ToolbarItem {
|
|
5
|
+
id: string;
|
|
6
|
+
icon?: ToolbarIconComponent;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
labelPosition?: ToolbarLabelPosition;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
title?: string;
|
|
11
|
+
pressed?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ToolbarItemSelectDetails {
|
|
14
|
+
itemId: string;
|
|
15
|
+
item: ToolbarItem;
|
|
16
|
+
event: MouseEvent<HTMLButtonElement>;
|
|
17
|
+
}
|
|
18
|
+
export interface ToolbarProps extends Omit<ComponentPropsWithoutRef<"div">, "children" | "role"> {
|
|
19
|
+
items: ToolbarItem[];
|
|
20
|
+
activeItemId?: string;
|
|
21
|
+
onItemSelect?: (details: ToolbarItemSelectDetails) => void;
|
|
22
|
+
buttonClassName?: string;
|
|
23
|
+
iconClassName?: string;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
}
|
package/dist/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net-advantage/nabs-ui-toolbar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Reusable toolbar control for the Nabs UI library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/nabs-ui-toolbar.cjs",
|
|
7
7
|
"module": "./dist/nabs-ui-toolbar.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"import": "./dist/nabs-ui-toolbar.js",
|