@digigov/react-core 2.0.0-87b6232d → 2.0.0-8bbad051
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/Accordion/index.native.d.ts +1 -5
- package/AccordionSection/index.native.d.ts +1 -3
- 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/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/Base/index.native.js.map +2 -2
- package/Base/index.web.js.map +1 -1
- package/Base/mapping.native.d.ts +1 -1
- package/Base/mapping.native.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/CopyToClipboardMessage/index.native.d.ts +1 -3
- package/DateInputItem/index.native.d.ts +1 -3
- package/Details/index.native.d.ts +1 -3
- 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/LinkBase/index.js +1 -1
- package/LinkBase/index.js.map +2 -2
- package/NavListItemActionBase/index.js +2 -2
- package/NavListItemActionBase/index.js.map +2 -2
- package/NavListItemActionContainer/index.native.d.ts +0 -2
- package/NotificationBannerLink/index.native.d.ts +1 -3
- 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/TextArea/index.native.d.ts +1 -3
- package/TextInput/index.native.d.ts +1 -3
- package/Typography/index.d.ts +1 -1
- package/Typography/index.js +15 -17
- package/Typography/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/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/cjs/Base/index.native.js.map +2 -2
- package/cjs/Base/index.web.js.map +1 -1
- package/cjs/Base/mapping.native.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/LinkBase/index.js +1 -1
- package/cjs/LinkBase/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/Typography/index.js +15 -17
- package/cjs/Typography/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 +6 -8
- package/cjs/registry.js.map +2 -2
- package/cjs/utils/index.native/index.js +32 -34
- package/cjs/utils/index.native.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 +5 -5
- package/registry/index.js +6 -8
- 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/Base/compat/Input/CheckboxInput.native.tsx +2 -6
- package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
- package/src/Base/index.native.tsx +2 -2
- package/src/Base/index.web.tsx +1 -1
- package/src/Base/mapping.native.tsx +1 -1
- package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
- package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
- 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/LinkBase/index.tsx +1 -1
- package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +0 -1
- package/src/NavListItemActionBase/index.tsx +2 -2
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
- 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 +79 -2
- 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/Typography/index.tsx +21 -20
- package/src/index.ts +1 -2
- package/src/lazy.js +1 -2
- package/src/registry.js +6 -8
- package/src/utils/index.native.tsx +56 -54
- package/utils/index.native/index.js +32 -34
- package/utils/index.native.d.ts +3 -6
- package/utils/index.native.js.map +2 -2
- 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
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
|
});
|
|
@@ -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 * 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;
|
|
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// 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 * highlight is optional.\n * Add the highlight prop to add a highlight line on the left of the row.\n * @value 'warning' warning highlight line\n * @value 'error' error highlight line\n * @default undefined\n */\n highlight?: 'warning' | 'error';\n\n /*\n * highlightAssistiveText is optional.\n * Use this prop to add assistive text for screen readers when the highlight prop is used.\n * This text will be visually hidden.\n * @default undefined\n */\n highlightAssistiveText?: string;\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 highlight,\n highlightAssistiveText,\n className,\n children,\n ...props\n },\n ref\n) {\n const calculatedHighlightAssistiveText =\n highlightAssistiveText ||\n (highlight === 'warning'\n ? '\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE'\n : highlight === 'error'\n ? '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF'\n : undefined);\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 'ds-table__cell--warning': highlight === 'warning',\n 'ds-table__cell--error': highlight === 'error',\n })}\n {...props}\n >\n {calculatedHighlightAssistiveText && (\n <VisuallyHidden>{calculatedHighlightAssistiveText}</VisuallyHidden>\n )}\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AA+CpB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT;AAAA,EACE,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,mCACJ,2BACC,cAAc,YACX,+CACA,cAAc,UACZ,gGACA;AAER,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,QACxC,2BAA2B,cAAc;AAAA,QACzC,yBAAyB,cAAc;AAAA,MACzC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,oCACC,oCAAC,sBAAgB,gCAAiC;AAAA,IAEnD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["TableDataCell"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement> &
|
|
2
|
-
className?: string;
|
|
3
|
-
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<unknown>>;
|
|
4
2
|
export default TextArea;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> &
|
|
2
|
-
className?: string;
|
|
3
|
-
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
|
|
4
2
|
export default TextInput;
|
package/Typography/index.d.ts
CHANGED
|
@@ -26,5 +26,5 @@ export interface TypographyProps extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | '
|
|
|
26
26
|
* Typography component is used as generic component for typography.
|
|
27
27
|
* Use Typography component to extend components such as Heading, NormalText Paragraph etc.
|
|
28
28
|
*/
|
|
29
|
-
export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
29
|
+
export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>>;
|
|
30
30
|
export default Typography;
|
package/Typography/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const Typography = React.forwardRef(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
);
|
|
4
|
+
const Typography = React.forwardRef(function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
|
|
5
|
+
return /* @__PURE__ */ React.createElement(
|
|
6
|
+
Base,
|
|
7
|
+
{
|
|
8
|
+
as,
|
|
9
|
+
ref,
|
|
10
|
+
className: clsx(className, {
|
|
11
|
+
[`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
|
|
12
|
+
[`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
|
|
13
|
+
}),
|
|
14
|
+
...props
|
|
15
|
+
},
|
|
16
|
+
children
|
|
17
|
+
);
|
|
18
|
+
});
|
|
21
19
|
var Typography_default = Typography;
|
|
22
20
|
export {
|
|
23
21
|
Typography,
|
package/Typography/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Typography/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef<\n HTMLSpanElement | HTMLParagraphElement | HTMLHeadingElement,\n TypographyProps\n>(function Typography(\n { as, fontSize, fontWeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as={as}\n ref={ref}\n className={clsx(className, {\n [`ds-!-font-size-${fontSize}`]: fontSize !== undefined,\n [`ds-!-font-weight-${fontWeight}`]: fontWeight !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Typography;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM,WAG9B,SAASA,YACT,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,CAAC,kBAAkB,QAAQ,EAAE,GAAG,aAAa;AAAA,QAC7C,CAAC,oBAAoB,UAAU,EAAE,GAAG,eAAe;AAAA,MACrD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["Typography"]
|
|
7
7
|
}
|
|
@@ -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;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';\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAMzB,MAAM,mBAAmB,aAAAA,QAAM,WAGpC,SAASC,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,MAC3B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["React", "AccordionSection", "Base", "clsx"]
|
|
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
|
}
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAIzB,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBAAgB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACjE,SACE,6BAAAD,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAE,SAAK,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAIzB,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBAAgB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACjE,SACE,6BAAAD,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAE,SAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["React", "BannerContainer", "clsx"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/Base/compat/Input/CheckboxInput.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type CheckboxInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const CheckboxInput = React.forwardRef<\n HTMLInputElement,\n CheckboxInputProps\n>(function CheckboxInput({ checked, value, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n currentTarget: {\n value,\n checked: !checked,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n return (\n // @ts-ignore\n <TouchableOpacity\n ref={ref as Ref<TouchableOpacity>}\n onPress={handlePress}\n {...props}\n >\n {checked && <View className=\"ds-checkboxes__input--checked\" />}\n </TouchableOpacity>\n );\n});\n\nexport default CheckboxInput;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAmE;AACnE,0BAAuC;AAOhC,MAAM,gBAAgB,aAAAA,QAAM,WAGjC,SAASC,eAAc,EAAE,SAAS,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,QAAM,cAAc,MAAM;AACxB,QAAI,UAAU;AACZ,YAAM,iBAAiB;AAAA,QACrB,eAAe;AAAA,UACb;AAAA,UACA,SAAS,CAAC;AAAA,QACZ;AAAA,MACF;AACA,eAAS,cAAc;AAAA,IACzB;AAAA,EACF;AACA;AAAA;AAAA,IAEE,6BAAAD,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAG;AAAA;AAAA,MAEH,WAAW,6BAAAA,QAAA,cAAC,4BAAK,WAAU,iCAAgC;AAAA,IAC9D;AAAA;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
|
|
6
6
|
"names": ["React", "CheckboxInput"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/Base/compat/Input/RadioInput.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type RadioInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ value, checked, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n target: {\n value: value,\n checked: true,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <TouchableOpacity\n ref={ref as Ref<typeof TouchableOpacity>}\n onPress={handlePress}\n {...(props as any)}\n >\n {checked && <View className=\"ds-radios__input--checked\" />}\n </TouchableOpacity>\n );\n }\n);\n\nexport default RadioInput;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAmE;AACnE,0BAAuC;AAOhC,MAAM,aAAa,aAAAA,QAAM;AAAA,EAC9B,SAASC,YAAW,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/D,UAAM,cAAc,MAAM;AACxB,UAAI,UAAU;AACZ,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,YACA,SAAS;AAAA,UACX;AAAA,QACF;AACA,iBAAS,cAAc;AAAA,MACzB;AAAA,IACF;AAEA,WACE,6BAAAD,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAI;AAAA;AAAA,MAEJ,WAAW,6BAAAA,QAAA,cAAC,4BAAK,WAAU,6BAA4B;AAAA,IAC1D;AAAA,EAEJ;AACF;AAEA,IAAO,4BAAQ;",
|
|
6
6
|
"names": ["React", "RadioInput"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Base/index.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { Text, View, ViewProps } from 'react-native';\nimport { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';\nimport { mapping } from '@digigov/react-core/Base/mapping.native';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\nimport { wrap } from '@digigov/react-core/Base/wrap.native';\n\nexport type BaseProps<C extends React.ElementType> = CoreBaseProps<C> &\n ViewProps;\nexport type BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nconst BooleanMapper = {\n true: true,\n false: false,\n undefined: false,\n null: false,\n '': false,\n};\n\nconst textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { useMemo, type JSX } from 'react';\nimport { Text, View, ViewProps } from 'react-native';\nimport { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';\nimport { mapping } from '@digigov/react-core/Base/mapping.native';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\nimport { wrap } from '@digigov/react-core/Base/wrap.native';\n\nexport type BaseProps<C extends React.ElementType> = CoreBaseProps<C> &\n ViewProps;\nexport type BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nconst BooleanMapper = {\n true: true,\n false: false,\n undefined: false,\n null: false,\n '': false,\n};\n\nconst textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType,\n>(\n {\n as,\n display,\n children,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n className,\n 'aria-expanded': ariaExpanded,\n ...props\n }: BaseProps<C>,\n ref: React.ComponentPropsWithRef<C>['ref']\n) {\n const classNames = className?.split(' ') || [];\n let applyBasePropsToWrapper = true;\n\n const basePropToClassName = basePropGenerator({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n });\n\n if (typeof children === 'string') {\n children = [children];\n }\n if (Array.isArray(children)) {\n const textClassNames = classNames\n ?.map((className) => `${className}__text`)\n .join(' ');\n children = children.map((child, index) => {\n if (Array.isArray(child)) {\n return child.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} className={textClassNames}>\n {child}\n </Text>\n );\n }\n return child;\n });\n } else if (typeof child === 'string') {\n if (as && textHtmlTags.includes(as as string)) {\n applyBasePropsToWrapper = false;\n }\n return (\n <Text\n key={index}\n className={\n applyBasePropsToWrapper\n ? textClassNames\n : `${textClassNames} ${basePropToClassName}`\n }\n {...(props.onClick && {\n onPress: props.onClick,\n })}\n >\n {child}\n </Text>\n );\n }\n return child;\n });\n }\n const Component = useMemo(() => {\n const C = mapping[as as keyof JSX.IntrinsicElements] || View;\n if (\n classNames.find((className) =>\n className.match(/__wrapper|__before|__after$/)\n )\n ) {\n return wrap(C);\n }\n return C;\n }, [className]);\n\n Object.keys(props).forEach((k) => {\n if (k.startsWith('aria')) {\n if (BooleanMapper[props[k as keyof typeof props]] !== undefined) {\n props[k as keyof typeof props] =\n BooleanMapper[props[k as keyof typeof props]];\n }\n }\n });\n return (\n <Component\n {...props}\n ref={ref}\n aria-expanded={\n (ariaExpanded as unknown as string) === 'false'\n ? false\n : ariaExpanded === true\n ? true\n : undefined\n }\n className={\n applyBasePropsToWrapper\n ? `${basePropToClassName} ${className}`\n : className\n }\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyC;AACzC,0BAAsC;AAEtC,qBAAwB;AACxB,mBAAkC;AAClC,kBAAqB;AAQrB,MAAM,gBAAgB;AAAA,EACpB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,EACN,IAAI;AACN;AAEA,MAAM,eAAe,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK,MAAM;AAExD,MAAM,OAAsB,aAAAA,QAAM,WAAW,SAASC,MAG3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,GAAG;AACL,GACA,KACA;AACA,QAAM,aAAa,WAAW,MAAM,GAAG,KAAK,CAAC;AAC7C,MAAI,0BAA0B;AAE9B,QAAM,0BAAsB,gCAAkB;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI,OAAO,aAAa,UAAU;AAChC,eAAW,CAAC,QAAQ;AAAA,EACtB;AACA,MAAI,MAAM,QAAQ,QAAQ,GAAG;AAC3B,UAAM,iBAAiB,YACnB,IAAI,CAACC,eAAc,GAAGA,UAAS,QAAQ,EACxC,KAAK,GAAG;AACX,eAAW,SAAS,IAAI,CAAC,OAAO,UAAU;AACxC,UAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,eAAO,MAAM,IAAI,CAACC,QAAOC,WAAU;AACjC,cAAI,OAAOD,WAAU,UAAU;AAC7B,mBACE,6BAAAH,QAAA,cAAC,4BAAK,KAAKI,QAAO,WAAW,kBAC1BD,MACH;AAAA,UAEJ;AACA,iBAAOA;AAAA,QACT,CAAC;AAAA,MACH,WAAW,OAAO,UAAU,UAAU;AACpC,YAAI,MAAM,aAAa,SAAS,EAAY,GAAG;AAC7C,oCAA0B;AAAA,QAC5B;AACA,eACE,6BAAAH,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,WACE,0BACI,iBACA,GAAG,cAAc,IAAI,mBAAmB;AAAA,YAE7C,GAAI,MAAM,WAAW;AAAA,cACpB,SAAS,MAAM;AAAA,YACjB;AAAA;AAAA,UAEC;AAAA,QACH;AAAA,MAEJ;AACA,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,gBAAY,sBAAQ,MAAM;AAC9B,UAAM,IAAI,uBAAQ,EAAiC,KAAK;AACxD,QACE,WAAW;AAAA,MAAK,CAACE,eACfA,WAAU,MAAM,6BAA6B;AAAA,IAC/C,GACA;AACA,iBAAO,kBAAK,CAAC;AAAA,IACf;AACA,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,CAAC;AAEd,SAAO,KAAK,KAAK,EAAE,QAAQ,CAAC,MAAM;AAChC,QAAI,EAAE,WAAW,MAAM,GAAG;AACxB,UAAI,cAAc,MAAM,CAAuB,CAAC,MAAM,QAAW;AAC/D,cAAM,CAAuB,IAC3B,cAAc,MAAM,CAAuB,CAAC;AAAA,MAChD;AAAA,IACF;AAAA,EACF,CAAC;AACD,SACE,6BAAAF,QAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,iBACG,iBAAuC,UACpC,QACA,iBAAiB,OACf,OACA;AAAA,MAER,WACE,0BACI,GAAG,mBAAmB,IAAI,SAAS,KACnC;AAAA;AAAA,IAGL;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React", "Base", "className", "child", "index"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Base/index.web.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\ninterface AsProp<C extends React.ElementType> {\n as?: C | React.ElementType<any>;\n}\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);\n\n// This is the first reusable type utility we built\ntype PolymorphicComponentProp<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = React.PropsWithChildren<Props & AsProp<C>> &\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;\n\n// This is a new type utitlity with ref!\ntype PolymorphicComponentPropWithRef<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = PolymorphicComponentProp<C, Props> & { ref?: any };\n\n// This is the type for the \"ref\" only\ntype PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>['ref'];\n\n/**\n * This is the updated component props using PolymorphicComponentPropWithRef\n */\nexport type BaseProps<C extends React.ElementType> =\n PolymorphicComponentPropWithRef<\n C,\n {\n /** margin is optional. It has not a default value. */\n margin?: SpacingValues | SpacingMediaValues;\n /** marginTop is optional. It has not a default value. */\n marginTop?: SpacingValues | SpacingMediaValues;\n /** marginBottom is optional. It has not a default value. */\n marginBottom?: SpacingValues | SpacingMediaValues;\n /** marginLeft is optional. It has not a default value. */\n marginLeft?: SpacingValues | SpacingMediaValues;\n /** marginRight is optional. It has not a default value. */\n marginRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for margin. Margin is optional. It has not a default value. */\n m?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginTop. MarginTop is optional. It has not a default value. */\n mt?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */\n mb?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */\n ml?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginRight. MarginRight is optional. It has not a default value. */\n mr?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginX. MarginX is optional. It has not a default value. */\n mx?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginY. MarginY is optional. It has not a default value. */\n my?: SpacingValues | SpacingMediaValues;\n /** padding is optional. It has not a default value. */\n padding?: SpacingValues | SpacingMediaValues;\n /** paddingTop is optional. It has not a default value. */\n paddingTop?: SpacingValues | SpacingMediaValues;\n /** paddingBottom is optional. It has not a default value. */\n paddingBottom?: SpacingValues | SpacingMediaValues;\n /** paddingLeft is optional. It has not a default value. */\n paddingLeft?: SpacingValues | SpacingMediaValues;\n /** paddingRight is optional. It has not a default value. */\n paddingRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for padding. Padding is optional. It has not a default value. */\n p?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */\n pt?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */\n pb?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */\n pl?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */\n pr?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingX. PaddingX is optional. It has not a default value. */\n px?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingY. PaddingY is optional. It has not a default value. */\n py?: SpacingValues | SpacingMediaValues;\n /** printHidden is optional. Default value is false. When true, the component is hidden at print. */\n printHidden?: boolean;\n /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/\n printVisible?: 'block' | 'inline';\n /** Components will be hidden at all screen sizes. */\n hidden?: boolean;\n /** Components will be hidden from 'xs' screen size and up. */\n xsUpHidden?: boolean;\n /** Components will be hidden from 'sm' screen size and up. */\n smUpHidden?: boolean;\n /** Components will be hidden from 'md' screen size and up. */\n mdUpHidden?: boolean;\n /** Components will be hidden from 'lg' screen size and up. */\n lgUpHidden?: boolean;\n /** Components will be hidden from 'xl' screen size and up. */\n xlUpHidden?: boolean;\n /** Components will be hidden between xs and sm screen size. */\n xsHidden?: boolean;\n /** Components will be hidden between sm and md screen size. */\n smHidden?: boolean;\n /** Components will be hidden between md and lg screen size. */\n mdHidden?: boolean;\n /** Components will be hidden between lg and xl screen size. */\n lgHidden?: boolean;\n /** Components will be hidden between xl and 2xl screen size. */\n xlHidden?: boolean;\n /** display is optional. It has not a default value. */\n display?: 'flex' | 'block' | 'none';\n }\n >;\n\nexport type SpacingValues =\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 14\n | 16\n | 20\n | 24\n | 28\n | 32\n | 36\n | 40\n | 44\n | 48\n | 52\n | 56\n | 60\n | 64\n | 72\n | 80\n | 96;\n\nexport interface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\n\n/**\n * This is the type used in the type annotation for the component\n */\ntype BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\ninterface AsProp<C extends React.ElementType> {\n as?: C | React.ElementType<any>;\n}\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);\n\n// This is the first reusable type utility we built\ntype PolymorphicComponentProp<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = React.PropsWithChildren<Props & AsProp<C>> &\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;\n\n// This is a new type utitlity with ref!\ntype PolymorphicComponentPropWithRef<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = PolymorphicComponentProp<C, Props> & { ref?: any };\n\n// This is the type for the \"ref\" only\ntype PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>['ref'];\n\n/**\n * This is the updated component props using PolymorphicComponentPropWithRef\n */\nexport type BaseProps<C extends React.ElementType> =\n PolymorphicComponentPropWithRef<\n C,\n {\n /** margin is optional. It has not a default value. */\n margin?: SpacingValues | SpacingMediaValues;\n /** marginTop is optional. It has not a default value. */\n marginTop?: SpacingValues | SpacingMediaValues;\n /** marginBottom is optional. It has not a default value. */\n marginBottom?: SpacingValues | SpacingMediaValues;\n /** marginLeft is optional. It has not a default value. */\n marginLeft?: SpacingValues | SpacingMediaValues;\n /** marginRight is optional. It has not a default value. */\n marginRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for margin. Margin is optional. It has not a default value. */\n m?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginTop. MarginTop is optional. It has not a default value. */\n mt?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */\n mb?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */\n ml?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginRight. MarginRight is optional. It has not a default value. */\n mr?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginX. MarginX is optional. It has not a default value. */\n mx?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginY. MarginY is optional. It has not a default value. */\n my?: SpacingValues | SpacingMediaValues;\n /** padding is optional. It has not a default value. */\n padding?: SpacingValues | SpacingMediaValues;\n /** paddingTop is optional. It has not a default value. */\n paddingTop?: SpacingValues | SpacingMediaValues;\n /** paddingBottom is optional. It has not a default value. */\n paddingBottom?: SpacingValues | SpacingMediaValues;\n /** paddingLeft is optional. It has not a default value. */\n paddingLeft?: SpacingValues | SpacingMediaValues;\n /** paddingRight is optional. It has not a default value. */\n paddingRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for padding. Padding is optional. It has not a default value. */\n p?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */\n pt?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */\n pb?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */\n pl?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */\n pr?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingX. PaddingX is optional. It has not a default value. */\n px?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingY. PaddingY is optional. It has not a default value. */\n py?: SpacingValues | SpacingMediaValues;\n /** printHidden is optional. Default value is false. When true, the component is hidden at print. */\n printHidden?: boolean;\n /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/\n printVisible?: 'block' | 'inline';\n /** Components will be hidden at all screen sizes. */\n hidden?: boolean;\n /** Components will be hidden from 'xs' screen size and up. */\n xsUpHidden?: boolean;\n /** Components will be hidden from 'sm' screen size and up. */\n smUpHidden?: boolean;\n /** Components will be hidden from 'md' screen size and up. */\n mdUpHidden?: boolean;\n /** Components will be hidden from 'lg' screen size and up. */\n lgUpHidden?: boolean;\n /** Components will be hidden from 'xl' screen size and up. */\n xlUpHidden?: boolean;\n /** Components will be hidden between xs and sm screen size. */\n xsHidden?: boolean;\n /** Components will be hidden between sm and md screen size. */\n smHidden?: boolean;\n /** Components will be hidden between md and lg screen size. */\n mdHidden?: boolean;\n /** Components will be hidden between lg and xl screen size. */\n lgHidden?: boolean;\n /** Components will be hidden between xl and 2xl screen size. */\n xlHidden?: boolean;\n /** display is optional. It has not a default value. */\n display?: 'flex' | 'block' | 'none';\n }\n >;\n\nexport type SpacingValues =\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 14\n | 16\n | 20\n | 24\n | 28\n | 32\n | 36\n | 40\n | 44\n | 48\n | 52\n | 56\n | 60\n | 64\n | 72\n | 80\n | 96;\n\nexport interface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\n\n/**\n * This is the type used in the type annotation for the component\n */\ntype BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType,\n>(\n {\n as,\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n children,\n className,\n ...props\n }: BaseProps<C>,\n ref?: PolymorphicRef<C>\n) {\n const Component = as || 'span';\n\n const basePropToClassName = basePropGenerator({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n });\n\n return (\n <Component\n className={clsx(basePropToClassName, className)}\n ref={ref}\n {...props}\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,mBAAkC;AAiK3B,MAAM,OAAsB,aAAAA,QAAM,WAAW,SAASC,MAG3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,YAAY,MAAM;AAExB,QAAM,0BAAsB,gCAAkB;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,6BAAAD,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,YAAAE,SAAK,qBAAqB,SAAS;AAAA,MAC9C;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["React", "Base", "clsx"]
|
|
7
7
|
}
|