@tecsinapse/cortex-react 1.3.0-beta.19 → 1.3.0-beta.20
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/cjs/components/Menubar/MostUsedList.js +1 -0
- package/dist/cjs/components/RadioButton.js +22 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/provider/SnackbarProvider.js +1 -0
- package/dist/cjs/service/SnackbarSonner.js +1 -0
- package/dist/esm/components/Menubar/MostUsedList.js +1 -0
- package/dist/esm/components/RadioButton.js +20 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/provider/SnackbarProvider.js +1 -0
- package/dist/esm/service/SnackbarSonner.js +1 -0
- package/dist/types/components/RadioButton.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/tests/RadioButton.test.d.ts +1 -0
- package/package.json +3 -3
|
@@ -31,6 +31,7 @@ require('../Popover/Context.js');
|
|
|
31
31
|
require('../../styles/calendar-cell.js');
|
|
32
32
|
require('../../styles/groupButton.js');
|
|
33
33
|
require('../../styles/progressBar.js');
|
|
34
|
+
require('../RadioButton.js');
|
|
34
35
|
require('../Select/GroupedOptions.js');
|
|
35
36
|
require('../Select/context.js');
|
|
36
37
|
require('../Select/MultiGroupedOptions.js');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var cortexCore = require('@tecsinapse/cortex-core');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
const { container, input, label: labelStyle } = cortexCore.radioButtonStyles();
|
|
7
|
+
const RadioButton = React.forwardRef(
|
|
8
|
+
({ label, reversed, id, ...rest }, ref) => {
|
|
9
|
+
return /* @__PURE__ */ React.createElement(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
className: container({ reversed }),
|
|
13
|
+
ref,
|
|
14
|
+
"data-testid": "radio-button-container"
|
|
15
|
+
},
|
|
16
|
+
/* @__PURE__ */ React.createElement("input", { id, type: "radio", className: input(), ...rest }),
|
|
17
|
+
label ? /* @__PURE__ */ React.createElement("label", { htmlFor: id, className: labelStyle() }, label) : /* @__PURE__ */ React.createElement(React.Fragment, null)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
exports.RadioButton = RadioButton;
|
package/dist/cjs/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var index$1 = require('./components/Menubar/index.js');
|
|
|
19
19
|
var Modal = require('./components/Modal.js');
|
|
20
20
|
var index$2 = require('./components/Popover/index.js');
|
|
21
21
|
var ProgressBar = require('./components/ProgressBar.js');
|
|
22
|
+
var RadioButton = require('./components/RadioButton.js');
|
|
22
23
|
var RangeCalendar = require('./components/RangeCalendar.js');
|
|
23
24
|
var index$3 = require('./components/Select/index.js');
|
|
24
25
|
var Skeleton = require('./components/Skeleton.js');
|
|
@@ -61,6 +62,7 @@ exports.Menubar = index$1.Menubar;
|
|
|
61
62
|
exports.Modal = Modal.Modal;
|
|
62
63
|
exports.Popover = index$2.Popover;
|
|
63
64
|
exports.ProgressBar = ProgressBar.ProgressBar;
|
|
65
|
+
exports.RadioButton = RadioButton.RadioButton;
|
|
64
66
|
exports.RangeCalendar = RangeCalendar.RangeCalendar;
|
|
65
67
|
exports.Select = index$3.Select;
|
|
66
68
|
exports.Skeleton = Skeleton.Skeleton;
|
|
@@ -41,6 +41,7 @@ require('../components/Popover/Context.js');
|
|
|
41
41
|
require('../styles/calendar-cell.js');
|
|
42
42
|
require('../styles/groupButton.js');
|
|
43
43
|
require('../styles/progressBar.js');
|
|
44
|
+
require('../components/RadioButton.js');
|
|
44
45
|
require('../components/Select/GroupedOptions.js');
|
|
45
46
|
require('../components/Select/context.js');
|
|
46
47
|
require('../components/Select/MultiGroupedOptions.js');
|
|
@@ -42,6 +42,7 @@ require('../components/Popover/Context.js');
|
|
|
42
42
|
require('../styles/calendar-cell.js');
|
|
43
43
|
require('../styles/groupButton.js');
|
|
44
44
|
require('../styles/progressBar.js');
|
|
45
|
+
require('../components/RadioButton.js');
|
|
45
46
|
require('../components/Select/GroupedOptions.js');
|
|
46
47
|
require('../components/Select/context.js');
|
|
47
48
|
require('../components/Select/MultiGroupedOptions.js');
|
|
@@ -29,6 +29,7 @@ import '../Popover/Context.js';
|
|
|
29
29
|
import '../../styles/calendar-cell.js';
|
|
30
30
|
import '../../styles/groupButton.js';
|
|
31
31
|
import '../../styles/progressBar.js';
|
|
32
|
+
import '../RadioButton.js';
|
|
32
33
|
import '../Select/GroupedOptions.js';
|
|
33
34
|
import '../Select/context.js';
|
|
34
35
|
import '../Select/MultiGroupedOptions.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { radioButtonStyles } from '@tecsinapse/cortex-core';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
const { container, input, label: labelStyle } = radioButtonStyles();
|
|
5
|
+
const RadioButton = forwardRef(
|
|
6
|
+
({ label, reversed, id, ...rest }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ React.createElement(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: container({ reversed }),
|
|
11
|
+
ref,
|
|
12
|
+
"data-testid": "radio-button-container"
|
|
13
|
+
},
|
|
14
|
+
/* @__PURE__ */ React.createElement("input", { id, type: "radio", className: input(), ...rest }),
|
|
15
|
+
label ? /* @__PURE__ */ React.createElement("label", { htmlFor: id, className: labelStyle() }, label) : /* @__PURE__ */ React.createElement(React.Fragment, null)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export { RadioButton };
|
package/dist/esm/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { Menubar } from './components/Menubar/index.js';
|
|
|
17
17
|
export { Modal } from './components/Modal.js';
|
|
18
18
|
export { Popover } from './components/Popover/index.js';
|
|
19
19
|
export { ProgressBar } from './components/ProgressBar.js';
|
|
20
|
+
export { RadioButton } from './components/RadioButton.js';
|
|
20
21
|
export { RangeCalendar } from './components/RangeCalendar.js';
|
|
21
22
|
export { Select } from './components/Select/index.js';
|
|
22
23
|
export { Skeleton } from './components/Skeleton.js';
|
|
@@ -39,6 +39,7 @@ import '../components/Popover/Context.js';
|
|
|
39
39
|
import '../styles/calendar-cell.js';
|
|
40
40
|
import '../styles/groupButton.js';
|
|
41
41
|
import '../styles/progressBar.js';
|
|
42
|
+
import '../components/RadioButton.js';
|
|
42
43
|
import '../components/Select/GroupedOptions.js';
|
|
43
44
|
import '../components/Select/context.js';
|
|
44
45
|
import '../components/Select/MultiGroupedOptions.js';
|
|
@@ -40,6 +40,7 @@ import '../components/Popover/Context.js';
|
|
|
40
40
|
import '../styles/calendar-cell.js';
|
|
41
41
|
import '../styles/groupButton.js';
|
|
42
42
|
import '../styles/progressBar.js';
|
|
43
|
+
import '../components/RadioButton.js';
|
|
43
44
|
import '../components/Select/GroupedOptions.js';
|
|
44
45
|
import '../components/Select/context.js';
|
|
45
46
|
import '../components/Select/MultiGroupedOptions.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
reversed?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
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.20",
|
|
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.11",
|
|
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": "a6c2404b1b3c8eff8befd96ac9e7c5795085f45e"
|
|
47
47
|
}
|