@stackone/malachite 0.27.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 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 {
@@ -187,6 +215,7 @@ export declare const CustomIcons: {
187
215
  CaretUpIcon: FC<IconProps>;
188
216
  ChangePasswordIcon: FC<IconProps>;
189
217
  CheckCircleFilled: FC<IconProps>;
218
+ CheckIcon: FC<IconProps>;
190
219
  ClearIcon: FC<IconProps>;
191
220
  CloseIcon: FC<IconProps>;
192
221
  CommandKeyIcon: FC<IconProps>;
@@ -222,6 +251,7 @@ export declare const CustomIcons: {
222
251
  ManualWebhookIcon: FC<IconProps>;
223
252
  MembersIcon: FC<IconProps>;
224
253
  ModalIcon: FC<IconProps>;
254
+ MoreHorizontalIcon: FC<IconProps>;
225
255
  NavbarCollapseIcon: FC<IconProps>;
226
256
  NavbarExpandIcon: FC<IconProps>;
227
257
  NotFoundIcon: FC<IconProps>;
@@ -243,6 +273,7 @@ export declare const CustomIcons: {
243
273
  TrashIcon: FC<IconProps>;
244
274
  UploadIcon: FC<IconProps>;
245
275
  WarningCircleFilled: FC<IconProps>;
276
+ WarningTriangleIcon: FC<IconProps>;
246
277
  WebhookEventsIcon: FC<IconProps>;
247
278
  WebhookIcon: FC<IconProps>;
248
279
  WebhookSigningSecretIcon: FC<IconProps>;
@@ -352,6 +383,7 @@ declare interface FlexProps {
352
383
  direction?: FlexDirection;
353
384
  fullHeight?: boolean;
354
385
  grow?: boolean;
386
+ wrap?: boolean;
355
387
  width?: string;
356
388
  id?: string;
357
389
  children?: default_2.ReactNode;
@@ -463,6 +495,7 @@ export declare interface LinkProps {
463
495
  className?: string;
464
496
  color?: 'default' | 'dimmed';
465
497
  size?: FontSize;
498
+ underline?: boolean;
466
499
  }
467
500
 
468
501
  declare interface LinkProps_2 {
@@ -530,6 +563,7 @@ export declare interface MalachiteTheme {
530
563
  border: string;
531
564
  shadow: string;
532
565
  dimmedBackground: string;
566
+ warmBackground: string;
533
567
  headerBackground: string;
534
568
  footerBackground: string;
535
569
  };
@@ -757,6 +791,7 @@ declare interface OverflowRowProps {
757
791
  align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
758
792
  justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
759
793
  className?: string;
794
+ renderOverflow?: (hiddenCount: number) => default_2.ReactNode;
760
795
  }
761
796
 
762
797
  export declare const Padded: default_2.FC<PaddedProps>;
@@ -990,11 +1025,11 @@ export declare interface SwatchProps {
990
1025
  style?: default_2.CSSProperties;
991
1026
  }
992
1027
 
993
- export declare const Table: <T extends Record<string, unknown> = Record<string, unknown>>({ columns, data, loading, error, errorTitle, errorSubTitle, bordered, showHeader, rowKey, scrollHeight, size, layout, rowClassName, rowVariant, onRow, rowSelection, pagination, className, style, }: TableProps<T>) => JSX_2.Element;
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;
994
1029
 
995
1030
  export declare type TableColumnDefinition<T = Record<string, unknown>> = {
996
1031
  title: string | default_2.ReactNode;
997
- dataIndex: keyof T;
1032
+ dataIndex: keyof T | (string & {});
998
1033
  key: string;
999
1034
  width?: string | number;
1000
1035
  ellipsis?: boolean;
@@ -1012,6 +1047,8 @@ export declare type TableColumnDefinition<T = Record<string, unknown>> = {
1012
1047
 
1013
1048
  export declare type TableColumns<T = Record<string, unknown>> = TableColumnDefinition<T>[];
1014
1049
 
1050
+ declare type TableHeaderVariant = 'inline' | 'detached';
1051
+
1015
1052
  export declare type TablePaginationPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
1016
1053
 
1017
1054
  declare type TableProps<T = Record<string, unknown>> = {
@@ -1028,9 +1065,11 @@ declare type TableProps<T = Record<string, unknown>> = {
1028
1065
  type?: TableType;
1029
1066
  size?: TableSize;
1030
1067
  layout?: 'fixed' | 'auto';
1068
+ headerVariant?: TableHeaderVariant;
1031
1069
  rowClassName?: (record: T, index: number) => string;
1032
1070
  rowVariant?: (record: T, index: number) => RowVariant | undefined;
1033
1071
  onRow?: (record: T, index: number) => TableRowActions<T>;
1072
+ onClickRow?: (record: T, index: number) => void;
1034
1073
  rowSelection?: TableRowSelection<T>;
1035
1074
  pagination?: {
1036
1075
  current?: number;
@@ -1169,6 +1208,22 @@ declare interface TooltipProps {
1169
1208
  isShrinkable?: boolean;
1170
1209
  }
1171
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
+
1172
1227
  export declare const Typography: {
1173
1228
  CodeText: FC<CodeTextProps>;
1174
1229
  EllipsisText: FC<EllipsisTextProps>;