@factorialco/f0-react 1.295.0 → 1.297.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.
@@ -110,6 +110,13 @@ declare type Action_2 = {
110
110
  variant?: "default" | "outline" | "promote";
111
111
  };
112
112
 
113
+ export declare type ActionBarGroup = {
114
+ label?: string;
115
+ items: ActionBarItem[];
116
+ };
117
+
118
+ export declare type ActionBarItem = ActionType_2;
119
+
113
120
  declare type ActionBaseProps = ActionCommonProps & DataAttributes;
114
121
 
115
122
  declare type ActionButtonProps = ActionBaseProps & {
@@ -195,6 +202,14 @@ declare interface ActionCommonProps {
195
202
  * The tab index of the action.
196
203
  */
197
204
  tabIndex?: number;
205
+ /**
206
+ * Mouse enter event handler.
207
+ */
208
+ onMouseEnter?: React.MouseEventHandler<HTMLElement>;
209
+ /**
210
+ * Mouse leave event handler.
211
+ */
212
+ onMouseLeave?: React.MouseEventHandler<HTMLElement>;
198
213
  }
199
214
 
200
215
  export declare type ActionDefinition = DropdownItemSeparator | (Pick<DropdownItemObject, "label" | "icon" | "description" | "critical"> & {
@@ -298,7 +313,14 @@ export declare type actionType = {
298
313
  icon?: IconType;
299
314
  };
300
315
 
301
- declare type ActionType_2 = CopyActionType | NavigateActionType | OpenLinkActionType;
316
+ declare type ActionType_2 = {
317
+ label: string;
318
+ icon?: IconType;
319
+ onClick?: () => void;
320
+ disabled?: boolean;
321
+ critical?: boolean;
322
+ description?: string;
323
+ };
302
324
 
303
325
  declare type actionType_2 = {
304
326
  label: string;
@@ -309,6 +331,8 @@ declare type actionType_2 = {
309
331
  variant?: "default" | "outline" | "neutral";
310
332
  };
311
333
 
334
+ declare type ActionType_3 = CopyActionType | NavigateActionType | OpenLinkActionType;
335
+
312
336
  declare type ActionVariant = (typeof actionVariants)[number];
313
337
 
314
338
  declare const actionVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai", "link", "unstyled", "mention"];
@@ -1111,6 +1135,11 @@ declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "clas
1111
1135
  * If true, the button will not automatically add a title based label
1112
1136
  */
1113
1137
  noTitle?: boolean;
1138
+ /**
1139
+ * @private
1140
+ * If true, the button will rotate the icon when the button is hovered.
1141
+ */
1142
+ iconRotate?: boolean;
1114
1143
  /**
1115
1144
  * @private
1116
1145
  * The style of the button.
@@ -1567,7 +1596,7 @@ declare const CompanyItem: ForwardRefExoticComponent<CompanyItemProps & RefAttri
1567
1596
  declare type CompanyItemProps = {
1568
1597
  name: string;
1569
1598
  avatarUrl?: URL_2;
1570
- action?: ActionType_2;
1599
+ action?: ActionType_3;
1571
1600
  };
1572
1601
 
1573
1602
  export declare function CompanySelector({ companies, selected, onChange, isLoading, withNotification, additionalOptions, }: CompanySelectorProps): JSX_2.Element;
@@ -2593,7 +2622,7 @@ declare type EmployeeItemProps = {
2593
2622
  firstName: string;
2594
2623
  lastName: string;
2595
2624
  avatarUrl?: URL_2;
2596
- action?: ActionType_2;
2625
+ action?: ActionType_3;
2597
2626
  };
2598
2627
 
2599
2628
  declare type EmptyState = {
@@ -2734,6 +2763,27 @@ declare type ExtractVisualizationSettings<T> = T extends {
2734
2763
  };
2735
2764
  } ? S : never;
2736
2765
 
2766
+ export declare const F0ActionBar: ({ isOpen, secondaryActions, label, ...props }: F0ActionBarProps) => JSX_2.Element;
2767
+
2768
+ declare interface F0ActionBarProps {
2769
+ /**
2770
+ * Whether the action bar is open
2771
+ */
2772
+ isOpen: boolean;
2773
+ /**
2774
+ * The primary action
2775
+ */
2776
+ primaryActions?: ActionBarItem[] | ActionBarGroup[] | ActionBarGroup;
2777
+ /**
2778
+ * The secondary actions
2779
+ */
2780
+ secondaryActions?: ActionBarItem[];
2781
+ /**
2782
+ * The label of the action bar
2783
+ */
2784
+ label?: string;
2785
+ }
2786
+
2737
2787
  export declare const F0AiBanner: ForwardRefExoticComponent<AiBannerInternalProps & RefAttributes<HTMLDivElement>> & {
2738
2788
  Skeleton: ({ compact }: AiBannerSkeletonProps) => JSX_2.Element;
2739
2789
  };
@@ -3640,7 +3690,7 @@ declare type ItemDefinition = {
3640
3690
  declare type ItemProps = {
3641
3691
  text: string;
3642
3692
  icon?: IconType;
3643
- action?: ActionType_2;
3693
+ action?: ActionType_3;
3644
3694
  };
3645
3695
 
3646
3696
  declare type Items = typeof Item_2 | typeof PersonItem | typeof CompanyItem | typeof TeamItem;
@@ -5719,7 +5769,7 @@ declare const TeamItem: ForwardRefExoticComponent<TeamItemProps & RefAttributes<
5719
5769
 
5720
5770
  declare type TeamItemProps = {
5721
5771
  name: string;
5722
- action?: ActionType_2;
5772
+ action?: ActionType_3;
5723
5773
  };
5724
5774
 
5725
5775
  export declare const Textarea: React.FC<TextareaProps>;
@@ -6316,6 +6366,31 @@ declare global {
6316
6366
  }
6317
6367
 
6318
6368
 
6369
+ declare module "gridstack" {
6370
+ interface GridStackWidget {
6371
+ id?: string;
6372
+ allowedSizes?: Array<{
6373
+ w: number;
6374
+ h: number;
6375
+ }>;
6376
+ renderFn?: () => React.ReactElement | null;
6377
+ meta?: Record<string, unknown>;
6378
+ }
6379
+ interface GridStackNode {
6380
+ id?: string;
6381
+ w?: number;
6382
+ h?: number;
6383
+ x?: number;
6384
+ y?: number;
6385
+ allowedSizes?: Array<{
6386
+ w: number;
6387
+ h: number;
6388
+ }>;
6389
+ renderFn?: () => React.ReactElement | null;
6390
+ }
6391
+ }
6392
+
6393
+
6319
6394
  declare module "@tiptap/core" {
6320
6395
  interface Commands<ReturnType> {
6321
6396
  aiBlock: {
@@ -6343,31 +6418,6 @@ declare module "@tiptap/core" {
6343
6418
  }
6344
6419
 
6345
6420
 
6346
- declare module "gridstack" {
6347
- interface GridStackWidget {
6348
- id?: string;
6349
- allowedSizes?: Array<{
6350
- w: number;
6351
- h: number;
6352
- }>;
6353
- renderFn?: () => React.ReactElement | null;
6354
- meta?: Record<string, unknown>;
6355
- }
6356
- interface GridStackNode {
6357
- id?: string;
6358
- w?: number;
6359
- h?: number;
6360
- x?: number;
6361
- y?: number;
6362
- allowedSizes?: Array<{
6363
- w: number;
6364
- h: number;
6365
- }>;
6366
- renderFn?: () => React.ReactElement | null;
6367
- }
6368
- }
6369
-
6370
-
6371
6421
  declare namespace Calendar {
6372
6422
  var displayName: string;
6373
6423
  }