oolib 2.25.5 → 2.25.7
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.
|
@@ -55,7 +55,7 @@ var CheckboxInput = function (_a) {
|
|
|
55
55
|
margin: '-7px -2.8px -7px -3.2px',
|
|
56
56
|
flexShrink: 0
|
|
57
57
|
} })); };
|
|
58
|
-
return inputStyle === 'tagSelect' ? (react_1.default.createElement(Tags_1.TagSelect, __assign({}, { isSelected: isSelected, invert: invert, disabled: disabled }, { onClick: function () { return !disabled && onClick(
|
|
58
|
+
return inputStyle === 'tagSelect' ? (react_1.default.createElement(Tags_1.TagSelect, __assign({}, { isSelected: isSelected, invert: invert, disabled: disabled }, { onClick: function () { return !disabled && onClick(isSelected, option); }, display: option.display, value: option.value, style: { alignSelf: 'flex-start' } }))) : (react_1.default.createElement(styled_1.StyledOption, __assign({}, { rightWrongResult: rightWrongResult, isSelected: isSelected, disabled: disabled, invert: invert, S: S }, { onClick: function () { return !rightWrongResult && !disabled && onClick && onClick(isSelected, option); } }),
|
|
59
59
|
rightWrongResult
|
|
60
60
|
? ["markCorrect", "revealCorrect"].includes(markingCommand)
|
|
61
61
|
? genCheckSquare()
|
|
@@ -96,7 +96,8 @@ var DisplayIcon = function (_a) {
|
|
|
96
96
|
return (react_1.default.createElement("div", { style: { cursor: onClick ? 'pointer' : '' }, onMouseDown: onClick || null }, IconComp && react_1.default.createElement(IconComp, { size: size, weight: "bold" })));
|
|
97
97
|
};
|
|
98
98
|
var TextInput = function (props) {
|
|
99
|
-
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, value = props.value, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, iconOnClick = props.iconOnClick, eyeIcon = props.eyeIcon, S = props.S, validateOnBlur = props.validateOnBlur, actionBtn = props.actionBtn, className = props.className, maxLength = props.maxLength, DEPRECATED_maxNumLimiter = props.maxNumLimiter
|
|
99
|
+
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, value = props.value, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, iconOnClick = props.iconOnClick, eyeIcon = props.eyeIcon, S = props.S, validateOnBlur = props.validateOnBlur, 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
|
+
;
|
|
100
101
|
var _b = (0, react_1.useState)(''), inputStatus = _b[0], setInputStatus = _b[1];
|
|
101
102
|
var composition = icon && !eyeIcon ? 'icon+text' : 'textOnly';
|
|
102
103
|
var size = S ? 'S' : 'M';
|
|
@@ -129,13 +130,19 @@ var TextInput = function (props) {
|
|
|
129
130
|
handleValidateOnBlur(e);
|
|
130
131
|
}
|
|
131
132
|
};
|
|
133
|
+
var inputRef = (0, react_1.useRef)(null);
|
|
134
|
+
(0, react_1.useEffect)(function () {
|
|
135
|
+
forceFocus &&
|
|
136
|
+
inputRef.current &&
|
|
137
|
+
inputRef.current.focus();
|
|
138
|
+
}, [forceFocus]);
|
|
132
139
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
133
140
|
react_1.default.createElement("div", { className: className },
|
|
134
141
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, _EXPORTS_1.getBlockLabelProps)(props))),
|
|
135
142
|
readOnly ? (react_1.default.createElement(Typo_1.SANS_3, { invert: invert }, type === 'password' ? '********' : value)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
136
|
-
react_1.default.createElement(index_styled_1.InputContainerStyled, { invert: invert, type: type, disabled: disabled, status: inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.type, eyeIcon: eyeIcon, composition: composition },
|
|
143
|
+
react_1.default.createElement(index_styled_1.InputContainerStyled, { invert: invert, type: type, disabled: disabled, status: inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.type, eyeIcon: eyeIcon, composition: composition, onClick: function () { return inputRef.current.focus(); } },
|
|
137
144
|
icon && (react_1.default.createElement(DisplayIcon, { icon: icon, size: S ? 15 : 20, onClick: iconOnClick || null })),
|
|
138
|
-
react_1.default.createElement(index_styled_1.InputStyled, { className: size === 'S' ? 'SANS_2' : 'SANS_3', id: id, type: type, name: type, placeholder: placeholder, value: value, onChange: handleOnChange, maxLength: maxLength || DEPRECATED_maxNumLimiter, onBlur: handleValidateOnBlur, onFocus: onFocus, size: size, autoComplete: 'off' }),
|
|
145
|
+
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: handleValidateOnBlur, onFocus: onFocus, size: size, autoComplete: 'off' }),
|
|
139
146
|
inputStatus === 'loading' && (react_1.default.createElement("div", null,
|
|
140
147
|
react_1.default.createElement(LoadersAndProgress_1.LoaderCircle, { S: true, invert: invert }))),
|
|
141
148
|
actionBtn && (react_1.default.createElement(Buttons_1.ButtonPrimary, { value: actionBtn.text, invert: actionBtn.invert, onClick: actionBtnEnabaled && actionBtn.onClick, disabled: !actionBtnEnabaled, style: { marginRight: '-2rem' } }))),
|
|
@@ -51,7 +51,9 @@ var GenComp = function (_a) {
|
|
|
51
51
|
var invert = props.invert, value = props.value, suffix = props.suffix, color = props.color, children = props.children, theme = props.theme, style = props.style, className = props.className;
|
|
52
52
|
var displayText = children || value;
|
|
53
53
|
var localText = localize(displayText);
|
|
54
|
-
return (react_1.default.createElement(Comp, __assign({}, genFontStylingProps(props), { color: color,
|
|
54
|
+
return (react_1.default.createElement(Comp, __assign({}, genFontStylingProps(props), { color: color,
|
|
55
|
+
// theme={theme} // i dont think this needs to be passed no?
|
|
56
|
+
className: className, style: style, invert: invert }),
|
|
55
57
|
localText,
|
|
56
58
|
suffix || ''));
|
|
57
59
|
};
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export namespace icons {
|
|
|
41
41
|
export { ArrowsOut };
|
|
42
42
|
export { MapPin };
|
|
43
43
|
export { ArrowDown };
|
|
44
|
+
export { ArrowUp };
|
|
44
45
|
export { GearSix };
|
|
45
46
|
export { Wrench };
|
|
46
47
|
export { CheckSquare };
|
|
@@ -134,6 +135,7 @@ import { ArrowsIn } from "phosphor-react";
|
|
|
134
135
|
import { ArrowsOut } from "phosphor-react";
|
|
135
136
|
import { MapPin } from "phosphor-react";
|
|
136
137
|
import { ArrowDown } from "phosphor-react";
|
|
138
|
+
import { ArrowUp } from "phosphor-react";
|
|
137
139
|
import { GearSix } from "phosphor-react";
|
|
138
140
|
import { Wrench } from "phosphor-react";
|
|
139
141
|
import { CheckSquare } from "phosphor-react";
|
package/dist/icons/index.js
CHANGED
|
@@ -46,6 +46,7 @@ exports.icons = {
|
|
|
46
46
|
ArrowsOut: phosphor_react_1.ArrowsOut,
|
|
47
47
|
MapPin: phosphor_react_1.MapPin,
|
|
48
48
|
ArrowDown: phosphor_react_1.ArrowDown,
|
|
49
|
+
ArrowUp: phosphor_react_1.ArrowUp,
|
|
49
50
|
GearSix: phosphor_react_1.GearSix,
|
|
50
51
|
Wrench: phosphor_react_1.Wrench,
|
|
51
52
|
CheckSquare: phosphor_react_1.CheckSquare,
|