@digigov/react-core 2.0.0-a402a664 → 2.0.0-a594a958
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/AccordionSection/index.web.d.ts +0 -1
- package/AccordionSection/index.web.js.map +2 -2
- package/AccordionSectionSummaryHeading/index.d.ts +1 -0
- package/AccordionSectionSummaryHeading/index.js +3 -2
- package/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/BannerContainer/index.js +1 -1
- package/BannerContainer/index.js.map +2 -2
- package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
- package/{CircularProgress → CircularProgressBase}/index.js +4 -4
- package/CircularProgressBase/index.js.map +7 -0
- package/{CircularProgress → CircularProgressBase}/package.json +1 -1
- package/DetailsContent/index.d.ts +1 -0
- package/DetailsContent/index.js +3 -2
- package/DetailsContent/index.js.map +2 -2
- package/Grid/index.d.ts +1 -7
- package/Grid/index.js.map +2 -2
- package/NavListItemActionBase/index.js +2 -2
- package/NavListItemActionBase/index.js.map +2 -2
- package/SummaryList/index.d.ts +10 -2
- package/SummaryList/index.js +10 -2
- package/SummaryList/index.js.map +2 -2
- package/SummaryListItem/index.js +1 -1
- package/SummaryListItem/index.js.map +2 -2
- package/SummaryListItemKey/index.d.ts +14 -0
- package/SummaryListItemKey/index.js +14 -2
- package/SummaryListItemKey/index.js.map +2 -2
- package/SummaryListItemValue/index.d.ts +14 -0
- package/SummaryListItemValue/index.js +11 -2
- package/SummaryListItemValue/index.js.map +2 -2
- package/TableDataCell/index.d.ts +9 -0
- package/TableDataCell/index.js +8 -1
- package/TableDataCell/index.js.map +2 -2
- package/cjs/AccordionSection/index.web.js.map +2 -2
- package/cjs/AccordionSectionSummaryHeading/index.js +3 -2
- package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/cjs/BannerContainer/index.js +1 -1
- package/cjs/BannerContainer/index.js.map +2 -2
- package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
- package/cjs/CircularProgressBase/index.js.map +7 -0
- package/cjs/DetailsContent/index.js +3 -2
- package/cjs/DetailsContent/index.js.map +2 -2
- package/cjs/Grid/index.js.map +2 -2
- package/cjs/NavListItemActionBase/index.js +2 -2
- package/cjs/NavListItemActionBase/index.js.map +2 -2
- package/cjs/SummaryList/index.js +10 -2
- package/cjs/SummaryList/index.js.map +2 -2
- package/cjs/SummaryListItem/index.js +1 -1
- package/cjs/SummaryListItem/index.js.map +2 -2
- package/cjs/SummaryListItemKey/index.js +14 -2
- package/cjs/SummaryListItemKey/index.js.map +3 -3
- package/cjs/SummaryListItemValue/index.js +11 -2
- package/cjs/SummaryListItemValue/index.js.map +3 -3
- package/cjs/TableDataCell/index.js +8 -1
- package/cjs/TableDataCell/index.js.map +3 -3
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +1 -1
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +4 -4
- package/cjs/registry.js.map +2 -2
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/lazy/index.js +1 -1
- package/package.json +3 -3
- package/registry/index.js +4 -4
- package/src/Accordion/__snapshots__/index.test.tsx.snap +48 -0
- package/src/Accordion/index.test.tsx +24 -0
- package/src/AccordionSection/index.web.tsx +0 -1
- package/src/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +17 -0
- package/src/AccordionSectionSummaryHeading/index.test.tsx +9 -0
- package/src/AccordionSectionSummaryHeading/index.tsx +9 -2
- package/src/BannerContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BannerContainer/index.tsx +1 -1
- package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
- package/src/CircularProgressBase/index.test.tsx +38 -0
- package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
- package/src/DetailsContent/index.tsx +11 -2
- package/src/Grid/index.tsx +1 -7
- package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +0 -1
- package/src/NavListItemActionBase/index.tsx +2 -2
- package/src/SummaryList/__snapshots__/index.test.tsx.snap +36 -0
- package/src/SummaryList/index.test.tsx +15 -0
- package/src/SummaryList/index.tsx +20 -3
- package/src/SummaryListItem/index.tsx +1 -1
- package/src/SummaryListItemKey/__snapshots__/index.test.tsx.snap +70 -0
- package/src/SummaryListItemKey/index.test.tsx +29 -0
- package/src/SummaryListItemKey/index.tsx +29 -1
- package/src/SummaryListItemValue/__snapshots__/index.test.tsx.snap +34 -0
- package/src/SummaryListItemValue/index.test.tsx +14 -0
- package/src/SummaryListItemValue/index.tsx +30 -2
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +77 -0
- package/src/TableDataCell/index.test.tsx +42 -0
- package/src/TableDataCell/index.tsx +33 -0
- package/src/TableRow/__snapshots__/index.test.tsx.snap +1 -1
- package/src/TableRow/index.test.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/lazy.js +1 -1
- package/src/registry.js +4 -4
- package/CircularProgress/index.js.map +0 -7
- package/cjs/CircularProgress/index.js.map +0 -7
- package/src/CircularProgress/index.test.tsx +0 -34
- /package/{CircularProgress → CircularProgressBase}/index.test.d.ts +0 -0
|
@@ -4,7 +4,6 @@ export interface AccordionSectionProps extends BaseProps<'details'> {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* AccordionSection should be inside the Accordion component.
|
|
7
|
-
*
|
|
8
7
|
* Inside this component must place the Accordion and the AccordionSectionContent components.
|
|
9
8
|
*/
|
|
10
9
|
export declare const AccordionSection: React.ForwardRefExoticComponent<Omit<AccordionSectionProps, "ref"> & React.RefAttributes<HTMLDetailsElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AccordionSection/index.web.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nexport interface AccordionSectionProps extends BaseProps<'details'> {}\n/**\n * AccordionSection should be inside the Accordion component.\n
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nexport interface AccordionSectionProps extends BaseProps<'details'> {}\n/**\n * AccordionSection should be inside the Accordion component.\n * Inside this component must place the Accordion and the AccordionSectionContent components.\n */\nexport const AccordionSection = React.forwardRef<\n HTMLDetailsElement,\n AccordionSectionProps\n>(function AccordionSection({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"details\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default AccordionSection;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAMzB,MAAM,mBAAmB,MAAM,WAGpC,SAASA,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,MAC3B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["AccordionSection"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {
|
|
4
|
+
variant?: 'default' | 'arrows';
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const AccordionSectionSummaryHeading = React.forwardRef(function AccordionSectionSummaryHeading2({ className, children, ...props }, ref) {
|
|
4
|
+
const AccordionSectionSummaryHeading = React.forwardRef(function AccordionSectionSummaryHeading2({ variant, className, children, ...props }, ref) {
|
|
5
5
|
return /* @__PURE__ */ React.createElement(
|
|
6
6
|
Base,
|
|
7
7
|
{
|
|
@@ -18,7 +18,8 @@ const AccordionSectionSummaryHeading = React.forwardRef(function AccordionSectio
|
|
|
18
18
|
{
|
|
19
19
|
as: "span",
|
|
20
20
|
className: clsx({
|
|
21
|
-
"ds-accordion__section-button": true
|
|
21
|
+
"ds-accordion__section-button": true,
|
|
22
|
+
"ds-accordion__section-button--arrows": variant === "arrows"
|
|
22
23
|
})
|
|
23
24
|
},
|
|
24
25
|
children
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AccordionSectionSummaryHeading/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {}\n/**\n * AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.\n */\nexport const AccordionSectionSummaryHeading = React.forwardRef<\n HTMLHeadingElement,\n AccordionSectionSummaryHeadingProps\n>(function AccordionSectionSummaryHeading(\n { className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"h2\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section-heading': true,\n })}\n {...props}\n role=\"button\"\n >\n <Base\n as=\"span\"\n className={clsx({\n 'ds-accordion__section-button': true,\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default AccordionSectionSummaryHeading;\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {\n /*\n * The type of the icon to be displayed on the right side of the heading.\n * @default 'default'\n */\n variant?: 'default' | 'arrows';\n}\n/**\n * AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.\n */\nexport const AccordionSectionSummaryHeading = React.forwardRef<\n HTMLHeadingElement,\n AccordionSectionSummaryHeadingProps\n>(function AccordionSectionSummaryHeading(\n { variant, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"h2\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section-heading': true,\n })}\n {...props}\n role=\"button\"\n >\n <Base\n as=\"span\"\n className={clsx({\n 'ds-accordion__section-button': true,\n 'ds-accordion__section-button--arrows': variant === 'arrows',\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default AccordionSectionSummaryHeading;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAYzB,MAAM,iCAAiC,MAAM,WAGlD,SAASA,gCACT,EAAE,SAAS,WAAW,UAAU,GAAG,MAAM,GACzC,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA,MACJ,MAAK;AAAA;AAAA,IAEL;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAW,KAAK;AAAA,UACd,gCAAgC;AAAA,UAChC,wCAAwC,YAAY;AAAA,QACtD,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,yCAAQ;",
|
|
6
6
|
"names": ["AccordionSectionSummaryHeading"]
|
|
7
7
|
}
|
package/BannerContainer/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/BannerContainer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { Base, BaseProps } from '@digigov/react-core/Base';\n\nexport interface BannerContainerProps extends BaseProps<'div'> {}\n\nexport const BannerContainer = React.forwardRef<\n HTMLDivElement,\n BannerContainerProps\n>(function BannerContainer({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,YAAuB;AAIzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBAAgB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { Base, BaseProps } from '@digigov/react-core/Base';\n\nexport interface BannerContainerProps extends BaseProps<'div'> {}\n\nexport const BannerContainer = React.forwardRef<\n HTMLDivElement,\n BannerContainerProps\n>(function BannerContainer({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-banner-container': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default BannerContainer;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,YAAuB;AAIzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBAAgB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["BannerContainer"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
-
export interface
|
|
3
|
+
export interface CircularProgressBaseProps extends BaseProps<'svg'> {
|
|
4
4
|
/**
|
|
5
5
|
* color prop is optional.
|
|
6
6
|
* color prop is used to change the color of the loader.
|
|
@@ -20,8 +20,8 @@ export interface CircularProgressProps extends BaseProps<'svg'> {
|
|
|
20
20
|
size?: 'sm' | 'md' | 'lg';
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Use
|
|
24
|
-
*
|
|
23
|
+
* Use CircularProgressBase component as an animated loader.
|
|
24
|
+
* CircularProgressBase can be used inside LoaderContainer component.
|
|
25
25
|
*/
|
|
26
|
-
export declare const
|
|
27
|
-
export default
|
|
26
|
+
export declare const CircularProgressBase: React.ForwardRefExoticComponent<Omit<CircularProgressBaseProps, "ref"> & React.RefAttributes<SVGElement>>;
|
|
27
|
+
export default CircularProgressBase;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const
|
|
4
|
+
const CircularProgressBase = React.forwardRef(function CircularProgress({ color = "primary", size = "md", className, ...props }, ref) {
|
|
5
5
|
return /* @__PURE__ */ React.createElement(
|
|
6
6
|
Base,
|
|
7
7
|
{
|
|
@@ -35,9 +35,9 @@ const CircularProgress = React.forwardRef(function CircularProgress2({ color = "
|
|
|
35
35
|
)
|
|
36
36
|
);
|
|
37
37
|
});
|
|
38
|
-
var
|
|
38
|
+
var CircularProgressBase_default = CircularProgressBase;
|
|
39
39
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
CircularProgressBase,
|
|
41
|
+
CircularProgressBase_default as default
|
|
42
42
|
};
|
|
43
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CircularProgressBase/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CircularProgressBaseProps extends BaseProps<'svg'> {\n /**\n * color prop is optional.\n * color prop is used to change the color of the loader.\n * @value 'primary' is the default color.\n * @value 'secondary' recommended for dark backgrounds.\n * @default 'primary'\n */\n color?: 'primary' | 'secondary';\n /**\n * size prop is optional.\n * size prop is used to change the size of the loader.\n * @value 'sm'\n * @value 'md'\n * @value 'lg'\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n}\n/**\n * Use CircularProgressBase component as an animated loader.\n * CircularProgressBase can be used inside LoaderContainer component.\n */\nexport const CircularProgressBase = React.forwardRef<\n SVGElement,\n CircularProgressBaseProps\n>(function CircularProgress(\n { color = 'primary', size = 'md', className, ...props },\n ref\n) {\n return (\n <Base\n as=\"svg\"\n ref={ref}\n className={clsx(className, {\n 'ds-circular-progress': true,\n 'ds-circular-progress--secondary': color === 'secondary',\n 'ds-circular-progress--sm': size === 'sm',\n 'ds-circular-progress--md': size === 'md',\n 'ds-circular-progress--lg': size === 'lg',\n })}\n focusable=\"false\"\n viewBox=\"0 0 200 200\"\n aria-hidden=\"true\"\n {...props}\n >\n <path\n className=\"ds-circular-progress__circle ds-circular-progress__circle--1\"\n d=\"M26,99.551C26,55.478,60.246,27.5,99.85,27.5S174,55.478,174,99.551,139.455,172.5,99.85,172.5C60.273,172.473,26,143.6,26,99.551Z\"\n />\n <path\n className=\"ds-circular-progress__circle ds-circular-progress__circle--2\"\n d=\"M26,99.551C26,55.478,60.246,27.5,99.85,27.5S174,55.478,174,99.551,139.455,172.5,99.85,172.5C60.273,172.473,26,143.6,26,99.551Z\"\n />\n </Base>\n );\n});\n\nexport default CircularProgressBase;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAyBzB,MAAM,uBAAuB,MAAM,WAGxC,SAAS,iBACT,EAAE,QAAQ,WAAW,OAAO,MAAM,WAAW,GAAG,MAAM,GACtD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,UAAU;AAAA,QAC7C,4BAA4B,SAAS;AAAA,QACrC,4BAA4B,SAAS;AAAA,QACrC,4BAA4B,SAAS;AAAA,MACvC,CAAC;AAAA,MACD,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,eAAY;AAAA,MACX,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/DetailsContent/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const DetailsContent = React.forwardRef(function DetailsContent2({ className, children, ...props }, ref) {
|
|
4
|
+
const DetailsContent = React.forwardRef(function DetailsContent2({ color, className, children, ...props }, ref) {
|
|
5
5
|
return /* @__PURE__ */ React.createElement(
|
|
6
6
|
Base,
|
|
7
7
|
{
|
|
8
8
|
as: "div",
|
|
9
9
|
ref,
|
|
10
10
|
className: clsx(className, {
|
|
11
|
-
"ds-details__content": true
|
|
11
|
+
"ds-details__content": true,
|
|
12
|
+
"ds-details__content--secondary": color === "secondary"
|
|
12
13
|
}),
|
|
13
14
|
...props
|
|
14
15
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DetailsContent/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface DetailsContentProps extends BaseProps<'div'> {}\n/**\n *DetailsContent component wraps the content text.\n *It is used inside Details component as children\n */\nexport const DetailsContent = React.forwardRef<\n HTMLDivElement,\n DetailsContentProps\n>(function DetailsContent({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-details__content': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default DetailsContent;\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface DetailsContentProps extends BaseProps<'div'> {\n /*\n ** color is optional. Default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @default 'primary'\n * */\n color?: 'primary' | 'secondary';\n}\n/**\n *DetailsContent component wraps the content text.\n *It is used inside Details component as children\n */\nexport const DetailsContent = React.forwardRef<\n HTMLDivElement,\n DetailsContentProps\n>(function DetailsContent({ color, className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-details__content': true,\n 'ds-details__content--secondary': color === 'secondary',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default DetailsContent;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAezB,MAAM,iBAAiB,MAAM,WAGlC,SAASA,gBAAe,EAAE,OAAO,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,QACvB,kCAAkC,UAAU;AAAA,MAC9C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["DetailsContent"]
|
|
7
7
|
}
|
package/Grid/index.d.ts
CHANGED
|
@@ -30,13 +30,7 @@ export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
|
|
|
30
30
|
inline?: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Defines the space between the type item components. It can only be used on a type container component.
|
|
33
|
-
* @value 1
|
|
34
|
-
* @value 2
|
|
35
|
-
* @value 4
|
|
36
|
-
* @value 6
|
|
37
|
-
* @value 8
|
|
38
|
-
* @value 10
|
|
39
|
-
* @value 12
|
|
33
|
+
* @value 1 - 12
|
|
40
34
|
* @value object
|
|
41
35
|
* @default undefined
|
|
42
36
|
*/
|
package/Grid/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Grid/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\ntype GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;\ninterface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\nexport interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {\n /**\n * If true, the component will have the flex container behavior. You should be wrapping items with a container.\n * @value true\n * @value false\n * @default false\n */\n container?: boolean;\n /**\n * @value true\n * @value false\n * @default true\n */\n item?: boolean;\n /**\n * @value true\n * @value false\n */\n inline?: boolean;\n /**\n * Defines the space between the type item components. It can only be used on a type container component.\n * @value 1
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\ntype GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;\ninterface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\nexport interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {\n /**\n * If true, the component will have the flex container behavior. You should be wrapping items with a container.\n * @value true\n * @value false\n * @default false\n */\n container?: boolean;\n /**\n * @value true\n * @value false\n * @default true\n */\n item?: boolean;\n /**\n * @value true\n * @value false\n */\n inline?: boolean;\n /**\n * Defines the space between the type item components. It can only be used on a type container component.\n * @value 1 - 12\n * @value object\n * @default undefined\n */\n spacing?: SpacingValues | SpacingMediaValues;\n\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for all the screen sizes with the lowest priority.\n */\n xs?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the sm breakpoint and wider screens if not overridden.\n */\n sm?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the md breakpoint and wider screens if not overridden.\n */\n md?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the lg breakpoint and wider screens if not overridden.\n */\n lg?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the xl breakpoint and wider screens.\n */\n xl?: GridValues;\n}\n/**\n * Grid is used to arrange other components in complex grid configurations of rows and columns.\n */\nexport const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(\n {\n className,\n children,\n container = false,\n item = true,\n spacing,\n inline,\n xs,\n sm,\n md,\n lg,\n xl,\n as,\n ...props\n },\n ref\n) {\n return (\n <Base\n as={as || 'div'}\n ref={ref}\n className={clsx(className, {\n 'ds-grid': container,\n 'ds-grid-item': item,\n 'ds-grid-inline': container && inline,\n [`ds-gap-${spacing}`]: container && typeof spacing === 'number',\n [`ds-gap-xs-${(spacing as SpacingMediaValues)?.xs}`]:\n container && (spacing as SpacingMediaValues)?.xs !== undefined,\n [`ds-gap-sm-${(spacing as SpacingMediaValues)?.sm}`]:\n container && (spacing as SpacingMediaValues)?.sm !== undefined,\n [`ds-gap-md-${(spacing as SpacingMediaValues)?.md}`]:\n container && (spacing as SpacingMediaValues)?.md !== undefined,\n [`ds-gap-lg-${(spacing as SpacingMediaValues)?.lg}`]:\n container && (spacing as SpacingMediaValues)?.lg !== undefined,\n [`ds-gap-xl-${(spacing as SpacingMediaValues)?.xl}`]:\n container && (spacing as SpacingMediaValues)?.xl !== undefined,\n [`xs:ds-grid__col-span-${xs}`]: item && xs !== undefined,\n [`sm:ds-grid__col-span-${sm}`]: item && sm !== undefined,\n [`md:ds-grid__col-span-${md}`]: item && md !== undefined,\n [`lg:ds-grid__col-span-${lg}`]: item && lg !== undefined,\n [`xl:ds-grid__col-span-${xl}`]: item && xl !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Grid;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAkFzB,MAAM,OAAO,MAAM,WAAmC,SAASA,MACpE;AAAA,EACE;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,gBAAgB;AAAA,QAChB,kBAAkB,aAAa;AAAA,QAC/B,CAAC,UAAU,OAAO,EAAE,GAAG,aAAa,OAAO,YAAY;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,MACjD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,eAAQ;",
|
|
6
6
|
"names": ["Grid"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import NavListItemActionContainer from "@digigov/react-core/NavListItemActionCon
|
|
|
3
3
|
import NavListItemBadge from "@digigov/react-core/NavListItemBadge";
|
|
4
4
|
import NavListItemButton from "@digigov/react-core/NavListItemButton";
|
|
5
5
|
import NavListItemLinkBase from "@digigov/react-core/NavListItemLinkBase";
|
|
6
|
-
const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, ...props }, ref) {
|
|
6
|
+
const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, badgeText, ...props }, ref) {
|
|
7
7
|
return /* @__PURE__ */ React.createElement(NavListItemActionContainer, null, href ? /* @__PURE__ */ React.createElement(
|
|
8
8
|
NavListItemLinkBase,
|
|
9
9
|
{
|
|
@@ -22,7 +22,7 @@ const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({
|
|
|
22
22
|
ref
|
|
23
23
|
},
|
|
24
24
|
children || label
|
|
25
|
-
),
|
|
25
|
+
), badgeText && /* @__PURE__ */ React.createElement(NavListItemBadge, { text: badgeText }));
|
|
26
26
|
});
|
|
27
27
|
var NavListItemActionBase_default = NavListItemActionBase;
|
|
28
28
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/NavListItemActionBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAA6B;AACpC,OAAO,gCAAgC;AACvC,OAAO,sBAAsB;AAC7B,OAAO,uBAEA;AACP,OAAO,yBAEA;AAyBA,MAAM,wBAAwB,MAAM,WAGzC,SAASA,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,MAAM,
|
|
4
|
+
"sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, badgeText, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {badgeText && <NavListItemBadge text={badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemActionBase;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAA6B;AACpC,OAAO,gCAAgC;AACvC,OAAO,sBAAsB;AAC7B,OAAO,uBAEA;AACP,OAAO,yBAEA;AAyBA,MAAM,wBAAwB,MAAM,WAGzC,SAASA,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,WAAW,GAAG,MAAM,GACvE,KACA;AACA,SACE,oCAAC,kCACE,OACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,aAAa,oCAAC,oBAAiB,MAAM,WAAW,CACnD;AAEJ,CAAC;AAED,IAAO,gCAAQ;",
|
|
6
6
|
"names": ["NavListItemActionBase"]
|
|
7
7
|
}
|
package/SummaryList/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
4
4
|
/**
|
|
5
5
|
* border is optional.
|
|
6
6
|
* By default, SummaryList has borders. You can remove borders by using border prop.
|
|
7
|
-
* By default is true
|
|
7
|
+
* By default is true.
|
|
8
8
|
* @value true
|
|
9
9
|
* @value false
|
|
10
10
|
* @default true
|
|
@@ -13,12 +13,20 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
13
13
|
/**
|
|
14
14
|
* noLastBorder is optional.
|
|
15
15
|
* By default, SummaryList has borders. You can remove last border by using noLastBorder prop.
|
|
16
|
-
* By default is
|
|
16
|
+
* By default is false.
|
|
17
17
|
* @value true
|
|
18
18
|
* @value false
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
21
|
noLastBorder?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* error is optional.
|
|
24
|
+
* If true, the SummaryList will be styled to indicate an error state.
|
|
25
|
+
* @value true
|
|
26
|
+
* @value false
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
error?: boolean;
|
|
22
30
|
}
|
|
23
31
|
/**
|
|
24
32
|
* SummaryList used as a table with summary information.
|
package/SummaryList/index.js
CHANGED
|
@@ -2,7 +2,14 @@ import React from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
4
|
const SummaryList = React.forwardRef(
|
|
5
|
-
function SummaryList2({
|
|
5
|
+
function SummaryList2({
|
|
6
|
+
border = true,
|
|
7
|
+
noLastBorder = false,
|
|
8
|
+
error = false,
|
|
9
|
+
className,
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}, ref) {
|
|
6
13
|
return /* @__PURE__ */ React.createElement(
|
|
7
14
|
Base,
|
|
8
15
|
{
|
|
@@ -11,7 +18,8 @@ const SummaryList = React.forwardRef(
|
|
|
11
18
|
className: clsx(className, {
|
|
12
19
|
"ds-summary-list": true,
|
|
13
20
|
"ds-summary-list--no-border": !border,
|
|
14
|
-
"ds-summary-list--no-last-border": noLastBorder
|
|
21
|
+
"ds-summary-list--no-last-border": noLastBorder,
|
|
22
|
+
"ds-summary-list--error": error === true
|
|
15
23
|
}),
|
|
16
24
|
...props
|
|
17
25
|
},
|
package/SummaryList/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SummaryList/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListProps extends BaseProps<'dl'> {\n /**\n * border is optional.\n * By default, SummaryList has borders. You can remove borders by using border prop.\n * By default is true
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListProps extends BaseProps<'dl'> {\n /**\n * border is optional.\n * By default, SummaryList has borders. You can remove borders by using border prop.\n * By default is true.\n * @value true\n * @value false\n * @default true\n */\n border?: boolean;\n /**\n * noLastBorder is optional.\n * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.\n * By default is false.\n * @value true\n * @value false\n * @default false\n */\n noLastBorder?: boolean;\n\n /**\n * error is optional.\n * If true, the SummaryList will be styled to indicate an error state.\n * @value true\n * @value false\n * @default false\n */\n error?: boolean;\n}\n/**\n * SummaryList used as a table with summary information.\n * It must contain a list of SummaryListItem components.\n */\nexport const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(\n function SummaryList(\n {\n border = true,\n noLastBorder = false,\n error = false,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"dl\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list': true,\n 'ds-summary-list--no-border': !border,\n 'ds-summary-list--no-last-border': noLastBorder,\n 'ds-summary-list--error': error === true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default SummaryList;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAmCzB,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP;AAAA,IACE,SAAS;AAAA,IACT,eAAe;AAAA,IACf,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,8BAA8B,CAAC;AAAA,UAC/B,mCAAmC;AAAA,UACnC,0BAA0B,UAAU;AAAA,QACtC,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["SummaryList"]
|
|
7
7
|
}
|
package/SummaryListItem/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const SummaryListItem = React.forwardRef(function SummaryListItem2({
|
|
4
|
+
const SummaryListItem = React.forwardRef(function SummaryListItem2({ border = true, className, children, ...props }, ref) {
|
|
5
5
|
return /* @__PURE__ */ React.createElement(
|
|
6
6
|
Base,
|
|
7
7
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SummaryListItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemProps extends BaseProps<'div'> {\n /**\n * border is optional.\n * By default, SummaryListItem has borders. You can remove borders by using border prop.\n * By default is true\n ** @value true\n * @value false\n * @default true\n */\n border?: boolean;\n}\n/**\n * SummaryListItem must be inside SummaryList component. Each SummaryListItem is a row in the SummaryList table.\n * This component must contain SummaryListItemKey, SummaryListItemValue and SummaryListItemAction, in that order.\n */\nexport const SummaryListItem = React.forwardRef<\n HTMLDivElement,\n SummaryListItemProps\n>(function SummaryListItem(\n {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBACT,EAAE,WAAW,UAAU,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemProps extends BaseProps<'div'> {\n /**\n * border is optional.\n * By default, SummaryListItem has borders. You can remove borders by using border prop.\n * By default is true\n ** @value true\n * @value false\n * @default true\n */\n border?: boolean;\n}\n/**\n * SummaryListItem must be inside SummaryList component. Each SummaryListItem is a row in the SummaryList table.\n * This component must contain SummaryListItemKey, SummaryListItemValue and SummaryListItemAction, in that order.\n */\nexport const SummaryListItem = React.forwardRef<\n HTMLDivElement,\n SummaryListItemProps\n>(function SummaryListItem(\n { border = true, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__row': true,\n 'ds-summary-list__row--no-border': !border,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItem;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBACT,EAAE,SAAS,MAAM,WAAW,UAAU,GAAG,MAAM,GAC/C,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,CAAC;AAAA,MACtC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["SummaryListItem"]
|
|
7
7
|
}
|
|
@@ -14,6 +14,20 @@ export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
|
|
|
14
14
|
* lg shows the width of the key column for large screens.
|
|
15
15
|
*/
|
|
16
16
|
lg?: WidthValues;
|
|
17
|
+
/**
|
|
18
|
+
* error is optional.
|
|
19
|
+
* Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
|
|
20
|
+
* @value true
|
|
21
|
+
* @value false
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
error?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* errorAssistiveText is optional.
|
|
27
|
+
* Default value is "Λανθασμένο πεδίο".
|
|
28
|
+
* errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
29
|
+
*/
|
|
30
|
+
errorAssistiveText?: string;
|
|
17
31
|
}
|
|
18
32
|
export type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
19
33
|
/**
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
|
|
4
|
+
import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
|
|
5
|
+
const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({
|
|
6
|
+
sm = 3,
|
|
7
|
+
md,
|
|
8
|
+
lg,
|
|
9
|
+
error,
|
|
10
|
+
errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
|
|
11
|
+
className,
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}, ref) {
|
|
5
15
|
return /* @__PURE__ */ React.createElement(
|
|
6
16
|
Base,
|
|
7
17
|
{
|
|
@@ -11,10 +21,12 @@ const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({ sm =
|
|
|
11
21
|
"ds-summary-list__key": true,
|
|
12
22
|
[`ds-summary-list__key--sm-${sm}`]: sm !== void 0,
|
|
13
23
|
[`ds-summary-list__key--md-${md}`]: md !== void 0,
|
|
14
|
-
[`ds-summary-list__key--lg-${lg}`]: lg !== void 0
|
|
24
|
+
[`ds-summary-list__key--lg-${lg}`]: lg !== void 0,
|
|
25
|
+
"ds-summary-list__key--error": error === true
|
|
15
26
|
}),
|
|
16
27
|
...props
|
|
17
28
|
},
|
|
29
|
+
error === true && /* @__PURE__ */ React.createElement(VisuallyHidden, null, errorAssistiveText),
|
|
18
30
|
children
|
|
19
31
|
);
|
|
20
32
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SummaryListItemKey/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemKeyProps extends BaseProps<'dt'> {\n /**\n * sm shows the width of the key column for small screens.\n * @default 3\n */\n sm?: WidthValues;\n /**\n * md shows the width of the key column for medium screens.\n */\n md?: WidthValues;\n /**\n * lg shows the width of the key column for large screens.\n */\n lg?: WidthValues;\n}\n\nexport type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;\n/**\n * SummaryListItemKey is used within the SummaryListItem component.\n * In this column we place the key information for the row (ex. \"Name\", \"Address\", etc).\n */\nexport const SummaryListItemKey = React.forwardRef<\n HTMLElement,\n SummaryListItemKeyProps\n>(function SummaryListItemKey(\n {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n\nexport interface SummaryListItemKeyProps extends BaseProps<'dt'> {\n /**\n * sm shows the width of the key column for small screens.\n * @default 3\n */\n sm?: WidthValues;\n /**\n * md shows the width of the key column for medium screens.\n */\n md?: WidthValues;\n /**\n * lg shows the width of the key column for large screens.\n */\n lg?: WidthValues;\n\n /**\n * error is optional.\n * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.\n * @value true\n * @value false\n * @default false\n */\n\n error?: boolean;\n /**\n * errorAssistiveText is optional.\n * Default value is \"\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF\".\n * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n errorAssistiveText?: string;\n}\n\nexport type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;\n/**\n * SummaryListItemKey is used within the SummaryListItem component.\n * In this column we place the key information for the row (ex. \"Name\", \"Address\", etc).\n */\nexport const SummaryListItemKey = React.forwardRef<\n HTMLElement,\n SummaryListItemKeyProps\n>(function SummaryListItemKey(\n {\n sm = 3,\n md,\n lg,\n error,\n errorAssistiveText = '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"dt\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__key': true,\n [`ds-summary-list__key--sm-${sm}`]: sm !== undefined,\n [`ds-summary-list__key--md-${md}`]: md !== undefined,\n [`ds-summary-list__key--lg-${lg}`]: lg !== undefined,\n 'ds-summary-list__key--error': error === true,\n })}\n {...props}\n >\n {error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemKey;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AAuCpB,MAAM,qBAAqB,MAAM,WAGtC,SAASA,oBACT;AAAA,EACE,KAAK;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,+BAA+B,UAAU;AAAA,MAC3C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,oCAAC,sBAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
|
|
6
6
|
"names": ["SummaryListItemKey"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface SummaryListItemValueProps extends BaseProps<'dd'> {
|
|
4
|
+
/**
|
|
5
|
+
* error is optional.
|
|
6
|
+
* Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
|
|
7
|
+
* @value true
|
|
8
|
+
* @value false
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
error?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* errorAssistiveText is optional.
|
|
14
|
+
* Default value is "Λανθασμένο πεδίο".
|
|
15
|
+
* errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
16
|
+
*/
|
|
17
|
+
errorAssistiveText?: string;
|
|
4
18
|
}
|
|
5
19
|
/**
|
|
6
20
|
* Details for the SummaryListItemValue.
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
|
|
4
|
+
import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
|
|
5
|
+
const SummaryListItemValue = React.forwardRef(function SummaryListItemValue2({
|
|
6
|
+
error,
|
|
7
|
+
errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) {
|
|
5
12
|
return /* @__PURE__ */ React.createElement(
|
|
6
13
|
Base,
|
|
7
14
|
{
|
|
8
15
|
as: "dd",
|
|
9
16
|
ref,
|
|
10
17
|
className: clsx(className, {
|
|
11
|
-
"ds-summary-list__value": true
|
|
18
|
+
"ds-summary-list__value": true,
|
|
19
|
+
"ds-summary-list__value--error": error === true
|
|
12
20
|
}),
|
|
13
21
|
...props
|
|
14
22
|
},
|
|
23
|
+
error === true && /* @__PURE__ */ React.createElement(VisuallyHidden, null, errorAssistiveText),
|
|
15
24
|
children
|
|
16
25
|
);
|
|
17
26
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SummaryListItemValue/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemValueProps extends BaseProps<'dd'> {}\n/**\n * Details for the SummaryListItemValue.\n */\nexport const SummaryListItemValue = React.forwardRef<\n HTMLElement,\n SummaryListItemValueProps\n>(function SummaryListItemValue({ className
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n\nexport interface SummaryListItemValueProps extends BaseProps<'dd'> {\n /**\n * error is optional.\n * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.\n * @value true\n * @value false\n * @default false\n */\n\n error?: boolean;\n /**\n * errorAssistiveText is optional.\n * Default value is \"\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF\".\n * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n errorAssistiveText?: string;\n}\n/**\n * Details for the SummaryListItemValue.\n */\nexport const SummaryListItemValue = React.forwardRef<\n HTMLElement,\n SummaryListItemValueProps\n>(function SummaryListItemValue(\n {\n error,\n errorAssistiveText = '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"dd\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__value': true,\n 'ds-summary-list__value--error': error === true,\n })}\n {...props}\n >\n {error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemValue;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AAsBpB,MAAM,uBAAuB,MAAM,WAGxC,SAASA,sBACT;AAAA,EACE;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,iCAAiC,UAAU;AAAA,MAC7C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,oCAAC,sBAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
|
|
6
6
|
"names": ["SummaryListItemValue"]
|
|
7
7
|
}
|
package/TableDataCell/index.d.ts
CHANGED
|
@@ -23,6 +23,15 @@ export interface TableDataCellProps extends BaseProps<'td'> {
|
|
|
23
23
|
* Use this prop to control the word break of the table-cell contents.
|
|
24
24
|
*/
|
|
25
25
|
wordBreak?: 'break-all' | 'none';
|
|
26
|
+
/**
|
|
27
|
+
* highlight is optional.
|
|
28
|
+
* Add the highlight prop to add a highlight line on the left of the row.
|
|
29
|
+
* @value 'warning' warning highlight line
|
|
30
|
+
* @value 'error' error highlight line
|
|
31
|
+
* @default undefined
|
|
32
|
+
*/
|
|
33
|
+
highlight?: 'warning' | 'error';
|
|
34
|
+
highlightAssistiveText?: string;
|
|
26
35
|
}
|
|
27
36
|
/**
|
|
28
37
|
* Use TableDataCell inside the Table component to fill the data of a cell in a table.
|
package/TableDataCell/index.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
+
import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
|
|
4
5
|
const TableDataCell = React.forwardRef(function TableDataCell2({
|
|
5
6
|
dataType = "text",
|
|
6
7
|
variant = "border",
|
|
7
8
|
wordBreak = "none",
|
|
9
|
+
highlight,
|
|
10
|
+
highlightAssistiveText,
|
|
8
11
|
className,
|
|
9
12
|
children,
|
|
10
13
|
...props
|
|
11
14
|
}, ref) {
|
|
15
|
+
const calculatedHighlightAssistiveText = highlightAssistiveText || (highlight === "warning" ? "\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE" : highlight === "error" ? "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF" : void 0);
|
|
12
16
|
return /* @__PURE__ */ React.createElement(
|
|
13
17
|
Base,
|
|
14
18
|
{
|
|
@@ -18,10 +22,13 @@ const TableDataCell = React.forwardRef(function TableDataCell2({
|
|
|
18
22
|
"ds-table__cell": true,
|
|
19
23
|
"ds-table__cell--border": variant === "border",
|
|
20
24
|
"ds-table__cell--break-all": wordBreak === "break-all",
|
|
21
|
-
"ds-table__cell--numeric": dataType === "numeric"
|
|
25
|
+
"ds-table__cell--numeric": dataType === "numeric",
|
|
26
|
+
"ds-table__cell--warning": highlight === "warning",
|
|
27
|
+
"ds-table__cell--error": highlight === "error"
|
|
22
28
|
}),
|
|
23
29
|
...props
|
|
24
30
|
},
|
|
31
|
+
calculatedHighlightAssistiveText && /* @__PURE__ */ React.createElement(VisuallyHidden, null, calculatedHighlightAssistiveText),
|
|
25
32
|
children
|
|
26
33
|
);
|
|
27
34
|
});
|