@apexcura/ui-components 0.0.11-Beta153 → 0.0.11-Beta155
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -12
- package/dist/index.mjs +8 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
2
3
|
|
|
3
4
|
type ElementType = {
|
|
4
5
|
[x: string]: any;
|
|
@@ -11,6 +12,7 @@ type ElementType = {
|
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
prefix?: React.ReactNode;
|
|
13
14
|
type?: string;
|
|
15
|
+
size?: SizeType;
|
|
14
16
|
value?: string | number | boolean | any[] | null | undefined;
|
|
15
17
|
status?: "error" | "warning";
|
|
16
18
|
styles?: React.CSSProperties;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
2
3
|
|
|
3
4
|
type ElementType = {
|
|
4
5
|
[x: string]: any;
|
|
@@ -11,6 +12,7 @@ type ElementType = {
|
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
prefix?: React.ReactNode;
|
|
13
14
|
type?: string;
|
|
15
|
+
size?: SizeType;
|
|
14
16
|
value?: string | number | boolean | any[] | null | undefined;
|
|
15
17
|
status?: "error" | "warning";
|
|
16
18
|
styles?: React.CSSProperties;
|
package/dist/index.js
CHANGED
|
@@ -189,7 +189,6 @@ var SelectElement = (props) => {
|
|
|
189
189
|
// src/Components/RadioElement.tsx
|
|
190
190
|
var import_react6 = __toESM(require("react"));
|
|
191
191
|
var import_antd6 = require("antd");
|
|
192
|
-
var containerClassName = " ";
|
|
193
192
|
var radioDefaultStyle = "bg-[#F2F2F2] border border-[#919191] rounded-[8px] m-[10px] hover:bg-[#F2F2F2] text-center text-black shadow-[0px_0px_1px_1px_#919191]";
|
|
194
193
|
var radioSelectedDefaultStyle = "bg-[#E2D6F8] border border-[#B8A4DE] rounded-[8px] p-[6px] m-[10px] shadow-[0px_0px_1px_1px_#B8A4DE] text-center text-black shadow-[0px_0px_1px_1px_#919191]";
|
|
195
194
|
var RadioElement = (props) => {
|
|
@@ -208,14 +207,14 @@ var RadioElement = (props) => {
|
|
|
208
207
|
}
|
|
209
208
|
};
|
|
210
209
|
const getButtonStyle = (option) => {
|
|
211
|
-
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${
|
|
210
|
+
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${props.activeClassName}` : `${radioDefaultStyle} ${props.className}`;
|
|
212
211
|
};
|
|
213
|
-
return /* @__PURE__ */ import_react6.default.createElement("div", { className: containerClassName }, /* @__PURE__ */ import_react6.default.createElement("p",
|
|
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(
|
|
214
213
|
import_antd6.Radio.Group,
|
|
215
214
|
{
|
|
216
215
|
onChange: handleChange,
|
|
217
216
|
optionType,
|
|
218
|
-
className: props.
|
|
217
|
+
className: props.radioGroupClassName,
|
|
219
218
|
value: selectedValue
|
|
220
219
|
},
|
|
221
220
|
props.options && props.options.map((option) => /* @__PURE__ */ import_react6.default.createElement(
|
|
@@ -619,7 +618,7 @@ var TableElement = (props) => {
|
|
|
619
618
|
dataIndex: col.name,
|
|
620
619
|
key: col.key
|
|
621
620
|
}));
|
|
622
|
-
return /* @__PURE__ */ import_react19.default.createElement(import_antd14.Table, { dataSource: tbody, columns, bordered: true, pagination: false });
|
|
621
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_antd14.Table, { dataSource: tbody, columns, bordered: true, pagination: false, size: props.size && props.size });
|
|
623
622
|
};
|
|
624
623
|
|
|
625
624
|
// src/Components/DatePicker.tsx
|
|
@@ -627,6 +626,7 @@ var import_react20 = __toESM(require("react"));
|
|
|
627
626
|
var import_antd15 = require("antd");
|
|
628
627
|
var import_icons4 = require("@ant-design/icons");
|
|
629
628
|
var import_addDays = require("date-fns/addDays");
|
|
629
|
+
var import_date_fns = require("date-fns");
|
|
630
630
|
var DatePickerElement = (props) => {
|
|
631
631
|
const [date, setDate] = (0, import_react20.useState)(void 0);
|
|
632
632
|
const handleChange = (value, datestring) => {
|
|
@@ -634,17 +634,13 @@ var DatePickerElement = (props) => {
|
|
|
634
634
|
if (props.onChange) {
|
|
635
635
|
props.onChange(date);
|
|
636
636
|
}
|
|
637
|
-
console.log("value", value);
|
|
638
|
-
console.log("datestring", datestring);
|
|
639
637
|
};
|
|
640
638
|
const onHandleDecrement = () => {
|
|
641
|
-
setDate(
|
|
642
|
-
(prev) => console.log("prev", prev)
|
|
643
|
-
);
|
|
639
|
+
setDate((prev) => prev ? (0, import_date_fns.subDays)(prev, 1) : void 0);
|
|
644
640
|
};
|
|
645
641
|
const onHandleIncrement = () => {
|
|
646
|
-
|
|
647
|
-
|
|
642
|
+
setDate((prev) => prev ? (0, import_addDays.addDays)(prev, 1) : void 0);
|
|
643
|
+
console.log(date);
|
|
648
644
|
};
|
|
649
645
|
return /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react20.default.createElement(import_antd15.DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.RightOutlined, null)));
|
|
650
646
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -138,7 +138,6 @@ var SelectElement = (props) => {
|
|
|
138
138
|
// src/Components/RadioElement.tsx
|
|
139
139
|
import React6, { useState as useState2 } from "react";
|
|
140
140
|
import { Radio } from "antd";
|
|
141
|
-
var containerClassName = " ";
|
|
142
141
|
var radioDefaultStyle = "bg-[#F2F2F2] border border-[#919191] rounded-[8px] m-[10px] hover:bg-[#F2F2F2] text-center text-black shadow-[0px_0px_1px_1px_#919191]";
|
|
143
142
|
var radioSelectedDefaultStyle = "bg-[#E2D6F8] border border-[#B8A4DE] rounded-[8px] p-[6px] m-[10px] shadow-[0px_0px_1px_1px_#B8A4DE] text-center text-black shadow-[0px_0px_1px_1px_#919191]";
|
|
144
143
|
var RadioElement = (props) => {
|
|
@@ -157,14 +156,14 @@ var RadioElement = (props) => {
|
|
|
157
156
|
}
|
|
158
157
|
};
|
|
159
158
|
const getButtonStyle = (option) => {
|
|
160
|
-
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${
|
|
159
|
+
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${props.activeClassName}` : `${radioDefaultStyle} ${props.className}`;
|
|
161
160
|
};
|
|
162
|
-
return /* @__PURE__ */ React6.createElement("div", { className: containerClassName }, /* @__PURE__ */ React6.createElement("p",
|
|
161
|
+
return /* @__PURE__ */ React6.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ React6.createElement("p", { className: props.labelClassName }, props.label), /* @__PURE__ */ React6.createElement(
|
|
163
162
|
Radio.Group,
|
|
164
163
|
{
|
|
165
164
|
onChange: handleChange,
|
|
166
165
|
optionType,
|
|
167
|
-
className: props.
|
|
166
|
+
className: props.radioGroupClassName,
|
|
168
167
|
value: selectedValue
|
|
169
168
|
},
|
|
170
169
|
props.options && props.options.map((option) => /* @__PURE__ */ React6.createElement(
|
|
@@ -568,7 +567,7 @@ var TableElement = (props) => {
|
|
|
568
567
|
dataIndex: col.name,
|
|
569
568
|
key: col.key
|
|
570
569
|
}));
|
|
571
|
-
return /* @__PURE__ */ React18.createElement(Table2, { dataSource: tbody, columns, bordered: true, pagination: false });
|
|
570
|
+
return /* @__PURE__ */ React18.createElement(Table2, { dataSource: tbody, columns, bordered: true, pagination: false, size: props.size && props.size });
|
|
572
571
|
};
|
|
573
572
|
|
|
574
573
|
// src/Components/DatePicker.tsx
|
|
@@ -576,6 +575,7 @@ import React19, { useState as useState5 } from "react";
|
|
|
576
575
|
import { DatePicker } from "antd";
|
|
577
576
|
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
578
577
|
import { addDays } from "date-fns/addDays";
|
|
578
|
+
import { subDays } from "date-fns";
|
|
579
579
|
var DatePickerElement = (props) => {
|
|
580
580
|
const [date, setDate] = useState5(void 0);
|
|
581
581
|
const handleChange = (value, datestring) => {
|
|
@@ -583,17 +583,13 @@ var DatePickerElement = (props) => {
|
|
|
583
583
|
if (props.onChange) {
|
|
584
584
|
props.onChange(date);
|
|
585
585
|
}
|
|
586
|
-
console.log("value", value);
|
|
587
|
-
console.log("datestring", datestring);
|
|
588
586
|
};
|
|
589
587
|
const onHandleDecrement = () => {
|
|
590
|
-
setDate(
|
|
591
|
-
(prev) => console.log("prev", prev)
|
|
592
|
-
);
|
|
588
|
+
setDate((prev) => prev ? subDays(prev, 1) : void 0);
|
|
593
589
|
};
|
|
594
590
|
const onHandleIncrement = () => {
|
|
595
|
-
|
|
596
|
-
|
|
591
|
+
setDate((prev) => prev ? addDays(prev, 1) : void 0);
|
|
592
|
+
console.log(date);
|
|
597
593
|
};
|
|
598
594
|
return /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ React19.createElement(LeftOutlined, null)), /* @__PURE__ */ React19.createElement(DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ React19.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ React19.createElement(RightOutlined, null)));
|
|
599
595
|
};
|