@factorialco/f0-react 1.183.0 → 1.185.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/f0.d.ts CHANGED
@@ -266,6 +266,21 @@ declare type BaseBannerProps = {
266
266
  children?: React.ReactNode;
267
267
  };
268
268
 
269
+ declare interface BaseChipProps extends VariantProps<typeof chipVariants> {
270
+ /**
271
+ * The label of the chip
272
+ * */
273
+ label: string;
274
+ /**
275
+ * If defined, the chip will be clickable
276
+ * */
277
+ onClick?: () => void;
278
+ /**
279
+ * If defined, the close icon will be displayed and the chip will be clickable
280
+ * */
281
+ onClose?: () => void;
282
+ }
283
+
269
284
  declare type BaseColor = keyof typeof baseColors;
270
285
 
271
286
  /**
@@ -564,6 +579,37 @@ declare interface CheckboxProps extends DataAttributes {
564
579
  name?: string;
565
580
  }
566
581
 
582
+ declare type ChipProps = BaseChipProps & ChipVariants & {
583
+ variant?: "default" | "selected";
584
+ };
585
+
586
+ declare type ChipVariants = {
587
+ /**
588
+ * If defined, an avatar will be displayed in the chip
589
+ * */
590
+ avatar: AvatarVariant;
591
+ icon?: undefined;
592
+ } | {
593
+ /**
594
+ * If defined, an icon will be displayed in the chip
595
+ * */
596
+ icon: IconType;
597
+ avatar?: undefined;
598
+ } | {
599
+ avatar?: undefined;
600
+ icon?: undefined;
601
+ };
602
+
603
+ declare const chipVariants: (props?: ({
604
+ variant?: "default" | "selected" | undefined;
605
+ } & ({
606
+ class?: ClassValue;
607
+ className?: never;
608
+ } | {
609
+ class?: never;
610
+ className?: ClassValue;
611
+ })) | undefined) => string;
612
+
567
613
  export declare type CompanyAvatarVariant = Extract<AvatarVariant, {
568
614
  type: "company";
569
615
  }>;
@@ -1090,6 +1136,14 @@ export declare const F0Checkbox: typeof _F0Checkbox;
1090
1136
 
1091
1137
  declare function _F0Checkbox({ title, onCheckedChange, id, disabled, indeterminate, checked, value, hideLabel, presentational, stopPropagation, name, ...rest }: CheckboxProps): JSX_2.Element;
1092
1138
 
1139
+ /**
1140
+ * @experimental This is an experimental component use it at your own risk
1141
+ */
1142
+ export declare const F0ChipList: {
1143
+ ({ chips, max, remainingCount: initialRemainingCount, layout, }: Props): JSX_2.Element;
1144
+ displayName: string;
1145
+ };
1146
+
1093
1147
  export declare const F0Icon: ForwardRefExoticComponent<Omit<Omit<F0IconProps_2, "ref"> & RefAttributes<SVGSVGElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
1094
1148
 
1095
1149
  export declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
@@ -1637,6 +1691,29 @@ declare type PromoteAction = {
1637
1691
  };
1638
1692
 
1639
1693
  declare type Props = {
1694
+ /**
1695
+ * Array of chips to display.
1696
+ */
1697
+ chips: Array<ChipProps>;
1698
+ /**
1699
+ * The maximum number of chips to display.
1700
+ * @default 4
1701
+ */
1702
+ max?: number;
1703
+ /**
1704
+ * The remaining number to display.
1705
+ */
1706
+ remainingCount?: number;
1707
+ /**
1708
+ * The layout of the chip list.
1709
+ * - "fill" - Chips will expand to fill the available width, with overflow items shown in a counter
1710
+ * - "compact" - Chips will be stacked together up to the max limit, with remaining shown in counter
1711
+ * @default "compact"
1712
+ */
1713
+ layout?: "fill" | "compact";
1714
+ };
1715
+
1716
+ declare type Props_2 = {
1640
1717
  count: number;
1641
1718
  list?: TagCounterItem[];
1642
1719
  };
@@ -1691,7 +1768,7 @@ export declare interface TagCompanyProps {
1691
1768
  }
1692
1769
 
1693
1770
  export declare const TagCounter: {
1694
- ({ count, list }: Props): JSX_2.Element;
1771
+ ({ count, list }: Props_2): JSX_2.Element;
1695
1772
  displayName: string;
1696
1773
  };
1697
1774
 
@@ -2021,8 +2098,8 @@ declare global {
2021
2098
 
2022
2099
  declare module "@tiptap/core" {
2023
2100
  interface Commands<ReturnType> {
2024
- liveCompanion: {
2025
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
2101
+ aiBlock: {
2102
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
2026
2103
  };
2027
2104
  }
2028
2105
  }
@@ -2030,8 +2107,8 @@ declare module "@tiptap/core" {
2030
2107
 
2031
2108
  declare module "@tiptap/core" {
2032
2109
  interface Commands<ReturnType> {
2033
- aiBlock: {
2034
- insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
2110
+ liveCompanion: {
2111
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
2035
2112
  };
2036
2113
  }
2037
2114
  }
@@ -2046,6 +2123,11 @@ declare module "@tiptap/core" {
2046
2123
  }
2047
2124
 
2048
2125
 
2126
+ declare namespace Calendar {
2127
+ var displayName: string;
2128
+ }
2129
+
2130
+
2049
2131
  declare module "@tiptap/core" {
2050
2132
  interface Commands<ReturnType> {
2051
2133
  moodTracker: {
@@ -2053,8 +2135,3 @@ declare module "@tiptap/core" {
2053
2135
  };
2054
2136
  }
2055
2137
  }
2056
-
2057
-
2058
- declare namespace Calendar {
2059
- var displayName: string;
2060
- }