oolib 2.19.1 → 2.19.2

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.
@@ -65,8 +65,7 @@ var ActionMenu = function (_a) {
65
65
  showActions: showActions
66
66
  }),
67
67
  react_1.default.createElement(styled_1.StyledOptionsWrapper, { invert: invert, align: align, ref: optionsWrapperRef }, actions.map(function (action) {
68
- var ActionButton = action.buttonComp || styled_1.StyledOption;
69
- return (react_1.default.createElement(ActionButton, __assign({}, action, { onClick: function (ev) {
68
+ return (react_1.default.createElement(styled_1.StyledOption, __assign({}, action, { onClick: function (ev) {
70
69
  action.onClick && action.onClick(ev);
71
70
  setShowActions(false);
72
71
  }, key: action.display, invert: invert }),
@@ -43,7 +43,7 @@ var tabBarWrapperStyle1 = (0, styled_components_1.css)(templateObject_3 || (temp
43
43
  var error = _a.error;
44
44
  return error && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __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 "])), lightRed, red);
45
45
  });
46
- var tabBarWrapperStyle2 = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n background-color: ", ";\n :first-of-type {\n border-radius: 2px 0 0 2px;\n }\n :last-of-type {\n border-radius: 0 2px 2px 0;\n }\n :hover {\n background-color: ", ";\n }\n\n ", "\n"], ["\n ", "\n background-color: ", ";\n :first-of-type {\n border-radius: 2px 0 0 2px;\n }\n :last-of-type {\n border-radius: 0 2px 2px 0;\n }\n :hover {\n background-color: ", ";\n }\n\n ", "\n"])), (0, mixins_1.multiTransition)("background-color"), greyColor5, function (_a) {
46
+ var tabBarWrapperStyle2 = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n background-color: ", ";\n :first-of-type {\n border-radius: 2px 0 0 2px;\n }\n :last-of-type {\n border-radius: 0 2px 2px 0;\n }\n :hover {\n background-color: ", ";\n }\n\n ", "\n"], ["\n ", "\n background-color: ", ";\n :first-of-type {\n border-radius: 2px 0 0 2px;\n }\n :last-of-type {\n border-radius: 0 2px 2px 0;\n }\n :hover {\n background-color: ", ";\n }\n\n ", "\n"])), (0, mixins_1.transition)("background-color"), greyColor5, function (_a) {
47
47
  var active = _a.active;
48
48
  return (active ? "" : greyColor10);
49
49
  }, function (_a) {
@@ -54,7 +54,7 @@ var tabBarTabStyle1 = (0, styled_components_1.css)(templateObject_7 || (template
54
54
  var error = _a.error;
55
55
  return error && (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), red);
56
56
  });
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) {
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.transition)("color"), function (_a) {
58
58
  var active = _a.active;
59
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);
60
60
  });
@@ -93,7 +93,7 @@ var StyledTagClear = styled_components_1.default.div(templateObject_13 || (templ
93
93
  return variant === "ghost" && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background: none;\n\t border: none;\n "], ["\n background: none;\n\t border: none;\n "])));
94
94
  });
95
95
  exports.StyledTagClear = StyledTagClear;
96
- var StyledTagClearIconWrapper = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n \tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n \theight: 100%;\n\tpadding-right: 0.75rem;\n\tpadding-left: 0.75rem;\n\t", ";\n\t", "\n"], ["\n \tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n \theight: 100%;\n\tpadding-right: 0.75rem;\n\tpadding-left: 0.75rem;\n\t", ";\n\t", "\n"])), (0, mixins_1.multiTransition)('color', 'background-color'), function (_a) {
96
+ var StyledTagClearIconWrapper = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n \tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n \theight: 100%;\n\tpadding-right: 0.75rem;\n\tpadding-left: 0.75rem;\n\t", ";\n\t", "\n"], ["\n \tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n \theight: 100%;\n\tpadding-right: 0.75rem;\n\tpadding-left: 0.75rem;\n\t", ";\n\t", "\n"])), (0, mixins_1.transition)('color', 'background-color'), function (_a) {
97
97
  var invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
98
98
  return grey
99
99
  ? greyHover({ invert: invert, colors: colors })
@@ -103,7 +103,7 @@ exports.StyledTagClearIconWrapper = StyledTagClearIconWrapper;
103
103
  var StyledTagSelect = styled_components_1.default.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", "\n ", "\n\n\t", "\n \n"], ["\n ", "\n ", "\n\n\t", "\n \n"])), function (_a) {
104
104
  var size = _a.size;
105
105
  return commonStyle({ size: size });
106
- }, (0, mixins_1.multiTransition)("background-color"), function (_a) {
106
+ }, (0, mixins_1.transition)("background-color"), function (_a) {
107
107
  var selected = _a.selected, size = _a.size, colors = _a.theme.colors;
108
108
  return (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n border: ", " solid ", ";\n cursor: pointer;\n background-color: ", ";\n\t color: ", ";\n\t\t", "\n "], ["\n border: ", " solid ", ";\n cursor: pointer;\n background-color: ", ";\n\t color: ", ";\n\t\t", "\n "])), size === "XS" ? "1px" : "2px", (0, utilsOolib_1.getPrimaryColor100)(colors), selected ? (0, utilsOolib_1.getPrimaryColor40)(colors) : null, (0, utilsOolib_1.getPrimaryColorText)(colors), !selected && (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["&:hover {\n background-color: ", ";\n color: ", ";\n\t\t}"], ["&:hover {\n background-color: ", ";\n color: ", ";\n\t\t}"])), (0, utilsOolib_1.getPrimaryColor40)(colors), (0, utilsOolib_1.getPrimaryColorText)(colors)));
109
109
  });
@@ -111,7 +111,7 @@ exports.StyledTagSelect = StyledTagSelect;
111
111
  var StyledTagLink = styled_components_1.default.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n \t", "\n\t", ";\n ", "\n"], ["\n \t", "\n\t", ";\n ", "\n"])), function (_a) {
112
112
  var size = _a.size;
113
113
  return commonStyle({ size: size });
114
- }, (0, mixins_1.multiTransition)("background-color", "color"), function (_a) {
114
+ }, (0, mixins_1.transition)("background-color", "color"), function (_a) {
115
115
  var variant = _a.variant, invert = _a.invert, size = _a.size, colors = _a.theme.colors;
116
116
  return variant === "primary"
117
117
  ? (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n \t\tbackground-color: ", ";\n \t\tcolor: ", ";\n\t\t\t\t", ";\n \t"], ["\n \t\tbackground-color: ", ";\n \t\tcolor: ", ";\n\t\t\t\t", ";\n \t"])), !invert
@@ -50,5 +50,5 @@ exports.StyledToggleButton = styled_components_1.default.button(templateObject_3
50
50
  }, function (_a) {
51
51
  var direction = _a.direction;
52
52
  return direction === 'left' ? '0' : 'calc(100% - 2rem)';
53
- }, (0, mixins_1.transition)('left', 0.2));
53
+ }, (0, mixins_1.transition)('left 0.2s'));
54
54
  var templateObject_1, templateObject_2, templateObject_3;
@@ -43,7 +43,7 @@ var clipPaths = {
43
43
  exports.StyledTooltip = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n ", "\n\n padding: 0.4rem 1rem;\n white-space: nowrap;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 2px;\n position: absolute;\n ", "\n\n \n"], ["\n ", ";\n ", "\n\n padding: 0.4rem 1rem;\n white-space: nowrap;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 2px;\n position: absolute;\n ", "\n\n \n"])), function (_a) {
44
44
  var show = _a.show;
45
45
  return show ? (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["opacity:1; z-index: 5;"], ["opacity:1; z-index: 5;"]))) : (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["opacity:0; z-index: -5;"], ["opacity:0; z-index: -5;"])));
46
- }, (0, mixins_1.transition)('opacity', 0.1), white, greyColor15, function (_a) {
46
+ }, (0, mixins_1.transition)('opacity 0.1s'), white, greyColor15, function (_a) {
47
47
  var position = _a.position;
48
48
  return (0, util_1.positionTooltip)(position);
49
49
  });
@@ -1,8 +1,7 @@
1
1
  export function mediaQuery(point: any): string;
2
2
  export function getBreakPoint(point: any): 0 | 600 | 800 | 1000 | 1300 | 1600 | "pass a valid breakpoint";
3
3
  import { transition } from "./transitions";
4
- import { multiTransition } from "./transitions";
5
4
  export function isElementInViewport(el: any): boolean;
6
5
  export const ellipsis: any;
7
6
  export function multilineUnderline(color: any, thickness?: string, reverse?: boolean, hovered?: boolean): any;
8
- export { transition, multiTransition };
7
+ export { transition };
@@ -4,11 +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.multilineUnderline = exports.ellipsis = exports.isElementInViewport = exports.multiTransition = exports.transition = exports.getBreakPoint = exports.mediaQuery = void 0;
7
+ exports.multilineUnderline = exports.ellipsis = exports.isElementInViewport = exports.transition = exports.getBreakPoint = exports.mediaQuery = void 0;
8
8
  var styled_components_1 = require("styled-components");
9
9
  var transitions_1 = require("./transitions");
10
10
  Object.defineProperty(exports, "transition", { enumerable: true, get: function () { return transitions_1.transition; } });
11
- Object.defineProperty(exports, "multiTransition", { enumerable: true, get: function () { return transitions_1.multiTransition; } });
12
11
  var getBreakPoint = function (point) {
13
12
  switch (point) {
14
13
  case "xs":
@@ -1,2 +1 @@
1
- export function transition(property: any, duration?: number, delay?: number): any;
2
- export function multiTransition(...properties: any[]): any;
1
+ export function transition(...properties: any[]): any;
@@ -4,20 +4,20 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  return cooked;
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.multiTransition = exports.transition = void 0;
7
+ exports.transition = void 0;
8
8
  var styled_components_1 = require("styled-components");
9
- var transition = function (property, duration, delay) {
10
- if (duration === void 0) { duration = 0.3; }
11
- if (delay === void 0) { delay = 0; }
12
- return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transition: ", " ", "s ease-out ", "s;\n"], ["\n transition: ", " ", "s ease-out ", "s;\n"])), property, duration, delay);
13
- };
14
- exports.transition = transition;
15
- var multiTransition = function () {
9
+ var transition = function () {
16
10
  var properties = [];
17
11
  for (var _i = 0; _i < arguments.length; _i++) {
18
12
  properties[_i] = arguments[_i];
19
13
  }
20
- return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transition: ", " 0.3s ease-out;\n"], ["\n transition: ", " 0.3s ease-out;\n"])), properties.join(' 0.3s ease-out, '));
14
+ return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transition: ", ";\n"], ["\n transition: ", ";\n"])), properties.map(function (property) {
15
+ return property.split(' ').length === 1 //meaning only property name is passed. e.g background-color
16
+ ? "".concat(property, " 0.3s ease-out")
17
+ : property.split(' ').length === 2 //means duration is there...
18
+ ? "".concat(property, " ease-out")
19
+ : property; //else we assume time and ease and whatever is passed
20
+ }).join(', '));
21
21
  };
22
- exports.multiTransition = multiTransition;
23
- var templateObject_1, templateObject_2;
22
+ exports.transition = transition;
23
+ var templateObject_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.19.1",
3
+ "version": "2.19.2",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",