@digigov/react-icons 1.0.0-rc.2 → 1.0.0-rc.4

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 (194) hide show
  1. package/AccessibilityIcon/config.js +7 -19
  2. package/AccessibilityIcon/index.js +6 -21
  3. package/AccessibilityIcon/index.test.js +21 -27
  4. package/AccessibilityIcon/package.json +6 -0
  5. package/ArrowIcon/config.d.ts +1 -1
  6. package/ArrowIcon/config.js +13 -25
  7. package/ArrowIcon/index.js +6 -21
  8. package/ArrowIcon/index.test.js +11 -17
  9. package/ArrowIcon/package.json +6 -0
  10. package/BurgerIcon/config.js +9 -22
  11. package/BurgerIcon/index.js +6 -21
  12. package/BurgerIcon/index.test.js +15 -21
  13. package/BurgerIcon/package.json +6 -0
  14. package/CaretIcon/config.js +8 -20
  15. package/CaretIcon/index.js +6 -21
  16. package/CaretIcon/index.test.js +11 -17
  17. package/CaretIcon/package.json +6 -0
  18. package/CheckIcon/config.js +5 -17
  19. package/CheckIcon/index.js +6 -21
  20. package/CheckIcon/index.test.js +19 -25
  21. package/CheckIcon/package.json +6 -0
  22. package/ChevronIcon/config.d.ts +14 -0
  23. package/{es/ArrowIcon → ChevronIcon}/config.js +3 -3
  24. package/ChevronIcon/index.d.ts +4 -0
  25. package/{es/ArrowIcon → ChevronIcon}/index.js +4 -4
  26. package/ChevronIcon/index.test.d.ts +1 -0
  27. package/ChevronIcon/index.test.js +33 -0
  28. package/ChevronIcon/package.json +6 -0
  29. package/CloseIcon/config.js +5 -17
  30. package/CloseIcon/index.js +6 -21
  31. package/CloseIcon/index.test.js +5 -11
  32. package/CloseIcon/package.json +6 -0
  33. package/GlobeIcon/config.js +5 -17
  34. package/GlobeIcon/index.js +6 -21
  35. package/GlobeIcon/index.test.js +11 -17
  36. package/GlobeIcon/package.json +6 -0
  37. package/Icon/index.d.ts +1 -1
  38. package/Icon/index.js +16 -40
  39. package/Icon/index.test.js +23 -29
  40. package/Icon/package.json +6 -0
  41. package/MoreVertIcon/config.js +7 -19
  42. package/MoreVertIcon/index.js +6 -21
  43. package/MoreVertIcon/index.test.js +21 -27
  44. package/MoreVertIcon/package.json +6 -0
  45. package/SearchIcon/config.js +5 -17
  46. package/SearchIcon/index.js +6 -21
  47. package/SearchIcon/index.test.js +5 -11
  48. package/SearchIcon/package.json +6 -0
  49. package/UncheckIcon/config.js +5 -17
  50. package/UncheckIcon/index.js +6 -21
  51. package/UncheckIcon/index.test.js +21 -27
  52. package/UncheckIcon/package.json +6 -0
  53. package/cjs/AccessibilityIcon/config.js +31 -0
  54. package/cjs/AccessibilityIcon/index.js +24 -0
  55. package/cjs/AccessibilityIcon/index.test.js +81 -0
  56. package/cjs/ArrowIcon/config.js +39 -0
  57. package/cjs/ArrowIcon/index.js +24 -0
  58. package/cjs/ArrowIcon/index.test.js +39 -0
  59. package/cjs/BurgerIcon/config.js +45 -0
  60. package/cjs/BurgerIcon/index.js +24 -0
  61. package/cjs/BurgerIcon/index.test.js +56 -0
  62. package/cjs/CaretIcon/config.js +39 -0
  63. package/cjs/CaretIcon/index.js +24 -0
  64. package/cjs/CaretIcon/index.test.js +39 -0
  65. package/cjs/CheckIcon/config.js +23 -0
  66. package/cjs/CheckIcon/index.js +24 -0
  67. package/cjs/CheckIcon/index.test.js +73 -0
  68. package/cjs/ChevronIcon/config.js +39 -0
  69. package/cjs/ChevronIcon/index.js +24 -0
  70. package/cjs/ChevronIcon/index.test.js +39 -0
  71. package/cjs/CloseIcon/config.js +23 -0
  72. package/cjs/CloseIcon/index.js +24 -0
  73. package/cjs/CloseIcon/index.test.js +15 -0
  74. package/{esm → cjs}/GlobeIcon/config.js +17 -5
  75. package/cjs/GlobeIcon/index.js +24 -0
  76. package/cjs/GlobeIcon/index.test.js +39 -0
  77. package/cjs/Icon/index.js +58 -0
  78. package/cjs/Icon/index.test.js +88 -0
  79. package/cjs/MoreVertIcon/config.js +37 -0
  80. package/cjs/MoreVertIcon/index.js +24 -0
  81. package/cjs/MoreVertIcon/index.test.js +81 -0
  82. package/cjs/SearchIcon/config.js +23 -0
  83. package/cjs/SearchIcon/index.js +24 -0
  84. package/cjs/SearchIcon/index.test.js +15 -0
  85. package/cjs/UncheckIcon/config.js +23 -0
  86. package/cjs/UncheckIcon/index.js +24 -0
  87. package/cjs/UncheckIcon/index.test.js +81 -0
  88. package/cjs/icons.js +148 -0
  89. package/cjs/index.js +148 -0
  90. package/cjs/registry.js +73 -0
  91. package/icons.d.ts +3 -0
  92. package/icons.js +12 -135
  93. package/index.d.ts +1 -0
  94. package/index.js +11 -135
  95. package/package.json +4 -4
  96. package/registry.d.ts +1 -0
  97. package/registry.js +17 -41
  98. package/src/ArrowIcon/config.tsx +6 -6
  99. package/src/ChevronIcon/config.tsx +37 -0
  100. package/src/ChevronIcon/index.test.tsx +20 -0
  101. package/src/ChevronIcon/index.tsx +8 -0
  102. package/src/Icon/index.tsx +2 -2
  103. package/src/icons.ts +3 -0
  104. package/src/index.ts +1 -0
  105. package/src/registry.js +2 -0
  106. package/es/AccessibilityIcon/config.js +0 -19
  107. package/es/AccessibilityIcon/index.js +0 -9
  108. package/es/AccessibilityIcon/index.test.js +0 -75
  109. package/es/ArrowIcon/index.test.js +0 -33
  110. package/es/BurgerIcon/config.js +0 -32
  111. package/es/BurgerIcon/index.js +0 -9
  112. package/es/BurgerIcon/index.test.js +0 -50
  113. package/es/CaretIcon/config.js +0 -27
  114. package/es/CaretIcon/index.js +0 -9
  115. package/es/CaretIcon/index.test.js +0 -33
  116. package/es/CheckIcon/config.js +0 -11
  117. package/es/CheckIcon/index.js +0 -9
  118. package/es/CheckIcon/index.test.js +0 -67
  119. package/es/CloseIcon/config.js +0 -11
  120. package/es/CloseIcon/index.js +0 -9
  121. package/es/CloseIcon/index.test.js +0 -9
  122. package/es/GlobeIcon/config.js +0 -11
  123. package/es/GlobeIcon/index.js +0 -9
  124. package/es/GlobeIcon/index.test.js +0 -33
  125. package/es/Icon/index.js +0 -34
  126. package/es/Icon/index.test.js +0 -82
  127. package/es/MoreVertIcon/config.js +0 -25
  128. package/es/MoreVertIcon/index.js +0 -9
  129. package/es/MoreVertIcon/index.test.js +0 -75
  130. package/es/SearchIcon/config.js +0 -11
  131. package/es/SearchIcon/index.js +0 -9
  132. package/es/SearchIcon/index.test.js +0 -9
  133. package/es/UncheckIcon/config.js +0 -11
  134. package/es/UncheckIcon/index.js +0 -9
  135. package/es/UncheckIcon/index.test.js +0 -75
  136. package/es/icons.js +0 -11
  137. package/es/index.js +0 -10
  138. package/es/registry.js +0 -44
  139. package/esm/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -408
  140. package/esm/AccessibilityIcon/config.js +0 -19
  141. package/esm/AccessibilityIcon/index.js +0 -9
  142. package/esm/AccessibilityIcon/index.test.js +0 -75
  143. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -148
  144. package/esm/ArrowIcon/config.js +0 -27
  145. package/esm/ArrowIcon/index.js +0 -9
  146. package/esm/ArrowIcon/index.test.js +0 -33
  147. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -320
  148. package/esm/BurgerIcon/config.js +0 -32
  149. package/esm/BurgerIcon/index.js +0 -9
  150. package/esm/BurgerIcon/index.test.js +0 -50
  151. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +0 -148
  152. package/esm/CaretIcon/config.js +0 -27
  153. package/esm/CaretIcon/index.js +0 -9
  154. package/esm/CaretIcon/index.test.js +0 -33
  155. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +0 -299
  156. package/esm/CheckIcon/config.js +0 -11
  157. package/esm/CheckIcon/index.js +0 -9
  158. package/esm/CheckIcon/index.test.js +0 -67
  159. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +0 -34
  160. package/esm/CloseIcon/config.js +0 -11
  161. package/esm/CloseIcon/index.js +0 -9
  162. package/esm/CloseIcon/index.test.js +0 -9
  163. package/esm/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -149
  164. package/esm/GlobeIcon/index.js +0 -9
  165. package/esm/GlobeIcon/index.test.js +0 -33
  166. package/esm/Icon/__snapshots__/index.test.tsx.snap +0 -343
  167. package/esm/Icon/index.js +0 -34
  168. package/esm/Icon/index.test.js +0 -82
  169. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -444
  170. package/esm/MoreVertIcon/config.js +0 -25
  171. package/esm/MoreVertIcon/index.js +0 -9
  172. package/esm/MoreVertIcon/index.test.js +0 -75
  173. package/esm/SearchIcon/__snapshots__/index.test.tsx.snap +0 -34
  174. package/esm/SearchIcon/config.js +0 -11
  175. package/esm/SearchIcon/index.js +0 -9
  176. package/esm/SearchIcon/index.test.js +0 -9
  177. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -336
  178. package/esm/UncheckIcon/config.js +0 -11
  179. package/esm/UncheckIcon/index.js +0 -9
  180. package/esm/UncheckIcon/index.test.js +0 -75
  181. package/esm/icons.js +0 -11
  182. package/esm/index.js +0 -10
  183. package/esm/registry.js +0 -44
  184. /package/{es → cjs}/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -0
  185. /package/{es → cjs}/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -0
  186. /package/{es → cjs}/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -0
  187. /package/{es → cjs}/CaretIcon/__snapshots__/index.test.tsx.snap +0 -0
  188. /package/{es → cjs}/CheckIcon/__snapshots__/index.test.tsx.snap +0 -0
  189. /package/{es → cjs}/CloseIcon/__snapshots__/index.test.tsx.snap +0 -0
  190. /package/{es → cjs}/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -0
  191. /package/{es → cjs}/Icon/__snapshots__/index.test.tsx.snap +0 -0
  192. /package/{es → cjs}/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -0
  193. /package/{es → cjs}/SearchIcon/__snapshots__/index.test.tsx.snap +0 -0
  194. /package/{es → cjs}/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -0
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@digigov/react-icons",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "@digigov react icons",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
7
- "main": "./index.js",
8
- "module": "./esm/index.js",
7
+ "main": "./cjs/index.js",
8
+ "module": "./index.js",
9
9
  "publishConfig": {
10
10
  "access": "public",
11
11
  "directory": "dist"
12
12
  },
13
13
  "peerDependencies": {
14
- "@digigov/css": "1.0.0-rc.2",
14
+ "@digigov/css": "1.0.0-rc.4",
15
15
  "clsx": "1.1.1",
16
16
  "react": "^16.8.0 || ^17.0.0",
17
17
  "react-dom": "^16.8.0 || ^17.0.0"
package/registry.d.ts CHANGED
@@ -4,6 +4,7 @@ declare var _default: {
4
4
  '@digigov/react-icons/BurgerIcon': {};
5
5
  '@digigov/react-icons/CaretIcon': {};
6
6
  '@digigov/react-icons/CheckIcon': {};
7
+ '@digigov/react-icons/ChevronIcon': {};
7
8
  '@digigov/react-icons/CloseIcon': {};
8
9
  '@digigov/react-icons/GlobeIcon': {};
9
10
  '@digigov/react-icons/Icon': {};
package/registry.js CHANGED
@@ -1,41 +1,17 @@
1
- "use strict";
2
-
3
- var _typeof = require("@babel/runtime/helpers/typeof");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _digigov_react_icons_AccessibilityIcon = _interopRequireWildcard(require("@digigov/react-icons/AccessibilityIcon"));
11
-
12
- var _digigov_react_icons_ArrowIcon = _interopRequireWildcard(require("@digigov/react-icons/ArrowIcon"));
13
-
14
- var _digigov_react_icons_BurgerIcon = _interopRequireWildcard(require("@digigov/react-icons/BurgerIcon"));
15
-
16
- var _digigov_react_icons_CaretIcon = _interopRequireWildcard(require("@digigov/react-icons/CaretIcon"));
17
-
18
- var _digigov_react_icons_CheckIcon = _interopRequireWildcard(require("@digigov/react-icons/CheckIcon"));
19
-
20
- var _digigov_react_icons_CloseIcon = _interopRequireWildcard(require("@digigov/react-icons/CloseIcon"));
21
-
22
- var _digigov_react_icons_GlobeIcon = _interopRequireWildcard(require("@digigov/react-icons/GlobeIcon"));
23
-
24
- var _digigov_react_icons_Icon = _interopRequireWildcard(require("@digigov/react-icons/Icon"));
25
-
26
- var _digigov_react_icons_icons = _interopRequireWildcard(require("@digigov/react-icons/icons"));
27
-
28
- var _digigov_react_icons = _interopRequireWildcard(require("@digigov/react-icons"));
29
-
30
- var _digigov_react_icons_MoreVertIcon = _interopRequireWildcard(require("@digigov/react-icons/MoreVertIcon"));
31
-
32
- var _digigov_react_icons_SearchIcon = _interopRequireWildcard(require("@digigov/react-icons/SearchIcon"));
33
-
34
- var _digigov_react_icons_UncheckIcon = _interopRequireWildcard(require("@digigov/react-icons/UncheckIcon"));
35
-
36
- 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); }
37
-
38
- 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; }
1
+ import * as _digigov_react_icons_AccessibilityIcon from "./AccessibilityIcon";
2
+ import * as _digigov_react_icons_ArrowIcon from "./ArrowIcon";
3
+ import * as _digigov_react_icons_BurgerIcon from "./BurgerIcon";
4
+ import * as _digigov_react_icons_CaretIcon from "./CaretIcon";
5
+ import * as _digigov_react_icons_CheckIcon from "./CheckIcon";
6
+ import * as _digigov_react_icons_ChevronIcon from "./ChevronIcon";
7
+ import * as _digigov_react_icons_CloseIcon from "./CloseIcon";
8
+ import * as _digigov_react_icons_GlobeIcon from "./GlobeIcon";
9
+ import * as _digigov_react_icons_Icon from "./Icon";
10
+ import * as _digigov_react_icons_icons from "./icons";
11
+ import * as _digigov_react_icons from "./";
12
+ import * as _digigov_react_icons_MoreVertIcon from "./MoreVertIcon";
13
+ import * as _digigov_react_icons_SearchIcon from "./SearchIcon";
14
+ import * as _digigov_react_icons_UncheckIcon from "./UncheckIcon";
39
15
 
40
16
  function lazyImport(pkgImport) {
41
17
  // eslint-disable-next-line no-undef
@@ -52,12 +28,13 @@ function lazyImport(pkgImport) {
52
28
  });
53
29
  }
54
30
 
55
- var _default = {
31
+ export default {
56
32
  '@digigov/react-icons/AccessibilityIcon': lazyImport(_digigov_react_icons_AccessibilityIcon),
57
33
  '@digigov/react-icons/ArrowIcon': lazyImport(_digigov_react_icons_ArrowIcon),
58
34
  '@digigov/react-icons/BurgerIcon': lazyImport(_digigov_react_icons_BurgerIcon),
59
35
  '@digigov/react-icons/CaretIcon': lazyImport(_digigov_react_icons_CaretIcon),
60
36
  '@digigov/react-icons/CheckIcon': lazyImport(_digigov_react_icons_CheckIcon),
37
+ '@digigov/react-icons/ChevronIcon': lazyImport(_digigov_react_icons_ChevronIcon),
61
38
  '@digigov/react-icons/CloseIcon': lazyImport(_digigov_react_icons_CloseIcon),
62
39
  '@digigov/react-icons/GlobeIcon': lazyImport(_digigov_react_icons_GlobeIcon),
63
40
  '@digigov/react-icons/Icon': lazyImport(_digigov_react_icons_Icon),
@@ -66,5 +43,4 @@ var _default = {
66
43
  '@digigov/react-icons/MoreVertIcon': lazyImport(_digigov_react_icons_MoreVertIcon),
67
44
  '@digigov/react-icons/SearchIcon': lazyImport(_digigov_react_icons_SearchIcon),
68
45
  '@digigov/react-icons/UncheckIcon': lazyImport(_digigov_react_icons_UncheckIcon)
69
- };
70
- exports["default"] = _default;
46
+ };
@@ -6,25 +6,25 @@ export interface ArrowType {
6
6
  * @value 'right'
7
7
  * @value 'up'
8
8
  * @value 'down'
9
- * @default 'right'
9
+ * @default 'up'
10
10
  */
11
11
  direction?: 'left' | 'right' | 'up' | 'down'
12
12
  }
13
13
 
14
- export const arrow: React.FC<ArrowType> = ({ direction = 'right' }) => {
14
+ export const arrow: React.FC<ArrowType> = ({ direction = 'up' }) => {
15
15
  return (
16
16
  <>
17
17
  {direction === 'left' && (
18
- <path d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z" />
18
+ <polygon points="14.4 19.7 8.48 13.7 21.93 13.7 22 10.37 8.48 10.32 14.4 4.4 12 2 2 12 12 22 14.4 19.7" />
19
19
  )}
20
20
  {direction === 'right' && (
21
- <path d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z" />
21
+ <polygon points="9.6 4.3 15.52 10.3 2.07 10.3 2 13.63 15.52 13.68 9.6 19.6 12 22 22 12 12 2 9.6 4.3" />
22
22
  )}
23
23
  {direction === 'up' && (
24
- <path d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z" />
24
+ <polygon points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12" />
25
25
  )}
26
26
  {direction === 'down' && (
27
- <path d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z" />
27
+ <polygon points="19.7 9.6 13.7 15.52 13.7 2.07 10.37 2 10.32 15.52 4.4 9.6 2 12 12 22 22 12 19.7 9.6" />
28
28
  )}
29
29
  </>
30
30
  );
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+
3
+ export interface ChevronType {
4
+ /**
5
+ * direction sets the direction of the chevron icon.
6
+ * @value 'left'
7
+ * @value 'right'
8
+ * @value 'up'
9
+ * @value 'down'
10
+ * @default 'right'
11
+ */
12
+ direction?: 'left' | 'right' | 'up' | 'down'
13
+ }
14
+
15
+ export const chevron: React.FC<ChevronType> = ({ direction = 'right' }) => {
16
+ return (
17
+ <>
18
+ {direction === 'left' && (
19
+ <path d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z" />
20
+ )}
21
+ {direction === 'right' && (
22
+ <path d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z" />
23
+ )}
24
+ {direction === 'up' && (
25
+ <path d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z" />
26
+ )}
27
+ {direction === 'down' && (
28
+ <path d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z" />
29
+ )}
30
+ </>
31
+ );
32
+ };
33
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
34
+ // @ts-ignore
35
+ chevron.props = ['direction'];
36
+
37
+ export default chevron;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { mount } from 'enzyme';
3
+
4
+ import ChevronIcon from '@digigov/react-icons/ChevronIcon';
5
+
6
+ it('renders the ChevronIcon with no props, direction prop is right by default', () => {
7
+ expect(mount(<ChevronIcon />)).toMatchSnapshot();
8
+ });
9
+
10
+ it('renders the ChevronIcon with direction left prop', () => {
11
+ expect(mount(<ChevronIcon direction="left" />)).toMatchSnapshot();
12
+ });
13
+
14
+ it('renders the ChevronIcon with direction up prop', () => {
15
+ expect(mount(<ChevronIcon direction="up" />)).toMatchSnapshot();
16
+ });
17
+
18
+ it('renders the ChevronIcon with direction down prop', () => {
19
+ expect(mount(<ChevronIcon direction="down" />)).toMatchSnapshot();
20
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import Icon, { IconProps } from '@digigov/react-icons/Icon';
3
+
4
+ export const ChevronIcon: React.FC<IconProps<'chevron'>> = (props) => {
5
+ return <Icon {...props} icon="chevron"></Icon>;
6
+ };
7
+
8
+ export default ChevronIcon;
@@ -14,7 +14,7 @@ export type IconProps<N extends keyof IconTypes> = SvgIconProps &
14
14
  ref?: React.Ref<SVGSVGElement>;
15
15
  /**
16
16
  * icon is optional, but strongly recommended.
17
- * Default value is 'arrow'.
17
+ * Default value is 'chevron'.
18
18
  * Use this prop to display the icon you want.
19
19
  */
20
20
  icon?: N;
@@ -32,7 +32,7 @@ export const Icon: IconComponent = React.forwardRef<
32
32
  SVGSVGElement,
33
33
  IconProps<IconNames>
34
34
  >(function Icon(
35
- { icon = 'arrow', className, ...props }: IconProps<IconNames>,
35
+ { icon = 'chevron', className, ...props }: IconProps<IconNames>,
36
36
  ref
37
37
  ) {
38
38
  const IconComponent = icons[icon];
package/src/icons.ts CHANGED
@@ -3,6 +3,7 @@ import type { ArrowType } from '@digigov/react-icons/ArrowIcon/config';
3
3
  import type { BurgerType } from '@digigov/react-icons/BurgerIcon/config';
4
4
  import type { CaretType } from '@digigov/react-icons/CaretIcon/config';
5
5
  import type { CheckType } from '@digigov/react-icons/CheckIcon/config';
6
+ import type { ChevronType } from '@digigov/react-icons/ChevronIcon/config';
6
7
  import type { CloseType } from '@digigov/react-icons/CloseIcon/config';
7
8
  import type { GlobeType } from '@digigov/react-icons/GlobeIcon/config';
8
9
  import type { MoreVertType } from '@digigov/react-icons/MoreVertIcon/config';
@@ -13,6 +14,7 @@ export * from '@digigov/react-icons/AccessibilityIcon/config';
13
14
  export * from '@digigov/react-icons/ArrowIcon/config';
14
15
  export * from '@digigov/react-icons/BurgerIcon/config';
15
16
  export * from '@digigov/react-icons/CaretIcon/config';
17
+ export * from '@digigov/react-icons/ChevronIcon/config';
16
18
  export * from '@digigov/react-icons/CloseIcon/config';
17
19
  export * from '@digigov/react-icons/CheckIcon/config';
18
20
  export * from '@digigov/react-icons/GlobeIcon/config';
@@ -31,4 +33,5 @@ export interface IconTypes {
31
33
  moreVert: MoreVertType;
32
34
  uncheck: UncheckType;
33
35
  search: SearchType;
36
+ chevron: ChevronType;
34
37
  }
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ export * from '@digigov/react-icons/ArrowIcon';
3
3
  export * from '@digigov/react-icons/BurgerIcon';
4
4
  export * from '@digigov/react-icons/CaretIcon';
5
5
  export * from '@digigov/react-icons/CheckIcon';
6
+ export * from '@digigov/react-icons/ChevronIcon';
6
7
  export * from '@digigov/react-icons/UncheckIcon';
7
8
  export * from '@digigov/react-icons/CloseIcon';
8
9
  export * from '@digigov/react-icons/GlobeIcon';
package/src/registry.js CHANGED
@@ -4,6 +4,7 @@ import * as _digigov_react_icons_ArrowIcon from '@digigov/react-icons/ArrowIcon'
4
4
  import * as _digigov_react_icons_BurgerIcon from '@digigov/react-icons/BurgerIcon';
5
5
  import * as _digigov_react_icons_CaretIcon from '@digigov/react-icons/CaretIcon';
6
6
  import * as _digigov_react_icons_CheckIcon from '@digigov/react-icons/CheckIcon';
7
+ import * as _digigov_react_icons_ChevronIcon from '@digigov/react-icons/ChevronIcon';
7
8
  import * as _digigov_react_icons_CloseIcon from '@digigov/react-icons/CloseIcon';
8
9
  import * as _digigov_react_icons_GlobeIcon from '@digigov/react-icons/GlobeIcon';
9
10
  import * as _digigov_react_icons_Icon from '@digigov/react-icons/Icon';
@@ -37,6 +38,7 @@ export default {
37
38
  '@digigov/react-icons/BurgerIcon': lazyImport(_digigov_react_icons_BurgerIcon),
38
39
  '@digigov/react-icons/CaretIcon': lazyImport(_digigov_react_icons_CaretIcon),
39
40
  '@digigov/react-icons/CheckIcon': lazyImport(_digigov_react_icons_CheckIcon),
41
+ '@digigov/react-icons/ChevronIcon': lazyImport(_digigov_react_icons_ChevronIcon),
40
42
  '@digigov/react-icons/CloseIcon': lazyImport(_digigov_react_icons_CloseIcon),
41
43
  '@digigov/react-icons/GlobeIcon': lazyImport(_digigov_react_icons_GlobeIcon),
42
44
  '@digigov/react-icons/Icon': lazyImport(_digigov_react_icons_Icon),
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
-
3
- var _ref = /*#__PURE__*/React.createElement("title", null, "\u039C\u03B5\u03BD\u03BF\u03CD \u03A0\u03C1\u03BF\u03C3\u03B2\u03B1\u03C3\u03B9\u03BC\u03CC\u03C4\u03B7\u03C4\u03B1\u03C2");
4
-
5
- var _ref2 = /*#__PURE__*/React.createElement("circle", {
6
- cx: "12",
7
- cy: "3",
8
- r: "3"
9
- });
10
-
11
- var _ref3 = /*#__PURE__*/React.createElement("path", {
12
- d: "M19.76,6.13c-4.94,2.01-10.57,2.01-15.51,0c-0.71-0.3-1.55-0.04-1.98,0.66c-1.41,2.6,3.27,3.76,4.94,4.37 c0.4,0.11,0.81,0.2,1.22,0.28c0.56,0.11,0.92,0.67,0.79,1.25c-0.79,3.66-1.96,9.1-1.96,9.1c-0.46,2.27,2.72,3.15,3.39,0.92L12,17.93 l1.36,4.78c0.67,2.22,3.85,1.36,3.39-0.92c0,0-1.16-5.4-1.95-9.06c-0.12-0.57,0.22-1.16,0.77-1.27c2.01-0.41,3.94-1.17,5.68-2.31 C22.89,8.04,21.58,5.38,19.76,6.13z"
13
- });
14
-
15
- export function accessibility() {
16
- return /*#__PURE__*/React.createElement(React.Fragment, null, _ref, _ref2, _ref3);
17
- }
18
- accessibility.props = [];
19
- export default accessibility;
@@ -1,9 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@digigov/react-icons/Icon';
4
- export var AccessibilityIcon = function AccessibilityIcon(props) {
5
- return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
6
- icon: "accessibility"
7
- }));
8
- };
9
- export default AccessibilityIcon;
@@ -1,75 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import AccessibilityIcon from '@digigov/react-icons/AccessibilityIcon';
4
-
5
- var _ref = /*#__PURE__*/React.createElement(AccessibilityIcon, null);
6
-
7
- it('renders the AccessibilityIcon with no props', function () {
8
- expect(mount(_ref)).toMatchSnapshot();
9
- });
10
-
11
- var _ref2 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
12
- size: "sm"
13
- });
14
-
15
- it('renders the AccessibilityIcon with prop size=s', function () {
16
- expect(mount(_ref2)).toMatchSnapshot();
17
- });
18
-
19
- var _ref3 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
20
- size: "lg"
21
- });
22
-
23
- it('renders the AccessibilityIcon with prop size=l', function () {
24
- expect(mount(_ref3)).toMatchSnapshot();
25
- });
26
-
27
- var _ref4 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
28
- variant: "dark"
29
- });
30
-
31
- it('renders the AccessibilityIcon with prop variant=dark', function () {
32
- expect(mount(_ref4)).toMatchSnapshot();
33
- });
34
-
35
- var _ref5 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
36
- variant: "primary"
37
- });
38
-
39
- it('renders the AccessibilityIcon with prop variant=primary', function () {
40
- expect(mount(_ref5)).toMatchSnapshot();
41
- });
42
-
43
- var _ref6 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
44
- variant: "success"
45
- });
46
-
47
- it('renders the AccessibilityIcon with prop variant=success', function () {
48
- expect(mount(_ref6)).toMatchSnapshot();
49
- });
50
-
51
- var _ref7 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
52
- variant: "error"
53
- });
54
-
55
- it('renders the AccessibilityIcon with prop variant=error', function () {
56
- expect(mount(_ref7)).toMatchSnapshot();
57
- });
58
-
59
- var _ref8 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
60
- variant: "warning",
61
- size: "sm"
62
- });
63
-
64
- it('renders the AccessibilityIcon with prop variant=warning and size=s', function () {
65
- expect(mount(_ref8)).toMatchSnapshot();
66
- });
67
-
68
- var _ref9 = /*#__PURE__*/React.createElement(AccessibilityIcon, {
69
- variant: "warning",
70
- size: "xl"
71
- });
72
-
73
- it('renders the AccessibilityIcon with prop variant=error and size= xl', function () {
74
- expect(mount(_ref9)).toMatchSnapshot();
75
- });
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import ArrowIcon from '@digigov/react-icons/ArrowIcon';
4
-
5
- var _ref = /*#__PURE__*/React.createElement(ArrowIcon, null);
6
-
7
- it('renders the ArrowIcon with no props, direction prop is right by default', function () {
8
- expect(mount(_ref)).toMatchSnapshot();
9
- });
10
-
11
- var _ref2 = /*#__PURE__*/React.createElement(ArrowIcon, {
12
- direction: "left"
13
- });
14
-
15
- it('renders the ArrowIcon with direction left prop', function () {
16
- expect(mount(_ref2)).toMatchSnapshot();
17
- });
18
-
19
- var _ref3 = /*#__PURE__*/React.createElement(ArrowIcon, {
20
- direction: "up"
21
- });
22
-
23
- it('renders the ArrowIcon with direction up prop', function () {
24
- expect(mount(_ref3)).toMatchSnapshot();
25
- });
26
-
27
- var _ref4 = /*#__PURE__*/React.createElement(ArrowIcon, {
28
- direction: "down"
29
- });
30
-
31
- it('renders the ArrowIcon with direction down prop', function () {
32
- expect(mount(_ref4)).toMatchSnapshot();
33
- });
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
-
4
- var _ref2 = /*#__PURE__*/React.createElement("rect", {
5
- id: "govgr-svg-icon--burger__line-1",
6
- width: "20",
7
- height: "3.3"
8
- });
9
-
10
- var _ref3 = /*#__PURE__*/React.createElement("rect", {
11
- id: "govgr-svg-icon--burger__line-2",
12
- width: "20",
13
- height: "3.3"
14
- });
15
-
16
- var _ref4 = /*#__PURE__*/React.createElement("rect", {
17
- id: "govgr-svg-icon--burger__line-3",
18
- width: "20",
19
- height: "3.3"
20
- });
21
-
22
- export var burger = function burger(_ref) {
23
- var _ref$active = _ref.active,
24
- active = _ref$active === void 0 ? false : _ref$active;
25
- return /*#__PURE__*/React.createElement("g", {
26
- className: clsx(active && "govgr-svg-icon--burger--active")
27
- }, _ref2, _ref3, _ref4);
28
- }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
29
- // @ts-ignore
30
-
31
- burger.props = ['active'];
32
- export default burger;
@@ -1,9 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@digigov/react-icons/Icon';
4
- export var BurgerIcon = function BurgerIcon(props) {
5
- return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
6
- icon: "burger"
7
- }));
8
- };
9
- export default BurgerIcon;
@@ -1,50 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import BurgerIcon from '@digigov/react-icons/BurgerIcon';
4
-
5
- var _ref = /*#__PURE__*/React.createElement(BurgerIcon, null);
6
-
7
- it('renders the BurgerIcon with no props', function () {
8
- expect(mount(_ref)).toMatchSnapshot();
9
- });
10
-
11
- var _ref2 = /*#__PURE__*/React.createElement(BurgerIcon, {
12
- active: true
13
- });
14
-
15
- it('renders the BurgerIcon with prop active=true', function () {
16
- expect(mount(_ref2)).toMatchSnapshot();
17
- });
18
-
19
- var _ref3 = /*#__PURE__*/React.createElement(BurgerIcon, {
20
- variant: "dark"
21
- });
22
-
23
- it('renders the BurgerIcon with prop variant=dark', function () {
24
- expect(mount(_ref3)).toMatchSnapshot();
25
- });
26
-
27
- var _ref4 = /*#__PURE__*/React.createElement(BurgerIcon, {
28
- variant: "light"
29
- });
30
-
31
- it('renders the BurgerIcon prop variant= "light"', function () {
32
- expect(mount(_ref4)).toMatchSnapshot();
33
- });
34
-
35
- var _ref5 = /*#__PURE__*/React.createElement(BurgerIcon, {
36
- variant: "error"
37
- });
38
-
39
- it('renders the BurgerIcon prop variant= "error"', function () {
40
- expect(mount(_ref5)).toMatchSnapshot();
41
- });
42
-
43
- var _ref6 = /*#__PURE__*/React.createElement(BurgerIcon, {
44
- active: true,
45
- variant: "light"
46
- });
47
-
48
- it('renders the BurgerIcon props active variant= "light"', function () {
49
- expect(mount(_ref6)).toMatchSnapshot();
50
- });
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
-
3
- var _ref2 = /*#__PURE__*/React.createElement("path", {
4
- d: "M18,22V2L6,12L18,22z"
5
- });
6
-
7
- var _ref3 = /*#__PURE__*/React.createElement("path", {
8
- d: "M6,2v20l12-10L6,2z"
9
- });
10
-
11
- var _ref4 = /*#__PURE__*/React.createElement("path", {
12
- d: "M2,18h20L12,6L2,18z"
13
- });
14
-
15
- var _ref5 = /*#__PURE__*/React.createElement("path", {
16
- d: "M22,6H2l10,12L22,6z"
17
- });
18
-
19
- export var caret = function caret(_ref) {
20
- var _ref$direction = _ref.direction,
21
- direction = _ref$direction === void 0 ? 'left' : _ref$direction;
22
- return /*#__PURE__*/React.createElement(React.Fragment, null, direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
23
- }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
24
- // @ts-ignore
25
-
26
- caret.props = ['direction'];
27
- export default caret;
@@ -1,9 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@digigov/react-icons/Icon';
4
- export var CaretIcon = function CaretIcon(props) {
5
- return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
6
- icon: "caret"
7
- }));
8
- };
9
- export default CaretIcon;
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import CaretIcon from '@digigov/react-icons/CaretIcon';
4
-
5
- var _ref = /*#__PURE__*/React.createElement(CaretIcon, null);
6
-
7
- it('renders the CaretIcon with no props, direction prop is left by default', function () {
8
- expect(mount(_ref)).toMatchSnapshot();
9
- });
10
-
11
- var _ref2 = /*#__PURE__*/React.createElement(CaretIcon, {
12
- direction: "right"
13
- });
14
-
15
- it('renders the CaretIcon with direction right prop', function () {
16
- expect(mount(_ref2)).toMatchSnapshot();
17
- });
18
-
19
- var _ref3 = /*#__PURE__*/React.createElement(CaretIcon, {
20
- direction: "up"
21
- });
22
-
23
- it('renders the CaretIcon with direction up prop', function () {
24
- expect(mount(_ref3)).toMatchSnapshot();
25
- });
26
-
27
- var _ref4 = /*#__PURE__*/React.createElement(CaretIcon, {
28
- direction: "down"
29
- });
30
-
31
- it('renders the CaretIcon with direction down prop', function () {
32
- expect(mount(_ref4)).toMatchSnapshot();
33
- });
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
-
3
- var _ref = /*#__PURE__*/React.createElement("polygon", {
4
- points: "9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
5
- });
6
-
7
- export function check() {
8
- return /*#__PURE__*/React.createElement(React.Fragment, null, _ref);
9
- }
10
- check.props = [];
11
- export default check;
@@ -1,9 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@digigov/react-icons/Icon';
4
- export var CheckIcon = function CheckIcon(props) {
5
- return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
6
- icon: "check"
7
- }));
8
- };
9
- export default CheckIcon;