@apexcura/ui-components 0.0.11-Beta156 → 0.0.11-Beta157
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 +11 -7
- package/dist/index.mjs +11 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
53
53
|
var import_react = __toESM(require("react"));
|
|
54
54
|
var import_antd = require("antd");
|
|
55
55
|
var TextElement = (props) => {
|
|
56
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("label", { htmlFor: props.name }, props.label), /* @__PURE__ */ import_react.default.createElement(
|
|
56
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, props.label && /* @__PURE__ */ import_react.default.createElement("label", { htmlFor: props.name }, props.label), /* @__PURE__ */ import_react.default.createElement(
|
|
57
57
|
import_antd.Input,
|
|
58
58
|
{
|
|
59
59
|
placeholder: props.placeholder,
|
|
@@ -209,7 +209,7 @@ var RadioElement = (props) => {
|
|
|
209
209
|
const getButtonStyle = (option) => {
|
|
210
210
|
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${props.activeClassName}` : `${radioDefaultStyle} ${props.className}`;
|
|
211
211
|
};
|
|
212
|
-
return /* @__PURE__ */ import_react6.default.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ import_react6.default.createElement("p", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react6.default.createElement(
|
|
212
|
+
return /* @__PURE__ */ import_react6.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react6.default.createElement("p", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react6.default.createElement(
|
|
213
213
|
import_antd6.Radio.Group,
|
|
214
214
|
{
|
|
215
215
|
onChange: handleChange,
|
|
@@ -613,7 +613,12 @@ var import_react19 = __toESM(require("react"));
|
|
|
613
613
|
var import_antd14 = require("antd");
|
|
614
614
|
var TableElement = (props) => {
|
|
615
615
|
const { thead, tbody } = props;
|
|
616
|
-
const columns =
|
|
616
|
+
const columns = [{
|
|
617
|
+
title: "#",
|
|
618
|
+
dataIndex: "#",
|
|
619
|
+
key: "#"
|
|
620
|
+
}];
|
|
621
|
+
thead && thead.map((col) => ({
|
|
617
622
|
title: col.label,
|
|
618
623
|
dataIndex: col.name,
|
|
619
624
|
key: col.key
|
|
@@ -632,12 +637,11 @@ var import_icons4 = require("@ant-design/icons");
|
|
|
632
637
|
var import_addDays = require("date-fns/addDays");
|
|
633
638
|
var import_date_fns = require("date-fns");
|
|
634
639
|
var DatePickerElement = (props) => {
|
|
635
|
-
const [date, setDate] = (0, import_react20.useState)(
|
|
640
|
+
const [date, setDate] = (0, import_react20.useState)();
|
|
636
641
|
const handleChange = (value, datestring) => {
|
|
642
|
+
console.log(datestring);
|
|
637
643
|
setDate(datestring);
|
|
638
|
-
|
|
639
|
-
props.onChange(date);
|
|
640
|
-
}
|
|
644
|
+
console.log(date);
|
|
641
645
|
};
|
|
642
646
|
const onHandleDecrement = () => {
|
|
643
647
|
setDate((prev) => prev ? (0, import_date_fns.subDays)(prev, 1) : void 0);
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Input as AntInput } from "antd";
|
|
4
4
|
var TextElement = (props) => {
|
|
5
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("label", { htmlFor: props.name }, props.label), /* @__PURE__ */ React.createElement(
|
|
5
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, props.label && /* @__PURE__ */ React.createElement("label", { htmlFor: props.name }, props.label), /* @__PURE__ */ React.createElement(
|
|
6
6
|
AntInput,
|
|
7
7
|
{
|
|
8
8
|
placeholder: props.placeholder,
|
|
@@ -158,7 +158,7 @@ var RadioElement = (props) => {
|
|
|
158
158
|
const getButtonStyle = (option) => {
|
|
159
159
|
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${props.activeClassName}` : `${radioDefaultStyle} ${props.className}`;
|
|
160
160
|
};
|
|
161
|
-
return /* @__PURE__ */ React6.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ React6.createElement("p", { className: props.labelClassName }, props.label), /* @__PURE__ */ React6.createElement(
|
|
161
|
+
return /* @__PURE__ */ React6.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React6.createElement("p", { className: props.labelClassName }, props.label), /* @__PURE__ */ React6.createElement(
|
|
162
162
|
Radio.Group,
|
|
163
163
|
{
|
|
164
164
|
onChange: handleChange,
|
|
@@ -562,7 +562,12 @@ import React18 from "react";
|
|
|
562
562
|
import { Table as Table2 } from "antd";
|
|
563
563
|
var TableElement = (props) => {
|
|
564
564
|
const { thead, tbody } = props;
|
|
565
|
-
const columns =
|
|
565
|
+
const columns = [{
|
|
566
|
+
title: "#",
|
|
567
|
+
dataIndex: "#",
|
|
568
|
+
key: "#"
|
|
569
|
+
}];
|
|
570
|
+
thead && thead.map((col) => ({
|
|
566
571
|
title: col.label,
|
|
567
572
|
dataIndex: col.name,
|
|
568
573
|
key: col.key
|
|
@@ -581,12 +586,11 @@ import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
|
581
586
|
import { addDays } from "date-fns/addDays";
|
|
582
587
|
import { subDays } from "date-fns";
|
|
583
588
|
var DatePickerElement = (props) => {
|
|
584
|
-
const [date, setDate] = useState5(
|
|
589
|
+
const [date, setDate] = useState5();
|
|
585
590
|
const handleChange = (value, datestring) => {
|
|
591
|
+
console.log(datestring);
|
|
586
592
|
setDate(datestring);
|
|
587
|
-
|
|
588
|
-
props.onChange(date);
|
|
589
|
-
}
|
|
593
|
+
console.log(date);
|
|
590
594
|
};
|
|
591
595
|
const onHandleDecrement = () => {
|
|
592
596
|
setDate((prev) => prev ? subDays(prev, 1) : void 0);
|