@digigov/react-core 2.0.0-rc.27 → 2.0.0-rc.28

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.
@@ -8,6 +8,15 @@ export interface ErrorSummaryProps extends BaseProps<'div'> {
8
8
  * @default false
9
9
  * */
10
10
  dense?: boolean;
11
+ /**
12
+ * variant is optional.
13
+ * variant error is used to change the color of the NotificationBannerContainer.
14
+ * variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.
15
+ * @value 'error'
16
+ * @value 'error-group'
17
+ * @default 'error'.
18
+ */
19
+ variant?: 'error' | 'error-group';
11
20
  }
12
21
  /**
13
22
  * Use this component at the top of a page to summarize any errors a user has made.
@@ -2,17 +2,17 @@ import React from "react";
2
2
  import NotificationBannerContainer from "@digigov/react-core/NotificationBannerContainer";
3
3
  import NotificationBannerContent from "@digigov/react-core/NotificationBannerContent";
4
4
  const ErrorSummary = React.forwardRef(
5
- function ErrorSummary2({ className, dense, children, ...props }, ref) {
5
+ function ErrorSummary2({ className, dense, children, variant = "error", ...props }, ref) {
6
6
  return /* @__PURE__ */ React.createElement(
7
7
  NotificationBannerContainer,
8
8
  {
9
- variant: "error",
9
+ variant,
10
10
  className,
11
11
  ref,
12
12
  dense,
13
13
  ...props
14
14
  },
15
- /* @__PURE__ */ React.createElement(NotificationBannerContent, null, children)
15
+ /* @__PURE__ */ React.createElement(NotificationBannerContent, { variant }, children)
16
16
  );
17
17
  }
18
18
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ErrorSummary/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport { BaseProps } from '@digigov/react-core/Base';\nimport NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';\nimport NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';\n\nexport interface ErrorSummaryProps extends BaseProps<'div'> {\n /**\n * dense is optional.\n * @value true ErrorSummary will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * Use this component at the top of a page to summarize any errors a user has made.\n */\nexport const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(\n function ErrorSummary({ className, dense, children, ...props }, ref) {\n return (\n <NotificationBannerContainer\n variant={'error'}\n className={className}\n ref={ref}\n dense={dense}\n {...props}\n >\n <NotificationBannerContent>{children}</NotificationBannerContent>\n </NotificationBannerContainer>\n );\n }\n);\n\nexport default ErrorSummary;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAElB,OAAO,iCAAiC;AACxC,OAAO,+BAA+B;AAc/B,MAAM,eAAe,MAAM;AAAA,EAChC,SAASA,cAAa,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACnE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEJ,oCAAC,iCAA2B,QAAS;AAAA,IACvC;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { BaseProps } from '@digigov/react-core/Base';\nimport NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';\nimport NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';\nexport interface ErrorSummaryProps extends BaseProps<'div'> {\n /**\n * dense is optional.\n * @value true ErrorSummary will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * variant is optional.\n * variant error is used to change the color of the NotificationBannerContainer.\n * variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.\n * @value 'error'\n * @value 'error-group'\n * @default 'error'.\n */\n variant?: 'error' | 'error-group';\n}\n/**\n * Use this component at the top of a page to summarize any errors a user has made.\n */\nexport const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(\n function ErrorSummary(\n { className, dense, children, variant = 'error', ...props },\n ref\n ) {\n return (\n <NotificationBannerContainer\n variant={variant}\n className={className}\n ref={ref}\n dense={dense}\n {...props}\n >\n <NotificationBannerContent variant={variant}>\n {children}\n </NotificationBannerContent>\n </NotificationBannerContainer>\n );\n }\n);\n\nexport default ErrorSummary;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAElB,OAAO,iCAAiC;AACxC,OAAO,+BAA+B;AAsB/B,MAAM,eAAe,MAAM;AAAA,EAChC,SAASA,cACP,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,GAAG,MAAM,GAC1D,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEJ,oCAAC,6BAA0B,WACxB,QACH;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;",
6
6
  "names": ["ErrorSummary"]
7
7
  }
@@ -7,9 +7,10 @@ export interface NotificationBannerContainerProps extends BaseProps<'div'> {
7
7
  * @value 'info'
8
8
  * @value 'success'
9
9
  * @value 'error'
10
+ * @value 'error-group'
10
11
  * @default 'info'.
11
12
  */
12
- variant?: 'info' | 'success' | 'error';
13
+ variant?: 'info' | 'success' | 'error' | 'error-group';
13
14
  /**
14
15
  * dense is optional.
15
16
  * @value true NotificationBannerContainer will be dense.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/NotificationBannerContainer/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface NotificationBannerContainerProps extends BaseProps<'div'> {\n /**\n * variant is optional.\n * variant is used to change the color of the NotificationBannerContainer.\n * @value 'info'\n * @value 'success'\n * @value 'error'\n * @default 'info'.\n */\n variant?: 'info' | 'success' | 'error';\n /**\n * dense is optional.\n * @value true NotificationBannerContainer will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * Details for the NotificationBannerContainer.\n * NotificationBannerContainer component informs users about something they need to know about\n * NotificationBannerContainer component must be placed at the top of the page.\n * NotificationBannerContainer wraps NotificationBannerContainerHeader, NotificationBannerContainerContent,NotificationBannerContainerHeading\n * and NotificationBannerContainerLink components as children\n */\nexport const NotificationBannerContainer = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContainerProps\n>(function NotificationBannerContainer(\n { variant = 'info', className, dense, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n role=\"region\"\n aria-labelledby=\"ds-notification-banner-title\"\n data-module=\"ds-notification-banner\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner': true,\n [`ds-notification-banner--${variant}`]: variant !== undefined,\n 'ds-notification-banner--dense': dense,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default NotificationBannerContainer;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA2BzB,MAAM,8BAA8B,MAAM,WAG/C,SAASA,6BACT,EAAE,UAAU,QAAQ,WAAW,OAAO,UAAU,GAAG,MAAM,GACzD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,MAAK;AAAA,MACL,mBAAgB;AAAA,MAChB,eAAY;AAAA,MACZ;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,CAAC,2BAA2B,OAAO,EAAE,GAAG,YAAY;AAAA,QACpD,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sCAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface NotificationBannerContainerProps extends BaseProps<'div'> {\n /**\n * variant is optional.\n * variant is used to change the color of the NotificationBannerContainer.\n * @value 'info'\n * @value 'success'\n * @value 'error'\n * @value 'error-group'\n * @default 'info'.\n */\n variant?: 'info' | 'success' | 'error' | 'error-group';\n /**\n * dense is optional.\n * @value true NotificationBannerContainer will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * Details for the NotificationBannerContainer.\n * NotificationBannerContainer component informs users about something they need to know about\n * NotificationBannerContainer component must be placed at the top of the page.\n * NotificationBannerContainer wraps NotificationBannerContainerHeader, NotificationBannerContainerContent,NotificationBannerContainerHeading\n * and NotificationBannerContainerLink components as children\n */\nexport const NotificationBannerContainer = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContainerProps\n>(function NotificationBannerContainer(\n { variant = 'info', className, dense, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n role=\"region\"\n aria-labelledby=\"ds-notification-banner-title\"\n data-module=\"ds-notification-banner\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner': true,\n [`ds-notification-banner--${variant}`]: variant !== undefined,\n 'ds-notification-banner--dense': dense,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default NotificationBannerContainer;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA4BzB,MAAM,8BAA8B,MAAM,WAG/C,SAASA,6BACT,EAAE,UAAU,QAAQ,WAAW,OAAO,UAAU,GAAG,MAAM,GACzD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,MAAK;AAAA,MACL,mBAAgB;AAAA,MAChB,eAAY;AAAA,MACZ;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,CAAC,2BAA2B,OAAO,EAAE,GAAG,YAAY;AAAA,QACpD,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sCAAQ;",
6
6
  "names": ["NotificationBannerContainer"]
7
7
  }
@@ -1,6 +1,28 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface NotificationBannerContentProps extends BaseProps<'div'> {
4
+ /**
5
+ * assistiveText is optional.
6
+ * Default value is "Προσοχή".
7
+ * assistiveText is used to provide a textual warning for assistive technologies like screen readers.
8
+ */
9
+ assistiveText?: string;
10
+ /**
11
+ * variant is optional.
12
+ * variant is used to display red line on the left side of the component and exclamation mark icon with light red as background.
13
+ * @value 'error'
14
+ * @value 'error-group'
15
+ * @default 'error'.
16
+ */
17
+ /**
18
+ * variant is optional.
19
+ * variant error is used to change the color of the NotificationBannerContainer.
20
+ * variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.
21
+ * @value 'error'
22
+ * @value 'error-group'
23
+ * @default 'error'.
24
+ */
25
+ variant?: 'error' | 'error-group';
4
26
  }
5
27
  /**
6
28
  * Details for the NotificationBannerContent.
@@ -1,18 +1,29 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const NotificationBannerContent = React.forwardRef(function NotificationBannerContent2({ className, children, ...props }, ref) {
4
+ import { WarningTextAssistive } from "@digigov/react-core/WarningTextAssistive";
5
+ const NotificationBannerContent = React.forwardRef(function NotificationBannerContent2({ className, assistiveText, variant, children, ...props }, ref) {
5
6
  return /* @__PURE__ */ React.createElement(
6
7
  Base,
7
8
  {
8
9
  as: "div",
9
10
  ref,
10
11
  className: clsx(className, {
11
- "ds-notification-banner__content": true
12
+ "ds-notification-banner__content": variant !== "error-group",
13
+ "ds-notification-error-group-banner__content": variant === "error-group"
12
14
  }),
13
15
  ...props
14
16
  },
15
- children
17
+ variant === "error-group" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
18
+ Base,
19
+ {
20
+ as: "div",
21
+ className: clsx({
22
+ "ds-notification-banner__icon--error-group": true
23
+ })
24
+ },
25
+ "!"
26
+ ), /* @__PURE__ */ React.createElement(WarningTextAssistive, null, assistiveText), /* @__PURE__ */ React.createElement(Base, { as: "div", className: "ds-notification-banner__text-error-group" }, children)) : /* @__PURE__ */ React.createElement(React.Fragment, null, children)
16
27
  );
17
28
  });
18
29
  var NotificationBannerContent_default = NotificationBannerContent;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/NotificationBannerContent/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface NotificationBannerContentProps extends BaseProps<'div'> {}\n/**\n * Details for the NotificationBannerContent.\n * NotificationBannerContent component is used as a content for\n * NotificationBannerHeading and NotificationBannerLink components.\n * NotificationBannerContent component must be used inside NotificationBanner component as children.\n */\nexport const NotificationBannerContent = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContentProps\n>(function NotificationBannerContent({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner__content': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default NotificationBannerContent;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AASzB,MAAM,4BAA4B,MAAM,WAG7C,SAASA,2BAA0B,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,mCAAmC;AAAA,MACrC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oCAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { WarningTextAssistive } from '@digigov/react-core/WarningTextAssistive';\n\nexport interface NotificationBannerContentProps extends BaseProps<'div'> {\n /**\n * assistiveText is optional.\n * Default value is \"\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE\".\n * assistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n assistiveText?: string;\n /**\n * variant is optional.\n * variant is used to display red line on the left side of the component and exclamation mark icon with light red as background.\n * @value 'error'\n * @value 'error-group'\n * @default 'error'.\n */\n /**\n * variant is optional.\n * variant error is used to change the color of the NotificationBannerContainer.\n * variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.\n * @value 'error'\n * @value 'error-group'\n * @default 'error'.\n */\n variant?: 'error' | 'error-group';\n}\n/**\n * Details for the NotificationBannerContent.\n * NotificationBannerContent component is used as a content for\n * NotificationBannerHeading and NotificationBannerLink components.\n * NotificationBannerContent component must be used inside NotificationBanner component as children.\n */\nexport const NotificationBannerContent = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContentProps\n>(function NotificationBannerContent(\n { className, assistiveText, variant, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner__content': variant !== 'error-group',\n 'ds-notification-error-group-banner__content':\n variant === 'error-group',\n })}\n {...props}\n >\n {variant === 'error-group' ? (\n <>\n <Base\n as=\"div\"\n className={clsx({\n 'ds-notification-banner__icon--error-group': true,\n })}\n >\n !\n </Base>\n <WarningTextAssistive>{assistiveText}</WarningTextAssistive>\n <Base as=\"div\" className=\"ds-notification-banner__text-error-group\">\n {children}\n </Base>\n </>\n ) : (\n <>{children}</>\n )}\n </Base>\n );\n});\n\nexport default NotificationBannerContent;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,4BAA4B;AAgC9B,MAAM,4BAA4B,MAAM,WAG7C,SAASA,2BACT,EAAE,WAAW,eAAe,SAAS,UAAU,GAAG,MAAM,GACxD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,mCAAmC,YAAY;AAAA,QAC/C,+CACE,YAAY;AAAA,MAChB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,YAAY,gBACX,0DACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAW,KAAK;AAAA,UACd,6CAA6C;AAAA,QAC/C,CAAC;AAAA;AAAA,MACF;AAAA,IAED,GACA,oCAAC,4BAAsB,aAAc,GACrC,oCAAC,QAAK,IAAG,OAAM,WAAU,8CACtB,QACH,CACF,IAEA,0DAAG,QAAS;AAAA,EAEhB;AAEJ,CAAC;AAED,IAAO,oCAAQ;",
6
6
  "names": ["NotificationBannerContent"]
7
7
  }
@@ -35,17 +35,17 @@ var import_react = __toESM(require("react"));
35
35
  var import_NotificationBannerContainer = __toESM(require("@digigov/react-core/NotificationBannerContainer"));
36
36
  var import_NotificationBannerContent = __toESM(require("@digigov/react-core/NotificationBannerContent"));
37
37
  const ErrorSummary = import_react.default.forwardRef(
38
- function ErrorSummary2({ className, dense, children, ...props }, ref) {
38
+ function ErrorSummary2({ className, dense, children, variant = "error", ...props }, ref) {
39
39
  return /* @__PURE__ */ import_react.default.createElement(
40
40
  import_NotificationBannerContainer.default,
41
41
  {
42
- variant: "error",
42
+ variant,
43
43
  className,
44
44
  ref,
45
45
  dense,
46
46
  ...props
47
47
  },
48
- /* @__PURE__ */ import_react.default.createElement(import_NotificationBannerContent.default, null, children)
48
+ /* @__PURE__ */ import_react.default.createElement(import_NotificationBannerContent.default, { variant }, children)
49
49
  );
50
50
  }
51
51
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/ErrorSummary/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport { BaseProps } from '@digigov/react-core/Base';\nimport NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';\nimport NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';\n\nexport interface ErrorSummaryProps extends BaseProps<'div'> {\n /**\n * dense is optional.\n * @value true ErrorSummary will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * Use this component at the top of a page to summarize any errors a user has made.\n */\nexport const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(\n function ErrorSummary({ className, dense, children, ...props }, ref) {\n return (\n <NotificationBannerContainer\n variant={'error'}\n className={className}\n ref={ref}\n dense={dense}\n {...props}\n >\n <NotificationBannerContent>{children}</NotificationBannerContent>\n </NotificationBannerContainer>\n );\n }\n);\n\nexport default ErrorSummary;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,yCAAwC;AACxC,uCAAsC;AAc/B,MAAM,eAAe,aAAAA,QAAM;AAAA,EAChC,SAASC,cAAa,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACnE,WACE,6BAAAD,QAAA;AAAA,MAAC,mCAAAE;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEJ,6BAAAF,QAAA,cAAC,iCAAAG,SAAA,MAA2B,QAAS;AAAA,IACvC;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { BaseProps } from '@digigov/react-core/Base';\nimport NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';\nimport NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';\nexport interface ErrorSummaryProps extends BaseProps<'div'> {\n /**\n * dense is optional.\n * @value true ErrorSummary will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * variant is optional.\n * variant error is used to change the color of the NotificationBannerContainer.\n * variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.\n * @value 'error'\n * @value 'error-group'\n * @default 'error'.\n */\n variant?: 'error' | 'error-group';\n}\n/**\n * Use this component at the top of a page to summarize any errors a user has made.\n */\nexport const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(\n function ErrorSummary(\n { className, dense, children, variant = 'error', ...props },\n ref\n ) {\n return (\n <NotificationBannerContainer\n variant={variant}\n className={className}\n ref={ref}\n dense={dense}\n {...props}\n >\n <NotificationBannerContent variant={variant}>\n {children}\n </NotificationBannerContent>\n </NotificationBannerContainer>\n );\n }\n);\n\nexport default ErrorSummary;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,yCAAwC;AACxC,uCAAsC;AAsB/B,MAAM,eAAe,aAAAA,QAAM;AAAA,EAChC,SAASC,cACP,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,GAAG,MAAM,GAC1D,KACA;AACA,WACE,6BAAAD,QAAA;AAAA,MAAC,mCAAAE;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEJ,6BAAAF,QAAA,cAAC,iCAAAG,SAAA,EAA0B,WACxB,QACH;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;",
6
6
  "names": ["React", "ErrorSummary", "NotificationBannerContainer", "NotificationBannerContent"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/NotificationBannerContainer/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface NotificationBannerContainerProps extends BaseProps<'div'> {\n /**\n * variant is optional.\n * variant is used to change the color of the NotificationBannerContainer.\n * @value 'info'\n * @value 'success'\n * @value 'error'\n * @default 'info'.\n */\n variant?: 'info' | 'success' | 'error';\n /**\n * dense is optional.\n * @value true NotificationBannerContainer will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * Details for the NotificationBannerContainer.\n * NotificationBannerContainer component informs users about something they need to know about\n * NotificationBannerContainer component must be placed at the top of the page.\n * NotificationBannerContainer wraps NotificationBannerContainerHeader, NotificationBannerContainerContent,NotificationBannerContainerHeading\n * and NotificationBannerContainerLink components as children\n */\nexport const NotificationBannerContainer = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContainerProps\n>(function NotificationBannerContainer(\n { variant = 'info', className, dense, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n role=\"region\"\n aria-labelledby=\"ds-notification-banner-title\"\n data-module=\"ds-notification-banner\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner': true,\n [`ds-notification-banner--${variant}`]: variant !== undefined,\n 'ds-notification-banner--dense': dense,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default NotificationBannerContainer;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AA2BzB,MAAM,8BAA8B,aAAAA,QAAM,WAG/C,SAASC,6BACT,EAAE,UAAU,QAAQ,WAAW,OAAO,UAAU,GAAG,MAAM,GACzD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,MAAK;AAAA,MACL,mBAAgB;AAAA,MAChB,eAAY;AAAA,MACZ;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,CAAC,2BAA2B,OAAO,EAAE,GAAG,YAAY;AAAA,QACpD,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sCAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface NotificationBannerContainerProps extends BaseProps<'div'> {\n /**\n * variant is optional.\n * variant is used to change the color of the NotificationBannerContainer.\n * @value 'info'\n * @value 'success'\n * @value 'error'\n * @value 'error-group'\n * @default 'info'.\n */\n variant?: 'info' | 'success' | 'error' | 'error-group';\n /**\n * dense is optional.\n * @value true NotificationBannerContainer will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * Details for the NotificationBannerContainer.\n * NotificationBannerContainer component informs users about something they need to know about\n * NotificationBannerContainer component must be placed at the top of the page.\n * NotificationBannerContainer wraps NotificationBannerContainerHeader, NotificationBannerContainerContent,NotificationBannerContainerHeading\n * and NotificationBannerContainerLink components as children\n */\nexport const NotificationBannerContainer = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContainerProps\n>(function NotificationBannerContainer(\n { variant = 'info', className, dense, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n role=\"region\"\n aria-labelledby=\"ds-notification-banner-title\"\n data-module=\"ds-notification-banner\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner': true,\n [`ds-notification-banner--${variant}`]: variant !== undefined,\n 'ds-notification-banner--dense': dense,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default NotificationBannerContainer;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AA4BzB,MAAM,8BAA8B,aAAAA,QAAM,WAG/C,SAASC,6BACT,EAAE,UAAU,QAAQ,WAAW,OAAO,UAAU,GAAG,MAAM,GACzD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,MAAK;AAAA,MACL,mBAAgB;AAAA,MAChB,eAAY;AAAA,MACZ;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,CAAC,2BAA2B,OAAO,EAAE,GAAG,YAAY;AAAA,QACpD,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sCAAQ;",
6
6
  "names": ["React", "NotificationBannerContainer", "Base", "clsx"]
7
7
  }
@@ -34,18 +34,29 @@ module.exports = __toCommonJS(NotificationBannerContent_exports);
34
34
  var import_react = __toESM(require("react"));
35
35
  var import_clsx = __toESM(require("clsx"));
36
36
  var import_Base = __toESM(require("@digigov/react-core/Base"));
37
- const NotificationBannerContent = import_react.default.forwardRef(function NotificationBannerContent2({ className, children, ...props }, ref) {
37
+ var import_WarningTextAssistive = require("@digigov/react-core/WarningTextAssistive");
38
+ const NotificationBannerContent = import_react.default.forwardRef(function NotificationBannerContent2({ className, assistiveText, variant, children, ...props }, ref) {
38
39
  return /* @__PURE__ */ import_react.default.createElement(
39
40
  import_Base.default,
40
41
  {
41
42
  as: "div",
42
43
  ref,
43
44
  className: (0, import_clsx.default)(className, {
44
- "ds-notification-banner__content": true
45
+ "ds-notification-banner__content": variant !== "error-group",
46
+ "ds-notification-error-group-banner__content": variant === "error-group"
45
47
  }),
46
48
  ...props
47
49
  },
48
- children
50
+ variant === "error-group" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
51
+ import_Base.default,
52
+ {
53
+ as: "div",
54
+ className: (0, import_clsx.default)({
55
+ "ds-notification-banner__icon--error-group": true
56
+ })
57
+ },
58
+ "!"
59
+ ), /* @__PURE__ */ import_react.default.createElement(import_WarningTextAssistive.WarningTextAssistive, null, assistiveText), /* @__PURE__ */ import_react.default.createElement(import_Base.default, { as: "div", className: "ds-notification-banner__text-error-group" }, children)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, children)
49
60
  );
50
61
  });
51
62
  var NotificationBannerContent_default = NotificationBannerContent;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/NotificationBannerContent/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface NotificationBannerContentProps extends BaseProps<'div'> {}\n/**\n * Details for the NotificationBannerContent.\n * NotificationBannerContent component is used as a content for\n * NotificationBannerHeading and NotificationBannerLink components.\n * NotificationBannerContent component must be used inside NotificationBanner component as children.\n */\nexport const NotificationBannerContent = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContentProps\n>(function NotificationBannerContent({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner__content': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default NotificationBannerContent;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AASzB,MAAM,4BAA4B,aAAAA,QAAM,WAG7C,SAASC,2BAA0B,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAC3E,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,mCAAmC;AAAA,MACrC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oCAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { WarningTextAssistive } from '@digigov/react-core/WarningTextAssistive';\n\nexport interface NotificationBannerContentProps extends BaseProps<'div'> {\n /**\n * assistiveText is optional.\n * Default value is \"\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE\".\n * assistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n assistiveText?: string;\n /**\n * variant is optional.\n * variant is used to display red line on the left side of the component and exclamation mark icon with light red as background.\n * @value 'error'\n * @value 'error-group'\n * @default 'error'.\n */\n /**\n * variant is optional.\n * variant error is used to change the color of the NotificationBannerContainer.\n * variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.\n * @value 'error'\n * @value 'error-group'\n * @default 'error'.\n */\n variant?: 'error' | 'error-group';\n}\n/**\n * Details for the NotificationBannerContent.\n * NotificationBannerContent component is used as a content for\n * NotificationBannerHeading and NotificationBannerLink components.\n * NotificationBannerContent component must be used inside NotificationBanner component as children.\n */\nexport const NotificationBannerContent = React.forwardRef<\n HTMLDivElement,\n NotificationBannerContentProps\n>(function NotificationBannerContent(\n { className, assistiveText, variant, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-notification-banner__content': variant !== 'error-group',\n 'ds-notification-error-group-banner__content':\n variant === 'error-group',\n })}\n {...props}\n >\n {variant === 'error-group' ? (\n <>\n <Base\n as=\"div\"\n className={clsx({\n 'ds-notification-banner__icon--error-group': true,\n })}\n >\n !\n </Base>\n <WarningTextAssistive>{assistiveText}</WarningTextAssistive>\n <Base as=\"div\" className=\"ds-notification-banner__text-error-group\">\n {children}\n </Base>\n </>\n ) : (\n <>{children}</>\n )}\n </Base>\n );\n});\n\nexport default NotificationBannerContent;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,kCAAqC;AAgC9B,MAAM,4BAA4B,aAAAA,QAAM,WAG7C,SAASC,2BACT,EAAE,WAAW,eAAe,SAAS,UAAU,GAAG,MAAM,GACxD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,mCAAmC,YAAY;AAAA,QAC/C,+CACE,YAAY;AAAA,MAChB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,YAAY,gBACX,6BAAAH,QAAA,2BAAAA,QAAA,gBACE,6BAAAA,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,eAAW,YAAAC,SAAK;AAAA,UACd,6CAA6C;AAAA,QAC/C,CAAC;AAAA;AAAA,MACF;AAAA,IAED,GACA,6BAAAH,QAAA,cAAC,wDAAsB,aAAc,GACrC,6BAAAA,QAAA,cAAC,YAAAE,SAAA,EAAK,IAAG,OAAM,WAAU,8CACtB,QACH,CACF,IAEA,6BAAAF,QAAA,2BAAAA,QAAA,gBAAG,QAAS;AAAA,EAEhB;AAEJ,CAAC;AAED,IAAO,oCAAQ;",
6
6
  "names": ["React", "NotificationBannerContent", "Base", "clsx"]
7
7
  }
package/cjs/lazy/index.js CHANGED
@@ -251,8 +251,8 @@ var lazy_default = {
251
251
  "TaskListItemTag": (0, import_react.lazy)(() => import("@digigov/react-core/TaskListItemTag").then((module2) => ({ default: module2["TaskListItemTag"] }))),
252
252
  "WarningTextAssistive": (0, import_react.lazy)(() => import("@digigov/react-core/WarningTextAssistive").then((module2) => ({ default: module2["WarningTextAssistive"] }))),
253
253
  "AutoCompleteAssistiveHint": (0, import_react.lazy)(() => import("@digigov/react-core/AutoCompleteAssistiveHint").then((module2) => ({ default: module2["AutoCompleteAssistiveHint"] }))),
254
- "AutoCompleteStatus": (0, import_react.lazy)(() => import("@digigov/react-core/AutoCompleteStatus").then((module2) => ({ default: module2["AutoCompleteStatus"] }))),
255
254
  "AutoCompleteStatusContainer": (0, import_react.lazy)(() => import("@digigov/react-core/AutoCompleteStatusContainer").then((module2) => ({ default: module2["AutoCompleteStatusContainer"] }))),
255
+ "AutoCompleteStatus": (0, import_react.lazy)(() => import("@digigov/react-core/AutoCompleteStatus").then((module2) => ({ default: module2["AutoCompleteStatus"] }))),
256
256
  "BackToTopContainer": (0, import_react.lazy)(() => import("@digigov/react-core/BackToTopContainer").then((module2) => ({ default: module2["BackToTopContainer"] }))),
257
257
  "BackToTopLimit": (0, import_react.lazy)(() => import("@digigov/react-core/BackToTopLimit").then((module2) => ({ default: module2["BackToTopLimit"] }))),
258
258
  "BackToTopLink": (0, import_react.lazy)(() => import("@digigov/react-core/BackToTopLink").then((module2) => ({ default: module2["BackToTopLink"] }))),
@@ -267,8 +267,8 @@ var lazy_default = {
267
267
  "HeaderNavMenuContent": (0, import_react.lazy)(() => import("@digigov/react-core/HeaderNavMenuContent").then((module2) => ({ default: module2["HeaderNavMenuContent"] }))),
268
268
  "KitchenSinkAllComponents": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkAllComponents").then((module2) => ({ default: module2["KitchenSinkAllComponents"] }))),
269
269
  "KitchenSinkCard": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkCard").then((module2) => ({ default: module2["KitchenSinkCard"] }))),
270
- "KitchenSinkContent": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkContent").then((module2) => ({ default: module2["KitchenSinkContent"] }))),
271
270
  "KitchenSinkCategory": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkCategory").then((module2) => ({ default: module2["KitchenSinkCategory"] }))),
271
+ "KitchenSinkContent": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkContent").then((module2) => ({ default: module2["KitchenSinkContent"] }))),
272
272
  "KitchenSinkContentInfo": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkContentInfo").then((module2) => ({ default: module2["KitchenSinkContentInfo"] }))),
273
273
  "KitchenSinkContentTags": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkContentTags").then((module2) => ({ default: module2["KitchenSinkContentTags"] }))),
274
274
  "KitchenSinkHeading": (0, import_react.lazy)(() => import("@digigov/react-core/KitchenSinkHeading").then((module2) => ({ default: module2["KitchenSinkHeading"] }))),