oolib 2.52.0 → 2.52.2
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.
|
@@ -91,6 +91,7 @@ var Buttons_1 = require("../Buttons");
|
|
|
91
91
|
var _EXPORTS_1 = require("../../utils/_EXPORTS");
|
|
92
92
|
var LoadersAndProgress_1 = require("../LoadersAndProgress");
|
|
93
93
|
var OKELink_1 = require("../OKELink");
|
|
94
|
+
var utilsOolib_1 = require("../../utilsOolib");
|
|
94
95
|
var DisplayIcon = function (_a) {
|
|
95
96
|
var icon = _a.icon, onClick = _a.onClick, size = _a.size;
|
|
96
97
|
var IconComp = icons_1.icons[icon];
|
|
@@ -107,8 +108,8 @@ var TextInput = function (props) {
|
|
|
107
108
|
}, [_validationStatus]);
|
|
108
109
|
var composition = icon && !eyeIcon ? "icon+text" : "textOnly";
|
|
109
110
|
var size = S ? "S" : "M";
|
|
110
|
-
var actionBtnEnabaled = !!value && (type !== "url" ? true : validationStatus.type === "success");
|
|
111
|
-
var clearBtnEnabled = !!value && (type !== "url" ? true : validationStatus.type === "success");
|
|
111
|
+
var actionBtnEnabaled = !!value && (type !== "url" ? true : (validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type) === "success");
|
|
112
|
+
var clearBtnEnabled = !!value && (type !== "url" ? true : (validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type) === "success");
|
|
112
113
|
var handleValidate = function (e, onBlur) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
114
|
var value, res;
|
|
114
115
|
return __generator(this, function (_a) {
|
|
@@ -157,13 +158,14 @@ var TextInput = function (props) {
|
|
|
157
158
|
(0, react_1.useEffect)(function () {
|
|
158
159
|
forceFocus && inputRef.current && inputRef.current.focus();
|
|
159
160
|
}, [forceFocus]);
|
|
161
|
+
var localize = (0, utilsOolib_1.useLocale)();
|
|
160
162
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
161
163
|
react_1.default.createElement("div", { className: className },
|
|
162
164
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, _EXPORTS_1.getBlockLabelProps)(props))),
|
|
163
165
|
readOnly ? (react_1.default.createElement(Typo_1.SANS_3, { invert: invert }, type === "password" ? "********" : value)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
164
166
|
react_1.default.createElement(index_styled_1.InputContainerStyled, { invert: invert, type: type, disabled: disabled, status: validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type, eyeIcon: eyeIcon, composition: composition, onClick: function () { return inputRef.current.focus(); } },
|
|
165
167
|
icon && (react_1.default.createElement(DisplayIcon, { icon: icon, size: S ? 15 : 20, onClick: iconOnClick || null })),
|
|
166
|
-
react_1.default.createElement(index_styled_1.InputStyled, { ref: inputRef, className: size === "S" ? "SANS_2" : "SANS_3", id: id, type: type, name: type, placeholder: placeholder, value: value, onChange: handleOnChange, maxLength: maxLength || DEPRECATED_maxNumLimiter, onBlur: validateOnlyOnBlur
|
|
168
|
+
react_1.default.createElement(index_styled_1.InputStyled, { ref: inputRef, className: size === "S" ? "SANS_2" : "SANS_3", id: id, type: type, name: type, placeholder: localize(placeholder), value: value, onChange: handleOnChange, maxLength: maxLength || DEPRECATED_maxNumLimiter, onBlur: validateOnlyOnBlur
|
|
167
169
|
? function (e) { return handleValidate(e, onBlur); }
|
|
168
170
|
: onBlur, onFocus: onFocus, size: size, autoComplete: "off" }),
|
|
169
171
|
validationStatus === "loading" && (react_1.default.createElement("div", null,
|
package/dist/index.d.ts
CHANGED
|
@@ -33,5 +33,7 @@ export { ModalSmall } from "./components/Modals/ModalSmall";
|
|
|
33
33
|
export { EmptyStates } from "./components/EmptyStates";
|
|
34
34
|
export { HomeCover } from "./components/HomeCover";
|
|
35
35
|
export { PageScrollIndicator } from "./components/PageScrollIndicator";
|
|
36
|
+
export { default as DatePicker } from "./components/DatePicker";
|
|
37
|
+
export { default as DateRangePicker } from "./components/DateRangePicker";
|
|
36
38
|
export { HintsProvider } from "./components/Hints/contextApi";
|
|
37
39
|
export { LoaderCircle, ProgressBar, LoaderCircle as Loader, LoaderOverlay } from "./components/LoadersAndProgress";
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
20
|
exports.HintsProvider = exports.DateRangePicker = exports.DatePicker = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.ModalLarge = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
|
|
18
21
|
//css and styling related ( styled-components )
|
|
@@ -77,9 +80,9 @@ Object.defineProperty(exports, "HomeCover", { enumerable: true, get: function ()
|
|
|
77
80
|
var PageScrollIndicator_1 = require("./components/PageScrollIndicator");
|
|
78
81
|
Object.defineProperty(exports, "PageScrollIndicator", { enumerable: true, get: function () { return PageScrollIndicator_1.PageScrollIndicator; } });
|
|
79
82
|
var DatePicker_1 = require("./components/DatePicker");
|
|
80
|
-
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return DatePicker_1.
|
|
83
|
+
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return __importDefault(DatePicker_1).default; } });
|
|
81
84
|
var DateRangePicker_1 = require("./components/DateRangePicker");
|
|
82
|
-
Object.defineProperty(exports, "DateRangePicker", { enumerable: true, get: function () { return DateRangePicker_1.
|
|
85
|
+
Object.defineProperty(exports, "DateRangePicker", { enumerable: true, get: function () { return __importDefault(DateRangePicker_1).default; } });
|
|
83
86
|
//// context
|
|
84
87
|
var contextApi_1 = require("./components/Hints/contextApi");
|
|
85
88
|
Object.defineProperty(exports, "HintsProvider", { enumerable: true, get: function () { return contextApi_1.HintsProvider; } });
|