kui-crm 0.0.294 → 0.0.296
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/cjs/index.js +3 -14
- package/cjs/index.js.map +1 -1
- package/index.js +3 -14
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -2655,18 +2655,9 @@ function InputWithMap(_a) {
|
|
|
2655
2655
|
return (jsxRuntime.jsx(kuiComplex.MapWrapper, { children: jsxRuntime.jsx(kuiComplex.InputWithController, __assign({ form: form, name: "".concat(name, ".address"), ref: inputRef, endIcon: jsxRuntime.jsx(OpenMapButton, { place: place, onSave: handlePlaceSelect, disabled: disabled }), disabled: disabled, onChange: handleChange, placeholder: "" }, inputProps)) }));
|
|
2656
2656
|
}
|
|
2657
2657
|
|
|
2658
|
-
var buttonOffset = 12;
|
|
2659
2658
|
function PreviewImageCard(props) {
|
|
2660
2659
|
var url = props.url, onDelete = props.onDelete, onClick = props.onClick, index = props.index, disabled = props.disabled, otherProps = __rest(props, ["url", "onDelete", "onClick", "index", "disabled"]);
|
|
2661
|
-
var _a = React.useState(0), closeButtonOpacity = _a[0], setCloseButtonOpacity = _a[1];
|
|
2662
2660
|
var cardRef = React.useRef(null);
|
|
2663
|
-
var coords = usePortalPosition(cardRef);
|
|
2664
|
-
var closeButtonStyles = {
|
|
2665
|
-
right: coords ? coords.right - buttonOffset : 0,
|
|
2666
|
-
top: coords ? coords.top - buttonOffset : 0,
|
|
2667
|
-
display: closeButtonOpacity ? "flex" : "none",
|
|
2668
|
-
pointerEvents: closeButtonOpacity ? "all" : "none",
|
|
2669
|
-
};
|
|
2670
2661
|
var handleClick = function () {
|
|
2671
2662
|
if (onClick) {
|
|
2672
2663
|
onClick(index);
|
|
@@ -2680,11 +2671,9 @@ function PreviewImageCard(props) {
|
|
|
2680
2671
|
if (onDelete)
|
|
2681
2672
|
onDelete(index);
|
|
2682
2673
|
};
|
|
2683
|
-
|
|
2684
|
-
var handleBlur = function () { return setCloseButtonOpacity(0); };
|
|
2685
|
-
return (jsxRuntime.jsxs(Wrapper$6, __assign({ className: "KUI-ImageCard", onMouseEnter: handleHover, onMouseLeave: handleBlur, onClick: handleClick, ref: cardRef }, otherProps, { children: [jsxRuntime.jsx(StyledImage$6, { src: url, alt: "image" }), jsxRuntime.jsx(Backdrop$1, { children: jsxRuntime.jsx(kuiIcon.LoupeIcon, {}) }), ReactDOM.createPortal(jsxRuntime.jsx(StyledRemoveButton, __assign({ isCircle: true, variant: "white", onClick: handleDelete, style: closeButtonStyles, disabled: disabled }, { children: jsxRuntime.jsx(kuiIcon.CloseIcon, { width: 10, height: 10 }) })), document.body)] })));
|
|
2674
|
+
return (jsxRuntime.jsxs(Wrapper$6, __assign({ className: "KUI-ImageCard", onClick: handleClick, ref: cardRef }, otherProps, { children: [jsxRuntime.jsx(StyledImage$6, { src: url, alt: "image" }), jsxRuntime.jsx(Backdrop$1, { children: jsxRuntime.jsx(kuiIcon.LoupeIcon, {}) }), jsxRuntime.jsx(StyledRemoveButton, __assign({ isCircle: true, variant: "white", onClick: handleDelete, disabled: disabled, className: "KUI-Icon_Remove_Button" }, { children: jsxRuntime.jsx(kuiIcon.CloseIcon, { width: 10, height: 10 }) }))] })));
|
|
2686
2675
|
}
|
|
2687
|
-
var Wrapper$6 = styled__default["default"].div(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n overflow: hidden;\n margin-top: 8px;\n position: relative;\n cursor: pointer;\n user-select: none;\n width: ", "px;\n height: ", "px;\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"], ["\n overflow: hidden;\n margin-top: 8px;\n position: relative;\n cursor: pointer;\n user-select: none;\n width: ", "px;\n height: ", "px;\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"])), function (_a) {
|
|
2676
|
+
var Wrapper$6 = styled__default["default"].div(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n overflow: hidden;\n margin-top: 8px;\n position: relative;\n cursor: pointer;\n user-select: none;\n width: ", "px;\n height: ", "px;\n @media (hover: hover) {\n &:hover {\n .KUI-Icon_Remove_Button {\n opacity: 1;\n }\n }\n }\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"], ["\n overflow: hidden;\n margin-top: 8px;\n position: relative;\n cursor: pointer;\n user-select: none;\n width: ", "px;\n height: ", "px;\n @media (hover: hover) {\n &:hover {\n .KUI-Icon_Remove_Button {\n opacity: 1;\n }\n }\n }\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"])), function (_a) {
|
|
2688
2677
|
var width = _a.width;
|
|
2689
2678
|
return width || 56;
|
|
2690
2679
|
}, function (_a) {
|
|
@@ -2699,7 +2688,7 @@ var Wrapper$6 = styled__default["default"].div(templateObject_1$I || (templateOb
|
|
|
2699
2688
|
});
|
|
2700
2689
|
var StyledImage$6 = styled__default["default"].img(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n border-radius: 8px;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n border-radius: 8px;\n"])));
|
|
2701
2690
|
var Backdrop$1 = styled__default["default"].div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 8px;\n width: 100%;\n height: 100%;\n background-color: rgba(25, 25, 25, 0.4);\n transition: all ease-out 0.3s;\n opacity: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n &:hover {\n opacity: 1;\n }\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 8px;\n width: 100%;\n height: 100%;\n background-color: rgba(25, 25, 25, 0.4);\n transition: all ease-out 0.3s;\n opacity: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n &:hover {\n opacity: 1;\n }\n"])));
|
|
2702
|
-
var StyledRemoveButton = styled__default["default"](kuiBasic.Button)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n
|
|
2691
|
+
var StyledRemoveButton = styled__default["default"](kuiBasic.Button)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n opacity: 0;\n pointer-events: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 4px;\n right: 4px;\n transition: all ease-out 0.3s;\n &:disabled {\n opacity: 0;\n }\n @media (max-width: ", "px) {\n opacity: 1;\n }\n"], ["\n opacity: 0;\n pointer-events: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 4px;\n right: 4px;\n transition: all ease-out 0.3s;\n &:disabled {\n opacity: 0;\n }\n @media (max-width: ", "px) {\n opacity: 1;\n }\n"])), kuiBasic.theme.breakpoints.xs);
|
|
2703
2692
|
var templateObject_1$I, templateObject_2$s, templateObject_3$j, templateObject_4$9;
|
|
2704
2693
|
|
|
2705
2694
|
var getURLFromFile = function (fileList) {
|