indicator-ui 0.0.145 → 0.0.147
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 -59
- package/dist/index.css.map +1 -1
- package/dist/index.js +8 -54
- 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/FlexField/types/FlexFieldTypes.d.ts +1 -0
- package/dist/types/src/ui/InputFields/FlexField/ui/FlexField.d.ts +1 -0
- package/dist/types/src/ui/InputFields/InputFieldWrapper/types/InputFieldWrapperTypes.d.ts +1 -0
- package/dist/types/src/ui/InputFields/InputFieldWrapper/ui/InputFieldWrapper.d.ts +1 -1
- package/dist/types/src/ui/InputFields/SwitcherField/types/SwitcherFieldTypes.d.ts +3 -3
- package/dist/types/src/ui/InputFields/SwitcherField/ui/SwitcherField.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3230,22 +3230,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3230
3230
|
|
|
3231
3231
|
/***/ }),
|
|
3232
3232
|
|
|
3233
|
-
/***/ "./src/ui/InputFields/SwitcherField/styles/SwitcherField.module.scss":
|
|
3234
|
-
/*!***************************************************************************!*\
|
|
3235
|
-
!*** ./src/ui/InputFields/SwitcherField/styles/SwitcherField.module.scss ***!
|
|
3236
|
-
\***************************************************************************/
|
|
3237
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3238
|
-
|
|
3239
|
-
"use strict";
|
|
3240
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3241
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3242
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3243
|
-
/* harmony export */ });
|
|
3244
|
-
// extracted by mini-css-extract-plugin
|
|
3245
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"switcherField":"SwitcherField-module__switcherField___R9atT","active":"SwitcherField-module__active___p_7P5"});
|
|
3246
|
-
|
|
3247
|
-
/***/ }),
|
|
3248
|
-
|
|
3249
3233
|
/***/ "./src/ui/InputFields/TextareaField/styles/TextareaField.module.scss":
|
|
3250
3234
|
/*!***************************************************************************!*\
|
|
3251
3235
|
!*** ./src/ui/InputFields/TextareaField/styles/TextareaField.module.scss ***!
|
|
@@ -9731,7 +9715,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9731
9715
|
|
|
9732
9716
|
|
|
9733
9717
|
|
|
9734
|
-
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,
|
|
9718
|
+
const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, type, onChange, onFocus, name, 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,
|
|
9735
9719
|
// className = FlexFieldStyle,
|
|
9736
9720
|
}, ref) => {
|
|
9737
9721
|
const [isFocus, setIsFocus] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
@@ -9751,7 +9735,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
9751
9735
|
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 }));
|
|
9752
9736
|
}
|
|
9753
9737
|
let validValue = typeof value === 'string' ? value : '';
|
|
9754
|
-
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 });
|
|
9738
|
+
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, id: name, name: name, className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.inputField });
|
|
9755
9739
|
};
|
|
9756
9740
|
const getIcon = () => {
|
|
9757
9741
|
return icon ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.icon, children: icon }) : undefined;
|
|
@@ -9906,7 +9890,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9906
9890
|
|
|
9907
9891
|
|
|
9908
9892
|
|
|
9909
|
-
function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, helperLink, isError, viewRequired, additionStyle, }) {
|
|
9893
|
+
function InputFieldWrapper({ children, labelText, hintText, name, isErrorHintText, helperLink, isError, viewRequired, additionStyle, }) {
|
|
9910
9894
|
const getClassName = (type) => {
|
|
9911
9895
|
if ((typeof additionStyle === "string" || Array.isArray(additionStyle))) {
|
|
9912
9896
|
if (type === 'main') {
|
|
@@ -9931,7 +9915,7 @@ function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, hel
|
|
|
9931
9915
|
};
|
|
9932
9916
|
const getLabelContent = () => {
|
|
9933
9917
|
if (labelText) {
|
|
9934
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.labelText, getClassName('label')), children: [labelText, viewRequired && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.required, children: "*" })] }));
|
|
9918
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { htmlFor: name, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.labelText, getClassName('label')), children: [labelText, viewRequired && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.required, children: "*" })] }));
|
|
9935
9919
|
}
|
|
9936
9920
|
return undefined;
|
|
9937
9921
|
};
|
|
@@ -10685,23 +10669,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10685
10669
|
|
|
10686
10670
|
|
|
10687
10671
|
|
|
10688
|
-
/***/ }),
|
|
10689
|
-
|
|
10690
|
-
/***/ "./src/ui/InputFields/SwitcherField/styles/index.ts":
|
|
10691
|
-
/*!**********************************************************!*\
|
|
10692
|
-
!*** ./src/ui/InputFields/SwitcherField/styles/index.ts ***!
|
|
10693
|
-
\**********************************************************/
|
|
10694
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10695
|
-
|
|
10696
|
-
"use strict";
|
|
10697
|
-
__webpack_require__.r(__webpack_exports__);
|
|
10698
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10699
|
-
/* harmony export */ SwitcherFieldStyle: () => (/* reexport safe */ _SwitcherField_module_scss__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
10700
|
-
/* harmony export */ });
|
|
10701
|
-
/* harmony import */ var _SwitcherField_module_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SwitcherField.module.scss */ "./src/ui/InputFields/SwitcherField/styles/SwitcherField.module.scss");
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
10672
|
/***/ }),
|
|
10706
10673
|
|
|
10707
10674
|
/***/ "./src/ui/InputFields/SwitcherField/types/SwitcherFieldTypes.ts":
|
|
@@ -10745,36 +10712,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10745
10712
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
10746
10713
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
10747
10714
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
10748
|
-
/* harmony import */ var
|
|
10749
|
-
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/SwitcherField/styles/index.ts");
|
|
10750
|
-
|
|
10715
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
|
|
10751
10716
|
|
|
10752
10717
|
|
|
10753
10718
|
|
|
10754
|
-
function SwitcherField({ value, onChange,
|
|
10755
|
-
// className = SwitcherFieldStyle
|
|
10756
|
-
}) {
|
|
10719
|
+
function SwitcherField({ value, onChange, disabled = false, switcherWrapper, ...props }) {
|
|
10757
10720
|
const handleChange = () => {
|
|
10758
10721
|
onChange && onChange(!value);
|
|
10759
10722
|
};
|
|
10760
|
-
const Switcher = ({ value, disabled }) => {
|
|
10761
|
-
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, {
|
|
10762
|
-
[_styles__WEBPACK_IMPORTED_MODULE_3__.SwitcherFieldStyle.active]: !!value,
|
|
10763
|
-
}), children: children }));
|
|
10764
|
-
};
|
|
10765
10723
|
if (switcherWrapper !== undefined) {
|
|
10766
10724
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(switcherWrapper, {
|
|
10767
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
10768
|
-
// className={className}
|
|
10769
|
-
disabled: disabled }),
|
|
10725
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.ToggleBase, { active: value, onClick: handleChange, disabled: disabled }),
|
|
10770
10726
|
value: value,
|
|
10771
10727
|
onChange: onChange,
|
|
10772
10728
|
disabled: disabled
|
|
10773
10729
|
});
|
|
10774
10730
|
}
|
|
10775
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
10776
|
-
// className={className}
|
|
10777
|
-
disabled: disabled });
|
|
10731
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.Toggle, { active: value, onClick: handleChange, disabled: disabled, ...props });
|
|
10778
10732
|
}
|
|
10779
10733
|
|
|
10780
10734
|
|