@cypress-design/react-icon 0.21.2 → 0.21.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/dist/index.umd.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var clsx = require('clsx');
6
7
  var iconsRegistry = require('@cypress-design/icon-registry');
7
8
 
8
9
  function _interopNamespaceDefault(e) {
@@ -68,7 +69,10 @@ function __rest(s, e) {
68
69
  var compileReactIconProperties = function (_a) {
69
70
  var body = _a.body, compiledClasses = _a.compiledClasses, size = _a.size, attributes = __rest(_a, ["body", "compiledClasses", "size"]);
70
71
  var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
71
- if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) && attrName !== 'name') {
72
+ if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
73
+ attrName !== 'name') {
74
+ // @ts-expect-error the ky of React's SVGProps is too broad and
75
+ // breaks here. Since we do not need to check for it. We keep the expect error
72
76
  newAttributes[attrName] =
73
77
  attributes[attrName];
74
78
  }
@@ -76,7 +80,7 @@ var compileReactIconProperties = function (_a) {
76
80
  }, {});
77
81
  var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
78
82
  __html: body,
79
- } }, filteredAttributes);
83
+ }, className: undefined }, filteredAttributes);
80
84
  if (attributes.className) {
81
85
  compiledClasses.push(attributes.className);
82
86
  }
@@ -87,7 +91,9 @@ var compileReactIconProperties = function (_a) {
87
91
  };
88
92
 
89
93
  var Icon = function (props) {
90
- return React__namespace.createElement('svg', compileReactIconProperties(iconsRegistry.compileIcon(props)));
94
+ var className = props.className, cleanProps = __rest(props, ["className"]);
95
+ var properties = compileReactIconProperties(iconsRegistry.compileIcon(cleanProps));
96
+ return React__namespace.createElement('svg', __assign(__assign({}, properties), { className: clsx(properties.className, className) }));
91
97
  };
92
98
 
93
99
  var IconActionAddLarge = function (props) {
@@ -356,6 +362,17 @@ var IconActionStop = function (props) {
356
362
  }
357
363
  return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
358
364
  };
365
+ var IconArrowBottomRight = function (props) {
366
+ var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
367
+ var iconBodies = {
368
+ "16": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 6v6m0 0H6m6 0L4 4\" class=\"icon-dark\"/>"
369
+ };
370
+ var body = iconBodies[size];
371
+ if (!body) {
372
+ throw Error("Icon \"arrow-bottom-right\" is not available in size ".concat(size));
373
+ }
374
+ return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
375
+ };
359
376
  var IconArrowCollapse = function (props) {
360
377
  var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
361
378
  var iconBodies = {
@@ -444,6 +461,17 @@ var IconArrowSquareDown = function (props) {
444
461
  }
445
462
  return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
446
463
  };
464
+ var IconArrowTopRight = function (props) {
465
+ var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
466
+ var iconBodies = {
467
+ "16": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 10V4m0 0H6m6 0-8 8\" class=\"icon-dark\"/>"
468
+ };
469
+ var body = iconBodies[size];
470
+ if (!body) {
471
+ throw Error("Icon \"arrow-top-right\" is not available in size ".concat(size));
472
+ }
473
+ return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
474
+ };
447
475
  var IconArrowUp = function (props) {
448
476
  var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
449
477
  var iconBodies = {
@@ -824,6 +852,18 @@ var IconDeviceSmartphone = function (props) {
824
852
  }
825
853
  return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
826
854
  };
855
+ var IconDocumentAddedSquarePlus = function (props) {
856
+ var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16", "24"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
857
+ var iconBodies = {
858
+ "16": "<path fill=\"#E4FBF2\" d=\"M2 12V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2Z\" class=\"icon-light\"/><path stroke=\"#1FA971\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 6v4m2-2H6m6-6H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Z\" class=\"icon-dark\"/>",
859
+ "24": "<path fill=\"#E4FBF2\" d=\"M3 18V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3Z\" class=\"icon-light\"/><path stroke=\"#1FA971\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 8v8m4-4H8m10-9H6a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Z\" class=\"icon-dark\"/>"
860
+ };
861
+ var body = iconBodies[size];
862
+ if (!body) {
863
+ throw Error("Icon \"document-added-square-plus\" is not available in size ".concat(size));
864
+ }
865
+ return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
866
+ };
827
867
  var IconDocumentAdded = function (props) {
828
868
  var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
829
869
  var iconBodies = {
@@ -895,6 +935,18 @@ var IconDocumentMinus = function (props) {
895
935
  }
896
936
  return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
897
937
  };
938
+ var IconDocumentModifiedSquareDot = function (props) {
939
+ var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16", "24"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
940
+ var iconBodies = {
941
+ "16": "<path fill=\"#F5F4D7\" d=\"M9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" class=\"icon-light\"/><path fill=\"#F5F4D7\" fill-rule=\"evenodd\" d=\"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm4 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" class=\"icon-light\" clip-rule=\"evenodd\"/><path stroke=\"#DB7903\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" class=\"icon-dark\"/><path stroke=\"#DB7903\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm4 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" class=\"icon-dark\" clip-rule=\"evenodd\"/>",
942
+ "24": "<path fill=\"#DB7903\" d=\"M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\" class=\"icon-dark\"/><path fill=\"#F5F4D7\" fill-rule=\"evenodd\" d=\"M6 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm6 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" class=\"icon-light\" clip-rule=\"evenodd\"/><path stroke=\"#DB7903\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\" class=\"icon-dark\"/><path stroke=\"#DB7903\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm6 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" class=\"icon-dark\" clip-rule=\"evenodd\"/>"
943
+ };
944
+ var body = iconBodies[size];
945
+ if (!body) {
946
+ throw Error("Icon \"document-modified-square-dot\" is not available in size ".concat(size));
947
+ }
948
+ return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
949
+ };
898
950
  var IconDocumentModified = function (props) {
899
951
  var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
900
952
  var iconBodies = {
@@ -1941,6 +1993,18 @@ var IconStatusFailedSolid = function (props) {
1941
1993
  }
1942
1994
  return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
1943
1995
  };
1996
+ var IconStatusFlaky = function (props) {
1997
+ var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16", "24"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
1998
+ var iconBodies = {
1999
+ "16": "<path fill=\"#F5F4D7\" d=\"M1 12V4a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3Z\" class=\"icon-light\"/><path stroke=\"#963F00\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9.5 5h-3v3.5m0 2.5V8.5m0 0h2\" class=\"icon-dark\"/>",
2000
+ "24": "<path fill=\"#F5F4D7\" d=\"M2 18V6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4Z\" class=\"icon-light\"/><path stroke=\"#963F00\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14 8h-4v4.5m0 3.5v-3.5m0 0h3\" class=\"icon-dark\"/>"
2001
+ };
2002
+ var body = iconBodies[size];
2003
+ if (!body) {
2004
+ throw Error("Icon \"status-flaky\" is not available in size ".concat(size));
2005
+ }
2006
+ return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
2007
+ };
1944
2008
  var IconStatusPassedOutline = function (props) {
1945
2009
  var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["16", "24"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
1946
2010
  var iconBodies = {
@@ -2560,6 +2624,7 @@ exports.IconActionRecord = IconActionRecord;
2560
2624
  exports.IconActionRefresh = IconActionRefresh;
2561
2625
  exports.IconActionRestart = IconActionRestart;
2562
2626
  exports.IconActionStop = IconActionStop;
2627
+ exports.IconArrowBottomRight = IconArrowBottomRight;
2563
2628
  exports.IconArrowCollapse = IconArrowCollapse;
2564
2629
  exports.IconArrowDown = IconArrowDown;
2565
2630
  exports.IconArrowExpand = IconArrowExpand;
@@ -2568,6 +2633,7 @@ exports.IconArrowOutlineDown = IconArrowOutlineDown;
2568
2633
  exports.IconArrowRight = IconArrowRight;
2569
2634
  exports.IconArrowRightLarge = IconArrowRightLarge;
2570
2635
  exports.IconArrowSquareDown = IconArrowSquareDown;
2636
+ exports.IconArrowTopRight = IconArrowTopRight;
2571
2637
  exports.IconArrowUp = IconArrowUp;
2572
2638
  exports.IconBrowserChrome = IconBrowserChrome;
2573
2639
  exports.IconBrowserChromeBeta = IconBrowserChromeBeta;
@@ -2603,12 +2669,14 @@ exports.IconCurrencyUsd = IconCurrencyUsd;
2603
2669
  exports.IconDeviceLaptop = IconDeviceLaptop;
2604
2670
  exports.IconDeviceSmartphone = IconDeviceSmartphone;
2605
2671
  exports.IconDocumentAdded = IconDocumentAdded;
2672
+ exports.IconDocumentAddedSquarePlus = IconDocumentAddedSquarePlus;
2606
2673
  exports.IconDocumentBlank = IconDocumentBlank;
2607
2674
  exports.IconDocumentCode = IconDocumentCode;
2608
2675
  exports.IconDocumentDeleted = IconDocumentDeleted;
2609
2676
  exports.IconDocumentDownload = IconDocumentDownload;
2610
2677
  exports.IconDocumentMinus = IconDocumentMinus;
2611
2678
  exports.IconDocumentModified = IconDocumentModified;
2679
+ exports.IconDocumentModifiedSquareDot = IconDocumentModifiedSquareDot;
2612
2680
  exports.IconDocumentPlus = IconDocumentPlus;
2613
2681
  exports.IconDocumentPlusMinus = IconDocumentPlusMinus;
2614
2682
  exports.IconDocumentScript = IconDocumentScript;
@@ -2700,6 +2768,7 @@ exports.IconStatusErroredSolid = IconStatusErroredSolid;
2700
2768
  exports.IconStatusFailedOutline = IconStatusFailedOutline;
2701
2769
  exports.IconStatusFailedSimple = IconStatusFailedSimple;
2702
2770
  exports.IconStatusFailedSolid = IconStatusFailedSolid;
2771
+ exports.IconStatusFlaky = IconStatusFlaky;
2703
2772
  exports.IconStatusPassedOutline = IconStatusPassedOutline;
2704
2773
  exports.IconStatusPassedSimple = IconStatusPassedSimple;
2705
2774
  exports.IconStatusPassedSolid = IconStatusPassedSolid;