period-ui 0.4.11 → 0.4.12

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 (58) hide show
  1. package/dist/components/index.d.ts +2 -0
  2. package/dist/components/index.d.ts.map +1 -1
  3. package/dist/components/index.js +2 -0
  4. package/dist/components/index.js.map +1 -1
  5. package/dist/components/molecules/form/form-file-uploader/form-file-uploader.d.ts +7 -0
  6. package/dist/components/molecules/form/form-file-uploader/form-file-uploader.d.ts.map +1 -0
  7. package/dist/components/molecules/form/form-file-uploader/form-file-uploader.js +24 -0
  8. package/dist/components/molecules/form/form-file-uploader/form-file-uploader.js.map +1 -0
  9. package/dist/components/molecules/form/form-file-uploader/index.d.ts +2 -0
  10. package/dist/components/molecules/form/form-file-uploader/index.d.ts.map +1 -0
  11. package/dist/components/molecules/form/form-file-uploader/index.js +18 -0
  12. package/dist/components/molecules/form/form-file-uploader/index.js.map +1 -0
  13. package/dist/components/organisms/file-uploader/components/drop-area.d.ts +24 -0
  14. package/dist/components/organisms/file-uploader/components/drop-area.d.ts.map +1 -0
  15. package/dist/components/organisms/file-uploader/components/drop-area.js +24 -0
  16. package/dist/components/organisms/file-uploader/components/drop-area.js.map +1 -0
  17. package/dist/components/organisms/file-uploader/components/file-actions.d.ts +10 -0
  18. package/dist/components/organisms/file-uploader/components/file-actions.d.ts.map +1 -0
  19. package/dist/components/organisms/file-uploader/components/file-actions.js +9 -0
  20. package/dist/components/organisms/file-uploader/components/file-actions.js.map +1 -0
  21. package/dist/components/organisms/file-uploader/components/index.d.ts +5 -0
  22. package/dist/components/organisms/file-uploader/components/index.d.ts.map +1 -0
  23. package/dist/components/organisms/file-uploader/components/index.js +21 -0
  24. package/dist/components/organisms/file-uploader/components/index.js.map +1 -0
  25. package/dist/components/organisms/file-uploader/components/uploaded-file.d.ts +9 -0
  26. package/dist/components/organisms/file-uploader/components/uploaded-file.d.ts.map +1 -0
  27. package/dist/components/organisms/file-uploader/components/uploaded-file.js +11 -0
  28. package/dist/components/organisms/file-uploader/components/uploaded-file.js.map +1 -0
  29. package/dist/components/organisms/file-uploader/components/uploading-file.d.ts +9 -0
  30. package/dist/components/organisms/file-uploader/components/uploading-file.d.ts.map +1 -0
  31. package/dist/components/organisms/file-uploader/components/uploading-file.js +11 -0
  32. package/dist/components/organisms/file-uploader/components/uploading-file.js.map +1 -0
  33. package/dist/components/organisms/file-uploader/file-uploader-styles.d.ts +8 -0
  34. package/dist/components/organisms/file-uploader/file-uploader-styles.d.ts.map +1 -0
  35. package/dist/components/organisms/file-uploader/file-uploader-styles.js +40 -0
  36. package/dist/components/organisms/file-uploader/file-uploader-styles.js.map +1 -0
  37. package/dist/components/organisms/file-uploader/file-uploader-types.d.ts +7 -0
  38. package/dist/components/organisms/file-uploader/file-uploader-types.d.ts.map +1 -0
  39. package/dist/components/organisms/file-uploader/file-uploader-types.js +11 -0
  40. package/dist/components/organisms/file-uploader/file-uploader-types.js.map +1 -0
  41. package/dist/components/organisms/file-uploader/file-uploader.d.ts +24 -0
  42. package/dist/components/organisms/file-uploader/file-uploader.d.ts.map +1 -0
  43. package/dist/components/organisms/file-uploader/file-uploader.js +20 -0
  44. package/dist/components/organisms/file-uploader/file-uploader.js.map +1 -0
  45. package/dist/components/organisms/file-uploader/index.d.ts +3 -0
  46. package/dist/components/organisms/file-uploader/index.d.ts.map +1 -0
  47. package/dist/components/organisms/file-uploader/index.js +19 -0
  48. package/dist/components/organisms/file-uploader/index.js.map +1 -0
  49. package/dist/components/organisms/file-uploader/use-file-uploader.d.ts +16 -0
  50. package/dist/components/organisms/file-uploader/use-file-uploader.d.ts.map +1 -0
  51. package/dist/components/organisms/file-uploader/use-file-uploader.js +52 -0
  52. package/dist/components/organisms/file-uploader/use-file-uploader.js.map +1 -0
  53. package/dist/index.d.ts +3 -3
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.mjs +5739 -5336
  58. package/package.json +1 -1
@@ -32,6 +32,7 @@ export * from './molecules/password-field';
32
32
  export * from './molecules/phone-field';
33
33
  export * from './molecules/form/form-password-field';
34
34
  export * from './molecules/form/form-phone-field';
35
+ export * from './molecules/form/form-file-uploader';
35
36
  export * from './molecules/callout';
36
37
  export * from './molecules/empty-state';
37
38
  export * from './molecules/table';
@@ -43,4 +44,5 @@ export * from './organisms/tool-tip';
43
44
  export * from './organisms/filter-modal';
44
45
  export * from './organisms/dropdown-button';
45
46
  export * from './organisms/document-field';
47
+ export * from './organisms/file-uploader';
46
48
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5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CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
@@ -48,6 +48,7 @@ __exportStar(require("./molecules/password-field"), exports);
48
48
  __exportStar(require("./molecules/phone-field"), exports);
49
49
  __exportStar(require("./molecules/form/form-password-field"), exports);
50
50
  __exportStar(require("./molecules/form/form-phone-field"), exports);
51
+ __exportStar(require("./molecules/form/form-file-uploader"), exports);
51
52
  __exportStar(require("./molecules/callout"), exports);
52
53
  __exportStar(require("./molecules/empty-state"), exports);
53
54
  __exportStar(require("./molecules/table"), exports);
@@ -59,4 +60,5 @@ __exportStar(require("./organisms/tool-tip"), exports);
59
60
  __exportStar(require("./organisms/filter-modal"), exports);
60
61
  __exportStar(require("./organisms/dropdown-button"), exports);
61
62
  __exportStar(require("./organisms/document-field"), exports);
63
+ __exportStar(require("./organisms/file-uploader"), exports);
62
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAAkC;AAClC,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,uDAAqC;AACrC,oDAAkC;AAClC,0DAAwC;AACxC,yDAAuC;AACvC,oEAAkD;AAClD,sDAAoC;AACpC,+CAA6B;AAC7B,sDAAoC;AACpC,6DAA2C;AAC3C,kDAAgC;AAChC,sDAAoC;AACpC,2DAAyC;AAGzC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,+DAA6C;AAC7C,mEAAiD;AACjD,iEAA+C;AAC/C,qEAAmD;AACnD,oEAAkD;AAClD,qDAAmC;AACnC,8DAA4C;AAC5C,yDAAuC;AACvC,6DAA2C;AAC3C,0DAAwC;AACxC,uEAAqD;AACrD,oEAAkD;AAClD,sDAAoC;AACpC,0DAAwC;AACxC,oDAAkC;AAClC,wDAAsC;AACtC,yDAAuC;AACvC,uDAAqC;AACrC,6DAA2C;AAG3C,uDAAqC;AACrC,2DAAyC;AACzC,8DAA4C;AAC5C,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAAkC;AAClC,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,uDAAqC;AACrC,oDAAkC;AAClC,0DAAwC;AACxC,yDAAuC;AACvC,oEAAkD;AAClD,sDAAoC;AACpC,+CAA6B;AAC7B,sDAAoC;AACpC,6DAA2C;AAC3C,kDAAgC;AAChC,sDAAoC;AACpC,2DAAyC;AAGzC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,+DAA6C;AAC7C,mEAAiD;AACjD,iEAA+C;AAC/C,qEAAmD;AACnD,oEAAkD;AAClD,qDAAmC;AACnC,8DAA4C;AAC5C,yDAAuC;AACvC,6DAA2C;AAC3C,0DAAwC;AACxC,uEAAqD;AACrD,oEAAkD;AAClD,sEAAoD;AACpD,sDAAoC;AACpC,0DAAwC;AACxC,oDAAkC;AAClC,wDAAsC;AACtC,yDAAuC;AACvC,uDAAqC;AACrC,6DAA2C;AAG3C,uDAAqC;AACrC,2DAAyC;AACzC,8DAA4C;AAC5C,6DAA2C;AAC3C,4DAA0C"}
@@ -0,0 +1,7 @@
1
+ import { FileUploaderProps } from '../../../../components';
2
+ import { FormControlProps } from '../../../../containers';
3
+ export type FormFileUploaderProps = FormControlProps & Omit<FileUploaderProps, 'id' | 'describedBy' | 'isDisabled'> & {
4
+ formControlClassName?: string;
5
+ };
6
+ export declare function FormFileUploader({ label, helperText, errorText, optionalLabel, hideRequiredMark, containerClassName, toolTipProps, inputWidth, formName, formProps, formControlClassName, id, isRequired, isDisabled, state, onSelectFile, onDelete, ...fileUploaderProps }: FormFileUploaderProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=form-file-uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-file-uploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-file-uploader/form-file-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAqB,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EAAe,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAClD,IAAI,CAAC,iBAAiB,EAAE,IAAI,GAAG,aAAa,GAAG,YAAY,CAAC,GAAG;IAC7D,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEJ,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,oBAAoB,EACpB,EAAE,EACF,UAAU,EACV,UAAU,EACV,KAAiC,EACjC,YAAY,EACZ,QAAQ,EACR,GAAG,iBAAiB,EACrB,EAAE,qBAAqB,2CAiDvB"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormFileUploader = FormFileUploader;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const components_1 = require("../../../../components");
6
+ const containers_1 = require("../../../../containers");
7
+ function FormFileUploader({ label, helperText, errorText, optionalLabel, hideRequiredMark, containerClassName, toolTipProps, inputWidth, formName, formProps, formControlClassName, id, isRequired, isDisabled, state = components_1.FileUploaderState.DEFAULT, onSelectFile, onDelete, ...fileUploaderProps }) {
8
+ function handleSelectFile(file) {
9
+ onSelectFile?.(file);
10
+ if (formProps && formName) {
11
+ void formProps.setFieldValue(formName, file);
12
+ void formProps.setFieldTouched(formName, true, true);
13
+ }
14
+ }
15
+ function handleDelete() {
16
+ onDelete?.();
17
+ if (formProps && formName) {
18
+ void formProps.setFieldValue(formName, null);
19
+ void formProps.setFieldTouched(formName, true, true);
20
+ }
21
+ }
22
+ return ((0, jsx_runtime_1.jsx)(containers_1.FormControl, { id: id, label: label, helperText: helperText, optionalLabel: optionalLabel, hideRequiredMark: hideRequiredMark, containerClassName: containerClassName, toolTipProps: toolTipProps, inputWidth: inputWidth, formName: formName, formProps: formProps, isRequired: isRequired, isDisabled: isDisabled, errorText: errorText || formProps?.errors[formName ?? ''], className: formControlClassName, children: ({ isErrorVisible, inputId, describedBy }) => ((0, jsx_runtime_1.jsx)(components_1.FileUploader, { ...fileUploaderProps, id: inputId, describedBy: describedBy, isDisabled: isDisabled, state: isErrorVisible ? components_1.FileUploaderState.ERROR : state, onSelectFile: handleSelectFile, onDelete: handleDelete })) }));
23
+ }
24
+ //# sourceMappingURL=form-file-uploader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-file-uploader.js","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-file-uploader/form-file-uploader.tsx"],"names":[],"mappings":";;AAQA,4CAoEC;;AA5ED,uDAA4F;AAC5F,uDAAuE;AAOvE,SAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,k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E,EAAE,EAAE,CAAC,CAC7C,uBAAC,yBAAY,OACP,iBAAiB,EACrB,EAAE,EAAE,OAAO,EACX,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,8BAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EACvD,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EAAE,YAAY,GACtB,CACH,GACW,CACf,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './form-file-uploader';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-file-uploader/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./form-file-uploader"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-file-uploader/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
@@ -0,0 +1,24 @@
1
+ import { ChangeEvent, DragEvent, RefObject } from 'react';
2
+ type DropAreaProps = {
3
+ isError?: boolean;
4
+ isDragging?: boolean;
5
+ isDisabled?: boolean;
6
+ accept?: string;
7
+ inputRef: RefObject<HTMLInputElement>;
8
+ dragAndDropText?: string;
9
+ linkTextDesktop?: string;
10
+ linkTextMobile?: string;
11
+ uploadDocumentText?: string;
12
+ dropActiveText?: string;
13
+ className?: string;
14
+ id?: string;
15
+ describedBy?: string;
16
+ onOpenPicker: () => void;
17
+ onInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
18
+ onDragOver: (event: DragEvent<HTMLDivElement>) => void;
19
+ onDragLeave: (event: DragEvent<HTMLDivElement>) => void;
20
+ onDrop: (event: DragEvent<HTMLDivElement>) => void;
21
+ };
22
+ export declare function DropArea({ isError, isDragging, isDisabled, accept, inputRef, dragAndDropText, linkTextDesktop, linkTextMobile, uploadDocumentText, dropActiveText, className, id, describedBy, onOpenPicker, onInputChange, onDragOver, onDragLeave, onDrop, }: DropAreaProps): import("react/jsx-runtime").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=drop-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-area.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/drop-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtE,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC9D,UAAU,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACvD,WAAW,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACxD,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,EAAE,EACF,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,MAAM,GACP,EAAE,aAAa,2CA+Ff"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DropArea = DropArea;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const components_1 = require("../../../../components");
6
+ const tailwind_utils_1 = require("../../../../utils/tailwind-utils");
7
+ const file_uploader_styles_1 = require("../file-uploader-styles");
8
+ function DropArea({ isError, isDragging, isDisabled, accept, inputRef, dragAndDropText, linkTextDesktop, linkTextMobile, uploadDocumentText, dropActiveText, className, id, describedBy, onOpenPicker, onInputChange, onDragOver, onDragLeave, onDrop, }) {
9
+ const tone = isDragging ? 'dragging' : isError ? 'error' : 'default';
10
+ const iconColor = isError ? components_1.IconColor.RED_01 : components_1.IconColor.BLUE_01;
11
+ function handleAreaClick() {
12
+ if (!isDisabled) {
13
+ onOpenPicker();
14
+ }
15
+ }
16
+ function handleLinkClick(event) {
17
+ event.stopPropagation();
18
+ if (!isDisabled) {
19
+ onOpenPicker();
20
+ }
21
+ }
22
+ return ((0, jsx_runtime_1.jsxs)("div", { role: "presentation", "aria-disabled": isDisabled || undefined, className: (0, tailwind_utils_1.tailwind)((0, file_uploader_styles_1.dropAreaStyles)({ tone, isInteractive: !isDisabled }), isDisabled && 'opacity-60', className), onClick: handleAreaClick, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, id: id, type: "file", accept: accept, hidden: true, disabled: isDisabled, "aria-describedby": describedBy, onChange: onInputChange }), isDragging ? ((0, jsx_runtime_1.jsx)(components_1.Text, { as: "p", variant: components_1.TextVariant.BODY, color: components_1.TextColors.BLACK, className: "whitespace-normal", children: dropActiveText })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.UPLOAD, size: components_1.IconSize.TWO_XL, color: iconColor }), (0, jsx_runtime_1.jsxs)(components_1.Text, { as: "p", variant: components_1.TextVariant.BODY, color: components_1.TextColors.BLACK, className: "hidden whitespace-normal md:block", children: [dragAndDropText ? `${dragAndDropText} ` : '', (0, jsx_runtime_1.jsx)(components_1.Text, { as: "button", type: "button", variant: components_1.TextVariant.LINK, color: components_1.TextColors.BLUE, className: "whitespace-normal", disabled: isDisabled, onClick: handleLinkClick, children: linkTextDesktop }), ' ', uploadDocumentText] }), (0, jsx_runtime_1.jsxs)(components_1.Text, { as: "p", variant: components_1.TextVariant.BODY, color: components_1.TextColors.BLACK, className: "whitespace-normal md:hidden", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { as: "button", type: "button", variant: components_1.TextVariant.LINK, color: components_1.TextColors.BLUE, className: "whitespace-normal", disabled: isDisabled, onClick: handleLinkClick, children: linkTextMobile }), ' ', uploadDocumentText] })] }))] }));
23
+ }
24
+ //# sourceMappingURL=drop-area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-area.js","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/drop-area.tsx"],"names":[],"mappings":";;AA0BA,4BAkHC;;AA3ID,uDAAmH;AACnH,qEAA4D;AAC5D,kEAAyD;AAuBzD,SAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,EAAE,EACF,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,MAAM,GACQ;IACd,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACrE,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,sBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAS,CAAC,OAAO,CAAC;IAEjE,SAAS,eAAe;QACtB,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAED,SAAS,eAAe,CAAC,KAAoC;QAC3D,KAAK,CAAC,eAAe,EAAE,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,CACL,iCACE,IAAI,EAAC,cAAc,mBACJ,UAAU,IAAI,SAAS,EACtC,SAAS,EAAE,IAAA,yBAAQ,EACjB,IAAA,qCAAc,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,UAAU,EAAE,CAAC,EACpD,UAAU,IAAI,YAAY,EAC1B,SAAS,CACV,EACD,OAAO,EAAE,eAAe,EACxB,UAA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iBAAI,IACH,EAAE,EAAC,QAAQ,EACX,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,wBAAW,CAAC,IAAI,EACzB,KAAK,EAAE,uBAAU,CAAC,IAAI,EACtB,SAAS,EAAC,mBAAmB,EAC7B,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,eAAe,YAEvB,cAAc,GACV,EAAC,GAAG,EACV,kBAAkB,IACd,IACN,CACJ,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ type FileActionsProps = {
2
+ replaceLabel?: string;
3
+ deleteLabel?: string;
4
+ isDisabled?: boolean;
5
+ onReplace?: () => void;
6
+ onDelete?: () => void;
7
+ };
8
+ export declare function FileActions({ replaceLabel, deleteLabel, isDisabled, onReplace, onDelete, }: FileActionsProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=file-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/file-actions.tsx"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,GACT,EAAE,gBAAgB,2CAoBlB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileActions = FileActions;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const components_1 = require("../../../../components");
6
+ function FileActions({ replaceLabel, deleteLabel, isDisabled, onReplace, onDelete, }) {
7
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex shrink-0 flex-col gap-2", children: [(0, jsx_runtime_1.jsx)(components_1.IconButton, { icon: components_1.IconSymbol.PENCIL, variant: components_1.IconButtonVariant.FILLED, isDisabled: isDisabled, "aria-label": replaceLabel, onClick: onReplace }), (0, jsx_runtime_1.jsx)(components_1.IconButton, { icon: components_1.IconSymbol.TRASH, variant: components_1.IconButtonVariant.DESTRUCTIVE_FILLED, isDisabled: isDisabled, "aria-label": deleteLabel, onClick: onDelete })] }));
8
+ }
9
+ //# sourceMappingURL=file-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-actions.js","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/file-actions.tsx"],"names":[],"mappings":";;AAUA,kCA0BC;;AApCD,uDAAmF;AAUnF,SAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,GACS;IACjB,OAAO,CACL,iCAAK,SAAS,EAAC,8BAA8B,aAC3C,uBAAC,uBAAU,IACT,IAAI,EAAE,uBAAU,CAAC,MAAM,EACvB,OAAO,EAAE,8BAAiB,CAAC,MAAM,EACjC,UAAU,EAAE,UAAU,gBACV,YAAY,EACxB,OAAO,EAAE,SAAS,GAClB,EAEF,uBAAC,uBAAU,IACT,IAAI,EAAE,uBAAU,CAAC,KAAK,EACtB,OAAO,EAAE,8BAAiB,CAAC,kBAAkB,EAC7C,UAAU,EAAE,UAAU,gBACV,WAAW,EACvB,OAAO,EAAE,QAAQ,GACjB,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './drop-area';
2
+ export * from './uploading-file';
3
+ export * from './uploaded-file';
4
+ export * from './file-actions';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./drop-area"), exports);
18
+ __exportStar(require("./uploading-file"), exports);
19
+ __exportStar(require("./uploaded-file"), exports);
20
+ __exportStar(require("./file-actions"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B"}
@@ -0,0 +1,9 @@
1
+ type UploadedFileProps = {
2
+ fileName?: string;
3
+ fileSize?: string;
4
+ className?: string;
5
+ id?: string;
6
+ };
7
+ export declare function UploadedFile({ fileName, fileSize, className, id }: UploadedFileProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=uploaded-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploaded-file.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/uploaded-file.tsx"],"names":[],"mappings":"AAYA,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,iBAAiB,2CA+BpF"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadedFile = UploadedFile;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const components_1 = require("../../../../components");
6
+ const tailwind_utils_1 = require("../../../../utils/tailwind-utils");
7
+ const file_uploader_styles_1 = require("../file-uploader-styles");
8
+ function UploadedFile({ fileName, fileSize, className, id }) {
9
+ return ((0, jsx_runtime_1.jsxs)("div", { id: id, className: (0, tailwind_utils_1.tailwind)((0, file_uploader_styles_1.fileContainerStyles)({ tone: 'completed' }), 'min-w-0 flex-1', className), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.FILE, size: components_1.IconSize.TWO_XL, color: components_1.IconColor.BLUE_01 }), (0, jsx_runtime_1.jsx)(components_1.Text, { as: "p", variant: components_1.TextVariant.BODY, color: components_1.TextColors.BLACK, className: "whitespace-normal break-all", children: fileName })] }), fileSize && ((0, jsx_runtime_1.jsx)(components_1.Text, { as: "p", variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "whitespace-normal", children: fileSize }))] }));
10
+ }
11
+ //# sourceMappingURL=uploaded-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploaded-file.js","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/uploaded-file.tsx"],"names":[],"mappings":";;AAmBA,oCA+BC;;AAlDD,uDAQgC;AAChC,qEAA4D;AAC5D,kEAA8D;AAS9D,SAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAqB;IACnF,OAAO,CACL,iCACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,IAAA,yBAAQ,EAAC,IAAA,0CAAmB,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,gBAAgB,EAAE,SAAS,CAAC,aAE5F,iCAAK,SAAS,EAAC,yBAAyB,aACtC,uBAAC,sBAAS,IAAC,IAAI,EAAE,uBAAU,CAAC,IAAI,EAAE,IAAI,EAAE,qBAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,sBAAS,CAAC,OAAO,GAAI,EAErF,uBAAC,iBAAI,IACH,EAAE,EAAC,GAAG,EACN,OAAO,EAAE,wBAAW,CAAC,IAAI,EACzB,KAAK,EAAE,uBAAU,CAAC,KAAK,EACvB,SAAS,EAAC,6BAA6B,YAEtC,QAAQ,GACJ,IACH,EAEL,QAAQ,IAAI,CACX,uBAAC,iBAAI,IACH,EAAE,EAAC,GAAG,EACN,OAAO,EAAE,wBAAW,CAAC,MAAM,EAC3B,KAAK,EAAE,uBAAU,CAAC,QAAQ,EAC1B,SAAS,EAAC,mBAAmB,YAE5B,QAAQ,GACJ,CACR,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ type UploadingFileProps = {
2
+ fileName?: string;
3
+ progress?: number;
4
+ className?: string;
5
+ id?: string;
6
+ };
7
+ export declare function UploadingFile({ fileName, progress, className, id }: UploadingFileProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=uploading-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploading-file.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/uploading-file.tsx"],"names":[],"mappings":"AAUA,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,QAAY,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,kBAAkB,2CAmB1F"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadingFile = UploadingFile;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const components_1 = require("../../../../components");
6
+ const tailwind_utils_1 = require("../../../../utils/tailwind-utils");
7
+ const file_uploader_styles_1 = require("../file-uploader-styles");
8
+ function UploadingFile({ fileName, progress = 0, className, id }) {
9
+ return ((0, jsx_runtime_1.jsxs)("div", { id: id, className: (0, tailwind_utils_1.tailwind)((0, file_uploader_styles_1.fileContainerStyles)({ tone: 'loading' }), className), children: [(0, jsx_runtime_1.jsx)(components_1.Text, { as: "p", variant: components_1.TextVariant.BODY, color: components_1.TextColors.BLACK, className: "whitespace-normal break-all", children: fileName }), (0, jsx_runtime_1.jsx)(components_1.ProgressIndicator, { variant: components_1.ProgressIndicatorVariant.LINEAR_DETERMINATE, showProgress: true, currentProgress: progress })] }));
10
+ }
11
+ //# sourceMappingURL=uploading-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploading-file.js","sourceRoot":"","sources":["../../../../../src/components/organisms/file-uploader/components/uploading-file.tsx"],"names":[],"mappings":";;AAiBA,sCAmBC;;AApCD,uDAMgC;AAChC,qEAA4D;AAC5D,kEAA8D;AAS9D,SAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,EAAsB;IACzF,OAAO,CACL,iCAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAA,yBAAQ,EAAC,IAAA,0CAAmB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,CAAC,aACnF,uBAAC,iBAAI,IACH,EAAE,EAAC,GAAG,EACN,OAAO,EAAE,wBAAW,CAAC,IAAI,EACzB,KAAK,EAAE,uBAAU,CAAC,KAAK,EACvB,SAAS,EAAC,6BAA6B,YAEtC,QAAQ,GACJ,EAEP,uBAAC,8BAAiB,IAChB,OAAO,EAAE,qCAAwB,CAAC,kBAAkB,EACpD,YAAY,QACZ,eAAe,EAAE,QAAQ,GACzB,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const dropAreaStyles: (props?: ({
2
+ tone?: "default" | "error" | "dragging" | null | undefined;
3
+ isInteractive?: boolean | null | undefined;
4
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ export declare const fileContainerStyles: (props?: ({
6
+ tone?: "loading" | "completed" | null | undefined;
7
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
+ //# sourceMappingURL=file-uploader-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader-styles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/file-uploader-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;mFAuB1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;mFAgB/B,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fileContainerStyles = exports.dropAreaStyles = void 0;
4
+ const class_variance_authority_1 = require("class-variance-authority");
5
+ exports.dropAreaStyles = (0, class_variance_authority_1.cva)([
6
+ 'w-full rounded-lg',
7
+ 'flex flex-col items-center justify-center gap-2',
8
+ 'px-6 py-8 min-h-[124px]',
9
+ 'text-center',
10
+ 'border border-dashed',
11
+ 'transition-colors',
12
+ ], {
13
+ variants: {
14
+ tone: {
15
+ default: 'border-gray-04 bg-white',
16
+ dragging: 'border-blue-01 bg-blue-04',
17
+ error: 'border-red-01 bg-white',
18
+ },
19
+ isInteractive: {
20
+ true: 'cursor-pointer',
21
+ false: 'cursor-default',
22
+ },
23
+ },
24
+ defaultVariants: { tone: 'default', isInteractive: true },
25
+ });
26
+ exports.fileContainerStyles = (0, class_variance_authority_1.cva)([
27
+ 'w-full rounded-lg min-h-[124px]',
28
+ 'flex flex-col justify-center gap-1',
29
+ 'px-4 py-4',
30
+ 'border border-solid border-gray-04',
31
+ ], {
32
+ variants: {
33
+ tone: {
34
+ loading: '',
35
+ completed: 'border-l-4 border-l-blue-01',
36
+ },
37
+ },
38
+ defaultVariants: { tone: 'loading' },
39
+ });
40
+ //# sourceMappingURL=file-uploader-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader-styles.js","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/file-uploader-styles.ts"],"names":[],"mappings":";;;AAAA,uEAA+C;AAElC,QAAA,cAAc,GAAG,IAAA,8BAAG,EAC/B;IACE,mBAAmB;IACnB,iDAAiD;IACjD,yBAAyB;IACzB,aAAa;IACb,sBAAsB;IACtB,mBAAmB;CACpB,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,yBAAyB;YAClC,QAAQ,EAAE,2BAA2B;YACrC,KAAK,EAAE,wBAAwB;SAChC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,gBAAgB;SACxB;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE;CAC1D,CACF,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,8BAAG,EACpC;IACE,iCAAiC;IACjC,oCAAoC;IACpC,WAAW;IACX,oCAAoC;CACrC,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,6BAA6B;SACzC;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare enum FileUploaderState {
2
+ DEFAULT = "DEFAULT",
3
+ LOADING = "LOADING",
4
+ COMPLETED = "COMPLETED",
5
+ ERROR = "ERROR"
6
+ }
7
+ //# sourceMappingURL=file-uploader-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader-types.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/file-uploader-types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileUploaderState = void 0;
4
+ var FileUploaderState;
5
+ (function (FileUploaderState) {
6
+ FileUploaderState["DEFAULT"] = "DEFAULT";
7
+ FileUploaderState["LOADING"] = "LOADING";
8
+ FileUploaderState["COMPLETED"] = "COMPLETED";
9
+ FileUploaderState["ERROR"] = "ERROR";
10
+ })(FileUploaderState || (exports.FileUploaderState = FileUploaderState = {}));
11
+ //# sourceMappingURL=file-uploader-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader-types.js","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/file-uploader-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"}
@@ -0,0 +1,24 @@
1
+ import { FileUploaderState } from './file-uploader-types';
2
+ export type FileUploaderProps = {
3
+ state?: FileUploaderState;
4
+ fileName?: string;
5
+ fileSize?: string;
6
+ progress?: number;
7
+ accept?: string;
8
+ isDisabled?: boolean;
9
+ dragAndDropText?: string;
10
+ linkTextDesktop?: string;
11
+ linkTextMobile?: string;
12
+ uploadDocumentText?: string;
13
+ dropActiveText?: string;
14
+ replaceLabel?: string;
15
+ deleteLabel?: string;
16
+ className?: string;
17
+ id?: string;
18
+ describedBy?: string;
19
+ onSelectFile?: (file: File) => void;
20
+ onReplace?: () => void;
21
+ onDelete?: () => void;
22
+ };
23
+ export declare function FileUploader({ state, fileName, fileSize, progress, accept, isDisabled, dragAndDropText, linkTextDesktop, linkTextMobile, uploadDocumentText, dropActiveText, replaceLabel, deleteLabel, className, id, describedBy, onSelectFile, onReplace, onDelete, }: FileUploaderProps): JSX.Element;
24
+ //# sourceMappingURL=file-uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/file-uploader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,KAAiC,EACjC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,EAAE,EACF,WAAW,EACX,YAAY,EACZ,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAuDjC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileUploader = FileUploader;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const tailwind_utils_1 = require("../../../utils/tailwind-utils");
6
+ const components_1 = require("./components");
7
+ const file_uploader_types_1 = require("./file-uploader-types");
8
+ const use_file_uploader_1 = require("./use-file-uploader");
9
+ function FileUploader({ state = file_uploader_types_1.FileUploaderState.DEFAULT, fileName, fileSize, progress, accept, isDisabled = false, dragAndDropText, linkTextDesktop, linkTextMobile, uploadDocumentText, dropActiveText, replaceLabel, deleteLabel, className, id, describedBy, onSelectFile, onReplace, onDelete, }) {
10
+ const isEmptyState = state === file_uploader_types_1.FileUploaderState.DEFAULT || state === file_uploader_types_1.FileUploaderState.ERROR;
11
+ const { inputRef, isDragging, openPicker, handleInputChange, handleDragOver, handleDragLeave, handleDrop, } = (0, use_file_uploader_1.useFileUploader)({ isInteractive: isEmptyState && !isDisabled, onSelectFile });
12
+ if (state === file_uploader_types_1.FileUploaderState.LOADING) {
13
+ return (0, jsx_runtime_1.jsx)(components_1.UploadingFile, { id: id, fileName: fileName, progress: progress, className: className });
14
+ }
15
+ if (state === file_uploader_types_1.FileUploaderState.COMPLETED) {
16
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex items-start gap-3', className), children: [(0, jsx_runtime_1.jsx)(components_1.UploadedFile, { id: id, fileName: fileName, fileSize: fileSize }), (0, jsx_runtime_1.jsx)(components_1.FileActions, { replaceLabel: replaceLabel, deleteLabel: deleteLabel, isDisabled: isDisabled, onReplace: onReplace, onDelete: onDelete })] }));
17
+ }
18
+ return ((0, jsx_runtime_1.jsx)(components_1.DropArea, { id: id, describedBy: describedBy, isError: state === file_uploader_types_1.FileUploaderState.ERROR, isDragging: isDragging, isDisabled: isDisabled, accept: accept, inputRef: inputRef, className: className, dragAndDropText: dragAndDropText, linkTextDesktop: linkTextDesktop, linkTextMobile: linkTextMobile, uploadDocumentText: uploadDocumentText, dropActiveText: dropActiveText, onOpenPicker: openPicker, onInputChange: handleInputChange, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop }));
19
+ }
20
+ //# sourceMappingURL=file-uploader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader.js","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/file-uploader.tsx"],"names":[],"mappings":";;AA2BA,oCA2EC;;AAtGD,kEAAyD;AACzD,6CAAkF;AAClF,+DAA0D;AAC1D,2DAAsD;AAwBtD,SAAgB,YAAY,CAAC,EAC3B,KAAK,GAAG,uCAAiB,CAAC,OAAO,EACjC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,GAAG,KAAK,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,EAAE,EACF,WAAW,EACX,YAAY,EACZ,SAAS,EACT,QAAQ,GACU;IAClB,MAAM,YAAY,GAAG,KAAK,KAAK,uCAAiB,CAAC,OAAO,IAAI,KAAK,KAAK,uCAAiB,CAAC,KAAK,CAAC;IAE9F,MAAM,EACJ,QAAQ,EACR,UAAU,EACV,UAAU,EACV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1B,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,UAAU,GAClB,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './file-uploader';
2
+ export * from './file-uploader-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./file-uploader"), exports);
18
+ __exportStar(require("./file-uploader-types"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,wDAAsC"}
@@ -0,0 +1,16 @@
1
+ import { ChangeEvent, DragEvent } from 'react';
2
+ type UseFileUploaderParams = {
3
+ isInteractive: boolean;
4
+ onSelectFile?: (file: File) => void;
5
+ };
6
+ export declare function useFileUploader({ isInteractive, onSelectFile }: UseFileUploaderParams): {
7
+ inputRef: import("react").RefObject<HTMLInputElement>;
8
+ isDragging: boolean;
9
+ openPicker: () => void;
10
+ handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
11
+ handleDragOver: (event: DragEvent<HTMLDivElement>) => void;
12
+ handleDragLeave: (event: DragEvent<HTMLDivElement>) => void;
13
+ handleDrop: (event: DragEvent<HTMLDivElement>) => void;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=use-file-uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-file-uploader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/use-file-uploader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,qBAAqB;;;sBAI7D,IAAI;+BAQO,WAAW,CAAC,gBAAgB,CAAC,KAAG,IAAI;4BAUvC,SAAS,CAAC,cAAc,CAAC,KAAG,IAAI;6BAQ/B,SAAS,CAAC,cAAc,CAAC,KAAG,IAAI;wBAKrC,SAAS,CAAC,cAAc,CAAC,KAAG,IAAI;EAwB5D"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useFileUploader = useFileUploader;
4
+ const react_1 = require("react");
5
+ function useFileUploader({ isInteractive, onSelectFile }) {
6
+ const inputRef = (0, react_1.useRef)(null);
7
+ const [isDragging, setIsDragging] = (0, react_1.useState)(false);
8
+ function openPicker() {
9
+ if (!isInteractive) {
10
+ return;
11
+ }
12
+ inputRef.current?.click();
13
+ }
14
+ function handleInputChange(event) {
15
+ const file = event.target.files?.[0];
16
+ if (file) {
17
+ onSelectFile?.(file);
18
+ }
19
+ event.target.value = '';
20
+ }
21
+ function handleDragOver(event) {
22
+ event.preventDefault();
23
+ if (isInteractive) {
24
+ setIsDragging(true);
25
+ }
26
+ }
27
+ function handleDragLeave(event) {
28
+ event.preventDefault();
29
+ setIsDragging(false);
30
+ }
31
+ function handleDrop(event) {
32
+ event.preventDefault();
33
+ setIsDragging(false);
34
+ if (!isInteractive) {
35
+ return;
36
+ }
37
+ const file = event.dataTransfer.files?.[0];
38
+ if (file) {
39
+ onSelectFile?.(file);
40
+ }
41
+ }
42
+ return {
43
+ inputRef,
44
+ isDragging,
45
+ openPicker,
46
+ handleInputChange,
47
+ handleDragOver,
48
+ handleDragLeave,
49
+ handleDrop,
50
+ };
51
+ }
52
+ //# sourceMappingURL=use-file-uploader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-file-uploader.js","sourceRoot":"","sources":["../../../../src/components/organisms/file-uploader/use-file-uploader.ts"],"names":[],"mappings":";;AAOA,0CA2DC;AAlED,iCAAiE;AAOjE,SAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,YAAY,EAAyB;IACpF,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAmB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEpD,SAAS,UAAU;QACjB,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,SAAS,iBAAiB,CAAC,KAAoC;QAC7D,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QAErC,IAAI,IAAI,EAAE,CAAC;YACT,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QAED,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED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