@tecsinapse/cortex-react 1.15.4-beta.2 → 1.15.5-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.
- package/dist/cjs/components/Accordion/Root.js +6 -0
- package/dist/cjs/components/Accordion/Trigger.js +29 -9
- package/dist/cjs/components/ScrollableDigitSelector.js +1 -1
- package/dist/cjs/components/TimePicker/TimePickerSelector.js +2 -2
- package/dist/cjs/components/Uploader/Files.js +1 -1
- package/dist/cjs/components/Uploader/Manager.js +2 -2
- package/dist/cjs/components/Uploader/Upload.js +2 -2
- package/dist/cjs/hooks/useFileUpload.js +3 -3
- package/dist/cjs/styles/calendar-cell.js +3 -3
- package/dist/esm/components/Accordion/Root.js +6 -0
- package/dist/esm/components/Accordion/Trigger.js +29 -9
- package/dist/esm/components/ScrollableDigitSelector.js +1 -1
- package/dist/esm/components/TimePicker/TimePickerSelector.js +2 -2
- package/dist/esm/components/Uploader/Files.js +1 -1
- package/dist/esm/components/Uploader/Manager.js +2 -2
- package/dist/esm/components/Uploader/Upload.js +2 -2
- package/dist/esm/hooks/useFileUpload.js +3 -3
- package/dist/esm/styles/calendar-cell.js +3 -3
- package/dist/types/components/Accordion/Root.d.ts +1 -1
- package/dist/types/components/Accordion/Trigger.d.ts +1 -1
- package/dist/types/components/Accordion/index.d.ts +2 -2
- package/dist/types/components/Accordion/types.d.ts +3 -0
- package/dist/types/components/Uploader/Manager.d.ts +1 -1
- package/dist/types/components/Uploader/index.d.ts +1 -1
- package/dist/types/components/Uploader/types.d.ts +1 -1
- package/dist/types/hooks/useFileUpload.d.ts +2 -2
- package/package.json +3 -3
|
@@ -10,6 +10,9 @@ const AccordionRoot = ({
|
|
|
10
10
|
defaultOpen,
|
|
11
11
|
label,
|
|
12
12
|
floating,
|
|
13
|
+
showDivider,
|
|
14
|
+
showArrowBorder,
|
|
15
|
+
arrowPosition,
|
|
13
16
|
onOpen,
|
|
14
17
|
invertedArrow,
|
|
15
18
|
onClose,
|
|
@@ -23,6 +26,9 @@ const AccordionRoot = ({
|
|
|
23
26
|
floating,
|
|
24
27
|
onOpen,
|
|
25
28
|
onClose,
|
|
29
|
+
showDivider,
|
|
30
|
+
showArrowBorder,
|
|
31
|
+
arrowPosition,
|
|
26
32
|
invertedArrow,
|
|
27
33
|
direction
|
|
28
34
|
}
|
|
@@ -7,7 +7,11 @@ var context = require('./context.js');
|
|
|
7
7
|
|
|
8
8
|
const AccordionTrigger = ({
|
|
9
9
|
label,
|
|
10
|
+
children,
|
|
10
11
|
floating = false,
|
|
12
|
+
arrowPosition = "left",
|
|
13
|
+
showDivider = true,
|
|
14
|
+
showArrowBorder = true,
|
|
11
15
|
/**
|
|
12
16
|
* Only applied to trigger arrow
|
|
13
17
|
*/
|
|
@@ -18,9 +22,9 @@ const AccordionTrigger = ({
|
|
|
18
22
|
direction = "horizontal"
|
|
19
23
|
}) => {
|
|
20
24
|
const { open, toggle } = context.useAccordionContext();
|
|
21
|
-
if (!floating && !label) {
|
|
25
|
+
if (!floating && !label && !children) {
|
|
22
26
|
throw new Error(
|
|
23
|
-
"A label must be specified if the trigger is not floating variant"
|
|
27
|
+
"A label or children must be specified if the trigger is not floating variant"
|
|
24
28
|
);
|
|
25
29
|
}
|
|
26
30
|
const action = () => {
|
|
@@ -35,25 +39,41 @@ const AccordionTrigger = ({
|
|
|
35
39
|
"div",
|
|
36
40
|
{
|
|
37
41
|
className: clsx(
|
|
38
|
-
"flex justify-between align-center
|
|
42
|
+
"flex justify-between align-center cursor-pointer",
|
|
39
43
|
{ "mr-deca": floating && direction === "horizontal" },
|
|
40
44
|
{ "mb-deca": floating && direction === "vertical" },
|
|
41
|
-
{
|
|
42
|
-
|
|
45
|
+
{
|
|
46
|
+
"border-r border-secondary-light flex-col px-mili": direction === "horizontal"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"border-b border-secondary-light py-mili": showDivider && direction === "vertical"
|
|
50
|
+
}
|
|
43
51
|
),
|
|
44
52
|
onClick: action,
|
|
45
53
|
children: [
|
|
54
|
+
!floating && arrowPosition === "right" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: clsx({
|
|
58
|
+
"-rotate-180 [writing-mode:vertical-lr]": direction === "horizontal"
|
|
59
|
+
}),
|
|
60
|
+
children: children ?? label
|
|
61
|
+
}
|
|
62
|
+
),
|
|
46
63
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
47
64
|
"div",
|
|
48
65
|
{
|
|
49
66
|
className: clsx(
|
|
50
|
-
"rounded-mili
|
|
67
|
+
"rounded-mili flex align-center justify-center p-micro",
|
|
51
68
|
{
|
|
52
69
|
"absolute -translate-x-micro translate-y-deca bg-white": floating && direction === "horizontal"
|
|
53
70
|
},
|
|
54
71
|
{
|
|
55
72
|
"absolute -translate-y-micro translate-x-deca bg-white": floating && direction === "vertical"
|
|
56
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"border border-secondary-light": showArrowBorder
|
|
76
|
+
},
|
|
57
77
|
className
|
|
58
78
|
),
|
|
59
79
|
children: direction === "horizontal" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -79,15 +99,15 @@ const AccordionTrigger = ({
|
|
|
79
99
|
)
|
|
80
100
|
}
|
|
81
101
|
),
|
|
82
|
-
!floating
|
|
102
|
+
!floating && arrowPosition === "left" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
103
|
"span",
|
|
84
104
|
{
|
|
85
105
|
className: clsx({
|
|
86
106
|
"-rotate-180 [writing-mode:vertical-lr]": direction === "horizontal"
|
|
87
107
|
}),
|
|
88
|
-
children: label
|
|
108
|
+
children: children ?? label
|
|
89
109
|
}
|
|
90
|
-
)
|
|
110
|
+
)
|
|
91
111
|
]
|
|
92
112
|
}
|
|
93
113
|
);
|
|
@@ -46,7 +46,7 @@ const ScrollableDigitSelector = ({
|
|
|
46
46
|
{
|
|
47
47
|
className: clsx(
|
|
48
48
|
"p-micro rounded-micro border-1 border-transparent hover:bg-primary-light hover:border-primary cursor-pointer",
|
|
49
|
-
value === val && "bg-primary-medium text-
|
|
49
|
+
value === val && "bg-primary-medium text-white"
|
|
50
50
|
),
|
|
51
51
|
children: formatValue(val)
|
|
52
52
|
}
|
|
@@ -105,7 +105,7 @@ const TimePickerSelector = ({
|
|
|
105
105
|
{
|
|
106
106
|
className: clsx(
|
|
107
107
|
dayPeriodStyle,
|
|
108
|
-
!isPM && "bg-primary-medium text-
|
|
108
|
+
!isPM && "bg-primary-medium text-white"
|
|
109
109
|
),
|
|
110
110
|
children: "AM"
|
|
111
111
|
}
|
|
@@ -122,7 +122,7 @@ const TimePickerSelector = ({
|
|
|
122
122
|
{
|
|
123
123
|
className: clsx(
|
|
124
124
|
dayPeriodStyle,
|
|
125
|
-
isPM && "bg-primary-medium text-
|
|
125
|
+
isPM && "bg-primary-medium text-white"
|
|
126
126
|
),
|
|
127
127
|
children: "PM"
|
|
128
128
|
}
|
|
@@ -10,7 +10,7 @@ const Files = ({
|
|
|
10
10
|
}) => {
|
|
11
11
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white w-full border-2 p-deca flex flex-col overflow-y-auto rounded-mili h-[18rem]", children: [
|
|
12
12
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-mili items-center mb-deca", children: [
|
|
13
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-deca h-deca bg-primary-medium rounded-full text-micro text-
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-deca h-deca bg-primary-medium rounded-full text-micro text-white", children: `${files.length}` }),
|
|
14
14
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-md font-semibold", "data-testid": "upload-progress", children: uploadProgressText })
|
|
15
15
|
] }),
|
|
16
16
|
files.map((file, index) => /* @__PURE__ */ jsxRuntime.jsx(Upload.File, { file, index, onDelete }, file.uid))
|
|
@@ -15,7 +15,7 @@ const Manager = ({
|
|
|
15
15
|
files,
|
|
16
16
|
onDelete,
|
|
17
17
|
uploadProgressText = "Upload(s) in progress",
|
|
18
|
-
|
|
18
|
+
uploadResultText = "Upload(s) completed",
|
|
19
19
|
onClose
|
|
20
20
|
}) => {
|
|
21
21
|
const {
|
|
@@ -47,7 +47,7 @@ const Manager = ({
|
|
|
47
47
|
children: min ? /* @__PURE__ */ jsxRuntime.jsx(io5.IoChevronUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(io5.IoChevronDown, {})
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { "data-testid": "upload-progress", children: isLoading ? uploadProgressText :
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { "data-testid": "upload-progress", children: isLoading ? uploadProgressText : uploadResultText }),
|
|
51
51
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52
52
|
Button.Button,
|
|
53
53
|
{
|
|
@@ -105,8 +105,8 @@ const Folder = ({ name, subItems }) => {
|
|
|
105
105
|
);
|
|
106
106
|
const intent = React.useMemo(() => {
|
|
107
107
|
if (loading) return "info";
|
|
108
|
-
if ((subItems ?? []).some((item) => item.status === "error")
|
|
109
|
-
return "
|
|
108
|
+
if ((subItems ?? []).some((item) => item.status === "error")) {
|
|
109
|
+
return "error";
|
|
110
110
|
}
|
|
111
111
|
return "success";
|
|
112
112
|
}, [subItems]);
|
|
@@ -30,7 +30,7 @@ const useFileUpload = ({
|
|
|
30
30
|
noClick = false,
|
|
31
31
|
ignoreRejections = false,
|
|
32
32
|
uploadProgressText,
|
|
33
|
-
|
|
33
|
+
uploadResultText
|
|
34
34
|
}) => {
|
|
35
35
|
const {
|
|
36
36
|
showManager,
|
|
@@ -100,10 +100,10 @@ const useFileUpload = ({
|
|
|
100
100
|
onClose: closeManager,
|
|
101
101
|
onDelete: handleRemoveFile,
|
|
102
102
|
uploadProgressText,
|
|
103
|
-
|
|
103
|
+
uploadResultText
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
}, [handleRemoveFile, closeManager]);
|
|
106
|
+
}, [handleRemoveFile, closeManager, uploadResultText]);
|
|
107
107
|
const addMimeTypes = (key, acc) => {
|
|
108
108
|
types.AcceptSpecificMap[key].forEach((mimeType) => {
|
|
109
109
|
acc[mimeType] = [];
|
|
@@ -15,17 +15,17 @@ const calendarCell = tailwindVariants.tv({
|
|
|
15
15
|
},
|
|
16
16
|
isSelected: {
|
|
17
17
|
true: {
|
|
18
|
-
cell: "bg-primary-medium border-2 border-primary-medium text-
|
|
18
|
+
cell: "bg-primary-medium border-2 border-primary-medium text-white hover:bg-primary-medium"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
isSelectionStart: {
|
|
22
22
|
true: {
|
|
23
|
-
cell: "bg-primary-medium border-2 border-primary-medium rounded-r-none text-
|
|
23
|
+
cell: "bg-primary-medium border-2 border-primary-medium rounded-r-none text-white"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
isSelectionEnd: {
|
|
27
27
|
true: {
|
|
28
|
-
cell: "bg-primary-medium border-2 border-primary-medium rounded-l-none text-
|
|
28
|
+
cell: "bg-primary-medium border-2 border-primary-medium rounded-l-none text-white"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
inRange: {
|
|
@@ -8,6 +8,9 @@ const AccordionRoot = ({
|
|
|
8
8
|
defaultOpen,
|
|
9
9
|
label,
|
|
10
10
|
floating,
|
|
11
|
+
showDivider,
|
|
12
|
+
showArrowBorder,
|
|
13
|
+
arrowPosition,
|
|
11
14
|
onOpen,
|
|
12
15
|
invertedArrow,
|
|
13
16
|
onClose,
|
|
@@ -21,6 +24,9 @@ const AccordionRoot = ({
|
|
|
21
24
|
floating,
|
|
22
25
|
onOpen,
|
|
23
26
|
onClose,
|
|
27
|
+
showDivider,
|
|
28
|
+
showArrowBorder,
|
|
29
|
+
arrowPosition,
|
|
24
30
|
invertedArrow,
|
|
25
31
|
direction
|
|
26
32
|
}
|
|
@@ -5,7 +5,11 @@ import { useAccordionContext } from './context.js';
|
|
|
5
5
|
|
|
6
6
|
const AccordionTrigger = ({
|
|
7
7
|
label,
|
|
8
|
+
children,
|
|
8
9
|
floating = false,
|
|
10
|
+
arrowPosition = "left",
|
|
11
|
+
showDivider = true,
|
|
12
|
+
showArrowBorder = true,
|
|
9
13
|
/**
|
|
10
14
|
* Only applied to trigger arrow
|
|
11
15
|
*/
|
|
@@ -16,9 +20,9 @@ const AccordionTrigger = ({
|
|
|
16
20
|
direction = "horizontal"
|
|
17
21
|
}) => {
|
|
18
22
|
const { open, toggle } = useAccordionContext();
|
|
19
|
-
if (!floating && !label) {
|
|
23
|
+
if (!floating && !label && !children) {
|
|
20
24
|
throw new Error(
|
|
21
|
-
"A label must be specified if the trigger is not floating variant"
|
|
25
|
+
"A label or children must be specified if the trigger is not floating variant"
|
|
22
26
|
);
|
|
23
27
|
}
|
|
24
28
|
const action = () => {
|
|
@@ -33,25 +37,41 @@ const AccordionTrigger = ({
|
|
|
33
37
|
"div",
|
|
34
38
|
{
|
|
35
39
|
className: clsx(
|
|
36
|
-
"flex justify-between align-center
|
|
40
|
+
"flex justify-between align-center cursor-pointer",
|
|
37
41
|
{ "mr-deca": floating && direction === "horizontal" },
|
|
38
42
|
{ "mb-deca": floating && direction === "vertical" },
|
|
39
|
-
{
|
|
40
|
-
|
|
43
|
+
{
|
|
44
|
+
"border-r border-secondary-light flex-col px-mili": direction === "horizontal"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"border-b border-secondary-light py-mili": showDivider && direction === "vertical"
|
|
48
|
+
}
|
|
41
49
|
),
|
|
42
50
|
onClick: action,
|
|
43
51
|
children: [
|
|
52
|
+
!floating && arrowPosition === "right" && /* @__PURE__ */ jsx(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
className: clsx({
|
|
56
|
+
"-rotate-180 [writing-mode:vertical-lr]": direction === "horizontal"
|
|
57
|
+
}),
|
|
58
|
+
children: children ?? label
|
|
59
|
+
}
|
|
60
|
+
),
|
|
44
61
|
/* @__PURE__ */ jsx(
|
|
45
62
|
"div",
|
|
46
63
|
{
|
|
47
64
|
className: clsx(
|
|
48
|
-
"rounded-mili
|
|
65
|
+
"rounded-mili flex align-center justify-center p-micro",
|
|
49
66
|
{
|
|
50
67
|
"absolute -translate-x-micro translate-y-deca bg-white": floating && direction === "horizontal"
|
|
51
68
|
},
|
|
52
69
|
{
|
|
53
70
|
"absolute -translate-y-micro translate-x-deca bg-white": floating && direction === "vertical"
|
|
54
71
|
},
|
|
72
|
+
{
|
|
73
|
+
"border border-secondary-light": showArrowBorder
|
|
74
|
+
},
|
|
55
75
|
className
|
|
56
76
|
),
|
|
57
77
|
children: direction === "horizontal" ? /* @__PURE__ */ jsx(
|
|
@@ -77,15 +97,15 @@ const AccordionTrigger = ({
|
|
|
77
97
|
)
|
|
78
98
|
}
|
|
79
99
|
),
|
|
80
|
-
!floating
|
|
100
|
+
!floating && arrowPosition === "left" && /* @__PURE__ */ jsx(
|
|
81
101
|
"span",
|
|
82
102
|
{
|
|
83
103
|
className: clsx({
|
|
84
104
|
"-rotate-180 [writing-mode:vertical-lr]": direction === "horizontal"
|
|
85
105
|
}),
|
|
86
|
-
children: label
|
|
106
|
+
children: children ?? label
|
|
87
107
|
}
|
|
88
|
-
)
|
|
108
|
+
)
|
|
89
109
|
]
|
|
90
110
|
}
|
|
91
111
|
);
|
|
@@ -44,7 +44,7 @@ const ScrollableDigitSelector = ({
|
|
|
44
44
|
{
|
|
45
45
|
className: clsx(
|
|
46
46
|
"p-micro rounded-micro border-1 border-transparent hover:bg-primary-light hover:border-primary cursor-pointer",
|
|
47
|
-
value === val && "bg-primary-medium text-
|
|
47
|
+
value === val && "bg-primary-medium text-white"
|
|
48
48
|
),
|
|
49
49
|
children: formatValue(val)
|
|
50
50
|
}
|
|
@@ -103,7 +103,7 @@ const TimePickerSelector = ({
|
|
|
103
103
|
{
|
|
104
104
|
className: clsx(
|
|
105
105
|
dayPeriodStyle,
|
|
106
|
-
!isPM && "bg-primary-medium text-
|
|
106
|
+
!isPM && "bg-primary-medium text-white"
|
|
107
107
|
),
|
|
108
108
|
children: "AM"
|
|
109
109
|
}
|
|
@@ -120,7 +120,7 @@ const TimePickerSelector = ({
|
|
|
120
120
|
{
|
|
121
121
|
className: clsx(
|
|
122
122
|
dayPeriodStyle,
|
|
123
|
-
isPM && "bg-primary-medium text-
|
|
123
|
+
isPM && "bg-primary-medium text-white"
|
|
124
124
|
),
|
|
125
125
|
children: "PM"
|
|
126
126
|
}
|
|
@@ -8,7 +8,7 @@ const Files = ({
|
|
|
8
8
|
}) => {
|
|
9
9
|
return /* @__PURE__ */ jsxs("div", { className: "bg-white w-full border-2 p-deca flex flex-col overflow-y-auto rounded-mili h-[18rem]", children: [
|
|
10
10
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-mili items-center mb-deca", children: [
|
|
11
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-deca h-deca bg-primary-medium rounded-full text-micro text-
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-deca h-deca bg-primary-medium rounded-full text-micro text-white", children: `${files.length}` }),
|
|
12
12
|
/* @__PURE__ */ jsx("h2", { className: "text-md font-semibold", "data-testid": "upload-progress", children: uploadProgressText })
|
|
13
13
|
] }),
|
|
14
14
|
files.map((file, index) => /* @__PURE__ */ jsx(File, { file, index, onDelete }, file.uid))
|
|
@@ -13,7 +13,7 @@ const Manager = ({
|
|
|
13
13
|
files,
|
|
14
14
|
onDelete,
|
|
15
15
|
uploadProgressText = "Upload(s) in progress",
|
|
16
|
-
|
|
16
|
+
uploadResultText = "Upload(s) completed",
|
|
17
17
|
onClose
|
|
18
18
|
}) => {
|
|
19
19
|
const {
|
|
@@ -45,7 +45,7 @@ const Manager = ({
|
|
|
45
45
|
children: min ? /* @__PURE__ */ jsx(IoChevronUp, {}) : /* @__PURE__ */ jsx(IoChevronDown, {})
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */ jsx("h3", { "data-testid": "upload-progress", children: isLoading ? uploadProgressText :
|
|
48
|
+
/* @__PURE__ */ jsx("h3", { "data-testid": "upload-progress", children: isLoading ? uploadProgressText : uploadResultText }),
|
|
49
49
|
/* @__PURE__ */ jsx(
|
|
50
50
|
Button,
|
|
51
51
|
{
|
|
@@ -103,8 +103,8 @@ const Folder = ({ name, subItems }) => {
|
|
|
103
103
|
);
|
|
104
104
|
const intent = useMemo(() => {
|
|
105
105
|
if (loading) return "info";
|
|
106
|
-
if ((subItems ?? []).some((item) => item.status === "error")
|
|
107
|
-
return "
|
|
106
|
+
if ((subItems ?? []).some((item) => item.status === "error")) {
|
|
107
|
+
return "error";
|
|
108
108
|
}
|
|
109
109
|
return "success";
|
|
110
110
|
}, [subItems]);
|
|
@@ -28,7 +28,7 @@ const useFileUpload = ({
|
|
|
28
28
|
noClick = false,
|
|
29
29
|
ignoreRejections = false,
|
|
30
30
|
uploadProgressText,
|
|
31
|
-
|
|
31
|
+
uploadResultText
|
|
32
32
|
}) => {
|
|
33
33
|
const {
|
|
34
34
|
showManager,
|
|
@@ -98,10 +98,10 @@ const useFileUpload = ({
|
|
|
98
98
|
onClose: closeManager,
|
|
99
99
|
onDelete: handleRemoveFile,
|
|
100
100
|
uploadProgressText,
|
|
101
|
-
|
|
101
|
+
uploadResultText
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
}, [handleRemoveFile, closeManager]);
|
|
104
|
+
}, [handleRemoveFile, closeManager, uploadResultText]);
|
|
105
105
|
const addMimeTypes = (key, acc) => {
|
|
106
106
|
AcceptSpecificMap[key].forEach((mimeType) => {
|
|
107
107
|
acc[mimeType] = [];
|
|
@@ -13,17 +13,17 @@ const calendarCell = tv({
|
|
|
13
13
|
},
|
|
14
14
|
isSelected: {
|
|
15
15
|
true: {
|
|
16
|
-
cell: "bg-primary-medium border-2 border-primary-medium text-
|
|
16
|
+
cell: "bg-primary-medium border-2 border-primary-medium text-white hover:bg-primary-medium"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
isSelectionStart: {
|
|
20
20
|
true: {
|
|
21
|
-
cell: "bg-primary-medium border-2 border-primary-medium rounded-r-none text-
|
|
21
|
+
cell: "bg-primary-medium border-2 border-primary-medium rounded-r-none text-white"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
isSelectionEnd: {
|
|
25
25
|
true: {
|
|
26
|
-
cell: "bg-primary-medium border-2 border-primary-medium rounded-l-none text-
|
|
26
|
+
cell: "bg-primary-medium border-2 border-primary-medium rounded-l-none text-white"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
inRange: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AccordionProps } from './types';
|
|
2
|
-
export declare const AccordionRoot: ({ children, defaultOpen, label, floating, onOpen, invertedArrow, onClose, direction, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AccordionRoot: ({ children, defaultOpen, label, floating, showDivider, showArrowBorder, arrowPosition, onOpen, invertedArrow, onClose, direction, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AccordionProps } from './types';
|
|
2
|
-
export declare const AccordionTrigger: ({ label, floating, className, onOpen, onClose, invertedArrow, direction, }: Pick<AccordionProps, "floating" | "label" | "onOpen" | "onClose" | "invertedArrow" | "direction"> & {
|
|
2
|
+
export declare const AccordionTrigger: ({ label, children, floating, arrowPosition, showDivider, showArrowBorder, className, onOpen, onClose, invertedArrow, direction, }: Pick<AccordionProps, "floating" | "arrowPosition" | "showDivider" | "showArrowBorder" | "label" | "children" | "onOpen" | "onClose" | "invertedArrow" | "direction"> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const Accordion: {
|
|
2
|
-
Root: ({ children, defaultOpen, label, floating, onOpen, invertedArrow, onClose, direction, }: import("./types").AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
Root: ({ children, defaultOpen, label, floating, showDivider, showArrowBorder, arrowPosition, onOpen, invertedArrow, onClose, direction, }: import("./types").AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
Face: ({ children, defaultOpen, direction, }: Pick<import("./types").AccordionProps, "children" | "defaultOpen" | "direction">) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
Content: ({ children, direction, }: Pick<import("./types").AccordionProps, "children" | "direction">) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
Trigger: ({ label, floating, className, onOpen, onClose, invertedArrow, direction, }: Pick<import("./types").AccordionProps, "floating" | "label" | "onOpen" | "onClose" | "invertedArrow" | "direction"> & {
|
|
5
|
+
Trigger: ({ label, children, floating, arrowPosition, showDivider, showArrowBorder, className, onOpen, onClose, invertedArrow, direction, }: Pick<import("./types").AccordionProps, "floating" | "arrowPosition" | "showDivider" | "showArrowBorder" | "label" | "children" | "onOpen" | "onClose" | "invertedArrow" | "direction"> & {
|
|
6
6
|
className?: string;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ManagerProps } from './types';
|
|
2
|
-
export declare const Manager: <T>({ open, files, onDelete, uploadProgressText,
|
|
2
|
+
export declare const Manager: <T>({ open, files, onDelete, uploadProgressText, uploadResultText, onClose, }: ManagerProps<T>) => any;
|
|
@@ -5,5 +5,5 @@ export declare const Uploader: {
|
|
|
5
5
|
Files: <T>({ files, onDelete, uploadProgressText, }: import("./types").FilesProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Modal: ({ open, onClose, children, title, }: import("./types").ModalProps) => any;
|
|
7
7
|
Root: <T>({ open, onClose, dropzoneProps, selectFileText, dropText, buttonText, titleModal, onDelete, uploadProgressText, files, }: import("./types").RootUploaderProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
Manager: <T>({ open, files, onDelete, uploadProgressText,
|
|
8
|
+
Manager: <T>({ open, files, onDelete, uploadProgressText, uploadResultText, onClose, }: import("./types").ManagerProps<T>) => any;
|
|
9
9
|
};
|
|
@@ -87,7 +87,7 @@ export interface ManagerProps<T> {
|
|
|
87
87
|
files?: FileUpload<T>[];
|
|
88
88
|
onDelete?: (index: number) => void;
|
|
89
89
|
uploadProgressText?: string;
|
|
90
|
-
|
|
90
|
+
uploadResultText?: string;
|
|
91
91
|
onClose?: () => void;
|
|
92
92
|
}
|
|
93
93
|
export declare const AcceptSpecificMap: {
|
|
@@ -18,11 +18,11 @@ interface UseFileUploadOptions {
|
|
|
18
18
|
hasManager?: boolean;
|
|
19
19
|
isFolder?: boolean;
|
|
20
20
|
uploadProgressText?: string;
|
|
21
|
-
|
|
21
|
+
uploadResultText?: string;
|
|
22
22
|
noClick?: boolean;
|
|
23
23
|
ignoreRejections?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare const useFileUpload: <T>({ accept, onAccept, onOpenManager, onFileRejected, maxSize, allowMultiple, preventDuplicates, onDuplicate, hasManager, isFolder, noClick, ignoreRejections, uploadProgressText,
|
|
25
|
+
export declare const useFileUpload: <T>({ accept, onAccept, onOpenManager, onFileRejected, maxSize, allowMultiple, preventDuplicates, onDuplicate, hasManager, isFolder, noClick, ignoreRejections, uploadProgressText, uploadResultText, }: UseFileUploadOptions) => {
|
|
26
26
|
onOpen: () => void;
|
|
27
27
|
onClose: () => void;
|
|
28
28
|
onDelete: (index: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/cortex-react",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.5-beta.0+29a2cf79",
|
|
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": "3.7.0",
|
|
23
|
-
"@tecsinapse/cortex-core": "1.2.
|
|
23
|
+
"@tecsinapse/cortex-core": "1.2.0",
|
|
24
24
|
"clsx": "2.1.1",
|
|
25
25
|
"currency.js": "2.0.4",
|
|
26
26
|
"embla-carousel-autoplay": "^8.0.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"react-icons": ">=5.2.0",
|
|
49
49
|
"tailwind": ">=3.3.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "29a2cf79a8a766f78c42d59b753d6e1b62155621"
|
|
52
52
|
}
|