@mmb-digital/ds-lilly 0.0.1-alpha.360 → 0.0.1-alpha.361

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
@@ -96010,7 +96010,7 @@ var CollapseHeader = function (_a) {
96010
96010
 
96011
96011
  var Card = function (_a) {
96012
96012
  var _b;
96013
- var backgroundColor = _a.backgroundColor, borderColor = _a.borderColor, children = _a.children, _c = _a.hasCustomTrigger, hasCustomTrigger = _c === void 0 ? false : _c, collapseHeader = _a.header, iconBackgroundColor = _a.iconBackgroundColor, iconName = _a.iconName, isCollapsible = _a.isCollapsible, isIconAlignTop = _a.isIconAlignTop, isInteractive = _a.isInteractive, _d = _a.isOpen, isOpen = _d === void 0 ? false : _d, isSelected = _a.isSelected, onClick = _a.onClick, onToggle = _a.onToggle, shadowSize = _a.shadowSize, size = _a.size, testId = _a.testId, theme = _a.theme, _e = _a.withoutRole, withoutRole = _e === void 0 ? false : _e;
96013
+ var allowEventPropagation = _a.allowEventPropagation, backgroundColor = _a.backgroundColor, borderColor = _a.borderColor, children = _a.children, _c = _a.hasCustomTrigger, hasCustomTrigger = _c === void 0 ? false : _c, collapseHeader = _a.header, iconBackgroundColor = _a.iconBackgroundColor, iconName = _a.iconName, isCollapsible = _a.isCollapsible, isIconAlignTop = _a.isIconAlignTop, isInteractive = _a.isInteractive, _d = _a.isOpen, isOpen = _d === void 0 ? false : _d, isSelected = _a.isSelected, onClick = _a.onClick, onToggle = _a.onToggle, shadowSize = _a.shadowSize, size = _a.size, testId = _a.testId, theme = _a.theme, _e = _a.withoutRole, withoutRole = _e === void 0 ? false : _e;
96014
96014
  var identification = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useMemo"])(function () { return "card_" + cuid_default()(); }, []);
96015
96015
  var _f = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(isOpen), isOpened = _f[0], setIsOpened = _f[1];
96016
96016
  var cardRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])(null);
@@ -96024,7 +96024,9 @@ var Card = function (_a) {
96024
96024
  var handleOnClick = function (event) {
96025
96025
  if (isInteractive && onClick) {
96026
96026
  onClick(event);
96027
- event.stopPropagation();
96027
+ if (!allowEventPropagation) {
96028
+ event.stopPropagation();
96029
+ }
96028
96030
  }
96029
96031
  };
96030
96032
  var handleOnToggle = function (event) {
@@ -110518,9 +110520,13 @@ var Header_content = {
110518
110520
  }
110519
110521
  };
110520
110522
  var MobilePanelHeader = function (_a) {
110521
- var children = _a.children, closeAria = _a.closeAria, hasClose = _a.hasClose, image = _a.image, _b = _a.testId, testId = _b === void 0 ? 'MobilePanelHeader' : _b, title = _a.title, _c = _a.titleSize, titleSize = _c === void 0 ? 'h1' : _c, titleVisual = _a.titleVisual;
110523
+ var allowEventPropagation = _a.allowEventPropagation, children = _a.children, closeAria = _a.closeAria, hasClose = _a.hasClose, image = _a.image, _b = _a.testId, testId = _b === void 0 ? 'MobilePanelHeader' : _b, title = _a.title, _c = _a.titleSize, titleSize = _c === void 0 ? 'h1' : _c, titleVisual = _a.titleVisual;
110522
110524
  var close = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useContext"])(contexts_MobilePanelContext).close;
110523
- var handleHeaderClick = function (event) { return event.stopPropagation(); };
110525
+ var handleHeaderClick = function (event) {
110526
+ if (!allowEventPropagation) {
110527
+ event.stopPropagation();
110528
+ }
110529
+ };
110524
110530
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(motion.div, { className: "l-mobilePanel__header", "data-testid": testId, variants: Header_content, onClick: handleHeaderClick },
110525
110531
  hasClose && closeAria && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isSmall: true, testId: "MobilePanelCloseButton", theme: "l-mobilePanel__close", type: "transparent", onClick: close },
110526
110532
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: "u-vHide" }, closeAria),
@@ -2,6 +2,8 @@ import { KeyboardEvent, ReactNode, SyntheticEvent } from 'react';
2
2
  import { IconBackgroundType, IconNameType } from '../../../types';
3
3
  import { ComponentPropsType } from '../../../utils';
4
4
  export interface CardPropsType extends ComponentPropsType {
5
+ /** Allow click event propagation */
6
+ allowEventPropagation?: boolean;
5
7
  /** Changes background color of card. */
6
8
  backgroundColor?: BackgroundColorType;
7
9
  /** Changes border color of card. */
@@ -39,6 +41,6 @@ export interface CardPropsType extends ComponentPropsType {
39
41
  }
40
42
  export declare type ShadowSizeType = 'small' | 'medium' | 'large' | 'no';
41
43
  declare type BackgroundColorType = 'cloud' | 'grey' | 'gold' | 'primaryDark' | 'transparent';
42
- export declare const Card: ({ backgroundColor, borderColor, children, hasCustomTrigger, header: collapseHeader, iconBackgroundColor, iconName, isCollapsible, isIconAlignTop, isInteractive, isOpen, isSelected, onClick, onToggle, shadowSize, size, testId, theme, withoutRole }: CardPropsType) => JSX.Element;
44
+ export declare const Card: ({ allowEventPropagation, backgroundColor, borderColor, children, hasCustomTrigger, header: collapseHeader, iconBackgroundColor, iconName, isCollapsible, isIconAlignTop, isInteractive, isOpen, isSelected, onClick, onToggle, shadowSize, size, testId, theme, withoutRole }: CardPropsType) => JSX.Element;
43
45
  export {};
44
46
  //# sourceMappingURL=Card.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ComponentPropsType, TitleSize } from '../../../../';
3
3
  export interface MobilePanelHeaderPropsType extends ComponentPropsType {
4
+ /** Allow click event propagation */
5
+ allowEventPropagation?: boolean;
4
6
  /** Children to be rendered in the main container. */
5
7
  children: ReactNode | ReactNode[];
6
8
  /** Image for header. */
@@ -16,5 +18,5 @@ export interface MobilePanelHeaderPropsType extends ComponentPropsType {
16
18
  /** Title visual size. Use this for matching title visual with desired design. */
17
19
  titleVisual?: TitleSize;
18
20
  }
19
- export declare const MobilePanelHeader: ({ children, closeAria, hasClose, image, testId, title, titleSize, titleVisual }: MobilePanelHeaderPropsType) => JSX.Element;
21
+ export declare const MobilePanelHeader: ({ allowEventPropagation, children, closeAria, hasClose, image, testId, title, titleSize, titleVisual }: MobilePanelHeaderPropsType) => JSX.Element;
20
22
  //# sourceMappingURL=Header.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.360",
3
+ "version": "0.0.1-alpha.361",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,