oolib 2.89.2 → 2.90.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/Dropdowns/utils/genColor.js +2 -0
- package/dist/components/Modals/derivedComps/ModalConfirmAction/index.js +10 -0
- package/dist/components/Modals/derivedComps/ModalSmall/index.d.ts +15 -0
- package/dist/components/Modals/derivedComps/ModalSmall/index.js +13 -0
- package/dist/components/TextInputs/index.js +2 -2
- package/dist/components/VideoInput/comps/EmbedLinkModal.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@ exports.genColor = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var genColor = function (_a) {
|
|
9
9
|
var color = _a.color;
|
|
10
|
+
if (!color)
|
|
11
|
+
return null;
|
|
10
12
|
return (react_1.default.createElement("div", { style: { flex: "0 0 auto" } },
|
|
11
13
|
react_1.default.createElement("div", { style: { width: '2rem', height: '2rem', background: color, borderRadius: '10%' } })));
|
|
12
14
|
};
|
|
@@ -26,6 +26,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.ModalConfirmAction = void 0;
|
|
27
27
|
var react_1 = __importStar(require("react"));
|
|
28
28
|
var ModalConfirm_1 = require("../../ModalConfirm");
|
|
29
|
+
/*
|
|
30
|
+
@description :
|
|
31
|
+
it is a wrapper comp for comps which have a onClick prop ex- button comps. When you click the button,
|
|
32
|
+
it shows a ModalConfirm comp asking for confirmation. If you say "yes" in the ModalConfirm, it does what the button was supposed to do in the first place.
|
|
33
|
+
|
|
34
|
+
VERY IMPORTANT : Wrapping a comp is not enough, the prop enable should be passed as true, which is by default false
|
|
35
|
+
|
|
36
|
+
Check the ModalConfirmAction.stories.js for component usage
|
|
37
|
+
|
|
38
|
+
*/
|
|
29
39
|
function ModalConfirmAction(_a) {
|
|
30
40
|
var children = _a.children, _b = _a.enabled, enabled = _b === void 0 ? false : _b, _c = _a.title, title = _c === void 0 ? "Are you sure you want to do this action" : _c, subtitle = _a.subtitle, onConfirmText = _a.onConfirmText, onCloseText = _a.onCloseText;
|
|
31
41
|
var _d = (0, react_1.useState)(false), modal = _d[0], setModal = _d[1];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function ModalSmall({ title, onClose, invert, showActionPanel, onCloseText, onConfirm, onConfirmText, overflowVisible, fitToContentHeight, alignActions, desktopWidth, children }: {
|
|
2
|
+
title: any;
|
|
3
|
+
onClose: any;
|
|
4
|
+
invert: any;
|
|
5
|
+
showActionPanel: any;
|
|
6
|
+
onCloseText?: string;
|
|
7
|
+
onConfirm: any;
|
|
8
|
+
onConfirmText?: string;
|
|
9
|
+
overflowVisible?: boolean;
|
|
10
|
+
fitToContentHeight?: boolean;
|
|
11
|
+
alignActions?: string;
|
|
12
|
+
desktopWidth?: string;
|
|
13
|
+
children: any;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
import React from "react";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ModalSmall = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var Modal_1 = require("../../Modal");
|
|
9
|
+
var ModalSmall = function (_a) {
|
|
10
|
+
var title = _a.title, onClose = _a.onClose, invert = _a.invert, showActionPanel = _a.showActionPanel, _b = _a.onCloseText, onCloseText = _b === void 0 ? "Close" : _b, onConfirm = _a.onConfirm, _c = _a.onConfirmText, onConfirmText = _c === void 0 ? "Confirm" : _c, _d = _a.overflowVisible, overflowVisible = _d === void 0 ? true : _d, _e = _a.fitToContentHeight, fitToContentHeight = _e === void 0 ? true : _e, _f = _a.alignActions, alignActions = _f === void 0 ? "right" : _f, _g = _a.desktopWidth, desktopWidth = _g === void 0 ? "50vw" : _g, children = _a.children;
|
|
11
|
+
return (react_1.default.createElement(Modal_1.Modal, { title: title, onClose: onClose, onCloseText: onCloseText, onConfirm: onConfirm, onConfirmText: onConfirmText, desktopWidth: desktopWidth, overflowVisible: overflowVisible, fitToContentHeight: fitToContentHeight, invert: invert, showActionPanel: showActionPanel, alignActions: alignActions, children: react_1.default.createElement("div", { style: { padding: "2rem" } }, children) }));
|
|
12
|
+
};
|
|
13
|
+
exports.ModalSmall = ModalSmall;
|
|
@@ -171,8 +171,8 @@ var TextInput = function (props) {
|
|
|
171
171
|
: onBlur, onFocus: onFocus, size: size, autoComplete: "off" }),
|
|
172
172
|
validationStatus === "loading" && (react_1.default.createElement("div", null,
|
|
173
173
|
react_1.default.createElement(LoadersAndProgress_1.LoaderCircle, { S: true, invert: invert }))),
|
|
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
|
-
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" }
|
|
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
|
+
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
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 },
|
|
177
177
|
react_1.default.createElement(Typo_1.SANS_3, null,
|
|
178
178
|
validationStatus.msg,
|
|
@@ -40,7 +40,7 @@ var EmbedLinkModal = function (_a) {
|
|
|
40
40
|
setShowEmbedLinkModal(false);
|
|
41
41
|
} },
|
|
42
42
|
react_1.default.createElement("div", { style: { padding: '2rem' } },
|
|
43
|
-
react_1.default.createElement(TextInputs_1.TextInput, { 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: {
|
|
43
|
+
react_1.default.createElement(TextInputs_1.TextInput, { 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' } }),
|
|
44
44
|
localValue && react_1.default.createElement(Paddings_1.PaddingBottom20, null),
|
|
45
45
|
createVideoPreview({ value: localValue }),
|
|
46
46
|
react_1.default.createElement(styled_1.StyledModalActionButtons, null,
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { SkeletonLoader } from "./components/LoadersAndProgress/SkeletonLoader";
|
|
|
30
30
|
export { ModalConfirm } from "./components/Modals/ModalConfirm";
|
|
31
31
|
export { ModalForms } from "./components/Modals/derivedComps/ModalForms";
|
|
32
32
|
export { Modal } from "./components/Modals/Modal";
|
|
33
|
+
export { ModalSmall } from "./components/Modals/derivedComps/ModalSmall";
|
|
33
34
|
export { EmptyStates } from "./components/EmptyStates";
|
|
34
35
|
export { HomeCover } from "./components/HomeCover";
|
|
35
36
|
export { PageScrollIndicator } from "./components/PageScrollIndicator";
|
package/dist/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
21
|
-
exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = void 0;
|
|
20
|
+
exports.IFrameInput = exports.PDFInput = exports.AudioInput = exports.VideoInput = exports.ProfileImageInput = exports.ImageInput = exports.MetaBlock = exports.HintsProvider = exports.genTagComp = exports.generateOptions = exports.OptionsSingle = exports.DropdownMulti = exports.DropdownSingle = exports.parseCardConfig = exports.ListProfile = exports.CardProfile = exports.CardEmbed = exports.ListContent = exports.CardContent = exports.DateTimeRangePicker = exports.DateTimePicker = exports.TimeRangePicker = exports.TimePicker = exports.DateRangePicker = exports.DatePicker = exports.TextLoader = exports.BarChart = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.Modal = exports.ModalForms = 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;
|
|
21
|
+
exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = exports.BannerAlert = void 0;
|
|
22
22
|
//css and styling related ( styled-components )
|
|
23
23
|
var globalStyles_1 = require("./globalStyles");
|
|
24
24
|
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
|
|
@@ -74,6 +74,8 @@ var ModalForms_1 = require("./components/Modals/derivedComps/ModalForms");
|
|
|
74
74
|
Object.defineProperty(exports, "ModalForms", { enumerable: true, get: function () { return ModalForms_1.ModalForms; } });
|
|
75
75
|
var Modal_1 = require("./components/Modals/Modal");
|
|
76
76
|
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return Modal_1.Modal; } });
|
|
77
|
+
var ModalSmall_1 = require("./components/Modals/derivedComps/ModalSmall");
|
|
78
|
+
Object.defineProperty(exports, "ModalSmall", { enumerable: true, get: function () { return ModalSmall_1.ModalSmall; } });
|
|
77
79
|
var EmptyStates_1 = require("./components/EmptyStates");
|
|
78
80
|
Object.defineProperty(exports, "EmptyStates", { enumerable: true, get: function () { return EmptyStates_1.EmptyStates; } });
|
|
79
81
|
var HomeCover_1 = require("./components/HomeCover");
|