@kaio-xyz/design-system 1.1.37 → 1.1.38

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.d.ts CHANGED
@@ -317,13 +317,14 @@ declare const Table: <T>({ data, columns, dataTest, customStyles, isLoading, onR
317
317
  type DrawerProps = {
318
318
  isOpen: boolean;
319
319
  title: string;
320
+ subTitle: string;
320
321
  children?: ReactNode;
321
322
  isLarge?: boolean;
322
323
  className?: string;
323
324
  actions?: ReactNode;
324
325
  onClose?: () => void;
325
326
  };
326
- declare const Drawer: ({ isOpen, title, children, className, actions, onClose, isLarge, }: DrawerProps) => react.ReactPortal;
327
+ declare const Drawer: ({ isOpen, title, children, className, actions, onClose, isLarge, subTitle, }: DrawerProps) => react.ReactPortal;
327
328
 
328
329
  type AlertProps = PropsWithChildren<{
329
330
  title: string;
package/dist/index.esm.js CHANGED
@@ -870,12 +870,12 @@ var useCanAnimate = function () {
870
870
  return canAnimate;
871
871
  };
872
872
 
873
- 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"};
873
+ 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"};
874
874
 
875
875
  var Drawer = function (_a) {
876
- 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;
876
+ 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;
877
877
  var canAnimate = useCanAnimate();
878
- var drawerContent = (jsxs("div", { className: clsx(style$2.root, className), "data-is-open": isOpen, "data-can-animate": canAnimate, children: [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); } }), jsxs("div", { className: style$2.drawer, "data-is-large": isLarge, children: [jsxs("div", { className: style$2.header, children: [jsx("h2", { className: style$2.title, children: title }), jsx("button", { onClick: onClose, className: style$2.closeButton, type: "button", disabled: !onClose, children: jsx(SvgCross, { viewBox: "0 0 24 24" }) })] }), jsxs("div", { className: style$2.body, children: [jsx("div", { className: style$2.content, children: isOpen ? children : null }), actions && jsx("div", { className: style$2.actions, children: actions })] })] })] }));
878
+ var drawerContent = (jsxs("div", { className: clsx(style$2.root, className), "data-is-open": isOpen, "data-can-animate": canAnimate, children: [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); } }), jsxs("div", { className: style$2.drawer, "data-is-large": isLarge, children: [jsxs("div", { className: style$2.header, children: [jsxs(Stack, { children: [jsx("h2", { className: style$2.title, children: title }), subTitle && jsx("p", { className: style$2.subTitle, children: subTitle })] }), jsx("button", { onClick: onClose, className: style$2.closeButton, type: "button", disabled: !onClose, children: jsx(SvgCross, { viewBox: "0 0 24 24" }) })] }), jsxs("div", { className: style$2.body, children: [jsx("div", { className: style$2.content, children: isOpen ? children : null }), actions && jsx("div", { className: style$2.actions, children: actions })] })] })] }));
879
879
  return createPortal(drawerContent, document.body);
880
880
  };
881
881