@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Base/mapping.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { Link } from 'expo-router';\nimport { cssInterop } from 'nativewind';\nimport { Image, View } from 'react-native';\nimport Svg, { Path, Circle, Rect, G, Polygon } from 'react-native-svg';\nimport { Button } from '@digigov/react-core/Base/compat/button.native';\nimport CompatDetails from '@digigov/react-core/Base/compat/details.native';\nimport BaseInput from '@digigov/react-core/Base/compat/Input/index.native';\nimport { Ol } from '@digigov/react-core/Base/compat/ol.native';\nexport type MapProps<T extends keyof JSX.IntrinsicElements> =\n React.ComponentPropsWithoutRef<T>;\n\n// TODO: use MapProps<K> instead of any for props type\nexport type MappingType = {\n [K in keyof JSX.IntrinsicElements]?: (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n ) => JSX.Element | React.ReactNode;\n};\n\nexport const mapping: MappingType = {\n a: ({ children, ...props }) => (\n <Link {...props} asChild>\n <View>{children}</View>\n </Link>\n ),\n img: (props) => <Image {...props} />,\n button: Button,\n input: BaseInput,\n textarea: BaseInput,\n details: CompatDetails,\n ol: Ol,\n path: (props) => <Path {...props} />,\n // @ts-ignore\n svg: cssInterop(Svg, {\n className: {\n target: 'style',\n nativeStyleToProp: { width: true, height: true },\n },\n }),\n rect: (props) => <Rect {...props} />,\n circle: (props) => <Circle {...props} />,\n g: (props) => <G {...props} />,\n polygon: (props) => <Polygon {...props} />,\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { type JSX } from 'react';\nimport { Link } from 'expo-router';\nimport { cssInterop } from 'nativewind';\nimport { Image, View } from 'react-native';\nimport Svg, { Path, Circle, Rect, G, Polygon } from 'react-native-svg';\nimport { Button } from '@digigov/react-core/Base/compat/button.native';\nimport CompatDetails from '@digigov/react-core/Base/compat/details.native';\nimport BaseInput from '@digigov/react-core/Base/compat/Input/index.native';\nimport { Ol } from '@digigov/react-core/Base/compat/ol.native';\nexport type MapProps<T extends keyof JSX.IntrinsicElements> =\n React.ComponentPropsWithoutRef<T>;\n\n// TODO: use MapProps<K> instead of any for props type\nexport type MappingType = {\n [K in keyof JSX.IntrinsicElements]?: (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n ) => JSX.Element | React.ReactNode;\n};\n\nexport const mapping: MappingType = {\n a: ({ children, ...props }) => (\n <Link {...props} asChild>\n <View>{children}</View>\n </Link>\n ),\n img: (props) => <Image {...props} />,\n button: Button,\n input: BaseInput,\n textarea: BaseInput,\n details: CompatDetails,\n ol: Ol,\n path: (props) => <Path {...props} />,\n // @ts-ignore\n svg: cssInterop(Svg, {\n className: {\n target: 'style',\n nativeStyleToProp: { width: true, height: true },\n },\n }),\n rect: (props) => <Rect {...props} />,\n circle: (props) => <Circle {...props} />,\n g: (props) => <G {...props} />,\n polygon: (props) => <Polygon {...props} />,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAChC,yBAAqB;AACrB,wBAA2B;AAC3B,0BAA4B;AAC5B,8BAAoD;AACpD,oBAAuB;AACvB,qBAA0B;AAC1B,mBAAsB;AACtB,gBAAmB;AAYZ,MAAM,UAAuB;AAAA,EAClC,GAAG,CAAC,EAAE,UAAU,GAAG,MAAM,MACvB,6BAAAA,QAAA,cAAC,2BAAM,GAAG,OAAO,SAAO,QACtB,6BAAAA,QAAA,cAAC,gCAAM,QAAS,CAClB;AAAA,EAEF,KAAK,CAAC,UAAU,6BAAAA,QAAA,cAAC,6BAAO,GAAG,OAAO;AAAA,EAClC,QAAQ;AAAA,EACR,OAAO,aAAAC;AAAA,EACP,UAAU,aAAAA;AAAA,EACV,SAAS,eAAAC;AAAA,EACT,IAAI;AAAA,EACJ,MAAM,CAAC,UAAU,6BAAAF,QAAA,cAAC,gCAAM,GAAG,OAAO;AAAA;AAAA,EAElC,SAAK,8BAAW,wBAAAG,SAAK;AAAA,IACnB,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,mBAAmB,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,IACjD;AAAA,EACF,CAAC;AAAA,EACD,MAAM,CAAC,UAAU,6BAAAH,QAAA,cAAC,gCAAM,GAAG,OAAO;AAAA,EAClC,QAAQ,CAAC,UAAU,6BAAAA,QAAA,cAAC,kCAAQ,GAAG,OAAO;AAAA,EACtC,GAAG,CAAC,UAAU,6BAAAA,QAAA,cAAC,6BAAG,GAAG,OAAO;AAAA,EAC5B,SAAS,CAAC,UAAU,6BAAAA,QAAA,cAAC,mCAAS,GAAG,OAAO;AAC1C;",
|
|
6
6
|
"names": ["React", "BaseInput", "CompatDetails", "Svg"]
|
|
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/Grid/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Grid/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\ntype GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;\ninterface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\nexport interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {\n /**\n * If true, the component will have the flex container behavior. You should be wrapping items with a container.\n * @value true\n * @value false\n * @default false\n */\n container?: boolean;\n /**\n * @value true\n * @value false\n * @default true\n */\n item?: boolean;\n /**\n * @value true\n * @value false\n */\n inline?: boolean;\n /**\n * Defines the space between the type item components. It can only be used on a type container component.\n * @value 1
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;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\ntype GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;\ninterface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\nexport interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {\n /**\n * If true, the component will have the flex container behavior. You should be wrapping items with a container.\n * @value true\n * @value false\n * @default false\n */\n container?: boolean;\n /**\n * @value true\n * @value false\n * @default true\n */\n item?: boolean;\n /**\n * @value true\n * @value false\n */\n inline?: boolean;\n /**\n * Defines the space between the type item components. It can only be used on a type container component.\n * @value 1 - 12\n * @value object\n * @default undefined\n */\n spacing?: SpacingValues | SpacingMediaValues;\n\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for all the screen sizes with the lowest priority.\n */\n xs?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the sm breakpoint and wider screens if not overridden.\n */\n sm?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the md breakpoint and wider screens if not overridden.\n */\n md?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the lg breakpoint and wider screens if not overridden.\n */\n lg?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the xl breakpoint and wider screens.\n */\n xl?: GridValues;\n}\n/**\n * Grid is used to arrange other components in complex grid configurations of rows and columns.\n */\nexport const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(\n {\n className,\n children,\n container = false,\n item = true,\n spacing,\n inline,\n xs,\n sm,\n md,\n lg,\n xl,\n as,\n ...props\n },\n ref\n) {\n return (\n <Base\n as={as || 'div'}\n ref={ref}\n className={clsx(className, {\n 'ds-grid': container,\n 'ds-grid-item': item,\n 'ds-grid-inline': container && inline,\n [`ds-gap-${spacing}`]: container && typeof spacing === 'number',\n [`ds-gap-xs-${(spacing as SpacingMediaValues)?.xs}`]:\n container && (spacing as SpacingMediaValues)?.xs !== undefined,\n [`ds-gap-sm-${(spacing as SpacingMediaValues)?.sm}`]:\n container && (spacing as SpacingMediaValues)?.sm !== undefined,\n [`ds-gap-md-${(spacing as SpacingMediaValues)?.md}`]:\n container && (spacing as SpacingMediaValues)?.md !== undefined,\n [`ds-gap-lg-${(spacing as SpacingMediaValues)?.lg}`]:\n container && (spacing as SpacingMediaValues)?.lg !== undefined,\n [`ds-gap-xl-${(spacing as SpacingMediaValues)?.xl}`]:\n container && (spacing as SpacingMediaValues)?.xl !== undefined,\n [`xs:ds-grid__col-span-${xs}`]: item && xs !== undefined,\n [`sm:ds-grid__col-span-${sm}`]: item && sm !== undefined,\n [`md:ds-grid__col-span-${md}`]: item && md !== undefined,\n [`lg:ds-grid__col-span-${lg}`]: item && lg !== undefined,\n [`xl:ds-grid__col-span-${xl}`]: item && xl !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Grid;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAkFzB,MAAM,OAAO,aAAAA,QAAM,WAAmC,SAASC,MACpE;AAAA,EACE;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,gBAAgB;AAAA,QAChB,kBAAkB,aAAa;AAAA,QAC/B,CAAC,UAAU,OAAO,EAAE,GAAG,aAAa,OAAO,YAAY;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,MACjD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,eAAQ;",
|
|
6
6
|
"names": ["React", "Grid", "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
|
|
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,
|
|
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
|
}
|
|
@@ -36,7 +36,7 @@ var import_NavListItemActionContainer = __toESM(require("@digigov/react-core/Nav
|
|
|
36
36
|
var import_NavListItemBadge = __toESM(require("@digigov/react-core/NavListItemBadge"));
|
|
37
37
|
var import_NavListItemButton = __toESM(require("@digigov/react-core/NavListItemButton"));
|
|
38
38
|
var import_NavListItemLinkBase = __toESM(require("@digigov/react-core/NavListItemLinkBase"));
|
|
39
|
-
const NavListItemActionBase = import_react.default.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, ...props }, ref) {
|
|
39
|
+
const NavListItemActionBase = import_react.default.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, badgeText, ...props }, ref) {
|
|
40
40
|
return /* @__PURE__ */ import_react.default.createElement(import_NavListItemActionContainer.default, null, href ? /* @__PURE__ */ import_react.default.createElement(
|
|
41
41
|
import_NavListItemLinkBase.default,
|
|
42
42
|
{
|
|
@@ -55,7 +55,7 @@ const NavListItemActionBase = import_react.default.forwardRef(function NavListIt
|
|
|
55
55
|
ref
|
|
56
56
|
},
|
|
57
57
|
children || label
|
|
58
|
-
),
|
|
58
|
+
), badgeText && /* @__PURE__ */ import_react.default.createElement(import_NavListItemBadge.default, { text: badgeText }));
|
|
59
59
|
});
|
|
60
60
|
var NavListItemActionBase_default = NavListItemActionBase;
|
|
61
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/NavListItemActionBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,wCAAuC;AACvC,8BAA6B;AAC7B,+BAEO;AACP,iCAEO;AAyBA,MAAM,wBAAwB,aAAAA,QAAM,WAGzC,SAASC,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,MAAM,
|
|
4
|
+
"sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, badgeText, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {badgeText && <NavListItemBadge text={badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemActionBase;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,wCAAuC;AACvC,8BAA6B;AAC7B,+BAEO;AACP,iCAEO;AAyBA,MAAM,wBAAwB,aAAAA,QAAM,WAGzC,SAASC,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,WAAW,GAAG,MAAM,GACvE,KACA;AACA,SACE,6BAAAD,QAAA,cAAC,kCAAAE,SAAA,MACE,OACC,6BAAAF,QAAA;AAAA,IAAC,2BAAAG;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA,6BAAAH,QAAA;AAAA,IAAC,yBAAAI;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,aAAa,6BAAAJ,QAAA,cAAC,wBAAAK,SAAA,EAAiB,MAAM,WAAW,CACnD;AAEJ,CAAC;AAED,IAAO,gCAAQ;",
|
|
6
6
|
"names": ["React", "NavListItemActionBase", "NavListItemActionContainer", "NavListItemLinkBase", "NavListItemButton", "NavListItemBadge"]
|
|
7
7
|
}
|
package/cjs/SummaryList/index.js
CHANGED
|
@@ -35,7 +35,14 @@ 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
37
|
const SummaryList = import_react.default.forwardRef(
|
|
38
|
-
function SummaryList2({
|
|
38
|
+
function SummaryList2({
|
|
39
|
+
border = true,
|
|
40
|
+
noLastBorder = false,
|
|
41
|
+
error = false,
|
|
42
|
+
className,
|
|
43
|
+
children,
|
|
44
|
+
...props
|
|
45
|
+
}, ref) {
|
|
39
46
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
40
47
|
import_Base.default,
|
|
41
48
|
{
|
|
@@ -44,7 +51,8 @@ const SummaryList = import_react.default.forwardRef(
|
|
|
44
51
|
className: (0, import_clsx.default)(className, {
|
|
45
52
|
"ds-summary-list": true,
|
|
46
53
|
"ds-summary-list--no-border": !border,
|
|
47
|
-
"ds-summary-list--no-last-border": noLastBorder
|
|
54
|
+
"ds-summary-list--no-last-border": noLastBorder,
|
|
55
|
+
"ds-summary-list--error": error === true
|
|
48
56
|
}),
|
|
49
57
|
...props
|
|
50
58
|
},
|
|
@@ -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;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 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAmCzB,MAAM,cAAc,aAAAA,QAAM;AAAA,EAC/B,SAASC,aACP;AAAA,IACE,SAAS;AAAA,IACT,eAAe;AAAA,IACf,QAAQ;AAAA,IACR;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,eAAW,YAAAC,SAAK,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": ["React", "SummaryList", "Base", "clsx"]
|
|
7
7
|
}
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(SummaryListItem_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 SummaryListItem = import_react.default.forwardRef(function SummaryListItem2({
|
|
37
|
+
const SummaryListItem = import_react.default.forwardRef(function SummaryListItem2({ border = true, className, children, ...props }, ref) {
|
|
38
38
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
39
|
import_Base.default,
|
|
40
40
|
{
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBACT,EAAE,SAAS,MAAM,WAAW,UAAU,GAAG,MAAM,GAC/C,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,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": ["React", "SummaryListItem", "Base", "clsx"]
|
|
7
7
|
}
|
|
@@ -34,7 +34,17 @@ module.exports = __toCommonJS(SummaryListItemKey_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
|
-
|
|
37
|
+
var import_VisuallyHidden = __toESM(require("@digigov/react-core/VisuallyHidden"));
|
|
38
|
+
const SummaryListItemKey = import_react.default.forwardRef(function SummaryListItemKey2({
|
|
39
|
+
sm = 3,
|
|
40
|
+
md,
|
|
41
|
+
lg,
|
|
42
|
+
error,
|
|
43
|
+
errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
|
|
44
|
+
className,
|
|
45
|
+
children,
|
|
46
|
+
...props
|
|
47
|
+
}, ref) {
|
|
38
48
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
49
|
import_Base.default,
|
|
40
50
|
{
|
|
@@ -44,10 +54,12 @@ const SummaryListItemKey = import_react.default.forwardRef(function SummaryListI
|
|
|
44
54
|
"ds-summary-list__key": true,
|
|
45
55
|
[`ds-summary-list__key--sm-${sm}`]: sm !== void 0,
|
|
46
56
|
[`ds-summary-list__key--md-${md}`]: md !== void 0,
|
|
47
|
-
[`ds-summary-list__key--lg-${lg}`]: lg !== void 0
|
|
57
|
+
[`ds-summary-list__key--lg-${lg}`]: lg !== void 0,
|
|
58
|
+
"ds-summary-list__key--error": error === true
|
|
48
59
|
}),
|
|
49
60
|
...props
|
|
50
61
|
},
|
|
62
|
+
error === true && /* @__PURE__ */ import_react.default.createElement(import_VisuallyHidden.default, null, errorAssistiveText),
|
|
51
63
|
children
|
|
52
64
|
);
|
|
53
65
|
});
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
6
|
-
"names": ["React", "SummaryListItemKey", "Base", "clsx"]
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,4BAA2B;AAuCpB,MAAM,qBAAqB,aAAAA,QAAM,WAGtC,SAASC,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,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,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,6BAAAH,QAAA,cAAC,sBAAAI,SAAA,MAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
|
|
6
|
+
"names": ["React", "SummaryListItemKey", "Base", "clsx", "VisuallyHidden"]
|
|
7
7
|
}
|
|
@@ -34,17 +34,26 @@ module.exports = __toCommonJS(SummaryListItemValue_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
|
-
|
|
37
|
+
var import_VisuallyHidden = __toESM(require("@digigov/react-core/VisuallyHidden"));
|
|
38
|
+
const SummaryListItemValue = import_react.default.forwardRef(function SummaryListItemValue2({
|
|
39
|
+
error,
|
|
40
|
+
errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
...props
|
|
44
|
+
}, ref) {
|
|
38
45
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
46
|
import_Base.default,
|
|
40
47
|
{
|
|
41
48
|
as: "dd",
|
|
42
49
|
ref,
|
|
43
50
|
className: (0, import_clsx.default)(className, {
|
|
44
|
-
"ds-summary-list__value": true
|
|
51
|
+
"ds-summary-list__value": true,
|
|
52
|
+
"ds-summary-list__value--error": error === true
|
|
45
53
|
}),
|
|
46
54
|
...props
|
|
47
55
|
},
|
|
56
|
+
error === true && /* @__PURE__ */ import_react.default.createElement(import_VisuallyHidden.default, null, errorAssistiveText),
|
|
48
57
|
children
|
|
49
58
|
);
|
|
50
59
|
});
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
6
|
-
"names": ["React", "SummaryListItemValue", "Base", "clsx"]
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,4BAA2B;AAsBpB,MAAM,uBAAuB,aAAAA,QAAM,WAGxC,SAASC,sBACT;AAAA,EACE;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,iCAAiC,UAAU;AAAA,MAC7C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,6BAAAH,QAAA,cAAC,sBAAAI,SAAA,MAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
|
|
6
|
+
"names": ["React", "SummaryListItemValue", "Base", "clsx", "VisuallyHidden"]
|
|
7
7
|
}
|
|
@@ -34,14 +34,18 @@ module.exports = __toCommonJS(TableDataCell_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
|
+
var import_VisuallyHidden = __toESM(require("@digigov/react-core/VisuallyHidden"));
|
|
37
38
|
const TableDataCell = import_react.default.forwardRef(function TableDataCell2({
|
|
38
39
|
dataType = "text",
|
|
39
40
|
variant = "border",
|
|
40
41
|
wordBreak = "none",
|
|
42
|
+
highlight,
|
|
43
|
+
highlightAssistiveText,
|
|
41
44
|
className,
|
|
42
45
|
children,
|
|
43
46
|
...props
|
|
44
47
|
}, ref) {
|
|
48
|
+
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);
|
|
45
49
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
50
|
import_Base.default,
|
|
47
51
|
{
|
|
@@ -51,10 +55,13 @@ const TableDataCell = import_react.default.forwardRef(function TableDataCell2({
|
|
|
51
55
|
"ds-table__cell": true,
|
|
52
56
|
"ds-table__cell--border": variant === "border",
|
|
53
57
|
"ds-table__cell--break-all": wordBreak === "break-all",
|
|
54
|
-
"ds-table__cell--numeric": dataType === "numeric"
|
|
58
|
+
"ds-table__cell--numeric": dataType === "numeric",
|
|
59
|
+
"ds-table__cell--warning": highlight === "warning",
|
|
60
|
+
"ds-table__cell--error": highlight === "error"
|
|
55
61
|
}),
|
|
56
62
|
...props
|
|
57
63
|
},
|
|
64
|
+
calculatedHighlightAssistiveText && /* @__PURE__ */ import_react.default.createElement(import_VisuallyHidden.default, null, calculatedHighlightAssistiveText),
|
|
58
65
|
children
|
|
59
66
|
);
|
|
60
67
|
});
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
6
|
-
"names": ["React", "TableDataCell", "Base", "clsx"]
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,4BAA2B;AA+CpB,MAAM,gBAAgB,aAAAA,QAAM,WAGjC,SAASC,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,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,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,6BAAAH,QAAA,cAAC,sBAAAI,SAAA,MAAgB,gCAAiC;AAAA,IAEnD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
|
|
6
|
+
"names": ["React", "TableDataCell", "Base", "clsx", "VisuallyHidden"]
|
|
7
7
|
}
|
package/cjs/Typography/index.js
CHANGED
|
@@ -34,23 +34,21 @@ module.exports = __toCommonJS(Typography_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 Typography = import_react.default.forwardRef(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
);
|
|
37
|
+
const Typography = import_react.default.forwardRef(function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
|
+
import_Base.default,
|
|
40
|
+
{
|
|
41
|
+
as,
|
|
42
|
+
ref,
|
|
43
|
+
className: (0, import_clsx.default)(className, {
|
|
44
|
+
[`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
|
|
45
|
+
[`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
|
|
46
|
+
}),
|
|
47
|
+
...props
|
|
48
|
+
},
|
|
49
|
+
children
|
|
50
|
+
);
|
|
51
|
+
});
|
|
54
52
|
var Typography_default = Typography;
|
|
55
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
54
|
0 && (module.exports = {
|
|
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AA6BzB,MAAM,aAAa,aAAAA,QAAM
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AA6BzB,MAAM,aAAa,aAAAA,QAAM,WAG9B,SAASC,YACT,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,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": ["React", "Typography", "Base", "clsx"]
|
|
7
7
|
}
|
package/cjs/index.js
CHANGED
|
@@ -167,7 +167,6 @@ __reExport(src_exports, require("@digigov/react-core/AdminLayout"), module.expor
|
|
|
167
167
|
__reExport(src_exports, require("@digigov/react-core/AdminMain"), module.exports);
|
|
168
168
|
__reExport(src_exports, require("@digigov/react-core/AdminTopSection"), module.exports);
|
|
169
169
|
__reExport(src_exports, require("@digigov/react-core/AutoCompleteInputBase"), module.exports);
|
|
170
|
-
__reExport(src_exports, require("@digigov/react-core/AutoCompleteInputTypeahead"), module.exports);
|
|
171
170
|
__reExport(src_exports, require("@digigov/react-core/AutoCompleteResultList"), module.exports);
|
|
172
171
|
__reExport(src_exports, require("@digigov/react-core/AutoCompleteResultListItem"), module.exports);
|
|
173
172
|
__reExport(src_exports, require("@digigov/react-core/AutoCompleteContainer"), module.exports);
|
|
@@ -207,7 +206,7 @@ __reExport(src_exports, require("@digigov/react-core/PaginationList"), module.ex
|
|
|
207
206
|
__reExport(src_exports, require("@digigov/react-core/PaginationListItem"), module.exports);
|
|
208
207
|
__reExport(src_exports, require("@digigov/react-core/PaginationLabelContainer"), module.exports);
|
|
209
208
|
__reExport(src_exports, require("@digigov/react-core/LoaderContainer"), module.exports);
|
|
210
|
-
__reExport(src_exports, require("@digigov/react-core/
|
|
209
|
+
__reExport(src_exports, require("@digigov/react-core/CircularProgressBase"), module.exports);
|
|
211
210
|
__reExport(src_exports, require("@digigov/react-core/FullPageBackground"), module.exports);
|
|
212
211
|
__reExport(src_exports, require("@digigov/react-core/StepNavCircleNumber"), module.exports);
|
|
213
212
|
__reExport(src_exports, require("@digigov/react-core/StepNav"), module.exports);
|
|
@@ -388,7 +387,6 @@ __reExport(src_exports, require("@digigov/react-core/WarningTextAssistive"), mod
|
|
|
388
387
|
...require("@digigov/react-core/AdminMain"),
|
|
389
388
|
...require("@digigov/react-core/AdminTopSection"),
|
|
390
389
|
...require("@digigov/react-core/AutoCompleteInputBase"),
|
|
391
|
-
...require("@digigov/react-core/AutoCompleteInputTypeahead"),
|
|
392
390
|
...require("@digigov/react-core/AutoCompleteResultList"),
|
|
393
391
|
...require("@digigov/react-core/AutoCompleteResultListItem"),
|
|
394
392
|
...require("@digigov/react-core/AutoCompleteContainer"),
|
|
@@ -428,7 +426,7 @@ __reExport(src_exports, require("@digigov/react-core/WarningTextAssistive"), mod
|
|
|
428
426
|
...require("@digigov/react-core/PaginationListItem"),
|
|
429
427
|
...require("@digigov/react-core/PaginationLabelContainer"),
|
|
430
428
|
...require("@digigov/react-core/LoaderContainer"),
|
|
431
|
-
...require("@digigov/react-core/
|
|
429
|
+
...require("@digigov/react-core/CircularProgressBase"),
|
|
432
430
|
...require("@digigov/react-core/FullPageBackground"),
|
|
433
431
|
...require("@digigov/react-core/StepNavCircleNumber"),
|
|
434
432
|
...require("@digigov/react-core/StepNav"),
|