@tecsinapse/cortex-react 1.15.4-beta.2 → 1.15.4

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.
@@ -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-light"
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-light"
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-light"
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-light", children: `${files.length}` }),
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
- uploadSuccessText = "Upload(s) completed",
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 : uploadSuccessText }),
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") && (subItems ?? []).some((item) => item.status === "success")) {
109
- return "warning";
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
- uploadSuccessText
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
- uploadSuccessText
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-light hover:bg-primary-medium"
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-light"
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-light"
28
+ cell: "bg-primary-medium border-2 border-primary-medium rounded-l-none text-white"
29
29
  }
30
30
  },
31
31
  inRange: {
@@ -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-light"
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-light"
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-light"
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-light", children: `${files.length}` }),
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
- uploadSuccessText = "Upload(s) completed",
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 : uploadSuccessText }),
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") && (subItems ?? []).some((item) => item.status === "success")) {
107
- return "warning";
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
- uploadSuccessText
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
- uploadSuccessText
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-light hover:bg-primary-medium"
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-light"
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-light"
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 { ManagerProps } from './types';
2
- export declare const Manager: <T>({ open, files, onDelete, uploadProgressText, uploadSuccessText, onClose, }: ManagerProps<T>) => any;
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, uploadSuccessText, onClose, }: import("./types").ManagerProps<T>) => any;
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
- uploadSuccessText?: string;
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
- uploadSuccessText?: string;
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, uploadSuccessText, }: UseFileUploadOptions) => {
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.4-beta.2",
3
+ "version": "1.15.4",
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.1-beta.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": "203b53593f6337305563c06953561528d64139b6"
51
+ "gitHead": "041c1da305c71131f079d0667760437320f453b1"
52
52
  }