@os-design/upload 1.0.258 → 1.0.259

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 (39) hide show
  1. package/dist/@types/emotion.d.js +1 -0
  2. package/dist/ImageUpload/index.d.ts +50 -0
  3. package/dist/ImageUpload/index.d.ts.map +1 -0
  4. package/dist/{esm/ImageUpload → ImageUpload}/index.js +44 -33
  5. package/dist/ImageUpload/utils/defaultLocale.d.ts.map +1 -0
  6. package/dist/{esm/ImageUpload → ImageUpload}/utils/defaultLocale.js +1 -2
  7. package/dist/ImageUploadSkeleton/index.d.ts +10 -0
  8. package/dist/ImageUploadSkeleton/index.d.ts.map +1 -0
  9. package/dist/{esm/ImageUploadSkeleton → ImageUploadSkeleton}/index.js +7 -8
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/{esm/index.js → index.js} +1 -2
  12. package/package.json +12 -13
  13. package/src/@types/emotion.d.ts +1 -1
  14. package/src/ImageUpload/index.tsx +4 -4
  15. package/src/ImageUploadSkeleton/index.tsx +3 -3
  16. package/dist/cjs/@types/emotion.d.js +0 -4
  17. package/dist/cjs/@types/emotion.d.js.map +0 -1
  18. package/dist/cjs/ImageUpload/index.js +0 -167
  19. package/dist/cjs/ImageUpload/index.js.map +0 -1
  20. package/dist/cjs/ImageUpload/utils/defaultLocale.js +0 -12
  21. package/dist/cjs/ImageUpload/utils/defaultLocale.js.map +0 -1
  22. package/dist/cjs/ImageUploadSkeleton/index.js +0 -38
  23. package/dist/cjs/ImageUploadSkeleton/index.js.map +0 -1
  24. package/dist/cjs/index.js +0 -49
  25. package/dist/cjs/index.js.map +0 -1
  26. package/dist/esm/@types/emotion.d.js +0 -2
  27. package/dist/esm/@types/emotion.d.js.map +0 -1
  28. package/dist/esm/ImageUpload/index.js.map +0 -1
  29. package/dist/esm/ImageUpload/utils/defaultLocale.js.map +0 -1
  30. package/dist/esm/ImageUploadSkeleton/index.js.map +0 -1
  31. package/dist/esm/index.js.map +0 -1
  32. package/dist/types/ImageUpload/index.d.ts +0 -24
  33. package/dist/types/ImageUpload/index.d.ts.map +0 -1
  34. package/dist/types/ImageUpload/utils/defaultLocale.d.ts.map +0 -1
  35. package/dist/types/ImageUploadSkeleton/index.d.ts +0 -7
  36. package/dist/types/ImageUploadSkeleton/index.d.ts.map +0 -1
  37. package/dist/types/index.d.ts.map +0 -1
  38. /package/dist/{types/ImageUpload → ImageUpload}/utils/defaultLocale.d.ts +0 -0
  39. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ import '@emotion/react';
@@ -0,0 +1,50 @@
1
+ import { type WithSize } from '@os-design/styles';
2
+ import { type Accept } from 'react-dropzone';
3
+ import { type ImageUploadLocale } from './utils/defaultLocale';
4
+ type JsxDivProps = Omit<JSX.IntrinsicElements['div'], 'defaultValue' | 'onChange' | 'ref'>;
5
+ export interface ImageUploadProps extends JsxDivProps, WithSize {
6
+ /**
7
+ * The url of the image.
8
+ * @default undefined
9
+ */
10
+ url?: string;
11
+ /**
12
+ * Allowed image formats.
13
+ * @default undefined
14
+ */
15
+ accept?: Accept;
16
+ /**
17
+ * The locale of the component.
18
+ * @default undefined
19
+ */
20
+ locale?: ImageUploadLocale;
21
+ /**
22
+ * The selected local file, or null if the image is marked as deleted.
23
+ * @default undefined
24
+ */
25
+ value?: File | null;
26
+ /**
27
+ * The default value.
28
+ * @default undefined
29
+ */
30
+ defaultValue?: File | null;
31
+ /**
32
+ * The change event handler.
33
+ * @default undefined
34
+ */
35
+ onChange?: (value: File | null) => void;
36
+ }
37
+ interface OverlayProps {
38
+ isDragActive: boolean;
39
+ hasImage: boolean;
40
+ }
41
+ export declare const Overlay: import("@emotion/styled").StyledComponent<{
42
+ theme?: import("@emotion/react").Theme;
43
+ as?: React.ElementType;
44
+ } & OverlayProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
45
+ /**
46
+ * The component to upload an image.
47
+ */
48
+ declare const ImageUpload: import("react").ForwardRefExoticComponent<ImageUploadProps & import("react").RefAttributes<HTMLDivElement>>;
49
+ export default ImageUpload;
50
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ImageUpload/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,QAAQ,EAId,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,gBAAgB,CAAC;AAC1D,OAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,KAAK,WAAW,GAAG,IAAI,CACrB,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAC5B,cAAc,GAAG,UAAU,GAAG,KAAK,CACpC,CAAC;AACF,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,QAAQ;IAC7D;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAsBD,UAAU,YAAY;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,OAAO;;SAsKX,MACD,WAAE;wHAjJT,CAAC;AAgGF;;GAEG;AACH,QAAA,MAAM,WAAW,6GAiGhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -1,4 +1,3 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
1
  import { css } from '@emotion/react';
3
2
  import styled from '@emotion/styled';
4
3
  import { Button, Image } from '@os-design/core';
@@ -6,9 +5,10 @@ import { Delete, Picture } from '@os-design/icons';
6
5
  import { resetFocusStyles, sizeStyles, transitionStyles } from '@os-design/styles';
7
6
  import { ThemeOverrider, clr } from '@os-design/theming';
8
7
  import { isTouchDevice, omitEmotionProps, useForwardedState } from '@os-design/utils';
9
- import React, { forwardRef, useCallback, useMemo } from 'react';
8
+ import { forwardRef, useCallback, useMemo } from 'react';
10
9
  import { useDropzone } from 'react-dropzone';
11
10
  import defaultLocale from './utils/defaultLocale';
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const overlayHasImageStyles = p => p.hasImage && css`
13
13
  background-color: hsla(0, 0%, 0%, ${p.theme.imageUploadOverlayOpacity});
14
14
  color: hsl(0, 0%, 100%);
@@ -150,45 +150,56 @@ const ImageUpload = /*#__PURE__*/forwardRef(({
150
150
  const renderImage = useCallback(() => {
151
151
  if (!source) return null;
152
152
  if (typeof forwardedValue === 'object' && forwardedValue !== null) {
153
- return /*#__PURE__*/React.createElement(LocalImage, {
153
+ return /*#__PURE__*/_jsx(LocalImage, {
154
154
  src: source
155
155
  });
156
156
  }
157
- return /*#__PURE__*/React.createElement(RemoteImage, {
157
+ return /*#__PURE__*/_jsx(RemoteImage, {
158
158
  url: source
159
159
  });
160
160
  }, [forwardedValue, source]);
161
- return /*#__PURE__*/React.createElement(Container, _extends({
161
+ return /*#__PURE__*/_jsxs(Container, {
162
162
  isDragActive: isDragActive,
163
163
  hasImage: hasImage,
164
164
  size: size,
165
- onMouseDown: e => e.preventDefault()
166
- }, rest, {
167
- ref: ref
168
- }), /*#__PURE__*/React.createElement("input", getInputProps()), renderImage(), /*#__PURE__*/React.createElement(Overlay, _extends({
169
- isDragActive: isDragActive,
170
- hasImage: hasImage
171
- }, getRootProps({
172
- onKeyDown: e => {
173
- if (e.key === 'Backspace') setForwardedValue(null);
174
- }
175
- }) // eslint-disable-line @typescript-eslint/no-explicit-any
176
- ), /*#__PURE__*/React.createElement(Content, {
177
- isDragActive: isDragActive
178
- }, /*#__PURE__*/React.createElement(PictureIcon, null), /*#__PURE__*/React.createElement(Title, null, touchDevice ? locale.touchTitle : locale.dropTitle)), hasImage && /*#__PURE__*/React.createElement(ThemeOverrider, {
179
- overrides: {
180
- buttonGhostColorText: [0, 0, 100],
181
- buttonGhostColorBgHover: [0, 0, 100, 0.1]
182
- }
183
- }, /*#__PURE__*/React.createElement(DeleteButtonContainer, null, /*#__PURE__*/React.createElement(Button, {
184
- type: "ghost",
185
- wide: "never",
186
- onClick: e => {
187
- setForwardedValue(null);
188
- e.stopPropagation();
189
- }
190
- }, /*#__PURE__*/React.createElement(Delete, null))))));
165
+ onMouseDown: e => e.preventDefault(),
166
+ ...rest,
167
+ ref: ref,
168
+ children: [/*#__PURE__*/_jsx("input", {
169
+ ...getInputProps()
170
+ }), renderImage(), /*#__PURE__*/_jsxs(Overlay, {
171
+ isDragActive: isDragActive,
172
+ hasImage: hasImage,
173
+ ...getRootProps({
174
+ onKeyDown: e => {
175
+ if (e.key === 'Backspace') setForwardedValue(null);
176
+ }
177
+ }) // eslint-disable-line @typescript-eslint/no-explicit-any
178
+ ,
179
+ children: [/*#__PURE__*/_jsxs(Content, {
180
+ isDragActive: isDragActive,
181
+ children: [/*#__PURE__*/_jsx(PictureIcon, {}), /*#__PURE__*/_jsx(Title, {
182
+ children: touchDevice ? locale.touchTitle : locale.dropTitle
183
+ })]
184
+ }), hasImage && /*#__PURE__*/_jsx(ThemeOverrider, {
185
+ overrides: {
186
+ buttonGhostColorText: [0, 0, 100],
187
+ buttonGhostColorBgHover: [0, 0, 100, 0.1]
188
+ },
189
+ children: /*#__PURE__*/_jsx(DeleteButtonContainer, {
190
+ children: /*#__PURE__*/_jsx(Button, {
191
+ type: "ghost",
192
+ wide: "never",
193
+ onClick: e => {
194
+ setForwardedValue(null);
195
+ e.stopPropagation();
196
+ },
197
+ children: /*#__PURE__*/_jsx(Delete, {})
198
+ })
199
+ })
200
+ })]
201
+ })]
202
+ });
191
203
  });
192
204
  ImageUpload.displayName = 'ImageUpload';
193
- export default ImageUpload;
194
- //# sourceMappingURL=index.js.map
205
+ export default ImageUpload;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultLocale.d.ts","sourceRoot":"","sources":["../../../src/ImageUpload/utils/defaultLocale.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,aAAa,EAAE,iBAGpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -2,5 +2,4 @@ const defaultLocale = {
2
2
  touchTitle: 'Click here to choose an image',
3
3
  dropTitle: 'Drop an image here or click to choose it'
4
4
  };
5
- export default defaultLocale;
6
- //# sourceMappingURL=defaultLocale.js.map
5
+ export default defaultLocale;
@@ -0,0 +1,10 @@
1
+ import { type SkeletonProps } from '@os-design/core';
2
+ import { type WithSize } from '@os-design/styles';
3
+ export type ImageUploadSkeletonProps = Omit<SkeletonProps, 'width'> & WithSize;
4
+ /**
5
+ * Provides an image upload placeholder while a user waits for
6
+ * the content to load.
7
+ */
8
+ declare const ImageUploadSkeleton: import("react").ForwardRefExoticComponent<Omit<SkeletonProps, "width"> & WithSize & import("react").RefAttributes<HTMLDivElement>>;
9
+ export default ImageUploadSkeleton;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ImageUploadSkeleton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI9D,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC;AAW/E;;;GAGG;AACH,QAAA,MAAM,mBAAmB,oIAKvB,CAAC;AAIH,eAAe,mBAAmB,CAAC"}
@@ -1,9 +1,9 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
1
  import styled from '@emotion/styled';
3
2
  import { Skeleton } from '@os-design/core';
4
3
  import { sizeStyles } from '@os-design/styles';
5
4
  import { omitEmotionProps } from '@os-design/utils';
6
- import React, { forwardRef } from 'react';
5
+ import { forwardRef } from 'react';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const StyledImageUploadSkeleton = styled(Skeleton, omitEmotionProps('size'))`
8
8
  max-width: ${p => p.theme.imageUploadMaxWidth}em;
9
9
  height: ${p => p.theme.imageUploadMinHeight}em;
@@ -14,11 +14,10 @@ const StyledImageUploadSkeleton = styled(Skeleton, omitEmotionProps('size'))`
14
14
  * Provides an image upload placeholder while a user waits for
15
15
  * the content to load.
16
16
  */
17
- const ImageUploadSkeleton = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement(StyledImageUploadSkeleton, _extends({
18
- width: "100%"
19
- }, props, {
17
+ const ImageUploadSkeleton = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(StyledImageUploadSkeleton, {
18
+ width: "100%",
19
+ ...props,
20
20
  ref: ref
21
- })));
21
+ }));
22
22
  ImageUploadSkeleton.displayName = 'ImageUploadSkeleton';
23
- export default ImageUploadSkeleton;
24
- //# sourceMappingURL=index.js.map
23
+ export default ImageUploadSkeleton;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  export * from './ImageUpload';
2
2
  export { default as ImageUpload } from './ImageUpload';
3
3
  export * from './ImageUploadSkeleton';
4
- export { default as ImageUploadSkeleton } from './ImageUploadSkeleton';
5
- //# sourceMappingURL=index.js.map
4
+ export { default as ImageUploadSkeleton } from './ImageUploadSkeleton';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@os-design/upload",
3
- "version": "1.0.258",
3
+ "version": "1.0.259",
4
4
  "license": "UNLICENSED",
5
5
  "repository": "git@gitlab.com:os-team/libs/os-design.git",
6
- "main": "dist/cjs/index.js",
7
- "module": "dist/esm/index.js",
8
- "types": "dist/types/index.d.ts",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
9
  "files": [
10
10
  "dist",
11
11
  "src",
@@ -20,9 +20,8 @@
20
20
  "sideEffects": false,
21
21
  "scripts": {
22
22
  "clean": "rimraf dist",
23
- "build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist/esm --source-maps",
24
- "build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx --out-dir dist/cjs --source-maps",
25
- "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
23
+ "build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist",
24
+ "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationDir dist",
26
25
  "build": "yarn clean && npm-run-all 'build:*'",
27
26
  "ncu": "ncu -u"
28
27
  },
@@ -30,11 +29,11 @@
30
29
  "access": "public"
31
30
  },
32
31
  "dependencies": {
33
- "@os-design/core": "^1.0.255",
34
- "@os-design/icons": "^1.0.59",
35
- "@os-design/styles": "^1.0.56",
36
- "@os-design/theming": "^1.0.52",
37
- "@os-design/utils": "^1.0.76",
32
+ "@os-design/core": "^1.0.256",
33
+ "@os-design/icons": "^1.0.60",
34
+ "@os-design/styles": "^1.0.57",
35
+ "@os-design/theming": "^1.0.53",
36
+ "@os-design/utils": "^1.0.77",
38
37
  "react-dropzone": "^14.3.5"
39
38
  },
40
39
  "devDependencies": {
@@ -47,5 +46,5 @@
47
46
  "react": ">=18",
48
47
  "react-dom": ">=18"
49
48
  },
50
- "gitHead": "0ee69cf3308f3a647c4e10defca576538b815139"
49
+ "gitHead": "86a83e87297a07afe132782ca2c95023b7139276"
51
50
  }
@@ -2,6 +2,6 @@ import '@emotion/react';
2
2
  import { Theme as BaseTheme } from '@os-design/theming';
3
3
 
4
4
  declare module '@emotion/react' {
5
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
5
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
6
6
  export interface Theme extends BaseTheme {}
7
7
  }
@@ -3,7 +3,7 @@ import styled from '@emotion/styled';
3
3
  import { Button, Image } from '@os-design/core';
4
4
  import { Delete, Picture } from '@os-design/icons';
5
5
  import {
6
- WithSize,
6
+ type WithSize,
7
7
  resetFocusStyles,
8
8
  sizeStyles,
9
9
  transitionStyles,
@@ -14,9 +14,9 @@ import {
14
14
  omitEmotionProps,
15
15
  useForwardedState,
16
16
  } from '@os-design/utils';
17
- import React, { forwardRef, useCallback, useMemo } from 'react';
18
- import { Accept, useDropzone } from 'react-dropzone';
19
- import defaultLocale, { ImageUploadLocale } from './utils/defaultLocale';
17
+ import { forwardRef, useCallback, useMemo } from 'react';
18
+ import { type Accept, useDropzone } from 'react-dropzone';
19
+ import defaultLocale, { type ImageUploadLocale } from './utils/defaultLocale';
20
20
 
21
21
  type JsxDivProps = Omit<
22
22
  JSX.IntrinsicElements['div'],
@@ -1,8 +1,8 @@
1
1
  import styled from '@emotion/styled';
2
- import { Skeleton, SkeletonProps } from '@os-design/core';
3
- import { sizeStyles, WithSize } from '@os-design/styles';
2
+ import { Skeleton, type SkeletonProps } from '@os-design/core';
3
+ import { sizeStyles, type WithSize } from '@os-design/styles';
4
4
  import { omitEmotionProps } from '@os-design/utils';
5
- import React, { forwardRef } from 'react';
5
+ import { forwardRef } from 'react';
6
6
 
7
7
  export type ImageUploadSkeletonProps = Omit<SkeletonProps, 'width'> & WithSize;
8
8
 
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- require("@emotion/react");
4
- //# sourceMappingURL=emotion.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emotion.d.js","names":["require"],"sources":["../../../src/@types/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport { Theme as BaseTheme } from '@os-design/theming';\n\ndeclare module '@emotion/react' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface Theme extends BaseTheme {}\n}\n"],"mappings":";;AAAAA,OAAA","ignoreList":[]}
@@ -1,167 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.Overlay = void 0;
7
- var _react = require("@emotion/react");
8
- var _styled = _interopRequireDefault(require("@emotion/styled"));
9
- var _core = require("@os-design/core");
10
- var _icons = require("@os-design/icons");
11
- var _styles = require("@os-design/styles");
12
- var _theming = require("@os-design/theming");
13
- var _utils = require("@os-design/utils");
14
- var _react2 = _interopRequireWildcard(require("react"));
15
- var _reactDropzone = require("react-dropzone");
16
- var _defaultLocale = _interopRequireDefault(require("./utils/defaultLocale"));
17
- var _excluded = ["url", "accept", "locale", "value", "defaultValue", "onChange", "size"];
18
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
23
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
24
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
25
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
26
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
27
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
28
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
29
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
30
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
31
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
32
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
33
- var overlayHasImageStyles = function overlayHasImageStyles(p) {
34
- return p.hasImage && (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: hsla(0, 0%, 0%, ", ");\n color: hsl(0, 0%, 100%);\n "])), p.theme.imageUploadOverlayOpacity);
35
- };
36
- var overlayHasImageHoverStyles = function overlayHasImageHoverStyles(p) {
37
- return p.hasImage && !p.isDragActive && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @media (hover: hover) {\n opacity: 0;\n\n &:hover {\n opacity: 1;\n }\n }\n "])));
38
- };
39
- var Overlay = exports.Overlay = (0, _styled["default"])('div', (0, _utils.omitEmotionProps)('isDragActive', 'hasImage'))(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", ";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n padding: ", "em;\n\n ", ";\n ", "\n ", ";\n"])), _styles.resetFocusStyles, function (p) {
40
- return p.theme.imageUploadOverlayPadding;
41
- }, overlayHasImageStyles, overlayHasImageHoverStyles, (0, _styles.transitionStyles)('opacity'));
42
- var contentIsDragActiveStyles = function contentIsDragActiveStyles(p) {
43
- return p.isDragActive && (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transform: scale(0.92);\n "])));
44
- };
45
- var Content = (0, _styled["default"])('div', (0, _utils.omitEmotionProps)('isDragActive'))(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n ", ";\n"])), contentIsDragActiveStyles, (0, _styles.transitionStyles)('transform'));
46
- var PictureIcon = (0, _styled["default"])(_icons.Picture)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n opacity: 0.8;\n font-size: 2.5em;\n"])));
47
- var Title = _styled["default"].div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n opacity: 0.8;\n"])));
48
- var DeleteButtonContainer = _styled["default"].div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0.5em;\n right: 0.5em;\n"])));
49
- var hoverStyles = function hoverStyles(p) {
50
- return (0, _react.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-color: ", ";\n"])), (0, _theming.clr)(p.theme.imageUploadNoImageHoverColorBorder));
51
- };
52
- var notHasImageStyles = function notHasImageStyles(p) {
53
- return !p.hasImage && (0, _react.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 2px dashed ", ";\n\n @media (hover: hover) {\n &:hover {\n ", ";\n }\n }\n "])), (0, _theming.clr)(p.theme.imageUploadNoImageColorBg), (0, _theming.clr)(p.theme.imageUploadNoImageColorBorder), hoverStyles(p));
54
- };
55
- var focusStyles = function focusStyles(p) {
56
- return (0, _react.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n &:focus-within {\n & > div {\n opacity: 1;\n }\n ", ";\n }\n"])), hoverStyles(p));
57
- };
58
- var isDragActiveStyles = function isDragActiveStyles(p) {
59
- return p.isDragActive && (0, _react.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n ", ";\n "])), hoverStyles(p));
60
- };
61
- var LocalImage = _styled["default"].img(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: 100%;\n vertical-align: top;\n"])));
62
- var RemoteImage = (0, _styled["default"])(_core.Image)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n vertical-align: top;\n"])));
63
- var Container = (0, _styled["default"])('div', (0, _utils.omitEmotionProps)('isDragActive', 'hasImage', 'size'))(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n overflow: hidden;\n box-sizing: border-box;\n\n max-width: ", "em;\n min-height: ", "em;\n border-radius: ", "em;\n color: ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n"])), function (p) {
64
- return p.theme.imageUploadMaxWidth;
65
- }, function (p) {
66
- return p.theme.imageUploadMinHeight;
67
- }, function (p) {
68
- return p.theme.borderRadius;
69
- }, function (p) {
70
- return (0, _theming.clr)(p.theme.colorText);
71
- }, notHasImageStyles, focusStyles, isDragActiveStyles, _styles.sizeStyles, (0, _styles.transitionStyles)('border'));
72
-
73
- /**
74
- * The component to upload an image.
75
- */
76
- var ImageUpload = /*#__PURE__*/(0, _react2.forwardRef)(function (_ref, ref) {
77
- var url = _ref.url,
78
- _ref$accept = _ref.accept,
79
- accept = _ref$accept === void 0 ? {
80
- 'image/*': ['.jpeg', '.png', '.webp']
81
- } : _ref$accept,
82
- _ref$locale = _ref.locale,
83
- locale = _ref$locale === void 0 ? _defaultLocale["default"] : _ref$locale,
84
- value = _ref.value,
85
- defaultValue = _ref.defaultValue,
86
- onChange = _ref.onChange,
87
- size = _ref.size,
88
- rest = _objectWithoutProperties(_ref, _excluded);
89
- var touchDevice = (0, _react2.useMemo)(function () {
90
- return (0, _utils.isTouchDevice)();
91
- }, []);
92
- var _useForwardedState = (0, _utils.useForwardedState)({
93
- value: value,
94
- defaultValue: defaultValue,
95
- onChange: onChange
96
- }),
97
- _useForwardedState2 = _slicedToArray(_useForwardedState, 2),
98
- forwardedValue = _useForwardedState2[0],
99
- setForwardedValue = _useForwardedState2[1];
100
- var _useDropzone = (0, _reactDropzone.useDropzone)({
101
- accept: accept,
102
- multiple: false,
103
- onDrop: function onDrop(_ref2) {
104
- var _ref3 = _slicedToArray(_ref2, 1),
105
- file = _ref3[0];
106
- return setForwardedValue(file);
107
- }
108
- }),
109
- getRootProps = _useDropzone.getRootProps,
110
- getInputProps = _useDropzone.getInputProps,
111
- isDragActive = _useDropzone.isDragActive;
112
- var source = (0, _react2.useMemo)(function () {
113
- if (forwardedValue === null) return null; // If the user select an image
114
- if (forwardedValue) return URL.createObjectURL(forwardedValue); // If the image already exists
115
- if (url) return url;
116
- return null;
117
- }, [forwardedValue, url]);
118
- var hasImage = (0, _react2.useMemo)(function () {
119
- return !!source;
120
- }, [source]);
121
- var renderImage = (0, _react2.useCallback)(function () {
122
- if (!source) return null;
123
- if (_typeof(forwardedValue) === 'object' && forwardedValue !== null) {
124
- return /*#__PURE__*/_react2["default"].createElement(LocalImage, {
125
- src: source
126
- });
127
- }
128
- return /*#__PURE__*/_react2["default"].createElement(RemoteImage, {
129
- url: source
130
- });
131
- }, [forwardedValue, source]);
132
- return /*#__PURE__*/_react2["default"].createElement(Container, _extends({
133
- isDragActive: isDragActive,
134
- hasImage: hasImage,
135
- size: size,
136
- onMouseDown: function onMouseDown(e) {
137
- return e.preventDefault();
138
- }
139
- }, rest, {
140
- ref: ref
141
- }), /*#__PURE__*/_react2["default"].createElement("input", getInputProps()), renderImage(), /*#__PURE__*/_react2["default"].createElement(Overlay, _extends({
142
- isDragActive: isDragActive,
143
- hasImage: hasImage
144
- }, getRootProps({
145
- onKeyDown: function onKeyDown(e) {
146
- if (e.key === 'Backspace') setForwardedValue(null);
147
- }
148
- }) // eslint-disable-line @typescript-eslint/no-explicit-any
149
- ), /*#__PURE__*/_react2["default"].createElement(Content, {
150
- isDragActive: isDragActive
151
- }, /*#__PURE__*/_react2["default"].createElement(PictureIcon, null), /*#__PURE__*/_react2["default"].createElement(Title, null, touchDevice ? locale.touchTitle : locale.dropTitle)), hasImage && /*#__PURE__*/_react2["default"].createElement(_theming.ThemeOverrider, {
152
- overrides: {
153
- buttonGhostColorText: [0, 0, 100],
154
- buttonGhostColorBgHover: [0, 0, 100, 0.1]
155
- }
156
- }, /*#__PURE__*/_react2["default"].createElement(DeleteButtonContainer, null, /*#__PURE__*/_react2["default"].createElement(_core.Button, {
157
- type: "ghost",
158
- wide: "never",
159
- onClick: function onClick(e) {
160
- setForwardedValue(null);
161
- e.stopPropagation();
162
- }
163
- }, /*#__PURE__*/_react2["default"].createElement(_icons.Delete, null))))));
164
- });
165
- ImageUpload.displayName = 'ImageUpload';
166
- var _default = exports["default"] = ImageUpload;
167
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_react","require","_styled","_interopRequireDefault","_core","_icons","_styles","_theming","_utils","_react2","_interopRequireWildcard","_reactDropzone","_defaultLocale","_excluded","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_templateObject12","_templateObject13","_templateObject14","_templateObject15","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","o","Symbol","iterator","constructor","prototype","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","_arrayLikeToArray","toString","slice","name","Array","from","test","l","f","next","done","push","value","isArray","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","s","includes","propertyIsEnumerable","_taggedTemplateLiteral","freeze","defineProperties","raw","overlayHasImageStyles","p","hasImage","css","theme","imageUploadOverlayOpacity","overlayHasImageHoverStyles","isDragActive","Overlay","exports","styled","omitEmotionProps","resetFocusStyles","imageUploadOverlayPadding","transitionStyles","contentIsDragActiveStyles","Content","PictureIcon","Picture","Title","div","DeleteButtonContainer","hoverStyles","clr","imageUploadNoImageHoverColorBorder","notHasImageStyles","imageUploadNoImageColorBg","imageUploadNoImageColorBorder","focusStyles","isDragActiveStyles","LocalImage","img","RemoteImage","Image","Container","imageUploadMaxWidth","imageUploadMinHeight","borderRadius","colorText","sizeStyles","ImageUpload","forwardRef","_ref","ref","url","_ref$accept","accept","_ref$locale","locale","defaultLocale","defaultValue","onChange","size","rest","touchDevice","useMemo","isTouchDevice","_useForwardedState","useForwardedState","_useForwardedState2","forwardedValue","setForwardedValue","_useDropzone","useDropzone","multiple","onDrop","_ref2","_ref3","file","getRootProps","getInputProps","source","URL","createObjectURL","renderImage","useCallback","createElement","src","onMouseDown","preventDefault","onKeyDown","key","touchTitle","dropTitle","ThemeOverrider","overrides","buttonGhostColorText","buttonGhostColorBgHover","Button","type","wide","onClick","stopPropagation","Delete","displayName","_default"],"sources":["../../../src/ImageUpload/index.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport { Button, Image } from '@os-design/core';\nimport { Delete, Picture } from '@os-design/icons';\nimport {\n WithSize,\n resetFocusStyles,\n sizeStyles,\n transitionStyles,\n} from '@os-design/styles';\nimport { ThemeOverrider, clr } from '@os-design/theming';\nimport {\n isTouchDevice,\n omitEmotionProps,\n useForwardedState,\n} from '@os-design/utils';\nimport React, { forwardRef, useCallback, useMemo } from 'react';\nimport { Accept, useDropzone } from 'react-dropzone';\nimport defaultLocale, { ImageUploadLocale } from './utils/defaultLocale';\n\ntype JsxDivProps = Omit<\n JSX.IntrinsicElements['div'],\n 'defaultValue' | 'onChange' | 'ref'\n>;\nexport interface ImageUploadProps extends JsxDivProps, WithSize {\n /**\n * The url of the image.\n * @default undefined\n */\n url?: string;\n /**\n * Allowed image formats.\n * @default undefined\n */\n accept?: Accept;\n /**\n * The locale of the component.\n * @default undefined\n */\n locale?: ImageUploadLocale;\n /**\n * The selected local file, or null if the image is marked as deleted.\n * @default undefined\n */\n value?: File | null;\n /**\n * The default value.\n * @default undefined\n */\n defaultValue?: File | null;\n /**\n * The change event handler.\n * @default undefined\n */\n onChange?: (value: File | null) => void;\n}\n\nconst overlayHasImageStyles = (p) =>\n p.hasImage &&\n css`\n background-color: hsla(0, 0%, 0%, ${p.theme.imageUploadOverlayOpacity});\n color: hsl(0, 0%, 100%);\n `;\n\nconst overlayHasImageHoverStyles = (p) =>\n p.hasImage &&\n !p.isDragActive &&\n css`\n @media (hover: hover) {\n opacity: 0;\n\n &:hover {\n opacity: 1;\n }\n }\n `;\n\ninterface OverlayProps {\n isDragActive: boolean;\n hasImage: boolean;\n}\nexport const Overlay = styled(\n 'div',\n omitEmotionProps('isDragActive', 'hasImage')\n)<OverlayProps>`\n ${resetFocusStyles};\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n padding: ${(p) => p.theme.imageUploadOverlayPadding}em;\n\n ${overlayHasImageStyles};\n ${overlayHasImageHoverStyles}\n ${transitionStyles('opacity')};\n`;\n\nconst contentIsDragActiveStyles = (p) =>\n p.isDragActive &&\n css`\n transform: scale(0.92);\n `;\n\ntype ContentProps = Pick<OverlayProps, 'isDragActive'>;\nconst Content = styled('div', omitEmotionProps('isDragActive'))<ContentProps>`\n ${contentIsDragActiveStyles};\n ${transitionStyles('transform')};\n`;\n\nconst PictureIcon = styled(Picture)`\n opacity: 0.8;\n font-size: 2.5em;\n`;\n\nconst Title = styled.div`\n opacity: 0.8;\n`;\n\nconst DeleteButtonContainer = styled.div`\n position: absolute;\n top: 0.5em;\n right: 0.5em;\n`;\n\nconst hoverStyles = (p) => css`\n border-color: ${clr(p.theme.imageUploadNoImageHoverColorBorder)};\n`;\n\nconst notHasImageStyles = (p) =>\n !p.hasImage &&\n css`\n background-color: ${clr(p.theme.imageUploadNoImageColorBg)};\n border: 2px dashed ${clr(p.theme.imageUploadNoImageColorBorder)};\n\n @media (hover: hover) {\n &:hover {\n ${hoverStyles(p)};\n }\n }\n `;\n\nconst focusStyles = (p) => css`\n &:focus-within {\n & > div {\n opacity: 1;\n }\n ${hoverStyles(p)};\n }\n`;\n\nconst isDragActiveStyles = (p) =>\n p.isDragActive &&\n css`\n ${hoverStyles(p)};\n `;\n\nconst LocalImage = styled.img`\n width: 100%;\n vertical-align: top;\n`;\n\nconst RemoteImage = styled(Image)`\n vertical-align: top;\n`;\n\ninterface ContainerProps extends WithSize {\n isDragActive: boolean;\n hasImage: boolean;\n}\n\nconst Container = styled(\n 'div',\n omitEmotionProps('isDragActive', 'hasImage', 'size')\n)<ContainerProps>`\n position: relative;\n cursor: pointer;\n overflow: hidden;\n box-sizing: border-box;\n\n max-width: ${(p) => p.theme.imageUploadMaxWidth}em;\n min-height: ${(p) => p.theme.imageUploadMinHeight}em;\n border-radius: ${(p) => p.theme.borderRadius}em;\n color: ${(p) => clr(p.theme.colorText)};\n\n ${notHasImageStyles};\n ${focusStyles};\n ${isDragActiveStyles};\n ${sizeStyles};\n ${transitionStyles('border')};\n`;\n\n/**\n * The component to upload an image.\n */\nconst ImageUpload = forwardRef<HTMLDivElement, ImageUploadProps>(\n (\n {\n url,\n accept = { 'image/*': ['.jpeg', '.png', '.webp'] },\n locale = defaultLocale,\n value,\n defaultValue,\n onChange,\n size,\n ...rest\n },\n ref\n ) => {\n const touchDevice = useMemo(() => isTouchDevice(), []);\n const [forwardedValue, setForwardedValue] = useForwardedState({\n value,\n defaultValue,\n onChange,\n });\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n accept,\n multiple: false,\n onDrop: ([file]) => setForwardedValue(file),\n });\n\n const source = useMemo(() => {\n if (forwardedValue === null) return null; // If the user select an image\n if (forwardedValue) return URL.createObjectURL(forwardedValue); // If the image already exists\n if (url) return url;\n return null;\n }, [forwardedValue, url]);\n\n const hasImage = useMemo(() => !!source, [source]);\n\n const renderImage = useCallback(() => {\n if (!source) return null;\n if (typeof forwardedValue === 'object' && forwardedValue !== null) {\n return <LocalImage src={source} />;\n }\n return <RemoteImage url={source} />;\n }, [forwardedValue, source]);\n\n return (\n <Container\n isDragActive={isDragActive}\n hasImage={hasImage}\n size={size}\n onMouseDown={(e) => e.preventDefault()}\n {...rest}\n ref={ref}\n >\n <input {...getInputProps()} />\n {renderImage()}\n\n <Overlay\n isDragActive={isDragActive}\n hasImage={hasImage}\n {\n ...getRootProps({\n onKeyDown: (e) => {\n if (e.key === 'Backspace') setForwardedValue(null);\n },\n } as any) // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n >\n <Content isDragActive={isDragActive}>\n <PictureIcon />\n <Title>{touchDevice ? locale.touchTitle : locale.dropTitle}</Title>\n </Content>\n\n {hasImage && (\n <ThemeOverrider\n overrides={{\n buttonGhostColorText: [0, 0, 100],\n buttonGhostColorBgHover: [0, 0, 100, 0.1],\n }}\n >\n <DeleteButtonContainer>\n <Button\n type='ghost'\n wide='never'\n onClick={(e) => {\n setForwardedValue(null);\n e.stopPropagation();\n }}\n >\n <Delete />\n </Button>\n </DeleteButtonContainer>\n </ThemeOverrider>\n )}\n </Overlay>\n </Container>\n );\n }\n);\n\nImageUpload.displayName = 'ImageUpload';\n\nexport default ImageUpload;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAC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,CAAC,EAAK;MAChB,IAAIA,CAAC,CAAC6I,GAAG,KAAK,WAAW,EAAEpB,iBAAiB,CAAC,IAAI,CAAC;IACpD;EACF,CAAQ,CAAC,CAAC;EAAA,gBAGZ9I,OAAA,YAAA6J,aAAA,CAAC5D,OAAO;IAACT,YAAY,EAAEA;EAAa,gBAClCxF,OAAA,YAAA6J,aAAA,CAAC3D,WAAW,MAAE,CAAC,eACflG,OAAA,YAAA6J,aAAA,CAACzD,KAAK,QAAEmC,WAAW,GAAGN,MAAM,CAACkC,UAAU,GAAGlC,MAAM,CAACmC,SAAiB,CAC3D,CAAC,EAETjF,QAAQ,iBACPnF,OAAA,YAAA6J,aAAA,CAAC/J,QAAA,CAAAuK,cAAc;IACbC,SAAS,EAAE;MACTC,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC;MACjCC,uBAAuB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG;IAC1C;EAAE,gBAEFxK,OAAA,YAAA6J,aAAA,CAACvD,qBAAqB,qBACpBtG,OAAA,YAAA6J,aAAA,CAAClK,KAAA,CAAA8K,MAAM;IACLC,IAAI,EAAC,OAAO;IACZC,IAAI,EAAC,OAAO;IACZC,OAAO,EAAE,SAATA,OAAOA,CAAGvJ,CAAC,EAAK;MACdyH,iBAAiB,CAAC,IAAI,CAAC;MACvBzH,CAAC,CAACwJ,eAAe,CAAC,CAAC;IACrB;EAAE,gBAEF7K,OAAA,YAAA6J,aAAA,CAACjK,MAAA,CAAAkL,MAAM,MAAE,CACH,CACa,CACT,CAEX,CACA,CAAC;AAEhB,CACF,CAAC;AAEDrD,WAAW,CAACsD,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAAAtF,OAAA,cAEzB+B,WAAW","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var defaultLocale = {
8
- touchTitle: 'Click here to choose an image',
9
- dropTitle: 'Drop an image here or click to choose it'
10
- };
11
- var _default = exports["default"] = defaultLocale;
12
- //# sourceMappingURL=defaultLocale.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultLocale.js","names":["defaultLocale","touchTitle","dropTitle","_default","exports"],"sources":["../../../../src/ImageUpload/utils/defaultLocale.ts"],"sourcesContent":["export interface ImageUploadLocale {\n touchTitle: string;\n dropTitle: string;\n}\n\nconst defaultLocale: ImageUploadLocale = {\n touchTitle: 'Click here to choose an image',\n dropTitle: 'Drop an image here or click to choose it',\n};\n\nexport default defaultLocale;\n"],"mappings":";;;;;;AAKA,IAAMA,aAAgC,GAAG;EACvCC,UAAU,EAAE,+BAA+B;EAC3CC,SAAS,EAAE;AACb,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaJ,aAAa","ignoreList":[]}
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _styled = _interopRequireDefault(require("@emotion/styled"));
9
- var _core = require("@os-design/core");
10
- var _styles = require("@os-design/styles");
11
- var _utils = require("@os-design/utils");
12
- var _react = _interopRequireWildcard(require("react"));
13
- var _templateObject;
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
17
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
18
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
19
- var StyledImageUploadSkeleton = (0, _styled["default"])(_core.Skeleton, (0, _utils.omitEmotionProps)('size'))(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-width: ", "em;\n height: ", "em;\n ", ";\n"])), function (p) {
20
- return p.theme.imageUploadMaxWidth;
21
- }, function (p) {
22
- return p.theme.imageUploadMinHeight;
23
- }, _styles.sizeStyles);
24
-
25
- /**
26
- * Provides an image upload placeholder while a user waits for
27
- * the content to load.
28
- */
29
- var ImageUploadSkeleton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
- return /*#__PURE__*/_react["default"].createElement(StyledImageUploadSkeleton, _extends({
31
- width: "100%"
32
- }, props, {
33
- ref: ref
34
- }));
35
- });
36
- ImageUploadSkeleton.displayName = 'ImageUploadSkeleton';
37
- var _default = exports["default"] = ImageUploadSkeleton;
38
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_styled","_interopRequireDefault","require","_core","_styles","_utils","_react","_interopRequireWildcard","_templateObject","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_taggedTemplateLiteral","slice","freeze","defineProperties","raw","value","StyledImageUploadSkeleton","styled","Skeleton","omitEmotionProps","p","theme","imageUploadMaxWidth","imageUploadMinHeight","sizeStyles","ImageUploadSkeleton","forwardRef","props","ref","createElement","width","displayName","_default","exports"],"sources":["../../../src/ImageUploadSkeleton/index.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Skeleton, SkeletonProps } from '@os-design/core';\nimport { sizeStyles, WithSize } from '@os-design/styles';\nimport { omitEmotionProps } from '@os-design/utils';\nimport React, { forwardRef } from 'react';\n\nexport type ImageUploadSkeletonProps = Omit<SkeletonProps, 'width'> & WithSize;\n\nconst StyledImageUploadSkeleton = styled(\n Skeleton,\n omitEmotionProps('size')\n)<WithSize>`\n max-width: ${(p) => p.theme.imageUploadMaxWidth}em;\n height: ${(p) => p.theme.imageUploadMinHeight}em;\n ${sizeStyles};\n`;\n\n/**\n * Provides an image upload placeholder while a user waits for\n * the content to load.\n */\nconst ImageUploadSkeleton = forwardRef<\n HTMLDivElement,\n ImageUploadSkeletonProps\n>((props, ref) => (\n <StyledImageUploadSkeleton width='100%' {...props} ref={ref} />\n));\n\nImageUploadSkeleton.displayName = 'ImageUploadSkeleton';\n\nexport default ImageUploadSkeleton;\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAA0C,IAAAM,eAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,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CAAA,MAAAM,CAAA,CAAAN,CAAA,IAAAC,CAAA,CAAAD,CAAA,aAAAM,CAAA,KAAAW,QAAA,CAAAK,KAAA,OAAAF,SAAA;AAAA,SAAAG,uBAAAzB,CAAA,EAAAG,CAAA,WAAAA,CAAA,KAAAA,CAAA,GAAAH,CAAA,CAAA0B,KAAA,MAAAf,MAAA,CAAAgB,MAAA,CAAAhB,MAAA,CAAAiB,gBAAA,CAAA5B,CAAA,IAAA6B,GAAA,IAAAC,KAAA,EAAAnB,MAAA,CAAAgB,MAAA,CAAAxB,CAAA;AAI1C,IAAM4B,yBAAyB,GAAG,IAAAC,kBAAM,EACtCC,cAAQ,EACR,IAAAC,uBAAgB,EAAC,MAAM,CACzB,CAAC,CAAApC,eAAA,KAAAA,eAAA,GAAA2B,sBAAA,6DACc,UAACU,CAAC;EAAA,OAAKA,CAAC,CAACC,KAAK,CAACC,mBAAmB;AAAA,GACrC,UAACF,CAAC;EAAA,OAAKA,CAAC,CAACC,KAAK,CAACE,oBAAoB;AAAA,GAC3CC,kBAAU,CACb;;AAED;AACA;AACA;AACA;AACA,IAAMC,mBAAmB,gBAAG,IAAAC,iBAAU,EAGpC,UAACC,KAAK,EAAEC,GAAG;EAAA,oBACX/C,MAAA,YAAAgD,aAAA,CAACb,yBAAyB,EAAAZ,QAAA;IAAC0B,KAAK,EAAC;EAAM,GAAKH,KAAK;IAAEC,GAAG,EAAEA;EAAI,EAAE,CAAC;AAAA,CAChE,CAAC;AAEFH,mBAAmB,CAACM,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEzCR,mBAAmB","ignoreList":[]}
package/dist/cjs/index.js DELETED
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- var _exportNames = {
8
- ImageUpload: true,
9
- ImageUploadSkeleton: true
10
- };
11
- Object.defineProperty(exports, "ImageUpload", {
12
- enumerable: true,
13
- get: function get() {
14
- return _ImageUpload["default"];
15
- }
16
- });
17
- Object.defineProperty(exports, "ImageUploadSkeleton", {
18
- enumerable: true,
19
- get: function get() {
20
- return _ImageUploadSkeleton["default"];
21
- }
22
- });
23
- var _ImageUpload = _interopRequireWildcard(require("./ImageUpload"));
24
- Object.keys(_ImageUpload).forEach(function (key) {
25
- if (key === "default" || key === "__esModule") return;
26
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
27
- if (key in exports && exports[key] === _ImageUpload[key]) return;
28
- Object.defineProperty(exports, key, {
29
- enumerable: true,
30
- get: function get() {
31
- return _ImageUpload[key];
32
- }
33
- });
34
- });
35
- var _ImageUploadSkeleton = _interopRequireWildcard(require("./ImageUploadSkeleton"));
36
- Object.keys(_ImageUploadSkeleton).forEach(function (key) {
37
- if (key === "default" || key === "__esModule") return;
38
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
39
- if (key in exports && exports[key] === _ImageUploadSkeleton[key]) return;
40
- Object.defineProperty(exports, key, {
41
- enumerable: true,
42
- get: function get() {
43
- return _ImageUploadSkeleton[key];
44
- }
45
- });
46
- });
47
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
48
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
49
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_ImageUpload","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_ImageUploadSkeleton","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set"],"sources":["../../src/index.ts"],"sourcesContent":["export * from './ImageUpload';\nexport { default as ImageUpload } from './ImageUpload';\nexport * from './ImageUploadSkeleton';\nexport { default as ImageUploadSkeleton } from './ImageUploadSkeleton';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAJ,YAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,YAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAd,YAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,oBAAA,GAAAd,uBAAA,CAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,oBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,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AO,CAAA,GAAAA,CAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import '@emotion/react';
2
- //# sourceMappingURL=emotion.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emotion.d.js","names":[],"sources":["../../../src/@types/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport { Theme as BaseTheme } from '@os-design/theming';\n\ndeclare module '@emotion/react' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface Theme extends BaseTheme {}\n}\n"],"mappings":"AAAA,OAAO,gBAAgB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["css","styled","Button","Image","Delete","Picture","resetFocusStyles","sizeStyles","transitionStyles","ThemeOverrider","clr","isTouchDevice","omitEmotionProps","useForwardedState","React","forwardRef","useCallback","useMemo","useDropzone","defaultLocale","overlayHasImageStyles","p","hasImage","theme","imageUploadOverlayOpacity","overlayHasImageHoverStyles","isDragActive","Overlay","imageUploadOverlayPadding","contentIsDragActiveStyles","Content","PictureIcon","Title","div","DeleteButtonContainer","hoverStyles","imageUploadNoImageHoverColorBorder","notHasImageStyles","imageUploadNoImageColorBg","imageUploadNoImageColorBorder","focusStyles","isDragActiveStyles","LocalImage","img","RemoteImage","Container","imageUploadMaxWidth","imageUploadMinHeight","borderRadius","colorText","ImageUpload","url","accept","locale","value","defaultValue","onChange","size","rest","ref","touchDevice","forwardedValue","setForwardedValue","getRootProps","getInputProps","multiple","onDrop","file","source","URL","createObjectURL","renderImage","createElement","src","_extends","onMouseDown","e","preventDefault","onKeyDown","key","touchTitle","dropTitle","overrides","buttonGhostColorText","buttonGhostColorBgHover","type","wide","onClick","stopPropagation","displayName"],"sources":["../../../src/ImageUpload/index.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport { Button, Image } from '@os-design/core';\nimport { Delete, Picture } from '@os-design/icons';\nimport {\n WithSize,\n resetFocusStyles,\n sizeStyles,\n transitionStyles,\n} from '@os-design/styles';\nimport { ThemeOverrider, clr } from '@os-design/theming';\nimport {\n isTouchDevice,\n omitEmotionProps,\n useForwardedState,\n} from '@os-design/utils';\nimport React, { forwardRef, useCallback, useMemo } from 'react';\nimport { Accept, useDropzone } from 'react-dropzone';\nimport defaultLocale, { ImageUploadLocale } from './utils/defaultLocale';\n\ntype JsxDivProps = Omit<\n JSX.IntrinsicElements['div'],\n 'defaultValue' | 'onChange' | 'ref'\n>;\nexport interface ImageUploadProps extends JsxDivProps, WithSize {\n /**\n * The url of the image.\n * @default undefined\n */\n url?: string;\n /**\n * Allowed image formats.\n * @default undefined\n */\n accept?: Accept;\n /**\n * The locale of the component.\n * @default undefined\n */\n locale?: ImageUploadLocale;\n /**\n * The selected local file, or null if the image is marked as deleted.\n * @default undefined\n */\n value?: File | null;\n /**\n * The default value.\n * @default undefined\n */\n defaultValue?: File | null;\n /**\n * The change event handler.\n * @default undefined\n */\n onChange?: (value: File | null) => void;\n}\n\nconst overlayHasImageStyles = (p) =>\n p.hasImage &&\n css`\n background-color: hsla(0, 0%, 0%, ${p.theme.imageUploadOverlayOpacity});\n color: hsl(0, 0%, 100%);\n `;\n\nconst overlayHasImageHoverStyles = (p) =>\n p.hasImage &&\n !p.isDragActive &&\n css`\n @media (hover: hover) {\n opacity: 0;\n\n &:hover {\n opacity: 1;\n }\n }\n `;\n\ninterface OverlayProps {\n isDragActive: boolean;\n hasImage: boolean;\n}\nexport const Overlay = styled(\n 'div',\n omitEmotionProps('isDragActive', 'hasImage')\n)<OverlayProps>`\n ${resetFocusStyles};\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n padding: ${(p) => p.theme.imageUploadOverlayPadding}em;\n\n ${overlayHasImageStyles};\n ${overlayHasImageHoverStyles}\n ${transitionStyles('opacity')};\n`;\n\nconst contentIsDragActiveStyles = (p) =>\n p.isDragActive &&\n css`\n transform: scale(0.92);\n `;\n\ntype ContentProps = Pick<OverlayProps, 'isDragActive'>;\nconst Content = styled('div', omitEmotionProps('isDragActive'))<ContentProps>`\n ${contentIsDragActiveStyles};\n ${transitionStyles('transform')};\n`;\n\nconst PictureIcon = styled(Picture)`\n opacity: 0.8;\n font-size: 2.5em;\n`;\n\nconst Title = styled.div`\n opacity: 0.8;\n`;\n\nconst DeleteButtonContainer = styled.div`\n position: absolute;\n top: 0.5em;\n right: 0.5em;\n`;\n\nconst hoverStyles = (p) => css`\n border-color: ${clr(p.theme.imageUploadNoImageHoverColorBorder)};\n`;\n\nconst notHasImageStyles = (p) =>\n !p.hasImage &&\n css`\n background-color: ${clr(p.theme.imageUploadNoImageColorBg)};\n border: 2px dashed ${clr(p.theme.imageUploadNoImageColorBorder)};\n\n @media (hover: hover) {\n &:hover {\n ${hoverStyles(p)};\n }\n }\n `;\n\nconst focusStyles = (p) => css`\n &:focus-within {\n & > div {\n opacity: 1;\n }\n ${hoverStyles(p)};\n }\n`;\n\nconst isDragActiveStyles = (p) =>\n p.isDragActive &&\n css`\n ${hoverStyles(p)};\n `;\n\nconst LocalImage = styled.img`\n width: 100%;\n vertical-align: top;\n`;\n\nconst RemoteImage = styled(Image)`\n vertical-align: top;\n`;\n\ninterface ContainerProps extends WithSize {\n isDragActive: boolean;\n hasImage: boolean;\n}\n\nconst Container = styled(\n 'div',\n omitEmotionProps('isDragActive', 'hasImage', 'size')\n)<ContainerProps>`\n position: relative;\n cursor: pointer;\n overflow: hidden;\n box-sizing: border-box;\n\n max-width: ${(p) => p.theme.imageUploadMaxWidth}em;\n min-height: ${(p) => p.theme.imageUploadMinHeight}em;\n border-radius: ${(p) => p.theme.borderRadius}em;\n color: ${(p) => clr(p.theme.colorText)};\n\n ${notHasImageStyles};\n ${focusStyles};\n ${isDragActiveStyles};\n ${sizeStyles};\n ${transitionStyles('border')};\n`;\n\n/**\n * The component to upload an image.\n */\nconst ImageUpload = forwardRef<HTMLDivElement, ImageUploadProps>(\n (\n {\n url,\n accept = { 'image/*': ['.jpeg', '.png', '.webp'] },\n locale = defaultLocale,\n value,\n defaultValue,\n onChange,\n size,\n ...rest\n },\n ref\n ) => {\n const touchDevice = useMemo(() => isTouchDevice(), []);\n const [forwardedValue, setForwardedValue] = useForwardedState({\n value,\n defaultValue,\n onChange,\n });\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n accept,\n multiple: false,\n onDrop: ([file]) => setForwardedValue(file),\n });\n\n const source = useMemo(() => {\n if (forwardedValue === null) return null; // If the user select an image\n if (forwardedValue) return URL.createObjectURL(forwardedValue); // If the image already exists\n if (url) return url;\n return null;\n }, [forwardedValue, url]);\n\n const hasImage = useMemo(() => !!source, [source]);\n\n const renderImage = useCallback(() => {\n if (!source) return null;\n if (typeof forwardedValue === 'object' && forwardedValue !== null) {\n return <LocalImage src={source} />;\n }\n return <RemoteImage url={source} />;\n }, [forwardedValue, source]);\n\n return (\n <Container\n isDragActive={isDragActive}\n hasImage={hasImage}\n size={size}\n onMouseDown={(e) => e.preventDefault()}\n {...rest}\n ref={ref}\n >\n <input {...getInputProps()} />\n {renderImage()}\n\n <Overlay\n isDragActive={isDragActive}\n hasImage={hasImage}\n {\n ...getRootProps({\n onKeyDown: (e) => {\n if (e.key === 'Backspace') setForwardedValue(null);\n },\n } as any) // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n >\n <Content isDragActive={isDragActive}>\n <PictureIcon />\n <Title>{touchDevice ? locale.touchTitle : locale.dropTitle}</Title>\n </Content>\n\n {hasImage && (\n <ThemeOverrider\n overrides={{\n buttonGhostColorText: [0, 0, 100],\n buttonGhostColorBgHover: [0, 0, 100, 0.1],\n }}\n >\n <DeleteButtonContainer>\n <Button\n type='ghost'\n wide='never'\n onClick={(e) => {\n setForwardedValue(null);\n e.stopPropagation();\n }}\n >\n <Delete />\n </Button>\n </DeleteButtonContainer>\n </ThemeOverrider>\n )}\n </Overlay>\n </Container>\n );\n }\n);\n\nImageUpload.displayName = 'ImageUpload';\n\nexport default Image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C,IAAK;MAChB,IAAIA,CAAC,CAACG,GAAG,KAAK,WAAW,EAAEjB,iBAAiB,CAAC,IAAI,CAAC;IACpD;EACF,CAAQ,CAAC,CAAC;EAAA,gBAGZhD,KAAA,CAAA0D,aAAA,CAAC1C,OAAO;IAACJ,YAAY,EAAEA;EAAa,gBAClCZ,KAAA,CAAA0D,aAAA,CAACzC,WAAW,MAAE,CAAC,eACfjB,KAAA,CAAA0D,aAAA,CAACxC,KAAK,QAAE4B,WAAW,GAAGP,MAAM,CAAC2B,UAAU,GAAG3B,MAAM,CAAC4B,SAAiB,CAC3D,CAAC,EAET3D,QAAQ,iBACPR,KAAA,CAAA0D,aAAA,CAAC/D,cAAc;IACbyE,SAAS,EAAE;MACTC,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC;MACjCC,uBAAuB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG;IAC1C;EAAE,gBAEFtE,KAAA,CAAA0D,aAAA,CAACtC,qBAAqB,qBACpBpB,KAAA,CAAA0D,aAAA,CAACtE,MAAM;IACLmF,IAAI,EAAC,OAAO;IACZC,IAAI,EAAC,OAAO;IACZC,OAAO,EAAGX,CAAC,IAAK;MACdd,iBAAiB,CAAC,IAAI,CAAC;MACvBc,CAAC,CAACY,eAAe,CAAC,CAAC;IACrB;EAAE,gBAEF1E,KAAA,CAAA0D,aAAA,CAACpE,MAAM,MAAE,CACH,CACa,CACT,CAEX,CACA,CAAC;AAEhB,CACF,CAAC;AAED8C,WAAW,CAACuC,WAAW,GAAG,aAAa;AAEvC,eAAevC,WAAW","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultLocale.js","names":["defaultLocale","touchTitle","dropTitle"],"sources":["../../../../src/ImageUpload/utils/defaultLocale.ts"],"sourcesContent":["export interface ImageUploadLocale {\n touchTitle: string;\n dropTitle: string;\n}\n\nconst defaultLocale: ImageUploadLocale = {\n touchTitle: 'Click here to choose an image',\n dropTitle: 'Drop an image here or click to choose it',\n};\n\nexport default defaultLocale;\n"],"mappings":"AAKA,MAAMA,aAAgC,GAAG;EACvCC,UAAU,EAAE,+BAA+B;EAC3CC,SAAS,EAAE;AACb,CAAC;AAED,eAAeF,aAAa","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["styled","Skeleton","sizeStyles","omitEmotionProps","React","forwardRef","StyledImageUploadSkeleton","p","theme","imageUploadMaxWidth","imageUploadMinHeight","ImageUploadSkeleton","props","ref","createElement","_extends","width","displayName"],"sources":["../../../src/ImageUploadSkeleton/index.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Skeleton, SkeletonProps } from '@os-design/core';\nimport { sizeStyles, WithSize } from '@os-design/styles';\nimport { omitEmotionProps } from '@os-design/utils';\nimport React, { forwardRef } from 'react';\n\nexport type ImageUploadSkeletonProps = Omit<SkeletonProps, 'width'> & WithSize;\n\nconst StyledImageUploadSkeleton = styled(\n Skeleton,\n omitEmotionProps('size')\n)<WithSize>`\n max-width: ${(p) => p.theme.imageUploadMaxWidth}em;\n height: ${(p) => p.theme.imageUploadMinHeight}em;\n ${sizeStyles};\n`;\n\n/**\n * Provides an image upload placeholder while a user waits for\n * the content to load.\n */\nconst ImageUploadSkeleton = forwardRef<\n HTMLDivElement,\n ImageUploadSkeletonProps\n>((props, ref) => (\n <StyledImageUploadSkeleton width='100%' {...props} ref={ref} />\n));\n\nImageUploadSkeleton.displayName = 'ImageUploadSkeleton';\n\nexport default ImageUploadSkeleton;\n"],"mappings":";AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,QAAQ,QAAuB,iBAAiB;AACzD,SAASC,UAAU,QAAkB,mBAAmB;AACxD,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,OAAOC,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAIzC,MAAMC,yBAAyB,GAAGN,MAAM,CACtCC,QAAQ,EACRE,gBAAgB,CAAC,MAAM,CACzB,CAAW;AACX,eAAgBI,CAAC,IAAKA,CAAC,CAACC,KAAK,CAACC,mBAAmB;AACjD,YAAaF,CAAC,IAAKA,CAAC,CAACC,KAAK,CAACE,oBAAoB;AAC/C,IAAIR,UAAU;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMS,mBAAmB,gBAAGN,UAAU,CAGpC,CAACO,KAAK,EAAEC,GAAG,kBACXT,KAAA,CAAAU,aAAA,CAACR,yBAAyB,EAAAS,QAAA;EAACC,KAAK,EAAC;AAAM,GAAKJ,KAAK;EAAEC,GAAG,EAAEA;AAAI,EAAE,CAC/D,CAAC;AAEFF,mBAAmB,CAACM,WAAW,GAAG,qBAAqB;AAEvD,eAAeN,mBAAmB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["default","ImageUpload","ImageUploadSkeleton"],"sources":["../../src/index.ts"],"sourcesContent":["export * from './ImageUpload';\nexport { default as ImageUpload } from './ImageUpload';\nexport * from './ImageUploadSkeleton';\nexport { default as ImageUploadSkeleton } from './ImageUploadSkeleton';\n"],"mappings":"AAAA,cAAc,eAAe;AAC7B,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,cAAc,uBAAuB;AACrC,SAASD,OAAO,IAAIE,mBAAmB,QAAQ,uBAAuB","ignoreList":[]}
@@ -1,24 +0,0 @@
1
- import { WithSize } from '@os-design/styles';
2
- import React from 'react';
3
- import { Accept } from 'react-dropzone';
4
- import { ImageUploadLocale } from './utils/defaultLocale';
5
- type JsxDivProps = Omit<JSX.IntrinsicElements['div'], 'defaultValue' | 'onChange' | 'ref'>;
6
- export interface ImageUploadProps extends JsxDivProps, WithSize {
7
- url?: string;
8
- accept?: Accept;
9
- locale?: ImageUploadLocale;
10
- value?: File | null;
11
- defaultValue?: File | null;
12
- onChange?: (value: File | null) => void;
13
- }
14
- interface OverlayProps {
15
- isDragActive: boolean;
16
- hasImage: boolean;
17
- }
18
- export declare const Overlay: import("@emotion/styled").StyledComponent<{
19
- theme?: import("@emotion/react").Theme;
20
- as?: React.ElementType;
21
- } & OverlayProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
- declare const ImageUpload: React.ForwardRefExoticComponent<ImageUploadProps & React.RefAttributes<HTMLDivElement>>;
23
- export default ImageUpload;
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ImageUpload/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAIT,MAAM,mBAAmB,CAAC;AAO3B,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,MAAM,EAAe,MAAM,gBAAgB,CAAC;AACrD,OAAsB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEzE,KAAK,WAAW,GAAG,IAAI,CACrB,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAC5B,cAAc,GAAG,UAAU,GAAG,KAAK,CACpC,CAAC;AACF,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,QAAQ;IAK7D,GAAG,CAAC,EAAE,MAAM,CAAC;IAKb,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAK3B,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAKpB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAK3B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAsBD,UAAU,YAAY;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,OAAO;;SAiKd,MAAA,WACG;oGA5IR,CAAC;AAmGF,QAAA,MAAM,WAAW,yFAiGhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultLocale.d.ts","sourceRoot":"","sources":["../../../../src/ImageUpload/utils/defaultLocale.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,aAAa,EAAE,iBAGpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,7 +0,0 @@
1
- import { SkeletonProps } from '@os-design/core';
2
- import { WithSize } from '@os-design/styles';
3
- import React from 'react';
4
- export type ImageUploadSkeletonProps = Omit<SkeletonProps, 'width'> & WithSize;
5
- declare const ImageUploadSkeleton: React.ForwardRefExoticComponent<Omit<SkeletonProps, "width"> & WithSize & React.RefAttributes<HTMLDivElement>>;
6
- export default ImageUploadSkeleton;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ImageUploadSkeleton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAc,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC;AAe/E,QAAA,MAAM,mBAAmB,gHAKvB,CAAC;AAIH,eAAe,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
File without changes