kamotive_ui 8.12.25 → 13.2.26

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.
Files changed (48) hide show
  1. package/dist/Icons/IconBulletlist/IconBulletlist.js +32 -43
  2. package/dist/Icons/IconCancel/IconCancel.d.ts +9 -0
  3. package/dist/Icons/IconCancel/IconCancel.js +27 -0
  4. package/dist/Icons/IconClose/IconClose.js +2 -4
  5. package/dist/Icons/IconDelete/IconDelete.d.ts +2 -0
  6. package/dist/Icons/IconDelete/IconDelete.js +3 -3
  7. package/dist/Icons/IconFile/IconFile.d.ts +1 -0
  8. package/dist/Icons/IconFile/IconFile.js +3 -2
  9. package/dist/Icons/IconFileDefault/IconFileDefault.js +1 -1
  10. package/dist/Icons/IconPencil/IconPencil.d.ts +4 -1
  11. package/dist/Icons/IconPencil/IconPencil.js +2 -2
  12. package/dist/Icons/IconPencilCancel/IconPencilCancel.d.ts +10 -0
  13. package/dist/Icons/IconPencilCancel/IconPencilCancel.js +8 -0
  14. package/dist/Icons/IconSubmit/IconSubmit.d.ts +2 -0
  15. package/dist/Icons/IconSubmit/IconSubmit.js +1 -1
  16. package/dist/Icons/index.d.ts +2 -0
  17. package/dist/Icons/index.js +2 -0
  18. package/dist/components/AttachedFilesPreview/AttachedFilesPreview.d.ts +6 -5
  19. package/dist/components/AttachedFilesPreview/AttachedFilesPreview.js +14 -56
  20. package/dist/components/AttachedFilesPreview/AttachedFilesPreview.module.css +29 -17
  21. package/dist/components/Button/Button.js +17 -42
  22. package/dist/components/ColorPicker/ColorPicker.js +1 -1
  23. package/dist/components/Comment/Comment.js +18 -20
  24. package/dist/components/Comment/Comment.module.css +9 -3
  25. package/dist/components/Dialog/Dialog.js +9 -2
  26. package/dist/components/Dialog/Dialog.module.css +22 -0
  27. package/dist/components/Dropdown/Dropdown.d.ts +10 -10
  28. package/dist/components/Dropdown/Dropdown.js +157 -46
  29. package/dist/components/Dropdown/Dropdown.module.css +94 -12
  30. package/dist/components/FileAttach/FileAttach.d.ts +3 -3
  31. package/dist/components/FileAttach/FileAttach.js +5 -5
  32. package/dist/components/FileItem/FileItem.js +13 -9
  33. package/dist/components/FileItem/FileItem.module.css +13 -1
  34. package/dist/components/FileLoader/FileLoader.js +27 -22
  35. package/dist/components/IconButton/IconButton.d.ts +1 -1
  36. package/dist/components/IconButton/IconButton.js +4 -4
  37. package/dist/components/TableFilterSidebar/TableFilterSidebar.d.ts +3 -0
  38. package/dist/components/TableFilterSidebar/TableFilterSidebar.js +39 -0
  39. package/dist/components/TableFilterSidebar/TableFilterSidebar.module.css +52 -0
  40. package/dist/components/TextEditor/TextEditor.d.ts +1 -0
  41. package/dist/components/TextEditor/TextEditor.js +274 -113
  42. package/dist/components/TextEditor/TextEditor.module.css +33 -7
  43. package/dist/components/Tooltip/Tooltip.js +11 -1
  44. package/dist/components/Tooltip/Tooltip.module.css +2 -1
  45. package/dist/index.d.ts +2 -1
  46. package/dist/index.js +1 -0
  47. package/dist/types/index.d.ts +112 -45
  48. package/package.json +1 -1
@@ -1,56 +1,45 @@
1
1
  import React from 'react';
2
2
  export const IconBulletlist = ({ color = 'inherit', htmlColor, strokeWidth, onClick, style }) => {
3
- return (React.createElement("svg", { width: "14", height: "11", viewBox: "0 0 14 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
- React.createElement("path", { d: "M1.38735 1.77467C1.87741 1.77467 2.27469 1.37739 2.27469 0.887333C2.27469 0.397273 1.87741 0 1.38735 0C0.897278 0 0.5 0.397273 0.5 0.887333C0.5 1.37739 0.897278 1.77467 1.38735 1.77467Z", fill: htmlColor || "#55534E" }),
5
- React.createElement("path", { d: "M4.50732 0.886665H12.3508", stroke: htmlColor || "#55534E", strokeWidth: strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
6
- React.createElement("path", { d: "M1.38735 6.38733C1.87741 6.38733 2.27469 5.99006 2.27469 5.5C2.27469 5.00994 1.87741 4.61267 1.38735 4.61267C0.897278 4.61267 0.5 5.00994 0.5 5.5C0.5 5.99006 0.897278 6.38733 1.38735 6.38733Z", fill: htmlColor || "#55534E" }),
7
- React.createElement("path", { d: "M4.50732 5.5H12.3508", stroke: htmlColor || "#55534E", strokeWidth: strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
8
- React.createElement("path", { d: "M1.38735 11C1.87741 11 2.27469 10.6027 2.27469 10.1127C2.27469 9.62261 1.87741 9.22533 1.38735 9.22533C0.897278 9.22533 0.5 9.62261 0.5 10.1127C0.5 10.6027 0.897278 11 1.38735 11Z", fill: htmlColor || "#55534E" }),
9
- React.createElement("path", { d: "M4.50732 10.1133H12.3508", stroke: htmlColor || "#55534E", strokeWidth: strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
3
+ return (React.createElement("svg", { width: "16", height: "20", viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
+ React.createElement("path", { d: "M1 3L2.5 1.5V5", fill: htmlColor || "#55534E" }),
5
+ React.createElement("path", { d: "M6 3H15", stroke: htmlColor || "#55534E", strokeWidth: strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
6
+ React.createElement("path", { d: "M1 9.5C1 8.5 1.5 8 2.5 8C3.5 8 4 8.5 4 9.5C4 11 1 12 1 12H4", fill: htmlColor || "#55534E" }),
7
+ React.createElement("path", { d: "M6 10H15", stroke: htmlColor || "#55534E", strokeWidth: strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
8
+ React.createElement("path", { d: "M1 15.5C1 15.5 1.5 14.5 2.5 14.5C3.5 14.5 4 15 4 15.5C4 16 3.5 16.5 2.5 16.5H1.5M1.5 16.5C2.5 16.5 4 16.5 4 18C4 19.5 3.5 19.5 2.5 19.5C1.5 19.5 1 19 1 19", fill: htmlColor || "#55534E" }),
9
+ React.createElement("path", { d: "M6 17H15", stroke: htmlColor || "#55534E", strokeWidth: strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
10
10
  };
11
11
  export const IconBulletlistToString = (color = 'inherit', htmlColor, strokeWidth, onClick, style) => {
12
12
  return `<svg
13
- width="14"
14
- height="11"
15
- viewBox="0 0 14 11"
13
+ width="16"
14
+ height="14"
15
+ viewBox="0 0 16 20"
16
16
  fill="none"
17
17
  xmlns="http://www.w3.org/2000/svg"
18
18
  class="${color}"
19
+ style="${style}"
19
20
  onclick="${onClick}"
20
21
  style="${style}"
21
22
  >
22
- <path
23
- d="M1.38735 1.77467C1.87741 1.77467 2.27469 1.37739 2.27469 0.887333C2.27469 0.397273 1.87741 0 1.38735 0C0.897278 0 0.5 0.397273 0.5 0.887333C0.5 1.37739 0.897278 1.77467 1.38735 1.77467Z"
24
- fill="${htmlColor || "#55534E"}"
25
- />
26
- <path
27
- d="M4.50732 0.886665H12.3508"
28
- stroke="${htmlColor || "#55534E"}"
29
- strokeWidth="${strokeWidth || "1.5"}"
30
- strokeLinecap="round"
31
- stroke-linejoin="round"
32
- />
33
- <path
34
- d="M1.38735 6.38733C1.87741 6.38733 2.27469 5.99006 2.27469 5.5C2.27469 5.00994 1.87741 4.61267 1.38735 4.61267C0.897278 4.61267 0.5 5.00994 0.5 5.5C0.5 5.99006 0.897278 6.38733 1.38735 6.38733Z"
35
- fill="${htmlColor || "#55534E"}"
36
- />
37
- <path
38
- d="M4.50732 5.5H12.3508"
39
- stroke="${htmlColor || "#55534E"}"
40
- strokeWidth="${strokeWidth || "1.5"}"
41
- strokeLinecap="round"
42
- stroke-linejoin="round"
43
- />
44
- <path
45
- d="M1.38735 11C1.87741 11 2.27469 10.6027 2.27469 10.1127C2.27469 9.62261 1.87741 9.22533 1.38735 9.22533C0.897278 9.22533 0.5 9.62261 0.5 10.1127C0.5 10.6027 0.897278 11 1.38735 11Z"
46
- fill="${htmlColor || "#55534E"}"
47
- />
48
- <path
49
- d="M4.50732 10.1133H12.3508"
50
- stroke="${htmlColor || "#55534E"}"
51
- strokeWidth="${strokeWidth || "1.5"}"
52
- strokeLinecap="round"
53
- stroke-linejoin="round"
54
- />
23
+
24
+ <path
25
+ d="M1 3L2.5 1.5V5"
26
+ stroke="${htmlColor || "#55534E"}" stroke-width="${strokeWidth || "1.25"}" stroke-linecap="round" stroke-linejoin="round"/>
27
+ <path
28
+ d="M6 3H15"
29
+ stroke="${htmlColor || "#55534E"}" stroke-width="${strokeWidth || "1.25"}" stroke-linecap="round"/>
30
+
31
+ <path
32
+ d="M1 9.5C1 8.5 1.5 8 2.5 8C3.5 8 4 8.5 4 9.5C4 11 1 12 1 12H4"
33
+ stroke="${htmlColor || "#55534E"}" strokeWidth="${strokeWidth || "1.25"}" stroke-linecap="round" stroke-linejoin="round"/>
34
+ <path
35
+ d="M6 10H15"
36
+ stroke="${htmlColor || "#55534E"}" stroke-width="${strokeWidth || "1.25"}" stroke-linecap="round"/>
37
+
38
+ <path
39
+ d="M1 15.5C1 15.5 1.5 14.5 2.5 14.5C3.5 14.5 4 15 4 15.5C4 16 3.5 16.5 2.5 16.5H1.5M1.5 16.5C2.5 16.5 4 16.5 4 18C4 19.5 3.5 19.5 2.5 19.5C1.5 19.5 1 19 1 19"
40
+ stroke="${htmlColor || "#55534E"}" stroke-width="${strokeWidth || "1.25"}" stroke-linecap="round" stroke-linejoin="round"/>
41
+ <path
42
+ d="M6 17H15"
43
+ stroke="${htmlColor || "#55534E"}" stroke-width="${strokeWidth || "1.25"}" stroke-linecap="round"/>
55
44
  </svg>`;
56
45
  };
@@ -0,0 +1,9 @@
1
+ import React, { CSSProperties, FC } from 'react';
2
+ export declare const IconCancel: FC<{
3
+ color?: string;
4
+ htmlColor?: string;
5
+ strokeWidth?: string;
6
+ onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;
7
+ style?: CSSProperties;
8
+ }>;
9
+ export declare const IconCancelToString: (color?: string, htmlColor?: string, strokeWidth?: string, onClick?: (event: React.MouseEvent<SVGSVGElement>) => void, style?: CSSProperties) => string;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export const IconCancel = ({ color = 'inherit', htmlColor, strokeWidth, onClick, style }) => {
3
+ return (React.createElement("svg", { width: "11", height: "8", viewBox: "0 0 11 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
+ React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth }, d: "M12,3C16.75,3 21,7.25 21,12C21,16.75 16.75,21 12,21C7.25,21 3,16.75 3,12C3,7.25 7.25,3 12,3M12,4C7.81,4 4,7.81 4,12C4,16.19 7.81,20 12,20C16.19,20 20,16.19 20,12C20,7.81 16.19,4 12,4Z" }),
5
+ React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth }, d: "M15.5,8L12,11.5L8.5,8L7.8,8.7L11.3,12.2L7.8,15.7L8.5,16.4L12,12.9L15.5,16.4L16.2,15.7L12.7,12.2L16.2,8.7L15.5,8Z" })));
6
+ };
7
+ export const IconCancelToString = (color = 'inherit', htmlColor, strokeWidth, onClick, style) => {
8
+ return `<svg
9
+ width="11"
10
+ height="8"
11
+ viewBox="0 0 11 8"
12
+ fill="none"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ class="${color}"
15
+ onclick="${onClick}"
16
+ style="${style}"
17
+ >
18
+
19
+ <path
20
+ d="M2.5 1.5L8.5 6.5M8.5 1.5L2.5 6.5"
21
+ stroke="${htmlColor || "#0d99ff"}"
22
+ stroke-width="${strokeWidth || '1'}"
23
+ stroke-linecap="round"
24
+ stroke-linejoin="round"
25
+ />
26
+ </svg>`;
27
+ };
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
2
  export const IconClose = ({ color = 'inherit', htmlColor, strokeWidth = '0.3', onClick, style }) => {
3
- return (React.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick },
4
- React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth },
5
- // d="M16.24,7.76L12,12L7.76,7.76L7.05,8.47L11.29,12.71L7.05,16.95L7.76,17.66L12,13.42L16.24,17.66L16.95,16.95L12.71,12.71L16.95,8.47L16.24,7.76Z"
6
- d: "M17,7L12,12L7,7L6.3,7.7L11.3,12.7L6.3,17.7L7,18.4L12,13.4L17,18.4L17.7,17.7L12.7,12.7L17.7,7.7L17,7Z" })));
3
+ return (React.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
+ React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : '0.3 !important' }, d: "M17,7L12,12L7,7L6.3,7.7L11.3,12.7L6.3,17.7L7,18.4L12,13.4L17,18.4L17.7,17.7L12.7,12.7L17.7,7.7L17,7Z" })));
7
5
  };
@@ -1,5 +1,7 @@
1
1
  import React, { CSSProperties, FC } from 'react';
2
2
  export declare const IconDelete: FC<{
3
+ width?: string | number;
4
+ height?: string | number;
3
5
  color?: string;
4
6
  htmlColor?: string;
5
7
  strokeWidth?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export const IconDelete = ({ color = 'inherit', htmlColor, strokeWidth = '0.3', onClick, style }) => {
3
- return (React.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
- React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth }, d: "M18,19C18,20.66 16.66,22 15,22H8C6.34,22 5,20.66 5,19V7H4V4H8.5L9.5,3H13.5L14.5,4H19V7H18V19M6,7V19C6,20.1 6.9,21 8,21H15C16.1,21 17,20.1 17,19V7H6M18,6V5H14L13,4H10L9,5H5V6H18M8,9H9V19H8V9M14,9H15V19H14V9Z" })));
2
+ export const IconDelete = ({ width = '100%', height = '100%', color = 'inherit', htmlColor, strokeWidth = '0.3', onClick, style }) => {
3
+ return (React.createElement("svg", { width: width, height: height, viewBox: "0 0 24 24", fill: "none", xmlns: "www.w3.org", className: color, onClick: onClick, style: style },
4
+ React.createElement("path", { d: "M18,19C18,20.66 16.66,22 15,22H8C6.34,22 5,20.66 5,19V7H4V4H8.5L9.5,3H13.5L14.5,4H19V7H18V19M6,7V19C6,20.1 6.9,21 8,21H15C16.1,21 17,20.1 17,19V7H6M18,6V5H14L13,4H10L9,5H5V6H18M8,9H9V19H8V9M14,9H15V19H14V9Z", fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth } })));
5
5
  };
@@ -4,4 +4,5 @@ export declare const IconFile: FC<{
4
4
  htmlColor?: string;
5
5
  strokeWidth?: string;
6
6
  style?: CSSProperties;
7
+ text?: string;
7
8
  }>;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- export const IconFile = ({ color = 'inherit', htmlColor, strokeWidth = '0.3', style }) => {
2
+ export const IconFile = ({ color = 'inherit', htmlColor, strokeWidth = '0.3', style, text }) => {
3
3
  return (React.createElement("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: color, style: style },
4
- React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth }, strokeLinejoin: "round", d: "M14,11C12.34,11 11,9.66 11,8V4H7C5.9,4 5,4.9 5,6V19C5,20.1 5.9,21 7,21H16C17.1,21 18,20.1 18,19V11H14M12,8C12,9.1 12.9,10 14,10H17.59L12,4.41V8M7,3H12L19,10V19C19,20.66 17.66,22 16,22H7C5.34,22 4,20.66 4,19V6C4,4.34 5.34,3 7,3Z" })));
4
+ React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth }, strokeLinejoin: "round", d: "M14,11C12.34,11 11,9.66 11,8V4H7C5.9,4 5,4.9 5,6V19C5,20.1 5.9,21 7,21H16C17.1,21 18,20.1 18,19V11H14M12,8C12,9.1 12.9,10 14,10H17.59L12,4.41V8M7,3H12L19,10V19C19,20.66 17.66,22 16,22H7C5.34,22 4,20.66 4,19V6C4,4.34 5.34,3 7,3Z" }),
5
+ text ? (React.createElement("text", { x: "12", y: "16", textAnchor: "middle", fill: "white", fontSize: "5", fontWeight: "bold" }, "ZIP")) : (React.createElement("path", { d: "M16 13H8M16 17H8M10 9H8", stroke: "white", strokeWidth: "1" }))));
5
6
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export const IconFileDefault = ({ color = 'inherit', htmlColor, strokeWidth = '0.3', style, text }) => {
3
- return (React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
3
+ return (React.createElement("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none" },
4
4
  React.createElement("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", fill: htmlColor || "#6b7280" }),
5
5
  React.createElement("polyline", { points: "14,2 14,8 20,8", fill: htmlColor || "#6b7280" }),
6
6
  text ? (React.createElement("text", { x: "12", y: "16", textAnchor: "middle", fill: "white", fontSize: "5", fontWeight: "bold" }, "ZIP")) : (React.createElement("path", { d: "M16 13H8M16 17H8M10 9H8", stroke: "white", strokeWidth: "1" }))));
@@ -1,7 +1,10 @@
1
- import { CSSProperties, FC } from 'react';
1
+ import React, { CSSProperties, FC } from 'react';
2
2
  export declare const IconPencil: FC<{
3
+ width?: string | number;
4
+ height?: string | number;
3
5
  color?: string;
4
6
  htmlColor?: string;
5
7
  strokeWidth?: string;
8
+ onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;
6
9
  style?: CSSProperties;
7
10
  }>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export const IconPencil = ({ color = 'inherit', htmlColor, strokeWidth, style }) => {
3
- return (React.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, style: style },
2
+ export const IconPencil = ({ width = '100%', height = '100%', color = 'inherit', htmlColor, strokeWidth, onClick, style }) => {
3
+ return (React.createElement("svg", { width: width, height: height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
4
  React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', style: { strokeWidth: strokeWidth }, d: "M19.71,8.04L17.37,10.37L13.62,6.62L15.96,4.29C16.35,3.9 17,3.9 17.37,4.29L19.71,6.63C20.1,7 20.1,7.65 19.71,8.04M3,17.25L13.06,7.18L16.81,10.93L6.75,21H3V17.25M16.62,5.04L15.08,6.58L17.42,8.92L18.96,7.38L16.62,5.04M15.36,11L13,8.64L4,17.66V20H6.34L15.36,11Z" })));
5
5
  };
@@ -0,0 +1,10 @@
1
+ import React, { FC, CSSProperties } from 'react';
2
+ export declare const IconPencilCancel: FC<{
3
+ width?: string | number;
4
+ height?: string | number;
5
+ color?: string;
6
+ htmlColor?: string;
7
+ strokeWidth?: string;
8
+ onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;
9
+ style?: CSSProperties;
10
+ }>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export const IconPencilCancel = ({ width = '100%', height = '100%', color = 'inherit', htmlColor, strokeWidth = '0.1', onClick, style }) => {
3
+ const finalColor = htmlColor || 'currentColor';
4
+ return (React.createElement("svg", { width: width, height: height, viewBox: "0 0 24 24", fill: "none", xmlns: "www.w3.org", className: color, onClick: onClick, style: style },
5
+ React.createElement("path", { fill: finalColor, stroke: finalColor, style: { strokeWidth: strokeWidth }, d: "M19.71,8.04L17.37,10.37L13.62,6.62L15.96,4.29C16.35,3.9 17,3.9 17.37,4.29L19.71,6.63C20.1,7 20.1,7.65 19.71,8.04M3,17.25L13.06,7.18L16.81,10.93L6.75,21H3V17.25M16.62,5.04L15.08,6.58L17.42,8.92L18.96,7.38L16.62,5.04M15.36,11L13,8.64L4,17.66V20H6.34L15.36,11Z" }),
6
+ React.createElement("circle", { cx: "16.5", cy: "16.5", r: "5.5", fill: "white" }),
7
+ React.createElement("path", { d: "M19.5 13.5L13.5 19.5M13.5 13.5L19.5 19.5", stroke: finalColor, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
8
+ };
@@ -1,5 +1,7 @@
1
1
  import React, { CSSProperties, FC } from 'react';
2
2
  export declare const IconSubmit: FC<{
3
+ width?: string | number;
4
+ height?: string | number;
3
5
  color?: string;
4
6
  htmlColor?: string;
5
7
  strokeWidth?: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export const IconSubmit = ({ color = 'inherit', htmlColor, strokeWidth, onClick, style }) => {
3
- return (React.createElement("svg", { width: "11", height: "8", viewBox: "0 0 11 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
3
+ return (React.createElement("svg", { width: '100%', height: '100%', viewBox: "0 0 11 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick, style: style },
4
4
  React.createElement("path", { d: "M9.5957 0.9C9.60588 0.9 9.61862 0.904148 9.62988 0.915625C9.64163 0.92768 9.65039 0.946815 9.65039 0.969336C9.65038 0.989162 9.64247 1.00515 9.63281 1.01719L9.62891 1.02207L3.72363 7.08359L3.72266 7.08457C3.71706 7.09032 3.71067 7.09391 3.70508 7.09629C3.69967 7.09855 3.69452 7.10017 3.68945 7.10019C3.68423 7.10019 3.67843 7.09866 3.67285 7.09629C3.66738 7.09393 3.66172 7.09015 3.65625 7.08457L3.65527 7.08359L1.07129 4.43223C1.06557 4.42636 1.06042 4.41815 1.05664 4.40879C1.05293 4.39954 1.05082 4.38923 1.05078 4.37852C1.05078 4.36763 1.05286 4.35664 1.05664 4.34727C1.06038 4.33806 1.06567 4.33062 1.07129 4.3248C1.07698 4.31896 1.08316 4.31453 1.08887 4.31211C1.09449 4.30974 1.10018 4.30918 1.10547 4.30918C1.11077 4.30919 1.11644 4.30972 1.12207 4.31211C1.12777 4.31453 1.13396 4.31896 1.13965 4.3248L3.33203 6.5748L3.68945 6.94199L4.04785 6.5748L9.5625 0.915625C9.57359 0.904352 9.58563 0.900112 9.5957 0.9Z", stroke: htmlColor || "white", strokeWidth: strokeWidth || '1' })));
5
5
  };
6
6
  export const IconSubmitToString = (color = 'inherit', htmlColor, strokeWidth, onClick, style) => {
@@ -39,6 +39,7 @@ export { IconStrikethrough, IconStrikethroughToString } from './IconStrikethroug
39
39
  export { IconRedo, IconRedoToString } from './IconRedo/IconRedo';
40
40
  export { IconUndo, IconUndoToString } from './IconUndo/IconUndo';
41
41
  export { IconSubmit, IconSubmitToString } from './IconSubmit/IconSubmit';
42
+ export { IconCancel, IconCancelToString } from './IconCancel/IconCancel';
42
43
  export { IconBulletlist, IconBulletlistToString } from './IconBulletlist/IconBulletlist';
43
44
  export { IconFileAudio } from './IconFileAudio/IconFileAudio';
44
45
  export { IconFileVideo } from './IconFileVideo/IconFileVideo';
@@ -49,3 +50,4 @@ export { IconShare } from './IconShare/IconShare';
49
50
  export { IconMultiselect } from './IconMultiselect/IconMultiselect';
50
51
  export { IconSearch } from './IconSearch/IconSearch';
51
52
  export { IconFilter } from './IconFilter/IconFilter';
53
+ export { IconPencilCancel } from './IconPencilCancel/IconPencilCancel';
@@ -39,6 +39,7 @@ export { IconStrikethrough, IconStrikethroughToString } from './IconStrikethroug
39
39
  export { IconRedo, IconRedoToString } from './IconRedo/IconRedo';
40
40
  export { IconUndo, IconUndoToString } from './IconUndo/IconUndo';
41
41
  export { IconSubmit, IconSubmitToString } from './IconSubmit/IconSubmit';
42
+ export { IconCancel, IconCancelToString } from './IconCancel/IconCancel';
42
43
  export { IconBulletlist, IconBulletlistToString } from './IconBulletlist/IconBulletlist';
43
44
  export { IconFileAudio } from './IconFileAudio/IconFileAudio';
44
45
  export { IconFileVideo } from './IconFileVideo/IconFileVideo';
@@ -49,3 +50,4 @@ export { IconShare } from './IconShare/IconShare';
49
50
  export { IconMultiselect } from './IconMultiselect/IconMultiselect';
50
51
  export { IconSearch } from './IconSearch/IconSearch';
51
52
  export { IconFilter } from './IconFilter/IconFilter';
53
+ export { IconPencilCancel } from './IconPencilCancel/IconPencilCancel';
@@ -1,20 +1,21 @@
1
1
  import React, { CSSProperties } from 'react';
2
+ import { TAttachments } from '../../types';
2
3
  export interface FilePreview {
3
4
  file: File;
4
5
  id: string;
5
6
  preview?: string;
6
7
  lng: string;
7
8
  }
8
- export declare const getFileIcon: (file: File) => React.JSX.Element;
9
+ export declare const getFileIcon: (file: TAttachments) => React.JSX.Element;
9
10
  export declare const formatFileSize: (bytes?: number, lng?: string) => string;
10
11
  interface AttachedFilesProps {
11
- files: FilePreview[];
12
+ files: TAttachments[];
13
+ onDownload?: (file: TAttachments) => void;
14
+ allowDelete?: boolean;
12
15
  onDelete?: (id: string) => void;
13
- onDownload?: (file: File) => void;
14
16
  style?: CSSProperties;
15
17
  className?: string;
16
- isEdit?: boolean;
17
- allowDownload?: boolean;
18
+ maxFileCount?: number;
18
19
  lng: string;
19
20
  }
20
21
  export declare const AttachedFilesPreview: React.FC<AttachedFilesProps>;
@@ -1,34 +1,8 @@
1
1
  import React from 'react';
2
- import { IconFileDefault, IconFileVideo, IconFileAudio } from '../../Icons';
3
- import styles from './AttachedFilesPreview.module.css';
2
+ import { IconFile } from '../../Icons';
3
+ import { FileItem, Typography } from '../..';
4
4
  export const getFileIcon = (file) => {
5
- const fileType = file.type.toLowerCase();
6
- const fileName = file.name.toLowerCase();
7
- if (fileType === 'application/pdf' || fileName.endsWith('.pdf')) {
8
- return React.createElement(IconFileDefault, { htmlColor: "#dc2626", text: "PDF" });
9
- }
10
- if (fileType.includes('word') || fileName.endsWith('.doc') || fileName.endsWith('.docx')) {
11
- return React.createElement(IconFileDefault, { htmlColor: "#2563eb", text: "DOC" });
12
- }
13
- if (fileType.includes('sheet') || fileName.endsWith('.xls') || fileName.endsWith('.xlsx')) {
14
- return React.createElement(IconFileDefault, { htmlColor: "#16a34a", text: "XLS" });
15
- }
16
- if (fileType.includes('presentation') || fileName.endsWith('.ppt') || fileName.endsWith('.pptx')) {
17
- return React.createElement(IconFileDefault, { htmlColor: "#ea580c", text: "PPT" });
18
- }
19
- if (fileType.includes('text') || fileName.endsWith('.txt')) {
20
- return React.createElement(IconFileDefault, { htmlColor: "#6b7280", text: "TXT" });
21
- }
22
- if (fileType.includes('zip') || fileType.includes('rar') || fileName.endsWith('.zip') || fileName.endsWith('.rar')) {
23
- return React.createElement(IconFileDefault, { htmlColor: "#7c3aed", text: "ZIP" });
24
- }
25
- if (fileType.includes('video')) {
26
- return React.createElement(IconFileVideo, null);
27
- }
28
- if (fileType.includes('audio')) {
29
- return React.createElement(IconFileAudio, null);
30
- }
31
- return React.createElement(IconFileDefault, null);
5
+ return React.createElement(IconFile, { htmlColor: 'var(--text-btn-light)', color: 'var(--text-btn-light)' });
32
6
  };
33
7
  // Функция для форматирования размера файла
34
8
  export const formatFileSize = (bytes, lng) => {
@@ -42,31 +16,15 @@ export const formatFileSize = (bytes, lng) => {
42
16
  const sizes = lng === 'ru' || (lng === null || lng === void 0 ? void 0 : lng.includes('ru')) ? sizesRu : sizesEn;
43
17
  return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
44
18
  };
45
- export const AttachedFilesPreview = ({ files, onDelete, onDownload, style, className, isEdit, allowDownload = true, lng, }) => {
46
- const handleDelete = (event, id) => {
47
- event.stopPropagation();
48
- if (onDelete) {
49
- onDelete(id);
50
- }
51
- };
52
- const handleDownload = (file) => {
53
- if (onDownload) {
54
- onDownload(file);
55
- }
56
- else {
57
- const url = URL.createObjectURL(file);
58
- const link = document.createElement('a');
59
- link.href = url;
60
- link.download = file.name;
61
- document.body.appendChild(link);
62
- link.click();
63
- document.body.removeChild(link);
64
- URL.revokeObjectURL(url);
65
- }
66
- };
67
- return (React.createElement("div", { className: className, style: style }, files.map((file) => (React.createElement("div", { key: file.id, className: styles.attachedFileItem },
68
- React.createElement("div", { onClick: allowDownload ? () => handleDownload(file.file) : undefined, className: styles.filePreview },
69
- file.preview ? (React.createElement("img", { src: file.preview, alt: file.file.name, className: styles.previewImage })) : (React.createElement("div", { className: styles.previewImage }, getFileIcon(file.file))),
70
- isEdit && (React.createElement("button", { className: styles.removeFileButton, onClick: (event) => handleDelete(event, file.id) }, "\u2715")),
71
- React.createElement("div", { className: styles.fileSize }, formatFileSize(file.file.size, lng))))))));
19
+ export const AttachedFilesPreview = ({ files, onDownload, allowDelete = false, onDelete, style, className, maxFileCount = 5, lng, }) => {
20
+ return (React.createElement("div", { className: className, style: style, title: "" },
21
+ files.map((file, index) => {
22
+ var _a;
23
+ return (React.createElement(FileItem, { key: `${index + ((_a = file.filename) !== null && _a !== void 0 ? _a : '')}`, file: file, error: file.error, canDelete: allowDelete, canDownload: Boolean(onDownload), onDelete: (id) => allowDelete && (onDelete === null || onDelete === void 0 ? void 0 : onDelete(id)), onDownload: (file) => onDownload === null || onDownload === void 0 ? void 0 : onDownload(file), style: {
24
+ border: !file.error ? 'none' : undefined,
25
+ padding: !file.error ? '5px 5px' : '5px 5px',
26
+ borderRadius: '5px'
27
+ }, isRejectedFile: file.error, isComment: true, lng: lng }));
28
+ }),
29
+ files.length > maxFileCount && (React.createElement(Typography, { variant: "Caption", color: "var(--error-main)" }, (lng === 'ru' || lng.includes('ru')) ? `Максимальное количество файлов ${maxFileCount}` : `Maximum number of files ${maxFileCount}`))));
72
30
  };
@@ -1,42 +1,54 @@
1
+
1
2
  .attachedFileItem {
3
+ /* flex-shrink: 0;
4
+ position: relative;
5
+ cursor: pointer; */
2
6
  display: flex;
7
+ gap: 10px;
3
8
  align-items: center;
4
- width: fit-content;
5
- border: none;
9
+ justify-content: space-between;
10
+ }
11
+ .icon{
12
+ display: flex;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ align-items: flex-start;
6
16
  }
7
-
8
17
  .fileSize {
9
- position: absolute;
18
+ /* position: absolute; */
10
19
  font-family: var(--font-family-content);
11
20
  bottom: 0;
12
- margin: 5px;
13
21
  font-size: 10px;
14
22
  color: var(--text-dark);
15
23
  }
16
-
17
- .filePreview {
18
- flex-shrink: 0;
19
- position: relative;
20
- cursor: pointer;
24
+ .nameContainer {
25
+ display: flex;
26
+ gap: 6px;
27
+ align-items: center
28
+ }
29
+ .name {
30
+ display: flex;
31
+ gap: 12px;
32
+ align-items: flex-end;
21
33
  }
22
34
 
23
35
  .previewImage {
24
- width: 50px;
25
- height: 50px;
36
+ /* width: 50px;
37
+ height: 50px; */
26
38
  object-fit: cover;
27
- border-radius: 4px;
28
- border: 1px solid #e0e0e0;
39
+ /* border-radius: 4px; */
40
+ /* border: 1px solid #e0e0e0; */
29
41
  }
30
42
 
31
43
  .removeFileButton {
32
- position: absolute;
44
+ /* position: absolute;
33
45
  right: 0;
34
- top: 0;
46
+ top: 0; */
35
47
  background: none;
36
48
  border: none;
37
49
  color: var(--text-btn-light);
38
50
  cursor: pointer;
39
- font-size: 16px;
51
+ font-size: 12px;
40
52
  padding: 2px 4px;
41
53
  margin-left: 8px;
42
54
  border-radius: 4px;
@@ -1,14 +1,21 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React from 'react';
2
2
  import styles from './Button.module.css';
3
3
  import classNames from 'classnames';
4
4
  import { Typography } from '../Typography/Typography';
5
5
  /**
6
6
  * Компонент Button представляет собой кнопку, которую можно настроить с помощью различных параметров (размер, иконки, стили, состояние).
7
7
  */
8
- export const Button = ({ label, variant = 'fill', size = 'md', style, condition, icon, disabled = false, onClick, children, error, color, name, type = 'button', form }) => {
9
- const [buttonStyle, setButtonStyle] = useState('');
10
- const [buttonCondition, setButtonCondition] = useState(condition);
11
- const buttonClasses = classNames(styles['button'], styles[`button--${size}`], styles[`button--${buttonStyle}`], {
8
+ export const Button = ({ label, variant = 'fill', size = 'md', mode, style, condition, icon, disabled = false, onClick, children, error, color, name, type = 'button', form }) => {
9
+ const btnIcon = icon || typeof children === 'object' && children;
10
+ let modeStyle = 'text';
11
+ if (mode) {
12
+ modeStyle = mode;
13
+ }
14
+ else if (btnIcon && variant !== 'link') {
15
+ modeStyle = (!label && !children) ? 'icon' : 'default';
16
+ }
17
+ const buttonCondition = error ? 'error' : (condition || 'default');
18
+ const buttonClasses = classNames(styles['button'], styles[`button--${size}`], styles[`button--${modeStyle}`], {
12
19
  [styles[`button--${variant}-${buttonCondition}`]]: buttonCondition && !color,
13
20
  [styles[`button--${variant}-custom`]]: color && !error
14
21
  });
@@ -48,51 +55,19 @@ export const Button = ({ label, variant = 'fill', size = 'md', style, condition,
48
55
  return '#FFFFFF';
49
56
  }
50
57
  };
51
- const btnIcon = icon || typeof children === 'object' && children;
52
- useEffect(() => {
53
- if (!buttonStyle && style) {
54
- setButtonStyle(style);
55
- }
56
- else {
57
- if (btnIcon && variant !== 'link') {
58
- if (!label && !(typeof children === 'string' && children)) {
59
- setButtonStyle('icon');
60
- }
61
- else {
62
- setButtonStyle('default');
63
- }
64
- }
65
- else {
66
- setButtonStyle('text');
67
- }
68
- }
69
- }, [style, btnIcon, label, children]);
70
- useEffect(() => {
71
- if (!condition) {
72
- if (error) {
73
- setButtonCondition('error');
74
- }
75
- else {
76
- setButtonCondition('default');
77
- }
78
- }
79
- else {
80
- error ? setButtonCondition('error') : setButtonCondition(condition);
81
- }
82
- }, [condition, error]);
83
58
  const iconColorStyle = iconColorFn();
84
- if (!buttonStyle) {
59
+ if (!modeStyle) {
85
60
  return (React.createElement("button", { className: buttonClasses },
86
61
  React.createElement(Typography, { variant: "Body1" }, "\u041A\u043D\u043E\u043F\u043A\u0430")));
87
62
  }
88
- return (React.createElement("button", { className: buttonClasses, style: color && !error ? {
63
+ return (React.createElement("button", { className: buttonClasses, style: Object.assign(Object.assign({}, style), (color && !error ? {
89
64
  '--button-color': color,
90
65
  '--button-hover-color': variant === 'fill' || variant === 'link' ? `color-mix(in srgb, ${color} 90%, black)` : `color-mix(in srgb, ${color} 10%, transparent)`,
91
66
  '--button-active-color': variant === 'fill' || variant === 'link' ? `color-mix(in srgb, ${color} 80%, black)` : `color-mix(in srgb, ${color} 20%, transparent)`,
92
67
  '--button-disabled-color': variant === 'fill' || variant === 'link' ? `color-mix(in srgb, ${color} 80%, white)` : `color-mix(in srgb, ${color} 10%, transparent)`,
93
68
  '--button-disabled-textColor': variant === 'fill' ? `color-mix(in srgb, ${color} 80%, white)` : `color-mix(in srgb, ${color} 50%, transparent)`,
94
- } : {}, onClick: onClick, disabled: disabled, "aria-disabled": disabled, type: type, name: name ? name : label ? `button-${label}` : 'button', form: form },
95
- btnIcon && (buttonStyle === 'icon' || buttonStyle === 'default') && (() => {
69
+ } : {})), onClick: (e) => onClick === null || onClick === void 0 ? void 0 : onClick(e), disabled: disabled, "aria-disabled": disabled, type: type, name: name ? name : label ? `button-${label}` : 'button', form: form },
70
+ btnIcon && (modeStyle === 'icon' || modeStyle === 'default') && (() => {
96
71
  var _a;
97
72
  const iconElement = btnIcon;
98
73
  const defaultStrokeWidth = size === 'lg' ? '0.5' : size === 'md' ? '0.3' : '0.0';
@@ -101,5 +76,5 @@ export const Button = ({ label, variant = 'fill', size = 'md', style, condition,
101
76
  strokeWidth: (_a = iconElement.props.strokeWidth) !== null && _a !== void 0 ? _a : defaultStrokeWidth,
102
77
  });
103
78
  })(),
104
- (buttonStyle === 'text' || buttonStyle === 'default') && (React.createElement(Typography, { variant: "Body1" }, label ? label : typeof children === 'string' && children))));
79
+ (modeStyle === 'text' || modeStyle === 'default') && (React.createElement(Typography, { variant: "Body1" }, label ? label : typeof children === 'string' && children))));
105
80
  };
@@ -129,7 +129,7 @@ export const ColorPicker = ({ color = '#ffffff', mainColor, recentColors, setIsH
129
129
  setIsColorChanged(true);
130
130
  setColorValue(newColor);
131
131
  setSelectedColor(newColor);
132
- onColorChange(newColor);
132
+ onColorChange === null || onColorChange === void 0 ? void 0 : onColorChange(newColor);
133
133
  };
134
134
  return (React.createElement("div", { className: (mainColor || recentColors) && styles.colorPickerWrapper, ref: divRef },
135
135
  mainColor && (React.createElement("div", { className: mainColorClasses, style: {