@mailstep/design-system 0.1.20 → 0.1.21
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/package.json +2 -2
- package/ui/Blocks/ImageList/ImageList.js +3 -3
- package/ui/Blocks/ImageList/ImageList.js.map +1 -1
- package/ui/Blocks/ImageList/components/AddPhoto/index.js +12 -7
- package/ui/Blocks/ImageList/components/AddPhoto/index.js.map +1 -1
- package/ui/Blocks/ImageList/components/AddPhoto/styles.js +4 -1
- package/ui/Blocks/ImageList/components/AddPhoto/styles.js.map +1 -1
- package/ui/Blocks/ImageList/components/CloseButton/index.js +2 -2
- package/ui/Blocks/ImageList/components/CloseButton/index.js.map +1 -1
- package/ui/Blocks/ImageList/components/CloseButton/styles.js +4 -1
- package/ui/Blocks/ImageList/components/CloseButton/styles.js.map +1 -1
- package/ui/Blocks/ImageList/components/ImageElement/index.js +2 -2
- package/ui/Blocks/ImageList/components/ImageElement/index.js.map +1 -1
- package/ui/Blocks/ImageList/types.d.ts +3 -1
- package/ui/Elements/Icon/icons/AddPhoto.js +7 -0
- package/ui/Elements/Icon/icons/AddPhoto.js.map +1 -0
- package/ui/Elements/Icon/types.d.ts +1 -0
- package/ui/dts/Blocks/ImageList/components/AddPhoto/index.d.ts +1 -0
- package/ui/dts/Blocks/ImageList/components/AddPhoto/styles.d.ts +3 -1
- package/ui/dts/Blocks/ImageList/components/CloseButton/index.d.ts +1 -0
- package/ui/dts/Blocks/ImageList/components/CloseButton/styles.d.ts +3 -1
- package/ui/dts/Blocks/ImageList/components/ImageElement/index.d.ts +1 -0
- package/ui/dts/Blocks/ImageList/types.d.ts +3 -1
- package/ui/dts/Elements/Icon/icons/AddPhoto.d.ts +3 -0
- package/ui/dts/Elements/Icon/icons/index.d.ts +1 -0
- package/ui/dts/Elements/Icon/types.d.ts +1 -0
- package/ui/index.js +1 -0
- package/ui/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailstep/design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./ui/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"storybook": "storybook dev -p 6006",
|
|
14
14
|
"build": "rm -rf ./build && rollup -c && cp package.json build",
|
|
15
15
|
"build-storybook": "storybook build",
|
|
16
|
-
"deploy": "npm
|
|
16
|
+
"deploy": "npm publish ./build",
|
|
17
17
|
"dev": "yarn storybook",
|
|
18
18
|
"test": "echo \"The tests are still waiting to be written, but it seems like they're really good at procrastinating!\""
|
|
19
19
|
},
|
|
@@ -10,13 +10,13 @@ import { x } from '@xstyled/styled-components';
|
|
|
10
10
|
import { ImageListContainer } from './styles.js';
|
|
11
11
|
|
|
12
12
|
var ImageList = function (_a) {
|
|
13
|
-
var onImageUpload = _a.onImageUpload, onImageRemove = _a.onImageRemove, lightBoxAction = _a.lightBoxAction, lightBoxActionTitle = _a.lightBoxActionTitle, images = _a.images;
|
|
13
|
+
var onImageUpload = _a.onImageUpload, onImageRemove = _a.onImageRemove, lightBoxAction = _a.lightBoxAction, lightBoxActionTitle = _a.lightBoxActionTitle, images = _a.images, isDisabled = _a.isDisabled;
|
|
14
14
|
var ref = useRef();
|
|
15
15
|
var events = useDraggable(ref, { isMounted: !!(images === null || images === void 0 ? void 0 : images.length) }).events;
|
|
16
16
|
var _b = useLightBox(), isLightBoxOpen = _b.isLightBoxOpen, onCloseLightBox = _b.onCloseLightBox, onOpenLightBox = _b.onOpenLightBox, lightBoxData = _b.lightBoxData;
|
|
17
|
-
return (jsxs(x.div, { display: "flex", alignItems: "flex-end", children: [jsx(AddPhoto, { onImageUpload: onImageUpload }), images && (jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {
|
|
17
|
+
return (jsxs(x.div, { display: "flex", alignItems: "flex-end", children: [jsx(AddPhoto, { onImageUpload: onImageUpload, isDisabled: isDisabled }), images && (jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {
|
|
18
18
|
var _a, _b;
|
|
19
|
-
return (jsx(ImageElement, { imageUrl: (_a = item.smallUrl) !== null && _a !== void 0 ? _a : item.url, onImageRemove: onImageRemove === null || onImageRemove === void 0 ? void 0 : onImageRemove(item.id), onOpenLightBox: onOpenLightBox(index) }, (_b = item.id) !== null && _b !== void 0 ? _b : index));
|
|
19
|
+
return (jsx(ImageElement, { imageUrl: (_a = item.smallUrl) !== null && _a !== void 0 ? _a : item.url, onImageRemove: onImageRemove === null || onImageRemove === void 0 ? void 0 : onImageRemove(item.id), onOpenLightBox: onOpenLightBox(index), isDisabled: isDisabled }, (_b = item.id) !== null && _b !== void 0 ? _b : index));
|
|
20
20
|
}) }))), jsx(LightBox, { initialSlide: lightBoxData === null || lightBoxData === void 0 ? void 0 : lightBoxData.initialSlide, isLightBoxOpen: isLightBoxOpen, onCloseLightBox: onCloseLightBox, lightBoxAction: lightBoxAction, lightBoxActionTitle: lightBoxActionTitle, images: images })] }));
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageList.js","sources":["../../../../packages/ui/Blocks/ImageList/ImageList.tsx"],"sourcesContent":["import { __assign } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from 'react';\nimport { useDraggable } from 'react-use-draggable-scroll';\nimport LightBox, { useLightBox } from '../LightBox';\nimport { AddPhoto } from './components/AddPhoto';\nimport { ImageElement } from './components/ImageElement';\nimport { x } from '@xstyled/styled-components';\nimport { ImageListContainer } from './styles';\nexport var ImageList = function (_a) {\n var onImageUpload = _a.onImageUpload, onImageRemove = _a.onImageRemove, lightBoxAction = _a.lightBoxAction, lightBoxActionTitle = _a.lightBoxActionTitle, images = _a.images;\n var ref = useRef();\n var events = useDraggable(ref, { isMounted: !!(images === null || images === void 0 ? void 0 : images.length) }).events;\n var _b = useLightBox(), isLightBoxOpen = _b.isLightBoxOpen, onCloseLightBox = _b.onCloseLightBox, onOpenLightBox = _b.onOpenLightBox, lightBoxData = _b.lightBoxData;\n return (_jsxs(x.div, { display: \"flex\", alignItems: \"flex-end\", children: [_jsx(AddPhoto, { onImageUpload: onImageUpload }), images && (_jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {\n var _a, _b;\n return (_jsx(ImageElement, { imageUrl: (_a = item.smallUrl) !== null && _a !== void 0 ? _a : item.url, onImageRemove: onImageRemove === null || onImageRemove === void 0 ? void 0 : onImageRemove(item.id), onOpenLightBox: onOpenLightBox(index) }, (_b = item.id) !== null && _b !== void 0 ? _b : index));\n }) }))), _jsx(LightBox, { initialSlide: lightBoxData === null || lightBoxData === void 0 ? void 0 : lightBoxData.initialSlide, isLightBoxOpen: isLightBoxOpen, onCloseLightBox: onCloseLightBox, lightBoxAction: lightBoxAction, lightBoxActionTitle: lightBoxActionTitle, images: images })] }));\n};\n//# sourceMappingURL=ImageList.js.map"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;AASU,IAAC,SAAS,GAAG,UAAU,EAAE,EAAE;AACrC,IAAI,IAAI,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageList.js","sources":["../../../../packages/ui/Blocks/ImageList/ImageList.tsx"],"sourcesContent":["import { __assign } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from 'react';\nimport { useDraggable } from 'react-use-draggable-scroll';\nimport LightBox, { useLightBox } from '../LightBox';\nimport { AddPhoto } from './components/AddPhoto';\nimport { ImageElement } from './components/ImageElement';\nimport { x } from '@xstyled/styled-components';\nimport { ImageListContainer } from './styles';\nexport var ImageList = function (_a) {\n var onImageUpload = _a.onImageUpload, onImageRemove = _a.onImageRemove, lightBoxAction = _a.lightBoxAction, lightBoxActionTitle = _a.lightBoxActionTitle, images = _a.images, isDisabled = _a.isDisabled;\n var ref = useRef();\n var events = useDraggable(ref, { isMounted: !!(images === null || images === void 0 ? void 0 : images.length) }).events;\n var _b = useLightBox(), isLightBoxOpen = _b.isLightBoxOpen, onCloseLightBox = _b.onCloseLightBox, onOpenLightBox = _b.onOpenLightBox, lightBoxData = _b.lightBoxData;\n return (_jsxs(x.div, { display: \"flex\", alignItems: \"flex-end\", children: [_jsx(AddPhoto, { onImageUpload: onImageUpload, isDisabled: isDisabled }), images && (_jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {\n var _a, _b;\n return (_jsx(ImageElement, { imageUrl: (_a = item.smallUrl) !== null && _a !== void 0 ? _a : item.url, onImageRemove: onImageRemove === null || onImageRemove === void 0 ? void 0 : onImageRemove(item.id), onOpenLightBox: onOpenLightBox(index), isDisabled: isDisabled }, (_b = item.id) !== null && _b !== void 0 ? _b : index));\n }) }))), _jsx(LightBox, { initialSlide: lightBoxData === null || lightBoxData === void 0 ? void 0 : lightBoxData.initialSlide, isLightBoxOpen: isLightBoxOpen, onCloseLightBox: onCloseLightBox, lightBoxAction: lightBoxAction, lightBoxActionTitle: lightBoxActionTitle, images: images })] }));\n};\n//# sourceMappingURL=ImageList.js.map"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;AASU,IAAC,SAAS,GAAG,UAAU,EAAE,EAAE;AACrC,IAAI,IAAI,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AAC7M,IAAI,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;AACvB,IAAI,IAAI,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC;AAC5H,IAAI,IAAI,EAAE,GAAG,WAAW,EAAE,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,eAAe,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC;AACzK,IAAI,QAAQA,IAAK,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,CAACC,GAAI,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,KAAKA,GAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,KAAK,EAAE;AAC1Q,oBAAoB,IAAI,EAAE,EAAE,EAAE,CAAC;AAC/B,oBAAoB,QAAQA,GAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,aAAa,EAAE,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE;AACzV,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAEA,GAAI,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AAClT;;;;"}
|
|
@@ -2,9 +2,10 @@ import { __awaiter, __generator } from 'tslib';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import { Container, HiddenInput } from './styles.js';
|
|
5
|
+
import { AddPhoto as AddPhoto$1 } from '../../../../Elements/Icon/icons/AddPhoto.js';
|
|
5
6
|
|
|
6
7
|
var AddPhoto = function (_a) {
|
|
7
|
-
var onImageUpload = _a.onImageUpload;
|
|
8
|
+
var onImageUpload = _a.onImageUpload, isDisabled = _a.isDisabled;
|
|
8
9
|
var handleImageUpload = useCallback(function (event) {
|
|
9
10
|
var _a, _b;
|
|
10
11
|
if (!((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]))
|
|
@@ -12,12 +13,16 @@ var AddPhoto = function (_a) {
|
|
|
12
13
|
var reader = new FileReader();
|
|
13
14
|
reader.readAsDataURL(event.target.files[0]);
|
|
14
15
|
reader.onload = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
15
|
-
var _a;
|
|
16
|
-
return __generator(this, function (
|
|
17
|
-
switch (
|
|
18
|
-
case 0: return [4 /*yield*/, (onImageUpload === null || onImageUpload === void 0 ? void 0 : onImageUpload({
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return __generator(this, function (_c) {
|
|
18
|
+
switch (_c.label) {
|
|
19
|
+
case 0: return [4 /*yield*/, (onImageUpload === null || onImageUpload === void 0 ? void 0 : onImageUpload({
|
|
20
|
+
base64image: (_a = reader.result) === null || _a === void 0 ? void 0 : _a.split(',').pop(),
|
|
21
|
+
base64WithDataDeclaration: reader.result,
|
|
22
|
+
file: (_b = event.target.files) === null || _b === void 0 ? void 0 : _b[0],
|
|
23
|
+
}))];
|
|
19
24
|
case 1:
|
|
20
|
-
|
|
25
|
+
_c.sent();
|
|
21
26
|
return [2 /*return*/];
|
|
22
27
|
}
|
|
23
28
|
});
|
|
@@ -25,7 +30,7 @@ var AddPhoto = function (_a) {
|
|
|
25
30
|
}, [onImageUpload]);
|
|
26
31
|
if (!onImageUpload)
|
|
27
32
|
return null;
|
|
28
|
-
return (jsxs(Container, { children: [jsx(HiddenInput, { onChange: handleImageUpload, type: "file", accept: "image/*" }),
|
|
33
|
+
return (jsxs(Container, { isDisabled: isDisabled, children: [jsx(HiddenInput, { disabled: isDisabled, onChange: handleImageUpload, type: "file", accept: "image/*" }), jsx(AddPhoto$1, { width: "36", height: "36" })] }));
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
export { AddPhoto };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/AddPhoto/index.tsx"],"sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback } from 'react';\nimport { Container, HiddenInput } from './styles';\nexport var AddPhoto = function (_a) {\n var onImageUpload = _a.onImageUpload;\n var handleImageUpload = useCallback(function (event) {\n var _a, _b;\n if (!((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]))\n return;\n var reader = new FileReader();\n reader.readAsDataURL(event.target.files[0]);\n reader.onload = function () { return __awaiter(void 0, void 0, void 0, function () {\n var _a;\n return __generator(this, function (
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/AddPhoto/index.tsx"],"sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback } from 'react';\nimport { Container, HiddenInput } from './styles';\nimport { AddPhoto as AddPhotoIcon } from '../../../../Elements/Icon/icons/AddPhoto';\nexport var AddPhoto = function (_a) {\n var onImageUpload = _a.onImageUpload, isDisabled = _a.isDisabled;\n var handleImageUpload = useCallback(function (event) {\n var _a, _b;\n if (!((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]))\n return;\n var reader = new FileReader();\n reader.readAsDataURL(event.target.files[0]);\n reader.onload = function () { return __awaiter(void 0, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, (onImageUpload === null || onImageUpload === void 0 ? void 0 : onImageUpload({\n base64image: (_a = reader.result) === null || _a === void 0 ? void 0 : _a.split(',').pop(),\n base64WithDataDeclaration: reader.result,\n file: (_b = event.target.files) === null || _b === void 0 ? void 0 : _b[0],\n }))];\n case 1:\n _c.sent();\n return [2 /*return*/];\n }\n });\n }); };\n }, [onImageUpload]);\n if (!onImageUpload)\n return null;\n return (_jsxs(Container, { isDisabled: isDisabled, children: [_jsx(HiddenInput, { disabled: isDisabled, onChange: handleImageUpload, type: \"file\", accept: \"image/*\" }), _jsx(AddPhotoIcon, { width: \"36\", height: \"36\" })] }));\n};\n//# sourceMappingURL=index.js.map"],"names":["_jsxs","_jsx","AddPhotoIcon"],"mappings":";;;;;;AAKU,IAAC,QAAQ,GAAG,UAAU,EAAE,EAAE;AACpC,IAAI,IAAI,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AACrE,IAAI,IAAI,iBAAiB,GAAG,WAAW,CAAC,UAAU,KAAK,EAAE;AACzD,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;AACnB,QAAQ,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClI,YAAY,OAAO;AACnB,QAAQ,IAAI,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AACtC,QAAQ,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,QAAQ,MAAM,CAAC,MAAM,GAAG,YAAY,EAAE,OAAO,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY;AAC3F,YAAY,IAAI,EAAE,EAAE,EAAE,CAAC;AACvB,YAAY,OAAO,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE;AACnD,gBAAgB,QAAQ,EAAE,CAAC,KAAK;AAChC,oBAAoB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,aAAa,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC;AAC9H,4BAA4B,WAAW,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE;AACtH,4BAA4B,yBAAyB,EAAE,MAAM,CAAC,MAAM;AACpE,4BAA4B,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,yBAAyB,CAAC,EAAE,CAAC;AAC7B,oBAAoB,KAAK,CAAC;AAC1B,wBAAwB,EAAE,CAAC,IAAI,EAAE,CAAC;AAClC,wBAAwB,OAAO,CAAC,CAAC,YAAY,CAAC;AAC9C,iBAAiB;AACjB,aAAa,CAAC,CAAC;AACf,SAAS,CAAC,CAAC,EAAE,CAAC;AACd,KAAK,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,aAAa;AACtB,QAAQ,OAAO,IAAI,CAAC;AACpB,IAAI,QAAQA,IAAK,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,CAACC,GAAI,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAEA,GAAI,CAACC,UAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AACpO;;;;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { __makeTemplateObject } from 'tslib';
|
|
2
2
|
import styled, { th } from '@xstyled/styled-components';
|
|
3
3
|
|
|
4
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n flex-shrink: 0;\n height: 85px !important;\n width: 85px !important;\n border-radius: ", ";\n border: ", ";\n border-color: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n margin-right: 15px;\n"], ["\n position: relative;\n flex-shrink: 0;\n height: 85px !important;\n width: 85px !important;\n border-radius: ", ";\n border: ", ";\n border-color: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n margin-right: 15px;\n"])), th.radius('lg'), th.border('mediumSlim'), th.color('red1'))
|
|
4
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n flex-shrink: 0;\n transition: all 0.2s linear;\n height: 85px !important;\n width: 85px !important;\n border-radius: ", ";\n border: ", ";\n border-color: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n margin-right: 15px;\n opacity: ", ";\n"], ["\n position: relative;\n flex-shrink: 0;\n transition: all 0.2s linear;\n height: 85px !important;\n width: 85px !important;\n border-radius: ", ";\n border: ", ";\n border-color: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n margin-right: 15px;\n opacity: ", ";\n"])), th.radius('lg'), th.border('mediumSlim'), th.color('red1'), function (_a) {
|
|
5
|
+
var isDisabled = _a.isDisabled;
|
|
6
|
+
return (isDisabled ? 0.6 : 1);
|
|
7
|
+
});
|
|
5
8
|
var HiddenInput = styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n"], ["\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n"])));
|
|
6
9
|
var templateObject_1, templateObject_2;
|
|
7
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/AddPhoto/styles.ts"],"sourcesContent":["import { __makeTemplateObject } from \"tslib\";\nimport styled, { th } from '@xstyled/styled-components';\nexport var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n position: relative;\\n flex-shrink: 0;\\n height: 85px !important;\\n width: 85px !important;\\n border-radius: \", \";\\n border: \", \";\\n border-color: \", \";\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n margin-right: 15px;\\n\"], [\"\\n position: relative;\\n flex-shrink: 0;\\n height: 85px !important;\\n width: 85px !important;\\n border-radius: \", \";\\n border: \", \";\\n border-color: \", \";\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n margin-right: 15px;\\n\"])), th.radius('lg'), th.border('mediumSlim'), th.color('red1'));\nexport var HiddenInput = styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n opacity: 0;\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n cursor: pointer;\\n\"], [\"\\n opacity: 0;\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n cursor: pointer;\\n\"])));\nvar templateObject_1, templateObject_2;\n//# sourceMappingURL=styles.js.map"],"names":[],"mappings":";;;AAEU,IAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/AddPhoto/styles.ts"],"sourcesContent":["import { __makeTemplateObject } from \"tslib\";\nimport styled, { th } from '@xstyled/styled-components';\nexport var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n position: relative;\\n flex-shrink: 0;\\n transition: all 0.2s linear;\\n height: 85px !important;\\n width: 85px !important;\\n border-radius: \", \";\\n border: \", \";\\n border-color: \", \";\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n margin-right: 15px;\\n opacity: \", \";\\n\"], [\"\\n position: relative;\\n flex-shrink: 0;\\n transition: all 0.2s linear;\\n height: 85px !important;\\n width: 85px !important;\\n border-radius: \", \";\\n border: \", \";\\n border-color: \", \";\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n margin-right: 15px;\\n opacity: \", \";\\n\"])), th.radius('lg'), th.border('mediumSlim'), th.color('red1'), function (_a) {\n var isDisabled = _a.isDisabled;\n return (isDisabled ? 0.6 : 1);\n});\nexport var HiddenInput = styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n opacity: 0;\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n cursor: pointer;\\n\"], [\"\\n opacity: 0;\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n cursor: pointer;\\n\"])));\nvar templateObject_1, templateObject_2;\n//# sourceMappingURL=styles.js.map"],"names":[],"mappings":";;;AAEU,IAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,sJAAsJ,EAAE,eAAe,EAAE,qBAAqB,EAAE,iIAAiI,EAAE,KAAK,CAAC,EAAE,CAAC,sJAAsJ,EAAE,eAAe,EAAE,qBAAqB,EAAE,iIAAiI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE;AACn0B,IAAI,IAAI,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AACnC,IAAI,QAAQ,UAAU,GAAG,GAAG,GAAG,CAAC,EAAE;AAClC,CAAC,EAAE;AACO,IAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,gBAAgB,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,sHAAsH,CAAC,EAAE,CAAC,sHAAsH,CAAC,CAAC,CAAC,EAAE;AACzV,IAAI,gBAAgB,EAAE,gBAAgB;;;;"}
|
|
@@ -4,8 +4,8 @@ import 'tslib';
|
|
|
4
4
|
import { Container } from './styles.js';
|
|
5
5
|
|
|
6
6
|
var CloseButton = function (_a) {
|
|
7
|
-
var onImageRemove = _a.onImageRemove;
|
|
8
|
-
return (jsx(Container, { onClick: onImageRemove, children: jsx(Icon, { icon: "close", size: "22px", fill:
|
|
7
|
+
var onImageRemove = _a.onImageRemove, isDisabled = _a.isDisabled;
|
|
8
|
+
return (jsx(Container, { onClick: !isDisabled ? onImageRemove : undefined, isDisabled: isDisabled, children: jsx(Icon, { icon: "close", size: "22px", fill: isDisabled ? 'magenta60' : 'red1' }) }));
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { CloseButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/CloseButton/index.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Icon } from '../../../../Elements/Icon';\nimport { Container } from './styles';\nexport var CloseButton = function (_a) {\n var onImageRemove = _a.onImageRemove;\n return (_jsx(Container, { onClick: onImageRemove, children: _jsx(Icon, { icon: \"close\", size: \"22px\", fill:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/CloseButton/index.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Icon } from '../../../../Elements/Icon';\nimport { Container } from './styles';\nexport var CloseButton = function (_a) {\n var onImageRemove = _a.onImageRemove, isDisabled = _a.isDisabled;\n return (_jsx(Container, { onClick: !isDisabled ? onImageRemove : undefined, isDisabled: isDisabled, children: _jsx(Icon, { icon: \"close\", size: \"22px\", fill: isDisabled ? 'magenta60' : 'red1' }) }));\n};\n//# sourceMappingURL=index.js.map"],"names":["_jsx"],"mappings":";;;;;AAGU,IAAC,WAAW,GAAG,UAAU,EAAE,EAAE;AACvC,IAAI,IAAI,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AACrE,IAAI,QAAQA,GAAI,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,UAAU,GAAG,aAAa,GAAG,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAEA,GAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3M;;;;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { __makeTemplateObject } from 'tslib';
|
|
2
2
|
import styled, { th } from '@xstyled/styled-components';
|
|
3
3
|
|
|
4
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n width: 30px;\n height: 30px;\n background-color: ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n width: 30px;\n height: 30px;\n background-color: ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"])),
|
|
4
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n width: 30px;\n height: 30px;\n background-color: ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s linear;\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n width: 30px;\n height: 30px;\n background-color: ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s linear;\n"])), function (_a) {
|
|
5
|
+
var isDisabled = _a.isDisabled;
|
|
6
|
+
return th.color(isDisabled ? 'bgLightGray1' : 'red20');
|
|
7
|
+
});
|
|
5
8
|
var templateObject_1;
|
|
6
9
|
|
|
7
10
|
export { Container };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/CloseButton/styles.ts"],"sourcesContent":["import { __makeTemplateObject } from \"tslib\";\nimport styled, { th } from '@xstyled/styled-components';\nexport var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 30px;\\n height: 30px;\\n background-color: \", \";\\n border-radius: 50%;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n cursor: pointer;\\n\"], [\"\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 30px;\\n height: 30px;\\n background-color: \", \";\\n border-radius: 50%;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n cursor: pointer;\\n\"])), th.color('red20'));\nvar templateObject_1;\n//# sourceMappingURL=styles.js.map"],"names":[],"mappings":";;;AAEU,IAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,wGAAwG,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/CloseButton/styles.ts"],"sourcesContent":["import { __makeTemplateObject } from \"tslib\";\nimport styled, { th } from '@xstyled/styled-components';\nexport var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 30px;\\n height: 30px;\\n background-color: \", \";\\n border-radius: 50%;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n cursor: pointer;\\n transition: all 0.2s linear;\\n\"], [\"\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 30px;\\n height: 30px;\\n background-color: \", \";\\n border-radius: 50%;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n cursor: pointer;\\n transition: all 0.2s linear;\\n\"])), function (_a) {\n var isDisabled = _a.isDisabled;\n return th.color(isDisabled ? 'bgLightGray1' : 'red20');\n});\nvar templateObject_1;\n//# sourceMappingURL=styles.js.map"],"names":[],"mappings":";;;AAEU,IAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,wGAAwG,EAAE,sJAAsJ,CAAC,EAAE,CAAC,wGAAwG,EAAE,sJAAsJ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE;AACvnB,IAAI,IAAI,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AACnC,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;AAC3D,CAAC,EAAE;AACH,IAAI,gBAAgB;;;;"}
|
|
@@ -5,10 +5,10 @@ import { CloseButton } from '../CloseButton/index.js';
|
|
|
5
5
|
import { x } from '@xstyled/styled-components';
|
|
6
6
|
|
|
7
7
|
var ImageElement = function (_a) {
|
|
8
|
-
var label = _a.label, onImageRemove = _a.onImageRemove, onOpenLightBox = _a.onOpenLightBox, imageUrl = _a.imageUrl;
|
|
8
|
+
var label = _a.label, onImageRemove = _a.onImageRemove, isDisabled = _a.isDisabled, onOpenLightBox = _a.onOpenLightBox, imageUrl = _a.imageUrl;
|
|
9
9
|
if (!imageUrl)
|
|
10
10
|
return null;
|
|
11
|
-
return (jsxs(x.div, { position: "relative", pr: "15px", pt: "15px", w: "100px", children: [jsx(Image, { src: imageUrl, alt: "", width: "85px", height: "85px", onClick: onOpenLightBox }), onImageRemove && jsx(CloseButton, { onImageRemove: onImageRemove }), jsx(ImageTag, { label: label })] }));
|
|
11
|
+
return (jsxs(x.div, { position: "relative", pr: "15px", pt: "15px", w: "100px", children: [jsx(Image, { src: imageUrl, alt: "", width: "85px", height: "85px", onClick: onOpenLightBox }), onImageRemove && jsx(CloseButton, { onImageRemove: onImageRemove, isDisabled: isDisabled }), jsx(ImageTag, { label: label })] }));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { ImageElement };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/ImageElement/index.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Image } from './styles';\nimport { ImageTag } from '../ImageTag';\nimport { CloseButton } from '../CloseButton';\nimport { x } from '@xstyled/styled-components';\nexport var ImageElement = function (_a) {\n var label = _a.label, onImageRemove = _a.onImageRemove, onOpenLightBox = _a.onOpenLightBox, imageUrl = _a.imageUrl;\n if (!imageUrl)\n return null;\n return (_jsxs(x.div, { position: \"relative\", pr: \"15px\", pt: \"15px\", w: \"100px\", children: [_jsx(Image, { src: imageUrl, alt: \"\", width: \"85px\", height: \"85px\", onClick: onOpenLightBox }), onImageRemove && _jsx(CloseButton, { onImageRemove: onImageRemove }), _jsx(ImageTag, { label: label })] }));\n};\n//# sourceMappingURL=index.js.map"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAKU,IAAC,YAAY,GAAG,UAAU,EAAE,EAAE;AACxC,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/ui/Blocks/ImageList/components/ImageElement/index.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Image } from './styles';\nimport { ImageTag } from '../ImageTag';\nimport { CloseButton } from '../CloseButton';\nimport { x } from '@xstyled/styled-components';\nexport var ImageElement = function (_a) {\n var label = _a.label, onImageRemove = _a.onImageRemove, isDisabled = _a.isDisabled, onOpenLightBox = _a.onOpenLightBox, imageUrl = _a.imageUrl;\n if (!imageUrl)\n return null;\n return (_jsxs(x.div, { position: \"relative\", pr: \"15px\", pt: \"15px\", w: \"100px\", children: [_jsx(Image, { src: imageUrl, alt: \"\", width: \"85px\", height: \"85px\", onClick: onOpenLightBox }), onImageRemove && _jsx(CloseButton, { onImageRemove: onImageRemove, isDisabled: isDisabled }), _jsx(ImageTag, { label: label })] }));\n};\n//# sourceMappingURL=index.js.map"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAKU,IAAC,YAAY,GAAG,UAAU,EAAE,EAAE;AACxC,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;AACnJ,IAAI,IAAI,CAAC,QAAQ;AACjB,QAAQ,OAAO,IAAI,CAAC;AACpB,IAAI,QAAQA,IAAK,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAACC,GAAI,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,aAAa,IAAIA,GAAI,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,EAAEA,GAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AACrU;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ImageData } from '../LightBox/types.js';
|
|
2
2
|
|
|
3
3
|
interface ImageUploadProps {
|
|
4
|
-
|
|
4
|
+
base64image?: string;
|
|
5
|
+
base64WithDataDeclaration?: string;
|
|
5
6
|
file?: File;
|
|
6
7
|
}
|
|
7
8
|
interface ImageListProps {
|
|
@@ -10,6 +11,7 @@ interface ImageListProps {
|
|
|
10
11
|
onImageRemove?: (id?: string) => () => void;
|
|
11
12
|
lightBoxAction?: (id?: string) => () => Promise<void>;
|
|
12
13
|
lightBoxActionTitle?: string;
|
|
14
|
+
isDisabled?: boolean;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export { ImageListProps, ImageUploadProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { __assign } from 'tslib';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var AddPhoto = function (props) { return (jsxs("svg", __assign({ width: "36", height: "36", viewBox: "0 0 37 34", fill: "#DB2B19", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.82792 6.14124C10.7187 5.25044 11.9269 4.75 13.1867 4.75H19C19.8745 4.75 20.5833 5.45889 20.5833 6.33333C20.5833 7.20778 19.8745 7.91667 19 7.91667H13.1867C12.7668 7.91667 12.364 8.08349 12.0671 8.38041L10.7554 9.69209C9.86461 10.5829 8.65643 11.0833 7.39665 11.0833H4.75C3.87556 11.0833 3.16667 11.7922 3.16667 12.6667V28.5C3.16667 29.3745 3.87556 30.0833 4.75 30.0833H26.9167C27.7911 30.0833 28.5 29.3745 28.5 28.5V17.4167C28.5 16.5422 29.2089 15.8333 30.0833 15.8333C30.9578 15.8333 31.6667 16.5422 31.6667 17.4167V28.5C31.6667 31.1234 29.5401 33.25 26.9167 33.25H4.75C2.12665 33.25 0 31.1234 0 28.5V12.6667C0 10.0433 2.12665 7.91667 4.75 7.91667H7.39665C7.81658 7.91667 8.21931 7.74985 8.51624 7.45292L9.82792 6.14124Z" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.9165 20.5834C7.9165 16.2112 11.4609 12.6667 15.8332 12.6667C20.2054 12.6667 23.7498 16.2112 23.7498 20.5834C23.7498 24.9556 20.2054 28.5001 15.8332 28.5001C11.4609 28.5001 7.9165 24.9556 7.9165 20.5834ZM15.8332 15.8334C13.2098 15.8334 11.0832 17.96 11.0832 20.5834C11.0832 23.2068 13.2098 25.3334 15.8332 25.3334C18.4566 25.3334 20.5832 23.2068 20.5832 20.5834C20.5832 17.96 18.4566 15.8334 15.8332 15.8334Z" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M23.75 6.33333C23.75 5.45889 24.4589 4.75 25.3333 4.75H34.8333C35.7078 4.75 36.4167 5.45889 36.4167 6.33333C36.4167 7.20778 35.7078 7.91667 34.8333 7.91667H25.3333C24.4589 7.91667 23.75 7.20778 23.75 6.33333Z" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M30.0833 0C30.9578 0 31.6667 0.70889 31.6667 1.58333V11.0833C31.6667 11.9578 30.9578 12.6667 30.0833 12.6667C29.2089 12.6667 28.5 11.9578 28.5 11.0833V1.58333C28.5 0.70889 29.2089 0 30.0833 0Z" })] }))); };
|
|
5
|
+
|
|
6
|
+
export { AddPhoto };
|
|
7
|
+
//# sourceMappingURL=AddPhoto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddPhoto.js","sources":["../../../../../packages/ui/Elements/Icon/icons/AddPhoto.tsx"],"sourcesContent":["import { __assign } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var AddPhoto = function (props) { return (_jsxs(\"svg\", __assign({ width: \"36\", height: \"36\", viewBox: \"0 0 37 34\", fill: \"#DB2B19\", xmlns: \"http://www.w3.org/2000/svg\" }, props, { children: [_jsx(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M9.82792 6.14124C10.7187 5.25044 11.9269 4.75 13.1867 4.75H19C19.8745 4.75 20.5833 5.45889 20.5833 6.33333C20.5833 7.20778 19.8745 7.91667 19 7.91667H13.1867C12.7668 7.91667 12.364 8.08349 12.0671 8.38041L10.7554 9.69209C9.86461 10.5829 8.65643 11.0833 7.39665 11.0833H4.75C3.87556 11.0833 3.16667 11.7922 3.16667 12.6667V28.5C3.16667 29.3745 3.87556 30.0833 4.75 30.0833H26.9167C27.7911 30.0833 28.5 29.3745 28.5 28.5V17.4167C28.5 16.5422 29.2089 15.8333 30.0833 15.8333C30.9578 15.8333 31.6667 16.5422 31.6667 17.4167V28.5C31.6667 31.1234 29.5401 33.25 26.9167 33.25H4.75C2.12665 33.25 0 31.1234 0 28.5V12.6667C0 10.0433 2.12665 7.91667 4.75 7.91667H7.39665C7.81658 7.91667 8.21931 7.74985 8.51624 7.45292L9.82792 6.14124Z\" }), _jsx(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.9165 20.5834C7.9165 16.2112 11.4609 12.6667 15.8332 12.6667C20.2054 12.6667 23.7498 16.2112 23.7498 20.5834C23.7498 24.9556 20.2054 28.5001 15.8332 28.5001C11.4609 28.5001 7.9165 24.9556 7.9165 20.5834ZM15.8332 15.8334C13.2098 15.8334 11.0832 17.96 11.0832 20.5834C11.0832 23.2068 13.2098 25.3334 15.8332 25.3334C18.4566 25.3334 20.5832 23.2068 20.5832 20.5834C20.5832 17.96 18.4566 15.8334 15.8332 15.8334Z\" }), _jsx(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M23.75 6.33333C23.75 5.45889 24.4589 4.75 25.3333 4.75H34.8333C35.7078 4.75 36.4167 5.45889 36.4167 6.33333C36.4167 7.20778 35.7078 7.91667 34.8333 7.91667H25.3333C24.4589 7.91667 23.75 7.20778 23.75 6.33333Z\" }), _jsx(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M30.0833 0C30.9578 0 31.6667 0.70889 31.6667 1.58333V11.0833C31.6667 11.9578 30.9578 12.6667 30.0833 12.6667C29.2089 12.6667 28.5 11.9578 28.5 11.0833V1.58333C28.5 0.70889 29.2089 0 30.0833 0Z\" })] }))); };\n//# sourceMappingURL=AddPhoto.js.map"],"names":["_jsxs","_jsx"],"mappings":";;;AAEU,IAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,EAAE,QAAQA,IAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,4BAA4B,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,CAACC,GAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,stBAAstB,EAAE,CAAC,EAAEA,GAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,4ZAA4Z,EAAE,CAAC,EAAEA,GAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,kNAAkN,EAAE,CAAC,EAAEA,GAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,kMAAkM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;;;;"}
|
|
@@ -2,6 +2,7 @@ import { type FC } from 'react';
|
|
|
2
2
|
import { type ImageUploadProps } from '../../types';
|
|
3
3
|
interface AddPhotoProps {
|
|
4
4
|
onImageUpload?: (props: ImageUploadProps) => Promise<void>;
|
|
5
|
+
isDisabled?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const AddPhoto: FC<AddPhotoProps>;
|
|
7
8
|
export {};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare const Container: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
2
|
+
isDisabled?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
2
4
|
export declare const HiddenInput: import("styled-components").StyledComponent<"input", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const Container: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
2
|
+
isDisabled?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ImageData } from '../LightBox';
|
|
2
2
|
export interface ImageUploadProps {
|
|
3
|
-
|
|
3
|
+
base64image?: string;
|
|
4
|
+
base64WithDataDeclaration?: string;
|
|
4
5
|
file?: File;
|
|
5
6
|
}
|
|
6
7
|
export interface ImageListProps {
|
|
@@ -9,4 +10,5 @@ export interface ImageListProps {
|
|
|
9
10
|
onImageRemove?: (id?: string) => () => void;
|
|
10
11
|
lightBoxAction?: (id?: string) => () => Promise<void>;
|
|
11
12
|
lightBoxActionTitle?: string;
|
|
13
|
+
isDisabled?: boolean;
|
|
12
14
|
}
|
package/ui/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export { BarcodeScan } from './Elements/Icon/icons/BarcodeScan.js';
|
|
|
45
45
|
export { Inventory2 } from './Elements/Icon/icons/Inventory2.js';
|
|
46
46
|
export { Logout1 } from './Elements/Icon/icons/Logout1.js';
|
|
47
47
|
export { Puzzle1 } from './Elements/Icon/icons/Puzzle1.js';
|
|
48
|
+
export { AddPhoto } from './Elements/Icon/icons/AddPhoto.js';
|
|
48
49
|
export { default as Image } from './Elements/Image/Image.js';
|
|
49
50
|
export { FieldLabel, Label } from './Elements/Label/Label.js';
|
|
50
51
|
export { default as Line } from './Elements/Line/Line.js';
|
package/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|