@digigov/react-core 0.23.1 → 0.25.0
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/AccessibilityIcon/index.d.ts +0 -6
- package/AccessibilityTextIcon/index.d.ts +0 -6
- package/AccordionSection/index.d.ts +0 -9
- package/AccordionSectionSummary/index.d.ts +1 -2
- package/AccordionSectionSummary/index.js +2 -5
- package/ArrowIcon/index.d.ts +0 -5
- package/BackLink/index.d.ts +0 -4
- package/Base/index.d.ts +1 -2
- package/BurgerIcon/index.d.ts +0 -6
- package/Button/index.d.ts +0 -4
- package/CHANGELOG.md +21 -1
- package/CallToAction/index.d.ts +0 -1
- package/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/CaretContainer/index.d.ts +11 -0
- package/CaretContainer/index.js +40 -0
- package/CaretContainer/index.test.d.ts +1 -0
- package/CaretContainer/index.test.js +15 -0
- package/CaretIcon/index.d.ts +0 -1
- package/CheckIcon/index.d.ts +0 -6
- package/CheckboxConditional/index.js +5 -5
- package/CheckboxItem/index.d.ts +0 -13
- package/CheckboxItem/index.js +5 -4
- package/CloseIcon/index.d.ts +0 -6
- package/DateInputItem/index.d.ts +0 -4
- package/FileUpload/index.d.ts +0 -8
- package/FooterImage/index.d.ts +0 -4
- package/FooterLink/index.d.ts +0 -4
- package/FooterLink/index.js +2 -4
- package/FooterList/index.d.ts +1 -1
- package/GlobeIcon/index.d.ts +0 -6
- package/Grid/index.d.ts +1 -2
- package/HeaderLogo/index.d.ts +0 -4
- package/HeaderSecondaryLogo/index.d.ts +0 -4
- package/HeaderTitle/index.d.ts +0 -4
- package/HeaderTitle/index.js +1 -1
- package/HellenicRepublicLogo/index.d.ts +0 -5
- package/Hidden/index.d.ts +0 -1
- package/MoreVertIcon/index.d.ts +0 -6
- package/NavListItemLink/index.d.ts +0 -5
- package/NotificationBannerLink/index.d.ts +0 -4
- package/NotificationBannerLink/index.js +3 -3
- package/PhaseBannerHeaderContainer/index.d.ts +1 -3
- package/RadioConditional/index.js +5 -5
- package/RadioItem/index.d.ts +0 -13
- package/RadioItem/index.js +4 -2
- package/SelectContainer/index.d.ts +0 -4
- package/SelectOption/index.d.ts +0 -8
- package/SingleCharacterInputItem/index.d.ts +0 -5
- package/SkipLink/index.d.ts +0 -1
- package/Table/index.d.ts +7 -1
- package/Table/index.js +4 -2
- package/TabsListItem/index.d.ts +0 -4
- package/TextArea/index.d.ts +0 -8
- package/TextInput/index.d.ts +0 -4
- package/UncheckIcon/index.d.ts +0 -6
- package/es/AccordionSectionSummary/index.js +2 -5
- package/es/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/es/CaretContainer/index.js +24 -0
- package/es/CaretContainer/index.test.js +9 -0
- package/es/CheckboxConditional/index.js +3 -5
- package/es/CheckboxItem/index.js +4 -4
- package/es/FooterLink/index.js +2 -4
- package/es/HeaderTitle/index.js +1 -1
- package/es/NotificationBannerLink/index.js +3 -3
- package/es/RadioConditional/index.js +3 -5
- package/es/RadioItem/index.js +3 -2
- package/es/Table/index.js +4 -2
- package/es/index.js +1 -0
- package/es/registry.js +2 -0
- package/esm/AccordionSectionSummary/index.js +2 -5
- package/esm/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/esm/CaretContainer/index.js +24 -0
- package/esm/CaretContainer/index.test.js +9 -0
- package/esm/CheckboxConditional/index.js +3 -5
- package/esm/CheckboxItem/index.js +4 -4
- package/esm/FooterLink/index.js +2 -4
- package/esm/HeaderTitle/index.js +1 -1
- package/esm/NotificationBannerLink/index.js +3 -3
- package/esm/RadioConditional/index.js +3 -5
- package/esm/RadioItem/index.js +3 -2
- package/esm/Table/index.js +4 -2
- package/esm/index.js +2 -1
- package/esm/registry.js +2 -0
- package/index.d.ts +1 -0
- package/index.js +13 -0
- package/package.json +2 -2
- package/registry.d.ts +1 -0
- package/registry.js +3 -0
- package/src/AccessibilityIcon/index.tsx +2 -9
- package/src/AccessibilityTextIcon/index.tsx +1 -8
- package/src/AccordionSection/index.tsx +1 -7
- package/src/AccordionSectionSummary/index.tsx +2 -8
- package/src/ArrowIcon/index.tsx +0 -5
- package/src/BackLink/index.tsx +2 -7
- package/src/Base/index.tsx +1 -1
- package/src/BurgerIcon/index.tsx +0 -6
- package/src/Button/index.tsx +1 -6
- package/src/CallToAction/index.tsx +5 -4
- package/src/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/src/CaretContainer/index.test.tsx +8 -0
- package/src/CaretContainer/index.tsx +29 -0
- package/src/CaretIcon/index.tsx +0 -1
- package/src/CheckIcon/index.tsx +2 -8
- package/src/CheckboxConditional/index.tsx +5 -13
- package/src/CheckboxItem/index.tsx +6 -20
- package/src/CloseIcon/index.tsx +2 -8
- package/src/DateInputItem/index.tsx +0 -4
- package/src/Fieldset/index.tsx +1 -2
- package/src/FileUpload/index.tsx +7 -12
- package/src/FooterImage/index.tsx +1 -6
- package/src/FooterLink/index.tsx +2 -8
- package/src/FooterList/index.tsx +1 -1
- package/src/GlobeIcon/index.tsx +0 -6
- package/src/Grid/index.tsx +1 -2
- package/src/HeaderLogo/index.tsx +0 -4
- package/src/HeaderSecondaryLogo/index.tsx +0 -6
- package/src/HeaderTitle/index.tsx +2 -7
- package/src/HellenicRepublicLogo/index.tsx +24 -29
- package/src/Hidden/index.tsx +0 -1
- package/src/MoreVertIcon/index.tsx +1 -8
- package/src/NavListItemLink/index.tsx +0 -5
- package/src/NotificationBannerLink/index.tsx +2 -7
- package/src/PhaseBannerHeaderContainer/index.tsx +1 -4
- package/src/RadioConditional/index.tsx +5 -13
- package/src/RadioItem/index.tsx +5 -19
- package/src/SelectContainer/index.tsx +1 -6
- package/src/SelectOption/index.tsx +1 -11
- package/src/SingleCharacterInputItem/index.tsx +0 -5
- package/src/SkipLink/index.tsx +1 -3
- package/src/Table/index.tsx +10 -0
- package/src/TabsListItem/index.tsx +0 -5
- package/src/TextArea/index.tsx +0 -10
- package/src/TextInput/index.tsx +0 -5
- package/src/UncheckIcon/index.tsx +1 -8
- package/src/index.ts +1 -0
- package/src/registry.js +2 -0
package/src/CaretIcon/index.tsx
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import SvgIcon, { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
export interface CaretIconProps extends SvgIconProps {
|
|
5
|
-
ref?: React.Ref<SVGSVGElement>;
|
|
6
5
|
/**
|
|
7
6
|
* direction is optional.
|
|
8
7
|
* direction prop declares the direction of the svg icon.
|
package/src/CheckIcon/index.tsx
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SvgIcon, { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* ref is optional.
|
|
7
|
-
* ref prop declares the reference of the svg icon component.
|
|
8
|
-
* It can be used to to access the DOM element and the React element.
|
|
9
|
-
*/
|
|
10
|
-
ref?: React.Ref<SVGSVGElement>;
|
|
11
|
-
}
|
|
4
|
+
|
|
5
|
+
export interface CheckIconProps extends SvgIconProps {}
|
|
12
6
|
/**
|
|
13
7
|
* Use CheckIcon component when you need a check icon.
|
|
14
8
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import LabelContainer from '@digigov/react-core/LabelContainer';
|
|
4
|
+
import FieldContainer from '@digigov/react-core/FieldContainer';
|
|
3
5
|
import clsx from 'clsx';
|
|
4
6
|
|
|
5
7
|
export interface CheckboxConditionalProps extends BaseProps<'div'> {}
|
|
@@ -21,19 +23,9 @@ export const CheckboxConditional = React.forwardRef<
|
|
|
21
23
|
})}
|
|
22
24
|
{...props}
|
|
23
25
|
>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})}
|
|
28
|
-
>
|
|
29
|
-
<label
|
|
30
|
-
className={clsx({
|
|
31
|
-
'govgr-label': true,
|
|
32
|
-
})}
|
|
33
|
-
>
|
|
34
|
-
{children}
|
|
35
|
-
</label>
|
|
36
|
-
</div>
|
|
26
|
+
<FieldContainer>
|
|
27
|
+
<LabelContainer>{children}</LabelContainer>
|
|
28
|
+
</FieldContainer>
|
|
37
29
|
</Base>
|
|
38
30
|
);
|
|
39
31
|
});
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import LabelContainer from '@digigov/react-core/LabelContainer';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
|
|
5
|
-
export interface CheckboxItemProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
* Name property is optional and it contains a single value which describes the name of the <input> element.
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Value property is optional and it specifies the value of an <input> element.
|
|
13
|
-
*/
|
|
14
|
-
value?: string;
|
|
15
|
-
/**
|
|
16
|
-
* disabled prop disables the checkbox input.
|
|
17
|
-
* disabled property is optional and it is false by default.
|
|
18
|
-
*/
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
}
|
|
6
|
+
export interface CheckboxItemProps extends BaseProps<'input'> {}
|
|
21
7
|
/**
|
|
22
8
|
* Details for the CheckboxItem.
|
|
23
9
|
* CheckboxItem component allows the user to select one or more checkboxes
|
|
@@ -27,7 +13,7 @@ export const CheckboxItem = React.forwardRef<
|
|
|
27
13
|
HTMLInputElement,
|
|
28
14
|
CheckboxItemProps
|
|
29
15
|
>(function CheckboxItem(
|
|
30
|
-
{ name, value, className, disabled
|
|
16
|
+
{ name, value, className, disabled, children, ...props },
|
|
31
17
|
ref
|
|
32
18
|
) {
|
|
33
19
|
return (
|
|
@@ -36,9 +22,9 @@ export const CheckboxItem = React.forwardRef<
|
|
|
36
22
|
'govgr-checkboxes__item': true,
|
|
37
23
|
})}
|
|
38
24
|
>
|
|
39
|
-
<
|
|
25
|
+
<LabelContainer
|
|
40
26
|
className={clsx({
|
|
41
|
-
'govgr-
|
|
27
|
+
'govgr-checkboxes__label': true,
|
|
42
28
|
'govgr-checkboxes__label--disabled': disabled === true,
|
|
43
29
|
})}
|
|
44
30
|
>
|
|
@@ -55,7 +41,7 @@ export const CheckboxItem = React.forwardRef<
|
|
|
55
41
|
disabled={disabled}
|
|
56
42
|
{...props}
|
|
57
43
|
/>
|
|
58
|
-
</
|
|
44
|
+
</LabelContainer>
|
|
59
45
|
</div>
|
|
60
46
|
);
|
|
61
47
|
});
|
package/src/CloseIcon/index.tsx
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SvgIcon, { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* ref is optional.
|
|
7
|
-
* ref prop declares the reference of the svg icon component.
|
|
8
|
-
* It can be used to to access the DOM element and the React element.
|
|
9
|
-
*/
|
|
10
|
-
ref?: React.Ref<SVGSVGElement>;
|
|
11
|
-
}
|
|
4
|
+
|
|
5
|
+
export interface CloseIconProps extends SvgIconProps {}
|
|
12
6
|
/**
|
|
13
7
|
* CloseIcon component is used to add close icon.
|
|
14
8
|
* CloseIcon component can be used for dismissing contents
|
|
@@ -3,10 +3,6 @@ import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface DateInputItemProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
* Name property is optional and it contains a single value which describes the name of the <input> element.
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
6
|
/**
|
|
11
7
|
* Width property is optional.
|
|
12
8
|
* Use this property for year field to grow width.
|
package/src/Fieldset/index.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface FieldsetProps extends BaseProps<'fieldset'> {}
|
|
5
|
+
export interface FieldsetProps extends BaseProps<'fieldset'> { }
|
|
6
6
|
/**
|
|
7
7
|
* Details for the Fieldset.
|
|
8
8
|
* Fieldset component is used to group related elements in a form.
|
|
@@ -15,7 +15,6 @@ export const Fieldset = React.forwardRef<HTMLFieldSetElement, FieldsetProps>(
|
|
|
15
15
|
ref={ref}
|
|
16
16
|
className={clsx(className, {
|
|
17
17
|
'govgr-fieldset': true,
|
|
18
|
-
/* 'govgr-grid': true, */
|
|
19
18
|
})}
|
|
20
19
|
{...props}
|
|
21
20
|
>
|
package/src/FileUpload/index.tsx
CHANGED
|
@@ -3,14 +3,6 @@ import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface FileUploadProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
* name is optional.
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
|
-
/**
|
|
11
|
-
* disabled is optional.
|
|
12
|
-
*/
|
|
13
|
-
disabled?: boolean;
|
|
14
6
|
/**
|
|
15
7
|
* hasFiles is optional.
|
|
16
8
|
*/
|
|
@@ -21,10 +13,13 @@ export interface FileUploadProps extends BaseProps<'input'> {
|
|
|
21
13
|
* FileUpload component is used for uploading files
|
|
22
14
|
*/
|
|
23
15
|
export const FileUpload = React.forwardRef<HTMLInputElement, FileUploadProps>(
|
|
24
|
-
function FileUpload(
|
|
16
|
+
function FileUpload(
|
|
17
|
+
{ name, className, children, disabled, hasFiles = false, ...props },
|
|
18
|
+
ref
|
|
19
|
+
) {
|
|
25
20
|
return (
|
|
26
21
|
<Base
|
|
27
|
-
as="label"
|
|
22
|
+
as="label"
|
|
28
23
|
tabIndex={0}
|
|
29
24
|
role="button"
|
|
30
25
|
className={clsx(className, {
|
|
@@ -44,8 +39,8 @@ export const FileUpload = React.forwardRef<HTMLInputElement, FileUploadProps>(
|
|
|
44
39
|
'govgr-file-input': true,
|
|
45
40
|
})}
|
|
46
41
|
{...props}
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
/>
|
|
43
|
+
{children}
|
|
49
44
|
</Base>
|
|
50
45
|
);
|
|
51
46
|
}
|
|
@@ -2,12 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface FooterImageProps extends BaseProps<'img'> {
|
|
6
|
-
/**
|
|
7
|
-
* altText is optional.
|
|
8
|
-
*/
|
|
9
|
-
alt?: string;
|
|
10
|
-
}
|
|
5
|
+
export interface FooterImageProps extends BaseProps<'img'> {}
|
|
11
6
|
/**
|
|
12
7
|
* FooterImage is a component for logos and images in the footer.
|
|
13
8
|
* It is used inside to FooterContentLogos.
|
package/src/FooterLink/index.tsx
CHANGED
|
@@ -2,21 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface FooterLinkProps extends BaseProps<'a'> {
|
|
6
|
-
/**
|
|
7
|
-
* href is optional.
|
|
8
|
-
*/
|
|
9
|
-
href?: string;
|
|
10
|
-
}
|
|
5
|
+
export interface FooterLinkProps extends BaseProps<'a'> { }
|
|
11
6
|
/**
|
|
12
7
|
* FooterLink in used inside the Footer component.
|
|
13
8
|
*/
|
|
14
9
|
export const FooterLink = React.forwardRef<HTMLAnchorElement, FooterLinkProps>(
|
|
15
|
-
function FooterLink({
|
|
10
|
+
function FooterLink({ className, children, ...props }, ref) {
|
|
16
11
|
return (
|
|
17
12
|
<Base
|
|
18
13
|
as="a"
|
|
19
|
-
href={href}
|
|
20
14
|
ref={ref}
|
|
21
15
|
className={clsx(className, {
|
|
22
16
|
'govgr-footer__link': true,
|
package/src/FooterList/index.tsx
CHANGED
package/src/GlobeIcon/index.tsx
CHANGED
|
@@ -2,12 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import SvgIcon, { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
export interface GlobeIconProps extends SvgIconProps {
|
|
5
|
-
/**
|
|
6
|
-
* ref is optional.
|
|
7
|
-
* ref prop declares the reference of the svg icon component.
|
|
8
|
-
* It can be used to to access the DOM element and the React element.
|
|
9
|
-
*/
|
|
10
|
-
ref?: React.Ref<SVGSVGElement>;
|
|
11
5
|
/**
|
|
12
6
|
* active is optional.
|
|
13
7
|
* The default is 'false'.
|
package/src/Grid/index.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import clsx from 'clsx';
|
|
|
4
4
|
|
|
5
5
|
type GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
6
6
|
export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
|
|
7
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
8
7
|
container?: boolean;
|
|
9
8
|
item?: boolean;
|
|
10
9
|
inline?: boolean;
|
|
@@ -18,7 +17,7 @@ export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
|
|
|
18
17
|
/**
|
|
19
18
|
* Grid is used to arrange other components in complex grid configurations of rows and columns.
|
|
20
19
|
*/
|
|
21
|
-
export const Grid = React.forwardRef<
|
|
20
|
+
export const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(
|
|
22
21
|
{
|
|
23
22
|
className,
|
|
24
23
|
children,
|
package/src/HeaderLogo/index.tsx
CHANGED
|
@@ -7,12 +7,6 @@ export interface HeaderSecondaryLogoProps extends BaseProps<'a'> {
|
|
|
7
7
|
* src is needed to provide the url that we get the logo from.
|
|
8
8
|
*/
|
|
9
9
|
src: string;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* href provides the url that the logo leads to if clicked.
|
|
13
|
-
*/
|
|
14
|
-
href?: string;
|
|
15
|
-
|
|
16
10
|
/**
|
|
17
11
|
* href provides the alternative text for the img tag.
|
|
18
12
|
*/
|
|
@@ -2,12 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface HeaderTitleProps extends BaseProps<'a'> {
|
|
6
|
-
/**
|
|
7
|
-
* href is optionaland is used to provide the redirection url after clicking on the HeaderTitle.
|
|
8
|
-
*/
|
|
9
|
-
href?: string;
|
|
10
|
-
}
|
|
5
|
+
export interface HeaderTitleProps extends BaseProps<'a'> { }
|
|
11
6
|
/**
|
|
12
7
|
* Use this component inside HeaderContent to provide a title to the header.
|
|
13
8
|
*/
|
|
@@ -18,8 +13,8 @@ export const HeaderTitle = React.forwardRef<
|
|
|
18
13
|
return (
|
|
19
14
|
<Base
|
|
20
15
|
as="a"
|
|
21
|
-
href={href}
|
|
22
16
|
ref={ref}
|
|
17
|
+
href={href}
|
|
23
18
|
className={clsx(className, {
|
|
24
19
|
'govgr-header-title': true,
|
|
25
20
|
})}
|
|
@@ -7,11 +7,6 @@ import logoElInverted from '@digigov/react-core/HellenicRepublicLogo/logo-invert
|
|
|
7
7
|
import logoEnInverted from '@digigov/react-core/HellenicRepublicLogo/logo-inverted-en';
|
|
8
8
|
|
|
9
9
|
export interface HellenicRepublicLogoProps extends BaseProps<'img'> {
|
|
10
|
-
/**
|
|
11
|
-
* src is optional.
|
|
12
|
-
* By default, the src is the official logo of the Hellenic Republic uploaded to the government.gov.gr site.
|
|
13
|
-
*/
|
|
14
|
-
src?: string;
|
|
15
10
|
/**
|
|
16
11
|
* lang is optional.
|
|
17
12
|
* Use this to define the language version of the logo. Default is el.
|
|
@@ -30,30 +25,30 @@ export const HellenicRepublicLogo = React.forwardRef<
|
|
|
30
25
|
const logoInverted = lang === 'en' ? logoEnInverted : logoElInverted;
|
|
31
26
|
return (
|
|
32
27
|
<>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
28
|
+
<Base
|
|
29
|
+
as="img"
|
|
30
|
+
src={logo}
|
|
31
|
+
ref={ref}
|
|
32
|
+
className={clsx(className, {
|
|
33
|
+
'govgr-footer__government-logo': true,
|
|
34
|
+
})}
|
|
35
|
+
{...props}
|
|
36
|
+
alt="Hellenic Republic Logo"
|
|
37
|
+
>
|
|
38
|
+
{children}
|
|
39
|
+
</Base>
|
|
40
|
+
<Base
|
|
41
|
+
as="img"
|
|
42
|
+
src={logoInverted}
|
|
43
|
+
ref={ref}
|
|
44
|
+
className={clsx(className, {
|
|
45
|
+
'govgr-footer__government-logo-inverted': true,
|
|
46
|
+
})}
|
|
47
|
+
{...props}
|
|
48
|
+
alt="Hellenic Republic Logo"
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</Base>
|
|
57
52
|
</>
|
|
58
53
|
);
|
|
59
54
|
});
|
package/src/Hidden/index.tsx
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SvgIcon, { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
export interface MoreVertIconProps extends SvgIconProps {
|
|
5
|
-
/**
|
|
6
|
-
* ref is optional.
|
|
7
|
-
* ref prop declares the reference of the svg icon component.
|
|
8
|
-
* It can be used to to access the DOM element and the React element.
|
|
9
|
-
*/
|
|
10
|
-
ref?: React.Ref<SVGSVGElement>;
|
|
11
|
-
}
|
|
4
|
+
export interface MoreVertIconProps extends SvgIconProps {}
|
|
12
5
|
/**
|
|
13
6
|
* Use MoreVertIcon component when you need to show more options.
|
|
14
7
|
*/
|
|
@@ -10,11 +10,6 @@ export interface NavListItemLinkProps extends BaseProps<'a'> {
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
active?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* href prop is used to navigate to current url page.
|
|
15
|
-
* href is optional.
|
|
16
|
-
*/
|
|
17
|
-
href?: string;
|
|
18
13
|
}
|
|
19
14
|
/**
|
|
20
15
|
* NavListItemLink is an <a> element. It should be inside the NavListItem component.
|
|
@@ -2,12 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface NotificationBannerLinkProps extends BaseProps<'a'> {
|
|
6
|
-
/**
|
|
7
|
-
* href is optional.
|
|
8
|
-
*/
|
|
9
|
-
href?: string;
|
|
10
|
-
}
|
|
5
|
+
export interface NotificationBannerLinkProps extends BaseProps<'a'> {}
|
|
11
6
|
/**
|
|
12
7
|
* Details for the NotificationBannerLink.
|
|
13
8
|
* NotificationBannerLink allow users to click their way from page to page.
|
|
@@ -17,7 +12,7 @@ export const NotificationBannerLink = React.forwardRef<
|
|
|
17
12
|
HTMLAnchorElement,
|
|
18
13
|
NotificationBannerLinkProps
|
|
19
14
|
>(function NotificationBannerLink(
|
|
20
|
-
{ href = '#',
|
|
15
|
+
{ className, href = '#', children, ...props },
|
|
21
16
|
ref
|
|
22
17
|
) {
|
|
23
18
|
return (
|
|
@@ -2,10 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface PhaseBannerHeaderContainerProps extends BaseProps<'div'> {
|
|
6
|
-
tag?: string;
|
|
7
|
-
text?: string;
|
|
8
|
-
}
|
|
5
|
+
export interface PhaseBannerHeaderContainerProps extends BaseProps<'div'> {}
|
|
9
6
|
|
|
10
7
|
export const PhaseBannerHeaderContainer = React.forwardRef<
|
|
11
8
|
HTMLDivElement,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import LabelContainer from '@digigov/react-core/LabelContainer';
|
|
4
|
+
import FieldContainer from '@digigov/react-core/FieldContainer';
|
|
3
5
|
import clsx from 'clsx';
|
|
4
6
|
|
|
5
7
|
export interface RadioConditionalProps extends BaseProps<'div'> {}
|
|
@@ -21,19 +23,9 @@ export const RadioConditional = React.forwardRef<
|
|
|
21
23
|
})}
|
|
22
24
|
{...props}
|
|
23
25
|
>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})}
|
|
28
|
-
>
|
|
29
|
-
<label
|
|
30
|
-
className={clsx({
|
|
31
|
-
'govgr-label': true,
|
|
32
|
-
})}
|
|
33
|
-
>
|
|
34
|
-
{children}
|
|
35
|
-
</label>
|
|
36
|
-
</div>
|
|
26
|
+
<FieldContainer>
|
|
27
|
+
<LabelContainer>{children}</LabelContainer>
|
|
28
|
+
</FieldContainer>
|
|
37
29
|
</Base>
|
|
38
30
|
);
|
|
39
31
|
});
|
package/src/RadioItem/index.tsx
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import LabelContainer from '@digigov/react-core/LabelContainer';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
|
|
5
|
-
export interface RadioItemProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
*Name property is optional and it contains a single value which describes the name of the <input> element.
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Value property is optional and it specifies the value of an <input> element.
|
|
13
|
-
*/
|
|
14
|
-
value?: string;
|
|
15
|
-
/**
|
|
16
|
-
* disabled prop disables the radio input.
|
|
17
|
-
* disabled property is optional and it is false by default.
|
|
18
|
-
*/
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
}
|
|
6
|
+
export interface RadioItemProps extends BaseProps<'input'> {}
|
|
21
7
|
/**
|
|
22
8
|
* RadioItem component is used for display radio buttons.
|
|
23
9
|
* RadioItem component must be included inside Radio component, as a children component.
|
|
@@ -33,9 +19,9 @@ export const RadioItem = React.forwardRef<HTMLInputElement, RadioItemProps>(
|
|
|
33
19
|
'govgr-radios__item': true,
|
|
34
20
|
})}
|
|
35
21
|
>
|
|
36
|
-
<
|
|
22
|
+
<LabelContainer
|
|
37
23
|
className={clsx({
|
|
38
|
-
'govgr-
|
|
24
|
+
'govgr-radios__label': true,
|
|
39
25
|
'govgr-radios__label--disabled': disabled === true,
|
|
40
26
|
})}
|
|
41
27
|
>
|
|
@@ -52,7 +38,7 @@ export const RadioItem = React.forwardRef<HTMLInputElement, RadioItemProps>(
|
|
|
52
38
|
disabled={disabled}
|
|
53
39
|
{...props}
|
|
54
40
|
/>
|
|
55
|
-
</
|
|
41
|
+
</LabelContainer>
|
|
56
42
|
</div>
|
|
57
43
|
);
|
|
58
44
|
}
|
|
@@ -2,12 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface SelectContainerProps extends BaseProps<'select'> {
|
|
6
|
-
/**
|
|
7
|
-
* name is optional but strongly recommended.
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
|
-
}
|
|
5
|
+
export interface SelectContainerProps extends BaseProps<'select'> {}
|
|
11
6
|
/**
|
|
12
7
|
* The SelectContainer component allows users to choose an option from a long list.
|
|
13
8
|
* It is used as a parent component to wrap SelectOption component.
|
|
@@ -2,17 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface SelectOptionProps extends BaseProps<'option'> {
|
|
6
|
-
/**
|
|
7
|
-
* value is optional.
|
|
8
|
-
*/
|
|
9
|
-
value?: string;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* selected is optional.
|
|
13
|
-
*/
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
}
|
|
5
|
+
export interface SelectOptionProps extends BaseProps<'option'> {}
|
|
16
6
|
/**
|
|
17
7
|
* SelectOption component is used for display options value.
|
|
18
8
|
* SelectOption component must be included inside Select component as children component
|
|
@@ -3,11 +3,6 @@ import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SingleCharacterInputItemProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
* Name property is optional
|
|
8
|
-
* Name prop contains a single value which describes the name of the <input> element.
|
|
9
|
-
*/
|
|
10
|
-
name?: string;
|
|
11
6
|
/**
|
|
12
7
|
* error is optional. The default value is false.
|
|
13
8
|
* Use this prop when there is an error at the input.
|
package/src/SkipLink/index.tsx
CHANGED
|
@@ -2,9 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface LinkProps extends BaseProps<'a'> {
|
|
6
|
-
href?: string;
|
|
7
|
-
}
|
|
5
|
+
export interface LinkProps extends BaseProps<'a'> {}
|
|
8
6
|
/**
|
|
9
7
|
* Use the skip link component to help keyboard-only users skip to the main content on a page.
|
|
10
8
|
*/
|
package/src/Table/index.tsx
CHANGED
|
@@ -28,6 +28,12 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
28
28
|
* Default value is false.
|
|
29
29
|
*/
|
|
30
30
|
verticalBorders?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* stacked is optional.
|
|
33
|
+
* The stacked prop gives responsiveness to the table. If used, make sure to add "data-label" to TableDataCell components.
|
|
34
|
+
* Default value is never.
|
|
35
|
+
*/
|
|
36
|
+
stacked?: 'always' | 's' | 'm' | 'never';
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Table component is used to wrap the sub components of a table
|
|
@@ -39,6 +45,7 @@ export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
39
45
|
zebra = false,
|
|
40
46
|
dense = false,
|
|
41
47
|
verticalBorders = false,
|
|
48
|
+
stacked= 'never',
|
|
42
49
|
className,
|
|
43
50
|
children,
|
|
44
51
|
...props
|
|
@@ -51,6 +58,9 @@ export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
51
58
|
ref={ref}
|
|
52
59
|
className={clsx(className, {
|
|
53
60
|
'govgr-table': true,
|
|
61
|
+
'govgr-table--stacked-always': stacked === 'always',
|
|
62
|
+
'govgr-table--stacked-s': stacked === 's',
|
|
63
|
+
'govgr-table--stacked-m': stacked == 'm',
|
|
54
64
|
'govgr-table--dark': variant === 'dark',
|
|
55
65
|
'govgr-table--light': variant === 'light',
|
|
56
66
|
'govgr-table--zebra': zebra === true,
|