@norges-domstoler/dds-components 12.1.2 → 13.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.
Files changed (36) hide show
  1. package/dist/cjs/components/Button/Button.d.ts +1 -0
  2. package/dist/cjs/components/Button/Button.stories.d.ts +1 -0
  3. package/dist/cjs/components/Button/Button.types.d.ts +2 -0
  4. package/dist/cjs/components/LocalMessage/LocalMessage.stories.d.ts +1 -0
  5. package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +23 -20
  6. package/dist/cjs/components/ProgressTracker/ProgressTracker.d.ts +0 -2
  7. package/dist/cjs/components/ProgressTracker/ProgressTracker.stories.d.ts +1 -2
  8. package/dist/cjs/components/Search/Search.tokens.d.ts +6 -1
  9. package/dist/cjs/components/Search/Search.utils.d.ts +9 -0
  10. package/dist/cjs/components/Spinner/Spinner.d.ts +2 -0
  11. package/dist/cjs/components/Spinner/Spinner.stories.d.ts +7 -1
  12. package/dist/cjs/components/Stack/Stack.d.ts +0 -2
  13. package/dist/cjs/index.js +221 -191
  14. package/dist/components/Button/Button.d.ts +1 -0
  15. package/dist/components/Button/Button.js +5 -2
  16. package/dist/components/Button/Button.stories.d.ts +1 -0
  17. package/dist/components/Button/Button.types.d.ts +2 -0
  18. package/dist/components/LocalMessage/LocalMessage.js +64 -65
  19. package/dist/components/LocalMessage/LocalMessage.stories.d.ts +1 -0
  20. package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +23 -20
  21. package/dist/components/LocalMessage/LocalMessage.tokens.js +4 -21
  22. package/dist/components/ProgressTracker/ProgressTracker.d.ts +0 -2
  23. package/dist/components/ProgressTracker/ProgressTracker.js +2 -4
  24. package/dist/components/ProgressTracker/ProgressTracker.stories.d.ts +1 -2
  25. package/dist/components/ProgressTracker/ProgressTrackerItem.js +5 -23
  26. package/dist/components/Search/Search.js +40 -16
  27. package/dist/components/Search/Search.tokens.d.ts +6 -1
  28. package/dist/components/Search/Search.tokens.js +9 -3
  29. package/dist/components/Search/Search.utils.d.ts +9 -0
  30. package/dist/components/Search/Search.utils.js +35 -0
  31. package/dist/components/Spinner/Spinner.d.ts +2 -0
  32. package/dist/components/Spinner/Spinner.js +5 -3
  33. package/dist/components/Spinner/Spinner.stories.d.ts +7 -1
  34. package/dist/components/Stack/Stack.d.ts +0 -2
  35. package/dist/components/Stack/Stack.js +8 -6
  36. package/package.json +3 -3
@@ -6,6 +6,7 @@ export declare const Button: import("react").ForwardRefExoticComponent<Pick<Omit
6
6
  iconPosition?: import("./Button.types").IconPosition | undefined;
7
7
  appearance?: import("./Button.types").ButtonAppearance | undefined;
8
8
  loading?: boolean | undefined;
9
+ loadingTooltip?: string | undefined;
9
10
  icon?: import("../../icons/utils").SvgIcon | undefined;
10
11
  fullWidth?: boolean | undefined;
11
12
  href?: string | undefined;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  iconPosition?: import("./Button.types").IconPosition | undefined;
9
9
  appearance?: import("./Button.types").ButtonAppearance | undefined;
10
10
  loading?: boolean | undefined;
11
+ loadingTooltip?: string | undefined;
11
12
  icon?: import("../../icons/utils").SvgIcon | undefined;
12
13
  fullWidth?: boolean | undefined;
13
14
  href?: string | undefined;
@@ -19,6 +19,8 @@ export type ButtonProps = BaseComponentProps<HTMLButtonElement, {
19
19
  appearance?: ButtonAppearance;
20
20
  /**Indikerer en loading-knapp. */
21
21
  loading?: boolean;
22
+ /**Tooltip som vises ved loading. */
23
+ loadingTooltip?: string;
22
24
  /**Ikonet som ligger i knappen. */
23
25
  icon?: SvgIcon;
24
26
  /**Knapp med full bredde. */
@@ -18,6 +18,7 @@ declare const _default: {
18
18
  control: {
19
19
  type: string;
20
20
  };
21
+ defaultValue: string;
21
22
  };
22
23
  width: {
23
24
  control: {
@@ -1,14 +1,7 @@
1
1
  import { SvgIcon } from '../../icons/utils';
2
2
  import { ButtonPurpose } from '../Button';
3
3
  import { StaticTypographyType } from '../Typography';
4
- import { LocalMessagePurpose } from './LocalMessage';
5
4
  export declare const typographyType: StaticTypographyType;
6
- export declare const purposeVariants: {
7
- [k in LocalMessagePurpose]: {
8
- icon: SvgIcon;
9
- closeButtonPurpose: ButtonPurpose;
10
- };
11
- };
12
5
  export declare const localMessageTokens: {
13
6
  container: {
14
7
  base: {
@@ -16,6 +9,7 @@ export declare const localMessageTokens: {
16
9
  borderRadius: string;
17
10
  border: string;
18
11
  padding: string;
12
+ gap: string;
19
13
  };
20
14
  purpose: {
21
15
  info: {
@@ -44,21 +38,30 @@ export declare const localMessageTokens: {
44
38
  };
45
39
  };
46
40
  };
47
- contentContainer: {
48
- paddingRight: string;
49
- paddingTop: string;
50
- paddingBottom: string;
51
- withClosable: {
52
- paddingRight: string;
41
+ purposeVariants: {
42
+ info: {
43
+ icon: SvgIcon;
44
+ closeButtonPurpose: ButtonPurpose;
53
45
  };
54
- vertical: {
55
- paddingBottom: string;
46
+ warning: {
47
+ icon: SvgIcon;
48
+ closeButtonPurpose: ButtonPurpose;
56
49
  };
57
- };
58
- topContainer: {
59
- paddingTop: string;
60
- withClosable: {
61
- paddingTop: string;
50
+ danger: {
51
+ icon: SvgIcon;
52
+ closeButtonPurpose: ButtonPurpose;
53
+ };
54
+ confidential: {
55
+ icon: SvgIcon;
56
+ closeButtonPurpose: ButtonPurpose;
57
+ };
58
+ success: {
59
+ icon: SvgIcon;
60
+ closeButtonPurpose: ButtonPurpose;
61
+ };
62
+ tips: {
63
+ icon: SvgIcon;
64
+ closeButtonPurpose: ButtonPurpose;
62
65
  };
63
66
  };
64
67
  icon: {
@@ -6,8 +6,6 @@ type ProgressTrackerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
6
6
  activeStep?: number;
7
7
  /** Ekstra logikk ved klikking på et steg. */
8
8
  onStepChange?: (step: number) => void;
9
- /** Om brukeren kan hoppe mellom stegene via museklikk på et steg. */
10
- clickable?: boolean;
11
9
  }>;
12
10
  type ProgressTrackerComponent = ForwardRefExoticComponent<ProgressTrackerProps> & {
13
11
  Item: typeof ProgressTrackerItem;
@@ -3,7 +3,6 @@ declare const _default: {
3
3
  component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
4
4
  activeStep?: number | undefined;
5
5
  onStepChange?: ((step: number) => void) | undefined;
6
- clickable?: boolean | undefined;
7
6
  } & {
8
7
  children?: import("react").ReactNode;
9
8
  } & {
@@ -39,4 +38,4 @@ declare const _default: {
39
38
  export default _default;
40
39
  export declare const Overview: () => JSX.Element;
41
40
  export declare const WithIcons: () => JSX.Element;
42
- export declare const NonClickable: () => JSX.Element;
41
+ export declare const FutureStepsDisabled: () => JSX.Element;
@@ -27,7 +27,7 @@ export declare const searchTokens: {
27
27
  };
28
28
  };
29
29
  };
30
- icon: {
30
+ searchIcon: {
31
31
  base: {
32
32
  left: string;
33
33
  color: string;
@@ -42,6 +42,11 @@ export declare const searchTokens: {
42
42
  top: string;
43
43
  };
44
44
  };
45
+ clearButton: {
46
+ right: string;
47
+ top: string;
48
+ color: string;
49
+ };
45
50
  horisontalContainer: {
46
51
  gap: string;
47
52
  };
@@ -0,0 +1,9 @@
1
+ import { ChangeEvent } from 'react';
2
+ /**
3
+ * Lager en change-event som kan resette verdien i et input-felt.
4
+ * Dette vil resultere i en event som har: event.target.value = ''.
5
+ *
6
+ * @param inputElementId Id'en til et gitt input-felt
7
+ * @returns En change-event som har en tom streng som target value
8
+ */
9
+ export declare function createEmptyChangeEvent(inputElementId: string): ChangeEvent<HTMLInputElement>;
@@ -7,5 +7,7 @@ export type SpinnerProps = BaseComponentProps<SVGElement, {
7
7
  color?: TextColor | string;
8
8
  /**Størrelse; Setter høyde og bredde på spinneren. */
9
9
  size?: Property.Width<string>;
10
+ /**Tekst som vises ved hover. */
11
+ tooltip?: string;
10
12
  }>;
11
13
  export declare function Spinner(props: SpinnerProps): JSX.Element;
@@ -13,8 +13,14 @@ declare const _default: {
13
13
  type: string;
14
14
  };
15
15
  };
16
+ tooltip: {
17
+ control: {
18
+ type: string;
19
+ };
20
+ defaultValue: string;
21
+ };
16
22
  };
17
23
  };
18
24
  export default _default;
19
- export declare const Overview: () => JSX.Element;
25
+ export declare const Overview: (args: SpinnerProps) => JSX.Element;
20
26
  export declare const Default: (args: SpinnerProps) => JSX.Element;
@@ -20,12 +20,10 @@ export interface StackStyleProps {
20
20
  justify?: Justify;
21
21
  /**
22
22
  * Hvilken spacing token som skal brukes som CSS `gap`.
23
- * @default 0
24
23
  */
25
24
  gap?: keyof typeof stackTokens.spacing | 0;
26
25
  /**
27
26
  * Hvilken spacing token som skal brukes som CSS `padding`.
28
- * @default 0
29
27
  */
30
28
  padding?: keyof typeof stackTokens.spacing | 0;
31
29
  }