@mmb-digital/ds-lilly 0.0.1-alpha.348 → 0.0.1-alpha.349
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/dist/ds-lilly.js
CHANGED
|
@@ -110473,7 +110473,7 @@ var Menu = function (_a) {
|
|
|
110473
110473
|
|
|
110474
110474
|
var MenuItem = function (_a) {
|
|
110475
110475
|
var _b;
|
|
110476
|
-
var badgeCount = _a.badgeCount, badgeCountAriaLabel = _a.badgeCountAriaLabel, children = _a.children, childrenTheme = _a.childrenTheme, hasCustomContent = _a.hasCustomContent, hide = _a.hide, iconName = _a.iconName, isButton = _a.isButton, isIconRight = _a.isIconRight, isOpen = _a.isOpen, isSelected = _a.isSelected, liTheme = _a.liTheme, linkTo = _a.linkTo, onClick = _a.onClick, target = _a.target, _c = _a.testId, testId = _c === void 0 ? 'MenuItem' : _c, title = _a.title;
|
|
110476
|
+
var ariaLabel = _a.ariaLabel, badgeCount = _a.badgeCount, badgeCountAriaLabel = _a.badgeCountAriaLabel, children = _a.children, childrenTheme = _a.childrenTheme, hasCustomContent = _a.hasCustomContent, hide = _a.hide, iconName = _a.iconName, isButton = _a.isButton, isIconRight = _a.isIconRight, isOpen = _a.isOpen, isSelected = _a.isSelected, liTheme = _a.liTheme, linkTo = _a.linkTo, onClick = _a.onClick, target = _a.target, _c = _a.testId, testId = _c === void 0 ? 'MenuItem' : _c, title = _a.title;
|
|
110477
110477
|
var handleOnClick = function (e) {
|
|
110478
110478
|
if (linkTo === '#') {
|
|
110479
110479
|
e.preventDefault();
|
|
@@ -110489,7 +110489,7 @@ var MenuItem = function (_a) {
|
|
|
110489
110489
|
_b["m-menu__item--open"] = isOpen,
|
|
110490
110490
|
_b["m-menu__item--hidden"] = hide,
|
|
110491
110491
|
_b["u-hide--" + hide] = hide,
|
|
110492
|
-
_b), liTheme), "data-testid": testId }, hasCustomContent ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["Fragment"], null, children)) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Component, { "aria-pressed": isSelected && !linkTo, className: classBinder_cx(isButton ? 'c-btn' : 'm-menu__link', childrenTheme), href: linkTo || undefined, target: target, title: title, type: !linkTo || isButton ? 'button' : undefined, onClick: handleOnClick },
|
|
110492
|
+
_b), liTheme), "data-testid": testId }, hasCustomContent ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["Fragment"], null, children)) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Component, { "aria-label": ariaLabel, "aria-pressed": isSelected && !linkTo, className: classBinder_cx(isButton ? 'c-btn' : 'm-menu__link', childrenTheme), href: linkTo || undefined, target: target, title: title, type: !linkTo || isButton ? 'button' : undefined, onClick: handleOnClick },
|
|
110493
110493
|
iconName &&
|
|
110494
110494
|
(badgeCount ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Badge, { ariaLabel: badgeCountAriaLabel, count: badgeCount, theme: "u-mr--xSmall" },
|
|
110495
110495
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: iconName, theme: classBinder_cx(isIconRight && 'c-icon--r') }))) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: iconName, theme: classBinder_cx(isIconRight ? 'c-icon--r' : 'c-icon--l') }))),
|
|
@@ -2,6 +2,8 @@ import { ReactNode, SyntheticEvent } from 'react';
|
|
|
2
2
|
import { IconNameType, TargetType, Theme } from '../../../../types';
|
|
3
3
|
import { ComponentPropsType } from '../../../../utils';
|
|
4
4
|
interface MenuItemPropsType extends ComponentPropsType {
|
|
5
|
+
/** ARIA label */
|
|
6
|
+
ariaLabel?: string;
|
|
5
7
|
/** Show count in badge on top right corner od icon. */
|
|
6
8
|
badgeCount?: number;
|
|
7
9
|
/** ARIA label for inner Badge */
|
|
@@ -36,6 +38,6 @@ interface MenuItemPropsType extends ComponentPropsType {
|
|
|
36
38
|
target?: TargetType;
|
|
37
39
|
}
|
|
38
40
|
declare type HideBreakpointsType = 'to-mobile' | 'mobile' | 'mobile-only' | 'mobile-max' | 'tablet' | 'tablet-only' | 'tablet-max' | 'desktop-small' | 'desktop-small-only' | 'desktop-small-max' | 'desktop' | 'desktop-only' | 'desktop-max' | 'desktop-large';
|
|
39
|
-
export declare const MenuItem: ({ badgeCount, badgeCountAriaLabel, children, childrenTheme, hasCustomContent, hide, iconName, isButton, isIconRight, isOpen, isSelected, liTheme, linkTo, onClick, target, testId, title }: MenuItemPropsType) => JSX.Element;
|
|
41
|
+
export declare const MenuItem: ({ ariaLabel, badgeCount, badgeCountAriaLabel, children, childrenTheme, hasCustomContent, hide, iconName, isButton, isIconRight, isOpen, isSelected, liTheme, linkTo, onClick, target, testId, title }: MenuItemPropsType) => JSX.Element;
|
|
40
42
|
export {};
|
|
41
43
|
//# sourceMappingURL=MenuItem.d.ts.map
|