@apexcura/ui-components 0.0.14-Beta19 → 0.0.14-Beta20
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +18 -16
- package/dist/index.mjs +17 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -108,4 +108,6 @@ declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
|
|
|
108
108
|
|
|
109
109
|
declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
declare const SwitchElement: () => React$1.JSX.Element;
|
|
112
|
+
|
|
113
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement };
|
package/dist/index.d.ts
CHANGED
|
@@ -108,4 +108,6 @@ declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
|
|
|
108
108
|
|
|
109
109
|
declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
declare const SwitchElement: () => React$1.JSX.Element;
|
|
112
|
+
|
|
113
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement };
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(src_exports, {
|
|
|
48
48
|
Sidebar: () => Sidebar,
|
|
49
49
|
SingleCheckbox: () => SingleCheckbox,
|
|
50
50
|
SingleSelectElement: () => SingleSelectElement,
|
|
51
|
+
SwitchElement: () => SwitchElement,
|
|
51
52
|
TableElement: () => TableElement,
|
|
52
53
|
TabsElement: () => TabsElement,
|
|
53
54
|
TextElement: () => TextElement,
|
|
@@ -812,14 +813,9 @@ var SingleCheckbox = (props) => {
|
|
|
812
813
|
var import_react25 = __toESM(require("react"));
|
|
813
814
|
var import_antd18 = require("antd");
|
|
814
815
|
var DropDownGroup = (props) => {
|
|
815
|
-
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
816
|
-
firstValue: {},
|
|
817
|
-
secondValue: {}
|
|
818
|
-
});
|
|
816
|
+
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({ firstValue: {}, secondValue: {} });
|
|
819
817
|
const handleFirstChange = (value) => {
|
|
820
|
-
const filterOption2 = props.firstOptions?.find(
|
|
821
|
-
(eachOption) => eachOption.value === value
|
|
822
|
-
);
|
|
818
|
+
const filterOption2 = props.firstOptions?.find((eachOption) => eachOption.value === value);
|
|
823
819
|
setSelectedValue((prev) => {
|
|
824
820
|
const newValue = { ...prev, firstValue: filterOption2 };
|
|
825
821
|
if (newValue.firstValue) {
|
|
@@ -829,9 +825,7 @@ var DropDownGroup = (props) => {
|
|
|
829
825
|
});
|
|
830
826
|
};
|
|
831
827
|
const handleSecondChange = (value) => {
|
|
832
|
-
const filterOption2 = props.secondOptions?.find(
|
|
833
|
-
(eachOption) => eachOption.value === value
|
|
834
|
-
);
|
|
828
|
+
const filterOption2 = props.secondOptions?.find((eachOption) => eachOption.value === value);
|
|
835
829
|
setSelectedValue((prev) => {
|
|
836
830
|
const newValue = { ...prev, secondValue: filterOption2 };
|
|
837
831
|
if (newValue.secondValue) {
|
|
@@ -840,23 +834,22 @@ var DropDownGroup = (props) => {
|
|
|
840
834
|
return selectedValue;
|
|
841
835
|
});
|
|
842
836
|
};
|
|
843
|
-
|
|
837
|
+
console.log("selectedValue", selectedValue);
|
|
838
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ import_react25.default.createElement(
|
|
844
839
|
import_antd18.Select,
|
|
845
840
|
{
|
|
846
841
|
onChange: handleFirstChange,
|
|
847
842
|
variant: props.variant,
|
|
848
|
-
options: props.firstOptions
|
|
849
|
-
className: props.className
|
|
843
|
+
options: props.firstOptions
|
|
850
844
|
}
|
|
851
845
|
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
852
846
|
import_antd18.Select,
|
|
853
847
|
{
|
|
854
848
|
onChange: handleSecondChange,
|
|
855
849
|
variant: props.variant,
|
|
856
|
-
options: props.secondOptions
|
|
857
|
-
className: props.className
|
|
850
|
+
options: props.secondOptions
|
|
858
851
|
}
|
|
859
|
-
))
|
|
852
|
+
));
|
|
860
853
|
};
|
|
861
854
|
|
|
862
855
|
// src/Components/FilesUpload.tsx
|
|
@@ -918,6 +911,14 @@ var TabsElement = (props) => {
|
|
|
918
911
|
};
|
|
919
912
|
return /* @__PURE__ */ import_react27.default.createElement(import_antd20.Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
920
913
|
};
|
|
914
|
+
|
|
915
|
+
// src/Components/SwitchElement.tsx
|
|
916
|
+
var import_react28 = __toESM(require("react"));
|
|
917
|
+
var import_antd21 = require("antd");
|
|
918
|
+
var onChange = (checked) => {
|
|
919
|
+
console.log(`switch to ${checked}`);
|
|
920
|
+
};
|
|
921
|
+
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(import_antd21.Switch, { defaultChecked: true, onChange });
|
|
921
922
|
// Annotate the CommonJS export names for ESM import in node:
|
|
922
923
|
0 && (module.exports = {
|
|
923
924
|
AddMoreTable,
|
|
@@ -938,6 +939,7 @@ var TabsElement = (props) => {
|
|
|
938
939
|
Sidebar,
|
|
939
940
|
SingleCheckbox,
|
|
940
941
|
SingleSelectElement,
|
|
942
|
+
SwitchElement,
|
|
941
943
|
TableElement,
|
|
942
944
|
TabsElement,
|
|
943
945
|
TextElement,
|
package/dist/index.mjs
CHANGED
|
@@ -755,14 +755,9 @@ var SingleCheckbox = (props) => {
|
|
|
755
755
|
import React25, { useState as useState7 } from "react";
|
|
756
756
|
import { Select as Select4 } from "antd";
|
|
757
757
|
var DropDownGroup = (props) => {
|
|
758
|
-
const [selectedValue, setSelectedValue] = useState7({
|
|
759
|
-
firstValue: {},
|
|
760
|
-
secondValue: {}
|
|
761
|
-
});
|
|
758
|
+
const [selectedValue, setSelectedValue] = useState7({ firstValue: {}, secondValue: {} });
|
|
762
759
|
const handleFirstChange = (value) => {
|
|
763
|
-
const filterOption2 = props.firstOptions?.find(
|
|
764
|
-
(eachOption) => eachOption.value === value
|
|
765
|
-
);
|
|
760
|
+
const filterOption2 = props.firstOptions?.find((eachOption) => eachOption.value === value);
|
|
766
761
|
setSelectedValue((prev) => {
|
|
767
762
|
const newValue = { ...prev, firstValue: filterOption2 };
|
|
768
763
|
if (newValue.firstValue) {
|
|
@@ -772,9 +767,7 @@ var DropDownGroup = (props) => {
|
|
|
772
767
|
});
|
|
773
768
|
};
|
|
774
769
|
const handleSecondChange = (value) => {
|
|
775
|
-
const filterOption2 = props.secondOptions?.find(
|
|
776
|
-
(eachOption) => eachOption.value === value
|
|
777
|
-
);
|
|
770
|
+
const filterOption2 = props.secondOptions?.find((eachOption) => eachOption.value === value);
|
|
778
771
|
setSelectedValue((prev) => {
|
|
779
772
|
const newValue = { ...prev, secondValue: filterOption2 };
|
|
780
773
|
if (newValue.secondValue) {
|
|
@@ -783,23 +776,22 @@ var DropDownGroup = (props) => {
|
|
|
783
776
|
return selectedValue;
|
|
784
777
|
});
|
|
785
778
|
};
|
|
786
|
-
|
|
779
|
+
console.log("selectedValue", selectedValue);
|
|
780
|
+
return /* @__PURE__ */ React25.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ React25.createElement(
|
|
787
781
|
Select4,
|
|
788
782
|
{
|
|
789
783
|
onChange: handleFirstChange,
|
|
790
784
|
variant: props.variant,
|
|
791
|
-
options: props.firstOptions
|
|
792
|
-
className: props.className
|
|
785
|
+
options: props.firstOptions
|
|
793
786
|
}
|
|
794
787
|
), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React25.createElement(
|
|
795
788
|
Select4,
|
|
796
789
|
{
|
|
797
790
|
onChange: handleSecondChange,
|
|
798
791
|
variant: props.variant,
|
|
799
|
-
options: props.secondOptions
|
|
800
|
-
className: props.className
|
|
792
|
+
options: props.secondOptions
|
|
801
793
|
}
|
|
802
|
-
))
|
|
794
|
+
));
|
|
803
795
|
};
|
|
804
796
|
|
|
805
797
|
// src/Components/FilesUpload.tsx
|
|
@@ -861,6 +853,14 @@ var TabsElement = (props) => {
|
|
|
861
853
|
};
|
|
862
854
|
return /* @__PURE__ */ React27.createElement(Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
863
855
|
};
|
|
856
|
+
|
|
857
|
+
// src/Components/SwitchElement.tsx
|
|
858
|
+
import React28 from "react";
|
|
859
|
+
import { Switch } from "antd";
|
|
860
|
+
var onChange = (checked) => {
|
|
861
|
+
console.log(`switch to ${checked}`);
|
|
862
|
+
};
|
|
863
|
+
var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
|
|
864
864
|
export {
|
|
865
865
|
AddMoreTable,
|
|
866
866
|
ButtonElement,
|
|
@@ -880,6 +880,7 @@ export {
|
|
|
880
880
|
Sidebar,
|
|
881
881
|
SingleCheckbox,
|
|
882
882
|
SingleSelectElement,
|
|
883
|
+
SwitchElement,
|
|
883
884
|
TableElement,
|
|
884
885
|
TabsElement,
|
|
885
886
|
TextElement,
|