@brainfish-ai/components 0.8.0 → 0.8.2-alpha.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/index.d.ts CHANGED
@@ -619,14 +619,16 @@ declare type FeatureFlags = {
619
619
 
620
620
  declare type FeedbackResponse = 'accept' | 'reject';
621
621
 
622
- export declare const Filter: default_2.ForwardRefExoticComponent<FilterProps & default_2.RefAttributes<HTMLDivElement>>;
622
+ export declare const Filter: default_2.ForwardRefExoticComponent<FilterProps & default_2.RefAttributes<{
623
+ focus: () => void;
624
+ }>>;
623
625
 
624
626
  export declare interface FilterOption {
625
627
  id: string;
626
628
  label: string;
627
629
  }
628
630
 
629
- declare interface FilterProps {
631
+ export declare interface FilterProps {
630
632
  filter: FilterValue;
631
633
  sourceOptions: FilterOption[];
632
634
  rules: FilterRules;
@@ -646,6 +648,7 @@ declare interface FilterProps {
646
648
  * - The rules are used to determine the available operators and value type
647
649
  * - The input type is used to determine the type of input displayed in when the dropdown is opened
648
650
  * - The getValueOptions function is used to determine the available options for the value
651
+ * - multiSelect determines if multiple values can be selected for dropdown type
649
652
  *
650
653
  * @example
651
654
  * {
@@ -655,6 +658,7 @@ declare interface FilterProps {
655
658
  * { id: 'is not', label: 'is not' },
656
659
  * ],
657
660
  * inputType: 'dropdown' | 'custom',
661
+ * multiSelect?: boolean,
658
662
  * getValueOptions?: () => FilterOption[],
659
663
  * },
660
664
  * }
@@ -663,16 +667,18 @@ export declare interface FilterRules {
663
667
  [sourceId: string]: {
664
668
  operators: FilterOption[];
665
669
  inputType: 'dropdown' | 'custom';
670
+ multiSelect?: boolean;
666
671
  getValueOptions?: () => FilterOption[];
667
672
  };
668
673
  }
669
674
 
670
- export declare const Filters: ({ filters, onFilterChange, onFilterRemove, sourceOptions, rules, className }: FiltersProps) => default_2.JSX.Element;
675
+ export declare const Filters: ({ filters, onFilterChange, onFilterRemove, onFilterAdd, sourceOptions, rules, className, }: FiltersProps) => default_2.JSX.Element;
671
676
 
672
677
  declare interface FiltersProps extends default_2.HTMLAttributes<HTMLDivElement> {
673
678
  filters: FilterValue[];
674
679
  onFilterChange: (filter: FilterValue) => void;
675
680
  onFilterRemove: (filterId: string | number) => void;
681
+ onFilterAdd?: (filter: FilterValue) => void;
676
682
  sourceOptions: FilterOption[];
677
683
  rules: FilterRules;
678
684
  }
@@ -681,7 +687,7 @@ export declare interface FilterValue {
681
687
  id: string | number;
682
688
  source?: string;
683
689
  operator?: Operator;
684
- value?: string;
690
+ value?: string | string[];
685
691
  }
686
692
 
687
693
  export declare const FormattedMessage: FC<Props>;
@@ -850,7 +856,7 @@ declare type SetUserFeedback = {
850
856
  };
851
857
  };
852
858
 
853
- export declare function SimpleSelect({ options, value, onChange, placeholder, disabled, className, appendToBody, }: SimpleSelectProps): React_2.JSX.Element;
859
+ export declare function SimpleSelect({ options, value, onChange, placeholder, disabled, className, appendToBody, }: SimpleSelectProps): default_2.JSX.Element;
854
860
 
855
861
  export declare interface SimpleSelectProps {
856
862
  options: SelectOption[];
@@ -871,6 +877,22 @@ declare interface Suggestion {
871
877
 
872
878
  export declare const Switch: React_2.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
873
879
 
880
+ export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
881
+
882
+ export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
883
+
884
+ export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & React_2.RefAttributes<HTMLTableCaptionElement>>;
885
+
886
+ export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
887
+
888
+ export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
889
+
890
+ export declare const TableHead: React_2.ForwardRefExoticComponent<React_2.ThHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
891
+
892
+ export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
893
+
894
+ export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & React_2.RefAttributes<HTMLTableRowElement>>;
895
+
874
896
  export declare const Textarea: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React_2.RefAttributes<HTMLTextAreaElement>>;
875
897
 
876
898
  declare interface TextConfig {
@@ -910,7 +932,7 @@ export declare const useChatSearch: () => ChatSearchContextProps;
910
932
 
911
933
  export declare const useIsChatSearchDirty: () => boolean;
912
934
 
913
- export declare const ZoomableImage: React_2.FC<ZoomableImageProps>;
935
+ export declare const ZoomableImage: default_2.FC<ZoomableImageProps>;
914
936
 
915
937
  declare interface ZoomableImageProps {
916
938
  src?: string;
@@ -1,7 +1,6 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { FC } from 'react';
3
3
  import { Options } from 'react-markdown';
4
- import * as React_2 from 'react';
5
4
 
6
5
  export declare const CodeBlock: FC<Props_2>;
7
6
 
@@ -44,7 +43,7 @@ declare type RedirectRule = {
44
43
  destination: string;
45
44
  };
46
45
 
47
- export declare const ZoomableImage: React_2.FC<ZoomableImageProps>;
46
+ export declare const ZoomableImage: default_2.FC<ZoomableImageProps>;
48
47
 
49
48
  declare interface ZoomableImageProps {
50
49
  src?: string;
package/dist/select.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import * as React_2 from 'react';
1
+ import { default as default_2 } from 'react';
2
2
 
3
3
  export declare type SelectOption = {
4
4
  label: string;
5
5
  value: string;
6
6
  };
7
7
 
8
- export declare function SimpleSelect({ options, value, onChange, placeholder, disabled, className, appendToBody, }: SimpleSelectProps): React_2.JSX.Element;
8
+ export declare function SimpleSelect({ options, value, onChange, placeholder, disabled, className, appendToBody, }: SimpleSelectProps): default_2.JSX.Element;
9
9
 
10
10
  export declare interface SimpleSelectProps {
11
11
  options: SelectOption[];