@mmb-digital/ds-lilly 0.10.1 → 0.10.4
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
|
@@ -98559,21 +98559,17 @@ var ModalFooter = function (_a) {
|
|
|
98559
98559
|
|
|
98560
98560
|
|
|
98561
98561
|
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,
|
|
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;
|
|
98563
98563
|
var _f = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useContext"])(contexts_ModalContext), onHide = _f.hide, identification = _f.identification;
|
|
98564
|
-
var handleClose = function () {
|
|
98565
|
-
onClose && onClose();
|
|
98566
|
-
onHide();
|
|
98567
|
-
};
|
|
98568
98564
|
var handleEscPress = function (_a) {
|
|
98569
98565
|
var key = _a.key;
|
|
98570
|
-
return key === 'Escape' &&
|
|
98566
|
+
return key === 'Escape' && onHide();
|
|
98571
98567
|
};
|
|
98572
98568
|
useEventListener('keydown', handleEscPress);
|
|
98573
98569
|
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 },
|
|
98574
98570
|
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),
|
|
98575
98571
|
subtitle && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { component: "div", size: "small" }, subtitle)),
|
|
98576
|
-
!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:
|
|
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 }))));
|
|
98577
98573
|
};
|
|
98578
98574
|
|
|
98579
98575
|
// EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom","umd":"react-dom"}
|
|
@@ -15,8 +15,6 @@ 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;
|
|
20
18
|
}
|
|
21
|
-
export declare const ModalHeader: ({ closeText, isCloseHidden, isTitleHidden,
|
|
19
|
+
export declare const ModalHeader: ({ closeText, isCloseHidden, isTitleHidden, subtitle, testId, theme, title, titleSize, titleVisual }: ModalHeaderPropsType) => JSX.Element;
|
|
22
20
|
//# sourceMappingURL=ModalHeader.d.ts.map
|