@cypress-design/react-statusicon 0.4.2 → 0.4.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +18 -0
- package/ReadMe.md +4 -0
- package/compileProps.ts +1 -2
- package/dist/compileProps.d.ts +479 -1
- package/dist/compileProps.d.ts.map +1 -1
- package/dist/index.es.mjs +13 -6
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +13 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/tsconfig.json +0 -8
package/dist/index.umd.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var iconsRegistry = require('@cypress-design/icon-registry');
|
|
7
|
+
require('clsx');
|
|
7
8
|
|
|
8
9
|
function _interopNamespaceDefault(e) {
|
|
9
10
|
var n = Object.create(null);
|
|
@@ -38,6 +39,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
38
39
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39
40
|
PERFORMANCE OF THIS SOFTWARE.
|
|
40
41
|
***************************************************************************** */
|
|
42
|
+
/* global Reflect, Promise */
|
|
43
|
+
|
|
41
44
|
|
|
42
45
|
var __assign$1 = function() {
|
|
43
46
|
__assign$1 = Object.assign || function __assign(t) {
|
|
@@ -436,6 +439,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
436
439
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
437
440
|
PERFORMANCE OF THIS SOFTWARE.
|
|
438
441
|
***************************************************************************** */
|
|
442
|
+
/* global Reflect, Promise */
|
|
443
|
+
|
|
439
444
|
|
|
440
445
|
var __assign = function() {
|
|
441
446
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -463,7 +468,10 @@ function __rest(s, e) {
|
|
|
463
468
|
var compileReactIconProperties = function (_a) {
|
|
464
469
|
var body = _a.body, compiledClasses = _a.compiledClasses, size = _a.size, attributes = __rest(_a, ["body", "compiledClasses", "size"]);
|
|
465
470
|
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
466
|
-
if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
471
|
+
if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
472
|
+
attrName !== 'name') {
|
|
473
|
+
// @ts-expect-error the ky of React's SVGProps is too broad and
|
|
474
|
+
// breaks here. Since we do not need to check for it. We keep the expect error
|
|
467
475
|
newAttributes[attrName] =
|
|
468
476
|
attributes[attrName];
|
|
469
477
|
}
|
|
@@ -471,7 +479,7 @@ var compileReactIconProperties = function (_a) {
|
|
|
471
479
|
}, {});
|
|
472
480
|
var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
473
481
|
__html: body,
|
|
474
|
-
} }, filteredAttributes);
|
|
482
|
+
}, className: undefined }, filteredAttributes);
|
|
475
483
|
if (attributes.className) {
|
|
476
484
|
compiledClasses.push(attributes.className);
|
|
477
485
|
}
|
|
@@ -482,16 +490,15 @@ var compileReactIconProperties = function (_a) {
|
|
|
482
490
|
};
|
|
483
491
|
|
|
484
492
|
|
|
485
|
-
/* <
|
|
493
|
+
/* <wind-keep class=""> */
|
|
486
494
|
|
|
487
495
|
var compileProps = function (_a) {
|
|
488
496
|
var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size;
|
|
489
497
|
var statusInfo = status ? statuses[status] : statuses.placeholder;
|
|
490
498
|
var iconInfo = status ? statuses$3[status] : statuses$3.placeholder;
|
|
491
|
-
var
|
|
499
|
+
var iconData = statusInfo["size".concat(size, "Icon")].data;
|
|
492
500
|
var classes = "inline-block ".concat(className || '');
|
|
493
501
|
var compiledClasses = iconsRegistry.getComponentAttributes({
|
|
494
|
-
name: name,
|
|
495
502
|
strokeColor: iconInfo.color,
|
|
496
503
|
size: size,
|
|
497
504
|
availableSizes: [size],
|
|
@@ -551,4 +558,4 @@ exports.SolidStatusIcon = SolidStatusIcon;
|
|
|
551
558
|
exports.default = StatusIcon;
|
|
552
559
|
//# sourceMappingURL=index.umd.js.map
|
|
553
560
|
|
|
554
|
-
/* <
|
|
561
|
+
/* <wind-keep class="outline inline-block icon-dark-indigo-400 icon-light-gray-100 icon-dark-jade-400 icon-dark-red-400 icon-dark-gray-100 icon-dark-gray-300 icon-dark-orange-400 icon-dark-gray-400"> */
|