@digigov/react-core 2.0.0-a32ad9b2 → 2.0.0-abd768eb
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/AccordionSectionSummaryHeading/index.d.ts +1 -0
- package/AccordionSectionSummaryHeading/index.js +3 -2
- package/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/Button/index.js +1 -0
- package/Button/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/LinkBase/index.js +1 -0
- package/LinkBase/index.js.map +2 -2
- package/Table/index.d.ts +9 -0
- package/Table/index.js +4 -1
- package/Table/index.js.map +2 -2
- package/TableDataCell/index.d.ts +13 -0
- package/TableDataCell/index.js +10 -1
- package/TableDataCell/index.js.map +2 -2
- package/WarningText/index.d.ts +7 -0
- package/WarningText/index.js +10 -2
- package/WarningText/index.js.map +2 -2
- package/cjs/AccordionSectionSummaryHeading/index.js +3 -2
- package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/cjs/Button/index.js +1 -0
- package/cjs/Button/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/LinkBase/index.js +1 -0
- package/cjs/LinkBase/index.js.map +2 -2
- package/cjs/Table/index.js +4 -1
- package/cjs/Table/index.js.map +2 -2
- package/cjs/TableDataCell/index.js +10 -1
- package/cjs/TableDataCell/index.js.map +2 -2
- package/cjs/WarningText/index.js +10 -2
- package/cjs/WarningText/index.js.map +2 -2
- package/cjs/index.js +2 -4
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +1 -2
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +10 -12
- package/cjs/registry.js.map +2 -2
- package/index.d.ts +1 -2
- package/index.js +2 -3
- package/index.js.map +2 -2
- package/lazy/index.js +1 -2
- package/package.json +3 -3
- package/registry/index.js +10 -12
- package/src/AccordionSectionSummaryHeading/index.tsx +9 -2
- package/src/Button/index.tsx +1 -0
- 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/LinkBase/index.tsx +1 -0
- package/src/Table/index.tsx +12 -0
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TableDataCell/index.tsx +23 -1
- package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
- package/src/WarningText/index.test.tsx +5 -0
- package/src/WarningText/index.tsx +17 -2
- package/src/index.ts +1 -2
- package/src/lazy.js +1 -2
- package/src/registry.js +10 -12
- package/AutoCompleteInputTypeahead/index.d.ts +0 -11
- package/AutoCompleteInputTypeahead/index.js +0 -25
- package/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/AutoCompleteInputTypeahead/package.json +0 -6
- package/CircularProgress/index.js.map +0 -7
- package/CircularProgress/index.test.d.ts +0 -1
- package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
- package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/cjs/CircularProgress/index.js.map +0 -7
- package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
- package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
- package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
- package/src/CircularProgress/index.test.tsx +0 -34
- /package/{AutoCompleteInputTypeahead → CircularProgressBase}/index.test.d.ts +0 -0
|
@@ -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/Button/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const Button = React.forwardRef(
|
|
|
22
22
|
className: clsx(className, {
|
|
23
23
|
"ds-link": variant === "link",
|
|
24
24
|
"ds-link-warning": variant === "link" && color === "warning",
|
|
25
|
+
"ds-link--disabled": variant === "link" && disabled,
|
|
25
26
|
"ds-btn": variant === "button",
|
|
26
27
|
"ds-btn--dense": dense,
|
|
27
28
|
"ds-btn-primary": variant === "button" && color === "primary",
|
package/Button/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Button/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiCzB,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASA,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-link--disabled': variant === 'link' && disabled,\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiCzB,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASA,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,qBAAqB,YAAY,UAAU;AAAA,UAC3C,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
|
|
6
6
|
"names": ["Button"]
|
|
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/LinkBase/index.js
CHANGED
package/LinkBase/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinkBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...(props.as && { defaultStyle: defaultStyle, underline: underline })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAI,MAAM,MAAM,EAAE,cAA4B,UAAqB;AAAA,QACnE,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
|
|
6
6
|
"names": ["LinkBase"]
|
|
7
7
|
}
|
package/Table/index.d.ts
CHANGED
|
@@ -45,6 +45,15 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
45
45
|
* @default 'default'
|
|
46
46
|
*/
|
|
47
47
|
variant?: 'zebra' | 'default';
|
|
48
|
+
/**
|
|
49
|
+
* verticalAlign is optional.
|
|
50
|
+
* The verticalAlign property sets vertical alignment of the table-cells.
|
|
51
|
+
* @value 'top'
|
|
52
|
+
* @value 'middle'
|
|
53
|
+
* @value 'bottom'
|
|
54
|
+
* @default 'middle'
|
|
55
|
+
*/
|
|
56
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
48
57
|
}
|
|
49
58
|
/**
|
|
50
59
|
* Table component is used to wrap the sub components of a table
|
package/Table/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const Table = React.forwardRef(
|
|
|
8
8
|
dense = false,
|
|
9
9
|
verticalBorders = false,
|
|
10
10
|
stacked = "never",
|
|
11
|
+
verticalAlign = "middle",
|
|
11
12
|
className,
|
|
12
13
|
children,
|
|
13
14
|
...props
|
|
@@ -26,7 +27,9 @@ const Table = React.forwardRef(
|
|
|
26
27
|
"ds-table--light": headerVariant === "light",
|
|
27
28
|
"ds-table--dense": dense,
|
|
28
29
|
"ds-table--zebra": variant === "zebra",
|
|
29
|
-
"ds-table--vertical-lines": verticalBorders
|
|
30
|
+
"ds-table--vertical-lines": verticalBorders,
|
|
31
|
+
"ds-table--align-top": verticalAlign === "top",
|
|
32
|
+
"ds-table--align-bottom": verticalAlign === "bottom"
|
|
30
33
|
}),
|
|
31
34
|
...props
|
|
32
35
|
},
|
package/Table/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Table/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\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 TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n /**\n * verticalAlign is optional.\n * The verticalAlign property sets vertical alignment of the table-cells.\n * @value 'top'\n * @value 'middle'\n * @value 'bottom'\n * @default 'middle'\n */\n verticalAlign?: 'top' | 'middle' | 'bottom';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n verticalAlign = 'middle',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n 'ds-table--align-top': verticalAlign === 'top',\n 'ds-table--align-bottom': verticalAlign === 'bottom',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA4DzB,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB;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,YAAY;AAAA,UACZ,4BAA4B,YAAY;AAAA,UACxC,wBAAwB,YAAY;AAAA,UACpC,wBAAwB,WAAW;AAAA,UACnC,kBAAkB,kBAAkB;AAAA,UACpC,mBAAmB,kBAAkB;AAAA,UACrC,mBAAmB;AAAA,UACnB,mBAAmB,YAAY;AAAA,UAC/B,4BAA4B;AAAA,UAC5B,uBAAuB,kBAAkB;AAAA,UACzC,0BAA0B,kBAAkB;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["Table"]
|
|
7
7
|
}
|
package/TableDataCell/index.d.ts
CHANGED
|
@@ -10,6 +10,19 @@ export interface TableDataCellProps extends BaseProps<'td'> {
|
|
|
10
10
|
* @default 'text'
|
|
11
11
|
*/
|
|
12
12
|
dataType?: 'text' | 'numeric';
|
|
13
|
+
/**
|
|
14
|
+
* variant is optional.
|
|
15
|
+
* Use this prop to control the bottom border of the table-cell.
|
|
16
|
+
* @value 'border'
|
|
17
|
+
* @value 'none'
|
|
18
|
+
* @default 'border'
|
|
19
|
+
*/
|
|
20
|
+
variant?: 'border' | 'none';
|
|
21
|
+
/**
|
|
22
|
+
* wordBreak is optional.
|
|
23
|
+
* Use this prop to control the word break of the table-cell contents.
|
|
24
|
+
*/
|
|
25
|
+
wordBreak?: 'break-all' | 'none';
|
|
13
26
|
}
|
|
14
27
|
/**
|
|
15
28
|
* Use TableDataCell inside the Table component to fill the data of a cell in a table.
|
package/TableDataCell/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const TableDataCell = React.forwardRef(function TableDataCell2({
|
|
4
|
+
const TableDataCell = React.forwardRef(function TableDataCell2({
|
|
5
|
+
dataType = "text",
|
|
6
|
+
variant = "border",
|
|
7
|
+
wordBreak = "none",
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) {
|
|
5
12
|
return /* @__PURE__ */ React.createElement(
|
|
6
13
|
Base,
|
|
7
14
|
{
|
|
@@ -9,6 +16,8 @@ const TableDataCell = React.forwardRef(function TableDataCell2({ dataType = "tex
|
|
|
9
16
|
ref,
|
|
10
17
|
className: clsx(className, {
|
|
11
18
|
"ds-table__cell": true,
|
|
19
|
+
"ds-table__cell--border": variant === "border",
|
|
20
|
+
"ds-table__cell--break-all": wordBreak === "break-all",
|
|
12
21
|
"ds-table__cell--numeric": dataType === "numeric"
|
|
13
22
|
}),
|
|
14
23
|
...props
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/TableDataCell/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\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// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n /**\n * variant is optional.\n * Use this prop to control the bottom border of the table-cell.\n * @value 'border'\n * @value 'none'\n * @default 'border'\n */\n variant?: 'border' | 'none';\n /**\n * wordBreak is optional.\n * Use this prop to control the word break of the table-cell contents.\n */\n wordBreak?: 'break-all' | 'none';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n {\n dataType = 'text',\n variant = 'border',\n wordBreak = 'none',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"td\"\n ref={ref}\n className={clsx(className, {\n 'ds-table__cell': true,\n 'ds-table__cell--border': variant === 'border',\n 'ds-table__cell--break-all': wordBreak === 'break-all',\n 'ds-table__cell--numeric': dataType === 'numeric',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA8BzB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT;AAAA,EACE,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;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,kBAAkB;AAAA,QAClB,0BAA0B,YAAY;AAAA,QACtC,6BAA6B,cAAc;AAAA,QAC3C,2BAA2B,aAAa;AAAA,MAC1C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["TableDataCell"]
|
|
7
7
|
}
|
package/WarningText/index.d.ts
CHANGED
|
@@ -14,6 +14,13 @@ export interface WarningTextProps extends BaseProps<'div'> {
|
|
|
14
14
|
* @default false
|
|
15
15
|
* */
|
|
16
16
|
dense?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* strong is optional.
|
|
19
|
+
* @value true if you want to emphasize importance, conveying meaning to both sighted and screen readers.
|
|
20
|
+
* @value false WarningText will be a simple div element.
|
|
21
|
+
* @default true
|
|
22
|
+
* */
|
|
23
|
+
strong?: boolean;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
19
26
|
* WarningText.
|
package/WarningText/index.js
CHANGED
|
@@ -3,7 +3,15 @@ import clsx from "clsx";
|
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
4
|
import { WarningTextAssistive } from "@digigov/react-core/WarningTextAssistive";
|
|
5
5
|
const WarningText = React.forwardRef(
|
|
6
|
-
function WarningText2({
|
|
6
|
+
function WarningText2({
|
|
7
|
+
className,
|
|
8
|
+
strong = true,
|
|
9
|
+
assistiveText = "\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE",
|
|
10
|
+
dense,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) {
|
|
14
|
+
const Component = strong ? "strong" : "div";
|
|
7
15
|
return /* @__PURE__ */ React.createElement(
|
|
8
16
|
Base,
|
|
9
17
|
{
|
|
@@ -28,7 +36,7 @@ const WarningText = React.forwardRef(
|
|
|
28
36
|
/* @__PURE__ */ React.createElement(
|
|
29
37
|
Base,
|
|
30
38
|
{
|
|
31
|
-
as:
|
|
39
|
+
as: Component,
|
|
32
40
|
className: clsx({
|
|
33
41
|
"ds-warning-text__content": true
|
|
34
42
|
})
|
package/WarningText/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/WarningText/index.tsx"],
|
|
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';\nexport interface WarningTextProps 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 * dense is optional.\n * @value true WarningText will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * WarningText.\n * Use the WarningText component when you need to warn users about something important.\n * The component is used with a text inside it.\n */\nexport const WarningText = React.forwardRef<HTMLDivElement, WarningTextProps>(\n function WarningText(\n {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,4BAA4B;
|
|
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';\nexport interface WarningTextProps 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 * dense is optional.\n * @value true WarningText will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * strong is optional.\n * @value true if you want to emphasize importance, conveying meaning to both sighted and screen readers.\n * @value false WarningText will be a simple div element.\n * @default true\n * */\n strong?: boolean;\n}\n/**\n * WarningText.\n * Use the WarningText component when you need to warn users about something important.\n * The component is used with a text inside it.\n */\nexport const WarningText = React.forwardRef<HTMLDivElement, WarningTextProps>(\n function WarningText(\n {\n className,\n strong = true,\n assistiveText = '\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE',\n dense,\n children,\n ...props\n },\n ref\n ) {\n const Component = strong ? 'strong' : 'div';\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-warning-text': true,\n 'ds-warning-text--dense': dense,\n })}\n {...props}\n >\n <Base\n as=\"div\"\n className={clsx({\n 'ds-warning-text__icon': true,\n })}\n >\n !\n </Base>\n\n <Base\n as={Component}\n className={clsx({\n 'ds-warning-text__content': true,\n })}\n >\n <WarningTextAssistive>{assistiveText}</WarningTextAssistive>\n {children}\n </Base>\n </Base>\n );\n }\n);\n\nexport default WarningText;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,4BAA4B;AA4B9B,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP;AAAA,IACE;AAAA,IACA,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,YAAY,SAAS,WAAW;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,0BAA0B;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,IAAG;AAAA,UACH,WAAW,KAAK;AAAA,YACd,yBAAyB;AAAA,UAC3B,CAAC;AAAA;AAAA,QACF;AAAA,MAED;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,IAAI;AAAA,UACJ,WAAW,KAAK;AAAA,YACd,4BAA4B;AAAA,UAC9B,CAAC;AAAA;AAAA,QAED,oCAAC,4BAAsB,aAAc;AAAA,QACpC;AAAA,MACH;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["WarningText"]
|
|
7
7
|
}
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(AccordionSectionSummaryHeading_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 AccordionSectionSummaryHeading = import_react.default.forwardRef(function AccordionSectionSummaryHeading2({ className, children, ...props }, ref) {
|
|
37
|
+
const AccordionSectionSummaryHeading = import_react.default.forwardRef(function AccordionSectionSummaryHeading2({ variant, className, children, ...props }, ref) {
|
|
38
38
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
39
|
import_Base.default,
|
|
40
40
|
{
|
|
@@ -51,7 +51,8 @@ const AccordionSectionSummaryHeading = import_react.default.forwardRef(function
|
|
|
51
51
|
{
|
|
52
52
|
as: "span",
|
|
53
53
|
className: (0, import_clsx.default)({
|
|
54
|
-
"ds-accordion__section-button": true
|
|
54
|
+
"ds-accordion__section-button": true,
|
|
55
|
+
"ds-accordion__section-button--arrows": variant === "arrows"
|
|
55
56
|
})
|
|
56
57
|
},
|
|
57
58
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAYzB,MAAM,iCAAiC,aAAAA,QAAM,WAGlD,SAASC,gCACT,EAAE,SAAS,WAAW,UAAU,GAAG,MAAM,GACzC,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA,MACJ,MAAK;AAAA;AAAA,IAEL,6BAAAH,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,eAAW,YAAAC,SAAK;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": ["React", "AccordionSectionSummaryHeading", "Base", "clsx"]
|
|
7
7
|
}
|
package/cjs/Button/index.js
CHANGED
|
@@ -55,6 +55,7 @@ const Button = import_react.default.forwardRef(
|
|
|
55
55
|
className: (0, import_clsx.default)(className, {
|
|
56
56
|
"ds-link": variant === "link",
|
|
57
57
|
"ds-link-warning": variant === "link" && color === "warning",
|
|
58
|
+
"ds-link--disabled": variant === "link" && disabled,
|
|
58
59
|
"ds-btn": variant === "button",
|
|
59
60
|
"ds-btn--dense": dense,
|
|
60
61
|
"ds-btn-primary": variant === "button" && color === "primary",
|
package/cjs/Button/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Button/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiCzB,MAAM,SAAS,aAAAA,QAAM;AAAA,EAC1B,SAASC,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE,6BAAAD,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAW,YAAAC,SAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-link--disabled': variant === 'link' && disabled,\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiCzB,MAAM,SAAS,aAAAA,QAAM;AAAA,EAC1B,SAASC,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE,6BAAAD,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAW,YAAAC,SAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,qBAAqB,YAAY,UAAU;AAAA,UAC3C,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
|
|
6
6
|
"names": ["React", "Button", "Base", "clsx"]
|
|
7
7
|
}
|
|
@@ -25,16 +25,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var
|
|
29
|
-
__export(
|
|
30
|
-
|
|
31
|
-
default: () =>
|
|
28
|
+
var CircularProgressBase_exports = {};
|
|
29
|
+
__export(CircularProgressBase_exports, {
|
|
30
|
+
CircularProgressBase: () => CircularProgressBase,
|
|
31
|
+
default: () => CircularProgressBase_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(CircularProgressBase_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
|
|
37
|
+
const CircularProgressBase = import_react.default.forwardRef(function CircularProgress({ color = "primary", size = "md", className, ...props }, ref) {
|
|
38
38
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
39
|
import_Base.default,
|
|
40
40
|
{
|
|
@@ -68,9 +68,9 @@ const CircularProgress = import_react.default.forwardRef(function CircularProgre
|
|
|
68
68
|
)
|
|
69
69
|
);
|
|
70
70
|
});
|
|
71
|
-
var
|
|
71
|
+
var CircularProgressBase_default = CircularProgressBase;
|
|
72
72
|
// Annotate the CommonJS export names for ESM import in node:
|
|
73
73
|
0 && (module.exports = {
|
|
74
|
-
|
|
74
|
+
CircularProgressBase
|
|
75
75
|
});
|
|
76
76
|
//# 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAyBzB,MAAM,uBAAuB,aAAAA,QAAM,WAGxC,SAAS,iBACT,EAAE,QAAQ,WAAW,OAAO,MAAM,WAAW,GAAG,MAAM,GACtD,KACA;AACA,SACE,6BAAAA,QAAA;AAAA,IAAC,YAAAC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,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,6BAAAF,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,IACA,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
|
|
6
|
+
"names": ["React", "Base", "clsx"]
|
|
7
|
+
}
|
|
@@ -34,14 +34,15 @@ module.exports = __toCommonJS(DetailsContent_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 DetailsContent = import_react.default.forwardRef(function DetailsContent2({ className, children, ...props }, ref) {
|
|
37
|
+
const DetailsContent = import_react.default.forwardRef(function DetailsContent2({ color, className, children, ...props }, ref) {
|
|
38
38
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
39
|
import_Base.default,
|
|
40
40
|
{
|
|
41
41
|
as: "div",
|
|
42
42
|
ref,
|
|
43
43
|
className: (0, import_clsx.default)(className, {
|
|
44
|
-
"ds-details__content": true
|
|
44
|
+
"ds-details__content": true,
|
|
45
|
+
"ds-details__content--secondary": color === "secondary"
|
|
45
46
|
}),
|
|
46
47
|
...props
|
|
47
48
|
},
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAezB,MAAM,iBAAiB,aAAAA,QAAM,WAGlC,SAASC,gBAAe,EAAE,OAAO,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACvE,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,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": ["React", "DetailsContent", "Base", "clsx"]
|
|
7
7
|
}
|
package/cjs/LinkBase/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/LinkBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAsBzB,MAAM,WAAW,aAAAA,QAAM;AAAA,EAC5B,SAASC,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE,6BAAAD,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,eAAW,YAAAC,SAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...(props.as && { defaultStyle: defaultStyle, underline: underline })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAsBzB,MAAM,WAAW,aAAAA,QAAM;AAAA,EAC5B,SAASC,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE,6BAAAD,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,eAAW,YAAAC,SAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAI,MAAM,MAAM,EAAE,cAA4B,UAAqB;AAAA,QACnE,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
|
|
6
6
|
"names": ["React", "LinkBase", "Base", "clsx"]
|
|
7
7
|
}
|