@dnb/eufemia 10.0.0-beta.8 → 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.
Files changed (90) hide show
  1. package/CHANGELOG.md +266 -329
  2. package/cjs/components/global-error/GlobalError.d.ts +64 -62
  3. package/cjs/components/global-error/GlobalError.js +76 -509
  4. package/cjs/components/global-error/style/dnb-global-error.css +21 -31
  5. package/cjs/components/global-error/style/dnb-global-error.min.css +1 -1
  6. package/cjs/components/global-error/style/dnb-global-error.scss +19 -29
  7. package/cjs/components/radio/style/dnb-radio.css +1 -0
  8. package/cjs/components/radio/style/dnb-radio.min.css +1 -1
  9. package/cjs/components/radio/style/dnb-radio.scss +1 -0
  10. package/cjs/extensions/payment-card/PaymentCard.d.ts +6 -29
  11. package/cjs/shared/Context.d.ts +2 -0
  12. package/cjs/shared/Eufemia.d.ts +1 -1
  13. package/cjs/shared/Eufemia.js +2 -2
  14. package/cjs/shared/locales/en-GB.d.ts +2 -2
  15. package/cjs/shared/locales/en-GB.js +7 -7
  16. package/cjs/shared/locales/en-US.d.ts +2 -2
  17. package/cjs/shared/locales/index.d.ts +4 -4
  18. package/cjs/shared/locales/nb-NO.d.ts +2 -2
  19. package/cjs/shared/locales/nb-NO.js +7 -7
  20. package/cjs/style/dnb-ui-components.css +22 -31
  21. package/cjs/style/dnb-ui-components.min.css +1 -1
  22. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +22 -31
  23. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  24. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +22 -31
  25. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  26. package/cjs/style/themes/theme-ui/ui-theme-components.css +22 -31
  27. package/cjs/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  28. package/components/global-error/GlobalError.d.ts +64 -62
  29. package/components/global-error/GlobalError.js +77 -510
  30. package/components/global-error/style/dnb-global-error.css +21 -31
  31. package/components/global-error/style/dnb-global-error.min.css +1 -1
  32. package/components/global-error/style/dnb-global-error.scss +19 -29
  33. package/components/radio/style/dnb-radio.css +1 -0
  34. package/components/radio/style/dnb-radio.min.css +1 -1
  35. package/components/radio/style/dnb-radio.scss +1 -0
  36. package/es/components/global-error/GlobalError.d.ts +64 -62
  37. package/es/components/global-error/GlobalError.js +76 -510
  38. package/es/components/global-error/style/dnb-global-error.css +21 -31
  39. package/es/components/global-error/style/dnb-global-error.min.css +1 -1
  40. package/es/components/global-error/style/dnb-global-error.scss +19 -29
  41. package/es/components/radio/style/dnb-radio.css +1 -0
  42. package/es/components/radio/style/dnb-radio.min.css +1 -1
  43. package/es/components/radio/style/dnb-radio.scss +1 -0
  44. package/es/extensions/payment-card/PaymentCard.d.ts +6 -29
  45. package/es/shared/Context.d.ts +2 -0
  46. package/es/shared/Eufemia.d.ts +1 -1
  47. package/es/shared/Eufemia.js +2 -2
  48. package/es/shared/locales/en-GB.d.ts +2 -2
  49. package/es/shared/locales/en-GB.js +7 -7
  50. package/es/shared/locales/en-US.d.ts +2 -2
  51. package/es/shared/locales/index.d.ts +4 -4
  52. package/es/shared/locales/nb-NO.d.ts +2 -2
  53. package/es/shared/locales/nb-NO.js +7 -7
  54. package/es/style/dnb-ui-components.css +22 -31
  55. package/es/style/dnb-ui-components.min.css +1 -1
  56. package/es/style/themes/theme-eiendom/eiendom-theme-components.css +22 -31
  57. package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  58. package/es/style/themes/theme-sbanken/sbanken-theme-components.css +22 -31
  59. package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  60. package/es/style/themes/theme-ui/ui-theme-components.css +22 -31
  61. package/es/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  62. package/esm/dnb-ui-basis.min.mjs +1 -1
  63. package/esm/dnb-ui-components.min.mjs +1 -1
  64. package/esm/dnb-ui-elements.min.mjs +1 -1
  65. package/esm/dnb-ui-extensions.min.mjs +1 -1
  66. package/esm/dnb-ui-lib.min.mjs +1 -1
  67. package/extensions/payment-card/PaymentCard.d.ts +6 -29
  68. package/package.json +1 -1
  69. package/shared/Context.d.ts +2 -0
  70. package/shared/Eufemia.d.ts +1 -1
  71. package/shared/Eufemia.js +2 -2
  72. package/shared/locales/en-GB.d.ts +2 -2
  73. package/shared/locales/en-GB.js +7 -7
  74. package/shared/locales/en-US.d.ts +2 -2
  75. package/shared/locales/index.d.ts +4 -4
  76. package/shared/locales/nb-NO.d.ts +2 -2
  77. package/shared/locales/nb-NO.js +7 -7
  78. package/style/dnb-ui-components.css +22 -31
  79. package/style/dnb-ui-components.min.css +1 -1
  80. package/style/themes/theme-eiendom/eiendom-theme-components.css +22 -31
  81. package/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  82. package/style/themes/theme-sbanken/sbanken-theme-components.css +22 -31
  83. package/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  84. package/style/themes/theme-ui/ui-theme-components.css +22 -31
  85. package/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  86. package/umd/dnb-ui-basis.min.js +1 -1
  87. package/umd/dnb-ui-components.min.js +1 -1
  88. package/umd/dnb-ui-elements.min.js +1 -1
  89. package/umd/dnb-ui-extensions.min.js +1 -1
  90. package/umd/dnb-ui-lib.min.js +1 -1
@@ -1,62 +1,64 @@
1
- import * as React from 'react';
2
- import type { SpacingProps } from '../space/types';
3
- export type GlobalErrorStatusContent = string | Record<string, unknown>;
4
- export type GlobalErrorTitle = string | React.ReactNode;
5
- export type GlobalErrorText = string | React.ReactNode;
6
- export type GlobalErrorBack = string | React.ReactNode;
7
- export type GlobalErrorChildren =
8
- | string
9
- | ((...args: any[]) => any)
10
- | React.ReactNode;
11
- export interface GlobalErrorProps
12
- extends React.HTMLProps<HTMLElement>,
13
- SpacingProps {
14
- /**
15
- * Status code defines the view showing up.
16
- */
17
- status?: string;
18
-
19
- /**
20
- * A JSON object or a JS object providing the status texts. More details below.
21
- */
22
- status_content?: GlobalErrorStatusContent;
23
-
24
- /**
25
- * Defining a `title` will overwrite the default provided by `status_content`.
26
- */
27
- title?: GlobalErrorTitle;
28
-
29
- /**
30
- * Defining a `text` will overwrite the default provided by `status_content`.
31
- */
32
- text?: GlobalErrorText;
33
-
34
- /**
35
- * The text of the back button. Defaults to `Tilbake`. Can also be a React component.
36
- */
37
- back?: GlobalErrorBack;
38
-
39
- /**
40
- * Instead of using the default `window.history.back()` you can provide the back button and text link with a url.
41
- */
42
- href?: string;
43
-
44
- /**
45
- * Defining a `alt` text for the SVG graphic will overwrite the default provided by `status_content`.
46
- */
47
- alt?: string;
48
- className?: string;
49
-
50
- /**
51
- * If needed, add additional content under the main content.
52
- */
53
- children?: GlobalErrorChildren;
54
- class?: string;
55
- }
56
- export default class GlobalError extends React.Component<
57
- GlobalErrorProps,
58
- any
59
- > {
60
- static defaultProps: object;
61
- render(): JSX.Element;
62
- }
1
+ /**
2
+ * Web GlobalError Component
3
+ *
4
+ */
5
+ import React from 'react';
6
+ import { GetTranslationProps } from '../../shared/Context';
7
+ import { SkeletonShow } from '../skeleton/Skeleton';
8
+ import type { SpacingProps } from '../../shared/types';
9
+ export declare type GlobalErrorLink = {
10
+ text: string;
11
+ url: string;
12
+ };
13
+ export declare type GlobalErrorProps = {
14
+ /**
15
+ * When `404` or `500` is given, a predefined text will be shown.
16
+ * Defaults to `400`.
17
+ */
18
+ status?: '404' | '500' | string;
19
+ /**
20
+ * Will overwrite the default title.
21
+ */
22
+ title?: React.ReactNode;
23
+ /**
24
+ * Will overwrite the default text.
25
+ */
26
+ text?: React.ReactNode;
27
+ /**
28
+ * Will overwrite the default error message code.
29
+ */
30
+ code?: React.ReactNode;
31
+ /**
32
+ * Will overwrite the default additional help text.
33
+ */
34
+ help?: React.ReactNode;
35
+ /**
36
+ * Provide an array with objects `{ text: 'Text', url: 'https://...' }` to display a list of anchor links.
37
+ */
38
+ links?: Array<GlobalErrorLink>;
39
+ /**
40
+ * If true, it will use 80vh as the height and center its content.
41
+ */
42
+ center?: boolean;
43
+ /**
44
+ * Skeleton should be applied when loading content
45
+ * Default: null
46
+ */
47
+ skeleton?: SkeletonShow;
48
+ };
49
+ export declare type GlobalErrorAllProps = GlobalErrorProps & React.HTMLProps<HTMLElement> & SpacingProps & GetTranslationProps;
50
+ export declare type GlobalErrorTranslationContent = {
51
+ /**
52
+ * Defining a `title` will overwrite the default provided by `status_content`.
53
+ */
54
+ title?: React.ReactNode;
55
+ /**
56
+ * Defining a `text` will overwrite the default provided by `status_content`.
57
+ */
58
+ text?: React.ReactNode;
59
+ };
60
+ export declare type GlobalErrorTranslation = {
61
+ 404?: GlobalErrorTranslationContent;
62
+ 500?: GlobalErrorTranslationContent;
63
+ };
64
+ export default function GlobalError(localProps: GlobalErrorAllProps): JSX.Element;