@digigov/react-core 0.5.5 → 0.6.2

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 (133) hide show
  1. package/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
  2. package/ArrowIcon/index.d.ts +16 -0
  3. package/ArrowIcon/index.js +59 -0
  4. package/ArrowIcon/index.test.d.ts +1 -0
  5. package/ArrowIcon/index.test.js +39 -0
  6. package/BackLink/index.d.ts +1 -1
  7. package/BackLink/index.js +5 -3
  8. package/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
  9. package/BurgerIcon/index.d.ts +15 -3
  10. package/BurgerIcon/index.js +31 -12
  11. package/BurgerIcon/index.test.js +74 -6
  12. package/Button/index.d.ts +1 -1
  13. package/ButtonLink/index.d.ts +1 -1
  14. package/CHANGELOG.md +27 -1
  15. package/CallToAction/index.d.ts +1 -1
  16. package/CallToAction/index.js +3 -8
  17. package/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
  18. package/CaretIcon/index.d.ts +16 -0
  19. package/CaretIcon/index.js +59 -0
  20. package/CaretIcon/index.test.d.ts +1 -0
  21. package/CaretIcon/index.test.js +39 -0
  22. package/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
  23. package/CheckIcon/index.d.ts +15 -0
  24. package/CheckIcon/index.js +44 -0
  25. package/CheckIcon/index.test.d.ts +1 -0
  26. package/CheckIcon/index.test.js +129 -0
  27. package/CheckboxItem/index.d.ts +1 -1
  28. package/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
  29. package/CloseIcon/index.d.ts +16 -0
  30. package/CloseIcon/index.js +45 -0
  31. package/CloseIcon/index.test.d.ts +1 -0
  32. package/CloseIcon/index.test.js +15 -0
  33. package/DateInputItem/index.d.ts +2 -2
  34. package/DateInputItem/index.js +5 -5
  35. package/Fieldset/index.d.ts +1 -1
  36. package/FieldsetLegend/index.d.ts +1 -1
  37. package/FileUpload/index.d.ts +1 -1
  38. package/FooterContainer/index.d.ts +8 -1
  39. package/FooterContainer/index.js +4 -2
  40. package/FooterImage/index.d.ts +1 -1
  41. package/FooterLink/index.d.ts +1 -1
  42. package/GovGRLogo/index.d.ts +1 -1
  43. package/Grid/index.d.ts +1 -1
  44. package/HeaderLogo/index.d.ts +1 -1
  45. package/HeaderSecondaryLogo/index.d.ts +1 -1
  46. package/HeaderTitle/index.d.ts +1 -1
  47. package/HellenicRepublicLogo/index.d.ts +1 -1
  48. package/LabelTitle/index.d.ts +1 -1
  49. package/Link/index.d.ts +1 -1
  50. package/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
  51. package/MoreVertIcon/index.d.ts +15 -0
  52. package/MoreVertIcon/index.js +58 -0
  53. package/MoreVertIcon/index.test.d.ts +1 -0
  54. package/MoreVertIcon/index.test.js +129 -0
  55. package/NavHorizontalListItem/index.d.ts +1 -1
  56. package/NavVerticalItem/index.d.ts +1 -1
  57. package/NotificationBannerLink/index.d.ts +1 -1
  58. package/RadioItem/index.d.ts +1 -1
  59. package/Select/index.d.ts +1 -1
  60. package/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  61. package/SvgIcon/index.d.ts +20 -0
  62. package/SvgIcon/index.js +41 -0
  63. package/SvgIcon/index.test.d.ts +1 -0
  64. package/SvgIcon/index.test.js +129 -0
  65. package/TabsListItem/index.d.ts +1 -1
  66. package/TextArea/index.d.ts +1 -1
  67. package/TextInput/index.d.ts +1 -1
  68. package/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
  69. package/UncheckIcon/index.d.ts +15 -0
  70. package/UncheckIcon/index.js +44 -0
  71. package/UncheckIcon/index.test.d.ts +1 -0
  72. package/UncheckIcon/index.test.js +129 -0
  73. package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
  74. package/es/ArrowIcon/index.js +43 -0
  75. package/es/ArrowIcon/index.test.js +33 -0
  76. package/es/BackLink/index.js +4 -3
  77. package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
  78. package/es/BurgerIcon/index.js +30 -12
  79. package/es/BurgerIcon/index.test.js +74 -6
  80. package/es/CallToAction/index.js +2 -8
  81. package/es/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
  82. package/es/CaretIcon/index.js +43 -0
  83. package/es/CaretIcon/index.test.js +33 -0
  84. package/es/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
  85. package/es/CheckIcon/index.js +28 -0
  86. package/es/CheckIcon/index.test.js +123 -0
  87. package/es/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
  88. package/es/CloseIcon/index.js +29 -0
  89. package/es/CloseIcon/index.test.js +9 -0
  90. package/es/DateInputItem/index.js +5 -5
  91. package/es/FooterContainer/index.js +4 -2
  92. package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
  93. package/es/MoreVertIcon/index.js +42 -0
  94. package/es/MoreVertIcon/index.test.js +123 -0
  95. package/es/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  96. package/es/SvgIcon/index.js +26 -0
  97. package/es/SvgIcon/index.test.js +123 -0
  98. package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
  99. package/es/UncheckIcon/index.js +28 -0
  100. package/es/UncheckIcon/index.test.js +123 -0
  101. package/es/index.js +7 -0
  102. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
  103. package/esm/ArrowIcon/index.js +43 -0
  104. package/esm/ArrowIcon/index.test.js +33 -0
  105. package/esm/BackLink/index.js +4 -3
  106. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
  107. package/esm/BurgerIcon/index.js +30 -12
  108. package/esm/BurgerIcon/index.test.js +74 -6
  109. package/esm/CallToAction/index.js +2 -8
  110. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
  111. package/esm/CaretIcon/index.js +43 -0
  112. package/esm/CaretIcon/index.test.js +33 -0
  113. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
  114. package/esm/CheckIcon/index.js +28 -0
  115. package/esm/CheckIcon/index.test.js +123 -0
  116. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
  117. package/esm/CloseIcon/index.js +29 -0
  118. package/esm/CloseIcon/index.test.js +9 -0
  119. package/esm/DateInputItem/index.js +5 -5
  120. package/esm/FooterContainer/index.js +4 -2
  121. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
  122. package/esm/MoreVertIcon/index.js +42 -0
  123. package/esm/MoreVertIcon/index.test.js +123 -0
  124. package/esm/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  125. package/esm/SvgIcon/index.js +26 -0
  126. package/esm/SvgIcon/index.test.js +123 -0
  127. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
  128. package/esm/UncheckIcon/index.js +28 -0
  129. package/esm/UncheckIcon/index.test.js +123 -0
  130. package/esm/index.js +8 -1
  131. package/index.d.ts +7 -0
  132. package/index.js +56 -0
  133. package/package.json +2 -2
@@ -0,0 +1,83 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the ArrowIcon with direction down prop 1`] = `
4
+ <ForwardRef(ArrowIcon)
5
+ direction="down"
6
+ >
7
+ <ForwardRef(SvgIcon)
8
+ className="govgr-arrow--down"
9
+ >
10
+ <svg
11
+ aria-hidden="true"
12
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--down govgr-svg-icon"
13
+ focusable="false"
14
+ viewBox="0 0 24 24"
15
+ >
16
+ <path
17
+ d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
18
+ />
19
+ </svg>
20
+ </ForwardRef(SvgIcon)>
21
+ </ForwardRef(ArrowIcon)>
22
+ `;
23
+
24
+ exports[`renders the ArrowIcon with direction left prop 1`] = `
25
+ <ForwardRef(ArrowIcon)
26
+ direction="left"
27
+ >
28
+ <ForwardRef(SvgIcon)
29
+ className="govgr-arrow--left"
30
+ >
31
+ <svg
32
+ aria-hidden="true"
33
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--left govgr-svg-icon"
34
+ focusable="false"
35
+ viewBox="0 0 24 24"
36
+ >
37
+ <path
38
+ d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
39
+ />
40
+ </svg>
41
+ </ForwardRef(SvgIcon)>
42
+ </ForwardRef(ArrowIcon)>
43
+ `;
44
+
45
+ exports[`renders the ArrowIcon with direction up prop 1`] = `
46
+ <ForwardRef(ArrowIcon)
47
+ direction="up"
48
+ >
49
+ <ForwardRef(SvgIcon)
50
+ className="govgr-arrow--up"
51
+ >
52
+ <svg
53
+ aria-hidden="true"
54
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--up govgr-svg-icon"
55
+ focusable="false"
56
+ viewBox="0 0 24 24"
57
+ >
58
+ <path
59
+ d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
60
+ />
61
+ </svg>
62
+ </ForwardRef(SvgIcon)>
63
+ </ForwardRef(ArrowIcon)>
64
+ `;
65
+
66
+ exports[`renders the ArrowIcon with no props, direction prop is right by default 1`] = `
67
+ <ForwardRef(ArrowIcon)>
68
+ <ForwardRef(SvgIcon)
69
+ className="govgr-arrow--right"
70
+ >
71
+ <svg
72
+ aria-hidden="true"
73
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--right govgr-svg-icon"
74
+ focusable="false"
75
+ viewBox="0 0 24 24"
76
+ >
77
+ <path
78
+ d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
79
+ />
80
+ </svg>
81
+ </ForwardRef(SvgIcon)>
82
+ </ForwardRef(ArrowIcon)>
83
+ `;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
+ export interface ArrowIconProps extends SvgIconProps {
4
+ ref?: React.Ref<SVGSVGElement>;
5
+ /**
6
+ * direction is optional.
7
+ * direction prop declares the direction of the svg icon.
8
+ */
9
+ direction?: 'up' | 'right' | 'down' | 'left';
10
+ }
11
+ /**
12
+ * ArrowIcon component is used to add arrow icon.
13
+ * ArrowIcon component can be used inside other components, for example CallToAction component.
14
+ */
15
+ export declare const ArrowIcon: React.FC<ArrowIconProps>;
16
+ export default ArrowIcon;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.ArrowIcon = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
17
+
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
20
+ var _excluded = ["size", "variant", "direction", "className"];
21
+
22
+ var _ref2 = /*#__PURE__*/_react["default"].createElement("path", {
23
+ d: "M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
24
+ });
25
+
26
+ var _ref3 = /*#__PURE__*/_react["default"].createElement("path", {
27
+ d: "M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
28
+ });
29
+
30
+ var _ref4 = /*#__PURE__*/_react["default"].createElement("path", {
31
+ d: "M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
32
+ });
33
+
34
+ var _ref5 = /*#__PURE__*/_react["default"].createElement("path", {
35
+ d: "M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
36
+ });
37
+
38
+ /**
39
+ * ArrowIcon component is used to add arrow icon.
40
+ * ArrowIcon component can be used inside other components, for example CallToAction component.
41
+ */
42
+ var ArrowIcon = /*#__PURE__*/_react["default"].forwardRef(function ArrowIcon(_ref, ref) {
43
+ var size = _ref.size,
44
+ variant = _ref.variant,
45
+ _ref$direction = _ref.direction,
46
+ direction = _ref$direction === void 0 ? 'right' : _ref$direction,
47
+ className = _ref.className,
48
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
49
+ return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
50
+ size: size,
51
+ variant: variant,
52
+ className: (0, _clsx["default"])(direction === 'right' && 'govgr-arrow--right', direction === 'left' && 'govgr-arrow--left', direction === 'down' && 'govgr-arrow--down', direction === 'up' && 'govgr-arrow--up', className && className),
53
+ ref: ref
54
+ }, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
55
+ });
56
+
57
+ exports.ArrowIcon = ArrowIcon;
58
+ var _default = ArrowIcon;
59
+ exports["default"] = _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _enzyme = require("enzyme");
8
+
9
+ var _ArrowIcon = _interopRequireDefault(require("@digigov/react-core/ArrowIcon"));
10
+
11
+ var _ref = /*#__PURE__*/_react["default"].createElement(_ArrowIcon["default"], null);
12
+
13
+ it('renders the ArrowIcon with no props, direction prop is right by default', function () {
14
+ expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_ArrowIcon["default"], {
18
+ direction: "left"
19
+ });
20
+
21
+ it('renders the ArrowIcon with direction left prop', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
23
+ });
24
+
25
+ var _ref3 = /*#__PURE__*/_react["default"].createElement(_ArrowIcon["default"], {
26
+ direction: "up"
27
+ });
28
+
29
+ it('renders the ArrowIcon with direction up prop', function () {
30
+ expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
31
+ });
32
+
33
+ var _ref4 = /*#__PURE__*/_react["default"].createElement(_ArrowIcon["default"], {
34
+ direction: "down"
35
+ });
36
+
37
+ it('renders the ArrowIcon with direction down prop', function () {
38
+ expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
39
+ });
@@ -9,5 +9,5 @@ export interface BackLinkProps extends AElementAttributes {
9
9
  /**
10
10
  * Use BackLink component to help users go back to the previous page in a multi-page transaction.
11
11
  */
12
- export declare const BackLink: React.ForwardRefExoticComponent<Pick<BackLinkProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "href" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy"> & React.RefAttributes<HTMLAnchorElement>>;
12
+ export declare const BackLink: React.ForwardRefExoticComponent<Pick<BackLinkProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy"> & React.RefAttributes<HTMLAnchorElement>>;
13
13
  export default BackLink;
package/BackLink/index.js CHANGED
@@ -15,8 +15,12 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _clsx = _interopRequireDefault(require("clsx"));
17
17
 
18
+ var _CaretIcon = _interopRequireDefault(require("@digigov/react-core/CaretIcon"));
19
+
18
20
  var _excluded = ["href", "className", "children"];
19
21
 
22
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"], null);
23
+
20
24
  /**
21
25
  * Use BackLink component to help users go back to the previous page in a multi-page transaction.
22
26
  */
@@ -32,9 +36,7 @@ var BackLink = /*#__PURE__*/_react["default"].forwardRef(function BackLink(_ref,
32
36
  },
33
37
  ref: ref,
34
38
  className: (0, _clsx["default"])(className, true && 'govgr-back-link')
35
- }, props), /*#__PURE__*/_react["default"].createElement("span", {
36
- className: (0, _clsx["default"])(true && 'govgr-caret-left')
37
- }), children);
39
+ }, props), _ref2, children);
38
40
  });
39
41
 
40
42
  exports.BackLink = BackLink;
@@ -1,59 +1,372 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`renders the BurgerIcon with active=false 1`] = `
3
+ exports[`renders the BurgerIcon prop hidden="l" 1`] = `
4
4
  <ForwardRef(BurgerIcon)
5
- active={false}
5
+ hidden="l"
6
6
  >
7
- <div
8
- className="govgr-burger-menu govgr-burger-menu--white-bg"
7
+ <ForwardRef(SvgIcon)
8
+ className="govgr-burger-icon--hidden-l govgr-burger-icon"
9
9
  >
10
- <div
11
- className="govgr-burger-menu__line1"
12
- />
13
- <div
14
- className="govgr-burger-menu__line2"
15
- />
16
- <div
17
- className="govgr-burger-menu__line3"
18
- />
19
- </div>
10
+ <svg
11
+ aria-hidden="true"
12
+ className="govgr-burger-icon--hidden-l govgr-burger-icon govgr-svg-icon"
13
+ focusable="false"
14
+ viewBox="0 0 24 24"
15
+ >
16
+ <rect
17
+ height="3.3"
18
+ id="govgr-burger-icon__line-1"
19
+ width="20"
20
+ />
21
+ <rect
22
+ height="3.3"
23
+ id="govgr-burger-icon__line-2"
24
+ width="20"
25
+ />
26
+ <rect
27
+ height="3.3"
28
+ id="govgr-burger-icon__line-3"
29
+ width="20"
30
+ />
31
+ </svg>
32
+ </ForwardRef(SvgIcon)>
20
33
  </ForwardRef(BurgerIcon)>
21
34
  `;
22
35
 
23
- exports[`renders the BurgerIcon with active=true 1`] = `
36
+ exports[`renders the BurgerIcon prop hidden="m" 1`] = `
37
+ <ForwardRef(BurgerIcon)
38
+ hidden="m"
39
+ >
40
+ <ForwardRef(SvgIcon)
41
+ className="govgr-burger-icon--hidden-m govgr-burger-icon"
42
+ >
43
+ <svg
44
+ aria-hidden="true"
45
+ className="govgr-burger-icon--hidden-m govgr-burger-icon govgr-svg-icon"
46
+ focusable="false"
47
+ viewBox="0 0 24 24"
48
+ >
49
+ <rect
50
+ height="3.3"
51
+ id="govgr-burger-icon__line-1"
52
+ width="20"
53
+ />
54
+ <rect
55
+ height="3.3"
56
+ id="govgr-burger-icon__line-2"
57
+ width="20"
58
+ />
59
+ <rect
60
+ height="3.3"
61
+ id="govgr-burger-icon__line-3"
62
+ width="20"
63
+ />
64
+ </svg>
65
+ </ForwardRef(SvgIcon)>
66
+ </ForwardRef(BurgerIcon)>
67
+ `;
68
+
69
+ exports[`renders the BurgerIcon prop hidden="s" 1`] = `
70
+ <ForwardRef(BurgerIcon)
71
+ hidden="s"
72
+ >
73
+ <ForwardRef(SvgIcon)
74
+ className="govgr-burger-icon--hidden-s govgr-burger-icon"
75
+ >
76
+ <svg
77
+ aria-hidden="true"
78
+ className="govgr-burger-icon--hidden-s govgr-burger-icon govgr-svg-icon"
79
+ focusable="false"
80
+ viewBox="0 0 24 24"
81
+ >
82
+ <rect
83
+ height="3.3"
84
+ id="govgr-burger-icon__line-1"
85
+ width="20"
86
+ />
87
+ <rect
88
+ height="3.3"
89
+ id="govgr-burger-icon__line-2"
90
+ width="20"
91
+ />
92
+ <rect
93
+ height="3.3"
94
+ id="govgr-burger-icon__line-3"
95
+ width="20"
96
+ />
97
+ </svg>
98
+ </ForwardRef(SvgIcon)>
99
+ </ForwardRef(BurgerIcon)>
100
+ `;
101
+
102
+ exports[`renders the BurgerIcon prop variant= "error" 1`] = `
103
+ <ForwardRef(BurgerIcon)
104
+ variant="error"
105
+ >
106
+ <ForwardRef(SvgIcon)
107
+ className="govgr-burger-icon"
108
+ variant="error"
109
+ >
110
+ <svg
111
+ aria-hidden="true"
112
+ className="govgr-svg-icon--error govgr-burger-icon govgr-svg-icon"
113
+ focusable="false"
114
+ viewBox="0 0 24 24"
115
+ >
116
+ <rect
117
+ height="3.3"
118
+ id="govgr-burger-icon__line-1"
119
+ width="20"
120
+ />
121
+ <rect
122
+ height="3.3"
123
+ id="govgr-burger-icon__line-2"
124
+ width="20"
125
+ />
126
+ <rect
127
+ height="3.3"
128
+ id="govgr-burger-icon__line-3"
129
+ width="20"
130
+ />
131
+ </svg>
132
+ </ForwardRef(SvgIcon)>
133
+ </ForwardRef(BurgerIcon)>
134
+ `;
135
+
136
+ exports[`renders the BurgerIcon prop variant= "light" 1`] = `
137
+ <ForwardRef(BurgerIcon)
138
+ variant="light"
139
+ >
140
+ <ForwardRef(SvgIcon)
141
+ className="govgr-burger-icon"
142
+ variant="light"
143
+ >
144
+ <svg
145
+ aria-hidden="true"
146
+ className="govgr-svg-icon--light govgr-burger-icon govgr-svg-icon"
147
+ focusable="false"
148
+ viewBox="0 0 24 24"
149
+ >
150
+ <rect
151
+ height="3.3"
152
+ id="govgr-burger-icon__line-1"
153
+ width="20"
154
+ />
155
+ <rect
156
+ height="3.3"
157
+ id="govgr-burger-icon__line-2"
158
+ width="20"
159
+ />
160
+ <rect
161
+ height="3.3"
162
+ id="govgr-burger-icon__line-3"
163
+ width="20"
164
+ />
165
+ </svg>
166
+ </ForwardRef(SvgIcon)>
167
+ </ForwardRef(BurgerIcon)>
168
+ `;
169
+
170
+ exports[`renders the BurgerIcon props active hidden="no" variant= "light" 1`] = `
24
171
  <ForwardRef(BurgerIcon)
25
172
  active={true}
173
+ variant="light"
26
174
  >
27
- <div
28
- className="govgr-burger-menu--active govgr-burger-menu govgr-burger-menu--white-bg"
175
+ <ForwardRef(SvgIcon)
176
+ className="govgr-burger-icon--active govgr-burger-icon"
177
+ variant="light"
29
178
  >
30
- <div
31
- className="govgr-burger-menu__line1"
32
- />
33
- <div
34
- className="govgr-burger-menu__line2"
35
- />
36
- <div
37
- className="govgr-burger-menu__line3"
38
- />
39
- </div>
179
+ <svg
180
+ aria-hidden="true"
181
+ className="govgr-svg-icon--light govgr-burger-icon--active govgr-burger-icon govgr-svg-icon"
182
+ focusable="false"
183
+ viewBox="0 0 24 24"
184
+ >
185
+ <rect
186
+ height="3.3"
187
+ id="govgr-burger-icon__line-1"
188
+ width="20"
189
+ />
190
+ <rect
191
+ height="3.3"
192
+ id="govgr-burger-icon__line-2"
193
+ width="20"
194
+ />
195
+ <rect
196
+ height="3.3"
197
+ id="govgr-burger-icon__line-3"
198
+ width="20"
199
+ />
200
+ </svg>
201
+ </ForwardRef(SvgIcon)>
40
202
  </ForwardRef(BurgerIcon)>
41
203
  `;
42
204
 
43
205
  exports[`renders the BurgerIcon with no props 1`] = `
44
206
  <ForwardRef(BurgerIcon)>
45
- <div
46
- className="govgr-burger-menu govgr-burger-menu--white-bg"
47
- >
48
- <div
49
- className="govgr-burger-menu__line1"
50
- />
51
- <div
52
- className="govgr-burger-menu__line2"
53
- />
54
- <div
55
- className="govgr-burger-menu__line3"
56
- />
57
- </div>
207
+ <ForwardRef(SvgIcon)
208
+ className="govgr-burger-icon"
209
+ >
210
+ <svg
211
+ aria-hidden="true"
212
+ className="govgr-burger-icon govgr-svg-icon"
213
+ focusable="false"
214
+ viewBox="0 0 24 24"
215
+ >
216
+ <rect
217
+ height="3.3"
218
+ id="govgr-burger-icon__line-1"
219
+ width="20"
220
+ />
221
+ <rect
222
+ height="3.3"
223
+ id="govgr-burger-icon__line-2"
224
+ width="20"
225
+ />
226
+ <rect
227
+ height="3.3"
228
+ id="govgr-burger-icon__line-3"
229
+ width="20"
230
+ />
231
+ </svg>
232
+ </ForwardRef(SvgIcon)>
233
+ </ForwardRef(BurgerIcon)>
234
+ `;
235
+
236
+ exports[`renders the BurgerIcon with prop active=true 1`] = `
237
+ <ForwardRef(BurgerIcon)
238
+ active={true}
239
+ >
240
+ <ForwardRef(SvgIcon)
241
+ className="govgr-burger-icon--active govgr-burger-icon"
242
+ >
243
+ <svg
244
+ aria-hidden="true"
245
+ className="govgr-burger-icon--active govgr-burger-icon govgr-svg-icon"
246
+ focusable="false"
247
+ viewBox="0 0 24 24"
248
+ >
249
+ <rect
250
+ height="3.3"
251
+ id="govgr-burger-icon__line-1"
252
+ width="20"
253
+ />
254
+ <rect
255
+ height="3.3"
256
+ id="govgr-burger-icon__line-2"
257
+ width="20"
258
+ />
259
+ <rect
260
+ height="3.3"
261
+ id="govgr-burger-icon__line-3"
262
+ width="20"
263
+ />
264
+ </svg>
265
+ </ForwardRef(SvgIcon)>
266
+ </ForwardRef(BurgerIcon)>
267
+ `;
268
+
269
+ exports[`renders the BurgerIcon with prop variant=dark 1`] = `
270
+ <ForwardRef(BurgerIcon)
271
+ variant="dark"
272
+ >
273
+ <ForwardRef(SvgIcon)
274
+ className="govgr-burger-icon"
275
+ variant="dark"
276
+ >
277
+ <svg
278
+ aria-hidden="true"
279
+ className="govgr-svg-icon--dark govgr-burger-icon govgr-svg-icon"
280
+ focusable="false"
281
+ viewBox="0 0 24 24"
282
+ >
283
+ <rect
284
+ height="3.3"
285
+ id="govgr-burger-icon__line-1"
286
+ width="20"
287
+ />
288
+ <rect
289
+ height="3.3"
290
+ id="govgr-burger-icon__line-2"
291
+ width="20"
292
+ />
293
+ <rect
294
+ height="3.3"
295
+ id="govgr-burger-icon__line-3"
296
+ width="20"
297
+ />
298
+ </svg>
299
+ </ForwardRef(SvgIcon)>
300
+ </ForwardRef(BurgerIcon)>
301
+ `;
302
+
303
+ exports[`renders the BurgerIcon with props active hidden="s" and variant="dark" 1`] = `
304
+ <ForwardRef(BurgerIcon)
305
+ active={true}
306
+ hidden="s"
307
+ variant="dark"
308
+ >
309
+ <ForwardRef(SvgIcon)
310
+ className="govgr-burger-icon--active govgr-burger-icon--hidden-s govgr-burger-icon"
311
+ variant="dark"
312
+ >
313
+ <svg
314
+ aria-hidden="true"
315
+ className="govgr-svg-icon--dark govgr-burger-icon--active govgr-burger-icon--hidden-s govgr-burger-icon govgr-svg-icon"
316
+ focusable="false"
317
+ viewBox="0 0 24 24"
318
+ >
319
+ <rect
320
+ height="3.3"
321
+ id="govgr-burger-icon__line-1"
322
+ width="20"
323
+ />
324
+ <rect
325
+ height="3.3"
326
+ id="govgr-burger-icon__line-2"
327
+ width="20"
328
+ />
329
+ <rect
330
+ height="3.3"
331
+ id="govgr-burger-icon__line-3"
332
+ width="20"
333
+ />
334
+ </svg>
335
+ </ForwardRef(SvgIcon)>
336
+ </ForwardRef(BurgerIcon)>
337
+ `;
338
+
339
+ exports[`renders the BurgerIcon with props hidden="l" and variant="success" 1`] = `
340
+ <ForwardRef(BurgerIcon)
341
+ hidden="l"
342
+ variant="success"
343
+ >
344
+ <ForwardRef(SvgIcon)
345
+ className="govgr-burger-icon--hidden-l govgr-burger-icon"
346
+ variant="success"
347
+ >
348
+ <svg
349
+ aria-hidden="true"
350
+ className="govgr-svg-icon--success govgr-burger-icon--hidden-l govgr-burger-icon govgr-svg-icon"
351
+ focusable="false"
352
+ viewBox="0 0 24 24"
353
+ >
354
+ <rect
355
+ height="3.3"
356
+ id="govgr-burger-icon__line-1"
357
+ width="20"
358
+ />
359
+ <rect
360
+ height="3.3"
361
+ id="govgr-burger-icon__line-2"
362
+ width="20"
363
+ />
364
+ <rect
365
+ height="3.3"
366
+ id="govgr-burger-icon__line-3"
367
+ width="20"
368
+ />
369
+ </svg>
370
+ </ForwardRef(SvgIcon)>
58
371
  </ForwardRef(BurgerIcon)>
59
372
  `;