ar-design 0.2.80 → 0.2.81

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.
@@ -1,4 +1,5 @@
1
1
  .ar-upload-button > .button.multiple > .preview {
2
+ position: relative;
2
3
  display: flex;
3
4
  flex-direction: row;
4
5
  flex-wrap: nowrap;
@@ -26,6 +27,9 @@
26
27
  .ar-upload-button > .button.multiple > .items > .item {
27
28
  --size: 5rem;
28
29
 
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
29
33
  position: relative;
30
34
  min-width: var(--size);
31
35
  min-height: var(--size);
@@ -95,7 +99,7 @@
95
99
  align-items: center;
96
100
  gap: 0.5rem;
97
101
  position: absolute;
98
- inset: auto 7.5rem 0 0;
102
+ inset: auto 0 0 0;
99
103
  background-color: rgba(var(--black-rgb), 0.75);
100
104
  padding: 0.5rem;
101
105
  transition: visibility 250ms, opacity 250ms ease-in-out;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { AllowedTypes, TableColumnType } from "../../../libs/types";
2
+ import { MimeTypes, TableColumnType } from "../../../libs/types";
3
3
  import { IChildren } from "../../../libs/types/IGlobalProps";
4
4
  import { FilterOperator } from "../../../libs/infrastructure/shared/Enums";
5
5
  export type Operator = "Contains" | "DoesNotContains" | "Equals" | "DoesNotEquals" | "BeginsWith" | "EndsWith" | "Blank" | "NotBlank";
@@ -61,7 +61,7 @@ type ImportActionType = {
61
61
  /**
62
62
  * Kabul edilen dosya türleri.
63
63
  */
64
- allowedTypes?: AllowedTypes[];
64
+ allowedTypes?: MimeTypes[];
65
65
  /**
66
66
  * Butonun önünde gösterilecek içerik.
67
67
  */
@@ -15,12 +15,22 @@ const PreviewSelectedFile = ({ selectedFile, handleFileToBase64, handleFileRemov
15
15
  return (selectedFile && (React.createElement("div", { className: "preview" },
16
16
  React.createElement("div", { className: "buttons" },
17
17
  React.createElement("div", null,
18
- React.createElement(Button, { variant: "borderless", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Eye", fill: "currentColor" }) }, onClick: (event) => {
18
+ React.createElement(Button, { variant: "borderless", type: "button", icon: { element: React.createElement(ARIcon, { icon: "Download", fill: "currentColor" }) }, onClick: (event) => {
19
+ event.stopPropagation();
20
+ const url = window.URL.createObjectURL(selectedFile);
21
+ const a = document.createElement("a");
22
+ a.href = url;
23
+ a.download = selectedFile.name;
24
+ a.click();
25
+ // Belleği temizle
26
+ window.URL.revokeObjectURL(url);
27
+ } }),
28
+ React.createElement(Button, { variant: "borderless", type: "button", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Eye", fill: "currentColor" }) }, onClick: (event) => {
19
29
  event.stopPropagation();
20
30
  const newTab = window.open();
21
31
  newTab?.document.write(`<img src="${selectedFileBase64}" title="${selectedFile.name}" alt="${selectedFile.name}" />`);
22
32
  } }),
23
- React.createElement(Button, { variant: "borderless", status: "danger", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Trash", fill: "currentColor" }) }, onClick: (event) => {
33
+ React.createElement(Button, { variant: "borderless", status: "danger", type: "button", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Trash", fill: "currentColor" }) }, onClick: (event) => {
24
34
  event.stopPropagation();
25
35
  handleFileRemove(selectedFile);
26
36
  } }))),
@@ -1,6 +1,7 @@
1
1
  import React, { memo, useEffect, useState } from "react";
2
2
  import Button from "../button";
3
3
  import { ARIcon } from "../../icons";
4
+ import Utils from "../../../libs/infrastructure/shared/Utils";
4
5
  const PreviewSelectedFiles = ({ selectedFiles, validationErrors, handleFileToBase64, handleFileRemove }) => {
5
6
  // states
6
7
  const [items, setItems] = useState([]);
@@ -10,9 +11,10 @@ const PreviewSelectedFiles = ({ selectedFiles, validationErrors, handleFileToBas
10
11
  useEffect(() => {
11
12
  (async () => {
12
13
  const items = await Promise.all(selectedFiles.map(async (selectedFile) => {
14
+ const fileInformation = Utils.GetFileTypeInformation(selectedFile.type);
13
15
  const _selectedFileBase64 = await handleFileToBase64(selectedFile);
14
16
  const message = validationErrors.find((validationError) => validationError.fileName === selectedFile.name)?.message;
15
- return (React.createElement("div", { className: "item", onClick: (event) => event.stopPropagation(), onMouseOver: async (event) => {
17
+ return (React.createElement("div", { className: "item", style: { backgroundColor: fileInformation.color }, onClick: (event) => event.stopPropagation(), onMouseOver: async (event) => {
16
18
  event.stopPropagation();
17
19
  setSelectedFileBase64(await handleFileToBase64(selectedFile));
18
20
  setSelectedFile(selectedFile);
@@ -22,16 +24,26 @@ const PreviewSelectedFiles = ({ selectedFiles, validationErrors, handleFileToBas
22
24
  React.createElement("span", null, message))),
23
25
  React.createElement("div", { className: "buttons" },
24
26
  React.createElement("div", null,
25
- React.createElement(Button, { variant: "borderless", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Eye", fill: "currentColor" }) }, onClick: (event) => {
27
+ React.createElement(Button, { variant: "borderless", type: "button", icon: { element: React.createElement(ARIcon, { icon: "Download", fill: "currentColor" }) }, onClick: (event) => {
28
+ event.stopPropagation();
29
+ const url = window.URL.createObjectURL(selectedFile);
30
+ const a = document.createElement("a");
31
+ a.href = url;
32
+ a.download = selectedFile.name;
33
+ a.click();
34
+ // Belleği temizle
35
+ window.URL.revokeObjectURL(url);
36
+ } }),
37
+ selectedFile.type.includes("image") && (React.createElement(Button, { variant: "borderless", type: "button", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Eye", fill: "currentColor" }) }, onClick: (event) => {
26
38
  event.stopPropagation();
27
39
  const newTab = window.open();
28
40
  newTab?.document.write(`<img src="${_selectedFileBase64}" title="${selectedFile.name}" alt="${selectedFile.name}" />`);
29
- } }),
30
- React.createElement(Button, { variant: "borderless", status: "danger", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Trash", fill: "currentColor" }) }, onClick: (event) => {
41
+ } })),
42
+ React.createElement(Button, { variant: "borderless", status: "danger", type: "button", icon: { element: React.createElement(ARIcon, { variant: "fill", icon: "Trash", fill: "currentColor" }) }, onClick: (event) => {
31
43
  event.stopPropagation();
32
44
  handleFileRemove(selectedFile);
33
45
  } }))),
34
- React.createElement("img", { src: _selectedFileBase64 })));
46
+ selectedFile.type.includes("image") ? (React.createElement("img", { src: _selectedFileBase64 })) : (React.createElement(ARIcon, { icon: fileInformation.icon ?? "Document", fill: "var(--white)", size: 32 }))));
35
47
  }));
36
48
  setItems(items);
37
49
  setSelectedFileBase64(await handleFileToBase64(selectedFiles[0]));
@@ -40,14 +52,14 @@ const PreviewSelectedFiles = ({ selectedFiles, validationErrors, handleFileToBas
40
52
  }, [selectedFiles, validationErrors]);
41
53
  return (selectedFiles.length > 0 && (React.createElement(React.Fragment, null,
42
54
  React.createElement("div", { className: "preview" },
43
- React.createElement("img", { src: selectedFileBase64, className: "selected-image" }),
55
+ selectedFile?.type.includes("image") ? (React.createElement("img", { src: selectedFileBase64, className: "selected-image" })) : ("Önizleme Yok."),
44
56
  selectedFile && (React.createElement("div", { className: "informations" },
45
57
  React.createElement("span", { className: "file-name" }, selectedFile.name),
46
58
  React.createElement("div", null,
47
59
  React.createElement("span", { className: "file-size" },
48
60
  (selectedFile.size / 1024).toFixed(3),
49
61
  React.createElement("span", { className: "size-type" }, "KB")),
50
- React.createElement("span", { className: "file-type" }, selectedFile.type.split("/")[1].toLocaleUpperCase()))))),
62
+ React.createElement("span", { className: "file-type" }, Utils.GetFileTypeInformation(selectedFile.type).readableType))))),
51
63
  React.createElement("div", { className: "items" }, items))));
52
64
  };
53
65
  export default memo(PreviewSelectedFiles);
@@ -1,4 +1,4 @@
1
- import { AllowedTypes } from "../../../libs/types";
1
+ import { MimeTypes } from "../../../libs/types";
2
2
  import { IDisabled, IValidation } from "../../../libs/types/IGlobalProps";
3
3
  interface IMultiple {
4
4
  /**
@@ -97,8 +97,7 @@ type Props = {
97
97
  * <Upload allowedTypes={["image/png", "application/pdf"]} />
98
98
  * ```
99
99
  */
100
- allowedTypes?: AllowedTypes[];
101
- uploadType?: "image" | "application-file";
100
+ allowedTypes?: MimeTypes[];
102
101
  /**
103
102
  * Kabul edilen maksimum dosya boyutu (byte cinsinden).
104
103
  *
@@ -3,7 +3,7 @@ import "../../../assets/css/components/form/upload/styles.css";
3
3
  import { ARIcon } from "../../icons";
4
4
  import PreviewSelectedFile from "./PreviewSelectedFile";
5
5
  import PreviewSelectedFiles from "./PreviewSelectedFiles";
6
- const Upload = ({ text, file, onChange, allowedTypes, uploadType = "application-file", maxSize, multiple, }) => {
6
+ const Upload = ({ text, file, onChange, allowedTypes, maxSize, multiple }) => {
7
7
  // refs
8
8
  const _firstLoad = useRef(false);
9
9
  const _input = useRef(null);
@@ -186,8 +186,7 @@ const Upload = ({ text, file, onChange, allowedTypes, uploadType = "application-
186
186
  if (_input.current)
187
187
  _input.current.click();
188
188
  } },
189
- uploadType === "image" &&
190
- (multiple ? (React.createElement(PreviewSelectedFiles, { selectedFiles: selectedFiles, validationErrors: validationErrors, handleFileToBase64: handleFileToBase64, handleFileRemove: handleFileRemove })) : (React.createElement(PreviewSelectedFile, { selectedFile: selectedFile, handleFileToBase64: handleFileToBase64, handleFileRemove: handleFileRemove }))),
189
+ multiple ? (React.createElement(PreviewSelectedFiles, { selectedFiles: selectedFiles, validationErrors: validationErrors, handleFileToBase64: handleFileToBase64, handleFileRemove: handleFileRemove })) : (React.createElement(PreviewSelectedFile, { selectedFile: selectedFile, handleFileToBase64: handleFileToBase64, handleFileRemove: handleFileRemove })),
191
190
  !selectedFile && selectedFiles.length === 0 && (React.createElement(React.Fragment, null,
192
191
  React.createElement("div", { className: "upload" },
193
192
  React.createElement(ARIcon, { variant: "fill", icon: "CloudUpload", size: 32 }),
@@ -31,6 +31,10 @@ class Icon {
31
31
  return (React.createElement(React.Fragment, null,
32
32
  React.createElement("path", { d: "M3 15C3 17.8284 3 19.2426 3.87868 20.1213C4.75736 21 6.17157 21 9 21H15C17.8284 21 19.2426 21 20.1213 20.1213C21 19.2426 21 17.8284 21 15", stroke: this._stroke, strokeWidth: this._strokeWidth, strokeLinecap: "round", strokeLinejoin: "round" }),
33
33
  React.createElement("path", { d: "M12 3V16M12 16L16 11.625M12 16L8 11.625", stroke: this._stroke, strokeWidth: this._strokeWidth, strokeLinecap: "round", strokeLinejoin: "round" })));
34
+ case "Download":
35
+ return (React.createElement(React.Fragment, null,
36
+ React.createElement("path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5" }),
37
+ React.createElement("path", { d: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z" })));
34
38
  case "Document":
35
39
  return (React.createElement(React.Fragment, null,
36
40
  React.createElement("path", { d: "M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5", stroke: this._stroke, strokeWidth: this._strokeWidth, strokeLinecap: "round", strokeLinejoin: "round" }),
@@ -109,6 +113,37 @@ class Icon {
109
113
  return (React.createElement(React.Fragment, null,
110
114
  React.createElement("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
111
115
  React.createElement("path", { d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z" })));
116
+ case "FileTypeXlsx":
117
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM7.86 14.841a1.13 1.13 0 0 0 .401.823q.195.162.479.252.284.091.665.091.507 0 .858-.158.355-.158.54-.44a1.17 1.17 0 0 0 .187-.656q0-.336-.135-.56a1 1 0 0 0-.375-.357 2 2 0 0 0-.565-.21l-.621-.144a1 1 0 0 1-.405-.176.37.37 0 0 1-.143-.299q0-.234.184-.384.188-.152.513-.152.214 0 .37.068a.6.6 0 0 1 .245.181.56.56 0 0 1 .12.258h.75a1.1 1.1 0 0 0-.199-.566 1.2 1.2 0 0 0-.5-.41 1.8 1.8 0 0 0-.78-.152q-.44 0-.777.15-.336.149-.527.421-.19.273-.19.639 0 .302.123.524t.351.367q.229.143.54.213l.618.144q.31.073.462.193a.39.39 0 0 1 .153.326.5.5 0 0 1-.085.29.56.56 0 0 1-.255.193q-.168.07-.413.07-.176 0-.32-.04a.8.8 0 0 1-.249-.115.58.58 0 0 1-.255-.384zm-3.726-2.909h.893l-1.274 2.007 1.254 1.992h-.908l-.85-1.415h-.035l-.853 1.415H1.5l1.24-2.016-1.228-1.983h.931l.832 1.438h.036zm1.923 3.325h1.697v.674H5.266v-3.999h.791zm7.636-3.325h.893l-1.274 2.007 1.254 1.992h-.908l-.85-1.415h-.035l-.853 1.415h-.861l1.24-2.016-1.228-1.983h.931l.832 1.438h.036z" }));
118
+ case "FileTypeXls":
119
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM6.472 15.29a1.2 1.2 0 0 1-.111-.449h.765a.58.58 0 0 0 .254.384q.106.073.25.114.143.041.319.041.246 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .085-.29.39.39 0 0 0-.153-.326q-.152-.12-.462-.193l-.619-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.19-.272.527-.422.338-.15.777-.149.457 0 .78.152.324.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.247-.181.9.9 0 0 0-.369-.068q-.325 0-.513.152a.47.47 0 0 0-.184.384q0 .18.143.3a1 1 0 0 0 .405.175l.62.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-2.945-3.358h-.893L1.81 13.37h-.036l-.832-1.438h-.93l1.227 1.983L0 15.931h.861l.853-1.415h.035l.85 1.415h.908L2.253 13.94zm2.727 3.325H4.557v-3.325h-.79v4h2.487z" }));
120
+ case "FileTypeCsv":
121
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM3.517 14.841a1.13 1.13 0 0 0 .401.823q.195.162.478.252.284.091.665.091.507 0 .859-.158.354-.158.539-.44.187-.284.187-.656 0-.336-.134-.56a1 1 0 0 0-.375-.357 2 2 0 0 0-.566-.21l-.621-.144a1 1 0 0 1-.404-.176.37.37 0 0 1-.144-.299q0-.234.185-.384.188-.152.512-.152.214 0 .37.068a.6.6 0 0 1 .246.181.56.56 0 0 1 .12.258h.75a1.1 1.1 0 0 0-.2-.566 1.2 1.2 0 0 0-.5-.41 1.8 1.8 0 0 0-.78-.152q-.439 0-.776.15-.337.149-.527.421-.19.273-.19.639 0 .302.122.524.124.223.352.367.228.143.539.213l.618.144q.31.073.463.193a.39.39 0 0 1 .152.326.5.5 0 0 1-.085.29.56.56 0 0 1-.255.193q-.167.07-.413.07-.175 0-.32-.04a.8.8 0 0 1-.248-.115.58.58 0 0 1-.255-.384zM.806 13.693q0-.373.102-.633a.87.87 0 0 1 .302-.399.8.8 0 0 1 .475-.137q.225 0 .398.097a.7.7 0 0 1 .272.26.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964 1.4 1.4 0 0 0-.489-.272 1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223-.375.222-.572.632-.195.41-.196.979v.498q0 .568.193.976.197.407.572.626.375.217.914.217.439 0 .785-.164t.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.8.8 0 0 1-.118.363.7.7 0 0 1-.272.25.9.9 0 0 1-.401.087.85.85 0 0 1-.478-.132.83.83 0 0 1-.299-.392 1.7 1.7 0 0 1-.102-.627zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879z" }));
122
+ case "FileTypeDoc":
123
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-6.839 9.688v-.522a1.5 1.5 0 0 0-.117-.641.86.86 0 0 0-.322-.387.86.86 0 0 0-.469-.129.87.87 0 0 0-.471.13.87.87 0 0 0-.32.386 1.5 1.5 0 0 0-.117.641v.522q0 .384.117.641a.87.87 0 0 0 .32.387.9.9 0 0 0 .471.126.9.9 0 0 0 .469-.126.86.86 0 0 0 .322-.386 1.55 1.55 0 0 0 .117-.642m.803-.516v.513q0 .563-.205.973a1.47 1.47 0 0 1-.589.627q-.381.216-.917.216a1.86 1.86 0 0 1-.92-.216 1.46 1.46 0 0 1-.589-.627 2.15 2.15 0 0 1-.205-.973v-.513q0-.569.205-.975.205-.411.59-.627.386-.22.92-.22.535 0 .916.22.383.219.59.63.204.406.204.972M1 15.925v-3.999h1.459q.609 0 1.005.235.396.233.589.68.196.445.196 1.074 0 .634-.196 1.084-.197.451-.595.689-.396.237-.999.237zm1.354-3.354H1.79v2.707h.563q.277 0 .483-.082a.8.8 0 0 0 .334-.252q.132-.17.196-.422a2.3 2.3 0 0 0 .068-.592q0-.45-.118-.753a.9.9 0 0 0-.354-.454q-.237-.152-.61-.152Zm6.756 1.116q0-.373.103-.633a.87.87 0 0 1 .301-.398.8.8 0 0 1 .475-.138q.225 0 .398.097a.7.7 0 0 1 .273.26.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964 1.4 1.4 0 0 0-.49-.272 1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223-.375.222-.571.633-.197.41-.197.978v.498q0 .568.194.976.195.406.571.627.375.216.914.216.44 0 .785-.164t.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364.7.7 0 0 1-.273.248.9.9 0 0 1-.401.088.85.85 0 0 1-.478-.131.83.83 0 0 1-.298-.393 1.7 1.7 0 0 1-.103-.627zm5.092-1.76h.894l-1.275 2.006 1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015-1.228-1.984h.932l.832 1.439h.035z" }));
124
+ case "FileTypeDocx":
125
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-6.839 9.688v-.522a1.5 1.5 0 0 0-.117-.641.86.86 0 0 0-.322-.387.86.86 0 0 0-.469-.129.87.87 0 0 0-.471.13.87.87 0 0 0-.32.386 1.5 1.5 0 0 0-.117.641v.522q0 .384.117.641a.87.87 0 0 0 .32.387.9.9 0 0 0 .471.126.9.9 0 0 0 .469-.126.86.86 0 0 0 .322-.386 1.55 1.55 0 0 0 .117-.642m.803-.516v.513q0 .563-.205.973a1.47 1.47 0 0 1-.589.627q-.381.216-.917.216a1.86 1.86 0 0 1-.92-.216 1.46 1.46 0 0 1-.589-.627 2.15 2.15 0 0 1-.205-.973v-.513q0-.569.205-.975.205-.411.59-.627.386-.22.92-.22.535 0 .916.22.383.219.59.63.204.406.204.972M1 15.925v-3.999h1.459q.609 0 1.005.235.396.233.589.68.196.445.196 1.074 0 .634-.196 1.084-.197.451-.595.689-.396.237-.999.237zm1.354-3.354H1.79v2.707h.563q.277 0 .483-.082a.8.8 0 0 0 .334-.252q.132-.17.196-.422a2.3 2.3 0 0 0 .068-.592q0-.45-.118-.753a.9.9 0 0 0-.354-.454q-.237-.152-.61-.152Zm6.756 1.116q0-.373.103-.633a.87.87 0 0 1 .301-.398.8.8 0 0 1 .475-.138q.225 0 .398.097a.7.7 0 0 1 .273.26.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964 1.4 1.4 0 0 0-.49-.272 1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223-.375.222-.571.633-.197.41-.197.978v.498q0 .568.194.976.195.406.571.627.375.216.914.216.44 0 .785-.164t.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364.7.7 0 0 1-.273.248.9.9 0 0 1-.401.088.85.85 0 0 1-.478-.131.83.83 0 0 1-.298-.393 1.7 1.7 0 0 1-.103-.627zm5.092-1.76h.894l-1.275 2.006 1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015-1.228-1.984h.932l.832 1.439h.035z" }));
126
+ case "FileTypePdf":
127
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38.57.57 0 0 1-.238.241.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084 0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592 1.1 1.1 0 0 1-.196.422.8.8 0 0 1-.334.252 1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z" }));
128
+ case "FileTypePptx":
129
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.5 11.85h1.6q.434 0 .732.179.302.175.46.477t.158.677-.16.677q-.159.299-.464.474a1.45 1.45 0 0 1-.732.173H2.29v1.342H1.5zm2.06 1.714a.8.8 0 0 0 .085-.381q0-.34-.185-.521-.185-.182-.513-.182h-.659v1.406h.66a.8.8 0 0 0 .374-.082.57.57 0 0 0 .238-.24m1.302-1.714h1.6q.434 0 .732.179.302.175.46.477t.158.677-.16.677q-.158.299-.464.474a1.45 1.45 0 0 1-.732.173h-.803v1.342h-.79zm2.06 1.714a.8.8 0 0 0 .085-.381q0-.34-.185-.521-.184-.182-.513-.182H5.65v1.406h.66a.8.8 0 0 0 .374-.082.57.57 0 0 0 .238-.24m2.852 2.285v-3.337h1.137v-.662H7.846v.662H8.98v3.337zm3.796-3.999h.893l-1.274 2.007 1.254 1.992h-.908l-.85-1.415h-.035l-.853 1.415h-.861l1.24-2.016-1.228-1.983h.931l.832 1.439h.035z" }));
130
+ case "FileTypeZip":
131
+ return (React.createElement(React.Fragment, null,
132
+ React.createElement("path", { d: "M5 7.5a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v.938l.4 1.599a1 1 0 0 1-.416 1.074l-.93.62a1 1 0 0 1-1.11 0l-.929-.62a1 1 0 0 1-.415-1.074L5 8.438zm2 0H6v.938a1 1 0 0 1-.03.243l-.4 1.598.93.62.929-.62-.4-1.598A1 1 0 0 1 7 8.438z" }),
133
+ React.createElement("path", { d: "M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1h-2v1h-1v1h1v1h-1v1h1v1H6V5H5V4h1V3H5V2h1V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z" })));
134
+ case "FileTypeTxt":
135
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V14a2 2 0 0 1-2 2h-2v-1h2a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.928 15.849v-3.337h1.136v-.662H0v.662h1.134v3.337zm4.689-3.999h-.894L4.9 13.289h-.035l-.832-1.439h-.932l1.228 1.983-1.24 2.016h.862l.853-1.415h.035l.85 1.415h.907l-1.253-1.992zm1.93.662v3.337h-.794v-3.337H6.619v-.662h3.064v.662H8.546Z" }));
136
+ case "FileTypeHtml":
137
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-9.736 7.35v3.999h-.791v-1.714H1.79v1.714H1V11.85h.791v1.626h1.682V11.85h.79Zm2.251.662v3.337h-.794v-3.337H4.588v-.662h3.064v.662zm2.176 3.337v-2.66h.038l.952 2.159h.516l.946-2.16h.038v2.661h.715V11.85h-.8l-1.14 2.596H9.93L8.79 11.85h-.805v3.999zm4.71-.674h1.696v.674H12.61V11.85h.79v3.325Z" }));
138
+ case "FileTypeJson":
139
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM4.151 15.29a1.2 1.2 0 0 1-.111-.449h.764a.58.58 0 0 0 .255.384q.105.073.25.114.142.041.319.041.245 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .084-.29.39.39 0 0 0-.152-.326q-.152-.12-.463-.193l-.618-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.352-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.192-.272.528-.422.337-.15.777-.149.456 0 .779.152.326.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.246-.181.9.9 0 0 0-.37-.068q-.324 0-.512.152a.47.47 0 0 0-.185.384q0 .18.144.3a1 1 0 0 0 .404.175l.621.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-3.104-.033a1.3 1.3 0 0 1-.082-.466h.764a.6.6 0 0 0 .074.27.5.5 0 0 0 .454.246q.285 0 .422-.164.137-.165.137-.466v-2.745h.791v2.725q0 .66-.357 1.005-.355.345-.985.345a1.6 1.6 0 0 1-.568-.094 1.15 1.15 0 0 1-.407-.266 1.1 1.1 0 0 1-.243-.39m9.091-1.585v.522q0 .384-.117.641a.86.86 0 0 1-.322.387.9.9 0 0 1-.47.126.9.9 0 0 1-.47-.126.87.87 0 0 1-.32-.387 1.55 1.55 0 0 1-.117-.641v-.522q0-.386.117-.641a.87.87 0 0 1 .32-.387.87.87 0 0 1 .47-.129q.265 0 .47.129a.86.86 0 0 1 .322.387q.117.255.117.641m.803.519v-.513q0-.565-.205-.973a1.46 1.46 0 0 0-.59-.63q-.38-.22-.916-.22-.534 0-.92.22a1.44 1.44 0 0 0-.589.628q-.205.407-.205.975v.513q0 .562.205.973.205.407.589.626.386.217.92.217.536 0 .917-.217.384-.22.589-.626.204-.41.205-.973m1.29-.935v2.675h-.746v-3.999h.662l1.752 2.66h.032v-2.66h.75v4h-.656l-1.761-2.676z" }));
140
+ case "FileTypeXml":
141
+ return (React.createElement("path", { "fill-rule": "evenodd", d: "M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM3.527 11.85h-.893l-.823 1.439h-.036L.943 11.85H.012l1.227 1.983L0 15.85h.861l.853-1.415h.035l.85 1.415h.908l-1.254-1.992zm.954 3.999v-2.66h.038l.952 2.159h.516l.946-2.16h.038v2.661h.715V11.85h-.8l-1.14 2.596h-.025L4.58 11.85h-.806v3.999zm4.71-.674h1.696v.674H8.4V11.85h.791z" }));
142
+ case "CameraReels":
143
+ return (React.createElement(React.Fragment, null,
144
+ React.createElement("path", { d: "M6 3a3 3 0 1 1-6 0 3 3 0 0 1 6 0M1 3a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
145
+ React.createElement("path", { d: "M9 6h.5a2 2 0 0 1 1.983 1.738l3.11-1.382A1 1 0 0 1 16 7.269v7.462a1 1 0 0 1-1.406.913l-3.111-1.382A2 2 0 0 1 9.5 16H2a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2zm6 8.73V7.27l-3.5 1.555v4.35zM1 8v6a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1" }),
146
+ React.createElement("path", { d: "M9 6a3 3 0 1 0 0-6 3 3 0 0 0 0 6M7 3a2 2 0 1 1 4 0 2 2 0 0 1-4 0" })));
112
147
  default:
113
148
  return null;
114
149
  }
@@ -124,6 +159,8 @@ class Icon {
124
159
  React.createElement("path", { d: "M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8m8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7" })));
125
160
  case "ExclamationDiamond":
126
161
  return (React.createElement("path", { d: "M9.05.435c-.58-.58-1.52-.58-2.1 0L.436 6.95c-.58.58-.58 1.519 0 2.098l6.516 6.516c.58.58 1.519.58 2.098 0l6.516-6.516c.58-.58.58-1.519 0-2.098zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2" }));
162
+ case "FileEarmark":
163
+ return (React.createElement("path", { d: "M4 0h5.293A1 1 0 0 1 10 .293L13.707 4a1 1 0 0 1 .293.707V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m5.5 1.5v2a1 1 0 0 0 1 1h2z" }));
127
164
  default:
128
165
  return null;
129
166
  }
@@ -1,9 +1,17 @@
1
- import { Border, Icon, Sizes, Status, Variants } from "../../types";
1
+ import { Border, FileCategory, Icon, Icons, IconVariants, MimeTypes, Sizes, Status, Variants } from "../../types";
2
2
  declare class Utils {
3
3
  GetClassName: (variant?: Variants, status?: Status, border?: Border, size?: Sizes, icon?: Icon, className?: string) => string[];
4
4
  GetCookie: (name: string) => string | null | undefined;
5
5
  GetOS: () => "Windows" | "MacOS" | "UNIX" | "Linux" | "Android" | "iOS" | "Bilinmeyen OS";
6
6
  GetOSShortCutIcons: () => "⌘" | "ctrl" | "";
7
+ GetFileTypeInformation: (mimeType: MimeTypes) => {
8
+ category: FileCategory;
9
+ readableType: string;
10
+ commonExtensions: string[];
11
+ variant?: IconVariants;
12
+ icon?: Icons;
13
+ color?: string;
14
+ };
7
15
  StringFormat: (value: string, ...args: any[]) => string;
8
16
  IsNullOrEmpty: (value: unknown) => boolean;
9
17
  DeepEqual: (obj1: any, obj2: any) => boolean;
@@ -47,6 +47,259 @@ class Utils {
47
47
  return "";
48
48
  }
49
49
  };
50
+ GetFileTypeInformation = (mimeType) => {
51
+ const typeMap = {
52
+ // Images
53
+ "image/jpeg": {
54
+ category: "image",
55
+ readableType: "JPEG Image",
56
+ commonExtensions: [".jpg", ".jpeg"],
57
+ color: "#4CAF50",
58
+ },
59
+ "image/png": {
60
+ category: "image",
61
+ readableType: "PNG Image",
62
+ commonExtensions: [".png"],
63
+ color: "#4CAF50",
64
+ },
65
+ "image/gif": {
66
+ category: "image",
67
+ readableType: "GIF Image",
68
+ commonExtensions: [".gif"],
69
+ color: "#4CAF50",
70
+ },
71
+ "image/webp": {
72
+ category: "image",
73
+ readableType: "WebP Image",
74
+ commonExtensions: [".webp"],
75
+ color: "#4CAF50",
76
+ },
77
+ "image/svg+xml": {
78
+ category: "image",
79
+ readableType: "SVG Vector Image",
80
+ commonExtensions: [".svg"],
81
+ color: "#4CAF50",
82
+ },
83
+ "image/bmp": {
84
+ category: "image",
85
+ readableType: "Bitmap Image",
86
+ commonExtensions: [".bmp"],
87
+ color: "#4CAF50",
88
+ },
89
+ "image/tiff": {
90
+ category: "image",
91
+ readableType: "TIFF Image",
92
+ commonExtensions: [".tiff", ".tif"],
93
+ color: "#4CAF50",
94
+ },
95
+ // Documents
96
+ "application/pdf": {
97
+ category: "document",
98
+ readableType: "PDF Document",
99
+ commonExtensions: [".pdf"],
100
+ icon: "FileTypePdf",
101
+ color: "#F44336",
102
+ },
103
+ "application/msword": {
104
+ category: "document",
105
+ readableType: "Word Document (Legacy)",
106
+ commonExtensions: [".doc"],
107
+ icon: "FileTypeDoc",
108
+ color: "#2196F3",
109
+ },
110
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
111
+ category: "document",
112
+ readableType: "Word Document",
113
+ commonExtensions: [".docx"],
114
+ icon: "FileTypeDocx",
115
+ color: "#2196F3",
116
+ },
117
+ // Spreadsheets
118
+ "application/vnd.ms-excel": {
119
+ category: "spreadsheet",
120
+ readableType: "Excel Spreadsheet (Legacy)",
121
+ commonExtensions: [".xls"],
122
+ icon: "FileTypeXls",
123
+ color: "#4CAF50",
124
+ },
125
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
126
+ category: "spreadsheet",
127
+ readableType: "Excel Spreadsheet",
128
+ commonExtensions: [".xlsx"],
129
+ icon: "FileTypeXlsx",
130
+ color: "#4CAF50",
131
+ },
132
+ "text/csv": {
133
+ category: "spreadsheet",
134
+ readableType: "CSV File",
135
+ commonExtensions: [".csv"],
136
+ icon: "FileTypeCsv",
137
+ color: "#FF9800",
138
+ },
139
+ // Presentations
140
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
141
+ category: "presentation",
142
+ readableType: "PowerPoint Presentation",
143
+ commonExtensions: [".pptx"],
144
+ icon: "FileTypePptx",
145
+ color: "#FF5722",
146
+ },
147
+ // Archives
148
+ "application/zip": {
149
+ category: "archive",
150
+ readableType: "ZIP Archive",
151
+ commonExtensions: [".zip"],
152
+ icon: "FileTypeZip",
153
+ color: "#795548",
154
+ },
155
+ "application/x-rar-compressed": {
156
+ category: "archive",
157
+ readableType: "RAR Archive",
158
+ commonExtensions: [".rar"],
159
+ icon: "FileTypeZip",
160
+ color: "#795548",
161
+ },
162
+ "application/x-7z-compressed": {
163
+ category: "archive",
164
+ readableType: "7-Zip Archive",
165
+ commonExtensions: [".7z"],
166
+ icon: "FileTypeZip",
167
+ color: "#795548",
168
+ },
169
+ "application/gzip": {
170
+ category: "archive",
171
+ readableType: "GZIP Archive",
172
+ commonExtensions: [".gz"],
173
+ icon: "FileTypeZip",
174
+ color: "#795548",
175
+ },
176
+ // Text & Code
177
+ "text/plain": {
178
+ category: "text",
179
+ readableType: "Text File",
180
+ commonExtensions: [".txt"],
181
+ icon: "FileTypeTxt",
182
+ color: "#9E9E9E",
183
+ },
184
+ "text/html": {
185
+ category: "text",
186
+ readableType: "HTML Document",
187
+ commonExtensions: [".html", ".htm"],
188
+ icon: "FileTypeHtml",
189
+ color: "#E91E63",
190
+ },
191
+ "application/json": {
192
+ category: "json",
193
+ readableType: "JSON File",
194
+ commonExtensions: [".json"],
195
+ icon: "FileTypeJson",
196
+ color: "#FFC107",
197
+ },
198
+ "application/xml": {
199
+ category: "xml",
200
+ readableType: "XML File",
201
+ commonExtensions: [".xml"],
202
+ icon: "FileTypeXml",
203
+ color: "#FFC107",
204
+ },
205
+ // Video
206
+ "video/mp4": {
207
+ category: "video",
208
+ readableType: "MP4 Video",
209
+ commonExtensions: [".mp4"],
210
+ icon: "CameraReels",
211
+ color: "#673AB7",
212
+ },
213
+ "video/quicktime": {
214
+ category: "video",
215
+ readableType: "QuickTime Video",
216
+ commonExtensions: [".mov"],
217
+ icon: "CameraReels",
218
+ color: "#673AB7",
219
+ },
220
+ "video/x-msvideo": {
221
+ category: "video",
222
+ readableType: "AVI Video",
223
+ commonExtensions: [".avi"],
224
+ icon: "CameraReels",
225
+ color: "#673AB7",
226
+ },
227
+ "video/x-matroska": {
228
+ category: "video",
229
+ readableType: "MKV Video",
230
+ commonExtensions: [".mkv"],
231
+ icon: "CameraReels",
232
+ color: "#673AB7",
233
+ },
234
+ "video/webm": {
235
+ category: "video",
236
+ readableType: "WebM Video",
237
+ commonExtensions: [".webm"],
238
+ icon: "CameraReels",
239
+ color: "#673AB7",
240
+ },
241
+ "video/x-flv": {
242
+ category: "video",
243
+ readableType: "FLV Video",
244
+ commonExtensions: [".flv"],
245
+ icon: "CameraReels",
246
+ color: "#673AB7",
247
+ },
248
+ // Audio
249
+ "audio/mpeg": {
250
+ category: "audio",
251
+ readableType: "MP3 Audio",
252
+ commonExtensions: [".mp3"],
253
+ icon: "CameraReels",
254
+ color: "#3F51B5",
255
+ },
256
+ "audio/wav": {
257
+ category: "audio",
258
+ readableType: "WAV Audio",
259
+ commonExtensions: [".wav"],
260
+ icon: "CameraReels",
261
+ color: "#3F51B5",
262
+ },
263
+ "audio/ogg": {
264
+ category: "audio",
265
+ readableType: "OGG Audio",
266
+ commonExtensions: [".ogg"],
267
+ icon: "CameraReels",
268
+ color: "#3F51B5",
269
+ },
270
+ "audio/aac": {
271
+ category: "audio",
272
+ readableType: "AAC Audio",
273
+ commonExtensions: [".aac"],
274
+ icon: "CameraReels",
275
+ color: "#3F51B5",
276
+ },
277
+ "audio/flac": {
278
+ category: "audio",
279
+ readableType: "FLAC Audio",
280
+ commonExtensions: [".flac"],
281
+ icon: "CameraReels",
282
+ color: "#3F51B5",
283
+ },
284
+ // Binary/Other
285
+ "application/octet-stream": {
286
+ category: "binary",
287
+ readableType: "Binary File",
288
+ commonExtensions: [],
289
+ icon: "FileEarmark",
290
+ variant: "fill",
291
+ color: "#607D8B",
292
+ },
293
+ };
294
+ return (typeMap[mimeType] || {
295
+ category: "other",
296
+ readableType: "Unknown File Type",
297
+ commonExtensions: [],
298
+ variant: "fill",
299
+ icon: "FileEarmark",
300
+ color: "#9E9E9E",
301
+ });
302
+ };
50
303
  StringFormat = (value, ...args) => {
51
304
  if (args[0].length === 0)
52
305
  return value;
@@ -67,9 +67,10 @@ export type ValidationProperties<T> = {
67
67
  export type Errors<TData> = Partial<{
68
68
  [key in keyof TData]: string;
69
69
  }>;
70
- export type AllowedTypes = "image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/bmp" | "image/tiff" | "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/zip" | "application/x-rar-compressed" | "application/x-7z-compressed" | "application/gzip" | "application/json" | "application/xml" | "text/plain" | "text/csv" | "text/html" | "video/mp4" | "video/quicktime" | "video/x-msvideo" | "video/x-matroska" | "video/webm" | "video/x-flv" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "application/octet-stream";
70
+ export type MimeTypes = "image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/bmp" | "image/tiff" | "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/zip" | "application/x-rar-compressed" | "application/x-7z-compressed" | "application/gzip" | "application/json" | "application/xml" | "text/plain" | "text/csv" | "text/html" | "video/mp4" | "video/quicktime" | "video/x-msvideo" | "video/x-matroska" | "video/webm" | "video/x-flv" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "application/octet-stream";
71
+ export type FileCategory = "image" | "document" | "spreadsheet" | "presentation" | "archive" | "text" | "video" | "audio" | "json" | "xml" | "binary" | "other";
71
72
  export type IconVariants = "linear" | "fill";
72
- export type Icons = "Add" | "ArrowLeft" | "ArrowRight" | "Bold" | "BulletList" | "CloseCircle" | "CloseSquare" | "CloudUpload" | "Document" | "Drive" | "ExclamationCircle" | "ExclamationDiamond" | "Eye" | "File" | "Filter" | "Folder" | "Image" | "Import" | "Italic" | "NumberList" | "Strikethrough" | "Success" | "TextAlingCenter" | "TextAlingLeft" | "TextAlingRight" | "TickCircle" | "Trash" | "Underline" | "Upload" | "Warning";
73
+ export type Icons = "Add" | "ArrowLeft" | "ArrowRight" | "Bold" | "BulletList" | "CloseCircle" | "CloseSquare" | "CloudUpload" | "Document" | "Drive" | "ExclamationCircle" | "ExclamationDiamond" | "Eye" | "File" | "Filter" | "Folder" | "Image" | "Import" | "Italic" | "NumberList" | "Strikethrough" | "Success" | "TextAlingCenter" | "TextAlingLeft" | "TextAlingRight" | "TickCircle" | "Trash" | "Underline" | "Upload" | "Download" | "Warning" | "FileTypeXlsx" | "FileTypeXls" | "FileTypeCsv" | "FileTypeDoc" | "FileTypeDocx" | "FileTypePdf" | "FileTypePptx" | "FileTypeZip" | "FileTypeTxt" | "FileTypeHtml" | "FileTypeJson" | "FileTypeXml" | "CameraReels" | "FileEarmark";
73
74
  export type PieChartDataType = {
74
75
  value: number;
75
76
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.80",
3
+ "version": "0.2.81",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",