oolib 2.55.8 → 2.56.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.
|
@@ -38,7 +38,7 @@ var Tooltip_1 = require("../Tooltip");
|
|
|
38
38
|
var phosphor_react_1 = require("phosphor-react");
|
|
39
39
|
var greyColor40 = colors_1.colors.greyColor40, greyColor80 = colors_1.colors.greyColor80;
|
|
40
40
|
var BlockLabel = function (props) {
|
|
41
|
-
var label = props.label, sublabel = props.sublabel, inputOnlyLabel = props.inputOnlyLabel, invert = props.invert, isRequired = props.isRequired, readOnly = props.readOnly, className = props.className, style = props.style, errorMsgs = props.errorMsgs, hints = props.hints, id = props.id,
|
|
41
|
+
var label = props.label, sublabel = props.sublabel, inputOnlyLabel = props.inputOnlyLabel, invert = props.invert, isRequired = props.isRequired, readOnly = props.readOnly, className = props.className, style = props.style, errorMsgs = props.errorMsgs, hints = props.hints, id = props.id, hintsTitle = props.hintsTitle, hintsBtnLabel = props.hintsBtnLabel, hintsSubtitle = props.hintsSubtitle, hideOptionalLabel = props.hideOptionalLabel, infoTooltip = props.infoTooltip;
|
|
42
42
|
var shouldCompRender = label ||
|
|
43
43
|
(!readOnly &&
|
|
44
44
|
(sublabel ||
|
|
@@ -55,7 +55,7 @@ var BlockLabel = function (props) {
|
|
|
55
55
|
return (shouldCompRender && (react_1.default.createElement(index_styled_1.StyledBlockLabel, { style: style, className: className },
|
|
56
56
|
react_1.default.createElement("div", { style: { display: "flex", gap: "1rem" } },
|
|
57
57
|
(label || inputOnlyLabel) && (react_1.default.createElement(Typo_1.SANS_3, { invert: invert, semibold: true, capitalize: true }, label || inputOnlyLabel)),
|
|
58
|
-
!readOnly && hints ? (react_1.default.createElement(Hints_1.default, { id: id, title: hintsTitle, subtitle: hintsSubtitle, hints: hints })) : null,
|
|
58
|
+
!readOnly && hints ? (react_1.default.createElement(Hints_1.default, { id: id, title: hintsTitle, btnlabel: hintsBtnLabel, subtitle: hintsSubtitle, hints: hints })) : null,
|
|
59
59
|
optional && !hideOptionalLabel && (react_1.default.createElement(Typo_1.SANS_3, { color: invert ? greyColor40 : greyColor80 }, "(optional)")),
|
|
60
60
|
!readOnly && (errorMsgs === null || errorMsgs === void 0 ? void 0 : errorMsgs.length) > 0 ? (react_1.default.createElement(InlineAlert_1.InlineAlert, { text: errText, type: errType, link: errLink, invert: invert })) : null,
|
|
61
61
|
infoTooltip && (react_1.default.createElement(Tooltip_1.Tooltip, { text: infoTooltip.text || infoTooltip, position: infoTooltip.position || "right", invert: invert, debug: infoTooltip.debug, popOutOfOverflowHiddenParent: infoTooltip.popOutOfOverflowHiddenParent, presetTarget: "infoIcon" }))),
|
|
@@ -67,12 +67,12 @@ var BulletIcon = function () { return (
|
|
|
67
67
|
react_1.default.createElement("div", { style: { fontSize: 0, marginTop: "6.5px" } },
|
|
68
68
|
react_1.default.createElement(comps_1.DisplayIcon, { color: greyColor100, weight: "fill", icon: "Circle", size: 8 }))); };
|
|
69
69
|
var Hints = function (_a) {
|
|
70
|
-
var id = _a.id, hints = _a.hints,
|
|
70
|
+
var id = _a.id, hints = _a.hints, _b = _a.title, title = _b === void 0 ? "Hints" : _b, _c = _a.btnlabel, btnlabel = _c === void 0 ? "Hints" : _c, subtitle = _a.subtitle;
|
|
71
71
|
//get the context state
|
|
72
|
-
var
|
|
72
|
+
var _d = (0, contextApi_1.useHintsContext)(), active = _d.active, setActive = _d.setActive;
|
|
73
73
|
var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
|
|
74
74
|
var lightBoxRef = (0, react_1.useRef)();
|
|
75
|
-
var
|
|
75
|
+
var _e = (0, react_1.useState)(getPositionStyles("left")), styles = _e[0], setStyles = _e[1];
|
|
76
76
|
//isStorybook is temporary hack to get correct with on storybook, since a story is getting renderend within an iframe, screen.width gives the incorrect width
|
|
77
77
|
var isDesktop = screenWidth > (0, mixins_1.getBreakPoint)("md");
|
|
78
78
|
(0, react_1.useEffect)(function () {
|
|
@@ -93,7 +93,7 @@ var Hints = function (_a) {
|
|
|
93
93
|
" ",
|
|
94
94
|
react_1.default.createElement(styled_1.StyledHints, { onClick: function () { return setActive(id); } },
|
|
95
95
|
react_1.default.createElement(Typo_1.SANS_3, { semibold: true },
|
|
96
|
-
react_1.default.createElement(OKELink_1.OKELink, { icon: "LightbulbFilament", linkType: "action", onClick: function () { return setActive(id); }, iconSize: 16, invertUnderline: true },
|
|
96
|
+
react_1.default.createElement(OKELink_1.OKELink, { icon: "LightbulbFilament", linkType: "action", onClick: function () { return setActive(id); }, iconSize: 16, invertUnderline: true }, btnlabel))),
|
|
97
97
|
active === id ? (isDesktop ? (react_1.default.createElement("div", null,
|
|
98
98
|
react_1.default.createElement(styled_1.StyledTriangle, { style: styles.arrow, id: id }),
|
|
99
99
|
react_1.default.createElement(styled_1.StyledLightbox, { style: styles.lightBox, ref: lightBoxRef, id: id },
|
|
@@ -101,7 +101,7 @@ var Hints = function (_a) {
|
|
|
101
101
|
react_1.default.createElement("div", { style: { position: "absolute", top: "-2.5rem", fontSize: 0 } },
|
|
102
102
|
react_1.default.createElement(comps_1.DisplayIcon, { icon: "ModalBulbIcon" })),
|
|
103
103
|
react_1.default.createElement(styled_2.StyledModalHeaderStyle2Title, null,
|
|
104
|
-
react_1.default.createElement(Typo_1.SANS_3, { semibold: true, capitalize: true }, title
|
|
104
|
+
react_1.default.createElement(Typo_1.SANS_3, { semibold: true, capitalize: true }, title),
|
|
105
105
|
subtitle ? (react_1.default.createElement(Typo_1.SANS_3_4, { capitalize: true, semibold: true, style: { flexGrow: "1" }, color: greyColor80 }, subtitle)) : null,
|
|
106
106
|
react_1.default.createElement(Buttons_1.ButtonGhost, { onClick: function () { return setActive(""); }, icon: "X" }))),
|
|
107
107
|
react_1.default.createElement(styled_1.StyledLightBoxContent, null,
|