@stackone/malachite 0.28.0 → 0.28.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/index.d.ts +55 -2
- package/dist/index.js +2878 -2260
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,34 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
8
8
|
import { ReactNode } from 'react';
|
|
9
9
|
import { UseFormReturn } from 'react-hook-form';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* ActionMenu is a kebab-style overflow action menu. The trigger renders a
|
|
13
|
+
* three-dot icon button; on click, a popover appears with the given items.
|
|
14
|
+
* The popover is rendered to document.body via createPortal so it escapes
|
|
15
|
+
* any Shadow DOM or overflow:hidden ancestors.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ActionMenu: default_2.FC<ActionMenuProps>;
|
|
18
|
+
|
|
19
|
+
export declare type ActionMenuItem = {
|
|
20
|
+
type?: 'item';
|
|
21
|
+
key: string;
|
|
22
|
+
label: default_2.ReactNode;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
danger?: boolean;
|
|
26
|
+
tooltip?: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: 'divider';
|
|
29
|
+
key: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export declare interface ActionMenuProps {
|
|
33
|
+
items: ActionMenuItem[];
|
|
34
|
+
label?: string;
|
|
35
|
+
triggerIcon?: default_2.ReactNode;
|
|
36
|
+
minWidth?: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
11
39
|
export declare const Alert: default_2.FC<AlertProps>;
|
|
12
40
|
|
|
13
41
|
declare interface AlertProps {
|
|
@@ -223,6 +251,7 @@ export declare const CustomIcons: {
|
|
|
223
251
|
ManualWebhookIcon: FC<IconProps>;
|
|
224
252
|
MembersIcon: FC<IconProps>;
|
|
225
253
|
ModalIcon: FC<IconProps>;
|
|
254
|
+
MoreHorizontalIcon: FC<IconProps>;
|
|
226
255
|
NavbarCollapseIcon: FC<IconProps>;
|
|
227
256
|
NavbarExpandIcon: FC<IconProps>;
|
|
228
257
|
NotFoundIcon: FC<IconProps>;
|
|
@@ -244,6 +273,7 @@ export declare const CustomIcons: {
|
|
|
244
273
|
TrashIcon: FC<IconProps>;
|
|
245
274
|
UploadIcon: FC<IconProps>;
|
|
246
275
|
WarningCircleFilled: FC<IconProps>;
|
|
276
|
+
WarningTriangleIcon: FC<IconProps>;
|
|
247
277
|
WebhookEventsIcon: FC<IconProps>;
|
|
248
278
|
WebhookIcon: FC<IconProps>;
|
|
249
279
|
WebhookSigningSecretIcon: FC<IconProps>;
|
|
@@ -353,6 +383,7 @@ declare interface FlexProps {
|
|
|
353
383
|
direction?: FlexDirection;
|
|
354
384
|
fullHeight?: boolean;
|
|
355
385
|
grow?: boolean;
|
|
386
|
+
wrap?: boolean;
|
|
356
387
|
width?: string;
|
|
357
388
|
id?: string;
|
|
358
389
|
children?: default_2.ReactNode;
|
|
@@ -464,6 +495,7 @@ export declare interface LinkProps {
|
|
|
464
495
|
className?: string;
|
|
465
496
|
color?: 'default' | 'dimmed';
|
|
466
497
|
size?: FontSize;
|
|
498
|
+
underline?: boolean;
|
|
467
499
|
}
|
|
468
500
|
|
|
469
501
|
declare interface LinkProps_2 {
|
|
@@ -759,6 +791,7 @@ declare interface OverflowRowProps {
|
|
|
759
791
|
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
760
792
|
justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
761
793
|
className?: string;
|
|
794
|
+
renderOverflow?: (hiddenCount: number) => default_2.ReactNode;
|
|
762
795
|
}
|
|
763
796
|
|
|
764
797
|
export declare const Padded: default_2.FC<PaddedProps>;
|
|
@@ -992,11 +1025,11 @@ export declare interface SwatchProps {
|
|
|
992
1025
|
style?: default_2.CSSProperties;
|
|
993
1026
|
}
|
|
994
1027
|
|
|
995
|
-
export declare const Table: <T
|
|
1028
|
+
export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, error, errorTitle, errorSubTitle, bordered, showHeader, rowKey, scrollHeight, size, layout, headerVariant, rowClassName, rowVariant, onRow, onClickRow, rowSelection, pagination, className, style, }: TableProps<T>) => JSX_2.Element;
|
|
996
1029
|
|
|
997
1030
|
export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
998
1031
|
title: string | default_2.ReactNode;
|
|
999
|
-
dataIndex: keyof T;
|
|
1032
|
+
dataIndex: keyof T | (string & {});
|
|
1000
1033
|
key: string;
|
|
1001
1034
|
width?: string | number;
|
|
1002
1035
|
ellipsis?: boolean;
|
|
@@ -1014,6 +1047,8 @@ export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
|
1014
1047
|
|
|
1015
1048
|
export declare type TableColumns<T = Record<string, unknown>> = TableColumnDefinition<T>[];
|
|
1016
1049
|
|
|
1050
|
+
declare type TableHeaderVariant = 'inline' | 'detached';
|
|
1051
|
+
|
|
1017
1052
|
export declare type TablePaginationPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
1018
1053
|
|
|
1019
1054
|
declare type TableProps<T = Record<string, unknown>> = {
|
|
@@ -1030,9 +1065,11 @@ declare type TableProps<T = Record<string, unknown>> = {
|
|
|
1030
1065
|
type?: TableType;
|
|
1031
1066
|
size?: TableSize;
|
|
1032
1067
|
layout?: 'fixed' | 'auto';
|
|
1068
|
+
headerVariant?: TableHeaderVariant;
|
|
1033
1069
|
rowClassName?: (record: T, index: number) => string;
|
|
1034
1070
|
rowVariant?: (record: T, index: number) => RowVariant | undefined;
|
|
1035
1071
|
onRow?: (record: T, index: number) => TableRowActions<T>;
|
|
1072
|
+
onClickRow?: (record: T, index: number) => void;
|
|
1036
1073
|
rowSelection?: TableRowSelection<T>;
|
|
1037
1074
|
pagination?: {
|
|
1038
1075
|
current?: number;
|
|
@@ -1171,6 +1208,22 @@ declare interface TooltipProps {
|
|
|
1171
1208
|
isShrinkable?: boolean;
|
|
1172
1209
|
}
|
|
1173
1210
|
|
|
1211
|
+
/**
|
|
1212
|
+
* TruncatedTooltip renders its children in a single-line truncating container
|
|
1213
|
+
* (overflow:hidden + text-overflow:ellipsis + white-space:nowrap). It measures
|
|
1214
|
+
* the rendered content via ResizeObserver and only surfaces the malachite
|
|
1215
|
+
* Tooltip when the content is actually being cut off.
|
|
1216
|
+
*/
|
|
1217
|
+
export declare const TruncatedTooltip: default_2.FC<TruncatedTooltipProps>;
|
|
1218
|
+
|
|
1219
|
+
export declare interface TruncatedTooltipProps {
|
|
1220
|
+
text: default_2.ReactNode | string;
|
|
1221
|
+
children: default_2.ReactNode;
|
|
1222
|
+
delay?: number;
|
|
1223
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
1224
|
+
className?: string;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1174
1227
|
export declare const Typography: {
|
|
1175
1228
|
CodeText: FC<CodeTextProps>;
|
|
1176
1229
|
EllipsisText: FC<EllipsisTextProps>;
|