@mmb-digital/ds-lilly 0.10.0 → 0.10.3

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
@@ -98241,7 +98241,7 @@ var Tag = function (_a) {
98241
98241
 
98242
98242
 
98243
98243
 
98244
- var ContentTableRow = function (_a) {
98244
+ var ContentTableRow = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["forwardRef"])(function (_a, ref) {
98245
98245
  var _b;
98246
98246
  var amount = _a.amount, amountCurrencyCode = _a.amountCurrencyCode, amountLocale = _a.amountLocale, amountMaximumFractionDigits = _a.amountMaximumFractionDigits, amountMinimumFractionDigits = _a.amountMinimumFractionDigits, amountSubtitle = _a.amountSubtitle, amountSubtitleType = _a.amountSubtitleType, ariaLabel = _a.ariaLabel, _c = _a.buttons, buttons = _c === void 0 ? [] : _c, _d = _a.columns, columns = _d === void 0 ? [] : _d, customIcon = _a.customIcon, children = _a.children, iconName = _a.iconName, iconBackgroundColor = _a.iconBackgroundColor, _e = _a.iconBadgePosition, iconBadgePosition = _e === void 0 ? 'bottomRight' : _e, id = _a.id, _f = _a.isOpen, isOpen = _f === void 0 ? false : _f, onToggle = _a.onToggle, _g = _a.subtitles, subtitles = _g === void 0 ? [] : _g, subtitleTagIconBackgroundColor = _a.subtitleTagIconBackgroundColor, subtitleTagIconName = _a.subtitleTagIconName, subtitleTagIconImageUrl = _a.subtitleTagIconImageUrl, subtitleTagText = _a.subtitleTagText, testId = _a.testId, title = _a.title, _h = _a.titleSize, titleSize = _h === void 0 ? 'h2' : _h, _j = _a.titleVisual, titleVisual = _j === void 0 ? 'h6' : _j;
98247
98247
  var _k = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useContext"])(contexts_ContentTableContext), columnsDefinition = _k.columns, hasIcons = _k.hasIcons, hideSubtitleOnExpand = _k.hideSubtitleOnExpand, isCollapsible = _k.isCollapsible, isMobileDeviceView = _k.isMobileDeviceView, titleAlignContent = _k.titleAlignContent, withoutOpeners = _k.withoutOpeners;
@@ -98285,7 +98285,10 @@ var ContentTableRow = function (_a) {
98285
98285
  }
98286
98286
  }, [handleToggle]);
98287
98287
  return (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,
98288
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("tr", { "aria-controls": id ? id + "-content" : undefined, "aria-expanded": isCollapsible && isOpened, "aria-label": ariaLabel, className: classBinder_cx('c-contentTableRow', {
98288
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("tr", {
98289
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
98290
+ // @ts-ignore
98291
+ ref: ref, "aria-controls": id ? id + "-content" : undefined, "aria-expanded": isCollapsible && isOpened, "aria-label": ariaLabel, className: classBinder_cx('c-contentTableRow', {
98289
98292
  'c-contentTableRow--collapsible': isCollapsible,
98290
98293
  'c-contentTableRow--collapsible--open': isCollapsible && isOpened
98291
98294
  }), "data-testid": testId, id: id, role: isCollapsible ? 'button' : undefined, tabIndex: isCollapsible ? 0 : undefined, onClick: isCollapsible ? handleToggle : undefined, onKeyDown: handleKeyDown },
@@ -98331,7 +98334,8 @@ var ContentTableRow = function (_a) {
98331
98334
  open: { opacity: 1, height: 'auto' },
98332
98335
  collapsed: { opacity: 0, height: 0 }
98333
98336
  } }, children))))))));
98334
- };
98337
+ });
98338
+ ContentTableRow.displayName = 'forwardRef(ContentTableRow)';
98335
98339
 
98336
98340
  // CONCATENATED MODULE: ./src/components/Components/ContentTable/index.ts
98337
98341
 
@@ -98559,17 +98563,21 @@ var ModalFooter = function (_a) {
98559
98563
 
98560
98564
 
98561
98565
  var ModalHeader = function (_a) {
98562
- var closeText = _a.closeText, _b = _a.isCloseHidden, isCloseHidden = _b === void 0 ? false : _b, _c = _a.isTitleHidden, isTitleHidden = _c === void 0 ? false : _c, subtitle = _a.subtitle, testId = _a.testId, theme = _a.theme, title = _a.title, _d = _a.titleSize, titleSize = _d === void 0 ? 'h2' : _d, _e = _a.titleVisual, titleVisual = _e === void 0 ? 'h3' : _e;
98566
+ var closeText = _a.closeText, _b = _a.isCloseHidden, isCloseHidden = _b === void 0 ? false : _b, _c = _a.isTitleHidden, isTitleHidden = _c === void 0 ? false : _c, onClose = _a.onClose, subtitle = _a.subtitle, testId = _a.testId, theme = _a.theme, title = _a.title, _d = _a.titleSize, titleSize = _d === void 0 ? 'h2' : _d, _e = _a.titleVisual, titleVisual = _e === void 0 ? 'h3' : _e;
98563
98567
  var _f = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useContext"])(contexts_ModalContext), onHide = _f.hide, identification = _f.identification;
98568
+ var handleClose = function () {
98569
+ onClose && onClose();
98570
+ onHide();
98571
+ };
98564
98572
  var handleEscPress = function (_a) {
98565
98573
  var key = _a.key;
98566
- return key === 'Escape' && onHide();
98574
+ return key === 'Escape' && handleClose();
98567
98575
  };
98568
98576
  useEventListener('keydown', handleEscPress);
98569
98577
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("header", { className: classBinder_cx('c-modal__header', theme), "data-testid": testId },
98570
98578
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Title, { id: identification + "_title", size: titleSize, theme: classBinder_cx('c-modal__title', { 'u-vHide': isTitleHidden }), visual: titleVisual }, title),
98571
98579
  subtitle && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { component: "div", size: "small" }, subtitle)),
98572
- !isCloseHidden && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isSmall: true, ariaLabel: closeText, onlyIconName: "close", theme: classBinder_cx('c-modal__close'), type: "transparent", onClick: onHide }))));
98580
+ !isCloseHidden && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isSmall: true, ariaLabel: closeText, onlyIconName: "close", theme: classBinder_cx('c-modal__close'), type: "transparent", onClick: handleClose }))));
98573
98581
  };
98574
98582
 
98575
98583
  // EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom","umd":"react-dom"}
@@ -109305,7 +109313,7 @@ var Slider_Slider = /** @class */ (function (_super) {
109305
109313
  normalizeValue(min, max, step, customValue)
109306
109314
  : _this.getValueFromDragEvent(event);
109307
109315
  }
109308
- onChange && value && onChange(event, Number(value.toFixed(5)));
109316
+ onChange && typeof value === 'number' && onChange(event, Number(value.toFixed(5)));
109309
109317
  };
109310
109318
  _this.onDragStart = function (event, touch) {
109311
109319
  var onDragStart = _this.props.onDragStart;
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import React, { ReactElement, ReactNode } from 'react';
2
2
  import { BackgroundColorType, IconNameType } from '../../..';
3
3
  import { ComponentPropsType } from '../../../utils';
4
4
  import { TextType, TitleSize } from '../../Typography';
@@ -57,5 +57,5 @@ export interface ContentTableRowPropsType extends ComponentPropsType {
57
57
  /** Subtitle tag content */
58
58
  subtitleTagText?: ReactNode;
59
59
  }
60
- export declare const ContentTableRow: ({ amount, amountCurrencyCode, amountLocale, amountMaximumFractionDigits, amountMinimumFractionDigits, amountSubtitle, amountSubtitleType, ariaLabel, buttons, columns, customIcon, children, iconName, iconBackgroundColor, iconBadgePosition, id, isOpen, onToggle, subtitles, subtitleTagIconBackgroundColor, subtitleTagIconName, subtitleTagIconImageUrl, subtitleTagText, testId, title, titleSize, titleVisual }: ContentTableRowPropsType) => JSX.Element;
60
+ export declare const ContentTableRow: React.ForwardRefExoticComponent<ContentTableRowPropsType & React.RefAttributes<unknown>>;
61
61
  //# sourceMappingURL=ContentTableRow.d.ts.map
@@ -15,6 +15,8 @@ export interface ModalHeaderPropsType extends ComponentPropsType {
15
15
  titleSize?: TitleSize;
16
16
  /** Title visual size. Use this for matching title visual with desired design. */
17
17
  titleVisual?: TitleSize;
18
+ /** Close button click event handler. */
19
+ onClose?: () => void;
18
20
  }
19
- export declare const ModalHeader: ({ closeText, isCloseHidden, isTitleHidden, subtitle, testId, theme, title, titleSize, titleVisual }: ModalHeaderPropsType) => JSX.Element;
21
+ export declare const ModalHeader: ({ closeText, isCloseHidden, isTitleHidden, onClose, subtitle, testId, theme, title, titleSize, titleVisual }: ModalHeaderPropsType) => JSX.Element;
20
22
  //# sourceMappingURL=ModalHeader.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.10.0",
3
+ "version": "0.10.3",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,