@rafal.lemieszewski/tide-ui 0.40.2 → 0.41.1
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/components/index.d.ts +4 -0
- package/dist/components/ui/custom-icons.d.ts +2 -0
- package/dist/components/ui/data-table.d.ts +36 -1
- package/dist/components/ui/status.d.ts +29 -0
- package/dist/components/ui/timeline.d.ts +58 -0
- package/dist/index.cjs.js +78 -8228
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +23071 -53530
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
|
@@ -22,9 +22,13 @@ export type { LabelProps } from './ui/label';
|
|
|
22
22
|
export { ScrollArea, ScrollBar } from './ui/scroll-area';
|
|
23
23
|
export { Separator } from './ui/separator';
|
|
24
24
|
export { Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonTable, skeletonVariants } from './ui/skeleton';
|
|
25
|
+
export { Status, statusConfig } from './ui/status';
|
|
26
|
+
export type { StatusProps, StatusValue, StatusConfig } from './ui/status';
|
|
25
27
|
export { Switch } from './ui/switch';
|
|
26
28
|
export { Textarea } from './ui/textarea';
|
|
27
29
|
export type { TextareaProps } from './ui/textarea';
|
|
30
|
+
export { Timeline, TimelineItem, TimelineSeparator, TimelineHeader, TimelineContent, TimelineDescription, TimelineTime, TimelineChevron, } from './ui/timeline';
|
|
31
|
+
export type { TimelineProps, TimelineItemProps, TimelineSeparatorProps, TimelineHeaderProps, TimelineContentProps, TimelineDescriptionProps, TimelineTimeProps, TimelineChevronProps, } from './ui/timeline';
|
|
28
32
|
export { Editable, EditablePreview, EditableInput, EditableDisplay, EditableField } from './ui/editable';
|
|
29
33
|
export type { EditableProps, EditablePreviewProps, EditableInputProps } from './ui/editable';
|
|
30
34
|
export { FormField, FormLabel, FormControl, FormHelperText, FormErrorMessage } from './ui/form-field';
|
|
@@ -38,6 +38,8 @@ export declare const customIcons: {
|
|
|
38
38
|
readonly "contract-rejected": import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
readonly "addenda-final": import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
readonly "contract-on-subs": import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
readonly "contract-canceled": import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
readonly "contract-failed": import("react/jsx-runtime").JSX.Element;
|
|
41
43
|
readonly approved: import("react/jsx-runtime").JSX.Element;
|
|
42
44
|
readonly "pending-approval": import("react/jsx-runtime").JSX.Element;
|
|
43
45
|
};
|
|
@@ -184,8 +184,43 @@ export interface DataTableProps<TData, TValue> {
|
|
|
184
184
|
onColumnSizingChange?: (updaterOrValue: Record<string, number> | ((old: Record<string, number>) => Record<string, number>)) => void;
|
|
185
185
|
renderSectionHeaderRow?: (row: any) => React.ReactNode | null;
|
|
186
186
|
autoExpandChildren?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Callback fired when a row is clicked.
|
|
189
|
+
* Receives the row object from @tanstack/react-table and the click event.
|
|
190
|
+
* Use row.original to access the underlying data.
|
|
191
|
+
*
|
|
192
|
+
* By default, only leaf rows and single-item groups are clickable.
|
|
193
|
+
* Use isRowClickable to customize which rows can be clicked.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* onRowClick={(row, event) => {
|
|
197
|
+
* console.log('Clicked data:', row.original);
|
|
198
|
+
* setSelectedItem(row.original);
|
|
199
|
+
* }}
|
|
200
|
+
*/
|
|
201
|
+
onRowClick?: (row: any, event: React.MouseEvent<HTMLTableRowElement>) => void;
|
|
202
|
+
/**
|
|
203
|
+
* Filter which rows should be clickable.
|
|
204
|
+
* Return false to prevent row from being clickable.
|
|
205
|
+
*
|
|
206
|
+
* By default, leaf rows and single-item groups are clickable.
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* // Only allow leaf rows to be clicked
|
|
210
|
+
* isRowClickable={(row) => !row.getIsGrouped()}
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* // Allow all rows including parent groups
|
|
214
|
+
* isRowClickable={(row) => true}
|
|
215
|
+
*/
|
|
216
|
+
isRowClickable?: (row: any) => boolean;
|
|
217
|
+
/**
|
|
218
|
+
* CSS class name to apply to clickable rows.
|
|
219
|
+
* Default: applies cursor-pointer and hover background if onRowClick is provided
|
|
220
|
+
*/
|
|
221
|
+
clickableRowClassName?: string;
|
|
187
222
|
}
|
|
188
|
-
export declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, title, className, stickyHeader, stickyFirstColumn, stickyLeftColumns, stickyRightColumns, enableResponsiveWrapper, showScrollIndicators, isLoading, loadingRowCount, borderStyle, enableGlobalSearch, globalSearchPlaceholder, enableGlobalFaceting, enableColumnResizing, columnResizeMode, enableColumnResizePersistence, storageKey, enableExpanding, getSubRows, enableGrouping, groupedColumnMode, enableManualGrouping, groupDisplayColumn, hideChildrenForSingleItemGroups, hideExpanderForSingleItemGroups, enableRowPinning, keepPinnedRows, enableVirtualization, nestedHeaders, enableNestedHeaders, enableColumnOrdering, enableRowSelection, showHeader, showPagination, onTableReady, initialState, sorting: controlledSorting, onSortingChange: onControlledSortingChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange: onControlledColumnVisibilityChange, grouping: controlledGrouping, onGroupingChange: onControlledGroupingChange, columnOrder: controlledColumnOrder, onColumnOrderChange: onControlledColumnOrderChange, columnSizing: controlledColumnSizing, onColumnSizingChange: onControlledColumnSizingChange, renderSectionHeaderRow, autoExpandChildren, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
223
|
+
export declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, title, className, stickyHeader, stickyFirstColumn, stickyLeftColumns, stickyRightColumns, enableResponsiveWrapper, showScrollIndicators, isLoading, loadingRowCount, borderStyle, enableGlobalSearch, globalSearchPlaceholder, enableGlobalFaceting, enableColumnResizing, columnResizeMode, enableColumnResizePersistence, storageKey, enableExpanding, getSubRows, enableGrouping, groupedColumnMode, enableManualGrouping, groupDisplayColumn, hideChildrenForSingleItemGroups, hideExpanderForSingleItemGroups, enableRowPinning, keepPinnedRows, enableVirtualization, nestedHeaders, enableNestedHeaders, enableColumnOrdering, enableRowSelection, showHeader, showPagination, onTableReady, initialState, sorting: controlledSorting, onSortingChange: onControlledSortingChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange: onControlledColumnVisibilityChange, grouping: controlledGrouping, onGroupingChange: onControlledGroupingChange, columnOrder: controlledColumnOrder, onColumnOrderChange: onControlledColumnOrderChange, columnSizing: controlledColumnSizing, onColumnSizingChange: onControlledColumnSizingChange, renderSectionHeaderRow, autoExpandChildren, onRowClick, isRowClickable, clickableRowClassName, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
189
224
|
export { DataTableColumnHeader, DataTableFilter, DataTableToolbar, DataTablePagination, DataTableSkeleton, fuzzyFilter, multiSelectFilter };
|
|
190
225
|
export { useReactTable } from '@tanstack/react-table';
|
|
191
226
|
export type { SortingState, ColumnFiltersState, VisibilityState, ExpandedState, GroupingState, ColumnOrderState, FilterFn, ColumnResizeMode, } from '@tanstack/react-table';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconColor } from './icon';
|
|
3
|
+
type StatusConfig = {
|
|
4
|
+
icon: string;
|
|
5
|
+
color: IconColor;
|
|
6
|
+
objectLabel: string;
|
|
7
|
+
statusLabel: string;
|
|
8
|
+
};
|
|
9
|
+
export type StatusValue = "order-draft" | "order-distributed" | "order-withdrawn" | "negotiation-indicative-offer" | "negotiation-indicative-bid" | "negotiation-firm-offer" | "negotiation-firm-bid" | "negotiation-firm" | "negotiation-on-subs" | "negotiation-fixed" | "negotiation-firm-offer-expired" | "negotiation-withdrawn" | "negotiation-firm-amendment" | "negotiation-subs-expired" | "negotiation-subs-failed" | "negotiation-on-subs-amendment" | "contract-draft" | "contract-working-copy" | "contract-final" | "contract-rejected" | "addenda-draft" | "addenda-working-copy" | "addenda-final" | "recap-manager-draft" | "recap-manager-on-subs" | "recap-manager-fully-fixed" | "recap-manager-canceled" | "recap-manager-failed";
|
|
10
|
+
declare const statusConfig: Record<StatusValue, StatusConfig>;
|
|
11
|
+
declare const textSizeClasses: {
|
|
12
|
+
readonly sm: "text-body-medium-sm";
|
|
13
|
+
readonly md: "text-body-medium-md";
|
|
14
|
+
readonly lg: "text-body-medium-lg";
|
|
15
|
+
};
|
|
16
|
+
type StatusSize = keyof typeof textSizeClasses;
|
|
17
|
+
export interface StatusProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** The status value (e.g., "order-draft", "negotiation-firm-offer") */
|
|
19
|
+
status: StatusValue;
|
|
20
|
+
/** Size variant */
|
|
21
|
+
size?: StatusSize;
|
|
22
|
+
/** Whether to show the object prefix in the label (e.g., "Order • Draft" vs "Draft") */
|
|
23
|
+
showObject?: boolean;
|
|
24
|
+
/** Whether the label color should match the icon color (default: true) */
|
|
25
|
+
coloredLabel?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare const Status: React.ForwardRefExoticComponent<StatusProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export { Status, statusConfig };
|
|
29
|
+
export type { StatusConfig };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CollapsibleContent } from './collapsible';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface TimelineProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Time threshold in milliseconds. If the time difference between consecutive
|
|
6
|
+
* TimelineItem timestamps exceeds this value, a TimelineSeparator will be
|
|
7
|
+
* automatically inserted between them.
|
|
8
|
+
*/
|
|
9
|
+
separatorThreshold?: number;
|
|
10
|
+
}
|
|
11
|
+
declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export interface TimelineItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
/**
|
|
14
|
+
* Whether this timeline item can be expanded/collapsed
|
|
15
|
+
*/
|
|
16
|
+
collapsible?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Default open state for uncontrolled collapsible items
|
|
19
|
+
*/
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Controlled open state
|
|
23
|
+
*/
|
|
24
|
+
open?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when open state changes
|
|
27
|
+
*/
|
|
28
|
+
onOpenChange?: (open: boolean) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Timestamp for this timeline item (used for automatic separator insertion)
|
|
31
|
+
*/
|
|
32
|
+
timestamp?: Date | number | string;
|
|
33
|
+
}
|
|
34
|
+
declare const TimelineItem: React.ForwardRefExoticComponent<TimelineItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export interface TimelineSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
36
|
+
}
|
|
37
|
+
declare const TimelineSeparator: React.ForwardRefExoticComponent<TimelineSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export interface TimelineHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
39
|
+
/**
|
|
40
|
+
* If true, the header will render as a CollapsibleTrigger
|
|
41
|
+
* This is automatically set when TimelineItem has collapsible={true}
|
|
42
|
+
*/
|
|
43
|
+
asCollapsibleTrigger?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const TimelineHeader: React.ForwardRefExoticComponent<TimelineHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export interface TimelineContentProps extends React.ComponentPropsWithoutRef<typeof CollapsibleContent> {
|
|
47
|
+
}
|
|
48
|
+
declare const TimelineContent: React.ForwardRefExoticComponent<TimelineContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
export interface TimelineDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
50
|
+
}
|
|
51
|
+
declare const TimelineDescription: React.ForwardRefExoticComponent<TimelineDescriptionProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export interface TimelineTimeProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
53
|
+
}
|
|
54
|
+
declare const TimelineTime: React.ForwardRefExoticComponent<TimelineTimeProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
55
|
+
export interface TimelineChevronProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
56
|
+
}
|
|
57
|
+
declare const TimelineChevron: React.ForwardRefExoticComponent<TimelineChevronProps & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
export { Timeline, TimelineItem, TimelineSeparator, TimelineHeader, TimelineContent, TimelineDescription, TimelineTime, TimelineChevron, };
|