dibk-design 10.3.2 → 10.3.5

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
@@ -127,6 +127,13 @@ declare interface ContentBoxProps {
127
127
  href?: string | null;
128
128
  }
129
129
 
130
+ declare type CustomThemeName = keyof typeof customThemes;
131
+
132
+ declare const customThemes: {
133
+ dibk: ThemeProps;
134
+ arbeidstilsynet: ThemeProps;
135
+ };
136
+
130
137
  export declare const DescriptionDetails: ({ compact, titleWidth, children, }: DescriptionDetailsProps) => JSX.Element;
131
138
 
132
139
  declare interface DescriptionDetailsProps {
@@ -215,22 +222,21 @@ declare interface HeaderProps {
215
222
  children?: default_2.ReactNode;
216
223
  }
217
224
 
218
- export declare const InfoBox: ({ title, children, variant, fullScreen, noBorder, hideIcon, icon, className, }: InfoBoxProps) => JSX.Element;
225
+ export declare const InfoBox: ({ title, children, variant, fullScreen, noBorder, hideIcon, icon, }: InfoBoxProps) => JSX.Element;
219
226
 
220
227
  declare interface InfoBoxProps {
221
- title?: default_2.ReactNode;
228
+ title: string;
222
229
  children?: default_2.ReactNode;
223
230
  variant?: InfoBoxVariant;
224
231
  fullScreen?: boolean;
225
232
  noBorder?: boolean;
226
233
  hideIcon?: boolean;
227
234
  icon?: default_2.ReactNode;
228
- className?: string;
229
235
  }
230
236
 
231
237
  declare type InfoBoxVariant = "info" | "warning" | "error" | "tip" | "success";
232
238
 
233
- export declare const InputField: ({ id, onChange, onBlur, onFocus, name, type, disabled, required, readOnly, width, value, defaultValue, elementKey, label, buttonColor, buttonContent, actionButtonContent, actionButtonIconLeft, actionButtonIconRight, actionButtonOnClick, actionButtonDisabled, actionButtonAriaLabel, selectedFileName, placeholder, min, max, role, "aria-describedby": ariaDescribedBy, "aria-autocomplete": ariaAutocomplete, hasErrors, errorMessage, noMargin, caption, }: InputFieldProps) => JSX.Element;
239
+ export declare const InputField: ({ id, onChange, onBlur, onFocus, name, type, disabled, required, readOnly, width, value, defaultValue, elementKey, label, actionButtonColor, actionButtonContent, actionButtonIconLeft, actionButtonIconRight, actionButtonOnClick, actionButtonDisabled, actionButtonAriaLabel, selectedFileName, placeholder, min, max, role, "aria-describedby": ariaDescribedBy, "aria-autocomplete": ariaAutocomplete, hasErrors, errorMessage, noMargin, caption, }: InputFieldProps) => JSX.Element;
234
240
 
235
241
  declare interface InputFieldProps {
236
242
  id: string;
@@ -247,9 +253,8 @@ declare interface InputFieldProps {
247
253
  defaultValue?: string | number | Date;
248
254
  elementKey?: string;
249
255
  label?: default_2.ReactNode;
250
- buttonColor?: "primary" | "secondary";
251
- buttonContent?: string;
252
- actionButtonContent?: default_2.ReactNode;
256
+ actionButtonColor?: "primary" | "secondary";
257
+ actionButtonContent?: string;
253
258
  actionButtonIconLeft?: default_2.ReactNode;
254
259
  actionButtonIconRight?: default_2.ReactNode;
255
260
  actionButtonOnClick?: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
@@ -594,15 +599,14 @@ declare interface MultipleSelectProps extends SelectPropsBase {
594
599
  defaultValue?: (string | number)[];
595
600
  }
596
601
 
597
- export declare const NavigationBar: ({ logoLink, logoLinkTitle, openLogoLinkInNewTab, theme, compact, color, }: NavigationBarProps) => JSX.Element;
602
+ export declare const NavigationBar: ({ logoLink, logoLinkTitle, openLogoLinkInNewTab, theme, color, }: NavigationBarProps) => JSX.Element;
598
603
 
599
604
  declare interface NavigationBarProps {
600
605
  logoLink?: string;
601
606
  logoLinkTitle?: string;
602
607
  openLogoLinkInNewTab?: boolean;
603
- theme?: ThemeProps;
604
- compact?: boolean;
605
- color?: "primary" | "secondary" | "neutral";
608
+ theme?: CustomThemeName;
609
+ color?: "secondary" | "neutral";
606
610
  children?: default_2.ReactNode;
607
611
  }
608
612
 
@@ -683,8 +687,8 @@ declare interface RadioButtonListItemProps {
683
687
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
684
688
  compact?: boolean;
685
689
  hasErrors?: boolean;
686
- 'aria-controls'?: string;
687
- 'aria-describedby'?: string;
690
+ "aria-controls"?: string;
691
+ "aria-describedby"?: string;
688
692
  children?: React.ReactNode;
689
693
  }
690
694
 
@@ -716,7 +720,9 @@ declare interface SelectPropsBase {
716
720
  "aria-describedby"?: string;
717
721
  hasErrors?: boolean;
718
722
  errorMessage?: default_2.ReactNode;
719
- size?: "small" | "medium";
723
+ backgroundColor?: string;
724
+ textColor?: string;
725
+ placeholderColor?: string;
720
726
  }
721
727
 
722
728
  declare interface SingleSelectProps extends SelectPropsBase {
@@ -746,7 +752,7 @@ declare interface StepProps {
746
752
  direction?: "vertical" | "horizontal";
747
753
  }
748
754
 
749
- export declare const Table: <T extends object>({ columns, data, loading, loadingAriaLabel, getRowId, selectionType, selectionLabel, selectedRowId, onSelect, selectedRowIds, onSelectMany, onRowClick, pageSize, page, defaultPage, onPageChange, pageSizeOptions, defaultPageSize, onPageSizeChange, }: TableProps<T>) => JSX.Element;
755
+ export declare const Table: <T extends object>({ columns, data, loading, loadingAriaLabel, getRowId, selectionType, selectionLabel, selectedRowId, onSelect, selectedRowIds, onSelectMany, onRowClick, pageSize, page, defaultPage, onPageChange, totalCount, totalPages: totalPagesProp, }: TableProps<T>) => JSX.Element;
750
756
 
751
757
  declare type TableColumn<T> = {
752
758
  key: string;
@@ -775,6 +781,8 @@ declare interface TableProps<T> {
775
781
  page?: number;
776
782
  defaultPage?: number;
777
783
  onPageChange?: (page: number) => void;
784
+ totalCount?: number;
785
+ totalPages?: number;
778
786
  pageSizeOptions?: number[];
779
787
  defaultPageSize?: number;
780
788
  onPageSizeChange?: (size: number) => void;
@@ -850,7 +858,6 @@ declare interface TextareaProps {
850
858
  declare interface ThemeProps {
851
859
  appName: string;
852
860
  logo: string;
853
- logoCompact?: string;
854
861
  logoPadding?: string;
855
862
  colors?: {
856
863
  [key: string]: string;