@apexcura/ui-components 0.0.15-Beta3 → 0.0.15-Beta4

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
@@ -382,7 +382,6 @@ var ButtonElement = (props) => {
382
382
  const [svgContent, setSvgContent] = (0, import_react11.useState)(null);
383
383
  const [originalSvgContent, setOriginalSvgContent] = (0, import_react11.useState)(null);
384
384
  const [hoverColor, setHoverColor] = (0, import_react11.useState)(null);
385
- const [defaultColor, setDefaultColor] = (0, import_react11.useState)(null);
386
385
  (0, import_react11.useEffect)(() => {
387
386
  if (props.icon) {
388
387
  fetch(props.icon).then((response) => response.text()).then((data) => {
@@ -400,7 +399,6 @@ var ButtonElement = (props) => {
400
399
  document.body.removeChild(tempSpan);
401
400
  const paths = svgElement.querySelectorAll("path");
402
401
  paths.forEach((path) => path.setAttribute("fill", computedColor));
403
- setDefaultColor(computedColor);
404
402
  }
405
403
  if (hoverColorClass) {
406
404
  const tempSpan = document.createElement("span");
@@ -419,7 +417,7 @@ var ButtonElement = (props) => {
419
417
  }
420
418
  }).catch((error) => console.error("Error fetching SVG:", error));
421
419
  }
422
- }, []);
420
+ }, [props.className]);
423
421
  const handleMouseEnter = () => {
424
422
  if (hoverColor && originalSvgContent) {
425
423
  const tempDiv = document.createElement("div");
@@ -431,13 +429,8 @@ var ButtonElement = (props) => {
431
429
  }
432
430
  };
433
431
  const handleMouseLeave = () => {
434
- if (defaultColor && originalSvgContent) {
435
- const tempDiv = document.createElement("div");
436
- tempDiv.innerHTML = originalSvgContent;
437
- const svgElement = tempDiv.querySelector("svg");
438
- const paths = svgElement?.querySelectorAll("path");
439
- paths?.forEach((path) => path.setAttribute("fill", defaultColor));
440
- setSvgContent(tempDiv.innerHTML);
432
+ if (originalSvgContent) {
433
+ setSvgContent(originalSvgContent);
441
434
  }
442
435
  };
443
436
  return /* @__PURE__ */ import_react11.default.createElement(
@@ -817,8 +810,7 @@ var TableElement = (props) => {
817
810
  dataSource,
818
811
  columns,
819
812
  size: props.size,
820
- bordered: true,
821
- scroll: { x: 1300 }
813
+ bordered: true
822
814
  }
823
815
  ), model && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
824
816
  };
package/dist/index.mjs CHANGED
@@ -321,7 +321,6 @@ var ButtonElement = (props) => {
321
321
  const [svgContent, setSvgContent] = useState4(null);
322
322
  const [originalSvgContent, setOriginalSvgContent] = useState4(null);
323
323
  const [hoverColor, setHoverColor] = useState4(null);
324
- const [defaultColor, setDefaultColor] = useState4(null);
325
324
  useEffect(() => {
326
325
  if (props.icon) {
327
326
  fetch(props.icon).then((response) => response.text()).then((data) => {
@@ -339,7 +338,6 @@ var ButtonElement = (props) => {
339
338
  document.body.removeChild(tempSpan);
340
339
  const paths = svgElement.querySelectorAll("path");
341
340
  paths.forEach((path) => path.setAttribute("fill", computedColor));
342
- setDefaultColor(computedColor);
343
341
  }
344
342
  if (hoverColorClass) {
345
343
  const tempSpan = document.createElement("span");
@@ -358,7 +356,7 @@ var ButtonElement = (props) => {
358
356
  }
359
357
  }).catch((error) => console.error("Error fetching SVG:", error));
360
358
  }
361
- }, []);
359
+ }, [props.className]);
362
360
  const handleMouseEnter = () => {
363
361
  if (hoverColor && originalSvgContent) {
364
362
  const tempDiv = document.createElement("div");
@@ -370,13 +368,8 @@ var ButtonElement = (props) => {
370
368
  }
371
369
  };
372
370
  const handleMouseLeave = () => {
373
- if (defaultColor && originalSvgContent) {
374
- const tempDiv = document.createElement("div");
375
- tempDiv.innerHTML = originalSvgContent;
376
- const svgElement = tempDiv.querySelector("svg");
377
- const paths = svgElement?.querySelectorAll("path");
378
- paths?.forEach((path) => path.setAttribute("fill", defaultColor));
379
- setSvgContent(tempDiv.innerHTML);
371
+ if (originalSvgContent) {
372
+ setSvgContent(originalSvgContent);
380
373
  }
381
374
  };
382
375
  return /* @__PURE__ */ React11.createElement(
@@ -756,8 +749,7 @@ var TableElement = (props) => {
756
749
  dataSource,
757
750
  columns,
758
751
  size: props.size,
759
- bordered: true,
760
- scroll: { x: 1300 }
752
+ bordered: true
761
753
  }
762
754
  ), model && /* @__PURE__ */ React20.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
763
755
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.15-Beta3",
3
+ "version": "0.0.15-Beta4",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",