indicator-ui 0.0.148 → 0.0.150
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 +5 -7
- package/dist/index.js.map +1 -1
- package/dist/types/src/ui/FormBuilder/lib/formBuilder.d.ts +1 -1
- package/dist/types/src/ui/InputFields/RadioField/types/RadioFieldItemTypes.d.ts +1 -6
- package/dist/types/src/ui/InputFields/RadioField/ui/RadioField.d.ts +1 -1
- package/dist/types/src/ui/InputFields/RadioField/ui/RadioFieldItem.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10104,14 +10104,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10104
10104
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
10105
10105
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
10106
10106
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
10107
|
-
/* harmony import */ var
|
|
10108
|
-
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
10107
|
+
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
10109
10108
|
'use client';
|
|
10110
10109
|
|
|
10111
10110
|
|
|
10112
10111
|
|
|
10113
|
-
|
|
10114
|
-
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false, width = 'hug', isError, }) {
|
|
10112
|
+
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false, width = 'hug', }) {
|
|
10115
10113
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
10116
10114
|
if (required && options[0] && (value === undefined || Array.isArray(value) && value.length === 0)) {
|
|
10117
10115
|
onChange && onChange(options[0].value);
|
|
@@ -10163,7 +10161,7 @@ function RadioField({ value, onChange, options = [], required = false, multiple
|
|
|
10163
10161
|
return JSON.stringify(value) === JSON.stringify(option.value);
|
|
10164
10162
|
}
|
|
10165
10163
|
};
|
|
10166
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
10164
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: options.map((item, idx) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_RadioFieldItem__WEBPACK_IMPORTED_MODULE_2__["default"], { option: item, onClick: () => handleChange(item), active: isActive(item), disabled: disabled, width: width }, idx)) }));
|
|
10167
10165
|
}
|
|
10168
10166
|
|
|
10169
10167
|
|
|
@@ -10187,11 +10185,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10187
10185
|
|
|
10188
10186
|
|
|
10189
10187
|
|
|
10190
|
-
function RadioFieldItem({ option, onClick, active = false, disabled = false, }) {
|
|
10188
|
+
function RadioFieldItem({ option, onClick, active = false, disabled = false, width = 'hug', }) {
|
|
10191
10189
|
if (option.component) {
|
|
10192
10190
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(option.component, { onClick: onClick, active: active, disabled: disabled });
|
|
10193
10191
|
}
|
|
10194
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.Checkbox, { type: 'radio', text: option.label, onClick: onClick, disabled: disabled, width:
|
|
10192
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.Checkbox, { type: 'radio', text: option.label, onClick: onClick, disabled: disabled, width: width, checked: active });
|
|
10195
10193
|
}
|
|
10196
10194
|
|
|
10197
10195
|
|