kui-crm 0.0.276 → 0.0.279
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 +32 -15
- package/cjs/index.js.map +1 -1
- package/index.d.ts +5 -1
- package/index.js +32 -15
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -2342,12 +2342,12 @@ var previewSizesStyles = {
|
|
|
2342
2342
|
sm: react.css(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n width: 32px;\n height: 32px;\n border-radius: 8px;\n "], ["\n width: 32px;\n height: 32px;\n border-radius: 8px;\n "]))),
|
|
2343
2343
|
};
|
|
2344
2344
|
var StyledImage$7 = styled__default["default"].img(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n"])));
|
|
2345
|
-
var StyledWrapper$f = styled__default["default"].div(templateObject_4$
|
|
2345
|
+
var StyledWrapper$f = styled__default["default"].div(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n overflow: hidden;\n ", ";\n"], ["\n overflow: hidden;\n ", ";\n"])), function (_a) {
|
|
2346
2346
|
var size = _a.size;
|
|
2347
2347
|
return previewSizesStyles[size];
|
|
2348
2348
|
});
|
|
2349
2349
|
var StyledNameWrapper = styled__default["default"](kuiBasic.Grid)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n background: ", ";\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n background: ", ";\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), kuiBasic.theme.palette.brand.light);
|
|
2350
|
-
var templateObject_1$P, templateObject_2$w, templateObject_3$o, templateObject_4$
|
|
2350
|
+
var templateObject_1$P, templateObject_2$w, templateObject_3$o, templateObject_4$b, templateObject_5$5;
|
|
2351
2351
|
|
|
2352
2352
|
function Modal(_a) {
|
|
2353
2353
|
var open = _a.open, other = __rest(_a, ["open"]);
|
|
@@ -2456,9 +2456,9 @@ function LoaderPopup(_a) {
|
|
|
2456
2456
|
var containerCSS = react.css(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n body {\n position: relative;\n }\n .KUI-LoadingPopup_container {\n display: flex;\n flex-direction: column-reverse;\n position: fixed;\n bottom: 56px;\n justify-content: center;\n width: 100%;\n align-items: center;\n z-index: 10000;\n }\n"], ["\n body {\n position: relative;\n }\n .KUI-LoadingPopup_container {\n display: flex;\n flex-direction: column-reverse;\n position: fixed;\n bottom: 56px;\n justify-content: center;\n width: 100%;\n align-items: center;\n z-index: 10000;\n }\n"])));
|
|
2457
2457
|
var StyledWrapper$c = styled__default["default"](kuiBasic.Grid)(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n height: 48px;\n border-radius: 66px;\n box-shadow: 0px 26px 34px rgba(0, 0, 0, 0.1);\n background: rgba(25, 25, 25, 0.8);\n padding: 4px 12px 4px 8px;\n margin-top: 16px;\n width: max-content;\n min-width: 247px;\n &:last-child {\n margin-top: 0;\n }\n"], ["\n height: 48px;\n border-radius: 66px;\n box-shadow: 0px 26px 34px rgba(0, 0, 0, 0.1);\n background: rgba(25, 25, 25, 0.8);\n padding: 4px 12px 4px 8px;\n margin-top: 16px;\n width: max-content;\n min-width: 247px;\n &:last-child {\n margin-top: 0;\n }\n"])));
|
|
2458
2458
|
var StyledCaption$4 = styled__default["default"](kuiBasic.Caption)(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n padding: 0 14px;\n"], ["\n padding: 0 14px;\n"])));
|
|
2459
|
-
var StyledLoader = styled__default["default"](kuiBasic.CircularProgress)(templateObject_4$
|
|
2459
|
+
var StyledLoader = styled__default["default"](kuiBasic.CircularProgress)(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n color: #f1f1f1;\n width: 28px !important;\n height: 28px !important;\n"], ["\n color: #f1f1f1;\n width: 28px !important;\n height: 28px !important;\n"])));
|
|
2460
2460
|
var CloseIconWrapper = styled__default["default"].div(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n cursor: pointer;\n margin-left: auto;\n height: 22px;\n"], ["\n cursor: pointer;\n margin-left: auto;\n height: 22px;\n"])));
|
|
2461
|
-
var templateObject_1$L, templateObject_2$u, templateObject_3$m, templateObject_4$
|
|
2461
|
+
var templateObject_1$L, templateObject_2$u, templateObject_3$m, templateObject_4$a, templateObject_5$4;
|
|
2462
2462
|
|
|
2463
2463
|
function LoaderState(_a) {
|
|
2464
2464
|
var loader = _a.loader, onlyError = _a.onlyError;
|
|
@@ -2682,13 +2682,25 @@ function PreviewImageCard(props) {
|
|
|
2682
2682
|
};
|
|
2683
2683
|
var handleHover = function () { return setCloseButtonOpacity(1); };
|
|
2684
2684
|
var handleBlur = function () { return setCloseButtonOpacity(0); };
|
|
2685
|
-
return (jsxRuntime.jsxs(Wrapper$6, __assign({ 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)] })));
|
|
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)] })));
|
|
2686
2686
|
}
|
|
2687
|
-
var Wrapper$6 = styled__default["default"].div(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n margin-top: 8px;\n position: relative;\n
|
|
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) {
|
|
2688
|
+
var width = _a.width;
|
|
2689
|
+
return width || 56;
|
|
2690
|
+
}, function (_a) {
|
|
2691
|
+
var width = _a.width;
|
|
2692
|
+
return width || 56;
|
|
2693
|
+
}, kuiBasic.theme.breakpoints.sm, function (_a) {
|
|
2694
|
+
var width = _a.width, mobileWidth = _a.mobileWidth;
|
|
2695
|
+
return mobileWidth || width || 56;
|
|
2696
|
+
}, function (_a) {
|
|
2697
|
+
var width = _a.width, mobileWidth = _a.mobileWidth;
|
|
2698
|
+
return mobileWidth || width || 56;
|
|
2699
|
+
});
|
|
2688
2700
|
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"])));
|
|
2689
2701
|
var Backdrop$1 = styled__default["default"].div(templateObject_3$k || (templateObject_3$k = __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"])));
|
|
2690
|
-
var StyledRemoveButton = styled__default["default"](kuiBasic.Button)(templateObject_4$
|
|
2691
|
-
var templateObject_1$I, templateObject_2$s, templateObject_3$k, templateObject_4$
|
|
2702
|
+
var StyledRemoveButton = styled__default["default"](kuiBasic.Button)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n //opacity: 0;\n pointer-events: none;\n width: 24px;\n height: 24px;\n position: absolute;\n transition: all ease-out 0.3s;\n &:disabled {\n opacity: 0;\n }\n"], ["\n //opacity: 0;\n pointer-events: none;\n width: 24px;\n height: 24px;\n position: absolute;\n transition: all ease-out 0.3s;\n &:disabled {\n opacity: 0;\n }\n"])));
|
|
2703
|
+
var templateObject_1$I, templateObject_2$s, templateObject_3$k, templateObject_4$9;
|
|
2692
2704
|
|
|
2693
2705
|
var getURLFromFile = function (fileList) {
|
|
2694
2706
|
return fileList[0] ? URL.createObjectURL(fileList[0]) : null;
|
|
@@ -2731,9 +2743,9 @@ function FileUploaderWithPreview(props) {
|
|
|
2731
2743
|
var StyledWrapper$b = styled__default["default"].div(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n border-radius: 8px;\n border: 1px dashed ", ";\n padding: 6px 16px 16px;\n display: inline-block;\n"], ["\n border-radius: 8px;\n border: 1px dashed ", ";\n padding: 6px 16px 16px;\n display: inline-block;\n"])), kuiBasic.theme.palette.grey.fifteenB);
|
|
2732
2744
|
var StyledLabel$1 = styled__default["default"].label(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n margin-top: 8px;\n display: block;\n cursor: pointer;\n"], ["\n margin-top: 8px;\n display: block;\n cursor: pointer;\n"])));
|
|
2733
2745
|
var StyledCircleButton = styled__default["default"](kuiBasic.Button)(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n border-radius: 8px;\n background: ", ";\n pointer-events: none;\n"], ["\n border-radius: 8px;\n background: ", ";\n pointer-events: none;\n"])), kuiBasic.theme.palette.background.light2);
|
|
2734
|
-
var StyledInput$3 = styled__default["default"].input(templateObject_4$
|
|
2746
|
+
var StyledInput$3 = styled__default["default"].input(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
|
|
2735
2747
|
var StyledErrorMessage = styled__default["default"](kuiBasic.Caption)(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n margin-top: 4px;\n"], ["\n margin-top: 4px;\n"])));
|
|
2736
|
-
var templateObject_1$H, templateObject_2$r, templateObject_3$j, templateObject_4$
|
|
2748
|
+
var templateObject_1$H, templateObject_2$r, templateObject_3$j, templateObject_4$8, templateObject_5$3;
|
|
2737
2749
|
|
|
2738
2750
|
var companyFields = [
|
|
2739
2751
|
{
|
|
@@ -3690,8 +3702,8 @@ var CardWrapper = styled__default["default"].div(templateObject_3$g || (template
|
|
|
3690
3702
|
var isCopied = _a.isCopied;
|
|
3691
3703
|
return (isCopied ? 1 : 0);
|
|
3692
3704
|
}, kuiBasic.theme.breakpoints.sm);
|
|
3693
|
-
var Wrapper$5 = styled__default["default"](kuiBasic.Grid)(templateObject_4$
|
|
3694
|
-
var templateObject_1$v, templateObject_2$m, templateObject_3$g, templateObject_4$
|
|
3705
|
+
var Wrapper$5 = styled__default["default"](kuiBasic.Grid)(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n width: auto;\n position: relative;\n"], ["\n width: auto;\n position: relative;\n"])));
|
|
3706
|
+
var templateObject_1$v, templateObject_2$m, templateObject_3$g, templateObject_4$7;
|
|
3695
3707
|
|
|
3696
3708
|
var GalleryNavigation = function (_a) {
|
|
3697
3709
|
var handlePrev = _a.handlePrev, handleNext = _a.handleNext;
|
|
@@ -3781,11 +3793,15 @@ var StyledButton$5 = styled__default["default"](kuiBasic.Button)(templateObject_
|
|
|
3781
3793
|
var templateObject_1$r, templateObject_2$i, templateObject_3$c;
|
|
3782
3794
|
|
|
3783
3795
|
var ImageCard = React.forwardRef(function (_a) {
|
|
3784
|
-
var url = _a.url, onClick = _a.onClick, index = _a.index, otherProps = __rest(_a, ["url", "onClick", "index"]);
|
|
3796
|
+
var url = _a.url, onClick = _a.onClick, index = _a.index, onDelete = _a.onDelete, otherProps = __rest(_a, ["url", "onClick", "index", "onDelete"]);
|
|
3785
3797
|
var handleClick = function () {
|
|
3786
3798
|
onClick(index);
|
|
3787
3799
|
};
|
|
3788
|
-
|
|
3800
|
+
var handleDelete = function () {
|
|
3801
|
+
if (onDelete)
|
|
3802
|
+
onDelete(index);
|
|
3803
|
+
};
|
|
3804
|
+
return (jsxRuntime.jsxs(Wrapper$2, __assign({ className: "KUI-ImageCard", onClick: handleClick }, otherProps, { children: [jsxRuntime.jsx(StyledImage$3, { src: url, alt: "image" }), jsxRuntime.jsx(Backdrop, { children: jsxRuntime.jsx(kuiIcon.LoupeIcon, {}) }), !!onDelete && (jsxRuntime.jsx(CloseButton, __assign({ isCircle: true, "data-testid": "file_delete_btn", variant: "white", onClick: handleDelete }, { children: jsxRuntime.jsx(kuiIcon.CloseIcon, { width: 8, height: 8 }) })))] })));
|
|
3789
3805
|
});
|
|
3790
3806
|
var Wrapper$2 = styled__default["default"].div(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n overflow: hidden;\n border-radius: 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 border-radius: 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) {
|
|
3791
3807
|
var width = _a.width;
|
|
@@ -3802,7 +3818,8 @@ var Wrapper$2 = styled__default["default"].div(templateObject_1$q || (templateOb
|
|
|
3802
3818
|
});
|
|
3803
3819
|
var StyledImage$3 = styled__default["default"].img(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
3804
3820
|
var Backdrop = styled__default["default"].div(templateObject_3$b || (templateObject_3$b = __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"])));
|
|
3805
|
-
var
|
|
3821
|
+
var CloseButton = styled__default["default"](kuiBasic.Button)(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n width: 24px;\n height: 24px;\n opacity: 0;\n transition: all ease-out 0.3s;\n position: absolute;\n top: -6px;\n right: -6px;\n @media (max-width: ", "px) {\n opacity: 1;\n top: -12px;\n right: -12px;\n }\n"], ["\n width: 24px;\n height: 24px;\n opacity: 0;\n transition: all ease-out 0.3s;\n position: absolute;\n top: -6px;\n right: -6px;\n @media (max-width: ", "px) {\n opacity: 1;\n top: -12px;\n right: -12px;\n }\n"])), kuiBasic.theme.breakpoints.sm);
|
|
3822
|
+
var templateObject_1$q, templateObject_2$h, templateObject_3$b, templateObject_4$6;
|
|
3806
3823
|
|
|
3807
3824
|
var ImageCardWithBackdrop = function (props) {
|
|
3808
3825
|
var count = props.count, width = props.width, mobileWidth = props.mobileWidth, imageCardProps = __rest(props, ["count", "width", "mobileWidth"]);
|