@digigov/react-core 2.3.0 → 2.4.1-govgr-4546.09-06-26-10-15
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/BreadcrumbsListItemLinkBase/index.d.ts +1 -0
- package/BreadcrumbsListItemLinkBase/index.js +5 -4
- package/CHANGELOG.md +13 -1
- package/NotificationBannerContainer/index.js +1 -1
- package/NotificationBannerHeader/index.js +1 -0
- package/index.js +1 -1
- package/package.json +3 -3
- package/src/BreadcrumbsListItemLinkBase/__snapshots__/index.test.tsx.snap +1 -0
- package/src/BreadcrumbsListItemLinkBase/index.tsx +13 -4
- package/src/ErrorSummary/__snapshots__/index.test.tsx.snap +2 -2
- package/src/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +3 -3
- package/src/NotificationBannerContainer/index.tsx +1 -1
- package/src/NotificationBannerHeader/__snapshots__/index.test.tsx.snap +1 -0
- package/src/NotificationBannerHeader/index.tsx +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinkBaseProps } from '../LinkBase/index.js';
|
|
3
3
|
export interface BreadcrumbsListItemLinkBaseProps extends LinkBaseProps {
|
|
4
|
+
ariaCurrent?: 'page';
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* BreadcrumbsListItemLinkBase creates an anchor link to navigate in different
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import react from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { LinkBase } from "../LinkBase/index.js";
|
|
4
|
-
const BreadcrumbsListItemLinkBase_BreadcrumbsListItemLinkBase = /*#__PURE__*/ react.forwardRef(function({ href, className, children }, ref) {
|
|
4
|
+
const BreadcrumbsListItemLinkBase_BreadcrumbsListItemLinkBase = /*#__PURE__*/ react.forwardRef(function({ href, className, children, ariaCurrent }, ref) {
|
|
5
5
|
return /*#__PURE__*/ react.createElement(LinkBase, {
|
|
6
|
-
href: href,
|
|
6
|
+
href: href || '',
|
|
7
7
|
className: clsx(className, {
|
|
8
8
|
'ds-breadcrumbs__link': true,
|
|
9
|
-
'ds-breadcrumbs__link--inactive': void 0 === href
|
|
9
|
+
'ds-breadcrumbs__link--inactive': void 0 === href || '' === href
|
|
10
10
|
}),
|
|
11
|
-
ref: ref
|
|
11
|
+
ref: ref,
|
|
12
|
+
"aria-current": ariaCurrent
|
|
12
13
|
}, children);
|
|
13
14
|
});
|
|
14
15
|
const src_BreadcrumbsListItemLinkBase = BreadcrumbsListItemLinkBase_BreadcrumbsListItemLinkBase;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Fri, 05 Jun 2026 08:02:15 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.4.0
|
|
8
|
+
|
|
9
|
+
Fri, 05 Jun 2026 08:02:15 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- fix(breadcrumbs): fix aria-current position (kbrani@admin.grnet.gr)
|
|
14
|
+
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
- fix(NotificationBanner): fix aria-label reference (kbrani@admin.grnet.gr)
|
|
18
|
+
|
|
7
19
|
## 2.2.3
|
|
8
20
|
|
|
9
21
|
Thu, 28 May 2026 09:16:18 GMT
|
|
@@ -5,7 +5,7 @@ const NotificationBannerContainer_NotificationBannerContainer = /*#__PURE__*/ re
|
|
|
5
5
|
return /*#__PURE__*/ react.createElement(Base, {
|
|
6
6
|
as: "div",
|
|
7
7
|
role: "region",
|
|
8
|
-
"aria-labelledby": "ds-notification-
|
|
8
|
+
"aria-labelledby": "ds-notification-banner__title",
|
|
9
9
|
"data-module": "ds-notification-banner",
|
|
10
10
|
ref: ref,
|
|
11
11
|
className: clsx(className, {
|
|
@@ -13,6 +13,7 @@ const NotificationBannerHeader_NotificationBannerHeader = /*#__PURE__*/ react.fo
|
|
|
13
13
|
}, /*#__PURE__*/ react.createElement(Heading, {
|
|
14
14
|
element: "h2",
|
|
15
15
|
size: "sm",
|
|
16
|
+
id: "ds-notification-banner__title",
|
|
16
17
|
marginBottom: 0,
|
|
17
18
|
className: clsx({
|
|
18
19
|
'ds-notification-banner__title': true
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1-govgr-4546.09-06-26-10-15",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"react-native-svg": "^15.2.0",
|
|
18
18
|
"expo-router": "^3.5.14",
|
|
19
19
|
"nativewind": "^4.1.1",
|
|
20
|
-
"@digigov/css": "2.
|
|
21
|
-
"@digigov/react-icons": "2.
|
|
20
|
+
"@digigov/css": "2.4.1-govgr-4546.09-06-26-10-15",
|
|
21
|
+
"@digigov/react-icons": "2.4.1-govgr-4546.09-06-26-10-15"
|
|
22
22
|
},
|
|
23
23
|
"peerDependenciesMeta": {
|
|
24
24
|
"react-native": {
|
|
@@ -2,7 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
4
|
|
|
5
|
-
export interface BreadcrumbsListItemLinkBaseProps extends LinkBaseProps {
|
|
5
|
+
export interface BreadcrumbsListItemLinkBaseProps extends LinkBaseProps {
|
|
6
|
+
/*
|
|
7
|
+
* ariaCurrent is used to indicate the current page in the breadcrumbs. It should be set to 'page' for the current page link.
|
|
8
|
+
*/
|
|
9
|
+
ariaCurrent?: 'page';
|
|
10
|
+
}
|
|
6
11
|
/**
|
|
7
12
|
* BreadcrumbsListItemLinkBase creates an anchor link to navigate in different
|
|
8
13
|
* parts of the breadcrumbs.
|
|
@@ -14,15 +19,19 @@ export interface BreadcrumbsListItemLinkBaseProps extends LinkBaseProps {}
|
|
|
14
19
|
export const BreadcrumbsListItemLinkBase = React.forwardRef<
|
|
15
20
|
HTMLAnchorElement,
|
|
16
21
|
BreadcrumbsListItemLinkBaseProps
|
|
17
|
-
>(function BreadcrumbsListItemLinkBase(
|
|
22
|
+
>(function BreadcrumbsListItemLinkBase(
|
|
23
|
+
{ href, className, children, ariaCurrent },
|
|
24
|
+
ref
|
|
25
|
+
) {
|
|
18
26
|
return (
|
|
19
27
|
<LinkBase
|
|
20
|
-
href={href}
|
|
28
|
+
href={href || ''}
|
|
21
29
|
className={clsx(className, {
|
|
22
30
|
'ds-breadcrumbs__link': true,
|
|
23
|
-
'ds-breadcrumbs__link--inactive': href === undefined,
|
|
31
|
+
'ds-breadcrumbs__link--inactive': href === undefined || href === '',
|
|
24
32
|
})}
|
|
25
33
|
ref={ref}
|
|
34
|
+
aria-current={ariaCurrent}
|
|
26
35
|
>
|
|
27
36
|
{children}
|
|
28
37
|
</LinkBase>
|
|
@@ -4,7 +4,7 @@ exports[`renders the ErrorSummary with dense=true 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
7
|
-
aria-labelledby="ds-notification-
|
|
7
|
+
aria-labelledby="ds-notification-banner__title"
|
|
8
8
|
class="ds-notification-banner ds-notification-banner--error ds-notification-banner--dense"
|
|
9
9
|
data-module="ds-notification-banner"
|
|
10
10
|
role="region"
|
|
@@ -23,7 +23,7 @@ exports[`renders the ErrorSummary with no props 1`] = `
|
|
|
23
23
|
<body>
|
|
24
24
|
<div>
|
|
25
25
|
<div
|
|
26
|
-
aria-labelledby="ds-notification-
|
|
26
|
+
aria-labelledby="ds-notification-banner__title"
|
|
27
27
|
class="ds-notification-banner ds-notification-banner--error"
|
|
28
28
|
data-module="ds-notification-banner"
|
|
29
29
|
role="region"
|
|
@@ -4,7 +4,7 @@ exports[`renders the NotificationBannerContainer with dense=true 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
7
|
-
aria-labelledby="ds-notification-
|
|
7
|
+
aria-labelledby="ds-notification-banner__title"
|
|
8
8
|
class="ds-notification-banner ds-notification-banner--info ds-notification-banner--dense"
|
|
9
9
|
data-module="ds-notification-banner"
|
|
10
10
|
role="region"
|
|
@@ -19,7 +19,7 @@ exports[`renders the NotificationBannerContainer with no props 1`] = `
|
|
|
19
19
|
<body>
|
|
20
20
|
<div>
|
|
21
21
|
<div
|
|
22
|
-
aria-labelledby="ds-notification-
|
|
22
|
+
aria-labelledby="ds-notification-banner__title"
|
|
23
23
|
class="ds-notification-banner ds-notification-banner--info"
|
|
24
24
|
data-module="ds-notification-banner"
|
|
25
25
|
role="region"
|
|
@@ -34,7 +34,7 @@ exports[`renders the NotificationBannerContainer with variant=success 1`] = `
|
|
|
34
34
|
<body>
|
|
35
35
|
<div>
|
|
36
36
|
<div
|
|
37
|
-
aria-labelledby="ds-notification-
|
|
37
|
+
aria-labelledby="ds-notification-banner__title"
|
|
38
38
|
class="ds-notification-banner ds-notification-banner--success"
|
|
39
39
|
data-module="ds-notification-banner"
|
|
40
40
|
role="region"
|
|
@@ -39,7 +39,7 @@ export const NotificationBannerContainer = React.forwardRef<
|
|
|
39
39
|
<Base
|
|
40
40
|
as="div"
|
|
41
41
|
role="region"
|
|
42
|
-
aria-labelledby="ds-notification-
|
|
42
|
+
aria-labelledby="ds-notification-banner__title"
|
|
43
43
|
data-module="ds-notification-banner"
|
|
44
44
|
ref={ref}
|
|
45
45
|
className={clsx(className, {
|