@paubox/ui 0.21.0 → 0.23.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@paubox/ui",
3
3
  "author": "Paubox, Inc.",
4
4
  "description": "Paubox Component Library",
5
- "version": "0.21.0",
5
+ "version": "0.23.0",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "publishConfig": {
@@ -1,5 +1,5 @@
1
- import { Button, MenuItemProps } from '@components';
2
1
  import { ComponentProps, ElementType, ReactNode, RefObject } from 'react';
2
+ import { Button, MenuItemProps } from '@components';
3
3
  export interface DropdownMenuProps {
4
4
  label: string;
5
5
  items?: MenuItemProps[];
@@ -12,5 +12,6 @@ export interface DropdownMenuProps {
12
12
  testId?: string;
13
13
  size?: 'small' | 'large';
14
14
  childContainerRefs?: RefObject<HTMLElement>[];
15
+ disabled?: boolean;
15
16
  }
16
- export declare const DropdownMenu: ({ label, items, children, open: openProp, onOpenChange, iconLeft, size, align, buttonProps, testId, childContainerRefs, }: DropdownMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
+ export declare const DropdownMenu: ({ label, items, children, open: openProp, onOpenChange, iconLeft, size, align, buttonProps, testId, childContainerRefs, disabled, }: DropdownMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { Dispatch, MutableRefObject, SetStateAction } from 'react';
2
+ export interface RowAction<T> {
3
+ label: string;
4
+ onClick: (row: T) => void;
5
+ icon?: React.ReactNode;
6
+ disabled?: boolean | ((row: T) => boolean);
7
+ }
8
+ interface RowContextMenuProps<T> {
9
+ anchorRef: MutableRefObject<HTMLElement | null>;
10
+ actions?: RowAction<T>[];
11
+ activeRow: T | null;
12
+ setActiveRow: Dispatch<SetStateAction<T | null>>;
13
+ }
14
+ export declare const RowContextMenu: <T extends object>({ anchorRef, actions, activeRow, setActiveRow, }: RowContextMenuProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -29,7 +29,6 @@ export interface RowAction<T> {
29
29
  onClick: (row: T) => void;
30
30
  icon?: React.ReactNode;
31
31
  disabled?: boolean | ((row: T) => boolean);
32
- show?: (row: T) => boolean;
33
32
  }
34
33
  interface TableStyleProps {
35
34
  dense?: boolean;
@@ -1,11 +0,0 @@
1
- import { Row } from '@tanstack/react-table';
2
- import { RowAction } from './Table';
3
- interface ContextMenuCellProps<T extends object> {
4
- row: Row<T>;
5
- setOpenMenuId: React.Dispatch<React.SetStateAction<string | null>>;
6
- openMenuId: string | null;
7
- contextMenuActions: RowAction<T>[];
8
- testId?: string;
9
- }
10
- export declare const ContextMenuCell: <T extends object>({ row, setOpenMenuId, openMenuId, contextMenuActions, testId, }: ContextMenuCellProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
11
- export {};