oolib 2.209.0 → 2.210.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/stories/v2/components/List.stories.d.ts +11 -2
- package/dist/stories/v2/components/List.stories.js +8 -2
- package/dist/v2/components/Dropdowns/comps/OptionsShell/styled.js +3 -2
- package/dist/v2/components/List/comps/ListGroup.d.ts +2 -1
- package/dist/v2/components/List/comps/ListGroup.js +2 -2
- package/dist/v2/components/List/comps/ListItem.d.ts +2 -1
- package/dist/v2/components/List/comps/ListItem.js +10 -3
- package/dist/v2/components/List/comps/styled.d.ts +1 -0
- package/dist/v2/components/List/comps/styled.js +4 -7
- package/dist/v2/components/List/index.d.ts +2 -1
- package/dist/v2/components/List/index.js +3 -3
- package/dist/v2/themes/colors.d.ts +1 -0
- package/dist/v2/themes/colors.js +5 -3
- package/dist/v2/themes/globalStyles.d.ts +1 -0
- package/dist/v2/themes/globalStyles.js +5 -3
- package/package.json +1 -1
|
@@ -63,6 +63,15 @@ declare namespace _default {
|
|
|
63
63
|
let defaultValue_6: boolean;
|
|
64
64
|
export { defaultValue_6 as defaultValue };
|
|
65
65
|
}
|
|
66
|
+
namespace alignCheckbox {
|
|
67
|
+
let control_7: string;
|
|
68
|
+
export { control_7 as control };
|
|
69
|
+
export let options: string[];
|
|
70
|
+
let description_8: string;
|
|
71
|
+
export { description_8 as description };
|
|
72
|
+
let defaultValue_7: string;
|
|
73
|
+
export { defaultValue_7 as defaultValue };
|
|
74
|
+
}
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
77
|
export default _default;
|
|
@@ -78,10 +87,10 @@ export namespace ListItem_ {
|
|
|
78
87
|
let name_2: string;
|
|
79
88
|
export { name_2 as name };
|
|
80
89
|
export { availableIcons as options };
|
|
81
|
-
export namespace
|
|
90
|
+
export namespace control_8 {
|
|
82
91
|
let type: string;
|
|
83
92
|
}
|
|
84
|
-
export {
|
|
93
|
+
export { control_8 as control };
|
|
85
94
|
}
|
|
86
95
|
}
|
|
87
96
|
export { argTypes_1 as argTypes };
|
|
@@ -141,7 +141,13 @@ exports.default = {
|
|
|
141
141
|
control: "boolean",
|
|
142
142
|
description: "Display selections as tags",
|
|
143
143
|
defaultValue: false,
|
|
144
|
-
}
|
|
144
|
+
},
|
|
145
|
+
alignCheckbox: {
|
|
146
|
+
control: "select",
|
|
147
|
+
options: ["left", "right"],
|
|
148
|
+
description: "Align checkbox",
|
|
149
|
+
defaultValue: "left",
|
|
150
|
+
},
|
|
145
151
|
},
|
|
146
152
|
};
|
|
147
153
|
var List_ = function (args) {
|
|
@@ -186,7 +192,7 @@ var List_ = function (args) {
|
|
|
186
192
|
};
|
|
187
193
|
return (React.createElement(__1.Container, { style: { background: "#eff" } },
|
|
188
194
|
React.createElement(__1.PaddingTop40, null),
|
|
189
|
-
React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: handleSelect, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
|
|
195
|
+
React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: handleSelect, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder, alignCheckbox: args.alignCheckbox, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
|
|
190
196
|
React.createElement(__1.PaddingBottom40, null)));
|
|
191
197
|
};
|
|
192
198
|
exports.List_ = List_;
|
|
@@ -12,6 +12,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
12
12
|
var themes_1 = require("../../../../themes");
|
|
13
13
|
var mixins_1 = require("../../../../../themes/mixins");
|
|
14
14
|
var globalVariables_1 = require("../../../../../globalStyles/globalVariables");
|
|
15
|
+
var globalStyles_1 = require("../../../../themes/globalStyles");
|
|
15
16
|
/** for lightbox shell */
|
|
16
17
|
exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: 100%;\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"], ["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: 100%;\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"])), function (_a) {
|
|
17
18
|
var isOpen = _a.isOpen, openHeight = _a.openHeight;
|
|
@@ -23,7 +24,7 @@ exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateOb
|
|
|
23
24
|
var isOpen = _a.isOpen;
|
|
24
25
|
return isOpen ? '1px' : 0;
|
|
25
26
|
});
|
|
26
|
-
exports.StyledOptionsWrapper = styled_components_1.default.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n z-index: 100000; //show remove if we do animation thing\n padding-left: 0; //cancel out the ul's padding left\n cursor: pointer;\n width: 100%;\n min-width: ", ";\n max-width: 36rem;\n overflow: auto;\n margin-top: ", ";\n ", "\n max-height: ", ";\n\n
|
|
27
|
+
exports.StyledOptionsWrapper = styled_components_1.default.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n z-index: 100000; //show remove if we do animation thing\n padding-left: 0; //cancel out the ul's padding left\n cursor: pointer;\n width: 100%;\n min-width: ", ";\n max-width: 36rem;\n overflow: auto;\n margin-top: ", ";\n ", "\n max-height: ", ";\n\n ", "\n"], ["\n z-index: 100000; //show remove if we do animation thing\n padding-left: 0; //cancel out the ul's padding left\n cursor: pointer;\n width: 100%;\n min-width: ", ";\n max-width: 36rem;\n overflow: auto;\n margin-top: ", ";\n ", "\n max-height: ", ";\n\n ", "\n"
|
|
27
28
|
/** for modal shell */
|
|
28
29
|
])), function (_a) {
|
|
29
30
|
var matchSelectInputWidth = _a.matchSelectInputWidth, selectRefwidth = _a.selectRefwidth;
|
|
@@ -45,7 +46,7 @@ exports.StyledOptionsWrapper = styled_components_1.default.ul(templateObject_2 |
|
|
|
45
46
|
default:
|
|
46
47
|
return '30rem';
|
|
47
48
|
}
|
|
48
|
-
},
|
|
49
|
+
}, globalStyles_1.globalScrollbarStyling);
|
|
49
50
|
/** for modal shell */
|
|
50
51
|
exports.StyledModalOptionsWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n /* overflow: auto; */\n"], ["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n /* overflow: auto; */\n"])), themes_1.colors.white);
|
|
51
52
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const GroupHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export const GroupDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, setSearchString, setSearchBarFocus, groupHeaderStickyTop }: {
|
|
3
|
+
export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, setSearchString, setSearchBarFocus, groupHeaderStickyTop, alignCheckbox, }: {
|
|
4
4
|
id: any;
|
|
5
5
|
group: any;
|
|
6
6
|
index: any;
|
|
@@ -18,5 +18,6 @@ export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedO
|
|
|
18
18
|
setSearchString: any;
|
|
19
19
|
setSearchBarFocus: any;
|
|
20
20
|
groupHeaderStickyTop?: number;
|
|
21
|
+
alignCheckbox?: string;
|
|
21
22
|
}): React.JSX.Element;
|
|
22
23
|
import React from 'react';
|
|
@@ -20,7 +20,7 @@ exports.GroupHeader = styled_components_1.default.div(templateObject_1 || (templ
|
|
|
20
20
|
});
|
|
21
21
|
exports.GroupDivider = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0.4rem 0 0.8rem 0;\n"], ["\n margin: 0.4rem 0 0.8rem 0;\n"])));
|
|
22
22
|
var ListGroup = function (_a) {
|
|
23
|
-
var id = _a.id, group = _a.group, index = _a.index, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, isMulti = _a.isMulti, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, _b = _a.groupHeaderStickyTop, groupHeaderStickyTop = _b === void 0 ? 0 : _b;
|
|
23
|
+
var id = _a.id, group = _a.group, index = _a.index, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, isMulti = _a.isMulti, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, _b = _a.groupHeaderStickyTop, groupHeaderStickyTop = _b === void 0 ? 0 : _b, _c = _a.alignCheckbox, alignCheckbox = _c === void 0 ? "left" : _c;
|
|
24
24
|
return (react_1.default.createElement("div", null,
|
|
25
25
|
index > 0 && (react_1.default.createElement(exports.GroupDivider, null,
|
|
26
26
|
react_1.default.createElement(Divider_1.Divider, null))),
|
|
@@ -36,7 +36,7 @@ var ListGroup = function (_a) {
|
|
|
36
36
|
if (setFocusSelectTagsInput)
|
|
37
37
|
setFocusSelectTagsInput(true);
|
|
38
38
|
}
|
|
39
|
-
}, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: group.options.length === idx + 1 ? observerRef : null, isMulti: isMulti, isTagsStyle: isTagsStyle, value: value })); })));
|
|
39
|
+
}, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: group.options.length === idx + 1 ? observerRef : null, isMulti: isMulti, isTagsStyle: isTagsStyle, value: value, alignCheckbox: alignCheckbox })); })));
|
|
40
40
|
};
|
|
41
41
|
exports.ListGroup = ListGroup;
|
|
42
42
|
var templateObject_1, templateObject_2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function ListItem({ id, option, isSelected, isFocussed, scrollFocussedOpIntoView, onChange: parentOnChange, setSearchString, optionsClassName, S, observerRef, isTagsStyle, isMulti, value, index, }: {
|
|
1
|
+
export function ListItem({ id, option, isSelected, isFocussed, scrollFocussedOpIntoView, onChange: parentOnChange, setSearchString, optionsClassName, S, observerRef, isTagsStyle, isMulti, value, index, alignCheckbox, }: {
|
|
2
2
|
id: any;
|
|
3
3
|
option: any;
|
|
4
4
|
isSelected: any;
|
|
@@ -13,5 +13,6 @@ export function ListItem({ id, option, isSelected, isFocussed, scrollFocussedOpI
|
|
|
13
13
|
isMulti: any;
|
|
14
14
|
value: any;
|
|
15
15
|
index: any;
|
|
16
|
+
alignCheckbox?: string;
|
|
16
17
|
}): React.JSX.Element;
|
|
17
18
|
import React from "react";
|
|
@@ -17,7 +17,7 @@ var RadioAndCheckbox_1 = require("../../RadioAndCheckbox");
|
|
|
17
17
|
var styled_1 = require("./styled");
|
|
18
18
|
var grey40 = themes_1.colors.grey40, grey80 = themes_1.colors.grey80, grey60 = themes_1.colors.grey60;
|
|
19
19
|
var ListItem = function (_a) {
|
|
20
|
-
var id = _a.id, option = _a.option, isSelected = _a.isSelected, isFocussed = _a.isFocussed, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, setSearchString = _a.setSearchString, optionsClassName = _a.optionsClassName, S = _a.S, observerRef = _a.observerRef, isTagsStyle = _a.isTagsStyle, isMulti = _a.isMulti, value = _a.value, index = _a.index;
|
|
20
|
+
var id = _a.id, option = _a.option, isSelected = _a.isSelected, isFocussed = _a.isFocussed, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, setSearchString = _a.setSearchString, optionsClassName = _a.optionsClassName, S = _a.S, observerRef = _a.observerRef, isTagsStyle = _a.isTagsStyle, isMulti = _a.isMulti, value = _a.value, index = _a.index, _b = _a.alignCheckbox, alignCheckbox = _b === void 0 ? "left" : _b;
|
|
21
21
|
var theme = (0, styled_components_1.useTheme)();
|
|
22
22
|
var TypoComp = S ? Typo2_1.UI_BODY_SM_DF : Typo2_1.UI_BODY_SM_DF;
|
|
23
23
|
var image = option.image, display = option.display, icon = option.icon, desc = option.desc, color = option.color, loading = option.loading, disabled = option.disabled;
|
|
@@ -34,6 +34,12 @@ var ListItem = function (_a) {
|
|
|
34
34
|
var opIsSelected = function (thisOpData) {
|
|
35
35
|
return value === null || value === void 0 ? void 0 : value.some(function (d) { return d.value === thisOpData.value; });
|
|
36
36
|
};
|
|
37
|
+
var renderCheckBox = function () {
|
|
38
|
+
if (isMulti && !isTagsStyle) {
|
|
39
|
+
return react_1.default.createElement(RadioAndCheckbox_1.CheckboxButton, { isSelected: opIsSelected(option) });
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
37
43
|
return (react_1.default.createElement(styled_1.StyledListItemWrapper, { index: index, isSelected: isSelected, isFocussed: isFocussed, className: "OKE-Dropdown__option", ref: function (el) { return isFocussed && el && scrollFocussedOpIntoView(el); }, onClick: handleClick, S: S, style: { pointerEvents: disabled && "none", cursor: !disabled && "pointer" } },
|
|
38
44
|
react_1.default.createElement("div", { ref: observerRef, style: {
|
|
39
45
|
display: "flex",
|
|
@@ -47,7 +53,7 @@ var ListItem = function (_a) {
|
|
|
47
53
|
alignItems: "center",
|
|
48
54
|
gap: "0.5rem"
|
|
49
55
|
} },
|
|
50
|
-
|
|
56
|
+
alignCheckbox === "left" && renderCheckBox(),
|
|
51
57
|
icon &&
|
|
52
58
|
(0, genIcon_1.genIcon)({
|
|
53
59
|
icon: icon,
|
|
@@ -58,6 +64,7 @@ var ListItem = function (_a) {
|
|
|
58
64
|
color && (0, genColor_1.genColor)({ color: color }))),
|
|
59
65
|
react_1.default.createElement("div", null,
|
|
60
66
|
react_1.default.createElement(TypoComp, { semibold: desc ? true : false, className: "OKE-Dropdown__optionText ".concat(optionsClassName || ""), style: { color: disabled ? grey40 : grey80 } }, (0, getText_1.getText)(display)),
|
|
61
|
-
desc && (react_1.default.createElement(Typo2_1.UI_CAPTION_DF, { className: "OKE-Dropdown__optionDesc", style: { color: disabled ? grey40 : grey60, marginTop: "0.2rem" } }, (0, getText_1.getText)(desc)))))
|
|
67
|
+
desc && (react_1.default.createElement(Typo2_1.UI_CAPTION_DF, { className: "OKE-Dropdown__optionDesc", style: { color: disabled ? grey40 : grey60, marginTop: "0.2rem" } }, (0, getText_1.getText)(desc))))),
|
|
68
|
+
react_1.default.createElement(styled_1.StyledRightSection, null, alignCheckbox === "right" && renderCheckBox())));
|
|
62
69
|
};
|
|
63
70
|
exports.ListItem = ListItem;
|
|
@@ -37,18 +37,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
};
|
|
38
38
|
})();
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.StyledListItemWrapper = void 0;
|
|
40
|
+
exports.StyledRightSection = exports.StyledListItemWrapper = void 0;
|
|
41
41
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
42
42
|
var themes_1 = require("../../../themes");
|
|
43
43
|
var getDynamicColors_1 = require("../../../themes/utils/getDynamicColors");
|
|
44
44
|
var grey10 = themes_1.colors.grey10;
|
|
45
|
-
exports.StyledListItemWrapper = styled_components_1.default.li(
|
|
45
|
+
exports.StyledListItemWrapper = styled_components_1.default.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n /* padding: ", "; */\n padding: 0.8rem;\n border-radius: 0.4rem;\n gap: 20rem;\n\n justify-content: space-between;\n\n \n background-color: ", ";\n\n .OKE-Dropdown__optionText{\n color: ", "\n } \n\n .OKE-Dropdown__optionIcon{\n color: ", "\n } \n\n &:hover{\n background-color: ", ";\n\n .OKE-Dropdown__optionText{\n color: ", ";\n } \n\n .OKE-Dropdown__optionIcon{\n color: ", ";\n } \n }\n\n \n\n &:first-of-type {\n /* margin-top: 0.4rem; */\n }\n\n &:last-of-type {\n /* margin-bottom: 0.4rem; */\n }\n\n .OKE-Dropdown__optionDesc {\n @include kp-clamp-text(2);\n white-space: normal;\n }\n\n .OKE-Dropdown__optionImg {\n flex: 0 0 auto;\n }\n\n .OKE-Dropdown__checkboxClickArea {\n position: absolute;\n width: 2rem;\n height: 2rem;\n }\n .OKE-Dropdown__checkboxClickArea-box {\n margin-top: 0.2rem;\n flex-shrink: 0;\n }\n"], ["\n display: flex;\n align-items: center;\n /* padding: ", "; */\n padding: 0.8rem;\n border-radius: 0.4rem;\n gap: 20rem;\n\n justify-content: space-between;\n\n \n background-color: ", ";\n\n .OKE-Dropdown__optionText{\n color: ", "\n } \n\n .OKE-Dropdown__optionIcon{\n color: ", "\n } \n\n &:hover{\n background-color: ", ";\n\n .OKE-Dropdown__optionText{\n color: ", ";\n } \n\n .OKE-Dropdown__optionIcon{\n color: ", ";\n } \n }\n\n \n\n &:first-of-type {\n /* margin-top: 0.4rem; */\n }\n\n &:last-of-type {\n /* margin-bottom: 0.4rem; */\n }\n\n .OKE-Dropdown__optionDesc {\n @include kp-clamp-text(2);\n white-space: normal;\n }\n\n .OKE-Dropdown__optionImg {\n flex: 0 0 auto;\n }\n\n .OKE-Dropdown__checkboxClickArea {\n position: absolute;\n width: 2rem;\n height: 2rem;\n }\n .OKE-Dropdown__checkboxClickArea-box {\n margin-top: 0.2rem;\n flex-shrink: 0;\n }\n"])), function (_a) {
|
|
46
46
|
var S = _a.S;
|
|
47
47
|
return S ? '0.8rem' : '0.6rem 0.8rem';
|
|
48
|
-
}, function (_a) {
|
|
49
|
-
var S = _a.S;
|
|
50
|
-
return !S
|
|
51
|
-
? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* min-height: 3.8rem; */\n "], ["\n /* min-height: 3.8rem; */\n "]))) : (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* height: 3rem; */\n "], ["\n /* height: 3rem; */\n "])));
|
|
52
48
|
}, function (_a) {
|
|
53
49
|
var isFocussed = _a.isFocussed, isSelected = _a.isSelected, theme = _a.theme;
|
|
54
50
|
if (isSelected) {
|
|
@@ -68,4 +64,5 @@ exports.StyledListItemWrapper = styled_components_1.default.li(templateObject_3
|
|
|
68
64
|
var theme = _a.theme;
|
|
69
65
|
return (0, getDynamicColors_1.getOnSecondary)(theme === null || theme === void 0 ? void 0 : theme.colors);
|
|
70
66
|
});
|
|
71
|
-
|
|
67
|
+
exports.StyledRightSection = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-top: 0.1rem;\n display: flex;\n gap: 0.5rem;\n align-self: flex-start;\n justify-content: space-between;\n"], ["\n margin-top: 0.1rem;\n display: flex;\n gap: 0.5rem;\n align-self: flex-start;\n justify-content: space-between;\n"])));
|
|
68
|
+
var templateObject_1, templateObject_2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const StyledListWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export function isGroupedData(options: any): boolean;
|
|
3
|
-
export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, disableShadow, isSearchable, searchbarPlaceholder, searchBarFocus, searchString, setSearchString, setSearchBarFocus, children, enableBorder, style, groupHeaderStickyTop, showList: showListInParent, usedIn }: {
|
|
3
|
+
export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, disableShadow, isSearchable, searchbarPlaceholder, searchBarFocus, searchString, setSearchString, setSearchBarFocus, children, enableBorder, style, groupHeaderStickyTop, showList: showListInParent, usedIn, alignCheckbox }: {
|
|
4
4
|
id: any;
|
|
5
5
|
options?: any[];
|
|
6
6
|
value: any;
|
|
@@ -27,5 +27,6 @@ export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView,
|
|
|
27
27
|
groupHeaderStickyTop: any;
|
|
28
28
|
showList: any;
|
|
29
29
|
usedIn: any;
|
|
30
|
+
alignCheckbox: any;
|
|
30
31
|
}): React.JSX.Element;
|
|
31
32
|
import React from 'react';
|
|
@@ -67,13 +67,13 @@ var isGroupedData = function (options) {
|
|
|
67
67
|
exports.isGroupedData = isGroupedData;
|
|
68
68
|
var List = function (_a) {
|
|
69
69
|
// const theme = useTheme();
|
|
70
|
-
var id = _a.id, _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, _c = _a.isMulti, isMulti = _c === void 0 ? false : _c, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, disableShadow = _a.disableShadow, isSearchable = _a.isSearchable, searchbarPlaceholder = _a.searchbarPlaceholder, searchBarFocus = _a.searchBarFocus, searchString = _a.searchString, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, children = _a.children, enableBorder = _a.enableBorder, style = _a.style, groupHeaderStickyTop = _a.groupHeaderStickyTop, showListInParent = _a.showList, usedIn = _a.usedIn;
|
|
70
|
+
var id = _a.id, _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, _c = _a.isMulti, isMulti = _c === void 0 ? false : _c, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, disableShadow = _a.disableShadow, isSearchable = _a.isSearchable, searchbarPlaceholder = _a.searchbarPlaceholder, searchBarFocus = _a.searchBarFocus, searchString = _a.searchString, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, children = _a.children, enableBorder = _a.enableBorder, style = _a.style, groupHeaderStickyTop = _a.groupHeaderStickyTop, showListInParent = _a.showList, usedIn = _a.usedIn, alignCheckbox = _a.alignCheckbox;
|
|
71
71
|
var renderListItems = function () {
|
|
72
72
|
if (options.length === 0) {
|
|
73
73
|
return react_1.default.createElement(NoOptionResultsComp_1.NoOptionResultsComp, { S: S });
|
|
74
74
|
}
|
|
75
75
|
if ((0, exports.isGroupedData)(options)) {
|
|
76
|
-
return (react_1.default.createElement(react_1.Fragment, null, options.map(function (group, index) { return (react_1.default.createElement(ListGroup_1.ListGroup, { id: id, key: "group-".concat(index), group: group, index: index, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: observerRef, isMulti: isMulti, isTagsStyle: isTagsStyle, setFocusSelectTagsInput: setFocusSelectTagsInput, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, disableShadow: disableShadow, groupHeaderStickyTop: groupHeaderStickyTop })); })));
|
|
76
|
+
return (react_1.default.createElement(react_1.Fragment, null, options.map(function (group, index) { return (react_1.default.createElement(ListGroup_1.ListGroup, { id: id, key: "group-".concat(index), group: group, index: index, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: observerRef, isMulti: isMulti, isTagsStyle: isTagsStyle, setFocusSelectTagsInput: setFocusSelectTagsInput, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, disableShadow: disableShadow, groupHeaderStickyTop: groupHeaderStickyTop, alignCheckbox: alignCheckbox })); })));
|
|
77
77
|
}
|
|
78
78
|
return options.map(function (option, index) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === index, index: index, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function () {
|
|
79
79
|
if (!option.loading) {
|
|
@@ -85,7 +85,7 @@ var List = function (_a) {
|
|
|
85
85
|
if (setFocusSelectTagsInput)
|
|
86
86
|
setFocusSelectTagsInput(true);
|
|
87
87
|
}
|
|
88
|
-
}, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: options.length === index + 1 ? observerRef : null, isMulti: isMulti, isTagsStyle: isTagsStyle, value: value })); });
|
|
88
|
+
}, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: options.length === index + 1 ? observerRef : null, isMulti: isMulti, isTagsStyle: isTagsStyle, value: value, alignCheckbox: alignCheckbox })); });
|
|
89
89
|
};
|
|
90
90
|
return (react_1.default.createElement(exports.StyledListWrapper, { disableShadow: disableShadow, style: style, isSearchable: isSearchable, enableBorder: enableBorder },
|
|
91
91
|
isSearchable && (react_1.default.createElement(SearchBar_1.SearchBar, { searchbarPlaceholder: searchbarPlaceholder, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus,
|
package/dist/v2/themes/colors.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.colors = exports.dataVizColorsText = exports.dataVizColors = void 0;
|
|
|
4
4
|
var primary = "#00223D";
|
|
5
5
|
var secondary = "#526070";
|
|
6
6
|
var tertiary = "#30133E";
|
|
7
|
-
var primaryContainer = "#
|
|
7
|
+
var primaryContainer = "#126DED";
|
|
8
8
|
var onPrimary = "#FFFFFF";
|
|
9
|
-
var secondaryContainer = "#
|
|
10
|
-
var onSecondary = "#
|
|
9
|
+
var secondaryContainer = "#E2EEFF";
|
|
10
|
+
var onSecondary = "#0052C5";
|
|
11
11
|
var tertiaryContainer = "#533461";
|
|
12
12
|
var onTertiary = "#F0C8FF";
|
|
13
13
|
var surfaceContainer = "#EEEDF1";
|
|
@@ -18,6 +18,7 @@ var surfaceContainerLow = "#F3F3F7";
|
|
|
18
18
|
var grey2 = '#00000005';
|
|
19
19
|
var grey5 = '#0000000D';
|
|
20
20
|
var grey10 = '#0000001A';
|
|
21
|
+
var grey15 = '#00000026';
|
|
21
22
|
var grey20 = '#00000033';
|
|
22
23
|
var grey30 = '#0000004D';
|
|
23
24
|
var grey40 = '#00000066';
|
|
@@ -80,6 +81,7 @@ exports.colors = {
|
|
|
80
81
|
grey2: grey2,
|
|
81
82
|
grey5: grey5,
|
|
82
83
|
grey10: grey10,
|
|
84
|
+
grey15: grey15,
|
|
83
85
|
grey20: grey20,
|
|
84
86
|
grey30: grey30,
|
|
85
87
|
grey40: grey40,
|
|
@@ -11,3 +11,4 @@ export declare const globalInputElemTextColor: import("styled-components").Flatt
|
|
|
11
11
|
export declare const globalInputElemPlaceholderColor: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
}, any>>;
|
|
14
|
+
export declare const globalScrollbarStyling: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -4,9 +4,10 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.globalInputElemPlaceholderColor = exports.globalInputElemTextColor = exports.globalInputElemDisabledStyling_v2 = exports.globalInputElemBaseBorderStyling_v2 = exports.globalInputElemFocused_v2 = exports.globalInputElemHover_v2 = exports.globalInputElemPadding_v2 = void 0;
|
|
7
|
+
exports.globalScrollbarStyling = exports.globalInputElemPlaceholderColor = exports.globalInputElemTextColor = exports.globalInputElemDisabledStyling_v2 = exports.globalInputElemBaseBorderStyling_v2 = exports.globalInputElemFocused_v2 = exports.globalInputElemHover_v2 = exports.globalInputElemPadding_v2 = void 0;
|
|
8
8
|
var styled_components_1 = require("styled-components");
|
|
9
9
|
var colors_1 = require("./colors");
|
|
10
|
+
var mixins_1 = require("../../themes/mixins");
|
|
10
11
|
exports.globalInputElemPadding_v2 = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", ";\n"], ["\n padding: ", ";\n"])), function (_a) {
|
|
11
12
|
var size = _a.size;
|
|
12
13
|
return size === "S" ? '0 10px' : '0 12px';
|
|
@@ -19,8 +20,9 @@ exports.globalInputElemDisabledStyling_v2 = (0, styled_components_1.css)(templat
|
|
|
19
20
|
return disabled && (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &::before{\n border-color: ", ";\n }\n \n color: ", ";\n "], ["\n &::before{\n border-color: ", ";\n }\n \n color: ", ";\n "])), colors_1.colors.grey10, colors_1.colors.grey40);
|
|
20
21
|
});
|
|
21
22
|
exports.globalInputElemTextColor = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject([" color: ", ";"], [" color: ", ";"])), colors_1.colors.grey80);
|
|
22
|
-
exports.globalInputElemPlaceholderColor = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", "
|
|
23
|
+
exports.globalInputElemPlaceholderColor = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
23
24
|
var disabled = _a.disabled;
|
|
24
25
|
return (disabled ? colors_1.colors.grey40 : colors_1.colors.grey60);
|
|
25
26
|
});
|
|
26
|
-
|
|
27
|
+
exports.globalScrollbarStyling = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n \n ::-webkit-scrollbar { \n width: 0.5rem;// for vertical bars\n height: 0.2rem; //for horizontal bars \n }\n \n ::-webkit-scrollbar-track {\n background-color: ", ";\n }\n \n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 0.4rem;\n }\n \n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n\n ::-webkit-scrollbar-thumb:active {\n background-color: ", ";\n } \n\n ", "{\n ::-webkit-scrollbar { \n width: 0.5rem;\n height: 0.7rem;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 0.5rem;\n }\n }\n\n"], ["\n \n ::-webkit-scrollbar { \n width: 0.5rem;// for vertical bars\n height: 0.2rem; //for horizontal bars \n }\n \n ::-webkit-scrollbar-track {\n background-color: ", ";\n }\n \n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 0.4rem;\n }\n \n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n\n ::-webkit-scrollbar-thumb:active {\n background-color: ", ";\n } \n\n ", "{\n ::-webkit-scrollbar { \n width: 0.5rem;\n height: 0.7rem;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 0.5rem;\n }\n }\n\n"])), colors_1.colors.grey5, colors_1.colors.grey15, colors_1.colors.grey20, colors_1.colors.grey30, (0, mixins_1.mediaQuery)('md'));
|
|
28
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|