oolib 2.25.2 → 2.25.4

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,9 +1,10 @@
1
- export function ActionMenu({ icon, invert, actions, align, iconSize, ButtonComp: _ButtonComp, setShowActions: setShowActionsInParent, popOutOfOverflowHiddenParent, storybookPreview }: {
1
+ export function ActionMenu({ icon, invert, actions, align, iconSize, M, ButtonComp: _ButtonComp, setShowActions: setShowActionsInParent, popOutOfOverflowHiddenParent, storybookPreview }: {
2
2
  icon?: string;
3
3
  invert: any;
4
4
  actions: any;
5
5
  align?: string;
6
6
  iconSize?: string;
7
+ M: any;
7
8
  ButtonComp?: string;
8
9
  setShowActions: any;
9
10
  popOutOfOverflowHiddenParent?: boolean;
@@ -46,7 +46,7 @@ var styled_1 = require("./styled");
46
46
  var ActionMenu = function (_a) {
47
47
  var _b, _c;
48
48
  var _d = _a.icon, icon = _d === void 0 ? 'DotsThree' : _d, //most likely will never change
49
- invert = _a.invert, actions = _a.actions, _e = _a.align, align = _e === void 0 ? 'right' : _e, _f = _a.iconSize, iconSize = _f === void 0 ? 'S' : _f, _g = _a.ButtonComp, _ButtonComp = _g === void 0 ? 'ButtonGhost' : _g, setShowActionsInParent = _a.setShowActions, _h = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _h === void 0 ? false : _h, storybookPreview = _a.storybookPreview //for storybook purposes
49
+ invert = _a.invert, actions = _a.actions, _e = _a.align, align = _e === void 0 ? 'right' : _e, _f = _a.iconSize, iconSize = _f === void 0 ? 'S' : _f, M = _a.M, _g = _a.ButtonComp, _ButtonComp = _g === void 0 ? 'ButtonGhost' : _g, setShowActionsInParent = _a.setShowActions, _h = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _h === void 0 ? false : _h, storybookPreview = _a.storybookPreview //for storybook purposes
50
50
  ;
51
51
  var actionMenuRef = (0, react_1.useRef)(null);
52
52
  var optionsWrapperRef = (0, react_1.useRef)(null);
@@ -56,6 +56,9 @@ var ActionMenu = function (_a) {
56
56
  return null;
57
57
  var getOpsRect = function () { var _a; return (_a = optionsWrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(); };
58
58
  var ButtonComp = ButtonComps[_ButtonComp];
59
+ //basically action menu defaults to 'S' button size (cuz its an icon only button)
60
+ //so passing 'M' will override this default and make it a Medium sized button
61
+ var buttonSize = M ? { M: true } : {};
59
62
  var genOptionIcon = function (iconName) {
60
63
  var IconComp = icons_1.icons[iconName];
61
64
  return react_1.default.createElement(IconComp, { size: 16 });
@@ -75,9 +78,9 @@ var ActionMenu = function (_a) {
75
78
  }, []);
76
79
  var _k = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _k.fixPos, applyFixedPos = _k.applyFixedPos, removeFixedPos = _k.removeFixedPos, trackerRef = _k.trackerRef;
77
80
  return (react_1.default.createElement(styled_1.StyledActionMenu, { ref: actionMenuRef },
78
- react_1.default.createElement(ButtonComp, { icon: icon, iconSize: iconSize, invert: invert, stopPropagation: true, onClick: function (e) {
81
+ react_1.default.createElement(ButtonComp, __assign({}, buttonSize, { icon: icon, iconSize: iconSize, invert: invert, stopPropagation: true, onClick: function (e) {
79
82
  setShowActions(!showActions);
80
- }, active: showActions }),
83
+ }, active: showActions })),
81
84
  popOutOfOverflowHiddenParent &&
82
85
  react_1.default.createElement(styled_1.StyledActionMenuTracker, { storybookPreview: storybookPreview, align: align, ref: trackerRef }),
83
86
  react_1.default.createElement(styled_1.StyledActionsDropMenu, __assign({}, {
@@ -33,7 +33,7 @@ var utilsOolib_1 = require("../../../../../../utilsOolib");
33
33
  var themes_1 = require("../../../../../../themes");
34
34
  var mixins_1 = require("../../../../../../themes/mixins");
35
35
  var none = themes_1.colors.none, greyColor40 = themes_1.colors.greyColor40, greyColor80 = themes_1.colors.greyColor80;
36
- exports.StyledCheckbox = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n \n width: ", ";\n height: ", ";\n border: none;\n box-shadow: inset 0 0 0 2px ", ";\n border-radius: 2px;\n background-color: ", ";\n cursor: ", ";\n\n ", "\n\n\n ", "\n\n &:hover {\n ", "\n }\n\n"], ["\n \n width: ", ";\n height: ", ";\n border: none;\n box-shadow: inset 0 0 0 2px ", ";\n border-radius: 2px;\n background-color: ", ";\n cursor: ", ";\n\n ", "\n\n\n ", "\n\n &:hover {\n ", "\n }\n\n"])), function (_a) {
36
+ exports.StyledCheckbox = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n \n width: ", ";\n height: ", ";\n border: none;\n box-shadow: inset 0 0 0 2px ", ";\n border-radius: 2px;\n background-color: ", ";\n cursor: ", ";\n\n ", "\n\n\n ", "\n\n &:hover {\n ", "\n }\n\n &:focus{\n border: none;\n box-shadow: none;\n }\n\n"], ["\n \n width: ", ";\n height: ", ";\n border: none;\n box-shadow: inset 0 0 0 2px ", ";\n border-radius: 2px;\n background-color: ", ";\n cursor: ", ";\n\n ", "\n\n\n ", "\n\n &:hover {\n ", "\n }\n\n &:focus{\n border: none;\n box-shadow: none;\n }\n\n"])), function (_a) {
37
37
  var S = _a.S;
38
38
  return S ? '1.7rem' : '2rem';
39
39
  }, function (_a) {
@@ -33,7 +33,7 @@ var themes_1 = require("../../../../../../themes");
33
33
  var mixins_1 = require("../../../../../../themes/mixins");
34
34
  var utilsOolib_1 = require("../../../../../../utilsOolib");
35
35
  var none = themes_1.colors.none, white = themes_1.colors.white, greyColor40 = themes_1.colors.greyColor40, greyColor100 = themes_1.colors.greyColor100, greyColor80 = themes_1.colors.greyColor80;
36
- exports.StyledRadioInput = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 50%;\n width: ", ";\n height: ", ";\n border: 2px solid ", ";\n background-color: ", ";\n flex: 0 0 auto;\n cursor: ", ";\n ", "\n\n ", "\n\n &:hover {\n ", "\n }\n\n"], ["\n border-radius: 50%;\n width: ", ";\n height: ", ";\n border: 2px solid ", ";\n background-color: ", ";\n flex: 0 0 auto;\n cursor: ", ";\n ", "\n\n ", "\n\n &:hover {\n ", "\n }\n\n"])), function (_a) {
36
+ exports.StyledRadioInput = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 50%;\n width: ", ";\n height: ", ";\n border: 2px solid ", ";\n background-color: ", ";\n flex: 0 0 auto;\n cursor: ", ";\n ", "\n\n ", "\n\n &:hover {\n ", "\n }\n\n &:focus {\n border: none;\n box-shadow: none;\n }\n\n"], ["\n border-radius: 50%;\n width: ", ";\n height: ", ";\n border: 2px solid ", ";\n background-color: ", ";\n flex: 0 0 auto;\n cursor: ", ";\n ", "\n\n ", "\n\n &:hover {\n ", "\n }\n\n &:focus {\n border: none;\n box-shadow: none;\n }\n\n"])), function (_a) {
37
37
  var S = _a.S;
38
38
  return S ? '1.7rem' : '2rem';
39
39
  }, function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.25.2",
3
+ "version": "2.25.4",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",