oolib 2.7.2 → 2.7.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.
@@ -22,7 +22,7 @@ var BlockLabel = function (props) {
22
22
  errorMsgs = props.errorMsgs;
23
23
  var shouldCompRender = (label ||
24
24
  !readOnly && (sublabel || inputOnlyLabel || isRequired === false || (errorMsgs === null || errorMsgs === void 0 ? void 0 : errorMsgs.length) > 0));
25
- var optional = readOnly ? false : !isRequired;
25
+ var optional = readOnly ? false : isRequired === false;
26
26
  var errText = errorMsgs === null || errorMsgs === void 0 ? void 0 : errorMsgs.map(function (er) { return typeof er === 'object' ? er.text : er; }).join(', ');
27
27
  //next 2 vars is for 'test link' usecase
28
28
  var errLink = (errorMsgs === null || errorMsgs === void 0 ? void 0 : errorMsgs.length) !== 1 ? undefined : errorMsgs[0].link;
@@ -12,17 +12,17 @@ var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var styled_components_2 = require("styled-components");
13
13
  var mixins_1 = require("../../themes/mixins");
14
14
  var colors_1 = require("../../themes/colors");
15
- var greyColor100 = colors_1.colors.greyColor100, greyColor80 = colors_1.colors.greyColor80, greyColor70 = colors_1.colors.greyColor70, greyColor15 = colors_1.colors.greyColor15, greyColor40 = colors_1.colors.greyColor40, white = colors_1.colors.white;
15
+ var greyColor100 = colors_1.colors.greyColor100, greyColor80 = colors_1.colors.greyColor80, greyColor70 = colors_1.colors.greyColor70, greyColor15 = colors_1.colors.greyColor15, greyColor40 = colors_1.colors.greyColor40, white = colors_1.colors.white, primaryColor10 = colors_1.colors.primaryColor10, primaryColor40 = colors_1.colors.primaryColor40, primaryColor100 = colors_1.colors.primaryColor100, primaryColorText = colors_1.colors.primaryColorText;
16
16
  //sizes
17
17
  var SIZES = {
18
18
  S: "3rem",
19
19
  M: "4rem",
20
20
  };
21
- var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: none; // $none;\n background-color: ", "; // primaryColor40: primaryColor100\n color: ", "; // greyColor100: white\n ", "\n ", "\n &:hover {\n background-color: ", "; // $primaryColor10 : $primaryColor40\n color: ", "; // greyColor100 : $primaryColorText;\n }\n"], ["\n border: none; // $none;\n background-color: ", "; // primaryColor40: primaryColor100\n color: ", "; // greyColor100: white\n ", "\n ", "\n &:hover {\n background-color: ", "; // $primaryColor10 : $primaryColor40\n color: ", "; // greyColor100 : $primaryColorText;\n }\n"])), function (_a) {
21
+ var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: none; // $none;\n background-color: ", ";\n color: ", "; // greyColor100: white\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n"], ["\n border: none; // $none;\n background-color: ", ";\n color: ", "; // greyColor100: white\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n"])), function (_a) {
22
22
  var invert = _a.invert, colors = _a.theme.colors;
23
23
  return invert
24
- ? colors.primaryColor40
25
- : colors.primaryColor100;
24
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40
25
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor100) || primaryColor100;
26
26
  }, function (_a) {
27
27
  var invert = _a.invert;
28
28
  return invert ? greyColor100 : white;
@@ -38,27 +38,27 @@ var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateOb
38
38
  }, function (_a) {
39
39
  var invert = _a.invert, colors = _a.theme.colors;
40
40
  return invert
41
- ? colors.primaryColor10
42
- : colors.primaryColor40;
41
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor10) || primaryColor10
42
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40;
43
43
  }, function (_a) {
44
44
  var invert = _a.invert, colors = _a.theme.colors;
45
45
  return invert
46
46
  ? greyColor100
47
- : colors.primaryColorText;
47
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColorText;
48
48
  });
49
- var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: 2px solid\n ", "; // primaryColor40 : $primaryColor100;\n background-color: ", "; // greyColor100: white\n color: ", "; // primaryColor40: primaryColorText\n ", "\n ", "\n ", "\n &:hover {\n background-color: ", "; // $primaryColor10 : $primaryColor40\n color: ", "; // $primaryColorText;\n }\n"], ["\n border: 2px solid\n ", "; // primaryColor40 : $primaryColor100;\n background-color: ", "; // greyColor100: white\n color: ", "; // primaryColor40: primaryColorText\n ", "\n ", "\n ", "\n &:hover {\n background-color: ", "; // $primaryColor10 : $primaryColor40\n color: ", "; // $primaryColorText;\n }\n"])), function (_a) {
49
+ var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n background-color: ", ";\n\n color: ", "; \n ", "\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", "; \n }\n"], ["\n border: 2px solid\n ", ";\n background-color: ", ";\n\n color: ", "; \n ", "\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", "; \n }\n"])), function (_a) {
50
50
  var invert = _a.invert, colors = _a.theme.colors;
51
51
  return invert
52
- ? colors.primaryColor40
53
- : colors.primaryColor100;
52
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40
53
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor100) || primaryColor100;
54
54
  }, function (_a) {
55
55
  var invert = _a.invert;
56
56
  return invert ? greyColor100 : white;
57
57
  }, function (_a) {
58
58
  var invert = _a.invert, colors = _a.theme.colors;
59
59
  return invert
60
- ? colors.primaryColor40
61
- : colors.primaryColorText;
60
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40
61
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColorText;
62
62
  }, function (_a) {
63
63
  var color = _a.color;
64
64
  return color && (0, styled_components_2.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
@@ -66,14 +66,17 @@ var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (template
66
66
  var active = _a.active;
67
67
  return active && (0, styled_components_2.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), function (_a) {
68
68
  var invert = _a.invert, colors = _a.theme.colors;
69
- return invert ? colors.primaryColor40 : colors.primaryColor10;
69
+ return invert ?
70
+ ((colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40)
71
+ :
72
+ ((colors === null || colors === void 0 ? void 0 : colors.primaryColor10) || primaryColor10);
70
73
  }, function (_a) {
71
74
  var colors = _a.theme.colors;
72
- return colors.primaryColorText;
75
+ return (colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColorText;
73
76
  });
74
77
  }, function (_a) {
75
78
  var disabled = _a.disabled;
76
- return disabled && (0, styled_components_2.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", "; //greyColor80 : $white;\n border: 2px solid ", ";\n color: ", "; //$greyColor40;\n pointer-events: none;\n "], ["\n background-color: ", "; //greyColor80 : $white;\n border: 2px solid ", ";\n color: ", "; //$greyColor40;\n pointer-events: none;\n "])), function (_a) {
79
+ return disabled && (0, styled_components_2.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border: 2px solid ", ";\n color: ", "; \n pointer-events: none;\n "], ["\n background-color: ", ";\n border: 2px solid ", ";\n color: ", "; \n pointer-events: none;\n "])), function (_a) {
77
80
  var invert = _a.invert;
78
81
  return invert ? greyColor80 : white;
79
82
  }, greyColor15, greyColor40);
@@ -82,30 +85,30 @@ var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (template
82
85
  return active
83
86
  ? ""
84
87
  : invert
85
- ? colors.primaryColor10
86
- : colors.primaryColor40;
88
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor10) || primaryColor10
89
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40;
87
90
  }, function (_a) {
88
91
  var colors = _a.theme.colors;
89
- return colors.primaryColorText;
92
+ return (colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColorText;
90
93
  });
91
- var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border: 2px solid\n ", "; // $primaryColor100;\n box-shadow: -4px 4px 1px\n ", "; //$lightShadowColor;\n background-color: ", "; //greyColor100 : $white;\n color: ", "; // primaryColor40 : $primaryColorText;\n ", "\n ", "\n &:hover {\n background-color: ", "; // $greyColor80 : $primaryColor40\n }\n"], ["\n border: 2px solid\n ", "; // $primaryColor100;\n box-shadow: -4px 4px 1px\n ", "; //$lightShadowColor;\n background-color: ", "; //greyColor100 : $white;\n color: ", "; // primaryColor40 : $primaryColorText;\n ", "\n ", "\n &:hover {\n background-color: ", "; // $greyColor80 : $primaryColor40\n }\n"])), function (_a) {
94
+ var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", ";\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", ";\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
92
95
  var invert = _a.invert, colors = _a.theme.colors;
93
96
  return invert
94
- ? colors.primaryColor40
95
- : colors.primaryColor100;
97
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40
98
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor100) || primaryColor100;
96
99
  }, function (_a) {
97
100
  var invert = _a.invert, colors = _a.theme.colors;
98
101
  return invert
99
- ? colors.primaryColor40
100
- : colors.primaryColor100;
102
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40
103
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor100) || primaryColor100;
101
104
  }, function (_a) {
102
105
  var invert = _a.invert, colors = _a.theme.colors;
103
106
  return invert ? greyColor100 : white;
104
107
  }, function (_a) {
105
108
  var invert = _a.invert, colors = _a.theme.colors;
106
109
  return invert
107
- ? colors.primaryColor40
108
- : colors.primaryColorText;
110
+ ? (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40
111
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColorText;
109
112
  }, function (_a) {
110
113
  var color = _a.color;
111
114
  return color && (0, styled_components_2.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
@@ -122,18 +125,18 @@ var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateOb
122
125
  var invert = _a.invert, colors = _a.theme.colors;
123
126
  return invert
124
127
  ? greyColor80
125
- : colors.primaryColor40;
128
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40;
126
129
  });
127
- var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", "; //$white;\n color: ", "; //primaryColor40 : greyColor100\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", "; // $greyColor70 : $primaryColor10\n }\n"], ["\n background-color: ", "; //$white;\n color: ", "; //primaryColor40 : greyColor100\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", "; // $greyColor70 : $primaryColor10\n }\n"])), function (_a) {
130
+ var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", "; //$white;\n color: ", ";\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n background-color: ", "; //$white;\n color: ", ";\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
128
131
  var active = _a.active, colors = _a.theme.colors;
129
- return active ? colors.primaryColor40 : "inherit";
132
+ return active ? ((colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40) : "inherit";
130
133
  }, function (_a) {
131
134
  var invert = _a.invert, composition = _a.composition, colors = _a.theme.colors;
132
135
  return invert
133
- ? colors.primaryColor40
136
+ ? ((colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40)
134
137
  : composition === "iconOnly"
135
138
  ? greyColor100
136
- : colors.primaryColorText;
139
+ : ((colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColor40);
137
140
  }, function (_a) {
138
141
  var color = _a.color;
139
142
  return color && (0, styled_components_2.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
@@ -152,7 +155,7 @@ var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObj
152
155
  ? ""
153
156
  : invert
154
157
  ? greyColor70
155
- : colors.primaryColor10;
158
+ : (colors === null || colors === void 0 ? void 0 : colors.primaryColor10) || primaryColor10;
156
159
  });
157
160
  var GoogleButton = (0, styled_components_2.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n color: #4285f4;\n border: 2px solid #4285f4;\n background-color: ", ";\n ", "\n"], ["\n color: #4285f4;\n border: 2px solid #4285f4;\n background-color: ", ";\n ", "\n"])), white, function (_a) {
158
161
  var disabled = _a.disabled;
@@ -123,7 +123,7 @@ var TextInput = function (props) {
123
123
  react_1.default.createElement(index_styled_1.InputStyled, { className: 'SANS_3', id: id, type: type, name: type, placeholder: placeholder, value: value, onChange: handleOnChange, maxLength: maxNumLimiter, onBlur: handleValidateOnBlur, size: size, autoComplete: 'off' }),
124
124
  inputStatus === 'loading' && (react_1.default.createElement("div", { style: { padding: '1rem 0' } },
125
125
  react_1.default.createElement(Loader_1.Loader, { invert: invert, inline: true }))),
126
- actionBtn && (react_1.default.createElement(Buttons_1.ButtonPrimary, { value: actionBtn.text, invert: actionBtn.invert, onClick: actionBtnEnabaled && actionBtn.onClick, disabled: !actionBtnEnabaled, theme: props.theme, style: { marginRight: '-2rem' } }))),
126
+ actionBtn && (react_1.default.createElement(Buttons_1.ButtonPrimary, { value: actionBtn.text, invert: actionBtn.invert, onClick: actionBtnEnabaled && actionBtn.onClick, disabled: !actionBtnEnabaled, style: { marginRight: '-2rem' } }))),
127
127
  (inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.msg) && (react_1.default.createElement(index_styled_1.MsgContainer, { invert: invert, status: inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.type },
128
128
  react_1.default.createElement(Typo_1.SANS_3, null, inputStatus.msg))))))));
129
129
  };
@@ -8,8 +8,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  };
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.StyledWrapper = void 0;
11
- var macro_1 = __importDefault(require("styled-components/macro"));
12
- exports.StyledWrapper = macro_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: ", ";\n margin: ", ";\n"], ["\n max-width: ", ";\n margin: ", ";\n"])), function (_a) {
11
+ var styled_components_1 = __importDefault(require("styled-components"));
12
+ exports.StyledWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: ", ";\n margin: ", ";\n"], ["\n max-width: ", ";\n margin: ", ";\n"])), function (_a) {
13
13
  var maxWidth = _a.maxWidth;
14
14
  return maxWidth + 'px';
15
15
  }, function (_a) {
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
7
  var LetterH = function (_a) {
8
8
  var role = _a.role, size = _a.size;
9
- return (react_1.default.createElement("svg", { role: role, xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-letter-h", width: size, height: size, viewBox: "0 0 256 256", strokeWidth: "24", stroke: "currentColor", fill: "none", strokeLinejoin: "round" },
9
+ return (react_1.default.createElement("svg", { role: role, xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-letter-h", width: size + 2, height: size + 2, viewBox: "0 0 256 256", strokeWidth: "24", stroke: "currentColor", fill: "none", strokeLinejoin: "round" },
10
10
  react_1.default.createElement("path", { stroke: "none", d: "M0 0h24v24H0z" }),
11
- react_1.default.createElement("line", { x1: "40", y1: "56", x2: "40", y2: "176", "stroke-linecap": "round", "stroke-linejoin": "round" }),
12
- react_1.default.createElement("line", { x1: "144", y1: "116", x2: "40", y2: "116", "stroke-linecap": "round", "stroke-linejoin": "round" }),
13
- react_1.default.createElement("line", { x1: "144", y1: "56", x2: "144", y2: "176", "stroke-linecap": "round", "stroke-linejoin": "round" })));
11
+ react_1.default.createElement("line", { x1: "70", y1: "50", x2: "70", y2: "190", "stroke-linecap": "round", "stroke-linejoin": "round" }),
12
+ react_1.default.createElement("line", { x1: "170", y1: "116", x2: "70", y2: "116", "stroke-linecap": "round", "stroke-linejoin": "round" }),
13
+ react_1.default.createElement("line", { x1: "180", y1: "50", x2: "180", y2: "190", "stroke-linecap": "round", "stroke-linejoin": "round" })));
14
14
  };
15
15
  exports.default = LetterH;
@@ -48,6 +48,7 @@ export namespace phosphorIcons {
48
48
  export { ImageSquare };
49
49
  export { ListDashes };
50
50
  export { ListNumbers };
51
+ export { ListPlus };
51
52
  export { FileArrowUp };
52
53
  export { VideoCamera };
53
54
  export { Quotes };
@@ -121,6 +122,7 @@ import { CheckCircle } from "phosphor-react";
121
122
  import { ImageSquare } from "phosphor-react";
122
123
  import { ListDashes } from "phosphor-react";
123
124
  import { ListNumbers } from "phosphor-react";
125
+ import { ListPlus } from "phosphor-react";
124
126
  import { FileArrowUp } from "phosphor-react";
125
127
  import { VideoCamera } from "phosphor-react";
126
128
  import { Quotes } from "phosphor-react";
@@ -60,6 +60,7 @@ exports.phosphorIcons = {
60
60
  ImageSquare: phosphor_react_1.ImageSquare,
61
61
  ListDashes: phosphor_react_1.ListDashes,
62
62
  ListNumbers: phosphor_react_1.ListNumbers,
63
+ ListPlus: phosphor_react_1.ListPlus,
63
64
  FileArrowUp: phosphor_react_1.FileArrowUp,
64
65
  VideoCamera: phosphor_react_1.VideoCamera,
65
66
  Quotes: phosphor_react_1.Quotes,
package/dist/index.d.ts CHANGED
@@ -9,6 +9,6 @@ export * from "./components/InlineAlert";
9
9
  export * from "./components/TextInputs";
10
10
  export * from "./components/Container";
11
11
  export * from "./components/Wrappers";
12
+ export * from "./themes/mixins";
12
13
  export { colors } from "./themes";
13
14
  export { phosphorIcons } from "./icons";
14
- export { mediaQuery, getBreakPoint, transition, transitionWithDuration, transitionWithDelay, multiTransition } from "./themes/mixins";
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.multiTransition = exports.transitionWithDelay = exports.transitionWithDuration = exports.transition = exports.getBreakPoint = exports.mediaQuery = exports.phosphorIcons = exports.colors = exports.GlobalStyles = void 0;
13
+ exports.phosphorIcons = exports.colors = exports.GlobalStyles = void 0;
14
14
  var globalStyles_1 = require("./globalStyles");
15
15
  Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
16
16
  __exportStar(require("./components/Typo"), exports);
@@ -27,10 +27,4 @@ __exportStar(require("./components/InlineAlert"), exports);
27
27
  __exportStar(require("./components/TextInputs"), exports);
28
28
  __exportStar(require("./components/Container"), exports);
29
29
  __exportStar(require("./components/Wrappers"), exports);
30
- var mixins_1 = require("./themes/mixins");
31
- Object.defineProperty(exports, "mediaQuery", { enumerable: true, get: function () { return mixins_1.mediaQuery; } });
32
- Object.defineProperty(exports, "getBreakPoint", { enumerable: true, get: function () { return mixins_1.getBreakPoint; } });
33
- Object.defineProperty(exports, "transition", { enumerable: true, get: function () { return mixins_1.transition; } });
34
- Object.defineProperty(exports, "transitionWithDuration", { enumerable: true, get: function () { return mixins_1.transitionWithDuration; } });
35
- Object.defineProperty(exports, "transitionWithDelay", { enumerable: true, get: function () { return mixins_1.transitionWithDelay; } });
36
- Object.defineProperty(exports, "multiTransition", { enumerable: true, get: function () { return mixins_1.multiTransition; } });
30
+ __exportStar(require("./themes/mixins"), exports);
@@ -4,4 +4,5 @@ import { transition } from "./transitions";
4
4
  import { transitionWithDuration } from "./transitions";
5
5
  import { transitionWithDelay } from "./transitions";
6
6
  import { multiTransition } from "./transitions";
7
+ export function isElementInViewport(el: any): boolean;
7
8
  export { transition, transitionWithDuration, transitionWithDelay, multiTransition };
@@ -4,7 +4,7 @@ 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.transitionWithDelay = exports.transitionWithDuration = exports.transition = exports.getBreakPoint = exports.mediaQuery = void 0;
7
+ exports.isElementInViewport = exports.multiTransition = exports.transitionWithDelay = exports.transitionWithDuration = 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; } });
@@ -34,4 +34,14 @@ var mediaQuery = function (point) {
34
34
  return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["@media only screen and (min-width: ", "px)"], ["@media only screen and (min-width: ", "px)"])), getBreakPoint(point));
35
35
  };
36
36
  exports.mediaQuery = mediaQuery;
37
+ var isElementInViewport = function (el) {
38
+ if (!el)
39
+ return false;
40
+ var rect = el.getBoundingClientRect();
41
+ return (rect.top >= 0 &&
42
+ rect.left >= 0 &&
43
+ rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
44
+ rect.right <= (window.innerWidth || document.documentElement.clientWidth));
45
+ };
46
+ exports.isElementInViewport = isElementInViewport;
37
47
  var templateObject_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.7.2",
3
+ "version": "2.7.5",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",