oolib 2.12.1 → 2.12.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.
@@ -57,13 +57,14 @@ var ActionMenu = function (_a) {
57
57
  e.stopPropagation();
58
58
  setShowActions(!showActions);
59
59
  } }),
60
- react_1.default.createElement(styled_1.StyledActionsDropMenu, __assign({ unfolded: showActions }, { align: align, invert: invert }), actions.map(function (action) {
60
+ react_1.default.createElement(styled_1.StyledActionsDropMenu, __assign({ unfold: showActions }, { align: align, invert: invert }), actions.map(function (action) {
61
+ console.log(action);
61
62
  var ActionButton = action.buttonComp || styled_1.StyledActionBtn;
62
- react_1.default.createElement(ActionButton, __assign({}, action.props, { onClick: function (ev) {
63
+ return (react_1.default.createElement(ActionButton, __assign({ style: { justifyContent: 'left' } }, action, { onClick: function (ev) {
63
64
  action.onClick && action.onClick(ev);
64
65
  setShowActions(false);
65
66
  }, key: action.display, invert: invert }),
66
- react_1.default.createElement(Typo_1.SANS_2, null, action.display));
67
+ react_1.default.createElement(Typo_1.SANS_2, null, action.display)));
67
68
  }))));
68
69
  };
69
70
  exports.ActionMenu = ActionMenu;
@@ -34,18 +34,21 @@ var mixins_1 = require("../../themes/mixins");
34
34
  var Buttons_1 = require("../Buttons");
35
35
  var greyColor5 = themes_1.colors.greyColor5, white = themes_1.colors.white, greyColor10 = themes_1.colors.greyColor10, greyColor80 = themes_1.colors.greyColor80;
36
36
  exports.StyledActionMenu = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: max-content;\n"], ["\n position: relative;\n width: max-content;\n"])));
37
- exports.StyledActionsDropMenu = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n transform: translateY(100%);\n ", "\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);\n z-index: 10000;\n border: 1px solid ", ";\n background-color: ", ";\n\n overflow: hidden; // for clipping animation\n clip: rect( auto, auto, ", ", auto);\n ", "\n\n &::after{\n content: '';\n width: 1rem;\n height: 1rem;\n \n position: absolute;\n top: 0;\n\n transform: translate(0, -100%);\n ", "\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n border-width: 0px 8px 8px 8px\n }\n"], ["\n position: absolute;\n bottom: 0;\n transform: translateY(100%);\n ", "\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);\n z-index: 10000;\n border: 1px solid ", ";\n background-color: ", ";\n\n overflow: hidden; // for clipping animation\n clip: rect( auto, auto, ", ", auto);\n ", "\n\n &::after{\n content: '';\n width: 1rem;\n height: 1rem;\n \n position: absolute;\n top: 0;\n\n transform: translate(0, -100%);\n ", "\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n border-width: 0px 8px 8px 8px\n }\n"])), function (_a) {
37
+ exports.StyledActionsDropMenu = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n bottom: -5px;\n transform-origin: left top; \n transform: translateY(100%) ", ";\n ", "\n\n ", "\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);\n border: 1px solid ", ";\n background-color: ", ";\n\n \n\n &::after{\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n bottom: 100%;\n\n ", "\n border: 1rem solid transparent;\n border-bottom: 1rem solid ", ";\n }\n"], ["\n position: absolute;\n bottom: -5px;\n transform-origin: left top; \n transform: translateY(100%) ", ";\n ", "\n\n ", "\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);\n border: 1px solid ", ";\n background-color: ", ";\n\n \n\n &::after{\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n bottom: 100%;\n\n ", "\n border: 1rem solid transparent;\n border-bottom: 1rem solid ", ";\n }\n"])), function (_a) {
38
+ var unfold = _a.unfold;
39
+ return "scaleY(".concat(Number(unfold), ")");
40
+ }, (0, mixins_1.transition)('transform'), function (_a) {
38
41
  var align = _a.align;
39
- return align == 'center' ? (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n left: 2rem;\n transform: translate(-50%, 100%);\n "], ["\n left: 2rem;\n transform: translate(-50%, 100%);\n "]))) : (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["", ": 0;"], ["", ": 0;"])), align);
42
+ return align == 'center' ? (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n left: 2rem;\n transform: translate(-50%, 100%) ", ";;\n "], ["\n left: 2rem;\n transform: translate(-50%, 100%) ", ";;\n "])), function (_a) {
43
+ var unfold = _a.unfold;
44
+ return "scaleY(".concat(Number(unfold), ")");
45
+ }) : (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["", ": 0;"], ["", ": 0;"])), align);
40
46
  }, greyColor5, function (_a) {
41
47
  var invert = _a.invert;
42
48
  return invert ? greyColor80 : white;
43
49
  }, function (_a) {
44
- var unfolded = _a.unfolded;
45
- return unfolded ? '20rem' : 0;
46
- }, (0, mixins_1.transition)('clip', 0.5), function (_a) {
47
50
  var align = _a.align;
48
- return align == 'center' ? (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n left: 50%;\n transform: translate(-50%, 100%);\n "], ["\n left: 50%;\n transform: translate(-50%, 100%);\n "]))) : (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["", ": 1rem;"], ["", ": 1rem;"])), align);
51
+ return align == 'center' ? (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n left: 50%;\n transform: translateX(-50%);\n "], ["\n left: 50%;\n transform: translateX(-50%);\n "]))) : (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["", ": 1rem;"], ["", ": 1rem;"])), align);
49
52
  }, greyColor10);
50
53
  exports.StyledActionBtn = (0, styled_components_1.default)(Buttons_1.ButtonGhost)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n white-space: nowrap;\n width: 100%;\n text-align: ", ";\n padding: 1rem 1.6rem;\n background-color: transparent;\n color: ", ";\n ", ";\n &:hover{\n background-color: ", ";\n }\n"], ["\n white-space: nowrap;\n width: 100%;\n text-align: ", ";\n padding: 1rem 1.6rem;\n background-color: transparent;\n color: ", ";\n ", ";\n &:hover{\n background-color: ", ";\n }\n"])), function (_a) {
51
54
  var align = _a.align;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",