@digigov/react-core 0.5.2 → 0.6.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 (123) hide show
  1. package/ArrowIcon/__snapshots__/index.test.tsx.snap +67 -0
  2. package/ArrowIcon/index.d.ts +15 -0
  3. package/ArrowIcon/index.js +73 -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 +146 -30
  9. package/BurgerIcon/index.d.ts +9 -3
  10. package/BurgerIcon/index.js +50 -11
  11. package/BurgerIcon/index.test.js +32 -6
  12. package/Button/index.d.ts +1 -1
  13. package/ButtonLink/index.d.ts +1 -1
  14. package/CHANGELOG.md +31 -1
  15. package/CallToAction/index.d.ts +1 -1
  16. package/CallToAction/index.js +3 -8
  17. package/CaretIcon/__snapshots__/index.test.tsx.snap +67 -0
  18. package/CaretIcon/index.d.ts +15 -0
  19. package/CaretIcon/index.js +73 -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 +256 -0
  23. package/CheckIcon/index.d.ts +19 -0
  24. package/CheckIcon/index.js +68 -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 +16 -0
  29. package/CloseIcon/index.d.ts +10 -0
  30. package/CloseIcon/index.js +42 -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/FileUpload/index.d.ts +1 -1
  37. package/FooterContainer/index.d.ts +8 -1
  38. package/FooterContainer/index.js +4 -2
  39. package/FooterImage/index.d.ts +1 -1
  40. package/FooterLink/index.d.ts +1 -1
  41. package/GovGRLogo/index.d.ts +1 -1
  42. package/Grid/index.d.ts +1 -1
  43. package/HeaderLogo/index.d.ts +1 -1
  44. package/HeaderSecondaryLogo/index.d.ts +1 -1
  45. package/HeaderTitle/index.d.ts +1 -1
  46. package/HellenicRepublicLogo/index.d.ts +1 -1
  47. package/Link/index.d.ts +1 -1
  48. package/MoreVertIcon/__snapshots__/index.test.tsx.snap +436 -0
  49. package/MoreVertIcon/index.d.ts +19 -0
  50. package/MoreVertIcon/index.js +82 -0
  51. package/MoreVertIcon/index.test.d.ts +1 -0
  52. package/MoreVertIcon/index.test.js +129 -0
  53. package/NavHorizontalListItem/index.d.ts +1 -1
  54. package/NavVerticalItem/index.d.ts +1 -1
  55. package/NormalText/index.d.ts +1 -1
  56. package/NotificationBannerLink/index.d.ts +1 -1
  57. package/Paragraph/index.d.ts +1 -1
  58. package/RadioItem/index.d.ts +1 -1
  59. package/Select/index.d.ts +1 -1
  60. package/Table/index.d.ts +1 -1
  61. package/TabsListItem/index.d.ts +1 -1
  62. package/TextArea/index.d.ts +1 -1
  63. package/TextInput/index.d.ts +1 -1
  64. package/UncheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  65. package/UncheckIcon/index.d.ts +19 -0
  66. package/UncheckIcon/index.js +68 -0
  67. package/UncheckIcon/index.test.d.ts +1 -0
  68. package/UncheckIcon/index.test.js +129 -0
  69. package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +67 -0
  70. package/es/ArrowIcon/index.js +50 -0
  71. package/es/ArrowIcon/index.test.js +33 -0
  72. package/es/BackLink/index.js +4 -3
  73. package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +146 -30
  74. package/es/BurgerIcon/index.js +42 -11
  75. package/es/BurgerIcon/index.test.js +32 -6
  76. package/es/CallToAction/index.js +2 -8
  77. package/es/CaretIcon/__snapshots__/index.test.tsx.snap +67 -0
  78. package/es/CaretIcon/index.js +50 -0
  79. package/es/CaretIcon/index.test.js +33 -0
  80. package/es/CheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  81. package/es/CheckIcon/index.js +45 -0
  82. package/es/CheckIcon/index.test.js +123 -0
  83. package/es/CloseIcon/__snapshots__/index.test.tsx.snap +16 -0
  84. package/es/CloseIcon/index.js +27 -0
  85. package/es/CloseIcon/index.test.js +9 -0
  86. package/es/DateInputItem/index.js +5 -5
  87. package/es/FooterContainer/index.js +4 -2
  88. package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +436 -0
  89. package/es/MoreVertIcon/index.js +59 -0
  90. package/es/MoreVertIcon/index.test.js +123 -0
  91. package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  92. package/es/UncheckIcon/index.js +45 -0
  93. package/es/UncheckIcon/index.test.js +123 -0
  94. package/es/index.js +6 -0
  95. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +67 -0
  96. package/esm/ArrowIcon/index.js +50 -0
  97. package/esm/ArrowIcon/index.test.js +33 -0
  98. package/esm/BackLink/index.js +4 -3
  99. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +146 -30
  100. package/esm/BurgerIcon/index.js +42 -11
  101. package/esm/BurgerIcon/index.test.js +32 -6
  102. package/esm/CallToAction/index.js +2 -8
  103. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +67 -0
  104. package/esm/CaretIcon/index.js +50 -0
  105. package/esm/CaretIcon/index.test.js +33 -0
  106. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  107. package/esm/CheckIcon/index.js +45 -0
  108. package/esm/CheckIcon/index.test.js +123 -0
  109. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +16 -0
  110. package/esm/CloseIcon/index.js +27 -0
  111. package/esm/CloseIcon/index.test.js +9 -0
  112. package/esm/DateInputItem/index.js +5 -5
  113. package/esm/FooterContainer/index.js +4 -2
  114. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +436 -0
  115. package/esm/MoreVertIcon/index.js +59 -0
  116. package/esm/MoreVertIcon/index.test.js +123 -0
  117. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  118. package/esm/UncheckIcon/index.js +45 -0
  119. package/esm/UncheckIcon/index.test.js +123 -0
  120. package/esm/index.js +7 -1
  121. package/index.d.ts +6 -0
  122. package/index.js +48 -0
  123. package/package.json +3 -3
@@ -0,0 +1,67 @@
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
+ <svg
8
+ aria-hidden="true"
9
+ className="govgr-arrow--down"
10
+ focusable="false"
11
+ viewBox="0 0 24 24"
12
+ >
13
+ <path
14
+ d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
15
+ />
16
+ </svg>
17
+ </ForwardRef(ArrowIcon)>
18
+ `;
19
+
20
+ exports[`renders the ArrowIcon with direction left prop 1`] = `
21
+ <ForwardRef(ArrowIcon)
22
+ direction="left"
23
+ >
24
+ <svg
25
+ aria-hidden="true"
26
+ className="govgr-arrow--left"
27
+ focusable="false"
28
+ viewBox="0 0 24 24"
29
+ >
30
+ <path
31
+ d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
32
+ />
33
+ </svg>
34
+ </ForwardRef(ArrowIcon)>
35
+ `;
36
+
37
+ exports[`renders the ArrowIcon with direction up prop 1`] = `
38
+ <ForwardRef(ArrowIcon)
39
+ direction="up"
40
+ >
41
+ <svg
42
+ aria-hidden="true"
43
+ className="govgr-arrow--up"
44
+ focusable="false"
45
+ viewBox="0 0 24 24"
46
+ >
47
+ <path
48
+ d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
49
+ />
50
+ </svg>
51
+ </ForwardRef(ArrowIcon)>
52
+ `;
53
+
54
+ exports[`renders the ArrowIcon with no props, direction prop is right by default 1`] = `
55
+ <ForwardRef(ArrowIcon)>
56
+ <svg
57
+ aria-hidden="true"
58
+ className="govgr-arrow--right"
59
+ focusable="false"
60
+ viewBox="0 0 24 24"
61
+ >
62
+ <path
63
+ d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
64
+ />
65
+ </svg>
66
+ </ForwardRef(ArrowIcon)>
67
+ `;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ declare type SVGElementAttributes = JSX.IntrinsicElements['svg'];
3
+ export interface ArrowIconProps extends SVGElementAttributes {
4
+ /**
5
+ * direction is optional.
6
+ * direction prop declares the direction of the svg icon.
7
+ */
8
+ direction?: 'up' | 'right' | 'down' | 'left';
9
+ }
10
+ /**
11
+ * ArrowIcon component is used to add arrow icon.
12
+ * ArrowIcon component can be used inside other components, for example CallToAction component.
13
+ */
14
+ export declare const ArrowIcon: React.ForwardRefExoticComponent<Pick<ArrowIconProps, "string" | "className" | "children" | "key" | "id" | "lang" | "style" | "tabIndex" | "role" | "color" | "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" | "clipPath" | "filter" | "mask" | "path" | "direction" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & React.RefAttributes<SVGSVGElement>>;
15
+ export default ArrowIcon;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports["default"] = exports.ArrowIcon = void 0;
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
+
16
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
+
18
+ var _react = _interopRequireWildcard(require("react"));
19
+
20
+ var _clsx = _interopRequireDefault(require("clsx"));
21
+
22
+ var _excluded = ["direction", "className"];
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ var _ref2 = /*#__PURE__*/_react["default"].createElement("path", {
29
+ d: "M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
30
+ });
31
+
32
+ var _ref3 = /*#__PURE__*/_react["default"].createElement("path", {
33
+ d: "M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
34
+ });
35
+
36
+ var _ref4 = /*#__PURE__*/_react["default"].createElement("path", {
37
+ d: "M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
38
+ });
39
+
40
+ var _ref5 = /*#__PURE__*/_react["default"].createElement("path", {
41
+ d: "M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
42
+ });
43
+
44
+ /**
45
+ * ArrowIcon component is used to add arrow icon.
46
+ * ArrowIcon component can be used inside other components, for example CallToAction component.
47
+ */
48
+ var ArrowIcon = /*#__PURE__*/_react["default"].forwardRef(function ArrowIcon(_ref, ref) {
49
+ var _ref$direction = _ref.direction,
50
+ direction = _ref$direction === void 0 ? 'right' : _ref$direction,
51
+ className = _ref.className,
52
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
53
+
54
+ var _useState = (0, _react.useState)(direction),
55
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
56
+ arrowDirection = _useState2[0],
57
+ setDirection = _useState2[1];
58
+
59
+ (0, _react.useEffect)(function () {
60
+ setDirection(direction);
61
+ }, [direction]);
62
+ return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
63
+ ref: ref,
64
+ className: (0, _clsx["default"])(arrowDirection === 'right' && 'govgr-arrow--right', arrowDirection === 'left' && 'govgr-arrow--left', arrowDirection === 'down' && 'govgr-arrow--down', arrowDirection === 'up' && 'govgr-arrow--up', className && className),
65
+ focusable: "false",
66
+ viewBox: "0 0 24 24",
67
+ "aria-hidden": "true"
68
+ }, props), arrowDirection === 'left' && _ref2, arrowDirection === 'right' && _ref3, arrowDirection === 'up' && _ref4, arrowDirection === 'down' && _ref5);
69
+ });
70
+
71
+ exports.ArrowIcon = ArrowIcon;
72
+ var _default = ArrowIcon;
73
+ 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,175 @@
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 variant= "light" 1`] = `
4
4
  <ForwardRef(BurgerIcon)
5
- active={false}
5
+ variant="light"
6
6
  >
7
- <div
8
- className="govgr-burger-menu govgr-burger-menu--white-bg"
7
+ <svg
8
+ aria-hidden="true"
9
+ className="govgr-svg-icon--light govgr-burger-icon"
10
+ focusable="false"
11
+ viewBox="0 0 24 24"
9
12
  >
10
- <div
11
- className="govgr-burger-menu__line1"
13
+ <rect
14
+ height="3.3"
15
+ id="govgr-burger-icon__line-1"
16
+ width="20"
12
17
  />
13
- <div
14
- className="govgr-burger-menu__line2"
18
+ <rect
19
+ height="3.3"
20
+ id="govgr-burger-icon__line-2"
21
+ width="20"
15
22
  />
16
- <div
17
- className="govgr-burger-menu__line3"
23
+ <rect
24
+ height="3.3"
25
+ id="govgr-burger-icon__line-3"
26
+ width="20"
18
27
  />
19
- </div>
28
+ </svg>
20
29
  </ForwardRef(BurgerIcon)>
21
30
  `;
22
31
 
23
- exports[`renders the BurgerIcon with active=true 1`] = `
32
+ exports[`renders the BurgerIcon props active hidden="md" variant= "light" 1`] = `
24
33
  <ForwardRef(BurgerIcon)
25
34
  active={true}
35
+ variant="light"
26
36
  >
27
- <div
28
- className="govgr-burger-menu--active govgr-burger-menu govgr-burger-menu--white-bg"
37
+ <svg
38
+ aria-hidden="true"
39
+ className="govgr-svg-icon--light govgr-burger-icon--active govgr-burger-icon"
40
+ focusable="false"
41
+ viewBox="0 0 24 24"
29
42
  >
30
- <div
31
- className="govgr-burger-menu__line1"
43
+ <rect
44
+ height="3.3"
45
+ id="govgr-burger-icon__line-1"
46
+ width="20"
32
47
  />
33
- <div
34
- className="govgr-burger-menu__line2"
48
+ <rect
49
+ height="3.3"
50
+ id="govgr-burger-icon__line-2"
51
+ width="20"
35
52
  />
36
- <div
37
- className="govgr-burger-menu__line3"
53
+ <rect
54
+ height="3.3"
55
+ id="govgr-burger-icon__line-3"
56
+ width="20"
38
57
  />
39
- </div>
58
+ </svg>
40
59
  </ForwardRef(BurgerIcon)>
41
60
  `;
42
61
 
43
62
  exports[`renders the BurgerIcon with no props 1`] = `
44
63
  <ForwardRef(BurgerIcon)>
45
- <div
46
- className="govgr-burger-menu govgr-burger-menu--white-bg"
64
+ <svg
65
+ aria-hidden="true"
66
+ className="govgr-burger-icon"
67
+ focusable="false"
68
+ viewBox="0 0 24 24"
47
69
  >
48
- <div
49
- className="govgr-burger-menu__line1"
70
+ <rect
71
+ height="3.3"
72
+ id="govgr-burger-icon__line-1"
73
+ width="20"
50
74
  />
51
- <div
52
- className="govgr-burger-menu__line2"
75
+ <rect
76
+ height="3.3"
77
+ id="govgr-burger-icon__line-2"
78
+ width="20"
53
79
  />
54
- <div
55
- className="govgr-burger-menu__line3"
80
+ <rect
81
+ height="3.3"
82
+ id="govgr-burger-icon__line-3"
83
+ width="20"
56
84
  />
57
- </div>
85
+ </svg>
86
+ </ForwardRef(BurgerIcon)>
87
+ `;
88
+
89
+ exports[`renders the BurgerIcon with prop active=true 1`] = `
90
+ <ForwardRef(BurgerIcon)
91
+ active={true}
92
+ >
93
+ <svg
94
+ aria-hidden="true"
95
+ className="govgr-burger-icon--active govgr-burger-icon"
96
+ focusable="false"
97
+ viewBox="0 0 24 24"
98
+ >
99
+ <rect
100
+ height="3.3"
101
+ id="govgr-burger-icon__line-1"
102
+ width="20"
103
+ />
104
+ <rect
105
+ height="3.3"
106
+ id="govgr-burger-icon__line-2"
107
+ width="20"
108
+ />
109
+ <rect
110
+ height="3.3"
111
+ id="govgr-burger-icon__line-3"
112
+ width="20"
113
+ />
114
+ </svg>
115
+ </ForwardRef(BurgerIcon)>
116
+ `;
117
+
118
+ exports[`renders the BurgerIcon with prop variant=dark 1`] = `
119
+ <ForwardRef(BurgerIcon)
120
+ variant="dark"
121
+ >
122
+ <svg
123
+ aria-hidden="true"
124
+ className="govgr-svg-icon--dark govgr-burger-icon"
125
+ focusable="false"
126
+ viewBox="0 0 24 24"
127
+ >
128
+ <rect
129
+ height="3.3"
130
+ id="govgr-burger-icon__line-1"
131
+ width="20"
132
+ />
133
+ <rect
134
+ height="3.3"
135
+ id="govgr-burger-icon__line-2"
136
+ width="20"
137
+ />
138
+ <rect
139
+ height="3.3"
140
+ id="govgr-burger-icon__line-3"
141
+ width="20"
142
+ />
143
+ </svg>
144
+ </ForwardRef(BurgerIcon)>
145
+ `;
146
+
147
+ exports[`renders the BurgerIcon with props active hidden=md and variant="dark" 1`] = `
148
+ <ForwardRef(BurgerIcon)
149
+ active={true}
150
+ variant="dark"
151
+ >
152
+ <svg
153
+ aria-hidden="true"
154
+ className="govgr-svg-icon--dark govgr-burger-icon--active govgr-burger-icon"
155
+ focusable="false"
156
+ viewBox="0 0 24 24"
157
+ >
158
+ <rect
159
+ height="3.3"
160
+ id="govgr-burger-icon__line-1"
161
+ width="20"
162
+ />
163
+ <rect
164
+ height="3.3"
165
+ id="govgr-burger-icon__line-2"
166
+ width="20"
167
+ />
168
+ <rect
169
+ height="3.3"
170
+ id="govgr-burger-icon__line-3"
171
+ width="20"
172
+ />
173
+ </svg>
58
174
  </ForwardRef(BurgerIcon)>
59
175
  `;
@@ -1,16 +1,22 @@
1
1
  import React from 'react';
2
- declare type DivElementAttributes = JSX.IntrinsicElements['div'];
3
- export interface BurgerIconProps extends DivElementAttributes {
2
+ declare type SVGElementAttributes = JSX.IntrinsicElements['svg'];
3
+ export interface BurgerIconProps extends SVGElementAttributes {
4
4
  /**
5
5
  * active is optional.
6
6
  * The default is 'false'.
7
7
  * This prop should be 'true' whenever the NavHorizontal is 'active', so whenever the user clicks at the burger menu.
8
8
  */
9
9
  active?: boolean;
10
+ /**
11
+ *
12
+ * `variant` property is optional.
13
+ * Variant property styles svg icon with color dark or light(white).
14
+ */
15
+ variant?: 'dark' | 'light';
10
16
  }
11
17
  /**
12
18
  * BurgerIcon is used inside the Header component.
13
19
  * It should be linked with the NavHorizontal component. It is hidden when the NavHorizontal is visible and vice versa.
14
20
  */
15
- export declare const BurgerIcon: React.ForwardRefExoticComponent<Pick<BurgerIconProps, "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" | "active"> & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const BurgerIcon: React.ForwardRefExoticComponent<Pick<BurgerIconProps, "string" | "className" | "children" | "key" | "id" | "lang" | "style" | "tabIndex" | "role" | "color" | "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" | "clipPath" | "filter" | "mask" | "path" | "direction" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "active" | "variant"> & React.RefAttributes<SVGSVGElement>>;
16
22
  export default BurgerIcon;
@@ -2,6 +2,8 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
5
7
  Object.defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
@@ -9,13 +11,37 @@ exports["default"] = exports.BurgerIcon = void 0;
9
11
 
10
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
13
 
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
+
12
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
17
 
14
- var _react = _interopRequireDefault(require("react"));
18
+ var _react = _interopRequireWildcard(require("react"));
15
19
 
16
20
  var _clsx = _interopRequireDefault(require("clsx"));
17
21
 
18
- var _excluded = ["active", "className"];
22
+ var _excluded = ["active", "className", "variant"];
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ var _ref2 = /*#__PURE__*/_react["default"].createElement("rect", {
29
+ id: "govgr-burger-icon__line-1",
30
+ width: "20",
31
+ height: "3.3"
32
+ });
33
+
34
+ var _ref3 = /*#__PURE__*/_react["default"].createElement("rect", {
35
+ id: "govgr-burger-icon__line-2",
36
+ width: "20",
37
+ height: "3.3"
38
+ });
39
+
40
+ var _ref4 = /*#__PURE__*/_react["default"].createElement("rect", {
41
+ id: "govgr-burger-icon__line-3",
42
+ width: "20",
43
+ height: "3.3"
44
+ });
19
45
 
20
46
  /**
21
47
  * BurgerIcon is used inside the Header component.
@@ -24,17 +50,30 @@ var _excluded = ["active", "className"];
24
50
  var BurgerIcon = /*#__PURE__*/_react["default"].forwardRef(function BurgerIcon(_ref, ref) {
25
51
  var active = _ref.active,
26
52
  className = _ref.className,
53
+ variant = _ref.variant,
27
54
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
28
- return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
55
+
56
+ var _useState = (0, _react.useState)(active),
57
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
58
+ iconActive = _useState2[0],
59
+ setActive = _useState2[1];
60
+
61
+ var _useState3 = (0, _react.useState)(variant),
62
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
63
+ iconVariant = _useState4[0],
64
+ setVariant = _useState4[1];
65
+
66
+ (0, _react.useEffect)(function () {
67
+ setActive(active);
68
+ setVariant(variant);
69
+ }, [active, variant]);
70
+ return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
29
71
  ref: ref,
30
- className: (0, _clsx["default"])(className, active === true && 'govgr-burger-menu--active', true && ['govgr-burger-menu', 'govgr-burger-menu--white-bg'])
31
- }, props), /*#__PURE__*/_react["default"].createElement("div", {
32
- className: (0, _clsx["default"])(true && 'govgr-burger-menu__line1')
33
- }), /*#__PURE__*/_react["default"].createElement("div", {
34
- className: (0, _clsx["default"])(true && 'govgr-burger-menu__line2')
35
- }), /*#__PURE__*/_react["default"].createElement("div", {
36
- className: (0, _clsx["default"])(true && 'govgr-burger-menu__line3')
37
- }));
72
+ className: (0, _clsx["default"])(iconVariant === 'light' && 'govgr-svg-icon--light', iconVariant === 'dark' && 'govgr-svg-icon--dark', iconActive === true && 'govgr-burger-icon--active', className && className, true && 'govgr-burger-icon'),
73
+ focusable: "false",
74
+ viewBox: "0 0 24 24",
75
+ "aria-hidden": "true"
76
+ }, props), _ref2, _ref3, _ref4);
38
77
  });
39
78
 
40
79
  exports.BurgerIcon = BurgerIcon;