@apexcura/ui-components 0.0.14-Beta40 → 0.0.14-Beta42

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.js CHANGED
@@ -416,22 +416,28 @@ var ButtonElement = (props) => {
416
416
  }, [props.icon, props.className]);
417
417
  const handleMouseEnter = () => {
418
418
  if (hoverColor && svgContent) {
419
- const tempDiv = document.createElement("div");
420
- tempDiv.innerHTML = svgContent;
421
- const svgElement = tempDiv.querySelector("svg");
422
- const paths = svgElement?.querySelectorAll("path");
423
- paths?.forEach((path) => path.setAttribute("fill", hoverColor));
424
- setSvgContent(tempDiv.innerHTML);
419
+ setSvgContent((prevSvgContent) => {
420
+ if (!prevSvgContent) return null;
421
+ const tempDiv = document.createElement("div");
422
+ tempDiv.innerHTML = prevSvgContent;
423
+ const svgElement = tempDiv.querySelector("svg");
424
+ const paths = svgElement?.querySelectorAll("path");
425
+ paths?.forEach((path) => path.setAttribute("fill", hoverColor));
426
+ return tempDiv.innerHTML;
427
+ });
425
428
  }
426
429
  };
427
430
  const handleMouseLeave = () => {
428
431
  if (svgContent) {
429
- const tempDiv = document.createElement("div");
430
- tempDiv.innerHTML = svgContent;
431
- const svgElement = tempDiv.querySelector("svg");
432
- const paths = svgElement?.querySelectorAll("path");
433
- paths?.forEach((path) => path.removeAttribute("fill"));
434
- setSvgContent(tempDiv.innerHTML);
432
+ setSvgContent((prevSvgContent) => {
433
+ if (!prevSvgContent) return null;
434
+ const tempDiv = document.createElement("div");
435
+ tempDiv.innerHTML = prevSvgContent;
436
+ const svgElement = tempDiv.querySelector("svg");
437
+ const paths = svgElement?.querySelectorAll("path");
438
+ paths?.forEach((path) => path.removeAttribute("fill"));
439
+ return tempDiv.innerHTML;
440
+ });
435
441
  }
436
442
  };
437
443
  return /* @__PURE__ */ import_react11.default.createElement(
package/dist/index.mjs CHANGED
@@ -357,22 +357,28 @@ var ButtonElement = (props) => {
357
357
  }, [props.icon, props.className]);
358
358
  const handleMouseEnter = () => {
359
359
  if (hoverColor && svgContent) {
360
- const tempDiv = document.createElement("div");
361
- tempDiv.innerHTML = svgContent;
362
- const svgElement = tempDiv.querySelector("svg");
363
- const paths = svgElement?.querySelectorAll("path");
364
- paths?.forEach((path) => path.setAttribute("fill", hoverColor));
365
- setSvgContent(tempDiv.innerHTML);
360
+ setSvgContent((prevSvgContent) => {
361
+ if (!prevSvgContent) return null;
362
+ const tempDiv = document.createElement("div");
363
+ tempDiv.innerHTML = prevSvgContent;
364
+ const svgElement = tempDiv.querySelector("svg");
365
+ const paths = svgElement?.querySelectorAll("path");
366
+ paths?.forEach((path) => path.setAttribute("fill", hoverColor));
367
+ return tempDiv.innerHTML;
368
+ });
366
369
  }
367
370
  };
368
371
  const handleMouseLeave = () => {
369
372
  if (svgContent) {
370
- const tempDiv = document.createElement("div");
371
- tempDiv.innerHTML = svgContent;
372
- const svgElement = tempDiv.querySelector("svg");
373
- const paths = svgElement?.querySelectorAll("path");
374
- paths?.forEach((path) => path.removeAttribute("fill"));
375
- setSvgContent(tempDiv.innerHTML);
373
+ setSvgContent((prevSvgContent) => {
374
+ if (!prevSvgContent) return null;
375
+ const tempDiv = document.createElement("div");
376
+ tempDiv.innerHTML = prevSvgContent;
377
+ const svgElement = tempDiv.querySelector("svg");
378
+ const paths = svgElement?.querySelectorAll("path");
379
+ paths?.forEach((path) => path.removeAttribute("fill"));
380
+ return tempDiv.innerHTML;
381
+ });
376
382
  }
377
383
  };
378
384
  return /* @__PURE__ */ React11.createElement(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta40",
3
+ "version": "0.0.14-Beta42",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",
@@ -48,8 +48,6 @@
48
48
  "node": ">=18.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@apexcura/core": "^0.0.15-Beta34",
52
- "@apexcura/ui-components": "^0.0.11-Beta256",
53
51
  "@tinymce/tinymce-react": "^5.0.1",
54
52
  "autoprefixer": "^10.4.19",
55
53
  "date-fns": "^3.6.0",