@ltht-react/menu 1.0.108 → 1.0.110

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.
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import ActionMenu, { ActionMenuOption } from './molecules/action-menu';
2
- export default ActionMenu;
3
- export { ActionMenuOption };
1
+ import ActionMenu, { ActionMenuOption } from './molecules/action-menu';
2
+ export default ActionMenu;
3
+ export { ActionMenuOption };
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
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
- var action_menu_1 = __importDefault(require("./molecules/action-menu"));
7
- exports.default = action_menu_1.default;
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
+ var action_menu_1 = __importDefault(require("./molecules/action-menu"));
7
+ exports.default = action_menu_1.default;
8
8
  //# sourceMappingURL=index.js.map
@@ -1,27 +1,27 @@
1
- import { ButtonProps } from '@ltht-react/button/lib/atoms/button';
2
- import { IconProps } from '@ltht-react/icon';
3
- import { FC, HTMLAttributes } from 'react';
4
- declare const ActionMenu: FC<IProps>;
5
- interface IProps extends HTMLAttributes<HTMLButtonElement> {
6
- actions: ActionMenuOption[];
7
- menuButtonOptions?: IconButtonMenuProps | ButtonMenuProps;
8
- popupStyle?: React.CSSProperties;
9
- popupPlacement?: 'bottom-start' | 'right-start';
10
- }
11
- interface IconButtonMenuProps {
12
- type: 'icon';
13
- iconProps: IconProps;
14
- text?: string;
15
- }
16
- interface ButtonMenuProps {
17
- type: 'button';
18
- buttonProps: ButtonProps;
19
- text: string;
20
- }
21
- export interface ActionMenuOption {
22
- text: string;
23
- clickHandler: () => void;
24
- leftIcon?: IconProps;
25
- rightIcon?: IconProps;
26
- }
27
- export default ActionMenu;
1
+ import { ButtonProps } from '@ltht-react/button/lib/atoms/button';
2
+ import { IconProps } from '@ltht-react/icon';
3
+ import { FC, HTMLAttributes } from 'react';
4
+ declare const ActionMenu: FC<IProps>;
5
+ interface IProps extends HTMLAttributes<HTMLButtonElement> {
6
+ actions: ActionMenuOption[];
7
+ menuButtonOptions?: IconButtonMenuProps | ButtonMenuProps;
8
+ popupStyle?: React.CSSProperties;
9
+ popupPlacement?: 'bottom-start' | 'right-start';
10
+ }
11
+ interface IconButtonMenuProps {
12
+ type: 'icon';
13
+ iconProps: IconProps;
14
+ text?: string;
15
+ }
16
+ interface ButtonMenuProps {
17
+ type: 'button';
18
+ buttonProps: ButtonProps;
19
+ text: string;
20
+ }
21
+ export interface ActionMenuOption {
22
+ text: string;
23
+ clickHandler: () => void;
24
+ leftIcon?: IconProps;
25
+ rightIcon?: IconProps;
26
+ }
27
+ export default ActionMenu;
@@ -1,124 +1,124 @@
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 __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __rest = (this && this.__rest) || function (s, e) {
37
- var t = {};
38
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
- t[p] = s[p];
40
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
- t[p[i]] = s[p[i]];
44
- }
45
- return t;
46
- };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- var jsx_runtime_1 = require("react/jsx-runtime");
52
- var styled_1 = __importDefault(require("@emotion/styled"));
53
- var button_1 = __importDefault(require("@ltht-react/button/lib/atoms/button"));
54
- var icon_1 = __importStar(require("@ltht-react/icon"));
55
- var styles_1 = require("@ltht-react/styles");
56
- var focus_trap_react_1 = __importDefault(require("focus-trap-react"));
57
- var react_1 = require("react");
58
- var react_popper_1 = require("react-popper");
59
- var defaultMenuButtonProps = {
60
- type: 'icon',
61
- iconProps: {
62
- type: 'ellipsis-vertical',
63
- size: 'large',
64
- },
65
- };
66
- var StyledUnorderedList = styled_1.default.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n list-style-type: none;\n padding: 0;\n margin: 0;\n"], ["\n ", "\n list-style-type: none;\n padding: 0;\n margin: 0;\n"])), styles_1.CSS_RESET);
67
- var StyledListItem = styled_1.default.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n background-color: 'white';\n padding: 0.5rem;\n line-height: 1em;\n display: flex;\n border-radius: 4px;\n\n &:hover {\n background: ", ";\n cursor: pointer;\n color: white;\n }\n"], ["\n ", "\n background-color: 'white';\n padding: 0.5rem;\n line-height: 1em;\n display: flex;\n border-radius: 4px;\n\n &:hover {\n background: ", ";\n cursor: pointer;\n color: white;\n }\n"])), styles_1.CSS_RESET, styles_1.BTN_COLOURS.PRIMARY.VALUE);
68
- var StyledListItemIcon = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-basis: 25%;\n"], ["\n flex-basis: 25%;\n"])));
69
- var StyledListItemContent = styled_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 1;\n text-align: left;\n"], ["\n flex: 1;\n text-align: left;\n"])));
70
- var StyledCard = styled_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n display: inline-block;\n min-width: 10rem;\n z-index: 1;\n background: white;\n border-radius: 4px;\n box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.04), 0px 4px 5px rgba(0, 0, 0, 0.06), 0px 2px 4px -1px rgba(0, 0, 0, 0.09);\n"], ["\n ", "\n display: inline-block;\n min-width: 10rem;\n z-index: 1;\n background: white;\n border-radius: 4px;\n box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.04), 0px 4px 5px rgba(0, 0, 0, 0.06), 0px 2px 4px -1px rgba(0, 0, 0, 0.09);\n"])), styles_1.CSS_RESET);
71
- var StyledRightIcon = styled_1.default(icon_1.default)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-right: 0.5rem;\n margin-left: 3rem;\n"], ["\n margin-right: 0.5rem;\n margin-left: 3rem;\n"])));
72
- var StyledLeftIcon = styled_1.default(icon_1.default)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n"], ["\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n"])));
73
- var StyledMenuButtonWrapper = styled_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: inline-block;\n"], ["\n display: inline-block;\n"])));
74
- var ActionMenu = function (_a) {
75
- var actions = _a.actions, _b = _a.menuButtonOptions, menuButtonOptions = _b === void 0 ? defaultMenuButtonProps : _b, _c = _a.id, id = _c === void 0 ? 'action-menu-button' : _c, _d = _a.popupStyle, popupStyle = _d === void 0 ? {} : _d, _e = _a.popupPlacement, popupPlacement = _e === void 0 ? 'bottom-start' : _e, rest = __rest(_a, ["actions", "menuButtonOptions", "id", "popupStyle", "popupPlacement"]);
76
- var popperRef = react_1.useRef(null);
77
- var _f = react_1.useState(null), popperElement = _f[0], setPopperElement = _f[1];
78
- var _g = react_1.useState(null), containerElement = _g[0], setContainerElement = _g[1];
79
- var popper = react_popper_1.usePopper(popperRef.current, popperElement, {
80
- placement: popupPlacement,
81
- strategy: 'fixed',
82
- });
83
- var closePopper = function () {
84
- setShowMenu(false);
85
- };
86
- var _h = react_1.useState(false), showMenu = _h[0], setShowMenu = _h[1];
87
- react_1.useEffect(function () {
88
- var _a;
89
- if ((_a = containerElement === null || containerElement === void 0 ? void 0 : containerElement.parentElement) === null || _a === void 0 ? void 0 : _a.style) {
90
- containerElement.parentElement.style.zIndex = showMenu
91
- ? "" + styles_1.getZIndex(styles_1.PopUp)
92
- : "" + styles_1.getZIndex(styles_1.TableDataWithPopUp);
93
- }
94
- }, [containerElement, showMenu]);
95
- var menuButtonClickHandler = function () {
96
- setShowMenu(!showMenu);
97
- };
98
- return (jsx_runtime_1.jsx("div", __assign({ ref: setContainerElement }, { children: jsx_runtime_1.jsx(focus_trap_react_1.default, __assign({ active: showMenu, focusTrapOptions: {
99
- tabbableOptions: {
100
- displayCheck: 'none',
101
- },
102
- initialFocus: false,
103
- allowOutsideClick: false,
104
- clickOutsideDeactivates: true,
105
- onDeactivate: closePopper,
106
- } }, { children: jsx_runtime_1.jsxs(StyledMenuButtonWrapper, __assign({ ref: popperRef }, { children: [menuButtonOptions.type === 'icon' && (jsx_runtime_1.jsx(icon_1.IconButton, __assign({ iconProps: menuButtonOptions.iconProps, text: menuButtonOptions.text }, rest, { onClick: function (e) {
107
- e.stopPropagation();
108
- menuButtonClickHandler();
109
- }, id: id, "data-testid": id }), void 0)),
110
- menuButtonOptions.type === 'button' && (jsx_runtime_1.jsx(button_1.default, __assign({}, menuButtonOptions.buttonProps, rest, { onClick: function (e) {
111
- e.stopPropagation();
112
- menuButtonClickHandler();
113
- }, id: id, "data-testid": id }, { children: menuButtonOptions.text }), void 0)),
114
- showMenu && (jsx_runtime_1.jsx(StyledCard, __assign({ tabIndex: -1, ref: setPopperElement, style: __assign(__assign({}, popper.styles.popper), popupStyle) }, popper.attributes.popper, { children: jsx_runtime_1.jsx(StyledUnorderedList, __assign({ role: "menu", "aria-labelledby": id }, { children: actions.map(function (action, idx) { return (jsx_runtime_1.jsxs(StyledListItem, __assign({ role: "menuitem", onClick: function (e) {
115
- e.stopPropagation();
116
- menuButtonClickHandler();
117
- action.clickHandler();
118
- } }, { children: [jsx_runtime_1.jsx(StyledListItemIcon, { children: action.leftIcon && jsx_runtime_1.jsx(StyledLeftIcon, __assign({}, action.leftIcon), void 0) }, void 0),
119
- jsx_runtime_1.jsx(StyledListItemContent, { children: action.text }, void 0),
120
- jsx_runtime_1.jsx(StyledListItemIcon, { children: action.rightIcon && jsx_runtime_1.jsx(StyledRightIcon, __assign({}, action.rightIcon), void 0) }, void 0)] }), "menu-action-" + idx)); }) }), void 0) }), void 0))] }), void 0) }), void 0) }), void 0));
121
- };
122
- exports.default = ActionMenu;
123
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
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 __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ var jsx_runtime_1 = require("react/jsx-runtime");
52
+ var styled_1 = __importDefault(require("@emotion/styled"));
53
+ var button_1 = __importDefault(require("@ltht-react/button/lib/atoms/button"));
54
+ var icon_1 = __importStar(require("@ltht-react/icon"));
55
+ var styles_1 = require("@ltht-react/styles");
56
+ var focus_trap_react_1 = __importDefault(require("focus-trap-react"));
57
+ var react_1 = require("react");
58
+ var react_popper_1 = require("react-popper");
59
+ var defaultMenuButtonProps = {
60
+ type: 'icon',
61
+ iconProps: {
62
+ type: 'ellipsis-vertical',
63
+ size: 'large',
64
+ },
65
+ };
66
+ var StyledUnorderedList = styled_1.default.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n list-style-type: none;\n padding: 0;\n margin: 0;\n"], ["\n ", "\n list-style-type: none;\n padding: 0;\n margin: 0;\n"])), styles_1.CSS_RESET);
67
+ var StyledListItem = styled_1.default.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n background-color: 'white';\n padding: 0.5rem;\n line-height: 1em;\n display: flex;\n border-radius: 4px;\n\n &:hover {\n background: ", ";\n cursor: pointer;\n color: white;\n }\n"], ["\n ", "\n background-color: 'white';\n padding: 0.5rem;\n line-height: 1em;\n display: flex;\n border-radius: 4px;\n\n &:hover {\n background: ", ";\n cursor: pointer;\n color: white;\n }\n"])), styles_1.CSS_RESET, styles_1.BTN_COLOURS.PRIMARY.VALUE);
68
+ var StyledListItemIcon = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-basis: 25%;\n"], ["\n flex-basis: 25%;\n"])));
69
+ var StyledListItemContent = styled_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 1;\n text-align: left;\n"], ["\n flex: 1;\n text-align: left;\n"])));
70
+ var StyledCard = styled_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n display: inline-block;\n min-width: 10rem;\n z-index: 1;\n background: white;\n border-radius: 4px;\n box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.04), 0px 4px 5px rgba(0, 0, 0, 0.06), 0px 2px 4px -1px rgba(0, 0, 0, 0.09);\n"], ["\n ", "\n display: inline-block;\n min-width: 10rem;\n z-index: 1;\n background: white;\n border-radius: 4px;\n box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.04), 0px 4px 5px rgba(0, 0, 0, 0.06), 0px 2px 4px -1px rgba(0, 0, 0, 0.09);\n"])), styles_1.CSS_RESET);
71
+ var StyledRightIcon = styled_1.default(icon_1.default)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-right: 0.5rem;\n margin-left: 3rem;\n"], ["\n margin-right: 0.5rem;\n margin-left: 3rem;\n"])));
72
+ var StyledLeftIcon = styled_1.default(icon_1.default)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n"], ["\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n"])));
73
+ var StyledMenuButtonWrapper = styled_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: inline-block;\n"], ["\n display: inline-block;\n"])));
74
+ var ActionMenu = function (_a) {
75
+ var actions = _a.actions, _b = _a.menuButtonOptions, menuButtonOptions = _b === void 0 ? defaultMenuButtonProps : _b, _c = _a.id, id = _c === void 0 ? 'action-menu-button' : _c, _d = _a.popupStyle, popupStyle = _d === void 0 ? {} : _d, _e = _a.popupPlacement, popupPlacement = _e === void 0 ? 'bottom-start' : _e, rest = __rest(_a, ["actions", "menuButtonOptions", "id", "popupStyle", "popupPlacement"]);
76
+ var popperRef = react_1.useRef(null);
77
+ var _f = react_1.useState(null), popperElement = _f[0], setPopperElement = _f[1];
78
+ var _g = react_1.useState(null), containerElement = _g[0], setContainerElement = _g[1];
79
+ var popper = react_popper_1.usePopper(popperRef.current, popperElement, {
80
+ placement: popupPlacement,
81
+ strategy: 'fixed',
82
+ });
83
+ var closePopper = function () {
84
+ setShowMenu(false);
85
+ };
86
+ var _h = react_1.useState(false), showMenu = _h[0], setShowMenu = _h[1];
87
+ react_1.useEffect(function () {
88
+ var _a;
89
+ if ((_a = containerElement === null || containerElement === void 0 ? void 0 : containerElement.parentElement) === null || _a === void 0 ? void 0 : _a.style) {
90
+ containerElement.parentElement.style.zIndex = showMenu
91
+ ? "" + styles_1.getZIndex(styles_1.PopUp)
92
+ : "" + styles_1.getZIndex(styles_1.TableDataWithPopUp);
93
+ }
94
+ }, [containerElement, showMenu]);
95
+ var menuButtonClickHandler = function () {
96
+ setShowMenu(!showMenu);
97
+ };
98
+ return (jsx_runtime_1.jsx("div", __assign({ ref: setContainerElement }, { children: jsx_runtime_1.jsx(focus_trap_react_1.default, __assign({ active: showMenu, focusTrapOptions: {
99
+ tabbableOptions: {
100
+ displayCheck: 'none',
101
+ },
102
+ initialFocus: false,
103
+ allowOutsideClick: false,
104
+ clickOutsideDeactivates: true,
105
+ onDeactivate: closePopper,
106
+ } }, { children: jsx_runtime_1.jsxs(StyledMenuButtonWrapper, __assign({ ref: popperRef }, { children: [menuButtonOptions.type === 'icon' && (jsx_runtime_1.jsx(icon_1.IconButton, __assign({ iconProps: menuButtonOptions.iconProps, text: menuButtonOptions.text }, rest, { onClick: function (e) {
107
+ e.stopPropagation();
108
+ menuButtonClickHandler();
109
+ }, id: id, "data-testid": id }), void 0)),
110
+ menuButtonOptions.type === 'button' && (jsx_runtime_1.jsx(button_1.default, __assign({}, menuButtonOptions.buttonProps, rest, { onClick: function (e) {
111
+ e.stopPropagation();
112
+ menuButtonClickHandler();
113
+ }, id: id, "data-testid": id }, { children: menuButtonOptions.text }), void 0)),
114
+ showMenu && (jsx_runtime_1.jsx(StyledCard, __assign({ tabIndex: -1, ref: setPopperElement, style: __assign(__assign({}, popper.styles.popper), popupStyle) }, popper.attributes.popper, { children: jsx_runtime_1.jsx(StyledUnorderedList, __assign({ role: "menu", "aria-labelledby": id }, { children: actions.map(function (action, idx) { return (jsx_runtime_1.jsxs(StyledListItem, __assign({ role: "menuitem", onClick: function (e) {
115
+ e.stopPropagation();
116
+ menuButtonClickHandler();
117
+ action.clickHandler();
118
+ } }, { children: [jsx_runtime_1.jsx(StyledListItemIcon, { children: action.leftIcon && jsx_runtime_1.jsx(StyledLeftIcon, __assign({}, action.leftIcon), void 0) }, void 0),
119
+ jsx_runtime_1.jsx(StyledListItemContent, { children: action.text }, void 0),
120
+ jsx_runtime_1.jsx(StyledListItemIcon, { children: action.rightIcon && jsx_runtime_1.jsx(StyledRightIcon, __assign({}, action.rightIcon), void 0) }, void 0)] }), "menu-action-" + idx)); }) }), void 0) }), void 0))] }), void 0) }), void 0) }), void 0));
121
+ };
122
+ exports.default = ActionMenu;
123
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
124
124
  //# sourceMappingURL=action-menu.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ltht-react/menu",
3
- "version": "1.0.108",
3
+ "version": "1.0.110",
4
4
  "description": "ltht-react styled Menu component.",
5
5
  "author": "LTHT",
6
6
  "homepage": "",
@@ -27,12 +27,12 @@
27
27
  "dependencies": {
28
28
  "@emotion/react": "^11.0.0",
29
29
  "@emotion/styled": "^11.0.0",
30
- "@ltht-react/button": "^1.3.266",
31
- "@ltht-react/icon": "^1.3.266",
32
- "@ltht-react/styles": "^1.3.258",
30
+ "@ltht-react/button": "^1.3.268",
31
+ "@ltht-react/icon": "^1.3.268",
32
+ "@ltht-react/styles": "^1.3.260",
33
33
  "focus-trap-react": "^10.0.0",
34
34
  "react": "^17.0.0",
35
35
  "react-popper": "^2.3.0"
36
36
  },
37
- "gitHead": "b12caae66acbc93f1bcc40663aa3b108bcea1d68"
37
+ "gitHead": "c47d5d393ce392e37627f8246cc6a1e46a5b4a93"
38
38
  }