@apexcura/ui-components 0.0.12-Beta33 → 0.0.12-Beta35

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
@@ -186,20 +186,15 @@ var SelectElement = (props) => {
186
186
  var import_react6 = __toESM(require("react"));
187
187
  var import_antd6 = require("antd");
188
188
  var RadioElement = (props) => {
189
- const [isDisabled, setIsDisabled] = (0, import_react6.useState)(props.disabled);
190
189
  const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
191
190
  let optionType;
192
191
  if (props.optionType === "button") {
193
192
  optionType = props.optionType;
194
193
  }
195
- (0, import_react6.useEffect)(() => {
196
- setIsDisabled(props.disabled);
197
- }, [props.disabled]);
198
194
  const handleChange = (e) => {
199
195
  const selectedVal = e.target.value;
200
196
  const selectedOptions = [{ id: selectedVal, value: selectedVal }];
201
197
  setSelectedValue(selectedVal);
202
- setIsDisabled(true);
203
198
  if (props.onChange) {
204
199
  props.onChange(selectedOptions);
205
200
  }
@@ -207,7 +202,7 @@ var RadioElement = (props) => {
207
202
  const getButtonStyle = (option) => {
208
203
  return selectedValue === option.value ? option.selectedClassName : option.className;
209
204
  };
210
- return /* @__PURE__ */ import_react6.default.createElement(
205
+ return /* @__PURE__ */ import_react6.default.createElement("div", null, /* @__PURE__ */ import_react6.default.createElement("h1", null, "hsjas"), /* @__PURE__ */ import_react6.default.createElement(
211
206
  import_antd6.Radio.Group,
212
207
  {
213
208
  onChange: handleChange,
@@ -220,13 +215,11 @@ var RadioElement = (props) => {
220
215
  {
221
216
  key: option.value,
222
217
  value: option.value,
223
- disabled: isDisabled && selectedValue !== option.value,
224
- className: getButtonStyle(option),
225
- style: { pointerEvents: isDisabled && selectedValue !== option.value ? "none" : "auto" }
218
+ className: getButtonStyle(option)
226
219
  },
227
220
  option.label
228
221
  ))
229
- );
222
+ ));
230
223
  };
231
224
 
232
225
  // src/Components/Checkbox.tsx
package/dist/index.mjs CHANGED
@@ -136,23 +136,18 @@ var SelectElement = (props) => {
136
136
  };
137
137
 
138
138
  // src/Components/RadioElement.tsx
139
- import React6, { useState as useState2, useEffect } from "react";
139
+ import React6, { useState as useState2 } from "react";
140
140
  import { Radio } from "antd";
141
141
  var RadioElement = (props) => {
142
- const [isDisabled, setIsDisabled] = useState2(props.disabled);
143
142
  const [selectedValue, setSelectedValue] = useState2(props.value);
144
143
  let optionType;
145
144
  if (props.optionType === "button") {
146
145
  optionType = props.optionType;
147
146
  }
148
- useEffect(() => {
149
- setIsDisabled(props.disabled);
150
- }, [props.disabled]);
151
147
  const handleChange = (e) => {
152
148
  const selectedVal = e.target.value;
153
149
  const selectedOptions = [{ id: selectedVal, value: selectedVal }];
154
150
  setSelectedValue(selectedVal);
155
- setIsDisabled(true);
156
151
  if (props.onChange) {
157
152
  props.onChange(selectedOptions);
158
153
  }
@@ -160,7 +155,7 @@ var RadioElement = (props) => {
160
155
  const getButtonStyle = (option) => {
161
156
  return selectedValue === option.value ? option.selectedClassName : option.className;
162
157
  };
163
- return /* @__PURE__ */ React6.createElement(
158
+ return /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement("h1", null, "hsjas"), /* @__PURE__ */ React6.createElement(
164
159
  Radio.Group,
165
160
  {
166
161
  onChange: handleChange,
@@ -173,13 +168,11 @@ var RadioElement = (props) => {
173
168
  {
174
169
  key: option.value,
175
170
  value: option.value,
176
- disabled: isDisabled && selectedValue !== option.value,
177
- className: getButtonStyle(option),
178
- style: { pointerEvents: isDisabled && selectedValue !== option.value ? "none" : "auto" }
171
+ className: getButtonStyle(option)
179
172
  },
180
173
  option.label
181
174
  ))
182
- );
175
+ ));
183
176
  };
184
177
 
185
178
  // src/Components/Checkbox.tsx
@@ -348,7 +341,7 @@ var ButtonElement = (props) => {
348
341
  };
349
342
 
350
343
  // src/Components/AddMoreTable.tsx
351
- import React12, { useEffect as useEffect2, useState as useState4 } from "react";
344
+ import React12, { useEffect, useState as useState4 } from "react";
352
345
  import { Table, Button as Button3 } from "antd";
353
346
  import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
354
347
  var AddMoreTable = (props) => {
@@ -417,7 +410,7 @@ var AddMoreTable = (props) => {
417
410
  });
418
411
  });
419
412
  };
420
- useEffect2(() => {
413
+ useEffect(() => {
421
414
  console.log(rows);
422
415
  }, [rows]);
423
416
  const renderInputElement = (element, value) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.12-Beta33",
3
+ "version": "0.0.12-Beta35",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",