@apexcura/ui-components 0.0.14-Beta41 → 0.0.14-Beta43

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
@@ -72,6 +72,7 @@ var TextElement = (props) => {
72
72
  placeholder: props.placeholder,
73
73
  allowClear: true,
74
74
  id: props.name,
75
+ value: props.value,
75
76
  prefix: props.prefix,
76
77
  type: props.type,
77
78
  status: props.status,
@@ -131,8 +132,7 @@ var NumberElement = (props) => {
131
132
  {
132
133
  placeholder: props.placeholder,
133
134
  addonBefore: props.addonBefore,
134
- allowClear: true,
135
- defaultValue: props.defaultValue,
135
+ value: props.value,
136
136
  disabled: props.disabled,
137
137
  id: props.name,
138
138
  prefix: props.prefix,
@@ -416,22 +416,30 @@ 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, index) => {
439
+ path.removeAttribute("fill");
440
+ });
441
+ return tempDiv.innerHTML;
442
+ });
435
443
  }
436
444
  };
437
445
  return /* @__PURE__ */ import_react11.default.createElement(
package/dist/index.mjs CHANGED
@@ -13,6 +13,7 @@ var TextElement = (props) => {
13
13
  placeholder: props.placeholder,
14
14
  allowClear: true,
15
15
  id: props.name,
16
+ value: props.value,
16
17
  prefix: props.prefix,
17
18
  type: props.type,
18
19
  status: props.status,
@@ -72,8 +73,7 @@ var NumberElement = (props) => {
72
73
  {
73
74
  placeholder: props.placeholder,
74
75
  addonBefore: props.addonBefore,
75
- allowClear: true,
76
- defaultValue: props.defaultValue,
76
+ value: props.value,
77
77
  disabled: props.disabled,
78
78
  id: props.name,
79
79
  prefix: props.prefix,
@@ -357,22 +357,30 @@ 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, index) => {
380
+ path.removeAttribute("fill");
381
+ });
382
+ return tempDiv.innerHTML;
383
+ });
376
384
  }
377
385
  };
378
386
  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-Beta41",
3
+ "version": "0.0.14-Beta43",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",