@sesamehr/react-design-system 0.1.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/LICENSE +21 -0
- package/README.md +89 -0
- package/dist/Button/Button.d.ts +12 -0
- package/dist/Button/index.d.ts +7 -0
- package/dist/Data/Table/Table.d.ts +43 -0
- package/dist/Data/Table/TableAvatar/TableAvatar.d.ts +13 -0
- package/dist/Data/Table/TableBody/TableBody.d.ts +21 -0
- package/dist/Data/Table/TableBulkHeader/TableBulkHeader.d.ts +13 -0
- package/dist/Data/Table/TableCell/TableCell.d.ts +8 -0
- package/dist/Data/Table/TableColumnVisibility/TableColumnVisibility.d.ts +10 -0
- package/dist/Data/Table/TableDragCell/TableDragCell.d.ts +6 -0
- package/dist/Data/Table/TableEmpty/TableEmpty.d.ts +3 -0
- package/dist/Data/Table/TableExpandCell/TableExpandCell.d.ts +6 -0
- package/dist/Data/Table/TableFixed/TableFixed.d.ts +27 -0
- package/dist/Data/Table/TableFixed/index.d.ts +1 -0
- package/dist/Data/Table/TableHead/TableHead.d.ts +3 -0
- package/dist/Data/Table/TableHeaderCell/TableHeaderCell.d.ts +18 -0
- package/dist/Data/Table/TablePagination/TablePagination.d.ts +10 -0
- package/dist/Data/Table/TableRow/TableRow.d.ts +11 -0
- package/dist/Data/Table/TableRow/rowDrag.d.ts +17 -0
- package/dist/Data/Table/TableRowExpanded/TableRowExpanded.d.ts +5 -0
- package/dist/Data/Table/TableSelectCell/TableSelectCell.d.ts +9 -0
- package/dist/Data/Table/hooks/index.d.ts +20 -0
- package/dist/Data/Table/hooks/useDragToScroll/useDragToScroll.d.ts +19 -0
- package/dist/Data/Table/hooks/useFixedColumns.d.ts +8 -0
- package/dist/Data/Table/hooks/useScrollShadow/useScrollShadow.d.ts +14 -0
- package/dist/Data/Table/hooks/useTable/useTable.d.ts +3 -0
- package/dist/Data/Table/hooks/useTable/useTable.types.d.ts +55 -0
- package/dist/Data/Table/hooks/useTableColumns/useTableColumns.d.ts +2 -0
- package/dist/Data/Table/hooks/useTableColumns/useTableColumns.types.d.ts +31 -0
- package/dist/Data/Table/hooks/useTableDetailRow/useTableDetailRow.d.ts +2 -0
- package/dist/Data/Table/hooks/useTableDetailRow/useTableDetailRow.types.d.ts +29 -0
- package/dist/Data/Table/hooks/useTablePagination/useTablePagination.d.ts +44 -0
- package/dist/Data/Table/hooks/useTablePinning/index.d.ts +2 -0
- package/dist/Data/Table/hooks/useTablePinning/useTablePinning.d.ts +2 -0
- package/dist/Data/Table/hooks/useTablePinning/useTablePinning.types.d.ts +50 -0
- package/dist/Data/Table/hooks/useTableSelection/useTableSelection.d.ts +2 -0
- package/dist/Data/Table/hooks/useTableSelection/useTableSelection.types.d.ts +31 -0
- package/dist/Data/Table/hooks/useTableSorting/useTableSorting.d.ts +2 -0
- package/dist/Data/Table/hooks/useTableSorting/useTableSorting.types.d.ts +24 -0
- package/dist/Data/Table/index.d.ts +17 -0
- package/dist/Data/Table/types.d.ts +90 -0
- package/dist/Display/Avatar/Avatar.d.ts +23 -0
- package/dist/Display/Avatar/hooks/useAvatarBullet.d.ts +16 -0
- package/dist/Display/Avatar/index.d.ts +9 -0
- package/dist/Display/AvatarGroup/AvatarGroup.d.ts +16 -0
- package/dist/Display/AvatarGroup/index.d.ts +1 -0
- package/dist/Display/Badge/Badge.d.ts +6 -0
- package/dist/Display/Badge/index.d.ts +6 -0
- package/dist/Display/PaymentCard/PaymentCard.d.ts +13 -0
- package/dist/Display/PaymentCard/index.d.ts +20 -0
- package/dist/Feedback/Alert/Alert.d.ts +18 -0
- package/dist/Feedback/Alert/AlertClose.d.ts +3 -0
- package/dist/Feedback/Alert/AlertDescription.d.ts +3 -0
- package/dist/Feedback/Alert/AlertIcon.d.ts +3 -0
- package/dist/Feedback/Alert/AlertTitle.d.ts +3 -0
- package/dist/Feedback/Alert/AlertToggle.d.ts +3 -0
- package/dist/Feedback/Alert/alert-context.d.ts +12 -0
- package/dist/Feedback/Alert/index.d.ts +7 -0
- package/dist/Feedback/Bullet/Bullet.d.ts +7 -0
- package/dist/Feedback/Bullet/index.d.ts +7 -0
- package/dist/Feedback/Dialog/Dialog.d.ts +12 -0
- package/dist/Feedback/Dialog/DialogContent.d.ts +6 -0
- package/dist/Feedback/Dialog/DialogDescription.d.ts +3 -0
- package/dist/Feedback/Dialog/DialogOverlay.d.ts +4 -0
- package/dist/Feedback/Dialog/DialogTitle.d.ts +3 -0
- package/dist/Feedback/Dialog/DialogTwoPanelContent.d.ts +8 -0
- package/dist/Feedback/Dialog/index.d.ts +7 -0
- package/dist/Feedback/Popover/Popover.d.ts +14 -0
- package/dist/Feedback/Popover/PopoverContent.d.ts +6 -0
- package/dist/Feedback/Popover/index.d.ts +3 -0
- package/dist/Feedback/StatusBadge/StatusBadge.d.ts +6 -0
- package/dist/Feedback/StatusBadge/index.d.ts +9 -0
- package/dist/Feedback/Tooltip/Tooltip.d.ts +16 -0
- package/dist/Feedback/Tooltip/TooltipContent.d.ts +6 -0
- package/dist/Feedback/Tooltip/index.d.ts +2 -0
- package/dist/Forms/Field/FieldGroup/FieldGroup.d.ts +4 -0
- package/dist/Forms/Field/FieldLabel/FieldLabel.d.ts +2 -0
- package/dist/Forms/Field/FieldMessage/FieldMessage.d.ts +5 -0
- package/dist/Forms/Field/index.d.ts +3 -0
- package/dist/Forms/Inputs/Combobox/Combobox.d.ts +27 -0
- package/dist/Forms/Inputs/Combobox/ComboboxChipsInput.d.ts +12 -0
- package/dist/Forms/Inputs/Combobox/ComboboxContent.d.ts +13 -0
- package/dist/Forms/Inputs/Combobox/ComboboxEmpty.d.ts +10 -0
- package/dist/Forms/Inputs/Combobox/ComboboxGroup.d.ts +7 -0
- package/dist/Forms/Inputs/Combobox/ComboboxInput.d.ts +14 -0
- package/dist/Forms/Inputs/Combobox/ComboboxItem.d.ts +10 -0
- package/dist/Forms/Inputs/Combobox/ComboboxSeparator.d.ts +10 -0
- package/dist/Forms/Inputs/Combobox/context.d.ts +26 -0
- package/dist/Forms/Inputs/Combobox/index.d.ts +8 -0
- package/dist/Forms/Inputs/Combobox/types.d.ts +8 -0
- package/dist/Forms/Inputs/InputGroup/InputGroup.d.ts +2 -0
- package/dist/Forms/Inputs/InputNumber/InputNumber.d.ts +18 -0
- package/dist/Forms/Inputs/InputNumber/InputNumberContent.d.ts +2 -0
- package/dist/Forms/Inputs/InputNumber/InputNumberContext.d.ts +20 -0
- package/dist/Forms/Inputs/InputNumber/InputNumberDecrement.d.ts +3 -0
- package/dist/Forms/Inputs/InputNumber/InputNumberIncrement.d.ts +3 -0
- package/dist/Forms/Inputs/InputNumber/InputNumberInput.d.ts +3 -0
- package/dist/Forms/Inputs/InputNumber/index.d.ts +5 -0
- package/dist/Forms/Inputs/InputText/InputText.d.ts +14 -0
- package/dist/Forms/Inputs/Toggle/Checkbox/Checkbox.d.ts +11 -0
- package/dist/Forms/Inputs/Toggle/RadioButton/RadioButton.d.ts +7 -0
- package/dist/Forms/Inputs/Toggle/RadioButton/RadioGroup.d.ts +9 -0
- package/dist/Forms/Inputs/Toggle/Switch/Switch.d.ts +13 -0
- package/dist/Forms/Inputs/Toggle/Switch/constants.d.ts +1 -0
- package/dist/Forms/Inputs/Toggle/ToggleDescription/ToggleDescription.d.ts +5 -0
- package/dist/Forms/Inputs/Toggle/ToggleGroup/ToggleGroup.d.ts +7 -0
- package/dist/Forms/Inputs/Toggle/ToggleLabel/ToggleLabel.d.ts +5 -0
- package/dist/Forms/Inputs/Toggle/index.d.ts +8 -0
- package/dist/Forms/Inputs/index.d.ts +5 -0
- package/dist/Layout/Resizable/Resizable.d.ts +13 -0
- package/dist/Layout/Resizable/ResizableHandle.d.ts +21 -0
- package/dist/Layout/Resizable/ResizablePanel.d.ts +20 -0
- package/dist/Layout/Resizable/index.d.ts +3 -0
- package/dist/Navigation/Accordion/Accordion.d.ts +4 -0
- package/dist/Navigation/Accordion/AccordionContent.d.ts +3 -0
- package/dist/Navigation/Accordion/AccordionItem.d.ts +3 -0
- package/dist/Navigation/Accordion/AccordionTrigger.d.ts +3 -0
- package/dist/Navigation/Accordion/index.d.ts +4 -0
- package/dist/Navigation/Breadcrumb/Breadcrumb.d.ts +2 -0
- package/dist/Navigation/Breadcrumb/BreadcrumbEllipsis.d.ts +2 -0
- package/dist/Navigation/Breadcrumb/BreadcrumbItem.d.ts +2 -0
- package/dist/Navigation/Breadcrumb/BreadcrumbLink.d.ts +7 -0
- package/dist/Navigation/Breadcrumb/BreadcrumbList.d.ts +2 -0
- package/dist/Navigation/Breadcrumb/BreadcrumbPage.d.ts +2 -0
- package/dist/Navigation/Breadcrumb/BreadcrumbSeparator.d.ts +2 -0
- package/dist/Navigation/Breadcrumb/index.d.ts +7 -0
- package/dist/Navigation/Tabs/Tabs.d.ts +4 -0
- package/dist/Navigation/Tabs/TabsContent.d.ts +3 -0
- package/dist/Navigation/Tabs/TabsList.d.ts +3 -0
- package/dist/Navigation/Tabs/TabsTrigger.d.ts +3 -0
- package/dist/Navigation/Tabs/index.d.ts +4 -0
- package/dist/Transitions/TransitionBase.d.ts +30 -0
- package/dist/Transitions/TransitionBounce/TransitionBounce.d.ts +7 -0
- package/dist/Transitions/TransitionBounce/index.d.ts +1 -0
- package/dist/Transitions/TransitionExpand/TransitionExpand.d.ts +7 -0
- package/dist/Transitions/TransitionExpand/index.d.ts +1 -0
- package/dist/Transitions/TransitionFade/TransitionFade.d.ts +7 -0
- package/dist/Transitions/TransitionFade/index.d.ts +1 -0
- package/dist/Transitions/TransitionFlip/TransitionFlip.d.ts +13 -0
- package/dist/Transitions/TransitionFlip/index.d.ts +1 -0
- package/dist/Transitions/TransitionSlideX/TransitionSlideX.d.ts +10 -0
- package/dist/Transitions/TransitionSlideX/index.d.ts +1 -0
- package/dist/Transitions/TransitionSlideY/TransitionSlideY.d.ts +10 -0
- package/dist/Transitions/TransitionSlideY/index.d.ts +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/main.d.ts +25 -0
- package/dist/react-design-system.css +1 -0
- package/dist/react-design-system.js +19498 -0
- package/dist/react-design-system.umd.cjs +165 -0
- package/package.json +94 -0
- package/src/assets/styles/mainTheme.css +1 -0
- package/src/assets/styles/primitives.css +98 -0
- package/src/assets/styles/theme-v2.css +298 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ColumnPinningState } from '@tanstack/react-table';
|
|
2
|
+
import { ColumnDef } from '../../types';
|
|
3
|
+
export interface PinningOptions<TData = unknown> {
|
|
4
|
+
/** Column definitions (needed for deriving pinning from col.pin) */
|
|
5
|
+
columns: ColumnDef<TData>[];
|
|
6
|
+
/** Initial pinning state (optional - derived from col.pin if not provided) */
|
|
7
|
+
initial?: ColumnPinningState;
|
|
8
|
+
}
|
|
9
|
+
export interface CellInfo<TData> {
|
|
10
|
+
columnId: string;
|
|
11
|
+
value: unknown;
|
|
12
|
+
row: TData;
|
|
13
|
+
rowIndex: number;
|
|
14
|
+
}
|
|
15
|
+
export interface HeaderInfo {
|
|
16
|
+
columnId: string;
|
|
17
|
+
header: string;
|
|
18
|
+
width?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface PinningInstance<TData> {
|
|
21
|
+
/** Current pinning state */
|
|
22
|
+
pinningState: ColumnPinningState;
|
|
23
|
+
/** Pin a column to left or right */
|
|
24
|
+
pinColumn: (columnId: string, position: 'left' | 'right') => void;
|
|
25
|
+
/** Unpin a column */
|
|
26
|
+
unpinColumn: (columnId: string) => void;
|
|
27
|
+
/** Check if a column is pinned */
|
|
28
|
+
isPinned: (columnId: string) => 'left' | 'right' | false;
|
|
29
|
+
/** Get cells for left pinned columns */
|
|
30
|
+
getLeftCells: (rowIndex: number) => CellInfo<TData>[];
|
|
31
|
+
/** Get cells for center (unpinned) columns */
|
|
32
|
+
getCenterCells: (rowIndex: number) => CellInfo<TData>[];
|
|
33
|
+
/** Get cells for right pinned columns */
|
|
34
|
+
getRightCells: (rowIndex: number) => CellInfo<TData>[];
|
|
35
|
+
/** Header info for left pinned columns */
|
|
36
|
+
leftHeaders: HeaderInfo[];
|
|
37
|
+
/** Header info for center columns */
|
|
38
|
+
centerHeaders: HeaderInfo[];
|
|
39
|
+
/** Header info for right pinned columns */
|
|
40
|
+
rightHeaders: HeaderInfo[];
|
|
41
|
+
/** Total width of left pinned columns */
|
|
42
|
+
leftWidth: number;
|
|
43
|
+
/** Total width of right pinned columns */
|
|
44
|
+
rightWidth: number;
|
|
45
|
+
}
|
|
46
|
+
export interface PinningPluginDef<TData = unknown> {
|
|
47
|
+
type: 'pinning';
|
|
48
|
+
options: PinningOptions<TData>;
|
|
49
|
+
create: (tableInstance: unknown, rows: TData[]) => PinningInstance<TData>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface SelectionOptions {
|
|
2
|
+
/** Initially selected row keys */
|
|
3
|
+
initial?: (string | number)[];
|
|
4
|
+
}
|
|
5
|
+
export interface SelectionInstance {
|
|
6
|
+
/** Selection state: Record<rowKey, boolean> */
|
|
7
|
+
selection: Record<string, boolean>;
|
|
8
|
+
/** Check if a specific row is selected */
|
|
9
|
+
isSelected: (key: string | number) => boolean;
|
|
10
|
+
/** Whether all rows are selected */
|
|
11
|
+
isAllSelected: boolean;
|
|
12
|
+
/** Whether some (but not all) rows are selected */
|
|
13
|
+
isSomeSelected: boolean;
|
|
14
|
+
/** Toggle selection for a specific row */
|
|
15
|
+
toggle: (key: string | number) => void;
|
|
16
|
+
/** Toggle selection for all rows */
|
|
17
|
+
toggleAll: () => void;
|
|
18
|
+
/** Select specific rows */
|
|
19
|
+
select: (keys: (string | number)[]) => void;
|
|
20
|
+
/** Deselect specific rows */
|
|
21
|
+
deselect: (keys: (string | number)[]) => void;
|
|
22
|
+
/** Clear all selection */
|
|
23
|
+
clear: () => void;
|
|
24
|
+
/** Array of selected keys */
|
|
25
|
+
selectedKeys: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface SelectionPluginDef<TData = unknown> {
|
|
28
|
+
type: 'selection';
|
|
29
|
+
options: SelectionOptions;
|
|
30
|
+
create: (rows: TData[], getRowKey: (row: TData, index: number) => string | number) => SelectionInstance;
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SortingState } from '../../types';
|
|
2
|
+
export interface SortingOptions {
|
|
3
|
+
/** Initial sorting state */
|
|
4
|
+
initial?: SortingState;
|
|
5
|
+
}
|
|
6
|
+
export interface SortingInstance {
|
|
7
|
+
/** Current sorting state */
|
|
8
|
+
sorting: SortingState | null;
|
|
9
|
+
/** Set sorting */
|
|
10
|
+
set: (sorting: SortingState | null) => void;
|
|
11
|
+
/** Toggle sorting for a field (asc -> desc -> none) */
|
|
12
|
+
toggle: (field: string) => void;
|
|
13
|
+
/** Clear sorting */
|
|
14
|
+
clear: () => void;
|
|
15
|
+
/** Check if a field is currently sorted */
|
|
16
|
+
isSorted: (field: string) => boolean;
|
|
17
|
+
/** Get sort direction for a field */
|
|
18
|
+
getDirection: (field: string) => 'asc' | 'desc' | null;
|
|
19
|
+
}
|
|
20
|
+
export interface SortingPluginDef {
|
|
21
|
+
type: 'sorting';
|
|
22
|
+
options: SortingOptions;
|
|
23
|
+
create: () => SortingInstance;
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Table, type TableComponentProps } from './Table';
|
|
2
|
+
export { TableHead, type TableHeadProps } from './TableHead/TableHead';
|
|
3
|
+
export { TableBody, type TableBodyProps } from './TableBody/TableBody';
|
|
4
|
+
export { TableRow, type TableRowProps } from './TableRow/TableRow';
|
|
5
|
+
export { TableCell, type TableCellProps } from './TableCell/TableCell';
|
|
6
|
+
export { TableHeaderCell, type TableHeaderCellProps, } from './TableHeaderCell/TableHeaderCell';
|
|
7
|
+
export { TableSelectCell, type TableSelectCellProps, } from './TableSelectCell/TableSelectCell';
|
|
8
|
+
export { TableDragCell, type TableDragCellProps, } from './TableDragCell/TableDragCell';
|
|
9
|
+
export { TableBulkHeader, type TableBulkHeaderProps, } from './TableBulkHeader/TableBulkHeader';
|
|
10
|
+
export { TablePagination, type TablePaginationProps, } from './TablePagination/TablePagination';
|
|
11
|
+
export { TableEmpty, type TableEmptyProps } from './TableEmpty/TableEmpty';
|
|
12
|
+
export { TableAvatar, type TableAvatarProps } from './TableAvatar/TableAvatar';
|
|
13
|
+
export { TableRowExpanded, type TableRowExpandedProps, } from './TableRowExpanded/TableRowExpanded';
|
|
14
|
+
export { TableExpandCell, type TableExpandCellProps, } from './TableExpandCell/TableExpandCell';
|
|
15
|
+
export { TableColumnVisibility, type TableColumnVisibilityProps, } from './TableColumnVisibility/TableColumnVisibility';
|
|
16
|
+
export { useTable, type UseTableOptions, type UseTableReturn, useTableSelection, type SelectionInstance as UseTableSelectionReturn, useTableSorting, type SortingInstance as UseTableSortingReturn, useTablePagination, type UseTablePaginationOptions, type UseTablePaginationReturn, useTableDetailRow, type DetailRowInstance, type DetailRowOptions, type DetailRowPluginDef, useTablePinning, type PinningOptions as UseTablePinningOptions, type PinningInstance as UseTablePinningReturn, type CellInfo, type HeaderInfo, useTableColumns, type ColumnsOptions as UseTableColumnsOptions, type ColumnsInstance as UseTableColumnsReturn, useScrollShadow, type UseScrollShadowOptions, type UseScrollShadowReturn, useDragToScroll, type UseDragToScrollOptions, type UseDragToScrollReturn, useFixedColumns, type UseFixedColumnsOptions, } from './hooks';
|
|
17
|
+
export type { TableProps, TableMode, ColumnDef, ColumnAlign, CellContext, SortingState, PaginationState, PaginationChangePayload, SortingChangePayload, SelectionChangePayload, FilterChangePayload, ColumnResizeMode, ColumnVisibilityState, ColumnOrderState, ExpandedState, ColumnVisibilityChangePayload, ColumnOrderChangePayload, RowExpandChangePayload, ColumnResizePayload, ColumnPinningState, } from './types';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ColumnAlign = 'left' | 'center' | 'right';
|
|
3
|
+
export interface ColumnDef<TData = unknown> {
|
|
4
|
+
field: string;
|
|
5
|
+
header?: string;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
resizable?: boolean;
|
|
8
|
+
/** Column width - accepts number (px), string with unit ('200px', '1rem', '20%') */
|
|
9
|
+
width?: string | number;
|
|
10
|
+
/** Tailwind width class (e.g., 'w-48', 'w-1/4') - takes precedence over width for styling */
|
|
11
|
+
widthClass?: string;
|
|
12
|
+
/** Text alignment for header and cells */
|
|
13
|
+
align?: ColumnAlign;
|
|
14
|
+
minWidth?: number;
|
|
15
|
+
maxWidth?: number;
|
|
16
|
+
enableHiding?: boolean;
|
|
17
|
+
/** Pin column to left or right edge (for fixed columns) */
|
|
18
|
+
pin?: 'left' | 'right';
|
|
19
|
+
cellSlot?: (props: CellContext<TData>) => ReactNode;
|
|
20
|
+
headerSlot?: () => ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface CellContext<TData = unknown> {
|
|
23
|
+
row: TData;
|
|
24
|
+
value: unknown;
|
|
25
|
+
rowIndex: number;
|
|
26
|
+
}
|
|
27
|
+
export type TableMode = 'client' | 'server';
|
|
28
|
+
export type ColumnResizeMode = 'onChange' | 'onEnd';
|
|
29
|
+
export interface SortingState {
|
|
30
|
+
field: string;
|
|
31
|
+
direction: 'asc' | 'desc';
|
|
32
|
+
}
|
|
33
|
+
export interface PaginationState {
|
|
34
|
+
page: number;
|
|
35
|
+
pageSize: number;
|
|
36
|
+
pageCount: number;
|
|
37
|
+
total: number;
|
|
38
|
+
}
|
|
39
|
+
export type ColumnVisibilityState = Record<string, boolean>;
|
|
40
|
+
export type ColumnOrderState = string[];
|
|
41
|
+
export type ExpandedState = Record<string, boolean> | true;
|
|
42
|
+
export interface ColumnPinningState {
|
|
43
|
+
left?: string[];
|
|
44
|
+
right?: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface TableState {
|
|
47
|
+
sorting: SortingState | null;
|
|
48
|
+
pagination: PaginationState;
|
|
49
|
+
selectedRows: Set<string | number>;
|
|
50
|
+
globalFilter: string;
|
|
51
|
+
columnVisibility: ColumnVisibilityState;
|
|
52
|
+
columnOrder: ColumnOrderState;
|
|
53
|
+
expanded: ExpandedState;
|
|
54
|
+
columnSizing: Record<string, number>;
|
|
55
|
+
}
|
|
56
|
+
export interface TableProps<TData = unknown> {
|
|
57
|
+
data: TData[];
|
|
58
|
+
mode?: TableMode;
|
|
59
|
+
rowKey?: string | ((row: TData) => string | number);
|
|
60
|
+
loading?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface PaginationChangePayload {
|
|
63
|
+
page: number;
|
|
64
|
+
pageSize: number;
|
|
65
|
+
}
|
|
66
|
+
export interface SortingChangePayload {
|
|
67
|
+
field: string;
|
|
68
|
+
direction: 'asc' | 'desc';
|
|
69
|
+
}
|
|
70
|
+
export interface SelectionChangePayload<TData = unknown> {
|
|
71
|
+
selectedKeys: (string | number)[];
|
|
72
|
+
selectedRows: TData[];
|
|
73
|
+
}
|
|
74
|
+
export interface FilterChangePayload {
|
|
75
|
+
globalFilter: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ColumnVisibilityChangePayload {
|
|
78
|
+
visibility: ColumnVisibilityState;
|
|
79
|
+
}
|
|
80
|
+
export interface ColumnOrderChangePayload {
|
|
81
|
+
order: ColumnOrderState;
|
|
82
|
+
}
|
|
83
|
+
export interface RowExpandChangePayload {
|
|
84
|
+
expanded: ExpandedState;
|
|
85
|
+
rowKey?: string | number;
|
|
86
|
+
}
|
|
87
|
+
export interface ColumnResizePayload {
|
|
88
|
+
field: string;
|
|
89
|
+
size: number;
|
|
90
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AvatarVariants } from '.';
|
|
2
|
+
import { BulletVariants } from '../../Feedback/Bullet';
|
|
3
|
+
export interface AvatarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
4
|
+
/** Image source URL */
|
|
5
|
+
src?: string;
|
|
6
|
+
/** Fallback initials (max 2 characters) */
|
|
7
|
+
initials?: string;
|
|
8
|
+
/** Avatar size */
|
|
9
|
+
size?: AvatarVariants['size'];
|
|
10
|
+
/** Disabled state - shows gray placeholder */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Status indicator color - automatically positions Bullet based on size */
|
|
13
|
+
status?: BulletVariants['color'];
|
|
14
|
+
/** Action slot (rendered top-right) */
|
|
15
|
+
action?: React.ReactNode;
|
|
16
|
+
/** Label slot (rendered bottom-center) */
|
|
17
|
+
label?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Avatar — mirrors `@orxata/core` Avatar. SVG hexagon shape with hover
|
|
21
|
+
* drop-shadow, clip-path image, foreignObject initials, and status Bullet.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Avatar: import('react').ForwardRefExoticComponent<AvatarProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AvatarVariants } from '..';
|
|
2
|
+
type AvatarSize = NonNullable<AvatarVariants['size']>;
|
|
3
|
+
interface BulletTopStyle {
|
|
4
|
+
top: string;
|
|
5
|
+
left: string;
|
|
6
|
+
}
|
|
7
|
+
interface BulletBottomStyle {
|
|
8
|
+
bottom: string;
|
|
9
|
+
left: string;
|
|
10
|
+
}
|
|
11
|
+
export type BulletStyle = BulletTopStyle | BulletBottomStyle;
|
|
12
|
+
export declare function useAvatarBullet(size: AvatarSize): {
|
|
13
|
+
bulletSize: "8" | "24" | "16" | "12" | null | undefined;
|
|
14
|
+
bulletStyle: BulletStyle;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { Avatar, type AvatarProps } from './Avatar';
|
|
3
|
+
export declare const avatarVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xs" | "2xl" | "xl" | "2xs" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const avatarTextVariants: (props?: ({
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xs" | "2xl" | "xl" | "2xs" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export type AvatarVariants = VariantProps<typeof avatarVariants>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface AvatarItem {
|
|
2
|
+
src?: string;
|
|
3
|
+
initials?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface AvatarGroupProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
|
|
7
|
+
/** List of avatars to display */
|
|
8
|
+
avatars: AvatarItem[];
|
|
9
|
+
/** Maximum number of avatars to show before collapsing */
|
|
10
|
+
max?: number;
|
|
11
|
+
/** Whether the group is interactive (clickable) */
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
/** Click handler (only fired when interactive) */
|
|
14
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
|
+
}
|
|
16
|
+
export declare const AvatarGroup: import('react').ForwardRefExoticComponent<AvatarGroupProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AvatarGroup, type AvatarGroupProps, type AvatarItem, } from './AvatarGroup';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BadgeVariants } from '.';
|
|
2
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
variant?: BadgeVariants['variant'];
|
|
4
|
+
}
|
|
5
|
+
/** Badge — mirrors `@orxata/core` Badge (cva-only). */
|
|
6
|
+
export declare const Badge: import('react').ForwardRefExoticComponent<BadgeProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { Badge, type BadgeProps } from './Badge';
|
|
3
|
+
export declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "outline" | "destructive" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BadgeType, CardData, PaymentCardVariants } from '.';
|
|
2
|
+
export interface PaymentCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Card size */
|
|
4
|
+
size?: PaymentCardVariants['size'];
|
|
5
|
+
/** Disabled state (reduces opacity) */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Badge type to display */
|
|
8
|
+
badgeType?: BadgeType;
|
|
9
|
+
/** Card data (number, name, expiry, last digits) */
|
|
10
|
+
cardData?: CardData;
|
|
11
|
+
}
|
|
12
|
+
/** PaymentCard — mirrors `@orxata/core` PaymentCard. */
|
|
13
|
+
export declare const PaymentCard: import('react').ForwardRefExoticComponent<PaymentCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { PaymentCard, type PaymentCardProps } from './PaymentCard';
|
|
3
|
+
export declare const paymentCardVariants: (props?: ({
|
|
4
|
+
size?: "default" | "compact" | null | undefined;
|
|
5
|
+
disabled?: boolean | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type PaymentCardVariants = VariantProps<typeof paymentCardVariants>;
|
|
8
|
+
export type BadgeType = 'virtual' | 'physical' | 'subscription';
|
|
9
|
+
export interface CardData {
|
|
10
|
+
/** Card number (masked) */
|
|
11
|
+
cardNumber?: string;
|
|
12
|
+
/** Cardholder name */
|
|
13
|
+
cardholderName?: string;
|
|
14
|
+
/** Expiry date */
|
|
15
|
+
expiryDate?: string;
|
|
16
|
+
/** CVC (masked) */
|
|
17
|
+
cvc?: string;
|
|
18
|
+
/** Last 4 digits (for compact view) */
|
|
19
|
+
lastFourDigits?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AlertVariant } from './alert-context';
|
|
2
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onToggle'> {
|
|
3
|
+
variant?: AlertVariant;
|
|
4
|
+
dismissible?: boolean;
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
/** Emitted when the alert is dismissed (maps Vue `dismissed`). */
|
|
8
|
+
onDismissed?: () => void;
|
|
9
|
+
/** Emitted with the next open state (maps Vue `update:isOpen`). */
|
|
10
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
11
|
+
/** Emitted with the next open state (maps Vue `toggled`). */
|
|
12
|
+
onToggled?: (open: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Alert — mirrors `@orxata/core` Alert.
|
|
16
|
+
* Vue `provide/inject` context becomes React context (`AlertContext`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const Alert: import('react').ForwardRefExoticComponent<AlertProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type AlertCloseProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2
|
+
/** AlertClose — dismisses the parent Alert via context. */
|
|
3
|
+
export declare const AlertClose: import('react').ForwardRefExoticComponent<AlertCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
|
|
2
|
+
/** AlertDescription — hidden when a collapsible Alert is closed. */
|
|
3
|
+
export declare const AlertDescription: import('react').ForwardRefExoticComponent<AlertDescriptionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type AlertIconProps = React.HTMLAttributes<HTMLDivElement>;
|
|
2
|
+
/** AlertIcon — renders the variant's default lucide icon, or `children` if provided. */
|
|
3
|
+
export declare const AlertIcon: import('react').ForwardRefExoticComponent<AlertIconProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type AlertToggleProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2
|
+
/** AlertToggle — toggles the collapsible Alert via context. */
|
|
3
|
+
export declare const AlertToggle: import('react').ForwardRefExoticComponent<AlertToggleProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AlertVariant = 'warning' | 'error' | 'info' | 'success';
|
|
2
|
+
export interface AlertContextValue {
|
|
3
|
+
variant: AlertVariant;
|
|
4
|
+
isDismissed: boolean;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
dismissible: boolean;
|
|
7
|
+
collapsible: boolean;
|
|
8
|
+
handleDismiss: () => void;
|
|
9
|
+
handleToggle: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const AlertContext: import('react').Context<AlertContextValue>;
|
|
12
|
+
export declare const useAlertContext: () => AlertContextValue;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Alert, type AlertProps } from './Alert';
|
|
2
|
+
export { AlertClose, type AlertCloseProps } from './AlertClose';
|
|
3
|
+
export { AlertDescription, type AlertDescriptionProps, } from './AlertDescription';
|
|
4
|
+
export { AlertIcon, type AlertIconProps } from './AlertIcon';
|
|
5
|
+
export { AlertTitle, type AlertTitleProps } from './AlertTitle';
|
|
6
|
+
export { AlertToggle, type AlertToggleProps } from './AlertToggle';
|
|
7
|
+
export { type AlertVariant } from './alert-context';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BulletVariants } from '.';
|
|
2
|
+
export interface BulletProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
3
|
+
size?: BulletVariants['size'];
|
|
4
|
+
color?: BulletVariants['color'];
|
|
5
|
+
}
|
|
6
|
+
/** Bullet — mirrors `@orxata/core` Bullet (cva-only). */
|
|
7
|
+
export declare const Bullet: import('react').ForwardRefExoticComponent<BulletProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { Bullet, type BulletProps } from './Bullet';
|
|
3
|
+
export declare const bulletVariants: (props?: ({
|
|
4
|
+
size?: "8" | "24" | "16" | "12" | null | undefined;
|
|
5
|
+
color?: "active" | "warning" | "info" | "neutral" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type BulletVariants = VariantProps<typeof bulletVariants>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DialogProps {
|
|
2
|
+
children?: React.ReactNode;
|
|
3
|
+
defaultOpen?: boolean;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
modal?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Dialog — maps reka-ui `DialogRoot` to `@radix-ui/react-dialog`. */
|
|
9
|
+
export declare const Dialog: {
|
|
10
|
+
({ children, defaultOpen, open, onOpenChange, modal, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
3
|
+
showCloseButton?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** DialogContent — portalled Radix dialog content with overlay and close button. */
|
|
6
|
+
export declare const DialogContent: import('react').ForwardRefExoticComponent<DialogContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
export type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
3
|
+
export declare const DialogDescription: import('react').ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
export type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
3
|
+
/** DialogOverlay — the dimmed backdrop behind dialog content. */
|
|
4
|
+
export declare const DialogOverlay: import('react').ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
export type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
3
|
+
export declare const DialogTitle: import('react').ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>, "ref"> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
export interface DialogTwoPanelContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
3
|
+
showCloseButton?: boolean;
|
|
4
|
+
/** Aside panel content (maps Vue `#aside` slot). */
|
|
5
|
+
aside?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** DialogTwoPanelContent — two-column dialog (main + aside) with close button. */
|
|
8
|
+
export declare const DialogTwoPanelContent: import('react').ForwardRefExoticComponent<DialogTwoPanelContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Dialog, type DialogProps } from './Dialog';
|
|
2
|
+
export { DialogContent, type DialogContentProps } from './DialogContent';
|
|
3
|
+
export { DialogTitle, type DialogTitleProps } from './DialogTitle';
|
|
4
|
+
export { DialogDescription, type DialogDescriptionProps, } from './DialogDescription';
|
|
5
|
+
export { DialogOverlay, type DialogOverlayProps } from './DialogOverlay';
|
|
6
|
+
export { DialogTwoPanelContent, type DialogTwoPanelContentProps, } from './DialogTwoPanelContent';
|
|
7
|
+
export { Trigger as DialogTrigger, Close as DialogClose, } from '@radix-ui/react-dialog';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PopoverProps {
|
|
2
|
+
/** Trigger element (maps Vue `#trigger` slot); rendered via Radix `asChild`. */
|
|
3
|
+
trigger?: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
modal?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Popover — maps reka-ui `PopoverRoot/Trigger` to `@radix-ui/react-popover`. */
|
|
11
|
+
export declare const Popover: {
|
|
12
|
+
({ trigger, children, defaultOpen, open, onOpenChange, modal, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
+
export interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
3
|
+
showArrow?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** PopoverContent — portalled Radix popover content with optional arrow. */
|
|
6
|
+
export declare const PopoverContent: import('react').ForwardRefExoticComponent<PopoverContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StatusBadgeVariants } from '.';
|
|
2
|
+
export interface StatusBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
status?: StatusBadgeVariants['status'];
|
|
4
|
+
}
|
|
5
|
+
/** StatusBadge — mirrors `@orxata/core` StatusBadge (cva-only). */
|
|
6
|
+
export declare const StatusBadge: import('react').ForwardRefExoticComponent<StatusBadgeProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { StatusBadge, type StatusBadgeProps } from './StatusBadge';
|
|
3
|
+
export declare const statusBadgeVariants: (props?: ({
|
|
4
|
+
status?: "paused" | "active" | "draft" | "completed" | "scheduled" | "deleted" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const indicatorVariants: (props?: ({
|
|
7
|
+
status?: "paused" | "active" | "draft" | "completed" | "scheduled" | "deleted" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export type StatusBadgeVariants = VariantProps<typeof statusBadgeVariants>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TooltipProps {
|
|
2
|
+
/** Trigger element (maps Vue `#trigger` slot); rendered via Radix `asChild`. */
|
|
3
|
+
trigger?: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
delayDuration?: number;
|
|
9
|
+
skipDelayDuration?: number;
|
|
10
|
+
disableHoverableContent?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Tooltip — maps reka-ui `TooltipProvider/Root/Trigger` to `@radix-ui/react-tooltip`. */
|
|
13
|
+
export declare const Tooltip: {
|
|
14
|
+
({ trigger, children, defaultOpen, open, onOpenChange, delayDuration, skipDelayDuration, disableHoverableContent, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
export interface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {
|
|
3
|
+
showArrow?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** TooltipContent — portalled Radix tooltip content with optional arrow. */
|
|
6
|
+
export declare const TooltipContent: import('react').ForwardRefExoticComponent<TooltipContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export interface FieldGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
variant?: 'default' | 'error' | 'success' | 'warning';
|
|
3
|
+
}
|
|
4
|
+
export declare const FieldGroup: import('react').ForwardRefExoticComponent<FieldGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface FieldMessageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
message?: string;
|
|
3
|
+
variant?: 'default' | 'error' | 'success' | 'warning';
|
|
4
|
+
}
|
|
5
|
+
export declare const FieldMessage: import('react').ForwardRefExoticComponent<FieldMessageProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ComboboxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
2
|
+
/** Controlled selection (`string` single / `string[]` multiple). */
|
|
3
|
+
value?: string | string[];
|
|
4
|
+
/** Uncontrolled initial selection. */
|
|
5
|
+
defaultValue?: string | string[];
|
|
6
|
+
/** Emitted when the selection changes. */
|
|
7
|
+
onValueChange?: (value: string | string[]) => void;
|
|
8
|
+
/** Allow selecting multiple values (renders chips with `ComboboxChipsInput`). */
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
/** Disable the input and trigger. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Controlled open state. */
|
|
13
|
+
open?: boolean;
|
|
14
|
+
/** Uncontrolled initial open state. */
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
/** Emitted when the open state changes. */
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Combobox root — replaces reka-ui `ComboboxRoot`.
|
|
22
|
+
*
|
|
23
|
+
* reka had no React equivalent, so this is `@radix-ui/react-popover` for the
|
|
24
|
+
* open/close shell plus a small context (see `context.ts`) carrying the
|
|
25
|
+
* selection, `multiple`, `disabled` and search state that the parts share.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Combobox: import('react').ForwardRefExoticComponent<ComboboxProps & import('react').RefAttributes<HTMLDivElement>>;
|