@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.
Files changed (136) 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 +21 -1
  12. package/CallToAction/index.d.ts +0 -1
  13. package/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
  14. package/CaretContainer/index.d.ts +11 -0
  15. package/CaretContainer/index.js +40 -0
  16. package/CaretContainer/index.test.d.ts +1 -0
  17. package/CaretContainer/index.test.js +15 -0
  18. package/CaretIcon/index.d.ts +0 -1
  19. package/CheckIcon/index.d.ts +0 -6
  20. package/CheckboxConditional/index.js +5 -5
  21. package/CheckboxItem/index.d.ts +0 -13
  22. package/CheckboxItem/index.js +5 -4
  23. package/CloseIcon/index.d.ts +0 -6
  24. package/DateInputItem/index.d.ts +0 -4
  25. package/FileUpload/index.d.ts +0 -8
  26. package/FooterImage/index.d.ts +0 -4
  27. package/FooterLink/index.d.ts +0 -4
  28. package/FooterLink/index.js +2 -4
  29. package/FooterList/index.d.ts +1 -1
  30. package/GlobeIcon/index.d.ts +0 -6
  31. package/Grid/index.d.ts +1 -2
  32. package/HeaderLogo/index.d.ts +0 -4
  33. package/HeaderSecondaryLogo/index.d.ts +0 -4
  34. package/HeaderTitle/index.d.ts +0 -4
  35. package/HeaderTitle/index.js +1 -1
  36. package/HellenicRepublicLogo/index.d.ts +0 -5
  37. package/Hidden/index.d.ts +0 -1
  38. package/MoreVertIcon/index.d.ts +0 -6
  39. package/NavListItemLink/index.d.ts +0 -5
  40. package/NotificationBannerLink/index.d.ts +0 -4
  41. package/NotificationBannerLink/index.js +3 -3
  42. package/PhaseBannerHeaderContainer/index.d.ts +1 -3
  43. package/RadioConditional/index.js +5 -5
  44. package/RadioItem/index.d.ts +0 -13
  45. package/RadioItem/index.js +4 -2
  46. package/SelectContainer/index.d.ts +0 -4
  47. package/SelectOption/index.d.ts +0 -8
  48. package/SingleCharacterInputItem/index.d.ts +0 -5
  49. package/SkipLink/index.d.ts +0 -1
  50. package/Table/index.d.ts +7 -1
  51. package/Table/index.js +4 -2
  52. package/TabsListItem/index.d.ts +0 -4
  53. package/TextArea/index.d.ts +0 -8
  54. package/TextInput/index.d.ts +0 -4
  55. package/UncheckIcon/index.d.ts +0 -6
  56. package/es/AccordionSectionSummary/index.js +2 -5
  57. package/es/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
  58. package/es/CaretContainer/index.js +24 -0
  59. package/es/CaretContainer/index.test.js +9 -0
  60. package/es/CheckboxConditional/index.js +3 -5
  61. package/es/CheckboxItem/index.js +4 -4
  62. package/es/FooterLink/index.js +2 -4
  63. package/es/HeaderTitle/index.js +1 -1
  64. package/es/NotificationBannerLink/index.js +3 -3
  65. package/es/RadioConditional/index.js +3 -5
  66. package/es/RadioItem/index.js +3 -2
  67. package/es/Table/index.js +4 -2
  68. package/es/index.js +1 -0
  69. package/es/registry.js +2 -0
  70. package/esm/AccordionSectionSummary/index.js +2 -5
  71. package/esm/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
  72. package/esm/CaretContainer/index.js +24 -0
  73. package/esm/CaretContainer/index.test.js +9 -0
  74. package/esm/CheckboxConditional/index.js +3 -5
  75. package/esm/CheckboxItem/index.js +4 -4
  76. package/esm/FooterLink/index.js +2 -4
  77. package/esm/HeaderTitle/index.js +1 -1
  78. package/esm/NotificationBannerLink/index.js +3 -3
  79. package/esm/RadioConditional/index.js +3 -5
  80. package/esm/RadioItem/index.js +3 -2
  81. package/esm/Table/index.js +4 -2
  82. package/esm/index.js +2 -1
  83. package/esm/registry.js +2 -0
  84. package/index.d.ts +1 -0
  85. package/index.js +13 -0
  86. package/package.json +2 -2
  87. package/registry.d.ts +1 -0
  88. package/registry.js +3 -0
  89. package/src/AccessibilityIcon/index.tsx +2 -9
  90. package/src/AccessibilityTextIcon/index.tsx +1 -8
  91. package/src/AccordionSection/index.tsx +1 -7
  92. package/src/AccordionSectionSummary/index.tsx +2 -8
  93. package/src/ArrowIcon/index.tsx +0 -5
  94. package/src/BackLink/index.tsx +2 -7
  95. package/src/Base/index.tsx +1 -1
  96. package/src/BurgerIcon/index.tsx +0 -6
  97. package/src/Button/index.tsx +1 -6
  98. package/src/CallToAction/index.tsx +5 -4
  99. package/src/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
  100. package/src/CaretContainer/index.test.tsx +8 -0
  101. package/src/CaretContainer/index.tsx +29 -0
  102. package/src/CaretIcon/index.tsx +0 -1
  103. package/src/CheckIcon/index.tsx +2 -8
  104. package/src/CheckboxConditional/index.tsx +5 -13
  105. package/src/CheckboxItem/index.tsx +6 -20
  106. package/src/CloseIcon/index.tsx +2 -8
  107. package/src/DateInputItem/index.tsx +0 -4
  108. package/src/Fieldset/index.tsx +1 -2
  109. package/src/FileUpload/index.tsx +7 -12
  110. package/src/FooterImage/index.tsx +1 -6
  111. package/src/FooterLink/index.tsx +2 -8
  112. package/src/FooterList/index.tsx +1 -1
  113. package/src/GlobeIcon/index.tsx +0 -6
  114. package/src/Grid/index.tsx +1 -2
  115. package/src/HeaderLogo/index.tsx +0 -4
  116. package/src/HeaderSecondaryLogo/index.tsx +0 -6
  117. package/src/HeaderTitle/index.tsx +2 -7
  118. package/src/HellenicRepublicLogo/index.tsx +24 -29
  119. package/src/Hidden/index.tsx +0 -1
  120. package/src/MoreVertIcon/index.tsx +1 -8
  121. package/src/NavListItemLink/index.tsx +0 -5
  122. package/src/NotificationBannerLink/index.tsx +2 -7
  123. package/src/PhaseBannerHeaderContainer/index.tsx +1 -4
  124. package/src/RadioConditional/index.tsx +5 -13
  125. package/src/RadioItem/index.tsx +5 -19
  126. package/src/SelectContainer/index.tsx +1 -6
  127. package/src/SelectOption/index.tsx +1 -11
  128. package/src/SingleCharacterInputItem/index.tsx +0 -5
  129. package/src/SkipLink/index.tsx +1 -3
  130. package/src/Table/index.tsx +10 -0
  131. package/src/TabsListItem/index.tsx +0 -5
  132. package/src/TextArea/index.tsx +0 -10
  133. package/src/TextInput/index.tsx +0 -5
  134. package/src/UncheckIcon/index.tsx +1 -8
  135. package/src/index.ts +1 -0
  136. package/src/registry.js +2 -0
@@ -1,11 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface HellenicRepublicLogoProps extends BaseProps<'img'> {
4
- /**
5
- * src is optional.
6
- * By default, the src is the official logo of the Hellenic Republic uploaded to the government.gov.gr site.
7
- */
8
- src?: string;
9
4
  /**
10
5
  * lang is optional.
11
6
  * Use this to define the language version of the logo. Default is el.
package/Hidden/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface HiddenProps extends BaseProps<'div'> {
4
- ref?: React.Ref<HTMLDivElement>;
5
4
  lgUp?: boolean;
6
5
  mdUp?: boolean;
7
6
  smUp?: boolean;
@@ -1,12 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
3
  export interface MoreVertIconProps 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
4
  }
11
5
  /**
12
6
  * Use MoreVertIcon component when you need to show more options.
@@ -7,11 +7,6 @@ export interface NavListItemLinkProps extends BaseProps<'a'> {
7
7
  *
8
8
  */
9
9
  active?: boolean;
10
- /**
11
- * href prop is used to navigate to current url page.
12
- * href is optional.
13
- */
14
- href?: string;
15
10
  }
16
11
  /**
17
12
  * NavListItemLink is an <a> element. It should be inside the NavListItem component.
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface NotificationBannerLinkProps extends BaseProps<'a'> {
4
- /**
5
- * href is optional.
6
- */
7
- href?: string;
8
4
  }
9
5
  /**
10
6
  * Details for the NotificationBannerLink.
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
18
  var _clsx = _interopRequireDefault(require("clsx"));
19
19
 
20
- var _excluded = ["href", "className", "children"];
20
+ var _excluded = ["className", "href", "children"];
21
21
 
22
22
  /**
23
23
  * Details for the NotificationBannerLink.
@@ -25,9 +25,9 @@ var _excluded = ["href", "className", "children"];
25
25
  * NotificationBannerLink must be wrapped inside NotificationContent component as children
26
26
  */
27
27
  var NotificationBannerLink = /*#__PURE__*/_react["default"].forwardRef(function NotificationBannerLink(_ref, ref) {
28
- var _ref$href = _ref.href,
28
+ var className = _ref.className,
29
+ _ref$href = _ref.href,
29
30
  href = _ref$href === void 0 ? '#' : _ref$href,
30
- className = _ref.className,
31
31
  children = _ref.children,
32
32
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
33
33
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface PhaseBannerHeaderContainerProps extends BaseProps<'div'> {
4
- tag?: string;
5
- text?: string;
6
4
  }
7
- export declare const PhaseBannerHeaderContainer: React.ForwardRefExoticComponent<Pick<PhaseBannerHeaderContainerProps, "slot" | "style" | "title" | "text" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "tag"> & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const PhaseBannerHeaderContainer: React.ForwardRefExoticComponent<Pick<PhaseBannerHeaderContainerProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
8
6
  export default PhaseBannerHeaderContainer;
@@ -15,6 +15,10 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
+ var _LabelContainer = _interopRequireDefault(require("@digigov/react-core/LabelContainer"));
19
+
20
+ var _FieldContainer = _interopRequireDefault(require("@digigov/react-core/FieldContainer"));
21
+
18
22
  var _clsx = _interopRequireDefault(require("clsx"));
19
23
 
20
24
  var _excluded = ["className", "children"];
@@ -32,11 +36,7 @@ var RadioConditional = /*#__PURE__*/_react["default"].forwardRef(function RadioC
32
36
  as: "div",
33
37
  ref: ref,
34
38
  className: (0, _clsx["default"])(className, true && 'govgr-radios__conditional')
35
- }, props), /*#__PURE__*/_react["default"].createElement("div", {
36
- className: (0, _clsx["default"])(true && 'govgr-field')
37
- }, /*#__PURE__*/_react["default"].createElement("label", {
38
- className: (0, _clsx["default"])(true && 'govgr-label')
39
- }, children)));
39
+ }, props), /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], null, /*#__PURE__*/_react["default"].createElement(_LabelContainer["default"], null, children)));
40
40
  });
41
41
 
42
42
  exports.RadioConditional = RadioConditional;
@@ -1,19 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface RadioItemProps extends BaseProps<'input'> {
4
- /**
5
- *Name property is optional and it contains a single value which describes the name of the <input> element.
6
- */
7
- name?: string;
8
- /**
9
- * Value property is optional and it specifies the value of an <input> element.
10
- */
11
- value?: string;
12
- /**
13
- * disabled prop disables the radio input.
14
- * disabled property is optional and it is false by default.
15
- */
16
- disabled?: boolean;
17
4
  }
18
5
  /**
19
6
  * RadioItem component is used for display radio buttons.
@@ -15,6 +15,8 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
+ var _LabelContainer = _interopRequireDefault(require("@digigov/react-core/LabelContainer"));
19
+
18
20
  var _clsx = _interopRequireDefault(require("clsx"));
19
21
 
20
22
  var _excluded = ["name", "value", "className", "disabled", "children"];
@@ -33,8 +35,8 @@ var RadioItem = /*#__PURE__*/_react["default"].forwardRef(function RadioItem(_re
33
35
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
34
36
  return /*#__PURE__*/_react["default"].createElement("div", {
35
37
  className: (0, _clsx["default"])(className, true && 'govgr-radios__item')
36
- }, /*#__PURE__*/_react["default"].createElement("label", {
37
- className: (0, _clsx["default"])(disabled === true && 'govgr-radios__label--disabled', true && 'govgr-label govgr-radios__label')
38
+ }, /*#__PURE__*/_react["default"].createElement(_LabelContainer["default"], {
39
+ className: (0, _clsx["default"])(disabled === true && 'govgr-radios__label--disabled', true && 'govgr-radios__label')
38
40
  }, children, /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
39
41
  as: "input",
40
42
  ref: ref,
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface SelectContainerProps extends BaseProps<'select'> {
4
- /**
5
- * name is optional but strongly recommended.
6
- */
7
- name?: string;
8
4
  }
9
5
  /**
10
6
  * The SelectContainer component allows users to choose an option from a long list.
@@ -1,14 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface SelectOptionProps extends BaseProps<'option'> {
4
- /**
5
- * value is optional.
6
- */
7
- value?: string;
8
- /**
9
- * selected is optional.
10
- */
11
- selected?: boolean;
12
4
  }
13
5
  /**
14
6
  * SelectOption component is used for display options value.
@@ -1,11 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface SingleCharacterInputItemProps extends BaseProps<'input'> {
4
- /**
5
- * Name property is optional
6
- * Name prop contains a single value which describes the name of the <input> element.
7
- */
8
- name?: string;
9
4
  /**
10
5
  * error is optional. The default value is false.
11
6
  * Use this prop when there is an error at the input.
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface LinkProps extends BaseProps<'a'> {
4
- href?: string;
5
4
  }
6
5
  /**
7
6
  * Use the skip link component to help keyboard-only users skip to the main content on a page.
package/Table/index.d.ts CHANGED
@@ -26,9 +26,15 @@ export interface TableProps extends BaseProps<'table'> {
26
26
  * Default value is false.
27
27
  */
28
28
  verticalBorders?: boolean;
29
+ /**
30
+ * stacked is optional.
31
+ * The stacked prop gives responsiveness to the table. If used, make sure to add "data-label" to TableDataCell components.
32
+ * Default value is never.
33
+ */
34
+ stacked?: 'always' | 's' | 'm' | 'never';
29
35
  }
30
36
  /**
31
37
  * Table component is used to wrap the sub components of a table
32
38
  */
33
- export declare const Table: React.ForwardRefExoticComponent<Pick<TableProps, "slot" | "style" | "summary" | "title" | "as" | "className" | "color" | "id" | "lang" | "width" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "cellPadding" | "cellSpacing" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "zebra" | "dense" | "verticalBorders"> & React.RefAttributes<HTMLTableElement>>;
39
+ export declare const Table: React.ForwardRefExoticComponent<Pick<TableProps, "slot" | "style" | "summary" | "title" | "as" | "className" | "color" | "id" | "lang" | "width" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "cellPadding" | "cellSpacing" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "zebra" | "dense" | "verticalBorders" | "stacked"> & React.RefAttributes<HTMLTableElement>>;
34
40
  export default Table;
package/Table/index.js CHANGED
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
18
  var _clsx = _interopRequireDefault(require("clsx"));
19
19
 
20
- var _excluded = ["variant", "zebra", "dense", "verticalBorders", "className", "children"];
20
+ var _excluded = ["variant", "zebra", "dense", "verticalBorders", "stacked", "className", "children"];
21
21
 
22
22
  /**
23
23
  * Table component is used to wrap the sub components of a table
@@ -30,13 +30,15 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function Table(_ref, ref)
30
30
  dense = _ref$dense === void 0 ? false : _ref$dense,
31
31
  _ref$verticalBorders = _ref.verticalBorders,
32
32
  verticalBorders = _ref$verticalBorders === void 0 ? false : _ref$verticalBorders,
33
+ _ref$stacked = _ref.stacked,
34
+ stacked = _ref$stacked === void 0 ? 'never' : _ref$stacked,
33
35
  className = _ref.className,
34
36
  children = _ref.children,
35
37
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
36
38
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
37
39
  as: "table",
38
40
  ref: ref,
39
- className: (0, _clsx["default"])(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')
41
+ className: (0, _clsx["default"])(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')
40
42
  }, props), children);
41
43
  });
42
44
 
@@ -7,10 +7,6 @@ export interface TabsListItemProps extends BaseProps<'a'> {
7
7
  * This declares that this tab is selected.
8
8
  */
9
9
  selected?: boolean;
10
- /**
11
- * href is optional.
12
- */
13
- href?: string;
14
10
  }
15
11
  /**
16
12
  * TabsListItem should be inside the TabsList.
@@ -1,14 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface TextAreaProps extends BaseProps<'textarea'> {
4
- /**
5
- * name is optional but strongly recommended.
6
- */
7
- name?: string;
8
- /**
9
- * row is optional. The default value is 6.
10
- */
11
- rows?: 4 | 5 | 6 | 7 | 8;
12
4
  /**
13
5
  * error is optional. The default value is false.
14
6
  * Use this prop when there is an error at the input.
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface TextInputProps extends BaseProps<'input'> {
4
- /**
5
- * name is optional but strongly recommended.
6
- */
7
- name?: string;
8
4
  /**
9
5
  * characterWidth is optional.
10
6
  */
@@ -1,12 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
3
  export interface UncheckIconProps 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
4
  }
11
5
  /**
12
6
  * Use UnUncheckIcon component when you need a uncheck/decline icon.
@@ -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 = ["className", "ariaLevel", "children"];
3
+ var _excluded = ["className", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -10,8 +10,6 @@ import clsx from 'clsx';
10
10
  */
11
11
  export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function AccordionSectionSummary(_ref, ref) {
12
12
  var className = _ref.className,
13
- _ref$ariaLevel = _ref.ariaLevel,
14
- ariaLevel = _ref$ariaLevel === void 0 ? 2 : _ref$ariaLevel,
15
13
  children = _ref.children,
16
14
  props = _objectWithoutProperties(_ref, _excluded);
17
15
 
@@ -19,8 +17,7 @@ export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function Acco
19
17
  as: "summary",
20
18
  ref: ref,
21
19
  className: clsx(className, true && 'govgr-accordion__section-summary'),
22
- role: "heading",
23
- "aria-level": ariaLevel
20
+ role: "heading"
24
21
  }, props), children);
25
22
  });
26
23
  export default AccordionSectionSummary;
@@ -0,0 +1,16 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the CaretContainer with no props 1`] = `
4
+ <ForwardRef(CaretContainer)>
5
+ <ForwardRef(Base)
6
+ as="div"
7
+ className="govgr-caret-container"
8
+ >
9
+ <div
10
+ className="govgr-caret-container"
11
+ >
12
+ hello
13
+ </div>
14
+ </ForwardRef(Base)>
15
+ </ForwardRef(CaretContainer)>
16
+ `;
@@ -0,0 +1,24 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["className", "children"];
4
+ import React from 'react';
5
+ import Base from '@digigov/react-core/Base';
6
+ import clsx from 'clsx';
7
+
8
+ /**
9
+ *
10
+ * Use CaretContainer to wrap CaretIcon like ascending descending style.
11
+ *
12
+ */
13
+ export var CaretContainer = /*#__PURE__*/React.forwardRef(function CaretContainer(_ref, ref) {
14
+ var className = _ref.className,
15
+ children = _ref.children,
16
+ props = _objectWithoutProperties(_ref, _excluded);
17
+
18
+ return /*#__PURE__*/React.createElement(Base, _extends({
19
+ as: "div",
20
+ ref: ref,
21
+ className: clsx(className, true && 'govgr-caret-container')
22
+ }, props), children);
23
+ });
24
+ export default CaretContainer;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { mount } from 'enzyme';
3
+ import CaretContainer from '@digigov/react-core/CaretContainer';
4
+
5
+ var _ref = /*#__PURE__*/React.createElement(CaretContainer, null, "hello");
6
+
7
+ it('renders the CaretContainer with no props', function () {
8
+ expect(mount(_ref)).toMatchSnapshot();
9
+ });
@@ -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 CheckboxConditional = /*#__PURE__*/React.forwardRef(function Checkbox
19
21
  as: "div",
20
22
  ref: ref,
21
23
  className: clsx(className, true && 'govgr-checkboxes__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 CheckboxConditional;
@@ -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
  /**
@@ -14,15 +15,14 @@ export var CheckboxItem = /*#__PURE__*/React.forwardRef(function CheckboxItem(_r
14
15
  var name = _ref.name,
15
16
  value = _ref.value,
16
17
  className = _ref.className,
17
- _ref$disabled = _ref.disabled,
18
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
18
+ disabled = _ref.disabled,
19
19
  children = _ref.children,
20
20
  props = _objectWithoutProperties(_ref, _excluded);
21
21
 
22
22
  return /*#__PURE__*/React.createElement("div", {
23
23
  className: clsx(className, true && 'govgr-checkboxes__item')
24
- }, /*#__PURE__*/React.createElement("label", {
25
- className: clsx(disabled === true && 'govgr-checkboxes__label--disabled', true && 'govgr-label govgr-checkboxes__label')
24
+ }, /*#__PURE__*/React.createElement(LabelContainer, {
25
+ className: clsx(disabled === true && 'govgr-checkboxes__label--disabled', true && 'govgr-checkboxes__label')
26
26
  }, children, /*#__PURE__*/React.createElement(Base, _extends({
27
27
  as: "input",
28
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 = ["href", "className", "children"];
3
+ var _excluded = ["className", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -9,14 +9,12 @@ import clsx from 'clsx';
9
9
  * FooterLink in used inside the Footer component.
10
10
  */
11
11
  export var FooterLink = /*#__PURE__*/React.forwardRef(function FooterLink(_ref, ref) {
12
- var href = _ref.href,
13
- className = _ref.className,
12
+ var className = _ref.className,
14
13
  children = _ref.children,
15
14
  props = _objectWithoutProperties(_ref, _excluded);
16
15
 
17
16
  return /*#__PURE__*/React.createElement(Base, _extends({
18
17
  as: "a",
19
- href: href,
20
18
  ref: ref,
21
19
  className: clsx(className, true && 'govgr-footer__link')
22
20
  }, props), children);
@@ -17,8 +17,8 @@ export var HeaderTitle = /*#__PURE__*/React.forwardRef(function HeaderTitle(_ref
17
17
 
18
18
  return /*#__PURE__*/React.createElement(Base, _extends({
19
19
  as: "a",
20
- href: href,
21
20
  ref: ref,
21
+ href: href,
22
22
  className: clsx(className, true && 'govgr-header-title')
23
23
  }, props), children);
24
24
  });
@@ -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 = ["href", "className", "children"];
3
+ var _excluded = ["className", "href", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -11,9 +11,9 @@ import clsx from 'clsx';
11
11
  * NotificationBannerLink must be wrapped inside NotificationContent component as children
12
12
  */
13
13
  export var NotificationBannerLink = /*#__PURE__*/React.forwardRef(function NotificationBannerLink(_ref, ref) {
14
- var _ref$href = _ref.href,
14
+ var className = _ref.className,
15
+ _ref$href = _ref.href,
15
16
  href = _ref$href === void 0 ? '#' : _ref$href,
16
- className = _ref.className,
17
17
  children = _ref.children,
18
18
  props = _objectWithoutProperties(_ref, _excluded);
19
19
 
@@ -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,
package/es/Table/index.js CHANGED
@@ -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;