@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.
- package/AccessibilityIcon/config.js +7 -19
- package/AccessibilityIcon/index.js +6 -21
- package/AccessibilityIcon/index.test.js +21 -27
- package/AccessibilityIcon/package.json +6 -0
- package/ArrowIcon/config.d.ts +1 -1
- package/ArrowIcon/config.js +13 -25
- package/ArrowIcon/index.js +6 -21
- package/ArrowIcon/index.test.js +11 -17
- package/ArrowIcon/package.json +6 -0
- package/BurgerIcon/config.js +9 -22
- package/BurgerIcon/index.js +6 -21
- package/BurgerIcon/index.test.js +15 -21
- package/BurgerIcon/package.json +6 -0
- package/CaretIcon/config.js +8 -20
- package/CaretIcon/index.js +6 -21
- package/CaretIcon/index.test.js +11 -17
- package/CaretIcon/package.json +6 -0
- package/CheckIcon/config.js +5 -17
- package/CheckIcon/index.js +6 -21
- package/CheckIcon/index.test.js +19 -25
- package/CheckIcon/package.json +6 -0
- package/ChevronIcon/config.d.ts +14 -0
- package/{es/ArrowIcon → ChevronIcon}/config.js +3 -3
- package/ChevronIcon/index.d.ts +4 -0
- package/{es/ArrowIcon → ChevronIcon}/index.js +4 -4
- package/ChevronIcon/index.test.d.ts +1 -0
- package/ChevronIcon/index.test.js +33 -0
- package/ChevronIcon/package.json +6 -0
- package/CloseIcon/config.js +5 -17
- package/CloseIcon/index.js +6 -21
- package/CloseIcon/index.test.js +5 -11
- package/CloseIcon/package.json +6 -0
- package/GlobeIcon/config.js +5 -17
- package/GlobeIcon/index.js +6 -21
- package/GlobeIcon/index.test.js +11 -17
- package/GlobeIcon/package.json +6 -0
- package/Icon/index.d.ts +1 -1
- package/Icon/index.js +16 -40
- package/Icon/index.test.js +23 -29
- package/Icon/package.json +6 -0
- package/MoreVertIcon/config.js +7 -19
- package/MoreVertIcon/index.js +6 -21
- package/MoreVertIcon/index.test.js +21 -27
- package/MoreVertIcon/package.json +6 -0
- package/SearchIcon/config.js +5 -17
- package/SearchIcon/index.js +6 -21
- package/SearchIcon/index.test.js +5 -11
- package/SearchIcon/package.json +6 -0
- package/UncheckIcon/config.js +5 -17
- package/UncheckIcon/index.js +6 -21
- package/UncheckIcon/index.test.js +21 -27
- package/UncheckIcon/package.json +6 -0
- package/cjs/AccessibilityIcon/config.js +31 -0
- package/cjs/AccessibilityIcon/index.js +24 -0
- package/cjs/AccessibilityIcon/index.test.js +81 -0
- package/cjs/ArrowIcon/config.js +39 -0
- package/cjs/ArrowIcon/index.js +24 -0
- package/cjs/ArrowIcon/index.test.js +39 -0
- package/cjs/BurgerIcon/config.js +45 -0
- package/cjs/BurgerIcon/index.js +24 -0
- package/cjs/BurgerIcon/index.test.js +56 -0
- package/cjs/CaretIcon/config.js +39 -0
- package/cjs/CaretIcon/index.js +24 -0
- package/cjs/CaretIcon/index.test.js +39 -0
- package/cjs/CheckIcon/config.js +23 -0
- package/cjs/CheckIcon/index.js +24 -0
- package/cjs/CheckIcon/index.test.js +73 -0
- package/cjs/ChevronIcon/config.js +39 -0
- package/cjs/ChevronIcon/index.js +24 -0
- package/cjs/ChevronIcon/index.test.js +39 -0
- package/cjs/CloseIcon/config.js +23 -0
- package/cjs/CloseIcon/index.js +24 -0
- package/cjs/CloseIcon/index.test.js +15 -0
- package/{esm → cjs}/GlobeIcon/config.js +17 -5
- package/cjs/GlobeIcon/index.js +24 -0
- package/cjs/GlobeIcon/index.test.js +39 -0
- package/cjs/Icon/index.js +58 -0
- package/cjs/Icon/index.test.js +88 -0
- package/cjs/MoreVertIcon/config.js +37 -0
- package/cjs/MoreVertIcon/index.js +24 -0
- package/cjs/MoreVertIcon/index.test.js +81 -0
- package/cjs/SearchIcon/config.js +23 -0
- package/cjs/SearchIcon/index.js +24 -0
- package/cjs/SearchIcon/index.test.js +15 -0
- package/cjs/UncheckIcon/config.js +23 -0
- package/cjs/UncheckIcon/index.js +24 -0
- package/cjs/UncheckIcon/index.test.js +81 -0
- package/cjs/icons.js +148 -0
- package/cjs/index.js +148 -0
- package/cjs/registry.js +73 -0
- package/icons.d.ts +3 -0
- package/icons.js +12 -135
- package/index.d.ts +1 -0
- package/index.js +11 -135
- package/package.json +4 -4
- package/registry.d.ts +1 -0
- package/registry.js +17 -41
- package/src/ArrowIcon/config.tsx +6 -6
- package/src/ChevronIcon/config.tsx +37 -0
- package/src/ChevronIcon/index.test.tsx +20 -0
- package/src/ChevronIcon/index.tsx +8 -0
- package/src/Icon/index.tsx +2 -2
- package/src/icons.ts +3 -0
- package/src/index.ts +1 -0
- package/src/registry.js +2 -0
- package/es/AccessibilityIcon/config.js +0 -19
- package/es/AccessibilityIcon/index.js +0 -9
- package/es/AccessibilityIcon/index.test.js +0 -75
- package/es/ArrowIcon/index.test.js +0 -33
- package/es/BurgerIcon/config.js +0 -32
- package/es/BurgerIcon/index.js +0 -9
- package/es/BurgerIcon/index.test.js +0 -50
- package/es/CaretIcon/config.js +0 -27
- package/es/CaretIcon/index.js +0 -9
- package/es/CaretIcon/index.test.js +0 -33
- package/es/CheckIcon/config.js +0 -11
- package/es/CheckIcon/index.js +0 -9
- package/es/CheckIcon/index.test.js +0 -67
- package/es/CloseIcon/config.js +0 -11
- package/es/CloseIcon/index.js +0 -9
- package/es/CloseIcon/index.test.js +0 -9
- package/es/GlobeIcon/config.js +0 -11
- package/es/GlobeIcon/index.js +0 -9
- package/es/GlobeIcon/index.test.js +0 -33
- package/es/Icon/index.js +0 -34
- package/es/Icon/index.test.js +0 -82
- package/es/MoreVertIcon/config.js +0 -25
- package/es/MoreVertIcon/index.js +0 -9
- package/es/MoreVertIcon/index.test.js +0 -75
- package/es/SearchIcon/config.js +0 -11
- package/es/SearchIcon/index.js +0 -9
- package/es/SearchIcon/index.test.js +0 -9
- package/es/UncheckIcon/config.js +0 -11
- package/es/UncheckIcon/index.js +0 -9
- package/es/UncheckIcon/index.test.js +0 -75
- package/es/icons.js +0 -11
- package/es/index.js +0 -10
- package/es/registry.js +0 -44
- package/esm/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -408
- package/esm/AccessibilityIcon/config.js +0 -19
- package/esm/AccessibilityIcon/index.js +0 -9
- package/esm/AccessibilityIcon/index.test.js +0 -75
- package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/esm/ArrowIcon/config.js +0 -27
- package/esm/ArrowIcon/index.js +0 -9
- package/esm/ArrowIcon/index.test.js +0 -33
- package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -320
- package/esm/BurgerIcon/config.js +0 -32
- package/esm/BurgerIcon/index.js +0 -9
- package/esm/BurgerIcon/index.test.js +0 -50
- package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/esm/CaretIcon/config.js +0 -27
- package/esm/CaretIcon/index.js +0 -9
- package/esm/CaretIcon/index.test.js +0 -33
- package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +0 -299
- package/esm/CheckIcon/config.js +0 -11
- package/esm/CheckIcon/index.js +0 -9
- package/esm/CheckIcon/index.test.js +0 -67
- package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +0 -34
- package/esm/CloseIcon/config.js +0 -11
- package/esm/CloseIcon/index.js +0 -9
- package/esm/CloseIcon/index.test.js +0 -9
- package/esm/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -149
- package/esm/GlobeIcon/index.js +0 -9
- package/esm/GlobeIcon/index.test.js +0 -33
- package/esm/Icon/__snapshots__/index.test.tsx.snap +0 -343
- package/esm/Icon/index.js +0 -34
- package/esm/Icon/index.test.js +0 -82
- package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -444
- package/esm/MoreVertIcon/config.js +0 -25
- package/esm/MoreVertIcon/index.js +0 -9
- package/esm/MoreVertIcon/index.test.js +0 -75
- package/esm/SearchIcon/__snapshots__/index.test.tsx.snap +0 -34
- package/esm/SearchIcon/config.js +0 -11
- package/esm/SearchIcon/index.js +0 -9
- package/esm/SearchIcon/index.test.js +0 -9
- package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -336
- package/esm/UncheckIcon/config.js +0 -11
- package/esm/UncheckIcon/index.js +0 -9
- package/esm/UncheckIcon/index.test.js +0 -75
- package/esm/icons.js +0 -11
- package/esm/index.js +0 -10
- package/esm/registry.js +0 -44
- /package/{es → cjs}/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/CaretIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/CheckIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/CloseIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/Icon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/SearchIcon/__snapshots__/index.test.tsx.snap +0 -0
- /package/{es → cjs}/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -0
package/CheckIcon/config.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.check = check;
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
|
-
var _ref = /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
3
|
+
var _ref = /*#__PURE__*/React.createElement("polygon", {
|
|
14
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"
|
|
15
5
|
});
|
|
16
6
|
|
|
17
|
-
function check() {
|
|
18
|
-
return /*#__PURE__*/
|
|
7
|
+
export function check() {
|
|
8
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _ref);
|
|
19
9
|
}
|
|
20
|
-
|
|
21
10
|
check.props = [];
|
|
22
|
-
|
|
23
|
-
exports["default"] = _default;
|
|
11
|
+
export default check;
|
package/CheckIcon/index.js
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.CheckIcon = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _Icon = _interopRequireDefault(require("@digigov/react-icons/Icon"));
|
|
15
|
-
|
|
16
|
-
var CheckIcon = function CheckIcon(props) {
|
|
17
|
-
return /*#__PURE__*/_react["default"].createElement(_Icon["default"], (0, _extends2["default"])({}, props, {
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from "../Icon";
|
|
4
|
+
export var CheckIcon = function CheckIcon(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
18
6
|
icon: "check"
|
|
19
7
|
}));
|
|
20
8
|
};
|
|
21
|
-
|
|
22
|
-
exports.CheckIcon = CheckIcon;
|
|
23
|
-
var _default = CheckIcon;
|
|
24
|
-
exports["default"] = _default;
|
|
9
|
+
export default CheckIcon;
|
package/CheckIcon/index.test.js
CHANGED
|
@@ -1,73 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import CheckIcon from "./";
|
|
2
4
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
|
-
var _enzyme = require("enzyme");
|
|
8
|
-
|
|
9
|
-
var _CheckIcon = _interopRequireDefault(require("@digigov/react-icons/CheckIcon"));
|
|
10
|
-
|
|
11
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], null);
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(CheckIcon, null);
|
|
12
6
|
|
|
13
7
|
it('renders the CheckIcon with no props', function () {
|
|
14
|
-
expect(
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
15
9
|
});
|
|
16
10
|
|
|
17
|
-
var _ref2 = /*#__PURE__*/
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
18
12
|
size: "md"
|
|
19
13
|
});
|
|
20
14
|
|
|
21
15
|
it('renders the CheckIcon with prop size=m', function () {
|
|
22
|
-
expect(
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
23
17
|
});
|
|
24
18
|
|
|
25
|
-
var _ref3 = /*#__PURE__*/
|
|
19
|
+
var _ref3 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
26
20
|
size: "xl"
|
|
27
21
|
});
|
|
28
22
|
|
|
29
23
|
it('renders the CheckIcon with prop size=xl', function () {
|
|
30
|
-
expect(
|
|
24
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
31
25
|
});
|
|
32
26
|
|
|
33
|
-
var _ref4 = /*#__PURE__*/
|
|
27
|
+
var _ref4 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
34
28
|
variant: "light"
|
|
35
29
|
});
|
|
36
30
|
|
|
37
31
|
it('renders the CheckIcon with prop variant=light', function () {
|
|
38
|
-
expect(
|
|
32
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
39
33
|
});
|
|
40
34
|
|
|
41
|
-
var _ref5 = /*#__PURE__*/
|
|
35
|
+
var _ref5 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
42
36
|
variant: "success"
|
|
43
37
|
});
|
|
44
38
|
|
|
45
39
|
it('renders the CheckIcon with prop variant=success', function () {
|
|
46
|
-
expect(
|
|
40
|
+
expect(mount(_ref5)).toMatchSnapshot();
|
|
47
41
|
});
|
|
48
42
|
|
|
49
|
-
var _ref6 = /*#__PURE__*/
|
|
43
|
+
var _ref6 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
50
44
|
variant: "warning"
|
|
51
45
|
});
|
|
52
46
|
|
|
53
47
|
it('renders the CheckIcon with prop variant=warning', function () {
|
|
54
|
-
expect(
|
|
48
|
+
expect(mount(_ref6)).toMatchSnapshot();
|
|
55
49
|
});
|
|
56
50
|
|
|
57
|
-
var _ref7 = /*#__PURE__*/
|
|
51
|
+
var _ref7 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
58
52
|
variant: "warning",
|
|
59
53
|
size: "sm"
|
|
60
54
|
});
|
|
61
55
|
|
|
62
56
|
it('renders the CheckIcon with prop variant=warning and size=s', function () {
|
|
63
|
-
expect(
|
|
57
|
+
expect(mount(_ref7)).toMatchSnapshot();
|
|
64
58
|
});
|
|
65
59
|
|
|
66
|
-
var _ref8 = /*#__PURE__*/
|
|
60
|
+
var _ref8 = /*#__PURE__*/React.createElement(CheckIcon, {
|
|
67
61
|
variant: "warning",
|
|
68
62
|
size: "xl"
|
|
69
63
|
});
|
|
70
64
|
|
|
71
65
|
it('renders the CheckIcon with prop variant=error and size= xl', function () {
|
|
72
|
-
expect(
|
|
66
|
+
expect(mount(_ref8)).toMatchSnapshot();
|
|
73
67
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChevronType {
|
|
3
|
+
/**
|
|
4
|
+
* direction sets the direction of the chevron icon.
|
|
5
|
+
* @value 'left'
|
|
6
|
+
* @value 'right'
|
|
7
|
+
* @value 'up'
|
|
8
|
+
* @value 'down'
|
|
9
|
+
* @default 'right'
|
|
10
|
+
*/
|
|
11
|
+
direction?: 'left' | 'right' | 'up' | 'down';
|
|
12
|
+
}
|
|
13
|
+
export declare const chevron: React.FC<ChevronType>;
|
|
14
|
+
export default chevron;
|
|
@@ -16,12 +16,12 @@ var _ref5 = /*#__PURE__*/React.createElement("path", {
|
|
|
16
16
|
d: "M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
export var
|
|
19
|
+
export var chevron = function chevron(_ref) {
|
|
20
20
|
var _ref$direction = _ref.direction,
|
|
21
21
|
direction = _ref$direction === void 0 ? 'right' : _ref$direction;
|
|
22
22
|
return /*#__PURE__*/React.createElement(React.Fragment, null, direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
23
23
|
}; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
export default
|
|
26
|
+
chevron.props = ['direction'];
|
|
27
|
+
export default chevron;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Icon from
|
|
4
|
-
export var
|
|
3
|
+
import Icon from "../Icon";
|
|
4
|
+
export var ChevronIcon = function ChevronIcon(props) {
|
|
5
5
|
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
6
|
-
icon: "
|
|
6
|
+
icon: "chevron"
|
|
7
7
|
}));
|
|
8
8
|
};
|
|
9
|
-
export default
|
|
9
|
+
export default ChevronIcon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import ChevronIcon from "./";
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(ChevronIcon, null);
|
|
6
|
+
|
|
7
|
+
it('renders the ChevronIcon with no props, direction prop is right by default', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(ChevronIcon, {
|
|
12
|
+
direction: "left"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('renders the ChevronIcon with direction left prop', function () {
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _ref3 = /*#__PURE__*/React.createElement(ChevronIcon, {
|
|
20
|
+
direction: "up"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('renders the ChevronIcon with direction up prop', function () {
|
|
24
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _ref4 = /*#__PURE__*/React.createElement(ChevronIcon, {
|
|
28
|
+
direction: "down"
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('renders the ChevronIcon with direction down prop', function () {
|
|
32
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
33
|
+
});
|
package/CloseIcon/config.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.close = close;
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
|
-
var _ref = /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
3
|
+
var _ref = /*#__PURE__*/React.createElement("polygon", {
|
|
14
4
|
points: "14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
|
|
15
5
|
});
|
|
16
6
|
|
|
17
|
-
function close() {
|
|
18
|
-
return /*#__PURE__*/
|
|
7
|
+
export function close() {
|
|
8
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _ref);
|
|
19
9
|
}
|
|
20
|
-
|
|
21
10
|
close.props = [];
|
|
22
|
-
|
|
23
|
-
exports["default"] = _default;
|
|
11
|
+
export default close;
|
package/CloseIcon/index.js
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.CloseIcon = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _Icon = _interopRequireDefault(require("@digigov/react-icons/Icon"));
|
|
15
|
-
|
|
16
|
-
var CloseIcon = function CloseIcon(props) {
|
|
17
|
-
return /*#__PURE__*/_react["default"].createElement(_Icon["default"], (0, _extends2["default"])({}, props, {
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from "../Icon";
|
|
4
|
+
export var CloseIcon = function CloseIcon(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
18
6
|
icon: "close"
|
|
19
7
|
}));
|
|
20
8
|
};
|
|
21
|
-
|
|
22
|
-
exports.CloseIcon = CloseIcon;
|
|
23
|
-
var _default = CloseIcon;
|
|
24
|
-
exports["default"] = _default;
|
|
9
|
+
export default CloseIcon;
|
package/CloseIcon/index.test.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import CloseIcon from "./";
|
|
2
4
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
|
-
var _enzyme = require("enzyme");
|
|
8
|
-
|
|
9
|
-
var _CloseIcon = _interopRequireDefault(require("@digigov/react-icons/CloseIcon"));
|
|
10
|
-
|
|
11
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_CloseIcon["default"], null);
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(CloseIcon, null);
|
|
12
6
|
|
|
13
7
|
it('renders the CloseIcon with no props', function () {
|
|
14
|
-
expect(
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
15
9
|
});
|
package/GlobeIcon/config.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
exports.globe = globe;
|
|
10
|
-
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
|
-
var _ref = /*#__PURE__*/_react["default"].createElement("path", {
|
|
3
|
+
var _ref = /*#__PURE__*/React.createElement("path", {
|
|
14
4
|
d: "M12,0C5.4,0,0,5.4,0,12s5.4,12,12,12s12-5.4,12-12S18.6,0,12,0z M22.4,13.1C22.4,13.1,22.4,13.2,22.4,13.1 c0,0.4-0.1,0.8-0.2,1.1v0h-3.6c0.2-1.5,0.2-3,0-4.5h3.6v0c0.1,0.4,0.1,0.7,0.2,1.1c0,0,0,0,0,0C22.5,11.6,22.5,12.4,22.4,13.1z M16,21.7c1.1-1.5,2-3.5,2.4-6h3.4c0,0,0,0,0,0C20.8,18.4,18.7,20.6,16,21.7z M21.8,8.2C21.8,8.2,21.8,8.2,21.8,8.2l-3.4,0 c-0.4-2.4-1.3-4.5-2.4-6C18.7,3.4,20.8,5.6,21.8,8.2L21.8,8.2z M17.1,9.7c0.2,1.5,0.2,3,0,4.5h-4.4V9.7L17.1,9.7L17.1,9.7z M12.7,8.2V1.6c1.9,0.6,3.5,3.2,4.1,6.6L12.7,8.2L12.7,8.2z M12.7,15.7h4.1c-0.7,3.4-2.3,6.1-4.1,6.6V15.7L12.7,15.7z M2.2,15.8 C2.2,15.8,2.2,15.8,2.2,15.8l3.4,0c0.4,2.4,1.3,4.5,2.4,6C5.3,20.6,3.2,18.4,2.2,15.8L2.2,15.8z M8,2.3c-1.1,1.5-2,3.5-2.4,6H2.2 c0,0,0,0,0,0C3.2,5.6,5.3,3.4,8,2.3z M6.9,14.3c-0.2-1.5-0.2-3,0-4.5h4.4v4.5H6.9L6.9,14.3z M11.2,15.8v6.6 c-1.9-0.6-3.5-3.2-4.1-6.6L11.2,15.8L11.2,15.8z M11.2,8.3H7.1c0.7-3.4,2.3-6.1,4.1-6.6V8.3L11.2,8.3z M1.6,10.9 C1.6,10.9,1.6,10.8,1.6,10.9c0-0.4,0.1-0.8,0.2-1.1v0h3.6c-0.2,1.5-0.2,3,0,4.5H1.7v0c-0.1-0.4-0.1-0.7-0.2-1.1c0,0,0,0,0,0 C1.5,12.4,1.5,11.6,1.6,10.9z"
|
|
15
5
|
});
|
|
16
6
|
|
|
17
|
-
function globe() {
|
|
18
|
-
return /*#__PURE__*/
|
|
7
|
+
export function globe() {
|
|
8
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _ref, ' ');
|
|
19
9
|
}
|
|
20
|
-
|
|
21
10
|
globe.props = [];
|
|
22
|
-
|
|
23
|
-
exports["default"] = _default;
|
|
11
|
+
export default globe;
|
package/GlobeIcon/index.js
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.GlobeIcon = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _Icon = _interopRequireDefault(require("@digigov/react-icons/Icon"));
|
|
15
|
-
|
|
16
|
-
var GlobeIcon = function GlobeIcon(props) {
|
|
17
|
-
return /*#__PURE__*/_react["default"].createElement(_Icon["default"], (0, _extends2["default"])({}, props, {
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from "../Icon";
|
|
4
|
+
export var GlobeIcon = function GlobeIcon(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
18
6
|
icon: "globe"
|
|
19
7
|
}));
|
|
20
8
|
};
|
|
21
|
-
|
|
22
|
-
exports.GlobeIcon = GlobeIcon;
|
|
23
|
-
var _default = GlobeIcon;
|
|
24
|
-
exports["default"] = _default;
|
|
9
|
+
export default GlobeIcon;
|
package/GlobeIcon/index.test.js
CHANGED
|
@@ -1,39 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import GlobeIcon from "./";
|
|
2
4
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
|
-
var _enzyme = require("enzyme");
|
|
8
|
-
|
|
9
|
-
var _GlobeIcon = _interopRequireDefault(require("@digigov/react-icons/GlobeIcon"));
|
|
10
|
-
|
|
11
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_GlobeIcon["default"], null);
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(GlobeIcon, null);
|
|
12
6
|
|
|
13
7
|
it('renders the GlobeIcon with no props', function () {
|
|
14
|
-
expect(
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
15
9
|
});
|
|
16
10
|
|
|
17
|
-
var _ref2 = /*#__PURE__*/
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(GlobeIcon, {
|
|
18
12
|
variant: "dark"
|
|
19
13
|
});
|
|
20
14
|
|
|
21
15
|
it('renders the GlobeIcon with prop variant=dark', function () {
|
|
22
|
-
expect(
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
23
17
|
});
|
|
24
18
|
|
|
25
|
-
var _ref3 = /*#__PURE__*/
|
|
19
|
+
var _ref3 = /*#__PURE__*/React.createElement(GlobeIcon, {
|
|
26
20
|
variant: "light"
|
|
27
21
|
});
|
|
28
22
|
|
|
29
23
|
it('renders the GlobeIcon prop variant= "light"', function () {
|
|
30
|
-
expect(
|
|
24
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
31
25
|
});
|
|
32
26
|
|
|
33
|
-
var _ref4 = /*#__PURE__*/
|
|
27
|
+
var _ref4 = /*#__PURE__*/React.createElement(GlobeIcon, {
|
|
34
28
|
variant: "error"
|
|
35
29
|
});
|
|
36
30
|
|
|
37
31
|
it('renders the GlobeIcon prop variant= "error"', function () {
|
|
38
|
-
expect(
|
|
32
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
39
33
|
});
|
package/Icon/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare type IconProps<N extends keyof IconTypes> = SvgIconProps & IconTy
|
|
|
10
10
|
ref?: React.Ref<SVGSVGElement>;
|
|
11
11
|
/**
|
|
12
12
|
* icon is optional, but strongly recommended.
|
|
13
|
-
* Default value is '
|
|
13
|
+
* Default value is 'chevron'.
|
|
14
14
|
* Use this prop to display the icon you want.
|
|
15
15
|
*/
|
|
16
16
|
icon?: N;
|
package/Icon/index.js
CHANGED
|
@@ -1,58 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = exports.Icon = void 0;
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
-
|
|
16
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
-
|
|
18
|
-
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
21
|
-
|
|
22
|
-
var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
|
|
23
|
-
|
|
24
|
-
var icons = _interopRequireWildcard(require("@digigov/react-icons/icons"));
|
|
25
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
26
4
|
var _excluded = ["icon", "className"];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import SvgIcon from '@digigov/react-core/SvgIcon';
|
|
8
|
+
import * as icons from "../icons";
|
|
31
9
|
|
|
32
10
|
/**
|
|
33
11
|
* Icon is used whenever we need a GOV.GR icon.
|
|
34
12
|
* Choose the icon from the list in icon prop.
|
|
35
13
|
*/
|
|
36
|
-
var Icon = /*#__PURE__*/
|
|
14
|
+
export var Icon = /*#__PURE__*/React.forwardRef(function Icon(_ref, ref) {
|
|
37
15
|
var _ref$icon = _ref.icon,
|
|
38
|
-
icon = _ref$icon === void 0 ? '
|
|
16
|
+
icon = _ref$icon === void 0 ? 'chevron' : _ref$icon,
|
|
39
17
|
className = _ref.className,
|
|
40
|
-
props = (
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
|
|
41
20
|
var IconComponent = icons[icon]; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
21
|
// @ts-ignore
|
|
43
22
|
|
|
44
23
|
var iconProps = IconComponent === null || IconComponent === void 0 ? void 0 : IconComponent.props.reduce(function (compProps, propName) {
|
|
45
24
|
var value = props[propName];
|
|
46
25
|
delete props[propName];
|
|
47
|
-
return (
|
|
26
|
+
return _extends({}, compProps, _defineProperty({}, propName, value));
|
|
48
27
|
}, {});
|
|
49
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
50
29
|
ref: ref
|
|
51
30
|
}, props, {
|
|
52
|
-
className: (
|
|
53
|
-
}), /*#__PURE__*/
|
|
31
|
+
className: clsx(className, true && "govgr-svg-icon--".concat(icon))
|
|
32
|
+
}), /*#__PURE__*/React.createElement(IconComponent, iconProps));
|
|
54
33
|
});
|
|
55
|
-
|
|
56
|
-
exports.Icon = Icon;
|
|
57
|
-
var _default = Icon;
|
|
58
|
-
exports["default"] = _default;
|
|
34
|
+
export default Icon;
|