@true-engineering/true-react-common-ui-kit 3.22.0 → 3.24.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.
Files changed (62) hide show
  1. package/README.md +12 -0
  2. package/dist/components/DatePicker/types.d.ts +1 -1
  3. package/dist/components/FileInput/FileInput.d.ts +25 -0
  4. package/dist/components/FileInput/FileInput.stories.d.ts +7 -0
  5. package/dist/components/FileInput/FileInput.styles.d.ts +3 -0
  6. package/dist/components/FileInput/helpers.d.ts +2 -0
  7. package/dist/components/FileInput/index.d.ts +2 -0
  8. package/dist/components/FileItem/FileItem.d.ts +31 -0
  9. package/dist/components/FileItem/FileItem.stories.d.ts +8 -0
  10. package/dist/components/FileItem/FileItem.styles.d.ts +11 -0
  11. package/dist/components/FileItem/constants.d.ts +5 -0
  12. package/dist/components/FileItem/helpers.d.ts +4 -0
  13. package/dist/components/FileItem/index.d.ts +4 -0
  14. package/dist/components/FileItem/types.d.ts +8 -0
  15. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +1 -1
  16. package/dist/components/Icon/complexIcons/icons.d.ts +7 -0
  17. package/dist/components/Icon/helpers.d.ts +1 -1
  18. package/dist/components/Icon/icons-list.d.ts +1 -1
  19. package/dist/components/Input/Input.styles.d.ts +1 -1
  20. package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +1 -1
  21. package/dist/components/Notification/Notification.styles.d.ts +1 -1
  22. package/dist/components/SearchInput/SearchInput.stories.d.ts +1 -1
  23. package/dist/components/Select/Select.styles.d.ts +3 -3
  24. package/dist/components/TextArea/TextArea.styles.d.ts +1 -1
  25. package/dist/components/Toaster/Toaster.styles.d.ts +1 -1
  26. package/dist/components/index.d.ts +2 -0
  27. package/dist/constants/index.d.ts +1 -0
  28. package/dist/constants/mime-types.d.ts +76 -0
  29. package/dist/theme/types.d.ts +3 -1
  30. package/dist/true-react-common-ui-kit.js +16134 -15469
  31. package/dist/true-react-common-ui-kit.js.map +1 -1
  32. package/dist/true-react-common-ui-kit.umd.cjs +16135 -15471
  33. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  34. package/package.json +3 -2
  35. package/src/components/DatePicker/DatePicker.tsx +2 -0
  36. package/src/components/DatePicker/types.ts +1 -0
  37. package/src/components/FileInput/FileInput.stories.tsx +75 -0
  38. package/src/components/FileInput/FileInput.styles.ts +80 -0
  39. package/src/components/FileInput/FileInput.tsx +147 -0
  40. package/src/components/FileInput/helpers.ts +6 -0
  41. package/src/components/FileInput/index.ts +2 -0
  42. package/src/components/FileItem/FileItem.stories.tsx +63 -0
  43. package/src/components/FileItem/FileItem.styles.ts +122 -0
  44. package/src/components/FileItem/FileItem.tsx +157 -0
  45. package/src/components/FileItem/constants.ts +29 -0
  46. package/src/components/FileItem/helpers.ts +27 -0
  47. package/src/components/FileItem/index.ts +4 -0
  48. package/src/components/FileItem/types.ts +11 -0
  49. package/src/components/Icon/complexIcons/fileExcel.svg +11 -0
  50. package/src/components/Icon/complexIcons/fileImage.svg +13 -0
  51. package/src/components/Icon/complexIcons/fileOther.svg +10 -0
  52. package/src/components/Icon/complexIcons/filePdf.svg +11 -0
  53. package/src/components/Icon/complexIcons/fileWord.svg +11 -0
  54. package/src/components/Icon/complexIcons/fileXml.svg +13 -0
  55. package/src/components/Icon/complexIcons/fileZip.svg +16 -0
  56. package/src/components/Icon/complexIcons/icons.ts +14 -0
  57. package/src/components/Icon/icons-list.ts +8 -0
  58. package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.ts +3 -2
  59. package/src/components/index.ts +2 -0
  60. package/src/constants/index.ts +1 -0
  61. package/src/constants/mime-types.ts +77 -0
  62. package/src/theme/types.ts +4 -0
@@ -0,0 +1,29 @@
1
+ import { mimeTypes } from '../../constants';
2
+ import { IComplexIcon } from '../Icon';
3
+ import { type IFileIcon } from './types';
4
+
5
+ export const FILE_ICONS = [
6
+ 'file-excel',
7
+ 'file-image',
8
+ 'file-pdf',
9
+ 'file-word',
10
+ 'file-xml',
11
+ 'file-zip',
12
+ 'file-other',
13
+ ] satisfies IComplexIcon[];
14
+
15
+ export const FILE_ICON_DEFAULT: IFileIcon = 'file-other';
16
+
17
+ export const iconTypeMap: Record<string, IFileIcon> = {
18
+ [mimeTypes.xls]: 'file-excel',
19
+ [mimeTypes.xlsx]: 'file-excel',
20
+ [mimeTypes.jpeg]: 'file-image',
21
+ [mimeTypes.png]: 'file-image',
22
+ [mimeTypes.pdf]: 'file-pdf',
23
+ [mimeTypes.doc]: 'file-word',
24
+ [mimeTypes.docx]: 'file-word',
25
+ [mimeTypes.xml]: 'file-xml',
26
+ [mimeTypes.zip]: 'file-zip',
27
+ };
28
+
29
+ export const FILE_ITEM_SIZES = ['m', 'l'] as const;
@@ -0,0 +1,27 @@
1
+ import { isNotEmpty } from '@true-engineering/true-react-platform-helpers';
2
+ import { IMimeType, mimeTypes } from '../../constants';
3
+ import { FILE_ICON_DEFAULT, iconTypeMap } from './constants';
4
+ import { IFileIcon, IFileInfo } from './types';
5
+
6
+ export const getFileExtensionByFilename = (fileName: string): string | undefined => {
7
+ const splitFileName = fileName.split('.');
8
+ return splitFileName.length > 1 ? splitFileName.pop() : undefined;
9
+ };
10
+
11
+ export const getMimeTypeByFilename = (fileName: string): string | undefined => {
12
+ const ext = getFileExtensionByFilename(fileName);
13
+ return isNotEmpty(ext) ? mimeTypes[ext as IMimeType] : undefined;
14
+ };
15
+
16
+ export const getFileIcon = ({ type, name }: IFileInfo): IFileIcon => {
17
+ if (isNotEmpty(type) && type in iconTypeMap) {
18
+ return iconTypeMap[type];
19
+ }
20
+
21
+ const mimeType = getMimeTypeByFilename(name);
22
+ if (isNotEmpty(mimeType) && mimeType in iconTypeMap) {
23
+ return iconTypeMap[mimeType];
24
+ }
25
+
26
+ return FILE_ICON_DEFAULT;
27
+ };
@@ -0,0 +1,4 @@
1
+ export * from './FileItem';
2
+ export * from './types';
3
+ export * from './helpers';
4
+ export type { IFileItemStyles } from './FileItem.styles';
@@ -0,0 +1,11 @@
1
+ import { FILE_ICONS, FILE_ITEM_SIZES } from './constants';
2
+
3
+ export interface IFileInfo {
4
+ name: File['name'];
5
+ type?: File['type'];
6
+ size?: File['size'];
7
+ }
8
+
9
+ export type IFileIcon = (typeof FILE_ICONS)[number];
10
+
11
+ export type IFileItemSize = (typeof FILE_ITEM_SIZES)[number];
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <rect width="20" height="20" rx="4" fill="#21A366"/>
3
+ <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16081)" style="mix-blend-mode:overlay"/>
4
+ <path d="M8.00342 14.5244L10.0728 11.3062L12.1357 14.5244H14.4019L11.2217 9.73828L14.1162 5.21875H11.939L10.1108 8.2085L8.24463 5.21875H6.04834L8.93018 9.66846L5.75 14.5244H8.00342Z" fill="white"/>
5
+ <defs>
6
+ <linearGradient id="paint0_linear_0_16081" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">
7
+ <stop stop-color="white" stop-opacity="0.245559"/>
8
+ <stop offset="1" stop-opacity="0.498578"/>
9
+ </linearGradient>
10
+ </defs>
11
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <rect width="20" height="20" rx="4" fill="#FF991F"/>
3
+ <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16103)" style="mix-blend-mode:overlay"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M3.90113 15C3.09595 15 2.62093 14.097 3.07709 13.4335L6.67606 8.19861C7.07341 7.62064 7.9268 7.62065 8.32414 8.19861L13.0001 15H3.90113Z" fill="white"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.53962 15L12.7076 10.2481C13.1034 9.65434 13.9758 9.65434 14.3717 10.2481L16.5031 13.4453C16.9462 14.1099 16.4698 15 15.6711 15H9.53962Z" fill="white"/>
6
+ <path d="M16.0001 5.5C16.0001 6.32843 15.3285 7 14.5001 7C13.6717 7 13.0001 6.32843 13.0001 5.5C13.0001 4.67157 13.6717 4 14.5001 4C15.3285 4 16.0001 4.67157 16.0001 5.5Z" fill="white"/>
7
+ <defs>
8
+ <linearGradient id="paint0_linear_0_16103" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">
9
+ <stop stop-color="white" stop-opacity="0.245559"/>
10
+ <stop offset="1" stop-opacity="0.498578"/>
11
+ </linearGradient>
12
+ </defs>
13
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 6.60751L11.392 -0.000488281L5 0.000113437C3.34315 0.000113437 2 1.34326 2 3.00011V17.0001C2 18.657 3.34315 20.0001 5 20.0001H15C16.6569 20.0001 18 18.657 18 17.0001V6.60751ZM17 8.00011L10 1.00011V6.00011C10 7.10468 10.8954 8.00011 12 8.00011H17Z" fill="#AABFFC"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 6.60751L11.392 -0.000488281L5 0.000113437C3.34315 0.000113437 2 1.34326 2 3.00011V17.0001C2 18.657 3.34315 20.0001 5 20.0001H15C16.6569 20.0001 18 18.657 18 17.0001V6.60751ZM17 8.00011L10 1.00011V6.00011C10 7.10468 10.8954 8.00011 12 8.00011H17Z" fill="url(#paint0_linear_0_16113)" style="mix-blend-mode:overlay"/>
4
+ <defs>
5
+ <linearGradient id="paint0_linear_0_16113" x1="-5.9615" y1="9.95168" x2="13.4572" y2="25.4862" gradientUnits="userSpaceOnUse">
6
+ <stop stop-color="white" stop-opacity="0.245559"/>
7
+ <stop offset="1" stop-opacity="0.498578"/>
8
+ </linearGradient>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <rect width="20" height="20" rx="4" fill="#FF5630"/>
3
+ <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16087)" style="mix-blend-mode:overlay"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.55535 13.6488V11.0388H4.92535C5.65535 11.0388 5.93535 10.9988 6.27535 10.8688C6.97535 10.5988 7.36535 9.92876 7.36535 8.99876C7.36535 8.21876 7.07535 7.57876 6.57535 7.25876C6.27535 7.06876 5.82535 6.97876 5.09535 6.97876H2.98535V13.6488H4.55535ZM4.84535 9.90876H4.54535V8.10876H4.84535C5.51535 8.10876 5.75535 8.34876 5.75535 9.02876C5.75535 9.66876 5.51535 9.90876 4.84535 9.90876ZM11.6393 13.4388C11.2793 13.5988 10.9993 13.6488 10.4393 13.6488H8.21935V6.97876H10.2593C11.2393 6.97876 11.7193 7.11876 12.1093 7.52876C12.5993 8.02876 12.7693 8.71876 12.7693 10.1388C12.7693 10.9388 12.7093 11.6788 12.6093 12.1588C12.4893 12.7388 12.1193 13.2188 11.6393 13.4388ZM10.0793 12.5188H9.79935V8.10876H10.0193C10.9713 8.10876 11.1466 8.35839 11.1586 9.95112L11.1593 10.1488C11.1593 12.2088 11.0193 12.5188 10.0793 12.5188ZM15.3333 10.8188V13.6488H13.7533V6.97876H17.6033V8.23876H15.3333V9.58876H17.4433V10.8188H15.3333Z" fill="white"/>
5
+ <defs>
6
+ <linearGradient id="paint0_linear_0_16087" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">
7
+ <stop stop-color="white" stop-opacity="0.245559"/>
8
+ <stop offset="1" stop-opacity="0.498578"/>
9
+ </linearGradient>
10
+ </defs>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <rect width="20" height="20" rx="4" fill="#2C7CD3"/>
3
+ <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16075)" style="mix-blend-mode:overlay"/>
4
+ <path d="M8.0542 14.9946L9.90137 8.0376L11.7549 14.9946H13.748L16.0078 5.68896H14.1162L12.688 12.189L11.0566 5.68896H8.82227L7.12109 12.0811L5.71826 5.68896H3.79492L6.0166 14.9946H8.0542Z" fill="white"/>
5
+ <defs>
6
+ <linearGradient id="paint0_linear_0_16075" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">
7
+ <stop stop-color="white" stop-opacity="0.245559"/>
8
+ <stop offset="1" stop-opacity="0.498578"/>
9
+ </linearGradient>
10
+ </defs>
11
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <rect width="20" height="20" rx="4" fill="#FF991F"/>
3
+ <rect width="20" height="20" rx="4" fill="url(#paint0_linear_2163_24057)" style="mix-blend-mode:overlay"/>
4
+ <path d="M1.97561 5.99658L3.56111 9.43008L1.84961 13.0001H3.66611L4.21211 11.6771C4.40111 11.0996 4.45361 10.8791 4.49561 10.6166H4.52711C4.54811 10.8686 4.61111 11.1101 4.77911 11.5826L5.34611 13.0001H7.20461L5.49311 9.44058L7.07861 5.99658H5.28311L4.86311 7.06758C4.85261 7.08858 4.83161 7.16208 4.80011 7.25658C4.75811 7.44558 4.70561 7.63458 4.65311 7.82358C4.60061 8.02308 4.57961 8.10708 4.56911 8.23308H4.52711C4.49561 8.02308 4.43261 7.78158 4.27511 7.23558L3.82361 5.99658H1.97561Z" fill="white"/>
5
+ <path d="M7.53437 5.99658V13.0001H9.05687V9.78708L9.02537 9.34608L8.98337 8.41158C8.98337 8.33808 8.96237 8.00208 8.92037 7.47708H8.98337C9.05687 7.90758 9.10937 8.21208 9.18287 8.53758C9.24587 8.87358 9.34037 9.28308 9.44537 9.77658L10.1804 13.0001H11.3984L12.1544 9.59808C12.2909 8.98908 12.5324 7.79208 12.5744 7.47708H12.6374C12.6059 7.80258 12.5849 8.01258 12.5744 8.22258L12.5534 8.98908C12.5429 9.25158 12.5324 9.52458 12.5219 9.80808V13.0001H14.0444V5.99658H11.6714L11.2409 8.10708C11.0834 8.74758 10.8419 10.3751 10.8419 10.8161L10.7999 10.8266C10.7894 10.2911 10.5269 8.61108 10.3274 7.85508L9.92837 5.99658H7.53437Z" fill="white"/>
6
+ <path d="M14.8685 5.99658V13.0001H18.89V11.6666H16.5275V5.99658H14.8685Z" fill="white"/>
7
+ <defs>
8
+ <linearGradient id="paint0_linear_2163_24057" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">
9
+ <stop stop-color="white" stop-opacity="0.245559"/>
10
+ <stop offset="1" stop-opacity="0.498578"/>
11
+ </linearGradient>
12
+ </defs>
13
+ </svg>
@@ -0,0 +1,16 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
2
+ <g clip-path="url(#clip0_922_22603)">
3
+ <path d="M16 0H4C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0Z" fill="#A1D237"/>
4
+ <path d="M16 0H4C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0Z" fill="url(#paint0_linear_922_22603)" style="mix-blend-mode:overlay"/>
5
+ <path d="M8.32086 14V12.6807H6.32086C5.92513 12.6807 5.72193 12.6927 5.58289 12.7166C5.64706 12.6207 5.68984 12.5367 5.73262 12.4528C5.7861 12.3568 5.83957 12.2609 5.89305 12.1529L8.28877 7.22339V6H4.17112V7.31934H6.20321C6.39572 7.31934 6.59893 7.30735 6.69519 7.29535C6.58824 7.47526 6.49198 7.65517 6.41711 7.81109L4 12.8246V14H8.32086ZM10.4813 14V6H9.03743V14H10.4813ZM12.9519 14V10.8096H13.4439C14.2139 10.8096 14.5241 10.7616 14.877 10.6057C15.5936 10.2699 16 9.47826 16 8.38681C16 7.45127 15.6898 6.69565 15.1444 6.32384C14.8342 6.09595 14.3743 6 13.6364 6H11.508V14H12.9519ZM13.4118 9.6102H12.9519V7.1994H13.3797C13.7219 7.1994 13.9679 7.24738 14.107 7.34333C14.385 7.53523 14.5241 7.87106 14.5241 8.38681C14.5241 8.91454 14.4064 9.25037 14.1497 9.44228C13.9893 9.57421 13.8075 9.6102 13.4118 9.6102Z" fill="white"/>
6
+ </g>
7
+ <defs>
8
+ <linearGradient id="paint0_linear_922_22603" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">
9
+ <stop stop-color="white" stop-opacity="0.245559"/>
10
+ <stop offset="1" stop-opacity="0.498578"/>
11
+ </linearGradient>
12
+ <clipPath id="clip0_922_22603">
13
+ <rect width="20" height="20" fill="white"/>
14
+ </clipPath>
15
+ </defs>
16
+ </svg>
@@ -1,5 +1,19 @@
1
1
  import avatarGreen from './avatarGreen.svg?raw';
2
+ import fileExcel from './fileExcel.svg?raw';
3
+ import fileImage from './fileImage.svg?raw';
4
+ import fileOther from './fileOther.svg?raw';
5
+ import filePdf from './filePdf.svg?raw';
6
+ import fileWord from './fileWord.svg?raw';
7
+ import fileXml from './fileXml.svg?raw';
8
+ import fileZip from './fileZip.svg?raw';
2
9
 
3
10
  export const complexIcons = {
4
11
  avatar: avatarGreen,
12
+ 'file-excel': fileExcel,
13
+ 'file-image': fileImage,
14
+ 'file-other': fileOther,
15
+ 'file-pdf': filePdf,
16
+ 'file-word': fileWord,
17
+ 'file-xml': fileXml,
18
+ 'file-zip': fileZip,
5
19
  };
@@ -845,4 +845,12 @@ export const iconsList = checkIcons({
845
845
  },
846
846
  ],
847
847
  },
848
+ upload: {
849
+ viewBox: '0 0 20 20',
850
+ paths: [
851
+ {
852
+ d: 'M9.29313 2.29326L6.29313 5.29326C5.90212 5.68426 5.90212 6.31626 6.29313 6.70726C6.68412 7.09826 7.31612 7.09826 7.70713 6.70726L9.00012 5.41426V13.0003C9.00012 13.5533 9.44812 14.0003 10.0001 14.0003C10.5521 14.0003 11.0001 13.5533 11.0001 13.0003V5.41426L12.2931 6.70726C12.6841 7.09826 13.3161 7.09826 13.7071 6.70726C13.9021 6.51226 14.0001 6.25626 14.0001 6.00026C14.0001 5.74426 13.9021 5.48826 13.7071 5.29326L10.7071 2.29326C10.3161 1.90226 9.68412 1.90226 9.29313 2.29326ZM18 14C17.4477 14 17 14.4477 17 15V15C17 15.5129 16.614 15.9356 16.1166 15.9933L16 16H4C3.48716 16 3.06449 15.614 3.00673 15.1167L3 15V15C3 14.4477 2.55228 14 2 14C1.44772 14 1 14.4477 1 15V15C1 16.5977 2.24892 17.9037 3.82373 17.995L4 18H16C17.5977 18 18.9037 16.7511 18.9949 15.1763L18.9983 15.0587C18.9994 15.0393 19 15.0197 19 15C19 14.4477 18.5523 14 18 14Z',
853
+ },
854
+ ],
855
+ },
848
856
  });
@@ -4,6 +4,7 @@ export const useStyles = createThemedStyles('DotsPreloader', {
4
4
  root: {
5
5
  display: 'flex',
6
6
  gap: 4,
7
+ '--dot-size': '8px',
7
8
 
8
9
  '&::before, &::after': {
9
10
  content: '""',
@@ -40,8 +41,8 @@ export const useStyles = createThemedStyles('DotsPreloader', {
40
41
  animationIterationCount: 'infinite',
41
42
  animationName: '$FadedDots',
42
43
  borderRadius: '50%',
43
- height: 8,
44
- width: 8,
44
+ width: 'var(--dot-size)',
45
+ height: 'var(--dot-size)',
45
46
  backgroundColor: 'currentColor',
46
47
  },
47
48
 
@@ -8,6 +8,8 @@ export * from './CssBaseline';
8
8
  export * from './DateInput';
9
9
  export * from './DatePicker';
10
10
  export * from './Description';
11
+ export * from './FileInput';
12
+ export * from './FileItem';
11
13
  export * from './FiltersPane';
12
14
  export * from './Flag';
13
15
  export * from './FlexibleTable';
@@ -1 +1,2 @@
1
1
  export * from './phone-info';
2
+ export * from './mime-types';
@@ -0,0 +1,77 @@
1
+ export const mimeTypes = {
2
+ aac: 'audio/aac',
3
+ abw: 'application/x-abiword',
4
+ arc: 'application/x-freearc',
5
+ avi: 'video/x-msvideo',
6
+ azw: 'application/vnd.amazon.ebook',
7
+ bin: 'application/octet-stream',
8
+ bmp: 'image/bmp',
9
+ bz: 'application/x-bzip',
10
+ bz2: 'application/x-bzip2',
11
+ csh: 'application/x-csh',
12
+ css: 'text/css',
13
+ csv: 'text/csv',
14
+ doc: 'application/msword',
15
+ docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
16
+ eot: 'application/vnd.ms-fontobject',
17
+ epub: 'application/epub+zip',
18
+ gz: 'application/gzip',
19
+ gif: 'image/gif',
20
+ htm: 'text/html',
21
+ html: 'text/html',
22
+ ico: 'image/vnd.microsoft.icon',
23
+ ics: 'text/calendar',
24
+ jar: 'application/java-archive',
25
+ jpeg: 'image/jpeg',
26
+ jpg: 'image/jpeg',
27
+ js: 'text/javascript',
28
+ json: 'application/json',
29
+ jsonld: 'application/ld+json',
30
+ mid: '.midi',
31
+ mjs: 'text/javascript',
32
+ mp3: 'audio/mpeg',
33
+ mpeg: 'video/mpeg',
34
+ mpkg: 'application/vnd.apple.installer+xml',
35
+ odp: 'application/vnd.oasis.opendocument.presentation',
36
+ ods: 'application/vnd.oasis.opendocument.spreadsheet',
37
+ odt: 'application/vnd.oasis.opendocument.text',
38
+ oga: 'audio/ogg',
39
+ ogv: 'video/ogg',
40
+ ogx: 'application/ogg',
41
+ opus: 'audio/opus',
42
+ otf: 'font/otf',
43
+ png: 'image/png',
44
+ pdf: 'application/pdf',
45
+ php: 'application/php',
46
+ ppt: 'application/vnd.ms-powerpoint',
47
+ pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
48
+ rar: 'application/vnd.rar',
49
+ rtf: 'application/rtf',
50
+ sh: 'application/x-sh',
51
+ svg: 'image/svg+xml',
52
+ swf: 'application/x-shockwave-flash',
53
+ tar: 'application/x-tar',
54
+ tif: 'image/tiff',
55
+ tiff: 'image/tiff',
56
+ ts: 'video/mp2t',
57
+ ttf: 'font/ttf',
58
+ txt: 'text/plain',
59
+ vsd: 'application/vnd.visio',
60
+ wav: 'audio/wav',
61
+ weba: 'audio/webm',
62
+ webm: 'video/webm',
63
+ webp: 'image/webp',
64
+ woff: 'font/woff',
65
+ woff2: 'font/woff2',
66
+ xhtml: 'application/xhtml+xml',
67
+ xls: 'application/vnd.ms-excel',
68
+ xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
69
+ xml: 'XML',
70
+ xul: 'application/vnd.mozilla.xul+xml',
71
+ zip: 'application/zip',
72
+ '3gp': 'video/3gpp',
73
+ '3g2': 'video/3gpp2',
74
+ '7z': 'application/x-7z-compressed',
75
+ } as const;
76
+
77
+ export type IMimeType = keyof typeof mimeTypes;
@@ -60,6 +60,8 @@ import type {
60
60
  ITooltipStyles,
61
61
  IWithPopupStyles,
62
62
  INewMoreMenuStyles,
63
+ IFileInputStyles,
64
+ IFileItemStyles,
63
65
  } from '../components';
64
66
 
65
67
  export type IStyles<C extends string, P> = Styles<C, P, Partial<Styles<C, P>>>;
@@ -88,6 +90,8 @@ export interface IComponentStyles {
88
90
  Description: IDescriptionStyles;
89
91
  DotsPreloader: IDotsPreloaderStyles;
90
92
  SvgPreloader: ISvgPreloaderStyles;
93
+ FileInput: IFileInputStyles;
94
+ FileItem: IFileItemStyles;
91
95
  FilterValueView: IFilterValueViewStyles;
92
96
  FiltersPane: IFiltersPaneStyles;
93
97
  FilterInterval: IFilterIntervalStyles;