indicator-ui 0.0.147 → 0.0.149
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.css +0 -61
- package/dist/index.css.map +1 -1
- package/dist/index.js +3 -72
- 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/RadioFieldTypes.d.ts +1 -0
- package/dist/types/src/ui/InputFields/RadioField/ui/RadioField.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/src/ui/InputFields/RadioField/ui/RadioFieldItem.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -3198,22 +3198,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3198
3198
|
|
|
3199
3199
|
/***/ }),
|
|
3200
3200
|
|
|
3201
|
-
/***/ "./src/ui/InputFields/RadioField/styles/RadioField.module.scss":
|
|
3202
|
-
/*!*********************************************************************!*\
|
|
3203
|
-
!*** ./src/ui/InputFields/RadioField/styles/RadioField.module.scss ***!
|
|
3204
|
-
\*********************************************************************/
|
|
3205
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3206
|
-
|
|
3207
|
-
"use strict";
|
|
3208
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3209
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3210
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3211
|
-
/* harmony export */ });
|
|
3212
|
-
// extracted by mini-css-extract-plugin
|
|
3213
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"radioFieldItem":"RadioField-module__radioFieldItem___uaoV4","checkbox":"RadioField-module__checkbox____H6Wv","label":"RadioField-module__label___LbYqv","active":"RadioField-module__active___w24VO"});
|
|
3214
|
-
|
|
3215
|
-
/***/ }),
|
|
3216
|
-
|
|
3217
3201
|
/***/ "./src/ui/InputFields/SelectField/styles/SelectField.module.scss":
|
|
3218
3202
|
/*!***********************************************************************!*\
|
|
3219
3203
|
!*** ./src/ui/InputFields/SelectField/styles/SelectField.module.scss ***!
|
|
@@ -10062,23 +10046,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10062
10046
|
|
|
10063
10047
|
|
|
10064
10048
|
|
|
10065
|
-
/***/ }),
|
|
10066
|
-
|
|
10067
|
-
/***/ "./src/ui/InputFields/RadioField/styles/index.ts":
|
|
10068
|
-
/*!*******************************************************!*\
|
|
10069
|
-
!*** ./src/ui/InputFields/RadioField/styles/index.ts ***!
|
|
10070
|
-
\*******************************************************/
|
|
10071
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10072
|
-
|
|
10073
|
-
"use strict";
|
|
10074
|
-
__webpack_require__.r(__webpack_exports__);
|
|
10075
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10076
|
-
/* harmony export */ RadioFieldStyle: () => (/* reexport safe */ _RadioField_module_scss__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
10077
|
-
/* harmony export */ });
|
|
10078
|
-
/* harmony import */ var _RadioField_module_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RadioField.module.scss */ "./src/ui/InputFields/RadioField/styles/RadioField.module.scss");
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
10049
|
/***/ }),
|
|
10083
10050
|
|
|
10084
10051
|
/***/ "./src/ui/InputFields/RadioField/types/RadioFieldItemTypes.ts":
|
|
@@ -10137,14 +10104,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10137
10104
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
10138
10105
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
10139
10106
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
10140
|
-
/* harmony import */ var
|
|
10107
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
|
|
10141
10108
|
'use client';
|
|
10142
10109
|
|
|
10143
10110
|
|
|
10144
10111
|
|
|
10145
|
-
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false,
|
|
10146
|
-
// className = RadioFieldStyle,
|
|
10147
|
-
}) {
|
|
10112
|
+
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false, width = 'hug', isError, }) {
|
|
10148
10113
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
10149
10114
|
if (required && options[0] && (value === undefined || Array.isArray(value) && value.length === 0)) {
|
|
10150
10115
|
onChange && onChange(options[0].value);
|
|
@@ -10196,41 +10161,7 @@ function RadioField({ value, onChange, options = [], required = false, multiple
|
|
|
10196
10161
|
return JSON.stringify(value) === JSON.stringify(option.value);
|
|
10197
10162
|
}
|
|
10198
10163
|
};
|
|
10199
|
-
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)(
|
|
10200
|
-
}
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
/***/ }),
|
|
10204
|
-
|
|
10205
|
-
/***/ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx":
|
|
10206
|
-
/*!*************************************************************!*\
|
|
10207
|
-
!*** ./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx ***!
|
|
10208
|
-
\*************************************************************/
|
|
10209
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10210
|
-
|
|
10211
|
-
"use strict";
|
|
10212
|
-
__webpack_require__.r(__webpack_exports__);
|
|
10213
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10214
|
-
/* harmony export */ "default": () => (/* binding */ RadioFieldItem)
|
|
10215
|
-
/* harmony export */ });
|
|
10216
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
10217
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
10218
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
10219
|
-
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
|
|
10220
|
-
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/RadioField/styles/index.ts");
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
function RadioFieldItem({ option, onClick, active = false, disabled = false,
|
|
10226
|
-
// className,
|
|
10227
|
-
}) {
|
|
10228
|
-
if (option.component) {
|
|
10229
|
-
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(option.component, { onClick: onClick, active: active, disabled: disabled });
|
|
10230
|
-
}
|
|
10231
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: onClick, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.radioFieldItem, {
|
|
10232
|
-
[_styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.active]: active,
|
|
10233
|
-
}), children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.checkbox }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.label, children: option.label })] }));
|
|
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)(_ui__WEBPACK_IMPORTED_MODULE_2__.Checkbox, { text: item.label, width: width, type: 'radio', error: isError, onClick: () => handleChange(item), checked: isActive(item), disabled: disabled }, idx)) }));
|
|
10234
10165
|
}
|
|
10235
10166
|
|
|
10236
10167
|
|