dibk-design 9.3.6 → 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
@@ -3,6 +3,7 @@ import { default as default_2 } from 'react';
3
3
  import { JSX } from 'react/jsx-runtime';
4
4
  import { JSX as JSX_2 } from 'react';
5
5
  import { ReactNode } from 'react';
6
+ import { ReactPortal } from 'react';
6
7
 
7
8
  export declare const Accordion: ({ title, color, expanded: expandedProp, onToggleExpand, buttonProps, noMargin, initialized: initializedProp, children, ...rest }: AccordionProps) => JSX.Element;
8
9
 
@@ -24,7 +25,7 @@ declare type ArrowDirection = "none" | "left" | "right";
24
25
 
25
26
  export declare const Button: ({ content, color, size, arrow, disabled, inputType, defaultChecked, hasErrors, noHover, rounded, noMargin, href, children, iconLeft, iconRight, ...rest }: ButtonProps) => JSX.Element;
26
27
 
27
- declare type ButtonColor = "primary" | "secondary";
28
+ declare type ButtonColor = "primary" | "secondary" | "ghost";
28
29
 
29
30
  declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
30
31
  content?: string;
@@ -155,7 +156,7 @@ declare interface DescriptionTermProps {
155
156
  children?: default_2.ReactNode;
156
157
  }
157
158
 
158
- export declare const Dialog: ({ maxWidth, noPadding, closeButton, onClickOutside, modal, attachTo, hidden, children, }: DialogProps) => JSX.Element;
159
+ export declare const Dialog: ({ maxWidth, noPadding, closeButton, onClickOutside, modal, attachTo, hidden, children, }: DialogProps) => ReactPortal | null;
159
160
 
160
161
  declare interface DialogProps {
161
162
  maxWidth?: string;
@@ -189,12 +190,10 @@ declare interface DragAndDropFileInputProps {
189
190
  "data-transaction-name"?: string;
190
191
  }
191
192
 
192
- export declare const ErrorBox: React.FC<ErrorBoxProps>;
193
+ export declare const ErrorBox: ({ type, children, ...rest }: ErrorBoxProps) => JSX.Element;
193
194
 
194
- declare interface ErrorBoxProps {
195
+ declare interface ErrorBoxProps extends Omit<InfoBoxProps, "variant" | "hideIcon"> {
195
196
  type?: "warning" | "error";
196
- fullScreen?: boolean;
197
- children?: React.ReactNode;
198
197
  }
199
198
 
200
199
  export declare const ErrorMessage: ({ id, content }: ErrorMessageProps) => JSX.Element | null;
@@ -223,18 +222,27 @@ declare interface HeaderProps {
223
222
  children?: default_2.ReactNode;
224
223
  }
225
224
 
226
- export declare const InfoBox: ({ children }: InfoBoxProps) => JSX.Element;
225
+ export declare const InfoBox: ({ title, children, variant, fullScreen, hideIcon, icon, className, }: InfoBoxProps) => JSX.Element;
227
226
 
228
227
  declare interface InfoBoxProps {
228
+ title?: default_2.ReactNode;
229
229
  children?: default_2.ReactNode;
230
+ variant?: InfoBoxVariant;
231
+ fullScreen?: boolean;
232
+ hideIcon?: boolean;
233
+ icon?: default_2.ReactNode;
234
+ className?: string;
230
235
  }
231
236
 
232
- export declare const InputField: ({ id, onChange, onBlur, 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;
237
+ declare type InfoBoxVariant = "info" | "warning" | "error" | "tip";
238
+
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;
233
240
 
234
241
  declare interface InputFieldProps {
235
242
  id: string;
236
243
  onChange?: (e: default_2.ChangeEvent<HTMLInputElement>) => void;
237
244
  onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
245
+ onFocus?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
238
246
  name?: string;
239
247
  type?: string;
240
248
  disabled?: boolean;
@@ -592,6 +600,12 @@ declare interface ListProps {
592
600
 
593
601
  export declare const LoadingAnimation: ({ fixed, message, }: LoadingAnimationProps) => JSX.Element;
594
602
 
603
+ export declare const LoadingAnimation2: ({ ariaLabel, }: LoadingAnimation2Props) => JSX.Element;
604
+
605
+ declare interface LoadingAnimation2Props {
606
+ ariaLabel?: string;
607
+ }
608
+
595
609
  declare interface LoadingAnimationProps {
596
610
  fixed?: boolean;
597
611
  message?: string;
@@ -723,6 +737,7 @@ declare interface SelectPropsBase {
723
737
  "aria-describedby"?: string;
724
738
  hasErrors?: boolean;
725
739
  errorMessage?: default_2.ReactNode;
740
+ size?: "small" | "medium";
726
741
  }
727
742
 
728
743
  declare interface SingleSelectProps extends SelectPropsBase {
@@ -752,7 +767,7 @@ declare interface StepProps {
752
767
  direction?: 'vertical' | 'horizontal';
753
768
  }
754
769
 
755
- 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;
756
771
 
757
772
  declare type TableColumn<T> = {
758
773
  key: string;
@@ -769,6 +784,64 @@ declare interface TableProps<T> {
769
784
  data: T[];
770
785
  caption?: string;
771
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;
772
845
  }
773
846
 
774
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;