@apexcura/ui-components 0.0.15-Beta11 → 0.0.15-Beta3
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.css +17 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -10
- package/dist/index.mjs +18 -10
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -341,12 +341,29 @@ video {
|
|
|
341
341
|
.m-\[10px\] {
|
|
342
342
|
margin: 10px;
|
|
343
343
|
}
|
|
344
|
+
.mr-3 {
|
|
345
|
+
margin-right: 0.75rem;
|
|
346
|
+
}
|
|
344
347
|
.flex {
|
|
345
348
|
display: flex;
|
|
346
349
|
}
|
|
347
350
|
.table {
|
|
348
351
|
display: table;
|
|
349
352
|
}
|
|
353
|
+
.h-5 {
|
|
354
|
+
height: 1.25rem;
|
|
355
|
+
}
|
|
356
|
+
.w-5 {
|
|
357
|
+
width: 1.25rem;
|
|
358
|
+
}
|
|
359
|
+
@keyframes spin {
|
|
360
|
+
to {
|
|
361
|
+
transform: rotate(360deg);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
.animate-spin {
|
|
365
|
+
animation: spin 1s linear infinite;
|
|
366
|
+
}
|
|
350
367
|
.rounded-\[8px\] {
|
|
351
368
|
border-radius: 8px;
|
|
352
369
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -120,6 +120,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
|
120
120
|
|
|
121
121
|
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
122
122
|
|
|
123
|
-
declare const Donut: React$1.
|
|
123
|
+
declare const Donut: (props: ElementType) => React$1.JSX.Element;
|
|
124
124
|
|
|
125
125
|
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.d.ts
CHANGED
|
@@ -120,6 +120,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
|
120
120
|
|
|
121
121
|
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
122
122
|
|
|
123
|
-
declare const Donut: React$1.
|
|
123
|
+
declare const Donut: (props: ElementType) => React$1.JSX.Element;
|
|
124
124
|
|
|
125
125
|
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -382,6 +382,7 @@ 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);
|
|
385
386
|
(0, import_react11.useEffect)(() => {
|
|
386
387
|
if (props.icon) {
|
|
387
388
|
fetch(props.icon).then((response) => response.text()).then((data) => {
|
|
@@ -399,6 +400,7 @@ var ButtonElement = (props) => {
|
|
|
399
400
|
document.body.removeChild(tempSpan);
|
|
400
401
|
const paths = svgElement.querySelectorAll("path");
|
|
401
402
|
paths.forEach((path) => path.setAttribute("fill", computedColor));
|
|
403
|
+
setDefaultColor(computedColor);
|
|
402
404
|
}
|
|
403
405
|
if (hoverColorClass) {
|
|
404
406
|
const tempSpan = document.createElement("span");
|
|
@@ -417,7 +419,7 @@ var ButtonElement = (props) => {
|
|
|
417
419
|
}
|
|
418
420
|
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
419
421
|
}
|
|
420
|
-
}, [
|
|
422
|
+
}, []);
|
|
421
423
|
const handleMouseEnter = () => {
|
|
422
424
|
if (hoverColor && originalSvgContent) {
|
|
423
425
|
const tempDiv = document.createElement("div");
|
|
@@ -429,8 +431,13 @@ var ButtonElement = (props) => {
|
|
|
429
431
|
}
|
|
430
432
|
};
|
|
431
433
|
const handleMouseLeave = () => {
|
|
432
|
-
if (originalSvgContent) {
|
|
433
|
-
|
|
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);
|
|
434
441
|
}
|
|
435
442
|
};
|
|
436
443
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
@@ -439,15 +446,15 @@ var ButtonElement = (props) => {
|
|
|
439
446
|
onClick: props.onClick,
|
|
440
447
|
className: `${props.className ? props.className : ""}`,
|
|
441
448
|
onMouseEnter: handleMouseEnter,
|
|
442
|
-
onMouseLeave: handleMouseLeave
|
|
449
|
+
onMouseLeave: handleMouseLeave,
|
|
450
|
+
disabled: props.isLoading
|
|
443
451
|
},
|
|
444
|
-
props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
452
|
+
props.isLoading ? /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("svg", { className: "animate-spin h-5 w-5 mr-3", viewBox: "0 0 24 24" }), props.label) : /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
445
453
|
"span",
|
|
446
454
|
{
|
|
447
455
|
dangerouslySetInnerHTML: { __html: svgContent }
|
|
448
456
|
}
|
|
449
|
-
),
|
|
450
|
-
props.label
|
|
457
|
+
), props.label)
|
|
451
458
|
);
|
|
452
459
|
};
|
|
453
460
|
|
|
@@ -810,7 +817,8 @@ var TableElement = (props) => {
|
|
|
810
817
|
dataSource,
|
|
811
818
|
columns,
|
|
812
819
|
size: props.size,
|
|
813
|
-
bordered: true
|
|
820
|
+
bordered: true,
|
|
821
|
+
scroll: { x: 1300 }
|
|
814
822
|
}
|
|
815
823
|
), model && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
816
824
|
};
|
|
@@ -825,7 +833,7 @@ var DatePickerElement = (props) => {
|
|
|
825
833
|
const [dateState, setDateState] = (0, import_react21.useState)("");
|
|
826
834
|
const handleChange = (date, dateString) => {
|
|
827
835
|
if (date) {
|
|
828
|
-
const formattedDate =
|
|
836
|
+
const formattedDate = date;
|
|
829
837
|
setDateState(date);
|
|
830
838
|
if (props.onChange) {
|
|
831
839
|
props.onChange(formattedDate);
|
|
@@ -1137,7 +1145,7 @@ var Donut = (props) => {
|
|
|
1137
1145
|
}
|
|
1138
1146
|
]
|
|
1139
1147
|
};
|
|
1140
|
-
return /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, /* @__PURE__ */ import_react31.default.createElement(HighchartsChart, { options: chartOptions }));
|
|
1148
|
+
return /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, /* @__PURE__ */ import_react31.default.createElement(HighchartsChart, { highcharts: import_highcharts.default, options: chartOptions }));
|
|
1141
1149
|
};
|
|
1142
1150
|
var Donut_default = Donut;
|
|
1143
1151
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -321,6 +321,7 @@ 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);
|
|
324
325
|
useEffect(() => {
|
|
325
326
|
if (props.icon) {
|
|
326
327
|
fetch(props.icon).then((response) => response.text()).then((data) => {
|
|
@@ -338,6 +339,7 @@ var ButtonElement = (props) => {
|
|
|
338
339
|
document.body.removeChild(tempSpan);
|
|
339
340
|
const paths = svgElement.querySelectorAll("path");
|
|
340
341
|
paths.forEach((path) => path.setAttribute("fill", computedColor));
|
|
342
|
+
setDefaultColor(computedColor);
|
|
341
343
|
}
|
|
342
344
|
if (hoverColorClass) {
|
|
343
345
|
const tempSpan = document.createElement("span");
|
|
@@ -356,7 +358,7 @@ var ButtonElement = (props) => {
|
|
|
356
358
|
}
|
|
357
359
|
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
358
360
|
}
|
|
359
|
-
}, [
|
|
361
|
+
}, []);
|
|
360
362
|
const handleMouseEnter = () => {
|
|
361
363
|
if (hoverColor && originalSvgContent) {
|
|
362
364
|
const tempDiv = document.createElement("div");
|
|
@@ -368,8 +370,13 @@ var ButtonElement = (props) => {
|
|
|
368
370
|
}
|
|
369
371
|
};
|
|
370
372
|
const handleMouseLeave = () => {
|
|
371
|
-
if (originalSvgContent) {
|
|
372
|
-
|
|
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);
|
|
373
380
|
}
|
|
374
381
|
};
|
|
375
382
|
return /* @__PURE__ */ React11.createElement(
|
|
@@ -378,15 +385,15 @@ var ButtonElement = (props) => {
|
|
|
378
385
|
onClick: props.onClick,
|
|
379
386
|
className: `${props.className ? props.className : ""}`,
|
|
380
387
|
onMouseEnter: handleMouseEnter,
|
|
381
|
-
onMouseLeave: handleMouseLeave
|
|
388
|
+
onMouseLeave: handleMouseLeave,
|
|
389
|
+
disabled: props.isLoading
|
|
382
390
|
},
|
|
383
|
-
props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ React11.createElement(
|
|
391
|
+
props.isLoading ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("svg", { className: "animate-spin h-5 w-5 mr-3", viewBox: "0 0 24 24" }), props.label) : /* @__PURE__ */ React11.createElement(React11.Fragment, null, props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ React11.createElement(
|
|
384
392
|
"span",
|
|
385
393
|
{
|
|
386
394
|
dangerouslySetInnerHTML: { __html: svgContent }
|
|
387
395
|
}
|
|
388
|
-
),
|
|
389
|
-
props.label
|
|
396
|
+
), props.label)
|
|
390
397
|
);
|
|
391
398
|
};
|
|
392
399
|
|
|
@@ -749,7 +756,8 @@ var TableElement = (props) => {
|
|
|
749
756
|
dataSource,
|
|
750
757
|
columns,
|
|
751
758
|
size: props.size,
|
|
752
|
-
bordered: true
|
|
759
|
+
bordered: true,
|
|
760
|
+
scroll: { x: 1300 }
|
|
753
761
|
}
|
|
754
762
|
), model && /* @__PURE__ */ React20.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
755
763
|
};
|
|
@@ -764,7 +772,7 @@ var DatePickerElement = (props) => {
|
|
|
764
772
|
const [dateState, setDateState] = useState7("");
|
|
765
773
|
const handleChange = (date, dateString) => {
|
|
766
774
|
if (date) {
|
|
767
|
-
const formattedDate =
|
|
775
|
+
const formattedDate = date;
|
|
768
776
|
setDateState(date);
|
|
769
777
|
if (props.onChange) {
|
|
770
778
|
props.onChange(formattedDate);
|
|
@@ -1076,7 +1084,7 @@ var Donut = (props) => {
|
|
|
1076
1084
|
}
|
|
1077
1085
|
]
|
|
1078
1086
|
};
|
|
1079
|
-
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(HighchartsChart, { options: chartOptions }));
|
|
1087
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(HighchartsChart, { highcharts: Highcharts, options: chartOptions }));
|
|
1080
1088
|
};
|
|
1081
1089
|
var Donut_default = Donut;
|
|
1082
1090
|
export {
|