@tecsinapse/cortex-react 1.13.7-beta.1 → 1.13.8-beta.0

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.
@@ -5,8 +5,8 @@ var cortexCore = require('@tecsinapse/cortex-core');
5
5
  var React = require('react');
6
6
 
7
7
  const Modal = React.forwardRef((props, ref) => {
8
- const { open, onClose, children, className } = props;
9
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, ...props, children: [
8
+ const { open, onClose, children, className, ...rest } = props;
9
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10
10
  /* @__PURE__ */ jsxRuntime.jsx(
11
11
  "div",
12
12
  {
@@ -15,7 +15,16 @@ const Modal = React.forwardRef((props, ref) => {
15
15
  onClick: onClose
16
16
  }
17
17
  ),
18
- /* @__PURE__ */ jsxRuntime.jsx("dialog", { "data-testid": "modal", className: cortexCore.modal({ open, className }), children })
18
+ /* @__PURE__ */ jsxRuntime.jsx(
19
+ "dialog",
20
+ {
21
+ ...rest,
22
+ ref,
23
+ "data-testid": "modal",
24
+ className: cortexCore.modal({ open, className }),
25
+ children
26
+ }
27
+ )
19
28
  ] });
20
29
  });
21
30
 
@@ -1,10 +1,10 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { overlay, modal } from '@tecsinapse/cortex-core';
3
3
  import { forwardRef } from 'react';
4
4
 
5
5
  const Modal = forwardRef((props, ref) => {
6
- const { open, onClose, children, className } = props;
7
- return /* @__PURE__ */ jsxs("div", { ref, ...props, children: [
6
+ const { open, onClose, children, className, ...rest } = props;
7
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
8
8
  /* @__PURE__ */ jsx(
9
9
  "div",
10
10
  {
@@ -13,7 +13,16 @@ const Modal = forwardRef((props, ref) => {
13
13
  onClick: onClose
14
14
  }
15
15
  ),
16
- /* @__PURE__ */ jsx("dialog", { "data-testid": "modal", className: modal({ open, className }), children })
16
+ /* @__PURE__ */ jsx(
17
+ "dialog",
18
+ {
19
+ ...rest,
20
+ ref,
21
+ "data-testid": "modal",
22
+ className: modal({ open, className }),
23
+ children
24
+ }
25
+ )
17
26
  ] });
18
27
  });
19
28
 
@@ -1,8 +1,8 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode, type DialogHTMLAttributes } from 'react';
2
2
  interface ModalProps {
3
3
  open: boolean;
4
4
  onClose: () => void;
5
5
  children?: ReactNode;
6
6
  }
7
- export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & DialogHTMLAttributes<HTMLDialogElement> & import("react").RefAttributes<HTMLDialogElement>>;
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tecsinapse/cortex-react",
3
- "version": "1.13.7-beta.1",
3
+ "version": "1.13.8-beta.0",
4
4
  "description": "React components based in @tecsinapse/cortex-core",
5
5
  "license": "MIT",
6
6
  "main": "dist/esm/index.js",
@@ -47,5 +47,5 @@
47
47
  "react-icons": ">=5.2.0",
48
48
  "tailwind": ">=3.3.0"
49
49
  },
50
- "gitHead": "d99feb237ecafdd0f938baa1840d93264192aaae"
50
+ "gitHead": "bbee94932ab99151590aa806a1a6023d9ff5e32d"
51
51
  }