oolib 2.97.0 → 2.99.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.
- package/dist/components/Modals/Modal/index.js +1 -9
- package/dist/components/TextInputs/index.js +3 -3
- package/dist/components/VideoInput/comps/EmbedLinkModal.js +11 -3
- package/dist/components/VideoInput/index.js +1 -0
- package/dist/icons/custom/index.d.ts +2 -0
- package/dist/icons/custom/index.js +17 -1
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +3 -1
- package/package.json +1 -1
|
@@ -88,15 +88,7 @@ var Modal = function (_a) {
|
|
|
88
88
|
? react_1.default.createElement(Buttons_1.ButtonPrimary, { onClick: onConfirm }, onConfirmText) // In some cases we want to pass button directly to the component as prop
|
|
89
89
|
: onConfirm,
|
|
90
90
|
showCloseBtn && react_1.default.createElement(Buttons_1.ButtonGhost, { onClick: onClose }, onCloseText)))))); };
|
|
91
|
-
|
|
92
|
-
(0, react_1.useEffect)(function () {
|
|
93
|
-
window.addEventListener('resize', setScreenHeight(window.visualViewport.height));
|
|
94
|
-
return function () {
|
|
95
|
-
window.removeEventListener('resize', setScreenHeight(window.visualViewport.height));
|
|
96
|
-
};
|
|
97
|
-
}, []);
|
|
98
|
-
var isKeyboardOpen = window.visualViewport.height < screenHeight;
|
|
99
|
-
return ((0, react_dom_1.createPortal)(react_1.default.createElement(styled_1.StyledModalLargeBg, { style: { height: isKeyboardOpen ? 'auto' : '100svh', overflow: 'hidden' } },
|
|
91
|
+
return ((0, react_dom_1.createPortal)(react_1.default.createElement(styled_1.StyledModalLargeBg, null,
|
|
100
92
|
react_1.default.createElement(styled_1.StyledModalLargeBgColor, { initial: { opacity: initAnimPos.opacity }, animate: { opacity: animPos.opacity }, transition: {
|
|
101
93
|
type: "tween",
|
|
102
94
|
ease: "easeOut",
|
|
@@ -102,8 +102,8 @@ var TextInput = function (props) {
|
|
|
102
102
|
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
|
|
103
103
|
_d = props.validateOnlyOnBlur, //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
|
|
104
104
|
validateOnlyOnBlur = _d === void 0 ? false : _d, //for example, in the login form we want validation to only run, once the text input is blurred. else it can be irritating
|
|
105
|
-
_validationStatus = props.validationStatus;
|
|
106
|
-
var
|
|
105
|
+
_validationStatus = props.validationStatus, _e = props.displayValidationMsg, displayValidationMsg = _e === void 0 ? true : _e;
|
|
106
|
+
var _f = (0, react_1.useState)(_validationStatus), validationStatus = _f[0], setValidationStatus = _f[1];
|
|
107
107
|
(0, react_1.useEffect)(function () {
|
|
108
108
|
setValidationStatus(_validationStatus);
|
|
109
109
|
}, [_validationStatus]);
|
|
@@ -173,7 +173,7 @@ var TextInput = function (props) {
|
|
|
173
173
|
react_1.default.createElement(LoadersAndProgress_1.LoaderCircle, { S: true, invert: invert }))),
|
|
174
174
|
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" } })),
|
|
175
175
|
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" } }))),
|
|
176
|
-
(validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.msg) && (react_1.default.createElement(index_styled_1.MsgContainer, { invert: invert, status: validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type },
|
|
176
|
+
(displayValidationMsg && (validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.msg)) && (react_1.default.createElement(index_styled_1.MsgContainer, { invert: invert, status: validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type },
|
|
177
177
|
react_1.default.createElement(Typo_1.SANS_3, null,
|
|
178
178
|
validationStatus.msg,
|
|
179
179
|
validationStatus.link && (react_1.default.createElement(OKELink_1.OKELink, { style: { marginLeft: "1rem" }, to: validationStatus.link.to }, validationStatus.link.text))))))))));
|
|
@@ -34,15 +34,23 @@ var EmbedLinkModal = function (_a) {
|
|
|
34
34
|
var _b;
|
|
35
35
|
var id = _a.id, setShowEmbedLinkModal = _a.setShowEmbedLinkModal, value = _a.value, createVideoPreview = _a.createVideoPreview, canPlay = _a.canPlay, onChange = _a.onChange, invert = _a.invert;
|
|
36
36
|
var _c = (0, react_1.useState)(value), localValue = _c[0], setLocalValue = _c[1];
|
|
37
|
+
var _d = (0, react_1.useState)(false), isValidURl = _d[0], setIsValidUrl = _d[1];
|
|
37
38
|
return (react_1.default.createElement(Modal_1.Modal, { title: "Add URL Embed", subTitle: "Paste the link of the video you want to share. ",
|
|
38
39
|
// invert={invert}
|
|
39
40
|
desktopWidth: "50vw", fitToContentHeight: true, onClose: function () {
|
|
40
41
|
setShowEmbedLinkModal(false);
|
|
41
42
|
} },
|
|
42
43
|
react_1.default.createElement("div", { style: { padding: '2rem' } },
|
|
43
|
-
react_1.default.createElement(TextInputs_1.
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
react_1.default.createElement(TextInputs_1.URLInput, { icon: "LinkSimple", onChange: function (k, v) { return setLocalValue(v ? [{ publicUrl: v }] : undefined); }, value: localValue && ((_b = localValue[0]) === null || _b === void 0 ? void 0 : _b.publicUrl), placeholder: "Paste a url here", clearBtn: { text: 'clear' }, displayValidationMsg: false, passValidationErrorToFormValidation: function (status) {
|
|
45
|
+
if (status === "error") {
|
|
46
|
+
setIsValidUrl(false);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
setIsValidUrl(true);
|
|
50
|
+
}
|
|
51
|
+
} }),
|
|
52
|
+
(localValue && isValidURl) && react_1.default.createElement(Paddings_1.PaddingBottom20, null),
|
|
53
|
+
isValidURl && createVideoPreview({ value: localValue }),
|
|
46
54
|
react_1.default.createElement(styled_1.StyledModalActionButtons, null,
|
|
47
55
|
react_1.default.createElement(Buttons_1.ButtonPrimary, { value: "Embed", disabled: !canPlay(localValue) || !localValue,
|
|
48
56
|
// invert={invert}
|
|
@@ -59,3 +59,5 @@ export declare const MalaysiaFlag: (props: any) => React.JSX.Element;
|
|
|
59
59
|
export declare const UKFlag: (props: any) => React.JSX.Element;
|
|
60
60
|
export declare const USAFlag: (props: any) => React.JSX.Element;
|
|
61
61
|
export declare const IndonesiaFlag: (props: any) => React.JSX.Element;
|
|
62
|
+
export declare const ChileFlag: (props: any) => React.JSX.Element;
|
|
63
|
+
export declare const PakistanFlag: (props: any) => React.JSX.Element;
|
|
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.USAFlag = exports.UKFlag = exports.MalaysiaFlag = exports.ColombiaFlag = exports.BrazilFlag = exports.AudioEmbedIcon = exports.VideoEmbedIcon = exports.Attachment2 = exports.PDFIcon = exports.RichFormatToolOrderedList = exports.RichFormatToolUnorderedList = exports.RichFormatToolH2 = exports.RichFormatToolBlockquote = exports.LinkIcon = exports.UnderlineBtn = exports.ItalicBtn = exports.BoldBtn = exports.SettingsSM = exports.Close_S = exports.UploadImage = exports.KebabMenu = exports.Website_solid_SM = exports.Phone_solid_SM = exports.Mail_solid_SM = exports.Youtube_solid_SM = exports.Instagram_solid_SM = exports.Twitter_solid_SM = exports.Linkedin_solid_SM = exports.Facebook_solid_SM = exports.EditSM = exports.AddXS = exports.UploadSM = exports.Download = exports.Download__nofill = exports.Index = exports.Person14 = exports.Location14 = 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
|
-
exports.IndonesiaFlag = void 0;
|
|
18
|
+
exports.PakistanFlag = exports.ChileFlag = exports.IndonesiaFlag = void 0;
|
|
19
19
|
var react_1 = __importDefault(require("react"));
|
|
20
20
|
var themes_1 = require("../../themes");
|
|
21
21
|
var DisplayIcon_1 = require("../../utils/comps/DisplayIcon");
|
|
@@ -394,3 +394,19 @@ var IndonesiaFlag = function (props) {
|
|
|
394
394
|
react_1.default.createElement("path", { fill: "#EEE", d: "M36 27a4 4 0 01-4 4H4a4 4 0 01-4-4v-9h36v9z" })));
|
|
395
395
|
};
|
|
396
396
|
exports.IndonesiaFlag = IndonesiaFlag;
|
|
397
|
+
var ChileFlag = function (props) {
|
|
398
|
+
return (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 30, height: 30, fill: "none", viewBox: "-4 -4 24 16" },
|
|
399
|
+
react_1.default.createElement("path", { d: "M20 12H-4V-4h24z", fill: "#d52b1e" }),
|
|
400
|
+
react_1.default.createElement("path", { d: "M4 4h16v-8H-4z", fill: "#fff" }),
|
|
401
|
+
react_1.default.createElement("path", { d: "M4 4h-8v-8h8z", fill: "#0039a6" })));
|
|
402
|
+
};
|
|
403
|
+
exports.ChileFlag = ChileFlag;
|
|
404
|
+
var PakistanFlag = function (props) {
|
|
405
|
+
return (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 30, height: 30, fill: "none", viewBox: "-75 -40 120 80" },
|
|
406
|
+
react_1.default.createElement("path", { fill: "#fff", d: "M-75-40H45v80H-75z" }),
|
|
407
|
+
react_1.default.createElement("path", { fill: "#01411C", d: "M-45-40h90v80h-90z" }),
|
|
408
|
+
react_1.default.createElement("circle", { r: "24", fill: "#fff" }),
|
|
409
|
+
react_1.default.createElement("circle", { r: "22", cx: "-7", cy: "-40", fill: "#01411C", transform: "rotate(-41.634 45 -40)" }),
|
|
410
|
+
react_1.default.createElement("path", { fill: "#fff", d: "M8.751-17.959l10.11 11.373L3.997-9.844l13.94-6.1-7.692 13.129z" })));
|
|
411
|
+
};
|
|
412
|
+
exports.PakistanFlag = PakistanFlag;
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -160,6 +160,8 @@ export namespace icons {
|
|
|
160
160
|
export { MalaysiaFlag };
|
|
161
161
|
export { BrazilFlag };
|
|
162
162
|
export { ColombiaFlag };
|
|
163
|
+
export { ChileFlag };
|
|
164
|
+
export { PakistanFlag };
|
|
163
165
|
}
|
|
164
166
|
import { PencilSimple } from "phosphor-react";
|
|
165
167
|
import { PencilLine } from "phosphor-react";
|
|
@@ -322,3 +324,5 @@ import { UKFlag } from "./custom";
|
|
|
322
324
|
import { MalaysiaFlag } from "./custom";
|
|
323
325
|
import { BrazilFlag } from "./custom";
|
|
324
326
|
import { ColombiaFlag } from "./custom";
|
|
327
|
+
import { ChileFlag } from "./custom";
|
|
328
|
+
import { PakistanFlag } from "./custom";
|
package/dist/icons/index.js
CHANGED
|
@@ -165,5 +165,7 @@ exports.icons = {
|
|
|
165
165
|
UKFlag: custom_1.UKFlag,
|
|
166
166
|
MalaysiaFlag: custom_1.MalaysiaFlag,
|
|
167
167
|
BrazilFlag: custom_1.BrazilFlag,
|
|
168
|
-
ColombiaFlag: custom_1.ColombiaFlag
|
|
168
|
+
ColombiaFlag: custom_1.ColombiaFlag,
|
|
169
|
+
ChileFlag: custom_1.ChileFlag,
|
|
170
|
+
PakistanFlag: custom_1.PakistanFlag
|
|
169
171
|
};
|