dibk-design 9.4.0 → 10.0.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
@@ -25,7 +25,7 @@ declare type ArrowDirection = "none" | "left" | "right";
25
25
 
26
26
  export declare const Button: ({ content, color, size, arrow, disabled, inputType, defaultChecked, hasErrors, noHover, rounded, noMargin, href, children, iconLeft, iconRight, ...rest }: ButtonProps) => JSX.Element;
27
27
 
28
- declare type ButtonColor = "primary" | "secondary";
28
+ declare type ButtonColor = "primary" | "secondary" | "ghost";
29
29
 
30
30
  declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
31
31
  content?: string;
@@ -190,12 +190,10 @@ declare interface DragAndDropFileInputProps {
190
190
  "data-transaction-name"?: string;
191
191
  }
192
192
 
193
- export declare const ErrorBox: React.FC<ErrorBoxProps>;
193
+ export declare const ErrorBox: ({ type, children, ...rest }: ErrorBoxProps) => JSX.Element;
194
194
 
195
- declare interface ErrorBoxProps {
195
+ declare interface ErrorBoxProps extends Omit<InfoBoxProps, "variant" | "hideIcon"> {
196
196
  type?: "warning" | "error";
197
- fullScreen?: boolean;
198
- children?: React.ReactNode;
199
197
  }
200
198
 
201
199
  export declare const ErrorMessage: ({ id, content }: ErrorMessageProps) => JSX.Element | null;
@@ -224,12 +222,20 @@ declare interface HeaderProps {
224
222
  children?: default_2.ReactNode;
225
223
  }
226
224
 
227
- export declare const InfoBox: ({ children }: InfoBoxProps) => JSX.Element;
225
+ export declare const InfoBox: ({ title, children, variant, fullScreen, hideIcon, icon, className, }: InfoBoxProps) => JSX.Element;
228
226
 
229
227
  declare interface InfoBoxProps {
228
+ title?: default_2.ReactNode;
230
229
  children?: default_2.ReactNode;
230
+ variant?: InfoBoxVariant;
231
+ fullScreen?: boolean;
232
+ hideIcon?: boolean;
233
+ icon?: default_2.ReactNode;
234
+ className?: string;
231
235
  }
232
236
 
237
+ declare type InfoBoxVariant = "info" | "warning" | "error" | "tip";
238
+
233
239
  export declare const InputField: ({ id, onChange, onBlur, onFocus, name, type, disabled, required, readOnly, width, value, defaultValue, elementKey, label, contentOnly, buttonColor, buttonContent, selectedFileName, placeholder, defaultContent, min, max, role, "aria-describedby": ariaDescribedBy, "aria-autocomplete": ariaAutocomplete, hasErrors, errorMessage, noMargin, }: InputFieldProps) => JSX.Element;
234
240
 
235
241
  declare interface InputFieldProps {
@@ -594,6 +600,12 @@ declare interface ListProps {
594
600
 
595
601
  export declare const LoadingAnimation: ({ fixed, message, }: LoadingAnimationProps) => JSX.Element;
596
602
 
603
+ export declare const LoadingAnimation2: ({ ariaLabel, }: LoadingAnimation2Props) => JSX.Element;
604
+
605
+ declare interface LoadingAnimation2Props {
606
+ ariaLabel?: string;
607
+ }
608
+
597
609
  declare interface LoadingAnimationProps {
598
610
  fixed?: boolean;
599
611
  message?: string;
@@ -725,6 +737,7 @@ declare interface SelectPropsBase {
725
737
  "aria-describedby"?: string;
726
738
  hasErrors?: boolean;
727
739
  errorMessage?: default_2.ReactNode;
740
+ size?: "small" | "medium";
728
741
  }
729
742
 
730
743
  declare interface SingleSelectProps extends SelectPropsBase {
@@ -754,7 +767,7 @@ declare interface StepProps {
754
767
  direction?: 'vertical' | 'horizontal';
755
768
  }
756
769
 
757
- export declare const Table: <T extends object>({ columns, data, caption, getRowId, }: TableProps<T>) => JSX.Element;
770
+ export declare const Table: <T extends object>({ columns, data, caption, getRowId, selectionType, selectionLabel, selectedRowId, onSelect, selectedRowIds, onSelectMany, onRowClick, pageSize, page, defaultPage, onPageChange, pageSizeOptions, defaultPageSize, onPageSizeChange, }: TableProps<T>) => JSX.Element;
758
771
 
759
772
  declare type TableColumn<T> = {
760
773
  key: string;
@@ -771,6 +784,64 @@ declare interface TableProps<T> {
771
784
  data: T[];
772
785
  caption?: string;
773
786
  getRowId?: (row: T, index: number) => default_2.Key;
787
+ selectionType?: "single" | "multiple";
788
+ selectionLabel?: string;
789
+ selectedRowId?: default_2.Key;
790
+ onSelect?: (row: T) => void;
791
+ selectedRowIds?: default_2.Key[];
792
+ onSelectMany?: (rows: T[]) => void;
793
+ onRowClick?: (row: T) => void;
794
+ pageSize?: number;
795
+ page?: number;
796
+ defaultPage?: number;
797
+ onPageChange?: (page: number) => void;
798
+ pageSizeOptions?: number[];
799
+ defaultPageSize?: number;
800
+ onPageSizeChange?: (size: number) => void;
801
+ }
802
+
803
+ declare interface TabPanelProps {
804
+ children?: ReactNode;
805
+ isActive?: boolean;
806
+ tabId?: string;
807
+ panelId?: string;
808
+ }
809
+
810
+ declare interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
811
+ children?: ReactNode;
812
+ amount?: number;
813
+ isActive?: boolean;
814
+ tabId?: string;
815
+ panelId?: string;
816
+ onSelect?: () => void;
817
+ }
818
+
819
+ export declare const Tabs: {
820
+ ({ children, defaultIndex, onChange, className, }: TabsProps): JSX.Element;
821
+ List: ({ children, activeIndex, setActiveIndex, baseId, }: TabsListProps) => JSX.Element;
822
+ Tab: ({ children, amount, isActive, onSelect, onClick, onKeyDown, tabId, panelId, className, ...rest }: TabProps) => JSX.Element;
823
+ Panels: ({ children, activeIndex, baseId }: TabsPanelsProps) => JSX.Element;
824
+ Panel: ({ children, isActive, tabId, panelId }: TabPanelProps) => JSX.Element;
825
+ };
826
+
827
+ declare interface TabsListProps {
828
+ children?: ReactNode;
829
+ activeIndex?: number;
830
+ setActiveIndex?: (index: number) => void;
831
+ baseId?: string;
832
+ }
833
+
834
+ declare interface TabsPanelsProps {
835
+ children?: ReactNode;
836
+ activeIndex?: number;
837
+ baseId?: string;
838
+ }
839
+
840
+ declare interface TabsProps {
841
+ children?: ReactNode;
842
+ defaultIndex?: number;
843
+ onChange?: (nextIndex: number) => void;
844
+ className?: string;
774
845
  }
775
846
 
776
847
  export declare const Textarea: ({ id, onChange, onBlur, name, required, readOnly, disabled, width, resize, value, defaultValue, elementKey, rows, label, contentOnly, placeholder, defaultContent, "aria-describedby": ariaDescribedBy, hasErrors, errorMessage, }: TextareaProps) => JSX.Element;