@mmb-digital/ds-lilly 0.8.0 → 0.8.1

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
@@ -86950,7 +86950,7 @@ var Tooltip = function (_a) {
86950
86950
  offset: [0, verticalOffset]
86951
86951
  }), getArrowProps = _l.getArrowProps, getTooltipProps = _l.getTooltipProps, setTooltipRef = _l.setTooltipRef, setTriggerRef = _l.setTriggerRef, visible = _l.visible;
86952
86952
  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,
86953
- Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["cloneElement"])(children, { ref: setTriggerRef, tabIndex: 0, 'aria-describedBy': identifier }),
86953
+ Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["cloneElement"])(children, { ref: setTriggerRef, tabIndex: 0, 'aria-describedby': identifier }),
86954
86954
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { "aria-hidden": visible, "aria-live": "polite", className: "c-tooltip-wrapper", id: identifier, role: "tooltip", tabIndex: -1 }, visible && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", Tooltip_assign({ ref: setTooltipRef, "data-testid": testId }, getTooltipProps({
86955
86955
  className: classBinder_cx('c-tooltip', "c-tooltip--" + type, "c-tooltip--" + placement, { 'upper-case': isUpperCased, 'c-tooltip--bold': isBold }, theme)
86956
86956
  })),
@@ -96749,7 +96749,7 @@ var Tag = function (_a) {
96749
96749
 
96750
96750
  var ContentTableRow = function (_a) {
96751
96751
  var _b;
96752
- var amount = _a.amount, 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, currencyCode = _a.currencyCode, 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, _g = _a.subtitles, subtitles = _g === void 0 ? [] : _g, subtitleTagIconBackgroundColor = _a.subtitleTagIconBackgroundColor, subtitleTagIconName = _a.subtitleTagIconName, subtitleTagIconImageUrl = _a.subtitleTagIconImageUrl, subtitleTagText = _a.subtitleTagText, title = _a.title, _h = _a.titleSize, titleSize = _h === void 0 ? 'h2' : _h, _j = _a.titleVisual, titleVisual = _j === void 0 ? 'h6' : _j;
96752
+ var amount = _a.amount, 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, currencyCode = _a.currencyCode, 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, title = _a.title, _h = _a.titleSize, titleSize = _h === void 0 ? 'h2' : _h, _j = _a.titleVisual, titleVisual = _j === void 0 ? 'h6' : _j;
96753
96753
  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;
96754
96754
  var _l = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useMemo"])(function () {
96755
96755
  var buttonsColumn = buttons ? columnsDefinition[columnsDefinition.length - 1] : undefined;
@@ -96767,8 +96767,10 @@ var ContentTableRow = function (_a) {
96767
96767
  var _m = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(isOpen), isOpened = _m[0], setIsOpened = _m[1];
96768
96768
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () { return setIsOpened(isOpen); }, [isOpen]);
96769
96769
  var handleToggle = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function () {
96770
- setIsOpened(!isOpened);
96771
- }, [setIsOpened, isOpened]);
96770
+ var next = !isOpened;
96771
+ setIsOpened(next);
96772
+ onToggle && onToggle(next);
96773
+ }, [setIsOpened, isOpened, onToggle]);
96772
96774
  var hasSubtitleTag = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useMemo"])(function () { return (subtitleTagIconName || subtitleTagIconImageUrl) && subtitleTagText; }, [
96773
96775
  subtitleTagIconName,
96774
96776
  subtitleTagIconImageUrl,
@@ -32,6 +32,8 @@ export interface ContentTableRowPropsType extends ComponentPropsType {
32
32
  id?: string;
33
33
  /** Flag whether row is expanded */
34
34
  isOpen?: boolean;
35
+ /** Callback called on expand/collapse */
36
+ onToggle?: (isOpened: boolean) => void;
35
37
  /** Title column content */
36
38
  title: ReactNode;
37
39
  /** Title size */
@@ -49,5 +51,5 @@ export interface ContentTableRowPropsType extends ComponentPropsType {
49
51
  /** Subtitle tag content */
50
52
  subtitleTagText?: ReactNode;
51
53
  }
52
- export declare const ContentTableRow: ({ amount, amountSubtitle, amountSubtitleType, ariaLabel, buttons, columns, currencyCode, customIcon, children, iconName, iconBackgroundColor, iconBadgePosition, id, isOpen, subtitles, subtitleTagIconBackgroundColor, subtitleTagIconName, subtitleTagIconImageUrl, subtitleTagText, title, titleSize, titleVisual }: ContentTableRowPropsType) => JSX.Element;
54
+ export declare const ContentTableRow: ({ amount, amountSubtitle, amountSubtitleType, ariaLabel, buttons, columns, currencyCode, customIcon, children, iconName, iconBackgroundColor, iconBadgePosition, id, isOpen, onToggle, subtitles, subtitleTagIconBackgroundColor, subtitleTagIconName, subtitleTagIconImageUrl, subtitleTagText, title, titleSize, titleVisual }: ContentTableRowPropsType) => JSX.Element;
53
55
  //# sourceMappingURL=ContentTableRow.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,