@mmb-digital/ds-lilly 0.0.1-alpha.367 → 0.0.1-alpha.368

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
@@ -96157,12 +96157,15 @@ var DropdownMenu = function (_a) {
96157
96157
 
96158
96158
  var DropdownItem = function (_a) {
96159
96159
  var _b;
96160
- var amount = _a.amount, children = _a.children, iconBackground = _a.iconBackground, iconName = _a.iconName, id = _a.id, isDisabled = _a.isDisabled, isFocused = _a.isFocused, isSelected = _a.isSelected, onClick = _a.onClick, onKeyDown = _a.onKeyDown, onMouseOver = _a.onMouseOver, perex = _a.perex, role = _a.role, tabIndex = _a.tabIndex, testId = _a.testId, theme = _a.theme, value = _a.value;
96160
+ var _c = _a.allowEventPropagation, allowEventPropagation = _c === void 0 ? false : _c, amount = _a.amount, children = _a.children, iconBackground = _a.iconBackground, iconName = _a.iconName, id = _a.id, isDisabled = _a.isDisabled, isFocused = _a.isFocused, isSelected = _a.isSelected, onClick = _a.onClick, onKeyDown = _a.onKeyDown, onMouseOver = _a.onMouseOver, perex = _a.perex, role = _a.role, tabIndex = _a.tabIndex, testId = _a.testId, theme = _a.theme, value = _a.value;
96161
96161
  var handleOnClick = function (event) {
96162
96162
  if (onClick && !isDisabled) {
96163
96163
  value ? onClick(event, value) : onClick(event);
96164
96164
  event.preventDefault();
96165
96165
  }
96166
+ if (!allowEventPropagation) {
96167
+ event.stopPropagation();
96168
+ }
96166
96169
  };
96167
96170
  var handleOnMouseOver = function (event) {
96168
96171
  if (onMouseOver && !isDisabled) {
@@ -96244,10 +96247,10 @@ var CompactButtons = function (_a) {
96244
96247
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: "other" }),
96245
96248
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: "c-compact-buttons__dropdown__opener" })), onVisibleChange: function (state) { return setIsDropdownVisible(state); } },
96246
96249
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownMenu, { ariaHidden: true }, buttons.map(function (_a, i) {
96247
- var icon = _a.icon, isDisabled = _a.isDisabled, isLoading = _a.isLoading, key = _a.key, label = _a.label, onClick = _a.onClick, testId = _a.testId;
96250
+ var allowEventPropagation = _a.allowEventPropagation, icon = _a.icon, isDisabled = _a.isDisabled, isLoading = _a.isLoading, key = _a.key, label = _a.label, onClick = _a.onClick, testId = _a.testId;
96248
96251
  if (isButtonVisible(i))
96249
96252
  return;
96250
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownItem, { key: key, iconName: icon, isDisabled: isDisabled, testId: testId + "-dropdown", theme: classBinder_cx('c-compact-buttons__dropdown-item', {
96253
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownItem, { key: key, allowEventPropagation: allowEventPropagation, iconName: icon, isDisabled: isDisabled, testId: testId + "-dropdown", theme: classBinder_cx('c-compact-buttons__dropdown-item', {
96251
96254
  'c-compact-buttons__dropdown-item--disabled': isDisabled || isLoading
96252
96255
  }), onClick: onClick }, label));
96253
96256
  })))))));
@@ -2,6 +2,8 @@ import { ReactElement, ReactNode, SyntheticEvent } from 'react';
2
2
  import { IconNameType, TargetType } from '../../..';
3
3
  import { ComponentPropsType } from '../../../utils';
4
4
  interface CompactButtonsButtonType extends ComponentPropsType {
5
+ /** Allow click event propagation */
6
+ allowEventPropagation?: boolean;
5
7
  /** React collection key */
6
8
  key: string;
7
9
  /** Button icon name */
@@ -1,6 +1,8 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ComponentPropsType, IconBackgroundType, IconNameType } from '../../../../';
3
3
  export interface DropdownItemPropsType extends ComponentPropsType {
4
+ /** Allow click event propagation */
5
+ allowEventPropagation?: boolean;
4
6
  /** Optional value for withAmount variant. */
5
7
  amount?: ReactNode;
6
8
  /** Children to be rendered in the main container. */
@@ -27,5 +29,5 @@ export interface DropdownItemPropsType extends ComponentPropsType {
27
29
  id?: string;
28
30
  onKeyDown?: (event: React.KeyboardEvent<HTMLLIElement>) => void;
29
31
  }
30
- export declare const DropdownItem: ({ amount, children, iconBackground, iconName, id, isDisabled, isFocused, isSelected, onClick, onKeyDown, onMouseOver, perex, role, tabIndex, testId, theme, value }: DropdownItemPropsType) => JSX.Element;
32
+ export declare const DropdownItem: ({ allowEventPropagation, amount, children, iconBackground, iconName, id, isDisabled, isFocused, isSelected, onClick, onKeyDown, onMouseOver, perex, role, tabIndex, testId, theme, value }: DropdownItemPropsType) => JSX.Element;
31
33
  //# sourceMappingURL=DropdownItem.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.0.1-alpha.367",
3
+ "version": "0.0.1-alpha.368",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,