@synerise/ds-file-uploader 0.7.11 → 0.8.1
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/CHANGELOG.md +22 -0
- package/dist/AvatarUploader/AvatarUploader.styles.d.ts +4 -4
- package/dist/AvatarUploader/AvatarUploader.styles.d.ts.map +1 -1
- package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.js +2 -6
- package/dist/FileUploader.d.ts.map +1 -1
- package/dist/FileUploader.js +6 -7
- package/dist/FileUploader.styles.d.ts +24 -4
- package/dist/FileUploader.styles.d.ts.map +1 -1
- package/dist/FileUploader.styles.js +12 -10
- package/dist/FileView/FileView.js +2 -6
- package/dist/FileView/FileView.styles.d.ts +1 -1
- package/dist/FileView/FileView.styles.d.ts.map +1 -1
- package/dist/ItemUploader/ItemUploader.styles.d.ts +4 -4
- package/dist/ItemUploader/ItemUploader.styles.d.ts.map +1 -1
- package/dist/ItemUploader/UploaderButton/FileViewItem.js +2 -6
- package/dist/modules.d.js +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.8.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@0.8.0...@synerise/ds-file-uploader@0.8.1) (2025-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **file-uploader:** css rule specificity ([70334e5](https://github.com/Synerise/synerise-design/commit/70334e545c882cc2da7db39ec89178653b41e398))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.8.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@0.7.11...@synerise/ds-file-uploader@0.8.0) (2025-01-29)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* antd@4.24 react@18 ([d97a667](https://github.com/Synerise/synerise-design/commit/d97a667b1f33aed3177e1851de3b6f60be2d46a6))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.7.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@0.7.10...@synerise/ds-file-uploader@0.7.11) (2025-01-21)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @synerise/ds-file-uploader
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const UploaderContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const Description: import("styled-components").StyledComponent<import("react").
|
|
4
|
+
export declare const Description: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {
|
|
5
5
|
hasError?: boolean | undefined;
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const DropAreaContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
8
|
canUploadMore: boolean;
|
|
9
9
|
}, never>;
|
|
10
|
-
export declare const DropAreaLabel: import("styled-components").StyledComponent<import("react").
|
|
10
|
+
export declare const DropAreaLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
11
11
|
export declare const LargeDropAreaLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
12
|
-
export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<import("react").
|
|
12
|
+
export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
13
13
|
export declare const DropAreaButton: import("styled-components").StyledComponent<"button", any, {
|
|
14
14
|
isDropping?: boolean | undefined;
|
|
15
15
|
hasError?: boolean | undefined;
|
|
@@ -17,6 +17,6 @@ export declare const DropAreaButton: import("styled-components").StyledComponent
|
|
|
17
17
|
pressed: boolean;
|
|
18
18
|
filesLength: number;
|
|
19
19
|
}, never>;
|
|
20
|
-
export declare const ErrorMessage: import("styled-components").StyledComponent<import("react").
|
|
20
|
+
export declare const ErrorMessage: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
21
21
|
export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
22
22
|
//# sourceMappingURL=AvatarUploader.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarUploader.styles.d.ts","sourceRoot":"","sources":["../../src/AvatarUploader/AvatarUploader.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,SAAS,oEAGrB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAG7B,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"AvatarUploader.styles.d.ts","sourceRoot":"","sources":["../../src/AvatarUploader/AvatarUploader.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,SAAS,oEAGrB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAG7B,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa,uMAGzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,uMAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;SAuGpB,CAAC;AAEF,eAAO,MAAM,YAAY,uMAMxB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
2
|
import React, { useState } from 'react';
|
|
7
3
|
import { FormattedMessage } from 'react-intl';
|
|
8
4
|
import Tooltip from '@synerise/ds-tooltip';
|
|
@@ -27,7 +23,7 @@ var FileViewAvatar = function FileViewAvatar(_ref) {
|
|
|
27
23
|
file = data.file,
|
|
28
24
|
progress = data.progress;
|
|
29
25
|
var fileSource = URL.createObjectURL(data.file);
|
|
30
|
-
var finalTexts =
|
|
26
|
+
var finalTexts = _extends({
|
|
31
27
|
retryTooltip: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
32
28
|
id: "DS.FILE-UPLOADER.RETRY-TOOLTIP",
|
|
33
29
|
defaultMessage: "Retry"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../src/FileUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../src/FileUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD,OAAO,EAAe,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAgBtE,QAAA,MAAM,YAAY,gJAgBf,iBAAiB,sBAmInB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/FileUploader.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
2
|
import React, { useState, useCallback } from 'react';
|
|
8
3
|
import { FormattedMessage } from 'react-intl';
|
|
9
4
|
import { useDropzone } from 'react-dropzone';
|
|
10
5
|
import Icon, { AddM, InfoFillS, FileUploadL } from '@synerise/ds-icon';
|
|
11
6
|
import Tooltip from '@synerise/ds-tooltip';
|
|
7
|
+
import { useTheme } from '@synerise/ds-core';
|
|
12
8
|
import FileView from './FileView/FileView';
|
|
13
9
|
import * as S from './FileUploader.styles';
|
|
14
10
|
function readAsText(file) {
|
|
@@ -47,7 +43,8 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
47
43
|
var _useState = useState(true),
|
|
48
44
|
uploadSuccess = _useState[0],
|
|
49
45
|
setUploadSuccess = _useState[1];
|
|
50
|
-
var
|
|
46
|
+
var theme = useTheme();
|
|
47
|
+
var finalTexts = _extends({
|
|
51
48
|
buttonLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
52
49
|
id: "DS.FILE-UPLOADER.BUTTON-LABEL",
|
|
53
50
|
defaultMessage: "Upload file"
|
|
@@ -137,9 +134,11 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
137
134
|
"data-testid": "droparea",
|
|
138
135
|
filesLength: files.length
|
|
139
136
|
}, mode === 'multi-large' && files.length === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
|
|
137
|
+
color: theme.palette['grey-800'],
|
|
140
138
|
component: /*#__PURE__*/React.createElement(FileUploadL, null),
|
|
141
139
|
size: 48
|
|
142
140
|
}), /*#__PURE__*/React.createElement(S.LargeDropAreaLabel, null, finalTexts.buttonLabelLarge), /*#__PURE__*/React.createElement(S.LargeDropAreaDescription, null, finalTexts.buttonDescription)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
|
|
141
|
+
color: theme.palette['grey-600'],
|
|
143
142
|
component: /*#__PURE__*/React.createElement(AddM, null),
|
|
144
143
|
size: 24
|
|
145
144
|
}), /*#__PURE__*/React.createElement(S.DropAreaLabel, null, finalTexts.buttonLabel))))), files.length > 0 && files.map(function (file, index) {
|
|
@@ -154,7 +153,7 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
154
153
|
},
|
|
155
154
|
data: file,
|
|
156
155
|
retry: retry,
|
|
157
|
-
retryButtonProps:
|
|
156
|
+
retryButtonProps: _extends({}, getRootProps())
|
|
158
157
|
});
|
|
159
158
|
}), hasError && errors && errors.map(function (errorText, index) {
|
|
160
159
|
return /*#__PURE__*/React.createElement(S.ErrorMessage, {
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import Button from '@synerise/ds-button';
|
|
3
3
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const Description: import("styled-components").StyledComponent<
|
|
4
|
+
export declare const Description: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
|
|
5
|
+
size?: import("@synerise/ds-typography").TextSize | undefined;
|
|
6
|
+
ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
}) => import("react").JSX.Element, any, {
|
|
5
10
|
hasError?: boolean | undefined;
|
|
6
11
|
}, never>;
|
|
7
12
|
export declare const DropAreaContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
13
|
canUploadMore: boolean;
|
|
9
14
|
}, never>;
|
|
10
|
-
export declare const DropAreaLabel: import("styled-components").StyledComponent<
|
|
15
|
+
export declare const DropAreaLabel: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
|
|
16
|
+
size?: import("@synerise/ds-typography").TextSize | undefined;
|
|
17
|
+
ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
|
|
18
|
+
children?: import("react").ReactNode;
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
}) => import("react").JSX.Element, any, {}, never>;
|
|
11
21
|
export declare const LargeDropAreaLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
12
|
-
export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<
|
|
22
|
+
export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
|
|
23
|
+
size?: import("@synerise/ds-typography").TextSize | undefined;
|
|
24
|
+
ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
|
|
25
|
+
children?: import("react").ReactNode;
|
|
26
|
+
className?: string | undefined;
|
|
27
|
+
}) => import("react").JSX.Element, any, {}, never>;
|
|
13
28
|
export declare const DropAreaButton: import("styled-components").StyledComponent<"button", any, {
|
|
14
29
|
isDropping?: boolean | undefined;
|
|
15
30
|
hasError?: boolean | undefined;
|
|
@@ -18,7 +33,12 @@ export declare const DropAreaButton: import("styled-components").StyledComponent
|
|
|
18
33
|
filesLength: number;
|
|
19
34
|
hidden: boolean;
|
|
20
35
|
}, never>;
|
|
21
|
-
export declare const ErrorMessage: import("styled-components").StyledComponent<
|
|
36
|
+
export declare const ErrorMessage: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
|
|
37
|
+
size?: import("@synerise/ds-typography").TextSize | undefined;
|
|
38
|
+
ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
|
|
39
|
+
children?: import("react").ReactNode;
|
|
40
|
+
className?: string | undefined;
|
|
41
|
+
}) => import("react").JSX.Element, any, {}, never>;
|
|
22
42
|
export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
23
43
|
export declare const UploadButton: import("styled-components").StyledComponent<typeof Button, any, {}, never>;
|
|
24
44
|
//# sourceMappingURL=FileUploader.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploader.styles.d.ts","sourceRoot":"","sources":["../src/FileUploader.styles.ts"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAIzC,eAAO,MAAM,SAAS,oEAErB,CAAC;AAEF,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"FileUploader.styles.d.ts","sourceRoot":"","sources":["../src/FileUploader.styles.ts"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAIzC,eAAO,MAAM,SAAS,oEAErB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;kDAKzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;kDAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;YACX,OAAO;SAyGhB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;kDAMxB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC;AAEF,eAAO,MAAM,YAAY,4EAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import
|
|
2
|
+
import { Label as TypographyLabel, Text } from '@synerise/ds-typography';
|
|
3
3
|
import Button from '@synerise/ds-button';
|
|
4
4
|
import { IconContainer } from '@synerise/ds-icon';
|
|
5
5
|
import { hexToRgba } from '@synerise/ds-utils';
|
|
@@ -7,7 +7,7 @@ export var Container = styled.div.withConfig({
|
|
|
7
7
|
displayName: "FileUploaderstyles__Container",
|
|
8
8
|
componentId: "sc-62r2x6-0"
|
|
9
9
|
})(["width:100%;"]);
|
|
10
|
-
export var Description = styled(
|
|
10
|
+
export var Description = styled(Text).withConfig({
|
|
11
11
|
displayName: "FileUploaderstyles__Description",
|
|
12
12
|
componentId: "sc-62r2x6-1"
|
|
13
13
|
})(["&&{margin:", ";display:block;color:", ";}"], function (props) {
|
|
@@ -21,33 +21,35 @@ export var DropAreaContainer = styled.div.withConfig({
|
|
|
21
21
|
})(["width:100%;margin:", ";"], function (props) {
|
|
22
22
|
return props.canUploadMore ? '12px 0 8px' : '0';
|
|
23
23
|
});
|
|
24
|
-
export var DropAreaLabel = styled(
|
|
24
|
+
export var DropAreaLabel = styled(Text).withConfig({
|
|
25
25
|
displayName: "FileUploaderstyles__DropAreaLabel",
|
|
26
26
|
componentId: "sc-62r2x6-3"
|
|
27
|
-
})(["color:", ";font-weight:500;"], function (props) {
|
|
28
|
-
return props.theme.palette['grey-
|
|
27
|
+
})(["&&{color:", ";font-weight:500;}"], function (props) {
|
|
28
|
+
return props.theme.palette['grey-600'];
|
|
29
29
|
});
|
|
30
30
|
export var LargeDropAreaLabel = styled(TypographyLabel).withConfig({
|
|
31
31
|
displayName: "FileUploaderstyles__LargeDropAreaLabel",
|
|
32
32
|
componentId: "sc-62r2x6-4"
|
|
33
33
|
})(["&&{font-size:14px;margin:4px 0 0;display:block;color:", ";}"], function (props) {
|
|
34
|
-
return props.theme.palette['grey-
|
|
34
|
+
return props.theme.palette['grey-800'];
|
|
35
35
|
});
|
|
36
|
-
export var LargeDropAreaDescription = styled(
|
|
36
|
+
export var LargeDropAreaDescription = styled(Text).withConfig({
|
|
37
37
|
displayName: "FileUploaderstyles__LargeDropAreaDescription",
|
|
38
38
|
componentId: "sc-62r2x6-5"
|
|
39
39
|
})(["&&{margin:4px 0 0;display:block;color:", ";}"], function (props) {
|
|
40
|
-
return props.theme.palette['grey-
|
|
40
|
+
return props.theme.palette['grey-600'];
|
|
41
41
|
});
|
|
42
42
|
export var DropAreaButton = styled.button.withConfig({
|
|
43
43
|
displayName: "FileUploaderstyles__DropAreaButton",
|
|
44
44
|
componentId: "sc-62r2x6-6"
|
|
45
|
-
})(["display:", ";align-items:center;border:1px dashed ", ";padding:11px 12px;border-radius:3px;cursor:pointer;background-color:transparent;width:100%;height:48px;transition:height 0.03s;", ";", "{fill:", ";}
|
|
45
|
+
})(["display:", ";align-items:center;border:1px dashed ", ";padding:11px 12px;border-radius:3px;cursor:pointer;background-color:transparent;width:100%;height:48px;transition:height 0.03s;", ";", ";", "{fill:", ";}", " ", " &:hover:not(:disabled){background-color:", ";border-color:", ";", ",", "{color:", ";}", "{fill:", ";color:", ";}}&:disabled{background-color:", ";", "{color:", ";}}&&:active{color:", ";border-color:", ";background-color:", ";}&:focus:not(:active):not(:disabled){border-color:", ";background-color:", ";}&:disabled{span,", "{opacity:0.4;}}", ""], function (props) {
|
|
46
46
|
return props.hidden ? 'none' : 'flex';
|
|
47
47
|
}, function (props) {
|
|
48
48
|
return props.theme.palette['grey-400'];
|
|
49
49
|
}, function (props) {
|
|
50
50
|
return props.mode === 'multi-large' && props.filesLength === 0 && "\n height: 160px;\n flex-direction: column;\n text-align: center;\n justify-content: center;\n ";
|
|
51
|
+
}, function (props) {
|
|
52
|
+
return props.mode !== 'multi-large' && "\n gap: 12px;\n ";
|
|
51
53
|
}, IconContainer, function (props) {
|
|
52
54
|
return props.theme.palette['grey-700'];
|
|
53
55
|
}, function (props) {
|
|
@@ -81,7 +83,7 @@ export var DropAreaButton = styled.button.withConfig({
|
|
|
81
83
|
}, IconContainer, function (props) {
|
|
82
84
|
return props.isDropping && !props.disabled && "\n height: " + (props.mode === 'multi-large' && props.filesLength === 0 ? '160px' : 'auto') + ";\n background-color: " + props.theme.palette['blue-050'] + " !important;\n border-color: " + props.theme.palette['blue-300'] + " !important;\n\n span, " + DropAreaLabel + ", " + LargeDropAreaLabel + ", " + LargeDropAreaDescription + " {\n color: " + props.theme.palette['blue-500'] + " !important;\n }\n\n " + IconContainer + " {\n fill: " + props.theme.palette['blue-500'] + " !important;\n }\n ";
|
|
83
85
|
});
|
|
84
|
-
export var ErrorMessage = styled(
|
|
86
|
+
export var ErrorMessage = styled(Text).withConfig({
|
|
85
87
|
displayName: "FileUploaderstyles__ErrorMessage",
|
|
86
88
|
componentId: "sc-62r2x6-7"
|
|
87
89
|
})(["&&{margin:8px 0 0;display:block;color:", ";}"], function (props) {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
2
|
import React, { useState } from 'react';
|
|
7
3
|
import filesize from 'filesize.js';
|
|
8
4
|
import ProgressBar from '@synerise/ds-progress-bar';
|
|
@@ -43,7 +39,7 @@ var FileView = function FileView(_ref) {
|
|
|
43
39
|
file = data.file,
|
|
44
40
|
progress = data.progress,
|
|
45
41
|
success = data.success;
|
|
46
|
-
var finalTexts =
|
|
42
|
+
var finalTexts = _extends({
|
|
47
43
|
size: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
48
44
|
id: "DS.FILE-UPLOADER.SIZE",
|
|
49
45
|
defaultMessage: "Size"
|
|
@@ -7,7 +7,7 @@ export declare const Info: import("styled-components").StyledComponent<"div", an
|
|
|
7
7
|
export declare const PopconfirmOnRemove: import("styled-components").StyledComponent<import("@synerise/ds-popconfirm/dist/Popconfirm.types").PopconfirmType, any, {}, never>;
|
|
8
8
|
export declare const FileWeight: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
9
|
export declare const Name: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
10
|
-
export declare const SizeOrError: import("styled-components").StyledComponent<import("react").
|
|
10
|
+
export declare const SizeOrError: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
11
11
|
export declare const RemoveWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
12
|
export declare const CheckButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
13
|
export declare const RemoveButtonWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileView.styles.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,IAAI;cAA0B,OAAO;SAIjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,qIAQ9B,CAAC;AACF,eAAO,MAAM,UAAU,oEAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAWhB,CAAC;AAEF,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"FileView.styles.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,IAAI;cAA0B,OAAO;SAIjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,qIAQ9B,CAAC;AACF,eAAO,MAAM,UAAU,oEAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAWhB,CAAC;AAEF,eAAO,MAAM,WAAW,uMAIvB,CAAC;AACF,eAAO,MAAM,aAAa,oEAyBzB,CAAC;AACF,eAAO,MAAM,kBAAkB,oEAsB9B,CAAC;AACF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;SA2F7B,CAAC"}
|
|
@@ -4,9 +4,9 @@ export declare const UploaderContainer: import("styled-components").StyledCompon
|
|
|
4
4
|
export declare const DropAreaContainer: import("styled-components").StyledComponent<"div", any, {
|
|
5
5
|
canUploadMore: boolean;
|
|
6
6
|
}, never>;
|
|
7
|
-
export declare const DropAreaLabel: import("styled-components").StyledComponent<import("react").
|
|
7
|
+
export declare const DropAreaLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
8
8
|
export declare const LargeDropAreaLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
9
|
-
export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<import("react").
|
|
9
|
+
export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
10
10
|
export declare const DropAreaButton: import("styled-components").StyledComponent<"button", any, {
|
|
11
11
|
isDropping?: boolean | undefined;
|
|
12
12
|
hasError?: boolean | undefined;
|
|
@@ -14,8 +14,8 @@ export declare const DropAreaButton: import("styled-components").StyledComponent
|
|
|
14
14
|
pressed: boolean;
|
|
15
15
|
filesLength: number;
|
|
16
16
|
}, never>;
|
|
17
|
-
export declare const ErrorMessage: import("styled-components").StyledComponent<import("react").
|
|
18
|
-
export declare const Description: import("styled-components").StyledComponent<import("react").
|
|
17
|
+
export declare const ErrorMessage: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
18
|
+
export declare const Description: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {
|
|
19
19
|
hasError?: boolean | undefined;
|
|
20
20
|
}, never>;
|
|
21
21
|
export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemUploader.styles.d.ts","sourceRoot":"","sources":["../../src/ItemUploader/ItemUploader.styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,SAAS,oEAErB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAE7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"ItemUploader.styles.d.ts","sourceRoot":"","sources":["../../src/ItemUploader/ItemUploader.styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,SAAS,oEAErB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAE7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa,uMAGzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,uMAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;SAuGpB,CAAC;AAEF,eAAO,MAAM,YAAY,uMAMxB,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
2
|
import React, { useState } from 'react';
|
|
7
3
|
import { FormattedMessage } from 'react-intl';
|
|
8
4
|
import Tooltip from '@synerise/ds-tooltip';
|
|
@@ -25,7 +21,7 @@ var FileViewItem = function FileViewItem(_ref) {
|
|
|
25
21
|
error = data.error,
|
|
26
22
|
file = data.file,
|
|
27
23
|
progress = data.progress;
|
|
28
|
-
var finalTexts =
|
|
24
|
+
var finalTexts = _extends({
|
|
29
25
|
retryTooltip: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
30
26
|
id: "DS.FILE-UPLOADER.RETRY-TOOLTIP",
|
|
31
27
|
defaultMessage: "Retry"
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-file-uploader",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "FileUploader UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^0.
|
|
38
|
-
"@synerise/ds-icon": "^0.
|
|
39
|
-
"@synerise/ds-loader": "^0.
|
|
40
|
-
"@synerise/ds-popconfirm": "^0.
|
|
41
|
-
"@synerise/ds-progress-bar": "^0.
|
|
42
|
-
"@synerise/ds-tooltip": "^0.
|
|
43
|
-
"@synerise/ds-typography": "^0.
|
|
44
|
-
"@synerise/ds-utils": "^0.
|
|
37
|
+
"@synerise/ds-button": "^0.23.1",
|
|
38
|
+
"@synerise/ds-icon": "^0.71.1",
|
|
39
|
+
"@synerise/ds-loader": "^0.4.1",
|
|
40
|
+
"@synerise/ds-popconfirm": "^0.11.1",
|
|
41
|
+
"@synerise/ds-progress-bar": "^0.10.1",
|
|
42
|
+
"@synerise/ds-tooltip": "^0.15.1",
|
|
43
|
+
"@synerise/ds-typography": "^0.17.1",
|
|
44
|
+
"@synerise/ds-utils": "^0.32.1",
|
|
45
45
|
"filesize.js": "^2.0.0",
|
|
46
46
|
"react-dropzone": "^10.2.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@synerise/ds-core": "*",
|
|
50
|
-
"react": ">=16.9.0 <=
|
|
50
|
+
"react": ">=16.9.0 <= 18.3.1",
|
|
51
51
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
52
|
-
"styled-components": "5.
|
|
52
|
+
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "38cb22e1c46d175306dd87e10649410eb93a4e44"
|
|
55
55
|
}
|