@tecsinapse/cortex-react 1.3.0-beta.21 → 1.3.0-beta.22
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.
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var cortexCore = require('@tecsinapse/cortex-core');
|
|
5
5
|
|
|
6
|
-
const Button = React.forwardRef(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
const Button = React.forwardRef(
|
|
7
|
+
(props, ref) => {
|
|
8
|
+
const { variants, children, ...rest } = props;
|
|
9
|
+
return /* @__PURE__ */ React.createElement(
|
|
10
|
+
"button",
|
|
11
|
+
{
|
|
12
|
+
className: cortexCore.button(variants),
|
|
13
|
+
ref,
|
|
14
|
+
"data-testid": "button",
|
|
15
|
+
...rest
|
|
16
|
+
},
|
|
17
|
+
children
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
19
21
|
|
|
20
22
|
exports.Button = Button;
|
|
@@ -13,7 +13,7 @@ const MenubarProvider = ({ children }) => {
|
|
|
13
13
|
const useMenubar = () => {
|
|
14
14
|
const context = React.useContext(MenubarContext);
|
|
15
15
|
if (!context) {
|
|
16
|
-
throw new Error("
|
|
16
|
+
throw new Error("useMenubar must be used within a MenubarProvider");
|
|
17
17
|
}
|
|
18
18
|
return [context.show, context.setShow];
|
|
19
19
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { button } from '@tecsinapse/cortex-core';
|
|
3
3
|
|
|
4
|
-
const Button = forwardRef(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
const Button = forwardRef(
|
|
5
|
+
(props, ref) => {
|
|
6
|
+
const { variants, children, ...rest } = props;
|
|
7
|
+
return /* @__PURE__ */ React.createElement(
|
|
8
|
+
"button",
|
|
9
|
+
{
|
|
10
|
+
className: button(variants),
|
|
11
|
+
ref,
|
|
12
|
+
"data-testid": "button",
|
|
13
|
+
...rest
|
|
14
|
+
},
|
|
15
|
+
children
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
17
19
|
|
|
18
20
|
export { Button };
|
|
@@ -11,7 +11,7 @@ const MenubarProvider = ({ children }) => {
|
|
|
11
11
|
const useMenubar = () => {
|
|
12
12
|
const context = useContext(MenubarContext);
|
|
13
13
|
if (!context) {
|
|
14
|
-
throw new Error("
|
|
14
|
+
throw new Error("useMenubar must be used within a MenubarProvider");
|
|
15
15
|
}
|
|
16
16
|
return [context.show, context.setShow];
|
|
17
17
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonVariants } from '@tecsinapse/cortex-core';
|
|
3
|
-
interface ButtonProps {
|
|
3
|
+
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className'> {
|
|
4
4
|
variants?: ButtonVariants;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare const Button: React.ForwardRefExoticComponent<ButtonProps &
|
|
8
|
-
export {};
|
|
7
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/cortex-react",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
3
|
+
"version": "1.3.0-beta.22",
|
|
4
4
|
"description": "React components based in @tecsinapse/cortex-core",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@floating-ui/react": "^0.26.18",
|
|
22
22
|
"@internationalized/date": "*",
|
|
23
|
-
"@tecsinapse/cortex-core": "0.3.0-beta.
|
|
23
|
+
"@tecsinapse/cortex-core": "0.3.0-beta.13",
|
|
24
24
|
"clsx": "*",
|
|
25
25
|
"react-aria": "^3.33.1",
|
|
26
26
|
"react-icons": "^5.2.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"react-dom": ">=18.0.0",
|
|
44
44
|
"tailwind": ">=3.3.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "5d3889324ceda81fe63c827bd13075758e065052"
|
|
47
47
|
}
|