blunt-ui 0.2.1 → 0.3.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/README.md CHANGED
@@ -71,11 +71,7 @@ Sizes: `sm`, `md`, `lg`, `fullscreen`.
71
71
  A card with a clickable header that shows/hides its content. Supports controlled and uncontrolled modes, an optional subtitle, a slot for header actions, and an `accentColor` prop to tint the border and chevron.
72
72
 
73
73
  ```tsx
74
- <CollapsibleCard
75
- title="blunt-ui"
76
- subtitle="Subtitle"
77
- defaultOpen
78
- >
74
+ <CollapsibleCard title="blunt-ui" subtitle="Subtitle" defaultOpen>
79
75
  React component library in neo-brutalism style.
80
76
  </CollapsibleCard>
81
77
  ```
@@ -0,0 +1,5 @@
1
+ import { EditableTableProps } from './EditableTable.types';
2
+ export declare function EditableTable<T extends Record<string, unknown> = Record<string, unknown>>({ columns, defaultData, data: controlledData, onChange, size, addRowLabel, newRowFactory, deletable, className, style, }: EditableTableProps<T>): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace EditableTable {
4
+ var displayName: string;
5
+ }
@@ -0,0 +1,22 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { TableSizes } from '../Table/Table.types';
3
+ export type { TableSizes };
4
+ export interface EditableColumn<T = Record<string, unknown>> {
5
+ key: keyof T & string;
6
+ header: string;
7
+ width?: string;
8
+ editable?: boolean;
9
+ render?: (value: unknown, row: T, rowIndex: number) => ReactNode;
10
+ }
11
+ export interface EditableTableProps<T extends Record<string, unknown> = Record<string, unknown>> {
12
+ columns: EditableColumn<T>[];
13
+ defaultData?: T[];
14
+ data?: T[];
15
+ onChange?: (data: T[]) => void;
16
+ size?: TableSizes;
17
+ addRowLabel?: string;
18
+ newRowFactory?: () => T;
19
+ deletable?: boolean;
20
+ className?: string;
21
+ style?: CSSProperties;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { EditableTable } from './EditableTable';
2
+ export type { EditableTableProps, EditableColumn, } from './EditableTable.types';
@@ -0,0 +1,5 @@
1
+ import { TableProps } from './Table.types';
2
+ export declare function Table<T extends Record<string, unknown> = Record<string, unknown>>({ columns, data, size, variant, caption, className, style, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace Table {
4
+ var displayName: string;
5
+ }
@@ -0,0 +1,18 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type TableSizes = "sm" | "md" | "lg";
3
+ export type TableVariants = "default" | "striped" | "bordered";
4
+ export interface TableColumn<T = Record<string, unknown>> {
5
+ key: keyof T & string;
6
+ header: string;
7
+ width?: string;
8
+ render?: (value: unknown, row: T, rowIndex: number) => ReactNode;
9
+ }
10
+ export interface TableProps<T extends Record<string, unknown> = Record<string, unknown>> {
11
+ columns: TableColumn<T>[];
12
+ data: T[];
13
+ size?: TableSizes;
14
+ variant?: TableVariants;
15
+ caption?: string;
16
+ className?: string;
17
+ style?: CSSProperties;
18
+ }
@@ -0,0 +1,2 @@
1
+ export { Table } from './Table';
2
+ export type { TableProps, TableColumn, TableSizes, TableVariants } from './Table.types';