@algorithm-shift/design-system 1.2.69 → 1.2.70

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.mts CHANGED
@@ -5,7 +5,7 @@ import { ClassValue } from 'clsx';
5
5
 
6
6
  interface ModalProps {
7
7
  isOpen: boolean;
8
- onClose?: () => void;
8
+ onModalClose?: () => void;
9
9
  title: string;
10
10
  children: React$1.ReactNode;
11
11
  size?: 'sm' | 'md' | 'lg' | 'xl';
@@ -13,7 +13,7 @@ interface ModalProps {
13
13
  className?: string;
14
14
  style?: React$1.CSSProperties;
15
15
  }
16
- declare function Modal({ isOpen, onClose, title, children, size, showCloseButton, className, style }: ModalProps): react_jsx_runtime.JSX.Element | null;
16
+ declare function Modal({ isOpen, onModalClose, title, children, size, showCloseButton, className, style }: ModalProps): react_jsx_runtime.JSX.Element | null;
17
17
 
18
18
  interface ElementProps {
19
19
  children?: React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { ClassValue } from 'clsx';
5
5
 
6
6
  interface ModalProps {
7
7
  isOpen: boolean;
8
- onClose?: () => void;
8
+ onModalClose?: () => void;
9
9
  title: string;
10
10
  children: React$1.ReactNode;
11
11
  size?: 'sm' | 'md' | 'lg' | 'xl';
@@ -13,7 +13,7 @@ interface ModalProps {
13
13
  className?: string;
14
14
  style?: React$1.CSSProperties;
15
15
  }
16
- declare function Modal({ isOpen, onClose, title, children, size, showCloseButton, className, style }: ModalProps): react_jsx_runtime.JSX.Element | null;
16
+ declare function Modal({ isOpen, onModalClose, title, children, size, showCloseButton, className, style }: ModalProps): react_jsx_runtime.JSX.Element | null;
17
17
 
18
18
  interface ElementProps {
19
19
  children?: React.ReactNode;
package/dist/index.js CHANGED
@@ -107,7 +107,7 @@ function getInitials(name) {
107
107
  var import_jsx_runtime = require("react/jsx-runtime");
108
108
  function Modal({
109
109
  isOpen,
110
- onClose,
110
+ onModalClose,
111
111
  title,
112
112
  children,
113
113
  size = "md",
@@ -118,7 +118,7 @@ function Modal({
118
118
  (0, import_react.useEffect)(() => {
119
119
  const handleEscape = (e) => {
120
120
  if (e.key === "Escape") {
121
- onClose?.();
121
+ onModalClose?.();
122
122
  }
123
123
  };
124
124
  if (isOpen) {
@@ -129,7 +129,7 @@ function Modal({
129
129
  document.removeEventListener("keydown", handleEscape);
130
130
  document.body.style.overflow = "unset";
131
131
  };
132
- }, [isOpen, onClose]);
132
+ }, [isOpen, onModalClose]);
133
133
  if (!isOpen) return null;
134
134
  const sizeClasses = {
135
135
  sm: "w-md",
@@ -153,7 +153,7 @@ function Modal({
153
153
  showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
154
154
  "button",
155
155
  {
156
- onClick: onClose,
156
+ onClick: onModalClose,
157
157
  className: "text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors cursor-pointer",
158
158
  "aria-label": "Close modal",
159
159
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_fontawesome.FontAwesomeIcon, { icon: import_free_solid_svg_icons.faTimes, className: "w-5 h-5" })