oolib 2.42.4 → 2.44.0
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.
|
@@ -97,12 +97,13 @@ var DisplayIcon = function (_a) {
|
|
|
97
97
|
return (react_1.default.createElement("div", { style: { cursor: onClick ? 'pointer' : '', display: 'flex' }, onMouseDown: onClick || null }, IconComp && react_1.default.createElement(IconComp, { size: size, weight: "bold" })));
|
|
98
98
|
};
|
|
99
99
|
var TextInput = function (props) {
|
|
100
|
-
var id = props.id, invert = props.invert, disabled = props.disabled, icon = props.icon, type = props.type, _a = props.placeholder, placeholder = _a === void 0 ? 'Enter Text...' : _a, _b = props.value, value = _b === void 0 ? '' : _b, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, iconOnClick = props.iconOnClick, eyeIcon = props.eyeIcon, S = props.S, validateOnBlur = props.validateOnBlur, validateOnMount = props.validateOnMount, actionBtn = props.actionBtn, className = props.className, maxLength = props.maxLength, DEPRECATED_maxNumLimiter = props.maxNumLimiter, forceFocus = props.forceFocus //sometimes, when some other elem is clicked, we wanna trigger focus on the textinput. eg. when on mobile, the search icon is clicked on the listingpage
|
|
100
|
+
var id = props.id, invert = props.invert, disabled = props.disabled, icon = props.icon, type = props.type, _a = props.placeholder, placeholder = _a === void 0 ? 'Enter Text...' : _a, _b = props.value, value = _b === void 0 ? '' : _b, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, iconOnClick = props.iconOnClick, eyeIcon = props.eyeIcon, S = props.S, validateOnBlur = props.validateOnBlur, validateOnMount = props.validateOnMount, actionBtn = props.actionBtn, clearBtn = props.clearBtn, className = props.className, maxLength = props.maxLength, DEPRECATED_maxNumLimiter = props.maxNumLimiter, forceFocus = props.forceFocus //sometimes, when some other elem is clicked, we wanna trigger focus on the textinput. eg. when on mobile, the search icon is clicked on the listingpage
|
|
101
101
|
;
|
|
102
102
|
var _c = (0, react_1.useState)(''), inputStatus = _c[0], setInputStatus = _c[1];
|
|
103
103
|
var composition = icon && !eyeIcon ? 'icon+text' : 'textOnly';
|
|
104
104
|
var size = S ? 'S' : 'M';
|
|
105
105
|
var actionBtnEnabaled = !!value && (type !== 'url' ? true : inputStatus.type === 'success');
|
|
106
|
+
var clearBtnEnabled = !!value && (type !== 'url' ? true : inputStatus.type === 'success');
|
|
106
107
|
var handleValidate = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
108
|
var value, res;
|
|
108
109
|
return __generator(this, function (_a) {
|
|
@@ -151,7 +152,8 @@ var TextInput = function (props) {
|
|
|
151
152
|
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: handleValidate, onFocus: onFocus, size: size, autoComplete: 'off' }),
|
|
152
153
|
inputStatus === 'loading' && (react_1.default.createElement("div", null,
|
|
153
154
|
react_1.default.createElement(LoadersAndProgress_1.LoaderCircle, { S: true, invert: invert }))),
|
|
154
|
-
|
|
155
|
+
clearBtn && (react_1.default.createElement(Buttons_1.ButtonGhost, { M: true, value: clearBtn.text, invert: clearBtn.invert, onClick: function () { return onChange(props.id, ''); }, disabled: !clearBtnEnabled, style: { marginRight: actionBtn ? '-1rem' : '-2rem' }, icon: clearBtn.icon })),
|
|
156
|
+
actionBtn && (react_1.default.createElement(Buttons_1.ButtonPrimary, { M: true, value: actionBtn.text, invert: actionBtn.invert, onClick: actionBtnEnabaled && actionBtn.onClick, disabled: !actionBtnEnabaled, style: { marginRight: '-2rem' }, icon: actionBtn.icon }))),
|
|
155
157
|
(inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.msg) && (react_1.default.createElement(index_styled_1.MsgContainer, { invert: invert, status: inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.type },
|
|
156
158
|
react_1.default.createElement(Typo_1.SANS_3, null,
|
|
157
159
|
inputStatus.msg,
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ModalBulbIcon = exports.KenyaFlag = exports.NigeriaFlag = exports.IndiaFlag = exports.BadgeVetted = exports.BadgeMod = exports.BadgeSuperAdmin = exports.BadgeAdmin = exports.OkeGoogleIcon = exports.LetterH = exports.LanguageIcon = exports.IndexIcon = void 0;
|
|
17
|
+
exports.ModalBulbIcon = exports.KenyaFlag = exports.NigeriaFlag = exports.IndiaFlag = exports.BadgeVetted = exports.BadgeMod = exports.BadgeSuperAdmin = exports.BadgeAdmin = exports.OkeGoogleIcon = exports.LetterH = exports.LanguageIcon = exports.MultipleImages = exports.IndexIcon = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var themes_1 = require("../../themes");
|
|
20
20
|
var comps_1 = require("../../utils/comps");
|
|
@@ -27,6 +27,14 @@ var IndexIcon = function (_a) {
|
|
|
27
27
|
react_1.default.createElement("path", { d: "M2.34375 11.25H8.90625", stroke: "#383838", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
28
28
|
};
|
|
29
29
|
exports.IndexIcon = IndexIcon;
|
|
30
|
+
var MultipleImages = function (props) { return (react_1.default.createElement("svg", { width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
31
|
+
react_1.default.createElement("path", { d: "M8.33325 16.8333H15.3124C15.6001 16.8333 15.8333 16.5807 15.8333 16.2691V6.56423C15.8333 6.25262 15.6001 6 15.3124 6H3.85409C3.56644 6 3.33325 6.25262 3.33325 6.56423V11.8333", stroke: "#383838", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
32
|
+
react_1.default.createElement("path", { d: "M16.3801 15.1667H17.8124C18.1001 15.1667 18.3333 14.8946 18.3333 14.559V4.10764C18.3333 3.77205 18.1001 3.5 17.8124 3.5H6.35409C6.06644 3.5 5.83325 3.77205 5.83325 4.10764V5.58333", stroke: "#383838", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
33
|
+
react_1.default.createElement("path", { d: "M3.33325 11.8333L6.20167 9.7499C6.25924 9.69488 6.32786 9.65118 6.40353 9.62136C6.47921 9.59153 6.56043 9.57617 6.64248 9.57617C6.72452 9.57617 6.80574 9.59153 6.88142 9.62136C6.9571 9.65118 7.02571 9.69488 7.08328 9.7499L10.4423 12.7536C10.4999 12.8086 10.5685 12.8523 10.6442 12.8821C10.7199 12.912 10.8011 12.9273 10.8831 12.9273C10.9652 12.9273 11.0464 12.912 11.1221 12.8821C11.1977 12.8523 11.2664 12.8086 11.3239 12.7536L12.917 11.254C12.9746 11.199 13.0432 11.1553 13.1189 11.1255C13.1946 11.0956 13.2758 11.0803 13.3578 11.0803C13.4399 11.0803 13.5211 11.0956 13.5968 11.1255C13.6724 11.1553 13.7411 11.199 13.7986 11.254L15.6279 13.0833", stroke: "#383838", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
34
|
+
react_1.default.createElement("path", { d: "M11.8547 9.33341C12.3101 9.33341 12.6793 8.96032 12.6793 8.50008C12.6793 8.03984 12.3101 7.66675 11.8547 7.66675C11.3992 7.66675 11.03 8.03984 11.03 8.50008C11.03 8.96032 11.3992 9.33341 11.8547 9.33341Z", fill: "#383838" }),
|
|
35
|
+
react_1.default.createElement("path", { d: "M4 14L4 19", stroke: "#383838", "stroke-width": "1.34998", "stroke-linecap": "round" }),
|
|
36
|
+
react_1.default.createElement("path", { d: "M1.5 16.5H6.5", stroke: "#383838", "stroke-width": "1.34998", "stroke-linecap": "round" }))); };
|
|
37
|
+
exports.MultipleImages = MultipleImages;
|
|
30
38
|
var LanguageIcon = function (_a) {
|
|
31
39
|
var _b = _a.color, color = _b === void 0 ? greyColor100 : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
32
40
|
return (react_1.default.createElement("svg", { width: size, height: size, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ export namespace icons {
|
|
|
98
98
|
export { IndiaFlag };
|
|
99
99
|
export { KenyaFlag };
|
|
100
100
|
export { NigeriaFlag };
|
|
101
|
+
export { MultipleImages };
|
|
101
102
|
export { LightbulbFilament };
|
|
102
103
|
export { ModalBulbIcon };
|
|
103
104
|
export { Keyboard };
|
|
@@ -202,6 +203,7 @@ import { BadgeVetted } from "./custom";
|
|
|
202
203
|
import { IndiaFlag } from "./custom";
|
|
203
204
|
import { KenyaFlag } from "./custom";
|
|
204
205
|
import { NigeriaFlag } from "./custom";
|
|
206
|
+
import { MultipleImages } from "./custom";
|
|
205
207
|
import { LightbulbFilament } from "phosphor-react";
|
|
206
208
|
import { ModalBulbIcon } from "./custom";
|
|
207
209
|
import { Keyboard } from "phosphor-react";
|
package/dist/icons/index.js
CHANGED
|
@@ -104,6 +104,7 @@ exports.icons = {
|
|
|
104
104
|
IndiaFlag: custom_1.IndiaFlag,
|
|
105
105
|
KenyaFlag: custom_1.KenyaFlag,
|
|
106
106
|
NigeriaFlag: custom_1.NigeriaFlag,
|
|
107
|
+
MultipleImages: custom_1.MultipleImages,
|
|
107
108
|
LightbulbFilament: phosphor_react_1.LightbulbFilament,
|
|
108
109
|
ModalBulbIcon: custom_1.ModalBulbIcon,
|
|
109
110
|
Keyboard: phosphor_react_1.Keyboard,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oolib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.44.0",
|
|
4
4
|
"description": " OKE Component Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"semantic-release": "^18.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
+
"framer-motion": "^4.1.17",
|
|
52
53
|
"react": "^17.0.2",
|
|
53
54
|
"react-dom": "^17.0.2",
|
|
54
55
|
"react-router-dom": "^5.1.2",
|
|
55
|
-
"styled-components": "^5.3.3"
|
|
56
|
-
"framer-motion": "^4.1.17"
|
|
56
|
+
"styled-components": "^5.3.3"
|
|
57
57
|
},
|
|
58
58
|
"config": {
|
|
59
59
|
"commitizen": {
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"immutable": "^3.7.6",
|
|
71
71
|
"lodash": "^4.17.21",
|
|
72
72
|
"modularscale-js": "^3.0.1",
|
|
73
|
-
"phosphor-react": "^1.
|
|
73
|
+
"phosphor-react": "^1.4.1"
|
|
74
74
|
}
|
|
75
75
|
}
|