@factorialco/f0-react 1.247.4 → 1.249.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.
@@ -617,6 +617,8 @@ declare type AvatarBadge = ({
617
617
  tooltip?: string;
618
618
  };
619
619
 
620
+ declare const avatarEmojiSizes: readonly ["sm", "md", "lg", "xl"];
621
+
620
622
  declare type AvatarFileSize = (typeof avatarFileSizes)[number];
621
623
 
622
624
  declare const avatarFileSizes: readonly ["xs", "sm", "md", "lg"];
@@ -628,6 +630,8 @@ declare const avatarSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl"];
628
630
  declare type AvatarVariant = DistributiveOmit<({
629
631
  type: "person";
630
632
  } & F0AvatarPersonProps) | ({
633
+ type: "emoji";
634
+ } & F0AvatarEmojiProps) | ({
631
635
  type: "team";
632
636
  } & F0AvatarTeamProps) | ({
633
637
  type: "company";
@@ -2381,6 +2385,11 @@ declare type F0AvatarCompanyProps = {
2381
2385
  badge?: AvatarBadge;
2382
2386
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
2383
2387
 
2388
+ declare type F0AvatarEmojiProps = {
2389
+ emoji: string;
2390
+ size?: (typeof avatarEmojiSizes)[number];
2391
+ } & Partial<Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">>;
2392
+
2384
2393
  declare type F0AvatarFileProps = Omit<React.ComponentPropsWithoutRef<typeof Avatar>, "type" | "size"> & {
2385
2394
  file: FileDef;
2386
2395
  size?: AvatarFileSize;
@@ -2578,8 +2587,8 @@ export declare type FilterDefinition = FilterDefinitionsByType[keyof FilterDefin
2578
2587
  /**
2579
2588
  * All the available filter types
2580
2589
  */
2581
- declare type FilterDefinitionsByType<T = unknown> = {
2582
- in: InFilterDefinition<T>;
2590
+ declare type FilterDefinitionsByType<T = unknown, R extends RecordType = RecordType> = {
2591
+ in: InFilterDefinition<T, R>;
2583
2592
  search: SearchFilterDefinition;
2584
2593
  date: DateFilterDefinition;
2585
2594
  };
@@ -2928,8 +2937,8 @@ declare type InferRecord<S> = S extends {
2928
2937
 
2929
2938
  declare type InferSchema<T extends SchemaType> = z.infer<T>;
2930
2939
 
2931
- declare type InFilterDefinition<T = unknown> = BaseFilterDefinition<"in"> & {
2932
- options: InFilterOptions_2<T>;
2940
+ declare type InFilterDefinition<T = unknown, R extends RecordType = RecordType> = BaseFilterDefinition<"in"> & {
2941
+ options: InFilterOptions_2<T, R>;
2933
2942
  };
2934
2943
 
2935
2944
  /**
@@ -2948,10 +2957,14 @@ declare type InFilterOptionItem<T = unknown> = {
2948
2957
  * Represents the options for the InFilter component.
2949
2958
  * @template T - Type of the underlying value
2950
2959
  */
2951
- declare type InFilterOptions_2<T> = {
2960
+ declare type InFilterOptions_2<T, R extends RecordType = RecordType> = {
2952
2961
  cache?: boolean;
2962
+ } & ({
2953
2963
  options: Array<InFilterOptionItem<T>> | (() => Array<InFilterOptionItem<T>> | Promise<Array<InFilterOptionItem<T>>>);
2954
- };
2964
+ } | {
2965
+ source: DataSourceDefinition<R, FiltersDefinition, SortingsDefinition, GroupingDefinition<R>>;
2966
+ mapOptions: (item: R) => InFilterOptionItem<T>;
2967
+ });
2955
2968
 
2956
2969
  /**
2957
2970
  * Represents a paginated response structure tailored for infinite scroll implementations.
@@ -3761,6 +3774,8 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
3761
3774
  children?: React.ReactNode;
3762
3775
  /** The mode of the component */
3763
3776
  mode?: FiltersMode;
3777
+ /** Callback fired when filters open state is changed */
3778
+ onOpenChange?: (isOpen: boolean) => void;
3764
3779
  };
3765
3780
 
3766
3781
  export declare const OneModal: OneModalComponent;
@@ -5603,11 +5618,6 @@ declare module "@tiptap/core" {
5603
5618
  }
5604
5619
 
5605
5620
 
5606
- declare namespace Calendar {
5607
- var displayName: string;
5608
- }
5609
-
5610
-
5611
5621
  declare module "@tiptap/core" {
5612
5622
  interface Commands<ReturnType> {
5613
5623
  moodTracker: {
@@ -5615,3 +5625,8 @@ declare module "@tiptap/core" {
5615
5625
  };
5616
5626
  }
5617
5627
  }
5628
+
5629
+
5630
+ declare namespace Calendar {
5631
+ var displayName: string;
5632
+ }