oolib 2.30.2 → 2.30.4
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/Accordion/index.js +18 -3
- package/dist/components/OKELink/index.js +1 -0
- package/dist/components/TabBar/index.js +1 -1
- package/dist/components/TabBar/index.styled.d.ts +1 -0
- package/dist/components/TabBar/index.styled.js +4 -3
- package/dist/components/Tags/index.d.ts +3 -2
- package/dist/components/Tags/index.js +3 -3
- package/dist/components/Tags/index.styled.js +7 -3
- package/dist/utils/getterSetterDeleter/utils/set_deleteVal.js +12 -1
- package/package.json +1 -1
|
@@ -61,7 +61,21 @@ var HeaderStyle1 = function (_a) {
|
|
|
61
61
|
react_1.default.createElement(framer_motion_1.motion.div, { animate: { rotate: expand ? -180 : 0 }, transition: { type: "tween", ease: "easeOut" } },
|
|
62
62
|
react_1.default.createElement(phosphor_react_1.CaretDown, { size: 16 })))));
|
|
63
63
|
};
|
|
64
|
-
var
|
|
64
|
+
var StyledHeaderStyle3Wrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"
|
|
65
|
+
//this is the new grey background, slim one. with the Caret icon on the right
|
|
66
|
+
//used in access control builder and several other places.
|
|
67
|
+
])), colors_1.colors.none, colors_1.colors.greyColor15, (0, mixins_1.transition)('background-color'), colors_1.colors.greyColor3);
|
|
68
|
+
//this is the new grey background, slim one. with the Caret icon on the right
|
|
69
|
+
//used in access control builder and several other places.
|
|
70
|
+
var HeaderStyle3 = function (_a) {
|
|
71
|
+
var title = _a.title, expand = _a.expand, handleToggle = _a.handleToggle;
|
|
72
|
+
return (react_1.default.createElement(StyledHeaderStyle3Wrapper, { onClick: function () { return handleToggle(!expand); } },
|
|
73
|
+
react_1.default.createElement(Typo_1.SERIF_4_5, null, title),
|
|
74
|
+
react_1.default.createElement(NormalizedButton, null,
|
|
75
|
+
react_1.default.createElement(framer_motion_1.motion.div, { animate: { rotate: expand ? -180 : 0 }, transition: { type: "tween", ease: "easeOut" } },
|
|
76
|
+
react_1.default.createElement(phosphor_react_1.CaretDown, { size: 16 })))));
|
|
77
|
+
};
|
|
78
|
+
var StyledHeaderStyle2Wrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 0; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n /* &:hover{\n background-color: ", ";\n } */\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 0; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n /* &:hover{\n background-color: ", ";\n } */\n"
|
|
65
79
|
//analysis dashboard wordcloud - this is the old accordion header style designed at the time of updates module
|
|
66
80
|
])), colors_1.colors.white, colors_1.colors.greyColor10, (0, mixins_1.transition)('background-color'), colors_1.colors.greyColor5);
|
|
67
81
|
//analysis dashboard wordcloud - this is the old accordion header style designed at the time of updates module
|
|
@@ -89,7 +103,8 @@ var Accordion = function (_a) {
|
|
|
89
103
|
}, [expandProp]);
|
|
90
104
|
var HeaderStyles = {
|
|
91
105
|
HeaderStyle1: HeaderStyle1,
|
|
92
|
-
HeaderStyle2: HeaderStyle2
|
|
106
|
+
HeaderStyle2: HeaderStyle2,
|
|
107
|
+
HeaderStyle3: HeaderStyle3
|
|
93
108
|
};
|
|
94
109
|
var genHeader = function () {
|
|
95
110
|
if (CustomHeader)
|
|
@@ -108,4 +123,4 @@ var Accordion = function (_a) {
|
|
|
108
123
|
react_1.default.createElement("div", null, children))));
|
|
109
124
|
};
|
|
110
125
|
exports.Accordion = Accordion;
|
|
111
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
126
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -78,6 +78,7 @@ var OKELink = function (_a) {
|
|
|
78
78
|
var genIcon = function (icon) {
|
|
79
79
|
return react_1.default.createElement(comps_1.DisplayIcon, __assign({}, {
|
|
80
80
|
icon: icon,
|
|
81
|
+
weight: "regular",
|
|
81
82
|
size: iconSize || 15,
|
|
82
83
|
color: (0, styled_1.genColor)({ color: color, theme: theme, invert: invert, disabled: disabled })
|
|
83
84
|
}));
|
|
@@ -33,7 +33,7 @@ var Base = function (_a) {
|
|
|
33
33
|
var tabIsActive = value && op.value === value.value;
|
|
34
34
|
return (react_1.default.createElement(index_styled_1.TabBarTabWrapper, { tabBarStyle: tabBarStyle, key: op.value, active: tabIsActive, error: tabHasError },
|
|
35
35
|
react_1.default.createElement(index_styled_1.TabBarTabStyled, { size: size, active: tabIsActive, error: tabHasError, tabBarStyle: tabBarStyle, onClick: function () { return handleClick(op); } },
|
|
36
|
-
react_1.default.createElement(
|
|
36
|
+
react_1.default.createElement(index_styled_1.STYLED_SANS_2, { semibold: tabBarStyle === "1" }, op.display))));
|
|
37
37
|
})))));
|
|
38
38
|
};
|
|
39
39
|
var TabBarStyle1 = function (props) { return react_1.default.createElement(Base, __assign({}, props, { tabBarStyle: "1" })); };
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.TabBarTabStyled = exports.TabBarTabWrapper = exports.TabBarRowStyled = exports.TabBarContainerStyled = exports.TabBarStyled = void 0;
|
|
30
|
+
exports.STYLED_SANS_2 = exports.TabBarTabStyled = exports.TabBarTabWrapper = exports.TabBarRowStyled = exports.TabBarContainerStyled = exports.TabBarStyled = void 0;
|
|
31
31
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var themes_1 = require("../../themes");
|
|
33
33
|
var mixins_1 = require("../../themes/mixins");
|
|
@@ -79,7 +79,7 @@ exports.TabBarStyled = styled_components_1.default.div(templateObject_11 || (tem
|
|
|
79
79
|
});
|
|
80
80
|
exports.TabBarContainerStyled = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n width: fit-content;\n height: 100%;\n"], ["\n width: fit-content;\n height: 100%;\n"])));
|
|
81
81
|
exports.TabBarRowStyled = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n height: 100%;\n"], ["\n display: flex;\n height: 100%;\n"])));
|
|
82
|
-
exports.TabBarTabWrapper = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n display: flex;\n align-items: center;\n"], ["\n ", "\n display: flex;\n align-items: center;\n"])), function (_a) {
|
|
82
|
+
exports.TabBarTabWrapper = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n display: flex;\n align-items: center;\n min-width: 0; //so that ellipsis works on the text within\n"], ["\n ", "\n display: flex;\n align-items: center;\n min-width: 0; //so that ellipsis works on the text within\n"])), function (_a) {
|
|
83
83
|
var tabBarStyle = _a.tabBarStyle;
|
|
84
84
|
return tabBarStyle === "1"
|
|
85
85
|
? tabBarWrapperStyle1
|
|
@@ -91,4 +91,5 @@ exports.TabBarTabStyled = styled_components_1.default.button(templateObject_15 |
|
|
|
91
91
|
? tabBarTabStyle1
|
|
92
92
|
: tabBarStyle === "2" && tabBarTabStyle2;
|
|
93
93
|
});
|
|
94
|
-
|
|
94
|
+
exports.STYLED_SANS_2 = (0, styled_components_1.default)(SANS_2)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"], ["\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
|
|
95
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export function TagDisplay({ display, style, invert, M, XS,
|
|
1
|
+
export function TagDisplay({ display, style, invert, M, XS, tagColor, textColor, variant }: {
|
|
2
2
|
display: any;
|
|
3
3
|
style: any;
|
|
4
4
|
invert: any;
|
|
5
5
|
M: any;
|
|
6
6
|
XS: any;
|
|
7
|
-
|
|
7
|
+
tagColor: any;
|
|
8
|
+
textColor: any;
|
|
8
9
|
variant?: string;
|
|
9
10
|
}): any;
|
|
10
11
|
export function TagClear({ id, display, value, M, XS, invert, onClick, variant, grey, }: {
|
|
@@ -42,11 +42,11 @@ var getTypoComp = function (size) { return size === 'XS' ?
|
|
|
42
42
|
function (props) { return react_1.default.createElement(index_styled_1.STYLED_ELLIPSIS_SANS_2, __assign({}, props)); }
|
|
43
43
|
: function (props) { return react_1.default.createElement(index_styled_1.STYLED_ELLIPSIS_SANS_3, __assign({}, props)); }; };
|
|
44
44
|
function TagDisplay(_a) {
|
|
45
|
-
var display = _a.display, style = _a.style, invert = _a.invert, M = _a.M, XS = _a.XS,
|
|
45
|
+
var display = _a.display, style = _a.style, invert = _a.invert, M = _a.M, XS = _a.XS, tagColor = _a.tagColor, textColor = _a.textColor, _b = _a.variant, variant = _b === void 0 ? 'primary' : _b;
|
|
46
46
|
var size = M ? 'M' : XS ? 'XS' : 'S';
|
|
47
47
|
var TYPO_COMP = getTypoComp(size);
|
|
48
|
-
return (react_1.default.createElement(index_styled_1.StyledTagDisplay, { variant: variant, invert: invert,
|
|
49
|
-
react_1.default.createElement(TYPO_COMP,
|
|
48
|
+
return (react_1.default.createElement(index_styled_1.StyledTagDisplay, { variant: variant, invert: invert, textColor: textColor, tagColor: tagColor, size: size, style: style },
|
|
49
|
+
react_1.default.createElement(TYPO_COMP, { semibold: true }, display)));
|
|
50
50
|
}
|
|
51
51
|
exports.TagDisplay = TagDisplay;
|
|
52
52
|
function TagClear(_a) {
|
|
@@ -64,10 +64,14 @@ var StyledTagDisplay = styled_components_1.default.div(templateObject_7 || (temp
|
|
|
64
64
|
var size = _a.size;
|
|
65
65
|
return commonStyle({ size: size });
|
|
66
66
|
}, function (_a) {
|
|
67
|
-
var variant = _a.variant, invert = _a.invert, size = _a.size,
|
|
67
|
+
var variant = _a.variant, invert = _a.invert, size = _a.size, textColor = _a.textColor, tagColor = _a.tagColor;
|
|
68
68
|
return variant === "primary"
|
|
69
|
-
? (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])),
|
|
70
|
-
|
|
69
|
+
? (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), tagColor
|
|
70
|
+
? tagColor
|
|
71
|
+
: !invert
|
|
72
|
+
? greyColor15
|
|
73
|
+
: greyColor80, textColor ? textColor : !invert ? greyColor80 : greyColor40) : //secondary
|
|
74
|
+
(0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: none;\n border: ", " solid\n ", ";\n color: ", ";\n "], ["\n background: none;\n border: ", " solid\n ", ";\n color: ", ";\n "])), size === "XS" ? "1px" : "2px", tagColor ? tagColor : !invert ? greyColor15 : greyColor80, textColor ? textColor : !invert ? greyColor80 : greyColor15);
|
|
71
75
|
});
|
|
72
76
|
exports.StyledTagDisplay = StyledTagDisplay;
|
|
73
77
|
var StyledTagClear = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n\n \t", "\n\t//overrides of commonStyle\n\tpadding-right: 0;\n\tgap: 0.5rem;\n\t//--\n\n\t", "\n \n\t\n\t", "\n"], ["\n\n \t", "\n\t//overrides of commonStyle\n\tpadding-right: 0;\n\tgap: 0.5rem;\n\t//--\n\n\t", "\n \n\t\n\t", "\n"])), function (_a) {
|
|
@@ -54,7 +54,18 @@ var set_deleteVal = function (action, data, valuePath, value) {
|
|
|
54
54
|
return data;
|
|
55
55
|
}
|
|
56
56
|
else if (action === 'delete') {
|
|
57
|
-
|
|
57
|
+
/**
|
|
58
|
+
* very important that we handle Array situations by 'splicing'
|
|
59
|
+
* rather than deleting, cuz 'delete' leaves an 'empty slot' in the
|
|
60
|
+
* array rather than removing the item completely which causes all
|
|
61
|
+
* sorts of problems.
|
|
62
|
+
*/
|
|
63
|
+
if (Array.isArray(dataRef)) {
|
|
64
|
+
dataRef.splice(parseInt(keysArray[len - 1]), 1);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
delete dataRef[keysArray[len - 1]];
|
|
68
|
+
}
|
|
58
69
|
return data;
|
|
59
70
|
}
|
|
60
71
|
};
|