@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/lazy/index.js
CHANGED
|
@@ -152,7 +152,6 @@ export default {
|
|
|
152
152
|
'AdminMain': lazy(() => import('@digigov/react-core/AdminMain').then((module) => ({ default: module['AdminMain'] }))),
|
|
153
153
|
'AdminTopSection': lazy(() => import('@digigov/react-core/AdminTopSection').then((module) => ({ default: module['AdminTopSection'] }))),
|
|
154
154
|
'AutoCompleteInputBase': lazy(() => import('@digigov/react-core/AutoCompleteInputBase').then((module) => ({ default: module['AutoCompleteInputBase'] }))),
|
|
155
|
-
'AutoCompleteInputTypeahead': lazy(() => import('@digigov/react-core/AutoCompleteInputTypeahead').then((module) => ({ default: module['AutoCompleteInputTypeahead'] }))),
|
|
156
155
|
'AutoCompleteResultList': lazy(() => import('@digigov/react-core/AutoCompleteResultList').then((module) => ({ default: module['AutoCompleteResultList'] }))),
|
|
157
156
|
'AutoCompleteResultListItem': lazy(() => import('@digigov/react-core/AutoCompleteResultListItem').then((module) => ({ default: module['AutoCompleteResultListItem'] }))),
|
|
158
157
|
'AutoCompleteContainer': lazy(() => import('@digigov/react-core/AutoCompleteContainer').then((module) => ({ default: module['AutoCompleteContainer'] }))),
|
|
@@ -192,7 +191,7 @@ export default {
|
|
|
192
191
|
'PaginationListItem': lazy(() => import('@digigov/react-core/PaginationListItem').then((module) => ({ default: module['PaginationListItem'] }))),
|
|
193
192
|
'PaginationLabelContainer': lazy(() => import('@digigov/react-core/PaginationLabelContainer').then((module) => ({ default: module['PaginationLabelContainer'] }))),
|
|
194
193
|
'LoaderContainer': lazy(() => import('@digigov/react-core/LoaderContainer').then((module) => ({ default: module['LoaderContainer'] }))),
|
|
195
|
-
'
|
|
194
|
+
'CircularProgressBase': lazy(() => import('@digigov/react-core/CircularProgressBase').then((module) => ({ default: module['CircularProgressBase'] }))),
|
|
196
195
|
'FullPageBackground': lazy(() => import('@digigov/react-core/FullPageBackground').then((module) => ({ default: module['FullPageBackground'] }))),
|
|
197
196
|
'StepNavCircleNumber': lazy(() => import('@digigov/react-core/StepNavCircleNumber').then((module) => ({ default: module['StepNavCircleNumber'] }))),
|
|
198
197
|
'StepNav': lazy(() => import('@digigov/react-core/StepNav').then((module) => ({ default: module['StepNav'] }))),
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-8bbad051",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
7
7
|
"main": "./cjs/index.js",
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@digigov/css": "2.0.0-
|
|
11
|
-
"@digigov/react-icons": "2.0.0-
|
|
10
|
+
"@digigov/css": "2.0.0-8bbad051",
|
|
11
|
+
"@digigov/react-icons": "2.0.0-8bbad051",
|
|
12
12
|
"clsx": "1.1.1",
|
|
13
|
-
"react": "
|
|
14
|
-
"react-dom": "
|
|
13
|
+
"react": "^18.3.0 || ^19.1.0",
|
|
14
|
+
"react-dom": "^18.3.0 || ^19.1.0",
|
|
15
15
|
"react-native-svg": "^15.2.0",
|
|
16
16
|
"expo-router": "^3.5.14",
|
|
17
17
|
"nativewind": "^4.1.1"
|
package/registry/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import * as _digigov_react_core_AccordionSection from "@digigov/react-core/Accor
|
|
|
7
7
|
import * as _digigov_react_core_AccordionSection_index_web from "@digigov/react-core/AccordionSection/index.web";
|
|
8
8
|
import * as _digigov_react_core_AccordionSectionContent from "@digigov/react-core/AccordionSectionContent";
|
|
9
9
|
import * as _digigov_react_core_AccordionSectionSummary from "@digigov/react-core/AccordionSectionSummary";
|
|
10
|
-
import * as _digigov_react_core_AdminAside from "@digigov/react-core/AdminAside";
|
|
11
10
|
import * as _digigov_react_core_AccordionSectionSummaryHeading from "@digigov/react-core/AccordionSectionSummaryHeading";
|
|
11
|
+
import * as _digigov_react_core_AdminAside from "@digigov/react-core/AdminAside";
|
|
12
12
|
import * as _digigov_react_core_AdminContainer from "@digigov/react-core/AdminContainer";
|
|
13
13
|
import * as _digigov_react_core_AdminHeader from "@digigov/react-core/AdminHeader";
|
|
14
14
|
import * as _digigov_react_core_AdminHeaderContent from "@digigov/react-core/AdminHeaderContent";
|
|
@@ -19,7 +19,6 @@ import * as _digigov_react_core_Aside from "@digigov/react-core/Aside";
|
|
|
19
19
|
import * as _digigov_react_core_AutoCompleteAssistiveHint from "@digigov/react-core/AutoCompleteAssistiveHint";
|
|
20
20
|
import * as _digigov_react_core_AutoCompleteContainer from "@digigov/react-core/AutoCompleteContainer";
|
|
21
21
|
import * as _digigov_react_core_AutoCompleteInputBase from "@digigov/react-core/AutoCompleteInputBase";
|
|
22
|
-
import * as _digigov_react_core_AutoCompleteInputTypeahead from "@digigov/react-core/AutoCompleteInputTypeahead";
|
|
23
22
|
import * as _digigov_react_core_AutoCompleteMultipleInput from "@digigov/react-core/AutoCompleteMultipleInput";
|
|
24
23
|
import * as _digigov_react_core_AutoCompleteMultipleInputContainer from "@digigov/react-core/AutoCompleteMultipleInputContainer";
|
|
25
24
|
import * as _digigov_react_core_AutoCompleteResultList from "@digigov/react-core/AutoCompleteResultList";
|
|
@@ -41,8 +40,8 @@ import * as _digigov_react_core_BottomInfoContainer from "@digigov/react-core/Bo
|
|
|
41
40
|
import * as _digigov_react_core_BottomInfoContent from "@digigov/react-core/BottomInfoContent";
|
|
42
41
|
import * as _digigov_react_core_Breadcrumbs from "@digigov/react-core/Breadcrumbs";
|
|
43
42
|
import * as _digigov_react_core_BreadcrumbsList from "@digigov/react-core/BreadcrumbsList";
|
|
44
|
-
import * as _digigov_react_core_BreadcrumbsListItemLinkBase from "@digigov/react-core/BreadcrumbsListItemLinkBase";
|
|
45
43
|
import * as _digigov_react_core_BreadcrumbsListItemWrapper from "@digigov/react-core/BreadcrumbsListItemWrapper";
|
|
44
|
+
import * as _digigov_react_core_BreadcrumbsListItemLinkBase from "@digigov/react-core/BreadcrumbsListItemLinkBase";
|
|
46
45
|
import * as _digigov_react_core_Button from "@digigov/react-core/Button";
|
|
47
46
|
import * as _digigov_react_core_ButtonGroup from "@digigov/react-core/ButtonGroup";
|
|
48
47
|
import * as _digigov_react_core_ButtonLinkBase from "@digigov/react-core/ButtonLinkBase";
|
|
@@ -61,7 +60,7 @@ import * as _digigov_react_core_ChipContainer from "@digigov/react-core/ChipCont
|
|
|
61
60
|
import * as _digigov_react_core_ChipHeading from "@digigov/react-core/ChipHeading";
|
|
62
61
|
import * as _digigov_react_core_ChipKeyValue from "@digigov/react-core/ChipKeyValue";
|
|
63
62
|
import * as _digigov_react_core_ChoiceDividerText from "@digigov/react-core/ChoiceDividerText";
|
|
64
|
-
import * as
|
|
63
|
+
import * as _digigov_react_core_CircularProgressBase from "@digigov/react-core/CircularProgressBase";
|
|
65
64
|
import * as _digigov_react_core_CloseButton from "@digigov/react-core/CloseButton";
|
|
66
65
|
import * as _digigov_react_core_Code from "@digigov/react-core/Code";
|
|
67
66
|
import * as _digigov_react_core_CodeBlockContainer from "@digigov/react-core/CodeBlockContainer";
|
|
@@ -291,8 +290,8 @@ export default {
|
|
|
291
290
|
'@digigov/react-core/AccordionSection/index.web': lazyImport(_digigov_react_core_AccordionSection_index_web),
|
|
292
291
|
'@digigov/react-core/AccordionSectionContent': lazyImport(_digigov_react_core_AccordionSectionContent),
|
|
293
292
|
'@digigov/react-core/AccordionSectionSummary': lazyImport(_digigov_react_core_AccordionSectionSummary),
|
|
294
|
-
'@digigov/react-core/AdminAside': lazyImport(_digigov_react_core_AdminAside),
|
|
295
293
|
'@digigov/react-core/AccordionSectionSummaryHeading': lazyImport(_digigov_react_core_AccordionSectionSummaryHeading),
|
|
294
|
+
'@digigov/react-core/AdminAside': lazyImport(_digigov_react_core_AdminAside),
|
|
296
295
|
'@digigov/react-core/AdminContainer': lazyImport(_digigov_react_core_AdminContainer),
|
|
297
296
|
'@digigov/react-core/AdminHeader': lazyImport(_digigov_react_core_AdminHeader),
|
|
298
297
|
'@digigov/react-core/AdminHeaderContent': lazyImport(_digigov_react_core_AdminHeaderContent),
|
|
@@ -303,7 +302,6 @@ export default {
|
|
|
303
302
|
'@digigov/react-core/AutoCompleteAssistiveHint': lazyImport(_digigov_react_core_AutoCompleteAssistiveHint),
|
|
304
303
|
'@digigov/react-core/AutoCompleteContainer': lazyImport(_digigov_react_core_AutoCompleteContainer),
|
|
305
304
|
'@digigov/react-core/AutoCompleteInputBase': lazyImport(_digigov_react_core_AutoCompleteInputBase),
|
|
306
|
-
'@digigov/react-core/AutoCompleteInputTypeahead': lazyImport(_digigov_react_core_AutoCompleteInputTypeahead),
|
|
307
305
|
'@digigov/react-core/AutoCompleteMultipleInput': lazyImport(_digigov_react_core_AutoCompleteMultipleInput),
|
|
308
306
|
'@digigov/react-core/AutoCompleteMultipleInputContainer': lazyImport(_digigov_react_core_AutoCompleteMultipleInputContainer),
|
|
309
307
|
'@digigov/react-core/AutoCompleteResultList': lazyImport(_digigov_react_core_AutoCompleteResultList),
|
|
@@ -325,8 +323,8 @@ export default {
|
|
|
325
323
|
'@digigov/react-core/BottomInfoContent': lazyImport(_digigov_react_core_BottomInfoContent),
|
|
326
324
|
'@digigov/react-core/Breadcrumbs': lazyImport(_digigov_react_core_Breadcrumbs),
|
|
327
325
|
'@digigov/react-core/BreadcrumbsList': lazyImport(_digigov_react_core_BreadcrumbsList),
|
|
328
|
-
'@digigov/react-core/BreadcrumbsListItemLinkBase': lazyImport(_digigov_react_core_BreadcrumbsListItemLinkBase),
|
|
329
326
|
'@digigov/react-core/BreadcrumbsListItemWrapper': lazyImport(_digigov_react_core_BreadcrumbsListItemWrapper),
|
|
327
|
+
'@digigov/react-core/BreadcrumbsListItemLinkBase': lazyImport(_digigov_react_core_BreadcrumbsListItemLinkBase),
|
|
330
328
|
'@digigov/react-core/Button': lazyImport(_digigov_react_core_Button),
|
|
331
329
|
'@digigov/react-core/ButtonGroup': lazyImport(_digigov_react_core_ButtonGroup),
|
|
332
330
|
'@digigov/react-core/ButtonLinkBase': lazyImport(_digigov_react_core_ButtonLinkBase),
|
|
@@ -345,7 +343,7 @@ export default {
|
|
|
345
343
|
'@digigov/react-core/ChipHeading': lazyImport(_digigov_react_core_ChipHeading),
|
|
346
344
|
'@digigov/react-core/ChipKeyValue': lazyImport(_digigov_react_core_ChipKeyValue),
|
|
347
345
|
'@digigov/react-core/ChoiceDividerText': lazyImport(_digigov_react_core_ChoiceDividerText),
|
|
348
|
-
'@digigov/react-core/
|
|
346
|
+
'@digigov/react-core/CircularProgressBase': lazyImport(_digigov_react_core_CircularProgressBase),
|
|
349
347
|
'@digigov/react-core/CloseButton': lazyImport(_digigov_react_core_CloseButton),
|
|
350
348
|
'@digigov/react-core/Code': lazyImport(_digigov_react_core_Code),
|
|
351
349
|
'@digigov/react-core/CodeBlockContainer': lazyImport(_digigov_react_core_CodeBlockContainer),
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`renders the Accordion with all the props 1`] = `
|
|
4
|
+
<body>
|
|
5
|
+
<div>
|
|
6
|
+
<div
|
|
7
|
+
class="ds-accordion ds-accordion--no-border ds-accordion--dense ds-accordion--secondary"
|
|
8
|
+
>
|
|
9
|
+
hello
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</body>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`renders the Accordion with dense=true prop 1`] = `
|
|
16
|
+
<body>
|
|
17
|
+
<div>
|
|
18
|
+
<div
|
|
19
|
+
class="ds-accordion ds-accordion--border-top ds-accordion--dense"
|
|
20
|
+
>
|
|
21
|
+
hello
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports[`renders the Accordion with horizontalBorders=bottom prop 1`] = `
|
|
28
|
+
<body>
|
|
29
|
+
<div>
|
|
30
|
+
<div
|
|
31
|
+
class="ds-accordion ds-accordion--border-bottom"
|
|
32
|
+
>
|
|
33
|
+
hello
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</body>
|
|
37
|
+
`;
|
|
38
|
+
|
|
3
39
|
exports[`renders the Accordion with no props 1`] = `
|
|
4
40
|
<body>
|
|
5
41
|
<div>
|
|
@@ -11,3 +47,15 @@ exports[`renders the Accordion with no props 1`] = `
|
|
|
11
47
|
</div>
|
|
12
48
|
</body>
|
|
13
49
|
`;
|
|
50
|
+
|
|
51
|
+
exports[`renders the Accordion with summaryColor=secondary prop 1`] = `
|
|
52
|
+
<body>
|
|
53
|
+
<div>
|
|
54
|
+
<div
|
|
55
|
+
class="ds-accordion ds-accordion--border-top ds-accordion--secondary"
|
|
56
|
+
>
|
|
57
|
+
hello
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</body>
|
|
61
|
+
`;
|
|
@@ -6,3 +6,27 @@ import Accordion from '@digigov/react-core/Accordion';
|
|
|
6
6
|
it('renders the Accordion with no props', () => {
|
|
7
7
|
expect(render(<Accordion>hello</Accordion>).baseElement).toMatchSnapshot();
|
|
8
8
|
});
|
|
9
|
+
it('renders the Accordion with horizontalBorders=bottom prop', () => {
|
|
10
|
+
expect(
|
|
11
|
+
render(<Accordion horizontalBorders="bottom">hello</Accordion>).baseElement
|
|
12
|
+
).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
it('renders the Accordion with summaryColor=secondary prop', () => {
|
|
15
|
+
expect(
|
|
16
|
+
render(<Accordion summaryColor="secondary">hello</Accordion>).baseElement
|
|
17
|
+
).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
it('renders the Accordion with dense=true prop', () => {
|
|
20
|
+
expect(
|
|
21
|
+
render(<Accordion dense={true}>hello</Accordion>).baseElement
|
|
22
|
+
).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
it('renders the Accordion with all the props', () => {
|
|
25
|
+
expect(
|
|
26
|
+
render(
|
|
27
|
+
<Accordion horizontalBorders="none" summaryColor="secondary" dense={true}>
|
|
28
|
+
hello
|
|
29
|
+
</Accordion>
|
|
30
|
+
).baseElement
|
|
31
|
+
).toMatchSnapshot();
|
|
32
|
+
});
|
|
@@ -4,7 +4,6 @@ import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
|
4
4
|
export interface AccordionSectionProps extends BaseProps<'details'> {}
|
|
5
5
|
/**
|
|
6
6
|
* AccordionSection should be inside the Accordion component.
|
|
7
|
-
*
|
|
8
7
|
* Inside this component must place the Accordion and the AccordionSectionContent components.
|
|
9
8
|
*/
|
|
10
9
|
export const AccordionSection = React.forwardRef<
|
|
@@ -16,3 +16,20 @@ exports[`renders the AccordionSectionSummaryHeading with no props 1`] = `
|
|
|
16
16
|
</div>
|
|
17
17
|
</body>
|
|
18
18
|
`;
|
|
19
|
+
|
|
20
|
+
exports[`renders the AccordionSectionSummaryHeading with variant=arrows prop 1`] = `
|
|
21
|
+
<body>
|
|
22
|
+
<div>
|
|
23
|
+
<h2
|
|
24
|
+
class="ds-accordion__section-heading"
|
|
25
|
+
role="button"
|
|
26
|
+
>
|
|
27
|
+
<span
|
|
28
|
+
class="ds-accordion__section-button ds-accordion__section-button--arrows"
|
|
29
|
+
>
|
|
30
|
+
hello
|
|
31
|
+
</span>
|
|
32
|
+
</h2>
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
35
|
+
`;
|
|
@@ -10,3 +10,12 @@ it('renders the AccordionSectionSummaryHeading with no props', () => {
|
|
|
10
10
|
).baseElement
|
|
11
11
|
).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
|
+
it('renders the AccordionSectionSummaryHeading with variant=arrows prop', () => {
|
|
14
|
+
expect(
|
|
15
|
+
render(
|
|
16
|
+
<AccordionSectionSummaryHeading variant="arrows">
|
|
17
|
+
hello
|
|
18
|
+
</AccordionSectionSummaryHeading>
|
|
19
|
+
).baseElement
|
|
20
|
+
).toMatchSnapshot();
|
|
21
|
+
});
|
|
@@ -2,7 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {
|
|
5
|
+
export interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {
|
|
6
|
+
/*
|
|
7
|
+
* The type of the icon to be displayed on the right side of the heading.
|
|
8
|
+
* @default 'default'
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'default' | 'arrows';
|
|
11
|
+
}
|
|
6
12
|
/**
|
|
7
13
|
* AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.
|
|
8
14
|
*/
|
|
@@ -10,7 +16,7 @@ export const AccordionSectionSummaryHeading = React.forwardRef<
|
|
|
10
16
|
HTMLHeadingElement,
|
|
11
17
|
AccordionSectionSummaryHeadingProps
|
|
12
18
|
>(function AccordionSectionSummaryHeading(
|
|
13
|
-
{ className, children, ...props },
|
|
19
|
+
{ variant, className, children, ...props },
|
|
14
20
|
ref
|
|
15
21
|
) {
|
|
16
22
|
return (
|
|
@@ -27,6 +33,7 @@ export const AccordionSectionSummaryHeading = React.forwardRef<
|
|
|
27
33
|
as="span"
|
|
28
34
|
className={clsx({
|
|
29
35
|
'ds-accordion__section-button': true,
|
|
36
|
+
'ds-accordion__section-button--arrows': variant === 'arrows',
|
|
30
37
|
})}
|
|
31
38
|
>
|
|
32
39
|
{children}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
DetailedHTMLProps,
|
|
3
|
-
InputHTMLAttributes,
|
|
4
|
-
LegacyRef,
|
|
5
|
-
} from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';
|
|
6
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
7
3
|
|
|
8
4
|
export type CheckboxInputProps = Omit<
|
|
@@ -28,7 +24,7 @@ export const CheckboxInput = React.forwardRef<
|
|
|
28
24
|
return (
|
|
29
25
|
// @ts-ignore
|
|
30
26
|
<TouchableOpacity
|
|
31
|
-
ref={ref as
|
|
27
|
+
ref={ref as Ref<TouchableOpacity>}
|
|
32
28
|
onPress={handlePress}
|
|
33
29
|
{...props}
|
|
34
30
|
>
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
DetailedHTMLProps,
|
|
3
|
-
InputHTMLAttributes,
|
|
4
|
-
LegacyRef,
|
|
5
|
-
} from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';
|
|
6
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
7
3
|
|
|
8
4
|
export type RadioInputProps = Omit<
|
|
@@ -26,7 +22,7 @@ export const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(
|
|
|
26
22
|
|
|
27
23
|
return (
|
|
28
24
|
<TouchableOpacity
|
|
29
|
-
ref={ref as
|
|
25
|
+
ref={ref as Ref<typeof TouchableOpacity>}
|
|
30
26
|
onPress={handlePress}
|
|
31
27
|
{...(props as any)}
|
|
32
28
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { useMemo, type JSX } from 'react';
|
|
2
2
|
import { Text, View, ViewProps } from 'react-native';
|
|
3
3
|
import { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';
|
|
4
4
|
import { mapping } from '@digigov/react-core/Base/mapping.native';
|
|
@@ -22,7 +22,7 @@ const BooleanMapper = {
|
|
|
22
22
|
const textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];
|
|
23
23
|
|
|
24
24
|
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
25
|
-
C extends React.ElementType
|
|
25
|
+
C extends React.ElementType,
|
|
26
26
|
>(
|
|
27
27
|
{
|
|
28
28
|
as,
|
package/src/Base/index.web.tsx
CHANGED
|
@@ -162,7 +162,7 @@ type BaseComponent = <C extends React.ElementType = 'span'>(
|
|
|
162
162
|
) => React.ReactNode | null;
|
|
163
163
|
|
|
164
164
|
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
165
|
-
C extends React.ElementType
|
|
165
|
+
C extends React.ElementType,
|
|
166
166
|
>(
|
|
167
167
|
{
|
|
168
168
|
as,
|
|
@@ -16,7 +16,6 @@ exports[`renders the Checkbox with dense prop and CheckboxItems 1`] = `
|
|
|
16
16
|
<input
|
|
17
17
|
class="ds-checkboxes__input"
|
|
18
18
|
type="checkbox"
|
|
19
|
-
value=""
|
|
20
19
|
/>
|
|
21
20
|
</label>
|
|
22
21
|
</div>
|
|
@@ -30,7 +29,6 @@ exports[`renders the Checkbox with dense prop and CheckboxItems 1`] = `
|
|
|
30
29
|
<input
|
|
31
30
|
class="ds-checkboxes__input"
|
|
32
31
|
type="checkbox"
|
|
33
|
-
value=""
|
|
34
32
|
/>
|
|
35
33
|
</label>
|
|
36
34
|
</div>
|
|
@@ -55,7 +53,6 @@ exports[`renders the Checkbox with layout=horizontal and CheckboxItems 1`] = `
|
|
|
55
53
|
<input
|
|
56
54
|
class="ds-checkboxes__input"
|
|
57
55
|
type="checkbox"
|
|
58
|
-
value=""
|
|
59
56
|
/>
|
|
60
57
|
</label>
|
|
61
58
|
</div>
|
|
@@ -69,7 +66,6 @@ exports[`renders the Checkbox with layout=horizontal and CheckboxItems 1`] = `
|
|
|
69
66
|
<input
|
|
70
67
|
class="ds-checkboxes__input"
|
|
71
68
|
type="checkbox"
|
|
72
|
-
value=""
|
|
73
69
|
/>
|
|
74
70
|
</label>
|
|
75
71
|
</div>
|
|
@@ -106,7 +102,6 @@ exports[`renders the Checkbox with no props and CheckboxItem 1`] = `
|
|
|
106
102
|
<input
|
|
107
103
|
class="ds-checkboxes__input"
|
|
108
104
|
type="checkbox"
|
|
109
|
-
value=""
|
|
110
105
|
/>
|
|
111
106
|
</label>
|
|
112
107
|
</div>
|
|
@@ -14,7 +14,6 @@ exports[`renders the CheckboxItem with \`disabled\` prop 1`] = `
|
|
|
14
14
|
class="ds-checkboxes__input"
|
|
15
15
|
disabled=""
|
|
16
16
|
type="checkbox"
|
|
17
|
-
value=""
|
|
18
17
|
/>
|
|
19
18
|
</label>
|
|
20
19
|
</div>
|
|
@@ -40,7 +39,6 @@ exports[`renders the CheckboxItem with \`divider\` prop 1`] = `
|
|
|
40
39
|
<input
|
|
41
40
|
class="ds-checkboxes__input"
|
|
42
41
|
type="checkbox"
|
|
43
|
-
value=""
|
|
44
42
|
/>
|
|
45
43
|
</label>
|
|
46
44
|
</div>
|
|
@@ -62,7 +60,6 @@ exports[`renders the CheckboxItem with \`name\` prop 1`] = `
|
|
|
62
60
|
class="ds-checkboxes__input"
|
|
63
61
|
name="example"
|
|
64
62
|
type="checkbox"
|
|
65
|
-
value=""
|
|
66
63
|
/>
|
|
67
64
|
</label>
|
|
68
65
|
</div>
|
|
@@ -155,7 +152,6 @@ exports[`renders the CheckboxItem with no props 1`] = `
|
|
|
155
152
|
<input
|
|
156
153
|
class="ds-checkboxes__input"
|
|
157
154
|
type="checkbox"
|
|
158
|
-
value=""
|
|
159
155
|
/>
|
|
160
156
|
</label>
|
|
161
157
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`renders the
|
|
3
|
+
exports[`renders the CircularProgressBase 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<svg
|
|
@@ -22,7 +22,7 @@ exports[`renders the CircularProgress 1`] = `
|
|
|
22
22
|
</body>
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
-
exports[`renders the
|
|
25
|
+
exports[`renders the CircularProgressBase with color=secondary and size lg props 1`] = `
|
|
26
26
|
<body>
|
|
27
27
|
<div>
|
|
28
28
|
<svg
|
|
@@ -44,7 +44,7 @@ exports[`renders the CircularProgress with color=secondary and size lg props 1`]
|
|
|
44
44
|
</body>
|
|
45
45
|
`;
|
|
46
46
|
|
|
47
|
-
exports[`renders the
|
|
47
|
+
exports[`renders the CircularProgressBase with color=secondary and size sm props 1`] = `
|
|
48
48
|
<body>
|
|
49
49
|
<div>
|
|
50
50
|
<svg
|
|
@@ -66,7 +66,7 @@ exports[`renders the CircularProgress with color=secondary and size sm props 1`]
|
|
|
66
66
|
</body>
|
|
67
67
|
`;
|
|
68
68
|
|
|
69
|
-
exports[`renders the
|
|
69
|
+
exports[`renders the CircularProgressBase with color=secondary prop 1`] = `
|
|
70
70
|
<body>
|
|
71
71
|
<div>
|
|
72
72
|
<svg
|
|
@@ -88,7 +88,7 @@ exports[`renders the CircularProgress with color=secondary prop 1`] = `
|
|
|
88
88
|
</body>
|
|
89
89
|
`;
|
|
90
90
|
|
|
91
|
-
exports[`renders the
|
|
91
|
+
exports[`renders the CircularProgressBase with size lg 1`] = `
|
|
92
92
|
<body>
|
|
93
93
|
<div>
|
|
94
94
|
<svg
|
|
@@ -110,7 +110,7 @@ exports[`renders the CircularProgress with size lg 1`] = `
|
|
|
110
110
|
</body>
|
|
111
111
|
`;
|
|
112
112
|
|
|
113
|
-
exports[`renders the
|
|
113
|
+
exports[`renders the CircularProgressBase with size sm 1`] = `
|
|
114
114
|
<body>
|
|
115
115
|
<div>
|
|
116
116
|
<svg
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import CircularProgressBase from '@digigov/react-core/CircularProgressBase';
|
|
5
|
+
|
|
6
|
+
it('renders the CircularProgressBase', () => {
|
|
7
|
+
expect(render(<CircularProgressBase />).baseElement).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders the CircularProgressBase with size sm', () => {
|
|
11
|
+
expect(
|
|
12
|
+
render(<CircularProgressBase size="sm" />).baseElement
|
|
13
|
+
).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('renders the CircularProgressBase with size lg', () => {
|
|
17
|
+
expect(
|
|
18
|
+
render(<CircularProgressBase size="lg" />).baseElement
|
|
19
|
+
).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('renders the CircularProgressBase with color=secondary prop', () => {
|
|
23
|
+
expect(
|
|
24
|
+
render(<CircularProgressBase color={'secondary'} />).baseElement
|
|
25
|
+
).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('renders the CircularProgressBase with color=secondary and size sm props', () => {
|
|
29
|
+
expect(
|
|
30
|
+
render(<CircularProgressBase color={'secondary'} size="sm" />).baseElement
|
|
31
|
+
).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('renders the CircularProgressBase with color=secondary and size lg props', () => {
|
|
35
|
+
expect(
|
|
36
|
+
render(<CircularProgressBase color={'secondary'} size="lg" />).baseElement
|
|
37
|
+
).toMatchSnapshot();
|
|
38
|
+
});
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface CircularProgressBaseProps extends BaseProps<'svg'> {
|
|
6
6
|
/**
|
|
7
7
|
* color prop is optional.
|
|
8
8
|
* color prop is used to change the color of the loader.
|
|
@@ -22,12 +22,12 @@ export interface CircularProgressProps extends BaseProps<'svg'> {
|
|
|
22
22
|
size?: 'sm' | 'md' | 'lg';
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Use
|
|
26
|
-
*
|
|
25
|
+
* Use CircularProgressBase component as an animated loader.
|
|
26
|
+
* CircularProgressBase can be used inside LoaderContainer component.
|
|
27
27
|
*/
|
|
28
|
-
export const
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export const CircularProgressBase = React.forwardRef<
|
|
29
|
+
SVGElement,
|
|
30
|
+
CircularProgressBaseProps
|
|
31
31
|
>(function CircularProgress(
|
|
32
32
|
{ color = 'primary', size = 'md', className, ...props },
|
|
33
33
|
ref
|
|
@@ -60,4 +60,4 @@ export const CircularProgress = React.forwardRef<
|
|
|
60
60
|
);
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
export default
|
|
63
|
+
export default CircularProgressBase;
|
|
@@ -2,7 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface DetailsContentProps extends BaseProps<'div'> {
|
|
5
|
+
export interface DetailsContentProps extends BaseProps<'div'> {
|
|
6
|
+
/*
|
|
7
|
+
** color is optional. Default value is 'primary'.
|
|
8
|
+
* @value 'primary'
|
|
9
|
+
* @value 'secondary'
|
|
10
|
+
* @default 'primary'
|
|
11
|
+
* */
|
|
12
|
+
color?: 'primary' | 'secondary';
|
|
13
|
+
}
|
|
6
14
|
/**
|
|
7
15
|
*DetailsContent component wraps the content text.
|
|
8
16
|
*It is used inside Details component as children
|
|
@@ -10,13 +18,14 @@ export interface DetailsContentProps extends BaseProps<'div'> {}
|
|
|
10
18
|
export const DetailsContent = React.forwardRef<
|
|
11
19
|
HTMLDivElement,
|
|
12
20
|
DetailsContentProps
|
|
13
|
-
>(function DetailsContent({ className, children, ...props }, ref) {
|
|
21
|
+
>(function DetailsContent({ color, className, children, ...props }, ref) {
|
|
14
22
|
return (
|
|
15
23
|
<Base
|
|
16
24
|
as="div"
|
|
17
25
|
ref={ref}
|
|
18
26
|
className={clsx(className, {
|
|
19
27
|
'ds-details__content': true,
|
|
28
|
+
'ds-details__content--secondary': color === 'secondary',
|
|
20
29
|
})}
|
|
21
30
|
{...props}
|
|
22
31
|
>
|
package/src/Grid/index.tsx
CHANGED
|
@@ -32,13 +32,7 @@ export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
|
|
|
32
32
|
inline?: boolean;
|
|
33
33
|
/**
|
|
34
34
|
* Defines the space between the type item components. It can only be used on a type container component.
|
|
35
|
-
* @value 1
|
|
36
|
-
* @value 2
|
|
37
|
-
* @value 4
|
|
38
|
-
* @value 6
|
|
39
|
-
* @value 8
|
|
40
|
-
* @value 10
|
|
41
|
-
* @value 12
|
|
35
|
+
* @value 1 - 12
|
|
42
36
|
* @value object
|
|
43
37
|
* @default undefined
|
|
44
38
|
*/
|
package/src/LinkBase/index.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(
|
|
|
35
35
|
'ds-link': defaultStyle,
|
|
36
36
|
'ds-link--no-underline': !underline,
|
|
37
37
|
})}
|
|
38
|
-
|
|
38
|
+
{...(props.as && { defaultStyle: defaultStyle, underline: underline })}
|
|
39
39
|
{...props}
|
|
40
40
|
>
|
|
41
41
|
{children}
|
|
@@ -35,7 +35,7 @@ export const NavListItemActionBase = React.forwardRef<
|
|
|
35
35
|
HTMLButtonElement | HTMLAnchorElement,
|
|
36
36
|
NavListItemActionBaseProps
|
|
37
37
|
>(function NavListItemActionBase(
|
|
38
|
-
{ label, arrow = false, href, className, children, ...props },
|
|
38
|
+
{ label, arrow = false, href, className, children, badgeText, ...props },
|
|
39
39
|
ref
|
|
40
40
|
) {
|
|
41
41
|
return (
|
|
@@ -59,7 +59,7 @@ export const NavListItemActionBase = React.forwardRef<
|
|
|
59
59
|
{children || label}
|
|
60
60
|
</NavListItemButton>
|
|
61
61
|
)}
|
|
62
|
-
{
|
|
62
|
+
{badgeText && <NavListItemBadge text={badgeText} />}
|
|
63
63
|
</NavListItemActionContainer>
|
|
64
64
|
);
|
|
65
65
|
});
|