indicator-ui 0.0.147 → 0.0.148
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 +8 -47
- package/dist/index.js.map +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/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,14 @@ __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");
|
|
10108
|
+
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
10141
10109
|
'use client';
|
|
10142
10110
|
|
|
10143
10111
|
|
|
10144
10112
|
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
}) {
|
|
10113
|
+
|
|
10114
|
+
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false, width = 'hug', isError, }) {
|
|
10148
10115
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
10149
10116
|
if (required && options[0] && (value === undefined || Array.isArray(value) && value.length === 0)) {
|
|
10150
10117
|
onChange && onChange(options[0].value);
|
|
@@ -10196,7 +10163,7 @@ function RadioField({ value, onChange, options = [], required = false, multiple
|
|
|
10196
10163
|
return JSON.stringify(value) === JSON.stringify(option.value);
|
|
10197
10164
|
}
|
|
10198
10165
|
};
|
|
10199
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
10166
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(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)), options.map((item, idx) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_RadioFieldItem__WEBPACK_IMPORTED_MODULE_3__["default"], { option: item, onClick: () => handleChange(item), active: isActive(item), disabled: disabled }, idx))] }));
|
|
10200
10167
|
}
|
|
10201
10168
|
|
|
10202
10169
|
|
|
@@ -10216,21 +10183,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10216
10183
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
10217
10184
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
10218
10185
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
10219
|
-
/* harmony import */ var
|
|
10220
|
-
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/RadioField/styles/index.ts");
|
|
10221
|
-
|
|
10186
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
|
|
10222
10187
|
|
|
10223
10188
|
|
|
10224
10189
|
|
|
10225
|
-
function RadioFieldItem({ option, onClick, active = false, disabled = false,
|
|
10226
|
-
// className,
|
|
10227
|
-
}) {
|
|
10190
|
+
function RadioFieldItem({ option, onClick, active = false, disabled = false, }) {
|
|
10228
10191
|
if (option.component) {
|
|
10229
10192
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(option.component, { onClick: onClick, active: active, disabled: disabled });
|
|
10230
10193
|
}
|
|
10231
|
-
return (
|
|
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 })] }));
|
|
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: 'hug', checked: active });
|
|
10234
10195
|
}
|
|
10235
10196
|
|
|
10236
10197
|
|