@cypress-design/icon-registry 0.22.1 → 0.22.2
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/compileIcon.d.ts +27 -2
- package/dist/compileIcon.d.ts.map +1 -1
- package/dist/compileIcon.test.d.ts +2 -0
- package/dist/compileIcon.test.d.ts.map +1 -0
- package/dist/icons.d.ts +3 -4
- package/dist/icons.d.ts.map +1 -1
- package/dist/index.es.mjs +7 -5
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +7 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -7503,19 +7503,20 @@
|
|
|
7503
7503
|
];
|
|
7504
7504
|
|
|
7505
7505
|
const compileIcon = (props) => {
|
|
7506
|
-
const { name } = props;
|
|
7506
|
+
const { interactiveColorsOnGroup, name } = props, cleanProps = __rest(props, ["interactiveColorsOnGroup", "name"]);
|
|
7507
7507
|
const { availableSizes } = iconsMetadata[name];
|
|
7508
|
-
const { sizeWithDefault, compiledClasses } = getComponentAttributes(Object.assign(Object.assign({},
|
|
7508
|
+
const { sizeWithDefault, compiledClasses } = getComponentAttributes(Object.assign(Object.assign({}, cleanProps), { availableSizes,
|
|
7509
|
+
interactiveColorsOnGroup }));
|
|
7509
7510
|
const nameWithSize = camelCase$1(`${name}_x${sizeWithDefault}`);
|
|
7510
7511
|
const iconData = iconSet.find((i) => i.name === nameWithSize);
|
|
7511
7512
|
if (!iconData) {
|
|
7512
7513
|
throw new Error(`icon '${name}' at size ${sizeWithDefault} not found`);
|
|
7513
7514
|
}
|
|
7514
|
-
|
|
7515
|
+
const compiledProps = Object.assign(Object.assign({}, cleanProps), { size: sizeWithDefault, compiledClasses, body: iconData.data });
|
|
7516
|
+
return compiledProps;
|
|
7515
7517
|
};
|
|
7516
7518
|
const getComponentAttributes = (props) => {
|
|
7517
|
-
const { size, availableSizes, interactiveColorsOnGroup
|
|
7518
|
-
otherProps = __rest(props, ["size", "availableSizes", "interactiveColorsOnGroup", "name"]);
|
|
7519
|
+
const { size, availableSizes, interactiveColorsOnGroup } = props, otherProps = __rest(props, ["size", "availableSizes", "interactiveColorsOnGroup"]);
|
|
7519
7520
|
const sizeWithDefault = size !== null && size !== void 0 ? size : (availableSizes.length >= 1
|
|
7520
7521
|
? availableSizes.indexOf('16') > -1
|
|
7521
7522
|
? '16'
|
|
@@ -7524,6 +7525,7 @@
|
|
|
7524
7525
|
const protectedInteractiveColorsOnGroup = interactiveColorsOnGroup === undefined
|
|
7525
7526
|
? otherProps['interactive-colors-on-group']
|
|
7526
7527
|
: interactiveColorsOnGroup;
|
|
7528
|
+
delete otherProps['interactive-colors-on-group'];
|
|
7527
7529
|
// TODO: when all icons are converted to using the design system,
|
|
7528
7530
|
// replace dark by stroke and light by fill,
|
|
7529
7531
|
// both here and in the windi plugins configs.
|