qingicon-react 2.0.1 → 2.0.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/index.cjs CHANGED
@@ -3962,7 +3962,8 @@ function getPreviewStrokeWidth(strokeWidth, displaySize, viewBoxWidth, opticalSi
3962
3962
  function setStrokeWidthOnStrokeNodes(inner, sw) {
3963
3963
  return inner.replace(/<(\w+)([^>]*?)\bdata-role="stroke"[^>]*>/g, (m, tag, pre) => {
3964
3964
  const attrs = pre.replace(/\s+stroke-width="[^"]*"/g, "");
3965
- return "<" + tag + attrs + ' data-role="stroke" stroke-width="' + sw + '">';
3965
+ const selfClose = /\/\s*>$/.test(m) ? " /" : "";
3966
+ return "<" + tag + attrs + ' data-role="stroke" stroke-width="' + sw + '"' + selfClose + ">";
3966
3967
  });
3967
3968
  }
3968
3969
  function extractVariantInner(svg3901, variant, strokeWidth) {
package/dist/index.js CHANGED
@@ -25,7 +25,8 @@ function getPreviewStrokeWidth(strokeWidth, displaySize, viewBoxWidth, opticalSi
25
25
  function setStrokeWidthOnStrokeNodes(inner, sw) {
26
26
  return inner.replace(/<(\w+)([^>]*?)\bdata-role="stroke"[^>]*>/g, (m, tag, pre) => {
27
27
  const attrs = pre.replace(/\s+stroke-width="[^"]*"/g, "");
28
- return "<" + tag + attrs + ' data-role="stroke" stroke-width="' + sw + '">';
28
+ const selfClose = /\/\s*>$/.test(m) ? " /" : "";
29
+ return "<" + tag + attrs + ' data-role="stroke" stroke-width="' + sw + '"' + selfClose + ">";
29
30
  });
30
31
  }
31
32
  function extractVariantInner(svg3901, variant, strokeWidth) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qingicon-react",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "QingIcon React components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",