indicator-ui 0.0.104 → 0.0.105
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 -490
- package/dist/index.css.map +1 -1
- package/dist/index.js +79 -96
- package/dist/index.js.map +1 -1
- package/dist/types/src/ui/InputFields/FlexField/types/FlexFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/InputField/types/InputFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/InputField/ui/InputField.d.ts +1 -1
- package/dist/types/src/ui/InputFields/InputFieldWrapper/types/InputFieldWrapperTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/InputFieldWrapper/ui/InputFieldWrapper.d.ts +1 -1
- package/dist/types/src/ui/InputFields/RadioField/types/RadioFieldItemTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/RadioField/types/RadioFieldTypes.d.ts +0 -1
- 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/dist/types/src/ui/InputFields/SelectField/types/SelectFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/SwitcherField/types/SwitcherFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/SwitcherField/ui/SwitcherField.d.ts +1 -1
- package/dist/types/src/ui/InputFields/TextareaField/types/TextareaFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/TextareaField/ui/TextareaField.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3166,22 +3166,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3166
3166
|
|
|
3167
3167
|
/***/ }),
|
|
3168
3168
|
|
|
3169
|
-
/***/ "./src/ui/InputFields/InputField/styles/InputField.module.scss":
|
|
3170
|
-
/*!*********************************************************************!*\
|
|
3171
|
-
!*** ./src/ui/InputFields/InputField/styles/InputField.module.scss ***!
|
|
3172
|
-
\*********************************************************************/
|
|
3173
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3174
|
-
|
|
3175
|
-
"use strict";
|
|
3176
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3177
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3178
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3179
|
-
/* harmony export */ });
|
|
3180
|
-
// extracted by mini-css-extract-plugin
|
|
3181
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"flexField":"InputField-module__flexField___aNE6o","inputField":"InputField-module__inputField___mzakH","placeholder":"InputField-module__placeholder___ybb3Y","icon":"InputField-module__icon___xR6jG","textSupport":"InputField-module__textSupport___njpRn","userPic":"InputField-module__userPic___OQ_q0","help":"InputField-module__help___uSjvq","dropdown":"InputField-module__dropdown___QQuFp","dropdownReverse":"InputField-module__dropdownReverse___Nfb9Z","button":"InputField-module__button___jm0td","red":"InputField-module__red___euINw","gray":"InputField-module__gray___GGFcb","pointer":"InputField-module__pointer___Ij_hP","focus":"InputField-module__focus___xpWhB","isError":"InputField-module__isError___x2fXo","disabled":"InputField-module__disabled___hH7HA","inputFieldWrapper":"InputField-module__inputFieldWrapper___ao9Rs","labelText":"InputField-module__labelText___Fxxc3","required":"InputField-module__required___p4MLk","hintText":"InputField-module__hintText___LC2Oq","hintError":"InputField-module__hintError___LrJWr","helperLink":"InputField-module__helperLink___A_6Ua","selectField":"InputField-module__selectField___ED0Q3","modalWindow":"InputField-module__modalWindow___JplNC","selectModalWindow":"InputField-module__selectModalWindow___Dg52i","show-animation":"InputField-module__show-animation___z7gvz","selectFieldOptionsItem":"InputField-module__selectFieldOptionsItem___HBdJA","label":"InputField-module__label___Wlb6C","active":"InputField-module__active___RcF6w","switcherField":"InputField-module__switcherField___Qezr0","radioFieldItem":"InputField-module__radioFieldItem___c6OMz","checkbox":"InputField-module__checkbox___KcnRp","textareaField":"InputField-module__textareaField___iuYg7","offFocus":"InputField-module__offFocus___FeRXp"});
|
|
3182
|
-
|
|
3183
|
-
/***/ }),
|
|
3184
|
-
|
|
3185
3169
|
/***/ "./src/ui/InputFields/RadioField/styles/RadioField.module.scss":
|
|
3186
3170
|
/*!*********************************************************************!*\
|
|
3187
3171
|
!*** ./src/ui/InputFields/RadioField/styles/RadioField.module.scss ***!
|
|
@@ -8913,7 +8897,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8913
8897
|
|
|
8914
8898
|
|
|
8915
8899
|
|
|
8916
|
-
const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, type, onChange, onFocus, onBlur, onClick, mask = /.*/, required = false, disabled = false, isError = false, placeholder, notInput = false, icon, help, dropdown, userPic, textSupport, dropdownState = false, offFocus = false, button, unmask, blocks, pattern, onDropdownClick, buttonState = 'gray', onButtonClick,
|
|
8900
|
+
const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, type, onChange, onFocus, onBlur, onClick, mask = /.*/, required = false, disabled = false, isError = false, placeholder, notInput = false, icon, help, dropdown, userPic, textSupport, dropdownState = false, offFocus = false, button, unmask, blocks, pattern, onDropdownClick, buttonState = 'gray', onButtonClick,
|
|
8901
|
+
// className = FlexFieldStyle,
|
|
8902
|
+
}, ref) => {
|
|
8917
8903
|
const [isFocus, setIsFocus] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
8918
8904
|
const handleChange = (newValue) => {
|
|
8919
8905
|
onChange && onChange(newValue);
|
|
@@ -8928,22 +8914,22 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8928
8914
|
};
|
|
8929
8915
|
const getInput = () => {
|
|
8930
8916
|
if (notInput) {
|
|
8931
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8917
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.inputField, { [_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.placeholder]: !value && placeholder }), children: value || placeholder }));
|
|
8932
8918
|
}
|
|
8933
8919
|
let validValue = typeof value === 'string' ? value : '';
|
|
8934
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_imask__WEBPACK_IMPORTED_MODULE_2__.IMaskInput, { value: validValue, type: type, mask: mask, required: required, disabled: disabled, placeholder: placeholder, onAccept: handleChange, onFocus: handleFocus, onBlur: handleBlur, unmask: unmask, blocks: blocks, pattern: pattern, className:
|
|
8920
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_imask__WEBPACK_IMPORTED_MODULE_2__.IMaskInput, { value: validValue, type: type, mask: mask, required: required, disabled: disabled, placeholder: placeholder, onAccept: handleChange, onFocus: handleFocus, onBlur: handleBlur, unmask: unmask, blocks: blocks, pattern: pattern, className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.inputField });
|
|
8935
8921
|
};
|
|
8936
8922
|
const getIcon = () => {
|
|
8937
|
-
return icon ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className:
|
|
8923
|
+
return icon ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.icon, children: icon }) : undefined;
|
|
8938
8924
|
};
|
|
8939
8925
|
const getTextSupport = () => {
|
|
8940
8926
|
if (!textSupport)
|
|
8941
8927
|
return undefined;
|
|
8942
8928
|
if (typeof textSupport === "boolean") {
|
|
8943
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
8929
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.textSupport, children: "+7" });
|
|
8944
8930
|
}
|
|
8945
8931
|
else if (typeof textSupport === "string") {
|
|
8946
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
8932
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.textSupport, children: textSupport });
|
|
8947
8933
|
}
|
|
8948
8934
|
else {
|
|
8949
8935
|
return textSupport;
|
|
@@ -8951,7 +8937,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8951
8937
|
};
|
|
8952
8938
|
const getUserPic = () => {
|
|
8953
8939
|
if (typeof userPic === "string") {
|
|
8954
|
-
return userPic && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: userPic, className:
|
|
8940
|
+
return userPic && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: userPic, className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.userPic });
|
|
8955
8941
|
}
|
|
8956
8942
|
return userPic;
|
|
8957
8943
|
};
|
|
@@ -8959,7 +8945,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8959
8945
|
if (!help)
|
|
8960
8946
|
return undefined;
|
|
8961
8947
|
if (typeof help === "boolean") {
|
|
8962
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className:
|
|
8948
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.help, children: isError ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.AlertCircleSVG, {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.HelpCircleSVG, {}) });
|
|
8963
8949
|
}
|
|
8964
8950
|
else {
|
|
8965
8951
|
return help;
|
|
@@ -8969,7 +8955,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8969
8955
|
if (!dropdown)
|
|
8970
8956
|
return undefined;
|
|
8971
8957
|
const dropdownIcon = typeof dropdown === "boolean" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.ChevronDownSVG, {}) : dropdown;
|
|
8972
|
-
let dropdownClassName = typeof dropdownState === 'string' ? dropdownState : (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8958
|
+
let dropdownClassName = typeof dropdownState === 'string' ? dropdownState : (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.dropdown, { [_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.dropdownReverse]: dropdownState });
|
|
8973
8959
|
if (onDropdownClick !== undefined) {
|
|
8974
8960
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: onDropdownClick, className: dropdownClassName, children: dropdownIcon });
|
|
8975
8961
|
}
|
|
@@ -8981,9 +8967,9 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8981
8967
|
const buttonIcon = typeof button === "boolean" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.XCloseSVG, {}) : button;
|
|
8982
8968
|
let buttonClassName;
|
|
8983
8969
|
if (['red', 'gray'].includes(buttonState)) {
|
|
8984
|
-
buttonClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8985
|
-
[
|
|
8986
|
-
[
|
|
8970
|
+
buttonClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.button, {
|
|
8971
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.gray]: buttonState === 'gray',
|
|
8972
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.red]: buttonState === 'red'
|
|
8987
8973
|
});
|
|
8988
8974
|
}
|
|
8989
8975
|
else if (typeof buttonState === "string") {
|
|
@@ -8994,11 +8980,11 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8994
8980
|
}
|
|
8995
8981
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { onClick: onButtonClick, className: buttonClassName, children: buttonIcon });
|
|
8996
8982
|
};
|
|
8997
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { ref: ref, onClick: onClick, className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8998
|
-
[
|
|
8999
|
-
[
|
|
9000
|
-
[
|
|
9001
|
-
[
|
|
8983
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { ref: ref, onClick: onClick, className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.flexField, {
|
|
8984
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.isError]: isError,
|
|
8985
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.disabled]: disabled,
|
|
8986
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.focus]: isFocus && !offFocus,
|
|
8987
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.pointer]: !!onClick,
|
|
9002
8988
|
}), children: [getIcon(), getTextSupport(), getUserPic(), getInput(), getHelp(), getDropdown(), getButton()] }));
|
|
9003
8989
|
});
|
|
9004
8990
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FlexField);
|
|
@@ -9086,18 +9072,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9086
9072
|
|
|
9087
9073
|
|
|
9088
9074
|
|
|
9089
|
-
function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, helperLink, isError, viewRequired,
|
|
9075
|
+
function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, helperLink, isError, viewRequired,
|
|
9076
|
+
// className = InputFieldWrapperStyle,
|
|
9077
|
+
}) {
|
|
9090
9078
|
const getLabelContent = () => {
|
|
9091
9079
|
if (labelText) {
|
|
9092
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className:
|
|
9080
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.labelText, children: [labelText, viewRequired && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.required, children: "*" })] }));
|
|
9093
9081
|
}
|
|
9094
9082
|
return undefined;
|
|
9095
9083
|
};
|
|
9096
9084
|
const getHintContent = () => {
|
|
9097
9085
|
if (isError && isErrorHintText)
|
|
9098
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
9086
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.hintError, children: isErrorHintText });
|
|
9099
9087
|
if (hintText)
|
|
9100
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
9088
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.hintText, children: hintText });
|
|
9101
9089
|
return undefined;
|
|
9102
9090
|
};
|
|
9103
9091
|
const getHelperLinkContent = () => {
|
|
@@ -9105,19 +9093,19 @@ function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, hel
|
|
|
9105
9093
|
if ('element' in helperLink)
|
|
9106
9094
|
return helperLink.element;
|
|
9107
9095
|
if ('href' in helperLink) {
|
|
9108
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: helperLink.href, className:
|
|
9096
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: helperLink.href, className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.helperLink, children: helperLink.text });
|
|
9109
9097
|
}
|
|
9110
9098
|
if ('onClick' in helperLink) {
|
|
9111
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { onClick: helperLink.onClick, className:
|
|
9099
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { onClick: helperLink.onClick, className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.helperLink, children: helperLink.text });
|
|
9112
9100
|
}
|
|
9113
9101
|
else {
|
|
9114
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
9102
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.helperLink, children: helperLink.text });
|
|
9115
9103
|
}
|
|
9116
9104
|
}
|
|
9117
9105
|
return undefined;
|
|
9118
9106
|
};
|
|
9119
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
9120
|
-
[
|
|
9107
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.inputFieldWrapper, {
|
|
9108
|
+
[_styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.isError]: isError,
|
|
9121
9109
|
}), children: [getLabelContent(), children, getHintContent(), getHelperLinkContent()] }));
|
|
9122
9110
|
}
|
|
9123
9111
|
|
|
@@ -9141,23 +9129,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9141
9129
|
|
|
9142
9130
|
|
|
9143
9131
|
|
|
9144
|
-
/***/ }),
|
|
9145
|
-
|
|
9146
|
-
/***/ "./src/ui/InputFields/InputField/styles/index.ts":
|
|
9147
|
-
/*!*******************************************************!*\
|
|
9148
|
-
!*** ./src/ui/InputFields/InputField/styles/index.ts ***!
|
|
9149
|
-
\*******************************************************/
|
|
9150
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9151
|
-
|
|
9152
|
-
"use strict";
|
|
9153
|
-
__webpack_require__.r(__webpack_exports__);
|
|
9154
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9155
|
-
/* harmony export */ InputFieldStyle: () => (/* reexport safe */ _InputField_module_scss__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
9156
|
-
/* harmony export */ });
|
|
9157
|
-
/* harmony import */ var _InputField_module_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InputField.module.scss */ "./src/ui/InputFields/InputField/styles/InputField.module.scss");
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
9132
|
/***/ }),
|
|
9162
9133
|
|
|
9163
9134
|
/***/ "./src/ui/InputFields/InputField/types/InputFieldTypes.ts":
|
|
@@ -9200,29 +9171,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9200
9171
|
/* harmony export */ });
|
|
9201
9172
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
9202
9173
|
/* harmony import */ var _InputFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../InputFields */ "./src/ui/InputFields/index.ts");
|
|
9203
|
-
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/InputField/styles/index.ts");
|
|
9204
9174
|
|
|
9205
9175
|
|
|
9206
|
-
|
|
9207
|
-
|
|
9176
|
+
function InputField({ type, offWrapper,
|
|
9177
|
+
// className = InputFieldStyle,
|
|
9178
|
+
...props }) {
|
|
9208
9179
|
const getField = () => {
|
|
9209
9180
|
switch (type) {
|
|
9210
9181
|
case 'select':
|
|
9211
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SelectField, { ...props
|
|
9182
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SelectField, { ...props });
|
|
9212
9183
|
case 'radio':
|
|
9213
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.RadioField, { ...props
|
|
9184
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.RadioField, { ...props });
|
|
9214
9185
|
case 'switcher':
|
|
9215
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SwitcherField, { ...props
|
|
9186
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SwitcherField, { ...props });
|
|
9216
9187
|
case 'textarea':
|
|
9217
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.TextareaField, { ...props
|
|
9188
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.TextareaField, { ...props });
|
|
9218
9189
|
default:
|
|
9219
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.FlexField, { ...props, type: type
|
|
9190
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.FlexField, { ...props, type: type });
|
|
9220
9191
|
}
|
|
9221
9192
|
};
|
|
9222
9193
|
if (offWrapper) {
|
|
9223
9194
|
return getField();
|
|
9224
9195
|
}
|
|
9225
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.InputFieldWrapper, { ...props, viewRequired: props.viewRequired !== undefined ? props.viewRequired : props.required,
|
|
9196
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.InputFieldWrapper, { ...props, viewRequired: props.viewRequired !== undefined ? props.viewRequired : props.required, children: getField() }));
|
|
9226
9197
|
}
|
|
9227
9198
|
|
|
9228
9199
|
|
|
@@ -9320,14 +9291,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9320
9291
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
9321
9292
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9322
9293
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9323
|
-
/* harmony import */ var
|
|
9324
|
-
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
9294
|
+
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
9325
9295
|
'use client';
|
|
9326
9296
|
|
|
9327
9297
|
|
|
9328
9298
|
|
|
9329
|
-
|
|
9330
|
-
|
|
9299
|
+
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false,
|
|
9300
|
+
// className = RadioFieldStyle,
|
|
9301
|
+
}) {
|
|
9331
9302
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
9332
9303
|
if (required && options[0] && (value === undefined || Array.isArray(value) && value.length === 0)) {
|
|
9333
9304
|
onChange && onChange(options[0].value);
|
|
@@ -9379,7 +9350,7 @@ function RadioField({ value, onChange, options = [], required = false, multiple
|
|
|
9379
9350
|
return JSON.stringify(value) === JSON.stringify(option.value);
|
|
9380
9351
|
}
|
|
9381
9352
|
};
|
|
9382
|
-
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)(
|
|
9353
|
+
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 }, idx)) }));
|
|
9383
9354
|
}
|
|
9384
9355
|
|
|
9385
9356
|
|
|
@@ -9400,16 +9371,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9400
9371
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9401
9372
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9402
9373
|
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
|
|
9374
|
+
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/RadioField/styles/index.ts");
|
|
9403
9375
|
|
|
9404
9376
|
|
|
9405
9377
|
|
|
9406
|
-
|
|
9378
|
+
|
|
9379
|
+
function RadioFieldItem({ option, onClick, active = false, disabled = false,
|
|
9380
|
+
// className,
|
|
9381
|
+
}) {
|
|
9407
9382
|
if (option.component) {
|
|
9408
9383
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(option.component, { onClick: onClick, active: active, disabled: disabled });
|
|
9409
9384
|
}
|
|
9410
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: onClick, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
|
9411
|
-
[
|
|
9412
|
-
}), children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className:
|
|
9385
|
+
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, {
|
|
9386
|
+
[_styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.active]: active,
|
|
9387
|
+
}), 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 })] }));
|
|
9413
9388
|
}
|
|
9414
9389
|
|
|
9415
9390
|
|
|
@@ -9603,11 +9578,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9603
9578
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
9604
9579
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9605
9580
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9606
|
-
/* harmony import */ var
|
|
9607
|
-
/* harmony import */ var
|
|
9608
|
-
/* harmony import */ var
|
|
9609
|
-
/* harmony import */ var
|
|
9610
|
-
/* harmony import */ var
|
|
9581
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
|
|
9582
|
+
/* harmony import */ var _FlexField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../FlexField */ "./src/ui/InputFields/FlexField/index.ts");
|
|
9583
|
+
/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib */ "./src/ui/InputFields/SelectField/lib/index.ts");
|
|
9584
|
+
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/SelectField/styles/index.ts");
|
|
9585
|
+
/* harmony import */ var _SelectModalWindow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SelectModalWindow */ "./src/ui/InputFields/SelectField/ui/SelectModalWindow.tsx");
|
|
9611
9586
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config */ "./src/ui/InputFields/SelectField/config/index.ts");
|
|
9612
9587
|
|
|
9613
9588
|
|
|
@@ -9671,7 +9646,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9671
9646
|
};
|
|
9672
9647
|
const getViewField = () => {
|
|
9673
9648
|
if (searching !== undefined) {
|
|
9674
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
9649
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_3__.FlexField, { value: isFocus ? searchingString : (0,_lib__WEBPACK_IMPORTED_MODULE_4__.getStringValue)(value, optionsCacheRef.current), onChange: (searchString) => {
|
|
9675
9650
|
if (isFocus) {
|
|
9676
9651
|
setSearchingString(searchString);
|
|
9677
9652
|
if (searchingTimeoutRef.current != null) {
|
|
@@ -9690,7 +9665,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9690
9665
|
// onBlur && onBlur()
|
|
9691
9666
|
}, onDropdownClick: () => setIsShowModalWindow(prevState => !prevState), isError: isError, placeholder: placeholder, dropdown: true, dropdownState: isShowModalWindow, ref: inputRef, ...props });
|
|
9692
9667
|
}
|
|
9693
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
9668
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_3__.FlexField, { value: (0,_lib__WEBPACK_IMPORTED_MODULE_4__.getStringValue)(value, optionsCacheRef.current), isError: isError, disabled: disabled, placeholder: placeholder, notInput: true, onClick: () => setIsShowModalWindow(prevState => !prevState), dropdown: true, dropdownState: isShowModalWindow, ref: inputRef, ...props });
|
|
9694
9669
|
};
|
|
9695
9670
|
const processLoadMoreOptions = async () => {
|
|
9696
9671
|
if (requestPromiseRef.current)
|
|
@@ -9724,11 +9699,11 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9724
9699
|
processLoadMoreOptions();
|
|
9725
9700
|
}
|
|
9726
9701
|
};
|
|
9727
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className:
|
|
9702
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.SelectFieldStyle.selectField, children: [getViewField(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.ModalWindowWrapper, { isShow: isShowModalWindow, setIsShow: (newValue) => {
|
|
9728
9703
|
if (newValue === false && onBlur)
|
|
9729
9704
|
onBlur();
|
|
9730
9705
|
setIsShowModalWindow(newValue);
|
|
9731
|
-
}, additionElements: [inputRef.current], className:
|
|
9706
|
+
}, additionElements: [inputRef.current], className: _styles__WEBPACK_IMPORTED_MODULE_5__.SelectFieldStyle.modalWindow, children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_SelectModalWindow__WEBPACK_IMPORTED_MODULE_6__["default"], { value: value, options: optionsState, onChange: handleChange, afterElement: selectModalWindowAfterElement, show: isShowModalWindow, onScrollToBottom: onScrollToBottom }) })] }));
|
|
9732
9707
|
}
|
|
9733
9708
|
|
|
9734
9709
|
|
|
@@ -9910,24 +9885,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9910
9885
|
|
|
9911
9886
|
|
|
9912
9887
|
|
|
9913
|
-
function SwitcherField({ value, onChange, children, disabled = false, switcherWrapper,
|
|
9888
|
+
function SwitcherField({ value, onChange, children, disabled = false, switcherWrapper,
|
|
9889
|
+
// className = SwitcherFieldStyle
|
|
9890
|
+
}) {
|
|
9914
9891
|
const handleChange = () => {
|
|
9915
9892
|
onChange && onChange(!value);
|
|
9916
9893
|
};
|
|
9917
|
-
const Switcher = ({ value,
|
|
9918
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { disabled: disabled, onClick: handleChange, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
|
9919
|
-
[
|
|
9894
|
+
const Switcher = ({ value, disabled }) => {
|
|
9895
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { disabled: disabled, onClick: handleChange, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_3__.SwitcherFieldStyle.switcherField, {
|
|
9896
|
+
[_styles__WEBPACK_IMPORTED_MODULE_3__.SwitcherFieldStyle.active]: !!value,
|
|
9920
9897
|
}), children: children }));
|
|
9921
9898
|
};
|
|
9922
9899
|
if (switcherWrapper !== undefined) {
|
|
9923
9900
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(switcherWrapper, {
|
|
9924
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, {
|
|
9901
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, { value: value,
|
|
9902
|
+
// className={className}
|
|
9903
|
+
disabled: disabled }),
|
|
9925
9904
|
value: value,
|
|
9926
9905
|
onChange: onChange,
|
|
9927
9906
|
disabled: disabled
|
|
9928
9907
|
});
|
|
9929
9908
|
}
|
|
9930
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, {
|
|
9909
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, { value: value,
|
|
9910
|
+
// className={className}
|
|
9911
|
+
disabled: disabled });
|
|
9931
9912
|
}
|
|
9932
9913
|
|
|
9933
9914
|
|
|
@@ -10013,14 +9994,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10013
9994
|
|
|
10014
9995
|
|
|
10015
9996
|
|
|
10016
|
-
function TextareaField({ value, name, placeholder, onChange, required = false, disabled = false, isError = false, offFocus = false, additionStyles,
|
|
9997
|
+
function TextareaField({ value, name, placeholder, onChange, required = false, disabled = false, isError = false, offFocus = false, additionStyles,
|
|
9998
|
+
// className = TextareaFieldStyle,
|
|
9999
|
+
}) {
|
|
10017
10000
|
const handleOnChange = (e) => {
|
|
10018
10001
|
e.preventDefault();
|
|
10019
10002
|
onChange && onChange(e.target.value);
|
|
10020
10003
|
};
|
|
10021
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value || '', onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
10022
|
-
[
|
|
10023
|
-
[
|
|
10004
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value || '', onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.textareaField, {
|
|
10005
|
+
[_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.isError]: isError,
|
|
10006
|
+
[_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.offFocus]: offFocus,
|
|
10024
10007
|
}, additionStyles) }));
|
|
10025
10008
|
}
|
|
10026
10009
|
|