@powerhousedao/document-engineering 1.23.0 → 1.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.
- package/dist/src/ui/components/data-entry/file-input/file-input.d.ts +5 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.js +55 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/index.d.ts +3 -0
- package/dist/src/ui/components/data-entry/file-input/index.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/index.js +2 -0
- package/dist/src/ui/components/data-entry/file-input/index.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/sub-components/file-upload-item.d.ts +16 -0
- package/dist/src/ui/components/data-entry/file-input/sub-components/file-upload-item.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/sub-components/file-upload-item.js +13 -0
- package/dist/src/ui/components/data-entry/file-input/sub-components/file-upload-item.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/types.d.ts +9 -0
- package/dist/src/ui/components/data-entry/file-input/types.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/types.js +2 -0
- package/dist/src/ui/components/data-entry/file-input/types.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/utils.d.ts +10 -0
- package/dist/src/ui/components/data-entry/file-input/utils.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/utils.js +41 -0
- package/dist/src/ui/components/data-entry/file-input/utils.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/index.d.ts +3 -0
- package/dist/src/ui/components/data-entry/phone-number-input/index.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/index.js +2 -0
- package/dist/src/ui/components/data-entry/phone-number-input/index.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.d.ts +5 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.js +38 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/types.d.ts +14 -0
- package/dist/src/ui/components/data-entry/phone-number-input/types.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/types.js +2 -0
- package/dist/src/ui/components/data-entry/phone-number-input/types.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.d.ts +20 -0
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.js +34 -0
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.js.map +1 -0
- package/dist/src/ui/components/icon-components/FileBackground.d.ts +7 -0
- package/dist/src/ui/components/icon-components/FileBackground.d.ts.map +1 -0
- package/dist/src/ui/components/icon-components/FileBackground.js +7 -0
- package/dist/src/ui/components/icon-components/FileBackground.js.map +1 -0
- package/dist/src/ui/components/icon-components/FileUpload.d.ts +7 -0
- package/dist/src/ui/components/icon-components/FileUpload.d.ts.map +1 -0
- package/dist/src/ui/components/icon-components/FileUpload.js +7 -0
- package/dist/src/ui/components/icon-components/FileUpload.js.map +1 -0
- package/dist/src/ui/components/icon-components/Image.d.ts +7 -0
- package/dist/src/ui/components/icon-components/Image.d.ts.map +1 -0
- package/dist/src/ui/components/icon-components/Image.js +7 -0
- package/dist/src/ui/components/icon-components/Image.js.map +1 -0
- package/dist/src/ui/components/icon-components/UploadImage.d.ts +7 -0
- package/dist/src/ui/components/icon-components/UploadImage.d.ts.map +1 -0
- package/dist/src/ui/components/icon-components/UploadImage.js +7 -0
- package/dist/src/ui/components/icon-components/UploadImage.js.map +1 -0
- package/dist/src/ui/components/icon-components/index.d.ts +1 -1
- package/dist/src/ui/components/icon-components/index.d.ts.map +1 -1
- package/dist/src/ui/components/icon-components/index.js +6 -0
- package/dist/src/ui/components/icon-components/index.js.map +1 -1
- package/dist/src/ui/components/index.d.ts +1 -0
- package/dist/src/ui/components/index.d.ts.map +1 -1
- package/dist/src/ui/components/index.js +1 -0
- package/dist/src/ui/components/index.js.map +1 -1
- package/dist/src/ui/components/sidebar/sidebar.d.ts +9 -0
- package/dist/src/ui/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/ui/components/sidebar/sidebar.js +2 -2
- package/dist/src/ui/components/sidebar/sidebar.js.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-content-area.d.ts +2 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-content-area.d.ts.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-content-area.js +8 -2
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-content-area.js.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-header.d.ts +1 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-header.d.ts.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-header.js +10 -2
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-header.js.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton-item.d.ts +8 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton-item.d.ts.map +1 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton-item.js +8 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton-item.js.map +1 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton.d.ts +2 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton.d.ts.map +1 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton.js +22 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-skeleton.js.map +1 -0
- package/dist/style.css +118 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-input.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/file-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAUhD,QAAA,MAAM,SAAS,yFA2Id,CAAA;AAID,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useId } from 'react';
|
|
3
|
+
import { cn } from '../../../../scalars/lib/utils.js';
|
|
4
|
+
import { Icon } from '../../icon/icon.js';
|
|
5
|
+
import FileBackground from '../../icon-components/FileBackground.js';
|
|
6
|
+
import { Input } from '../../../../ui/components/data-entry/input/index.js';
|
|
7
|
+
import { FormLabel, FormMessageList } from '../../../../scalars/components/index.js';
|
|
8
|
+
import { useDropzone } from 'react-dropzone';
|
|
9
|
+
import { convertirMimesAObjetoAccept, formatBytes, getExtensionsFromMimeTypes } from './utils.js';
|
|
10
|
+
import { Button } from '../../../../scalars/components/fragments/button/button.js';
|
|
11
|
+
const FileInput = React.forwardRef(({ name, label, description, required, disabled = false, errors = [], id: propId, maxFileSize, allowedFileTypes, dragAndDropEnabled = true, ...props }, ref) => {
|
|
12
|
+
// TODO: Implementar value y defaultValue pass hook to handle file upload
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
+
const { value, defaultValue, ...rest } = props;
|
|
15
|
+
const prefix = useId();
|
|
16
|
+
const id = propId ?? `${prefix}-file`;
|
|
17
|
+
const hasError = Array.isArray(errors) && errors.length > 0;
|
|
18
|
+
const allowedFileTypesString = Array.isArray(allowedFileTypes) ? allowedFileTypes : [];
|
|
19
|
+
const { getInputProps, getRootProps, open, inputRef } = useDropzone({
|
|
20
|
+
maxSize: maxFileSize,
|
|
21
|
+
accept: convertirMimesAObjetoAccept(allowedFileTypes ?? []),
|
|
22
|
+
});
|
|
23
|
+
const mergedRef = useCallback((node) => {
|
|
24
|
+
if (typeof ref === 'function') {
|
|
25
|
+
ref(node);
|
|
26
|
+
}
|
|
27
|
+
else if (ref) {
|
|
28
|
+
ref.current = node;
|
|
29
|
+
}
|
|
30
|
+
;
|
|
31
|
+
inputRef.current = node;
|
|
32
|
+
}, [ref, inputRef]);
|
|
33
|
+
return (_jsxs("div", { className: "flex flex-col", children: [!!label && (_jsx(FormLabel, { htmlFor: id, id: `${id}-label`, disabled: disabled, hasError: hasError, required: required, className: cn(disabled && 'pointer-events-none'), children: label })), _jsxs("div", { className: "flex flex-col w-full h-full pt-3.5 min-h-[148px]", children: [_jsxs("div", { className: "relative h-[148px]", children: [_jsx("div", { className: "absolute z-0 h-full w-full", children: _jsx(FileBackground, { className: "w-full opacity-50" }) }), _jsxs("div", { ...getRootProps({
|
|
34
|
+
role: 'group',
|
|
35
|
+
className: cn('dropzone', 'relative flex w-full flex-col h-full cursor-pointer', !dragAndDropEnabled && 'opacity-50 pointer-events-none cursor-not-allowed', disabled && 'cursor-not-allowed',
|
|
36
|
+
// padding
|
|
37
|
+
'px-3 py-4'),
|
|
38
|
+
tabIndex: disabled ? -1 : 0,
|
|
39
|
+
}), "data-testid": "file-drop-area", children: [_jsxs("div", { className: "flex flex-col items-center justify-center gap-2", children: [_jsx(Icon, { name: "FileUpload", size: 40, className: "text-gray-500", "aria-hidden": "true" }), _jsx("p", { className: "text-gray-500 font-normal text-sm leading-5", children: description })] }), _jsx(Input, { ...getInputProps({
|
|
40
|
+
name,
|
|
41
|
+
id,
|
|
42
|
+
required,
|
|
43
|
+
disabled,
|
|
44
|
+
type: 'file',
|
|
45
|
+
multiple: false,
|
|
46
|
+
...rest,
|
|
47
|
+
}), "aria-invalid": hasError, "aria-required": required, "aria-labelledby": label ? `${id}-label` : undefined, ref: mergedRef })] }), _jsx("div", { className: cn('absolute bottom-4 left-1/2 transform -translate-x-1/2 z-1 pointer-events-auto', disabled && 'pointer-events-none'), children: _jsx(Button, { type: "button", onClick: open, disabled: disabled, "aria-label": "Search File", className: cn('inline-block h-10 bg-white border border-[#E4E4E7] rounded-md text-gray-500 cursor-pointer text-sm font-medium leading-5',
|
|
48
|
+
// padding
|
|
49
|
+
'px-4 py-2',
|
|
50
|
+
// hover
|
|
51
|
+
'hover:bg-white hover:text-gray-500 hover:cursor-pointer'), children: "Search File" }) })] }), _jsxs("div", { className: "flex flex-col gap-2 mt-2", children: [_jsxs("span", { className: "text-gray-500 font-normal text-xs leading-4.5 truncate", children: ["Supports: ", getExtensionsFromMimeTypes(allowedFileTypesString).join(', ')] }), _jsxs("span", { className: "text-gray-500 font-medium text-xs leading-4.5 truncate", children: ["Max: ", formatBytes(maxFileSize, 2)] })] }), hasError && _jsx(FormMessageList, { messages: errors, type: "error" })] })] }));
|
|
52
|
+
});
|
|
53
|
+
FileInput.displayName = 'FileInput';
|
|
54
|
+
export { FileInput };
|
|
55
|
+
//# sourceMappingURL=file-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-input.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/file-input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,kCAAkC,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,cAAc,MAAM,yCAAyC,CAAA;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,qDAAqD,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,YAAY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qBACN,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,EAClD,GAAG,EAAE,SAAS,GACd,IACE,EAEN,cACE,SAAS,EAAE,EAAE,CACX,+EAA+E,EAC/E,QAAQ,IAAI,qBAAqB,CAClC,YAED,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,QAAQ,gBACP,aAAa,EACxB,SAAS,EAAE,EAAE,CACX,0HAA0H;oCAC1H,UAAU;oCACV,WAAW;oCACX,QAAQ;oCACR,yDAAyD,CAC1D,4BAGM,GACL,IACF,EAEN,eAAK,SAAS,EAAC,0BAA0B,aACvC,gBAAM,SAAS,EAAC,wDAAwD,2BAC3D,0BAA0B,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IACnE,EACP,gBAAM,SAAS,EAAC,wDAAwD,sBAChE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,IAC5B,IACH,EAEL,QAAQ,IAAI,KAAC,eAAe,IAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG,IAC3D,IACF,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IconName } from '../../../icon-components/index.js';
|
|
2
|
+
import type { UploadFile } from '../types.js';
|
|
3
|
+
interface FileUploadItemProps {
|
|
4
|
+
fileName?: string;
|
|
5
|
+
fileSize?: string;
|
|
6
|
+
progress?: number;
|
|
7
|
+
onCancel?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
onReload?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
icon?: IconName;
|
|
11
|
+
errorsUpload?: string[];
|
|
12
|
+
status?: UploadFile;
|
|
13
|
+
}
|
|
14
|
+
export declare const FileUploadItem: ({ fileName, fileSize, progress, onCancel, onReload, className, icon, errorsUpload, status, }: FileUploadItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=file-upload-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload-item.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/data-entry/file-input/sub-components/file-upload-item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAGjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAC3D,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED,eAAO,MAAM,cAAc,GAAI,8FAU5B,mBAAmB,4CAgErB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../../../../scalars/lib/utils.js';
|
|
3
|
+
import { ProgressBar } from '../../../../../scalars/components/fragments/progress-bar/progress-bar.js';
|
|
4
|
+
import { Icon } from '../../../icon/icon.js';
|
|
5
|
+
import { FormMessageList } from '../../../../../scalars/components/fragments/form-message/message-list.js';
|
|
6
|
+
import { MESSAGES } from '../utils.js';
|
|
7
|
+
export const FileUploadItem = ({ fileName, fileSize, progress, onCancel, onReload, className, icon = 'DownloadFile', errorsUpload, status, }) => {
|
|
8
|
+
const showProgress = status === 'uploading' && progress !== undefined && progress >= 0 && progress < 100;
|
|
9
|
+
const showSuccess = status === 'success';
|
|
10
|
+
const showError = status === 'error';
|
|
11
|
+
return (_jsxs("div", { className: cn('bg-white rounded-md shadow-[0px_2px_12px_0px_rgba(37,42,52,0.10)] w-full', 'pt-2 px-2 pb-1', 'border-gray-100', className), children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsxs("div", { className: "flex flex-1 gap-2 ", children: [_jsx(Icon, { name: icon, size: 36 }), _jsxs("div", { className: "flex w-23 flex-col", children: [_jsx("span", { className: cn('text-gray-900 text-xs font-medium leading-4.5', 'truncate'), children: fileName }), _jsx("span", { className: "text-gray-500 text-xs leading-4.5 font-medium", children: fileSize })] })] }), _jsx("div", { className: "flex flex-col items-center gap-2", children: _jsxs("div", { className: "flex items-center gap-2", children: [showProgress && _jsxs("span", { className: "text-gray-600 font-medium text-xs", children: [Math.round(progress), "%"] }), status === 'error' && (_jsx("button", { type: "button", onClick: onReload, className: "text-gray-400 hover:text-gray-600 transition-colors", "aria-label": "Reload upload", children: _jsx(Icon, { name: "Reload", size: 16, className: "text-gray-900" }) })), _jsx("button", { type: "button", onClick: onCancel, className: "text-gray-400 hover:text-gray-600 transition-colors", "aria-label": "Cancel Upload", children: _jsx(Icon, { name: "XmarkLight", size: 16, className: "text-gray-900" }) })] }) })] }), _jsxs("div", { className: "flex flex-col mt-0.5 h-4.5", children: [showProgress && (_jsx(ProgressBar, { value: progress, className: "h-2 bg-gray-100 [&_[data-slot=progress-bar-indicator]]:bg-blue-600" })), showSuccess && _jsx("span", { className: "text-green-700 text-xs leading-4.5 font-normal", children: MESSAGES.success }), showError && _jsx("span", { className: "text-red-900 text-xs leading-4.5 font-normal", children: MESSAGES.error })] }), errorsUpload && _jsx(FormMessageList, { messages: errorsUpload, type: "error", className: "gap-0.5" })] }));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=file-upload-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload-item.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/data-entry/file-input/sub-components/file-upload-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,0EAA0E,CAAA;AAEtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,0EAA0E,CAAA;AAE1G,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AActC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,cAAc,EACrB,YAAY,EACZ,MAAM,GACc,EAAE,EAAE;IACxB,MAAM,YAAY,GAAG,MAAM,KAAK,WAAW,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,IAAI,CAAC,IAAI,QAAQ,GAAG,GAAG,CAAA;IACxG,MAAM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9E,CACH,EACA,WAAW,IAAI,eAAM,SAAS,EAAC,gDAAgD,YAAE,QAAQ,CAAC,OAAO,GAAQ,EACzG,SAAS,IAAI,eAAM,SAAS,EAAC,8CAA8C,YAAE,QAAQ,CAAC,KAAK,GAAQ,IAChG,EAEL,YAAY,IAAI,KAAC,eAAe,IAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,SAAS,GAAG,IACzF,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
import type { InputBaseProps } from '../../../../scalars/components/types.js';
|
|
3
|
+
export interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue'>, Omit<InputBaseProps<File>, 'warnings'> {
|
|
4
|
+
allowedFileTypes?: string[];
|
|
5
|
+
maxFileSize?: number;
|
|
6
|
+
dragAndDropEnabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type UploadFile = 'idle' | 'uploading' | 'success' | 'error';
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAE7E,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,EAC3E,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const MESSAGES: {
|
|
2
|
+
success: string;
|
|
3
|
+
error: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const formatBytes: (bytes?: number, decimals?: number, binaryUnits?: boolean) => string;
|
|
6
|
+
export declare function getExtensionsFromMimeTypes(mimeTypes?: string[]): string[];
|
|
7
|
+
type Accept = Record<string, string[]>;
|
|
8
|
+
export declare const convertirMimesAObjetoAccept: (allowedFileTypes?: string[]) => Accept;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/utils.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ;;;CAGpB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,EAAE,iBAAY,EAAE,qBAAmB,KAAG,MAgB/E,CAAA;AAED,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAGzE;AAED,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAEtC,eAAO,MAAM,2BAA2B,GAAI,mBAAmB,MAAM,EAAE,KAAG,MAezE,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import mime from 'mime/lite';
|
|
2
|
+
export const MESSAGES = {
|
|
3
|
+
success: 'Upload successful',
|
|
4
|
+
error: 'Upload failed',
|
|
5
|
+
};
|
|
6
|
+
export const formatBytes = (bytes, decimals = 2, binaryUnits = false) => {
|
|
7
|
+
if (!bytes)
|
|
8
|
+
return '0 Bytes';
|
|
9
|
+
if (bytes === 0)
|
|
10
|
+
return '0 Bytes';
|
|
11
|
+
if (isNaN(bytes) || bytes < 0)
|
|
12
|
+
return 'Invalid size';
|
|
13
|
+
const base = binaryUnits ? 1024 : 1000;
|
|
14
|
+
const units = binaryUnits ? ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'] : ['Bytes', 'kB', 'MB', 'GB', 'TB', 'PB'];
|
|
15
|
+
const dm = Math.max(0, decimals);
|
|
16
|
+
const i = Math.min(Math.floor(Math.log(bytes) / Math.log(base)), units.length - 1);
|
|
17
|
+
const num = bytes / base ** i;
|
|
18
|
+
const formatted = Number(num.toFixed(dm));
|
|
19
|
+
return `${formatted} ${units[i]}`;
|
|
20
|
+
};
|
|
21
|
+
export function getExtensionsFromMimeTypes(mimeTypes) {
|
|
22
|
+
if (!mimeTypes)
|
|
23
|
+
return [];
|
|
24
|
+
return mimeTypes.map((type) => mime.getExtension(type)).filter((ext) => Boolean(ext));
|
|
25
|
+
}
|
|
26
|
+
export const convertirMimesAObjetoAccept = (allowedFileTypes) => {
|
|
27
|
+
if (!allowedFileTypes)
|
|
28
|
+
return {};
|
|
29
|
+
if (!Array.isArray(allowedFileTypes) || allowedFileTypes.length === 0) {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
const acceptObject = {};
|
|
33
|
+
allowedFileTypes.forEach((mimeType) => {
|
|
34
|
+
const extension = mime.getExtension(mimeType);
|
|
35
|
+
if (extension) {
|
|
36
|
+
acceptObject[mimeType] = [`.${extension}`];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return acceptObject;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/file-input/utils.ts"],"names":[],"mappings":"AAAA,OAA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AAA;AACnC,CAAC,CAAA;AAED,MAAM,UAAU,0BAA0B,CAAC,SAAoB;IAC7D,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAA;IACzB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;AACtG,CAAC;AAID,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,gBAA2B,EAAU,EAAE;IACjF,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAA;IAChC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtE,OAAO,EAAE,CAAA;IACX,CAAC;IACD,MAAM,YAAY,GAAW,EAAE,CAAA;IAE/B,gBAAgB,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA;QAC7C,IAAI,SAAS,EAAE,CAAC;YACd,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,EAAE,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PhoneNumberInputProps } from './types.js';
|
|
3
|
+
declare const PhoneNumberInput: React.ForwardRefExoticComponent<PhoneNumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export { PhoneNumberInput };
|
|
5
|
+
//# sourceMappingURL=phone-number-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number-input.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/phone-number-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEvD,QAAA,MAAM,gBAAgB,gGA6GrB,CAAA;AAID,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Select } from '../select/index.js';
|
|
4
|
+
import { Input } from '../input/index.js';
|
|
5
|
+
import { usePhoneNumberInput } from './use-phone-number-input.js';
|
|
6
|
+
import { cn, useUniqueId } from '../../../../scalars/lib/index.js';
|
|
7
|
+
import { FormDescription } from '../../../../scalars/components/fragments/form-description/index.js';
|
|
8
|
+
import { FormGroup } from '../../../../scalars/components/fragments/form-group/index.js';
|
|
9
|
+
import { FormLabel } from '../../../../scalars/components/fragments/form-label/index.js';
|
|
10
|
+
import { FormMessageList } from '../../../../scalars/components/fragments/form-message/index.js';
|
|
11
|
+
const PhoneNumberInput = React.forwardRef(({ id: idProp, className, label, description, placeholder = '4155552671', value, defaultValue, onChange, disabled, required, errors, warnings, allowedCountries, excludedCountries, includeDependentAreas, prefixOptionFormat = 'FlagsAndNumbers', prefixProps, viewMode = 'edition',
|
|
12
|
+
// TODO: implement diffs
|
|
13
|
+
// baseValue,
|
|
14
|
+
...props }, ref) => {
|
|
15
|
+
const prefix = useUniqueId();
|
|
16
|
+
const id = idProp ?? `${prefix}-phone-number-input`;
|
|
17
|
+
const { options, selectValue, inputValue, handleSelectOnChange, handleInputOnChange } = usePhoneNumberInput({
|
|
18
|
+
value,
|
|
19
|
+
defaultValue,
|
|
20
|
+
onChange,
|
|
21
|
+
allowedCountries,
|
|
22
|
+
excludedCountries,
|
|
23
|
+
includeDependentAreas,
|
|
24
|
+
prefixOptionFormat,
|
|
25
|
+
});
|
|
26
|
+
const hasWarning = Array.isArray(warnings) && warnings.length > 0;
|
|
27
|
+
const hasError = Array.isArray(errors) && errors.length > 0;
|
|
28
|
+
if (viewMode !== 'edition') {
|
|
29
|
+
// TODO: implement PhoneNumberInputDiff
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return (_jsxs(FormGroup, { children: [!!label && (_jsx(FormLabel, { htmlFor: id, disabled: disabled, hasError: hasError, required: required, children: label })), _jsxs("div", { className: cn('relative flex items-center h-9 bg-white rounded-md border border-gray-300', 'focus-within:ring-1 focus-within:ring-offset-0 focus-within:ring-gray-900'), children: [_jsx(Select, { options: options, selectionIcon: "checkmark", selectionIconPosition: "right", searchable: prefixProps?.searchable ?? true, disabled: disabled, value: selectValue, onChange: (newValue) => {
|
|
33
|
+
handleSelectOnChange(newValue);
|
|
34
|
+
}, placeholder: prefixProps?.placeholder ?? '+1', className: cn('focus:ring-0 focus:ring-offset-0', 'outline-none focus-visible:ring-0 focus-visible:ring-offset-0', 'h-full border-none rounded-l-md rounded-r-none', 'bg-transparent focus:bg-transparent hover:bg-transparent', prefixProps?.className), contentClassName: cn('w-30', prefixProps?.contentClassName) }), _jsx("div", { className: "flex items-center h-full border-l border-gray-300" }), _jsx(Input, { ref: ref, id: id, placeholder: placeholder, value: inputValue, onChange: handleInputOnChange, disabled: disabled, "aria-invalid": hasError, "aria-label": !label ? 'Phone number input' : undefined, "aria-required": required, type: "tel", className: cn('focus:ring-0 focus:ring-offset-0', 'outline-none focus-visible:ring-0 focus-visible:ring-offset-0', 'h-full border-none rounded-r-md rounded-l-none', 'bg-transparent', className), ...props })] }), !!description && _jsx(FormDescription, { children: description }), hasWarning && _jsx(FormMessageList, { messages: warnings, type: "warning" }), hasError && _jsx(FormMessageList, { messages: errors, type: "error" })] }));
|
|
35
|
+
});
|
|
36
|
+
PhoneNumberInput.displayName = 'PhoneNumberInput';
|
|
37
|
+
export { PhoneNumberInput };
|
|
38
|
+
//# sourceMappingURL=phone-number-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number-input.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/phone-number-input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,oEAAoE,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,MAAM,8DAA8D,CAAA;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,8DAA8D,CAAA;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAA;AAGhG,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CACvC,CACE,EACE,EAAE,EAAE,MAAM,EACV,SAAS,EACT,KAAK,EACL,WAAW,EACX,WAAW,GAAG,YAAY,EAC1B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,g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ps, WithDifference } from '../../../../scalars/components/types.js';
|
|
3
|
+
import type { SelectProps } from '../select/types.js';
|
|
4
|
+
type PrefixOptionFormat = 'CodesOnly' | 'NumbersOnly' | 'FlagsOnly' | 'FlagsAndCodes' | 'FlagsAndNumbers';
|
|
5
|
+
interface PhoneNumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof InputBaseProps<string> | 'onChange'>, InputBaseProps<string>, Omit<WithDifference<string>, 'diffMode'> {
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
allowedCountries?: string[];
|
|
8
|
+
excludedCountries?: string[];
|
|
9
|
+
includeDependentAreas?: boolean;
|
|
10
|
+
prefixOptionFormat?: PrefixOptionFormat;
|
|
11
|
+
prefixProps?: Pick<SelectProps, 'placeholder' | 'searchable' | 'className' | 'contentClassName'>;
|
|
12
|
+
}
|
|
13
|
+
export type { PhoneNumberInputProps };
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,KAAK,kBAAkB,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,iBAAiB,CAAA;AAEzG,UAAU,qBACR,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,cAAc,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,EAClG,cAAc,CAAC,MAAM,CAAC,EACtB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,kBAAkB,CAAC,CAAA;CACjG;AAED,YAAY,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PhoneNumberInputProps } from './types.js';
|
|
2
|
+
import type { SelectOption } from '../select/types.js';
|
|
3
|
+
interface UsePhoneNumberInputProps {
|
|
4
|
+
value: PhoneNumberInputProps['value'];
|
|
5
|
+
defaultValue: PhoneNumberInputProps['defaultValue'];
|
|
6
|
+
onChange: PhoneNumberInputProps['onChange'];
|
|
7
|
+
allowedCountries: PhoneNumberInputProps['allowedCountries'];
|
|
8
|
+
excludedCountries: PhoneNumberInputProps['excludedCountries'];
|
|
9
|
+
includeDependentAreas: PhoneNumberInputProps['includeDependentAreas'];
|
|
10
|
+
prefixOptionFormat: PhoneNumberInputProps['prefixOptionFormat'];
|
|
11
|
+
}
|
|
12
|
+
export declare const usePhoneNumberInput: ({ onChange, }: UsePhoneNumberInputProps) => {
|
|
13
|
+
options: SelectOption[];
|
|
14
|
+
selectValue: string;
|
|
15
|
+
inputValue: string;
|
|
16
|
+
handleSelectOnChange: (newSelectValue: string) => void;
|
|
17
|
+
handleInputOnChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=use-phone-number-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-phone-number-input.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/use-phone-number-input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,UAAU,wBAAwB;IAChC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAA;IACrC,YAAY,EAAE,qBAAqB,CAAC,cAAc,CAAC,CAAA;IACnD,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAA;IAC3C,gBAAgB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAA;IAC3D,iBAAiB,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAA;IAC7D,qBAAqB,EAAE,qBAAqB,CAAC,uBAAuB,CAAC,CAAA;IACrE,kBAAkB,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAA;CAChE;AAED,eAAO,MAAM,mBAAmB,GAAI,eASjC,wBAAwB;;;;2CAON,MAAM;6BASnB,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;CAiB1C,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export const usePhoneNumberInput = ({
|
|
3
|
+
// TODO: return the correct options and implement the rest of the logic
|
|
4
|
+
// value,
|
|
5
|
+
// defaultValue,
|
|
6
|
+
onChange,
|
|
7
|
+
// allowedCountries,
|
|
8
|
+
// excludedCountries,
|
|
9
|
+
// includeDependentAreas,
|
|
10
|
+
// prefixOptionFormat,
|
|
11
|
+
}) => {
|
|
12
|
+
const [selectValue, setSelectValue] = useState('');
|
|
13
|
+
const [inputValue, setInputValue] = useState('');
|
|
14
|
+
const options = [];
|
|
15
|
+
const handleSelectOnChange = useCallback((newSelectValue) => {
|
|
16
|
+
setSelectValue(newSelectValue);
|
|
17
|
+
const fullValue = `${newSelectValue}${inputValue}`;
|
|
18
|
+
onChange?.(fullValue);
|
|
19
|
+
}, [inputValue, onChange]);
|
|
20
|
+
const handleInputOnChange = useCallback((e) => {
|
|
21
|
+
const newInputValue = e.target.value;
|
|
22
|
+
setInputValue(newInputValue);
|
|
23
|
+
const fullValue = `${selectValue}${newInputValue}`;
|
|
24
|
+
onChange?.(fullValue);
|
|
25
|
+
}, [selectValue, onChange]);
|
|
26
|
+
return {
|
|
27
|
+
options,
|
|
28
|
+
selectValue,
|
|
29
|
+
inputValue,
|
|
30
|
+
handleSelectOnChange,
|
|
31
|
+
handleInputOnChange,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=use-phone-number-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-phone-number-input.js","sourceRoot":"","sources":["../../../../../../src/ui/components/data-entry/phone-number-input/use-phone-number-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAc7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;AAClC,uEAAuE;AACvE,SAAS;AACT,gBAAgB;AAChB,QAAQ;AACR,oBAAoB;AACpB,qBAAqB;AACrB,yBAAyB;AACzB,sBAAsB;EACG,EAAE,EAAE;IAC7B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAClD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAEhD,MAAM,OAAO,GAAmB,EAAE,CAAA;IAElC,MAAM,oBAAoB,GAAG,WAAW,CACtC,CAAC,cAAsB,EAAE,EAAE;QACzB,cAAc,CAAC,cAAc,CAAC,CAAA;QAC9B,MAAM,SAAS,GAAG,GAAG,cAAc,GAAG,UAAU,EAAE,CAAA;QAClD,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAA;IACvB,CAAC,EACD,CAAC,UAAU,EAAE,QAAQ,CAAC,CACvB,CAAA;IAED,MAAM,mBAAmB,GAAG,WAAW,CACrC,CAAC,CAAsC,EAAE,EAAE;QACzC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA;QACpC,aAAa,CAAC,aAAa,CAAC,CAAA;QAE5B,MAAM,SAAS,GAAG,GAAG,WAAW,GAAG,aAAa,EAAE,CAAA;QAClD,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAA;IACvB,CAAC,EACD,CAAC,WAAW,EAAE,QAAQ,CAAC,CACxB,CAAA;IAED,OAAO;QACL,OAAO;QACP,WAAW;QACX,UAAU;QACV,oBAAoB;QACpB,mBAAmB;KACpB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileBackground.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/FileBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,QAAA,MAAM,cAAc;YAAW,KAAK;;CAenC,CAAA;AAID,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const FileBackground = (props) => {
|
|
3
|
+
return (_jsxs("svg", { ...props, viewBox: "0 0 251 152", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M13.875 1V2H25.625V1H37.375V2H49.125V1H60.875V2H72.625V1H84.375V2H96.125V1H107.875V2H119.625V1H131.375V2H143.125V1H154.875V2H166.625V1H178.375V2H190.125V1H201.875V2H213.625V1H225.375V2H237.125V1H243C246.866 1 250 4.13401 250 8V13.667H249V25H250V36.333H249V47.667H250V59H249V70.333H250V81.667H249V93H250V104.333H249V115.667H250V127H249V138.333H250V144C250 147.866 246.866 151 243 151H237.125V150H225.375V151H213.625V150H201.875V151H190.125V150H178.375V151H166.625V150H154.875V151H143.125V150H131.375V151H119.625V150H107.875V151H96.125V150H84.375V151H72.625V150H60.875V151H49.125V150H37.375V151H25.625V150H13.875V151H8C4.13401 151 1 147.866 1 144V138.333H2V127H1V115.667H2V104.333H1V93H2V81.667H1V70.333H2V59H1V47.667H2V36.333H1V25H2V13.667H1V8L1.00879 7.63965C1.19633 3.94111 4.25486 1 8 1H13.875Z", fill: "#F4F4F4" }), _jsx("path", { d: "M13.875 1V2H25.625V1H37.375V2H49.125V1H60.875V2H72.625V1H84.375V2H96.125V1H107.875V2H119.625V1H131.375V2H143.125V1H154.875V2H166.625V1H178.375V2H190.125V1H201.875V2H213.625V1H225.375V2H237.125V1H243C246.866 1 250 4.13401 250 8V13.667H249V25H250V36.333H249V47.667H250V59H249V70.333H250V81.667H249V93H250V104.333H249V115.667H250V127H249V138.333H250V144C250 147.866 246.866 151 243 151H237.125V150H225.375V151H213.625V150H201.875V151H190.125V150H178.375V151H166.625V150H154.875V151H143.125V150H131.375V151H119.625V150H107.875V151H96.125V150H84.375V151H72.625V150H60.875V151H49.125V150H37.375V151H25.625V150H13.875V151H8C4.13401 151 1 147.866 1 144V138.333H2V127H1V115.667H2V104.333H1V93H2V81.667H1V70.333H2V59H1V47.667H2V36.333H1V25H2V13.667H1V8L1.00879 7.63965C1.19633 3.94111 4.25486 1 8 1H13.875Z", stroke: "#D7D8D9", strokeWidth: "2", strokeDasharray: "12 12" })] }));
|
|
4
|
+
};
|
|
5
|
+
FileBackground.displayName = 'FileBackground';
|
|
6
|
+
export default FileBackground;
|
|
7
|
+
//# sourceMappingURL=FileBackground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileBackground.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/FileBackground.tsx"],"names":[],"mappings":";AAEA,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE;IACtC,OAAO,CACL,kBAAS,KAAK,EAAE,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,aAClF,eACE,CAAC,EAAC,8xBAA8xB,EAChyB,IAAI,EAAC,SAAS,GACd,EACF,eACE,CAAC,EAAC,8xBAA8xB,EAChyB,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,GAAG,EACf,eAAe,EAAC,OAAO,GACvB,IACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/FileUpload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,QAAA,MAAM,UAAU;YAAW,KAAK;;CAe/B,CAAA;AAID,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const FileUpload = (props) => {
|
|
3
|
+
return (_jsxs("svg", { ...props, width: "41", height: "40", viewBox: "0 0 41 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M20.5 4C26.134 4 29.33 7.846 29.794 12.492H29.934C33.564 12.492 36.5 15.516 36.5 19.246C36.5 19.4367 36.4927 19.6253 36.478 19.812C35.0422 18.0186 33.1023 16.6963 30.9081 16.0156C28.7139 15.3349 26.3662 15.3269 24.1675 15.9927C21.9687 16.6586 20.0198 17.9677 18.572 19.7513C17.1241 21.535 16.2436 23.7114 16.044 26H11.064C7.438 26 4.5 22.976 4.5 19.246C4.5 15.516 7.44 12.492 11.064 12.492H11.206C11.674 7.816 14.866 4 20.5 4Z", fill: "#9EA0A1" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M27.5 36C25.1131 36 22.8239 35.0518 21.136 33.364C19.4482 31.6761 18.5 29.3869 18.5 27C18.5 24.6131 19.4482 22.3239 21.136 20.636C22.8239 18.9482 25.1131 18 27.5 18C29.8869 18 32.1761 18.9482 33.864 20.636C35.5518 22.3239 36.5 24.6131 36.5 27C36.5 29.3869 35.5518 31.6761 33.864 33.364C32.1761 35.0518 29.8869 36 27.5 36ZM26.5003 25.718V31.126C26.5003 31.3912 26.6056 31.6455 26.7932 31.8331C26.9807 32.0206 27.235 32.126 27.5003 32.126C27.7655 32.126 28.0198 32.0206 28.2074 31.8331C28.3949 31.6455 28.5003 31.3912 28.5003 31.126V25.718L30.7043 27.922C30.9154 28.1331 31.2017 28.2517 31.5003 28.2517C31.7988 28.2517 32.0852 28.1331 32.2963 27.922C32.5074 27.7109 32.626 27.4245 32.626 27.126C32.626 26.8274 32.5074 26.5411 32.2963 26.33L28.2963 22.33C27.8563 21.89 27.1443 21.89 26.7043 22.33L22.7043 26.33C22.4932 26.5411 22.3745 26.8274 22.3745 27.126C22.3745 27.4245 22.4932 27.7109 22.7043 27.922C22.9154 28.1331 23.2017 28.2517 23.5003 28.2517C23.7988 28.2517 24.0852 28.1331 24.2963 27.922L26.5003 25.718Z", fill: "#9EA0A1" })] }));
|
|
4
|
+
};
|
|
5
|
+
FileUpload.displayName = 'FileUpload';
|
|
6
|
+
export default FileUpload;
|
|
7
|
+
//# sourceMappingURL=FileUpload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/FileUpload.tsx"],"names":[],"mappings":";AAEA,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,EAAE;IAClC,OAAO,CACL,kBAAS,KAAK,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,aACvG,eACE,CAAC,EAAC,4aAA4a,EAC9a,IAAI,EAAC,SAAS,GACd,EACF,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,s/BAAs/B,EACx/B,IAAI,EAAC,SAAS,GACd,IACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,QAAA,MAAM,KAAK;YAAW,KAAK;;CAW1B,CAAA;AAID,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const Image = (props) => {
|
|
3
|
+
return (_jsxs("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 40 40", fill: "none", children: [_jsx("rect", { width: "40", height: "40", rx: "10", fill: "#9EA0A1" }), _jsx("path", { d: "M36.6671 19.9998C36.6671 24.5423 37.6894 31.4231 35 34.1665C31.9751 37.2521 24.6628 36.6665 20.0005 36.6665C15.4581 36.6665 8.83959 37.1136 5.83334 34.1665C2.74774 31.1416 3.33382 24.6622 3.33382 19.9998L8.33382 11.6665L20.0005 27.4998L32.5005 16.6665L36.6671 19.9998Z", fill: "#F4F4F4" }), _jsx("circle", { cx: "25", cy: "11.6668", r: "3.33333", fill: "#F4F4F4" })] }));
|
|
4
|
+
};
|
|
5
|
+
Image.displayName = 'Image';
|
|
6
|
+
export default Image;
|
|
7
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/Image.tsx"],"names":[],"mappings":";AAEA,MAAM,KAAK,GAAG,CAAC,KAAY,EAAE,EAAE;IAC7B,OAAO,CACL,kBAAS,KAAK,EAAE,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,aAChF,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EACtD,eACE,CAAC,EAAC,8QAA8Q,EAChR,IAAI,EAAC,SAAS,GACd,EACF,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,SAAS,EAAC,CAAC,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAG,IACtD,CACP,CAAA;AACH,CAAC,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadImage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/UploadImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,QAAA,MAAM,WAAW;YAAW,KAAK;;CAWhC,CAAA;AAID,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const UploadImage = (props) => {
|
|
3
|
+
return (_jsxs("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 40 40", fill: "none", children: [_jsx("rect", { width: "40", height: "40", rx: "10", fill: "#9EA0A1" }), _jsx("path", { d: "M36.6671 19.9998C36.6671 24.5423 37.6894 31.4231 35 34.1665C31.9751 37.2521 24.6628 36.6665 20.0005 36.6665C15.4581 36.6665 8.83959 37.1136 5.83334 34.1665C2.74774 31.1416 3.33382 24.6622 3.33382 19.9998L8.33382 11.6665L20.0005 27.4998L32.5005 16.6665L36.6671 19.9998Z", fill: "#F4F4F4" }), _jsx("circle", { cx: "25", cy: "11.6668", r: "3.33333", fill: "#F4F4F4" })] }));
|
|
4
|
+
};
|
|
5
|
+
UploadImage.displayName = 'UploadImage';
|
|
6
|
+
export default UploadImage;
|
|
7
|
+
//# sourceMappingURL=UploadImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadImage.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/UploadImage.tsx"],"names":[],"mappings":";AAEA,MAAM,WAAW,GAAG,CAAC,KAAY,EAAE,EAAE;IACnC,OAAO,CACL,kBAAS,KAAK,EAAE,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,aAChF,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EACtD,eACE,CAAC,EAAC,8QAA8Q,EAChR,IAAI,EAAC,SAAS,GACd,EACF,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,SAAS,EAAC,CAAC,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAG,IACtD,CACP,CAAA;AACH,CAAC,CAAA;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,eAAe,WAAW,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Props } from './types.js';
|
|
2
|
-
export declare const iconNames: readonly ["ArrowCouterclockwise", "ArrowDownUp", "ArrowFilledRight", "ArrowLeft", "ArrowUp", "BarChart", "BaseArrowLeft", "BaseArrowRight", "Braces", "Branch", "BrickGlobe", "Briefcase", "Calendar", "CalendarTime", "Caret", "CaretDown", "CaretLeft", "CaretRight", "CaretSort", "Check", "CheckCircle", "CheckCircleFill", "Checkmark", "ChevronDown", "Circle", "CircleInfo", "Clock", "ClockFill", "ClockHistory", "CloudSlash", "Collapse", "Compass", "Connect", "ConnectSmall", "Copy", "Created", "CrossCircle", "Danger", "DescendenceModified", "Disconnect", "Discord", "DownloadFile", "Drive", "Duplicated", "Edit", "Ellipsis", "Error", "Ethscan", "Exclamation", "ExportCsv", "ExportJson", "ExportPdf", "ExportUbl", "ExportZip", "File", "FilesEarmark", "FolderClose", "FolderOpen", "FolderPlus", "Forum", "Gear", "Github", "Globe", "GlobeWww", "Hdd", "Hide", "History", "InfoSquare", "Link", "Linkedin", "Lock", "M", "Modified", "Moved", "Npm", "PackageManager", "Pencil", "People", "PeopleFill", "Person", "Pin", "PinFilled", "Plus", "PlusCircle", "PlusSquare", "PowerhouseLogoSmall", "Project", "QuestionSquare", "RedoArrow", "Reload", "Removed", "Renown", "RenownHover", "RenownLight", "Ring", "Save", "Search", "Server", "Settings", "Show", "Synced", "Syncing", "Tabler", "Timeline", "TimelineCaret", "Trash", "TrashFill", "TreeViewSlash", "TriangleDown", "Tube", "VariantArrowLeft", "VerticalDots", "WarningFill", "XTwitter", "Xmark", "XmarkLight", "Youtube"];
|
|
2
|
+
export declare const iconNames: readonly ["ArrowCouterclockwise", "ArrowDownUp", "ArrowFilledRight", "ArrowLeft", "ArrowUp", "BarChart", "BaseArrowLeft", "BaseArrowRight", "Braces", "Branch", "BrickGlobe", "Briefcase", "Calendar", "CalendarTime", "Caret", "CaretDown", "CaretLeft", "CaretRight", "CaretSort", "Check", "CheckCircle", "CheckCircleFill", "Checkmark", "ChevronDown", "Circle", "CircleInfo", "Clock", "ClockFill", "ClockHistory", "CloudSlash", "Collapse", "Compass", "Connect", "ConnectSmall", "Copy", "Created", "CrossCircle", "Danger", "DescendenceModified", "Disconnect", "Discord", "DownloadFile", "Drive", "Duplicated", "Edit", "Ellipsis", "Error", "Ethscan", "Exclamation", "ExportCsv", "ExportJson", "ExportPdf", "ExportUbl", "ExportZip", "File", "FileUpload", "FilesEarmark", "FolderClose", "FolderOpen", "FolderPlus", "Forum", "Gear", "Github", "Globe", "GlobeWww", "Hdd", "Hide", "History", "InfoSquare", "Link", "Linkedin", "Lock", "M", "Modified", "Moved", "Npm", "PackageManager", "Pencil", "People", "PeopleFill", "Person", "Pin", "PinFilled", "Plus", "PlusCircle", "PlusSquare", "PowerhouseLogoSmall", "Project", "QuestionSquare", "RedoArrow", "Reload", "Removed", "Renown", "RenownHover", "RenownLight", "Ring", "Save", "Search", "Server", "Settings", "Show", "Synced", "Syncing", "Tabler", "Timeline", "TimelineCaret", "Trash", "TrashFill", "TreeViewSlash", "TriangleDown", "Tube", "UploadImage", "VariantArrowLeft", "VerticalDots", "WarningFill", "XTwitter", "Xmark", "XmarkLight", "Youtube"];
|
|
3
3
|
export type IconName = (typeof iconNames)[number];
|
|
4
4
|
export declare const iconComponents: Record<IconName, (props: Props) => React.JSX.Element>;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AA0HvC,eAAO,MAAM,SAAS,o9CAwHZ,CAAA;AAEV,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AACjD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,CAwHvE,CAAA"}
|
|
@@ -53,6 +53,7 @@ import ExportPdf from './ExportPdf.js';
|
|
|
53
53
|
import ExportUbl from './ExportUbl.js';
|
|
54
54
|
import ExportZip from './ExportZip.js';
|
|
55
55
|
import File from './File.js';
|
|
56
|
+
import FileUpload from './FileUpload.js';
|
|
56
57
|
import FilesEarmark from './FilesEarmark.js';
|
|
57
58
|
import FolderClose from './FolderClose.js';
|
|
58
59
|
import FolderOpen from './FolderOpen.js';
|
|
@@ -108,6 +109,7 @@ import TrashFill from './TrashFill.js';
|
|
|
108
109
|
import TreeViewSlash from './TreeViewSlash.js';
|
|
109
110
|
import TriangleDown from './TriangleDown.js';
|
|
110
111
|
import Tube from './Tube.js';
|
|
112
|
+
import UploadImage from './UploadImage.js';
|
|
111
113
|
import VariantArrowLeft from './VariantArrowLeft.js';
|
|
112
114
|
import VerticalDots from './VerticalDots.js';
|
|
113
115
|
import WarningFill from './WarningFill.js';
|
|
@@ -171,6 +173,7 @@ export const iconNames = [
|
|
|
171
173
|
'ExportUbl',
|
|
172
174
|
'ExportZip',
|
|
173
175
|
'File',
|
|
176
|
+
'FileUpload',
|
|
174
177
|
'FilesEarmark',
|
|
175
178
|
'FolderClose',
|
|
176
179
|
'FolderOpen',
|
|
@@ -226,6 +229,7 @@ export const iconNames = [
|
|
|
226
229
|
'TreeViewSlash',
|
|
227
230
|
'TriangleDown',
|
|
228
231
|
'Tube',
|
|
232
|
+
'UploadImage',
|
|
229
233
|
'VariantArrowLeft',
|
|
230
234
|
'VerticalDots',
|
|
231
235
|
'WarningFill',
|
|
@@ -290,6 +294,7 @@ export const iconComponents = {
|
|
|
290
294
|
ExportUbl,
|
|
291
295
|
ExportZip,
|
|
292
296
|
File,
|
|
297
|
+
FileUpload,
|
|
293
298
|
FilesEarmark,
|
|
294
299
|
FolderClose,
|
|
295
300
|
FolderOpen,
|
|
@@ -345,6 +350,7 @@ export const iconComponents = {
|
|
|
345
350
|
TreeViewSlash,
|
|
346
351
|
TriangleDown,
|
|
347
352
|
Tube,
|
|
353
|
+
UploadImage,
|
|
348
354
|
VariantArrowLeft,
|
|
349
355
|
VerticalDots,
|
|
350
356
|
WarningFill,
|