@hipay/hipay-material-ui 3.0.0 → 3.2.0-PSYCHE-2816

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/Guideline/index.js +2 -0
  2. package/HiCell/CellRate.js +8 -4
  3. package/HiChip/HiChip.js +9 -1
  4. package/HiForm/HiFormControl.js +2 -1
  5. package/HiForm/HiPasswordField.js +1 -1
  6. package/HiIcon/HiIcon.js +3 -5
  7. package/HiPaymentMeans/HiPaymentMeans.js +16 -4
  8. package/HiSelectableList/HiSelectableListItem.js +178 -238
  9. package/HiStepper/HiStep.js +194 -0
  10. package/HiStepper/HiStepper.js +59 -0
  11. package/HiStepper/index.js +23 -0
  12. package/es/Guideline/index.js +2 -0
  13. package/es/HiCell/CellRate.js +8 -4
  14. package/es/HiChip/HiChip.js +9 -1
  15. package/es/HiForm/HiFormControl.js +2 -1
  16. package/es/HiForm/HiPasswordField.js +1 -1
  17. package/es/HiIcon/HiIcon.js +3 -5
  18. package/es/HiPaymentMeans/HiPaymentMeans.js +16 -4
  19. package/es/HiSelectableList/HiSelectableListItem.js +178 -238
  20. package/es/HiStepper/HiStep.js +194 -0
  21. package/es/HiStepper/HiStepper.js +59 -0
  22. package/es/HiStepper/index.js +23 -0
  23. package/es/hi-svg-icons/HiAccount.js +5 -9
  24. package/es/hi-svg-icons/HiActivity.js +5 -9
  25. package/es/hi-svg-icons/HiAll.js +5 -9
  26. package/es/hi-svg-icons/HiBilling.js +5 -9
  27. package/es/hi-svg-icons/HiBriefcaseRescue.js +14 -12
  28. package/es/hi-svg-icons/HiCatalog.js +5 -9
  29. package/es/hi-svg-icons/HiCustomer.js +5 -9
  30. package/es/hi-svg-icons/HiDownload.js +8 -9
  31. package/es/hi-svg-icons/HiFinance.js +5 -9
  32. package/es/hi-svg-icons/HiIntelligence.js +5 -9
  33. package/es/hi-svg-icons/HiIntelligenceMenu.js +49 -0
  34. package/es/hi-svg-icons/HiLogoRounded.js +58 -0
  35. package/es/hi-svg-icons/HiOrder.js +5 -9
  36. package/es/hi-svg-icons/HiPaymentOrder.js +5 -9
  37. package/es/hi-svg-icons/HiPermission.js +5 -9
  38. package/es/hi-svg-icons/HiPriceGrid.js +5 -9
  39. package/es/hi-svg-icons/HiRoute.js +5 -9
  40. package/es/hi-svg-icons/HiSettlement.js +5 -9
  41. package/es/hi-svg-icons/HiSizeLarge.js +17 -8
  42. package/es/hi-svg-icons/HiSizeMedium.js +18 -7
  43. package/es/hi-svg-icons/HiSizeSmall.js +18 -7
  44. package/es/hi-svg-icons/HiStore.js +64 -0
  45. package/es/hi-svg-icons/HiStoreMenu.js +58 -0
  46. package/es/hi-svg-icons/HiTransaction.js +5 -9
  47. package/es/hi-svg-icons/HiTransactionMenu.js +46 -0
  48. package/es/hi-svg-icons/HiUser.js +5 -9
  49. package/es/hi-svg-icons/HiVendor.js +5 -9
  50. package/es/hi-svg-icons/HiWidget.js +5 -9
  51. package/es/hi-svg-icons/index.js +33 -1
  52. package/es/hi-svg-images/HiLogo.js +41 -0
  53. package/es/hi-svg-images/HiLogoWhite.js +41 -0
  54. package/es/hi-svg-images/index.js +23 -0
  55. package/es/utils/helpers.js +12 -2
  56. package/hi-svg-icons/HiAccount.js +5 -9
  57. package/hi-svg-icons/HiActivity.js +5 -9
  58. package/hi-svg-icons/HiAll.js +5 -9
  59. package/hi-svg-icons/HiBilling.js +5 -9
  60. package/hi-svg-icons/HiBriefcaseRescue.js +14 -12
  61. package/hi-svg-icons/HiCatalog.js +5 -9
  62. package/hi-svg-icons/HiCustomer.js +5 -9
  63. package/hi-svg-icons/HiDownload.js +8 -9
  64. package/hi-svg-icons/HiFinance.js +5 -9
  65. package/hi-svg-icons/HiIntelligence.js +5 -9
  66. package/hi-svg-icons/HiIntelligenceMenu.js +49 -0
  67. package/hi-svg-icons/HiLogoRounded.js +58 -0
  68. package/hi-svg-icons/HiOrder.js +5 -9
  69. package/hi-svg-icons/HiPaymentOrder.js +5 -9
  70. package/hi-svg-icons/HiPermission.js +5 -9
  71. package/hi-svg-icons/HiPriceGrid.js +5 -9
  72. package/hi-svg-icons/HiRoute.js +5 -9
  73. package/hi-svg-icons/HiSettlement.js +5 -9
  74. package/hi-svg-icons/HiSizeLarge.js +17 -8
  75. package/hi-svg-icons/HiSizeMedium.js +18 -7
  76. package/hi-svg-icons/HiSizeSmall.js +18 -7
  77. package/hi-svg-icons/HiStore.js +64 -0
  78. package/hi-svg-icons/HiStoreMenu.js +58 -0
  79. package/hi-svg-icons/HiTransaction.js +5 -9
  80. package/hi-svg-icons/HiTransactionMenu.js +46 -0
  81. package/hi-svg-icons/HiUser.js +5 -9
  82. package/hi-svg-icons/HiVendor.js +5 -9
  83. package/hi-svg-icons/HiWidget.js +5 -9
  84. package/hi-svg-icons/index.js +33 -1
  85. package/hi-svg-images/HiLogo.js +41 -0
  86. package/hi-svg-images/HiLogoWhite.js +41 -0
  87. package/hi-svg-images/index.js +23 -0
  88. package/package.json +2 -3
  89. package/utils/helpers.js +12 -2
  90. package/es/hi-svg-icons/index.text.js +0 -51
  91. package/hi-svg-icons/index.text.js +0 -51
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _pure = _interopRequireDefault(require("recompose/pure"));
15
+
16
+ var _ref = _react.default.createElement("path", {
17
+ fill: "#00ade9",
18
+ d: "M288.84 117.53a19.9 19.9 0 00-22.74-2.37 710.68 710.68 0 01-82.57 39.71C201.92 84.49 219.32 26.53 219.6 25.6a19.87 19.87 0 10-38-11.45c-.32 1-22.26 74.14-43.11 156.53a426.51 426.51 0 01-48.87 11.67c-4.56.8-8.89 1.46-13 2a1440.07 1440.07 0 0143.5-143.68 19.87 19.87 0 00-37.2-14 1438.29 1438.29 0 00-47.87 160.16 99.22 99.22 0 01-11.81-1A19.87 19.87 0 1016.51 225c1.45.25 4.81.76 10 1.15-3 15.08-5.74 30.44-8 45.83a19.87 19.87 0 1039.3 5.89c2.64-17.58 5.88-35.19 9.48-52.44 8.68-.8 18.42-2.05 29.19-3.93q15.38-2.69 31.21-6.65c-5.14 21.79-9.94 43.45-14 63.89a19.87 19.87 0 1039 7.72c5.33-26.92 12-56 19-84.76a653.51 653.51 0 0067.15-27.7c-4.92 13.74-9.61 27.78-13.37 41-4.95 17.39-7.68 31.24-8.36 42.33-1.16 19.06 4.06 32.2 15.53 39.06a19.87 19.87 0 0024.12-31.24c-.42-4-.23-16.52 9.84-49 8-25.94 19.4-55.09 27.7-76.38a19.87 19.87 0 00-5.46-22.24zM522.37 78.05c-3.31-17.28-13.12-31.6-28.37-41.42-21.67-14-54.74-19.25-98.29-15.76a399.66 399.66 0 00-56.64 8.69 19.87 19.87 0 009.35 38.62c.06 0 1.83-.43 4.9-1.08q-4.63 20.18-9.3 40.36-7.83 33.8-15.73 67.56c-8.84 2.49-14.25 3.82-14.41 3.86a19.86 19.86 0 004.2 39.16c-1.12 4.69-2.23 9.38-3.36 14.07-3.73 15.44-7.38 30.91-11.61 46.22-2.86 10.35 3.54 22.8 14.35 25.26s22.19-3.26 25.25-14.34c7.6-27.49 14-55.36 20.46-83.16 17.56-5.56 39-13.05 60.32-22.23 29.5-12.72 52.69-26.14 68.94-39.9 30.27-25.64 32.99-49.96 29.94-65.91zm-55.51 35.49c-13.18 11.19-32.93 22.51-58.71 33.65-11.56 5-23.27 9.48-34.34 13.4Q384 117.08 394 73.52q1.49-6.43 3-12.88l2.52-.2c33.44-2.62 59.39.79 73.07 9.62 6.22 4 9.56 8.77 10.84 15.47 1.44 7.99-4.11 17.47-16.57 28.01zM680.18 451.45a20.55 20.55 0 01-2.46-.15 19.87 19.87 0 01-17.29-22.15c4.69-38.09 23.1-97.5 42-151.52a181.77 181.77 0 01-4.15 3.58c-19.52 16.26-37 23.44-53.43 22-13.48-1.23-24.34-8.09-30.57-19.32a43.31 43.31 0 01-2.61-5.64 140.32 140.32 0 01-44.42 22.89c-13 4-29.63 7.27-42.15-2.9a28.14 28.14 0 01-7.82-9.9 112.84 112.84 0 01-16.65 9.62c-20.55 9.39-34.59 5.71-42.75 1-15.67-9.11-22.29-29.68-16.46-51.18a164.63 164.63 0 0126-53.65c24.52-33.77 48.95-51.11 72.61-51.56 17-.33 29.92 8.38 35.86 15.94a19.88 19.88 0 012.25 21c-5.53 11.43-19.77 44.9-22.88 69.2q-.06.62-.15 1.23c-.11 1-.21 2-.28 2.91-.18 2.47-.4 4.8-.6 7-.11 1.2-.23 2.51-.34 3.83l1.69-.5c28.32-8.67 47.3-27.8 59.82-47.22q2-6.66 4.52-13.9a433 433 0 0119.78-47 19.87 19.87 0 0137.34 12.22 204.1 204.1 0 01-19.9 55.85q-2.38 4.51-5 8.82c-5 18.68-4.62 28.33-3.6 31.72 2.72.14 20.77-1.25 60.6-52.1a624.13 624.13 0 0041.86-61.3 19.87 19.87 0 0135.54 17.57c-.75 1.88-77.07 188.16-86.67 266.16a19.87 19.87 0 01-19.69 17.45zm-147.6-266.69c-7 3.59-18.11 12.18-33 32.63a125.07 125.07 0 00-19.83 40.71 18.63 18.63 0 00-.69 5.47c4.83-1.27 16.73-6.34 37.75-26.35 3.25-18.37 10-37.9 15.77-52.46zm12.74-1z"
19
+ });
20
+
21
+ var _ref2 = _react.default.createElement("ellipse", {
22
+ cx: 285.79,
23
+ cy: 66.13,
24
+ rx: 22.1,
25
+ ry: 22.93,
26
+ transform: "rotate(-45 285.784 66.134)",
27
+ fill: "#ffcf21"
28
+ });
29
+
30
+ /**
31
+ * @ignore - internal component.
32
+ */
33
+ var HiLogo = (0, _pure.default)(function (props) {
34
+ return _react.default.createElement("svg", (0, _extends2.default)({
35
+ viewBox: "0 0 788.05 451.45",
36
+ width: "100%"
37
+ }, props), _ref, _ref2);
38
+ });
39
+ HiLogo.muiName = 'SvgImage';
40
+ var _default = HiLogo;
41
+ exports.default = _default;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _pure = _interopRequireDefault(require("recompose/pure"));
15
+
16
+ var _ref = _react.default.createElement("path", {
17
+ fill: "#fff",
18
+ d: "M288.84 117.53a19.9 19.9 0 00-22.74-2.37 710.68 710.68 0 01-82.57 39.71C201.92 84.49 219.32 26.53 219.6 25.6a19.87 19.87 0 10-38-11.45c-.32 1-22.26 74.14-43.11 156.53a426.51 426.51 0 01-48.87 11.67c-4.56.8-8.89 1.46-13 2a1440.07 1440.07 0 0143.5-143.68 19.87 19.87 0 00-37.2-14 1438.29 1438.29 0 00-47.87 160.16 99.22 99.22 0 01-11.81-1A19.87 19.87 0 1016.51 225c1.45.25 4.81.76 10 1.15-3 15.08-5.74 30.44-8 45.83a19.87 19.87 0 1039.3 5.89c2.64-17.58 5.88-35.19 9.48-52.44 8.68-.8 18.42-2.05 29.19-3.93q15.38-2.69 31.21-6.65c-5.14 21.79-9.94 43.45-14 63.89a19.87 19.87 0 1039 7.72c5.33-26.92 12-56 19-84.76a653.51 653.51 0 0067.15-27.7c-4.92 13.74-9.61 27.78-13.37 41-4.95 17.39-7.68 31.24-8.36 42.33-1.16 19.06 4.06 32.2 15.53 39.06a19.87 19.87 0 0024.12-31.24c-.42-4-.23-16.52 9.84-49 8-25.94 19.4-55.09 27.7-76.38a19.87 19.87 0 00-5.46-22.24zM522.37 78.05c-3.31-17.28-13.12-31.6-28.37-41.42-21.67-14-54.74-19.25-98.29-15.76a399.66 399.66 0 00-56.64 8.69 19.87 19.87 0 009.35 38.62c.06 0 1.83-.43 4.9-1.08q-4.63 20.18-9.3 40.36-7.83 33.8-15.73 67.56c-8.84 2.49-14.25 3.82-14.41 3.86a19.86 19.86 0 004.2 39.16c-1.12 4.69-2.23 9.38-3.36 14.07-3.73 15.44-7.38 30.91-11.61 46.22-2.86 10.35 3.54 22.8 14.35 25.26s22.19-3.26 25.25-14.34c7.6-27.49 14-55.36 20.46-83.16 17.56-5.56 39-13.05 60.32-22.23 29.5-12.72 52.69-26.14 68.94-39.9 30.27-25.64 32.99-49.96 29.94-65.91zm-55.51 35.49c-13.18 11.19-32.93 22.51-58.71 33.65-11.56 5-23.27 9.48-34.34 13.4Q384 117.08 394 73.52q1.49-6.43 3-12.88l2.52-.2c33.44-2.62 59.39.79 73.07 9.62 6.22 4 9.56 8.77 10.84 15.47 1.44 7.99-4.11 17.47-16.57 28.01zM680.18 451.45a20.55 20.55 0 01-2.46-.15 19.87 19.87 0 01-17.29-22.15c4.69-38.09 23.1-97.5 42-151.52a181.77 181.77 0 01-4.15 3.58c-19.52 16.26-37 23.44-53.43 22-13.48-1.23-24.34-8.09-30.57-19.32a43.31 43.31 0 01-2.61-5.64 140.32 140.32 0 01-44.42 22.89c-13 4-29.63 7.27-42.15-2.9a28.14 28.14 0 01-7.82-9.9 112.84 112.84 0 01-16.65 9.62c-20.55 9.39-34.59 5.71-42.75 1-15.67-9.11-22.29-29.68-16.46-51.18a164.63 164.63 0 0126-53.65c24.52-33.77 48.95-51.11 72.61-51.56 17-.33 29.92 8.38 35.86 15.94a19.88 19.88 0 012.25 21c-5.53 11.43-19.77 44.9-22.88 69.2q-.06.62-.15 1.23c-.11 1-.21 2-.28 2.91-.18 2.47-.4 4.8-.6 7-.11 1.2-.23 2.51-.34 3.83l1.69-.5c28.32-8.67 47.3-27.8 59.82-47.22q2-6.66 4.52-13.9a433 433 0 0119.78-47 19.87 19.87 0 0137.34 12.22 204.1 204.1 0 01-19.9 55.85q-2.38 4.51-5 8.82c-5 18.68-4.62 28.33-3.6 31.72 2.72.14 20.77-1.25 60.6-52.1a624.13 624.13 0 0041.86-61.3 19.87 19.87 0 0135.54 17.57c-.75 1.88-77.07 188.16-86.67 266.16a19.87 19.87 0 01-19.69 17.45zm-147.6-266.69c-7 3.59-18.11 12.18-33 32.63a125.07 125.07 0 00-19.83 40.71 18.63 18.63 0 00-.69 5.47c4.83-1.27 16.73-6.34 37.75-26.35 3.25-18.37 10-37.9 15.77-52.46zm12.74-1z"
19
+ });
20
+
21
+ var _ref2 = _react.default.createElement("ellipse", {
22
+ cx: 285.79,
23
+ cy: 66.13,
24
+ rx: 22.1,
25
+ ry: 22.93,
26
+ transform: "rotate(-45 285.784 66.134)",
27
+ fill: "#ffcf21"
28
+ });
29
+
30
+ /**
31
+ * @ignore - internal component.
32
+ */
33
+ var HiLogoWhite = (0, _pure.default)(function (props) {
34
+ return _react.default.createElement("svg", (0, _extends2.default)({
35
+ viewBox: "0 0 788.05 451.45",
36
+ width: "100%"
37
+ }, props), _ref, _ref2);
38
+ });
39
+ HiLogoWhite.muiName = 'SvgImage';
40
+ var _default = HiLogoWhite;
41
+ exports.default = _default;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ Object.defineProperty(exports, "HiLogo", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _HiLogo.default;
12
+ }
13
+ });
14
+ Object.defineProperty(exports, "HiLogoWhite", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _HiLogoWhite.default;
18
+ }
19
+ });
20
+
21
+ var _HiLogo = _interopRequireDefault(require("./HiLogo"));
22
+
23
+ var _HiLogoWhite = _interopRequireDefault(require("./HiLogoWhite"));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hipay/hipay-material-ui",
3
3
  "private": false,
4
- "version": "3.0.0",
4
+ "version": "3.2.0-PSYCHE-2816",
5
5
  "description": "React components that implement Google's Material Design.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,7 +21,6 @@
21
21
  "dependencies": {
22
22
  "@babel/plugin-transform-runtime": "^7.8.3",
23
23
  "@babel/runtime": "7.6.3",
24
- "@material-ui/icons": "4.4.3",
25
24
  "brcast": "3.0.1",
26
25
  "classnames": "2.2.6",
27
26
  "cross-env": "6.0.3",
@@ -35,7 +34,7 @@
35
34
  "jss-vendor-prefixer": "8.0.1",
36
35
  "keycode": "2.2.0",
37
36
  "leaflet": "1.5.1",
38
- "mdi-material-ui": "6.8.0",
37
+ "mdi-material-ui": "6.13.2",
39
38
  "mini-html-webpack-plugin": "1.0.0",
40
39
  "prop-types": "15.7.2",
41
40
  "react-custom-scrollbars": "4.2.1",
package/utils/helpers.js CHANGED
@@ -18,6 +18,7 @@ exports.formatCurrencyAmount = formatCurrencyAmount;
18
18
  exports.formatRate = formatRate;
19
19
  exports.getNextItemSelectable = getNextItemSelectable;
20
20
  exports.foldAccents = foldAccents;
21
+ exports.uniqueId = uniqueId;
21
22
 
22
23
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
23
24
 
@@ -51,7 +52,7 @@ function contains(obj, pred) {
51
52
  }
52
53
  /**
53
54
  * Echappe les caractères HTML d'une chaîne de catactères
54
- * Sauf la balise strong
55
+ * Sauf la balise <strong>, <br>, and <a>
55
56
  *
56
57
  * @param unsafeStr
57
58
  * @returns {*}
@@ -59,7 +60,7 @@ function contains(obj, pred) {
59
60
 
60
61
 
61
62
  function escapeHTML(unsafeStr) {
62
- return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br>');
63
+ return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/<a(?: (.*?)=[\"\'](.*?)[\"\'])(?: (.*?)=[\"\'](.*?)[\"\'])?>(.*?)<\/a>/g, '[a:$1:$2:$3:$4]$5[a]').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/\[a:(.*?):(.*?):(.*?):(.*?)\](.*?)\[a\]/g, '<a $1=$2 $3=$4>$5</a>').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br>');
63
64
  }
64
65
 
65
66
  function findIndex(arr, pred) {
@@ -332,4 +333,13 @@ function foldAccents(toFold) {
332
333
  if (star) return '\\*';
333
334
  return str;
334
335
  });
336
+ }
337
+ /**
338
+ * Generate a unique ID
339
+ * @returns {string}
340
+ */
341
+
342
+
343
+ function uniqueId() {
344
+ return '_' + Math.random().toString(36).substr(2, 9);
335
345
  }
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _fs = _interopRequireDefault(require("fs"));
6
-
7
- var _path = _interopRequireDefault(require("path"));
8
-
9
- var _react = _interopRequireDefault(require("react"));
10
-
11
- var _chai = require("chai");
12
-
13
- var _testUtils = require("../test-utils");
14
-
15
- describe('hi-svg-icons', function () {
16
- var shallow;
17
- before(function () {
18
- shallow = (0, _testUtils.createShallow)();
19
- });
20
- it('should be able to render all of them', function (done) {
21
- // This test can only be run on the node env
22
- if (!_fs.default.readdir) {
23
- done();
24
- return;
25
- }
26
-
27
- _fs.default.readdir(__dirname, function (err, files) {
28
- files.forEach(function (file) {
29
- // Ignore no js files and tests
30
- if (file.indexOf('.js') === -1 || file.indexOf('text.js') > -1) {
31
- return;
32
- } // eslint-disable-next-line global-require, import/no-dynamic-require
33
-
34
-
35
- var fileLoaded = require(_path.default.join(__dirname, file));
36
-
37
- if (!fileLoaded.default) {
38
- return;
39
- }
40
-
41
- var Icon = fileLoaded.default;
42
- var wrapper = shallow(_react.default.createElement(Icon, {
43
- className: "foo"
44
- }));
45
-
46
- _chai.assert.strictEqual(wrapper.hasClass('foo'), true);
47
- });
48
- done();
49
- });
50
- });
51
- });
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _fs = _interopRequireDefault(require("fs"));
6
-
7
- var _path = _interopRequireDefault(require("path"));
8
-
9
- var _react = _interopRequireDefault(require("react"));
10
-
11
- var _chai = require("chai");
12
-
13
- var _testUtils = require("../test-utils");
14
-
15
- describe('hi-svg-icons', function () {
16
- var shallow;
17
- before(function () {
18
- shallow = (0, _testUtils.createShallow)();
19
- });
20
- it('should be able to render all of them', function (done) {
21
- // This test can only be run on the node env
22
- if (!_fs.default.readdir) {
23
- done();
24
- return;
25
- }
26
-
27
- _fs.default.readdir(__dirname, function (err, files) {
28
- files.forEach(function (file) {
29
- // Ignore no js files and tests
30
- if (file.indexOf('.js') === -1 || file.indexOf('text.js') > -1) {
31
- return;
32
- } // eslint-disable-next-line global-require, import/no-dynamic-require
33
-
34
-
35
- var fileLoaded = require(_path.default.join(__dirname, file));
36
-
37
- if (!fileLoaded.default) {
38
- return;
39
- }
40
-
41
- var Icon = fileLoaded.default;
42
- var wrapper = shallow(_react.default.createElement(Icon, {
43
- className: "foo"
44
- }));
45
-
46
- _chai.assert.strictEqual(wrapper.hasClass('foo'), true);
47
- });
48
- done();
49
- });
50
- });
51
- });