@stackone/malachite 0.28.0 → 0.29.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/dist/index.d.ts +127 -3
- package/dist/index.js +3716 -2583
- 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>;
|
|
@@ -234,6 +263,7 @@ export declare const CustomIcons: {
|
|
|
234
263
|
RejectIcon: FC<IconProps>;
|
|
235
264
|
ReloadIcon: FC<IconProps>;
|
|
236
265
|
RequiredFieldIndicatorIcon: FC<IconProps>;
|
|
266
|
+
SearchIcon: FC<IconProps>;
|
|
237
267
|
SecurityIcon: FC<IconProps>;
|
|
238
268
|
SettingsIcon: FC<IconProps>;
|
|
239
269
|
SignOutIcon: FC<IconProps>;
|
|
@@ -244,6 +274,7 @@ export declare const CustomIcons: {
|
|
|
244
274
|
TrashIcon: FC<IconProps>;
|
|
245
275
|
UploadIcon: FC<IconProps>;
|
|
246
276
|
WarningCircleFilled: FC<IconProps>;
|
|
277
|
+
WarningTriangleIcon: FC<IconProps>;
|
|
247
278
|
WebhookEventsIcon: FC<IconProps>;
|
|
248
279
|
WebhookIcon: FC<IconProps>;
|
|
249
280
|
WebhookSigningSecretIcon: FC<IconProps>;
|
|
@@ -274,11 +305,15 @@ export declare enum DividerVariant {
|
|
|
274
305
|
Emphasis = "emphasis"
|
|
275
306
|
}
|
|
276
307
|
|
|
277
|
-
export declare const Dropdown: ({ items, onItemSelected, defaultValue, disabled, error, label, hint, tooltip, name, required, loading, menuLoading, formControl, description, helperText, placeholder, search, }: DropdownProps) => JSX_2.Element;
|
|
308
|
+
export declare const Dropdown: ({ items, onItemSelected, defaultValue, disabled, error, label, hint, tooltip, name, required, loading, menuLoading, formControl, description, helperText, placeholder, search, size, }: DropdownProps) => JSX_2.Element;
|
|
278
309
|
|
|
279
310
|
export declare interface DropdownItem {
|
|
280
311
|
id: string;
|
|
281
312
|
label: string;
|
|
313
|
+
/** Alternate label shown in the trigger when selected (falls back to `label`). */
|
|
314
|
+
triggerLabel?: string;
|
|
315
|
+
/** Items sharing a `group` render under a section header, in first-seen order. */
|
|
316
|
+
group?: string;
|
|
282
317
|
subtitle?: string;
|
|
283
318
|
rightSideText?: string;
|
|
284
319
|
rightSideTextVariant?: 'muted' | 'primary';
|
|
@@ -304,8 +339,12 @@ export declare interface DropdownProps {
|
|
|
304
339
|
helperText?: default_2.ReactNode;
|
|
305
340
|
placeholder?: string;
|
|
306
341
|
search?: boolean;
|
|
342
|
+
/** 'medium' (42px) for form inputs; 'small' (32px) for toolbar chips. */
|
|
343
|
+
size?: DropdownSize;
|
|
307
344
|
}
|
|
308
345
|
|
|
346
|
+
export declare type DropdownSize = 'small' | 'medium';
|
|
347
|
+
|
|
309
348
|
declare interface EllipsisTextProps {
|
|
310
349
|
children: default_2.ReactNode;
|
|
311
350
|
tooltip?: default_2.ReactNode | string;
|
|
@@ -353,6 +392,7 @@ declare interface FlexProps {
|
|
|
353
392
|
direction?: FlexDirection;
|
|
354
393
|
fullHeight?: boolean;
|
|
355
394
|
grow?: boolean;
|
|
395
|
+
wrap?: boolean;
|
|
356
396
|
width?: string;
|
|
357
397
|
id?: string;
|
|
358
398
|
children?: default_2.ReactNode;
|
|
@@ -464,6 +504,7 @@ export declare interface LinkProps {
|
|
|
464
504
|
className?: string;
|
|
465
505
|
color?: 'default' | 'dimmed';
|
|
466
506
|
size?: FontSize;
|
|
507
|
+
underline?: boolean;
|
|
467
508
|
}
|
|
468
509
|
|
|
469
510
|
declare interface LinkProps_2 {
|
|
@@ -751,6 +792,32 @@ declare interface MarkdownProps {
|
|
|
751
792
|
omitMargin?: boolean;
|
|
752
793
|
}
|
|
753
794
|
|
|
795
|
+
export declare const MultiSelect: default_2.FC<MultiSelectProps>;
|
|
796
|
+
|
|
797
|
+
export declare interface MultiSelectOption {
|
|
798
|
+
value: string;
|
|
799
|
+
label: default_2.ReactNode;
|
|
800
|
+
searchText?: string;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export declare interface MultiSelectProps {
|
|
804
|
+
options: MultiSelectOption[];
|
|
805
|
+
value: string[];
|
|
806
|
+
onChange: (next: string[]) => void;
|
|
807
|
+
placeholder?: string;
|
|
808
|
+
renderTrigger?: (selected: MultiSelectOption[]) => default_2.ReactNode;
|
|
809
|
+
searchable?: boolean;
|
|
810
|
+
size?: MultiSelectSize;
|
|
811
|
+
width?: string | number;
|
|
812
|
+
minWidth?: number;
|
|
813
|
+
disabled?: boolean;
|
|
814
|
+
label?: string;
|
|
815
|
+
className?: string;
|
|
816
|
+
style?: default_2.CSSProperties;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export declare type MultiSelectSize = 'small' | 'medium';
|
|
820
|
+
|
|
754
821
|
export declare const OverflowRow: default_2.FC<OverflowRowProps>;
|
|
755
822
|
|
|
756
823
|
declare interface OverflowRowProps {
|
|
@@ -759,6 +826,7 @@ declare interface OverflowRowProps {
|
|
|
759
826
|
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
760
827
|
justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
761
828
|
className?: string;
|
|
829
|
+
renderOverflow?: (hiddenCount: number) => default_2.ReactNode;
|
|
762
830
|
}
|
|
763
831
|
|
|
764
832
|
export declare const Padded: default_2.FC<PaddedProps>;
|
|
@@ -854,6 +922,21 @@ export declare function resetTheme(): void;
|
|
|
854
922
|
|
|
855
923
|
export declare type RowVariant = 'success' | 'warning' | 'error' | 'info';
|
|
856
924
|
|
|
925
|
+
export declare const Search: default_2.FC<SearchProps>;
|
|
926
|
+
|
|
927
|
+
export declare interface SearchProps {
|
|
928
|
+
value: string;
|
|
929
|
+
onChange: (value: string) => void;
|
|
930
|
+
placeholder?: string;
|
|
931
|
+
size?: SearchSize;
|
|
932
|
+
disabled?: boolean;
|
|
933
|
+
autoFocus?: boolean;
|
|
934
|
+
className?: string;
|
|
935
|
+
style?: default_2.CSSProperties;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
export declare type SearchSize = 'small' | 'medium';
|
|
939
|
+
|
|
857
940
|
declare interface SecondaryTextProps {
|
|
858
941
|
children: default_2.ReactNode;
|
|
859
942
|
fontWeight?: FontWeight;
|
|
@@ -992,11 +1075,17 @@ export declare interface SwatchProps {
|
|
|
992
1075
|
style?: default_2.CSSProperties;
|
|
993
1076
|
}
|
|
994
1077
|
|
|
995
|
-
export declare
|
|
1078
|
+
export declare interface TabItem {
|
|
1079
|
+
key: string;
|
|
1080
|
+
label: default_2.ReactNode;
|
|
1081
|
+
disabled?: boolean;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
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, stickyHeaderTop, }: TableProps<T>) => JSX_2.Element;
|
|
996
1085
|
|
|
997
1086
|
export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
998
1087
|
title: string | default_2.ReactNode;
|
|
999
|
-
dataIndex: keyof T;
|
|
1088
|
+
dataIndex: keyof T | (string & {});
|
|
1000
1089
|
key: string;
|
|
1001
1090
|
width?: string | number;
|
|
1002
1091
|
ellipsis?: boolean;
|
|
@@ -1014,6 +1103,8 @@ export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
|
1014
1103
|
|
|
1015
1104
|
export declare type TableColumns<T = Record<string, unknown>> = TableColumnDefinition<T>[];
|
|
1016
1105
|
|
|
1106
|
+
declare type TableHeaderVariant = 'inline' | 'detached';
|
|
1107
|
+
|
|
1017
1108
|
export declare type TablePaginationPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
1018
1109
|
|
|
1019
1110
|
declare type TableProps<T = Record<string, unknown>> = {
|
|
@@ -1030,9 +1121,11 @@ declare type TableProps<T = Record<string, unknown>> = {
|
|
|
1030
1121
|
type?: TableType;
|
|
1031
1122
|
size?: TableSize;
|
|
1032
1123
|
layout?: 'fixed' | 'auto';
|
|
1124
|
+
headerVariant?: TableHeaderVariant;
|
|
1033
1125
|
rowClassName?: (record: T, index: number) => string;
|
|
1034
1126
|
rowVariant?: (record: T, index: number) => RowVariant | undefined;
|
|
1035
1127
|
onRow?: (record: T, index: number) => TableRowActions<T>;
|
|
1128
|
+
onClickRow?: (record: T, index: number) => void;
|
|
1036
1129
|
rowSelection?: TableRowSelection<T>;
|
|
1037
1130
|
pagination?: {
|
|
1038
1131
|
current?: number;
|
|
@@ -1048,6 +1141,11 @@ declare type TableProps<T = Record<string, unknown>> = {
|
|
|
1048
1141
|
};
|
|
1049
1142
|
className?: string;
|
|
1050
1143
|
style?: default_2.CSSProperties;
|
|
1144
|
+
/** When set, makes the detached-variant header sticky at this offset (px) from the
|
|
1145
|
+
* top of the nearest scrolling ancestor. Use this when the table sits inside a
|
|
1146
|
+
* page-level scroll container with other sticky elements (e.g. tabs + toolbar)
|
|
1147
|
+
* stacked above. */
|
|
1148
|
+
stickyHeaderTop?: number;
|
|
1051
1149
|
};
|
|
1052
1150
|
|
|
1053
1151
|
declare type TableRowActions<T = Record<string, unknown>> = {
|
|
@@ -1080,6 +1178,16 @@ export declare type TableSize = 'small' | 'medium' | 'large';
|
|
|
1080
1178
|
|
|
1081
1179
|
export declare type TableType = 'default' | 'compact' | 'bordered';
|
|
1082
1180
|
|
|
1181
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
|
1182
|
+
|
|
1183
|
+
export declare interface TabsProps {
|
|
1184
|
+
items: TabItem[];
|
|
1185
|
+
activeKey: string;
|
|
1186
|
+
onChange: (key: string) => void;
|
|
1187
|
+
className?: string;
|
|
1188
|
+
style?: default_2.CSSProperties;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1083
1191
|
export declare const Tag: default_2.FC<TagProps>;
|
|
1084
1192
|
|
|
1085
1193
|
export declare interface TagProps {
|
|
@@ -1171,6 +1279,22 @@ declare interface TooltipProps {
|
|
|
1171
1279
|
isShrinkable?: boolean;
|
|
1172
1280
|
}
|
|
1173
1281
|
|
|
1282
|
+
/**
|
|
1283
|
+
* TruncatedTooltip renders its children in a single-line truncating container
|
|
1284
|
+
* (overflow:hidden + text-overflow:ellipsis + white-space:nowrap). It measures
|
|
1285
|
+
* the rendered content via ResizeObserver and only surfaces the malachite
|
|
1286
|
+
* Tooltip when the content is actually being cut off.
|
|
1287
|
+
*/
|
|
1288
|
+
export declare const TruncatedTooltip: default_2.FC<TruncatedTooltipProps>;
|
|
1289
|
+
|
|
1290
|
+
export declare interface TruncatedTooltipProps {
|
|
1291
|
+
text: default_2.ReactNode | string;
|
|
1292
|
+
children: default_2.ReactNode;
|
|
1293
|
+
delay?: number;
|
|
1294
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
1295
|
+
className?: string;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1174
1298
|
export declare const Typography: {
|
|
1175
1299
|
CodeText: FC<CodeTextProps>;
|
|
1176
1300
|
EllipsisText: FC<EllipsisTextProps>;
|