oolib 2.19.6 → 2.20.1
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/ActionMenu/index.js +2 -3
- package/dist/components/Buttons/index.js +28 -2
- package/dist/components/CheckInput/index.d.ts +1 -0
- package/dist/components/CheckInput/index.js +27 -0
- package/dist/components/RadioInput/comps/RadioOption/index.d.ts +8 -0
- package/dist/components/RadioInput/comps/RadioOption/index.js +40 -0
- package/dist/components/RadioInput/comps/RadioOption/styled.d.ts +4 -0
- package/dist/components/RadioInput/comps/RadioOption/styled.js +56 -0
- package/dist/components/RadioInput/comps/RadioOption/utils.d.ts +4 -0
- package/dist/components/RadioInput/comps/RadioOption/utils.js +14 -0
- package/dist/components/RadioInput/comps/index.d.ts +1 -0
- package/dist/components/RadioInput/comps/index.js +5 -0
- package/dist/components/RadioInput/index.d.ts +1 -0
- package/dist/components/RadioInput/index.js +52 -0
- package/dist/components/RadioInput/styled.d.ts +1 -0
- package/dist/components/RadioInput/styled.js +37 -0
- package/dist/components/RadioInput/utils.d.ts +6 -0
- package/dist/components/RadioInput/utils.js +20 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/package.json +1 -1
|
@@ -60,9 +60,8 @@ var ActionMenu = function (_a) {
|
|
|
60
60
|
(0, react_1.useEffect)(function () {
|
|
61
61
|
setShowActionsInParent && setShowActionsInParent(showActions);
|
|
62
62
|
}, [showActions]);
|
|
63
|
-
return (react_1.default.createElement(styled_1.StyledActionMenu, { ref: actionMenuRef },
|
|
64
|
-
react_1.default.createElement(ButtonComp, { icon: icon, iconSize: iconSize, invert: invert, onClick: function (e) {
|
|
65
|
-
e.stopPropagation();
|
|
63
|
+
return (react_1.default.createElement(styled_1.StyledActionMenu, { onClick: function () { return console.log('i can hear this'); }, ref: actionMenuRef },
|
|
64
|
+
react_1.default.createElement(ButtonComp, { icon: icon, iconSize: iconSize, invert: invert, stopPropagation: true, onClick: function (e) {
|
|
66
65
|
setShowActions(!showActions);
|
|
67
66
|
}, active: showActions }),
|
|
68
67
|
react_1.default.createElement(styled_1.StyledActionsDropMenu, __assign({}, {
|
|
@@ -48,7 +48,27 @@ var DisplayIcon = function (_a) {
|
|
|
48
48
|
};
|
|
49
49
|
var ButtonStyledWrapper = function (_a) {
|
|
50
50
|
var props = _a.props, variant = _a.variant;
|
|
51
|
-
var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize;
|
|
51
|
+
var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize, stopPropagation = props.stopPropagation;
|
|
52
|
+
/**
|
|
53
|
+
* WHY WE ARE HAVING TO DO STOP PROPAGATION IN THIS TWISTED WAY:
|
|
54
|
+
*
|
|
55
|
+
* We have debounced our mousedown and click events
|
|
56
|
+
* Why debounce? Cuz sometimes users end up double clicking buttons
|
|
57
|
+
* by mistake and end up firing parallel api calls, which leads to all
|
|
58
|
+
* sorts of duplication issues. Hence debounce.
|
|
59
|
+
*
|
|
60
|
+
* Now the problem with debounce is that, it doesnt allow this to work:
|
|
61
|
+
* <Button onClick={e => e.stopPropagation()}/>
|
|
62
|
+
* Funny thing is if you wrap the button in a div, and apply stopPropagation
|
|
63
|
+
* to that div, then it works, but that is a bit messy.
|
|
64
|
+
*
|
|
65
|
+
* Which means, e.stopPropagation has to be done before the debounce,
|
|
66
|
+
* which would have to be done inside the Button Component.
|
|
67
|
+
* Hence the boolean prop stopPropagation which controls this.
|
|
68
|
+
*
|
|
69
|
+
* We dont default to stopPropagation = true, cuz we are unsure
|
|
70
|
+
* of what other sideeffects it might have on the codebase
|
|
71
|
+
*/
|
|
52
72
|
var displayText = (link === null || link === void 0 ? void 0 : link.displayText) || children || value;
|
|
53
73
|
var debouncedOnClick = onClick && (0, lodash_1.debounce)(onClick, 200);
|
|
54
74
|
var debouncedMouseDown = onMouseDown && (0, lodash_1.debounce)(onMouseDown, 150);
|
|
@@ -69,7 +89,13 @@ var ButtonStyledWrapper = function (_a) {
|
|
|
69
89
|
var thisSize = iconSize || size;
|
|
70
90
|
return thisSize === 'S' ? 15 : 20;
|
|
71
91
|
};
|
|
72
|
-
return (react_1.default.createElement(index_styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, invert: invert, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? "submit" : "button", onClick:
|
|
92
|
+
return (react_1.default.createElement(index_styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, invert: invert, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? "submit" : "button", onClick: function (e) {
|
|
93
|
+
stopPropagation && e.stopPropagation();
|
|
94
|
+
debouncedOnClick && debouncedOnClick(e);
|
|
95
|
+
}, onMouseDown: function (e) {
|
|
96
|
+
stopPropagation && e.stopPropagation();
|
|
97
|
+
debouncedMouseDown && debouncedMouseDown(e);
|
|
98
|
+
}, composition: composition, width: width, color: color },
|
|
73
99
|
icon && react_1.default.createElement(DisplayIcon, { icon: icon, size: calcIconSize() }),
|
|
74
100
|
displayText && react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, displayText),
|
|
75
101
|
iconAfter && react_1.default.createElement(DisplayIcon, { icon: iconAfter, size: calcIconSize() })));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function CheckInput(props: any): JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CheckInput = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var BlockLabel_1 = require("../BlockLabel");
|
|
20
|
+
var _EXPORTS_1 = require("../../utils/_EXPORTS");
|
|
21
|
+
var CheckInput = function (props) {
|
|
22
|
+
var id = props.id, injectOtherOption = props.injectOtherOption, value = props.value, onChange = props.onChange, commonIsCorrectDesc = props.commonIsCorrectDesc, options = props.options, optionGroups = props.optionGroups, optionStyle = props.optionStyle, markResult = props.markResult, passChangeHandlerOps = props.passChangeHandlerOps, listType = props.listType, style = props.style, className = props.className, readOnly = props.readOnly;
|
|
23
|
+
return (react_1.default.createElement("div", { className: className, id: id },
|
|
24
|
+
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, _EXPORTS_1.getBlockLabelProps)(props))),
|
|
25
|
+
react_1.default.createElement("input", { type: "checkbox" })));
|
|
26
|
+
};
|
|
27
|
+
exports.CheckInput = CheckInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
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.RadioOption = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var themes_1 = require("../../../../themes");
|
|
9
|
+
var icons_1 = require("../../../../icons");
|
|
10
|
+
var Typo_1 = require("../../../Typo");
|
|
11
|
+
var utils_js_1 = require("./utils.js");
|
|
12
|
+
var styled_1 = require("./styled");
|
|
13
|
+
var green = themes_1.colors.green, red = themes_1.colors.red;
|
|
14
|
+
var XCircle = icons_1.icons.XCircle, CheckCircle = icons_1.icons.CheckCircle;
|
|
15
|
+
var RadioOption = function (_a) {
|
|
16
|
+
var id = _a.id, option = _a.option, onChange = _a.onChange, value = _a.value, optionStyle = _a.optionStyle, markResult = _a.markResult;
|
|
17
|
+
var isSelected = option.value === (value === null || value === void 0 ? void 0 : value.value);
|
|
18
|
+
var markingCommand = (0, utils_js_1.getMarkingCommand)({ option: option, isSelected: isSelected });
|
|
19
|
+
return (react_1.default.createElement("div", null,
|
|
20
|
+
react_1.default.createElement(styled_1.StyledOption, { markResult: markResult, style: optionStyle, isSelected: isSelected, onClick: function () { return !markResult && onChange && onChange(id, option); } },
|
|
21
|
+
!markResult || markingCommand === undefined ?
|
|
22
|
+
react_1.default.createElement(styled_1.StyledRadioInput, { isSelected: isSelected, className: 'radioBtn' }, isSelected && react_1.default.createElement(styled_1.StyledRadioInputFill, null))
|
|
23
|
+
:
|
|
24
|
+
["markCorrect", "revealCorrect"].includes(markingCommand) ?
|
|
25
|
+
react_1.default.createElement(CheckCircle, { size: 25, color: green, style: { marginLeft: '-2.25px' } })
|
|
26
|
+
: // then wrong
|
|
27
|
+
react_1.default.createElement(XCircle, { size: 25, color: red, style: { marginLeft: '-2.25px' } }),
|
|
28
|
+
react_1.default.createElement(Typo_1.SANS_3, { bold: markResult && isSelected },
|
|
29
|
+
" ",
|
|
30
|
+
option.display,
|
|
31
|
+
" ")),
|
|
32
|
+
/*
|
|
33
|
+
the minute the results have come in, irrespective of user's answer
|
|
34
|
+
being right or wrong, we always show an explanation
|
|
35
|
+
against the right answer. provided an explanation is provided.
|
|
36
|
+
*/
|
|
37
|
+
option.isCorrect && markResult && option.isCorrectDesc &&
|
|
38
|
+
react_1.default.createElement(styled_1.StyledCorrectMessage, null, option.isCorrectDesc)));
|
|
39
|
+
};
|
|
40
|
+
exports.RadioOption = RadioOption;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.StyledCorrectMessage = exports.StyledRadioInputFill = exports.StyledRadioInput = exports.StyledOption = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
var themes_1 = require("../../../../themes");
|
|
33
|
+
var mixins_1 = require("../../../../themes/mixins");
|
|
34
|
+
var utilsOolib_1 = require("../../../../utilsOolib");
|
|
35
|
+
var Typo_1 = require("../../../Typo");
|
|
36
|
+
var none = themes_1.colors.none, white = themes_1.colors.white, green = themes_1.colors.green;
|
|
37
|
+
exports.StyledOption = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 1rem;\n position: relative;\n cursor: ", ";\n \n\n &:hover .radioBtn {\n ", "\n }\n\n"], ["\n display: flex;\n align-items: center;\n gap: 1rem;\n position: relative;\n cursor: ", ";\n \n\n &:hover .radioBtn {\n ", "\n }\n\n"])), function (_a) {
|
|
38
|
+
var markResult = _a.markResult;
|
|
39
|
+
return markResult ? 'initial' : 'pointer';
|
|
40
|
+
}, function (_a) {
|
|
41
|
+
var isSelected = _a.isSelected, theme = _a.theme;
|
|
42
|
+
return !isSelected && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), (0, utilsOolib_1.getPrimaryColor10)(theme.colors));
|
|
43
|
+
});
|
|
44
|
+
exports.StyledRadioInput = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-radius: 50%;\n width: 2rem;\n height: 2rem;\n border: 2px solid ", ";\n background-color: ", ";\n flex: 0 0 auto;\n ", "\n\n ", "\n\n"], ["\n border-radius: 50%;\n width: 2rem;\n height: 2rem;\n border: 2px solid ", ";\n background-color: ", ";\n flex: 0 0 auto;\n ", "\n\n ", "\n\n"])), function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return (0, utilsOolib_1.getPrimaryColor100)(theme.colors);
|
|
47
|
+
}, none, (0, mixins_1.transition)('background-color 0.2s'), function (_a) {
|
|
48
|
+
var isSelected = _a.isSelected;
|
|
49
|
+
return isSelected && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color:", ";\n display: flex;\n align-items: center;\n justify-content: center;\n "], ["\n background-color:", ";\n display: flex;\n align-items: center;\n justify-content: center;\n "])), function (_a) {
|
|
50
|
+
var theme = _a.theme;
|
|
51
|
+
return (0, utilsOolib_1.getPrimaryColor100)(theme.colors);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
exports.StyledRadioInputFill = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 0.8rem;\n width: 0.8rem;\n border-radius: 50%;\n background-color: ", ";\n"], ["\n height: 0.8rem;\n width: 0.8rem;\n border-radius: 50%;\n background-color: ", ";\n"])), white);
|
|
55
|
+
exports.StyledCorrectMessage = (0, styled_components_1.default)(Typo_1.SANS_2)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n padding-top: 0.5rem;\n padding-left: 3.3rem;\n"], ["\n color: ", ";\n padding-top: 0.5rem;\n padding-left: 3.3rem;\n"])), green);
|
|
56
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMarkingCommand = void 0;
|
|
4
|
+
var getMarkingCommand = function (_a) {
|
|
5
|
+
var option = _a.option, isSelected = _a.isSelected;
|
|
6
|
+
if (isSelected) {
|
|
7
|
+
return option.isCorrect ? 'markCorrect' : 'markWrong';
|
|
8
|
+
}
|
|
9
|
+
else { //not selected
|
|
10
|
+
if (option.isCorrect)
|
|
11
|
+
return "revealCorrect";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.getMarkingCommand = getMarkingCommand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioOption } from "./RadioOption";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadioOption = void 0;
|
|
4
|
+
var RadioOption_1 = require("./RadioOption");
|
|
5
|
+
Object.defineProperty(exports, "RadioOption", { enumerable: true, get: function () { return RadioOption_1.RadioOption; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function RadioInput(props: any): JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.RadioInput = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var BlockLabel_1 = require("../BlockLabel");
|
|
20
|
+
var Tags_1 = require("../Tags");
|
|
21
|
+
var TextInputs_1 = require("../TextInputs");
|
|
22
|
+
var _EXPORTS_1 = require("../../utils/_EXPORTS");
|
|
23
|
+
var utils_js_1 = require("./utils.js");
|
|
24
|
+
var styled_1 = require("./styled");
|
|
25
|
+
var comps_1 = require("./comps");
|
|
26
|
+
var RadioInput = function (props) {
|
|
27
|
+
var id = props.id, injectOtherOption = props.injectOtherOption, value = props.value, onChange = props.onChange, options = props.options, optionStyle = props.optionStyle, markResult = props.markResult, //instead of rightWrongResult
|
|
28
|
+
listType = props.listType, style = props.style, className = props.className, readOnly = props.readOnly;
|
|
29
|
+
var displayedOptions;
|
|
30
|
+
if (options) {
|
|
31
|
+
if (injectOtherOption && !options.includes(function (op) { return op.value === "other"; })) {
|
|
32
|
+
displayedOptions = options.concat({ value: "other", display: "Other" });
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
displayedOptions = options;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return (react_1.default.createElement("div", { className: className, id: id },
|
|
39
|
+
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, _EXPORTS_1.getBlockLabelProps)(props))),
|
|
40
|
+
readOnly ? ((value === null || value === void 0 ? void 0 : value.display) && react_1.default.createElement(Tags_1.TagDisplay, { display: value.display })) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
41
|
+
react_1.default.createElement(styled_1.StyledOptionsContainer, { listType: listType, style: style }, displayedOptions === null || displayedOptions === void 0 ? void 0 : displayedOptions.map(function (option) { return react_1.default.createElement(comps_1.RadioOption, __assign({}, {
|
|
42
|
+
option: option,
|
|
43
|
+
id: id,
|
|
44
|
+
onChange: onChange,
|
|
45
|
+
value: value,
|
|
46
|
+
optionStyle: optionStyle,
|
|
47
|
+
markResult: markResult,
|
|
48
|
+
key: option.value
|
|
49
|
+
})); })),
|
|
50
|
+
injectOtherOption && (value === null || value === void 0 ? void 0 : value.value) === "other" && (react_1.default.createElement(TextInputs_1.TextInput, { placeholder: "Please Specify Here", value: value.display_desc, onChange: function (k, v) { return onChange && onChange(id, (0, utils_js_1.createNewValue)(v)); } }))))));
|
|
51
|
+
};
|
|
52
|
+
exports.RadioInput = RadioInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const StyledOptionsContainer: any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.StyledOptionsContainer = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
exports.StyledOptionsContainer = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: 2rem;\n\n ", "\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: 2rem;\n\n ", "\n"])), function (_a) {
|
|
33
|
+
var listType = _a.listType;
|
|
34
|
+
return listType === 'vertical' ? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n gap: 1.5rem;\n "], ["\n flex-direction: column;\n gap: 1.5rem;\n "]))) :
|
|
35
|
+
'';
|
|
36
|
+
});
|
|
37
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNewValue = void 0;
|
|
4
|
+
var createNewValue = function (val) {
|
|
5
|
+
value_desc = ( // discuss if we should add the method textToCamelcase to general utils or JS String Class
|
|
6
|
+
val
|
|
7
|
+
.trim()
|
|
8
|
+
.replace(/[,\/]/gi, '')
|
|
9
|
+
.split(' ')
|
|
10
|
+
.filter(Boolean)
|
|
11
|
+
.map(function (word, idx) { return idx === 0 ? word : word[0].toUpperCase() + word.slice(1); })
|
|
12
|
+
.join(""));
|
|
13
|
+
return {
|
|
14
|
+
value: "other",
|
|
15
|
+
display_desc: val,
|
|
16
|
+
value_desc: value_desc,
|
|
17
|
+
display: "Other",
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.createNewValue = createNewValue;
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export namespace icons {
|
|
|
42
42
|
export { ArrowDown };
|
|
43
43
|
export { GearSix };
|
|
44
44
|
export { Wrench };
|
|
45
|
+
export { CheckSquare };
|
|
45
46
|
export { CheckSquareOffset };
|
|
46
47
|
export { Cards };
|
|
47
48
|
export { SignOut };
|
|
@@ -132,6 +133,7 @@ import { MapPin } from "phosphor-react";
|
|
|
132
133
|
import { ArrowDown } from "phosphor-react";
|
|
133
134
|
import { GearSix } from "phosphor-react";
|
|
134
135
|
import { Wrench } from "phosphor-react";
|
|
136
|
+
import { CheckSquare } from "phosphor-react";
|
|
135
137
|
import { CheckSquareOffset } from "phosphor-react";
|
|
136
138
|
import { Cards } from "phosphor-react";
|
|
137
139
|
import { SignOut } from "phosphor-react";
|
package/dist/icons/index.js
CHANGED
|
@@ -47,6 +47,7 @@ exports.icons = {
|
|
|
47
47
|
ArrowDown: phosphor_react_1.ArrowDown,
|
|
48
48
|
GearSix: phosphor_react_1.GearSix,
|
|
49
49
|
Wrench: phosphor_react_1.Wrench,
|
|
50
|
+
CheckSquare: phosphor_react_1.CheckSquare,
|
|
50
51
|
CheckSquareOffset: phosphor_react_1.CheckSquareOffset,
|
|
51
52
|
Cards: phosphor_react_1.Cards,
|
|
52
53
|
SignOut: phosphor_react_1.SignOut,
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { UserRoleBadge } from "./components/UserRoleBadge";
|
|
|
20
20
|
export { OKELink } from "./components/OKELink";
|
|
21
21
|
export { Tooltip } from "./components/Tooltip";
|
|
22
22
|
export { ActionMenu } from "./components/ActionMenu";
|
|
23
|
+
export { RadioInput } from "./components/RadioInput";
|
|
24
|
+
export { CheckInput } from "./components/CheckInput";
|
|
23
25
|
export { PercentCompletedPie } from "./components/PercentCompletedPie";
|
|
24
26
|
export { Divider } from "./components/Divider";
|
|
25
27
|
export { CircleLoader, ProgressBar, CircleLoader as Loader } from "./components/LoadersAndProgressBars";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Divider = exports.PercentCompletedPie = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.Loader = exports.ProgressBar = exports.CircleLoader = exports.icons = exports.colors = exports.GlobalStyles = void 0;
|
|
17
|
+
exports.Divider = exports.PercentCompletedPie = exports.CheckInput = exports.RadioInput = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.Loader = exports.ProgressBar = exports.CircleLoader = exports.icons = exports.colors = exports.GlobalStyles = void 0;
|
|
18
18
|
//css and styling related ( styled-components )
|
|
19
19
|
var globalStyles_1 = require("./globalStyles");
|
|
20
20
|
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
|
|
@@ -52,6 +52,10 @@ var Tooltip_1 = require("./components/Tooltip");
|
|
|
52
52
|
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
|
|
53
53
|
var ActionMenu_1 = require("./components/ActionMenu");
|
|
54
54
|
Object.defineProperty(exports, "ActionMenu", { enumerable: true, get: function () { return ActionMenu_1.ActionMenu; } });
|
|
55
|
+
var RadioInput_1 = require("./components/RadioInput");
|
|
56
|
+
Object.defineProperty(exports, "RadioInput", { enumerable: true, get: function () { return RadioInput_1.RadioInput; } });
|
|
57
|
+
var CheckInput_1 = require("./components/CheckInput");
|
|
58
|
+
Object.defineProperty(exports, "CheckInput", { enumerable: true, get: function () { return CheckInput_1.CheckInput; } });
|
|
55
59
|
var PercentCompletedPie_1 = require("./components/PercentCompletedPie");
|
|
56
60
|
Object.defineProperty(exports, "PercentCompletedPie", { enumerable: true, get: function () { return PercentCompletedPie_1.PercentCompletedPie; } });
|
|
57
61
|
var Divider_1 = require("./components/Divider");
|