@digigov/react-core 0.24.0 → 0.25.1

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.
Files changed (113) hide show
  1. package/AccessibilityIcon/index.d.ts +0 -6
  2. package/AccessibilityTextIcon/index.d.ts +0 -6
  3. package/AccordionSection/index.d.ts +0 -9
  4. package/AccordionSectionSummary/index.d.ts +1 -2
  5. package/AccordionSectionSummary/index.js +2 -5
  6. package/ArrowIcon/index.d.ts +0 -5
  7. package/BackLink/index.d.ts +0 -4
  8. package/Base/index.d.ts +1 -2
  9. package/BurgerIcon/index.d.ts +0 -6
  10. package/Button/index.d.ts +0 -4
  11. package/CHANGELOG.md +14 -1
  12. package/CallToAction/index.d.ts +0 -1
  13. package/CaretIcon/index.d.ts +0 -1
  14. package/CheckIcon/index.d.ts +0 -6
  15. package/CheckboxConditional/index.js +5 -5
  16. package/CheckboxItem/index.d.ts +0 -13
  17. package/CheckboxItem/index.js +5 -4
  18. package/CloseIcon/index.d.ts +0 -6
  19. package/DateInputItem/index.d.ts +0 -4
  20. package/FileUpload/index.d.ts +0 -8
  21. package/FooterImage/index.d.ts +0 -4
  22. package/FooterLink/index.d.ts +0 -4
  23. package/FooterLink/index.js +2 -4
  24. package/FooterList/index.d.ts +1 -1
  25. package/GlobeIcon/index.d.ts +0 -6
  26. package/Grid/index.d.ts +1 -2
  27. package/HeaderLogo/index.d.ts +0 -4
  28. package/HeaderSecondaryLogo/index.d.ts +0 -4
  29. package/HeaderTitle/index.d.ts +0 -4
  30. package/HeaderTitle/index.js +1 -1
  31. package/HellenicRepublicLogo/index.d.ts +0 -5
  32. package/Hidden/index.d.ts +0 -1
  33. package/MoreVertIcon/index.d.ts +0 -6
  34. package/NavListItemLink/index.d.ts +0 -5
  35. package/NotificationBannerLink/index.d.ts +0 -4
  36. package/NotificationBannerLink/index.js +3 -3
  37. package/PhaseBannerHeaderContainer/index.d.ts +1 -3
  38. package/RadioConditional/index.js +5 -5
  39. package/RadioItem/index.d.ts +0 -13
  40. package/RadioItem/index.js +4 -2
  41. package/SelectContainer/index.d.ts +0 -4
  42. package/SelectOption/index.d.ts +0 -8
  43. package/SingleCharacterInputItem/index.d.ts +0 -5
  44. package/SkipLink/index.d.ts +0 -1
  45. package/Table/index.d.ts +7 -1
  46. package/Table/index.js +4 -2
  47. package/TabsListItem/index.d.ts +0 -4
  48. package/TextArea/index.d.ts +0 -8
  49. package/TextInput/index.d.ts +0 -4
  50. package/UncheckIcon/index.d.ts +0 -6
  51. package/es/AccordionSectionSummary/index.js +2 -5
  52. package/es/CheckboxConditional/index.js +3 -5
  53. package/es/CheckboxItem/index.js +4 -4
  54. package/es/FooterLink/index.js +2 -4
  55. package/es/HeaderTitle/index.js +1 -1
  56. package/es/NotificationBannerLink/index.js +3 -3
  57. package/es/RadioConditional/index.js +3 -5
  58. package/es/RadioItem/index.js +3 -2
  59. package/es/Table/index.js +4 -2
  60. package/esm/AccordionSectionSummary/index.js +2 -5
  61. package/esm/CheckboxConditional/index.js +3 -5
  62. package/esm/CheckboxItem/index.js +4 -4
  63. package/esm/FooterLink/index.js +2 -4
  64. package/esm/HeaderTitle/index.js +1 -1
  65. package/esm/NotificationBannerLink/index.js +3 -3
  66. package/esm/RadioConditional/index.js +3 -5
  67. package/esm/RadioItem/index.js +3 -2
  68. package/esm/Table/index.js +4 -2
  69. package/esm/index.js +1 -1
  70. package/package.json +2 -2
  71. package/src/AccessibilityIcon/index.tsx +2 -9
  72. package/src/AccessibilityTextIcon/index.tsx +1 -8
  73. package/src/AccordionSection/index.tsx +1 -7
  74. package/src/AccordionSectionSummary/index.tsx +2 -8
  75. package/src/ArrowIcon/index.tsx +0 -5
  76. package/src/BackLink/index.tsx +2 -7
  77. package/src/Base/index.tsx +1 -1
  78. package/src/BurgerIcon/index.tsx +0 -6
  79. package/src/Button/index.tsx +1 -6
  80. package/src/CallToAction/index.tsx +5 -4
  81. package/src/CaretIcon/index.tsx +0 -1
  82. package/src/CheckIcon/index.tsx +2 -8
  83. package/src/CheckboxConditional/index.tsx +5 -13
  84. package/src/CheckboxItem/index.tsx +6 -20
  85. package/src/CloseIcon/index.tsx +2 -8
  86. package/src/DateInputItem/index.tsx +0 -4
  87. package/src/Fieldset/index.tsx +1 -2
  88. package/src/FileUpload/index.tsx +7 -12
  89. package/src/FooterImage/index.tsx +1 -6
  90. package/src/FooterLink/index.tsx +2 -8
  91. package/src/FooterList/index.tsx +1 -1
  92. package/src/GlobeIcon/index.tsx +0 -6
  93. package/src/Grid/index.tsx +1 -2
  94. package/src/HeaderLogo/index.tsx +0 -4
  95. package/src/HeaderSecondaryLogo/index.tsx +0 -6
  96. package/src/HeaderTitle/index.tsx +2 -7
  97. package/src/HellenicRepublicLogo/index.tsx +24 -29
  98. package/src/Hidden/index.tsx +0 -1
  99. package/src/MoreVertIcon/index.tsx +1 -8
  100. package/src/NavListItemLink/index.tsx +0 -5
  101. package/src/NotificationBannerLink/index.tsx +2 -7
  102. package/src/PhaseBannerHeaderContainer/index.tsx +1 -4
  103. package/src/RadioConditional/index.tsx +5 -13
  104. package/src/RadioItem/index.tsx +5 -19
  105. package/src/SelectContainer/index.tsx +1 -6
  106. package/src/SelectOption/index.tsx +1 -11
  107. package/src/SingleCharacterInputItem/index.tsx +0 -5
  108. package/src/SkipLink/index.tsx +1 -3
  109. package/src/Table/index.tsx +10 -0
  110. package/src/TabsListItem/index.tsx +0 -5
  111. package/src/TextArea/index.tsx +0 -10
  112. package/src/TextInput/index.tsx +0 -5
  113. package/src/UncheckIcon/index.tsx +1 -8
@@ -3,6 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["className", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
+ import LabelContainer from '@digigov/react-core/LabelContainer';
7
+ import FieldContainer from '@digigov/react-core/FieldContainer';
6
8
  import clsx from 'clsx';
7
9
 
8
10
  /**
@@ -19,10 +21,6 @@ export var RadioConditional = /*#__PURE__*/React.forwardRef(function RadioCondit
19
21
  as: "div",
20
22
  ref: ref,
21
23
  className: clsx(className, true && 'govgr-radios__conditional')
22
- }, props), /*#__PURE__*/React.createElement("div", {
23
- className: clsx(true && 'govgr-field')
24
- }, /*#__PURE__*/React.createElement("label", {
25
- className: clsx(true && 'govgr-label')
26
- }, children)));
24
+ }, props), /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(LabelContainer, null, children)));
27
25
  });
28
26
  export default RadioConditional;
@@ -3,6 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["name", "value", "className", "disabled", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
+ import LabelContainer from '@digigov/react-core/LabelContainer';
6
7
  import clsx from 'clsx';
7
8
 
8
9
  /**
@@ -20,8 +21,8 @@ export var RadioItem = /*#__PURE__*/React.forwardRef(function RadioItem(_ref, re
20
21
 
21
22
  return /*#__PURE__*/React.createElement("div", {
22
23
  className: clsx(className, true && 'govgr-radios__item')
23
- }, /*#__PURE__*/React.createElement("label", {
24
- className: clsx(disabled === true && 'govgr-radios__label--disabled', true && 'govgr-label govgr-radios__label')
24
+ }, /*#__PURE__*/React.createElement(LabelContainer, {
25
+ className: clsx(disabled === true && 'govgr-radios__label--disabled', true && 'govgr-radios__label')
25
26
  }, children, /*#__PURE__*/React.createElement(Base, _extends({
26
27
  as: "input",
27
28
  ref: ref,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["variant", "zebra", "dense", "verticalBorders", "className", "children"];
3
+ var _excluded = ["variant", "zebra", "dense", "verticalBorders", "stacked", "className", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -16,6 +16,8 @@ export var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
16
16
  dense = _ref$dense === void 0 ? false : _ref$dense,
17
17
  _ref$verticalBorders = _ref.verticalBorders,
18
18
  verticalBorders = _ref$verticalBorders === void 0 ? false : _ref$verticalBorders,
19
+ _ref$stacked = _ref.stacked,
20
+ stacked = _ref$stacked === void 0 ? 'never' : _ref$stacked,
19
21
  className = _ref.className,
20
22
  children = _ref.children,
21
23
  props = _objectWithoutProperties(_ref, _excluded);
@@ -23,7 +25,7 @@ export var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
23
25
  return /*#__PURE__*/React.createElement(Base, _extends({
24
26
  as: "table",
25
27
  ref: ref,
26
- className: clsx(className, verticalBorders === true && ['govgr-table--with-vertical-header', 'govgr-table--with-vertical-lines'], variant === 'light' && 'govgr-table--light', variant === 'dark' && 'govgr-table--dark', zebra === true && 'govgr-table--zebra', dense === true && 'govgr-table--dense', true && 'govgr-table')
28
+ className: clsx(className, verticalBorders === true && ['govgr-table--with-vertical-header', 'govgr-table--with-vertical-lines'], stacked === 'always' && 'govgr-table--stacked-always', variant === 'light' && 'govgr-table--light', variant === 'dark' && 'govgr-table--dark', stacked === 's' && 'govgr-table--stacked-s', stacked == 'm' && 'govgr-table--stacked-m', zebra === true && 'govgr-table--zebra', dense === true && 'govgr-table--dense', true && 'govgr-table')
27
29
  }, props), children);
28
30
  });
29
31
  export default Table;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v0.24.0
1
+ /** @license Digigov v0.25.1
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/react-core",
3
- "version": "0.24.0",
3
+ "version": "0.25.1",
4
4
  "description": "@digigov react core components",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
@@ -11,7 +11,7 @@
11
11
  "directory": "dist"
12
12
  },
13
13
  "peerDependencies": {
14
- "@digigov/css": "0.36.0",
14
+ "@digigov/css": "0.38.0",
15
15
  "clsx": "1.1.1",
16
16
  "react": "^16.8.0 || ^17.0.0",
17
17
  "react-dom": "^16.8.0 || ^17.0.0"
@@ -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 AccessibilityIconProps 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 AccessibilityIconProps extends SvgIconProps {}
12
5
  /**
13
6
  * Use AccessibilityIcon component when you need to show web accessibility options.
14
7
  */
@@ -27,7 +20,7 @@ export const AccessibilityIcon: React.FC<AccessibilityIconProps> = React.forward
27
20
  {...props}
28
21
  >
29
22
  <title>Μενού Προσβασιμότητας</title>
30
- <circle cx="12" cy="3" r="3"/>
23
+ <circle cx="12" cy="3" r="3" />
31
24
  <path
32
25
  d="M19.76,6.13c-4.94,2.01-10.57,2.01-15.51,0c-0.71-0.3-1.55-0.04-1.98,0.66c-1.41,2.6,3.27,3.76,4.94,4.37
33
26
  c0.4,0.11,0.81,0.2,1.22,0.28c0.56,0.11,0.92,0.67,0.79,1.25c-0.79,3.66-1.96,9.1-1.96,9.1c-0.46,2.27,2.72,3.15,3.39,0.92L12,17.93
@@ -1,13 +1,6 @@
1
1
  import React from 'react';
2
2
  import SvgIcon, { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
- export interface AccessibilityTextIconProps extends SvgIconProps {
4
- /**
5
- * ref is optional.
6
- * ref prop declares the reference of the svg icon component.
7
- * It can be used to to access the DOM element and the React element.
8
- */
9
- ref?: React.Ref<SVGSVGElement>;
10
- }
3
+ export interface AccessibilityTextIconProps extends SvgIconProps {}
11
4
  /**
12
5
  * Use AccessibilityTextIcon component when you need to show web accessibility options about text.
13
6
  */
@@ -2,13 +2,7 @@ import React from 'react';
2
2
  import Base, { BaseProps } from '@digigov/react-core/Base';
3
3
  import clsx from 'clsx';
4
4
  export interface AccordionSectionProps extends BaseProps<'details'> {
5
- /**
6
- * open is optional. The default value is false.
7
- * Add this prop when an AccordionSection should be open.
8
- */
9
- open?: boolean;
10
-
11
- /**
5
+ /*
12
6
  * border is optional. The default value is true.
13
7
  * In order to remove top and bottom border, change this value to false.
14
8
  */
@@ -2,19 +2,14 @@ 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 AccordionSectionSummaryProps extends BaseProps<'summary'> {
6
- ariaLevel?: 1 | 2 | 3 | 4 | 5 | 6;
7
- }
5
+ export interface AccordionSectionSummaryProps extends BaseProps<'summary'> {}
8
6
  /**
9
7
  * AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
10
8
  */
11
9
  export const AccordionSectionSummary = React.forwardRef<
12
10
  HTMLDivElement,
13
11
  AccordionSectionSummaryProps
14
- >(function AccordionSectionSummary(
15
- { className, ariaLevel = 2, children, ...props },
16
- ref
17
- ) {
12
+ >(function AccordionSectionSummary({ className, children, ...props }, ref) {
18
13
  return (
19
14
  <Base
20
15
  as="summary"
@@ -23,7 +18,6 @@ export const AccordionSectionSummary = React.forwardRef<
23
18
  'govgr-accordion__section-summary': true,
24
19
  })}
25
20
  role="heading"
26
- aria-level={ariaLevel}
27
21
  {...props}
28
22
  >
29
23
  {children}
@@ -2,11 +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 ArrowIconProps extends SvgIconProps {
5
- ref?: React.Ref<SVGSVGElement>;
6
- /**
7
- * direction is optional.
8
- * direction prop declares the direction of the svg icon.
9
- */
10
5
  direction?: 'up' | 'right' | 'down' | 'left';
11
6
  }
12
7
  /**
@@ -2,18 +2,13 @@ import React from 'react';
2
2
  import Base, { BaseProps } from '@digigov/react-core/Base';
3
3
  import clsx from 'clsx';
4
4
  import CaretIcon from '@digigov/react-core/CaretIcon';
5
- export interface BackLinkProps extends BaseProps<'a'> {
6
- /**
7
- * href is optional.
8
- */
9
- href?: string;
10
- }
5
+ export interface BackLinkProps extends BaseProps<'a'> {}
11
6
  /**
12
7
  * Use BackLink component to help users go back to the previous page in a multi-page transaction.
13
8
  */
14
9
  export const BackLink = React.forwardRef<HTMLAnchorElement, BackLinkProps>(
15
10
  function BackLink(
16
- { href, tabIndex = 0, printHidden= true, className, children, ...props },
11
+ { href, tabIndex = 0, printHidden = true, className, children, ...props },
17
12
  ref
18
13
  ) {
19
14
  return (
@@ -18,7 +18,7 @@ type PolymorphicComponentProp<
18
18
  type PolymorphicComponentPropWithRef<
19
19
  C extends React.ElementType,
20
20
  Props = Record<string, unknown>
21
- > = PolymorphicComponentProp<C, Props> & { ref?: PolymorphicRef<C> };
21
+ > = PolymorphicComponentProp<C, Props> & { ref?: any };
22
22
 
23
23
  // This is the type for the "ref" only
24
24
  type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<
@@ -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 BurgerIconProps 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'.
@@ -11,11 +11,6 @@ export interface ButtonProps extends BaseProps<'button'> {
11
11
  * The default value is 'primary'.
12
12
  */
13
13
  color?: 'primary' | 'secondary' | 'warning';
14
-
15
- /**
16
- * disabled is optional.
17
- */
18
- disabled?: boolean;
19
14
  /**
20
15
  * variant is optional.
21
16
  */
@@ -30,7 +25,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
30
25
  color = 'primary',
31
26
  variant = 'button',
32
27
  disabled,
33
- printHidden = true,
28
+ printHidden = true,
34
29
  className,
35
30
  children,
36
31
  ...props
@@ -3,16 +3,17 @@ import clsx from 'clsx';
3
3
  import ButtonLink, { ButtonLinkProps } from '@digigov/react-core/ButtonLink';
4
4
  import ArrowIcon from '@digigov/react-core/ArrowIcon';
5
5
 
6
- export interface CallToActionProps extends ButtonLinkProps {
7
- ref?: React.Ref<HTMLAnchorElement>;
8
- }
6
+ export interface CallToActionProps extends ButtonLinkProps {}
9
7
  /**
10
8
  * Use this button for the main call to action on your service’s start page.
11
9
  */
12
10
  export const CallToAction = React.forwardRef<
13
11
  HTMLAnchorElement,
14
12
  CallToActionProps
15
- >(function CallToAction({ printHidden = true, className, children, ...props }, ref) {
13
+ >(function CallToAction(
14
+ { printHidden = true, className, children, ...props },
15
+ ref
16
+ ) {
16
17
  return (
17
18
  <ButtonLink
18
19
  ref={ref}
@@ -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.
@@ -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
- export interface CheckIconProps 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
+
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
- <div
25
- className={clsx({
26
- 'govgr-field': true,
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 = false, children, ...props },
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
- <label
25
+ <LabelContainer
40
26
  className={clsx({
41
- 'govgr-label govgr-checkboxes__label': true,
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
- </label>
44
+ </LabelContainer>
59
45
  </div>
60
46
  );
61
47
  });
@@ -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
- export interface CloseIconProps 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
+
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.
@@ -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
  >
@@ -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({ name, className, children, disabled, hasFiles = false, ...props }, ref) {
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
- {children}
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.
@@ -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({ href, className, children, ...props }, ref) {
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,
@@ -7,7 +7,7 @@ export interface FooterListProps extends BaseProps<'ul'> {
7
7
  * columns is optional.
8
8
  * The values for this are 1 and 2. The default value is 1.
9
9
  */
10
- columns?: number;
10
+ columns?: 1 | 2;
11
11
  }
12
12
  /**
13
13
  * FooterList is used inside the FooterSection.
@@ -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'.
@@ -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<HTMLDivElement, GridProps>(function Grid(
20
+ export const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(
22
21
  {
23
22
  className,
24
23
  children,
@@ -7,10 +7,6 @@ export interface HeaderLogoProps extends BaseProps<'a'> {
7
7
  * src is optional.
8
8
  */
9
9
  src?: string;
10
- /**
11
- * href is optional.
12
- */
13
- href?: string;
14
10
  /**
15
11
  * href is optional.
16
12
  */
@@ -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
  })}