@factorialco/f0-react 1.304.1 → 1.306.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.
@@ -1654,7 +1654,7 @@ declare type Content = (ComponentProps<typeof DataList.Item> & {
1654
1654
  type: "dot-tag";
1655
1655
  });
1656
1656
 
1657
- declare type ContentPadding = "sm" | "md";
1657
+ declare type ContentPadding = (typeof modalContentPaddings)[number];
1658
1658
 
1659
1659
  declare type CopyActionType = {
1660
1660
  type: "copy";
@@ -3979,7 +3979,15 @@ declare interface MetadataProps {
3979
3979
 
3980
3980
  export declare const MobileDropdown: ({ items, children }: DropdownProps) => JSX_2.Element;
3981
3981
 
3982
- declare type ModalPosition = "center" | "left" | "right" | "fullscreen";
3982
+ declare const modalContentPaddings: readonly ["sm", "md"];
3983
+
3984
+ declare type ModalPosition = (typeof modalPositions)[number];
3985
+
3986
+ declare const modalPositions: readonly ["center", "left", "right", "fullscreen"];
3987
+
3988
+ declare type ModalWidth = (typeof modalWidths)[number];
3989
+
3990
+ declare const modalWidths: readonly ["sm", "md", "lg"];
3983
3991
 
3984
3992
  declare const moduleAvatarVariants: (props?: ({
3985
3993
  size?: "lg" | "md" | "sm" | "xs" | "xxs" | undefined;
@@ -4512,10 +4520,11 @@ declare type OneModalFooterProps = {
4512
4520
  children: React.ReactNode;
4513
4521
  };
4514
4522
 
4515
- declare const OneModalHeader: ({ title, module, otherActions, }: OneModalHeaderProps) => JSX_2.Element;
4523
+ declare const OneModalHeader: ({ title, description, module, otherActions, }: OneModalHeaderProps) => JSX_2.Element;
4516
4524
 
4517
4525
  declare type OneModalHeaderProps = {
4518
4526
  title?: string;
4527
+ description?: string;
4519
4528
  /**
4520
4529
  * Module configuration for the header. Only works when modal position is set to "right".
4521
4530
  * Displays module icon and name in the header.
@@ -4537,7 +4546,10 @@ declare type OneModalProps = {
4537
4546
  asBottomSheetInMobile?: boolean;
4538
4547
  /** the padding of internal content areas (header, content, footer) */
4539
4548
  contentPadding?: ContentPadding;
4549
+ /** The position of the modal */
4540
4550
  position?: ModalPosition;
4551
+ /** The width of the modal. Only applies to center position but we can NOT use narrowing as position undefined is valid */
4552
+ width?: ModalWidth;
4541
4553
  /** Custom content to render in the modal. Only accepts OneModal.Header and OneModal.Content components */
4542
4554
  children: ReactElement<ComponentProps<typeof OneModalHeader> | ComponentProps<typeof OneModalContent>> | ReactElement<ComponentProps<typeof OneModalHeader> | ComponentProps<typeof OneModalContent>>[];
4543
4555
  } & Partial<Pick<TabsProps, "tabs" | "activeTabId" | "setActiveTabId">>;
@@ -6389,23 +6401,6 @@ declare global {
6389
6401
  }
6390
6402
  }
6391
6403
 
6392
- declare module "gridstack" {
6393
- interface GridStackWidget {
6394
- id?: string;
6395
- allowedSizes?: Array<{
6396
- w: number;
6397
- h: number;
6398
- }>;
6399
- meta?: Record<string, unknown>;
6400
- }
6401
- interface GridStackNode {
6402
- allowedSizes?: Array<{
6403
- w: number;
6404
- h: number;
6405
- }>;
6406
- }
6407
- }
6408
-
6409
6404
 
6410
6405
  declare module "@tiptap/core" {
6411
6406
  interface Commands<ReturnType> {
@@ -6433,6 +6428,23 @@ declare module "@tiptap/core" {
6433
6428
  }
6434
6429
  }
6435
6430
 
6431
+ declare module "gridstack" {
6432
+ interface GridStackWidget {
6433
+ id?: string;
6434
+ allowedSizes?: Array<{
6435
+ w: number;
6436
+ h: number;
6437
+ }>;
6438
+ meta?: Record<string, unknown>;
6439
+ }
6440
+ interface GridStackNode {
6441
+ allowedSizes?: Array<{
6442
+ w: number;
6443
+ h: number;
6444
+ }>;
6445
+ }
6446
+ }
6447
+
6436
6448
 
6437
6449
  declare module "@tiptap/core" {
6438
6450
  interface Commands<ReturnType> {