@kaio-xyz/design-system 1.1.37 → 1.1.39
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/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -893,12 +893,12 @@ var useCanAnimate = function () {
|
|
|
893
893
|
return canAnimate;
|
|
894
894
|
};
|
|
895
895
|
|
|
896
|
-
var style$2 = {"root":"drawer-module__root__D3rM0","backdrop":"drawer-module__backdrop__2In4H","drawer":"drawer-module__drawer__1zGfg","header":"drawer-module__header__F3xzs","title":"drawer-module__title__6zsD3","closeButton":"drawer-module__closeButton__eP-nJ","body":"drawer-module__body__GIyF-","content":"drawer-module__content__bYS-4","actions":"drawer-module__actions__pUGTF"};
|
|
896
|
+
var style$2 = {"root":"drawer-module__root__D3rM0","backdrop":"drawer-module__backdrop__2In4H","drawer":"drawer-module__drawer__1zGfg","header":"drawer-module__header__F3xzs","title":"drawer-module__title__6zsD3","subTitle":"drawer-module__subTitle__ArBvv","closeButton":"drawer-module__closeButton__eP-nJ","body":"drawer-module__body__GIyF-","content":"drawer-module__content__bYS-4","actions":"drawer-module__actions__pUGTF"};
|
|
897
897
|
|
|
898
898
|
var Drawer = function (_a) {
|
|
899
|
-
var isOpen = _a.isOpen, title = _a.title, children = _a.children, className = _a.className, actions = _a.actions, onClose = _a.onClose, _b = _a.isLarge, isLarge = _b === void 0 ? false : _b;
|
|
899
|
+
var isOpen = _a.isOpen, title = _a.title, children = _a.children, className = _a.className, actions = _a.actions, onClose = _a.onClose, _b = _a.isLarge, isLarge = _b === void 0 ? false : _b, subTitle = _a.subTitle;
|
|
900
900
|
var canAnimate = useCanAnimate();
|
|
901
|
-
var drawerContent = (jsxRuntime.jsxs("div", { className: clsx(style$2.root, className), "data-is-open": isOpen, "data-can-animate": canAnimate, children: [jsxRuntime.jsx("button", { className: style$2.backdrop, tabIndex: 0, onClick: onClose, onKeyDown: function (e) { return (isEnter(e) ? onClose === null || onClose === void 0 ? void 0 : onClose() : null); } }), jsxRuntime.jsxs("div", { className: style$2.drawer, "data-is-large": isLarge, children: [jsxRuntime.jsxs("div", { className: style$2.header, children: [jsxRuntime.jsx("h2", { className: style$2.title, children: title }), jsxRuntime.jsx("button", { onClick: onClose, className: style$2.closeButton, type: "button", disabled: !onClose, children: jsxRuntime.jsx(SvgCross, { viewBox: "0 0 24 24" }) })] }), jsxRuntime.jsxs("div", { className: style$2.body, children: [jsxRuntime.jsx("div", { className: style$2.content, children: isOpen ? children : null }), actions && jsxRuntime.jsx("div", { className: style$2.actions, children: actions })] })] })] }));
|
|
901
|
+
var drawerContent = (jsxRuntime.jsxs("div", { className: clsx(style$2.root, className), "data-is-open": isOpen, "data-can-animate": canAnimate, children: [jsxRuntime.jsx("button", { className: style$2.backdrop, tabIndex: 0, onClick: onClose, onKeyDown: function (e) { return (isEnter(e) ? onClose === null || onClose === void 0 ? void 0 : onClose() : null); } }), jsxRuntime.jsxs("div", { className: style$2.drawer, "data-is-large": isLarge, children: [jsxRuntime.jsxs("div", { className: style$2.header, children: [jsxRuntime.jsxs(Stack, { children: [jsxRuntime.jsx("h2", { className: style$2.title, children: title }), subTitle && jsxRuntime.jsx("p", { className: style$2.subTitle, children: subTitle })] }), jsxRuntime.jsx("button", { onClick: onClose, className: style$2.closeButton, type: "button", disabled: !onClose, children: jsxRuntime.jsx(SvgCross, { viewBox: "0 0 24 24" }) })] }), jsxRuntime.jsxs("div", { className: style$2.body, children: [jsxRuntime.jsx("div", { className: style$2.content, children: isOpen ? children : null }), actions && jsxRuntime.jsx("div", { className: style$2.actions, children: actions })] })] })] }));
|
|
902
902
|
return reactDom.createPortal(drawerContent, document.body);
|
|
903
903
|
};
|
|
904
904
|
|