oolib 2.11.2 → 2.11.5

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.
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -35,29 +39,35 @@ var ICONS = {
35
39
  var DisplayIcon = function (_a) {
36
40
  var color = _a.color;
37
41
  var IconComp = icons_1.icons[ICONS[color]];
38
- return (react_1.default.createElement("div", { style: { color: color } }, IconComp && react_1.default.createElement(IconComp, { size: 24, weight: "bold" })));
42
+ return react_1.default.createElement(react_1.default.Fragment, null, IconComp && react_1.default.createElement(IconComp, { size: 20, weight: "bold" }));
39
43
  };
40
44
  var Banner = function (_a) {
41
- var color = _a.color, cta = _a.cta, msg = _a.msg, handleRemove = _a.handleRemove, id = _a.id, timeOut = _a.timeOut, showIcon = _a.showIcon;
42
- var _b = (0, react_1.useState)(0), height = _b[0], setHeight = _b[1];
45
+ var color = _a.color, cta = _a.cta, msg = _a.msg, handleRemove = _a.handleRemove, id = _a.id, timeOut = _a.timeOut, showIcon = _a.showIcon, _b = _a.bottomStroke, bottomStroke = _b === void 0 ? true : _b;
46
+ var _c = (0, react_1.useState)(0), height = _c[0], setHeight = _c[1];
43
47
  var ContainerRef = (0, react_1.useRef)();
44
48
  (0, react_1.useEffect)(function () {
45
49
  var timer;
46
50
  setHeight(ContainerRef.current.scrollHeight);
47
51
  if (timeOut)
48
52
  timer = setTimeout(function () {
49
- setHeight("0px");
50
- handleRemove(null, id);
53
+ setHeight(0);
54
+ remove(null, id);
51
55
  }, timeOut);
52
56
  return function () { return (timeOut ? clearTimeout(timer) : null); };
53
57
  }, [cta, id, msg]);
54
- return (react_1.default.createElement(index_styled_1.BannerAnimateStyled, { key: id, ref: ContainerRef, maxHeight: height },
55
- react_1.default.createElement(index_styled_1.BannerWrapperStyled, { color: color },
58
+ var remove = function (e, id) {
59
+ setHeight(0);
60
+ setTimeout(function () {
61
+ handleRemove(e, id);
62
+ }, 300);
63
+ };
64
+ return (react_1.default.createElement(index_styled_1.BannerAnimateStyled, { key: id, ref: ContainerRef, height: height },
65
+ react_1.default.createElement(index_styled_1.BannerWrapperStyled, { bottomStroke: bottomStroke, color: color },
56
66
  react_1.default.createElement(index_styled_1.BannerStyled, null,
57
67
  showIcon && react_1.default.createElement(DisplayIcon, { color: color }),
58
68
  react_1.default.createElement(Typo_1.SANS_2, null, msg),
59
69
  cta && (react_1.default.createElement(Buttons_1.ButtonSecondary, { style: { marginTop: "0.5rem", marginBottom: "0.5rem" }, S: true, onClick: cta.action, invert: color === "dark" ? true : false }, cta === null || cta === void 0 ? void 0 : cta.text))),
60
- react_1.default.createElement(Buttons_1.ButtonGhost, { S: true, icon: "X", invert: color === "dark" ? true : false, onClick: function (e) { return handleRemove(e, id); } }))));
70
+ react_1.default.createElement(Buttons_1.ButtonGhost, { S: true, icon: "X", invert: color === "dark" ? true : false, onClick: function (e) { return remove(e, id); } }))));
61
71
  };
62
72
  var BannerAlert = function (_a) {
63
73
  var _b;
@@ -68,6 +78,6 @@ exports.BannerAlert = BannerAlert;
68
78
  var BannerInfo = function (_a) {
69
79
  var _b;
70
80
  var BANNER_STATE = _a.BANNER_STATE, REMOVE_INFO_BANNER = _a.REMOVE_INFO_BANNER;
71
- return (react_1.default.createElement(index_styled_1.BannerInfoStyled, null, (_b = BANNER_STATE === null || BANNER_STATE === void 0 ? void 0 : BANNER_STATE.infoState) === null || _b === void 0 ? void 0 : _b.map(function (e) { return (react_1.default.createElement(Banner, { key: e.id, id: e.id, color: e.color, msg: e.msg, cta: e.cta, handleRemove: REMOVE_INFO_BANNER, timeOut: e.timeOut, showIcon: e.showIcon })); })));
81
+ return (react_1.default.createElement(index_styled_1.BannerInfoStyled, null, (_b = BANNER_STATE === null || BANNER_STATE === void 0 ? void 0 : BANNER_STATE.infoState) === null || _b === void 0 ? void 0 : _b.map(function (e) { return (react_1.default.createElement(Banner, { key: e.id, id: e.id, color: e.color, msg: e.msg, cta: e.cta, handleRemove: REMOVE_INFO_BANNER, timeOut: e.timeOut, showIcon: e.showIcon, bottomStroke: false })); })));
72
82
  };
73
83
  exports.BannerInfo = BannerInfo;
@@ -3,12 +3,32 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
4
  return cooked;
5
5
  };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
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;
8
28
  };
9
29
  Object.defineProperty(exports, "__esModule", { value: true });
10
30
  exports.BannerInfoStyled = exports.BannerAlertStyled = exports.BannerStyled = exports.BannerWrapperStyled = exports.BannerAnimateStyled = void 0;
11
- var styled_components_1 = __importDefault(require("styled-components"));
31
+ var styled_components_1 = __importStar(require("styled-components"));
12
32
  var themes_1 = require("../../themes");
13
33
  var mixins_1 = require("../../themes/mixins");
14
34
  var transitions_1 = require("../../themes/mixins/transitions");
@@ -20,26 +40,29 @@ var colorConfig = {
20
40
  grey: { bgColor: greyColor5 },
21
41
  dark: { bgColor: greyColor100 },
22
42
  };
23
- exports.BannerAnimateStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n transition: inherit;\n max-height: ", "px;\n"], ["\n overflow: hidden;\n transition: inherit;\n max-height: ", "px;\n"])), function (_a) {
24
- var maxHeight = _a.maxHeight;
25
- return maxHeight;
43
+ exports.BannerAnimateStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n ", "\n height: ", "px;\n"], ["\n overflow: hidden;\n ", "\n height: ", "px;\n"])), (0, transitions_1.transition)("height"), function (_a) {
44
+ var height = _a.height;
45
+ return height;
26
46
  });
27
- exports.BannerWrapperStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n padding: 0.5rem 2rem;\n position: relative;\n\n gap: 1rem;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n\n box-shadow: inset 00px -2px 0px ", ";\n\n color: ", ";\n\n ", " {\n align-items: center;\n }\n"], ["\n display: flex;\n padding: 0.5rem 2rem;\n position: relative;\n\n gap: 1rem;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n\n box-shadow: inset 00px -2px 0px ", ";\n\n color: ", ";\n\n ", " {\n align-items: center;\n }\n"])), greyColor15, function (_a) {
47
+ exports.BannerWrapperStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n padding: 0.5rem 2rem;\n position: relative;\n\n gap: 1rem;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n\n ", "\n\n /* box-shadow: ", "; */\n\n color: ", ";\n\n ", " {\n align-items: center;\n }\n"], ["\n display: flex;\n padding: 0.5rem 2rem;\n position: relative;\n\n gap: 1rem;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n\n ", "\n\n /* box-shadow: ", "; */\n\n color: ", ";\n\n ", " {\n align-items: center;\n }\n"])), greyColor15, function (_a) {
28
48
  var _b;
29
49
  var color = _a.color;
30
50
  return (_b = colorConfig[color]) === null || _b === void 0 ? void 0 : _b.bgColor;
31
51
  }, function (_a) {
32
- var _b;
33
- var color = _a.color;
34
- return (_b = colorConfig[color]) === null || _b === void 0 ? void 0 : _b.color;
52
+ var bottomStroke = _a.bottomStroke;
53
+ return bottomStroke && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: inset 00px -2px 0px ", ";\n "], ["\n box-shadow: inset 00px -2px 0px ", ";\n "])), function (_a) {
54
+ var _b;
55
+ var color = _a.color;
56
+ return (_b = colorConfig[color]) === null || _b === void 0 ? void 0 : _b.color;
57
+ });
58
+ }, function (_a) {
59
+ var bottomStroke = _a.bottomStroke;
60
+ return bottomStroke && "";
35
61
  }, function (_a) {
36
62
  var color = _a.color;
37
63
  return (color === "dark" ? white : "");
38
64
  }, (0, mixins_1.mediaQuery)("sm"));
39
- exports.BannerStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n width: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n width: 100%;\n"])));
40
- exports.BannerAlertStyled = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: sticky;\n z-index: 10000000;\n top: 0;\n gap: 0.2rem;\n width: 100%;\n height:", "px;\n ", "\n"], ["\n position: sticky;\n z-index: 10000000;\n top: 0;\n gap: 0.2rem;\n width: 100%;\n height:", "px;\n ", "\n"])), function (_a) {
41
- var height = _a.height;
42
- return height;
43
- }, (0, transitions_1.transition)("max-height"));
44
- exports.BannerInfoStyled = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: sticky;\n z-index: 10000000;\n top: 0;\n width: 100%;\n ", "\n"], ["\n position: sticky;\n z-index: 10000000;\n top: 0;\n width: 100%;\n ", "\n"])), (0, transitions_1.transition)("max-height"));
45
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
65
+ exports.BannerStyled = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n width: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n width: 100%;\n"])));
66
+ exports.BannerAlertStyled = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: sticky;\n z-index: 10000000;\n top: 0;\n gap: 0.2rem;\n width: 100%;\n\n .item-enter{\n\n }\n\n\n .item-enter-active {\n}\n.item-exit {\n /* height: 0; */\n}\n.item-exit-active {\n height: 0;\n ", "\n}\n\n\n"], ["\n position: sticky;\n z-index: 10000000;\n top: 0;\n gap: 0.2rem;\n width: 100%;\n\n .item-enter{\n\n }\n\n\n .item-enter-active {\n}\n.item-exit {\n /* height: 0; */\n}\n.item-exit-active {\n height: 0;\n ", "\n}\n\n\n"])), (0, transitions_1.transition)("height"));
67
+ exports.BannerInfoStyled = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: sticky;\n z-index: 10000000;\n top: 0;\n width: 100%;\n"], ["\n position: sticky;\n z-index: 10000000;\n top: 0;\n width: 100%;\n"])));
68
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
14
  if (k2 === undefined) k2 = k;
15
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
16
20
  }) : (function(o, m, k, k2) {
17
21
  if (k2 === undefined) k2 = k;
18
22
  o[k2] = m[k];
@@ -5,7 +5,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  };
6
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
7
  if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
9
13
  }) : (function(o, m, k, k2) {
10
14
  if (k2 === undefined) k2 = k;
11
15
  o[k2] = m[k];
@@ -0,0 +1,7 @@
1
+ export function AvatarDisplay({ value, title: titleProp, style, size, invert }: {
2
+ value: any;
3
+ title: any;
4
+ style: any;
5
+ size?: number;
6
+ invert: any;
7
+ }): JSX.Element;
@@ -0,0 +1,19 @@
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.AvatarDisplay = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var styled_js_1 = require("./styled.js");
9
+ var AvatarDisplay = function (_a) {
10
+ var value = _a.value, titleProp = _a.title, style = _a.style, _b = _a.size, size = _b === void 0 ? 2.5 : _b, invert = _a.invert;
11
+ var title = titleProp || value.title;
12
+ var titleInitial = title && title[0].toUpperCase();
13
+ var imageURL = (value === null || value === void 0 ? void 0 : value.userUploaded) && (value === null || value === void 0 ? void 0 : value.userUploaded[0].publicUrl);
14
+ return (imageURL ?
15
+ react_1.default.createElement(styled_js_1.StyledAvatarImg, { invert: invert, size: size, style: style, src: imageURL, alt: "profile picture" })
16
+ :
17
+ react_1.default.createElement(styled_js_1.StyledAvatarTXT, { invert: invert, size: size, style: style }, titleInitial));
18
+ };
19
+ exports.AvatarDisplay = AvatarDisplay;
@@ -0,0 +1,2 @@
1
+ export const StyledAvatarImg: any;
2
+ export const StyledAvatarTXT: any;
@@ -0,0 +1,48 @@
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.StyledAvatarTXT = exports.StyledAvatarImg = void 0;
31
+ var styled_components_1 = __importStar(require("styled-components"));
32
+ var utilsOolib_1 = require("../../../../utilsOolib");
33
+ var themes_1 = require("../../../../themes");
34
+ var index_styled_1 = require("../../../Typo/index.styled");
35
+ var greyColor80 = themes_1.colors.greyColor80, white = themes_1.colors.white;
36
+ var commonStyle = function (_a) {
37
+ var size = _a.size, invert = _a.invert, theme = _a.theme;
38
+ return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n color: ", ";\n \n"], ["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n color: ", ";\n \n"])), isNaN(size) ? size : size + 'rem', isNaN(size) ? size : size + 'rem', invert ? greyColor80 : (0, utilsOolib_1.getPrimaryColor10)(theme.colors), white);
39
+ };
40
+ exports.StyledAvatarImg = styled_components_1.default.img(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n font-size: 8px;\n"], ["\n ", "\n font-size: 8px;\n"])), function (_a) {
41
+ var theme = _a.theme, invert = _a.invert, size = _a.size;
42
+ return commonStyle({ theme: theme, invert: invert, size: size });
43
+ });
44
+ exports.StyledAvatarTXT = (0, styled_components_1.default)(index_styled_1.SANS_3_STYLED)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n display: grid;\n place-items: center;\n"], ["\n ", "\n display: grid;\n place-items: center;\n"])), function (_a) {
45
+ var theme = _a.theme, invert = _a.invert, size = _a.size;
46
+ return commonStyle({ theme: theme, invert: invert, size: size });
47
+ });
48
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -1,16 +1,18 @@
1
- export function OKELink({ invert, disabled, theme, color, invertUnderline, linkType, link: linkProp, to, text, children, onClick, icon, iconAfter, iconSize }: {
1
+ export function OKELink({ invert, disabled, color, invertUnderline, linkType, link: linkProp, to, storyBookTheme, text, children, onClick, icon, iconAfter, iconSize, avatar, avatarTitle }: {
2
2
  invert: any;
3
3
  disabled: any;
4
- theme: any;
5
4
  color: any;
6
5
  invertUnderline: any;
7
6
  linkType: any;
8
7
  link: any;
9
8
  to: any;
9
+ storyBookTheme: any;
10
10
  text: any;
11
11
  children: any;
12
12
  onClick: any;
13
13
  icon: any;
14
14
  iconAfter: any;
15
15
  iconSize: any;
16
+ avatar: any;
17
+ avatarTitle: any;
16
18
  }): JSX.Element;
@@ -17,18 +17,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.OKELink = void 0;
18
18
  var react_1 = __importDefault(require("react"));
19
19
  var react_router_dom_1 = require("react-router-dom");
20
+ var styled_components_1 = require("styled-components");
20
21
  var utilsOolib_1 = require("../../utilsOolib");
21
22
  var utils_1 = require("../../utils");
22
23
  var icons_1 = require("../../icons");
23
24
  var styled_1 = require("./styled");
24
25
  var utils_2 = require("./utils");
26
+ var AvatarDisplay_1 = require("./comps/AvatarDisplay");
25
27
  var OKELink = function (_a) {
26
- var invert = _a.invert, disabled = _a.disabled, theme = _a.theme, color = _a.color, invertUnderline = _a.invertUnderline, linkType = _a.linkType, linkProp = _a.link, to = _a.to, text = _a.text, children = _a.children, onClick = _a.onClick, icon = _a.icon, iconAfter = _a.iconAfter, iconSize = _a.iconSize;
28
+ var invert = _a.invert, disabled = _a.disabled, color = _a.color, invertUnderline = _a.invertUnderline, linkType = _a.linkType, linkProp = _a.link, to = _a.to, storyBookTheme = _a.storyBookTheme, text = _a.text, children = _a.children, onClick = _a.onClick, icon = _a.icon, iconAfter = _a.iconAfter, iconSize = _a.iconSize, avatar = _a.avatar, avatarTitle = _a.avatarTitle;
27
29
  var localize = (0, utilsOolib_1.useLocale)();
30
+ var theme = (0, styled_components_1.useTheme)();
28
31
  var link = linkProp || to;
29
32
  var PrefixIconComp = icons_1.icons[icon];
30
33
  var SuffixIconComp = icons_1.icons[iconAfter];
31
- var iconColor = (0, utils_2.setLinkColor)({ disabled: disabled, color: color, invert: invert, theme: theme });
34
+ var iconColor = (0, utils_2.setLinkColor)({ disabled: disabled, color: color, invert: invert, theme: theme || storyBookTheme });
35
+ var AvatarComp = avatar && AvatarDisplay_1.AvatarDisplay;
32
36
  return (react_1.default.createElement(styled_1.StyledLink, __assign({ onClick: function (ev) {
33
37
  ev.stopPropagation();
34
38
  linkType === 'action' && !disabled && onClick(ev);
@@ -42,6 +46,7 @@ var OKELink = function (_a) {
42
46
  href: !disabled ? (0, utils_1.injectHttps)(link) : '#',
43
47
  target: "_blank"
44
48
  })),
49
+ AvatarComp && react_1.default.createElement(AvatarComp, { value: avatar, title: avatarTitle, invert: invert }),
45
50
  PrefixIconComp && react_1.default.createElement(PrefixIconComp, { color: iconColor, size: iconSize || 15 }),
46
51
  react_1.default.createElement("span", { className: "text" }, localize(text || children)),
47
52
  SuffixIconComp && react_1.default.createElement(SuffixIconComp, { color: iconColor, size: iconSize || 15 })));
@@ -1,4 +1,4 @@
1
- export function TabBar({ id, options, value, onChange, updateUrl, style, emptyTabs, }: {
1
+ export function TabBar({ id, options, value, onChange, updateUrl, style, emptyTabs, queryParamKey }: {
2
2
  id: any;
3
3
  options: any;
4
4
  value: any;
@@ -6,4 +6,5 @@ export function TabBar({ id, options, value, onChange, updateUrl, style, emptyTa
6
6
  updateUrl: any;
7
7
  style: any;
8
8
  emptyTabs: any;
9
+ queryParamKey?: string;
9
10
  }): JSX.Element;
@@ -9,27 +9,26 @@ var Typo_1 = require("../Typo");
9
9
  var index_styled_1 = require("./index.styled");
10
10
  var react_router_dom_1 = require("react-router-dom");
11
11
  var TabBar = function (_a) {
12
- var id = _a.id, options = _a.options, value = _a.value, onChange = _a.onChange, updateUrl = _a.updateUrl, style = _a.style, emptyTabs = _a.emptyTabs;
12
+ var id = _a.id, options = _a.options, value = _a.value, onChange = _a.onChange, updateUrl = _a.updateUrl, style = _a.style, emptyTabs = _a.emptyTabs, _b = _a.queryParamKey, queryParamKey = _b === void 0 ? 'activeTab' : _b;
13
13
  var history = (0, react_router_dom_1.useHistory)();
14
14
  var location = (0, react_router_dom_1.useLocation)();
15
15
  var handleClick = function (value) {
16
16
  if (updateUrl) {
17
17
  var params = new URLSearchParams(location.search);
18
- params.set("activeTab", JSON.stringify(value));
18
+ params.set(queryParamKey, JSON.stringify(value));
19
19
  history.push({
20
20
  search: params.toString(),
21
21
  });
22
22
  }
23
- onChange(null, value);
23
+ onChange && onChange(null, value);
24
24
  };
25
- return (react_1.default.createElement(index_styled_1.TabBarStyled, null,
26
- react_1.default.createElement(index_styled_1.TabBarContainerStyled, { id: id },
27
- react_1.default.createElement(index_styled_1.TabBarRowStyled, { id: id }, options.map(function (op) {
28
- var tabHasError = emptyTabs && emptyTabs.includes(op.value);
29
- var tabIsActive = value && op.value === value.value;
30
- return (react_1.default.createElement(index_styled_1.TabBarTabWrapper, { style1: style === "1", key: op.value, active: tabIsActive, error: tabHasError },
31
- react_1.default.createElement(index_styled_1.TabBarTabStyled, { active: tabIsActive, error: tabHasError, style1: style === "1", onClick: function () { return handleClick(op); } },
32
- react_1.default.createElement(Typo_1.SANS_2, { semibold: style === "1" }, op.display))));
33
- })))));
25
+ return (react_1.default.createElement(index_styled_1.TabBarContainerStyled, { id: id },
26
+ react_1.default.createElement(index_styled_1.TabBarRowStyled, { id: id }, options.map(function (op) {
27
+ var tabHasError = emptyTabs && emptyTabs.includes(op.value);
28
+ var tabIsActive = value && op.value === value.value;
29
+ return (react_1.default.createElement(index_styled_1.TabBarTabWrapper, { style1: style === "1", key: op.value, active: tabIsActive, error: tabHasError },
30
+ react_1.default.createElement(index_styled_1.TabBarTabStyled, { active: tabIsActive, error: tabHasError, style1: style === "1", onClick: function () { return handleClick(op); } },
31
+ react_1.default.createElement(Typo_1.SANS_2, { semibold: style === "1" }, op.display))));
32
+ }))));
34
33
  };
35
34
  exports.TabBar = TabBar;
@@ -1,4 +1,3 @@
1
- export const TabBarStyled: any;
2
1
  export const TabBarContainerStyled: any;
3
2
  export const TabBarRowStyled: any;
4
3
  export const TabBarTabWrapper: any;
@@ -5,7 +5,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  };
6
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
7
  if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
9
13
  }) : (function(o, m, k, k2) {
10
14
  if (k2 === undefined) k2 = k;
11
15
  o[k2] = m[k];
@@ -23,15 +27,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
27
  return result;
24
28
  };
25
29
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.TabBarTabStyled = exports.TabBarTabWrapper = exports.TabBarRowStyled = exports.TabBarContainerStyled = exports.TabBarStyled = void 0;
30
+ exports.TabBarTabStyled = exports.TabBarTabWrapper = exports.TabBarRowStyled = exports.TabBarContainerStyled = void 0;
27
31
  var styled_components_1 = __importStar(require("styled-components"));
28
32
  var themes_1 = require("../../themes");
29
33
  var mixins_1 = require("../../themes/mixins");
30
34
  var utilsOolib_1 = require("../../utilsOolib");
31
35
  var greyColor100 = themes_1.colors.greyColor100, greyColor10 = themes_1.colors.greyColor10, red = themes_1.colors.red, lightRed = themes_1.colors.lightRed, greyColor5 = themes_1.colors.greyColor5, white = themes_1.colors.white, none = themes_1.colors.none;
32
- var tabBarWrapperStyle1 = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n :hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"], ["\n ", "\n :hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"])), (0, mixins_1.transition)("background-color"), greyColor5, function (_a) {
36
+ var tabBarWrapperStyle1 = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n :hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"], ["\n ", "\n :hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"])), (0, mixins_1.transition)("background-color"), greyColor10, function (_a) {
33
37
  var active = _a.active;
34
- return active && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n ::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: ", ";\n }\n "], ["\n position: relative;\n background-color: ", ";\n ::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: ", ";\n }\n "])), greyColor5, function (_a) {
38
+ return active && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n border-radius: 0.2rem;\n ::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: ", ";\n }\n "], ["\n position: relative;\n background-color: ", ";\n border-radius: 0.2rem;\n ::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: ", ";\n }\n "])), greyColor5, function (_a) {
35
39
  var colors = _a.theme.colors;
36
40
  return (0, utilsOolib_1.getPrimaryColor100)(colors);
37
41
  });
@@ -44,25 +48,30 @@ var tabBarWrapperStyle2 = (0, styled_components_1.css)(templateObject_5 || (temp
44
48
  return (active ? "" : greyColor10);
45
49
  }, function (_a) {
46
50
  var active = _a.active;
47
- return active && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n "], ["\n position: relative;\n background-color: ", ";\n "])), greyColor100);
51
+ return active && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-radius: 0.2rem;\n position: relative;\n background-color: ", ";\n "], ["\n border-radius: 0.2rem;\n position: relative;\n background-color: ", ";\n "])), greyColor100);
48
52
  });
49
- var tabBarTabStyle1 = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding: 0.8rem 2rem;\n white-space: nowrap;\n ", "\n"], ["\n padding: 0.8rem 2rem;\n white-space: nowrap;\n ", "\n"])), function (_a) {
53
+ var tabBarTabStyle1 = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n white-space: nowrap;\n ", "\n"], ["\n white-space: nowrap;\n ", "\n"])), function (_a) {
50
54
  var error = _a.error;
51
55
  return error && (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), red);
52
56
  });
53
57
  var tabBarTabStyle2 = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n padding-left: 2rem;\n padding-right: 2rem;\n ", "\n ", "\n"], ["\n padding-left: 2rem;\n padding-right: 2rem;\n ", "\n ", "\n"])), (0, mixins_1.multiTransition)("color"), function (_a) {
54
58
  var active = _a.active;
55
- return active && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), white);
59
+ return active && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n border-radius: 0.2rem;\n color: ", ";\n "], ["\n border-radius: 0.2rem;\n color: ", ";\n "])), white);
56
60
  });
57
- exports.TabBarStyled = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background-color: ", ";\n z-index: 1000;\n height: 4rem;\n"], ["\n background-color: ", ";\n z-index: 1000;\n height: 4rem;\n"])), white);
58
- exports.TabBarContainerStyled = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n height: 100%;\n width: fit-content;\n"], ["\n height: 100%;\n width: fit-content;\n"])));
59
- exports.TabBarRowStyled = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n height: 100%;\n display: flex;\n"], ["\n height: 100%;\n display: flex;\n"])));
60
- exports.TabBarTabWrapper = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n height: 100%;\n ", "\n"], ["\n height: 100%;\n ", "\n"])), function (_a) {
61
+ // export const TabBarStyled = styled.div`
62
+ // background-color: ${white};
63
+ // z-index: 1000;
64
+ // border-top: ${({ top }) => top && `0.1rem solid ${greyColor5}`};
65
+ // border-bottom: ${({ bottom }) => bottom && `0.1rem solid ${greyColor5}`};
66
+ // `;
67
+ exports.TabBarContainerStyled = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: fit-content;\n"], ["\n width: fit-content;\n"])));
68
+ exports.TabBarRowStyled = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
69
+ exports.TabBarTabWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
61
70
  var style1 = _a.style1;
62
71
  return (style1 ? tabBarWrapperStyle1 : tabBarWrapperStyle2);
63
72
  });
64
- exports.TabBarTabStyled = styled_components_1.default.button(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n height: 100%;\n cursor: pointer;\n color: ", ";\n background-color: ", ";\n\n border: 0;\n padding: 0;\n :hover {\n background-color: ", ";\n }\n\n ", "\n"], ["\n height: 100%;\n cursor: pointer;\n color: ", ";\n background-color: ", ";\n\n border: 0;\n padding: 0;\n :hover {\n background-color: ", ";\n }\n\n ", "\n"])), greyColor100, none, none, function (_a) {
73
+ exports.TabBarTabStyled = styled_components_1.default.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding: 0.8rem 2rem;\n cursor: pointer;\n color: ", ";\n background-color: ", ";\n\n border: 0;\n :hover {\n background-color: ", ";\n }\n\n ", "\n"], ["\n padding: 0.8rem 2rem;\n cursor: pointer;\n color: ", ";\n background-color: ", ";\n\n border: 0;\n :hover {\n background-color: ", ";\n }\n\n ", "\n"])), greyColor100, none, none, function (_a) {
65
74
  var style1 = _a.style1;
66
75
  return (style1 ? tabBarTabStyle1 : tabBarTabStyle2);
67
76
  });
68
- 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;
77
+ 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;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -5,7 +5,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  };
6
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
7
  if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
9
13
  }) : (function(o, m, k, k2) {
10
14
  if (k2 === undefined) k2 = k;
11
15
  o[k2] = m[k];
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
14
  if (k2 === undefined) k2 = k;
15
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
16
20
  }) : (function(o, m, k, k2) {
17
21
  if (k2 === undefined) k2 = k;
18
22
  o[k2] = m[k];
@@ -206,7 +210,7 @@ var URLInput = function (props) {
206
210
  return [2 /*return*/, { type: 'success', msg: 'valid url' }];
207
211
  case 3:
208
212
  err_1 = _a.sent();
209
- if (/\b(([\w-]+:\/\/?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/)))/.test(value)) {
213
+ if (/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/ig.test(value)) {
210
214
  return [2 /*return*/, { type: 'success', msg: 'valid url' }];
211
215
  }
212
216
  return [2 /*return*/, { type: 'error', msg: 'Enter a valid url...' }];
@@ -12,7 +12,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var mixins_1 = require("../../themes/mixins");
13
13
  var utilsOolib_1 = require("../../utilsOolib");
14
14
  var themes_1 = require("../../themes");
15
- var white = themes_1.colors.white, greyColor10 = themes_1.colors.greyColor10;
15
+ var white = themes_1.colors.white, greyColor10 = themes_1.colors.greyColor10, greyColor80 = themes_1.colors.greyColor80, greyColor70 = themes_1.colors.greyColor70, greyColor100 = themes_1.colors.greyColor100, greyColor40 = themes_1.colors.greyColor40;
16
16
  exports.StyledToggleWrraper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n"])));
17
17
  exports.StyledButtonSlider = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 4rem;\n height: 2rem;\n user-select: none;\n position: relative;\n \n border-radius: ", ";\n cursor: ", ";\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n ", "\n"], ["\n width: 4rem;\n height: 2rem;\n user-select: none;\n position: relative;\n \n border-radius: ", ";\n cursor: ", ";\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n ", "\n"])), function (_a) {
18
18
  var square = _a.square;
@@ -21,29 +21,32 @@ exports.StyledButtonSlider = styled_components_1.default.div(templateObject_2 ||
21
21
  var disabled = _a.disabled;
22
22
  return disabled ? 'not-allowed' : 'pointer';
23
23
  }, function (_a) {
24
- var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled;
24
+ var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled, invert = _a.invert;
25
25
  if (disabled)
26
- return greyColor10;
26
+ return invert ? greyColor80 : greyColor10;
27
27
  if (inactive)
28
- return (0, utilsOolib_1.getPrimaryColor40)(colors);
29
- return (0, utilsOolib_1.getPrimaryColor100)(colors);
28
+ return greyColor70;
29
+ return invert ? (0, utilsOolib_1.getPrimaryColor40)(colors) : (0, utilsOolib_1.getPrimaryColor100)(colors);
30
30
  }, function (_a) {
31
- var colors = _a.theme.colors, disabled = _a.disabled;
32
- return disabled ? greyColor10 : (0, utilsOolib_1.getPrimaryColorText)(colors);
31
+ var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled;
32
+ return !disabled && (inactive ? greyColor40 : (0, utilsOolib_1.getPrimaryColorText)(colors));
33
33
  }, (0, mixins_1.transition)('background-color'));
34
- exports.StyledToggleButton = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 2rem;\n height: 2rem;\n background-color: ", ";\n outline: none;\n border-radius: ", ";\n cursor: ", ";\n border: 2px solid ", ";\n\n position: absolute;\n top: 0;\n left: ", ";\n ", "\n"], ["\n width: 2rem;\n height: 2rem;\n background-color: ", ";\n outline: none;\n border-radius: ", ";\n cursor: ", ";\n border: 2px solid ", ";\n\n position: absolute;\n top: 0;\n left: ", ";\n ", "\n"])), white, function (_a) {
34
+ exports.StyledToggleButton = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 2rem;\n height: 2rem;\n background-color: ", ";\n outline: none;\n border-radius: ", ";\n cursor: ", ";\n border: 2px solid ", ";\n\n position: absolute;\n top: 0;\n left: ", ";\n ", "\n"], ["\n width: 2rem;\n height: 2rem;\n background-color: ", ";\n outline: none;\n border-radius: ", ";\n cursor: ", ";\n border: 2px solid ", ";\n\n position: absolute;\n top: 0;\n left: ", ";\n ", "\n"])), function (_a) {
35
+ var invert = _a.invert;
36
+ return invert ? greyColor100 : white;
37
+ }, function (_a) {
35
38
  var square = _a.square;
36
39
  return square ? '0.3rem' : '50%';
37
40
  }, function (_a) {
38
41
  var disabled = _a.disabled;
39
42
  return disabled ? 'not-allowed' : 'pointer';
40
43
  }, function (_a) {
41
- var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled;
44
+ var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled, invert = _a.invert;
42
45
  if (disabled)
43
- return greyColor10;
46
+ return invert ? greyColor80 : greyColor10;
44
47
  if (inactive)
45
- return (0, utilsOolib_1.getPrimaryColor40)(colors);
46
- return (0, utilsOolib_1.getPrimaryColor100)(colors);
48
+ return greyColor70;
49
+ return invert ? (0, utilsOolib_1.getPrimaryColor40)(colors) : (0, utilsOolib_1.getPrimaryColor100)(colors);
47
50
  }, function (_a) {
48
51
  var direction = _a.direction;
49
52
  return direction === 'left' ? '0' : 'calc(100% - 2rem)';
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -5,7 +5,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  };
6
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
7
  if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
9
13
  }) : (function(o, m, k, k2) {
10
14
  if (k2 === undefined) k2 = k;
11
15
  o[k2] = m[k];
@@ -9,6 +9,7 @@ var styled_components_1 = require("styled-components");
9
9
  var themes_1 = require("../themes");
10
10
  var normalize_1 = require("./normalize");
11
11
  require("../assets/fonts/style.css");
12
+ var mixins_1 = require("../themes/mixins");
12
13
  var greyColor15 = themes_1.colors.greyColor15, greyColor40 = themes_1.colors.greyColor40, greyColor80 = themes_1.colors.greyColor80, greyColor100 = themes_1.colors.greyColor100;
13
- exports.GlobalStyles = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n//some normalize code picked off the internet\n", "\n\nhtml{\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-size:10px;\n color: ", ";\n scroll-behavior: smooth;\n}\n\n::-webkit-scrollbar { width: 1rem}\n::-webkit-scrollbar-track {background-color: ", ";}\n::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 0.5rem;\n}\n::-webkit-scrollbar-thumb:hover {background-color: ", ";}\n\nhr {\n border: none;\n border-bottom: 0.1rem solid ", ";\n}\n\nbutton:focus, input:focus, textarea:focus{\n outline: none;\n}\n\n// be sure never to add 'span' to this list.. ( it will mess with base typo styling on RTE )\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n ", "\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n}\n\nul, ol { padding-left: 2rem; margin-bottom: 0;}\nli { list-style: none }\n\n.sansSerif{\n ", "\n}\n\n.serif{\n ", "\n}\n\n.medium {\n font-weight: 500;\n}\n\n.semibold {\n font-weight: 600;\n}\n\n.bold{\n font-weight:bold;\n}\n\n.italic{\n font-style: italic;\n}\n\nb, strong {\n font-weight: bold;\n}\n\n \n"], ["\n\n//some normalize code picked off the internet\n", "\n\nhtml{\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-size:10px;\n color: ", ";\n scroll-behavior: smooth;\n}\n\n::-webkit-scrollbar { width: 1rem}\n::-webkit-scrollbar-track {background-color: ", ";}\n::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 0.5rem;\n}\n::-webkit-scrollbar-thumb:hover {background-color: ", ";}\n\nhr {\n border: none;\n border-bottom: 0.1rem solid ", ";\n}\n\nbutton:focus, input:focus, textarea:focus{\n outline: none;\n}\n\n// be sure never to add 'span' to this list.. ( it will mess with base typo styling on RTE )\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n ", "\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n}\n\nul, ol { padding-left: 2rem; margin-bottom: 0;}\nli { list-style: none }\n\n.sansSerif{\n ", "\n}\n\n.serif{\n ", "\n}\n\n.medium {\n font-weight: 500;\n}\n\n.semibold {\n font-weight: 600;\n}\n\n.bold{\n font-weight:bold;\n}\n\n.italic{\n font-style: italic;\n}\n\nb, strong {\n font-weight: bold;\n}\n\n \n"])), normalize_1.normalize, greyColor100, greyColor15, greyColor40, greyColor80, greyColor80, themes_1.typo.sansSerif, themes_1.typo.sansSerif, themes_1.typo.serif);
14
+ exports.GlobalStyles = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n//some normalize code picked off the internet\n", "\n\nhtml{\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-size:10px;\n color: ", ";\n scroll-behavior: smooth;\n}\n\n::-webkit-scrollbar { \n width: 0.7rem;// for vertical bars;\n height: 0.5rem; //for vertical bars \n}\n::-webkit-scrollbar-track {background-color: ", ";}\n::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 0.4rem;\n}\n::-webkit-scrollbar-thumb:hover {background-color: ", ";}\n", "{\n ::-webkit-scrollbar { \n width: 1rem;\n height: 0.7rem;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 0.5rem;\n }\n}\n\nhr {\n border: none;\n border-bottom: 0.1rem solid ", ";\n}\n\nbutton:focus, input:focus, textarea:focus{\n outline: none;\n}\n\n// be sure never to add 'span' to this list.. ( it will mess with base typo styling on RTE )\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n ", "\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n}\n\nul, ol { padding-left: 2rem; margin-bottom: 0;}\nli { list-style: none }\n\n.sansSerif{\n ", "\n}\n\n.serif{\n ", "\n}\n\n.medium {\n font-weight: 500;\n}\n\n.semibold {\n font-weight: 600;\n}\n\n.bold{\n font-weight:bold;\n}\n\n.italic{\n font-style: italic;\n}\n\nb, strong {\n font-weight: bold;\n}\n\n \n"], ["\n\n//some normalize code picked off the internet\n", "\n\nhtml{\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-size:10px;\n color: ", ";\n scroll-behavior: smooth;\n}\n\n::-webkit-scrollbar { \n width: 0.7rem;// for vertical bars;\n height: 0.5rem; //for vertical bars \n}\n::-webkit-scrollbar-track {background-color: ", ";}\n::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 0.4rem;\n}\n::-webkit-scrollbar-thumb:hover {background-color: ", ";}\n", "{\n ::-webkit-scrollbar { \n width: 1rem;\n height: 0.7rem;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 0.5rem;\n }\n}\n\nhr {\n border: none;\n border-bottom: 0.1rem solid ", ";\n}\n\nbutton:focus, input:focus, textarea:focus{\n outline: none;\n}\n\n// be sure never to add 'span' to this list.. ( it will mess with base typo styling on RTE )\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n ", "\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n}\n\nul, ol { padding-left: 2rem; margin-bottom: 0;}\nli { list-style: none }\n\n.sansSerif{\n ", "\n}\n\n.serif{\n ", "\n}\n\n.medium {\n font-weight: 500;\n}\n\n.semibold {\n font-weight: 600;\n}\n\n.bold{\n font-weight:bold;\n}\n\n.italic{\n font-style: italic;\n}\n\nb, strong {\n font-weight: bold;\n}\n\n \n"])), normalize_1.normalize, greyColor100, greyColor15, greyColor40, greyColor80, (0, mixins_1.mediaQuery)('md'), greyColor80, themes_1.typo.sansSerif, themes_1.typo.sansSerif, themes_1.typo.serif);
14
15
  var templateObject_1;
@@ -45,6 +45,7 @@ export namespace icons {
45
45
  export { Cards };
46
46
  export { SignOut };
47
47
  export { CheckCircle };
48
+ export { Circle };
48
49
  export { ImageSquare };
49
50
  export { ListDashes };
50
51
  export { ListNumbers };
@@ -123,6 +124,7 @@ import { CheckSquareOffset } from "phosphor-react";
123
124
  import { Cards } from "phosphor-react";
124
125
  import { SignOut } from "phosphor-react";
125
126
  import { CheckCircle } from "phosphor-react";
127
+ import { Circle } from "phosphor-react";
126
128
  import { ImageSquare } from "phosphor-react";
127
129
  import { ListDashes } from "phosphor-react";
128
130
  import { ListNumbers } from "phosphor-react";
@@ -50,6 +50,7 @@ exports.icons = {
50
50
  Cards: phosphor_react_1.Cards,
51
51
  SignOut: phosphor_react_1.SignOut,
52
52
  CheckCircle: phosphor_react_1.CheckCircle,
53
+ Circle: phosphor_react_1.Circle,
53
54
  ImageSquare: phosphor_react_1.ImageSquare,
54
55
  ListDashes: phosphor_react_1.ListDashes,
55
56
  ListNumbers: phosphor_react_1.ListNumbers,
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.11.2",
3
+ "version": "2.11.5",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,19 +41,18 @@
41
41
  "chromatic": "^6.1.0",
42
42
  "copyfiles": "^2.4.1",
43
43
  "cz-conventional-changelog": "^3.3.0",
44
- "mdx-embed": "0.0.22",
45
- "postcss-flexbugs-fixes": "^5.0.2",
46
44
  "react": "^17.0.2",
47
45
  "react-dom": "^17.0.2",
48
46
  "react-json-view": "^1.21.3",
47
+ "react-router-dom": "^5.1.2",
49
48
  "semantic-release": "^18.0.0",
50
49
  "styled-components": "^5.3.1",
51
- "webpack": "^5.58.1",
52
- "webpack-cli": "^4.8.0"
50
+ "mdx-embed": "^1.0.0"
53
51
  },
54
52
  "peerDependencies": {
55
53
  "react": "^17.0.2",
56
- "react-dom": "^17.0.2"
54
+ "react-dom": "^17.0.2",
55
+ "react-router-dom": "^5.1.2"
57
56
  },
58
57
  "config": {
59
58
  "commitizen": {
@@ -69,7 +68,6 @@
69
68
  "draftjs-conductor": "^2.2.0",
70
69
  "immutable": "^3.7.6",
71
70
  "modularscale-js": "^3.0.1",
72
- "phosphor-react": "^1.3.1",
73
- "react-router-dom": "^5.1.2"
71
+ "phosphor-react": "^1.3.1"
74
72
  }
75
73
  }