@apexcura/ui-components 0.0.13-Beta31 → 0.0.13-Beta32

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
@@ -185,23 +185,16 @@ var TextareaElement = (props) => {
185
185
  // src/Components/SelectElement.tsx
186
186
  var import_react5 = __toESM(require("react"));
187
187
  var import_antd5 = require("antd");
188
- var labelRender = (props) => {
189
- const { label, value } = props;
190
- if (label) {
191
- return value;
192
- }
193
- return /* @__PURE__ */ import_react5.default.createElement("span", null, "select gender");
194
- };
195
188
  var SelectElement = (props) => {
196
189
  const handleChange = (value) => {
190
+ console.log("sigleselectvalue----", value);
197
191
  if (props.onChange) {
198
192
  props.onChange(value);
199
193
  }
200
194
  };
201
- return /* @__PURE__ */ import_react5.default.createElement(
195
+ return /* @__PURE__ */ import_react5.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react5.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react5.default.createElement(
202
196
  import_antd5.Select,
203
197
  {
204
- labelRender,
205
198
  options: props.options,
206
199
  placeholder: props.placeholder,
207
200
  allowClear: true,
@@ -214,7 +207,7 @@ var SelectElement = (props) => {
214
207
  variant: props.variant,
215
208
  onChange: handleChange
216
209
  }
217
- );
210
+ ));
218
211
  };
219
212
 
220
213
  // src/Components/RadioElement.tsx
@@ -882,23 +875,27 @@ var SingleCheckbox = (props) => {
882
875
  var import_react27 = __toESM(require("react"));
883
876
  var import_antd19 = require("antd");
884
877
  var MultiSelect = (props) => {
885
- const options = props.options;
886
- const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)([]);
887
- for (let i = 10; i < 100; i++) {
888
- options && options.push({
889
- value: i,
890
- label: i
891
- });
892
- }
893
- console.log(options);
878
+ const [options, setOptions] = (0, import_react27.useState)([]);
879
+ const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)({});
880
+ (0, import_react27.useEffect)(() => {
881
+ const newOptions = [];
882
+ for (let i = 1; i < 100; i++) {
883
+ newOptions.push({
884
+ value: i,
885
+ label: i
886
+ });
887
+ }
888
+ setOptions(newOptions);
889
+ console.log("options========", options);
890
+ }, []);
894
891
  const handleChange = (e) => {
895
- console.log(e);
892
+ console.log("----------", e);
896
893
  setSelectedOptions((prev) => ({
897
894
  ...prev,
898
895
  [e.name]: e.value
899
896
  }));
900
897
  };
901
- console.log(selectedOptions);
898
+ console.log("selectedOptions", selectedOptions);
902
899
  return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.className, style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ import_react27.default.createElement(
903
900
  import_antd19.Select,
904
901
  {
package/dist/index.mjs CHANGED
@@ -129,23 +129,16 @@ var TextareaElement = (props) => {
129
129
  // src/Components/SelectElement.tsx
130
130
  import React5 from "react";
131
131
  import { Select } from "antd";
132
- var labelRender = (props) => {
133
- const { label, value } = props;
134
- if (label) {
135
- return value;
136
- }
137
- return /* @__PURE__ */ React5.createElement("span", null, "select gender");
138
- };
139
132
  var SelectElement = (props) => {
140
133
  const handleChange = (value) => {
134
+ console.log("sigleselectvalue----", value);
141
135
  if (props.onChange) {
142
136
  props.onChange(value);
143
137
  }
144
138
  };
145
- return /* @__PURE__ */ React5.createElement(
139
+ return /* @__PURE__ */ React5.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React5.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React5.createElement(
146
140
  Select,
147
141
  {
148
- labelRender,
149
142
  options: props.options,
150
143
  placeholder: props.placeholder,
151
144
  allowClear: true,
@@ -158,7 +151,7 @@ var SelectElement = (props) => {
158
151
  variant: props.variant,
159
152
  onChange: handleChange
160
153
  }
161
- );
154
+ ));
162
155
  };
163
156
 
164
157
  // src/Components/RadioElement.tsx
@@ -823,26 +816,30 @@ var SingleCheckbox = (props) => {
823
816
  };
824
817
 
825
818
  // src/Components/MultiSelect.tsx
826
- import React26, { useState as useState7 } from "react";
819
+ import React26, { useState as useState7, useEffect as useEffect2 } from "react";
827
820
  import { Select as Select4 } from "antd";
828
821
  var MultiSelect = (props) => {
829
- const options = props.options;
830
- const [selectedOptions, setSelectedOptions] = useState7([]);
831
- for (let i = 10; i < 100; i++) {
832
- options && options.push({
833
- value: i,
834
- label: i
835
- });
836
- }
837
- console.log(options);
822
+ const [options, setOptions] = useState7([]);
823
+ const [selectedOptions, setSelectedOptions] = useState7({});
824
+ useEffect2(() => {
825
+ const newOptions = [];
826
+ for (let i = 1; i < 100; i++) {
827
+ newOptions.push({
828
+ value: i,
829
+ label: i
830
+ });
831
+ }
832
+ setOptions(newOptions);
833
+ console.log("options========", options);
834
+ }, []);
838
835
  const handleChange = (e) => {
839
- console.log(e);
836
+ console.log("----------", e);
840
837
  setSelectedOptions((prev) => ({
841
838
  ...prev,
842
839
  [e.name]: e.value
843
840
  }));
844
841
  };
845
- console.log(selectedOptions);
842
+ console.log("selectedOptions", selectedOptions);
846
843
  return /* @__PURE__ */ React26.createElement("div", { className: props.className, style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ React26.createElement(
847
844
  Select4,
848
845
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta31",
3
+ "version": "0.0.13-Beta32",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",