@equisoft/design-elements-react 5.2.5-snapshot.20230612040637 → 5.2.5-snapshot.20230620135314
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.
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RefObject, VoidFunctionComponent } from 'react';
|
|
2
|
+
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
3
|
+
export interface ErrorMessage {
|
|
4
|
+
text: string;
|
|
5
|
+
target: RefObject<HTMLElement> | string;
|
|
6
|
+
}
|
|
7
|
+
interface ErrorSummaryProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @default h2
|
|
11
|
+
*/
|
|
12
|
+
headingTag?: HeadingTag;
|
|
13
|
+
/**
|
|
14
|
+
* Array of objects with a `text` attribute containing the error message and a `target`
|
|
15
|
+
* referencing the target input that will get the focus when clicking the error. The
|
|
16
|
+
* target can either be the id of the element or a component ref.
|
|
17
|
+
*/
|
|
18
|
+
messages: ErrorMessage[];
|
|
19
|
+
}
|
|
20
|
+
export declare const ErrorSummary: VoidFunctionComponent<ErrorSummaryProps>;
|
|
21
|
+
export {};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ReactNode, VoidFunctionComponent } from 'react';
|
|
2
2
|
export type SectionalBannerType = 'info' | 'success' | 'warning' | 'alert';
|
|
3
|
+
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span';
|
|
3
4
|
interface SectionalBannerProps {
|
|
4
5
|
buttonLabel?: string;
|
|
5
6
|
className?: string;
|
|
6
7
|
children: ReactNode;
|
|
8
|
+
focusable?: boolean;
|
|
9
|
+
/** @default `span` */
|
|
10
|
+
headingTag?: HeadingTag;
|
|
7
11
|
/** Sets custom message title */
|
|
8
12
|
title?: string;
|
|
9
13
|
/** Sets message type */
|
|
@@ -24,6 +24,10 @@ export declare const Translations: {
|
|
|
24
24
|
monthSelectLabel: string;
|
|
25
25
|
yearSelectLabel: string;
|
|
26
26
|
};
|
|
27
|
+
'error-summary': {
|
|
28
|
+
title: string;
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
27
31
|
'global-banner': {
|
|
28
32
|
ignore: string;
|
|
29
33
|
};
|
|
@@ -123,6 +127,10 @@ export declare const Translations: {
|
|
|
123
127
|
monthSelectLabel: string;
|
|
124
128
|
yearSelectLabel: string;
|
|
125
129
|
};
|
|
130
|
+
'error-summary': {
|
|
131
|
+
title: string;
|
|
132
|
+
message: string;
|
|
133
|
+
};
|
|
126
134
|
'global-banner': {
|
|
127
135
|
ignore: string;
|
|
128
136
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from './components/carousel/carousel';
|
|
|
34
34
|
export { ChooserButtonGroup, ChooserButtonOption } from './components/chooser-button-group/chooser-button-group';
|
|
35
35
|
export { ChooserCard } from './components/chooser-card/chooser-card';
|
|
36
36
|
export { EnsoSpinner } from './components/enso-spinner/enso-spinner';
|
|
37
|
+
export { ErrorSummary, ErrorMessage } from './components/error-summary/error-summary';
|
|
37
38
|
export { ExternalLink } from './components/external-link/external-link';
|
|
38
39
|
export { Heading } from './components/heading/heading';
|
|
39
40
|
export { GlobalHeader } from './components/global-header/global-header';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/design-elements-react",
|
|
3
|
-
"version": "5.2.5-snapshot.
|
|
3
|
+
"version": "5.2.5-snapshot.20230620135314",
|
|
4
4
|
"description": "React implementation of the Equisoft design system.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "dist/bundle.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"react": "~17.0.2",
|
|
91
91
|
"react-docgen-typescript-plugin": "^1.0.5",
|
|
92
92
|
"react-dom": "~17.0.2",
|
|
93
|
-
"react-router-dom": "~6.
|
|
93
|
+
"react-router-dom": "~6.13.0",
|
|
94
94
|
"sass": "~1.63.0",
|
|
95
95
|
"sass-loader": "~13.3.0",
|
|
96
96
|
"style-loader": "^3.3.2",
|